Ranter
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
Comments
-
jestdotty5936193d-.-
mutex lock().await comes in in the order they are called
oh I'm sure that won't cause deadlocks at all! -
12bitfloat10218193dYou really jumped in the deep end with that one :D
Starting with the hardest feature of one of the hardest languages -
12bitfloat10218193d@retoor It's actually not though, at least in Rust. Async in Rust basically assembles a big state machine for you that is perfectly sized
It's a lot more impressive than just an event loop -
12bitfloat10218193d@retoor It does for execution, the real difference of async await is that it's SO MUCH nicer to write than doing it by hand
Here's a rough example of what Rust transform async await into: https://play.rust-lang.org//...
I do NOT want to write that C code by hand lol -
jestdotty5936193d@12bitfloat the first thing I tried to do in rust was some audio engineer shit. I still don't understand it. it had anonymous functions and operator overloading
after that I decided I'd do a CLI chat. that required threads and I actually never finished it cuz it confuses my brain at the time. still something I want to do. I know there's several versions of these out there but mine was going to spool up a server as necessary on a client instead of just being a client and server apps (also I wanted encryption)
seems everything is "hard". these don't seem like hard things. writing a chat is JavaScript 101. I also wrote a music library before in JavaScript, and that did take some time because I knew nothing about music engineering but who cares
rust, the language where you can't write anything, I guess -
12bitfloat10218193d@jestdotty There are some really overengineered rust libraries out there, I feel you
Yeah and Rust is hard. That's just a fact. Rust is a great language but it solves a really hard problem in a way that can make writing code annoying at times
At the end of the day it really depends what you need to do. I wouldn't pick Rust for everything. I mean I just posted a Rant about how great garbage collectors are. I love writing simple games in Kotlin or C#
But when you actually do need a low level language Rust is just absolutely amazing -
12bitfloat10218193d@jestdotty "the language you can't write anything in, I guess"
My engine has 30k loc now. Some were very painful to write, but you definitely can write complex things in Rust :P -
12bitfloat10218193d@retoor C not having generics is such a showstopper for me. How can anyone use a language without generics!? :P
-
12bitfloat10218192d@jestdotty > complexity is all about your brain's ability to reduce it to its most fundamental repeat patterns
Writing a game engine myself right now I can tell you: Not always
Some things are just a lot of work. A LOT of work. No way around it :D -
12bitfloat10218192d@retoor I really like and can recommend C# and Kotlin
C# has really cool features and Kotlin is JVM based and I grew up programming Java so it will always have a space in my heart :D
Related Rants
starting to get annoyed at async
works so easy in JavaScript!
rant
rust