Zig embeds clang to compile C code. This doesn't add a new dependency since Zig already depends on LLVM. If there is a future where the self-hosted Zig backend is good enough to not depend on LLVM anymore, there might be a reason to use a C compiler written in Zig (possibly https://github.com/Vexu/arocc)
Also worth noting that Zig embeds C stdlib source code (musl if I'm not mistaken). That means it is easier to cross compile C projects using zig since you don't need to install a cross toolchain. This is why some golang/rust projects use Zig when they need to cross compile.
This isn't quite correct. Yes, it can output C code; however the result is not very readable at all, and fails the DFSG on generated code. It _is_ useful for compiling Zig code to targets which aren't supported by LLVM, however.
Do you have a reference for this? Does it use a C backend that is part of LLVM, or is it something Zig-specific? What are its limitations? Can it compile libraries to C, or only entire applications?
I have wanted Rust and Zig to support compile-to-C for a while, so this is exciting news for me.
One thing that would particularly interest me is if functions intended to be inlined could be emitted into .h files.
For Morrowind it didn't just upgrade the rendering, it completely changed the aesthetic of the scene. Is that on purpose? At that point you can't call the results better, only different.
It seems like the big change is that the light sources now actually emit light so the scene becomes a lot brighter. Maybe part of the process should be turning down global illumination? That might make dark corners even more dark however, and "hidden" clues that were supposed to be difficult to see may become outright invisible.
It seems you'd certainly be able to go in and just tweak the lighting without doing all the AI touchups, texture upscaling, and model swaps as they did in the video. Pretty wild stuff, either way.
And that is 379 LOC for an Asteroids clone which includes some inline defined math functions instead of an include to an external math lib. Raylib is great for the GuI stuff (it is an immediate mode GUI, because games), and it is written in C.
Yeah... he says you can learn the language in an afternoon, but his book is so long-winded... I just want a short intro so that I can start writing programs.
I really like the conversational style. If I wanted the quickest, driest way to get started in Janet, I'd probably go to https://learnxinyminutes.com/docs/janet/
The book (which I really like so far, 7 chapters in) is more of a deep dive which covers a lot of the gotchas and intricacies without shying away from the nastier parts of the language. The documentation on the official site should get you going in a couple of hours.
Built-in names are essentially reserved words, and there are dozens of them. The @ prefix ensures you don't step on user's variable names, and that you can add new built-ins without making breaking changes.
not really, those are two modules that are always available to you, but you still have to import them like any other Zig module `const builtin = @import("builtin");`
No, it's because it is hard. If it is a bad idea, why would I want to do it?