I of course first needed an Erlang installation. I am running SuSE 10.2 on my main development machine, no Erlang package was available with the distribution, so I had to do a source install.
I downloaded it from erlang.org, the build went very unproblematic, only caveat was that the package pam-devel was not installed. After successfull build Erlang got installed in /usr/local/lib/erlang.
I then went on to install Yaws as I plan to try out some web-development using Erlang as well, this later turned out to be a lucky move.
As my project need to access the serial port (my GPS receiver connects to USB using the serial profile and as such mounts under Linux as a serial device /dev/ttyUSB0), I need a serial library for Erlang luckily not only one but two exists (named sl and serial) I selected the one named sl, solely based on the fact the it is the newer of the two. To get hold of it I decided to use CEAN (Comprehensive Erlang Archive Network) which is Erlang's pendant to Perl's well known CPAN. I managed to get CEAN installed using their FAQ (not without some trouble though).
So with CEAN working, I fired up my erlang shell and typed cean:install(sl). (note the trailing dot). Success! The sl library got installed under /usr/lib/local/erlang/lib/sl-1.0.
After reading the the sl.txt (placed in the doc subfolder under the sl installation folder) to get a clue of how the library worked.
I eagerly did a P = sl:start(). in the erlang shell. only to be met with:
sh: line 0: exec: sl_drv: not found
#Port<0.100>
Alas something was clearly not working!
Next time I will tell how I got this solved and it includes why it was a lucky move to have installed Yaws.
Being a Java programmer since 1996. I have reached a point where I would like to try out new stuff. So this will be my ramblings on the endeavour.
Tuesday, October 30, 2007
Friday, October 26, 2007
Moving on
OK, I started this blog after I made the decision to try out new programming languages, and also after reading up on a few of them, actually also after deciding which one I will try to investigate further, so I am already far behind on the blogging (not a very good start).
I tried out and read up on:
A while back I bought a GPS receiver and I will try to get position data from this device using Erlang. This is pretty focused and should be relatively easy, now let us see if that holds...
(To be honest I have already started)
I tried out and read up on:
- Ruby (including Rails)
- Groovy (including Grails)
- Common Lisp (read Common Lisp tutorial for a great tutorial)
- Erlang (I absolutely recommend reading the Programming Erlang )
A while back I bought a GPS receiver and I will try to get position data from this device using Erlang. This is pretty focused and should be relatively easy, now let us see if that holds...
(To be honest I have already started)
Subscribe to:
Comments (Atom)