Oddbean new post about | logout

Notes by Mo :ferris: :tux: | export

 @bf55f1f1 "I would like to see more web frameworks that are synchronous by default and allow you to opt into async as needed."

I don't think that this is possible without maintaining two separate codebases/APIs like reqwest does. reqwest is just a client. But maintaining two APIs in parallel for a whole framework? 
 @bf55f1f1 One could create a new web framework that is synchronous which offers trivial parallelization (launch multiple instances). But how do you share state then without a database? A required database increases the complexity.
And what about performance? Such a framework would not have the same performance like Axum. Who would use it then? 
 @bf1b0fad @04022626 The standard library is anemic:
Maybe just check out the situation with cryptographic functionality like random number generators in the standard libraries of other languages. The standard library should only contain what will not change (because of backwards compatibility).
Often, cryptographic methods can't be proven to be safe, they are only safe until someone proves otherwise or computer power gets exponentially higher. This makes them change every couple of years. 
 @bf1b0fad @04022626 Async is hard:
We had such a discussion in the last days after the (technically inaccurate) post "Async Rust is a bad programming language". See community responses :)

Reducing Rust to IoT, Security and Webassembly is also very ignorant. Rust is a general purpose language that you can use as low level as you want.

Here is a technically better article, but this time against Go:
https://fasterthanli.me/articles/lies-we-tell-ourselves-to-keep-using-golang 
 @bf1b0fad @04022626 Rust is still beta:
Calling the whole language "beta" because one feature is missing is kind of ignorant?
There is a temporary solution for async traits in the ecosystem (the crate async_trait). The better, long term solution is being worked on! It is in the stabilization phase. 
 @bf1b0fad @04022626 The standard library is anemic:
Maybe just check out the situation with cryptographic functionality like random number generators in the standard libraries of other languages. The standard library should only contain what will not change (because of backwards compatibility).
Often, cryptographic methods can't be proven to be safe, they are only safe until someone proves otherwise or computer power gets exponentially higher. This makes them change every couple of years. 
 @bf1b0fad @04022626 Rust projects decay: Rust has backwards compatibility. If you want to upgrade your project after 3 years, then just do so? Your code will also compile with the latest Rust version. No one forces you to use the latest additional features of that version.

Also: It is just a design decision to release smaller updates more frequently vs bigger updates less frequently. I don't see how this would affect any one. 
 @bf1b0fad @04022626 Rust is still beta:
Calling the whole language "beta" because one feature is missing is kind of ignorant?
There is a temporary solution for async traits in the ecosystem (the crate async_trait). The better, long term solution is being worked on! It is in the stabilization phase. 
 @bf1b0fad @04022626 Pretty bad subjective article with huge bias towards Go.

Rust is overhyped: Sure, that's why it is in the Linux kernel. Even Microsoft is jumping into the "hype?" and rewriting in Rust. His favorite language is Go from Google? Even Google itself is a big accelerator of Rust. I did teach Rust using the Rust course of the Android team in Google… 
 @bf1b0fad @04022626 Rust projects decay: Rust has backwards compatibility. If you want to upgrade your project after 3 years, then just do so? Your code will also compile with the latest Rust version. No one forces you to use the latest additional features of that version.

Also: It is just a design decision to release smaller updates more frequently vs bigger updates less frequently. I don't see how this would affect any one. 
 @bf1b0fad @04022626 Pretty bad subjective article with huge bias towards Go.

Rust is overhyped: Sure, that's why it is in the Linux kernel. Even Microsoft is jumping into the "hype?" and rewriting in Rust. His favorite language is Go from Google? Even Google itself is a big accelerator of Rust. I did teach Rust using the Rust course of the Android team in Google… 
 Thanks for joining us at #rustconf PostConf UnConf today! There were so many actionable #rustlang... 
 @9cf571da Is there any official schedule for publishing the recorded talks? :ablobcatheart: 
 Typical "before vs after diving into #Rust" experience 😂

It was my experience too 🙃

A rant on my tiny talk about #RustLang vs #JuliaLang in scientific computing.

The same person commented again some days later saying that they love Rust now 😅

https://youtu.be/0JkbNFpXlXc

Give Rust a serious try by starting with the Rust book before judging 😇

Meme originally posted by @150b19ce

https://cdn.fosstodon.org/media_attachments/files/111/071/004/646/338/789/original/9a1190574e6b71eb.png

https://cdn.fosstodon.org/media_attachments/files/111/071/020/974/255/639/original/68d9af1faffbae81.png 
 Hey Fediverse! I'm still not vibing with the book I am studying from, and I know there's loads of... 
 @b8e8e114 Are you reading the official Rust book?

https://doc.rust-lang.org/stable/book/

Did you try the Rustlings exercises? 😃

https://github.com/rust-lang/rustlings 
 @97161cd2 Is there already an alternative fully written in Rust? Ring is only partially written in Rust. 
 @f2dbd6cd I don't think that you should share it on "It's FOSS" since it is proprietary. 
 hey #rust people

this may sound weird but...
does anyone want to help with a #minecraft in #bevy... 
 @40971c7e We have Veloren? 
 nostr:npub129gvast08lj986yftn7q5qlnj8yfqufxx0m33s9u5xssjm8c64rsve4kwg nostr:npub12dhrt3fkk7cpdful... 
 To me, the whole Unity debacle is a great reminder that if you build your product with propriety ... 
 A lot of talks about editors for #rust, like the new #intellij product, and here I am, still usin... 
 @7380419d Yeah, Helix is similar but without braking plugins. An editor with LSP support is more than enough! 
 @3c11e8f3 Nice!

Now that you have set up your environment, don't try to just start hacking! Start with the Rust book before coding:

https://doc.rust-lang.org/stable/book/

There are many concepts that are new in Rust and should be learned first. Finish the first theoretical chapters in the book and then start with Rustlings and maybe a pet projects.

https://github.com/rust-lang/rustlings

Have fun! I would love to answer any question on your learning journey :D 
 @4c9dfcc3 It is funny for me to call Rust a complex language after tagging Haskell and Scala.

My conclusion from my last blog post about teaching Rust in 5 days at my university is that Rust is not complicated if students with limited experience in Python can learn it in 5 days.
Complicated and complex are different adjectives, but I can expand my conclusion to "Rust not being complex" too. It is a language with new concepts that require people to first learn them before starting to hack. 
 @4c9dfcc3 But I think that we both agree that ADTs should be adopted by more languages. It is a concept that should be decoupled from specific languages. 
 nostr:npub129gvast08lj986yftn7q5qlnj8yfqufxx0m33s9u5xssjm8c64rsve4kwg: i don't think anyone is ar... 
 @4c9dfcc3 It is funny for me to call Rust a complex language after tagging Haskell and Scala.

My conclusion from my last blog post about teaching Rust in 5 days at my university is that Rust is not complicated if students with limited experience in Python can learn it in 5 days.
Complicated and complex are different adjectives, but I can expand my conclusion to "Rust not being complex" too. It is a language with new concepts that require people to first learn them before starting to hack. 
 Anyone else getting tired of #Rust getting the credit for (G)ADTs? 

No? Just me?

#ocaml, #haske... 
 @4c9dfcc3 I would love to correct anyone in the Rust community who claims that Rust invented algebraic data types. I didn't see someone say that yet.

Of course, it is a feature. And people will say "Rust has X". They don't have to say "Rust has X where X was first invented by Y and implemented by Z1, Z2, …"

It is worth noting that Rust is not only targeted at systems programming. It is a general purpose language that you can get as low level with it as you want. 
 Currently writing some #Rust in Neovim with a mostly-default LazyVim config, and I'm not missing ... 
 @663e5b60 Just in case you are interested: Helix is worth a try! Very good experience out of the box! Essential functionality like LSP is builtin and therefore very good integrated. No braking plugins like in Neovim (I come from Neovim myself) 
 @bf55f1f1 "I would like to see more web frameworks that are synchronous by default and allow you to opt into async as needed."

I don't think that this is possible without maintaining two separate codebases/APIs like reqwest does. reqwest is just a client. But maintaining two APIs in parallel for a whole framework? 
 @536e35c5 I don't like having national flags in the background. Rust is an international project… 
 nostr:npub129gvast08lj986yftn7q5qlnj8yfqufxx0m33s9u5xssjm8c64rsve4kwg
I will do. Usually i have s... 
 @1cc11b6f @d705616b You don't need one, but it is a nice to have instead of a long alias 
 @6b8b6177 I would personally recommend:

- Learn Rust using the official book
- Optional but recommended: Rustlings for small exercises
- Start a pet project after finishing some chapters of the book (but continue reading in parallel)
- Learn Axum
- Learn SQLx to use it with PostgreSQL
- Profit!

Everything else can be learned when required. 
 nostr:npub129gvast08lj986yftn7q5qlnj8yfqufxx0m33s9u5xssjm8c64rsve4kwg I have started with the off... 
 @cec7b4fa Not a fan of Discord, but this approach of a learning group is awesome! Keep it up 🚀 
 @cec7b4fa Returning the last expression is something that you want in closures (anonymous functions). This makes the syntax much more consistent.

Returning will never happen by accident because the return type must be specified. The compiler will tell you if something is returned that you don't want to return. 
 @cec7b4fa To be honest I don't like this behavior in Julia because you normally don't specify the return type in Julia. Therefore, it can happen that you return something by mistake.
If you want to return nothing, you have to literally add "return nothing" to the end of the body because semicolons are also not common in Julia.

But with Rust, there are no surprises ;) 
 I just registered on #Reddit to spread my blog posts. But my post on the #Rust subreddit was directly deleted. I read that I have to raise my "karma" first. Can't I just post something? Anyway to go around this automated moderation by verifying my "identity"?

#RustLang

https://cdn.fosstodon.org/media_attachments/files/111/031/462/685/893/812/original/0c573fca8145b427.png 
 Learning rust, I found some aspects that sound me strange. For example, the return value of a fun... 
 @cec7b4fa Returning the last expression is something that you want in closures (anonymous functions). This makes the syntax much more consistent.

Returning will never happen by accident because the return type must be specified. The compiler will tell you if something is returned that you don't want to return. 
 It's #followfriday  time ! 

And, as always boosts are welcome! 

#Writer
nostr:npub1aa4ll53vg9x2... 
 @4eebd810 :ablobcatheart: 
 nostr:npub129gvast08lj986yftn7q5qlnj8yfqufxx0m33s9u5xssjm8c64rsve4kwg
What did u like better in l... 
 @1cc11b6f @d705616b Yes, lsd has the --tree flag.

What I like about lsd more are the defaults (icons for example). But you can also customize it and even use a config file for it!

Just install it with cargo and compare :D 
 @d705616b I used exa and then checked out eza. But then I tried lsd again and I found it much better out of the box:

https://github.com/lsd-rs/lsd 
 Teaching Rust in 5 days :ferris:

https://mo8it.com/blog/teaching-rust/

A blog post about my experience teaching #Rust at my university 🎓

Highlight from the summary:

"If students without much experience (some of them had only one lecture about Python) can learn the basics in 5 days, then I think that developers should stop calling Rust complicated"

#RustLang

https://cdn.fosstodon.org/media_attachments/files/111/029/938/587/529/025/original/3c7cfbd1270cb126.png 
 @stephen :archlinux: Coming from Neovim, it took me about a week until I was full productive in Helix. It is worth it! :ablobcatheartsqueeze: 
 nostr:npub129gvast08lj986yftn7q5qlnj8yfqufxx0m33s9u5xssjm8c64rsve4kwg nostr:npub1h4u9t4zqcp8w3gkf... 
 @8f2ef441 @bd7855d4 Einfach custom ROM in Android nutzen. Dann ist es alles Open Source :P 
 @bd7855d4 Hä, sie zahlen Unsummen dafür, es muss sicherer sein! Nicht? Closed source is the best. Open source is unsicher...

(Ironie) 
 Now that the #Serde issue is resolved by removing the binary, I want to thank @6fbf5670 again, not only for reporting the issue, but also for all his efforts in the #Rust and #Fedora communities ❤

For others: Please don't call things like this "drama" again. This is pushing back against mistakes that would affect the whole community. I love how much the community cares and that such problems are not ignored 🥰

We are not here to only get things done, we are building a future ❤

#RustLang 
 :ferris: vs :julia:

Rust vs Julia in scientific computing

Why I think that Julia doesn't solve the two-language problem and when Rust is the actual solution.

https://mo8it.com/blog/rust-vs-julia

The blog post is the base for my tiny talk at #RustSciComp23 which is now public:

https://youtu.be/0JkbNFpXlXc

Think of the recording as a trailer. The blog post has many more details and aspects that can not fit into 7 minutes ⏳️

I hope for discussions across both communities 🥰

#JuliaLang #RustLang

https://cdn.fosstodon.org/media_attachments/files/110/724/818/434/858/011/original/ad422a74e26236d7.png 
Event not found
 @cec7b4fa I plan on giving this course online for free though :D

It is not clear to me when this will be possible, but not before November. Stay tuned :blobcatheart:

Until then, I would love to answer any questions on your learning journey :ablobcatheart: 
Event not found
 @1cc11b6f I would be interested in contributing, but I can't promise that I get time to do so :/

Nextcloud is slow and resource heavy because of PHP. #RIIR 
Event not found
 @47c04476 Congratulations :ablobcatheart: 
Event not found
 @ca90de4b @e92494dc I did consider Bulma before starting with Tailwind. Bulma did seam to me like Bootstrap and I didn't want something like it. Bootstrap is very limiting.

Tera is awesome! I use it for my static websites (since Zola uses it). But for my own binaries, I much prefer Askama for its compilation checks. 
Event not found
 @3b83bf0e Do we really want GUIs with even longer startup times than Snaps and Electron? 
Event not found
 @1447de58 I really hate this game because of unrelated search results xD