14-07-2020 Smileys are ubiquitous on the internet today. They are, however, unefficient. Take, for example, the two smilies often used to express happiness: :) and :D The first is used for general happiness, the other for extraordinary happiness. This is, in my opinion, way too limiting. It's also too difficult to type. Reaching that far across your keyboard to type first a colon, then a parenthesis or other symbol, is way too complex for a simple chat message in certain situations, like online games where you can't pause for messaging for too long. So, what's the solution? I introduce you to... Russian smiley notation! It works like this: Instead of mimicking a face with eyes and optional nose, it's just the mouth. A simple smiley-face is written like this: ) Stronger opinions are expressed by adding more parentheses. A very big smile: )))))))))))) Now, this looks like lisp code, but it's very expressive, and that's why I like it. There's no real reason to use a colon, we recognize it as a smiley without it. And that is why I like the Russian notation method. It's basically an optimization and improvement over the more common method.
19-06-2020 Discovered a really cool tool today I'll be using for C development/prototyping. It's called picoC and tries to be a very minimal C interpreter written in only 3500 lines of C. I use it primarily for prototyping and experimenting with C without having to recompile and run a program every time I want to see a change. For example, if I'm a complete beginner and want to know what value the EOF constant has, I can simply fire up picoC and write printf("%d", EOF); to get my answer. I actually started looking for a program like this after watching someone do a project in Haskell using the GHCi compiler, an interactive compiler for the language. GHCi lets you recompile the program while in the interpreter and from there interact with the program. This makes it much easier to debug the program. Ever since I saw GHCi in use, I've wanted something similar for the language I'm learning, C. picoC doesn't quite fulfill this role, but it sure is useful for prototyping and testings stuff out. GDB, the GNU debugger, looks to be approximately what I want, but I find it to be extremely buggy, ironically.
07-06-2020: Finally fixed up my blog. This time, instead of using fancy programs and scripts, I just use a single php page that cat(1)'s out a .txt file. Incredibly minimal, only two lines to get it working: <?php $output = shell_exec('cat posts.txt'); echo "<pre>$output</pre>"; ?> (Of course, you can do this in one line, I just think it looks better with two.) Update: Found out this also works wiht html tags, so I can format my text interestingly.