Saturday, November 29, 2008

hh.gif

I created another GIF file. This has 7 hidden keywords.

http://slashdot.jp/sp/binary2008/data/hh.gif

* This GIF file is

- a GIF file which shows "Happy Hacking".

- a MS-DOS COM program which shows "Happy Hacking".

% cp hh.gif
% dosemu -dumb hh.com
Happy Hacking!

- a Perl program which converts a ASCII formatted COM file.

If you provide no arguments, it converts itself. So, you can do

% perl hh.gif > hh.pl.com
% dosemu -dumb hh.pl.com
Happy Hacking!

There are no binaries or control code in hh.pl.com.

- a Ruby program which converts a ASCII formatted COM file.

% ruby hh.gif > hh.rb.com
% dosemu -dumb hh.rb.com
Happy Hacking!

- the Perl program shows "be" if you provide 1111 as the command line option.

% perl hh.gif 1111
be

- a Java program in jar which shows "assimilated".

% java -jar hh.gif
assimilated

- the word *WILL* is hidden in the GIF file in UTF8.

- this is an animation GIF, after waiting 10mins, the image shows "You".

- "Resistance" is embed in this GIF image.

http://shinh.skr.jp/misc/dat_dir/steg.gif

* The outputted ASCII formatted COM file is

- a COM file

- a Perl program which produces the original COM file

% diff =(perl hh.pl.com) hh.com
% diff =(perl hh.rb.com) hh.com
%

- a Ruby program which produces the original COM file

% diff =(ruby hh.pl.com) hh.com
% diff =(ruby hh.rb.com) hh.com
%

- a Python program which outputs "futile"

% python hh.pl.com
futile

- a Haskell program which outputs "is"

% cp hh.pl.com hh.hs
% ghc hh.hs
% ./a.out
is

* Overall, the hidden phrases are "Resistance is futile. You will be assimilated"

Here is the archive to create this file

http://shinh.skr.jp/binary/happy.tgz

Monday, October 27, 2008

fizzbuzz7.gif

I updated the previous polyglot (http://shinhoge.blogspot.com/2008/10/fizzbuzzgif.html).

http://shinh.skr.jp/dat_dir/fizzbuzz7.gif

This GIF file has 7 meanings:

- a GIF file
- a Fizz Buzz program in Ruby (1.8)
- a Fizz Buzz program in Perl
- a Fizz Buzz program in Befunge (http://en.wikipedia.org/wiki/Befunge)
- a Fizz Buzz program in z80, which runs with my golf server's emulator. (see http://golf.shinh.org/ or http://sites.google.com/site/codegolfingtips/Home/z80 for detail)
- a Fizz Buzz program in x86 & MS-DOS. (you can rename this to fizzbuzz.com and run on Windows or dosemu)
- a Fizz Buzz program in x86, MBR image. (you can run with QEMU or something: qemu -boot c -hda fizzbuzz.gif)

The source code is

http://shinh.skr.jp/dat_dir/fizzbuzzgif.tgz

Saturday, October 18, 2008

google-glog

I'm working on an opensource project as my 20%.

http://code.google.com/p/google-glog/

Sunday, October 12, 2008

fizzbuzz.gif

http://shinh.skr.jp/obf/fizzbuzz.gif

This GIF file has 6 meanings:

- a GIF file
- a Fizz Buzz program in Ruby (1.8)
- a Fizz Buzz program in Perl
- a Fizz Buzz program in z80, which runs with my golf server's emulator. (see http://golf.shinh.org/ or http://sites.google.com/site/codegolfingtips/Home/z80 for detail)
- a Fizz Buzz program in x86 & MS-DOS. (you can rename this to fizzbuzz.com and run on Windows or dosemu)
- a Fizz Buzz program in x86, MBR image. (you can run with QEMU or something: qemu -boot c -hda fizzbuzz.gif)

This is the NASM source code which was used to create this GIF file.

http://shinh.skr.jp/obf/fizz_gif.asm

Thursday, September 25, 2008

ICFPC 2008

It seems that I've got the second place in ICFPC 2008. I'm really appreciated this result. I think I was very lucky. I don't think my program was excellent. For example, my rover would run poorly if there are difficult maps, like complicated maze.

I'd like to put some notes on my implementation. My rover had three parts:

Calculate geometry informations: Just like other teams, my rover guessed some parameters using the information. Since there are some latency between server and client, my rover calculates the future position using the log of commands sent to the server.

Macroscopic planning: All obstacles are memorized. If some of them are near enough each other, they are considered as a cluster. If there is a obstacle between the rover and the home, my rover decides left or right using some heuristics. The heuristics was like 1. if my rover is far from the obstacle, choose the way which makes the path after the obstacle easier (with this logic, my rover could solve easy mazes) 2. otherwise, consider safety first, then consider distance. Hmm... actually, I forgot the detail.

Avoid risk: Suppose that the state of my rover is "accel and right turn". Simulate a second using the current state. If it turns out that my rover will die, my rover considers that the current state is risky. In this case, my rover tries 8 simulations with other states. If there is a state which can avoid the risk, my rover sends the commands to be the safe state, ignoring the macroscopic decision. If all states is risky, choose the state which can alive as long as possible.

I wrote a visualizer. It was important for me to fix many bugs. It shows the macroscopic plan using line. Also, it changes the color if my rover considers it's risky.

http://shinh.skr.jp/dat_dir/icfp08.png

After the contest, I wrote some scripts to show statistics.

http://shinh.skr.jp/icfp08/

Anyway, it was fun and I feel happy. Thanks for organizers!

start

I have had a plan to start to write my note (I somehow don't like the word blog) in English long time, but I didn't. I am lazy, and I don't like to write English. Anyway, now I want to write an entry. So, I decided to start.

About Me

http://shinh.skr.jp/ (my website in Japanese)