HNHacker News
TopNewBestAskShowJobs

dystroy

487 karma · joined May 3, 2012

Freelance Rust programmer and FOSS author.

https://dystroy.org

submissionscomments
dystroy··on Show HN: A FPV Lego car, controlled in Rust
In addition to deepening my knowledge of Rust Embedded, the challenge was to make the most of standard LEGO parts, the servo, the motor, and especially the power supply (LEGO Power Functions pack of 6 AA batteries).

Non LEGO parts are mostly a Raspberry Pico W (for Wi-Fi control), an arducam (video stream), a Kitronik 5331, a buck converter, and a lot of jumper cables.

What I found most interesting, as a Rust programer, is how similar the backend and embedded code are. Even with the constraints of no_std, the parallel code running on the small Pico looks like your standard rust backend, even while there's no OS and almost no memory on this small chip.

dystroy··on I was recently diagnosed with anti-NMDA receptor encephalitis
You know, my first reaction after reading this was to appraise the quality of your writing, which convinced me your brain recovered.

Wishing you health, of course. The world is better with you in it.

dystroy··on Box to save memory in Rust
Sorry (blog post author), the name of the field was given by AWS, I kept it as is on deserialization.
dystroy··on Show HN: Ferrite – Markdown editor in Rust with native Mermaid diagram rendering
This disclosure has been added today, after some users here called them out for hiding that they were using AI to build it.
dystroy··on Show HN: Ferrite – Markdown editor in Rust with native Mermaid diagram rendering
Termimad author here: I’m always a bit afraid, when I see the popularity of this crate, that it might be undue and that people may lose time trying to use it when it’s probably not the tool they need.

Termimad isn’t a full-fledged TUI framework. It can be used to build TUIs (I made broot, bacon, safecloset, etc. with it), but if you want to quickly build a TUI and compose UI components and widgets, you’ll probably find it much easier to choose a real TUI framework (e.g. ratatui).

Termimad isn’t a generic Markdown viewer either. Markdown is mainly used as a language for the developer to describe parts of the interface—especially rich text—inside a TUI. People interested in rendering arbitrary Markdown files will find that it lacks features such as image rendering.

dystroy··on Why birds do not fall while sleeping
We don't know exactly why nature can't do otherwise, but any complex brain has to sleep.

Some animals, mainly sharks which can't stop or they would be asphyxied, deal with that by having kind of 2 brains which are never both sleeping at the same time.

dystroy··on Why birds do not fall while sleeping
People who do robotics, is efficient stable balancing at rest something which is studied and applied ?
dystroy··on Why birds do not fall while sleeping
If you look at the article, you'll see the picture of such sculpture (a rather impressive one, by the way).
dystroy··on Show HN: Codesort sorts your code, in the CLI or in your IDE
Imagine you have a big enum in Rust, for example an Error, with a dozen or more variants.

When maintaining related code, for example a Display implementation, or routing to some behaviors, it's sometimes much easier when it's alpha sorted: you immediately see what's implemented or not.

That's when you can hit the codesort shortcut to have this specific list (enum variants, match arms, etc.) sorted.

dystroy··on Montaigne Documentation
Is your master thesis online ? A link would be welcome (whatever the language).
dystroy··on Montaigne Documentation
Montaigne is at least the third French writer to be featured as a (good) static site generator, after Hugo and Zola.
dystroy··on Freenginx: Core Nginx developer announces fork
This might even look like enough a reason to spend the rest of their life maintaining it.
dystroy··on JSONB has landed
Imagine you need to attach to some records a bag of data which you always fully need or not. This bag may have a tree structure, which is expensive to deal with in a relational model. An example would be the JSON configuration of a component/client/whatever. In such a case, trying to fit this bag of data in a relational model would be inefficient.

Those bags of data are usually called "documents". And a lot of systems need a way to store them along relational data.

If you're just storing and retrieving those documents, without any query, you don't need JSONB, a simple blob is enough.

If you sometimes need to do some queries, especially free queries (you want all component whose configuration has some property), then JSONB is suitable as it lets you do the filtering in the database.

dystroy··on Rust without crates.io
Having vetted repositories of libraries looks neat but it's harder in practice than what the article lets appear.

A problem for such repositories like the Debian one is that it can only contain vetted versions of libraries. Many Rust libraries are still 0.x and have changing API and frequent updates, which makes it hard to vet all dependencies, especially when an update implies updates of the dependents.

dystroy··on What every software developer must know about Unicode in 2023
But not all normalizations are done to fight spam, not all of them should be interested in visual similarity.

I normalize strings in searches not because of bad intents but because for all user related purposes "Comunicações" and "Comunicações" are the same, their different encodings being more of an accident.

dystroy··on What every software developer must know about Unicode in 2023
That's what's missing. When I click on a pointer, its owner should have the article replaced with a "GAME OVER" message.
dystroy··on Show HN: Nav – A terminal navigator for interactive `ls` workflows
broot can be used to replace tree (i.e. be non interactive): https://dystroy.org/broot/tricks/#replace-tree

This is convenient when you don't want to browse or search, just want what tree does but without scrolling.

dystroy··on Modular forms, the ‘fifth fundamental operation’ of math
Fundamental research can also exist without looking at applied research. Understanding the world and finding the beauty in its fabrics is a legit goal per se, we're humans, not ants or traders.
dystroy··on What is wrong with TOML? (2019)
This is theoretically possible, and I actually toyed with the idea.

I didn't do it in my deserializer because of the big value you have in Rust in being compatible with serde and that wouldn't be. But this would be interesting, probably as an side library.

dystroy··on What is wrong with TOML? (2019)
A lot of formats are Hjson compatible, notably JSON, and also what users wrote thinking it was JSON but they forgot some quotes or had a trailing comma so the JSON parser refuses it while the Hjson one is perfectly happy.
dystroy··on What is wrong with TOML? (2019)
I previously argued that TOML wasn't good enough in this blog post https://dystroy.org/blog/hjson-in-broot/ where I show an example of problem which frequently hurts my users and leaves them lost without even understanding that the problem is in how they wrote their TOML.

I moved the configuration of several of my programs to Hjson. There are still problems but they're less puzzling. Hjson isn't ideal either but might still be the best configuration format we have today.

dystroy··on Removing garbage collection from the Rust language (2013)
Rust noob here. Can you please explain how removing '~' and '@' by moving the GC to a library makes async harder ?
dystroy··on Code Shelter
This is attractive but the chat doesn't look very lively. How successful and active is Code Shelter ?
dystroy··on Exa Is Deprecated
The ability to have broot immediately exit is based on its ability to receive commands, either at start or through sockets. So in this case we're just doing `br --cmd :print_tree`. The same strategy can be used to add searches, filters, toggles, etc. before printing the tree (or printing a path).

To not elide files, the easiest solution is to provide a max height: `tree --height 5000`

No support of LS_COLORS exactly.

No option today to show on a file whether it is gitignored (never considered this: my users either show gitignored files or don't).

You can completely customize file properties order: https://dystroy.org/broot/conf_file/#columns-order

(it's hard to answer complex questions and rfc here, maybe come to the chat for an interactive discussion ?)

dystroy··on Florida man arrested after trying to cross Atlantic in hamster wheel vessel
> The US Coast Guard intercepted Reza Baluchi about 70 miles (110km) off Tybee Island

Was he carried here by the current ? I can't imagine this device can really be efficient, am I wrong ?

dystroy··on Exa Is Deprecated
> "Hey, maintainer isn't active anymore but there's still interest in the project, maybe we should do something about this"

When the project isn't huge (think linux sized) it looks like the best solution, with able persons forking the project and trying to revive it. And if they don't manage to revive it (it's hard to know in advance who will be strong and available enough) maybe another fork will.

dystroy··on Exa Is Deprecated
Maybe use broot ? Its tree view is its main feature and it handles gitignore and shows many stats including dir sizes. https://dystroy.org/broot/

You can use it just like the original tree tool too: https://dystroy.org/broot/tricks/#replace-tree

(disclaimer: broot author)

dystroy··on Antonmedv/walk: Terminal file manager
What's too complex ?

I'd like to get more information on what is less obvious than it was at the beginning and any hint on how to fix that. Broot's chat is always open for that.

dystroy··on Ask HN: Could you share your personal blog here?
https://dystroy.org/blog/

Most popular ones:

- How not to learn Rust: https://dystroy.org/blog/how-not-to-learn-rust/

- my plea for Hjson: https://dystroy.org/blog/hjson-in-broot/

- How to store secrets: https://dystroy.org/blog/secret-storage/

- Use broot and meld to diff before commit : https://dystroy.org/blog/gg/

dystroy··on New(ish) command line tools
I really like the approach of pipe-rename (https://github.com/marcusbuffett/pipe-rename) for renaming many files. It's especially convenient for people who can efficiently edit many lines in their favorite text editor (so everybody here, I guess).

Main problem: you maybe don't do this kind of operation frequently enough to remember how it's called or how you aliased it.

Page 1 of 4Next →