2017.06 Fosdem After Math

This Weekend the FOSDEM conference happened in Brussels, Belgium. There was, like every time, a Perl table with lots of books, stickers, plush camels and camelias and other lovely stuff run by Liz and Wendy. There was also a Perl Programming Language Devroom where multiple Perl 6 related Talks took place.

You can get the video recordings from the fosdem server, but also have a look at the video status overview to see what videos still need to be processed.

Yours truly (timo this time) didn’t attend fosdem, but I heard good things about the conference from those Perl 6ers who did. And of course I watched a bit of the live stream. I enjoyed Dana Jacobsen talk about simple number theory in Perl 6. At the time of writing, the recording hasn’t been put up yet, though. (This is also where I took the inspiration for the title from).

Rakudo Progress

  • Jnthn fixed some trouble with handling connection errors from sockets, where an exception being thrown caused MoarVM to longjmp past a bunch of libuv frames that were supposed to clean up some stuff. Oops!
  • Zoffix Znet fixed the implementation of the native integer division op in MoarVM’s interpreter portion. Yours truly happened to implement it incorrectly very early on in MoarVM’s life and nobody ever checked that it handles numbers beyond 32bit correctly. Ouch!
  • Samantha McVey made MoarVM’s radix ops (i.e. parse a string that contains a number) a bunch faster by having it check for the unicode property “numeric type” rather than checking the general category.
  • Samantha McVey also made the East Asian Width property of unicode codepoints available.
  • Samantha McVey also did a bunch of work to make comparing/sorting unicode strings more featureful, by implementing Collations (four different levels that can individually be turned on and off) and a corresponding “coll” infix operator. There’s also a unicmp operator that isn’t configurable, but currently it’s hidden behind “use experimental :unicmp”.
  • MasterDuke17 made sure that not only nqp::radix_I would be accepted by the JIT, but that nqp::radix would also be considered for jitting.
  • There was some trouble with a very specific situation in Grammars would cause a bogus NFA to be generated that caused an out-of-bounds memory read when executed. Not only was the out-of-bounds read fixed (by giving an error much earlier) but the part of code that was responsible for creating the bogus NFA was also fixed to behave The Right Way™. Thanks, Jnthn!
  • pmurias did the usual assortment of work on nqp’s javascript backend, containing a bunch of test cases for nqp:: ops and QAST semantics, and a bunch of features required by rakudo on javascript.
  • lizmat landed a whole lot of array/list and iterator-related speedups:
    • @b = @a.map: { } about 10% faster
    • @b = do for @a { } about 20% faster
    • for @a { … } about 1% faster
    • my @b = @a.map: -> \a,\b { } about 15% faster
    • for @a -> \a, \b { } about 2% faster
    • gave List and Array their own tail method, where .tail is 8x as fast as [*-1], and .tail(N) is about 16x as fast as [*-N .. *-1]
    • Arrays that are already fully reified (i.e. there is no iterator to generate more values at the end any more) now have their own class of iterators that goes through the array a bunch faster, and also improves things like getting the number of elements.
  • Samantha McVey also did a few more nice things for performance, by giving the <ws> token a few improvements leading to about a 5% parse time improvement for our core setting, and also by making uniprop, unimatch, and unival up to 2x faster.
  • Zoffix Znet made Complex numbers smartmatch to Ranges, which only works if the imaginary part is close enough to 0 to not matter (i.e. artifacts of floating point arithmetic and such).
  • MasterDuke17 fixed a performance problem when you have “some constant string” x $a-very-big-constant-number in your code. It previously constant-folded the result of that operation, leading to a very big string being written out as a latin1 encoded buffer into the compilation result, just to immediately be read back out again when compile time transitioned into runtime.
  • MasterDuke17 also replaced a few occurrences of [*-1] in Rakudo’s source with the much faster .tail() method.
  • Thanks to Zoffix Znet, the REPL will now no longer complain at you and crash when some command you run evaluates to a Mu.
  • AlexDaniel improved the error you’d get when you write “return” instead of “returns” in a function signature.
  • Jonathan Stowe fixed a problem where multiple installed binaries in a CompUnitRepo could give you an older version rather than the latest one.
  • Larry Wall removed the dynamic variable $*ACTIONS that was used to hold the action class that’s being used to parse with a given grammar. It is now held as an attribute on the Cursor instead. This reduces the pressure on the already strained Dynamic Variable Cache a little bit.

Ecosystem Changes

Not very much happened to Perl 6′ module ecosystem last week:

  •  The Net::XMPP module was taken over by kalkin, who is engaged in the XMPP community.
  • nobodyinperson started working on a Fortran::Grammar.

Hacker News

Just about 10 hours ago, a topic entitled “Ask HN: Do you use it, how do you like it, what do you do with it?”, which already got 156 points and 129 comments on Hacker News. It’s well worth a read!

Signing Off

That’s my report for the last week. Liz is currently taking a vacation, so I’ve taken over for this week, and will also write the report next week. See you then!

Got something to note?