stuff i coded
uIP 1.0 for Windows
Thanks to some other guy’s (Higepon, I assume) efforts (whom site is now offline), I got uIP-1.0 to run on my Windows 7. You can see and get the code yourself https://github.com/engina/uip-1.0-win
Engin@Engin-VAIO ~/Code/uip-1.0-win/x86-gcc
$ ./uip
0 - (TAP-Win32 Adapter V9)
fe80::b89d:19c6:5f43:ec4e%32 [0]
0.0.0.0 [0]
1 - (VMware Virtual Ethernet Adapter)
fe80::b98e:1fe8:9121:d0f2%24 [0]
192.168.67.1 [0]
2 - (Microsoft)
fe80::b4cb:2e7f:d890:9004%21 [0]
0.0.0.0 [0]
3 - (Microsoft)
192.168.1.223 [0]
4 - (Microsoft)
fe80::cd43:876e:3b0b:5b79%14 [0]
0.0.0.0 [0]
5 - (Microsoft)
fe80::2daf:5bd7:5b32:618e%15 [0]
192.168.1.111 [0]
6 - (VMware Virtual Ethernet Adapter)
fe80::5431:7f2f:1920:632c%23 [0]
192.168.9.1 [0]
7 - (Intel(R) 82567LM Gigabit Network Connection)
fe80::5872:faab:8d21:2e44%10 [0]
192.168.1.142 [0]
Choose:
This is useful as a debugging aid, a reference implementation and rapid development.
Grooveshark Downloader
I’ve spent the previous night studying (sniffing) how grooveshark works and today I’ve coded this downloader. It has no error handling and it is full of bugs. But it kinda works. You can try it.

Fikifiki – Very simple sudoku solver in C
It was like 4 months ago. I was waiting for something indefinitely in a hospital. Luckily though I had my old cute iBook with me, which includes a gcc in it! Even Eclipse! Then I saw the sudoku puzzle in the papers. So I quickly coded a sudoku solver in C in a couple of hours. I could have had added many algorithms in it, but I just added the most simplest one and it surprisingly worked in my first try :) This one simple algorithm is able to solve easy leveled sudoku puzzles. Though one can add as many algorithms as necessary. Everything is 655 lines of C code — with all the formatting and the comments (if any). Here’s the code. This will probably be used by some lazy ass students :)
You can compile by either invoking “make” in Release or Debug directories, or just import the project in Eclipse and enjoy there.
PENSE – oPEN Simulation Environment
Now, that I got a IDE/SATA USB case, I started looking at my very old HDDs. I found very old codes of mine, this is one of them. PENSE (oPEN Simulation Environment) was my thesis project. It is a framework which you can use to implement simulation easily. I wrote it in C++. Only dependency is GNU’s libmatheval to implement algorithms out of mathematical expressions easily. I even wrote documentation in LaTeX! :)
Anyway here’s libpense and pensedemo. Please note the autoconf masterpiece in the libpense :) it was a bitch to get it working but once it is working… well, it works. I remember compiling these codes on WIN32, Mac OS X and GNU/Linux without a single problem. Yes, I was young and stupid. I developed this on GNU/Linux :)
Oh, the documentation in LaTeX, PDF and the presentation in PPT format is available. Also there’s a reference manual for libpense, I guess I just had too much time :)
A-hem, and you have to excuse any lameness you can spot, since this is a 4-year old code ;)
A sample code from pensedemo;
Environment env;
Device::Source::PWM pwm( "pwm", &env );
pwm.setOn( true );
pwm.setFrequency( pwm_freq );
Device::Source::VoltageSource vs( 0, 4.8, "voltage source", &env );
vs.setOn( true );
vs["output"] = 4.8;
Device::Plant::DCMotor motor( "Maxon_118465", &env );
motor.setLoad( "0.0" );
motor["J_r"] = 0.0000000503;
motor["k_n"] = 252.374609;
motor["I_o"] = 0.029;
motor["V"] = 0.0;
motor["R"] = 2.16;
Device::Controller::FuzzyLogic f( 3, "fuzzy logic controller", &env );
f.setSetPoint( set_point );
f.setInputDomainWidth( 5 );
f.setOutputDomainRange( 0, 100 );
// This is where we connect the devices together to form a feedback loop.
// We connect the PWM controller to the Voltage Source so that PWM can turn
// the VS on and off. Then we connect the voltage source to the DC Motor, so
// that it can, well, run. Then we connect the angular velocity parameter of the
// motor to the Fuzzy Logic controller, so that it can adjust the PWM controller
// and control the speed of the motor.
connect( &pwm, "output", &vs, "on" );
connect( &vs, "output", &motor, "V" );
connect( &motor,"w", &f, "input" );
connect( &f, "output", &pwm, "duty" );