2010 02 09 - Poetry
This is a neat format for a poem. I read it, but I can't tell you what it's about. My problem with poetry, just like my problem with lyrical music, is that I listen to the sound and rhythm, and ignore what's being said (even while reading, apparently).
Of course I know what it's about: verses shaped like facing concave triangles.
2010 02 02 - vim, dreams, code
Last night I went through the Vim built-in tutorial. I wanted to try hacking something together in Clojure, but I needed an editor that worked well for Lisp development and wanted to try something other than Emacs. It's a little weird not being in edit mode by default, but I suspect it's less work than switching between the mouse and keyboard. Anyway, learning the editor's probably a project in itself. I was fairly excited about it when I went to bed.
This morning I woke up from a dream where me and two other people were trapped in code, as functions that could only act when invoked. When I gained full consciousness, I had two ideas in my head for how to tackle a couple issues at work.
It's annoying waking up an hour early. It's not quite enough time to get back to any meaningful sleep, especially when I've got ideas in my head that need to get out. So I went into work early and got to coding. One of the ideas (a moderately clever way of preventing an edge case from wreaking havoc) panned out very well. The other (a theory as to what was making something crash) wasn't very helpful.
I could have used more sleep.
2009 11 21 - the game
I've been netflixing a bunch of Star Trek: The Next Generation episodes. I've seen most of them before, but it's been a while, and it's fun to rediscover the peices of the puzzle that I only vaguely remember.
The other day, I watched The Game, which is an episode about viral marketing that aired in 1991. Wesley Crusher, visiting the Enterprise on leave from Starfleet Academy, discovers everybody on the ship acting strangely and addicted to a video game. He meets a girl, recently graduated from the academy herself, and they work together to figure out what's going on.
When I last saw the episode, Wesley and his girlfriend were much older than me; and now they're much younger. This isn't depressing, but it is surprising. Most of the other characters still seem older than me. Yay?
This also reminds me of another type of game, which I just lost. And so did you.
2009 11 16 - outsourcing politics
I don't care about politics. I should, but it just sounds like a lot of work. I don't read political blogs or whatever those paper things with news in them are called, so I only become aware of when an issue is particularly high profile, like President Bush's incompetence (or feigned incompetence).
There should be a way to outsource caring about politics. Something like the electoral college on a much more granular scale. A group of 10 people or so elect or hire someone they actually know, and that person cares about politics for them. That person is responsible for staying informed on "the issues", and giving the rest an executive summary. The electorate can either vote themselves or defer their votes to their elector.
2009 11 12 - an asymptote of programming evolution
There was a recent Hacker News discussion on whether yet another programming language (in this case, Google Go) was really needed. I'm going to quote a comment I made, because I want to put more mental energy into this idea:
Writing a program is maybe 10% what you want it to do, and 90% telling the computer how to do it. So I think the question of when we won't need another programming language can be answered as: when the default programming language of the day has libraries and/or syntax that grow to include every "how" that's been done before. This way you only have to specify the "what" unless you're doing something nobody's figured out how to do.
So I guess my idea of the limit programming language/environment would be that it's automatic (or at least trivially easy) to make 90% of every new program into a gem, and then automatic/trivial to find the gem that does exactly what you need, as well as to debug it. (maybe rubygems are already this good, i haven't looked into them).
The comment was here.
This oversimplifies a bit. First, I used the word "gem", but I'm not necessarily talking about Ruby, although Ruby's gems are a good place to start: in other words, you add the gem name to your program, and the library is automatically downloaded for your use.
Second, a library with no documentation is almost as good as no library at all. But if you're gemifying 90% of the program as you create it, presumably you're also commenting it.
Third, most libraries are going to have bugs the first couple hundred times around. So when somebody uses a library, they need the source code and their fixes need to be able to make it upstream.
Fourth, at least today, different programming languages suit different purposes. Sometimes you need to talk directly to the hardware, and sometimes you want syntax for GUI stuff. Sometimes garbage collection makes sense, and sometimes it makes more sense. Sometimes concurrency is important, sometimes it's not. The syntax of the limit language would need to be able to change to fit all these uses. You may think I'm describing Lisp here, but you may need a bit more syntactic sugar than what Lisps of today provide (or not? I have much to learn in the Lisp department).
Some of what I'm describing might already exist, and maybe if it became codified in a language it would be syntactic sugar for gems plus github plus google. I need to look into this more. The guiding philosophy for the search is this:
If something's already been done it should be trivial to do again.
2009 10 29 - background fail
I like sigils. They are pretty. So I spent the last hour playing with javascript to try and get a peek at the background image of the Errant Story site, most of which is hidden behind the actual content of the site. Pesky content.
Pasting the javascript into the address bar, I tried to hide the content. That didn't work for some reason, so I decided to just make it spit out the URLs of all the divs' background images. Here is the final-ish code I used (FireFox specific):
// remove comments and put all in the URL bar
// as one line
javascript:
newbody="<:h1>Images</h1>";
for each(elem in document.getElementsByTagName('div')){
var style= getComputedStyle(elem,'');
if (style){
var bgi=style.getPropertyValue('background-image');
if(bgi && bgi != "none"){
alert(bgi);
//// what i wanted to do:
// newbody +="<img src='" + bgi +
// "'/><br/>\n";
}
}
}
document.write(newbody);
Strangely, when I tried to append to the newbody variable, the script failed. I should probably install FireBug, but I didn't feel like it tonight. I ended up using alert() and copy/pasting each URL.
When I looked at the images at those URLs, the sigil was nowhere to be found. It's actually hidden in the transparent header.png, but only shows up in front of background.jpg. So I wrote an HTML page to show just those images (borrowing the stylesheet from the original). But when I did this, I discovered that the part of the sigil hidden behind the main div is actually... Not There. I bet those chinese characters actually say something about the cake being a lie.
2009 10 28 - Linear Temporal Collective Consciousness
Yesterday I was playing N, after having some rum-n-root. I got to the fourth level of episode 04 ("curvaceous") and kept trying to beat it. This involves going through a puzzly level and dying a lot, sometimes getting zapped, sometimes shot, most of the time blown up.
I imagined what it was like to be the ninja. Each successive time you die, and each time you are born again. Each time you start from the beginning of the level, and yet you learn from the mistakes of the last ninja. You are one ninja, but you are also many ninjas. It struck me that this is a form of collective consciousness.
In real life we also experience something like this. We don't exactly get do-overs, but every day we shut down. Our thoughts die out of our main memory, and the exact person we were that day is gone. But our memories are reborn the next morning. Hopefully we are successful in cooperating with our future and past selves.
2009 10 18 - portal: prelude beaten
I didn't really like the gameplay of the end fight in Portal: Prelude, and there were a couple glitches, but I still recommend the game. I do think it played out pretty well, story-wise. The rest of the end level was good, and there was a visit from some old friends from HL2, slightly enhanced with Portal-style playfulness.
Anyway, go get it!
Speaking of Portal, here's a funny video of some turrets talking.
edit: Here's a neat song summarizing the plot of Portal. Spoiler, obviously. How would one classify this, musically?
edit: Added strikethroughs because YouTube is showing commercials now.
2009 10 17 - Portal, now with 32.5% more cake
I'm enjoying Portal: Prelude, which is a fan mod and unofficial prequel to Portal. I got to the end of Portal and was like, "that's it?" It was fun and novel, and the character GLaDOS was neat, but it was too easy and too short. After beating Portal I played through it with commentary enabled. A lot of the game had to be designed to train the user, due to the unfamiliar gameplay. I think they did that quite well. The commentary also revealed that the idea for the portal mechanic came from a student project called Narbacular Drop, whose authors were subsequently hired by Valve. I tried this out, but it was even shorter, and seemed to lead up to a boss fight that never happened.
So, looking for more of a challenge I went looking for mods and found Portal: Prelude. It's much more challenging than the original game. When you start it up, there's a warning that you have to be ready to think with portals. That's true, at least more so than in the original game. The puzzles are also a bit tougher. I'm on the 19th test chamber, and I had to wonder if if it was unsolvable (hint: it's not). You start in the Relaxation Vault like in the original, but instead of GLaDOS' disembodied voice, you have white-shirted men guiding you from the rooms behind frosted glass that were empty in the original game. Their voices are synthesized, but it's well-done enough that you don't worry about it.
The Companion Cube even makes an appearance. It's like looking at pictures of somebody when they were younger. Me and the cube are friends. I'm looking forward to exploring the rest of the game with it, and I will be sure to share my cake. One thing bothers me. They mentioned grief counseling...
2009 08 15 - holy mother of god
irb(main):001:0> def fact(n)
irb(main):002:1> if (n <= 1)
irb(main):003:2> 1
irb(main):004:2> else
irb(main):005:2* n * fact(n - 1)
irb(main):006:2> end
irb(main):007:1> end
=> nil
irb(main):008:0> fact(365)
=> 25104128675558732292929443748812027705165520269876079766872595193901106138220
93741966601800900025416937617231436098232866070807112336997985344536791065387238
35997043555327409376780914914294408643160469250745101348470255460140980059079655
41041195496105311886173373435145517193282760847755882291690213539123479186274701
51939680850494072260703300124632839880055048742799987669041697343786107818534466
79668715110496538881301368361990105291800561258445494886486176829158263475641489
90984138067809999604687488146734837340699359838791124995957584538873616661533093
25355125684505604638873812970295138115186141368892298651000544094394301469924411
25557552791407604927642537402504103910564219790032896000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000
irb(main):009:0>
To contact me, e-mail cathodion at gmail.com.