>write Node.js replacement in Zig
>biggest Zig codebase in existence
>dozen of zero-days on day of the release
Zigsisters not like this...
It's All Fucked Shirt $22.14 |
Shopping Cart Returner Shirt $21.68 |
It's All Fucked Shirt $22.14 |
>write Node.js replacement in Zig
>biggest Zig codebase in existence
>dozen of zero-days on day of the release
Zigsisters not like this...
It's All Fucked Shirt $22.14 |
Shopping Cart Returner Shirt $21.68 |
It's All Fucked Shirt $22.14 |
Zig literally means shit in arabic
anon... it's a white man's language
arab's are white
its not
zig = زيج
shit = زج = zeg
زج is pronounced zig
it's pronounced zaj, shit would be written like "زڨ"
No, many arabic dialects pronounce ج as a "g"
what he wrote is JA, what you wrote is Qha
Zigger
wallahi sand Black person bros!
more specifically, it means shit as a verb.
you have no chance to survive make your time
What do you think "v0.1.0" means?
Why do you think Rust exists?
It's 2022, writing in memory unsafe languages are basically asking for it, enjoy getting pwned
https://github.com/rust-lang/rust/labels/I-unsound
still better than regular segfaults
regular segfaults in zig give you a full stack trace to the exact point it happened, given you managed to dodge every other safety check that is enabled by default, unlike in unsafe rust where you either have safe or C mode. maybe you should educate yourself before posting
>regular segfaults in zig give you a full stack trace to the exact point it happened
and also full access to your machine to attacker, great language you got there kiddo
Rust unsoundness problems are much harder to hit
>array out of bounds are caught in safe builds
are you moronic, those are not only memory unsafe problems
Zig protects against remote attacks that exploit out of bounds access and other memory unsafe problems. "Unsafe" zig is actually safer than rust. But bun is also partically written in C++ so the security issues could come from the C++ code.
sorry chud but that is not true, Bun segfaults literally on malformed config file and that thing is implemented in Zig no C++
it's embarrassing
just tell them your from ebaums world
unexploited segfaults just give a stacktrace. exploited segfaults give control of your computer to a hacker.
The unsound issues in Rust's issues list are generally not exploitable issues or affecting huge swaths of Rust applications.
Every newbie in a memory unsafe language using it for something real writes an exploitable vulnerability many times by accident. That doesn't happen in Rust or any other memory safe language.
>play a game made in zig
>get to final boss
>last hit to finish him off
>game segfaults
>get stack trace as a consolation prize
mfw
rust also works the same way when you get unexpected input
joke's on you rust just won't compile sop there won't be a rust game
What? Are you just fricking moronic or anything?
Unironically it's incredible to believe all those games from two decades ago were coded in assembly or something close to it and even though many games have bugs, complete crashes were way more rare than they are now.
Rollercoaster Tycoon is an amazing example of this, the creator didn't like C so only 5% or so is written in it, the rest is assembly.
Hardware used to be simpler so people were taught to actually use id, instead of being an overengineered mess that needs thousands of layers of abstractions on top.
Because now everybody thinks he's a "coder".
>only 68 open
other languages coping, seething, and malding
that number is so fricking low amazing
zig isn't memory unsafe. array out of bounds are caught in safe builds, just like in rust.
Anything that is safe to do in Rust is still safe if you use it inside an unsafe block. It doesn't turn any checks off, it just additionally lets you dereference arbitrary pointers (vs. borrow-checked references), access mutable static variables and call foreign functions. Unsafe Rust is still safer than any unsafe language, because you keep all of the ordinary safety features (like everything that Zig can do and more).
Zig is not memory safe because it has non-null pointers and bounds checking. That's what some call "spatial memory safety", and it's only part of memory safety, although it is a solid low-hanging fruit to pick, so I'm not going to fault Zig for stopping there. Rust adds "temporal memory safety" with its ownership and borrowing rules.
spread those buns
lmaooo
the only reason to pick memory unsafe languages for brand new projects is to give hackers something to hack
Name of said project?
bun
just from the name someone can say it's gonna be a circus
http://bun.sh/
Thanks. It looks great and seems to perform well.
I'll keep an eye on it.
Is Bun transphobic?
>needs WSL on Windows
dropped.
I'm so happy that zig people actually managed to produce something useful while rust c**ts still have frick all to show for themselves
>but look at those trivial command line utilities we rewrote in rooooooost!
lol
Hello?
https://deno.land/
>slower than node
But safer.
>muh performance
get a better computer.
>deno
deno gang rise up
It uses V8. This is not a js engine in the first place. It uses a js engine written in C++ to work. What safety are you talking about?
Rusties love to cope with having the most critical parts of their software written in C++, look at the compiler, the majority of it is LLVM, and the standard library is in part C because they couldn't be bothered to drop the libc dependency for absolute basics!
Bun uses JSC engine written in C++ as well stop being moronic
Who's claiming it doesn't? Deno shills were the ones pretending their software was any better.
>standard library is in part C because they couldn't be bothered to drop the libc dependency
did you ever code anything more relevant than hello world? even go dropped complete static linking on half of the platforms because the abi is unstable and shit might change so it's way more secure and faster to use libc
So fricking what?
Bun isn't written from scratch also.
It uses Firefox's JS engine.
Nope. It's based on the Webkit JS engine.
same thing
Spidermonkey isn't JavaScriptCore
So fricking what? That doesn't change the fact that the claim that deno is "safer" is bullshit.
nobody uses deno. DOA.
>full of errors and segfaults
>useful
Based. Rust trannies seething. Meanwhile all NPM packages are going to work for Bun AND Bun is going to be faster than Rust.
Rust literally BTFO before it even got through the door.
Is Andrew still a virgin?
>worked for a dating site
>never had sex
quite the opposite
>adrew is getting married to someone and it's not me
>getting married
ah, so a reverse virgin.
who would have guessed that the next-gen pimp hands would be so weak.
andrew is so wholesome
>bun is experimental software.
lel that's what happens when you don't have memory safety like Rust.
of zero-days on day of the release
That's what a beta release is for.
So can someone explain to me what exactly deno and bun do? Can't I just use V8 to run JS directly? Why do I need another runtime on top of it?
>So can someone explain to me what exactly deno and bun do?
they are node.js alternatives
>Can't I just use V8 to run JS directly?
no, V8 is just JS engine, so no input/output, network, filesystem, etc capabilities, and it's not standalone executable that can run
>Why do I need another runtime on top of it?
so you can actually run useful programs
I see, thanks.
also deno has typescript built in, which is a massive time saver since you should be using it anyway whenever possible.
Rustroons are getting nervous
When Dahl rewrote Node in Rust and called it Deno, it wasn't faster than NodeJS.
The performance improvements were minimal but it was supposed to be a "better" implementation.
I was pissed me when Zig was constantly getting shilled a few months ago, but now I acknowledge its superiority.
However, I have to add that it's not Zig but webkit that is responsible for the brunt of the performance boost.
what would prevent node from switching to WebKit and render bun useless?
Zig is a modern language, C++ is not.
Webkit is already hard enough to work with, add C++ on top and now you can imagine the complexity.
Node would have to be rewritten entirely.
wait, Deno is slower AND has worse ecosystem? what the frick were they thinking? what problem was it trying to solve?
0.1.0 version software has a shit ton of bugs, what a surprise
it's not like people are running this in prod already
cuck language, can't even mix tabs and spaces. not to mention mandatory braces.
you agree to being cucked if you learn it
Man, people shitting on something in beta that is already so promising really sums up why I stopped coming to this garbage pile of a board.
if your project is beta and full of issues you don't market is as so amazing that leaves competition to dust
>i-i-it's a beta shut up!!! stop bullying me
Zig literally has no reason to exist. You may as well just use C.
what replacement?
isn't there deno already?
why another one?
there's not a good enough reason to switch to deno. I'm pretty sure it's slower.
There was a schism after Amazon EEEd rust so now the commies are out to rewrite everything they rewrote in rust in zig
It's supposed to be way faster (WebKit), though if Deno just switched over it'd be game over.
>new tech to learn every week
tiresome
you're zigphobic
what does zig bring that's new to the table? if it has a bunch of memory safety features, how is it different from rust? if it doesn't, is it just a "modern" C?
Zig basically is a modern C that has some very neat ideas, like excellent compile-time execution features and a novel way of doing generics in this space. I really like it compared to C for the most part, but some ergonomic issues can kind of suck. Furthermore, I think C++/Rust are still superior from a language perspective, but maybe Zig can truly be a modern C replacement.
comptime, similar to jai. I think that jai vs zig will be the c vs pascal of our times
difference is jai doesn't exist whereas zig, c, and pascal do
zig doesn't force its memory safety down your throat, and most importantly, it doesn't have rust's moronic single-user memory model
https://ziglang.org/learn/overview/#compile-time-reflection-and-compile-time-code-execution
zig is pretty neat
I'll never understand these LLVM-based memelangs like Zig and Rust where almost every feature is just C-macro/C++-template sugar
>LLVM-based memelangs
LLVM's just a compiler back-end. It means that language authors don't have to write the whole fricking thing to get a good compilation out.
LLVM will be an optional component in 1.0, they're currently getting the self-hosted compiler out to stop depending on C++ to bootstrap while other team members are doing codegen backends. So it's not the same as Rust where they're content with it.
Wait a minute so rust isnt self hosted?
and will never be. mark my words
>Verification not required.
How did these grifters get into the kernel? Kek
the power of blackmail.
>wtf? you don't like rust? that's pretty transphobic of you anon, it would be a shame if you got canceled and it ruined your career
the trannies are loud and obnoxious.
what do you need a self hosted compiler for?
To prove that its a real language
Rust's developers are too busy solving real problems to engage in pissing contests
You can use cranelift if you want though, it's a code generator that happens to be written in Rust and happens to be usable as a rustc backend
>Rust's developers are too busy solving real problems
Evidently none of those involved javascript engines
The problem with Rust is that people don't rewrite working code just to be able to say it's written in Rust?
I could've sworn people on IQfy have spent years saying the opposite
> what is Deno?
I used to love Rust. Honestly. Then I realized the following:
> their community is dishonest
> their claims about memory safety are so overblown that now I cringe at myself for buying the hype
> you cannot write anything significant without the magic words called UNSAFE_
> forget trannies, I've yet to meet any, but nevertheless their community is a toxic CULT
> you'd be punished for wrong think or even suggesting that Rust could use improvements
Yeah, I'm moving on to Nim.
>> you cannot write anything significant without the magic words called UNSAFE_
Unsafe is for primitives and FFI. You'll always depend on code that uses it. But you can write large non-trivial library and application codebases without using it, as long as you don't need to write fully custom containers or call C code or something. I rarely see unsafe outside those contexts.
>> their claims about memory safety are so overblown that now I cringe at myself for buying the hype
Holds up pretty alright IME. Code outside unsafe blocks lives up to its guarantees. Code inside unsafe blocks does need extra scrutiny.
>> you'd be punished for wrong think or even suggesting that Rust could use improvements
Not in the places I've looked, there the common responses are "have you tried X" and "we decided against that because of Y but it's a reasonable idea" and "we'd love to have this but haven't been able to work out the kinks, here's a link to a work in progress RFC".
Where does this happen?
Impressive, but let's say I want a signature like this:
fn split<'a, 'b>(string: &'a str, delim: &'b str) -> Vec<&'a str>;
Split a string, put the pieces (in C++ these would be std::string_view) in a vector, make the vector borrow the source string but not the delimiter.
Can you express that?
I bought into the rust meme and got more than halfway through the book, then i realized it's just as shit as the language it tries to replace.
I wrote a simple pong like game in C some time ago, rewrote it in Rust but i spent most of my time trying to figure out the Rust way to do it instead of just doing what ever simple/best solution i can come up with.
Rust community is cancer, the kind of people that shouts they are victims of bullying while they constantly witch-hunt people not following their cult.
I hope Andrew can focus more on the language soon now that the self hosted compiler is finished.
tldr, you got filtered by borrowck
borrowck got filtered by self referential data structures and I don't have time to "fix" it because it just works in C++
ah, yes all those self-referential structures you need to make fricking pong
lmfao
there are more pongs in total written in Rust this year than there were in C++ over the past 30 decades so I'm not sure what you're trying to imply
I write real software with data complex enough that Rust borrowck literally prevents me from getting the job done.
not a rust problem, that's literally what unsafe is for
self referential data structures are not inherently unsafe, in general most things rust trannies deem unsafe is trivial stuff everyone can deal with in their sleep, except webshitters who are now circlejerking over Rust because they're braindead and can't do anything right
>self referential data structures are not inherently unsafe
yes they are, they become dangling when you move them
>in general most things rust trannies deem unsafe is trivial stuff everyone can deal with in their sleep
actually no they can't, c++ has an entire complicated system called "move semantics" to deal with this problem
the rust solution of "just use unsafe" is actually the one that's trivial by comparison
>I don't know what I'm talking about
you literally should not be allowed to write anything in C++ because if you can't see the obvious issues with "self-referential" data structures and calling them "trivial stuff" you literally are a fricking moron that has no clue what is going on.
>most things rust trannies deem unsafe is trivial stuff everyone can deal with in their sleep, except webshitters who are now circlejerking over Rust because they're braindead and can't do anything right
shit my man, you are goddamn right
>webshitters who are now circlejerking over Rust because they're braindead and can't do anything right
Wow harsh words dude. but webshitters dont care about rust.
ah yes, webshitters don't care about Rust, that's why heavy shilling on Rust mainly focuses on webshit technologies like WASM
I already do it for C++, what's your point? Sorry but I don't get paid by the line of code I write so rewriting everything in Rust would give me no benefit.
you have a brain on your shoulders for cases where valgrind fails, you'd know this if you weren't moronic
Point is that Rust is no worse at detecting leaks than C++, and better than C thanks to RAII
No need to rewrite anything, I only use Rust for new projects
>WASM
It's become a compiler target like LLVM by now. Wasm doesnt automatically imply webshittery.
>I'm moronic
yes, we know. jesus christ. I hope you don't write any code for any shitware I might interact with. morons like you are why I had to throw away 100s of thousands of lines of pure shit C++.
>b-but it compiles even though it is spaghetti mess that also has over 9000 race conditions and reads off an array
>we
ok israelite, explain to me why aviation software is still primarily developed in C and not Rust
baby duck.
moronation.
mixture of above.
the real answer is because non-morons don't blame the language when the stakes are 200 people dying due to software error, and therefore actually fix issues instead of coping
ok kid. keep writing basic b***h arithmetic overflowing bugs in your shitware that requires planes to be hard powered off every week or some other shitty cope.
checked and saturating arithmetic is too big brained for C tards huh? so many shitty bugs you morons write and don't even realize it.
okay I will keep airliners afloat while you will continue writing software for your wife's buttplug
>when you move them
if only there was such a thing as move constructor to solve the issue in the first place
the only issue I see is you having an opinion about things you clearly do not understand
you're the kind of moron who thinks that "risky" operations shouldn't be done because the surgeon might cut the wrong thing and you may die
>if only there was such a thing as move constructor to solve the issue in the first place
how does that work when you have deeply nested structures that can refer to each other in a cycle
spoiler: it doesn't
Because C programmers are easier to find, idiot. It's simple economics.
Same reason the defense industry all switched from Ada to sepples when it became fully privatized.
C programmers who can write software for airliners that carry 200+ people aren't easy to find
they're the same as any other c programmer, just held in control by a massive amount of red-tape, testing, code-review and spec requirements
and in fairness most of that c code is automatically generated by higher level tools
ah yes, they're the same as any other c programmer, that's why your troony webapp keeps leaking memory while airliner never crashed because of OOM error in entire human history
>realtime
>oom
I don't think you know what you're talking about. besides, you can write code that doesn't allocate memory in rust, how is that an argument against the borrow checker?
if you think rust is restrictive you don't know anything about the kind of code that goes into safety critical systems
the only reason they don't crash on OOM is because they're forbidden from allocating after engine start
and without the constraints of safety standards/requirements cniles will gladly frick shit up
>you don't know
stopped reading right there
It's safe to leak memory in Rust, that's all I need to know about your cope.
MISRA C is the industry standard that will never go away, Rust is for trannies who can't program.
safety in rust has a very specific meaning
conflating it with the meaning of safety in aviation/automotive is peak moronation
>muh specific meaning
why is it very specific? Oh I know, your troony compiler can't detect memory leaks, while it is an already solved issue in C
>why is it very specific?
maybe try understanding the language if you want to discuss it, moron
I do understand it, the fundamental reason why leaking memory is not unsafe is because trannies can't deal with detecting memory leaks in the first place, it is that simple
c compilers don't detect memory leaks. you can use valgrind with any language that produces binaries with debug information
this moron has never seen the misra guidelines in his life. there is no way that someone that got filtered by a borrowchecker would have the discipline to consistently follow the 200+ pages of do and do nots for cniles (which somehow an argument in favor of c in his mind)
>you can use valgrind with any language that
which makes Rust irrelevant, running valgrind is unironically faster than waiting for Rust project to compile, done and tested on my machine
I have all guarantees at compile time, thanks to the tests ran before the compilation of the final build
>if I mention NP that will show him
works on my machine anyhow
>just don't do X
yeah I can just not do X while writing in industry standard language and not some trannoid cope meme
>works on my machine
>muh non-exhaustive tests
>muh valgrind
I really recommend you learn basic computation theory because clearly you seem to be ignorant about a lot of things.
he's just PRETENDING to be moronic. rust is still a bad language
>rust is still a bad language
all languages are bad. Rust is just the least bad currently.
You can use valgrind with Rust if you want, I've done it before
valgrind also produces false positives and can miss diagnosing actual leaks
which you'd know if you weren't moronic larper
>your troony compiler can't detect memory leaks
Memory leaks happen when you create a cycle of reference-counted smart pointers. Don't do that and you're fine.
In an environment without dynamic allocation you can't leak memory at all.
do we count recursively building stack frames as leaking if we never pop?
>Rust is for trannies who can't program.
If you can't program, you won't even be able to get a Rust program to compile. morons whine endlessly about how heckin confusing lifetimes are.
>It's safe to leak memory in Rust
It's impossible to prevent memory leaks anyhow so I'm not sure what you're on about. It's safe to do this in a "GC'd" language as well.
>data races
You can't get Zig's comptime or Rust's borrow checker in C or C++ no matter how many macros and templates you write.
constexpr & https://gist.github.com/foonathan/023ff0fe923c6b0312dfc15e17ebb595
>constexpr
I started using zig because constexpr wasn't enough. there is consteval now and there were some papers trying to extend C++23 to support compile time reflection (std::meta, P1240R0) and compile time code generation in C++26, but I don't know if those ideas were accepted or even discussed
zig already offers these things with more capabilities, a simpler implementation and a simpler interface. I don't know how many C++ compilers (if any) support https://en.cppreference.com/w/cpp/experimental/reflect which is unnecessarily obscure and complex and still less powerful than zig comptime or even plain c macros (note that reflection-ts isn't compatible with std::meta, the other proposed implementation)
compare the code in this video with any zig comptime example (yes, this is the people writing the C++ reflect extensions)
SOVL
>dozen of zero-days on day of the release
post 3
Zig is even more troony than rust. Frick anyone itt shilling for it
Yeah man Zig is shit
>zigger lang
just use C moron
Making an all purpose programming language is a fools errand
I can't find it either. OP plz give a link.
>Zigsisters
oh cmon zigsters was right there man
There's a lot of misconceptions in this thread. Fireship made a good video covering the topic.
>I will keep airliners afloat
>I failed to write Pong in Rust
>rust is inadequate for anything more complex than pong
You are inadequate.
you're right anon, I'd have to be jobless to even be considered
ada isn't memory safe.
https://www.adacore.com/press/adacore-joins-forces-ferrous-systems-support-rust
>there is currently no safety-certified Rust toolchain
can't believe I wasted any time reading any of this at all
Point is that the scale is closer to 4 years than 40. The pendulum moves slowly but surely.
yeah and in 2024, we all will be living on mars too, so was I told
In 1982 there was no safety-certified Ada toolchain, but people were working on it.
In 2022 there's no safety-certified Rust toolchain, but the leading Ada vendor is working on it.
How is any of this hard to believe?
>in 1982
and noone uses Ada lmao, all relevant software is C, C++ even, could you possibly imagine?
I just ran all the tests and no leaks once again were detected since 7 years ago, it's only rust trannies who can't detect memory leaks anyhow
>I just ran all the tests
the point is having the guarantee at compile time, morono
testing can only prove that your code leaks, not that it can't leak
>I just ran all the tests
non-exhaustive* tests. Memory management is a NP problem dumb frick. not even the most advanced garbage collectors can guarantee no leaks.
>and noone uses Ada lmao
It's a rare language now but it used to be very popular in defense, aviation, rail, etc. It's fantastic for critical systems.
The actual reason it declined is cost. The mass privatization of the aforementioned industries led to prioritizing cost over quality (yes, even the US government was more competent than its private sector) so now they just mass hire C++ devs, usually clueless H1Bs that came to the US for college, which is how we ended up with Boeing randomly converting passengers to Islam.
MISRA is a joke, like all bonger "engineering".
MISRA is safer than Rust will ever be, keep coping
allocate an array using misra c
int arr1 [10];
>new projects
ok I'll let you know when I hear of any of those
>uninitialised stack memory in MISRA code
cniles are hilarious
>uninitialized memory is le bad
if you really believed this you wouldn't have turned your penis into a dangling pointer
name one example where wasm was used outside a browser
>heap
>just don't use the heap and everything will be fine
great point, I will keep that in mind. thanks MISRA-C!
you're honestly moronic and your program is irrelevant if you need heap for anything
Why are you pretending to be a programmer?
if I was pretending I'd be using Rust right now
The cloud my dude https://wasmcloud.com/
it took you long to figure that one out lmao. the equivalent rust code can't leak, but now allocate an array using the heap with misra c
I see. What is your evidence of this?
No, marketshare does not count.
>will ever be c
cnileanon...
https://github.com/rust-lang/miri
I can't find the SPARK equivalent in Rust but I saw it and know it's being developed. Rust has the same interest in safety but Rust also has energy, so with time it'll absolutely get safer than the most safe Ada. New safety features will be developed and Rust will get them and Ada won't because nobody's putting in equivalent effort into Ada. To think otherwise is like thinking that the JVM 1.0 would never beat your Scheme VM for speed. Six million sacrificed PhDs later, hotspot can be hard for native AOT languages to compete with and your Scheme VM is a joke.
Rust will get the next six million PhDs.
>experimental
>nightly
I'm sure I'd trust this for something important that could kill a lot of people!
do you understand that "MISRA is safer than Rust will ever be" is not comparison with current MISRFA and Rust, but future MISRA and Rust?
>future MISRA
no such thing
>which is how we ended up with Boeing randomly converting passengers to Islam
kek
why is this surprising? it's just resyntaxed C++-without-class
kek. Rust trannies trying to discredit superior Zig because they can feel the walls closing in.
not using whatever's most popular in webdev is just peak moronation
if you touch anything outside of react, vue and (you poor frick) angular you are unironically moronic. maybe include whatever's #1 in php if you hate yourself
in the first piece of zig code i returned an array from a function which was a stack variable and turned into garbage because of that. could have led to a vuln if it was real code
the language is not safe and it's easy to frick up with it, you have to write it like C not think of it as a higher level language
>zig doesn't have move semantics
kek, real?
probably does i just made a really silly mistake and returned a pointer to an array on the stack
very obviously wrong but i expect people who work in languages higher than C to make this mistake regularly
zig means penis in my language
>uses LLVM
discarded