mfa298
Posts: 1387
Joined: Tue Apr 22, 2014 11:18 am

Re: So Many Languages, so little Time

Fri Apr 21, 2017 1:19 pm

Gavinmc42 wrote: Low Level
If you want to learn Linux, Shell script with Awk and Sed can do an awful lot.
Most of the world is shell scripted underneath. Add some HTML5, CCS, CGI, dash of JS.
awk/sed/grep aren't really programming tools, they're text processing tools.

Traditionally low level languages are things that take you closer to the hardware so Assembly, C, C++. Higher level languages are things which are a bit more abstracted from the hardware so Python,Ruby,Perl, Shell scripting, php etc.

For the most part something written in one of the higher level languages can be easily moved from one system to another (potentially even across processor architectures) with no (or very minimal changes). Lower level languages may struggle moving between different processor architectures (some of my C code will only run on a Pi1 - It'll need some modifications to work on the Pi2/Pi3)

tpylkko
Posts: 382
Joined: Tue Oct 14, 2014 5:21 pm

Re: So Many Languages, so little Time

Fri Apr 21, 2017 2:19 pm

Luckily there is considerable overlap in various languages.

If you are thinking about what language is the best being able to do as many things as possible and you are not working in some professional environment where you have to use specific things, then Python. Maybe C if you are interested in microcontrollers and maybe Javascript, websockets node.js react and that stuff for control over network stuff. In some ways it is easier if there does not need to be any native client applications

i486
Posts: 172
Joined: Sun Aug 28, 2016 3:41 pm
Location: BG

Re: So Many Languages, so little Time

Fri Apr 21, 2017 6:16 pm

Probably Mono can run under RPi. Then C# is good choice - much better than Python and similar.

User avatar
Gavinmc42
Posts: 3925
Joined: Wed Aug 28, 2013 3:31 am

Re: So Many Languages, so little Time

Sat Apr 22, 2017 1:01 am

In my Quest to find a single language, I did use and deploy projects that used most of the languages I listed.
In the process I found shell script on a 1GHz microcontroller PCB is usable.
As Linux is a file handling OS, using and processing text files with Sed/Awk proved doable if a little slow.
I use this on PiCore which runs from ram, files in ram don't wear out SD cards ;)

If I read and log sensor data every minute or 5 minutes, speed is NOT an issue.
As most of my stuff is networked I can SSH in and change shell script on the fly without recompiling and with no tools except a text editor. If I need more speed then python/micropython is next, more speed only then do I go compiled.

As my Pi's are mostly embedded IoT, a general purpose OS is not needed and as Linux/Busybox is not secure and I don't know how to 100% secure it, I am moving on to Ultibo, which happens to be Pascal based. After 5 years of learning languages I really don't care about weird syntax if it gets the job done. Just look at Awk and Sed for weird syntax :P

If Java ran 10 times faster I might have stuck with it, JavaFX gave me 3D accelerated graphics very easily.
Mathematica made complex stuff look easy, just a few lines of code did one of my projects.

As my projects are designed and coded just by me, I have no need to settle on one language/tool/IDE.
Ultibo may be new but it is usable now and gives me a way to learn stuff I have been wanting to do for decades.
And it is using the familiar IDE method have I been using for decades with other micro controllers.
Calling a BCM2835 a micro controller is a bit simplistic, it's actually a very hardware limited controller :lol:
I am now comfortable in my current choice, if something better ever comes along, I will try it too.

Try/play//learn them all and stick with the ones that you are happy with.
It is not as if you don't have choices :lol:
Sticking with C until the end of time? Well that sounds like a fundamentalist religion not a choice.

But don't listed to my reasons, where I got to and the path I took is different than anyone else's.]
My journey still continues, destination unknown 8-)

To the OP, don't listen to any of us, choose your own path grasshopper.
But Python might be a good first step on that path, perhaps even stopping at Java/JS for you.
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

Return to “General discussion”