digitalmars.D - Fw: Rosetta Code seeks programming examples
- BCS (1/18) Jan 17 2008
- bearophile (11/13) Jan 18 2008 And most of them are from me, I presume.
- BCS (4/6) Jan 18 2008 looking at the page, one jumped out at me, "Greatest common divisor". I,...
- badmadevil (24/41) Jan 21 2008 Hi, I'm just a noob ^^
- naryl (3/5) Jan 25 2008 Looks like the current solution does something wrong with precedence and...
Michael postedI run a website called Rosetta Code, where the general idea is to demonstrate how to do similar things in as many programming languages as possible. Solutions in different languages are shown side-by-side, to allow comparisons to be drawn to people familiar with one language, but unfamiliar with another. At the time of this writing, there are 16 examples written in D, out of 121 established tasks. That's only 13%. The main website url is http://rosettacode.org You might find these pages interesting as well: http://rosettacode.org/rosettacode/w/index.php?title=Category:Solution s_by_Programming_Task http://rosettacode.org/rosettacode/w/index.php?title=Category:Solution s_by_Programming_Language
Jan 17 2008
BCS:And most of them are from me, I presume. There is the codecodex.com site too, and it looks more interesting than the rosettacode site, I have written D & Python code for both sites: http://www.codecodex.com/wiki/index.php?title=Main_Page At the moment the codecodex.com site doesn't have a category for D, despite I have added many D implementations, some examples: http://www.codecodex.com/wiki/index.php?title=Convert_text_to_Morse_Code http://www.codecodex.com/wiki/index.php?title=Selection_sort http://www.codecodex.com/wiki/index.php?title=Shell_sort I think such sites, like the Shootout, are good to make a language more known. I think the Haskell community takes them "seriously" enough. Bye, bearophileAt the time of this writing, there are 16 examples written in D, out of 121 established tasks. That's only 13%.
Jan 18 2008
At the time of this writing, there are 16 examples written in D, out of 121 established tasks. That's only 13%.looking at the page, one jumped out at me, "Greatest common divisor". I, just last night, did that one as a template as part of some compile time work with rational numbers. I wonder what "programming language" heading that would fall under
Jan 18 2008
bearophile wrote:BCS:Hi, I'm just a noob ^^ I don't know who coded the D version of Arithmetic Evaluator. I think it has bug. http://rosettacode.org/rosettacode/w/index.php?title=Arithmetic_Evaluator test: writefln(calculate("(3+50)*7-9"), ", ", (3+50)*7-9); writefln(calculate("(3+50)*7-9-1"), ", ", (3+50)*7-9-1); writefln(calculate("1+2"), ", ", 1+2); writefln(calculate("1+2+3"), ", ", 1+2+3); writefln(calculate("1+2+3+4"), ", ", 1+2+3+4); writefln(calculate("1+2+3+4+5"), ", ", 1+2+3+4+5); writefln(calculate("1+2+3+4+5+6"), ", ", 1+2+3+4+5+6); writefln(calculate("1+2+3+4+5+6+7"), ", ", 1+2+3+4+5+6+7); output: 362, 362 362, 361 3, 3 3, 6 7, 10 7, 15 13, 21 13, 28 peace~And most of them are from me, I presume. There is the codecodex.com site too, and it looks more interesting than the rosettacode site, I have written D & Python code for both sites: http://www.codecodex.com/wiki/index.php?title=Main_Page At the moment the codecodex.com site doesn't have a category for D, despite I have added many D implementations, some examples: http://www.codecodex.com/wiki/index.php?title=Convert_text_to_Morse_Code http://www.codecodex.com/wiki/index.php?title=Selection_sort http://www.codecodex.com/wiki/index.php?title=Shell_sort I think such sites, like the Shootout, are good to make a language more known. I think the Haskell community takes them "seriously" enough. Bye, bearophileAt the time of this writing, there are 16 examples written in D, out of 121 established tasks. That's only 13%.
Jan 21 2008
badmadevil Wrote:I don't know who coded the D version of Arithmetic Evaluator. I think it has bug.Looks like the current solution does something wrong with precedence and calculates addition and subtraction right to left... and then again left to right. "(3+50)*7-9-1" is calculated like (3+50)*7-(9-1)-1
Jan 25 2008