Rosio Pavoris

Bored, so meme

This is a Livejournal meme, but I don’t use Livejournal, so I’m posting this here.
Premise:

  1. Leave me a comment saying anything random, like your favorite lyric to your current favorite song. Or your favorite kind of sandwich. Something random. Whatever you like.
  2. I respond by asking you five personal questions so I can get to know you better.
  3. You WILL update your LJ blog with the answers to the questions.
  4. You will include this explanation and offer to ask someone else in the post.
  5. When others comment asking to be asked, you will ask them five questions. Yeah, no.

Anyway. Questions by Taz, who I’m not convinced likes people linking to her Livejournal, so I won’t.

1. Do you have a favourite fruit?

Not particularly. I enjoy bananas and lychees, but I’m generally fine with any fruit except raspberries.
And figs are interesting because of fig wasps, but not so much as food.

2. Why Rosio Pavoris?

Because it sounds clever and I needed a name for my blog. It’s archaic Latin, so the words wouldn’t even be in most school dictionaries, so it’s nice and mysterious. The meaning is completely irrelevant, really, and I’ve forgotten it.
I think “pavoris” means “of fear”.

3. Have you ever read any Shakespeare?

I bought the collected works of Shakespeare four or five years ago but I’ve read less of it than I intended, mostly because most of it is seriously unreadable.
I’ve read Macbeth, Hamlet, and Much Ado About Nothing, but I think that’s it. I couldn’t even read Hamlet until after I’d seen it and had enough of a notion of the story to skip over the boring bits.

Plays aren’t meant to be read, anyway; I do enjoy seeing Shakespeare performed, though all I’ve ever seen live was a crap post-modern molestation of Romeo and Juliet.
A Midsummer Night’s Dream is awesome. We watched the 1999 movie adaptation during Latin class when we were translating Ovid’s Pyramus et Thisbe, and that was probably the first time I really paid any attention to Shakespeare. Pity it was considered “too advanced” for our English classes.

4. How many languages do you have some ability in, and what are they?

“Some ability” is pretty relative. I speak English and Dutch fluently, French and Latin adequately, German and Japanese more-or-lessly, and I can generally understand, but not speak, Spanish and Italian. Given some time, I can probably make sense of most texts written in Danish, Norwegian, and Swedish.
But really, four or five. I hesitate to even count Japanese.

I’ve been meaning to learn Yiddish, because I think it’s adorable. Well, what I actually want to do is learn Hebrew, because I don’t know any Semitic languages and Hebrew squiggles are pretty, but Yiddish is probably the most realistic way of building a basic vocabulary which I could then use to slowly edge my way into Hebrew, since Yiddish is a Germanic language and very similar to German anyway.
However, local bookstores suck at carrying Yiddish grammars and dictionaries, and after days of looking all I could find was a modern Hebrew dictionary and a Mishnaic Hebrew grammar, which is less than optimal. So yeah, probably not going to happen.

(In terms of programming languages, I’m fluent in PHP and Java, and know enough C/C++, Scheme, Common Lisp, COBOL, Perl, x86 Assembly, and Bash (which doesn’t count) to write a working application that does more than just print “Hello World”. And SQL, but that’s different.)

5. Do you want to always live in Belgium?

I was planning on moving to Canada at some point, but then that stopped happening.
I’ve considered moving to somewhere in Scandinavia if the political situation in Belgium keeps retardening (specifically, if Flanders secedes, but really also just if Vlaams Belang keeps growing), but I don’t think I have the energy anymore.

Permalink 2 Comments

End of Year 2

Today was the last day of classes. There’s another month or so of final exams, but since I don’t study, all that means is that I only have to get out of bed once or twice a week instead of every day.

Next year is probably going to be year 2 again due to my habit of just not showing up to exams I feel are a waste of my time (I’ll have classes from both year 2 and year 3, but I’m officially in the year I have the most classes from), but they’re letting us take an Artificial Intelligence class at the university by way of experiment, so I should at least have one interesting class.

Permalink 2 Comments

Deadlines

Flash games are interfering with my plans to finish this Java game.
Right now, I have a fully functional, moderately clever, highly configurable Monopoly bot, which is really the most interesting part of the assignment. The rest (that is, the actual game of Monopoly) is just boring details, so it’s not likely I’m going to finish it in time for the Wednesday deadline ever.

Note that this is the same assignment I was originally going to write a tower defense game for, and then a 3D Rubik’s cube, both of which were abandoned after the interesting bits were done (in the former case, the path-finding algorithm for the bots, and an OMG OPTIMISED collision detection algorithm; in the latter, the data structure describing the cube), which counts for 70% of my final grade for my Java class.
Clearly I have attention span issues.

(Exhibit B: the net of a tesseract, constructed out of my grandfather’s business cards. I was going to make a Menger sponge, but I ran out of cards. Procrastination++)

Edit: The deadline isn’t this week. I wrote 2,023 lines of Java and about 300 lines of XML in three days and the deadline isn’t even this week. It’s a month from now. Fuck.

(For comparison, all of Muffins is only about 20,000 lines of PHP, and The Mansion, which I worked on for over a month, is 3,962 lines of C++.)

Permalink 3 Comments

(if u dont like it deal w/ it)

You have to love the significant overlap between people who talk too much and outright bigots. I finally got three people who have been getting on my nerves for months (the sort of people who also think I’m kidding when I call them worthless bottom feeders) to stop talking to me entirely, just by pointing out I am, in fact, bisexual.
I didn’t think that even worked in Belgium.

Random meme to fill space. I forgot where I found this. Output of history | awk '{a[$2]++} END {for (i in a) { print a[i] ” ” i } }’ | sort -rn | head:

104 vi
93 ls
76 cd
33 javac
27 apt-get
21 java
15 su
11 less
10 rm
8 tar

(This is essentially a list of the ten commands I use the most in bash. Only from the last two weeks or so, since that’s when I reinstalled Debian, but it wouldn’t be that different if it were a year’s worth.)

Permalink 9 Comments

I made a science

After watching a few more videos by and about creationists on the YouTube, I realised that not only do I have more computing power at my fingertips than most scientists in history could ever have dreamed of and a greater-than-average ability to use said power, I also have a neat, educational, and easily implemented project to use it for.

Perhaps you remember the weasel program, but in case you don’t, here’s how my implementation worked:
The user enters a string consisting of characters from a certain pool (in our case, just capital letters and spaces). The program generates a random string of character from that pool, of the same length as the string the user entered. Every “generation”, the program takes one character in that string at random, and replaces it with another random character from the pool; it then compares the new (offspring) string and the old (parent) string to the target string the user entered, and discards the string that’s least like the target. The other one goes on to be the parent in the next generation.
This continues until the program’s own initially random string matches the user’s.

It’s a very simplistic example of Darwinian evolution, and while the point of it can be missed by people aiming to miss it, it demonstrates the power of evolution quite well.

Of course, casually running the program, seeing the number, and nodding absent-mindedly before forgetting all about it is no way to treat a nice algorithm, so I decided to drive the point home by modifying it a bit.

I decided to do a series of tests with successively longer strings (starting with one character, working up to fifty), and record how long it took on average to get from the random starting string to the target string (which is now just a series of As; I hope you realise why this doesn’t matter). The pool of characters was brought down from 27 possible characters to 10, to speed up execution times1, and each test was then run five thousand times, to get rid of statistical artifacts.
The results were then plotted on a graph:

DARWINISM

The X axis is the length of the string. The Y axis is the number of generations it took to get from a random starting string to the target. The blue line is the results my program found. The red line is how long you’d expect to take on average if you just rerolled the string entirely, which is how most creationists seem to think evolution works (the “tornado through a junkyard” fallacy).
For a string of length 50 this number is (1050)/2, so forgive me for cutting it off the graph pretty early on.

There are some odd spikes the large sample size should have gotten rid of, which I blame on java.util.Random crapping out2, but the trend is pretty clear all the same. (Edit: yeah, the problem was indeed that, and specifically how Java caches things in ways that breaks seeding random number generators. I fixed the issue as best I could and ran the program again; the results are here, and the spikes are indeed gone.)
It took about half an hour to run on my laptop, and the results are even clearer than I expected. Rather than the exponential growth in the number of generations needed so many creationists “predict”, there’s a linear one, which is much healthier.

You can debate how directly this applies to real-life evolution, since organisms tend to have genomes rather larger than fifty base pairs (though their pool of characters is only four, not ten), but they also tend to have more than one kid, and evolution is a trend over an entire population, not just one lineage, and they tend to have more than one mutation per generation (not to mention a bunch of other ways to stir things up, like chromosomal crossover), and sexual reproduction makes a whole new mess of everything.
The point, though, is to show the power of the Darwinian process; specifically, that it’s not just random chance, but something much, much more powerful.

Of course, people can show you all kinds of graphs and give you all kinds of programs to run, but it’s much more satisfying if you do it yourself and understand what you’re doing.
So I’m not going to post my code. Do it yourself. You have the algorithm (and if you think it sucked, improve on it (and post in the comments)), write your own code. It’s simple enough, it’s fun, and it’s quite gratifying.


1 I also made a multi-threaded version of the program which works with a pool of fifty characters and goes up to string lengths of 500, and it’s been running on my reasonably pathetic cluster for the past two hours. I expect it to finish in a few weeks, unless the fans give out again and the entire cluster shuts down.

2 ENTERPRISE TURKEY SOLUTIONS

Permalink 4 Comments

New record

Judging from this network traffic, it took my dad seventeen days to make his new computer part of a botnet. Unless Windows has this new feature where it saturates the network with encrypted SMTP traffic when it’s idle.

Good thing it’s only a virtual machine.

Permalink Comments