Home

Advertisement

Jul. 7th, 2009

  • 1:12 AM
osaka
OMG guys, we found a lost dog. He was starving, almost deaf and recently blind. The vet guesses he is blind for a day or two longer than he's been by itself on the streets. There's also a chance that the blindness is just a symptom from some deadly disease, but we don't know yet. For now we got rid of the parasites and he is gaining weight.

Edit: Still not sure if there's a deadly disease, but he's anemic and his liver is messed up.

Challenge update (June)

  • Jul. 4th, 2009 at 10:55 PM
kaorin sick
Finals are finally over, yay!
There's a chance I'll be able to graduate in two more semesters. :O

Book: Choke )
Book: Innumeracy )
Book: Lord of the Rings, vol 3, The Return of the King )
Book: The Carnivorous Carnival )
Book: The Maltese Falcon )

Movie: Lost in Translation )
Movie: The Thin Blue Line )
Movie: Brick )
Movie: Donnie Darko )

Running stats:
19.1 hours completed
best average speed (for 45 min): 9.0 km/h (5.6 mph)
best time for 1.6 km (1 mi): 9min09

I didn't run this month at all. At the end of May I got an inflammation in my right knee, so I rested for a while and then focused on just doing weight training, but the flu and studying kind of got in the way. But I do hope to start running again soon.

[=====================>     |                            ] 40.00% Books
[=====================>     |                            ] 38.56% Pages
[===================>       |                            ] 36.00% Films
[=============>             |                            ] 25.42% Running
[==========>                |                            ] 19.03% DDR
[====================>      |                            ] 37.40% Guitar
[===========================>                            ] 49.59% Days

Tags:

Jun. 26th, 2009

  • 1:53 PM
luke
Osamu is gone! D:

He says:
ありがとうございました(・ω・)ノ
【2009/06/22】

2006年8月から続けてきたこのブログを
本日をもちまして、閉鎖する事と致しました・・・。

何度もアクセスして頂いたみなさん
本当にありがとうございました(*´∀`)ノ


Which I guess means something like "this blog has been up since August 2006 so I think it's time to shut it down; thanks to all visitors." Then he deletes it along with his youtube account.

Who does that??

Blogs are supposed to outlive their authors. T_T

Edit: the blog is back, but none of the old entries are available, just that last post. :/
osaka
You don't realize how long it's been since you last messed with pointers in C until your program crashes because you forgot this wasn't assembly and did *sizeof(type) everywhere. Maybe it would help if you didn't have to do it for malloc(), which really does work like assembly.

But anyway, I'm also dealing with wide character strings for the first time, and wow, it's worse than than the regular kind. Besides the usual crap, you also have to keep converting stuff all the time because of functions that expect char*. It could be worse, but it could be better too. Maybe we can't have C++ strings, but how about at least use some less cryptic named functions? The conversion I just mentioned is done by wcstombs() for "wide character string to multibyte string." Who has the brain space for this? I sure don't; I had to forget why I was using C in the first place to make room for it.

Jun. 20th, 2009

  • 6:11 PM
chiyo-chan waaah
Dear lj, today was the closest I've been to getting bitten by a dog since I was 7 or something. It involved quickly switching hands to hold a gate shut while not getting my hands bitten themselves.

Good times. :)

Créu

  • Jun. 11th, 2009 at 5:10 PM
kaorin sick
True story.

400x1200 )

You can listen to the 'song' here.

Tags:

Jun. 9th, 2009

  • 10:45 PM
osaka
Would someone give me one good reason why music videos, movie trailers and tv ads aren't freely available on the Internet, no strings attached? Do these people want us to buy their stuff or to watch MTV? I don't get it.

Flashless streaming on youtube

  • Jun. 5th, 2009 at 1:19 PM
kimura
A few years ago two friends tried to convince me that if there was perfect software out there, it would be macromedia flash (the one where you create crappy animations, not the player). I'm not even sure why they liked it so much. Maybe they used to make animated ads on photoshop before. So I was thinking about this and wondering if I had to pick which software I think is closest to perfection, which would it be. Maybe if I based my decision on how much I've come to like a program, I'd choose mplayer. I mean, it's free, supports every obscure codec you can find, is awesomely documented, has no default GUI, and is completely customizable. It's also lightweight, stable, actively developed, etc. It's so great it will allow me to get rid of flash (the player)! :D

I found this greasemonkey script called hqtube that replaces youtube's flash flv player with a real video stream that I can watch with mplayer, through gecko-mediaplayer. I've also created a dmix device on .asoundrc I can use when on youtube (otherwise I have to close each video's tab before opening the next one). Now I just have to convince my girlfriend she doesn't need flash installed on my computer.

I also redid my (mplayer's) input.conf. I had kind of deleted the old one accidentally. :P
Now it looks like this:

.mplayer/input.conf )

Tags:

Challenge update (May)

  • Jun. 2nd, 2009 at 1:20 AM
katekyo ...
Movie: Låt den rätte komma in (Let the Right One In) )
Movie: Handphone )
Movie: Jigeum sarangha-neun saramgwa salgo issumnika? (Changing Partners) )
Movie: Young Frankenstein )
Movie: Defiance )
Movie: To Catch a Thief )
Movie: Nora Inu (Stray Dog) )
Movie: El orfanato (The Orphanage) )
Movie: Platoon )
Movie: Perfect Blue )
Movie: The Great Happiness Space: Tale of an Osaka Love Thief )

Running stats:
19.1 hours completed
best average speed (for 45 min): 9.0 km/h (5.6 mph)
best time for 1.6 km (1 mi): 9min09 (I'm timing this on a flatter course now, on the old one my best time was 8min40)

[==========>           |                                 ] 20.00% Books
[===========>          |                                 ] 20.68% Pages
[=================>    |                                 ] 32.00% Films
[=============>        |                                 ] 25.40% Running
[=========>            |                                 ] 17.03% DDR
[===============>      |                                 ] 28.40% Guitar
[======================>                                 ] 41.37% Days

Tags:

WTF, Buakaw

  • Jun. 1st, 2009 at 1:05 AM
osaka
I finally got to watch the K-1 World MAX 2009 Final 16, and goddamn if Buakaw didn't almost get knocked out by a Brazilian haha. In case you are not familiar with K-1, Brazilian fighters there are like Japanese fighters on MMA: punching bags. And Buakaw is this brick wall that was pretty much unbeatable until he started fighting like a girl last year.

Anyway, now I wanna kick stuff, which is sad because I kinda messed up my right knee running last Tuesday. It's my own fault for slacking off with the weight training, though. I hope it goes away this week. Until then, I study for my next dangerously close tests. *snort*

rmri - safe recursive directory removal

  • May. 18th, 2009 at 12:25 PM
osaka

A while ago I posted at [info]linux about an alternative to the way rm deals with interactive and recursive removal of directories. As you can read there, I wanted rm -ri to ask about recursively removing directories instead of descending into them and asking about each file or dir in them, etc, which I think is such a stupid way of interacting with the user that no one in the world uses it.

So, for lack of anything similar (actually anything besides trashcan alternatives) already in existence, I proposed a wrapper script for rm that makes it behave the "smart way" when -ri is used. I've been using it since then and haven't had any problems with it, though I felt the need to get a bit more info about what's in the dir, in a "is this that dir I emptied earlier?" kind of way. Here are the non-verbose and verbose versions I made:

rmri-20090517.tar.gz

The difference between them is:

% ./rmri-20090319 -ri dir
rm: recursively remove directory `dir/'? n
% ./rmri-20090517 -ri dir
rm: recursively remove directory `dir/' (1 folders, 2 files)? n

People that usually alias rm to rm -i like me can even remove lines 8-15 and start rming everything without any options. In this case, recursive non-interactive removal can be done with rmri -f.

If you find this script to be useful please leave a comment below. Suggestions and criticism are also very welcome.

P.S. one unfortunate side effect of using this script is that you loose zsh's rm -rf * protection :/

Tags:

So, where can I get a mobile voodoo?

  • May. 17th, 2009 at 10:13 PM
osaka
Had an English test today at 7h30 a.m. Shit sucked, but if all goes well I'll get 8 free credits, making me a bit closer to graduating. And by a bit I mean 120 hours, IIRC.

Also finished Mario Galaxy (beat the final boss, not 100%) today. That game is pretty cool, though I still like 2-D mario better. The boss itself was easy, but the last stage was annoyingly hard. Hard stages are something the game does not lack, BTW.

Oh, and I'm pissed at xorg and those damned intel drivers. And Gentoo, for the first time. Version 2.6.3 of the intel drivers went stable on portage and it crashes xorg whenever I use mplayer (the only way to fix it being reboot through ssh). So I go back to 2.6.1 and it's crashing xorg if I try to switch VTs. Great work guys. I think I'll go all the way back to the one combination of xorg+intel drivers+drm+mesa that worked on xorg 1.3 and wait for it to be taken out of the tree before I try again.

Seriously, is it so hard to make these drivers? Intel supposedly gives out all the information that is needed, and the cards are not even close in functionality to say, nvidia cards, so why can't we get minimum 3-D acceleration, or not even that, 2-D accel that does not crash every 10 minutes? I feel like studying hard and joining the development team just so I can understand what's the big deal with these cards. I used to have a goddamn voodoo 4 that worked flawlessly with any versions of xorg. Seriously, pick any version, I get that voodoo running quake3. From now on whenever someone asks me which video card works best on linux I'll say "anything from nvidia if you don't care about closed source blobs, 3dfx otherwise."

Best vim tip ever

  • May. 14th, 2009 at 12:27 AM
chiyo-chan waaah
From here:
Htmlize a file using the current syntax highlighting:
:so $VIMRUNTIME/syntax/2html.vim
Amazing. I'll never post unhighlighted code again.

How come there are people out there who do not use vim?

Ah, it seems I can only get the no_pre version, so I have to run
:%s/<br>//g
and
:%s/&nbsp;/ /g
to save some bytes.

Edit: second best:
Force 88 colors so highlighting will look the same on screen and regular urxvt:
:set t_Co=88

Tags:

Challenge update (April)

  • May. 7th, 2009 at 2:03 PM
osaka
I've had three tests in a row, so I kinda took a week off from the Internet. Anyway, here's the update for the past month.

Movie: Basic Instinct )
Movie: Twilight )
Movie: Joheunnom nabbeunnom isanghannom (The Good, the Bad, the Weird) )
Movie: Slumdog Millionaire )

Running stats:
14.5 hours completed
best average speed (for 45 min): 8.8 km/h (5.5 mph)
best time for 1.6 km (1 mi): 8min54

[==========>      |                                      ] 20.00% Books
[===========>     |                                      ] 20.68% Pages
[===========>     |                                      ] 21.00% Films
[==========>      |                                      ] 19.31% Running
[=========>       |                                      ] 17.03% DDR
[============>    |                                      ] 23.02% Guitar
[=================>                                      ] 32.87% Days

I think I'll try to do these progress bars as text next time (done). BTW I blame school for making me fall behind on the challenges lately.

Tags:

Apr. 24th, 2009

  • 4:50 PM
katekyo ...
What's up with people saying things are 'copywritten'? Is it because copyright is so much unlike any other right that people forget it's supposed to be one?

Edit: By the way, to the people going <stupid voice>"The pirate bay guys deserve to go to jail. I don't care if that means I get less movies, they are criminals and should go to jail."</stupid voice> Guess what, if they go to jail, it's for being accessories to the crimes you committed when you downloaded those movies. It doesn't mean you get less movies, it means that if you get caught you go to jail too.

Am I cool now?

  • Apr. 20th, 2009 at 11:10 PM
osaka


Posting from openbsd. I've manually built newer versions of zsh (couldn't get my prompt to work on 4.3.6) and dwm (just because I thought it was easier to edit the config header itself instead of editing ports' patch), and now things are starting to work as I want them to. BTW, I did not recall w3m being this awesome.

P.S. yes, my username is from YYH.

Notes on OpenBSD

  • Apr. 20th, 2009 at 3:07 PM
osaka
Upgraded obsd to 4.4-stable. One does this by either downloading the patches from one of the mirrors, applying each of them and rebuilding stuff following the instructions provided, or syncing the whole tree through cvs, and then rebuilding and installing. Guess what, if it was linux you'd do something like 'cd /usr/ports && make upgrade' and be done with it.

Ports' tree is goddamn old. Every program you build tries to download source from upstream, fails since it's such an old version, and then ends up downloading from obsd's mirrors. Seriously, take any program that is so stable it's on the same version for years, and ports will have an older version of it.

Can't set my layout through setxkbmap. It fails with just "Error loading new keyboard description," even if verbosity is at the highest level. Luckily, using xmodmap works fine.

Can't find any documentation telling me where to set the locale globally. Also there doesn't seem to be unicode support, and then there's no urxvt port, so I'm using 'if [ "$TERM" = "rxvt-unicode" ]; then export TERM="rxvt"; fi' so I can ssh.

sh sucks (but I knew it already) and ksh seems to suck too. I'm using zsh for root and I don't care if it is not safe, it's the only way I can get anything done.

Backspace gave me a bit of trouble. For vim, I needed 'set backspace=2' and for zsh '[[ -n "${key[Backspace]}" ]] && bindkey "${key[Backspace]}" backward-delete-char' (if I didn't use zkbd it'd be 'bindkey "^?" backward-delete-char').

Vim needs 'map <ESC>[4~ <End>|imap <ESC>[4~ <End>' and 'map <ESC>[1~ <Home>|imap <ESC>[1~ <Home>' to have the end and home keys working, but only when running on screen.

Edit: I forgot, you have to set up your /etc/hosts file or disable ssh's reverse dns lookup option or else it'll take forever to accept a connection.

Edit2: Ksh is not automatically sourcing /etc/ksh.kshrc or $HOME/.kshrc; I'm not sure why.

Edit3: Also forgot, bsd.mp (the multi-processor version of the kernel) hangs during boot.

Edit4: When you open X, the laptop's touchpad works even if it's turned off. Turning it on and then off again disables it.

Also, sound works without a custom kernel (unlike FreeBSD), but changing the volume either does not work or causes the system to freeze. And plugging in earphones does not mute the speakers, which is kinda funny. Ah, and there's no kernel-level resampling so the media player has to do it for samplerates that are not supported by the soundcard (in my case, anything besides 48 ksamples/s). For mplayer that's srate=48000 on the config file.

Tags:

Firefox + tmpfs

  • Apr. 19th, 2009 at 3:37 PM
osaka
I've been trying this out for a while, and it's working fine. Sometimes there's a power outage and I loose my latest bookmark, but it's no big deal compared to making firefox3 usable. OTOH, I don't really like the fact that I now have a boot script and an fstab entry for this one program to work properly.

From wikipedia:
Extensions are especially popular with Firefox, because Mozilla developers intend for the browser to be a fairly minimalistic application in order to reduce software bloat and bugs, while retaining a high degree of extensibility, so that individual users can add the features that they prefer.

So, that's their intention for firefox 4 or something, right? This thing is so bloated I need two extensions to remove crap from the menus. u_u

Tags:

Apr. 16th, 2009

  • 12:56 AM
osaka
My grandma has been suffering from memory loss for a few years, but nothing too serious, just forgetting to take her medicine, forgetting names, etc. But recently she forgets something really weird for a day and then remembers it the next day, but forgets she forgot it the day before. Like, she'll forget a recipe she has known her whole life, and later she'll wonder (out loud) what went wrong since she then thinks she used the right recipe.

She might end up developing Alzheimer's, because her mother had it and all, and that sucks, but luckily it's not that bad yet. So, today she went "you know that little box in the bathroom, where you put things you don't need anymore?" I asked if she was talking about the trash can and she went "that's not what a trash can is!" Turns out it really was the trash can, but she didn't believe it was one. And now I go to the kitchen and there's a bit of trash in the sink. LOL.

Browsers (gah!) and OpenBSD ...and cars!

  • Apr. 14th, 2009 at 1:58 AM
kimura
After a while with opera, I'm back with firefox. Opera came really close to what I want in a browser ATM, but it didn't make it. For now I'm trying out save image in folder as a workaround for gtk's file selection window slowness, and LoL (HaH fork) for mouseless browsing.

And in other news, I've installed OpenBSD on the laptop, booting through PXE. Am I cool or what? Not really actually, because I told the installer not to put openbsd's bootloader on the mbr, so it didn't put it anywhere and chainloading from grub hanged. I had to fake an upgrade and get to that point again and answer yes. Strangely, it didn't do anything to the mbr, just installed the second stage to openbsd's partition. Considering the BSDs' view on disk partitioning, I'm not surprised. BTW, openbsd's fdisk sucks.

OK, now I'm thinking about adding Nexenta (kind of a GNU/Solaris distro) and Plan9 (if I'm able to; their hardware compatibility page is kinda scary), so people can go "ubuntu? oh... well, bsd is so much better anyway... I bet you don't have any real unix, though. hm... what else have you got then, vista?.. fuuuuuu-." I'm not sure if I should look into something else also. I'll have ~10 GB left.

Edit: Ah! Not so important as my fantastic OS adventures, but I'm licensed to drive again, which I hope will allow me to run much more often. So, I might be looking into a car. I wish I could have a Fortwo or a Copen (or a Sera, but then I can just wish for an EV1 a Tesla), but I'll probably get something like an 1.6L ethanol powered Pampa.

Tags: