Posts

Showing posts from May, 2021

rout is out

I’ve just released the rout tool I mentioned in my last blog post about command-line parsing semantics . rout is a simple tool, written in rust, that produces unicode utf-8 output in interesting ways. It uses the minimal command-line parsing crate ap . It also uses a fancy pest parser for interpreting escape sequences and range syntax. Either grab the source , or install the crate : $ cargo install rout Full details (with lots of examples! ;) are on both sites: https://crates.io/crates/rout https://github.com/jamesodhunt/rout

Can you handle an argument?

TL;DR This post explores some of the darker corners of command-line parsing that some may be unaware of. You might want to grab a coffee. Intro No, I’m not questioning your debating skills, I’m referring to parsing command-lines! Parsing command-line option is something most programmers need to deal with at some point. Every language of note provides some sort of facility for handling command-line options. All a programmer needs to do is skim read the docs or grab the sample code, tweak to taste, et voila! But is it that simple? Do you really understand what is going on? I would suggest that most programmers really don’t think that much about it. Handling the parsing of command-line options is just something you bolt on to your codebase. And then you move onto the more interesting stuff. Yes, it really does tend to be that easy and everything just works… most of the time. Most? I hit an interesting issue recently which expanded in scope somewhat. It might raise an eyebrow for ...

(Lots of) new procenv release(s)

(Lots of) new procenv release(s)   procenv is now at version 0.55 . Significant changes since version 0.46 : FreeBSD and Hurd fixes. Show if running in a VM. --memory now shows more memory details. More capabilities. PROCENV_EXEC fixes. Further details on the release page .