programming

De-Tabifying

There is probably no more boring task in programming than processing a file to replace tabs with spaces or doing the reverse and replacing spaces with tabs. And yet it has started religious wars that have raged for years in various programming communities. This “tabifying” or “de-tabifying” is not something I have to do frequently, but every once in a while, I need to convert tabs to spaces in some text.

Leiningen passing Invalid Flags to Java Compiler

Just a note about some weirdness in my work process and it’s solution. A few weeks ago, I started noticing some weirdness in trying to use some tools with Leiningen while developing a program in Clojure. When running tools like kibit, lein would fail with an error from javac about an invalid flag. Initially these flags were for attempts to set the file encoding. And the file encoding kept changing.

Keeping the JavaFX UI Responsive

It’s common knowledge that the JavaFX user interface toolkit is single-threaded. When your JavaFX-based program is doing things that can take some time, you need to run those tasks on a separate thread(s) to keep the interface responsive. Recently, I’ve been working on a program that can spend a lot of time reading and writing to the disk, but at the same time I want to retain the ability for the user to change views of the UI as the work proceeds.

Clojure/Script has Ruined Me for Other Languages

The Elm language is often cited as an up-and-comer for web front end development. I was attracted to it largely because of the compiler’s friendly and extremely helpful error messages. It’s really attractive in many ways. But when I started looking at examples, I often found myself thinking things like “Why is this so inconsistent?” or “Why is this syntax so complicated?”. And it finally occurred to me that I’ve been ruined by the way Clojure/ClojureScript/Lisp/Scheme do things.

Speech Synthesis in ClojureScript

Just like everyone else, it seems, I’ve been following all of the news about voice-activated personal assistants. There are all the commercial offerings like Siri, Alexa, Cortana, and so on, as well as some DIY projects on the web, like this one and this one and this one.

These types of projects typically involve a front end that converts voice to text, some middle piece that interprets the text and obtains some answer or creates an action, ending up with a voice response by the system back to the user. I have some (out-of-date) experience with speech to text, but not the other end of the process: text to speech. So here’s a little investigation into how to do it with ClojureScript. Turns out that it is almost trivial these days.

Reflections on NIH Syndrome

During the past few weeks, I’ve been thinking about “To Do” lists – specifically how I wanted one. It was my plan to write my own, despite the fact that I have been using Evernote for years and that there are literally thousands already out there already. For the longest time, it never even occurred to me to use a manager that already existed. Or even just to use pen and paper for the simple lists I needed.