nimkernel
vos
nimkernel | vos | |
---|---|---|
4 | 22 | |
607 | 1,815 | |
- | 1.8% | |
0.0 | 9.2 | |
over 2 years ago | 4 days ago | |
Nim | V | |
GNU General Public License v3.0 or later | GNU General Public License v3.0 only |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
nimkernel
-
D Programming Language
> kernel developers do not allow third party runtimes in the kernel. Even meager Rust's "panic" runtime is a contentious
Much in Linux is contentious :-) which is why the module system is nice. A kernel module for C code requires no permission from Linux-core unless you need it distributed with the kernel (which, yes, might be required for "credibility" - but critically also might not). It may require many decls to access various kernel APIs, but those can be (semi-)automated or just done as-needed. So, Linux kernel policy is not so relevant (at best) which is what I meant by "no special support" (admittedly brief). Kernel coding is always a bit trickier, and you may need to build up some support code to make integration nice, though as well as decl generators.
> Can one disable runtime in Nim completely -- no GC, no exceptions?
To answer your question, and as discussed elsewhere in this subthread, Nim has many options for memory management.. only stdlib seq/string really needs automatic methods. One can disable the runtime completely via os:standalone and statically check that no exceptions are raised with Nim's effect system (and there are also both setjmp & goto based exception impls which may/may not be workable in Linux/BSD kernel module settings). As "proof more by example", a few people have written OS kernels in Nim recently[1,2] and there was another toy kernel long ago[3].
People have also written OS kernels in Go which "has a GC and runtime".[4] So, I acknowledge it's not quite the same example, but I also see no fundamental blockers for kernel modules.
[1] https://github.com/khaledh/axiom
[2] https://prosepoetrycode.potterpcs.net/2023/01/a-barebones-ke...
[3] https://github.com/dom96/nimkernel
[4] https://github.com/mit-pdos/biscuit/
-
Ask HN: Why did Nim not catch-on like wild fire as Rust did?
Niceness is subjective, but Nim is just as valid an addition to that group. Nim compiles to C and has had an --os=standalone mode for like 10 years from its git history, and as mentioned else-thread (https://news.ycombinator.com/item?id=36506087) can be used for Linux kernel modules. Multiple people have written "stub OSes" in it (https://github.com/dom96/nimkernel & further along https://github.com/khaledh/axiom).
While it can use clang as a backend, Nim does not rely upon LLVM support like Zig or Rust (pre-gcc-rust working). Use on embedded devices is fairly popular: https://forum.nim-lang.org/search?q=embedded (or web search).
Latency-wise, for a time, video game programming was a perceived "adoption niche" or maybe "hook" for Nim and games often have stringent frame rendering deadlines. If you are interested in video games, you might appreciate https://github.com/shish/rosettaboy which covers all but Ada in your list with Nim being fastest (on one CPU/version/compiler/etc). Note, however, that cross-PL comparisons are often done by those with much "porting energy" but limited familiarity with any but a few of the PLs. A better way to view it is that "Nim responds well to optimization effort" (like C/Ada/C++/Rust/Zig).
- OSDev in Nim
- A small kernel written in Nim
vos
- Vala Programming Language
-
V Language Review (2023)
The creator of V made some big claims that raised a few eyeballs, they've gained a reasonable following over the years, have a pretty serious looking website (https://vlang.io) a beer-money level Patreon following and some corporate partnerships/sponsors. However have experienced some pretty brutal takedowns over the years, with some of the bolder claims about the language/compiler being exposed as being.
A word I keep seeing in relation to V is "aspirational" - the project aspires to be a serious language with some major features, so I think it's fair to approach it with a more critical eye than one would a kid's side-project. I think HN would have been pretty understanding if they were open about the state of the various features and were a little less defensive when they encounter articles that treat it like a Real Language and review it as such. If the authors don't want this kind of feedback they can just say front-and-centre (or on their FAQ @ https://github.com/vlang/v/wiki/FAQ) "this is a toy" or "this is pre-alpha"
- OpenD, a D language fork that is open to your contributions
-
Why is Vlang's autofree model not more widely used?
Autofree has existed for years and can work. Here is a demo. It is used in V's Vinix OS, Ved, and other applications. Part of the issue is there are detractors who purposefully spread misinformation nor know about its other memory options, and the other part is understanding how to use it.
- Ask HN: Why did Nim not catch-on like wild fire as Rust did?
-
Thinking if should i continue to use zig
Another option is to write the kernel in V. Vinix is an OS written in V. You can use it for reference when building your project.
-
V Language Review (2022)
And that's why vinix [1] is full of manual free call? That tells how good autofree is, isn't it? Can you compile v compiler with autofree? Last time I checked, you can't.
[1] https://github.com/vlang/vinix/search?q=free&type=code
-
Hello V-Lang
vweb, volt, and ved are not a "little more than alpha"
yes, the os is being developed in V, and it can already run bash, GCC, G++, and Doom.
https://github.com/vlang/vinix
-
Cello – High Level C
It's a great concept, but languages like Rust (https://www.rust-lang.org/), Zig (https://ziglang.org), Vlang (https://vlang.io/), etc... are already running with a similar idea to being easy to interact with C and are viable alternatives to it as well. Vlang even created its own OS, Vinix (https://github.com/vlang/vinix), to show its capabilities in this regard.
Seems to me, Cello would be more for those C programmers that didn't want to try the various alternative languages that are now out, and happen to agree with its developer's interpretation of what high level constructs would look like. The point of these alternative languages is to offer features that C doesn't have or to implement them in easier or clearer ways.
-
Vinix, Operating System in the V Programming Language
Vinix shows the capabilities of V on bare metal, in additional to it being useful for high-level programming as well. https://github.com/vlang/vinix
What are some alternatives?
procs - Unix process&system query&format lib&multi-command CLI in Nim
v - Simple, fast, safe, compiled language for developing maintainable software. Compiles itself in <1s with zero library dependencies. Supports automatic C => V translation. https://vlang.io
iomrascalai - Iomrascálaí is an AI for the game of Go/Weiqi/Baduk written in Rust
zig-gamedev - Main monorepo for @zig-gamedev libs and example applications
wasmer - 🚀 The leading Wasm Runtime supporting WASIX, WASI and Emscripten
Cello - Higher level programming in C
rosettaboy - A gameboy emulator in several different languages
cfront-3 - self education and historical research of the C++ compiler cfront v3
axiom - A 64-bit kernel implemented in Nim
v-mode - 🌻 An Emacs major mode for the V programming language.
wasmtime - A fast and secure runtime for WebAssembly