HN user

dystroy

487 karma

Freelance Rust programmer and FOSS author.

https://dystroy.org

Posts10
Comments106
View on HN

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.

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.

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.

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.

Montaigne is at least the third French writer to be featured as a (good) static site generator, after Hugo and Zola.

JSONB has landed 3 years ago

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.

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.

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.

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.

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.

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.

Code Shelter 3 years ago

This is attractive but the chat doesn't look very lively. How successful and active is Code Shelter ?

Exa Is Deprecated 3 years ago

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 ?)

Exa Is Deprecated 3 years ago

"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.

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.

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.