16 ms·
The V Programming Language
- bartq 6y agoIt really reminds me of Jai programming language by Jonathan Blow. Just downloaded and started testing it, looks promising! Is its main use case for now the games development?
- delian66 6y agoIt is a general purpose language, but there are several games in the main V repo, for example: https://github.com/vlang/v/blob/master/examples/tetris/tetris.v https://github.com/vlang/v/blob/master/examples/tetris/tetri... https://github.com/vlang/v/blob/master/examples/2048/2048.v https://github.com/vlang/v/blob/master/examples/2048/2048.v You can try them with: `./v run examples/tetris/tetris.v` and `./v run examples/2048/2048.v` They work the same on Linux, Windows and MacOS.
- merricksb 6y agoIf curious, see previous discussions: https://news.ycombinator.com/item?id=19403271 https://news.ycombinator.com/item?id=19403271 (191 points / Mar 15, 2019 / 182 comments) https://news.ycombinator.com/item?id=19526924 https://news.ycombinator.com/item?id=19526924 (61 points / Mar 30, 2019 / 101 comments) https://news.ycombinator.com/item?id=20229632 https://news.ycombinator.com/item?id=20229632 (146 points/ June 20, 2019 / 137 comments)
- dang 6y agoAlso https://news.ycombinator.com/item?id=21296855 https://news.ycombinator.com/item?id=21296855 https://news.ycombinator.com/item?id=20250990 https://news.ycombinator.com/item?id=20250990 https://news.ycombinator.com/item?id=20258485 https://news.ycombinator.com/item?id=20258485
- non-entity 6y agoSo if I recall correctly? when this language was first announced there was some strange controversy about it mostly being vaporware and serious claims being made about the language and its performance before they were implemented. I assume this has mostly changed now? Has anyone tried using it recently?
- axaxs 6y agoI remember this as well. My opinion is that both sides were in the wrong. I think it's a case where the creator is overambitious, and set unrealistic timelines that obviously weren't met. In response, many called him a scammer/vaporware because he's soliciting donations. That said, the project kept progressing along and seems to get daily commits, which would be unusual for vaporware.
- higerordermap 6y agoI never mind that creator was ambitious. The problem is he made the claims as if they were implemented, without even knowing about the feasibility of them. The creator of V also seems to lack knowledge of CS fundamentals and apparently thinking he can make a great language by retrofitting "missing features" into Go. The language is an unfunny joke.
- Joker_vD 6y agoWell, I can definitely see why someone would want to add generics and less verbose error handling to Go.
- higerordermap 6y agoThe word is retrofit.
- Joker_vD 6y agoI fail to get the distinction you're trying to make. "To retrofit", to my knowledge, means "to add a part to something that didn't have it originally". Is it supposed to be pejorative?
- kd0amg 6y agoSlightly pejorative in that it suggests a result that's less effective/streamlined/economical/whatever than had the new part been included (or at least accounted for as a possible extension) in the original design.
- macintux 6y agoVery interesting, the list of improvements over Go address a lot of complaints I have about the language. Taken from https://vlang.io/compare#go https://vlang.io/compare#go - No global state - No null - No undefined values - No err != nil checks (replaced by option types) - Immutability by default
- higerordermap 6y agoYeah retrofit these missing features into Go and create the perfect language. Years of PL research and implementation wasted. No one got the idea except a teen on internet. And none of these features appear to be defined correctly in the language, or have very buggy implementation. The reason people believe such claims is we have encouraged a very low barrier to entry in this discipline, without even requiring fundamental knowledge of how computers work. Software engineering is the pinnacle of Engineering!!
- phpnode 6y agoWhat's motivating your hostility in this thread?
- higerordermap 6y agoThere are people who are designing nice native compiled languages with a proper knowledge of PL design and implementation, for example: Zig Odin Nim Crystal And then there is V author, who claimed highly improbable and sometimes CS-defying features, and got popular and also got donations. If you say rust crowd is overenthusiastic and cult-ish, you haven't seen those teenagers on vlang discord. All this while not having 1% of technically talented people in Rust community (which I often dislike for too much enthusiasm). When Andrew Kelly (creator of zig, I know him only on this site and zig project, no affiliation) criticized V of hype, and he got downvoted / criticized here for being politically incorrect.
- Joker_vD 6y agoYeah retrofit these missing features (GC, communicating concurrent processes, module system) into C and create the perfect language. Years of PL research and implementation wasted. No one got the idea except an old dude from the Bell Labs. And yet Go, while still not the perfect language, is more pleasant than C, and is definitely not a failed experiment.
- azhenley 6y agoIf I remember correctly, there was a lot of controversy, partially because of the amount of donations being elicited before releasing anything and overselling some benchmark results. Looking at the repo, it looks like there is a ton of effort going on. 6458 commits and 687 open issues. Seems promising? https://github.com/vlang/v https://github.com/vlang/v
- open-paren 6y agoI know the launch was mired in controversy, but work has gone on since them. Christine Dodrill occassionally takes a look at it after writing about it at launch and I like her updates. Here's[0] her most recent look at the project, from June [0]: https://christine.website/blog/vlang-update-2020-06-17 https://christine.website/blog/vlang-update-2020-06-17
- xearl 6y agoworth noting, at the end of christine's update mentioned above: "I do not plan to make any future update posts about the V programming language in the future. The V community is something I would really rather not be associated with. This is an edited-down version of the post that was released last week (2020 M06 17). "As of the time of writing this note to the end of this post and as far as I am aware, I am banned from being able to contribute to the V language in any form. I am therefore forced to consider that the V project will respond to criticism of their language with bans. This subjective view of reality may not be accurate to what others see." for anyone considering getting involved, read christine's three articles on the topic first: https://christine.website/blog/series/v https://christine.website/blog/series/v
- lightgreen 6y agoWould be helpful is Christine gave some examples to threads and discussions. Without any details, either side can be blamed for the ban. Also, would be good to know what are the contributions. I have looked at the github page of V contributers https://github.com/vlang/v/graphs/contributors https://github.com/vlang/v/graphs/contributors and have not find Chrinstine there.
- xena 6y agoI don't know if I have any copies of it anymore, because it was deleted from the V Discord. Once they found out I was the author of that post everything was deleted and I was banned from the Discord, Telegram and GitHub.
- christiansakai 6y agoLooks really neat! What's the catch here?
- oconnor663 6y agoOne catch is that it's not currently memory safe, and it's unclear (to me) what the future plan is for memory safety.
- delian66 6y agoThere is no catch, it is just a work in progress, and it is improving every day.
- gavinray 6y agoWant to comment as someone who has written small amounts of code in V and followed it since near it's inception: V is essentially a much cleaner version of Go, syntactically. Though it adds many features that turn it into one of the nicest (IMO) languages to write. It adds: - Hot reloading, on a compiled language (WOW) - Pattern matching/match statements - Option/Sum types - A really clean approach to handling Maybe results that I haven't seen in other languages before -- EDIT: I take it back, apparently my own ignorance here - Generics - C interop and compile/build integration that's incredibly easy Some of my favorite bits: // Error-catch + propagation on Maybe's with "?" fn f(url string) ?string { resp := http.get(url) ? return resp.text } // Identical to this -- Option types must be handled with "or" if not "?" resp := http.get(url) or { return error(err) } return resp.text number := 2 s := match number { 1 { 'one' } 2 { 'two' } else { 'many'} } Additionally, the devs/community on Discord are really friendly, and they spent an hour helping me compile Facebook's reference C++ GraphQL parser library, and interop with the C API from V. I'd never touched low-level stuff before and the experience was a blast. This was all it took (minus figuring out the C++ build process): // app.v #flag -I libgraphqlparser_compiled #flag -L /home/user/Projects/vlang-graphql/libgraphqlparser_compiled #flag -l graphqlparser #include <GraphQLParser.h> #include <GraphQLAstToJSON.h> struct C.GraphQLAstNode{} fn C.graphql_parse_string(text charptr, error &charptr) &C.GraphQLAstNode fn C.graphql_ast_to_json(node &C.GraphQLAstNode) byteptr node := C.graphql_parse_string("query MyQuery { id email }", "Failed to decode") json_str := cstring_to_vstring(C.graphql_ast_to_json(node)) println(json_str) And because the primary compilation target atm is C, performance is generally screaming fast. --- Edit: Want to clarify it's still experimental. As a concept/language, I found it fun. See Christine Dodrill's negative experience and valid criticisms below for the other side of this coin.
- david2ndaccount 6y agoHot reloading in a compiled language is not that difficult - you just dlclose/dlopen/dlsym the shared library when it changes.
- 6y ago
- trefil 6y agoScam.
- runeblaze 6y agoI always have this feeling that the author of V just does not really know how to properly write a compiler. imho he just always hacks something up without properly learning the craft, which frequently results in some monstrosity that at first does not quite work and gets slowly patched to the real thing (e.g. the parser). This is very annoying because sometimes the real thing is quite easy (or a solved problem) but the V compiler just seems to fail at it.
- johnfn 6y agoShould every software engineer immediately be well-versed in everything they attempt? It's the passion project of a single engineer, not a company or team. Imagine if we directed this mindset towards every new open source project.
- higerordermap 6y agoThere are many people designing languages for hobby. See r/programminglanguages for examples. But they didn't claim they were creating next big thing with all those 'dreamed' features.
- johnfn 6y agoI don't see anywhere on the website that the author claims the language is 'the next big thing'. Perhaps the author takes some pride in what they've accomplished, but should we really police people feeling proud of their own work?
- cormacrelf 6y agoThe context for most discussions of V is the over-promises about feature delivery the author has made. You could dig up all the old threads AGAIN (what, 5 times this year?), but that wouldn't really help anyone. Judging by the website, I don't think the general hype pattern (including the impossibly thin claims about compiler performance mainly measuring Clang) has changed all that much, though it appears to have slowed. A lot of the actual Next-Big-Thing-ism seems to be coming from excited users rather than the author himself. There is a GitHub issue entitled "Very long term consideration: what it takes to get a language adopted by Google?"; there are others about getting "parallelism & concurrency for seamless local and distributed programming" and similarly extraordinarily lofty goals. People love being part of the winning project, and the overall hype history has drawn them like moths. That's OK, they can all go hang out writing V programs and wishing upon stars. It probably shouldn't bother people as much as it has. When should we "police people feeling proud", then? Here I think there's not so much harm. Legally speaking, pretending he's in my jurisdiction (AU) for a moment, seeking donations can be trade or commerce, and then a bunch of consumer protection laws may apply, esp. ACL s 18. But you still need people who feel they've been wronged. Show me someone who tanked a heap of money into it on the pitch alone and I'll change my mind, but I don't think that's happening. On the point of design vs actual quality, you can get an idea of OP's perspective by browsing through the GitHub issues. To be fair, the project is only a few years old, but some of the issues there are simply alien to me. It just doesn't seem like it was written in a language that has the features V has. Every new feature seems to have missed matching an enum variant somewhere. I don't understand how a compiler could exist that appears NOT to be made of building blocks that don't completely break when you add new features. I just can't relate many of the errors people get to a "Parse -> Valid Syntax -> Type Checker -> IR -> ... IRs ... -> Machine Code" progression. This is what makes me think it's not going to survive very long -- those kinds of bugs don't simply stop cropping up.
- higerordermap 6y agoI was downvoted for saying something along the lines of this. For someone with remote knowledge of designing / implementing a programming language, it seems ridiculous that some teenager gets famous and earns donations claiming he would create a great language by retrofitting some HackerNews features into Go.
- colesantiago 6y agoThats called marketing for you, something most developers aren't very good at.
- higerordermap 6y agoDishonest marketing. Even rust community gets called out for 'marketing'. Also, engineers don't do dishonest marketing doesn't mean they can't be good at it.
- colesantiago 6y agoDishonest or honest, it is still marketing, whether you deliver or not is the main point. In the case of V it's clearly worked hasn't it? Seems like there is a community growing in V and people are contributing to the language.
- markdog12 6y agoCan you share any programming languages you created?
- smartmic 6y agoIt's still strange. What about Github stars? Either the HN crowd is very biased or we have been ignorant or V enthusiasts do not show up here often. Most of the latest system programming language discussions and post here revolve around Rust, C, Go with some sympathy for Nim, Zig, Crystal and others. A quick lookup on star ranking gives surprising results for V: * Go 76.5k * Rust 48.2k * V 18.5k (??) * Crystal 15.2k * Nim 9.9k * Zig 6.6k
- Jtsummers 6y agoV got a lot of hype last year, and then a lot more criticism here on HN. I suspect that's a reason it's not been promoted much on this site. People who saw it coming out last year (like me) mostly ignore it, and the people interested in it found other places to discuss it without the criticism.
- ipnon 6y agoHN is a bubble. It does not see the whole web.
- hu3 6y agoThat a look at the comments on this post. Nothing but stones thrown at a free open source project. Peak tribalism. Unfortunate coming from us developers, a segment that often prides of being detached from emotion.
- rvz 6y ago> Most of the latest system programming language discussions and post here revolve around Rust, C, Go with some sympathy for Nim, Zig, Crystal and others. Well I've got to give it to V for rolling without LLVM and forking from Golang's compiler, unlike Rust, Crystal and Zig. There is an indeed language bias and a ton of shillers going on here.
- gridlockd 6y agoThe problem with V is the habit of intellectual dishonesty surrounding it. Take this chart, showing the selling point of "fast compilation times": Space required Build time Go 525 MB 1m 33s Rust 30 GB 45m GCC 8 GB 50m Clang 90 GB 60m Swift 70 GB 90m V < 2 MB <1s All of these programs native compilers of complex languages, supporting multiple architectures. V is a frontend for a C compiler, which is likely GCC or Clang. It doesn't even belong in the comparison. The fact that building Clang/LLVM takes 90GB of disk space is of course a sign of the impending collapse of human civilization, but I digress.
- rkeene2 6y agoI'm not sure where they got that number, but my LLVM 8.0.0 install (relatively complete, including Clang, etc) is 1.7GiB.
- delian66 6y agoSee for example: https://news.ycombinator.com/item?id=23139396 https://news.ycombinator.com/item?id=23139396
- akrymski 6y agoAccording to the website, V seems to have two backends: C and x86 - so it's not just a frontend to GCC. Unless I'm mistaken?
- delian66 6y agoThere is a native backend, that compiles directly to elf binaries on linux without using a C compiler, but it is still wip (and can not yet be used to selfcompile V itself for example). For example: 0[20:45:04] /v/nv LINUX $ ./v -x64 examples/hello_world.v use `v -x64 -v ...` to print resulting asembly/machine code code_start_pos = 78 x64 elf binary has been successfully generated 0[20:45:08] /v/nv LINUX $ ls -lart examples/hello_world -rwxrwxr-x 1 delian delian 188 сеп 15 20:45 examples/hello_world 0[20:45:17] /v/nv LINUX $ examples/hello_world Hello, World! 0[20:45:21] /v/nv LINUX $ ... and yes - the generated executable is 188 bytes long...
- hardwaregeek 6y agoI'm not sure I like how V seems to claim to be better across so many dimensions. Language development is all about tradeoffs. You can have good static analysis or fast compilation, not both. If you look at most successful languages, they don't claim to be a silver bullet. Rust doesn't claim that it compiles quickly. Go doesn't claim to have the best type system. Python isn't the fastest language. I'm curious to see how V ends up. It's unlikely that it'll succeed at everything, so eventually it'll choose a niche. And backtrack/sweep under the rug the claims that don't fit in said niche.
- delian66 6y agoV is not a silver bullet either. No language is. V values highly fast compilation times, and does not claim to have the best type system, similar to Go.
- vlang1dot0 6y agoThe problem is that V claims: - As fast as C - No manual memory management - No GC - Memory safety - Not hard like Rust You have fundamentally conflicting requirements. Saying "we'll do it like lobster" does not solve that. Lobster is essentially region based memory management with fallbacks to reference counting at runtime. That fundamentally contradicts "as fast as C". You cannot do more work than C at runtime and still be faster. Lobster is also a different language which had to forgo a number of features V has already embraced. It's unclear how that can be rectified.
- forgotpwd16 6y agoSo how well it has ended up holding on its promises/claims? When was initially released (previous year?) there was a backlash, and checking the source there were some bad points but it seems it has now improved considerably.
- perfunctory 6y ago> No variable shadowing too bad.
- javier10e6 6y agoIt lost me from the main page example. How about... fn main() { areas := ['game', 'web', 'tools', 'science', 'systems', 'embedded', 'drivers', 'GUI', 'mobile'] areas.each_with_index i { println('Hello, '+ ' areas[i] ' + developers!') } } for loops should not exist because they they are external to the an object reflection attributes.
- throwaway16920 6y agoV is just your typical targeted scam. Most of people here wouldn’t even blink when seeing yet another “claim your $100k” email in spam, I wonder why they still consider this kind of thing in any seriousness? Especially if the author had long ago discredited himself in the most spectacular manner.