www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - D scored well in the Google CodeJam Qualification Round

reply Somedude <lovelydear mailmetrash.com> writes:
Although there was very few D contestants (only 15 out of 18365
contestants used D), D scored number 1.

http://go-hero.net/jam/?repost2012

It was only the qualification round, and admittedly, 3 out of 4 problems
were not extremely interesting.

Still, congrats to hos.lyric, - whoever that is (Kenji ?) -, who managed
to submit a perfect solution in 1h55, more than 46 mn before the rank 2.
Apr 16 2012
next sibling parent reply "Steven Schveighoffer" <schveiguy yahoo.com> writes:
On Mon, 16 Apr 2012 09:31:34 -0400, Somedude <lovelydear mailmetrash.com>  
wrote:

 Although there was very few D contestants (only 15 out of 18365
 contestants used D), D scored number 1.

 http://go-hero.net/jam/?repost2012

 It was only the qualification round, and admittedly, 3 out of 4 problems
 were not extremely interesting.

 Still, congrats to hos.lyric, - whoever that is (Kenji ?) -, who managed
 to submit a perfect solution in 1h55, more than 46 mn before the rank 2.

This is cool! I still have my google code jam T-shirt from '03 when it was done through TopCoder. I'm glad D is getting some traction there. I would caution however, from my past experience, that looking at how well one language does vs. another is extremely subjective -- really good coders can do really well no matter what language they use. But what *is* important is that a really good coder chose D for his/her language. That gets people interested. -Steve
Apr 16 2012
parent Somedude <lovelydear mailmetrash.com> writes:
Le 16/04/2012 15:51, Steven Schveighoffer a écrit :
 On Mon, 16 Apr 2012 09:31:34 -0400, Somedude
 <lovelydear mailmetrash.com> wrote:
 
 Although there was very few D contestants (only 15 out of 18365
 contestants used D), D scored number 1.

 http://go-hero.net/jam/?repost2012

 It was only the qualification round, and admittedly, 3 out of 4 problems
 were not extremely interesting.

 Still, congrats to hos.lyric, - whoever that is (Kenji ?) -, who managed
 to submit a perfect solution in 1h55, more than 46 mn before the rank 2.

This is cool! I still have my google code jam T-shirt from '03 when it was done through TopCoder. I'm glad D is getting some traction there. I would caution however, from my past experience, that looking at how well one language does vs. another is extremely subjective -- really good coders can do really well no matter what language they use. But what *is* important is that a really good coder chose D for his/her language. That gets people interested. -Steve

Indeed, some really good coders could do it in any language. From reddit, "I submitted a polyglot program in vim, dc, brainfuck, bash, bc, php, whitespace, c, c++, befunge-98, golfscript, python3 and ruby. The first seven languages were for the contest problems, befunge doesn't do much, and the mainstream languages (+golfscript) are all quines. http://www.go-hero.net/jam/12/name/Nabb " And this guy still managed to rank 73rd.
Apr 16 2012
prev sibling next sibling parent "mist" <none none.none> writes:
IMHO this is worth D.announce :)
Apr 16 2012
prev sibling next sibling parent reply "bearophile" <bearophileHUGS lycos.com> writes:
Somedude:
 Although there was very few D contestants (only 15 out of 18365
 contestants used D), D scored number 1.

This is very good advertisement for D. A D user (group) has to reach a good score in the ICFP Programming Contest too :-) And why is D so popular in Japan? :-) Bye, bearophile
Apr 16 2012
parent Somedude <lovelydear mailmetrash.com> writes:
Le 18/04/2012 12:16, Masahiro Nakagawa a écrit :
 On Monday, 16 April 2012 at 14:02:21 UTC, bearophile wrote:
 Somedude:
 Although there was very few D contestants (only 15 out of 18365
 contestants used D), D scored number 1.

This is very good advertisement for D. A D user (group) has to reach a good score in the ICFP Programming Contest too :-) And why is D so popular in Japan? :-)

We supports D newbies in many scenes. See this reply http://forum.dlang.org/thread/CAJ85NXCWkmo0y8cSZz+mtq+x3Kxv7-eJ6Gw4XDier=E+Ti-q-Q mail.gmail.com#post-xkrxexychkfodzrfgkgh:40forum.dlang.org In my personal activities, I talked about D in some meetups, e.g. D Kaigi, RubyKaigi, Kernel/VM, Boost.meetup, LL Nagoya, and etc. In addition, kinaba sometimes talked about D and wrote the blog titled "D for contest programming" recently.

That's cool, there should be a translation of this blog post. It may attract some more coders to D. :)
Apr 18 2012
prev sibling next sibling parent "SomeDude" <lovelydear mailmetrash.com> writes:
On Monday, 16 April 2012 at 14:02:21 UTC, bearophile wrote:
 Somedude:
 Although there was very few D contestants (only 15 out of 18365
 contestants used D), D scored number 1.

This is very good advertisement for D. A D user (group) has to reach a good score in the ICFP Programming Contest too :-) And why is D so popular in Japan? :-) Bye, bearophile

I dunnow, but Japan Superior when it comes to speed coding. Last year's winner was a Japanese, and here, the two top contenders are also Japanese. Looking at last year's stats, hos.lyric didn't fare too badly, but he failed to get to the final. Hope he'll continue to bear the D colors high, the Force is strong in this one. :)
Apr 16 2012
prev sibling next sibling parent "bearophile" <bearophileHUGS lycos.com> writes:
Steven Schveighoffer:

 I would caution however, from my past experience, that looking 
 at how well one language does vs. another is extremely 
 subjective -- really good coders can do really well no matter 
 what language they use.

But the "Hall of Mirrors"-large Haskell solution by tmoHaskell is elegant: http://codepad.org/bxf3CYwW http://www.go-hero.net/jam/12/name/tmoHaskell That contains simple usage of pattern matching on values: nextCell :: Hall -> (Int,Int) -> (Int,Int) -> (Ratio Int,Ratio Int) -> Maybe ((Int,Int), (Int,Int), (Ratio Int,Ratio Int)) nextCell hall (vx,vy) (ix,iy) (x,y) = do ((vx',ix',x'),(vy',iy',y')) <- case (x,y) of (0,0) -> corner (-1) (-1) (0,1) -> corner (-1) 1 (1,0) -> corner 1 (-1) (1,1) -> corner 1 1 (0,_) -> hitHorizontal (-1) (1,_) -> hitHorizontal 1 (_,0) -> hitVertical (-1) (_,1) -> hitVertical 1 return ((vx',vy'),(ix',iy'),(x',y')) Switch on structs are useful: http://d.puremagic.com/issues/show_bug.cgi?id=596 (1,_) -> hitHorizontal 1 becomes something like: case tuple(1,void): r = hitHorizontal(1); break; Or: case tuple(1,_): r = hitHorizontal(1); break; ------------------------ One Scala solution to the "Speaking in Tongues" contains: val map = new TreeMap[Char, Char] " abcdefghijklmnopqrstuvwxyz".zip(" yhesocvxduiglbkrztnwjpfmaq").foreach(x => map.put(x._1, x._2)) That in Python you write with just:
 dict(zip(" abcdefghijklmnopqrstuvwxyz", " 
 yhesocvxduiglbkrztnwjpfmaq"))



It's handy to have a similar AssociativeArray from pairs iterable in Phobos too (or even in object). Bye, bearophile
Apr 16 2012
prev sibling next sibling parent "Kagamin" <spam here.lot> writes:
On Monday, 16 April 2012 at 13:31:32 UTC, Somedude wrote:
 Although there was very few D contestants (only 15 out of 18365
 contestants used D), D scored number 1.

 http://go-hero.net/jam/?repost2012

http://www.go-hero.net/jam/12/name/Soultaker lol, COBOL
Apr 16 2012
prev sibling next sibling parent "bearophile" <bearophileHUGS lycos.com> writes:
Somedude:
 Although there was very few D contestants (only 15 out of 18365
 contestants used D), D scored number 1.

This D solution of the "hall of mirrors" (modified from C++ code) is about 3.5 times faster on the large dataset than hos.lyric solution. No GC required, stack allocation wins: http://codepad.org/TZwGLGjV Bye, bearophile
Apr 16 2012
prev sibling next sibling parent "David Nadlinger" <see klickverbot.at> writes:
On Monday, 16 April 2012 at 13:31:32 UTC, Somedude wrote:
 Although there was very few D contestants (only 15 out of 18365
 contestants used D), D scored number 1.

 http://go-hero.net/jam/?repost2012

A direct link to the problems: https://code.google.com/codejam/contest/1460488/dashboard David
Apr 17 2012
prev sibling next sibling parent "Masahiro Nakagawa" <repeatedly gmail.com> writes:
On Monday, 16 April 2012 at 13:31:32 UTC, Somedude wrote:
 Although there was very few D contestants (only 15 out of 18365
 contestants used D), D scored number 1.

 http://go-hero.net/jam/?repost2012

 It was only the qualification round, and admittedly, 3 out of 4 
 problems
 were not extremely interesting.

 Still, congrats to hos.lyric, - whoever that is (Kenji ?) -, 
 who managed
 to submit a perfect solution in 1h55, more than 46 mn before 
 the rank 2.

Yeah! hos.lyric is a great coder. He is a university student, not Kenji.
Apr 18 2012
prev sibling parent "Masahiro Nakagawa" <repeatedly gmail.com> writes:
On Monday, 16 April 2012 at 14:02:21 UTC, bearophile wrote:
 Somedude:
 Although there was very few D contestants (only 15 out of 18365
 contestants used D), D scored number 1.

This is very good advertisement for D. A D user (group) has to reach a good score in the ICFP Programming Contest too :-) And why is D so popular in Japan? :-)

We supports D newbies in many scenes. See this reply http://forum.dlang.org/thread/CAJ85NXCWkmo0y8cSZz+mtq+x3Kxv7-eJ6Gw4XDier=E+Ti-q-Q mail.gmail.com#post-xkrxexychkfodzrfgkgh:40forum.dlang.org In my personal activities, I talked about D in some meetups, e.g. D Kaigi, RubyKaigi, Kernel/VM, Boost.meetup, LL Nagoya, and etc. In addition, kinaba sometimes talked about D and wrote the blog titled "D for contest programming" recently.
Apr 18 2012