9 ms·
Zig monthly, October 2021: Games, gamedev, Elixir, tools and more
- mapcars 5y agoDo I understand correctly that it's still not open sourced?
- adenozine 5y ago? https://github.com/ziglang/zig https://github.com/ziglang/zig
- mapcars 5y agoMeans not, thanks :)
- capableweb 5y agoCorrect me if I'm wrong, but the code is there and licensed under MIT (Expat https://directory.fsf.org/wiki/License:Expat https://directory.fsf.org/wiki/License:Expat), which is GPL-compatible and "free". What's missing for it to be open source? Edit: I might misunderstand your comment, ignore me if so.
- Kolja 5y agoNot only not any more, Zig has never been closed source.
- metafex 5y agoyou might've mistaken it for v which has been open-sourced in the meantime: https://github.com/vlang/v https://github.com/vlang/v
- kitd 5y agoI played with Zig recently and loved it. The right tools at the right level with the right degree of utility. It was very frustrating getting started though as just about anything Zig-related online you read/download/run is out-of-date with the latest version of the language. Small breaking changes go in that can easily stump a newbie like me, and there's not enough online experience of catching similar errors that give guidance. IMHO I really hope the language stabilises soon. Otherwise it will be a frustrating experience.
- alnja8a 5y agoi dont think they want to stabilize for quite a while -- i think they want it to basically be exactly the language andy wants before it gets stabilized, with self hosted backends and everything working.
- dnautics 5y agoI think "waiting for 1.0" is for you then! The zig team seems to take semver relatively seriously
- setr 5y agoI don’t think that makes much sense to say until they actually encounter a scenario where violating semver could be done and even be reasonable, and they actively choose not to. Pre-1.0 semver is fairly meaningless, so taking it seriously really amounts to… doing anything at all. There’s literally nothing to be backwards compatible with, or to announce incompatibility with. They’ve have no opportunity to show how seriously they take it.
- qchris 5y agoIs this, like, actually true? I was under the impression semver is particularly useful during that stage because it (is supposed to) provides guarantees around which things break and when. I know, for example, many foundational Rust libraries are technically pre-1.0, but because of the semver standards, users are able to use them consistently because they have an understanding of which updates are important and/or likely to break their existing code, even when the long-term 1.0 guarantees don't necessarily exist.
- cies 5y agoThe article links to an article[1] named: Using Zig and Translate-C to understand weird C code Interesting read indeed. Created a new post for it here on HN: https://news.ycombinator.com/item?id=29092677 https://news.ycombinator.com/item?id=29092677 [1]: https://zig.news/sobeston/using-zig-and-translate-c-to-understand-weird-c-code-4f8 https://zig.news/sobeston/using-zig-and-translate-c-to-under...
- bodge5000 5y agoNearly every time I've seen Zig mentioned its been in relation to game dev, but still don't really understand why. I understand the advantages of a framework over an engine and totally agree with those, but I still don't know why specifically Zig, if anyone could fill me in
- Guthur 5y agoCompletely wild speculation... I think there are a number of disenfranchised "close to the metal" programmers. C has stagnated and won't likely move much, C++(++++...) has reached bonkers level of complexity, D is... D who, and Rust is highly opinionated, which is a double edge sword.
- pjmlp 5y agoC99, C11, C17, with C23 on the horizon. The only thing stagnant on WG14 is their regard towards providing safer string, vector types and enumerations.
- kaba0 5y agoWould you mind mentioning any noticeable improvements in those versions? Because C seems to remain the exact same for decades now. I only know of _Generic thingy which is hardly ever used and maybe variable length arrays?
- flohofwoe 5y agoC only adding a few new features only once every few decades or so is actually a feature, not a problem (IMHO of course). C99 was the last big release, while C11 and C17 were mostly minor course corrections and spec cleanup (VLAs have been degraded to 'optional' for instance, which makes a lot of sense, because it shouldn't have gone into the standard in the first place). So far, C23 seems like a bigger release again though.
- kaba0 5y ago
- sydthrowaway 5y agoHow likely is Zig defeating Rust?
- unrealhoang 5y agoas likely as Rust defeating C++ for whatever meaning of "defeating".
- pjmlp 5y agoIt isn't until it has a story for use-after-free.
- flohofwoe 5y agoAt least for heap allocations that's taken care of by the 'General Purpose Allocator'. AFAIK it's still possible to return a dangling reference to stack memory though, but this should be fixable without going full Rust, even C compilers have a warning for this nowadays.
- pcwalton 5y agoZig's "general purpose allocator" achieves use-after-free protection by quarantining memory pages forever: i.e. it never reuses heap addresses. This is unsuitable for production because keeping even a single 16 byte allocation alive on a 4kB page will leak the whole page. If it were possible to solve use-after-free this way, Microsoft/Apple/Google would have done it long ago for C++.
- brightball 5y agoReally fascinating to see Zig being used to make Elixir cross platform! Exciting stuff. Here's a direct link to the ElixirConf talk: https://www.youtube.com/watch?v=lDfjdGva3NE&list=PLqj39LCvnOWZna91xJ_i44g3rx4Brbpnv https://www.youtube.com/watch?v=lDfjdGva3NE&list=PLqj39LCvnO...
- dnautics 5y agoElixirConf speaker here, I think those two items are supposed to be separate items (the talk is not directly related to the Burrito work - which is amazing too).
- Bayart 5y agoHey Isaac, thanks for the Elixir Process series, it was really useful !
- dnautics 5y agothanks for the feedback. I keep meaning to finish it up, but things keep coming up (moved across the country, elixirconf talk, major work deadlines), etc. I now have my office set up to continue it, so the next entry should drop... soon. (but I have house guests for the next three weeks)...
- Bayart 5y agoI was intrigued so I went to hunt for the Burrito repo[1]. I thought it was some sort of Erlang native compiler written in Zig (which sounds like an incredible pain in the ass), but it's really "just" a cross-platform installer. Still useful ! [1]: https://github.com/burrito-elixir/burrito https://github.com/burrito-elixir/burrito
- jakearmitage 5y agoHow does that work, exactly? Zig is statically linking the libs? Does it have it's own package manager with build routines for common libraries across platforms? How does it build SDL, or libpng for example?
- flohofwoe 5y agoThe Zig compiler is also a C, C++ and Objective-C compiler (basically by linking Clang into the Zig compiler executable), and by extension the Zig build system (which is also integrated into the compiler executable) can also be used to build C/C++ projects. AFAIK a package manager solution is also planned, but I don't know the details there.
- eggy 5y agoI've touched Zig a few times over the last year or so, and I like it, but I am still itching for something else that is not as complex as Rust, but not too close to C. I am now playing with Scala Native[0] just to see how it works on the low-level stuff. Zig is amazing especially since you can use the compiler as an alternative C compiler too[1]. I like Lisp and APL, so I have been learning April[2], a subset of APL in Lisp. It is very cool, if you like Lisp and APL. The game in Zig in the article reminds me of the Dyalog APL simulation of a boat navigation app developed in Finland using APL[3]. [0] https://github.com/scala-native/scala-native https://github.com/scala-native/scala-native [1] https://andrewkelley.me/post/zig-cc-powerful-drop-in-replacement-gcc-clang.html https://andrewkelley.me/post/zig-cc-powerful-drop-in-replace... [2] https://github.com/phantomics/april https://github.com/phantomics/april [3] https://www.dyalog.com/case-studies/simulation.htm https://www.dyalog.com/case-studies/simulation.htm
- MisterTea 5y ago> ...something else that is not as complex as Rust, but not too close to C. Go might be what you want. It's boring which means it just works with healthy tooling and libraries. I call it the true successor to C with a 1990s bell labs feel.
- LeonenTheDK 5y agoInterestingly two of the creators of Go did work at Bell Labs. https://en.wikipedia.org/wiki/Ken_Thompson https://en.wikipedia.org/wiki/Ken_Thompson https://en.wikipedia.org/wiki/Rob_Pike https://en.wikipedia.org/wiki/Rob_Pike
- eggy 5y agoFunny you should say that. I barely touched Go, but I felt immediately at home with it from my C experience. Boring is good most of the time. I don't know about Go routines, etc., but the GC differentiates it from C, Zig, Rust, and Scala Native (AOT). I hear a lot of good things about Go including salaries ;)
- donpdonp 5y agoAlso consider https://vlang.io/ https://vlang.io/ - its similar to Go with some new ideas.
- sam0x17 5y agoThey really need to get their package manager done. Imagine doing game dev without normalized package management.
- owalt 5y agoI thought most game devs were into the paradigm of: check external libraries straight into your source control, update them never, and generally treat them on par with your own code. What is it that a package manager does that's particularly useful for game dev? (I don't do game dev, so maybe I'm missing something.)