rosettaboy
NimForUE
rosettaboy | NimForUE | |
---|---|---|
11 | 15 | |
465 | 434 | |
- | - | |
8.6 | 9.2 | |
26 days ago | 3 days ago | |
C++ | Nim | |
MIT License | MIT License |
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.
rosettaboy
-
When Zig Outshines Rust – Memory Efficient Enum Arrays
As somebody who has written the same gameboy emulator in C++, Rust, and Zig (as well as C, Go, Nim, PHP, and Python) - I have yet to find a place where language affected emulation correctness.
Gameboy audio is kind of a pain in the ass (at least compared to CPU, which is fairly easy, and GPU, which is easy to get "good enough” if you don’t care about things like palette colours being swapped mid-scanline) - and some languages take more or less code to do the same thing (eg languages which allow one block of memory to be interpreted in several different ways concurrently will make the “interpret audio RAM as a bunch of registers” code much shorter with less copying) - but in my case at least, each one of my implementations actually has the same audio distortions, presumably because I’m misreading some part of the hardware spec :P
https://github.com/shish/rosettaboy/
(Also yes, the zig version is currently failing because every time I look at it the build system has had breaking changes...)
-
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).
- Finished building a working Game Boy Color emulator using React and WebAssembly 🎮🕹️
-
Ask HN: What have you created that deserves a second chance on HN?
https://github.com/shish/rosettaboy
The same gameboy emulator rewritten in C++, Go, Nim, PHP, Cython, Python, Rust, and Zig (and WIP typescript); mostly to teach myself the languages and to compare and contrast their idioms.
Also, when taken with a very large grain of salt, usable as a language benchmark (As with all benchmarks, there are lots of caveats - but as far as I’m aware this is unique in being “the same code in multiple languages” and “several thousand lines of code”):
$ ./utils/bench.py
- Zig 0.10.0 Release Notes
- Python 3.11 is much faster than 3.8
-
Writing a Game Boy Emulator in OCaml
Looks very polished, but major disappointment that it's not showcasing OCaml as part of RosettaBoy (https://github.com/shish/rosettaboy)
-
Which programming language or compiler is faster
I’m working on it :) https://github.com/shish/rosettaboy
(Ok it’s 5-10k lines rather than a million, but it’s non-trivial enough that the differences between languages are noticable)
- RosettaBoy – the same Gameboy emulator in Rust, Python, and C++
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)
What are some alternatives?
procs - Unix process&system query&format lib&multi-command CLI in Nim
Gwion - :musical_note: strongly-timed musical programming language
shumai - Fast Differentiable Tensor Library in JavaScript and TypeScript with Bun + Flashlight
neverengine
Programming-Language-Benchmark
bu - B)asic|But-For U)tility Code/Programs (in Nim & Often Unix/POSIX/Linux Context)
axiom - A 64-bit kernel implemented in Nim
nimrodot - Nim Godot 4.x GDExtension wrapper (Proof of Concept)
awesome-python-typing - Collection of awesome Python types, stubs, plugins, and tools to work with them.
KaithemAutomation - Pure Python, GUI-focused home automation/consumer grade SCADA
vos - Vinix is an effort to write a modern, fast, and useful operating system in the V programming language