www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - D for competitive programming

reply urxvt1 <123 123.com> writes:
I wanted to try topcoder problems (never used this site before)
and I found out that it doesn't support dlang.
They only have c++, java, c#, vb.net, python languages.
It would be great to see D on this list.
I found this thread 
https://apps.topcoder.com/forums/?module=Thread&threadID=703674 
and it seems that it's not that easy to add new langauge and they 
are not very interested.
And I think that one of the keys to make D more popular and 
attract more people
to try it would be to promote D as a language for learning 
algorithms and competitive programming. This niche is mostly 
occupied by c++ and java.
I think that D might be a very good candidate to push these 
languages in CP.

I've also checked google code jam statistics and unfortunately D 
isn't very popular here compared to say golang or scala.
https://www.go-hero.net/jam/16/languages
https://www.go-hero.net/jam/15/languages
https://www.go-hero.net/jam/14/languages
https://www.go-hero.net/jam/13/languages
Jul 28 2016
next sibling parent Steven Schveighoffer <schveiguy yahoo.com> writes:
On 7/28/16 5:20 PM, urxvt1 wrote:
 I wanted to try topcoder problems (never used this site before)
 and I found out that it doesn't support dlang.
 They only have c++, java, c#, vb.net, python languages.
 It would be great to see D on this list.
 I found this thread
 https://apps.topcoder.com/forums/?module=Thread&threadID=703674 and it
 seems that it's not that easy to add new langauge and they are not very
 interested.
 And I think that one of the keys to make D more popular and attract more
 people
 to try it would be to promote D as a language for learning algorithms
 and competitive programming. This niche is mostly occupied by c++ and java.
 I think that D might be a very good candidate to push these languages in
 CP.
I used to be very into topcoder a long time ago and have some inside knowledge of how the system works (I used to write problem sets for them, and even extended their java app a couple times). They are likely not going to take a look at D because their main goal is one of matching high-demand component developers with buyers for those components. This is why you see those languages as the main pieces. I doubt D would fit in there. We need to make D more popular so they have no choice but to add it :) I believe they added C++ (it used to be Java only) to expand their reach to more developers (at the time, topcoder just did job searching, or maybe not even yet, it was very early), I don't know if they have a C++ component system. -Steve
Jul 28 2016
prev sibling next sibling parent reply Seb <seb wilzba.ch> writes:
On Thursday, 28 July 2016 at 21:20:29 UTC, urxvt1 wrote:
 I wanted to try topcoder problems (never used this site before)
 and I found out that it doesn't support dlang.
 They only have c++, java, c#, vb.net, python languages.
 It would be great to see D on this list.
 I found this thread 
 https://apps.topcoder.com/forums/?module=Thread&threadID=703674 
 and it seems that it's not that easy to add new langauge and 
 they are not very interested.
 And I think that one of the keys to make D more popular and 
 attract more people
 to try it would be to promote D as a language for learning 
 algorithms and competitive programming. This niche is mostly 
 occupied by c++ and java.
 I think that D might be a very good candidate to push these 
 languages in CP.

 I've also checked google code jam statistics and unfortunately 
 D isn't very popular here compared to say golang or scala.
 https://www.go-hero.net/jam/16/languages
 https://www.go-hero.net/jam/15/languages
 https://www.go-hero.net/jam/14/languages
 https://www.go-hero.net/jam/13/languages
For what it's worth - HackerRank (a similar platform) supports D (2.071.1!). Sometimes writing the customer support & complaining about outdated versions does help :) https://www.hackerrank.com/environment
Jul 28 2016
next sibling parent Timon Gehr <timon.gehr gmx.ch> writes:
On 29.07.2016 00:07, Seb wrote:
 On Thursday, 28 July 2016 at 21:20:29 UTC, urxvt1 wrote:
 I wanted to try topcoder problems (never used this site before)
 and I found out that it doesn't support dlang.
 They only have c++, java, c#, vb.net, python languages.
 It would be great to see D on this list.
 I found this thread
 https://apps.topcoder.com/forums/?module=Thread&threadID=703674 and it
 seems that it's not that easy to add new langauge and they are not
 very interested.
 And I think that one of the keys to make D more popular and attract
 more people
 to try it would be to promote D as a language for learning algorithms
 and competitive programming. This niche is mostly occupied by c++ and
 java.
 I think that D might be a very good candidate to push these languages
 in CP.

 I've also checked google code jam statistics and unfortunately D isn't
 very popular here compared to say golang or scala.
 https://www.go-hero.net/jam/16/languages
 https://www.go-hero.net/jam/15/languages
 https://www.go-hero.net/jam/14/languages
 https://www.go-hero.net/jam/13/languages
For what it's worth - HackerRank (a similar platform) supports D (2.071.1!). Sometimes writing the customer support & complaining about outdated versions does help :) https://www.hackerrank.com/environment
http://codeforces.com/ is currently at DMD32 v2.069.2.
Jul 28 2016
prev sibling parent reply urxvt1 <123 123.com> writes:
On Thursday, 28 July 2016 at 22:07:44 UTC, Seb wrote:
 On Thursday, 28 July 2016 at 21:20:29 UTC, urxvt1 wrote:
 I wanted to try topcoder problems (never used this site before)
 and I found out that it doesn't support dlang.
 They only have c++, java, c#, vb.net, python languages.
 It would be great to see D on this list.
 I found this thread 
 https://apps.topcoder.com/forums/?module=Thread&threadID=703674 and it seems
that it's not that easy to add new langauge and they are not very interested.
 And I think that one of the keys to make D more popular and 
 attract more people
 to try it would be to promote D as a language for learning 
 algorithms and competitive programming. This niche is mostly 
 occupied by c++ and java.
 I think that D might be a very good candidate to push these 
 languages in CP.

 I've also checked google code jam statistics and unfortunately 
 D isn't very popular here compared to say golang or scala.
 https://www.go-hero.net/jam/16/languages
 https://www.go-hero.net/jam/15/languages
 https://www.go-hero.net/jam/14/languages
 https://www.go-hero.net/jam/13/languages
For what it's worth - HackerRank (a similar platform) supports D (2.071.1!). Sometimes writing the customer support & complaining about outdated versions does help :) https://www.hackerrank.com/environment
I'm using open.kattis.com but unfortunately they don't have D support. They have Go and haskell though. Yeah, maybe it's a good idea to write but D isn't popular and tech news sites are writing about rust, go or scala, so I doubt they are gonna add D. On the other hand they have prolog which isn't very popular either.
Jul 29 2016
parent sarn <sarn theartofmachinery.com> writes:
To add to the list, here are a couple of other online judges that 
explicitly support D:

http://www.spoj.com/
http://judge.u-aizu.ac.jp/onlinejudge/

Of course, if you use a language-agnostic platform like Code Jam, 
you can do what you like.  Project Euler (maths-oriented) and the 
Matasano Challenges (crypto-oriented) are two of my favourite 
problem sets.
Jul 29 2016
prev sibling parent Ivan Kazmenko <gassa mail.ru> writes:
Hi!

On Thursday, 28 July 2016 at 21:20:29 UTC, urxvt1 wrote:
 I wanted to try topcoder problems (never used this site before)
 and I found out that it doesn't support dlang.
 They only have c++, java, c#, vb.net, python languages.
 It would be great to see D on this list.
I highly doubt TopCoder would adopt D anytime soon. TopCoder definitely had their time as The Site for Competitive Programming, but that was like ten years ago. For a very long time already, they don't actively evolve algorithmic competitions, and seem to be driven by other tracks which actually make them some money. So, unless there are plenty of clients who want to do crowdsourcing in D and use TopCoder platform for that, it's unlikely to be added. Fortunately, competitive programming sites are now aplenty, so one can focus on other sites instead.
 I've also checked google code jam statistics and unfortunately 
 D isn't very popular here compared to say golang or scala.
 https://www.go-hero.net/jam/16/languages
 https://www.go-hero.net/jam/15/languages
 https://www.go-hero.net/jam/14/languages
 https://www.go-hero.net/jam/13/languages
D is at an odd position there, because only a few use it, yet some of them (like Kazuhiro Hosaka) are strong competitors and get to the finals. Generally, as already mentioned, there are a number of competition series where one can use any language, since only the answers are checked: Google Code Jam (https://code.google.com/codejam) Facebook Hacker Cup (https://facebook.com/hackercup) Internet Problem Solving Contest (https://ipsc.ksp.sk) ICFP Contest (https://icfpc2016.blogspot.com, weekend contest) Al Zimmermann's Programming Contests (https://azspcs.com, three months long) Most of the above happen only once a year though. Among the sites which actually compile your code, there are a few which already support D, again, some already mentioned: Codeforces (http://codeforces.com, DMD 2.069.2 32-bit) AtCoder (https://atcoder.jp, all three: DMD/GDC/LDC; the site is new to international community, but competitive programming in D looks strong in Japan) HackerRank (https://hackerrank.com, DMD 2.071.1) CodeChef (https://codechef.com, outdated GDC 4.9.2 which I had trouble with, same platform as SPOJ) Yandex.Contest (https://contest.yandex.com, outdated GDC 4.9 but didn't give me trouble on top of that) And these are only the sites I tried personally. Sure, there are other competition sites which also support D. On the other hand, the two competitions which have the most influence on the competitive programming community are IOI for high school students and ACM ICPC for teams from universities, and their many national and local sub-rounds. These are pretty conservative when it comes to programming languages: in the last 20 years, the only languages which got at least some time frame and degree of support are Pascal, C, C++, Java and Python. There are a number of problems when reasoning for the adoption here. One of them is the chicken - egg problem revisited. The competitions have multi-stage selection process: there are at least regional, national and international rounds for IOI, and quaterfinals, semifinals and World Finals for ACM ICPC. If the world final round doesn't support some language X, regional rounds are reluctant to support X as well, since by doing that, they would allow strong competitors using X to pass to the later round, but no support for their tool exists in that round, which certainly has its downsides. On the other hand, if the world final round starts to support X without massive desire for such support from regional rounds, they would end up spending resources for very little gain. Another problem sounds like this: if support for language X is added, this opens a flurry of requests to support dozen of other comparable languages. For an established international competition, this means quite a bit of research must be done to choose what to support and what not to. And for each language getting support, it means either a great increase in effort to ensure every problem can be comfortably solved in every language, or only limited support, which also has its downsides. The latter is what happens in the case of Python: it is not guaranteed that every problem will be solvable in Python, and, in all likelihood, some problems will really be unsolvable. That said, for competitions which already support quite a few languages but not D (among what I've seen, HackerEarth and CodeFights sites come to mind), one could have more success in persuading them to include a D compiler as well. When many languages are already onboard, adding another one is more likely to be straightforward when motivation is present. Ivan Kazmenko.
Jul 30 2016