crablang
91 posts

crablang
@crablang
not associated or affiliated with @rustlang or the @rust_foundation • 5k ⭐️https://t.co/I4GoUujKjh
water Katılım Nisan 2023
78 Takip Edilen2K Takipçiler

@karuna_murti @techsavvytravvy please, log out, and talk to me face to face with your original account like a real man
English

Expectations from a new programming language are crazy nowadays.
A new language has to
Have a formatter
Have a linter
Have a build tool
Have a package manager
Have documentation
Have project templates
Have a friendly community
Have a minimal ecosystem of CLI parsers, web servers, generic http clients
Have a fancy website
Compile fast
Run fast
Bring something new to the table
Have great error messages
Be better than OCaml
It’s almost impossible to start a new thriving language.
English
crablang retweetledi
crablang retweetledi

the crablang collective does not condone this
trav@techsavvytravvy
could an unmaintained project do this??
English

crablang retweetledi

crablang retweetledi

crablang retweetledi
crablang retweetledi

here's what i've been doing the past two hours.
let's say we want to represent a HashMap as an array of tuples, like this:
of course, we can't implement the From trait for this directly, because both types are defined outside the crate.
so the first move here is to use the newtype pattern, creating a new struct that wraps the HashMap struct
now we can implement From<[(&str, &str)]> for Record right?? well, not yet...
since it's an array, we need to know the size at compile time... but that throws off our whole plan!
thankfully, all is not lost, and we can use const generics to implement From on an array of any type. so here's what i did:
it works!
so was all of this worth it just to save 4 characters by not using the `vec!` macro? absolutely. should this have been a blog post instead of a super long xeet? maybe




English

rust community core called prime a racist. lol, lmao absolutely cringe. why are they like this???
ThePrimeagen@ThePrimeagen
i know i normally shitpost but rust and typescript has some weird ass people in their communities. Rust is the worst. I have been called a racist by 2 of the core community members there. shit is so annoying its like php, ocaml, and i would even throw in go, are the blue collar of tech much rather get a beer with _any_ of them
English
crablang retweetledi
crablang retweetledi

Full episode starring @techsavvytravvy is finally live! We talk about forking Rust, amazing bash scripts, and more
backendbanter.fm/episodes/015-f…
English

@verry_codes Rustlings accompanied with the Rust book is a great way to do it, after you install @crablang. The first step to learning Rust is to install Crab lang.
English














