5 ms·
I've pretty much settled on Zig at this point, if only for how dead-simple it is to cross-compile for other hardware platforms. The process of compiling workin
by yellowapple 2y ago
I've pretty much settled on Zig at this point, if only for how dead-simple it is to cross-compile for other hardware platforms. The process of compiling working code for oddball platforms (in my case the Nintendo 64) was way easier than I expected it to be.
The only downside is the stdlib being as fast-moving of a target as it is. Right now I've had to put a pin on getting panic stack traces to work on my N64 code because apparently the upcoming release changes a bunch of stuff around panic/stacktrace handling (and it's already changed quite a bit over the years even before these new changes).
- nyjah 2y agoWhat N64 code are you working on? I am intrigued.
- yellowapple 2y agoCurrent progress is here: https://fsl.yellowapple.us/zig64/dir?ci=trunk https://fsl.yellowapple.us/zig64/dir?ci=trunk Right now it's just a bunch of WIP Zig interfaces for the N64's hardware, but the end-goal is to get it developed enough for homebrew gamedev.
- nyjah 2y agoWow - will follow. Awesome!
- Galanwe 2y ago> The only downside is the stdlib being as fast-moving of a target as it is. Ah that's an interesting take, my opinion is that the stdlib doesn't move fast enough. In its current state it's pretty broken, most of the "process", "os" and "posix" modules are either straight up raising unreachable in normal scenarios, or simply badly designed. I would like the stdlib to be much more fast moving and fix all these issues, but I had the impression most work on it is frozen until 0.15 or 0.16, after incremental compilation is done.
- brodo 2y agoYou are right, the stdlib is not the highest priority right now. There are major improvements coming in 0.14 though. The new default allocator for example. I think the problem you describe can be solved by having more contributors focussing on the standard library. With the compiler, there are bottlenecks which make onboarding new people hard. This is a smaller problem in stdlib.
- Galanwe 2y ago> I think the problem you describe can be solved by having more contributors focussing on the standard library. I don't think so, my impression is that stdlib improvements are volontarily frozen for now, not because of a lack of contributors but because of a lack of clear plan as to what the stdlib should look like. There are a number of issues and PR of people willing to contribute to stdlib that are stalled. That's not to say that's its bad per se, "we don't have a plan for now and don't want people to commit time for an unclear target" is a perfectly OK answer.
- archargelod 2y ago> how dead-simple it is to cross-compile for other hardware platforms The fact that zig can compile C code makes it useful for other languages too. I recently started using `zig cc` to cross-compile Nim for lots of different platforms within the same environment. It takes no time to setup and, honestly, works like magic.
- csdvrx 2y agoI like Perl mostly because it's poetic (the code is super nice to read, with variable types standing out thanks to sigils), but another core strength is how very fast and light it is. Instead of "cross-compiling" or just running a native perl interpreter (there's one for about every platform!), I prefer how Actually Portable Executables make Perl multiplatform with just 1 binary asset running everywhere! I wanted to write a webserver processing CGI to learn more about the "old school web", so I wrote https://github.com/csdvrx/PerlPleBean https://github.com/csdvrx/PerlPleBean and the simplicity of just downloading and running the .com on anything is very nice I'm now trying to do the same in Python3, but it's not as fun - and I'm not yet to the part where I will try to safely run python code within the python webserver, either through restrictedpython or ast.parse(), ast.walk(), eval(compile()) ...
- dwedge 2y agoI also choose Perl most of the time, but I think this is the first time I've ever heard anyone call it super nice to read
- johnisgood 2y agoMy Perl code is super nice to read. :D
- chgs 2y agoMy perl code isn’t. But neither is my Python, or Java, or C, or JavaScript or bash or anything. Clearly the problem is all these languages, and not me.
- epolanski 2y agoI'm picking up zig as my first system programming language myself and I love it. Sadly the job market looks dead
- azthecx 2y agoIt's such a new language, not even in 1.0.0 You won't really find companies willing to bet their livelihoods at such an early stage. You can make your own though :)
- dvdbloc 2y agoWhat’re you doing with Zig and N64? Sounds awesome.
- yellowapple 2y agoEventually, I hope to use Zig for N64 homebrew. To get there, though, I need to implement Zig-ish interfaces to the N64's hardware, which is slowly-but-surely happening at https://fsl.yellowapple.us/zig64/dir?ci=trunk https://fsl.yellowapple.us/zig64/dir?ci=trunk