Hi all,
In another thread, someone (mratsim) has spoken of a lot of users using Nim for Project Euler. Maybe members of this “project” have done a lot of noise to make illusion, but I want to give some more precise data regarding Nim and Project Euler.
For those who do not know about this “project”, this is a set of mathematical and programming challenges. In some cases, they can be solved by hand, but generally, at least starting from problem 100, you have to find a clever algorithm to solve them with a computer and brute force is seldom the way to go.
The most used language is now Python with 52323 members (it was not the case, several years ago). One of the most successful language to solve the problems is PARI/GP, a specialized mathematical language, which has only 117 users. Python is well suited to solve the problems, but PARI/GP is probably better for some problems. I tried it, but was not very efficient and didn’t persevere.
Nim was unknown of Project Euler until I asked the team to add it to the list of registered languages. It was done on 2016 October 17 and since then, Nim has got 13 members. Yes, only 13 members! And only two of them have reached level 1 (with 26 and 32 problems solved), one has reached level 2 (with 64 problems solved) and one has reached level 8 (with 215 problems solved).
What does it means? Firstly, that Nim is not popular at all. Compared to its direct competitors, it is far behind. For instance, Rust has 697 users, D has 237 users (which is not very good for a pretty old language). Even Cobol has 36 users. To be fair, there exist certainly users whose main language is another one and who use Nim. And this is more likely to happen for Nim than for Python. But there is no statistics on the actual use of language and, anyway, you have not to publish your solution, even if it can be done (I have done it each time I found that my solution was worth it and could give a good image of Nim elegance).
Secondly, it shows that Nim has not found an audience with people fond of mathematical and programming challenges. In fact, these are not a target for Nim, but Python has been very successful here and it’s not due to mathematical modules as numpy as they are never needed to solve the problems. Actually, Nim is very well suited to these kind of problems, with only two difficulties. First, there is no big integers and you have to use bignum. Second, the copy semantic needs some care. And, as performance matters a lot, it is more comfortable to use Nim than Python (I know, I used Python before using Nim), even if pypy may give an impressive performance boost.
Of course, Nim popularity on Project Euler has not any importance. This is only an indicator and a biased one as I have said. But I wanted to give some precise data to remove some false hopes: no, there is not a large deposit of Nim users which are members of Project Euler 😊.
That is really an interesting report, thanks.
So there are at least 13 Nim users -- well maybe some may have already retired :-)
If I remember correctly, we had more than 100 users participating in 2018 Advent of Code using Nim, so this seems to be a more upto date lower bound. When we assume that number of Nim users is not decreasing, and only a fraction of whole community participates is last AoC, maybe ten %, then we have at least 1k users. This seems resonable for me and and is supported by Dom's polls from 2017 and 2018 with about 700 participants, with a larger fraction that has never used Nim and did not intent to use it.
So yes, community is still small, and I think it has not grown much in last 5 years. Monthly a few people come, try Nim for a few weeks, and vanish. Unfortunately I saw some bright ones vanishing also.
Secondly, it shows that Nim has not found an audience with people fond of mathematical and programming challenges.
There may be people interested in mathematics (and its applications) but not in programming challenges that are generally more attractive for students.
When I was a student I implemented some of the Euler's challenges in Haskell and I think Ocaml (it's been along time), but today with a limited time I'm more interested at implementing things that are more useful and related to my work.
I'm my self a "mathematician" (now converted to an ML and CV engineer) and I noticed that multiple members of the community are in fact scientists or work in domains related to ML.
For the little story I followed rust for years looking at it as a replacement for C++, but was quiet disappointed with the lake of interest in scientific computing from the rust team (the language make it VERY hard and very ugly to work on generic numeric types + problems with the borrow checker). What interest me in Nim is precisely its potential for scientific computing.
So I think this numbers should be taken with a grain of salt (but I agree with you that Nim is less popular than the languages you mentioned, lets hope this will change after v1.0)
What does it means? Firstly, that Nim is not popular at all. > Secondly, it shows that Nim has not found an audience with people fond of mathematical and programming challenges.
Ok. Any ideas how to make it more popular? :-)
Any ideas how to make it more popular? :-)
In the Project Euler community, this is not easy. Members are mostly mathematicians and either they use main languages such as C, C++, Java, Python, or they use languages such as Haskell (6863 users!) or more logically Mathematica or Matlab. For those members which are computer scientists or engineers, they use whatever language they like (and there are a lot of them) and they don’t care a lot about other languages, I guess.
Nevertheless, when they have solved a problem, they probably look at other people solutions and this is the reason why I try to publish my solutions with a strong emphasis on the readability, elegance and performance of Nim. And so, I can always imagine I have convinced some programmer to try Nim :-).
One good thing to note is that we can solve any problem of Project Euler, provided of course that we find a good algorithm. This has not always been the case as without modules to deal with big numbers (bignum or bigint), it would be really difficult. I know how I could have managed to do this, but, probably, I would have rather chosen to use Python. Or I would have built some crude binding to GMP, who knows?
Outside of Euler Project, I know that there is much brainstorming to find some way to improve the popularity of Nim. I would like to hope that, as with Python, the qualities of the language will be acknowledged at last, but it could take a while.
Python has gained a lot of popularity among scientists, in biology, language analysis, statistics (concurrently with R – 1220 users in Project Euler), etc. But, in the reverse, I personally encountered a lot of resistance in my company to simply use it. So, I think that we cannot expect gain popularity with private companies. They are too conservative, too timid, except for sponsors of course.
Nim has probably a place to find as a language for numerical computations. For instance, arraymancer is really impressive. Taking a place as a language for efficient computations (and scientists need performances) would be a great achievement, I think. It would be difficult as Python with numpy, scipy and others is well installed. But it remains slow compared to what can be done with a compiled language as Nim. There are other competitors such as Julia, but I will not bet on their success.
After that, Nim must gain popularity in the open source community. When Linux distributions have replaced their Perl scripts by Python scripts, it was terminated: Python has gained its battle to become a main language. Of course, Nim has to find its place. For instance, I think it would be the best language to write photographic software such as RawTherapee or darktable, provided it offers good bindings to the graphical toolkits (GTK for darktable). And modules such as arraymancer would really shine here.
Here is my story from a slightly different angle.
I really like code-challenges sites. I've used them a lot (and: a lot of them ;)) when I was learning Python, and some of them when I started with Nim, here is the list from the top of my head:
Probably some more, but I forgot. What I'm sure of is: Project Euler is not on that list. I had a look at it several times, but it never really attracted me. I've read some of the tasks and they felt so boring.
So the small number of Nim users of Project Euler is really no surprise to me.
Yes, I can understand that you don’t appreciate Project Euler tasks. They may seem less fun that, for example, those of Advent of Code. Most of them have a strong mathematical nature and not everybody likes to deal with prime numbers and totient function. So, you have to like mathematics or, more accurately, this kind of mathematics.
As regards the usefulness of the problems, I don't think that Advent of Code or Python Challenge, the two others code-challenge I have practiced, are any more useful. If you want to learn a programming language, they are of little interest (even Python challenge). They are purely recreative and that’s fine for me. But, with Project Euler, there is something recurrent. If you don’t find a clever algorithm, you will not solve the problem. Brute force is almost never an option, except for the first hundred problems. And, if you don’t know the difference between O(n) and O(n²), for instance, you will learn it… the hard way.
But I don’t see why the mathematical nature of Project Euler problems could explain why there are so few Nim users compared to users of other programming languages. Except if, for some reason, Nim users hate mathematics more than, say, Cobol users (36), Tcl users (75), Kotlin users (152) or Rust users (697).
Now, as I have said, the preferred programming language of a user may not be the actual programming language he/she use. Nim is probably underrepresented, as other relatively new languages which don’t have the support of a great company.
This is my opinion so I have no "hard-data" to backup, I think most (if not all) Nim users are people who already have experience with other languages. People will gravitate to something that have most lib, most tutorial, most documentation, and most easiest for solving their real-life problems (e.g. Python which have sheer amount of libs and documentation/tutorial)
This also my opinion, I think another reason why people solving problems in Project Euler (other than recreation ofc) is to get familiar with syntaxes. Means, few people solving problem in Project Euler using Nim shouldn't something that alarming, it's just Nim syntax is so easy that they can pick it up easily. (Again, this is my opinion).
But I don’t see why the mathematical nature of Project Euler problems could explain why there are so few Nim users compared to users of other programming languages. Except if, for some reason, Nim users hate mathematics
I think your observation and explanation was fully correct: Compared to other languages Nim community is still tiny. But that is not such a serious problem. Since 6 months Nim is strongly supported by Status corp. so even when Araq will retire or hit by the bus, Nim will not die immediately. I would even bet that status has put a live insurance policy on Araq. So my confidence has grown in the last half year, and I guess not for me alone. That fact may explain the more than 100 people participating in 2018 AoC.
For other measures of community size one may regard number of nimble packages or github repositories, but due to the large fraction of garbage (plain forked, nearly empty or outdated ones, or plain c2nim wrappers) that may again give a too positive impression. On the other hand number of debian Nim installations may give a too low indication as many users just install from git sources, and for number of git downloads I think that has absolutely no relevance as for example gintro packages shows one to 2 downloads daily for more than one year now, while no one is really using that package. So that must be all bots.
I mostly agree with you and I am also rather optimistic for the future of Nim. The community is tiny, but composed of truly motivated Nim users. My remark about the small number of Nim users in Project Euler was there only to give true numbers, and yes, Nim is certainly a marginal language here.
As regards AOC 2018, I’m sorry :-) but the reality is a bit different that what you think. There are 118 registered users on the dedicated leaderboard. Only 98 have solved at least one problem. Others may be Nim users, but have not participated.
Now, if you look closely at the solutions when they are available, you will discover that some competitors have used exclusively Nim, some have used Nim and another language, and some have not used Nim at all. For the latter, they may be Nim users, of course, but they have used another language for AOC. And if you wanted to compete for the first places, it was better to use an agile language which you master well.
The 118 users who have subscribed are certainly interested by Nim. And some who were only experimenting with Nim have done very good remarks about the language. But you cannot say that there are 100 true active users.
Of course, there are certainly Nim users who have not subscribed and have used Nim to solve some problems. Who knows?
For sure, it is difficult to have a good idea of the number of active users of Nim. For now, there are private users as me, contributors who write packages and libraries, and the development team. Nothing surprising, I think. Nim is still in incubation phase.
> What does it means? Firstly, that Nim is not popular at all. Secondly, it shows that Nim has not found an audience with people fond of mathematical and programming challenges.
Ok. Any ideas how to make it more popular? :-)
Adding a link to Project Euler might help. :-)
(Yes, I know that DuckDuckGo is my friend, but sometimes it's the little things that count.)