jahboater
Posts: 2477
Joined: Wed Feb 04, 2015 6:38 pm

Re: What programming language to use

Sat Aug 27, 2016 8:41 pm

Heater wrote:jahboater,

Sorry, when I compiled your assembler I was logged into an x86 machine. I mistook it for my Pi console. Durp, durp...
Easily done. I shut down my main PC by mistake the other day for the same reason - and too much haste.

This is a handy document by the way:-
http://115.28.165.193/down/arm/arch/ARM ... rview).pdf

User avatar
DavidS
Posts: 3065
Joined: Thu Dec 15, 2011 6:39 am
Location: USA
Contact: Website

Re: What programming language to use

Tue Apr 10, 2018 3:50 am

Have been off of the forums for a while, and as much lack of time on my RPi's, do to recovering from medical problems. (The new forum layout is terrible).

Though it is interesting to look at this debate now, with fresh eyes, and different projects ahead.

Now I would still say that either C or Pascal is the way to go. Though I would add that optimizing the algorithm used is always the most important thing to execution speed (surprised that was not said before).

Now I am working on a compiler, for the first time concentrating on a balance between optimization and speed of compilation. The goal being a language system that allows compiling to RAM and running with out having to wait, thus giving the effect of an interpreted language with the speed of a mildly optimized compiled language (using some tricks to improve compile time, such as partial compilation of lines of source as entered with keying for things that may change or be missing).

I am also working from Linux, MINIX and BSD a lot more now, do to the need for multi-threading.

C is likely the simplest single language to learn, that is reasonable for large scale use without restrictive limits. I remember that C was either the 4th or 5th high level language I learned (NOT counting BASIC), and it took all of two hours to learn the C programming language (NOT including the standard library), having 32 Keywords, a simple syntax, and very intuitive operators (not to mention how simple working with pointers makes doing many things). The standard library falls into place fairly quickly, and you will learn a little of it in the couple of hours needed to learn the base language (such as using puts(), printf(), etc for user I/O while learning the language).

Even the standard library for ANSI C 89 is pretty simple, and the extensions in newer implementations of C are simple to learn and understand. Though I would note that if a program requires at least a 64 bit integer, then the standards currently point at a long long type for that minimum, not just a long type which is only assured to be 32 bits.
26-Bit R15 to 32-bit. 16-bit addressing to 24-bit. ARM and 65xx two CPU's that continue on, and are better than ever. Assembly Language forever :) .

ejolson
Posts: 1424
Joined: Tue Mar 18, 2014 11:47 am

Re: What programming language to use

Tue Apr 10, 2018 5:28 am

DavidS wrote:
Tue Apr 10, 2018 3:50 am
Have been off of the forums for a while, and as much lack of time on my RPi's, do to recovering from medical problems.
Welcome back! Hope the medical problems are over and to hear more from you soon. I switched to the default pro-silver theme after the last forum makeover.

jahboater
Posts: 2477
Joined: Wed Feb 04, 2015 6:38 pm

Re: What programming language to use

Tue Apr 10, 2018 6:50 am

Glad you are back and well!
DavidS wrote:
Tue Apr 10, 2018 3:50 am
Even the standard library for ANSI C 89 is pretty simple, and the extensions in newer implementations of C are simple to learn and understand. Though I would note that if a program requires at least a 64 bit integer, then the standards currently point at a long long type for that minimum, not just a long type which is only assured to be 32 bits.
Perhaps just use the fixed width integer types that C99 introduced:

#include <inttypes.h>

int64_t and uint64_t
(and of course int32_t, int16_t, and int8_t )

I find "long" is only useful if you actually want a variable to change size between platforms.
LP64 and ILP32 (RPi) are the common models.

Return to “General programming discussion”

Who is online

Users browsing this forum: No registered users and 3 guests