Technetiumable
Posts: 5
Joined: Thu Feb 07, 2013 4:48 pm
Location: Cumbria, England

Is there any other compilers for the raspberry pi?

Thu Feb 07, 2013 4:55 pm

Hi, I've just began programming and I really enjoy it. I'm currently learning python and was wondering after I've got comfortable with python and go on to learn a different language like C/C++, Java or PHP is there a compiler for any of them languages for the raspberry pi. I'm also new to the raspberry pi and Linux like OS's so please forgive me if I don't understand some things people say.

User avatar
Davespice
Forum Moderator
Forum Moderator
Posts: 1665
Joined: Fri Oct 14, 2011 8:06 pm
Location: The Netherlands
Contact: Twitter

Re: Is there any other compilers for the raspberry pi?

Thu Feb 07, 2013 4:58 pm

Hi there! Welcome :)
Yes you'll be able to use all of those on the Pi as far as I know.
The devil is in the detail though, you’ll need to learn about makefiles, gcc and g++ next :)

Have a look at some of the demo programs that come with raspbian;
There are in /opt/vc/src/hello_pi

This video might help too; https://www.youtube.com/watch?v=7gT1ud_U6v4

Technetiumable
Posts: 5
Joined: Thu Feb 07, 2013 4:48 pm
Location: Cumbria, England

Re: Is there any other compilers for the raspberry pi?

Thu Feb 07, 2013 5:00 pm

Ok thanks I'll put that on my to do list.

User avatar
gordon@drogon.net
Posts: 2020
Joined: Tue Feb 07, 2012 2:14 pm
Location: Devon, UK
Contact: Website

Re: Is there any other compilers for the raspberry pi?

Thu Feb 07, 2013 10:25 pm

Technetiumable wrote:Hi, I've just began programming and I really enjoy it. I'm currently learning python and was wondering after I've got comfortable with python and go on to learn a different language like C/C++, Java or PHP is there a compiler for any of them languages for the raspberry pi. I'm also new to the raspberry pi and Linux like OS's so please forgive me if I don't understand some things people say.
Oddly enough I've just listed most of them elsewhere... I think it's safe to say that almost all languages are supported on the Pi. Other than the ones you've listed, there is Ada, COBOL, FORTRAN, Pascal for starters, then maybe in the interpreted (ish) section there are more BASICs than pips in a raspberry, Forth, Squeak, Scratch, Ruby, Shells/Tk and probably dozens of others...

-Gordon
--
Gordons projects: https://projects.drogon.net/

User avatar
jackokring
Posts: 816
Joined: Tue Jul 31, 2012 8:27 am
Location: London, UK
Contact: ICQ

Re: Is there any other compilers for the raspberry pi?

Thu Feb 07, 2013 10:50 pm

The question becomes "what do you want to do next?"

For example, PHP could be interesting but setting up a web sever to develop your own small website might be a little hurdle. You could do this using Python, but PHP is more available if you want to put the website on the net with an ISP.

If you want to try out another script language, to see how easy or difficult it is to use compared to python then tcl may be worth a look, it's already on the system. "tclsh", and then type "help", or look online for documentation. Other similar to python languages include Ruby and maybe Perl. Maybe even try sh the command line shell, as this would be useful for automating the OS.

If you want to develop a large project, there are many compiled languages. C is the language a lot of Linux is written in. It is always worth learning, but can be complicated and rarely but sometimes very difficult to find your programming errors. FreePascal is quite nice, but you will not be able to use all the features of the Pi yet. Java can be a pain, but this is mainly because it is insistent on preventing errors which can be known about in advance, and the eclipse development IDE it uses is big and often slow.

If you want to get into things like manipulation of text data and sorting, and matching patterns, then maybe scheme is worth a look. A lot of people think it has loads of brackets () and it does. Forth is an interesting language which is small (slightly strange, but fast), which can make very fast code. It is perhaps best to look up "reverse polish notation forth" on the internet to see how easy it is to change your patterns of thought.

Prolog is a very interesting language, it is very useful for solving logic problems. It is very difficult to write arcade games in though. Most of the other languages are similar to these few. They each have their own peculiar features, or restrictions on the style of programming that can be used.
Pi[NFA]=B256R0USB CL4SD8GB Raspbian Stock.
Pi[Work]=A+256 CL4SD8GB Raspbian Stock.
My favourite constant 1.65056745028

User avatar
rpdom
Posts: 17173
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: Is there any other compilers for the raspberry pi?

Fri Feb 08, 2013 7:39 am

I like PHP. It's great for building web sites or can be used for stand-alone CLI programs. Being a scripting language (like Python) it doesn't use a compiler.

Also, for debugging web pages, the PHP cli interpreter has a built-in mini-webserver which requires only a few command line options to start and displays all output (errors and requests) in the terminal it was started from. Ctrl-C terminates the server.

DirkS
Posts: 10363
Joined: Tue Jun 19, 2012 9:46 pm
Location: Essex, UK

Re: Is there any other compilers for the raspberry pi?

Fri Feb 08, 2013 4:00 pm

jackokring wrote:FreePascal is quite nice, but you will not be able to use all the features of the Pi yet.
I cannot think of any feature that I can't use in FPC... can you give (an) example(s)?

Gr.
Dirk.

Technetiumable
Posts: 5
Joined: Thu Feb 07, 2013 4:48 pm
Location: Cumbria, England

Re: Is there any other compilers for the raspberry pi?

Fri Feb 08, 2013 7:51 pm

gordon@drogon.net wrote:
Technetiumable wrote:Hi, I've just began programming and I really enjoy it. I'm currently learning python and was wondering after I've got comfortable with python and go on to learn a different language like C/C++, Java or PHP is there a compiler for any of them languages for the raspberry pi. I'm also new to the raspberry pi and Linux like OS's so please forgive me if I don't understand some things people say.
Oddly enough I've just listed most of them elsewhere... I think it's safe to say that almost all languages are supported on the Pi. Other than the ones you've listed, there is Ada, COBOL, FORTRAN, Pascal for starters, then maybe in the interpreted (ish) section there are more BASICs than pips in a raspberry, Forth, Squeak, Scratch, Ruby, Shells/Tk and probably dozens of others...

-Gordon
I'm new to the forums so I haven't explored it fully so that's why I haven't seen your posts. Thanks for the suggestions.

Technetiumable
Posts: 5
Joined: Thu Feb 07, 2013 4:48 pm
Location: Cumbria, England

Re: Is there any other compilers for the raspberry pi?

Fri Feb 08, 2013 7:53 pm

jackokring wrote:The question becomes "what do you want to do next?"

For example, PHP could be interesting but setting up a web sever to develop your own small website might be a little hurdle. You could do this using Python, but PHP is more available if you want to put the website on the net with an ISP.

If you want to try out another script language, to see how easy or difficult it is to use compared to python then tcl may be worth a look, it's already on the system. "tclsh", and then type "help", or look online for documentation. Other similar to python languages include Ruby and maybe Perl. Maybe even try sh the command line shell, as this would be useful for automating the OS.

If you want to develop a large project, there are many compiled languages. C is the language a lot of Linux is written in. It is always worth learning, but can be complicated and rarely but sometimes very difficult to find your programming errors. FreePascal is quite nice, but you will not be able to use all the features of the Pi yet. Java can be a pain, but this is mainly because it is insistent on preventing errors which can be known about in advance, and the eclipse development IDE it uses is big and often slow.

If you want to get into things like manipulation of text data and sorting, and matching patterns, then maybe scheme is worth a look. A lot of people think it has loads of brackets () and it does. Forth is an interesting language which is small (slightly strange, but fast), which can make very fast code. It is perhaps best to look up "reverse polish notation forth" on the internet to see how easy it is to change your patterns of thought.

Prolog is a very interesting language, it is very useful for solving logic problems. It is very difficult to write arcade games in though. Most of the other languages are similar to these few. They each have their own peculiar features, or restrictions on the style of programming that can be used.
Thanks for the lengthy answer (I mean it in a good way). I like the idea of my own website so I'll go with PHP.

Technetiumable
Posts: 5
Joined: Thu Feb 07, 2013 4:48 pm
Location: Cumbria, England

Re: Is there any other compilers for the raspberry pi?

Fri Feb 08, 2013 7:54 pm

rpdom wrote:I like PHP. It's great for building web sites or can be used for stand-alone CLI programs. Being a scripting language (like Python) it doesn't use a compiler.

Also, for debugging web pages, the PHP cli interpreter has a built-in mini-webserver which requires only a few command line options to start and displays all output (errors and requests) in the terminal it was started from. Ctrl-C terminates the server.
Thanks for the suggestion of PHP I'll go with that.

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 26659
Joined: Sat Jul 30, 2011 7:41 pm

Re: Is there any other compilers for the raspberry pi?

Fri Feb 08, 2013 7:55 pm

DirkS wrote:
jackokring wrote:FreePascal is quite nice, but you will not be able to use all the features of the Pi yet.
I cannot think of any feature that I can't use in FPC... can you give (an) example(s)?

Gr.
Dirk.
Just guessing but can you access the OpenGL acceleration libraries (and similar) from FPC? That may be the point being made. If you can that's great!
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed.
I've been saying "Mucho" to my Spanish friend a lot more lately. It means a lot to him.

DirkS
Posts: 10363
Joined: Tue Jun 19, 2012 9:46 pm
Location: Essex, UK

Re: Is there any other compilers for the raspberry pi?

Sun Feb 10, 2013 5:41 pm

jamesh wrote:Just guessing but can you access the OpenGL acceleration libraries (and similar) from FPC? That may be the point being made. If you can that's great!
Never used it but apparently it does exist: http://wiki.freepascal.org/OpenGL
IIRC there are also OpenGL ES headers available

Gr.
Dirk.

User avatar
johnbeetem
Posts: 945
Joined: Mon Oct 17, 2011 11:18 pm
Location: The Mountains
Contact: Website

Re: Is there any other compilers for the raspberry pi?

Sun Feb 10, 2013 9:18 pm

There's a list of RasPi programming languages at the RasPi Software Wiki: http://elinux.org/RPi_Programming

Return to “General programming discussion”