[a / b / c / d / e / f / g / gif / h / hr / k / m / o / p / r / s / t / u / v / vg / vm / vmg / vr / vrpg / vst / w / wg] [i / ic] [r9k / s4s / vip] [cm / hm / lgbt / y] [3 / aco / adv / an / bant / biz / cgl / ck / co / diy / fa / fit / gd / hc / his / int / jp / lit / mlp / mu / n / news / out / po / pol / pw / qst / sci / soc / sp / tg / toy / trv / tv / vp / vt / wsg / wsr / x / xs] [Settings] [Search] [Mobile] [Home]
Board
Settings Mobile Home
/g/ - Technology


Thread archived.
You cannot reply anymore.


[Advertise on 4chan]


File: images(6).png (5 KB, 576x201)
5 KB
5 KB PNG
>language has exactly one program of any note
>>
>>108275431
the program is also a terminal, like anyone needed another terminal program.
>>
>>108275436
Isn't it also made for Macs? And the creator is Indian?
Also it had some memory leak he denied for a long time lol
>>
Meanwhile rust has a bunch of stuff including incredibly useful things including cli tools like ripgrep..
>>
>>108275431
>ghostty
>tigrebeetle
>bun
>phoeniX
any others?
>>
>>108275431
is there seriously nothing other than Bun that's made with Zig?
>>
>>108275447
No its cross platform and its made by a japanese guy that lives in USA. He is the co-founder of HashiCorp, that made software such as vagrant
>>
>>108275431
>exactly one program
Mepo?
>>
>>108275904
>He is the co-founder of HashiCorp
I would have never guessed. Zig is actually kind of nice and everything Hashicorp has made is unusable shit that makes me want to kms myself.
>>
how does this affect you?
>>
>>108275475
>river
>>
>>108275431
Zig compiler?
>>
>>108275492
bun doesn't even use zig's native networking libraries - instead just wraps around some c ffi. it's js engine is written in c++. the meme language is only used for marketing.
>>
>>108275463
>meanwhile rust has [rewrites of existing software]
>>
>>108276520
Just like ghostty
>>
>>108275436
I was just thinking about writing one today, actually.
>>
>>108275926
>makes me want to kms myself.
reading these kinds of comments also makes me want to kill myself myself
>>
File: IMG_0191.jpg (682 KB, 1668x1505)
682 KB
682 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 (17 KB, 693x601)
17 KB
17 KB PNG
>language has exactly one user of any note
>>
>>108277903
very cool anon I hope it's going well
>>
>>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 (113 KB, 1200x800)
113 KB
113 KB JPG
>>108275431
>>
>>108277933
Sure is. I've got the NES and GB(C) cores down pretty much perfect. GBA and SNES still in development, I've been working on the networking
>>
>>108275431
What's that? its own compiler?
>>
>>108276520
Ripgrep is superior though so it's not a rewrite :^)
>>
>>108277914
A shit ton of legacy perl code continues to
>>
>>108278603
Continues to power all kinds of shit you don't even think about*
>>
>>108277903
are you going to release it? where could one follow this project?
>>
>>108277914
ICaml
UCaml
WEALLCaml for
OCaml
>>
File: Oracle.jpg (319 KB, 1280x1152)
319 KB
319 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.
>>
>>108278829
>>
>>108278603
Different camel language
>>
>>108275926
Give Windows license
>>
File: LoZ.jpg (873 KB, 2048x1920)
873 KB
873 KB JPG
>>108278871
>>
>>108278871
so its called arness
cool, are you going to open source it?
>>
>>108278871
what rust crates are you utilizing?
>>
>>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
>>
Why would I use zig instead of rust or go
>>
>>108279068
>I plan on [getting sued by multiple corporations at the same time]
Good idea
>>
>>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.
>>
>>108275431
there was also that rewrite of ncdu, i don't know what are the requirements for "any note" but i used it at least twice
>>
>>108276239
>bun doesn't even use zig's native networking libraries - instead just wraps around some c ffi. it's js engine is written in c++
okay and?
>>
>>108278715
uwucaml
>>
>>108275904
>>108275926
Mitchell Hashimoto didn't make Zig, Andrew Kelley did.
>>
>>108275431
fuck this hype language
start using freepascal/delphi
>>
>>108279475
nevermind I read the replies wrong ignore me
>>
>>108279494
based
>>
>>108278871
/g/ anons with the cutting edge software.
>>
File: 426485.png (28 KB, 1200x1200)
28 KB
28 KB PNG
...
>>
the language isn't even stable yet, it's incredible that it has any project of note written in it right now.

also kek'd at the guy confusing it with vlang
>>
the language is pretty based but the guy that created it has laughable childlike politics and doesn't like ai

in some ways i think rust and the trannies is less retarded
>>
>>108275436
>check repo for ghostty
>boasts about being portable
>only builds for 2 platforms
oh
>>
>>108275431
just use C
>>
>>108276520
rg and fd absolutely mog grep and find. Sorry but the rust trannies cooked with those two programs alone. I use them dozens of times daily.
>>
>>108282378
rg has shit defaults
fd I agree with
>>
>>108277903
Any code? I’d like to study your multi-language layering. Sounds very based and educational.
>>
>>108278871
>arness
I knew /g/entoomen weren't the best with names but jesus christ
>>
>>108282378
what about them exactly "mogs" grep or find?
>>
>>108282378
why two letter commands? why? we are not using awful keyboards that are a pain in the ass to use
>>
>>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
>>
>>108282387
I'm glad to share a little, here's a diagram of my emulator architecture.
>>
>>108284108
Interesting
>>
>>108275431
are you referring to bun?
>>
File: 1748641936346133.jpg (33 KB, 625x453)
33 KB
33 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)
>>
>>108283607
>no proof
>y-you can use parallel
>MAKE SURE TO AGREE TO CITE US CHUD
shut the fuck up retard.
>>
>>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.
>>
>>108275431
Bun?
>>
>>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)
>>
>>108275431
The funniest thing about zig is that the largest zig project in terms of LoC is its own stdlib.
This really shows how much of an overshilled meme it is.
>>
>>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
>>
>>108284599
That just shows how new the language is.
>>
>>108284691
It literally has 10 years now. Look where Rust was 10 years after first version, or Go, or C++ or C or literally any language that isn't a meme.
>>
>>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
>>
>>108284721
Guess it’ll be up to me to show everyone what Zig is capable of in capable hands.
>>
>>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
It’s basically C but better.
>>
>>108285240
The only good thing about C is supporting tons of niche architectures and being a good baby first language to teach students. Zig lacks both.
>>
>>108275431
What's the one program?
>>
>>108284346
>$10/month
No one is going to pay that for a few GBA era online plays.
You could get a one-off payment of $5, maybe.
>>
>>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.
>>
>>108285286
>Bun is around 550k LOC of Zig code, while the stdlib is around 350k LOC.
$ wc -l zig/lib/**/*.zig
709251 total
$ wc -l bun/src/**/*.zig
676625 total
>>
>>108285264
How so?
>>
>>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.
>>
>>108277903
How far along are you into your transition?
>>
>>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.
>>
>>108285429
Been about four years since I transitioned from male to alpha male.
>>
>>108285379
use something like cloc or tokei instead of wc
>>
>>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
-------------------------------------------------------------------------------
>>
>>108285574
meme language confirmed
>>
>>108285379
standard library is in lib/std, this includes compiler and tool libs
$ wc -l lib/std/**/*.zig
214275 total
[/code/
>>
>>108285639
If we include compiler and other tools we get 1193757 LoC
>>
>>108284291
Who are you quoting?
>>
>>108284291
Use grep vs rg on a 300mb json file (compile_commands.json) yourself and see. I had to do this at my job.
>>
>>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



[Advertise on 4chan]

Delete Post: [File Only] Style:
[Disable Mobile View / Use Desktop Site]

[Enable Mobile View / Use Mobile Site]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.