Posts by mo8it@fosstodon.org
 (DIR) Post #AcMwbVolnRWDVmFI7U by mo8it@fosstodon.org
       2023-12-01T14:22:40Z
       
       0 likes, 1 repeats
       
       #AOC: I did part 2 of day 1 using nom 😋It could have been easier with regex, but I wanted to learn nom and I am sure that my implementation is BLAZINGLY FAST. Wanna start a performance war? 😂https://codeberg.org/mo8it/advent-of-code-2023/src/branch/main/day1/src/bin/part2.rsFor people familiar with nom: Can I tell it to keep searching until being able to parse something and only then fail?Currently, I call the parser repeatedly after skipping one char after the other, but I don't like this :/#RustLang #Rust #AdventOfCode #AOC2023
       
 (DIR) Post #AcNtdrK2i1uA55GDfk by mo8it@fosstodon.org
       2023-12-02T01:42:34Z
       
       0 likes, 1 repeats
       
       Replacing nom with winnow in my solution to part 2 of day 1 in AOC gave me about a 2x speedup 🤯winnow is a fork of nom maintained by @epage, a maintainer of Cargo, Clap, the toml and toml_edit crates and more! 🤩You can think of winnow as the successor of nom. Here is the background:https://epage.github.io/blog/2023/02/winnow-toml-edit-combine-nomTLDR:- 🚀 Better performance- 🔧 Easier, yet more flexible API - 🔥 More active developmenthttps://github.com/winnow-rs/winnow#RustLang
       
 (DIR) Post #AcNte6PCd7werQn3IW by mo8it@fosstodon.org
       2023-12-02T01:43:32Z
       
       0 likes, 0 repeats
       
       @epage The migration is easy as you can see in this diff:https://codeberg.org/mo8it/advent-of-code-2023/commit/d43b5750e90d502a2162dd94183faae8e751815e
       
 (DIR) Post #AcT5QLxeAVkGI8uYKW by mo8it@fosstodon.org
       2023-12-02T23:34:46Z
       
       1 likes, 1 repeats
       
       I see many people using #Codeberg or self-hosted #Forgejo for #AdventOfCode and I love that 😍Codeberg is booming, at least for personal projects 🚀It is so "ironic" that Github, the leading platform for open source software, is proprietary… #FOSS gotta wake up one day!I think that the planned federation will bring more collaborative projects over 🏃Think of Mastodon for Git 🤩#GiveUpGitHub #AOC #AOC2023
       
 (DIR) Post #AcVLcjnlLJQRI18Qsq by mo8it@fosstodon.org
       2023-12-05T16:06:27Z
       
       0 likes, 1 repeats
       
       1550x speedup? 🙀I published my "quick and dirty" solution of day 4, part 1 yesterday which is very high level and well readable:https://codeberg.org/mo8it/advent-of-code-2023/src/commit/90ce9eb0ddffbe339408cfbe6766f231298a237d/day4/src/part1.rsIt took about 100µs.Then, @timvisee posted about having 17µs. I had to beat that 😂I think that I overreacted? I ended up with about 63ns 😲 (nano!)We talk about a 1550x speedup 🤯https://codeberg.org/mo8it/advent-of-code-2023/src/commit/90ce9eb0ddffbe339408cfbe6766f231298a237d/day4/src/part1_optimized.rsDo you want me to write a blog post about such aggressive Rust optimizations? 🤔#RustLang #Rust #AdventOfCode #AOC #AOC2023
       
 (DIR) Post #AcX1pNTM40qN2CG7k0 by mo8it@fosstodon.org
       2023-12-06T11:04:12Z
       
       0 likes, 0 repeats
       
       #AOC: Late to the party, but I finally finished day 5 😃Part 1: ~13µsPart 2: ~15µs 🚀No aggressive optimizations this time. Rather readable code.It hurts to see people brute-forcing part 2. It is just about interval operations 😅You might want to take a look at my part 2. I have code comments with visualizations for it:https://codeberg.org/mo8it/advent-of-code-2023/src/commit/b950176f9a8154ed0e7119b0e1103db0083a3a6e/day5/srcMatching over tuples is very powerful! 💡#RustLang #Rust #AdventOfCode #AOC2023
       
 (DIR) Post #AcX1pXoHd3Wh607yka by mo8it@fosstodon.org
       2023-12-06T11:12:51Z
       
       0 likes, 1 repeats
       
       General #Rust performance tip:The only non-algorithmic optimization is recycling vectors.Clear a vector to push to it as if it was new but the capacity is preserved. This means that you don't allocate if the new length doesn't exceed the capacity.Swap two vectors with `mem::swap` which is very powerful when you are using one vector as input and the second as output and then operate on the output as input in the next iteration.#RustLang
       
 (DIR) Post #AcfJPx7l8SrN7G6XU8 by mo8it@fosstodon.org
       2023-12-10T10:14:57Z
       
       0 likes, 1 repeats
       
       This thread is really funny 😂https://pony.social/@thephd/111550692413752045Just don't go there and scream "Rust!". Everyone knows it 😉I really hope that we can win @thephd again 🥲❤️#RustLang #Rust
       
 (DIR) Post #AdLsSoON75fQWvkQIS by mo8it@fosstodon.org
       2023-12-31T00:25:16Z
       
       0 likes, 0 repeats
       
       @Codeberg I want to rewrite ihatemoney in Rust when I find time :PI just want software that is more efficient on my home server.
       
 (DIR) Post #AdNkuIo7j96hMaJJ0C by mo8it@fosstodon.org
       2023-12-31T22:06:15Z
       
       0 likes, 1 repeats
       
       @rtyler You might be even more productive if you skip the whole configuration writing and maintaining hassle by trying out #Helix 😃 https://helix-editor.com/
       
 (DIR) Post #AdTrp0AXSimAjjyRqi by mo8it@fosstodon.org
       2024-01-03T20:34:31Z
       
       0 likes, 1 repeats
       
       @parzzixMy favorite Linux blog is while-true-do (by @dschier)https://blog.while-true-do.io/I also recommend the corrode.dev blog for Rust (by @mre)https://corrode.dev/blog/Without.boats has advanced Rust topics:https://without.boats/A shameless plug: My blog is about Rust, Linux, FOSS and self-hosting 😇https://mo8it.com/blog#Blog #RustLang #Rust #Linux #FOSS #SelfHosting #SelfHosted
       
 (DIR) Post #AdU5Zu8723Cp1NXBeS by mo8it@fosstodon.org
       2024-01-03T23:32:09Z
       
       0 likes, 0 repeats
       
       systemd haters… Just shut up please.https://www.reddit.com/r/podman/comments/18xlu5g/comment/kg6xxl8/?utm_source=share&utm_medium=web2x&context=3#systemd #Linux #Podman #Quadlet
       
 (DIR) Post #AhHUF461LMMu0PpuD2 by mo8it@fosstodon.org
       2024-04-26T12:09:06Z
       
       0 likes, 0 repeats
       
       @imsnif @ellie I might not have the same perspective since I newly became a maintainer of a project used by many (Rustlings). But the comments you both posted are normal communication comments for me (except the "deal breaker" one, it communicates frustration, but it is too harsh). Unless they are spammed, I would give a short answer and move on.e.g. answer "I am focusing on releasing x now and would get back to this afterwards. My estimate is about 2 weeks"
       
 (DIR) Post #AhHUF52roZRKwvMtvs by mo8it@fosstodon.org
       2024-04-26T12:12:45Z
       
       0 likes, 0 repeats
       
       @imsnif @ellie Again, I don't want to compare with you, you maintain huge projects for a long time. I just want to understand why these comments are that annoying.Especially if it is a PR, I remember my inpatient me who gets too excited sometimes about a contribution and can't wait for the maintainer to review it to maybe start the next one. I don't spam, but I sometimes ask kindly after about 2 weeks if there is something wrong. Sometimes things just get out of your radar.
       
 (DIR) Post #AiQRVOU4WaBfivyrDM by mo8it@fosstodon.org
       2024-05-30T18:45:08Z
       
       1 likes, 0 repeats
       
       We made a cute Ferris (#RustLang's mascot) at #GPN22 :ferris:
       
 (DIR) Post #AktRRM34WK5nPMOeXY by mo8it@fosstodon.org
       2024-03-25T03:10:47Z
       
       0 likes, 0 repeats
       
       #RustLang lint idea and performance tip 🚀Warn about a repeated call of `Path::join` ⚠️This allocates a new `PathBuf` each time. Then `Path::join` is called on the new `PathBuf` because of the `Deref` implementation.Instead, you should use extend like in the screenshot (preferably with a capacity hint).You can also use `.collect::<PathBuf>()` on an iterator instead:https://doc.rust-lang.org/stable/std/path/struct.PathBuf.html#impl-FromIterator%3CP%3E-for-PathBuf
       
 (DIR) Post #AktRRMkfuCyFaanTVI by mo8it@fosstodon.org
       2024-08-11T12:44:56Z
       
       0 likes, 0 repeats
       
       Proposing `into_join` for `PathBuf`https://internals.rust-lang.org/t/into-join-for-pathbuf/21344#RustLang
       
 (DIR) Post #AktRRMxn7RSkFGvwwq by mo8it@fosstodon.org
       2024-08-12T14:13:47Z
       
       0 likes, 0 repeats
       
       The proposal for `PathBuf::into_join` is now on Github:https://github.com/rust-lang/libs-team/issues/426This is my first language proposal 🥳#RustLang
       
 (DIR) Post #AnD407uTc7RVwRvBvU by mo8it@fosstodon.org
       2024-10-18T12:30:23Z
       
       0 likes, 0 repeats
       
       @lina @clacke @nf3xn @lina About Bun being written in Zig: https://fosstodon.org/@mo8it/113180588006438803
       
 (DIR) Post #ArerozBTv4ePrWdQPY by mo8it@fosstodon.org
       2025-03-02T22:20:00Z
       
       0 likes, 0 repeats
       
       I just migrated to the #ZenBrowser. Finally some innovation over #FireFox 🔥https://zen-browser.appAvailable on Flathub. Give it a try!DRM works on Linux ▶️