Live data from Hacker News

Zig's New Relationship with LLVM

kristoff.it

201–210 of 295 posts

Re: Zig's New Relationship with LLVM

#201

Earlier quoted context omitted.

I have done this as zig makes many breaking changes often, not because new features come out all the time (almost all of the things showcased on the site if not all were around back in 0.6). I do not want to teach people things that are already for the most part outdated. Things move very fast, especially in the standard library. edit: to clarify I am the maintainer/owner of ziglearn

nod From my other replies, it would be of assistance to state that this on the guide right at the Install section, as I did have a choice which zig to use and chose the simple package from my repo given no further direction. (BTW: could you explain why I should install ZLS in step 4? Since we're here.. :) ) With a line of text that I must use the latest dev/git code (etc.), my choice would have then gone the other di…

I pushed some changes to reflect this

Re: Zig's New Relationship with LLVM

#202

I see zig users commenting here -- the "getting started" guide at https://ziglearn.org/ immediately fails with the installable zig binary from Arch (0.6.0) due to https://github.com/ziglang/zig/issues/5683 I'd never heard of zig until now, but as a community having top level "how to get started" website using features only available from the Master branch of github is... not a good way to get people into your languag…

I don't know how repl.it chooses the languages it supports, but it would be great if zig could get on that so there could be a zero-download way to get started in the language.

https://godbolt.org/ hosts zig, try zig trunk.

Re: Zig's New Relationship with LLVM

#203

I’ve often wanted to try out Zig at work but the dependency on the latest LLVM meant doing that first. Building LLVM from scratch on our platform takes more resources (including time) than I normally have available (LLDB needs like 6GB of RAM to link?) So, I welcome this news!

Aside from using software that relies on LLVM, I am not at all familiar with its internals. A fellow on another forum was ranting against using LLVM as a backend for security reasons pointing out its sheer size and the fact that it is a "US controlled software stack" [1].

Don't get me wrong, I think he has a very fringe and suspicious outlook on LLVM and the US, but it is a big codebase that would be hard to audit for such things. Would Zig ever be fully independent and auditable by a small team when the break from LLVM is made? Just curious, and I would love input on the LLVM comspiracy topic.

[1] https://www.mail-archive.com/picolisp@software-lab.de/msg095...

Re: Zig's New Relationship with LLVM

#204

Earlier quoted context omitted.

Thank you (for both replies) and to everyone else, this makes it crystal clear what's going on - there's a lack of "hey everyone, this is very unstable at the moment and the basic internals are changing, using anything except the latest Github builds is highly discouraged" which might really help when added to the various places above. I'm a toe-dipper -- I need to run and play with some sample code (basic Hello, Wor…

For a while there was a link to TIO (tio.run) on the zig homepage where you could play with it online. But for some reason it has been removed.

The version that tio has is very old at this point. Godbolt stays up to date.

Re: Zig's New Relationship with LLVM

#205
post #161

Earlier quoted context omitted.

Doesn't sound like it. Seems like it appends the new versions of the functions and updates the global offset table.

Not quite, the linkers (at least ELF and PE which I am familiar with) will "free" parts of the file (when a block needs to be reallocated because the decl code gets too big, or when a decl is removed) and reuse them when they can. But in general, the final executable will not be the same, this is correct.

Thanks for clarifying!

Re: Zig's New Relationship with LLVM

#206
post #176

Earlier quoted context omitted.

I think most people actively involved in the community are compiling Zig from master branch or downloading the nightly builds. Zig releases are tied to LLVM so there's usually 6 months between releases, which is way too much time to stay without new features, given the speed of improvement of the language. I think yours is a fair point, but that's how things are. If you prefer using a tagged version and not have to b…

The site specifically instructs you to visit the releases page which only offers 0.6.0

I knew we should have added a tag

Re: Zig's New Relationship with LLVM

#207

Earlier quoted context omitted.

I don't know how repl.it chooses the languages it supports, but it would be great if zig could get on that so there could be a zero-download way to get started in the language.

https://godbolt.org/ hosts zig, try zig trunk.

Wow, I've never seen this site before but it looks amazing and I can't wait to play around with it. Thank you!

Re: Zig's New Relationship with LLVM

#208
post #52

Zig is one of the most interesting languages I've seen in a very long time, and possibly the first radical breakthrough in low-level programming design in decades. Maybe it will become a big success and maybe it will tank, but after having two visions for low-level programming -- that of C's "syntax-sugared Assembly", or that of C++'s "zero-cost abstractions" whose low-level, low-abstraction code appears high level o…

Wait doesn’t Zig compete with C, not C++? IIRC it doesn’t have any intuitive form of typeclasses.

This claims to do runtime dynamic dispatch with interfaces:

https://github.com/alexnask/interface.zig

Re: Zig's New Relationship with LLVM

#209

Earlier quoted context omitted.

Wait doesn’t Zig compete with C, not C++? IIRC it doesn’t have any intuitive form of typeclasses.

This claims to do runtime dynamic dispatch with interfaces: https://github.com/alexnask/interface.zig

Note that this is still very much a WIP :)

I guess I should also mention my inspiration, the C++ dyno library (https://github.com/ldionne/dyno)

I don't really see how this is relevant to typeclasses though ^^

Re: Zig's New Relationship with LLVM

#210

I see zig users commenting here -- the "getting started" guide at https://ziglearn.org/ immediately fails with the installable zig binary from Arch (0.6.0) due to https://github.com/ziglang/zig/issues/5683 I'd never heard of zig until now, but as a community having top level "how to get started" website using features only available from the Master branch of github is... not a good way to get people into your languag…

Similarly, I rolled back to the official docs from Master and the hello.zig from there is similarly nonop using the tagged 0.6.0 build: https://ziglang.org/documentation/master/ Please, please - make a Hello, World which is not so intrinsically tied to random features on Master to just work across all the iterations. Hello, World is supposed to be the simplest, non-breaking easy to compile no esoteric compiler featur…

My friend Jeff Fowler wrote an excellent blog post diving deep, deep into this topic.

https://blog.jfo.click/hello-hello-world/

Post reply on HN