2 ms·
I second the props for Zig. It's basically a really well designed, trimmed down C with "compile time values" that, as an emergent phenomenon gets generics, and
by dnautics 7y ago
I second the props for Zig. It's basically a really well designed, trimmed down C with "compile time values" that, as an emergent phenomenon gets generics, and composable allocators.
C interop is beautiful. My primary language is on the Erlang Virtual machine, and it's easier to write FFI using Zig than it is to write it in C.
- ccchiji 7y agoI upvote
- jacquesm 7y agoNow that is an interesting combo.
- dnautics 7y agoif that combination is interesting to you, this is what I'm working on (on the side from my main job): https://github.com/ityonemo/zigler https://github.com/ityonemo/zigler
- jacquesm 7y agoOh, nice, I will definitely try that. Nifs in C are an eyesore and a risk, having more language options there is good and a clean integration like this is even better.
- dnautics 7y agoJust FYI I recommend waiting till I 0.1 it, which will definitely happen before end of January, when I'm giving a talk. I haven't tested that it works as a library yet, much less with elixir releases (it works self contained).
- jacquesm 7y agoOk. Even so, very nice development, this is exactly how I think it should be done, most other dual-language environments where you use one language for structure and another for speed tend to completely lose the context of the code for the optimized part. Having them blended in like this ensures that they are viewed as a whole rather than as two loosely coupled parts.