Showing posts with label Learning Erlang. Show all posts
Showing posts with label Learning Erlang. Show all posts

Wednesday, September 26, 2007

Reading SICP in Erlang and Ruby



I’ve had a long standing goal to read SICP, but it keeps conflicting with other goals, like mastering Ruby or learning Erlang (to name a couple of geeky ones). Recently I learned of a project to ‘translate’ SICP into Erlang (and other languages).




“Great! I can use this to help with both learning Erlang and reading SICP”, I thought and went to take a look at it. It turns out they also have a Ruby translation underway, so I went to look at that first. It turns out that the first couple of examples make me think that they either don’t understand Ruby or don’t understand SICP.




Page 5 of SICP shows that you can start up a LISP or scheme interpreter and type in an expression and it will return that expression, like this:


> 486
486
>

The site recommends the following Ruby puts 486, which is not quite right:

irb(main):001:0> puts 486
486
=> nil
irb(main):002:0>

You see, this prints 486, but returns nil. A much better answer looks a lot more like scheme:

irb(main):002:0> 486
=> 486
irb(main):003:0>



With a problem like this early on, I’m not sure that I trust the Erlang or other translations. I do like the idea though, so I should probably stick with my idea of combining the goals, and just post my own translations into Erlang and Ruby (and let everyone else find my mistakes).

Wednesday, May 9, 2007

Successful Provo erlounge

Well, we got our Utah Valley Erlang group started with a bang—11 enthusiasts showed up (I hesitate to say hackers because most of us are newbies). We had a quick review of Erlang’s history and problem domain, and took a look at some code (the webput.erl example). A couple of folks also got Erlang installed on their laptops.




It wasn’t a bad start, but we’re not nearly done. We’ll be meeting from 7-9PM on the second Tuesday of every month going forward. The Open Source Technology Center has been kind enough to offer us meeting space—they even provided Pizza and soda this time around. For our June meeting, we’re each going to try our hand at writing some Erlang (something that will be run cooperatively over our laptops), then we’ll do a ‘show and tell’/code review. If I can just think of something interesting, but not too hard, it should be a lot of fun.




If you’re interested in joining us please do, we’d love the company. We plan on coordinating our meetings on the erlang-questions list unless we get to big/noisy/rowdy for it.

Wednesday, April 25, 2007

Erlang Nights in Utah

Well, it looks like I’m not the only Ruby hacker in Utah that’s looking at Erlang. In the UtahValley.rb’s April meeting, we decided to set up an informal study group to work through Programming Erlang—several of us already have the beta book.




I don’t know if we’ll start on the first or the fifteenth of May, but I do know it will be fun. I’ll plan on posting about them here.