20 ms·
Zig 0.11
- andy_herbert 3y agoAre people supposed to realise this version number is related to Zig?
- Tor3 3y agoSomebody fixed the title from 0.11.0 to Zig 0.11, so it's ok now.
- pid-1 3y ago> Backed by the Zig Software Foundation, the project is financially sustainable. These core team members are paid for their time: (lists five people) That's quite impressive. For comparison, Python had 2 full time paid devs in 2019 (not sure about now).
- deleted 3y ago[deleted]
- kristoff_it 3y agoWe're also pretty efficient, more than 90% of the donated money is used to pay developers (the rest goes to administrative costs, CI infrastructure, etc).
- the_mitsuhiko 3y agoMore important than the number is that the foundation actually pays the core developers. Python suffers from having almost exclusively volunteer work and those volunteers often are not interested in solving the problems of the foundation or community (eg: packaging etc.). The most the PSF could do is “bolt on” a developer to solve packaging in yet another non embraced and supported way.
- samwillis 3y agoI suspect some of this comes down to how larger donations are made. For Python they have often had people working at companies donating time on their employers books to the development of it. GVR for example works for Microsoft and has worked at Dropbox and other places, but spends much of his time on Python. So he isn't listed as an employee of the foundation, but at times is full time. If a company donates employee time they have more influence on the project than donating cash to pay for development. The fact that Zig had the cash donation to do it this way is brilliant, and probably a better model.
- cod1r 3y ago[flagged]
- tarcio 3y agoWhat are the use cases for zig? The website says general purpose and tool chain but people who have used it, what it excels at?
- johnnypangs 3y agoBun, a JavaScript runtime (uses WebKit as an engine I believe) is written in Zig. They seem to be doing alright: https://bun.sh/ https://bun.sh/
- BigJ1211 3y agoIt uses JavaScriptCore, which was written for Safari. It's supposedly faster than V8, but harder to work with.
- skavi 3y agoA fancy new database is written in Zig: https://tigerbeetle.com/ https://tigerbeetle.com/
- pjmlp 3y agoBeing Modula-2 like (in safety), with a syntax that is more appealing to C minded folks, with nice compile time execution support.
- ksec 3y agoI think this is one of the best short description of Zig.
- tauoverpi 3y agoA game engine https://machengine.org https://machengine.org is being written in zig, there's also https://microzig.tech https://microzig.tech as zig is well suited to embedded development.
- armchairhacker 3y agoMy understanding is that Zig has all of the power and modernity of Rust, without the strictness and borrow checker. Unlike Rust, it also has powerful compile-time evaluation and custom allocators, and probably more improvements I'm not familiar with (in Rust you can effectively emulate custom allocators, but you have to rewrite every allocating structure to use them; or you can use nightly, but most third-party library and even some standard-library types don't support them). I also heard someone say "Zig is to C what Rust is to C++". Which I interpret as, it's another maximum-performance modern language, but smaller than Rust; "smaller" meaning that it has less safety and also abstraction (no encapsulation [1]), but less requirements and complexity. Particularly with games, many devs want to build a working prototype really fast and then iterate fast. They don't want to deal with the borrow checker especially if their code has a lot of complex lifetime rules (and the borrow checker is a real issue; it caused evanw to switch esbuild to Go [1]). In small scripts with niche uses, safety and architecture are a waste of effort, the script just has to be done and work (and the latter is only partly necessary, because the script may not even be fed enough inputs to cover edge cases). Plus, there are plenty of projects where custom allocation is especially important, and having every type support custom allocation is a big help vs. having to rewrite every type yourself or use `no_std` variants. [1] https://github.com/ziglang/zig/issues/2974 https://github.com/ziglang/zig/issues/2974 [2] https://github.com/evanw/esbuild/issues/189#issuecomment-647024185 https://github.com/evanw/esbuild/issues/189#issuecomment-647...
- msavara 3y agoAnybody here who is using zig on daily basis?
- rene_d 3y agoI am building an on-premise annotation platform for medical image data (MVA.ai) where it is used for both backend and frontend (WASM). Really enjoy the language, with the key aspects being the low level control and performance, the build system and cross-compilation, comptime for generics, the easy integration of existing C libraries and the support for WASM. Manual memory management is sometimes a bit tedious, but you get used to it quite quickly. On the other hand, being able to use different allocators can even give you something like 'lifetimes'.
- trashburger 3y agoI don't know about "daily" right now (I've had to take a break due to obligations), but I'm working on a modern implementation of the Self programming language with actor capabilities: https://github.com/sin-ack/zigself https://github.com/sin-ack/zigself It's nowhere near usable yet, but Zig has been a joy to work with for over a year, and I can definitely see myself using it for a big piece of software.
- whitehexagon 3y agoMost days. Just switched to linux to access latest version and features, especially loving the new 'packed struct(u32)' for some low level SoC work (Register representation). I get compile errors if I miscount the bits, and I managed to get some type safety, and not a single 'shift', 'and' or 'or' sign in sight! Looks like I'll be porting to 0.11.1 as soon as the documentation is in place... I hope they slow down soon, already feels complete. The WASM support is amazing, much smaller outputs than the other options I tried (Java & Go). Great work team!
- eatonphil 3y agoEveryone where I work does. :)
- captainhorst 3y agoI use Zig for all my hobby projects: - A pixel art editor https://github.com/fabioarnold/MiniPixel https://github.com/fabioarnold/MiniPixel - A Mega Man clone https://github.com/fabioarnold/zeroman https://github.com/fabioarnold/zeroman - Zig Gorillas https://github.com/fabioarnold/zig-gorillas https://github.com/fabioarnold/zig-gorillas And most recently I had the opportunity to build a visualization for TigerBeetle's database simulator: https://sim.tigerbeetle.com https://sim.tigerbeetle.com Before I was using C++ and Zig has been an improvement in every way.
- yla92 3y agoThe Async/Await didn't make it into this release[0] but hopefully by the next one! [0]: https://ziglang.org/news/0.11.0-postponed-again/ https://ziglang.org/news/0.11.0-postponed-again/
- ngrilly 3y agoYes. Ideally, the release notes should have mentioned this in the roadmap section at the end :)
- captainhorst 3y agoTheir biggest release in terms of issues closed: https://github.com/ziglang/zig/milestones?state=closed https://github.com/ziglang/zig/milestones?state=closed 1012 in less than 8 months. What an amazing feat.
- modernerd 3y agoAs a contributor to 0.11 it was very impressive how quickly my (small) PR was triaged, reviewed and merged. The Zig team are doing great work and they care about the contributor experience.
- ephaeton 3y agoWow, those are really nice release notes.
- mlugg 3y agoI wrote a good chunk of these notes and can tell you that these are probably the least detailed/useful we've ever done, because they were only about 40% completed when release day came, so we spent a few hours doing quick & sloppy improvements :P you can hopefully expect them to improve a bit over the next few days (although I think we still managed to write up all of the most important bits)
- ephaeton 3y agointeresting. Maybe those are the first I follow with interest and it's just the general quality of presentation / fitting level of detail / "tone". Maybe I'm just complimenting your template, but feel free to feel addressed!
- grumpyprole 3y agoZig is not memory safe and therefore at risk, just like C/C++, of future government legislation that outlaws the use of memory unsafe languages for some or all projects. The risk of such legislation is not insignificant: https://www.itpro.com/development/programming-languages/369499/move-away-from-memory-unsafe-languages-c https://www.itpro.com/development/programming-languages/3694... Personally I do not see the point of building an entirely new language and ecosystem that does not fully address this issue.
- quic5 3y agoThat totally misses the point of quality software. What good is memory safety if you medical device crashes because of an out of memory error? What I'm trying to say: There are use cases where areas of safety are required other than memory safety.
- lmm 3y agoThere are use cases where safety beyond memory safety is required. But there are no use cases where memory unsafety is desirable, yet alone required.
- quic5 3y agoThat is absolutely true. But but you can write memory-bug-free code in Zig but you cannot prevent heap allocations in most of the languages listed in the article, making it outright impossible to write certain software in them.
- grumpyprole 3y agoSure one can write memory-bug-free code in x86 assembly too. But how can you prove it? ATS is an example of a low-level systems language where you can prove it.
- ObscureScience 3y ago
- whiterock 3y agoIt‘s a shame macOS Arm is deprecated :(
- quic5 3y agoI don't believe there ever was support for macOS on 32-bit ARM.
- AndyKelley 3y agoI believe iPhone 5c was the last of the 32-bit ARM Apple devices. I guess technically that's iOS rather than macOS but as far as Zig is concerned, it's all Darwin.
- SSLy 3y agoNah, it was Watch S4, from 2018 https://www.apple.com/newsroom/2018/09/redesigned-apple-watch-series-4-revolutionizes-communication-fitness-and-health/ https://www.apple.com/newsroom/2018/09/redesigned-apple-watc...
- sai_c 3y agoWhoa, thanks for the heads-up. I've been reading news about Zig from time to time, and planned giving it an honest try at 1.0 (whenever that may be) but it seems I'm out of luck. Do you, by chance, know the reasoning behind this step?
- candrewlee14 3y agoAarch64 is supported (M series chips) if that’s what you’re worried about.
- sai_c 3y agoNo, I actually have a bunch of older Macs I keep running for certain experiments.
- konsuko 3y agoThe new multi-object for loop syntax is such an improvement. Hoping for many more small QoL features like this until Zig hits 1.0.
- wodenokoto 3y agoI enjoy seeing an update or discussion of things like D, Zig, Nim (and a few others I probably forgot) but I honestly can't keep track of where they are in relation to C/C++, C#/Objective-C, and Rust. Is there are chart or a "are we xxxx yet" page one can reference?
- flohofwoe 3y agoIMHO this is still the most important page to get an idea what the current state of Zig is and how it changed over time: https://ziglang.org/documentation/0.11.0/ https://ziglang.org/documentation/0.11.0/
- xchkr1337 3y agodoes it support tabs yet?
- flohofwoe 3y agoIt actually does.
- bmacho 3y ago> If the Operating System is proprietary then the target is not marked deprecated by the vendor. The icon means the OS is officially deprecated, such as macos/x86. Not supporting proprietary OSes is a bummer. Especially if it is marked as deprecated since it is unlikely to change. People choosing Zig to anything choose their users to throw away their devices. .. the number of hardware and software just keeps growing and growing endlessly, and the number of their combinations grows even faster. We probably need some more virtual machines as targets to cover them all.
- jmull 3y agoI think the “not” in there is a typo? It reads logically if you remove it. So it’s not really zig deprecating 32-bit macos’s, but Apple, and there’s not a lot zig can do about that.
- kristoff_it 3y ago> People choosing Zig to anything choose their users to throw away their devices. Apple is asking you to throw away your devices, not Zig. Getting proper CI coverage for supported versions of the OS is already pretty expensive and doing the same for unsupported systems is entirely unfeasible at this moment. Don't buy Apple if you don't want to throw away functioning hardware.
- deleted 3y ago[deleted]
- bmacho 3y agoYeah, sure. It is still a bummer when people that try actively to underpin the whole world tell you 'fuck you'. Having 'we support proprietary systems until their makers support it' as a hard rule is unnecessary and harsh. It is a simple rule, but I don't think it is good. Why not choose the supported systems on individual merits, e.g. on usage statistics? I think for example the Linux kernel does that. edit: I just continued the previous thought. If your reply means that you are open or likely to target deprecated systems in the future, that's much better!
- toastercat 3y agoI wanted to try learning Zig, but found the resources to be incomplete and lacking in examples. Rust (or Go) in comparison has a plethora of online resources with great examples. I realize Zig is just 0.11, but wondering what resources people relied on to pick it up?
- rgrmrts 3y agoI’ve been using the language reference [0] and also just browsing the standard library source code [1] for examples. [0]:https://ziglang.org/documentation/0.11.0/ https://ziglang.org/documentation/0.11.0/ [1]:https://github.com/ziglang/zig/tree/master/lib/std https://github.com/ziglang/zig/tree/master/lib/std
- flohofwoe 3y agoThat's important: don't be afraid to look into the stdlib source code when questions arise. It's easy to read and stuff is easy to find, and it's also a great teacher.
- bsaul 3y agoSince go, this has been a really great way for me to judge a langage: how readable is the stdlib ? If it's layer upon layer of unscrutable abstractions, then you know there's a high chance your codebase will end up looking the same after a few years.
- kristoff_it 3y agoThe main available resources are listed here https://ziglang.org/learn/ https://ziglang.org/learn/
- ksec 3y ago@WalterBright In case any of the sh*t got into you. Ignore all the trolls about you appearing in Zig thread. ( Although I think some of them are just joking )