lazybum
Posts: 13
Joined: Sun Jan 22, 2012 12:24 pm

Re: Programming with *insert language here*?

Sun Jan 22, 2012 6:53 pm

Topic = Question. I feel a little twitchy, the prospect of getting the Raspi is making me all excited. Though, when I start pondering about what and how to program, I am confused.

I am working in IT and can do a couple of programming languages. Which one is:


An OOP language
supplies a decent runtime library
running on ARM given the CPU power
capable of talking to Gertboard (if I didn't mishear, any would do which can write chars to a stream, so pretty much any?)

Java will not run, I suppose. PHP has a somewhat limited request-response characteristic. JavaScript needs an interpreter, not too good a language either IMHO. C/C++ will run, but I find it cumbersome to work with, as it has no standardized RT lib.

Thanks for your input.

spurious
Posts: 343
Joined: Mon Nov 21, 2011 9:29 pm

Re: Programming with *insert language here*?

Sun Jan 22, 2012 7:23 pm

I would of thought that you could get some pretty fantastic stuff done with:

Linux + Apache + MySQL + PHP  (LAMP)

HTML5 + Javascript +jQuery + jQuery UI

C / C++ are powerful, but daunting to a newbie, but if you need to get super fast apps they are an excellent choice.

There are also a lot of libraries to help depending on what you are trying to achieve.

lazybum
Posts: 13
Joined: Sun Jan 22, 2012 12:24 pm

Re: Programming with *insert language here*?

Sun Jan 22, 2012 7:56 pm

spurious said:


I would of thought that you could get some pretty fantastic stuff done with:

Linux + Apache + MySQL + PHP  (LAMP)

HTML5 + Javascript +jQuery + jQuery UI


Word. Though it's all web-related, request driven. Tough to make some sort of server with it, or trigger HDMI output.

spurious
Posts: 343
Joined: Mon Nov 21, 2011 9:29 pm

Re: Programming with *insert language here*?

Sun Jan 22, 2012 8:02 pm

It easily has enough resource to hold it's own as a simple LAMP server.

What is it you actually want to achieve from the programming language?

andyl
Posts: 265
Joined: Tue Jan 10, 2012 11:05 am

Re: Programming with *insert language here*?

Sun Jan 22, 2012 9:08 pm

lazybum said:


Topic = Question. I feel a little twitchy, the prospect of getting the Raspi is making me all excited. Though, when I start pondering about what and how to program, I am confused.

I am working in IT and can do a couple of programming languages. Which one is:


An OOP language
supplies a decent runtime library
running on ARM given the CPU power
capable of talking to Gertboard (if I didn't mishear, any would do which can write chars to a stream, so pretty much any?)

Java will not run, I suppose. PHP has a somewhat limited request-response characteristic. JavaScript needs an interpreter, not too good a language either IMHO. C/C++ will run, but I find it cumbersome to work with, as it has no standardized RT lib.


Well Java will run, but it will probably be a bit sluggish (and the development environment definitely will be extremely sluggish if run on the Pi).

I'm not sure about why an interpreter is a problem.  I also disagree with Javascript being "not too good" but it is built around a different paradigm to most other OO languages - but if you don't care for it I'm not going to argue.  C++ does have a standard RTL but it is not as rich as some other languages.

Having read your requirements there are two languages which come to mind.

Python - lots of talk elsewhere about python.  Great language for a beginner, but plenty of power there.

Ruby - a nice, very nice, OO language that fits me better than python does (but both are very good).  I think in general it is less suitable for someone new to programming, and there isn't the same amount of teaching/introduction material as python

Both python and ruby have a well documented way of installing libraries and both will need libraries for certain functionality - such as graphical UIs.

lazybum
Posts: 13
Joined: Sun Jan 22, 2012 12:24 pm

Re: Programming with *insert language here*?

Sun Jan 22, 2012 9:14 pm

spurious said:


It easily has enough resource to hold it's own as a simple LAMP server.

What is it you actually want to achieve from the programming language?



lazybum is a spoiled brat (he does Java programming for a living)! TBH this question is mostly asked out of curiosity, trying to chart unknown land.

Some language with a good collections API (Bags, Lists, Maps) and threading would be nice. Some language that can run as a daemon and shields you from being limited to C's very "low" level config with ifdef and make.

spurious
Posts: 343
Joined: Mon Nov 21, 2011 9:29 pm

Re: Programming with *insert language here*?

Sun Jan 22, 2012 9:24 pm

I would have a look at the Qt framework.. not used it myself, but think it's along the lines that will work reasonably on this machine.

lazybum
Posts: 13
Joined: Sun Jan 22, 2012 12:24 pm

Re: Programming with *insert language here*?

Sun Jan 22, 2012 9:25 pm

andyl said:


Python - lots of talk elsewhere about python.  Great language for a beginner, but plenty of power there.

Ruby - a nice, very nice, OO language that fits me better than python does (but both are very good).  I think in general it is less suitable for someone new to programming, and there isn't the same amount of teaching/introduction material as python


Sounds fancy. What about performance ARM-wise?

andyl
Posts: 265
Joined: Tue Jan 10, 2012 11:05 am

Re: Programming with *insert language here*?

Sun Jan 22, 2012 9:39 pm

lazybum said:


andyl said:


Python - lots of talk elsewhere about python.  Great language for a beginner, but plenty of power there.

Ruby - a nice, very nice, OO language that fits me better than python does (but both are very good).  I think in general it is less suitable for someone new to programming, and there isn't the same amount of teaching/introduction material as python


Sounds fancy. What about performance ARM-wise?


As very few people (and certainly not me) has access to a Pi I can't tell you how it will run and I don't think anybody else can either.

Like python and perl, ruby runs using a virtual machine.

But the real issue with performance will be - what do you want your program to do?  Most programs I write are either IO bound or UI bound.  Also two differing implementations addressing the same problem may be orders of magnitude different on performance.

emg
Posts: 88
Joined: Wed Jan 11, 2012 11:01 pm

Re: Programming with *insert language here*?

Sun Jan 22, 2012 10:21 pm

What about Mono/C#?

slaeshjag
Posts: 9
Joined: Sat Jan 07, 2012 12:57 pm
Contact: Website

Re: Programming with *insert language here*?

Sun Jan 22, 2012 11:15 pm

If possible, even slower than Java.

spurious
Posts: 343
Joined: Mon Nov 21, 2011 9:29 pm

Re: Programming with *insert language here*?

Mon Jan 23, 2012 7:15 am

Mono is possible, but you would have to compile on another machine, which I'm not sure is what you want?

As for performance, I would hold off judgement until someone tries it.

http://www.mono-project.com/Mono:ARM

richardp
Posts: 117
Joined: Thu Jan 12, 2012 11:46 am

Re: Programming with *insert language here*?

Mon Jan 23, 2012 8:24 am

I am a supporter of FreePascal/Lazarus

Using the Lazarus IDE, people get a fully integrated GUI designer, a nice OO language and allows you to 'Get under the hood' with low level linux API calls.

But then the whole thing depends on what you want to achieve, every language has a targeted application. PHP/JS for web, C for device drivers etc etc. (I use Lazarus for Visual applications)

I don't believe that teaching a language is relevant, as the language is the tool-set; you need to teach a programming mindset, this will allow the person to think outside the box and be creative in problem solving.

Richard
RaspberryPi's galore
Solid run CuBox
ODroid U2

richardp
Posts: 117
Joined: Thu Jan 12, 2012 11:46 am

Re: Programming with *insert language here*?

Mon Jan 23, 2012 8:35 am

emg said:


What about Mono/C#?



Before deciding on Mono, there is a question on its future. Since Novell was bought by Attachmate and the Mono engineers were laid off. There is a new company supporting it, but it is quite difficult as they dont own the IPR on the existing product.
RaspberryPi's galore
Solid run CuBox
ODroid U2

thedo
Posts: 13
Joined: Sun Jan 22, 2012 6:25 pm

Re: Programming with *insert language here*?

Mon Jan 23, 2012 8:37 am

By day I'm a C#/F# dev, but many many moons ago I used to do lots of C++ and ASM. So I'm hoping to go back to basics and learn ARM ASM and relearn as many C++ tricks as I can without incurring the hit of relearning the internals Win32 to do anything remotely interesting.......

spurious
Posts: 343
Joined: Mon Nov 21, 2011 9:29 pm

Re: Programming with *insert language here*?

Mon Jan 23, 2012 8:38 am

richardp said:


I don't believe that teaching a language is relevant, as the language is the tool-set; you need to teach a programming mindset, this will allow the person to think outside the box and be creative in problem solving.


Well said... I work regularly work with people who have recently left uni. and am constantly amazed that they have very little ability in tackling a problem without you explaining to them how to write the solution. Do they not teach beyond how to pass these days?

The good part of this is that after a few months of this hand-holding, they can actually work as I would have expected when they arrived. So it's not the inability of the person to do this, it is the lack of teaching in school/college/uni.

Am am really hoping that this project will go some way to rectify this, but it will require a change in teaching techniques too.

na1pir
Posts: 71
Joined: Fri Sep 02, 2011 4:43 pm
Contact: Website

Re: Programming with *insert language here*?

Mon Jan 23, 2012 8:39 am

Python is pretty easy to learn, and there are couple of tool-kits for it. Wxpython should work for wxwidgets. And pyside is great free wrapper for qt.

But when you know how to do things in python, but it does not meet your performance expectations c/c++ will make any code / computer run faster.

Lets hope Nokia guys can make QT run fast on rpi

But I don't think that IDE should be run on r-pi because compiling will be really really slow on it!

tufty
Posts: 1456
Joined: Sun Sep 11, 2011 2:32 pm

Re: Programming with *insert language here*?

Mon Jan 23, 2012 8:44 am

lazybum said:


andyl said:


Python - lots of talk elsewhere about python.  Great language for a beginner, but plenty of power there.

Ruby - a nice, very nice, OO language that fits me better than python does (but both are very good).  I think in general it is less suitable for someone new to programming, and there isn't the same amount of teaching/introduction material as python


Sounds fancy. What about performance ARM-wise?


Python is (or can be) pretty damn quick.  Ruby less so, although the 1.9 VM has made major improvements (there's still a lot to be gained, though[1]).  They're both extremely good languages for beginners.

My main gripe against Ruby is the conceptual difference between "underlying"  types like int, float and so on and the "Objectified" versions - it's been done for performance reasons (although, looking at Ruby's performance, you wonder why) and breaks the orthogonality of the language.  Python > 2.2 doesn't have this issue, and you can happily subclass, for example, "int" - for this reason I would probably suggest Python over Ruby.

Simon

[1] The default garbage collector is slow and non-bounded, object allocation is naive, and (with the 1.8 vm at least, I know it was being looked into for 1.9) code interpretation itself was hideously inefficient.  Fixing these gets you an ~10-500x speedup depending on code profile (Yes, I've done all of these for the 1.8 MRI codebase, the fix to the last issue being suboptimal but workable, unfortunately contractual constraints mean I can't give them back to the community - I did try quite hard).

timhoffman
Posts: 85
Joined: Sat Nov 05, 2011 11:31 pm

Re: Programming with *insert language here*?

Mon Jan 23, 2012 12:01 pm

As an example a lot of software for the Nokia N900 (600Mhz ARM, 256MB) is written

in Python and works well.

A really good example is mypaint (http://mypaint.intilinux.com/) which is a pretty hefty

paint program written in Python (and extensions) and runs really quite well on such a limited platform.

T

emg
Posts: 88
Joined: Wed Jan 11, 2012 11:01 pm

Re: Programming with *insert language here*?

Mon Jan 23, 2012 2:46 pm

spurious said:




//

//
Mono is possible, but you would have to compile on another machine, which I'm not sure is what you want?

As for performance, I would hold off judgement until someone tries it.

http://www.mono-project.com/Mono:ARM



That's exactly what I want. Performance is not much of an issue with little user interaction with the application. An alternative I guess would be one of the GUI Pythons...

bnl
Posts: 2
Joined: Sun Jan 15, 2012 4:31 pm

Re: Programming with *insert language here*?

Mon Jan 23, 2012 8:49 pm

http://groups.google.com/group.....d4916f6d52

Shows that ada on debian will be an option

I"ll go for that.

/Björn

User avatar
jwdietrich
Posts: 13
Joined: Wed Nov 30, 2011 11:52 am
Contact: Website

Re: Programming with *insert language here*?

Sun Mar 25, 2012 7:20 pm

richardp said:


I am a supporter of FreePascal/Lazarus

Using the Lazarus IDE, people get a fully integrated GUI designer, a nice OO language and allows you to 'Get under the hood' with low level linux API calls.


I fully agree. Furthermore, Lazarus excellently supports cross-platform development, and for non-visual applications the transition to pure Free Pascal is easy.

rmm200
Posts: 259
Joined: Sat Mar 03, 2012 10:25 pm

Re: Programming with *insert language here*?

Sun Mar 25, 2012 7:30 pm

Let me put in a plug for Ruby for kids:

http://kidsruby.com/

Ruby is the best designed OO language I have used, is easy to learn, and can actually be fun for kids.

We have had a couple of Kids Ruby classes held in Bend, sponsored by the local technology companies – and they were very well received. Kids ages mostly between 8-14.

I should add - Ruby was the first package I installed under qemu for Pi.

W. H. Heydt
Posts: 11019
Joined: Fri Mar 09, 2012 7:36 pm
Location: Vallejo, CA (US)

Re: Programming with *insert language here*?

Sun Mar 25, 2012 8:05 pm

*insert language here*, eh?

I've done full develompent work in COBOL on machines with a fraction of the memory and a fraction of the speed of an R-Pi.

Anyone know of a decent, free, COBOL compiler for Linux?

rmm200
Posts: 259
Joined: Sat Mar 03, 2012 10:25 pm

Re: Programming with *insert language here*?

Sun Mar 25, 2012 8:29 pm

Personal bias showing here:

If there is truly a Hell for programmers - it will run on Cobol.

Return to “General discussion”