Details
-
AboutAAAAAAAAAAAAAAAAAAA
-
SkillsRust and other things
-
Locationhere
-
Website
Joined devRant on 12/8/2018
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
-
Probably at least like 5
-
@BordedDev Not really :P I'm too busy with other stuff. I might implement a C parser in Rust though. I need a frontend for my compiler anyways because manually constructing the syntax tree is getting kinda old...
-
@AlgoRythm Yeah that's Andrews justification: add "friction"
I appreciate the motivation but I think his conclusions are kinda stupid. At the end of the day we are all adults, I don't need my language to force me to use all variables lest I am too stupid to write good code
I'm a big boy who's mature enough to clean up my warnings once I'm done writing something. But in the middle of development I don't want to be bothered by a pedantic helicopter parent who thinks I'm too dumb to realize warnings are bad
It's not like we're talking about C++, where a warning could either mean you have one indentation too much or your entire application is *probably* UB because you violated aliasing
There, sure, make warnings errors. But not for something dumb like an unused variable -
@AlgoRythm The fact that unused variables and tabs for indentation are compile errors in Zig is so absurd. I really want to learn the language at some point but pointless anti-user stuff like this is really unfortunate
-
@Lensflare That's the conventional wisdom and I don't necessarily disagree with it. Especially when it comes to DRY, I'm pretty anal about that
Maybe I'm just biased against "clean code" (it badly burned me), but I've always hated my code. Now I write very pragmatic YAGNI code and I absolutely love it. But idk ¯\_(ツ)_/¯ -
@Lensflare No, because good comments are orthogonal to good code. And splitting everything up into tiny self-describing functions (aka "clean code") to compensate for the lack of comments is imo pretty horrible and makes code less readable
I take a 300 line function with good comments over 30 ten line functions every day of the week. The former can be read sequentially, and thanks to comments you can skip big chunks of code to find what you need. The latter requires jumping around all the time, repeating variables for parameters, etc. -
@Lensflare Even good code should be commented
Many people just don't know how to write good comments! You shouldn't just reiterate what the code already tells you itself. Instead, comments should give additional context and insight why you did something, or how it slots into the big picture or a summary of what you're doing so you don't have to read 200 lines of code to know what a loop does -
@BordedDev Okay big boy, write one then :P
You guys shit on Rusts syntax but have no idea how hard C and C++ are to parse, yet you claim they have such beautiful syntax
As someone that had the misfortune of writing a compiler for a very old pascal inspired language I can tell you, syntax of old languages sucks hard. So many edge cases, special rules, rules changing based on context, etc. -
Oh no... Who came up with that idea o_o
-
@whimsical Let's do a challenge: I write a reference conformant Rust parser and you write a conformant C parser, let's see who finishes first lol
(and we're not even talking about C++... good fucking luck with that)
hint: for variables, pointer-ness is a property of the variable, not the type.
`int* a, b;` declares a as int* and b as int. Lot's of fun, that is -
Bruhhhh whats the with rage bait recently
-
Just to be clear: Zig is just as memory unsafe as C and C++
It's a really cool language, but on the memory safety side it has nothing in common with Rust
And on the thread safety side, no systems language can even dream to come close to Rusts guarantees -
Not dying yet!
-
What mods lule
-
x86 still boots in 16-bit real mode
So probably yes :P -
@BordedDev Tomato tomato :P
-
I think the only thing that doesn't suck about PHP is that it has actual pass-by-reference instead of Java where people think its by-reference but it's actually always by-value
Not that pass-by-reference is all that good, but at least it's interesting... I don't think I have much more good to say about php lol -
It's gotten better but my god... It has some "interesting" design decisions
-
@retoor I was! Just checking if somebody talking trash, I'm super busy implementing a compiler :P
-
@retoor Wooo its back!
-
Yes!!! That's what I've been saying about C devs for ages now: Just program C++ like it was C, then at least you have some damn features *if* you need them :P
-
@whimsical Good one lol
-
I would give you advice if I could but I can really just wish you good luck
-
@3dgoosee More modern syntax mostly. C++ has evolved to a point where the obvious syntax is probably wrong (think raw pointers, new/delete, etc.)
Rust is much newer so it doesn't have a lot of the cruft and baggage (yet :P) -
@blindXfish Talk for yourself :P
-
Rust is great. But its a lang you really have to get used to
Speed isn't the only reason to use it. It's also just so much more ergonomic and pleasant compared to C and C++ imo -
@3dgoosee One tip: Try to keep it simple: unix like OS's (everything is a file, etc.) are a way better inspiration than windows
-
@3dgoosee Good luck! Writing an OS is pretty damn complicated but you'll learn a lot
-
@3dgoosee You can probably still get a lot out of phil oppermans blog! He describes the hard parts (physicaly memory allocation, virtual memory mapping, etc) in pretty good detail
-
@3dgoosee Whole lot of https://wiki.osdev.org/Expanded_Mai... + my own research + understanding how it works over the time by being interested in it
If you're doing Rust there's a *really* good resource: https://os.phil-opp.com/
