#1339 Fantom on langref.org

katox Mon 29 Nov 2010

There is a cool site langref.org that contains simple programming problems and their solutions in popular languages.

Fantom was missing among other contenders so I applied for an addition. Fortunately site admins are cool guys so Fantom got a nice fantom-blue box for its own code samples.

I submitted some initial code. It'd be nice if you went through it and suggested better/shorter/more idiomatic solutions or report bugs. It is possible to submit more than one solution to each problem so if you had an alternative approach don't hesitate to add it too.

Hopefully it'll also point passers-by and googlers to fantom.org direction!

brian Mon 29 Nov 2010

Very cool, thanks for posting all those!

I took a quick look over the examples, and the Fantom code all looks pretty good. Looks like Fantom handles most of those tasks well.

rfeldman Mon 29 Nov 2010

Interestingly, given the timing one of their seven unsolved problems in Fantom is:

Initialise a random number generator with a seed and generate five decimal values. Reset the seed and produce the same values.

Also, theoretically the "Subdivide A Problem To A Pool Of Workers (Shared Data)" one should be elegantly handled by Actors. (That said, it looks fairly time-consuming to implement.)

Cool stuff!

katox Mon 29 Nov 2010

I picked the lower hanging fruit. Writing the rest of concurrency solutions is left as an exercise for the reader.

Login or Signup to reply.