User avatar
PeterO
Posts: 4538
Joined: Sun Jul 22, 2012 4:14 pm

Re: General language discussion.

Mon May 20, 2019 8:23 am

Although Algol gets held up as some sort of "paragon", there was one area in which it suffered from these "dialect issues".
If you read the original reports, you will notice there is no mention of ANY input or output functionality.

This was deliberate as in those days all the different hardware manufacturers handled I/O in different ways. They didn't even use the same character codes ! There was variation in both 5 bit codes and the later 8 bit codes. I think ASCII was the first unifying force in this area.

The fIle handling features implemented in compilers/runtimes varied depending on the underlying O/S and hardware.

PeterO
Discoverer of the PI2 XENON DEATH FLASH!
Interests: C,Python,PIC,Electronics,Ham Radio (G0DZB),1960s British Computers.
"The primary requirement (as we've always seen in your examples) is that the code is readable. " Dougie Lawson

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

Re: General language discussion.

Mon May 20, 2019 9:05 am

Ditto with C in its early days. I had thought that was to keep the main language simple and so enable widespread compiler support.
Let the run time library worry about portable I/O.

Algol 68 specified "transput" fully, which was more work for the compiler.

Algol 60 is so highly regarded because it was a clever design and inspired so many languages that we know and love today.

DanielWS
Posts: 17
Joined: Thu May 30, 2019 7:21 pm
Location: USA

Re: General language discussion.

Thu May 30, 2019 9:53 pm

I registered on this site about an hour ago. This is the first thread I've gone through. A couple of questions.

Are most of the threads here like this?

Did I make a mistake joining these forums?

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

Re: General language discussion.

Fri May 31, 2019 1:27 am

DanielWS wrote:
Thu May 30, 2019 9:53 pm
I registered on this site about an hour ago.
Welcome to the forum!

Since your questions appear unrelated to programming languages, I would suggest starting your own thread rather than posting in this one. For personal and metaphysical questions unrelated to the Raspberry Pi, you might try the off-topic section.

Heater
Posts: 12072
Joined: Tue Jul 17, 2012 3:02 pm

Re: General language discussion.

Fri May 31, 2019 2:16 am

DanielWS,

Welcome.
Are most of the threads here like this?
Most certainly not.

In one hour you have had plenty enough time to dip into a dozen random threads and see what the action is around here. Actually you did not even need to register to do that.

Mostly threads are started by people who want to learn something, they are tackling some problem with the Raspberry Pi and have got stuck with some programming detail or hardware issue. They come to ask questions related to using the Pi. Usually a lot of help is forthcoming.

Conversely people come here to teach something, to show off a project they have completed, to present some new technique/solution they have discovered, or offer news about some hardware/software product related to the Raspberry Pi.
Did I make a mistake joining these forums?
Only you can know. Was the reason for your joining this forum something like the above?

You seem to have come to this particular thread, one of thousands, only to complain that it does not interest you. I generally find it easier just to skip over things on the internet that don't interest me.

DanielWS
Posts: 17
Joined: Thu May 30, 2019 7:21 pm
Location: USA

Re: General language discussion.

Fri May 31, 2019 2:30 am

Languages interest me so this thread in particular caught my eye. Going through 6+ screens of posts took a bit of time and deciding if I wanted to post here or just go elsewhere took some more time.

The reason for my questions is because of the way several of the posters treat others. I would rather not be fodder for the rudeness of a few others.

I'm sure I can learn here and I may even be able to contribute on occasion but this thread is quite off-putting for a newbie.

Heater
Posts: 12072
Joined: Tue Jul 17, 2012 3:02 pm

Re: General language discussion.

Fri May 31, 2019 2:48 am

DanielWS,
The reason for my questions is because of the way several of the posters treat others. I would rather not be fodder for the rudeness of a few others.
Can you post a link to a post here that you found disturbing? Prompted by your comment there I did a quick scan through this thread from the beginning, I don't see any particularly bad behavior or rudeness. The rudest thing I found here was directed at me. Well, I don't mind, and I strongly suspect it was said in a jovial, friendly ribbing way.

The very opening post of this thread says:
As long as politeness and respect prevail of course - which has been the case.
and
Random posts are OK, no particular topic "must" be strictly followed.
So now, it's great to have an interest in varied programming languages, it gives one different perspectives on the art of programming, it can be interesting from a technical and historical point of view, there is always something new and interesting to learn, even if one has been programming for decades.

What would you like to discuss?

DanielWS
Posts: 17
Joined: Thu May 30, 2019 7:21 pm
Location: USA

Re: General language discussion.

Fri May 31, 2019 3:30 am

Nothing really to discuss yet. I just wanted to see how safe it is to post questions without getting blasted by pseudo prima donnas. I've worked with too many of those types to spend my personal time putting up with them (even with my thick skin).

A couple of comments though.

I was very pleasantly surprised by the mention of PL/I and APL. PL/I brings back fond memories. An APL keyboard I got stuck with once brings back one or two not so fond memories. I wasn't programming in APL.

One thing that surprised me was when someone stated, "I think it would be more interesting if people would share what they dislike about popular languages. It could save others going through the same frustration." Usually popular languages are also liked by many. To encourage people to bring up what they dislike about well liked languages seems to be encouraging arguments. I hope that wasn't the intention.

Anyway, I'll be hanging around mainly and possibly posting now and then.

Heater
Posts: 12072
Joined: Tue Jul 17, 2012 3:02 pm

Re: General language discussion.

Fri May 31, 2019 4:26 am

DanielWS,

I know what you mean. Sounds like you have been around the block long enough to know that when programmers discuss programming languages things can rapidly get very heated. That is why we plead for constructive input and discourage negativity that is only based on personal preferences. Which is why I poo-pooed the idea of "share what they dislike about popular languages.", the internet is full of that junk already.

What is far more interesting is techniques and styles/approaches to programming that one has never thought of that some language one has never used supports.

I don't think we have many "prima donnas" around here. On the occasion they pop up they can often be cut down to size with a coding challenge :)

As it happen PL/1 is something I have totally missed out on. Is there even a way to run PL/1 on a PC or more relevantly the Raspberry Pi?

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

Re: General language discussion.

Fri May 31, 2019 5:46 am

[Which is why I poo-pooed the idea of "share what they dislike about popular languages.", the internet is full of that junk already.
/quote]

It is interesting to find out what people hate, if you don't know you cannot fix it.
Flame wars are somewhat tiring, there is no prefect language for everyone.
It is all only opinions which some people form beliefs and religions around, Zealots?

What is really interesting is nearly ALL the languages can work on Pi's.
Plus we can make our own too :D

I am finding some interesting stuff in the old ones that make sense even today.
But some old ones have morphed into unusable on Pi's for various reasons.
Smalltalk and Basic seem to be harder now than years ago.
That is changing too as people wake up to Pi's.

New hardware like AI/NN/ML accelerators means new languages will evolve too.
C cannot do everything for everyone, most of us using Pi's won't be good enough coders.
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

Heater
Posts: 12072
Joined: Tue Jul 17, 2012 3:02 pm

Re: General language discussion.

Fri May 31, 2019 7:57 am

Gavinmc42,
It is interesting to find out what people hate, if you don't know you cannot fix it.
I poo-pooed that idea because I have some issues with it:

1) Generally it's not interesting.

No more than if I explain to you how much I hate beetroot and rice pudding.

How many times do we need to hear people say they don't like the white space indentation of Python, the curly braces of C, "the call back hell" or Javascript, the reverse polish notation of Forth, the s-expression notation of Scheme, the verbosity of COBOL, the terseness of APL, the strict type checking of Ada, etc, etc ad nauseam.

Without demonstrating some clear and concrete advantage or disadvantage it's usually "all only opinions" as you pointed out.

2) It's vanishingly unlikely that I am going to fix it. Neither are you.

I don't know about you but I don't have the knowledge, skill, imagination, time or inclination to be creating any kind of new language that would ever get noticed.

My impression is that people who do have all that don't create their new languages to fix things people hate. No, they do it to fix things they hate or gain things they would like.

3) It's not useful or constructive.

A billion people might say how they dislike language X. However X might be just the perfect solution to my problems. A detail which might easily get lost in the noise.

4) Well, it's just negative. A downer. It fans those tiring flame wars you mentioned.

Let's not do that, hey.

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

Re: General language discussion.

Fri May 31, 2019 8:46 am

DanielWS wrote:
Fri May 31, 2019 3:30 am
Nothing really to discuss yet. I just wanted to see how safe it is to post questions without getting blasted by pseudo prima donnas. I've worked with too many of those types to spend my personal time putting up with them (even with my thick skin).

A couple of comments though.

I was very pleasantly surprised by the mention of PL/I and APL. PL/I brings back fond memories. An APL keyboard I got stuck with once brings back one or two not so fond memories. I wasn't programming in APL.

One thing that surprised me was when someone stated, "I think it would be more interesting if people would share what they dislike about popular languages. It could save others going through the same frustration." Usually popular languages are also liked by many. To encourage people to bring up what they dislike about well liked languages seems to be encouraging arguments. I hope that wasn't the intention.

Anyway, I'll be hanging around mainly and possibly posting now and then.
The forum is reactively moderated, and we have a report system, so if you feel a post is unacceptable, report it and the mods will take a look.

On the whole language discussions tend to be fractious, so those sort of threads are probably given a bit more leeway than, for example a begineers question thread. However, I will stomp anyone from a great height if I think it is necessary. No one is safe form the banhammer. ;)
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
"My grief counseller just died, luckily, he was so good, I didn't care."

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

Re: General language discussion.

Fri May 31, 2019 9:25 am

Heater wrote:
Fri May 31, 2019 7:57 am
How many times do we need to hear people say they don't like the white space indentation of Python, the curly braces of C, "the call back hell" or Javascript, the reverse polish notation of Forth, the s-expression notation of Scheme, the verbosity of COBOL, the terseness of APL, the strict type checking of Ada, etc, etc ad nauseam.

Without demonstrating some clear and concrete advantage or disadvantage it's usually "all only opinions" as you pointed out.

2) It's vanishingly unlikely that I am going to fix it. Neither are you.
One of them is easy to fix anyway :)

#define begin {
#define end }

horrible, but may be useful if poor eyesight is a problem.

Andyroo
Posts: 2823
Joined: Sat Jun 16, 2018 12:49 am
Location: Lincs U.K.

Re: General language discussion.

Fri May 31, 2019 9:43 am

Heater wrote:
Fri May 31, 2019 4:26 am
...
As it happen PL/1 is something I have totally missed out on. Is there even a way to run PL/1 on a PC or more relevantly the Raspberry Pi?
Possibly :D There is a sandbox on-line at https://www.vintagebigblue.org/Compiler ... ompile.php but I think two projects have stopped active development / support (I should say end ;) http://www.iron-spring.com and http://pl1gcc.sourceforge.net
Need Pi spray - these things are breeding in my house...

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

Re: General language discussion.

Fri May 31, 2019 10:00 am

There is such a big choice of languages around now that if you don't like something, just use another.

That's the great thing about the Raspberry Pi and Linux.
Several common languages are included with the distro.
Less common ones are available via the package manager.
For the rare or historical languages, there is bound to be someone on this forum who knows how to get it!

If a trial language is big with lots of unwelcome dependencies, its easy to re-flash the SD card and remove all traces of it.

Heater
Posts: 12072
Joined: Tue Jul 17, 2012 3:02 pm

Re: General language discussion.

Fri May 31, 2019 11:38 am

jahboater,
There is such a big choice of languages around now that if you don't like something, just use another.
True enough, but, but...

Choice of programming language is not just between me and my computer.

A programming language is more to do with communicating with other programmers. That is to say humans, mostly. That is, communicating with a community.

As such it is in my interest to try and convince you that the language we know and love is brilliant and that you should switch to it from whatever unintelligible garbage you are using :)

For example. My suddenly deciding that I don't like C/C++, Python, Javascript etc anymore and that I was going to work in Smalltalk from now on, would be akin to deciding I don't like to speak English anymore and will use Mongolian.

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

Re: General language discussion.

Sat Jun 01, 2019 3:12 am

One of them is easy to fix anyway :)

#define begin {
#define end }

horrible, but may be useful if poor eyesight is a problem.
Wow, I am just so going to try that, that will fix my main issue, one of those dark editors might help as well.
Higher resolution with more pixels(more, smaller text) does not help either ;)
Feeling nostalgic for a 80x25 green mono screens :lol:

Pi's do allow us to try from many and pick what we like.
Generally for Embedded you have a choice of C and maybe C++?
We keep getting told diversity is good, in fact if we watch the news this is rubbed in our faces everyday.
No more than if I explain to you how much I hate beetroot and rice pudding.
Beetroot is not bad compared to Brussel sprouts, I am with you on the rice pudding :lol:
I don't know about you but I don't have the knowledge, skill, imagination, time or inclination to be creating any kind of new language that would ever get noticed.

My impression is that people who do have all that don't create their new languages to fix things people hate. No, they do it to fix things they hate or gain things they would like.

3) It's not useful or constructive.
I am coming to the conclusion they did it because they could and because it was fun and some how they found the time.
Knowledge is acquirable, skill take time and practice, imagination is the important one, Dare to Dream?

Until this year I never would have thought I could write a full GUI OS and I still have not :oops:
Just need to find the time to glue all the pieces together, it won't change the World, just my confidence.

That is the important things about Pi's. The confidence to try.
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

Heater
Posts: 12072
Joined: Tue Jul 17, 2012 3:02 pm

Re: General language discussion.

Sat Jun 01, 2019 4:59 am

Wow, I am just so going to try that
Be prepared for surprises:

Code: Select all

$ cat junk.c
int processTimeSeries (int* data, int begin, int end) {
}
$ gcc junk.c
junk.c:5:13: error: expected ‘;’, ‘,’ or ‘)’ before ‘}’ token
 #define end }
             ^
junk.c:7:46: note: in expansion of macro ‘end’
 int processData (int* data, int beginIt, int end) {
                                              ^~~
junk.c:7:49: error: expected identifier or ‘(’ before ‘)’ token
 int processData (int* data, int beginIt, int end) {
Not really a good idea.

Code: Select all

Generally for Embedded you have a choice of C and maybe C++?
And Python, Javascript, Ada, Forth, pretty much anything really.

Brussle sprouts are heavenly.
Knowledge is acquirable...
Up to some limit. Most of what I ever knew I have now forgotten.
...skill take time and practice,..
Don't have the time. Not everyone who practices hard gets anywhere.
...imagination is the important one...
As a kid I would sometimes get toys that said "Limited only by your imagination" on the box. I used to think "Thanks for nothing!"

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

Re: General language discussion.

Sat Jun 01, 2019 7:44 am

Heater wrote:
Sat Jun 01, 2019 4:59 am
int processTimeSeries (int* data, int begin, int end) {
As I think you are saying, best not to use it for existing code.

It does actually work if you put begin and end in the correct places. Think of them as new keywords.
Pascal has begin and end, and you obviously wouldn't use them for formal argument names.

Code: Select all

int main( void )
begin
  for( double x = 0.0; x < 1e99; x += 1000.0 )
    if( exp10(x) != pow( 10.0, x ) )
    begin
      printf( "x = %g\n", x );
      exit(1);
    end
end

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

Re: General language discussion.

Sat Jun 01, 2019 10:41 am

Did you just invent a new language? Cascal?
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

Heater
Posts: 12072
Joined: Tue Jul 17, 2012 3:02 pm

Re: General language discussion.

Sat Jun 01, 2019 11:32 am

Some years ago my friend wanted to teach some programming to his 10 year old daughter. She did has never seen a program and did not speak English. We came up with C in Finnish:

Code: Select all

kokonumero tarkein (kokonumero argc, merkki* argv[])
alkaa
    jos (argc > 1)
    alkaa
        vaihtaa (argc)
        alkaa
            tapaus 0:
                sillaaikaa (1)
                alkaa

                loppu
                tauko;
            tapaus 1:
                for (kokonumero i = 0; i < argc; i++)
                alkaa

                loppu
                tauko;
            tapaus 2:
                tauko;
            oletusarvo:
                tulosta("?!\n");

        loppu
    loppu
    muu
    alkaa
        tulosta("?\n");
    loppu
    palata (0);
loppu

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

Re: General language discussion.

Sat Jun 01, 2019 12:35 pm

Long long ago I joined a team that had recently started using C.
An engineer was tasked with writing the coding standards for the new language.
He was familiar with Pascal, so he mandated that a set of #defines be used to make C look like Pascal as far as possible :) :)

Horrible.

hippy
Posts: 5091
Joined: Fri Sep 09, 2011 10:34 pm
Location: UK

Re: General language discussion.

Sat Jun 01, 2019 1:09 pm

Gavinmc42 wrote:
Sat Jun 01, 2019 3:12 am
One of them is easy to fix anyway :)

#define begin {
#define end }

horrible, but may be useful if poor eyesight is a problem.
Wow, I am just so going to try that
I've done that. Macro expansions and defines are (1) a fast-track way to invent 'new' languages, (2) handy for boot-strapping new languages, (3) convenient when moving to a new language while more used to some other. (4) a stop-gap until one accepts that what the language actually uses is actually acceptable.

If one designs an appropriate simplistic language it's possible to have it multi-language just be altering the macro definitions and defines. If one embeds the pre-processor and definitions in a single application one then has an auto-translator which can produce a number of languages from a common source which can make it multi-platform.

That's effectively what I'm doing in creating C Extensions for Python and ScriptBasic from a single definition file, what I've done in the past to write programs which can be turned into a number of different languages.

User avatar
ScriptBasic
Posts: 879
Joined: Wed Apr 03, 2019 5:53 pm
Location: Anacortes, WA USA
Contact: Website Twitter

Re: General language discussion.

Sat Jun 01, 2019 8:34 pm

Sitting on the edge of my chair waiting to see that.
🤨

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

Re: General language discussion.

Sun Jun 02, 2019 12:03 am

We came up with C in Finnish:
I have always wondered about non English programming.

Can it be done purely symbolically but still be readable in every language?
Some sort of Hitchhikers guide Babel fish translating editor?
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

Return to “Other programming languages”