9 ms·
> citing V -> C translation only, without the C -> binary part Not really, here's a benchmark of V compiling itself in 0.3 seconds that includes all steps (inc
by amedvednikov 5y ago
> citing V -> C translation only, without the C -> binary part
Not really, here's a benchmark of V compiling itself in 0.3 seconds that includes all steps (including the C -> binary part) and results in the compiler binary:
https://www.youtube.com/watch?v=pvP6wmcl_Sc https://www.youtube.com/watch?v=pvP6wmcl_Sc
This video is linked on the home page.
> crashed the compiler on trivial inputs
We have thousands of tests, lots of big projects written in V (V itself is 220k loc, Vinix OS, Ved editor, Gitly, vsql etc), and they all work fine, no compiler errors.
Can you give an example of a trivial input resulting in a crash/C error?
The infamous "The language is not what is promised" you referenced has claims like "there's no way V is written in V", and "there's no way to do json serialization without an AST". These things are simply not true.
- kaba0 5y agoCould you explain clearly what is the memory model of the language? Because I haven’t seen it anywhere outside of the ridiculous old claims.
- kgeist 5y agoAs I said, I may be wrong. I think I will try V some day to see it for myself (maybe I'll write an article about my findings). As you are the author of the language, can you comment on what is the state of the auto-free system? How is memory management implemented?
- amedvednikov 5y agoI don't think it's correct making claims like "it's a toy language" and "crashes on trivial input" without actually trying it out. You don't need an article to clone the repo, build the language in <1s and play with it. Autofree works: https://www.youtube.com/watch?v=gmB8ea8uLsM https://www.youtube.com/watch?v=gmB8ea8uLsM But it's not finished yet. We saw a better performance with a GC (due to all the extra copying autofree has to do), and made it the default. I've always been anti-GC, but V is so minimal and doesn't result in many allocations in the first place, GC works really well with it. In the end the user will have full control over how they want to do memory management: manual, autofree, gc.
- kgeist 5y ago>But it's not finished yet. We saw a better performance with a GC (due to all the extra copying autofree has to do), and made it the default On vlang.io I can find this: >Most objects (~90-100%) are freed by V's autofree engine: the compiler inserts necessary free calls automatically during compilation. Remaining small percentage of objects is freed via GC. So it's been 2 years and it's still unfinished, and you just use Boehm GC instead (from what I understood). Isn't your landing page a little misleading? This is the problem with V: a lot of grandiose claims but at the end of the day you use a GC used in every other toy language.
- amedvednikov 5y agoBut it says right there: Note: right now autofree is hidden behind the -autofree flag. It will be enabled by default in V 0.3. Using gc means it's a toy language? Got you.
- bheadmaster 5y agoA toy language is a term for a computer programming language that is not considered to fulfill the robustness or completeness requirement of a computer programming language.
- ylluminate 5y agoThen by this definition and by example of what has been done with V so far, it's definitely no "toy language."
- bheadmaster 5y agoI don't think V has proven its robustness or completeness. One thing that could change my mind is if one of the applications got completed and was actually usable. For example, I'm really interested in the Volt thingy - a lightweight, multiprotocol chat application: https://volt-app.com/ But if you open the website, you can see that there is no Linux or Windows support, and most protocols are not yet implemented. I've searched for other projects written in V, and haven't found a single completed project.
- paskozdilar 5y ago> Not really, here's a benchmark of V compiling itself in 0.3 seconds that includes all steps (including the C -> binary part) and results in the compiler binary From what I've seen, you've used tcc for the benchmark, right? If so, that's kinda cheating, since tcc is written to be a simple as possible (and therefore as fast as possible), so the compilation time is essentially zero. Benchmarking with gcc with optimization turned on should give you a more realistic result. > We have thousands of tests, lots of big projects written in V (V itself is 220k loc, Vinix OS, Ved editor, Gitly, vsql etc), and they all work fine, no compiler errors. To quote Djikstra: Program testing can be used to show the presence of bugs, but never to show their absence.
- amedvednikov 5y agoV is also written to be as simple as possible :) Compilation time is very important during development for the quick dev cycle (change, build, test). You don't need to do -O2 builds dozens of times per day. -prod (-O2) builds are definitely an order of magnitude slower, that's a fact.
- deleted 5y ago[deleted]
- paskozdilar 5y agoIt's a dishonest benchmark. You're basically saying that "V compiles fast if you use a fast C compiler after the transpilation step", and wrapping it up as "V compiles fast". Those two are not exactly the same.
- amedvednikov 5y agoIt's absolutely not a dishonest benchmark. This backend comes bundled with V, it's what it uses by default. That's how you get the end result binaries when you use V. To the end user it doesn't matter how the binary was generated. Via LLVM or via a bundled C compiler. The only thing that matters: getting that binary after compilation and getting it fast.
- kgeist 5y ago>Can you give an example of a trivial input resulting in a crash/C error? Here: https://github.com/vlang/v/issues/14023 https://github.com/vlang/v/issues/14023 I've seen quite a few such issues in the GitHub repo. >We have thousands of tests, lots of big projects written in V (V itself is 220k loc, Vinix OS, Ved editor, Gitly, vsql etc), and they all work fine, no compiler errors. Do these projects have large userbases (actual users, not just as a toy project)? How many contributors? I wrote a transpiler myself and I know that if you write in a safe subset (avoiding known gotchas) a project no one uses, then there's going to be zero problems with the project :) I'm skeptical but I'm open to learn that I'm wrong.
- amedvednikov 5y agoGood find, a pretty specific issue resulting in an unhandled error. That's why the language is not 1.0 yet :) Such cases are quickly picked up and fixed by the team. This one is already being worked on and will be fixed this week. 300+ contributors.
- sergiotapia 5y agoFWIW bro I enjoy that you are building something so ambitious and making progress despite the unwarranted hate. I have no idea why you bring out so many visceral trolls. Can someone share why this guy and vlang are so hated? It seems like he is ironing out the kinks even years after the hate keeps piling on. He keeps this up he's going to win.
- kgeist 5y agoI applaud Alexander's efforts, but the hate is somewhat warranted, because they make misleading claims such as having "innovative memory management" when in fact they merely use Boehm GC. All the hate could be entirely avoided if their "marketing material" was a little more honest and humble.
- amedvednikov 5y agono, we don't "merely use Boehm GC"