Stallman Box
Posted on January 24, 2012 at 09:03 PM
<halcy> Oh I know what you should make <halcy> WAHa_06x36: Make a STALLMAN BOX <halcy> WAHa_06x36: Like a buddha box except it displays cool saint ignucius effects and it plays the free software song
And then I went and made it myself.
It is, of course, free software. You can find the source code on github. Users of GNU/Linux are assumed to be capable of compiling it themselves (It pretty much works out to “run make”, needs SDL and freeglut and glew). GNU/Linux graphics drivers are usually proprietary and sometimes terribly buggy, so it might or might not work.
For Microsoft Windows, there is a binary version.
Download:
(It requires a relatively new version of OpenGL to actually run, sorry about that)
Some audio and png code taken from WAHa_06x36 - thank you!
So I had the idea to generate fake twitter pages from a users old tweets. I wrote a bunch of Perl scripts to do just that. It worked out well.
The process essentially consists of four steps:
- Acquire a users tweets.
- Train a fourth order markov model with those tweets.
- Generate new tweets by having the markov model spew out new chains.
- Generate a twitter page from those tweets.
Except for the last step, I’ve written scripts to do this. (Writing one for the last step wouldn’t be hard, but boring, and it’s easy enough to do by hand)
Step 1: Obtaining tweets.
Essentially, it’s a loop that gets the tweets via twitters api, page for page. Simple enough. The only real problem is twitters rate limiting, so grabbing more than one user per hour does not work.
#!/usr/bin/perl
my $max_page = 200;
my $start_page = 0;
my $user = "username";
for( my $page = $start_page; $page < $max_page; $page++ ) {
my $cmd = "wget http://twitter.com/statuses/user_timeline/$user.json?page=$page -O - >> tweets.json";
`$cmd`;
}
Step 2 and 3: Training and generating.
This script takes json as output by the script in step 1 as the input, and outputs generated, fake tweets, one per line.
Since I was too lazy to implement a markov chain myself, I used a library off CPAN to do the heavy lifting.
#!/usr/bin/perl
use JSON;
use Encode;
use Algorithm::MarkovChain;
# Parse JSON
my @tweetsJsonA = <>;
my $tweetsJson =decode_utf8( join( "", @tweetsJsonA ) );
$tweetsJson =~ s/\]\[/,/gi;
my $tweets = decode_json( $tweetsJson );
# Train
my $user = Algorithm::MarkovChain::->new();
foreach my $tweet (@{$tweets}) {
my @symbs = ("START", split( " ", $tweet->{text}), "END" );
$user->seed(
symbols => \@symbs,
longest => 4
);
}
# Generate 20 tweets
binmode STDOUT, ":utf8";
for( my $i = 0; $i < 20; $i++ ) {
my @generated = ("START");
my $l = 1;
while( $generated[-1] ne "END" ) {
@generated = $user->spew(
length => $l,
complete => \@generated
);
$l++;
}
@generated = @generated[1..(@generated-2)];
print join( " ", @generated ) . "\n";
}
Step 4: Generating a fake twitter page.
This consists of two parts, making the tweets into twittery html, and adding what comes before and after the tweets in a twitter HTML page. For the former, I wrote a small script, again, which mostly just concatenates text a lot, I put it here if you want it (Save as “mktwpage.pl”).
The second part, I’ve done by hand, thus far, assisted by my browsers “Save page” feature. Too lazy to automate.
And, there you have it: Autogenerated fake twitter pages. Halfway convincing, too. Go generate your own!
Today, I went to Frankfurt Book Fair! It’s a big (Really big) fair full of, unsuprisingly, books, of all types!
6:30AM: Got up. Amazingly, on time! Breakfasted, got dressed, and went off towards Frankfurt, which is only around 1:15h from here. I then managed to not find the parking lot for a while, but eventually managed to park. The first thing I saw when I got out was… cosplayers! There are loads and loads of cosplayers at FBM, I don’t even know.
10:00AM: After buying a ticket, I ran around in the “german books” halls a lot, just looking at what seemed interesting, and wrote a few books down. Sadly (Or, considering that I shouldn’t be throwing out money like mad), selling of books is only allowed on Sunday. I preordered a few, though! There was one comic that I especially liked but since I preordered it I didn’t bother writing down the ISBN, so I can’t find it anymore, which is annoying! Briefly ran into some people from Karlsruhe when passing by the manga/comic area, and saw a place selling fancy hats. Since I felt severely underdressed with all the cosplayers around, and since the hats were very fancy, I got one.
1:00PM: Went all the way to the other side of the messe area to the foreign exhibitors halls and looked around there. Also, halls, size, like whoa. It’s 5 huge halls, most of which have 2 or 3 floors! All filled with books, books and more books!
2:00PM: Checked out the comic area, where there were also a lot of manga-related things. Found out that there was a “Tips on making cosplay” workshop at 3:00PM, decided to go there.
3:00PM: Went to said workshop. It was interesting~ I really want to try doing cosplay more, because it sure is fun~ I never find the time to actually make a costume, though. orz
3:45PM: On the way back from the workshop, there were a few stands selling manga. I had a look at some, and figured I should buy some that I’ve never heard of, because there were so many cosplayers around with costumes of characters I couldn’t identify at all. Picked something that looked super gay and had “BL” listed as genre on the back. Haven’t read it yet, wonder if it is good. Bought a volume of HotD and Hokuto no Ken to compensate for this decision.
4:00PM: Ran around outside a lot and got some food.
4:15PM: Checked out a few more things I was interested in: Books on Demand, a company that will print your manuscript as a proper paperback with ISBN for as little as 39€, RoRoRo verlag, especially looking for Cory Doctorows Little Brother (I had kind of hoped the author would be there, but he wasn’t), and RosettaStone, a company that makes applications to help you learn a language - they gave me a free promotion thing to try their software for 24 hours~ <3

5:00PM: Walked around the area where a lot of manga-related things were some more, found a place that sold plushies, amongst other things. Bought a Len plushie, and a Reimu plushie for my brother, and a button~
5:30PM: Went to the area with scientific literature and educational materials, and found my unis stand, where there weren’t actually any people. Watched someone demo a smart board thing, which was pretty impressive, and looked around IEEEXplores and Springers things.
6:30PM: Messe closed, and I drove home.
Overall, it was a fun day, and I’d like to go again next year~ Maybe on sunday, then…~
This is getting old, isn’t it?
Well, a happy new year to you. May you have a great 2010.
(If the video does not work yet, check back later, or try the video at http://aka-san.halcy.de/happynewyear.mp4 )
It’s UNIQLOCK, customized for Karlsruhe, running on a panel hanging on my wall! WALLQLOCK!
The construction of the frame is pretty terrible, but the end result is kind of cool. There is actually a whole notebook computer in that thing.
This little application, which runs via inetd (Like so:
ident stream tcp nowait halcyon /usr/bin/identd
) returns the same username on any ident request.
PROS:
- Works behind NAT
- Probably free of exploitable bugs
CONS:
- Kind of misses the point of having an identd in the first place
- Utterly useless except for epeen
So, without further ado (Compile like you would any C app):
include <stdio.h>
#include <string.h>
#define USERNAME "ordinary_magician"
int main() {
char buf[4096], *p;
if (fgets(buf, sizeof(buf), stdin)) {
if ((p = strpbrk(buf, "\r\n"))) {
*p = 0;
}
printf("%s : USERID : UNIX : %s\r\n", buf, USERNAME);
}
return 0;
}
CORRELATIONS.
Posted on March 14, 2009 at 12:15 PM
I snickered.
All in the name of science. (Related: Graphy graphthings, Quota)
Yay, semester over. Now, I have time to… learn, really. I should. Exam 10th of March, and I also need to do the programming assignment.
ACH WELL.
Also, tomorrow’s 1234567890 day, amongst things. ;P
It takes a file of a certain syntax which should be quite figure-outable from an example as an argument, then reads tapes from STDIN and executes on them.
- turing.pl - Really stupid turing machine simulation thing.
- machine_add1 - An example programm. Adds 1 to a binary number given on the tape.
- machine_compare - Compares two binary numbers on tape.
Let's make happy trees!
How much tree is enough tree? 6
_/\_
\/
/\
/__\
/()\
/____\
/()()\
/______\
/()()()\
/________\
/()()()()\
/__________\
/()()()()()\
/____________\
| |
| | |\_/|
| | nyo~ ='_'=
| | |._.|-*
(Actually, you can't have enough tree! But this will have to do for now!)
Oh, in any case: 10 all new and shiny halcy.de favicon buttons have arrived, ready for giving out. (Or, if distance requires this, mailing out to ~any place in the world~. Buttons: The best excuse ever for writing people real-life letters!) Drop me a line if you want one.

Time for some noise. If uninterested, turn away now.
Semiimportant things which happened since I last posted something personalish to this blog:
- Finished FSJ. I’m officially not an ambulance driver / EMT anymore.
- Moved to Karlsruhe.
- Started Uni. I’m now a first-semester CS student at the University of Karlsruhe. It’s nice there, met awesome people. :D
- Mostly, though, we do math. Which is why this post is pretty much over already, all that math didn’t leave much time to do a lot of things.
(I did mess around writing code for a thing or two, but that is considered signal, and thus material for another post, some time.)
Behold, bu-n.
Posted on November 22, 2008 at 05:56 PM
It has AA characters on it! (Also, I run KDE, despite this being an Ubuntu sticker. I didn’t have a Kubuntu one. Meh.)
Loot
Posted on June 03, 2008 at 10:04 AM
Back home
Posted on May 25, 2008 at 05:31 PM
Back home, and back to work. Le sigh.
I NOW HAVE A HARUHI AND A KONATA FIGURE THOUGH, SO EVERYTHING IS A-OK!
Vacation time.
Posted on May 08, 2008 at 11:56 PM
Going away on vacation, yay! Will not respond to e-mail (Or anything else, really) for ~2 weeks.
Happy new year, everyone!
Now, let’s go do stuff, like:
- Actually finishing some apps one has been working on.
- Finally learn a little bit of haskell.
- Learn to actually type well in dvorak.
- Finish the rest of my FSJ without damaging cars.
- Get into uni.
All doable, I hope. Let’s have have kickass 2008!
So I got me new hardware, and made a few new holes in my case to fix the HDD cages properly since the new motherboard is bigger, and now the server is finally up and running. Only thing left to do is clean up, which I’ll do tomorrow. Some pictures of the whole thing (Click on images for large version):
Woo downtime
Posted on October 19, 2007 at 07:57 PM
So apparently, several things in my server broke.
First, the HDD. It’s now pretty much done for, but that did not worry me much since I had a spare HDD, had backups and was even able to get whole the system off the old HDD and transfer it to the new one, improving partitioning while I did, which amazingly worked perfect first try (Now there’s a seperate /home XFS partition).
But, something else doesn’t work anymore either. It’s one of or multiple of the graphics card (Which was broken before - some part of the circuitry for the S-Video out got literally fried), the CPU, or the motherboard.
Since I should do that anyways, I’ll use this opportunity to upgrade those parts to shiny new ones (And improve the working of my self-built HDD cage). Till then, here’s halcy.de, served by a temporary PC into which I just plugged its HDD.
The system will be down again as soon as I get the new stuff to switch over, but should be very stable after that.
I finished fixing my notebook. Here is a pic of it in all it’s now-working glory:
I don’t really know how long it can survive in this gobbled-together state, but hey, for now it works. It only has to survive until I can afford a new one, anyways.
I wrote this ages ago and just now found it again. This is WTFy as well as kind of cool. Here’s a screenshot of three instances running under Linux in wine.
Amazing features:
- Generation of rather random, pretty neat mazes of various sizes (Just resize the window).
- Three (!) ways of drawing labyrinths.
- Completley configureable colourscheme.
- Saves high scores in some kinda encrypted way, I forgot.
You can Download Laby2003 here.
Bonus points if you figure out the highscore encryption scheme, I forgot what exactly I was doing there.
Frist Psot
Posted on May 20, 2007 at 09:46 PM
Just FYI.
Well, I finally managed to get myself to finish the design for this, so now there’s hope of me actually updating my site from time to time.
Yay, I guess.
This month
| February | ||||||
|---|---|---|---|---|---|---|
| Mo | Tu | We | Th | Fr | Sa | Su |
| 30 | 31 | 1 | 2 | 3 | 4 | 5 |
| 6 | 7 | 8 | 9 | 10 | 11 | 12 |
| 13 | 14 | 15 | 16 | 17 | 18 | 19 |
| 20 | 21 | 22 | 23 | 24 | 25 | 26 |
| 27 | 28 | 29 | 1 | 2 | 3 | 4 |


— Full post RSS feed
— Comment RSS feed
— CC-BY-NC license
— Valid XHTML 1.1
— Debian operated
— Powered by Ruby
— Co-Powered by Perl
— Made with kate