martes, 23 de agosto de 2011

ESUG in: 2011 on: Edinburgh

ESUG 2011 is over, and I'm back from my holidays, with a couple of interesting bits about the smalltalk world, and lots of energy.

Here are the talks that impressed me most:

- Martin McClure explained Maglev smalltalk to ruby ffi. It seems maglev is more than a simple smalltalk vm. In fact it runs ruby code and smalltalk code seamlessly (at least, that's what I understood). Unfortunately, it only exist in 64-bit shape, so I couldn't try it myself. The core of the presentation though was the nice FFI that VMWare guys (former GemStoners) prepared to run Ruby code from Smalltalk.

As most of you know, Ruby is heavily influenced by smalltalk. In fact, so much that Martin and friends were able to make one object for both worlds. So String class is the same for ruby and smalltalk. Objects are the same, but the names are different, so SmallInteger for smalltalk, is fixnum for Ruby. 'super' pointer is also different, enabling to build variations in hierarchies and supporting singleton classes for ruby.

Lots of nice tricks that enable us to use ruby objects as smalltalk ones.

- Bifrost. Jorge Ressia is implementing great improvements in the reflexivity side of Pharo. Being able to treat data as code is one of the aims of bifrost. Not losing the link on logs and where a log entry comes from, or being able to hook on variable usage when debugging... Thanks to Bernat I was able to try it in my own pharo image. (Bifrost is only the framework, you have to install the programs separately)

- Jtalk. I think this was the killer talk of this ESUG. Goran Krampe and Nicolas Petton presented their (mostly Nico's) smalltalk implementation in js. Running smalltalk in browser is not only being able to write smalltalkish syntax. It means you have a full stack smalltalk in your browser. Many firebug features will come for free in Jtalk. Goran showed some experiments he's doing with node.js and jtalk compiler to js. Yes, you're able to write smalltalk for the server side. Probably I'll post more about jtalk, so keep tunned.

There were a lot of other interesting presentations, like Gerardo and Javier live garbage collection tweaks(writing garbage collectors in smalltalk and rebinding garbage collector on your live system), redline (smalltalk in your jvm) and Coral (pharo for those who can type).

It's great stuff all way down!

domingo, 21 de agosto de 2011

Cellular automatas and me

2 weeks ago I started to read Philosophy and simulation by Manuel DeLanda (thanks eskerda).

About one month ago I watched jdelgado's talk at Campus Party talking about science in science fiction, and he talks a bit about cellular automata too:

So I started to experiment a bit with cellular automatas myself, and implemented a Conway game of life in smalltalk. At first I wanted to write a very flexible (1d,2d,...nd) cellular automata engine, but once I had the 2d Game of life implemented, I realized that doing 1d things is easier if you do it with strings, or just lists (lisp lists, for example).

Well, so I implemented a 1d cellular automata in common lisp (nice exercise) and tried some interesting rules for the majority problem jdelgado mentions in his talk.

At first I thought majority problem had a defined proper solution, but searching on the internetz, it seems it's not trivial at all, and I couldn't find anything that takes me further than rule 184, that splits the list in a group of 0's and 1's.

If you want the implementation of the smalltalk GoL, ask for it (it's not that easy to paste smalltalk code on the web, you know...), or just download any already existent implementations on squeaksource, like Bernat's one.

martes, 16 de agosto de 2011

git push -f to master and you're a dead man

Just came back from the half of my holidays, and came with a quite long TODO list.

One item of the list was a wrapper for git that avoids pushing -f the master branch.

At my new $job (yes, I changed again, you'll be noticed properly when I have more time to write), we use a minimal version of git-flow and we run tests on remote (personal) branches.

That means that sometimes, you have to git push -f to your personal remote branch, and possibly delete history. There's no problem if you do it in your personal branch, but as dumbans we err, and myself, being new to all this git fancy stuff, I was a bit worried about it.

I've come with a solution that should work fairly well and transparently. A wrapper for git that nops dangerous commands.

It's perl, and here it is.

Despite being destructive, I like the equals method, kind of lispy, but using shift as a car/cdr solution.

To make the wrapper work, rename it to 'git', make it executable, and put it somewhere in your path, before /usr/bin/git executable.

martes, 9 de agosto de 2011

Back to the future. Xerox PARC innovations.

From time to time. I spend an afternoon doing some monographic research of a great Computer Scientist, or simply people I've seen some day in TED, and would like to know more about him/her.

Sometimes it's Joe Armstrong, sometimes it's Guy Steele, but Alan Kay and friends take these afternoons more often than others.

Here are 3 Conferences by Alan Kay and one from Dan Ingalls. Those two men (and their collegues at Xerox PARC) have done probably more for our field than any other single group in the 70 years of history of CS (or call it tinkering, or computer tekne)

Alan Kay at TED talk, sharing his ideas about ideas. 2007

If you liked it (you SHOULD like it), here you can see a longer talk about Alan's last work (STEPS)

Here's Dan Ingalls talking about his work at PARC Place. Great stuff too.
And another Kay's talk about great innovations of the 60's and 70's. In XXI century, we haven't exploited many of these ideas yet.
If you know of other related talks, please, put links in comments.