Museum of Endangered Sounds
Hehe, this is truly amazing museum! The best I’ve seen lately.
Source: The Atlantic
New classes
I took three more classes (actually, I took a lot more this time, but they all fell off, still hope to at least watch the videos).
So here’s the breakdown:
Udacity CS212 - Design of Computer Programs - a bit boring for me, I usually do all the same stuff as my daily job. Might be interesting to people new in the craft.
Udacity CS387 - Applied Cryptography - very interesting one, enjoying the theory and application equally.
Coursera Compilers - Compilers (ha!) - extremely interesting, very practical and exciting course. I’m kinda skipping the quizzes - they are too theoretical and not very interesting, but spend most of my time on actually implementing the lexer and parser and in the future hopefully some code generation and optimizations as well. So far, my favourite course.
Sending network packets
A little sidetrack into the world of PCI probing and NE2000 network card emulation.
Wanted to have a taste of sending and receiving network packets inside my little OS, so I went and implemented PCI scanning (extremely simple) and NE2000 card driver (fairly simple too, their doc is quite good although misses some crucial points).
So, after some fiddling I was able to send a packet and receive it through the bochs virtual network card. I’ve then connected bochs to the host network card and stared at network packets for a while. Cool stuff.
Here’s the screen dump of the sent and then received broadcast packet.
IRQ11 enabled. Finished initializing NE2000 with MAC b0:c4:20:00:00:00. Received irq: 0x0000000b Packet transmitted. Packet received. Received packet with status 33 of length 68, next packet at 82 0x004f0064 ff ff ff ff ff ff 28 cf da 00 99 f5 00 10 48 65 ......(.......He 0x004f0074 6c 6c 6f 20 6e 65 74 20 77 6f 72 6c 64 21 00 00 llo net world!.. 0x004f0084 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 0x004f0094 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
sjlj and exception handling
Of course, the clang’s implementation of setjmp is very generic and uses quite an abstraction of program state, which makes it hardly suitable for the ad-hoc local exception support I’m using. Since my requirements for setjmp were quite simple (just give me back my damn registers and stack frame), I went and implemented a very custom-tailored versions __sjljeh_setjmp and __sjljeh_longjmp which do just what I need.
With that stuff out of the way, my entire boot sequence now works and I can finally fiddle with more interesting stuff. Type system and introspection, here we go.
CS373 finished
I’m done with CS373, having implemented some quite nice algorithms that can be used to real-life robot navigation and after a surprisingly well done final exam (my hopes weren’t so high after the AI class, so I’m positively surprised).
It was so fun I signed up for two more classes starting April 16. - Applied Cryptography and Design of Computer Programs. Can’t wait to have moar edjuukation.
Bret Victor's Kill Math
How to stop worrying and love your visualization tools.
Education opportunities
One chat started talking about various online education opportunities. Here’s a short summary of the available options, for reference.
First, of course, is http://www.khanacademy.org/ - a set of online lectures about many many many different subjects.
A free, live machine learning course from Caltech in U.S.: http://www.work.caltech.edu/telecourse.html (thanks to Brad for pointing this one out). Note at the bottom of the page the different start times depending on location.
Also MIT video lectures on various subjects, see the whole list here: http://ocw.mit.edu/courses/ (thanks to Dennis).
https://www.coursera.org/ is a company set up by Andrew Ng and Daphne Koller for providing free online education. They have a selection of great free courses already running and more is coming this year.
http://www.udacity.com/ is a company set up by Sebastian Thrun (of google self-driving car and Intro to AI classes fame) for providing free stanford-grade education online. I’m in cs373 and totally enjoying it.
(Both these are less of “just lectures” and more of the interactive study class approach)
Optimizations
The reason for not booting was simple - Clang, seeing that target is Pentium 4 and above, optimized some memmoves into SSE operations. Bochs didn’t expect that.
Now everything boots up until exceptions, at which point I believe the __builtin_longjmp primitive fails. Debugging it.
CS373 homework 5
Homework 5 done. Don’t know the grades yet, but it was pretty fun practical experience.
I love this course a lot more than introduction to AI, but credit where credit is due - Thrun and Norvig did an amazing job in Intro to AI to prepare me for this class, I certainly believe this is due to their previous class that I feel this class is so easy.
With the material provided I’m basically ready to build a small self-navigating robot, so I hope my Pololu 3pi will get some use soon.
Clanged now
Anyway, I’ve done doing the craziest port of recent times - at the same time GCC to Clang and from waf 1.5 to 1.6.
Quite a bit of quirks to work around.
waf has changed a lot internally, and from occasional backtraces I still see that I’m using compatibility mode somewhere. Oh well, one day when I’m bored…
Clang is also full of quirks. First, I had to build a cross-gcc for it anyway, because otherwise it totally refuses to link or assemble anything. Second, the freestanding standard C headers are not quite finished it seems - stdint.h for example spits out about 20-30 warnings about redefined macros, so I had to disable -Werror for now just to get it to compile. Third, the generated code, obviously, doesn’t run. I got only first couple functions of kickstart bootloader to work in bochs, after that it just GPFs. Now if it keeps raining tomorrow like today, I’ll certainly will go and look what happens there, otherwise it might have to wait until next weekend (actually, in two weeks).
I’ve finished my CS373 homework 5 at Udacity - more about that in the next post.
Thanks to @pussylequeer I have probably the most amazing tumblr feed to look at when I’m down. Thanks a lot!
Source: pussylequeer
Clangestine
Finally, Clang people have enabled C++11 lambda support in clang and I’m busy hurrying my buildsystem into clang support for everything. I’m tired of endlessly autoconfiguring and building crossgcc for a bunch of different targets. Adding a target with some include paths set up for my OS into the clang frontend seems like a much simpler idea.
Magic Ink
Highly recommend this read to all programmers and designers. Very inspirational.
It intersects with Metta’s ideas of supporting creativity freedom, and is written a lot better than I could ever dream to write myself.
Menlo, a new monospace font being included inĀ Mac OS X Snow Leopard. The chart above shows Menlo being compared with the open sourceĀ DejaVu Sans Mono (a personal favorite).
Source: 9-bits

