Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code commentary. #1

Open
thundergnat opened this issue Dec 28, 2015 · 1 comment
Open

Code commentary. #1

thundergnat opened this issue Dec 28, 2015 · 1 comment

Comments

@thundergnat
Copy link

hakunator.pm6 content: I am not too sure about a few of the words in your lists; 'shinny' is not an adverb, it is a verb. Probably should be shiny. 'hushy' seems to be a slang term. 'hola' is not a noun.

hakunator.pm6 code: Not too bad. A little verbose perhaps. Certainly not taking advantage of many Perl 6 idioms. Take a look at https://gist.github.com/thundergnat/fa1dcae2393c89120c4f for how I would have written it. (Feel free to use or ignore any/all of the changes I made)

In 010-use.t: (\N** 4 ) is looking for any 4 characters that aren't newlines. Probably want (\xdigit ** 4 ) instead. ( 4 hexadecimal digits).

([<[a..z]><[a..z]>+]) may be better written as (<[a..z]> ** 2 .. ) or just <[a..z]> * 2 .. * if you aren't using the matches for anything.

There isn't any \n added in the haikunate routine so it is pointless to check for optional newlines. '\n?'

Other than that, not too bad. Thanks for contributing! »ö« :-)

@Atrox
Copy link
Owner

Atrox commented Dec 29, 2015

Wow, your code looks way cleaner. I will definitely update my code with your version.
In terms of Regex you are right. I just put this together yesterday and I had to get the hang out of it.

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants