Reputation
1,872
Top tag
Next privilege 2,000 Rep.
Access moderator tools
Badges
6 14
Newest
 code-golf
Impact
~31k people reached

13h
comment Difference of three input integers
{@_∋@_.sum div 2} and {@_∋+~(@_.sum/2)} are both shorter
14h
answered Apply Kirchhoff's law
14h
answered Molding ASCII art
14h
comment Decimal Multiplication of Strings
@edc65 In Perl you can do list repetition then concatenate the elements of that list, which isn't direct string repetition. In Perl 5: join "", ("case") x 2 vs "case" x 2, in Perl 6 [~] "case" xx 2 vs the same "case" x 2
15h
revised Decimal Multiplication of Strings
If I concatenate a longer list, I can return a substr of that instead of doing each separately
15h
revised Decimal Multiplication of Strings
Didn't notice string repetition wasn't allowed
15h
answered Decimal Multiplication of Strings
Feb
5
revised Fibonacci-style matrix expansion
Use Z+ instead of »+«
Feb
5
comment Fibonacci-style matrix expansion
@DigitalTrauma You can also go on the #perl6 channel on freenode.net and use camelia (like this) to run the code (precede lines with m: and a space) You can also msg camelia directly
Feb
5
answered Find the largest and the smallest number in an array
Feb
5
revised Fibonacci-style matrix expansion
fix usage to make it more clear what should be replaced
Feb
5
comment Fibonacci-style matrix expansion
@DigitalTrauma I'm sorry I should have written the usage as my &code = ->\c,\m{ … } to make it clear that the ->\c,\m{ … } needs to be replaced with the code above. I usually use an implicit $_ or @_ or explicit placeholder parameters $^a because they tend to be shorter. I just didn't think about it. Also make sure that you are using a new enough version ( $*PERL.compiler.version !before 2015.12 )
Feb
5
comment Swap the Alphabet
@Doᴡɴɢᴏᴀᴛ I added a note that you can test it on #perl6 on freenode
Feb
5
comment Swap the Alphabet
@Doᴡɴɢᴏᴀᴛ If you notice it says this is written in Perl 6 You can go to #perl6 on freenode and type m: my &swap = {S:g/\w/{chr $/.ord+4+^31}/}; say swap ('a'..'z').join
Feb
5
comment Distance between two points in n-dimensional space
{sqrt [+] ([Z-] $_)»²}
Feb
5
answered Swap the Alphabet
Feb
5
comment Swap the Alphabet
You can use *.trans(…) to make it shorter.
Feb
5
revised Basic Latin character name to character
Test, then save
Feb
5
revised Basic Latin character name to character
It broke because 3 of the characters were invalid
Feb
5
comment Electrical outlet
I fully intended to edit my answer to the very same thing ( see the html comment)