Live data from Hacker News

Hello V-Lang

blog.hackersreboot.tech

31–40 of 193 posts

Re: Hello V-Lang

#31
Great. We rewrote our backend into D, then Arc, then into Go, and most recently into Rust. If V-lang is as good as it sounds, we'll need to ditch thousands of lines of pristine Rust code. HN-driven development methodology really has no mercy. /s

Re: Hello V-Lang

#32
post #28

Earlier quoted context omitted.

> 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 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…

As 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?

I 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 Autofree works:

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.

Re: Hello V-Lang

#33
post #27

Earlier quoted context omitted.

i'm pretty sure that half of these features don't work. Such as the famous "autofree" where everyone doubted it could work and the solution now was.... to drop in boehm-gc. for anyone unfamiliar with v, take everything on that list with a giant spoon full of salt.

autofree demo: V's compile time memory management demo. Running the Ved editor on an 8 MB file with 0 leaks. https://www.youtube.com/watch?v=gmB8ea8uLsM

Yes, we know, this is always your reply. We also know that boehm-gc is just temporary until you fixed the issues with autofree. Do let me know when that happens.

Re: Hello V-Lang

#34
post #24

Last time I checked V-Lang looked amazing on paper but on closer evaluation many of the claimed features were only planned, crashed the compiler on trivial inputs, or simply were half-baked and didn't deliver on the promises (things like syntax errors from the underlying C backend, memory leaks etc. because transpilation was straightforward and lacked proper checks, hence the fast compilation speed). A few months 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 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…

> 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.

Re: Hello V-Lang

#35

Earlier quoted context omitted.

It is a new generation: sales, hype and marketing first. We all could learn from this.

I think we were all more susceptible to hype when we were 15

Maybe, but I can tell you when I was 15 I didn't have instant worldwide reach and the on-the-Internet-nobody-knows-you're-a-dog effect at my disposal, and neither did my readers.

Re: Hello V-Lang

#36
post #25

Earlier quoted context omitted.

It is indeed very astonishing why many people here have such a negative attitude towards this language.

Because author kinda twisted terms to make it seems he achieved the impossible. Felt like he did better than rust+ada+haskell, all without using memory and faster than an eyeblink.

Can you elaborate? There was never a claim it doesn't use memory (although it does use a lot less memory than most compilers). The language is indeed fast, V compiles itself in 0.3 seconds:

https://www.youtube.com/watch?v=pvP6wmcl_Sc

Re: Hello V-Lang

#37
post #24

Last time I checked V-Lang looked amazing on paper but on closer evaluation many of the claimed features were only planned, crashed the compiler on trivial inputs, or simply were half-baked and didn't deliver on the promises (things like syntax errors from the underlying C backend, memory leaks etc. because transpilation was straightforward and lacked proper checks, hence the fast compilation speed). A few months 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 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…

>Can you give an example of a trivial input resulting in a crash/C error?

Here:

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.

Re: Hello V-Lang

#38

Earlier quoted context omitted.

> 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 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…

> 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 optimiza…

V 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.

Re: Hello V-Lang

#39

Earlier quoted context omitted.

> 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 optimiza…

V 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]

Re: Hello V-Lang

#40
post #37

Earlier quoted context omitted.

> 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 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…

>Can you give an example of a trivial input resulting in a crash/C error? Here: 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 proj…

Good 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.

Post reply on HN