Notice: Undefined index: HTTP_ACCEPT in /var/local/cache/midgard/midgard/31-100-217-0.php(66) : eval()'d code on line 11

Blog: Archive

2008-01-01 - 2008-12-31

Bug fix release of Ajatus beta

Posted on 2008-01-04 06:53:46 UTC to .

I've just released an important bug fix for Ajatus 0.5.0 beta.
I encourage all users to update.

More info found from release notes

I might have fallen in love... with Erlang

Posted on 2008-01-14 22:24:55 UTC to .

Even thought I'm just starting to learn it I can't stop wondering why I haven't got my hands dirty with it earlier.

Main reason I got excited about Erlang was the awesome CouchDB project. After I started to write Ajatus on top of that, we realized that we wan't to go further with features and for that I need better knowledgement of Erlang itself.

Few weeks ago I bought the awesome book from Joe Armstrong "Programming Erlang" which has been a great help and resource on the go.
And it didn't take long before I had first functional (minimalistic) version of the project I wanted to do with Erlang in the first place.

I'll definately be posting more about Erlang as I go, but for finishing touch there is this little piece "Erlang: the movie " floating around the net.

"Who cares if Erlang starts slowly - it was designed to start once and never stop - we have systems that have run for 5 years - a two seconds start-up time amortized over 5 years is not *too* bad" -Joe Armstrong

 

I shouldn't browse the web

Posted on 2008-01-16 09:06:23 UTC to .

Few nights ago while I was searching for Erlang resources in the big web I came across interesting project HaXe.
After few hours of reading I was sold. I started testing with different options and had an idea for a project... CouchBrowser.

CouchBrowser is cross platform CouchDB administrating utility which runs as standalone app. User interface is built with flex for sleek looks. Backend is written with haXe and ActionScript.
So currently I'm building CouchDb library for haXe similar to my other project jqCouch.
Planned features for the CouchBrowser are atleast the same functionality as the couch's own browser based utility plus some export/import features.

I'll put up some project site for this as it matures a bit and I get more time to work with it.

Here is a screenshot of the app (v0.0.1)

 

Packaging Erlang for maemo

Posted on 2008-01-20 23:16:36 UTC to .

I was able to package Erlang for X86 target but collided with some segfaults on Armel. It seems the problem is the qemu and after a while trying to patch it I gave up for tonight. Have to continue tomorrow night.

Anyhow we aren't that far of getting CouchDB and Ajatus to work natively on Nokia n800/n810...

 

First set of Erlang packages for Maemo

Posted on 2008-01-23 06:48:56 UTC to .

Last night I finally was able to do successful packages and installation on my N800.

First set (N800/N810) can be downloaded here: http://protoblogr.net/downloads/erlang/

I'll upload rest of the deps as I get to the office. Also I'm currently buildin ICU which is also needed by CouchDB. Hopefully today I have working native Ajatus on my N800. 

UPDATE: 

Just uploaded rest of the package files. Also there is packages for ICU.
I'm currently trying to get CouchDB to work, but still have some minor problems with it.

For basic usage of erlang one could only install the erlang-base and erlang-nox packages...

Finally got them working

Posted on 2008-01-23 19:35:49 UTC to .

Today I got the complete stack working on my N800 device!

  • Erlang
  • ICU
  • CouchDB
  • Ajatus

They are far from perfect yet but I'm sure it'll get better little by little.
Currently I'm

  • preparing the packages for releasing them through maemo extras repository.
  • trying to compile the latest erlang R12.b.0 (now the package is R11.b.1)
  • adding dependencies to couchdb package
  • packaging Ajatus also

After first releases there are some possible tweaking to do... I still get some Segfaults at some points while using couchdb.

If someone would like to give this a try the hard way:
All the current packages can be found here http://protoblogr.net/downloads/erlang/

  1. Download and install erlang-base_11.b.1-1_armel.deb to the device (after download: dpkg -i  erlang-base_11.b.1-1_armel.deb)
  2. Download and install libicu36_3.6-2_armel.deb
  3. Download and install couchdb_0.7.2-1_armel.deb
  4. Get the latest release of Ajatus and follow it's installation instructions

There might be some dependencies which have to be manually installed. (Will be fixed later)
Currently the CouchDb installs itself to /usr and the databases are located at /usr/var/lib/couchdb.
I changed the DB path in /usr/etc/couchdb/couch.ini to point to my other memorycard (/media/mmc2/couchdb_db) which had some more space left.

Hopefully I get to release these as soon as possible for easier use.

Great thanks to the folks at #couchdb channel (nslater, jan,...)
And to Piotras

Ajatus 0.6.0 released

Posted on 2008-01-30 18:04:31 UTC to .

Finally got the new release out.
This fixes some bugs and adds cool new features.

Go check it out at http://www.ajatus.info/download/ajatus_0-6-0/  

Ajatus Lightning talk @ FOSDEM

Posted on 2008-02-08 21:14:01 UTC to .

Ajatus LT was accepted to this years FOSDEM in Belgium.

At this point it seems the presentation will be on Sunday 24 at 15:40.

I'll be introducing Ajatus itself and little bit about the pieces it is built on (CouchDB, jQuery).
Mostly I try to concentrate the presentation for developers interested either in offline AJAX development or even Ajatus itself.
I will be showing and explaining some of the layers inside Ajatus, different ways to expand it with plugins, etc and give sneak peak to the future of the app.
Some basic replication scenarios will be covered also.

At the same weekend Bergie and I will be attending the XMPP Devcon to collect and present our ideas of the automated XMPP based CouchDB replication currently going under name PillowTalk. 

 

Interesting taxi company

Posted on 2008-02-21 17:13:35 UTC to .

Today when I was leaving from home to Helsinki I decided to take a taxi from my house to the train station.
For my supprise the Riihimäki taxi operator was a bit more enhanced than I could have imagined.
This is the call I made

Machine answers: Hello, finding your position now...
[After few seconds]
Machine: Calling nearest available taxi, please wait...
Taxi driver: I will be there in two minutes.
Me: Thank you.


I could believe this in Helsinki but not in Riihimäki which is really small town...
We are going to the right direction....

Ajatus LightingTalk in AOP

Posted on 2008-03-03 19:23:01 UTC to .

Next saturday there is a FOSS event "Avoimien Ohjelmien Päivä" in Turku, Finland.
I will be holding a LightningTalk of Ajatus there somewhere after 3pm.

If you are coming there, let's go for a beer etc. and discuss the topic or offtopic...

Ajatus LT @ FOSDEM video

Posted on 2008-03-05 10:50:55 UTC to .

For those of you who are interested but missed the talk
the video is now available to be downloaded.

Lost my left ring finger on a motorcycle crash with deer

Posted on 2008-05-16 16:21:15 UTC to.

Last wednesday (07.05.2008) while I was driving my one week old Ducati Monster 696 from work to home,
I crashed into a deer.
I slided approx. 8 meters with the deer on front and after that bounced from side to side 11 meters with the bike. Last slide was approx. 58 meters with my left hand under the bike. Somehow my backpack got attached to the bike handles so I wasn't able to get rid of the bike while sliding. After the bike stopped I got up and took my helmet and gloves off.
I was swearing a lot and started to take cigarettes out of my pocket, thats when I realized that half of my finger was missing...
Then I started to scream and yell until a car came to the scene and I was able to stop them so they could call help.
I got to smoke one cigarette before the ambulance came and took me to the hospital. Luckily I was close to Helsinki so they took me to hospital where was great hand surgeon. They amputated half of the finger off.

I'm still very happy of the outcome. It could have ended a lot worst. I think most of the compliments for my survival with minimal damage goes to the great motorcycle clothing and safety gear I had on.

So remember bikers, wear your safety gear! You never know what can happen...

I'll put up some photos as soon as I get enough strength to get them off from the camera...




Duct Framework

Posted on 2008-07-17 15:15:30 UTC to .

Duct is something I have planned doing for a while and started coding last week.

What is Duct? (or what it will be)

Duct is a Flash framework with different generators and tools.
with single click it can generate dynamic Flash Sites, Banners, Polls, Surveys, etc. (through engines)
It has it's own server implementation also which allows dynamic content, mail and other features
for Flash. Server side is written with PHP but I have planned a Python version of it also.

Currently Duct UI is built to Flash IDE but I have plans to add Commandline, Online and Standalone support also.

I'm going to publish this as a Open Source project as soon as it gets a bit more mature.
Also more about the whole project will be published later.

Here are some screenshots of the Banner Engine. (And scaffolded banner project.)

scaffoldedBanner.png
(All these files have been generated after pressing the "Create" -button)

Sudden urge to redesign this layout

Posted on 2008-07-17 20:27:33 UTC to.

I've planned doing this for soooo long and finally I took up the challenge and redid everything...
Later on I'm going to move to other server so I'm getting more recent Midgard beneath and some new stuff to the site.

Hope you guys like this... If you have any comments/wishes drop me an email or shout at Jaiku...

Later

Just added first version of mobile css

Posted on 2008-07-28 10:56:03 UTC to .

If one is to browse this website through phone browser they should see this page fitted on the phone screen.
This is currently tested on Nokia S60 series phones only. Widescreens doesn't show it right yet, but that will be done also after I get test machine for them.

PHP5 events class

Posted on 2008-08-04 09:42:01 UTC to .

While I was building Duct Frameworks server side with PHP5 I realized I needed some kind of event support for it.
So I created similar approach that ActionScript uses. You can download the class with example from here.

Hopefully this comes in handy for someone else also. 

Here is simple example also:

 

<?php

class mother extends events_observable
{
public function __construct()
{
parent::__construct();

$this->addEventListener(events_event::ONCONSTRUCT, events::delegate($this, 'on_object_constructed'));
}

public function on_object_constructed($target, $args)
{
echo "{$target->name} has born.";
}
}

class child extends events_observable
{
public $name;

public function __construct($name)
{
parent::__construct();

$this->name = $name;

$this->dispatchEvent(new events_event(events_event::ONCONSTRUCT, $this));
}
}

$mother = new mother();
$child = new child('Jack');

?>

PHP5 xmlObject

Posted on 2008-08-05 15:37:23 UTC to .

UPDATE [08/06/2008]: Version update. Did some fixing and made it work better with larger structures.

Here's another simple little helper I developed for Duct framework.
I use this one to convert my arrays to XML. As Duct automatically scaffolds objects from XML/YAML to database
and uses the same methods to render the database objects to html forms for editing I needed some quick way to
transform this data to and from XML. Class end examples are here

Usage example:

<?php
$resource = new xmlObjectItem();
$resource->items = array(
'id' => 100,
'name' => "Jerry Jalava",
'person_id' => 1
);
$resource->attributes = array(
'person_id' => array(
'is_assoc' => true,
'foreign_model' => 'person',
'foreign_key' => 'id'
)
);

$resource_set = new xmlObjectSet();
$resource_set->wrapper_id = 'resource';
$resource_set->items[] = $resource;

$projects = array();
for ($i=1; $i <= 1; $i++)
{
$object = new xmlObjectItem();
$object->items = array(
'id' => $i,
'name' => "Project {$i}",
'manager_id' => $i+1,
'resources' => $resource_set
);

$projects[] = $object;
}

$project_set = new xmlObjectSet();
$project_set->wrapper_id = 'project';
$project_set->items = $projects;

$clients = array();
for ($i=1; $i <= 1; $i++)
{
$client = new xmlObjectItem();
$client->items = array(
'id' => $i,
'name' => "Client {$i}",
'contact_id' => $i+1,
'team-leader' => null,
'projects' => $project_set
);
$client->attributes = array(
'contact_id' => array(
'is_assoc' => true,
'foreign_model' => 'person',
'foreign_key' => 'id'
)
);

$clients[] = $client;
}
$client_set = new xmlObjectSet();
$client_set->wrapper_id = 'client';
$client_set->items = $clients;

echo "complex set:\n";
var_dump($client_set);

echo "\n--------toXml---------\n";

$xmlSet_clients = xmlObjects::toXml($client_set, 'clients');
echo "complex:\n";
echo $xmlSet_clients;

echo "\n--------fromXml---------\n";

$client_set = xmlObjects::fromXml($xmlSet_clients);
echo "client_set root: {$client_set->root}\n";
var_dump($client_set);

echo "\n--------back toXml---------\n";

$xmlSet_clients2 = xmlObjects::toXml($client_set);
echo "complex:\n";
echo $xmlSet_clients2;

if ($xmlSet_clients == $xmlSet_clients2) {
echo "\n\nVALID SET CONVERSION\n\n";
}

?>

Midgard Textmate bundle

Posted on 2008-08-07 18:01:38 UTC to .

For quite a while Joonas and I have planned to do a Textmate bundle for Midgard CMS to fasten and ease the code development and work as a reference to the thousands of methods MidCOM and Midgard has.

Finally last night we just decided to put the project on properly and uploaded it to GitHub.
Today I added (and adding right now) quite alot of the basic methods.

Here's a screenshot of shortcuts for the Query Builder.

with these methods even complex queries can be built lightning fast. We will be adding more stuff as time goes by.

Crash and burn

Posted on 2008-09-02 12:36:28 UTC to .

Last friday I collided to quite frustrating moment while doing user import to clients Midgard site.

I created a simple import script to parse the old data from CSV and insert them as Midgard persons. After the script runned for a while I started seeing errors that the MySQL wasn't responding. Checked the server and realized that all disks were mounted as read-only and I couldn't mount them back. So after weekend of strugling with the server we decided with the hosting company to move all the data to new server.

After this I made some minor modifications to the import script so it sleeps 2 minutes after every 250 imported users. And monitored the server all the time. After 5hours of importing everything was ready and the server is still doing ok.

So just a small advice to anyone who has to do big imports (over 18k objects), add some sleep time to the import script so the server can take a deep breath once in a while.

on the next Midgard dev meeting I'll try to do this again on a development server and trace for memory leaks.

Midgard

Back