The programming thread.

I've mentioned Project Euler. On Amazon there is a Kindle book "LEARNING THROUGH PROJECT EULER PART 1: THE FIRST 25 PROBLEMS OF PROJECT EULER with programs in Pascal, C++ and Java" (https://www.amazon.com/LEARNING-THROUGH-PROJECT-PROBLEMS-programs-ebook/dp/B07QH137C5/ref=sr_1_1?crid=3NDOME7DE1TF9&keywords=learning+through+project+euler&qid=1675252280&s=digital-text&sprefix=learning+through+project+euler,digital-text,153&sr=1-1)

Price: 1.99USD.

Title seems to indicate that this is the beginning of a series. But I haven't found more than this one.

pibbuR

EDIT: I initially wrote that it's free. It is, if you have Kindle Unlimited. If not, there's a price to pay!
 
Joined
Nov 11, 2019
Messages
2,184
Location
beRgen@noRway
ProjectEuler is good for improving your math skills, not for learning a programming language. ProjectEuler doesn't teach you when and how to use classes (in languages which support creating classes), how function composition works (in functional languages), how standard text-processing tasks are implemented etc.. On the other hand, I learned new topics about math (not giving examples here though, to avoid spoilers!) while working on ProjectEuler excercises.
 
Joined
Feb 5, 2023
Messages
1
The TIOBE programming language popularity index for February is here: https://www.tiobe.com/tiobe-index/

Python is number one (15.49%), probably no surprise, although I don't like it (not because it's a bad language, it certainly isn't).

The next two (my favourite languages) are a bit more surprising:
2. C (15.39%)
3. C++ (13.94)

One noteworthy thing: C++ is climbing very fast. 12 months popularity increased by 5.9% , which is 5 times higher than the average change for languages. If you look at the chart you will see its popularity decreasing from 14.2% in 2022 to 5% in 2018, and from there steadily climbing to 2002 values today. It's one of only two languages (guess what the other one is) increasing significantly the last 4 years.

Due to this it earned the programming language of the year award in 2022 (https://www.infoworld.com/article/3...s-programming-language-of-the-year-award.html). Among the reasons cited are it's feasibility for building "fast, vast software systems, with more than 1 million lines of code, without necessarily ending up in a maintenance nightmare" and the continuing development of new standards since 2011.

Rust is currently at number 20 (0.70%), but I suppose it will gain much popularity in the next couple of years. (It's the next language I'm going to learn).

I looked for FORTRAN - it's not on the list, but it's still popular in scientific environments for numeric calculations. As such, it's the oldest language still in use. (There is of course COBOL, but that one is for all practical purposes in maintenance mode, for handling all the banking programs still runniing on COBOL)

pibbuR++
 
Joined
Nov 11, 2019
Messages
2,184
Location
beRgen@noRway
If it's of any interest, there's a Rust game engine called Bevy, "A refreshingly simple data-driven game engine built in Rust." I don't know much about it, but quite a lot of people seem keen on the idea, and it seemed to take off like a rocket, compared to most new open source projects. I thought it might be quite interesting to look at how that data-driven paradigm is applied in the context of gaming.
 
Joined
Nov 8, 2014
Messages
12,085
If it's of any interest, there's a Rust game engine called Bevy, "A refreshingly simple data-driven game engine built in Rust." I don't know much about it, but quite a lot of people seem keen on the idea, and it seemed to take off like a rocket, compared to most new open source projects. I thought it might be quite interesting to look at how that data-driven paradigm is applied in the context of gaming.
There were a couple of articles about it linked in This Week in Rust not long ago, someone describing their experience with it but I haven't read them. Here are the links:
 
Joined
Aug 29, 2020
Messages
10,386
Location
Good old Europe
Rust is currently at number 20 (0.70%), but I suppose it will gain much popularity in the next couple of years. (It's the next language I'm going to learn).
As they like to mention, Rust has been #1 in the most loved and wanted language categories in SO's surveys for many years now. It is already gaining a lot of popularity and I expect that it being used in the Linux kernel will boost that even more.
 
Joined
Aug 29, 2020
Messages
10,386
Location
Good old Europe
I recently discovered a wicked language called Nim. It feels a lot like Python except it's compiled to native code and statically typed, it has a garbage collector though (EDIT: apparently optional, other memory systems are available like manual allocation, apparently). It's messier to read than "clean" languages and from the look of it I wouldn't use it for safety-sensitive projects but it has a fair amount of interesting features.

Nothing new since it's been around since 2008; it was initially called NimRod. The compiler was first written in Pascal, but now it's mostly in Nim - another of those languages which proudly compiles itself. :)
 
Last edited:
Joined
Aug 29, 2020
Messages
10,386
Location
Good old Europe
As they like to mention, Rust has been #1 in the most loved and wanted language categories in SO's surveys for many years now. It is already gaining a lot of popularity and I expect that it being used in the Linux kernel will boost that even more.
Obviously StackOverflow and TIOBE examine different things. TIOBE counts what is being used, while SO counts what programmers would like to use? Or they ask different people?.

One thing that should interesting one of us. In the Database section Couchbase and CouchDb scores slightly more than 1% each.

I'll stick with C++ for the observable future. I like the language and I use Qt a lot. While there are faclities for using Rust with Qt, I don't think that's anywhere near what Qt-C++ offers. But I will learn Rust eventually (I've installed a compiler on my Linux machine).

std::string pibbuR.
 
Joined
Nov 11, 2019
Messages
2,184
Location
beRgen@noRway
As they like to mention, Rust has been #1 in the most loved and wanted language categories in SO's surveys for many years now. It is already gaining a lot of popularity and I expect that it being used in the Linux kernel will boost that even more.
One question (since you've mentioned both of them): Rust or Kotlin?

#include <compare>
#include "languages.h"
std::strong_ordering Pibbur::eval(Pibbur::Lang rust, Pibbur::Lang kotlin) {return rust<=>kotlin;};
 
Last edited:
Joined
Nov 11, 2019
Messages
2,184
Location
beRgen@noRway
One question (since you've mentioned both of them): Rust or Kotlin?

#include <compare>
#include "languages.h"
std::strong_ordering Pibbur::eval(Pibbur::Lang rust, Pibbur::Lang kotlin) {return rust<=>kotlin;};
Read a bit about it. I prefer the rusty one.

Pibbur::eval(rust,kotlin)==std::strong_ordering::greater;
 
Joined
Nov 11, 2019
Messages
2,184
Location
beRgen@noRway
Obviously StackOverflow and TIOBE examine different things. TIOBE counts what is being used, while SO counts what programmers would like to use? Or they ask different people?

It's a yearly survey that any user can fill in; the overall methodology is explained here (link). I don't see the questions there anymore but they can be downloaded along with the data (link). There are questions like:
Which <b>programming, scripting, and markup languages</b> have you done extensive development work in over the past year, and which do you want to work in over the next year?

There was also a blog entry a few days ago which details the programming languages (link), that I haven't read yet but which looks interesting.

I've seen other stats like Languish (link), but I'm sceptical because it's compiled from questions on SO and problem reports on GitHub. I can't help thinking the most problematic languages will have the upper hand. ;)

One question (since you've mentioned both of them): Rust or Kotlin?
Are you asking which one you should try first? If I had to choose between Kotlin and Rust, I'd say it depends on the type of development.

Rust is great for many things, it's very fast, very safe and has a good, simple and unique build system (no bash/Makefile/CMake headaches) that also gives access to all the libraries published by others, you just need to say what to include. But it's harder to master and you must get used to a few unique paradigms rather than trying to translate what you are used to in C++. It takes more time to write and usually more lines of code than Kotlin. The compiler is extremely helpful - oftens tells you how to fix problems.

Kotlin is a sort of C# running on the JVM. It's IMO the best OO procedural language (with many functional programming features) in terms of clean code and features that I know of. It's very easy to learn, and very efficient. Kotlin is great for UI, that's probably why it's been endorsed by Google for Android apps. But it's JVM and uses a garbage collector, it won't be as performant as C++.

Note: it can also compile to native and JS, but then you lose the Java standard library.

C++ is a sure value IMO, I doubt it will be replaced anytime soon no matter what some claim about Go, Rust or Carbon. And I'd definitely choose C++ over Rust for everything UI-related, because the frameworks are more mature, then because there is no inheritance in Rust and that's where it's most needed. There's dynamic binding, traits, generics, closures and other niceties though, it's definitely not low level.

TLDR: Kotlin is great, but it will be redundant with what you already know. You'll be more rewarded with Rust, I think. Which seems to confirm your conclusion. :)
 
Joined
Aug 29, 2020
Messages
10,386
Location
Good old Europe
... I just found a little game called "Rabbids Coding", which features the crazy Raving Rabbids of Ubisoft. Apparingly it is meant to be for children.
 
Joined
Nov 5, 2006
Messages
21,964
Location
Old Europe
Joined
Nov 11, 2019
Messages
2,184
Location
beRgen@noRway
According to https://www.jwz.org/blog/2023/02/code-with-swearing-is-better-code/, code containing swear words tend to be of better quality than codes without swear words.

3627f43d89ea7b79.jpg

The blog post suggests that "the use of swearwords constitutes an indicator of a profound emotional involvement of the programmer with the code".

Since the the example given above is C code, I propose a different explanation. It's when you finally find that dangling pointer causing the sudden (inexplicable) crashes, you kind of let loose. One of the comments support that theory.

It would be interesting to know if the swearing/quality index depends on the language.

p*@@#R who is not sure if the blog is to be taken seriously, or if it's mainly meant to be funny. Which it is.

PS. Could also be dependent on the tools used. For instance, quite often in Qt Creator, its intellisense-wannabe repeatedly choose to insert strange F*CKING IRRELEVANT code whenever I press Enter. Code which I then FOR F*CK's SAKE HAVE TO EDIT AWAY!!!!! DS

PPS. A quote (I choose not to edit the profanities):
For laughs I grepped all the profanity in the Netscape Communicator source when it was about to be released. The code quality must have been high, because there was lots of shit like:
/* Words cannot express how much HPUX SUCKS! */
# define rename hpux_sucks_wet_farts_from_dead_pigeons
/* I can't fucking believe the contortions we need to go through here!! */

DS.
 
Last edited:
Joined
Nov 11, 2019
Messages
2,184
Location
beRgen@noRway
There's actually some research that showed, contrary to popular opinion, people who use a lot of profanity tended to have larger vocabularies in general.

One of my first bosses, and a great help to me, was an old-school, ex-officer, posh gent. He used to be quite foul-mouthed in a highly amusing way, where it just seemed a part of his well-spoken manner.

He used to say things like: "Right, now, that Simon is coming over for a meeting today. He is a bit of a c***, but best efforts at composure, please." Or, "Have you seen that Jason from accounts? If you do, kick him in the b******s for me, would you? There's a good chap"
 
Joined
Nov 8, 2014
Messages
12,085
There's actually some research that showed, contrary to popular opinion, people who use a lot of profanity tended to have larger vocabularies in general.
Unfortunately that study is a bit flawed. At least how it's represented. The study was basically a test to see how many legit words they could come up with that start with a particular letter in a short period of time. Then the same test was done with swearing/taboo words. Those who excelled at the former, also excelled at the latter. So the actual result was someone who has a large vocabulary also happens to know more curse words. Whether that's applied in one's regular audible speech is another matter. From personal experience, those who verbally effin shout effin every second effin word in regular casual conversation have never been the sharpest tools in the shed. However some of the more intelligent people I know (probably not unlike Ripper's boss's case :LOL:), know how to use properly timed curse words to emphasize their point or increase their Charisma (roll 18). Also people who code often enjoy pushing boundaries (digital or social) so possibly not too surprising!
 
Joined
Feb 19, 2009
Messages
2,257
Location
Calgary, Alberta
Yes, not to be taken too seriously, which is why I didn't even bother trying to find a link. I think the distinction you make is key - between people who seem unable to communicate without peppering their speech with expletives, and people who are eloquent but... colourful.
 
Joined
Nov 8, 2014
Messages
12,085
Back
Top Bottom