Posts

Procenv v0.58 released

Another procenv release that is bringing the OSX version up to parity. Also, thanks to harens , procenv is now available in MacPorts ! If anyone knows about querying IPC details on Darwin (via Mach?), please comment on the GitHub issue (or raise a PR :)

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 .

Procenv 0.46 - now with more platform goodness

I have just released procenv version 0.46 . Although this is a very minor release for the existing platforms (essentially 1 bug fix), this release now introduces support for a new platform... Darwin Yup - OS X now joins the ranks of supported platforms. Although adding support for Darwin was made significantly easier as a result of the recent internal restructure of the procenv code, it did present a challenge: I don't own any Apple hardware. I could have borrowed a Macbook, but instead I decided to see this as a challenge: Could I port procenv to Darwin without actually having a local Apple system?  Well, you've just read the answer, but how did I do this? Stage 1: Docker Whilst surfing around I came across this interesting docker image: https://hub.docker.com/r/andrewd/osxcross/ It provides a Darwin toolchain that I could run under Linux. It didn't take very long to follow my own instructions on porting procenv to a new platform . But although I

Procenv 0.45 released

Yesterday, I released procenv 0.45 . Although not a huge amount has changed on the outside in this release, rather dramatic changes have occurred on the inside, as evinced by the following: $ git diff 0.44..0.45 --stat|grep "src / .*\.[ch] "  src/messages.h                          |    41 +  src/output.c                            |  2001 ++++++  src/output.h                            |   179 +  src/platform-headers.h                  |   243 +  src/platform.h                          |   167 +  src/platform/android/platform.c         |    46 +  src/platform/freebsd/platform-freebsd.h |    43 +  src/platform/freebsd/platform.c         |   479 ++  src/platform/hurd/platform-hurd.h       |    38 +  src/platform/hurd/platform.c            |    91 +  src/platform/linux/platform-linux.h     |   174 +  src/platform/linux/platform.c           |  2176 ++++++  src/platform/minix/platform-minix.h     |    25 +  src/platform/minix/platform.c           |   126 +  src/platform/netb

Procenv 0.43 released

(Cough... This should probably be called the " I-almost-forgot-I-had-a-blog release "! :-) Development has now moved to github: https://github.com/jamesodhunt/procenv So you can grab the release files here: https://github.com/jamesodhunt/procenv/releases The move to github brings a few advantages, including Travis-CI integration: https://travis-ci.org/jamesodhunt/procenv (btw - does anyone know of a CI solution for FreeBSD?) Even more awesome being that, thanks to the wonder of webhooks, procenv is now building for lots of distros. Take a look at: https://build.opensuse.org/package/show/home:jamesodhunt:procenv/procenv So you get to see the environment those builds run in and OBS is also providing procenv packages! Here's the funky download page (just click your distro): https://software.opensuse.org/download.html?project=home%3Ajamesodhunt%3Aprocenv&package=procenv Caveat emptor: those packages are building off the tip, so are not nec