1. 31
  1. 13

    er, not available yet?

    I’d be more interested if I could read the source.

    1. 22

      The marketing style of V and Volt.ws really bothers me. Both state features and achievements, but the links to those things point to nowhere! For example, V promises complete translation of C++ to V, with LevelDB, Doom, and Doom3 success stories, but those things link to # or javascript:alert(‘coming soon’). Same with the “Playground” link in the header. On the Volt.ws website, there were Windows and Linux download links that did the same “coming soon” stuff, although those now say “Coming February”.

      This language remains vaporware until proven otherwise.

      1. 10

        Sorry, what’s vaporware? I have a working product built 100% in V: https://volt.ws

        The playground will be live in about a week.

        I literally released this site a couple of days ago and didn’t promote it anywhere :)

        1. 8

          From Google’s “define:vaporware”:

          software […] that has been advertised but is not yet available […], either because it is only a concept or because it is still being written or designed.

          Both V and Volt are very exciting projects, and I understand wanting to share them with the world in the way you conceptualize them and plan them. You set tight deadlines for yourself and seem to be working full-tilt, so these projects are very real to you. In your position, I’d be dying to publish about either as soon as possible.

          But consider my experience as a prospective user and supporter: each time I’ve clicked through to either Volt or V, I’ve been excited by the text on the page, but unable to follow any of the links I click!

          • When Volt was still called Eul, I downloaded it but it crashed at launch. No fault there, super-alpha software. I’ll try again later.
          • The next time I saw Eul on HN, another user pointed out it was downloading 100MB+ of browser on first run. You promised a rewrite would fix this issue, so I held off. Again, no judgement from me on an implementation side, but the marketing seemed a tiny bit questionable.
          • After the name change to Volt, I was excited to try it again. I had read the page about the new language and been impressed by the live reload demo. Then I click the download link for my platform, but nothing happens - just a link to #. Frustrating.
          • Now V has its own site, Reddit, Slack, etc, and I’m still seeing the same pattern of flashy claims with little to back them up.

          I’m very excited for your project’s goals, and I’ve been following for years, but I’d much prefer you to “under-promise and over-deliver” than the other way around.

        2. 7

          V promises complete translation of C++ to V

          I submitted the ZL links to get people interested in something that might be able to convert C++ to C or other languages easier than usual. It still seemed hard if covering old and new projects. Edison Group stays in business doing that for everyone for a reason. I was wondering how I’d even start. Maybe 80/20 rule where certain features get used way more than others. Can focus on them. I’ve read C++ programmers talking about all kinds of crazy stuff people do with the language, though. Formal semantics are in infancy or just really weak, too.

          So, the author said they could convert big, legacy programs in C++ to V. Such an achievement makes me go “Hell yeah!” and “WTF!?” at the same time. What I did note is Doom and SQLite were written by skilled coders who put a lot of effort into things like style and testing. They might even use less of the language for performance and maintainability. My first question was whether those projects were chosen because they’d be easier to convert than random C++ projects. Vendors of lots of tools pick stuff with low likelihood of failure to highlight how it will succeed in unrelated cases. I want to see this conversion tool applied to both average and horrid codebases in C++ to really test it.

          And then Nginx since it’s (a) Net-critical, (b) something many of us want to see ported to a safe, system language, and (c) massive. I don’t know if it has good, average, or bad code. Converting something like that would be a big-time result. Especially if people picked up the new language to improve the fork at a faster rate. That’s what you really want with ports to something like D, Zig or V.

          1. 6

            My first question was whether those projects were chosen because they’d be easier to convert than random C++ projects

            You are correct. It’s better to start with easier projects. I tried to translate a project with much worse code quality and Boost dependency (VCMI, open source HoMM 3), and it was ugly.

        3. 11

          If you’re going to birth a new programming language in this era, can you please make it not be named a single letter? Pretty please. This makes searching for things about the language much harder than it needs to be.

          1. 6

            I told the author. They’re thinking of names but running into the “already taken” problem. Probably still thinking on it.

            1. 4

              Yes, name suggestions are welcome. I guess it’s best to come up with a new word that makes sense and is google’able. Like Scala.

              1. 1

                I was going to suggest Volt but found that exists. Another systems language trying to be better than C. These things are popping up everywhere. Might be better to consider something other than one starting with V. Not to say there isn’t something in the dictionary waiting to be discovered.

                1. 1

                  I went through 10 names, all of them were taken by other languages :)

                  Volt was my initial idea too. Although it’s weird having the same name for the language and the product.

                  1. 1

                    Nothing wrong in having name collisions with other projects.

                    (Nothing wrong in single-letter names either, but if you would prefer not to have one you shouldn’t let the lack of unique names stop you.)

                    1. 1

                      I got the same feeling yesterday.

                    2. 1

                      Yeah, I thought about that. Might get you two things in top of Google, though. Probably better if they’re different.

                      Far as taken, remember that there’s endless ideas that have been tried in the past that nobody will think about or use. New products keep showing up with some of the same names. Quite a few get big. The conflict caused no problems since the older thing didn’t matter. So, you might still be able to use an existing name if it’s a project with no attention whose owner isn’t likely to sue you. You could give that great name the reputation it deserves. :)

            2. 9

              Kinda feels like they went half-way to an ML, and stopped before picking up some of the good parts and held on to weird C syntax baggage. Hope they do well nonetheless, could be quite interesting in its space.

              1. 6

                I can’t form an opinion about the language, there’s too little information available. I don’t even know if it is garbage collected or requires manual allocation/deallocation. The syntax is a mashup of Go and Rust, closer to Go, and it is “safe”, so probably garbage collected?

                Based solely on the web site information, this claim seems incorrect and/or misleading:

                This tool supports the latest standard of notoriously complex C++ and allows full automatic conversion to human readable code.

                It says “full automatic conversion (of C++) to human readable code”. But this language is missing a lot of features that would be needed to make this possible, such as classes with multiple inheritance, destructors, exceptions, and C++-equivalent templates. The language is “simple”, so it can’t have all the features of C++. You could translate C++ to V by inline expanding all of the C++ features with no V equivalent into lower-level C-like code. For example, inline expand destructors at each point where they would be called. But then the code is not maintainable, and I dispute that it is human readable, even if it is indented nicely, because many of the higher level abstractions have been destroyed. The translation might plausibly be done by using clang to translate C++ to LLVM IR, then converting the IR to V. The resulting V code will not be maintainable unless maybe you use a very restricted subset of C++ that corresponds to the features present in V.

                1. 10

                  “No global state” means you can’t translate the full C++ language to V.

                  No GC, “safe”, and “fearless concurrency” (a feature of Rust) is a bold claim. How can this be done without the complexity of the Rust type system and borrow checker? Maybe that is enabled by “no global state”, which might mean a very restricted programming model compared to the competition.

                  1. 1

                    V allows globals for code translated from C/C++. Perhaps I’ll be able to remove this hack in the future. Not sure it’s possible.

                    1. 2

                      How do you handle undefined behaviour in the C++ sources when translating? Does V also suffer from undefined behaviour? For example, what would I get if I tried to translate this C++ to V:

                      unsigned int foo = -2.0;
                      1. 3

                        It would translate to

                        foo := u32(-2.0)

                        It will not compile.

                  2. 5

                    I think the thing that made me mentally eject was this part:

                    V can translate your C/C++ code to human readable V code. Let’s create a simple program test.cpp first:

                    #include <vector>
                    #include <string>
                    #include <iostream>
                    int main() {
                            std::vector<std::string> s;
                            s.push_back("V is ");
                            std::cout << s.size() << std::endl;
                            return 0;

                    Run v translate test.cpp and V will generate test.v:

                    fn main {
                            mut s := []string 
                    	s << 'V is '
                    	s << 'awesome'
                    1. 10

                      The combination of seemingly impossible claims with no source code, and not even an explanation of how those feats are accomplished, is concerning.

                      1. 2


                        1. 10

                          This is just an unbelievably ambitious project. If it works the way you’re implying here, there are either lots of special cases and this won’t generalize to real codebases, or you have solved an unfathomable amount of hard dependent subproblems. I’m definitely willing to wait and see!

                          1. 7

                            In about two weeks I’ll post that Doom article with the resulting .v code. I’ll send you the link once it’s live ;)

                            I spent most of December and January working on the translator.

                            1. 7

                              Most people doing this spent months to years to decades depending on how much they wanted to translate with or without human readability. I want C++ experts to weigh in on the translator when you post it. For me, that’s your biggest claim needing the most replication across code you thought of and didn’t wishing it never existed. Also, the biggest opportunity for improving major projects in terms of QA.

                              1. 5

                                You would would come across as more trustworthy if you acknowledged that the translator has limitations, and explained what those limitations are. What you are proposing to do instead is to only show a handpicked example that happens to avoid those limitations. Doom uses a restricted subset of C++, so you can translate it into V without dealing with most of the parts of C++ that make a C++ translator challenging.

                                1. 4

                                  I will cover everything in the article.

                                  The end goal is to support the entire C++ standard.

                                  1. 2

                                    You’re likely to find that the last 10% of the standard requires 3x the effort.

                                    Nothing wrong in that, and I think getting to 100% is actually not worth the effort. There’s a lot of value in a translator that does 90% of the translation and makes the remaining 10% easy to identify. I’d market it like that until I’m sure the final 10% is done.

                                    1. 1

                                      Agreed, hopefully I’ll get some help from the community. V will be open sourced before the C++ translator is complete.

                                2. 1

                                  You would would come across as more trustworthy if you acknowledged that the translator has limitations, and explained what those limitations are. What you are proposing to do instead is to only show a handpicked example that happens to avoid those limitations. Doom uses a restricted subset of C++, so you can translate it into V without dealing with most of the parts of C++ that make a C++ translator challenging.

                          2. 4

                            I don’t even know if it is garbage collected or requires manual allocation/deallocation

                            Over here it says “No GC”, but can’t find any details other than that.

                            1. 2

                              The reference manual gives syntax for obtaining a pointer to a struct. But there is no mention of a pointer type, nor an explanation of what a pointer is or what you can do with pointers. Can you dynamically allocate a new object and get a pointer to it? If so, how does the object get freed?

                            2. 4

                              I’m a Rust programmer, and I’m interested to see where V goes: it addresses some of the concerns I have about Rust (long compilation time, complexity). But I’ve also said that, though it seems that V gets the big picture right, the devil will be in the details. For instance, how will memory—and other resources—be managed in V? An early document says that V has a system similar to Rust, but simpler. I would like to see what simplifications have been made. Another question: how does V do concurrent and parallel programming? A great thing about Rust IMO is that the same system that protects you from memory errors also protects you from data races in concurrent programs. There’s something satisfying and reassuring about an abstraction that has a lot of breadth. Does V have that?

                              Until it’s released and we can play with it, I’ll hold off judgement on V.

                              1. 1

                                I agree, memory management is the most important topic, but I haven’t fully figured it out yet. This will be a top priority this month.

                                Right now V forces you to lock mutable variables accessed in different threads like in this example:


                                1. 2

                                  Since you’re using locks, Ill try to submit some papers on both automatically doing that and concurrency models. Did one today.

                              2. 3

                                I spun up Volt on my computer and it spawned more than 20 different processes that refused to go away. It seemed to be accessing the network, though I have no idea what it’s for. Not sure how legit this is, but either way, terrible first impression. I look forward to the source coming out though, as this seems like a very ambitious project; we could all learn a lot from it if it truly delivers on its promises. The challenges it’s tackling are large and complex, and any attempt to elucidate them is a step in the right direction.

                                1. 4

                                  Sorry, I can see this in my crash logs. It’s an infinite crash loop, it’s never supposed to happen, I’m really surprised it did.

                                  I’ll fix this asap.

                                  1. 2

                                    Good to know! It looks very promising otherwise. Not sure why it would spawn a whole bunch of processes that aren’t descendants of the one that was launched though, that doesn’t seem very safe. Is the code to manage processes still new?

                                    Also, are you saying that you reproduced this crash yourself, or that you were sent a crash log automatically?

                                    1. 1

                                      Crash logs are sent to the server automatically.

                                      It detects a crash and reopens the app. The only way to do that on macOS is with open -n.

                                      Then it crashes right away again. There’s code that detects that and handles it. Not in your case. You’re in 0.1% :)

                                2. 3

                                  I wish every new language web site, instead of having a “hello world” example would state something like: “It’s like but with and without ”.

                                  1. 3

                                    They have a “detailed comparison”

                                    Why create V when there are already so many languages? Why not use Go, Rust, C++, Python etc?

                                    Detailed comparison of V and other languages.

                                    Clicking it though gives you “coming in March”

                                    1. 2

                                      I’ll post it today. In about 30 minutes.

                                      1. 4

                                        Did you ever post that detailed article about the C++ to V translator? If it handles legacy code, that could be your biggest achievement given how slow to compile and hard to analyze C++ is.

                                        1. 3

                                          In about 2 weeks. Not sure about all legacy. Boost for example was terrible, I gave up almost immediately for now. That’s why I’m working on Doom 3 right now, it’s written using much simpler C++.

                                          1. 3

                                            I’d be happiest to see the sqlite to v translation.

                                            Sqlite is probably one of the most used code bases on the planet.

                                            1. 2

                                              Yes, C is easy compared to C++. You’ll see it in 2 weeks.

                                        2. 2

                                          But it’s not March! :)

                                      2. 2

                                        What information do you think is missing from the landing page? I’ll add it.

                                        Right now I have 8 main features there, small FAQ, software built in V, and a link to the documentation that covers pretty much the entire language.

                                        1. 5

                                          Shapr said:

                                          “er, not available yet?

                                          I’d be more interested if I could read the source.”

                                          doug-moen said:

                                          “No GC, “safe”, and “fearless concurrency” (a feature of Rust) is a bold claim. How can this be done without the complexity of the Rust type system and borrow checker?”

                                          Descriptions on how the safety system works… esp combo of no GC, safe, and ultra-fast… along with the source to prove the description is true. Especially in a form with independent replication of claims being possible. You’re making some big claims that create excitement and skepticism. So, you should expect these reactions at a minimum. Ideally, many folks would love to test it out. If your description is true, it can already do amazing things worth an alpha release that warns of breaking changes maybe happening.

                                          1. 2

                                            It says right in the very middle of the page that it will be open sourced this summer. It’s absolutely not ready for a release right now.

                                            Fearless concurrency is achieved by making sure all variables used in different threads are locked. That’s not hard to implement.

                                            Implementing easier Rust-like memory management is very hard. Right now it’s very basic, and I manage lots of memory manually when developing Volt. I still need to figure out lots of things, but I’m 100% confident I can do this.

                                            1. 7

                                              Fearless concurrency is achieved by making sure all variables used in different threads are locked. That’s not hard to implement.

                                              Correctness in concurrency is not about locking single variables, but maintaining invariants between variables.

                                              ie. If there exists a relationship between a and b that must always hold for correct execution eg. f( a, b) must always be true, then the accesses to a and b must be locked both by the reader and mutator.

                                              Of course, as soon as you do this… you now open yourself up to deadlocks and priority inversions unless you’re careful….

                                              Of course, you can just Stop The World…. in which case you no longer have concurrency…

                                              1. 3


                                                Could you please post a small example of this in Rust or any language you prefer?


                                                1. 2

                                                  The thing to understand about schedulers is “unlock” whether it’s a mutex or whatever, means to the scheduler “reschedule now”. It may decide it doesn’t need to switch threads, but it will make the choice at that point.

                                                  Consider the classic bank account, the variable balance holds how much you have, and you’re not allowed to withdraw more than you have.


                                                  if( balance >= withDrawalAmount) balance = balance - withDrawalAmount;

                                                  If you lock on each variable access it doesnt help you.

                                                  If you have two threads a race like this can still occur… Thread 1 Does if( balance >= withDrawalAmount) and then reschedules to Thread 2 which does if( balance >= withDrawalAmount)

                                                  The check succeeds for both Threads… Thread 2 continues and does… balance = balance - withDrawalAmount; ..taking all the money out of the account and reschedules back to thread 1 which does balance = balance - withDrawalAmount; rendering the account negative.

                                                  But every single variable access was locked!

                                                  You need to identify and lock across the whole transaction, not access to variables.

                                                  1. 1

                                                    OK I see, thanks.

                                                    In V you’d have to wrap the entire statement into lock{}:

                                                    lock { if balance >= withDrawalAmount { balance = balance - withDrawalAmount } }

                                                    But I understand your point. I don’t think Rust prevents you from making this locking error. It forces you to use locking, but you can still use it incorrectly like you described, right?

                                                    1. 2

                                                      Most “fearless concurrency” languages achieve this (more or less) by immutability.

                                                      The core problem in this example is we’re reading AND writing to balance from more than one thread.

                                                      If balance was immutable… no problem.

                                                      If balance was only accessible (for read and/or write) from one thread, also no problem.

                                                      Rust’s approach is basically that, the borrow checker forces only one thing to be holding at a time…. Which solves this simple class of race… but I bet a bad programmer could still do stupid in Rust by passing balance back and forth between threads with an exchange between the check and the update.

                                                      ie. Good language design can save you from simple threading issues. Nothing can save you when your code is insanely complexity and you have stupid humans writing it.

                                                      1. 2

                                                        Your V example has a gotcha…. what is it locking? ie. It will locking out all threads doing a lock even if they are not touching balance or withdrawal. ie. You won’t achieve good performance on highly parallelized tasks.

                                                        This is why things like pthreads have mutex’s that are associated with a particular resource.

                                          2. 1

                                            I wish it had both. I like examples.

                                            1. 2


                                              Developer here. There’s a large “Examples” link in the main menu :)

                                              1. 2

                                                The “hello world” ones in particular are by definition so simplistic that they hardly tell you anything about a language. A general shape of the syntax perhaps?

                                                1. 4

                                                  They give a brief overview of the language and they provide something small enough that you can type it in and get results to confirm your toolchain is properly installed.

                                                  Plus, and most importantly, tradition. :)

                                                  1. 2

                                                    Yes, I can buy the tradition argument for sure :-)

                                                  2. 1

                                                    Yes, I like it for the syntax. I think the syntax is very relevant, especially if your language doesn’t differ a lot from other languages in other ways.

                                              2. 2

                                                It’s hard to track all these new languages. Zig and V both sound interesting. I’ll have to do some reading this weekend.

                                                1. 13

                                                  I’ll tell you one difference about Zig. The source is released. All the claims on ziglang.org and in the documentation describe status quo, and all the links are valid and clickable.

                                                  1. 3

                                                    All links are clickable except for Playground and Blog. I launched the website a couple of days ago and have been filling it with content.

                                                    The source will be released this summer.

                                                  2. 5

                                                    Nim’s evolution is also very interesting. It’s a GC language, has a nice syntax, and falls into a similar “compiles to C” space as V.


                                                    1. 1

                                                      I’m sure I read on the website that V compiles to machine code. I was thinking of Nim otherwise.

                                                      1. 1

                                                        It claims to do both:

                                                        V emits C and uses GCC/Clang for optimized production builds. This way you get access to sophisticated optimization.

                                                        Such builds are compiled ≈150 times slower than V development builds (but are still faster than C++ builds).

                                                        1. 1

                                                          Yes, it does both.

                                                  3. 0

                                                    Question is:

                                                    1. how writing C extension

                                                    2. How writing frontend for my language.