views:

317

answers:

8

Is Occam-pi a good language to learn to program LEGO MINDSTORMS & Surveyor Corporation SRV-1 robots for an programming newbie. Are there any opensource projects making use of the same -- to read source code. url for occam-pi :- http://www.transterpreter.org/

A: 

Probably not. It's a research language, so there won't be the support for what you want. sorry.

The LEGO MINDSTORMS Education NXT Software is probably a better bet for a programming newbie. The SRV-1 is cool - but doesn't really have the supporting resources for beginners.

Good luck!

Stephen
A: 

Well, let's put it this way: it's not like you need to interface with a database ALL THE TIME.

I think you might find that it is worth learning a research language in order to master new features in other languages. I should write more, but there is no time.

Marcin
+3  A: 

I have used the occam-pi on the transperter and it seems to do a good job. You may want to check this blog out. It is written by one of te devlopers. If you give Matt an email he may be able to point you in the right direction for material.

A: 

I used 'not quite c' back when the original mindstorms came out - proper programming syntax but pretty easy to use.

Robin Bennett
A: 

Occam is definitely not a language for a programming newbie.

I would recommend a newbie try and gain skills that will be usable in multiple situations, and help you in the future as your career/hobby progresses. The other recommmendation I would give is to learn in an area where there is a vibrant community of fellow developers to learn from. If you choose the right language you will find friendly tutorials to ease you in to the process.

That being said, my experience of Occam is from nearly 10 years ago, and there is still part of me that would like to go back to it and have a play again. It is a very rewarding experience when it works, although infuriating when you have a bug that slowly degrades in performance as your processes get blocked.

I would recommend you take the time to learn Occam only once you are already experienced at programming Lego Mindstorms, and even then only if you have a lot of time and patience. If you do get the chance, it is a great language, definitely the best I have come accross for highly parallel programming. I doubt it will ever become mainstream though.

Modan
+2  A: 

I woulda echo Modan's comments earlier. Occam is in one sense a very good language - it does explicit concurrency in a reliable robust way that is quite possibly second to none. But it is not a general purpose programming language unfortunately. Nor is it simple to learn if you've only ever done languages like C and Java.

It requires a different mental approach and this is part of what makes it so good at concurrency, particularly in embedded systems such as the NXT. The necessary thinking is more akin to that used by hardware designers than by most programmers (in particular, OO programmers may struggle with its rejection of reference aliasing - one of the things that allows Occam to guarantee correct concurrent behaviour; more detail can be found here). The necessary way of thinking is more like that needed for a certain plastic brick construction toy product.

So in summary it's a good choice ... but unfortunately one that would frustrate a large number of inexperienced users. Try it if you fancy a challenging adventure!

Rick-777
I agree with this. I've done Occam-Pi at Kent University and it was completely different from OOP with Java/C. Once you get used to thinking in the "Occam-Pi way", it really is a very good language
Richard
+1  A: 

I am finding Occam-pi is THE robotics programming language to use, without fail. It is intuitive in the way that other languages are not, when considering active robots that sense and act at the same time--in parallel.

Programming in Occam-pi is like wiring up the physical robot. You know which hardware components do what, so you connect them to the right place. A similar thinking style occurs while programming in concurrent programming languages, like Occam-pi. You figure out how the particular process you need must be written in order to function and then you connect it to the other processes via Channels (much like wires).

In order to do the same things in languages like C, C++ and Java, on microcontrollers it is necessary to fight with such beasts as: timer interrupts, volatile variables, and intricately woven 'for' loops.

Put simply, Occam-pi simplifies robotics programming immensely.

bringFire

bringFire
A: 

If you're interested in parallel programming on the SRV-1, I can say that yes, Occam-Pi is great. Matt Jadud (one of the developers of Occam-Pi) was a professor of mine a couple of years back, and we worked almost exclusively with the Occam-Pi/SRV-1 combination. It has its quirks (or at least it did at the time) but we were largely able to resolve them. It isn't that bad of a language to learn for a new programmer (it was my first language, and I'm doing alright!) I definitely recommend pinging Matt with any questions, he's very easy to get a response from. I'm also happy to answer any questions you may have, you can email me at:

bp at brdpwrs dot com

Good luck!

Bradley Powers