Thread #108275431
File: images(6).png (5.4 KB)
5.4 KB PNG
>language has exactly one program of any note
104 RepliesView Thread
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
File: IMG_0191.jpg (681.9 KB)
681.9 KB JPG
I currently building a multi-core emulator. The cores and some other low level stuff are in Zig and Rust handles UI, networking, etc. I love Zig, it's so cool when you're coding something really low level and it since it takes that low level burden off of Rust, Rust can take the higher level burden off of Zig and provides a huge ecosystem to lean on.
>>
File: ocaml-logo.png (16.5 KB)
16.5 KB PNG
>language has exactly one user of any note
>>
>>
>>108275431
>dev is a schizoid moron who can't design language for shit and ignore every single feedback from everyone
>looks 20 years more than his real age
>is basically the lone maintainer
I don't see a single reason to use this garbage, it could die any time and it's outdated garbage anyways
>>
File: abuse.jpg (112.9 KB)
112.9 KB JPG
>>108275431
>>
>>
>>
>>
>>
>>
>>
>>
File: Oracle.jpg (319.3 KB)
319.3 KB JPG
>>108278615
I plan on releasing it this month. I don't have the web site set up yet but I'll post about it when it's ready.
>>
File: Screenshot 2026-03-02 at 2.21.08 PM.png (935.5 KB)
935.5 KB PNG
>>108278829
>>
>>
>>
File: LoZ.jpg (872.6 KB)
872.6 KB JPG
>>108278871
>>
>>
>>
File: Screenshot 2026-03-02 at 2.46.52 PM.png (530.3 KB)
530.3 KB PNG
>>108278993
Probably not. I plan on monetizing the online features with a subscription because a player in California playing Pokemon Red can Pokemon battle and trade against a player playing Pokemon Blue in New York. When I get the GBA core working fully, there will be access to so many multiplayer games. Imagine playing Advance Wars against someone else with the link cable multiplayer.
>>108279023
I'm using quite a few
>>
>>
>>
>>108279068
How do you plan to market?
>>108278883
Oops, I didn't realise there was mascot collision
>>
>>108279068
>Probably not. I plan on monetizing the online features with a subscription because a player in California playing Pokemon Red can Pokemon battle and trade against a player playing Pokemon Blue in New York.
i can download pokemmo and do that right now without paying your goytax
>>
>>108279108
I literally do not care, I'm not selling any ROMs or Nintendo code. The emulator itself is also free, players can pay a subscription fee that supports the multiplayer server. Nintendo isn't going to do shit, the newest system my emulator supports is GBA.
>>108279115
Online and on-foot grassroots. I live in NYC and have some access to tech circles.
>>108279124
Really? Which emulator has perfect netplay for link cable multiplayer? I'm genuinely asking because when I lasted checked, they were all fragile and prone to desyncs and disconnects. My approach is solid.
>>
>>
>>
>>
>>108275904
>>108275926
Mitchell Hashimoto didn't make Zig, Andrew Kelley did.
>>
>>
>>
>>
>>
File: 426485.png (28.3 KB)
28.3 KB PNG
...
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>108282378
rg is slower than grep. Their benchmarks are fake and gay, I've tried them myself at work. Grep is 10 times faster. The only thing rg does that grep doesn't is multithreaded search for multiple files at the same time, but you can do that with xargs/gnu parallel + grep as well
>>
File: Screenshot 2026-03-03 at 12.31.21 AM.png (121.2 KB)
121.2 KB PNG
>>108282387
I'm glad to share a little, here's a diagram of my emulator architecture.
>>
>>
>>
File: 1748641936346133.jpg (33.3 KB)
33.3 KB JPG
>>108279068
>playing advance wars 2 without hot seating a single instance
thats neat, how does it handle latency? might be interested in trying it out with some euros while being in america so if it can handle it well that'd be cool
how much will it be? and does it have linux support (i use arch btw)
>>
>>
>>108284258
It uses rollback netplay and the packets are timestamped reducing roundtrips. It uses desync recovery to avoid disconnects and continuous auto-adjustment with deliberate dampening. A big reason why my approach works so well is that the emulator is entirely deterministic. Given the same inputs, you always get the same output, frame for frame.
And of course it'll have Linux support, Linux is actually a first class citizen because I use Arch btw as well!. It actually directly integrates with Pipewire instead of routing though other layers first reducing latency.
>>
>>
>>108284258
Oh and for the price, I was thinking first month of online free, $10/month afterwards. The network will also have leaderboards, achievements and cloud saves. Also, for NES and SNES games, it'll have temporary in-memoryROM sharing one person needs the ROM for co-op play which reduces ROM hash compatibility friction.
>>
>>108284323
>>108284346
>>108284323
ooh that all sounds excellent, definitely keeping an eye out for it then
admittedly, the pricing does seem pretty steep to me, I was expecting something like five dollars max, I wouldn't mind paying it myself but convincing others to pay up just for co-op is a hard ask
>>
>>108284399
The NYC government will want to steal close to half of what I bring in so I'm pricing it pretty much as low as I can. There will probably be a referral system that earns a month per referral. If people think $10/ month is too steep to get the best experience playing retro games online then I'll have to re-evaluate.
It'll be better than what Nintendo is offering, they couldn't even be bothered to give FireRed and LeafGreen online with their recent $20 per ROM re-release. I'm just one guy and I have it figured out.
>>
>>108284518
oof yeah I get it then thats pretty rough, my concerns mostly lie with how most conversations regarding asking people to try it out with me will likely go like this
"Hey wanna play (retro game)? there's this neat new emu that offers excellent online co-op"
>"Sure sounds cool!"
"Oh and you'll have to pay 10$ jusy to play with me this session"
>"WTF"
granted, the free month will help a lot with the shock and will cover any quick sessions, but it would be lame to say, suddenly have an itch to try it again in the future and seeing I'd have to pay up/convince the other person to pay (or probably make another account, lol)
>>
>>
>>108284563
I’m hoping the experience justifies the cost, I put a lot of work into making it stand out from the competition. One feature I haven’t even mentioned yet is the besides built-in video filters (that are toggleable), my emulator also does real-time digital signal processing so audio sounds remastered and remixed. I’d post an audio webm but alas…
https://drive.google.com/file/d/1jAcOR3ui7jyHZ9xsw_YtVi7f8uDwsTSf/view ?usp=drivesdk
>>
>>108279098
>rust
bloated with a gorillion language features focused around heavy abstraction encouraging over encapsulated black-box style API design and boilerplate galore
horrendous compile times
culture of extreme code-reuse to the point that it's harmful to software quality
>go
garbage collected
garbage designed
>zig
simple and cohesive
strictly imperative, "one way to do things"
no implicit behaviour whatsoever
creator tells people to fuck off when they propose bloat features like interfaces or syntax sugar
>>108282271
>the guy that created it has laughable childlike politics
who cares, he leaves it out of language discussions
>doesn't like ai
good, ai is antithetical to high quality software
>>
>>
>>
>>108284673
>simple and cohesive
>strictly imperative, "one way to do things"
>no implicit behaviour whatsoever
>creator tells people to fuck off when they propose bloat features like interfaces or syntax sugar
What was your last zig project?
>>
>>108284734
A terminal UI library with optional double buffering, kitty keyboard protocol support, mode 2027 support and proper handling of grapheme clustering and multi-width characters across all (relevant) terminal emulators, terminfo handling with a parser and options for providing fallback definitions and using pre-defined sequences, 24-bit color support
i've been using it in another project and it works nicely, it even seamlessly supports the "dumb" terminfo definition which represents a terminal that cannot do anything including setting colours, moving the cursor, or clearing the screen. for comparison, nvim, ncdu, ncmpcpp, and helix all completely break on a dumb terminal but my program using my library works flawlessly without requiring any special case handling from the user of the library
it's pretty low level and doesn't currently have any kind of "widget" functionality, but that may be added in the future
>>
>>
>>108284820
Cool. So it's like ncurses?
What is 2027 mode? And do terminals really do/need grapheme clustering? I didn't knew about it.
Also what does double buffering means in context of UI library? The rendering is done by the terminal emulator, right?
>>
I still don't understand this meme language.
Andrew should have abandoned this shit and focused on zig cc. Literally one of his first major sponsers admittedly only use it as a C++ toolchain distro. He could probably make a lot of money just conveniently packaging cross compiler clang and selling support for it, maybe even gating windows versions behind a paywall.
>>
>>108284911
>it's like ncurses
Pretty much, but it aims to be less opaque and much less shitty. Curses has a ton of arbitrary limitations and an awful outdated API. It also gives the user very little control over how it works, so double buffering and terminfo are forced with zero control over how they work given to the user of the library. Also the unicode handling is awful.
>What is 2027 mode? And do terminals really do/need grapheme clustering?
Mode 2027 is a capability that terminal emulators can implement as a way to signal their support (or lack of support) for proper grapheme clustering. Plenty of terminals don't do proper grapheme clustering and instead assume all characters consist of a single codepoint. The result is that graphemes consisting of more than one codepoint are not rendered correctly on terminals that don't do proper grapheme clustering. For example, xterm and st display the farmer emoji as a man emoji and a rice shuck emoji, moving the cursor forward 4 cells. Foot and Kitty display it correctly and move the cursor forward 2 cells. So the library needs to know how the underlying terminal does grapheme clustering in order to keep track of where the cursor is on the screen. If a terminal doesn't support mode 2027, we manually implement the broken grapheme clustering to ensure cursor movement is consistent across terminals.
>continued...
>>
>continued...
>Also what does double buffering means in context of UI library? The rendering is done by the terminal emulator, right?
Terminals are inherently a retained mode UI, so UI code has to be written not just to draw the UI but to transition the old UI state into the new UI state. This is tedious and extremely bug prone, so I instead wanted an immediate mode UI for my library. In an immediate mode UI, your UI code essentially acts as if you're redrawing the entire screen from scratch every time. This massively simplifies UI code. The easiest way to make a terminal UI immediate mode would be to just clear the screen and redraw it from scratch on every update. This works perfectly on modern terminal emulators, but some terminal emulators (like the Linux TTY) don't do double buffering, which makes this approach cause extreme flickering. To avoid that we instead move the buffering into the UI library. We keep a buffer representing the current screen state, and any UI code writes to a second buffer. When you want to update the screen, the library diffs the write buffer with the screen buffer and writes only the minimum necessary number of bytes required to update the screen. By moving buffering into the UI library and delegating as little as possible to the terminal emulator, we can much better control the performance of rendering. This also means that the UI library essentially implements half of a terminal emulator.
Here's an excellent blog post by Mitchell Hashimoto, the creator of Ghostty, on grapheme clustering in terminal emulators:
https://mitchellh.com/writing/grapheme-clusters-in-terminals
And here's a genuinely fantastic video about a UI layout library that goes over the difference between retained mode and immediate mode UIs:
https://youtu.be/DYWTw19_8r4
>>
>>
>>
>>
>>
>>108285112
>He could probably make a lot of money just conveniently packaging cross compiler clang and selling support for it
He lives in the western US, if he wanted to make money he would go and work for a big tech company. Instead he wants to work on something he's passionate about.
>>108284599
Bun is around 550k LOC of Zig code, while the stdlib is around 350k LOC.
>>
>>108285285
Well, it's for perfect online couch co-op with the NES and SNES cores and perfect link-cable multiplayer with the GB and GBA cores. That actually gives players access to wide swaths of retro games that can be played the way they were meant to be played. If truly no one sees any value in what I offer then I'll just have to deal with it but I'm not going to waste my own money on server upkeep because people rather make corporations richer in order to consume slop than have high quality video game experiences.
An entrepreneur has to take risks.
>>
>>
>>
>>108285336
Your marketing has to target a group of people who necessarily are pirates before they are even eligible to use your software.
Those people are not going to be free with their money. They like having software for free, and they like having it for keeps on their own terms.
A monthly fee goes against that.
It being "perfect" is likely to be untrue, you'll come up against unknown bugs once users get their hands on things, and even if it were perfect your audience will take "mostly good and free forever" over "perfect on a subscription" any day of the week. For reference, Netflix is on the same order of magnitude as what you plan to charge, and that's a whole category of media and experiences, whereas your product is just one element of a subset of a category of experiences.
I hope I'm wrong and you make lots of money, but I just don't see it happening.
>>
>>
>>108285416
They can play the emulator for free, the price is for premium online play. If no one in the whole world cares for that, then whatever. I’ve got actual games in the works for after the emulator is released so if that doesn’t convince people to pay, at least the infrastructure is still there for me to utilize if one product doesn’t take off.
>>
>>
>>
>>108285535$ cloc zig/lib/**/*.zig
960 text files.
960 unique files.
0 files ignored.
github.com/AlDanial/cloc v 2.08 T=1.16 s (825.6 files/s, 609966.2 lines/s)
---------------------------------------------------------------------- ---------
Language files blank comment code
---------------------------------------------------------------------- ---------
Zig 960 53695 51868 603688
---------------------------------------------------------------------- ---------
SUM: 960 53695 51868 603688
---------------------------------------------------------------------- ---------
$ cloc bun/src/**/*.zig
1166 text files.
1165 unique files.
4 files ignored.
github.com/AlDanial/cloc v 2.08 T=1.11 s (1053.4 files/s, 611780.4 lines/s)
---------------------------------------------------------------------- ---------
Language files blank comment code
---------------------------------------------------------------------- ---------
Zig 1165 76835 50932 548851
---------------------------------------------------------------------- ---------
SUM: 1165 76835 50932 548851
---------------------------------------------------------------------- ---------
>>
>>
>>
>>
>>
>>
>>108285658
that also includes a C compiler written in zig. Note that just the x86 codegen part of zig is 190k lines of code: https://codeberg.org/ziglang/zig/raw/branch/master/src/codegen/x86_64/ CodeGen.zig x86 is bloat