While playing with some strings I realized that I really wanted strings to do the Positional role. When I’m inspecting or modifying strings I’m often doing things based on positions […]
Read moreAuthor: brian d foy
Quick Trick: Catching a Perl 6 warning
While testing a module I wanted to check that a deprecation warning shows up. Warnings are a special sort of exception that you can catch in a CONTROL block.
Read moreConverting numbers to strings the hard way
Turning numbers into strings can be a big waste of time and money. Paul Khuong wrote about this in How to Print Integers Really Fast (With Open Source AppNexus Code!). […]
Read morePlaying with Heap’s Algorithm
I implemented Heap’s algorithm, which generates all permutations of a list, in Perl 6. It’s the end of the year and I’m cleaning out all the things I marked to […]
Read moreTwo ways to change multiple hash values at the same time
Somehow I ended up a binary assignment with the zip operator: $giver<wallet given> Z+= (-$amount, $amount)
Read moreHow you average numbers doesn’t matter
Perl 6 averages “floating point” numbers correctly. That’s an interesting statement because it seems like it should be obvious and expected. However, people around computers long enough are used to […]
Read moreDon’t use < in programming
I don’t actually mean that you shouldn’t use <, but I’m playing off Don’t use the greater than sign in programming. That post from Lewellyn Falco reminded me of a […]
Read moreRakudo in Chocolatey makes AppVeyor easier
Rakudo is now easier to install on Windows. Rakudo Star is now in Chocolatey (with 2017.04 awaiting moderation as I write this). This makes it much easier to automatically deploy […]
Read moreAs many digits as you like
I was playing with arbitrary precision rational numbers in Perl 6, irrationally perhaps by playing with the natural base, e, also known as Euler’s Number. That’s a builtin value in […]
Read moreThe 24 Puzzle, in Perl 6, using Channels and Promises
Mark Jason Dominus solved the 24 Puzzle in Perl, then explicated some non-Perl solutions other people sent him. RJBS tried it in Forth. I’ve been meaning to try it in […]
Read more