NimForUE
axiom
Our great sponsors
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.
NimForUE
-
Nim Versions 2.0.4 and 1.6.20 released
Glad to see that the windows executables are working again.
I had tried a little while ago to test things out on my windows machine after seeing the NimForUE project (https://github.com/jmgomez/NimForUE) and was sad to see that my computer would auto-mark any nim binaries as malware and delete them. I wasn't too invested so I just shrugged rather than looking for too many workarounds.
-
Unity plan pricing and packaging updates
For people scared off by C++ and who want faster recompile times, check out the Nim bindings [0]. Check out his Twitter/X account [1] for plenty of cool things it brings to the table.
[0]: https://github.com/jmgomez/NimForUE
[1]: https://twitter.com/_jmgomez_
- Nim Lang for Unreal Engine
-
Ask HN: Why did Nim not catch-on like wild fire as Rust did?
I started using Nim because i wanted to port some of machine learning models written in python with the idea of making them more portable. It was a lot of work as community is relatively small and a new user would end up writing a lot of code.
But Nim has a pretty solid standard library with clearly written code and an awesome community to help with problems. I generally read a lot of standard library code to expand my knowledge of language and discover common patterns which repeat themselves in a lot of real world problems.
C inter-op is really first class, and as far as i know it has one of best C++ inter-op as well, you can take a look at: https://github.com/jmgomez/NimForUE for a real world example.
I use Nim for my work in both professional and personal capacity and also have written about some of it at https://ramanlabs.in/static/blog/index.html
-
Anybody still trying to make Godot 4.X bindings?
I've switched over to Unreal and helped out with NimForUE early on. If you have any interest in Unreal, you should check it out since it's in a really good state. It does assume knowledge of Nim, Unreal, and C++ to really get the most out of it.
-
Purpose of NimScript vs nim
In NimForUE, we ran into issues with nimble early on, so we resorted to using nim for the build scripts because we needed to do code generation gymnastics to work with Unreal's build system and Nim's C++ codegen. The Nim compiler has had some patches since we first worked on the build system, so maybe if we had to do things over again we could go back to NimScript.
- Nim 2.0.0 RC2
-
Epic’s Verse Programming Language Reference
They would be better off just paying the guy developing NimForUE some money and making it first-party.
-
The Icculus Microgrant is giving out 250 dollar grants to open source projects, please brag about your project(s) in this thread so I can see them!
NimForUE is an Unreal Engine plugin that aims to replace the verbose and tedious C++ with the concise and clean Nim language, supporting blueprints too and giving hot reloading and native speed performance. https://github.com/jmgomez/NimForUE
-
The Verse Calculus: a Core Calculus for Functional Logic Programming (more details on Epic's new language)
(https://github.com/jmgomez/NimForUE)
axiom
-
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/
-
Was Rust Worth It?
I gave Rust a few chances, and always came out hating its complexity. I needed a systems programming language to develop a hobby OS[1], and Nim hit the sweet spot of being very ergonomic, optional GC, and great interop with C. I can drop down to assembly any time I want, or write a piece of C code to do something exotic, but the rest of the system is pure Nim. It's also quite fast.
[1] https://github.com/khaledh/axiom
-
Nim v2.0 Released
I've used both to work on a hobby OS project (Nim[1], Zig[2]). I very much prefer Nim. Code is succinct, elegant, and lets you focus on your core logic rather than fighting the language.
Zig is nice and I like its optionals support and error handling approach. But I was put off by its noisy syntax, e.g. !?[]u8 to represent an error union of an optional pointer to a many-pointer of uint8. Also having to prepare and weave allocators throughout most of the code that needs to dynamically allocate (which is most of the code) gets in the way of the main logic. Even little things like string concatenation or formatting becomes a chore. Zig also doesn't have dynamic dispatch, which makes polymorphic code hard to write; you have to work around it through some form of duck typing. In the end I realized that Zig is not for me.
[1] https://github.com/khaledh/axiom
-
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).
-
Writing a Simple Operating System – From Scratch [pdf]
If anyone is interested, I have a couple of implementations of booting under UEFI and getting a bunch of info about the system (don't expect a functioning system, they just boot and dump some info):
Nim: https://github.com/khaledh/axiom
Zig: https://github.com/khaledh/axiom-zig (this one goes into depth in disassembling ACPI DSDT bytecode)
-
Assembly Nights
I wasn't ready to share it yet, but here it goes[1]. It's at a very early stage, but should give you an idea of how to get things up and running under Nim.
I didn't avoid malloc. I provided a simple bump pointer based heap to get things going. Later I'll have to separate things into a UEFI bootloader and a proper kernel image, each with its own allocator (the bootloader will use UEFI memory allocation services, and the kernel will have its own heap).
[1] https://github.com/khaledh/axiom
What are some alternatives?
Gwion - :musical_note: strongly-timed musical programming language
axiom-zig - A 64-bit kernel implemented in Zig
neverengine
rosettaboy - A gameboy emulator in several different languages
bu - B)asic|But-For U)tility Code/Programs (in Nim & Often Unix/POSIX/Linux Context)
nimkernel - A small kernel written in Nim
nimrodot - Nim Godot 4.x GDExtension wrapper (Proof of Concept)
math-compiler - A simple intel/AMD64 assembly-language compiler for mathematical operations
vos - Vinix is an effort to write a modern, fast, and useful operating system in the V programming language
linux - Linux kernel source tree
ripgrep - ripgrep recursively searches directories for a regex pattern while respecting your gitignore