9 ms·
Pledging $300k to the Zig Software Foundation
- Fire-Dragon-DoL 2y agoWow, that's amazing!
- raverbashing 2y agoDude even got his wife to chip in!
- libria 2y agoYour comment made me chuckle. It was an interesting inclusion, considering she appears to be in an industry not usually associated with Zig enthusiasts (entertainment). I'd have thought they individually had enough financial independence that a solidarity statement wasn't required, but it's neat to share that your partner is excited about the things you're excited about.
- calmbonsai 2y agoWell, his wife is Amy Okuda who, though an actor, is very technical and, for lack of a better term, "geeky" in her private life. https://twitter.com/amyokuda https://twitter.com/amyokuda
- cztomsik 2y agoSee https://news.ycombinator.com/item?id=41712239 https://news.ycombinator.com/item?id=41712239
- csto12 2y agoNice to see!
- ChrisArchitect 2y ago[dupe] / merge later discussion: https://news.ycombinator.com/item?id=41712239 https://news.ycombinator.com/item?id=41712239
- TZubiri 2y agoIt sounds like something that could support a full time developer for some years. I hope at some point it can be added to standard linux distributions like debians or red hats through their official yum/apt packages. So far there is no red hat distro, and there's integration with ubuntu's snapcraft for some reason. I realize there's dozens of distributions to support, but these are the two most foundational to my understanding, and it just speaks to the maturity and lack of system usage that the compiler is not released/vetted by OS distros.
- zamadatix 2y agoThe language+compiler are on 0.x so packaging it in long term support distros can be more problematic than helpful at this point (source that compiled a year ago is likely broken now and vice versa). Once it has reached 1.x then it won't be much to get it prepackaged everywhere. Until that point it doesn't really make sense to pull it from the repos of distros that are packaging it right now anyways. E.g. it's packaged on Fedora but you most likely don't actually want to rely on that package for the moment.
- TZubiri 2y agoThat would be a good reason. The thing is that it is present in many distributions. https://github.com/ziglang/zig/wiki/Install-Zig-from-a-Package-Manager https://github.com/ziglang/zig/wiki/Install-Zig-from-a-Packa... Perhaps the foundational distros are stricter.
- mook 2y agoThat list says it's already in Fedora and openSUSE. The fact that they both have older versions is actually good, since that just means they've been packaging it for a while. Once that list no longer marks outdated versions as red is when zig would have been ready for the long-term supported distributions.
- zamadatix 2y agoWhether some distributions have jumped the gun or not it remains a good reason. No harm for the lot of ones in that list that are more delivery mechanisms or development versions themselves though. For the ones that are green they tend to be development versions (e.g. Alpine Edge, ALT Sisyphus, LiGurOS develop), rolling releases where there aren't necessarily those kind of package stability/interop guarantees in the first place (e.g. Arch, Manjaro, OpenSuse Tumbleweed), or not actually distros at all just alternative download mechanisms (e.g. Chocolatey, Chromebrew, Homebrew, Scoop). There are very few (such as Fedora 40) that just happen to be "broken clock" status for the moment because they are very fresh spins. For the ones that are red, they are the examples of why you don't want to rely on the built in package at the moment. Even for the ones that are green "for the moment" (such as the Fedora 40 example) it's often still considered better to use the latest "master" copy of zig (depending what you're doing with it) than the last milestone release even then.
- dvektor 2y agoBadass. Love to see things like this
- Brian_K_White 2y agoThe recent story about them switching to self hosting makes me feel like they are a particularly efficient project that will not waste donation income.
- winter_blue 2y agoAre you referring to the Zig compiler switching to become self hosted [1], or the Zig website switching to becoming self hosted [2]? (I assume the latter.) [1] https://kristoff.it/blog/zig-self-hosted-now-what/ https://kristoff.it/blog/zig-self-hosted-now-what/ [2] https://ziglang.org/news/migrate-to-self-hosting/ https://ziglang.org/news/migrate-to-self-hosting/
- Onavo 2y agoThey better sign their packages and check for signatures upon download and installation. At their scale, foregoing S3 means they have to figure out how to deal with bit rot in packages themselves.
- _lvbh 2y agoThey're self hosting docs and Zig releases. There is no central package repository. The decentralization (similar to Golang) is one of the things I like about Zig.
- arunaugustine 2y agoProbably referring to Zig migrating away from AWS to become more cost efficient [1]. This was also mentioned in the announcement regarding this donation from the Zig Software Foundation [2] [1]: https://ziglang.org/news/migrate-to-self-hosting/ https://ziglang.org/news/migrate-to-self-hosting/ [2]: https://ziglang.org/news/300k-from-mitchellh/ https://ziglang.org/news/300k-from-mitchellh/
- daco 2y agois zig running well on mac? We have local developer environment and we deal quite often with python, go, or some brew packages version not being correctly installed before starting the tools. would that be a good usecase for zig?
- garbagepatch 2y agoDo you mean using Zig to compile the native libraries for python, go, etc? Sure, the build scripts would need to be updated to use `zig cc`. Zig is already packaged for brew so they could add it as a build dependency. But it is still pre 1.0 so expect new versions to break old-ish code. I'd say package managers should wait for the 1.0 release.
- flohofwoe 2y agoI use Zig on Mac, Windows and Linux (but most on Mac). It works without issues (also as a Clang compatible C/C++/ObjC compiler and linker replacement). I would recommend managing the Zig installation through a tool like zvm (https://github.com/tristanisham/zvm https://github.com/tristanisham/zvm). This lets you easily update to the latest dev version and switch between stable versions (similar to rustup or nvm). The other install options are working too of course (install via brew - although in the past this was a bit brittle, or download and unpack prebuilt archives https://ziglang.org/download/ https://ziglang.org/download/) but those options are not as convenient for switching between the stable and dev version.
- swah 2y ago(I had been using zigup.) Interesting that they are using Go for this tool - not sure how that makes me feel!
- flohofwoe 2y agoI guess zvm was created before zig's package management solution (which added network and archive support to the stdlib). With those in place a zvm written in zig would be just as trivial as in go.
- cjk 2y agoGreat to see. Super bullish about the future of Zig.
- TheBruceHimself 2y agoI wish them well, but I was hoping given their general ethos they'd forgot the inferred typing. I spend way too much time in my current work trying to debug people messing up types. I'm sure they'll give me excellent reasons for it but `var i = 1; var y = 2.0; var z = x * i; # z is a float right?` stuff always seems to sacraifice a lot of explicit readable code for little gain.
- pdpi 2y ago> Our philanthropy is generally private, but I'm making an exception since I think my public support of Zig has a chance to really help the project due to my background. I can't quite put words to it, but this statement kind of struck me. There's just a certain basic decency behind it that deserves celebrating.
- Kydlaw 2y agoSame here... except maybe in the opposite direction? Does it implies that their other philanthropy would not benefit from more public support? So what are they in this case? Anyway, they do whatever they want with their philanthropy in the end, but I found that was an odd phrasing.
- nurettin 2y ago> So what are they in this case? You wouldn't want to go public with donations to churches (it would be ideological) or orphanages (that would just be bragging).
- ithkuil 2y agoperhaps his other philanthropy donations are not technical and he believes that supporting them publicly would feel like bragging and he personally doesn't like that?
- flumpcakes 2y agoThis is my reading of it too.
- Etheryte 2y agoA lot of people use philanthropy as a means to ego boost and raise their public image. This is a phenomenon as old as time, to the point where even the bible has tales about it. The (modern?) countermovement to that is to keep your donations secret, often to the point where it's one of the strings attached to the money, that you can't publicly disclose who made the donation. This is a way to support a cause just for the sake of supporting it. I read the above statement as them usually following this ethos, but making an exception this time around since they believe being public about it will bring more visibility to the cause.
- DanielHB 2y agoIf anyone from the Zig foundation is reading this I highly recommend creating a job board, it is basically free money if you have a niche audience.
- monero-xmr 2y agoMy donor advised fund has given a lot of money to open source. I highly recommend that people who can benefit from donations of assets create a donor advised fund so they can get tax benefits and then direct it exactly to where they see fit
- slekker 2y agoLovely! Congrats ZSF and onwards!
- icemanx 2y ago"Honey, so there is this programming language I really and I wanna talk to you about it" "Yes?..." "Well, I want to do a donation since I really really like that language..." "......... not again .........."
- kingforaday 2y agoor "Sounds great! Let's fly our Cirrus SF50 Vision and hand deliver to Andrew Kelley."
- zero_k 2y agoHonestly, I'm very excited about zig. Lean and mean, and it's written by someone who isn't sitting in an ivory tower, not caring about actual usability. It wasn't designed by a team of PhDs (like, e.g. Haskell), while it's clearly inspired by very useful ideas in e.g. Rust, Haskell, etc. I think it'll be very exciting to write code in zig.
- ebening 2y agoSimilarly excited about Zig. While its memory safety guarantees may not be as comprehensive as Rust's, I hope we'll one day see Zig in the Linux Kernel. I suspect the old-time kernel C programmers may have an easier time with Zig than Rust.
- cies 2y agoIIRC the zig compiler compiles C. There is some work being done on making zig compile the Linux kernel (I think someone already succeeded). zig currently uses LLVM but it wants to move away from that: https://www.reddit.com/r/Zig/comments/18x1wce/is_it_true_that_zig_wants_to_move_away_from_llvm/ https://www.reddit.com/r/Zig/comments/18x1wce/is_it_true_tha... Once zig compiles Linux there are basically 3 compilers that can do so gcc, clang (llvm) and zig (less and less llvm). I expect there to be good tools to port C code to zig (much hard for C->Rust), especially with the advancements in LLMs lately. I would not be surprised if that would result in a zig-linux code base in the coming 5 years. Sure the C based kernel may be the hot bed for innovation for years to come.
- actionfromafar 2y agoQurious: will zig still compile C after it moves off LLVM?
- vulcan01 2y agoYes, but the LLVM integration will be moved to a package so you only need to include it if you want to do that.
- soyyo 2y agoSorry if this is a silly question, i am a web developer so I dont usually dwelve into systems or low level programming except out of curiosity. My understanting is that everyone is suggesting to move to memory safe languages when possible, however Zig does not seem to have any. Since zig is a new language my guess is that the main use would be brand new projects, but sholdn't this be done in a memory safe language? It seems that the selling point of Zig is: more modern than C but simpler than Rust, so I understand the appeal, but isn't this undermined by the lack of memory safety?
- bvaldivielso 2y ago> but isn't this undermined by the lack of memory safety? Yes, in my opinion, but from Zig's success you can see some people are willing to trade safety for a simpler language. Different people have different values Though to be fair you can also use zig in old C projects, moving things incrementally. I don't know how many projects do that Vs greenfield projects though
- dns_snek 2y agoZig isn't a memory safe language, but it does have memory safety features. Theoretically it's safer than C but isn't as safe as Rust. For example, you can't overflow buffers (slices have associated lengths that are automatically checked at runtime), pointers can't be null, integer overflows panic.
- renox 2y ago> integer overflows panic Not in all the ReleaseFast mode where both signed and unsigned overflow have undefined behaviour. And there's also the aliasing issue, if you have fn f(a:A, b: b:*A) { b = <>; which value has 'a' when f is called with f(a,a)? } (not sure about Zig's syntax). That said I agree with your classification (safer than C but isn't as safe as Rust)
- tialaramex 2y agoZig doesn't provide any rationale for why it picked UB rather than wrapping. By default Rust's release builds give the integer overflows wrapping, so (1u8 + 255u8 == 0u8) rather than panic, so as to avoid paying for the checks. This is probably not what you wanted, your code has a bug (if it was what you wanted, you should use the Wrapping type wrapper which says what you meant, not just insist this code must be compiled with specific settings) but you didn't have to pay for checks and your program continues to have defined behaviour, like any normal bug. It is very rare that you need the unchecked behaviour for performance. Rare enough that although Wrapping and Saturating wrappers exist in Rust, even the basic operations for unchecked arithmetic are still nightly only. Most often what people meant is a checked arithmetic operation in which they need to write code to handle the case where there would be overflow, not an unchecked operation, Rust even has caution notes to guide newbies who might write a manual check - pushing them towards the pit of success - hey, instead of your manual check and then unsafe arithmetic, why not use this nice checked function which, in fact, compiles to the same machine code.
- 999900000999 2y agoI tried Nim, since it felt easier to use than C for low level stuff. I don't really like the syntax though. Python barely does Python like syntax right. Is Zig a good alternative. I vastly prefer higher level languages like C#. Have has a special place in my heart, but it's not supported outside of a few game engines.
- jonathrg 2y agoIt is a general purpose programming language that should be able to do anything you want, whether it works for you depends on what you want to do, the ecosystem might be lacking since it's a young language. Just try it out!
- superfist 2y agoI now use C# for high-level programming and Zig for low-level. Perfect combination for me.
- actionfromafar 2y agoMaybe I should write that tutorial on how to use C# for low-level.
- dgellow 2y agoYes please do!
- neonsunset 2y agoHeh, I've been procrastinating on making a blog and writing a blog post on "C# for systems programming". Would be nice to read and provide feedback if someone beats me to it.
- superfist 2y agoIt will not work if you low-level target is rp2040 microcontroller board...
- 2y ago
- earthnail 2y agoThe killer feature of zig to me is no hidden memory allocations. Whenever I needed that in the past, I reached for C.
- rty32 2y agoDefinitely good news, but to put it in perspective, that's about 0.75x - 1x annual salary for an experienced developer that works on compilers. My *guess* is that Microsoft spends at least 10-20x that amount of money on TypeScript annually, and much more on C++/C# etc.
- gomerspiles 2y agoThere are developers that earn that much, and the probability goes up at MS, Mozilla, etc, but I think a lot of qualified experienced Compiler developers exist who are earning less than the 150k a year when you consider the global market and smaller compilers. But the over all cost of a developer is not just their salary. Really though I've found jobs similar to compiler developer for an ANSI standard compiler at big tech to include a lot of hazard pay for how disagreeable the job actually is compared to one with more freedom.
- LVB 2y agoMy guess (and it's just that), is that a role on newish, high potential project like this would be quite something to land for the right person (i.e. they're already sold on Zig), and some reasonable funding allowing them to not have to work two jobs or only do nights/weekends is the enabler.
- mrbonner 2y agoAs a tech founder who’s still deeply involved, I wonder if Mark Zuckerberg has thoughts on Zig. I recall him mentioning in a recent interview that he would rewrite Facebook in Python instead of PHP. It's impressive to hear that from the CEO of a multibillion-dollar company.