Re:Hobby x86 kernel written with Zig
by Touche on Monday January 06, 2020 @09:11AM
(#21969204)
How can it be optional if there is lots of code that assumes you are using GC? For example, as far as I can tell the stdlib doesn't do its own allocations. Does this mean you can't use the stdlib with GC disabled? Or am I missing something here?
[ Parent
| on HN ]
A friend of mine wrote a DSL for audio using Nim with GC off.
https://github.com/vitreo12/omni
I don't know enough to comment but it may be useful to look at things in the wild. This project also heavily relies on calling in C to interface with environments and the SuperCollider scsynth.
Re:Hobby x86 kernel written with Zig
by alehander42 on Monday January 06, 2020 @10:12AM
(#21969679)
overally if you write an os you need to write your malloc/free .. and then you should be able (i think..) to use many of the gc-s anyway and more of stdlib.
But you can also think of Nim as macro-able higher level C and write it like that (but indeed you probably still need this minimal allocation support)