Today I learned: It only takes about 35µs to spawn a thread in #RustLang (on my machine) 🚀

Might help you to decide whether you should run something in parallel or not ⚙

Of course, this is not the whole overhead. You might need some kind of synchronization etc.


nostr:npub1t7yau7dhg6pfh5xfn7h9ajjpm9mjgzge2ljen3wczdfweszhmg9qq5346f Could you please add the RustLang tag? 🥰
Background: https://fosstodon.org/@mo8it/112056453394255413


🔪 Killing in the name of Privacy

https://mo8it.com/blog/privacy

How an AD blocker killed my work of months and how is this related to telemetry in #FOSS

#OxiTraffic #Linux #IndieWeb #Privacy #AdBlock #AdBlocker #uBlockOrigin #Blog #Telemetry #Analytics #OpenSource #Selfhosting #Selfhosted

https://cdn.fosstodon.org/media_attachments/files/111/461/575/687/692/274/original/5761b6c09cafe270.png


nostr:npub1kkecgjtdpk2e43ka38xg968xtkh5x00hsruw6htfkj6tl8ll6g7q492d7c nostr:npub13wfxamts3fqvu7dgl595l4vagrp4ejvmlukc9snk873lwcg99l5qn9ch5a I think that this is just an internal thinking (that I would probably also suffer from). But at the end, this is not a promise. At least one brought the idea and maybe even initialized it with a draft PR. Someone (including the maintainers) can pick it up if they really like it.

Maybe we should normalize draft PRs then. We shouldn't submit PRs only when they are ready.


nostr:npub1gfdrrw9629qxwvwaa3vwnvzhtaqu2c5m9wf6vcwjnmdnhs7hl4jsux7gg6 Python now, Rust later.


nostr:npub19pgazvl0rfwjlf057k2q8ss3s8vxgvc8qsl0s6w8yx4lzv9yggmqtyygka nostr:npub1ugp69kn2wjc258uprv47dnze0xv48ecytdgurjujw9qlf27tducsnhkwvc I get it, but my point is that one should learn to deal with ownership and borrowing first.

But I only did one tiny project in Bevy, so I would recommend listening to you since you have more experience in Bevy :D


nostr:npub18wpm7rn8f5tuvuls39hlam6pepzs6qcf4g2wuvqxjvjmfw3qckxsxk8v8s Get into a train. I read the best in a train xD


nostr:npub1mpx5yarqcke4mc8zwm8whqxcqmh0e5zuwxacttacma8530fjxxnslqn2a6 Fancy #Zellij 🌈


nostr:npub1ugp69kn2wjc258uprv47dnze0xv48ecytdgurjujw9qlf27tducsnhkwvc To be honest, I am not sure if a #bevy project would be a good first Rust project.

Although Bevy is the leading Rust game engine that I would recommend, I found it not well documented YET. It is not the fault of the project since it is in a rather early stage.

Therefore, I would rather recommend starting with something other than game development for better documentation and more tutorials.


nostr:npub1anhmhr0d4sfky0qkw0f08d0hv2k27gwmh3ae3866hud3ut377yxste4tr5 You mean 1.73 :D


nostr:npub1srcgh979ychudzrha7asxa7kvennpghghzzadmv5gcunfw5p72qs6xfms4 I wasn't able to understand Rust code before reading the book and learning the theory behind the language. It is not a language that one can just dive into and directly start hacking.

Knowledge in other languages helps while learning, but it is not enough on its own.

Plus, as someone said, LSP is often necessary for browsing code, not only for Rust though.

I would also love to help if there are concrete questions 🤍


nostr:npub1ugp69kn2wjc258uprv47dnze0xv48ecytdgurjujw9qlf27tducsnhkwvc There is no logical reason for not using them. I created a PR once that used a multiline comment and had to change it to one line comments because of "convention". This is also the style in the standard library. I am fine with it. I think of it as something that could be used but is not a convention.


nostr:npub15czyjl6uls559she78pjmmkl3svfh5k8rkvy78lfnec5nx358rqq9m5634 The benchmarks tell me to stick to Crossbeam. But competition is nice :)


nostr:npub1dkvvmmlsz74ulejluacpu2smxm97f0jathtmemptefun4p2smlgsx5s8d3 Welcome fellow :D


nostr:npub1jj6rnq7lqk7zfc4na8ad4fsz8q6ga5572wg39ahjlym4hmltfg6q99x80f You don't use Arc for mutability (across threads). You are probably looking for Mutex<T> or even Arc<Mutex<T>>.


nostr:npub13wfxamts3fqvu7dgl595l4vagrp4ejvmlukc9snk873lwcg99l5qn9ch5a I will definitely respect that and try to remember it.

Excuse me if I lack background knowledge, but could you maybe explain why? You don't have to though ❤ I just want to be educated on this subject.


nostr:npub15fthug74a2yd9ngwnyvvj6mv5ujdawlss90jwfhmxeu8ww0dtwzq45qcks I finally got to reading it. It is very well written!


nostr:npub1dc9aqnp985efx2a0k3a6vzjwexcy95shlgnuqhs724nj85z397zqf75t7a Oh, man, sorry for not replying. Things got complicated on my side. I had an exam. Now, I am on a trip in China.

I want to start it one day. I will ping you then and see if you also have time :D


nostr:npub1988h9tqe5ueq0aepu9fsp5e0t3htpap99rywlstj6xwzch7q8yhsfckur7 I don't know. Ping is what I need 😅


Is there a prober ping library fully written in #Rust?

I wonder why we already have very good HTTP clients (like reqwest) but binaries like #gping still run the ping command:

https://github.com/orf/gping

I ended up calling the ping command too, but a well maintained library would be nice :D

#RustLang


nostr:npub1wq7gzkh659hf8er6gqk80f9autjj4eyn8nzmeamlrm5v6pkdt49scph2rs I use #GitUI for about 95% of Git usage. The rest is done with simple Git commands.

Check it out:

https://github.com/extrawurst/gitui

Inside #Zellij, I always have GitUI as a second tab.

I even have Zellij layouts to automate opening such tabs and panes for each project :D

With Zellij, there is no need to reinvent the wheel as "integrations". Just use other CLIs or TUIs in your terminal workspace :D


nostr:npub16pdljvqw3ld0f2mz8mq39tgcvhy3paqmc96kukn9cfscqa29u4wshq3nda Check out this awesome video which talks about transformations between Result and Option:

https://www.youtube.com/watch?v=s5S2Ed5T-dc

`ok()` gives you the Ok variant as an Option. You loose information about the error.

You can't use `ok()` on an Option because you need to specify an error. You need to give it information. Therefore, you can use `ok_or`.

But if your error has to be computed (like a String which allocates), then you want that computation to be lazy with `ok_or_else` and only run on None.

https://cdn.fosstodon.org/media_attachments/files/111/130/690/663/922/659/original/7596e529390f2955.png


nostr:npub16pdljvqw3ld0f2mz8mq39tgcvhy3paqmc96kukn9cfscqa29u4wshq3nda Sorry for my spam. I really enjoyed your post. Some things are presented unfairly, but you are telling your subjective experience. We need more people talking about their experience with Rust to improve this experience for future fellows ❤ :ferris:


nostr:npub16pdljvqw3ld0f2mz8mq39tgcvhy3paqmc96kukn9cfscqa29u4wshq3nda I have to agree that async closures are a pain. And their error messages are misleading. Maybe nostr:npub12dhrt3fkk7cpdfulpcxav2mnvqsev2dczqahwtm2xakk6fvvwugs6lq6qy could vibe in 🤍

Async Rust is not complete. This is a fact. You might find workarounds for missing features (like the async_trait crate) though.

Unrelated to your post, but although async Rust is not complete, I think that the implemented part of async in stable Rust gets unfair criticism. And Rust teams are working on filling the gaps ❤


nostr:npub16pdljvqw3ld0f2mz8mq39tgcvhy3paqmc96kukn9cfscqa29u4wshq3nda To be honest, I am confused. You say that you like the "batteries included" approach and yet you complain about having too many functions/methods.

Yes, the standard library is extensive and I still learn about new functions. But honestly, rustdoc is the best docs tool I have ever seen compared to other languages, especially for navigation. It is a matter of entering "docs.rs/std" in the browser, pressing Shift+s for search and then using the side bar of the picked search result.


nostr:npub16pdljvqw3ld0f2mz8mq39tgcvhy3paqmc96kukn9cfscqa29u4wshq3nda I get the confusion with needing pub(super) for testing private functions. But this is why your structuring of tests is not the "idiomatic"/common one.


nostr:npub16pdljvqw3ld0f2mz8mq39tgcvhy3paqmc96kukn9cfscqa29u4wshq3nda So you normally only consider variant 2 for a module. Later on, if you want submodules in that module, you just create a directory next to it with the same name. That's it.

mod.rs is legacy for backwards compatibility and inline modules are almost only for tests in the same file. Now that I thought about it, I find it brilliant :P


nostr:npub16pdljvqw3ld0f2mz8mq39tgcvhy3paqmc96kukn9cfscqa29u4wshq3nda One might ask, why not just put the file `submod.rs` inside the `submod` directory (instead of next to it or `mod.rs` inside it)?
Well, that would make having a submodule with the same name (submod::submod) impossible with variant 2! (Not that I would recommend that design)

More importantly, it makes expanding from variant 2 to variant 3 very easy! Or actually, it makes variant 3 only an extension of 2.


nostr:npub16pdljvqw3ld0f2mz8mq39tgcvhy3paqmc96kukn9cfscqa29u4wshq3nda The first variant with a an inline module is almost only used for tests that you want have in the same file but with namespacing.

The second variant is obviously useful to have a file as a module without needing to create a directory if it doesn't have submodules.

I explained variant 3 and 4.


nostr:npub16pdljvqw3ld0f2mz8mq39tgcvhy3paqmc96kukn9cfscqa29u4wshq3nda About modules:

I used mod.rs too until I had more than two mod.rs files open in my editor and I lost it. You don't even have to open multiple mod.rs files to be confused. If you have one open in a hidden tab, do you know which mod.rs file this is? I ended up closing mod.rs files quickly after editing them. Then I found about the solution with the file `submod.rs` next to the directory `submod`.


nostr:npub16pdljvqw3ld0f2mz8mq39tgcvhy3paqmc96kukn9cfscqa29u4wshq3nda " I really wish that Rust would just auto-discover tests wherever you happen to put them"

You can annotate any function with #[test] and Rust will run it as a test. It doesn't have to be in a test module.


nostr:npub1lxtnww76w6n5js6yvhm0pua0fky96df2q252ssuv70m43gta36eqlewnka Renaming is part of the language server protocol, so yes :D


nostr:npub1lxtnww76w6n5js6yvhm0pua0fky96df2q252ssuv70m43gta36eqlewnka nostr:npub1erzu2rn4f9nck3qt5yzva5wezszsph07nk3hxrnfcq8g0njx7cfsrmfpnj IDE: What about Helix? Every editor with LSP support could be called IDE today :P


nostr:npub15zysqwfrazhfslyf4p3symuadr362h2fc83v2ezfdkhk3xhau6zqvfpqjg nostr:npub1erzu2rn4f9nck3qt5yzva5wezszsph07nk3hxrnfcq8g0njx7cfsrmfpnj JavaScript must be replaced, not rewritten xD
And no, TypeScript is not a replacement, it is only a good improvement on top of JS.


nostr:npub1v8cx0sw2y4tnj2h757vqmxyjhvsg9kh48fys5eh7up5r86tuw9jsmyllkr But one could let `publish.rs` sleep while for example moving a precompiled binary into that directory :/

I don't think that it would be any better than the `publish` routine in my justfile:

https://codeberg.org/mo8it/oxitraffic/src/commit/f0e8988bd68b93d430b158a21e6a01a0b9c16457/justfile#L23-L33

Am I missing something?


nostr:npub1erzu2rn4f9nck3qt5yzva5wezszsph07nk3hxrnfcq8g0njx7cfsrmfpnj My list is much longer, but PostgreSQL in Rust? I wouldn't say no :D
SurrealDB sounds promising though.


nostr:npub1v8cx0sw2y4tnj2h757vqmxyjhvsg9kh48fys5eh7up5r86tuw9jsmyllkr I expected you to reply since this is related to Cargo 🤍

Did I get this right that I would run the command in the `publish.rs` file to generate these static files? How would Cargo know that these files are generated by `publish.rs`?


What do you think about including reproducible files that are not tracked by Git in a published crate?

It is about including static files like bundled JS and CSS in the published crate. In my opinion, since these files are auto-generated and reproducible, they shouldn't be on Git.

Here is an example:

https://docs.rs/crate/oxitraffic/0.4.5/source/static/

#RustLang #Rust


nostr:npub1jx3dzll682rmfgzla5wwyjjsk5f05eml4845nrxvww3ulnt3shxqq0m6x6 Then I misunderstood it. Sorry ❤


nostr:npub1jx3dzll682rmfgzla5wwyjjsk5f05eml4845nrxvww3ulnt3shxqq0m6x6 Go also has a Mutex. Because a Mutex is more low level than a channel. Some things can't be done with channel or require a lot of copying/cloning. Yes, one could say that you should use channels by default, but in Rust, you don't have to use them to be able to right data race free concurrent programs.


nostr:npub1jx3dzll682rmfgzla5wwyjjsk5f05eml4845nrxvww3ulnt3shxqq0m6x6 Rust offers both, channels and locking with a Mutex or RwLock. There also more flexible channels in crossbeam:
https://github.com/crossbeam-rs/crossbeam

It doesn't force you to use the easier and less error prone channels, but it also makes sharing memory much easier. It is proven that data races are not possible in Rust. On the other hand, Go knows about the problem and tell you to run a program with an optin tool as long until a data race is detected (if it was reached):
https://go.dev/doc/articles/race_detector


nostr:npub1xf9sw89fsmrhw7zjduxpvmzp6rjy3zqkmlau4nphn6s96hql87usxappsj Cute! 🥰


nostr:npub1wz83j3me9zkwy8nr2ryupj63ddqpy70nz9d3u3yn0my75vxwge3snmsj46 nostr:npub15czyjl6uls559she78pjmmkl3svfh5k8rkvy78lfnec5nx358rqq9m5634 We have one in Mainz (RLP). You could attend online :D


The used function is std::array::from_ref

https://doc.rust-lang.org/stable/std/array/fn.from_ref.html


Create a slice from a reference without copying in #Rust

&T -> &[T]

https://www.youtube.com/watch?v=sZnCfIiOXAw

Promising channel! This is his second #RustLang video. Leave a subscribe :ablobcatheart:


nostr:npub1ejwafwca5emrndg6jnql30drv79sn8dckkhw5axff2wpruysjpns3v76f2 Could you please explain the difference to a normal function pointer?

https://doc.rust-lang.org/std/primitive.fn.html


nostr:npub1ha2lruw3206t0vvrkum95nwc5vqj5rx4nyssfn3j4mjfwur3x8nsymk5hs Basically syntax sugar for the default use case. But you can do it manually and even have more control if you want:

https://codeberg.org/mo8it/oxi-axum-helpers/src/commit/3886ca460032ac47a0f88582abe507094166f743/src/runner.rs#L10


nostr:npub1hg2hvzx6sxxrwkk5a90eskxm9qu00lw26faq8yvdukfv7295uz6sv8k372 I like plain text as a default, but when sending a long email especially to a group as an announcement, I want to highlight specific points. Markdown would be awesome, but instead we have HTML. Very good idea to have a whole webpage as an email…


nostr:npub1pxtd33v2zunq56ujzy77ut4a6qwspls9dxvxuyha8cex6w6fvpms9a38k6 Did you try the official Rust book? (available for free)

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


nostr:npub1r3n08ljcwy5smnd8wvpl999ky4tyjnckplu492dl59egnpmr6m6svtqv63 I found this an interesting article with Reddit discussion: https://www.reddit.com/r/rust/comments/16ebdi1/why_you_might_actually_want_async_in_your_project/

But it is biased towards smol. Personally, I would recommend to stick to Tokio especially if one is just starting with async.


nostr:npub1ha2lruw3206t0vvrkum95nwc5vqj5rx4nyssfn3j4mjfwur3x8nsymk5hs The Cargo.toml will not necessarily tell you about that if the feature "full" in Tokio was used. One needs to check where the runtime is spawned (noramally at the main function). The multithreaded version is the default. Otherwise you would see this explicit annotation:

#[tokio::main(flavor = "current_thread")]

I am sorry if I am missing something, but I don't get how the runtime that you normally start yourself (for example in Axum) is hidden.


nostr:npub1ha2lruw3206t0vvrkum95nwc5vqj5rx4nyssfn3j4mjfwur3x8nsymk5hs But starting a runtime involves some overhead. Did I get it right that you would start a runtime for each request?

I am not familiar with iron though and only tried a recent version of Rocket.

About the hidden runtime: Why do you think that it is hidden? For me, it is very implicit since you annotate your main function with a tokio macro. Maybe because of the macro hiding how the runtime is launched? One can see its equivalence here: https://docs.rs/tokio/latest/tokio/attr.main.html#usage


nostr:npub1ha2lruw3206t0vvrkum95nwc5vqj5rx4nyssfn3j4mjfwur3x8nsymk5hs My conclusion would be:
- Improve the documentation of async
- Make this difficulty levels clear to newcomers to climb up step by step: sync single threaded < sync multithreaded < async single threaded < async multithreaded
- Stabalize missing async features like async traits (work in progress)
- Try to reach having libraries agnostic regarding the async runtime (lowest priority for me personally since we have Tokio)


nostr:npub1ha2lruw3206t0vvrkum95nwc5vqj5rx4nyssfn3j4mjfwur3x8nsymk5hs So I guess that only people would use it who are already familiar with Rust and convinced by it and they want to build a backend. But then, if they are already sold on Rust, wouldn't they just learn async?
The route for newcomers before they can work with Axum and SQLx is longer than other routes which don't include async. But for people who are familiar with Rust, it is just one step: Learning async. And I think that we currently have a problem of documentation here as you mentioned.


nostr:npub1ha2lruw3206t0vvrkum95nwc5vqj5rx4nyssfn3j4mjfwur3x8nsymk5hs If such a framework is targeted to newcomers, do you think many newcomers try Rust because of its reliability etc? I don't think so. I think that many of them, especially in the web ecosystem, come for the performance and low resource consumption. I would guess that most of them already have experience in Node, Python and Ruby. They know a slow solution. Why would they use that framework?


nostr:npub1ha2lruw3206t0vvrkum95nwc5vqj5rx4nyssfn3j4mjfwur3x8nsymk5hs 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?


nostr:npub1ha2lruw3206t0vvrkum95nwc5vqj5rx4nyssfn3j4mjfwur3x8nsymk5hs "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?


nostr:npub1hudslt0rzzk3m4s09jwc7v6k72njstqdvnnj77vgcjmaj5mvhlks9xnyfp nostr:npub1qspzvfnz7mlxhprswj9wv3wuffwvp6l6s4k0rxknm0t7nsc9kjnsy3xgsg 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


nostr:npub1hudslt0rzzk3m4s09jwc7v6k72njstqdvnnj77vgcjmaj5mvhlks9xnyfp nostr:npub1qspzvfnz7mlxhprswj9wv3wuffwvp6l6s4k0rxknm0t7nsc9kjnsy3xgsg 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.


nostr:npub1hudslt0rzzk3m4s09jwc7v6k72njstqdvnnj77vgcjmaj5mvhlks9xnyfp nostr:npub1qspzvfnz7mlxhprswj9wv3wuffwvp6l6s4k0rxknm0t7nsc9kjnsy3xgsg 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.


nostr:npub1hudslt0rzzk3m4s09jwc7v6k72njstqdvnnj77vgcjmaj5mvhlks9xnyfp nostr:npub1qspzvfnz7mlxhprswj9wv3wuffwvp6l6s4k0rxknm0t7nsc9kjnsy3xgsg 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.


nostr:npub1hudslt0rzzk3m4s09jwc7v6k72njstqdvnnj77vgcjmaj5mvhlks9xnyfp nostr:npub1qspzvfnz7mlxhprswj9wv3wuffwvp6l6s4k0rxknm0t7nsc9kjnsy3xgsg 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…


nostr:npub1nn6hrknhgkam5v4vu5vnnn3798c83d9ypnv8ynrz2kyu7q3lvfdsszw9rf Is there any official schedule for publishing the recorded talks? :ablobcatheart:


nostr:npub1hr5wz9pljfuy3eludtrtxmvjl8tt6njtd3yn80jv4emyln98r9kqq7nguc 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


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 nostr:npub1z593nnjdmh5yam2f07g2ck7g4zmgf5nk3kh9kc3y9jy9z05z5l8q3xnpt7

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


nostr:npub1jutpe5shf925fjs70jtj00lce8tk30a492df4ffuj0ggp6lukqkq2fpmzr Is there already an alternative fully written in Rust? Ring is only partially written in Rust.


nostr:npub1pl3uvzfcm78td39ztggg4p49c65fngckqxpcw949jz4a3xm6ac5scs58fy :blobcatheart:


nostr:npub17tdadn0j58jjrekysl4ley0nlzzge58w5nuw7knncr8mk4vacfkqz3apfk I don't think that you should share it on "It's FOSS" since it is proprietary.


nostr:npub1xx4zjmu2esc9ee3au34hyan3ygdsmk773c2zly67s2mj3dxwr0lqu9szrh Time to try Helix?

https://helix-editor.com/


nostr:npub1nn6hrknhgkam5v4vu5vnnn3798c83d9ypnv8ynrz2kyu7q3lvfdsszw9rf Very excited to watch the video on YouTube 😍 (Not only this one)


nostr:npub1gzt3cl5u8hjczhph33ndd9kq5xhx0q7t299nfsn8r67r2zqc7les22tcng We have Veloren?


nostr:npub18g8qe5sge326r88j94jgvfqqdu4dc8k90c04hyjukrrx3876avwshv8q7r nostr:npub12dhrt3fkk7cpdfulpcxav2mnvqsev2dczqahwtm2xakk6fvvwugs6lq6qy Awesome ❤


nostr:npub1n030v955jspma26lzac6lgz3wvatgtt596gjxpa7clqqp6w87a0swg6a7p 🚀


nostr:npub12dhrt3fkk7cpdfulpcxav2mnvqsev2dczqahwtm2xakk6fvvwugs6lq6qy I don't like having national flags in the background. Rust is an international project…


nostr:npub1wwqyr8ftmcazjpt4vnuyy6v7yjuewe3k3w9phx0l5s735lnvpyzsz8gkse Yeah, Helix is similar but without braking plugins. An editor with LSP support is more than enough!


nostr:npub18sg73ul8fqckpwttdyu9fczkmhkhnent2z7q3n9d4xjzeskku6fqr4f898 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


nostr:npub1fjwlesmfvyz42q295yfp3cj2qmnty87nfpc8ddjrhsjyysqpa22snfpdqw 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:npub1fjwlesmfvyz42q295yfp3cj2qmnty87nfpc8ddjrhsjyysqpa22snfpdqw 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.


nostr:npub1trw0kphuys5739ygvtxyzv4gdvjtmw890573da6r3fv86vmq4n0q3htdzn You can't beat me xD


nostr:npub1vcl9kcqwwsk536z8s4h6k48qrfkm7mahzrk5mz0v04j94507d20s6hk6t3 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)


nostr:npub1fjwlesmfvyz42q295yfp3cj2qmnty87nfpc8ddjrhsjyysqpa22snfpdqw 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.


nostr:npub1gx97m95tsqxgs4zj94xnxjcns4zy9ty69g63wthdem7pu3uykq4qqvm9vj I really enjoyed the podcast! Thanks for sharing your experience :D


nostr:npub1z3raukxlay9jwk7je5u6yzhc4z49983x0w3prlnhxw6n6axlvp3sx6rpxr I really hate this game because of unrelated search results xD


nostr:npub1dw9kza63z9hsavfksqn60rw6gjdu0mqwyyh6w35qk49d4ukqvrpstwrga3 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:npub1rnq3kmah2jqlewmgsv3w0mus7znmn7teupxctuyqwuaamwc4mmusdx7anc nostr:npub16uzkz67d5qv4mgqk2neawkxl5xf42adz6y9ple6kjfknw05qukpsf9xx07 You don't need one, but it is a nice to have instead of a long alias


nostr:npub1rnq3kmah2jqlewmgsv3w0mus7znmn7teupxctuyqwuaamwc4mmusdx7anc nostr:npub16uzkz67d5qv4mgqk2neawkxl5xf42adz6y9ple6kjfknw05qukpsf9xx07 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


nostr:npub1emrmf75u9xyrd634cjc3an7462gwz49ysh2c2znu5q8fld8enhtsnhwh52 Not a fan of Discord, but this approach of a learning group is awesome! Keep it up 🚀


nostr:npub1emrmf75u9xyrd634cjc3an7462gwz49ysh2c2znu5q8fld8enhtsnhwh52 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:


nostr:npub1emrmf75u9xyrd634cjc3an7462gwz49ysh2c2znu5q8fld8enhtsnhwh52 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 ;)


nostr:npub1emrmf75u9xyrd634cjc3an7462gwz49ysh2c2znu5q8fld8enhtsnhwh52 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.


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


nostr:npub1fm4asyq80qgj3cnacvu9lhpw6399vy5jn77qjcnqhv5uwynyaecsaqf7sx :ablobcatheart:


nostr:npub16uzkz67d5qv4mgqk2neawkxl5xf42adz6y9ple6kjfknw05qukpsf9xx07 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


nostr:npub1gfc7x0fj8dk8hecnf3wd8s02jrpdh9242a9f0wyvnyy23phzfupsrs8t7z Finally learned about sem-version checks in Rust :D

Thanks for sharing!


nostr:npub1lsphh5e5u2v7ppzx4e68w275nn5wmamcgstshguygdpksqffs08qh7rr0h Coming from Neovim, it took me about a week until I was full productive in Helix. It is worth it! :ablobcatheartsqueeze:


nostr:npub10sy0tvh7v688ng5x4nuuvuxmds0mlrt66arapvkqced7c2289t7s5lu88e nostr:npub1gfc7x0fj8dk8hecnf3wd8s02jrpdh9242a9f0wyvnyy23phzfupsrs8t7z Is there some recording?


nostr:npub13uh0gsdz9hxj7zhpv68xc465pt9zqr3fgeeny2rxvaltz9pdgvqs6ka7xd nostr:npub1h4u9t4zqcp8w3gkfzyfwrmqxehrj807gshkkjkyq5j9nnqaq0qkqmccnpk Einfach custom ROM in Android nutzen. Dann ist es alles Open Source :P


nostr:npub1h4u9t4zqcp8w3gkfzyfwrmqxehrj807gshkkjkyq5j9nnqaq0qkqmccnpk 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 nostr:npub1d7l4vup9k4fvq6zcn9mnwnvuftsfl58kulrvgj7h3qg7cglnpacqfv546q 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


nostr:npub1e2gdujuadycgmzwfj7zz33k089rdx0q4j8r4wyz7g28p029h552s4w6q8w nostr:npub1ayjffhx6tm7p2ddhdw6et70qgdmqf4u9rc0evzztnlavjyxkp6fqx9hw9x 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.


nostr:npub18wpm7rn8f5tuvuls39hlam6pepzs6qcf4g2wuvqxjvjmfw3qckxsxk8v8s Do we really want GUIs with even longer startup times than Snaps and Electron?


nostr:npub1rnq3kmah2jqlewmgsv3w0mus7znmn7teupxctuyqwuaamwc4mmusdx7anc 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


nostr:npub1glqygaht428hcw7kvmgnq7xngrjllpzz5vsjcypp3c4yzjc4vlmqhau8ma Congratulations :ablobcatheart:


: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