November 2011
1 post
The "Search" key in Chromebook is actually a...
My Chromebook is becoming my main traveling machine when I am road tripping with BugSense, because is light, with more than 7 hours of battery, excellent keyboard and is running ubuntu (with everything working) :D
The only problem I had, was that I usually change the Caps lock key to a Ctrl key (yes, I use emacs!). Try it and you’ll see that is feels more natural having a Ctrl key placed...
March 2011
4 posts
5 tags
Twits to Music
I’ve created a new live programming language (built using Clojure and Processing) for creating music on the fly, called music as data (MAD) and I am going to present it at Dynamic Languages 2011 conference in Sweden. So I was thinking ways that I could demonstrate the main principle of the language that music is code is data and I thought “Hey lets transform twits to music”!
And...
4 tags
Can we disrupt music collaboration?
I’ve created music-as-data because I really hated trying to write about sins, freqs etc all the time in order to produce a single note. Also, it was very difficult to add abstraction and extend AND having fun all at the same time. I think that (music [as data]) is disruptive in how we think and interact/transform music. Or maybe not.
So, one of the main advantages of having music as data...
4 tags
Music as Data (MAD) - Live programming music in...
I’ve created a new live programming language (built using Clojure and Processing) for creating music on the fly, called Music As Data (MAD) and I am going to present it at Dynamic Languages 2011 conference in Sweden. It’s fun and I think it’s easier to grasp than SuperCollider, Chuck etc. Also, it’s trivial to extend. And its using Processing (so you can add nice cool visual...
January 2011
1 post
Clojure wrapper for OpenKinect!
We are working with the guys from NiobiumLabs for some cool Kinect installations, so I’ve started hacking around with OpenKinect.
The main problem is the libraries. You must download, configure and compile a lot of stuff (I really don’t know what I was going to do without apt-get) and finally all I was missing was a REPL.
I had the Java (processing version) working nicely (after...
November 2010
5 posts
2 tags
Using python and Oracle on Ubuntu
First of all, download Oracle Database 10g Express Edition (around 200MB) after you complete a free registration for Ubuntu.
If you don’t have 1GB of swap, then you cannot continue with the installation unless you create some:
$ sudo dd if=/dev/zero of=/swpfs1 bs=1M count=1000 $ sudo mkswap /swpfs1 $ sudo swapon /swpfs1
(taken from here)
Then after the installation is completed, you can...
Don't install slime via apt-get (at least for...
I had huge problems with my .emacs setup when I moved it to an Ubuntu 10.10 box. I could connect with slime-connect to my swank server but I couldn’t eval anything. I was going ballistic for a couple of hours (I have my .emacs setup on bitbucket and it works perfectly) until I tried to connect remotely to the swank server (so I could at least blame the server).
But remotely everything kept...
Installing Clojure in Ubuntu 10.10 [the easy way]
Installing Clojure in Ubuntu can be found in a lot of places and that’s the bad thing. A lot of copy/paste and things that are out of date (like Java). I’ve been installing Clojure in a couple of Amazon servers for a cluster, so I gathered ALL the info in one big-huge line.
What this line does:
Installs add-apt-repository (so we can add Sun’s Java 6 JDK - it’s not available by...
2 tags
Starting ubuntu 10.10 (64bit) on Amazon EC2
Instead of searching around AMI’s, Ubuntu’s here:
You can search with this is id (for West Europe): ami-505c6924
Convert date to sql date in Clojure
It seems simple (everything is simple after you’ve seen the solution) but couldn’t find a post so here it goes:
July 2010
1 post
2 tags
Create a web service in Clojure without...
This is a cross-post from SocialCaddy
The problem using Jetty (or Netty or Ring) is that after you start the process, your beloved REPL is “binded” to the server thus forcing you to kill the service, make a change, start the process again, refresh and do it again. Not fun at all. It’s easy to run the process “in the background” and have the REPL available to make...
May 2010
1 post
Having a developer write his own unit tests is like asking a crazy man if...
– reddit
January 2010
3 posts
4 tags
Activerecord in Python: Do it like Rails!
I’ve searched around the net for a nice, clean implementation of activerecord in Python but I found none. There are many better libraries for database abstraction out there in Python but I think that Rails’ “activerecord” way is a breeze and a fun way to access a database.
So, my weekend project was to see whether I could hack together a small activerecord for Python.
The...
1 tag
Nimbuzz, Android and Skype: Put your headphones...
I love Nimbuzz (loving it since I first learn about it when I was at the Erlang Factory in London and spoke with a guy from Nimbuzz) ‘cause it was running smoothly on my Symbian and allowing me to connect with Skype. So when I got my HTC Hero, it was the first app I was going to install. But Skype(to Skype) didn’t seem to work (couldn’t speak, couldn’t hear).
I tried Fring...
2 tags
Facebook Connect for web2py
Even though web2py has support for building facebook applications, we didn’t have a way to use Facebook Connect.
I’ve studied many ways (like Facebook’s Javascript API) and checked other frameworks (Rails and Django) and after 4 hours I made a patch to facebook.py that enables web2py (and I’m sure that other python frameworks can use - like webpy) to use Facebook Connect...
December 2009
2 posts
Implementing a Rails-like scaffolding in web2py...
Sometimes I want to create a better administration panel for our clients. With this hack you can create an add/edit/delete panel for every table you like and extend it easily. in order to use it you just go inside the controllers and add:
@scaffold(None) def authors(): pass
this will create an admin page (authors) that has all the properties from the table “authors”. if you have...
Uploading files using CKEditor in web2py
This is the second part of integrating CKEditor in web2py. I should warn you that quotes are messed up in the blog so you can check at web2pyslices for the updated (and ready for copy-paste) version.
What it needs to be done in order to have ckeditor uploading works. First, it needs a “file browser” url. That’s just a form with an upload field where we can use to find and upload...
November 2009
1 post
Creating unicode permalinks in Python (even from...
Optimizing this blog post, which shows you how to create a greek to greeklish “translator”, I’ve created a permalink function that creates urls from greek titles (but you can use your language).
Enjoy!
def create_permalink(s): “”“ Create greeklish permalinks. Also works for english. “”“ import string import re input_string =...
October 2009
2 posts
Using widgets in web2py (integrating CKEditor)
Although web2py comes with an integrated editor, I really like ckeditor and using it for a text field is trivial using widgets!
First, install ckeditor (put the ckeditor inside a js/ckeditor file in your static folder and include it) :
<script type=”text/javascript”...
Creating a dropdown with country names in web2py
There are many ways to create a dropdown that includes all countries in web2py but the most pythonic way goes like this:
Create a module (let’s name it countries.py) and put a list of countries :
COUNTRIES=(‘United States’, ‘Afghanistan’, ‘Albania’, ‘Algeria’, ‘Andorra’, ‘Angola’, ‘Antigua and Barbuda’,...
September 2009
3 posts
Adding your .emacs to Mercurial / Git
Having my favorite .emacs settings available, in the tip of my “hg clone” command is precious. No more backups and no more “oh no, I have an older version in my usb stick”. And it’s easy!
First of all, you need a mercurial server. Or an account at http://bitbucket.org/. Of course the same procedure stands for git.
Then you create a new repository (let’s call...
First review - Karmic Ubuntu Moblin Remix
No one has posted a review of the upcoming Ubuntu remix, so here we go!
First of all, I installed it via usb-creator on a 64gb USB (you need more than 1gb usb for installation via usb - even a 2gb will do) with no problem at all.
The boot stage is identical to the Ubuntu 9.10 and way slower than Moblin’s boot stage (+10secs). After that, the environment seems the same, but now we have...
Ubuntu Moblin Remix is out!
It seems that I am the first one the found that Canonical released an iso image of Ubuntu Moblin Remix (UMR), four months after the official announcement that Moblin v2 will be supported and a couple of months after the announcement that they are working on Ubuntu Moblin Remix. That means that the sexy interface of Moblin v2, will be included at the ubuntu repositories (and it will be supported by...
August 2009
2 posts
How to setup Emacs 23.1 and slime for Ubuntu
After searching and patching around this is what you have to do:
First, install emacs23 (emacs-snapshot) from here https://launchpad.net/~ubuntu-elisp/+archive/ppa. Choose your distro, add the entries to your sources.list, install and you have emacs 23.1.
Now, add slime and sbcl from ubuntu repositories and add this to your .emacs file:
;; Lisp (setq inferior-lisp-program “sbcl”)...
OpenShare :: The First OpenSource Ad network!
This started as a project for a company that wanted an ultra fast advertising server to use for their “ring of sites”. After the project finished, I kept thinking that the OpenSource community could benefit from a “Banner Exchange” service that is free, fast and reliable. So, I started hacking one in web2py running on Google App Engine (no, it has nothing to do with the...
July 2009
1 post
4 tags
Using your mobile as a Bluetooth modem for Ubuntu...
I have free GPRS on my mobile and sometimes I just need my daily dose of Internet even when I am at places with no Internet connection (island / mountain). I know there are many good solutions but sadly many of them are missing some important stuff. So, here is my take:
1. Download bluez-passkey-gnome
$ sudo apt-get install bluez-passkey-gnome
2. Run bluetooth-applet (you’ll see why in...
June 2009
2 posts
Erlang Factory and RainUp Project - Phase I
All I can say is: I am AMAZED by the Erlang community! Sadly here in Greece there isn’t an active Erlang community (but if your are interested in starting one, give me tweet at jonromero) even though there are some crazy Erlang projects (tidier/HiPE/Dialyzer) and some crazy researchers/developers.
All the presentations were inspiring (and most of them uplifting) but what was very strange...
A quick hack for random numbers in Erlang
It seems that you can’t get random numbers in Erlang when you are in different processes. I am building a distributed Monte Carlo simulation and I wanted two random numbers for the x and y (of the dart). So, the only way to do it (if you want it to run in a cluster) is this (at least that’s what I’ve found). {Seed1, Seed2, Seed3} = erlang:now(), X = random:uniform(), ...
April 2009
1 post
Awesomeness : Looking at your own code after a couple of days and thinking:...
– By me
March 2009
4 posts
Between Erlang/Reia/LFE with Joe Armstrong -...
I love Erlang but for a couple of months I was wondering whether using LFE or Reia could speed up development (so other developers could jump in easily on an OpenSource project I am working on - read on for more about the project). Even though that Erlang is very powerful, it’s syntax is a deal-breaker for a lot of people. So, I thought that bringing developers from the world of lisp and...
Only wimps use backup: _real_ men just upload their important stuff on git, and...
– paraphrasing Linus Torvalds
MetroFinder for your mobile!
Due to my new house location near at a Metro Station, I am using the public transportation a lot more than I used to. And because I am (as always) a little bit into my (own very special) world, I tend to miss bus stops, metro stops etc. And of course due to my very short memory that refuses to hold any non-critical information, I don’t remember (or at least I don’t make any effort)...
Time your pet projects!
The most interesting part in programming is creating stuff that to you seem like the most awesome stuff but to others seem like “yeah, cool” or “why did you spent your time building this useless thing?”. That might be the reason why many of our pet projects don’t get published/released (all creators denounce their creations). Our maybe that’s not the reason....
February 2009
1 post
What is emotionull?
Emotionull is a word that combines emotion and null (that’s how we geeks say nothing or undefined - depending on the programming language you love).
You’ve heard it first time here and you can’t unhear it now!
So, what we really are?
Consider a show (hopefully not a freak show!) with many high-star guests. Now, instead of “show”, put “software” and...