Latest articles

Introducing DuckFuck (v0.2): D-based FuckFuck and More!

Filed under "Things I've put far too much effort into"...

Introducing DuckFuck: A flexible, modular D-based interpreter/conversion system for FuckFuck and other BrainFuck-based languages. Includes the DuckFucker: A command-line tool to interpret any supported language.

Currently supported:

Languages:

Backends:

  • Compile time conversion to D
  • Runtime Interpreter

Sample usage:

// Hello World! Interpreted brainfuck at runtime. brainfuck(" This is a basic hello world in brainfuck >+++++++++[<++++++++>-]<.>+++++++[<++++>-]<+.+++++++..+++.>>>++++++++[<++++>-] <.>>>++++++++++[<+++++++++>-]<---.<<<<.+++.------.--------.>>+. Neat huh? "); writeln(); // Echo. Converted from fuckfuck to D at compile-time. auto echoThis = "Echo this!"; mixin(fuckfuck!(echoThis, null, " /* This is 'echo' in fuckfuck */ knob /* read input to current tape cell */ ARSE /* Inside the loop */ COCKKNOB /* write output at current tape cell, read input */ B U T T /* repeat until current tape cell is \x00 (ie, end of file - automatically sent when input string is exhausted) */ "));

or:

$duckfucker hello.bf Hello World! $duckfucker echo.ff < input.txt > output.txt

Input and output can be from (mix and match!):

  • stdin/stdout (default)
  • named array
  • generator/sink function

Links:

Read more


You Are Wrong: Tourette's is NOT Swearing

Alright, I'm more than fed up with this. It's long past time to get this straight:

Tourette's Syndrome has nothing to do with swearing

Really.

Hollywood is wrong (gee, how could that be?!), and your friends are wrong. Tourette's is not swearing. Involuntary swearing is an entirely different thing known (by those few people who actually have a slight clue what they're talking about) as Coprolalia.

Even the most basic Internet research would have made that blatantly clear:

And yes, while it does say that a small percentage of people with Tourette's also have Coprolalia, it also makes it clear that Coprolalia isn't even limited to Tourette's patients at all. Tourette's is not swearing.

If you don't trust WebMD or Wikipedia, then go check a formal medical book. Really. Do it. Now. Prove me wrong.

So can we as a society finally grow up and move on now?

Read more


Doesn't Anyone Understand Proper Usability Design?

A new Linux user (Debian-based. Umm...the OS, not the user) learns how to install software:

$apt-get install [list of package names] Barf, GTFO. Are you root? $sudo make me a sandwich make: *** No rule to make target `me'. Stop. $sudo apt-get install [list of package names]

Great!

Then eventually they need to upgrade something:

"Obviously I'm not trying to install it, it's already installed! I just want it updated. Hmm, but how do I do that?"

$apt-get --help ... install - Install new packages (pkg is libc6 not libc6.deb) ...

"Hm, ok, yes, once again, it's obviously not install, because I'm not trying to 'Install new packages'. Just update exiting ones. Let's look at the other options..."

update...

"Bam! That must be it!"

(Don't anyone try to tell me you've never been impulsive like this. It doesn't matter how much of an expert you are: You've done it, and you know it.)

$sudo apt-get update foosoft E: The update command takes no arguments

"WTF? Hmm, well I guess I didn't actually bother to read it..."

update - Retrieve new lists of packages

"Oh! Ok, of course that didn't work. Silly me! So then what do I want...?"

upgrade - Perform an upgrade

"The upgrade command upgrades? No crap! (Must have been a job for Captain Obvious and his trusty sidekick, Shit Sherlock.) Well, obviously I want to upgrade the package that I'm trying to upgrade, so it's pretty damn obvious which command to use:"

$sudo apt-get upgrade foosoft ...bunch of upgrading...

"Hmm, it looks like it's upgrading the dependencies, too. Neat! Some of them seem odd, but they must be indirect dependencies. Ah, it's done!"

$foosoft FooSoft v2.8

"Yay! The new version!"

Those of you truly familiar with apt-get already know where this is going...

Months later...(actually around two years in my case...yes, I'll admit this all actually happened to me...)

"I need to upgrade something again:"

$sudo apt-get update^H^H^H^H

"...Crap, that's right, it's the other one:"

$sudo apt-get upgrade barzoom ...whiiirrrrr... done $barzoom Barz Oom v1.0 (Ha ha! You thought it was "Bar Zoom"!)

"WTF! That's the version I already had!"

$sudo apt-get upgrade barzoom Fuck you, I did my job already.

"Grrr!!!"

Do you know what's happening?

The apt-get upgrade doesn't upgrade specific packages. In fact, it doesn't even take any package names as parameters at all, but you wouldn't know that from either the help page or from apt-get's actual response to your command. What apt-get upgrade does do is upgrade all the packages on your system that can be upgraded without new packages being installed. (Apparently, apt-get dist-upgrade does the same, but allows new packages to be installed.)

So normally, it all seems to work fine because the package you request (*ahem*, that is, the package you thought you requested) is one of the packages on your system and apt-get upgrade simply tries to upgrade all of them. But then, when a new version of your program comes out that has a new dependency you don't already have, apt-get upgrade skips your package.

So what are you supposed to do?

Even though apt-get's help page never bothers to mention it, you're actually supposed to use the install command to upgrade any specific programs that are already installed. Yup, that's right. Exactly the command that "obviously" couldn't have been the right one.

Here's what should have happened:

"I want to upgrade foosoft. Hmm, but how do I do that?"

$apt-get --help ... update... ...

"Bam! That must be it!"

$sudo apt-get update foosoft Error: The update command retrieves a list of new packages. It takes no arguments.

"Oh, I see. That was the wrong one. What else is there?"

upgrade...

"The upgrade command upgrades? No shit, Sherlock! Clearly this must be it:"

$sudo apt-get upgrade foosoft Error: The upgrade command takes no arguments because it upgrades all packages (without installing new ones). To upgrade specific packages, use the 'install' command.

"Whaa...? Lemme look at that help page again..."

upgrade - Upgrades all possible packages (without installing new ones) install [package list] - Install or upgrade specific packages

"Ahh, alright. I get it now."

$sudo apt-get install foobar ...whiiirrrrr... done $foosoft FooSoft v2.8

"Yay! The new version!"

Months later...

"I need to upgrade Barz Oom:"

$sudo apt-get update^H^H^H^H

"...Crap, wait, that's just the list of packages."

$sudo apt-get upgrade barzoom Error: The upgrade command takes no arguments because...

(Smacks forehead) "Of course! I knew that! What the hell is wrong with me today?"

$sudo apt-get install barzoom ...whiiirrrrr... done $barzoom Barz Oom v1.0 (Ha ha! You thought it was "Bar Zoom"!)

"Awesome!"

$thank you You're most very welcome, of course!

Remember: When you write software, make sure to think through its interactions through the eyes of a new user.

As a side note, I'm curious: Are there any people out there who primarily use Linux (an apt-get based distro) that didn't already know this about apt-get? If you did know, how did you find out? Did you always know? Drop a note in the comments section!

Read more


Communism and Open Source

Random thought of the day:

Communism sounds great on paper (Well, except maybe the whole "bloody revolution" thing...) Apparently though, it turned out not to work.

Open source, on the other hand, is much like communism, at least in general philosophy, but it actually does seem to work. And quite well, too.

I've heard that the currently prevalent archaeological belief is that the Egyptian pyramids were built by volunteers as a community project, not by slave labor as previously thought (and as apparently still thought by Hollywood). Kind of makes sense, actually, since intrinsic motivators are well known to be far more effective than extrinsic ones, and that would have been important since it was an enormous physical, logistical and...engineerical(?) undertaking. 'Course that does still leave open the possibility of mass brainwashing into submission by the Goa'uld or the Ori...

And those pyramids (minus the Stargate tangent) actually sound similar to another story I've heard about a community-built Soviet project (a bridge, IIRC?) that was apparently the exception to the rule and actually did manage to work out. (Yea, I'm a real global expert, aren't I?)

Maybe the problem (or "a" problem?) with communism was that it was too large-scale. Or maybe people just weren't ready for it. Perhaps the key is to use it in certain individual projects rather than as a fundamental base - much like OOP or functional programming. Or maybe I just don't actually know a fucking thing about what the term "communism" really means...Which is entirely possible...

Read more


I'm Supposed to Believe This is Progress?

I have a great idea for an enormous increase in computer speed! VM's are fantastic, right? Like JVM, .NET, the runtimes of various interpreted languages... Sure, why not? They're wonderful things. Hell, how did we ever manage to scrape by without them? Fuck native code! That shit sucked! And worse yet, it's the old way! I ain't no dinosaur! But we always want more speed, right? Well, VMs are created in software...So...What's faster than doing something in software? Much, much, much faster? Doing it in hardware! Imagine! A super, super fast VM! Super-charged with actual hardware! Sweet! Oh my god...and what if...just what if...these languages could all get together, and use a common VM! Holy Hell on a Shit Scraping Stick! I want it! We have to make a CPU that operates on a set of standardized bytecodes!!!

Oh that's right, we have one. It's called the x86...

Fuck!

Ok, the hell with speed. Let's talk Cloud. You know, that thing we used to call the Internet? (God, "Internet" is soooo 90's!) Yes, we'll go to the cloud and we'll give up writing efficient software. We can live with text-entry forms that are sluggish compared to a 386's word processor even though they're running on what's comparatively a super-computer. Shoot speed in the head, it's dead. RIP speed. And efficiency. And the environmental impact of the extra power used by lots and lots of inefficient software. After all, I do my part: When anyone asks, I tell them I'm against global warming! Yes! So screw efficiency. It's sad, but it's ok! It's all so we can write our software in nicer, easier, saner, more expressive, more reliable, more productive languages! Yes! Of course! The worthwhile benefit for our sacrifice is that we get to use fantastic, expressive, rock-solid languages like...JavaScript?..........Motherfuck!

Security! Security! Yes! That's the benefit all this roundabout crap is getting us! Security!

These web apps and such are all sandboxed. Software can't do anything bad in a sandbox! Like Adobe's Flash Player! After all, the Flash Player is known for never having any exploi...Wait, forget I said that...Like I was saying, software can't do anything bad in a sandbox. It can't delete your system files. It can't steal your data. It can't log your keystrokes...wait...umm...It can't delete your system files or steal your data! Of course, that means it also can't let you edit or even view any of the files you have on your computer...Or let you change your system settings...Or...Hmmm...

You know what? Those sound like great ideas! I want to make web apps that let people view and edit their files and adjust their computer's settings so that their system settings follow them around to any computer they use! Yea! Ok, we'll we need to add some new features to these sandboxes...open local files, save local files, access system settings...Oh! And this is in a web app, so it's all totally cross-platform by default! That saves me time and effort! Wow, yea, I'm loving these results, this is fantastic! Huh...wait a minute...I could have sworn that important file I couldn't afford to loose was right here but now I don't see it. Wha...Weird, how'd those people get hold of that, because I don't remember uploading tha...Why are my window borders covered in animal porn?!?! Well, that's what I get for using "M$" Windows. No matter, I'll head to my nice safe OSX. Huh? Same thing?! Et tu, Linux?

Ok, well, obviously the problem here is because I was trying to use a local system instead of the fundamentally superior Cloud. I'll just use an Internet-based ser...erm, I mean a Cloud-based service to store my data. Obviously I'll want to use a respectable big name company. That way I can have their professionals handle security for me! Yup, as long as I stick to a reputable company, they can always be trusted to keep my data secure! After all, it's not like Google or Facebook would ever have security breaches or privacy cock-ups or...err...umm...whoops! No, see, what I mean is, it's not as if GMail would be susceptible to the same super-well-known exploit like session hijacking for over a year or so...uhh...shit. Well, at the very least, if I switch to their browser they'd never install any other always-resident software on my computer without telling me or giving me an option to disable it or...

Goddammit, I give up.

Read more


What Causes Improvement?

There's two groups of people: Hard workers and lazy workers. I'm convinced that improvements arise from people who exhibit both attributes. Either one alone results in stagnation.

If you have absolutely no problem with working hard, that's good, but there's no motivation or incentive to improve processes. Thus, difficult or time-consuming tasks will remain difficult or time-consuming. Higher-level work (work which uses the work at hand as a stepping stone) continues to take an order of magnitude more resources. Things work, but they don't advance.

On the other hand, if you're not willing to do harder work, then you do have the incentive for improvements, but lack the follow-through. Any externally-developed advancements will get adopted, but only if they actually get created.

It's best to have both attributes: The willingness to put in hard work when necessary, but also a strong desire and preference for easy, lazy approaches. This way, you have both the incentive to create improvements and the follow-through to actually manifest them.

Read more