Why this algo in particular? Is this a security feature? I suppose wrt "Reflections On Trusting Trust" it may be. But if it didn't need to be secure it could probably be a lot faster (assuming this is a critical path for cache hits).
Zig 0.4.0 Released
21–30 of 141 posts
Re: Zig 0.4.0 Released
#22Earlier quoted context omitted.
Isn't V fake? https://github.com/vlang/v
That's not particularly charitable. The accidental AMA that happened on HN a few weeks back gave me the impression that V lang isn't as polished as a concept as some of the other offerings out there. BUT the author seemed tp have something brewing. And regardless we'll have some more evidence in the coming months. Regardless, V lang is another data point that something besides C is a possibility with the modern tools…
There's still a lot of work to do, but the language is going to be open-sourced very soon in early June.
Re: Zig 0.4.0 Released
#23Edit: Just confused myself, comments are // and multiline literals are \\. Thanks to laszlokorte for catching my mistake! Zig claims very proudly it is about clarity but shortly into reading through the documentation I already found this extremely surprising: "Multiline string literals have no escapes and can span across multiple lines. To start a multiline string literal, use the \\ token. Just like a comment, the s…
> The difference between a string literal and comments is literally whether or not the lines are preceded by an open =. Python has an even closer relationship between comments and string literals: its multiline comments are just string literals that get never used.
That's not entirely true. A literal string immediately following a class or function is inspectable via its __doc__ member.
E.g. class Foo: "I am Foo." def bar(self): "I am Foo.bar"
Foo.__doc__ will have "I am Foo.", and Foo.bar.__doc__ will have "I am Foo.bar".
This is rarely used programattically, but at least one standard module uses this for running tests: doctest
Edit: not sure why it's not formatting correctly, as I am spacing the code a 4 space indent, but at least on my phone, it is not properly formatting as code. I apologize.
Re: Zig 0.4.0 Released
#24Zig's new release has a ton of improvements: new targets (e.g. LLVM 8, WASM, support tiers), C pointers, Vector type, better docs, and my personal favorite: Zig now makes things as static as possible by default. I love seeing all the progress with Zig, V, Muon, and Rust. All these languages are potentially-better systems languages than C/C++, with better safety, better definitions, and better semantics. Zig has an ex…
Honestly, I don't see it happening. Zig and rust and jai and d all feast on c's remains, but the result can only be fragmentation. And then you lose one of the big draws of c: ubiquity. Zig has two compilers. Rust has one (serious) compiler. Jai has 1, d has either 1.5 or 3.5 (depending on how you count). And although all those languages want to replace c as the language-that-you-use-for-everything, and they might ea…
The hard part is build tool compatibility but I think there are a lot of good ideas being worked on actively, Zig and Rust being two examples of advanced programatic control over the build process. With a reasonable linker, it should be possible to combine these and more languages today.
An interesting counter example to the binary interface compatibility story has been Go, which seems to let cgo become less and less functional in each release. The pressure to keep everything in Go is an interesting trade-off. I wonder if certain kinds of systems will be paying for this lock-in later down the line while other languages give much easier ways to gradually evolve and reuse code or adopt libraries from multiple communities removing the need to do yet-another-rewrite in language X kinds of projects. Or perhaps this kind of interoperation is overrated? Time will tell.
Re: Zig 0.4.0 Released
#25Earlier quoted context omitted.
That's not particularly charitable. The accidental AMA that happened on HN a few weeks back gave me the impression that V lang isn't as polished as a concept as some of the other offerings out there. BUT the author seemed tp have something brewing. And regardless we'll have some more evidence in the coming months. Regardless, V lang is another data point that something besides C is a possibility with the modern tools…
Yes, V is at a very early stage. I merely created an "about" page, then it got posted, got lots of attention, so I created a website and recently released a playground: https://vlang.io/play There's still a lot of work to do, but the language is going to be open-sourced very soon in early June.
Re: Zig 0.4.0 Released
#26Earlier quoted context omitted.
> The difference between a string literal and comments is literally whether or not the lines are preceded by an open =. Python has an even closer relationship between comments and string literals: its multiline comments are just string literals that get never used.
> Python has an even closer relationship between comments and string literals: its multiline comments are just string literals that get never used. That's not entirely true. A literal string immediately following a class or function is inspectable via its __doc__ member. E.g. class Foo: "I am Foo." def bar(self): "I am Foo.bar" Foo.__doc__ will have "I am Foo.", and Foo.bar.__doc__ will have "I am Foo.bar". This is r…
Re: Zig 0.4.0 Released
#27Earlier quoted context omitted.
Yes, V is at a very early stage. I merely created an "about" page, then it got posted, got lots of attention, so I created a website and recently released a playground: https://vlang.io/play There's still a lot of work to do, but the language is going to be open-sourced very soon in early June.
i don't want to sound harsh but in 2010s, the way you released (I assume you're V author) mostly make people dubious
Re: Zig 0.4.0 Released
#28https://ziglang.org/download/0.4.0/release-notes.html#Build-...
Re: Zig 0.4.0 Released
#29Zig's new release has a ton of improvements: new targets (e.g. LLVM 8, WASM, support tiers), C pointers, Vector type, better docs, and my personal favorite: Zig now makes things as static as possible by default. I love seeing all the progress with Zig, V, Muon, and Rust. All these languages are potentially-better systems languages than C/C++, with better safety, better definitions, and better semantics. Zig has an ex…
Honestly, I don't see it happening. Zig and rust and jai and d all feast on c's remains, but the result can only be fragmentation. And then you lose one of the big draws of c: ubiquity. Zig has two compilers. Rust has one (serious) compiler. Jai has 1, d has either 1.5 or 3.5 (depending on how you count). And although all those languages want to replace c as the language-that-you-use-for-everything, and they might ea…
Re: Zig 0.4.0 Released
#30> 4. blake hash of file contents Why this algo in particular? Is this a security feature? I suppose wrt "Reflections On Trusting Trust" it may be. But if it didn't need to be secure it could probably be a lot faster (assuming this is a critical path for cache hits).
I haven't tested the performance of any other algorithms, but that's a completely swappable component. I'm sure the hash function will be swapped with a different one before 1.0.0 is done.