NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.
All the Perl that's Practical to Extract and Report
Stories, comments, journals, and other submissions on use Perl; are Copyright 1998-2006, their respective owners.
Syntax highlighted hangman (Score:1)
Great work. Here is the same code in different formats generated using Syntax::Highlight::Perl6 [cpan.org].
HTML with tree viewer (needs JavaScript) [perl6.nl]
Snippet HTML (No JavaScript) [perl6.nl]
Note: i modified line 15 to be STD-parsable.
Parens (Score:1)
Nice script.
You've liberated yourself from the parens in
ifstatements and loops. Good work.Now liberate yourself from the parens around the rvalue in array assignments.
my @a = 1,2,3;FTW.Iterating over indices is so Perl5ish… (Score:1)
Take this f.ex.:
In Perl 6 you write this like so:
Although I don’t know why you don’t simply say this:
The resulting simplification should be obvious. Maybe yo
Misspelled (Score:2)
It's "Mississippi".
Or as my momma taught me: "Eme eye crooked letter crooked letter eye crooked letter crooked letter eye humpback humpback eye".
Now I have actually read the code (Score:1)
I didn’t do so immediately because of the large amount of code, which seemed somewhat shocking for something like Hangman. Now that I have read it… who are you and what have you done with Ovid?
Seriously – I am now even more shocked to see you of all people produce a God object. The way you’ve designed the class, it’s impossible to test or use any of the functionality in isolation. So I wonder why you used a class at all?
Re: (Score:2)
I wasn't too worried about producing particularly good or reusable code here, I just wanted to see what I could do with Rakudo. Oddly, I also thought that it would be a much smaller bit of code. Your turn to write hangman ... :)