Archive for the ‘Programming’ Category
ECLM 2011 Notes
This last weekend I was in Amsterdam to attend the European Common Lisp Meeting. This was my third participation in a organized Lisp meeting (after the first ZSLUG in Zurich and the ELS 2011 in Hamburg) and I am happy I’ve decided to go. I was only present at the meeting itself since going to the dinners and city tour would have been way out of my budget. Anyway, the ECLM was a nice venue. I enjoyed most of the talks and still had an opportunity to talk with fellow lispers. I enjoyed talking with Luís Oliveira and meeting Zach Beane.
The first talk was given by Nick Levine and it can be viewed in two parts. In the first one, he talked about his experiences of trying to write a CL book for O’Reilly. It was quite interesting to see how hard can it be to prepare a book, especially for a publisher who was (is?) not very lisp-friendly. The second part was mostly about the community, although presented with a rant on libraries. This is a topic that has been debated several times. Thanks to Quicklisp, the problem now is not installing libraries but finding them and knowing which ones are good. I am not sure if creating another site as suggested would be a good thing since resources are already scarce. Perhaps more thought must be made in how to improve the current ones. CLiki still seems to me the best starting point. Still, Nick Levine talk was good and entertaining. One of the best in the meeting.
The following talks were mostly about companies that use CL as their main programming language. Jack Harper talked about the company he recently started, Secure Outcomes, that produces a unique portable fingerprint scanner. I must say his talk was quite inspiring! He talked about how to get a startup running and the decisions that took him to choose Lisp as the main development language. In addition, he also explained why prefers Lispworks to any other implementation.
Next, it was the talk given by Dave Cooper. I must confess his talk was the weaker of the day mainly because he talked about two different subjects without any connection. He started talking about GDL, the main product from his company, Genworks. I’m sure GDL can be a great thing but I didn’t get much from his talk. About halftime, the talk suddenly changed to the Common Lisp Foundation. This was the interesting part of the talk since he explained the aims of CLF, the people behind it, etc. However, it was not clear how it will distinguish itself from ALU in terms of operation (in terms of purpose, CLF just focus on Common Lisp while ALU in all Lisp dialects) and this was the main concern that was expressed during the questions time. After presenting CLF, and since there was still some time left for the next presenter, he went back to GDL.
Afterwards, it was the turn of Luke Gorrie to present his lisp-hacker startup Teclo Networks. His talk was an expanded/updated version of the one given in Zurich. Still, it was also quite interesting. He started by telling how a group of hackers with a Lisp and/or Erlang background got together to improve the mobile TCP/IP communications. Then, he showed us how TCP badly misbehaves in a mobile network and how their product, Sambal, can give 10% to 27% improvements. Another interesting point of the talk was that CL is used as their main development language. In short, it is used to develop and study all their algorithms. They have a TCP/IP stack fully implemented in CL! Moreover, all their analysis and maintenance tools are also all in CL. However, in the actual product boxes they have reimplemented the algorithms in C. The reason: extreme pragmatism. Luke concluded by hinting that the sales of their product is going very well!
In the afternoon the talks started with Paul Miller from Xanalys. The talk was dedicated to Link Explorer, a windows desktop tool to analyze data. The application is quite impressive and was developed using just CL. Paul also gave us a demonstration of the tool as well as some notes on future development.
The best and most awaited talk, Quicklisp, technically and socially, was given by Zach Beane. The talk focused on several aspects of Quicklisp. Zach started by giving an overview of the famous library problem of CL, the solutions that existed before QL, explaining their advantages and disadvantages. Also, and very important, what people were actually using and what difficulties they were facing. In a survey he did, most CL programmers were installing libraries by hand, including Zach! Then he proceed to how Quicklisp was developed, some technical issues, what is the role of Quicklisp and what is the reception after one year. The talk focused then on the social impact of Quicklisp in the community. One of the things that makes Zach happy it’s the number of emails he gets saying that people are back to using CL and contributing more to the community (i.e., making libraries available) because of QL. Finally, some indications of what is to come. My perception is that the possibility to enable hacking as it was possible with clbuild is one of the most exciting future features for Quicklisp. Zach’s talk was excellent from all points of view!
The last talk of the day was by Hans Hübner. This was my second favorite presentation. Although the topic, code style and conventions, can start some heated discussions, I must say that I agree with almost everything Hans Hübner mentioned. However, like everything, some common sense is always necessary. One of the main points was that lispers should not use constructions which are not part of the standard language when the standard provide options, just because you want to save some typing. It is more important for another programmer to understand faster what is written than forcing him to look for the definition of the unusual constructs. The if*, bind were examples given. Hans also talked abut the 80-column rule, style guides, etc. In the end, it always depends on the project, the people, etc, but code style is important and should not be ignored.
The meeting ended with several lightning talks. The most interesting bits were: Marco Antoniotti announced ELS 2012, to be held in Zadar, Croatia, around April-May; Christophe Rhodes talked again about swankr, a swank and slime for R; the announcement of ABCL 1.0.0 by Erik Huelsmann.
Some words on the organization. Organizing a meeting of this kind is not easy and Edi Weitz and Arthur Lemmens must be congratulated for making a great event. Not all was perfect but everything went smoothly. I wish that it continues to happen in the coming years!
Some thoughts on The Book of Ruby
Disclaimer: No Starch Press provided me a free copy for review.
Ruby is a programming language that I always liked and somehow prefer it to Python. I used Ruby for some prototyping but when you have Common Lisp, it becomes hard to use any other language. When No Starch Press offered me the opportunity to review The Book of Ruby I was curious because the two previous books I’ve read from them were simply excellent. I already have four books on Ruby so I was wondering how this one could compare to those but most important, if would follow the same style as Land of Lisp and Learn You a Haskell for Great Good!. After reading the book, unfortunately, my feelings are mixed. Let’s see.
The book is well-written, with a good structure, covering beginner topics to advanced ones. It contains 20 chapters (without the introduction) and 4 appendixes. The initial chapters focus on the basics of the Ruby language. The later ones focus on more advanced parts of Ruby and more specific topics, for example, debugging and Ruby on Rails. This is a positive aspect of the book since for someone starting with Ruby can have in a single source access to several important topics. The chapters also have a Digging Deeper section at the end, presenting interesting discussions of the topic at hand. Also a nice read was the last chapter since it deals with the dynamic aspects of the language (use of eval, etc).
However, the book has some issues. The most important one is about the coding style, or the lack of it. The book is not consistent, does not follow Ruby conventions and it shows quite easily. I believe this is bad for a novice programmer in the language since it makes examples harder to understand, not to mention other things. Second, the book does not have the same fun style as the other No Starch Press books. This is a not problem per se but since the book subtitle is A hands-on guide for the adventurous, the reader is more or less mislead to think it follows the other books fun style. Third, the examples are too contrived and a few project ideas are missing. Ruby is a very nice language and with it you can do lots of things without writing lots of lines. So, it is a little disappointing that a book that aims itself for someone that wants to learn the language (but not programming from scratch) is not offered with some pointers in how to expand what is learning.
To conclude, the book is nice but probably is not the best book for a complete novice and not the best ruby book.
NXT 2.0
Yesterday I finally dedicated some time to assembly my newest toy: a Lego Mindstorm NXT 2.0! I just made the basic drive rover with some sounds. I need now to explore more the capabilities of the NXT. I need to see what other options exist in terms of programming the brick.
As before, the internal language it’s a bit limited. I played with the original Mindstorm a few years ago. Already back then, I used for a few experiments a set of Lisp macros to generate some commands for the rover. There is XS in Lisp but I’m not sure if that is what I want. Something more like lejOS would be nicer (but in Common Lisp). Anyway, regardless of that, a mindstorm is always a cool toy :-)
Review: Learn You a Haskell for Great Good!
Some weeks ago I was contacted by No Starch Press asking if I would like to review one of their latest books: Learn You a Haskell for Great Good! by Miran Lipovača. I accepted it because I was already interested in reading the book and it would be the perfect opportunity to learn Haskell more properly since my adventures with it were limited. Basically just scratching the tip of the tip of the iceberg. And so, after getting the book I started to read it and solving some Project Euler problems as training exercises.
First, I must say I learned a lot and had some real fun while doing it! The book is very well written and presents a lot of material aimed to true beginners. Although it should be noted that it’s not a text for beginners in programming, only for those who don’t know Haskell. And the text really focuses on the language and skips unnecessary stuff, which is quite good because you start working with Haskell immediately. Another good thing of the book is the actual pace. The information comes at the right speed! You never feel it’s going to fast or too slow, or that suddenly things become too complicated. It builds your knowledge of Haskell in the right amount, especially if you take some time to do some coding of your own (in this regard, implementing some problems in Project Euler is great). Only the last chapters of the book start to become more hard to grasp at a first reading because it deals with advanced concepts that will need more training from a beginner.
As I said before, the book is very well written and I enjoyed the style a lot. It’s not the same kind as Land of Lisp but has some common points. The author has a sense of humor while not filling the text with lots of jokes or provocative humor; it just feels natural. The cartoons that populate the book are not comics and just have a figurative role. I must confess that sometimes they just fill space but others they help making the reading more nice. Again, no cartoons or comics in the style of “Land of Lisp” (I guess that is a real unique book). My only complain with the book is the lack of coding exercises, or mini-projects suggestions, at the end of each chapter. This wouldn’t be a complain if the book was more structured around mini-projects that would force you to code something larger than small functions. They exist, e.g., the task list, the calculator, but more would be a nice addition.
Did I learn Haskell with the book? Definitely yes! And it was fun :-) Naturally I’m still at a beginner’s level but if I keep coding a little more in Haskell, for example, re-implementing some of my current projects, I believe I can consolidate what I’ve learned and be ready to pass to a more intermediate level. I have not read other Haskell books but if you want to learn the language, have a good grasp of its capabilities and what you can do with it, this is a good book to achieve it and I recommend it without a doubt!
Finally, a word about No Starch Press. It is great that a publisher like them is investing in books and authors of more unconventional languages. I wish more will be published in the future :-)
Lisp meeting in Munich
Yesterday took place the Munich Lisp User Group meeting. The group is a bit irregular in making them, and taken this into account, I think it was successful (there was one planned in November but it didn’t happen; in the meantime, I went to Zürich to attend one ;-)).
Anyway, yesterday there were 2 short talks and a small discussion at the end. Both talks were a bit improvised since the goal was really to have a meeting :-) I started to talk about my hopefully-soon-to-be-released library of pseudo-random numbers generators for Common Lisp, urandom. It was just a small overview of the motivations for doing it, the interface and showing some examples. Afterwards came a very interesting talk, about Lisp in robotics. It was given by Lorenz Mösenlechner, a PhD student at TUM. He showed us some examples of the CRAM, implemented on top of CL, which allows to write flexible and robust robot control programs. He also showed us some videos. Rosie, the pancake-maker was cool :-)
In the end we talked a little about Lisp and exchange some opinions on CL, Scheme, etc. Moreover, everyone was in favor of trying to do more regular meetings. So, the next one should happen in the first week of April (pick your days). Let’s see! :-)

