@mo8it@fosstodon.org
@mo8it@fosstodon.org avatar

mo8it

@mo8it@fosstodon.org

A computer nerd passionate about #RustLang :ferris:

A #Rustlings maintainer 🦀

Working on my master's thesis in Computational Sciences in Mainz, Germany

I post about …
:ferris: #RustLang
:tux: #Linux
:opensource: #FOSS
📦️ #SelfHosting

This profile is from a federated server and may be incomplete. Browse more on the original instance.

M0CUV, to rust
@M0CUV@mastodon.radio avatar

So I decided to try VS Code for #Rust development after a few years with IntelliJ, becoming increasingly disappointed with its performance and usability. Wow, it is like night and day - as fast as NeoVim but I don’t have to build my own IDE. Have yet to try it on The Old Laptop Where IntelliJ Maxes Out The Fans All The Time… but I don’t think I’ll be renewing the JetBrains subscription. Yet to find The Best Git Plugin, or see how it fares with the other languages I use: Java, Scala, Perl, C++.

mo8it,
@mo8it@fosstodon.org avatar

@M0CUV If you want a very efficient terminal editor with modal editing without building your own IDE, you might want to try Helix:

https://helix-editor.com

I used it with Rust, Julia, Scala, C++, Haskell, Python, JS and TS and it works out of the box after installing the corresponding LSP.

I would love to help if you have questions 🥰

kubikpixel, to rust
@kubikpixel@chaos.social avatar

deleted_by_author

  • Loading...
  • mo8it,
    @mo8it@fosstodon.org avatar

    @kubikpixel @cloudflare Axum is focused on building a backend like an API. Pingora is mainly about networking.

    BrodieOnLinux, to random
    @BrodieOnLinux@linuxrocks.online avatar

    How to piss C developers off 101:

    Say that even the greatest programmers in the world make mistakes.
    Nobody can always write perfectly memory safe code.

    mo8it,
    @mo8it@fosstodon.org avatar

    @BrodieOnLinux The pinned comment on your video is the good old "skill issue" argument. It completely ignores statistics and reports from the industry, here is one from Google:

    https://security.googleblog.com/2022/12/memory-safe-languages-in-android-13.html?m=1

    So apparently, even huge companies have skill issue.

    You don't need a seat belt in your car because otherwise you have a skill issue…

    Often, people with such statements don't have public C/C++ repositories to browse their code and issues. Otherwise, they wouldn't write that.

    #RustLang #Rust

    mo8it,
    @mo8it@fosstodon.org avatar

    It gets worse in the replies 🤦‍♂️😅

    I finally understand why some people use Zig. Those are people who didn't even try to understand ownership and borrowing 🙂

    Use-After-Free is not posssible in Rust. This is not RAII in C++.

    BTW: Zig is NOT memory safe and should be avoided. Let's not make a step backwards 🙂

    #RustLang #Rust

    davmac, to rust

    It finally happened; someone asked me to rewrite Dinit in Rust. #dinit #rustlang

    mo8it,
    @mo8it@fosstodon.org avatar

    Kick everyone asking a maintainer to rewrite in . Tell them to do it themselves!

    I am totally for "Rewrite it in Rust", but do it yourself instead of trolling maintainers.

    Maintainers don't live under a rock and probably know about Rust already. Just fork and rewrite yourself if you are that motivated.

    Stop the trolling please! You are not helping anyone, especially not the Rust community.

    @davmac

    dgoosens, to rust
    @dgoosens@phpc.social avatar

    warp looks lie a very sexy #terminal app
    and it's build in #rustlang

    https://news.itsfoss.com/warp/

    mo8it,
    @mo8it@fosstodon.org avatar

    @dgoosens I can finally let AI run commands on my system 🤯🚀

    What could possibly go wrong? 🤦‍♂️

    Don't get me wrong, Warp has some innovative features especially for terminal beginners, but this AI command suggestion…

    We have been telling people for decades to not run random commands they find in the internet. Now, we finally have a terminal inserting commands put together by an AI trained on the internet. And all of that is non-deterministic behavior.

    • It is proprietary
    secana, to cpp
    @secana@mastodon.social avatar

    Today I'm going to give a talk on wrapping #cpp in #rust to a bunch of #cpp developers. Let's see how that goes...

    mo8it,
    @mo8it@fosstodon.org avatar

    @markuswerle @secana I see no (deprecation) warnings when I write memory unsafe code with "old C++" and compile it with the latest and greatest compiler (gcc /clang).
    So even IF what you might refer to as "modern C++" is memory safe, let's please keep things objective and not redefine common terms like "C++" as being "modern C++ where you have to pay attention yourself that you don't use any of the old C++ constructs which are part of the official language because otherwise it is a skill issue".

    yth, to random
    @yth@mstdn.social avatar

    Started using @golang for simple command line tooling instead of Typescript. So far enjoying it very much, I think it’s bye bye to (cli/serverside) Typescript for me.

    mo8it,
    @mo8it@fosstodon.org avatar

    @yth You might have more fun with , especially for command line tools.

    makes writing CLIs a breeze, especially with its derive API: https://docs.rs/clap/latest/clap

    For a TUI, is awesome! Here is a showcase:
    https://ratatui.rs/showcase/apps

    khalidabuhakmeh, to rust
    @khalidabuhakmeh@mastodon.social avatar

    Learned how to increment a static count in #Rust and about the built-in AtomicI32 type. Also had other tries with the unsafe keyword and the use of Mutex.

    mo8it,
    @mo8it@fosstodon.org avatar

    @khalidabuhakmeh Nice!

    Small tips: AtomicU64 might be a better choice for a counter. You can also keep thing chill with the "Relaxed" ordering ;)

    khalidabuhakmeh, to rust
    @khalidabuhakmeh@mastodon.social avatar

    My dive into #Rust and its web ecosystem continues. This time, I'm using #Axum to serve HTML from an endpoint and sending static files from a directory.

    The IDE I'm using is #JetBrains #RustRover.

    Note: Cool features from RustRover include automatic dependency refresh, HTML Language injection, and a built-in browser in the IDE (via plug-in), not to mention really good language support.

    mo8it,
    @mo8it@fosstodon.org avatar

    @khalidabuhakmeh I would highly recommend using Askama for templates instead of dealing with strings :D

    https://djc.github.io/askama/askama.html

    alexzeitler, to rust
    @alexzeitler@mastodon.social avatar

    Rust, Askama, Axum, and htmx seem to quite common in #rust community - isn't it?

    Want to get my hands dirty on Rust but won't have time before middle of next week I guess.

    However trying to pile up some material to work through.

    Eventually looks like nice Event Sourcing solution on top of Postgres or are there other recommendations?

    (would prefer something on top of Postgres)

    mo8it,
    @mo8it@fosstodon.org avatar

    @alexzeitler Axum + Askama + SQLx is my recommended combination. I use it in multiple projects and would love to help with them. Just send me a PM whenever you have a question :D

    I also have some blog posts about them.

    Axum + Askama:
    https://mo8it.com/blog/getting-started-with-rust-backends

    SQLx:
    https://mo8it.com/blog/sqlx-interacting-with-databases-in-rust

    SQLx in Axum:
    https://mo8it.com/blog/sqlx-integration-in-axum

    khalidabuhakmeh, to rust
    @khalidabuhakmeh@mastodon.social avatar

    Hey #rust folks, I'm trying to figure out how to handle invalid form submissions with #rocket. There's a global catcher that returns a 422 (unprocessible entity), but I'd like to be able to handle a form post for a specific endpoint.

    mo8it,
    @mo8it@fosstodon.org avatar

    @khalidabuhakmeh I migrated from Rocket to Axum a while ago, but my guess is that you use a raw body extractor and process it yourself.

    Probably something in this direction:
    https://github.com/rwf2/Rocket/blob/97992b69b4f8c07385e5de5a7faeb9e7179ea987/examples/error-handling/src/main.rs#L27

    mo8it,
    @mo8it@fosstodon.org avatar

    @khalidabuhakmeh Yes, I started with Rocket and then migrated to Axum and never looked back. Here is my opinion on it:

    https://fosstodon.org/@mo8it/111824331640659334

    I highly recommend trying it out. Don't hesitate to ping me if you need any help 🥰

    ekuber, to rust
    @ekuber@hachyderm.io avatar

    What would you take out of this #Rust diagnostic? Is this too much information? Would you prefer to have a shorter message at the cost of needing multiple cycles of the compiler telling you you're missing a change?

    mo8it,
    @mo8it@fosstodon.org avatar

    @ekuber @wffl Doesn't that go in the direction of bacon?

    https://github.com/Canop/bacon

    mo8it, to rust
    @mo8it@fosstodon.org avatar

    I wonder how #Mojo can get away with lies regarding its latest benchmark.

    Fake news in tech are actually a threat?

    Tech entertainers like #ThePrimagen only make things worse by promoting these fake news without validation.
    Then he is quoted in a later Mojo blog post spreading bullshit about #RustLang and ignoring #JuliaLang. But debunking posts like this are ignored:

    ➡️ https://viralinstruction.com/posts/mojo

    Maybe tech shouldn't be an entertainment for Twitch…

    #Rust

    mo8it, to bevy
    @mo8it@fosstodon.org avatar

    Progress with my physics from scratch in 😇

    I was asked to simulate one sphere and plot its energy to validate my physics implementation.
    But since I use , I thought why not simulate 10000 spheres instead? 😂

    I don't understand the energy spike at the beginning, but at least the energy is stable later.

    A grid of 100x100 spheres bouncing on the ground without friction. A plot shows the potential, kinetic and total energy. The system gains some energy at the beginning, but oscillates then around 1.3x of the initial energy. At least it is stable.

    mo8it,
    @mo8it@fosstodon.org avatar

    I fixed the problem with the energy 😅

    I also ported the code to use f64 everywhere instead of f32 for physics.

    2^14 spheres this time ✨

    I also made the repository public but it will not be published as a library. It is just my educational progress with my thesis:
    https://codeberg.org/mo8it/master-thesis

    A grid of 128x128 spheres bouncing on the ground without friction. A plot shows the potential, kinetic and total energy. The total energy relative to the initial energy is at 1.0 with a slight decay over time.

    hds, to rust
    @hds@hachyderm.io avatar

    Join us next week at Rust for Lunch! The virtual meet-up that fits into your lunch-break.

    https://lunch.rs/meetups/2024-02-20/

    We’ll have a talk from @mo8it on Faster Rust Serialization.

    See you there?

    mo8it,
    @mo8it@fosstodon.org avatar

    🚩 SAVE THE DATE

    My online talk about how to speed up serialization with by up to 2.25x 🚀

    What to expect:
    🙂 A simple example with JSON
    🧐 How serialization in serde works
    🛠️ Manually implementing the Serialize trait
    🌟 Serialization with the newtype pattern
    ⏱️ Benchmarking with divan
    🤔 Discussing the overhead of allocations

    On Tuesday, 20 February at 13:00 CET

    https://lunch.rs/meetups/2024-02-20

    Boost? 🥰

    @hds

    mo8it, to rust
    @mo8it@fosstodon.org avatar

    Can we agree on one thing?

    Writing Rust code including macros generating more code in a crate that is fed to a custom transpiler that generates multiple Rust crates that you are supposed to then build and use in production doesn't make things easier :)

    #RustLang #Rust

    kubikpixel, to rust
    @kubikpixel@chaos.social avatar

    deleted_by_author

  • Loading...
  • mo8it,
    @mo8it@fosstodon.org avatar

    @geobomatic The linked crate is a client. I guess that @kubikpixel is looking for a server. In that case, my recommendations are lldap if you only need essential features and Kanidm otherwise:

    https://github.com/lldap/lldap

    https://kanidm.com

    Both are written in and therefore efficient and easy to deploy.

    I use lldap on my home server and can recommend it. I wanted to experiment with Kanidm in the next days though :D

    gregorni, to Julia
    @gregorni@fosstodon.org avatar

    Any Nim or Julia people out there that also do app development? Can I get some ✋?

    #Nim #Nimlang #Julia #JuliaLang #programming #appDevelopment #ProgrammingLanguages #Software

    mo8it,
    @mo8it@fosstodon.org avatar

    @gregorni What do you mean with "App" here? 😅

    mo8it,
    @mo8it@fosstodon.org avatar

    @gregorni Oh, I wouldn't recommend writing a desktop app using Julia, except for usage by scientists that also program and are able to install the Julia toolchain. The latency is too high for a deskrop app to be responsive.

    mo8it,
    @mo8it@fosstodon.org avatar

    @gregorni Time to first X because of the JIT.

    mo8it,
    @mo8it@fosstodon.org avatar

    @gregorni It is not about being slow in general, it is about the latency, the startup time, the freeze after clicking a button for the first time and so on. This is because of the just-in-time compiler (JIT). Python is interpreted. This means that it is slow, but its latency is rather low for desktop apps.

    Still, I wouldn't use a Python desktop app if I find an alternative. Look at ProtonUp. It works, but it looks awful and freezes often…

    Better use a compiled language for desktop apps.

    mo8it,
    @mo8it@fosstodon.org avatar

    @gregorni I just tried it, Letterpress is a very good app made by you :D

    ProtonUp is the example that I found in my installed apps. It is not representative and my average impression of Python apps is rather subjective.

    I don't have an experience with C# apps on Linux.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • JUstTest
  • ngwrru68w68
  • everett
  • InstantRegret
  • magazineikmin
  • thenastyranch
  • rosin
  • GTA5RPClips
  • Durango
  • Youngstown
  • slotface
  • khanakhh
  • kavyap
  • DreamBathrooms
  • provamag3
  • ethstaker
  • osvaldo12
  • tester
  • cubers
  • cisconetworking
  • mdbf
  • tacticalgear
  • modclub
  • Leos
  • anitta
  • normalnudes
  • megavids
  • lostlight
  • All magazines