News for hackers. Stuff that matters.

dystroy

Re:Show HN: A FPV Lego car, controlled in Rust on Tuesday July 14, 2026 @03:01AM (#48903167)
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.

Re:Encephalitis on Thursday June 04, 2026 @08:09AM (#48397511)
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.

Re:Box to Save Memory in Rust on Tuesday April 28, 2026 @10:05AM (#47934788)
Sorry (blog post author), the name of the field was given by AWS, I kept it as is on deserialization.
This disclosure has been added today, after some users here called them out for hiding that they were using AI to build it.
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.

Re:Why birds do not fall while sleeping on Thursday October 17, 2024 @10:47AM (#41870177)
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.

Re:Why birds do not fall while sleeping on Thursday October 17, 2024 @02:37AM (#41866993)
People who do robotics, is efficient stable balancing at rest something which is studied and applied ?
Re:Why birds do not fall while sleeping on Thursday October 17, 2024 @02:36AM (#41866985)
If you look at the article, you'll see the picture of such sculpture (a rather impressive one, by the way).
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.

Re:Montaigne Documentation on Thursday February 15, 2024 @01:52PM (#39386744)
Is your master thesis online ? A link would be welcome (whatever the language).
Re:Montaigne Documentation on Thursday February 15, 2024 @01:09PM (#39386095)
Montaigne is at least the third French writer to be featured as a (good) static site generator, after Hugo and Zola.
Re:Freenginx: Core Nginx developer announces fork on Thursday February 15, 2024 @12:19PM (#39385381)
This might even look like enough a reason to spend the rest of their life maintaining it.
Re:JSONB Has Landed in SQLite on Wednesday December 06, 2023 @06:09AM (#38542469)
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.

Re:Rust Without Crates.io on Tuesday November 14, 2023 @06:33AM (#38261994)
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.

That's what's missing. When I click on a pointer, its owner should have the article replaced with a "GAME OVER" message.
Re: on Thursday September 28, 2023 @04:55AM (#37687045)
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.

Re:Modular forms, the ‘fifth fundamental operation’ of math on Friday September 22, 2023 @07:10AM (#37610481)
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.
Re:What Is Wrong with TOML? on Wednesday September 13, 2023 @02:51PM (#37500209)
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.

Re:What Is Wrong with TOML? on Wednesday September 13, 2023 @10:34AM (#37497299)
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.
Re:What Is Wrong with TOML? on Wednesday September 13, 2023 @07:21AM (#37495237)
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.

Re:Removing Garbage Collection from the Rust Language (2013) on Monday September 11, 2023 @07:08AM (#37465493)
Rust noob here. Can you please explain how removing '~' and '@' by moving the GC to a library makes async harder ?
Re:Code Shelter on Thursday September 07, 2023 @08:27AM (#37417932)
This is attractive but the chat doesn't look very lively. How successful and active is Code Shelter ?
Re:Exa Is Deprecated on Thursday September 07, 2023 @08:08AM (#37417751)
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 ?)

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

Re:Exa Is Deprecated on Thursday September 07, 2023 @07:10AM (#37417248)
> "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.

Older »