Mind your language

Discussion of chess software programming and technical issues.

Moderators: bob, hgm, Harvey Williamson

Forum rules
This textbox is used to restore diagrams posted with the [d] tag before the upgrade.
Henk
Posts: 6416
Joined: Mon May 27, 2013 8:31 am

Mind your language

Post by Henk » Sun Jul 12, 2020 9:39 pm

https://www.youtube.com/watch?v=Og847HVwRSI

In the sixties and seventies you only had to learn Fortran.
In nineties only C.
Don't see functional language listed.

Fortran
Pascal
C
C++
Java
Javascript
Python

Tony P.
Posts: 119
Joined: Sun Jan 22, 2017 7:30 pm
Location: Russia

Re: Mind your language

Post by Tony P. » Mon Jul 13, 2020 3:51 am

Brace yourselves: Rust is coming :P I hope it's even going to overtake Scratch for the 17th place in the TIOBE index next month :lol: (you've read right - Scratch, a language aimed at children, is in the top 20 of that particular index - that's how tech-savvy the kids are becoming).

User avatar
lucasart
Posts: 3109
Joined: Mon May 31, 2010 11:29 am
Full name: lucasart
Contact:

Re: Mind your language

Post by lucasart » Mon Jul 13, 2020 4:59 am

Tony P. wrote:
Mon Jul 13, 2020 3:51 am
Brace yourselves: Rust is coming :P I hope it's even going to overtake Scratch for the 17th place in the TIOBE index next month :lol: (you've read right - Scratch, a language aimed at children, is in the top 20 of that particular index - that's how tech-savvy the kids are becoming).
I am a bit skeptical about TIOBE. They say C is number one today, in 2020.

Sure, nothing pleases me more than seeing C way ahead of C++, and finally overtaking the infamous Java. But let's not confuse our dreams with reality…
Theory and practice sometimes clash. And when that happens, theory loses. Every single time.

Tony P.
Posts: 119
Joined: Sun Jan 22, 2017 7:30 pm
Location: Russia

Re: Mind your language

Post by Tony P. » Mon Jul 13, 2020 5:30 am

Hmm, you've prompted me to look up their methodology, and I'm not sure if it even discerns C++ related search hits from C related ones correctly, as that would require all the 25 polled engines to be sensitive to the '++' suffix.

User avatar
Bo Persson
Posts: 176
Joined: Sat Mar 11, 2006 7:31 am
Location: Malmö, Sweden
Full name: Bo Persson

Re: Mind your language

Post by Bo Persson » Mon Jul 13, 2020 8:12 am

Tony P. wrote:
Mon Jul 13, 2020 5:30 am
Hmm, you've prompted me to look up their methodology, and I'm not sure if it even discerns C++ related search hits from C related ones correctly, as that would require all the 25 polled engines to be sensitive to the '++' suffix.
You might also wonder what search engines they used in the 1960's.

Tony P.
Posts: 119
Joined: Sun Jan 22, 2017 7:30 pm
Location: Russia

Re: Mind your language

Post by Tony P. » Mon Jul 13, 2020 3:38 pm

The Youtube video used various sources of data, outlined in its description. It didn't use TIOBE alone, fortunately.

OliverBr
Posts: 334
Joined: Tue Dec 18, 2007 8:38 pm
Location: Munich, Germany
Full name: Dr. Oliver Brausch
Contact:

Re: Mind your language

Post by OliverBr » Tue Jul 14, 2020 9:57 pm

lucasart wrote:
Mon Jul 13, 2020 4:59 am

Sure, nothing pleases me more than seeing C way ahead of C++, and finally overtaking the infamous Java. But let's not confuse our dreams with reality…
C++ is not handsome, but Java is. Actually Java is a great language and it's not so slow as one may think...
Chess Engine OliThink: http://brausch.org/home/chess

Milos
Posts: 3775
Joined: Wed Nov 25, 2009 12:47 am

Re: Mind your language

Post by Milos » Wed Jul 15, 2020 10:11 am

Tony P. wrote:
Mon Jul 13, 2020 3:51 am
Brace yourselves: Rust is coming :P I hope it's even going to overtake Scratch for the 17th place in the TIOBE index next month :lol: (you've read right - Scratch, a language aimed at children, is in the top 20 of that particular index - that's how tech-savvy the kids are becoming).
Hehe, Rust is coming for at least last 6-7 years. But still number of ppl that uses it can't even be measured with percentages.
Also popularity index like TIOBE is total BS. It's like measuring brand strength in consumer world. It means very little to nothing.

bob
Posts: 20916
Joined: Mon Feb 27, 2006 6:30 pm
Location: Birmingham, AL

Re: Mind your language

Post by bob » Sun Jul 19, 2020 2:46 am

In 1969/1970 PL/1 was "the up and coming language" with bits of Algol, FORTRAN and COBOL included. And then in the 80's it was ADA. There is always going to be the next great language that turns out to be "not so great". C is 50 years old. That much history can't be completely wrong.

User avatar
mvanthoor
Posts: 241
Joined: Wed Jul 03, 2019 2:42 pm
Full name: Marcel Vanthoor

Re: Mind your language

Post by mvanthoor » Wed Jul 29, 2020 8:43 pm

C isn't a bad language.

It has been in development for almost 50 years. It can be optimized down to the last instruction nowadays. It does show some cracks however. Setting up a working build system that works across compilers across operating systems is much harder in C than it is modern languages. (That is not a language problem per se; it could be done, but no-one seems to be doing it for C.) Writing C that doesn't create undefined behavior is hard. Writing C that is memory safe is harder.

C is not an easy language to use right.

Although I prefer Rust nowadays for several reasons, if it hadn't existed, I would have probably written my engine in C. The only reason for not writing it in C, is because there are so many C engines already.

On the one hand, I love C for all of its power it gives you over the computer, the simplicity of the core language, and the speed.

On the other hand, I hate C because it'll blow your head off if you put an * or & in the wrong spot. Under water, Rust basically has the same memory management, but it handles all of the * (derefs) by itself, except in certain cases.

Let's say you have:

x = &y;

If you now print x in C, you get the memory address of y. If you wanted y, you'd need to print *x.
In C, this is correct, because x DOES contain the memory address of y.

In Rust:

x = &y

means "x is a reference to y", not "it contains the memory address of y". Under water, x DOES contain the memory address, obviously, but because of the different philosophy, if you print/use x, you will get y in Rust; because the language assumes you want to be using the thing x references to, not that things memory address. (You can use the memory address if you want to, but that is not the default.)

C gets complicated if you have pointers to pointers... in Rust, the compiler keeps track of that for you, and does all the de-referencing automatically, to give you the original struct/stuff you're pointing to. (If you don't tell it to do something else.)

This, and the semantic code analyzer built into the compiler, are the two main reasons for me to prefer Rust nowadays. I can do without, and I can use C, but... well... maybe I'll port my engine to C at some point after I finish it, just to have a C version, but I don't know yet.

Post Reply