A couple more commits to , mainly example code I've been playing with but isn't really ready for the general case yet.

TBH, I haven't got to a point where I'm as fast answering mail on as I am on . And the fastest mail interface for me is actually my phone — I bang through email on that.

Oh no! Maybe the last 20 years of usability wasn't wrong after all!

I have the terrible feeling as I write POSIX shell code that I'm just recapitulating the mistakes of previous generations.

But it feels good to walk in smarter peoples' boots—even if it's off a cliff.

Pretty sure I just turned a chunk of C code into a shell one-liner.


omg omg somebody just liked my github project and is asking about it on IRC.

Keep calm, @mala. Don't blow it by seeming too keen. Just ... keep ... smiling... as they clone the repo..

Ah! Suddenly articles on command-liney email handling pop up on Hacker News! My preternatural sense of geek zeitgeist and/or confirmation bias is tingling!


(I commented, even though that's probably horribly premature)

okay! that was not as bad as I thought! I think I need to learn more about Makefiles and organizing objects file , but the code from Leah's mblaze linked nicely into my existing code.

In the end, I just git cloned their repository into a directory prefixed "vendor" and then referred to it directly. I guess I should pin it down to a particular checkout at some point. But that point is not now!

okay, it's probably me procrastinating, but I decided to create a test maildir that isn't just my own mail (so I can write tests, and also livestream me coding, which I find keeps me on track). I'm using the Enron corpus, which is interesting in itself... cs.cmu.edu/~./enron/ github.com/dannyob/mblaze-much

I realise that I'm blocking because the next thing to do is a) hard, and b) workaroundable, and so I'm tempted to just continue doing the easy thing...

Aha! I am at the point with where I am a bit bored, disillusioned and likely to give up. Gonna power through it! Who wants to keep me accountable?


* eval in shell isn't as bad as eval in every other language (maybe because /everything/ in shell scripts is as bad as eval in other languages).
* I wonder how much easier it would be if you learned Unix in historical order. Remembering sci-fi stories of code archaeologists.
* I'm already collecting a bunch of one-liner recipes unique to my setup. I think Unix culture could have done with a better way of passing one-liners to new people.


I'm just going to sleep on this, and commit my "example" one-liners for now.

BTW if you enjoy watching somebody chin-stroke through their code like this, but wish it was somebody actually good at coding, I heartily recommend @mconley 's Joy of Coding youtube.com/user/mikeconleytor

ooh i'm getting into serious stuff now. I want to use some of mblaze's parsing cleverness, which means linking an object library to my c code. I HAVE NO IDEA WHAT I'M DOING.

okay I have written a few one-liner helper scripts and I'm now at the point that I can read my notmuch inbox with mblaze... not /swiftly/ and maybe i'm just enamored with the novelty, but it feels a little less overwhelming already

but i should sleep

* Drafting manpages is harder than it looks -- or perhaps, exactly as hard as it looks. I feel I may have fallen into a trap using mdoc, but right now it seems much clearer than the old man macros.

* Look at this, a history of man pages! manpages.bsd.lv/history.html


* Breaking these down into little utilities was a good idea. Things have got simpler, and also I may be able to more easily remove extra cruft in the future.

* Writing getopt with short options and a terse usage statement feels like I'm in 70s Unix re-enactment society. Not in a bad way!

* I hope someone is recording the oral history of UNIX before we start losing the memories.

* I am so slow at this!

* I do love git-cola! git-cola.github.io/

more notes!

* Rather than load up complexity in the binary I'm writing, I'm going to split it into two smaller utilities. LIVIN' LA VIDA harmful.cat-v.org/cat-v/unix_p

* I realized that one of the niggles I have with mutt is that it feels perceptually slow, especially when I'm dealing with filing lots of mail. I'm going to try to keep to Paul Buchheit's maxim of sub-100ms interaction. I think that's about 10K of lines printed on kitty, the fast terminal I use these days. Maybe doable?


* fgets and gets are kind of a mess in how they handle '\r' and bounds checking. I wonder what the history is there?
* It's still pretty hard to find simple versions of common C tricks online. For instance:
buffer[strcspn (buffer, "\r\n")] = 0;
looks like an acceptable way to strip EOL chars from a fgets, but it took me a while to find it. Useful function though!

More conclusions
* I still don't know how to stop once I get going.
* I'm pretty slow.
* DevDocs is great for C documentation.
* C constantly tempts you into concise, but unsafe forms (especially regarding array bounds checking)
* I don't like two braces straight after another in the same indent level. There's something weird with my uncrustify settings here.
* Somebody should have decided on a single canonical way to escape text. Oh well.

so i feel obliged and excited to hack on again but it's 22:22! I will do a little bit. I have it hooked up to my beeminder, so beeminder.com/dannyobrien/mbla it is part of my Holy Duties.

Show older

Server run by the main developers of the project 🐘 It is not focused on any particular niche interest - everyone is welcome as long as you follow our code of conduct!