Chromium OS Builds for non-Chromebook Machines!
So excited for this. A user going by the name of hexxeh has created a website which automatically builds the latest versions of Google’s Chromium OS. I downloaded an image, but unfortunately, the latest builds don’t work on my machine. I get a kernel panic upon boot. I’ll try it on my brother’s laptop later, and hopefully that will work.
BUT, the most important thing is that hexxeh was able to get Chromium OS working on his Raspberry Pi! I have one ordered and will hopefully get one within the next month. Very excited about that.
Jukebox is available for download!
I’ve decided to go ahead and give out the source code for my Jukebox project. It’s not much, but I figured it’s better to let people take a look if they want. I am offering no promises that this will compile on your system, but I’m just getting it out there. You can post in the comments if you’re having trouble, but I’m not yet familiar enough with C++ to offer much help.
So here is my first release. Dependencies are a c++ compiler, the ncurses library, and the FMOD Ex library installed. I have compiled this project on both Linux and Windows, but it may take a bit more work to compile under Windows which I have outlined in the README.
I have included the program compiled under a Linux i686 machine. You will need to recompile if you are not using Linux or if you have a 64-bit operating system.
Download mirror
Enjoy! I added some screenshots to an imgur album here. Any comments? You can message my Tumblr account, add a comment to the post, reblog with a comment, or send me an email to the email listed in the README.
What about the source code?
I have also made the two source files available for online viewing on Codepad:
Jukebox.cpp - Contains main() and most of the jukebox and ncurses logic.
player.h - Contains the Player class which accesses the FMOD sound library.
Instructions
Jukebox is controlled completely through your keyboard. Here are some keys to know:
- Arrow keys. Up and down change your song selection.
- Use Space to start a song.
- Press ‘p’ to toggle pause/play.
- Press ‘n’ to play the next song.
- Press ‘c’ to change the color scheme, and ‘i’ to invert colors.
- Press 1-3 to sort by a column. 1 sorts by the first column, 2 sorts by the second, and so on.
- Press 0 to randomly sort all the songs, also known as shuffling.
- Press ‘q’ to quit.
Thanks for taking a look! Any feedback is more than welcome.
This is the latest project I’ve been working on. It’s a jukebox mp3/ogg player that is run completely in the command line. Written in C++, this jukebox uses the ncurses library (or pdcurses on Windows) to create a user interface. The program reads files out of a directory and sorts them according to their tags. The program also supports color changing if your terminal supports it. The best part about this is that it weighs in at only 5 MB of memory usage! Very lightweight.
I might write more on this later and release the code if I get around to it. Here’s another screenshot so you can get an idea of how it looks with different color schemes:
Running Javascript as fast as native code
I was reading a discussion today on Ars Technica about Google’s Native Client project, or NaCl for short. (That’s such a clever name!) One of the issues discussed was the current major speed difference between run-time JavaScript compilation and pre-compiled binaries.
Long story short, a user made a point that JavaScript could never be as fast as native code even in theory due to the fact that high-level interpreted languages have plenty of overhead and implicit data types. Another user responded with the above link, which links to the blog of a Mozilla developer who explains how one could convert any JavaScript code into Python code, and in turn convert that Python code into a C binary which is native machine code. The speed difference was negligible between the JavaScript-turned-binary and the equivalent code in C.
The significance behind this is that a browser could theoretically do this conversion on-the-fly when a page is loaded, at a cost of initial loading time for the JavaScript file. The author suggests that the normal JavaScript be executed as soon as it is downloaded, and perform the conversion on another thread. When the conversion is done, attempt to hot-swap the interpreted JavaScript code with the freshly converted binary for a speed boost. If even this cannot be done, the browser could at least cache the compiled script and re-use it whenever the user loads that website again.
Very neat article! It’s interesting all the different ways one can get a speed boost in their web browser.
Tumblr spam accounts are only in it for ad revenue
I’ve been getting tons of spam lately from a new form: people “liking” my posts. It seems relatively harmless. I leave for the day, and come back the next to find that I have ten blog updates for various people liking something on my blog. I’m glad to see that until I actually look to see who it is that’s liking my posts. I think I’ve found out what all this spamming is for.
Being a programmer does not make you a genius
Why do people assume that I can help them with anything remotely related to computers at all just because I like to program? I’m not some sort of wizard at all things mechanical. I don’t know why your off-brand phone doesn’t sync contacts correctly.
Firefox's new version model: why nothing really changed
Peter Bright over at Ars Technica discusses why Firefox’s new version system (version 5 will be released soon!) does not actually imply major changes, but only a shift of perspective. He also rants about how the Enterprise is retarding the progression of the Internet.
Image lightbox previews improved!
I spent the better half of the night editing the source code of the Fancybox plugin for jQuery. Fancybox is an improved version of Lightbox, which is a JavaScript-based image previewer. I had an idea in my head that, since my blog has so many images on it, I’d like to enhance the image browsing experience. The vision that I had was that there would be links at the top of the lightbox which would allow the user to go to the next page on my blog, the previous page, or visit the Permalink page for the currently viewed image in order to reblog or like it. Also, I wanted to add the “gallery” feature that Fancybox already has but my theme designer did not implement.
How the atom bomb helped give birth to the Internet
An excerpt from a book describing the origins of the Internet. It’s a fascinating read that goes into detail about how decentralization of networks to launch atomic bombs gave rise to the Internet protocol.
JavaScript compilers and my psychic abilities
So, as I was finishing up coding my jQuery plugin yesterday, I needed a way to minify, or compress, my plugin code so that it would download faster for my readers. The person whose code I modified to make the plugin had left a strange-looking comment at the top of his code that looked like this:
/**!
* @preserve Multi-value shadow animation jQuery-plugin 1.8
*/
I wondered what @preserve meant. Could it be a directive for a compiler? I investigated further by using my Google-fu to search for anything related to Javascript minifiers and @preserve. About four links in, I found myself reading about Google’s Closure Compiler. Hm, a true Javascript compiler. That’s strange, I thought; I found myself creating one for my own use just two weeks ago. I didn’t even know Javascript compilers existed.
