January 2016 Archives

Introducing Scheme in Perl 6

Introducing Scheme in Perl 6: https://github.com/drforr/perl6-Inline-Guile

This is very much in its early days, and the interface is likely to change as I find the method(s) in the Guile library that I need. Specifically once I can figure out how to portably crack into a SCM return value the need for separate _i and _s functions should go away. Perl 6 is perfectly capable of making the distinction, but it's a segfault waiting to happen from C should I get the return values wrong.

Also I need to cleanly dispose of the returned string, as it is it'll leak memory.

Roman Numerals in Perl 6

perl6-slang-roman lets you write your Perl 6 code using Roman numerals:

use Slang::Roman

sub conjunctivus( Int $a, Int $b ) { $a + $b }
say conjunctivus( 0rIV, 0rVI );
# 10

And by the way, yes, it's fully Unicode compliant, so you can even write your numbers with \c[ROMAN NUMERAL ONE HUNDRED THOUSAND]. There's apparently a method of adding overbars to your Roman numerals that extends their range into the millions and beyond, but I think that I probably should leave well en…

Bottoms Up

As a followup I just finished Bottoms Up where I walk through a tiny but complete grammar for a small corner of PHP code.

Perl 6 grammars redux

http://theperlfisher.blogspot.ro - Just published a new article on grammars in Perl 6 (And yes, the blog title is a play on a Georges Bizet opera.)

About DrForr

user-pic I blog about Perl.