det.social is one of the many independent Mastodon servers you can use to participate in the fediverse.
Mastodon Server des Unterhaltungsfernsehen Ehrenfeld zum dezentralen Diskurs.

Administered by:

Server stats:

1.8K
active users

#softwaredevelopment

26 posts25 participants4 posts today

🚀 Porting libmagic to Rust: Safer File Identification 🚀

A little while ago (maybe a month or two), I started porting a great project to Rust: libmagic, the library behind the `file` command utility.

🤔 Why did I do that?
For years, I've faced the same issue with file identification: embedding a C library that does intensive parsing into my memory-safe code (Rust, Go, Python, etc.). While I trust the file/libmagic developer community's code quality, I know there are skilled people capable of finding and exploiting bugs—especially in C/C++ parsers. So I've always been reluctant to run libmagic on untrusted input, which creates a tricky situation that kind of defeats its original purpose: categorizing files you know nothing about.

🦀 Why Rust?
Rust is the perfect fit for this port. It provides strong safety guarantees while maintaining high performance and easy bindings to other languages (C/C++, Python, Go, Elixir, etc.). Bonus: the library and tool will be portable to all Rust-supported targets.

💻 Show me the code!
Here it is: github.com/qjerome/magic-rs/pu
⚠️ Note: This isn't a full implementation yet—it's still a work in progress and needs more work for a usable, clean version (see PR description). That said, if you're feeling adventurous, you can test it out. It already successfully identifies several file types: MS-DOS executables, ELF binaries, scripts, and more.

🔄 Compatibility with C libmagic file format?
This project aims for 99% compatibility with libmagic's rule file format. A few rules (such as those using ternary notations in messages) may need adjustments, but the goal is to stay true to the existing specification.

📌 What's next?
- Finalize the library implementation and publish a Rust crate
- Complete the CLI tool (a `file`-equivalent implementation)
- Create bindings for other languages

If you're interested in this work, don't hesitate to follow along or reach out!

Special thanks to @adulau and @circl for supporting this work! 🙏

This is early development branch so the code:

may contain garbage
may contain inconsistencies
is lacking documentation
does not contain all tests
is lacking features / implementations
is likely no...
GitHubadd: very first implementation by qjerome · Pull Request #1 · qjerome/magic-rsBy qjerome

"Using multiple AI agents in tandem opens up impressive possibilities. “AI agents encode the wisdom of senior engineers and apply it universally,” Yahav says.

Looking to the future, Digital.ai’s To anticipates productivity gains with fewer errors and reduced cognitive load, as developers tap various agents for lower-level details. “As this space matures, multi-agent workflows will increase velocity by significantly reducing toil,” he says.

But doing this well will require clear boundaries around product requirements, coding standards, security policies, and more.

In short, AI tools require intention. “An agentic software development life cycle needs the same pillars that a high-performing human team does: a clear mission, a code of conduct, and shared knowledge,” adds Wang.

So, although we’re heading toward a future where developers manage a fleet of agents, early testers should prepare for a lot of trial and error. As Roeck puts it, “Get ready to fail. This isn’t baked yet.”"

infoworld.com/article/4035926/

InfoWorldMulti-agent AI workflows: The next evolution of AI codingInstead of working with a single coding agent, developers will soon realize gains by guiding a team of them.

For my next #Perl #blog post, should I write about:

* Util::H2O::More as an alternative to Moo for #OOP modulinos, or
* Log::Any to log to the #Apple #macOS unified logging system?

Some background:
* Moo with modulinos: phoenixtrap.com/2025/08/03/moo
* Util::H2O::More: metacpan.org/pod/Util::H2O::Mo
* Log::Any: metacpan.org/pod/Log::Any
* Apple’s unified logging system: developer.apple.com/documentat

clear glass with mood steam text
The Phoenix Trap · Lightweight object-oriented Perl scripts: From modulinos to moodulinosDeveloping a complex Perl script that needs just a llittle object-orientation? Try the modulino pattern alongside the lightweight Moo module.