nowfound

Alternatives

Products that do what Brainfuck to RISC-V JIT compiler written in Zig does

Hi everybody, this was my project to learn Zig and RISC-V+x86_64 assembly. Not sure if anybody is actually interested in yet another Brainfuck compiler, so I'll just write up some random things I learned while building it! - A primitive assembly stitching compiler is 10x faster than the interpreter. Did not expect that. - The generated x86 code is really bad (e.g. it always uses 6 or 7 byte sized instructions with 32-bit immediates when there are much smaller ones) but it doesn't really matter. Good code generated by GCC and clang for transpiled Brainfuck->C is not much faster as it's…

  1. 1IW

    Sep 2025 · github.com

  2. 2

    I built a specialized package of DeepSeek V4 Flash 0731 (originally 284B total parameters, 13B active), preserving reasoning, tool calling and coding capabilities: https://huggingface.co/steadfastgaze/DeepSeek-V4-Flash-0731-... I let it write a minimal C compiler targeting ARM64, then test the result with Fibonacci and FizzBuzz programs, and it succeeded in less than 1 hour, with the full recording at: https://youtu.be/XiwSilmV8B0 You can run it on Silicon Macs with my engine https://github.com/steadfastgaze/MoEspresso, while one of the…

    21d ago · huggingface.co

  3. 3MA

    RISC-V's compressed instruction (RVC) extension is intended as an add-on to the regular, 32-bit instruction set, not a replacement or competitor. Its designers intended RVC instructions to be expanded into regular 32-bit RV32I equivalents via a pre-decoder. What happens if we explicitly architect a RISC-V CPU to execute RVC instructions, and "mop up" any RV32I instructions that aren't convenient via a microcode layer? What architectural optimizations are unlocked as a result? "Minimax" is an experimental RISC-V implementation intended to establish if an RVC-optimized CPU is, in practice, any…

    2022 · github.com

  4. 4GI

    Hi all! I'm going into my freshman year, and figured that the best way to prepare for the intro to programming Racket course would be to implement my own garbage-collected, dynamically typed, functional programming language in C ;) Anyways... here's the repo: https://github.com/liam-ilan/crumb I started learning C over the summer, so I still have a whole lot to learn... Any feedback would be greatly appreciated! :D

    2023

  5. 5BA
  6. 6LA

    What if Brainfuck was less like C and more like Scheme? The interpreter implemetation is pretty bad. It's not very fast, it's not very good, and it's probably not very correct. But maybe there's some vaguely interesting programs you could write with it! For example, the Y combinator: λf. (λx. f (x x)) (λx. f (x x)) is written as: \` \`1 `0 0 \`1 `0 0

    2025 · imjakingit.github.io

  7. 7ZT

    I believe the best way to learn a language is by doing an in-depth project. This is my first Zig project intended for learning the ropes on publishing a Zig package. It turns out to be quite solid and performant. It might be a bit over-engineered. This little library is packed with the following features: - Building dependency graph from dependency data. - Performing topological sort on the dependency graph. - Generating dependence-free subsets for parallel processing. - Cycle detection and cycle reporting.

    2025 · github.com

  8. 8CT

    Hey y’all! About 7 years ago, I had this idea to write a JIT with an autogenerated backend for x86 based on the ISA specs. I sketched something out and then just kinda let it sit. I picked it up again a few weeks ago and made a complete-ish backend for both x86 and ARM64. It has no dependencies, the backends are completely autogenerated (by horrible, horrible JS scripts), and I built a small abstraciton layer for things like functions prologues etc. It’s super duper early and will probably break on your machine, but it’s good enough to compile some cool examples (look at the examples…

    Nov 2025 · github.com

  9. 9RV

    Finally finished my little CPU project, RISCY-V02. I built it (with Claude) to challenge the notion that the 6502 was a "local optimum" in its transistor budget. Given the constraints of 1970s home computers (~1 MHz DRAM, so raw clock speed doesn't help), could RISC have been a better design choice? This design argues yes: pipelining, barrel shifters, and more registers beat microcode PLAs, questionable addressing modes, and hardware BCD. Highlights: 8x 16-bit general-purpose registers (vs 3x 8-bit on 6502) 2-stage pipeline (Fetch/Execute) with speculative fetch 61 fixed 16-bit…

    Mar 2026 · github.com

  10. 10NR

    Just released EGG, an emulator created for teaching Assembly and microprocessors (designed to suit the needs of the Microprocessors classes, at Universidade Federal do Paraná, Brazil). The emulator will support multiple architetures in the future, but currently only RISC-V is implemented.

    2024 · github.com

  11. 11IB

    Demo: https://www.youtube.com/watch?v=f5uygzEmdLw Hi HN, I built a RISC-V emulator that implements the RV32IM instruction set and a minimal syscall interface to run DOOM. A few weeks ago, I got my first output with a simple hello world assembly program. Since then I have been working tirelessly to get DOOM to run. I needed to figure out how to run C programs first, and came across newlib, which allows the underlying environment to implement the syscall stubs one by one until the programs run. I have also added ELF loading, but currently only a single `PT_LOAD` segment is…

    May 2026 · github.com

  12. 12IM

    This is a personal project I've been working on and off for the past few years. It's a set of tools that have allowed me to prototype quickly small (and increasingly bigger) kernels, and create userspace programs to interact with them. Supports riscv64, amd64 and i386. The intel port has been tested and used on real hardware, from big dual-socket Xeon machines to an old X220. It is all C, I have plan to make rust bindings for the kernel library. But again, they're plans at this stage. Porting to new architectures is relatively simple, a basic port to riscv took me a couple of weeks of…

    2024 · github.com

  13. 13ZD

    Hi everyone, I've made an open-source library for using design by contract (DbC) principles in the Zig programming language. It's called Zig-DbC, and it currently provides the following features: - A simple API to define preconditions, postconditions, and invariants. - Contracts are active in `Debug`, `ReleaseSafe`, and `ReleaseSmall` modes to catch bugs early. - All checks are removed at compile time in `ReleaseFast` mode for zero performance cost. - An optional mode to handle partial state changes in functions that return errors. - Transparent error handling that propagates errors from…

    2025

  14. 14ZP

    I wanted something lighter than zig autodoc so I've implemented (and golfed a bit) a custom parser using parser combinators in JS. It's not 100% correct and it's also not meant to be, all I care about is if it can parse my own Zig code, not any valid Zig code. There are also some bugs, and I don't intend to support, nor develop this much further, consider it vaporware which you are free to fork and use it for something, or just have some fun reading the code and figuring out how it works (I certainly had a lot of fun implementing it - no LLMs, so it was a nice exercise too). BTW: I know it's…

    Jan 2026 · github.com

  15. 15IB

    You know that old TI calculator you used in high school, then put in a box and forgot about? Have you ever wished you had an operating system for your calculator with preemptive multitasking, dynamic memory management, a tree filesystem conforming to the FHS, and all the comforts of Unix? Well, good news: that's totally a thing that exists. I've been working on my kernel for about three and a half years now and I'm looking for new contributors to help out. It's written entirely in z80 assembly, and it's both challenging and fun to work on. There's an IRC channel for contributors or people…

    2014

  16. 16

    I recently encountered a situation where JetBrains IDEs weren't working for a project, and I wasn't even sure I wanted to keep paying the yearly fee. I decided to de-IDE myself and as part of it I decided to look at my options. The more I saw of Emacs the more interested I got. However using the Doom emacs distribution kind of threw me in the deep end without actually understanding how Emacs operates. I was lost and bounced off quick. I decided to take the approach of starting with vanilla Emacs and trying to get it to work for me as an IDE one step at a time. This post was me documenting…

    13d ago · github.com

  17. 17AS

    Took a stab at building my own string diffing JS package. I built an interactive demo for TypeIt’s website (https://typeitjs.com/build-your-own) a while back. The approach I took to handle user input necessitated a way to calculate the difference between the versions of a user’s text input. I searched around for a package to help me out and found a couple of good ones (like fast-diff), but I either didn’t really like their API or didn’t want to take on a huge new dependency. Instead, I thought I’d give it a shot myself (famous last words). I dove into it having no real formal…

    2022

  18. 18IB

    Doing dynamic dispatching in a strict static typing language is hard. Something as simple as, map.put("add", add); map.put("hello", hello); fn add(a: i32, b: i32) i32 { return a + b; } fn hello() []const u8 { return "Hello World"; } is impossible because the value type of key/value of the map needs to be the same but all the function types are different. Calling functions with different number of parameters, different parameter types, and different return type dynamically is difficult. Other languages either use dynamic typing, runtime reflection, macro, or passing in one big generic…

    2025 · github.com

  19. 19LS

    Earlier this year, I took a month to reexamine my coding habits and rethink some past design choices. I hope to rewrite and improve my FOSS libraries this year, and I needed answers to a few questions first. Perhaps some of these questions will resonate with others in the community, too. - Are coroutines viable for high-performance work? - Should I use SIMD intrinsics for clarity or drop to assembly for easier library distribution? - Has hardware caught up with vectorized scatter/gather in AVX-512 & SVE? - How do secure enclaves & pointer tagging differ on Intel, Arm, & AMD? - What's…

    2025 · github.com

  20. 20RV
  21. 21SV

    Hi HN! I've spent the last few weeks optimizing the string operations in StringZilla. You'd be surprised how much performance GLibc and the Standard Templates Library of C++ are leaving on the table, especially on Arm and, likely, on RISC-V. I've significantly increased the number of implemented algorithms for different workloads. Searching across English texts on Arm, for example: - is 4.4x faster than STL, - and 16.8x faster in reverse order. The new version of the library now includes a C++ binding largely compatible with the C++ Standard, featuring all 17 overloads of the `replace`…

    2024 · github.com

  22. 22SH

    This is my hobby C compiler project. Decided to publish the code today, as it finally compiled itself. The readme on the linked GitHub page has a bit of information on how it works. I wrote the thing for fun, but if anyone gets a better understanding of the dark corners of C because of it, I am happy.

    2022 · github.com

  23. 23IC

    I spent the past week implementing a 1 Layer Neural Net and training it on MNIST within the visual scripting language provided by scratch.mit.edu. It was tedious, but ultimately not too difficult. The code runs incredibly slowly, so much so that 64 samples of MNIST takes 5+ hours to train on my machine. There were a lot of little mini challenges that were fun to overcome (implementing softmax was very tricky). If you're interested, I encourage you to try and improve on it! More details in the linked blog post.

    2024 · bell-boy.github.io

  24. 24IB

    VSCode extension with games (Snake, Plinko, slots), HN/LessWrong reader, and Pomodoro timer for AI coding wait times. Fake currency only. Marketplace: https://marketplace.visualstudio.com/items?itemName=TouchGra... Built in a week with Claude Code after seeing Chad IDE get ratio'd for integrating real gambling. Happy to answer questions or get roasted on the code.

    Dec 2025 · github.com

Ranked by how close each launch is in meaning, then by votes. Refine with a description →