2015.14: Happy easter, enjoy your unsigned types!

Please excuse the delay; turns out the Easter weekend was a bit more busy than I expected it to be, and getting the post out on tuesday wasn’t so successful, either. I hope yours was just as nice as mine, in any case 🙂

I’ll report the changes from the perspective of monday (monyay!) anyway, since otherwise the next weekly might end up looking quite meager 😉

There’s already a few nice things I could have reported post-monday, so stay tuned for next week!

NativeCall improvements and unsignedness all around

NativeCall used to give errors when it found things like “uint” or “uint8” in its argument lists. That has been fixed on both MoarVM and the JVM! For some reason, int64 was also not supported in NativeCall, but it now is. Also, why not use “longlong” or “ulonglong” every now and then? 😉

In other NativeCall news, parameters marked “is rw” (for int and num types) now work! You can have a look at the test file and the corresponding .c file to get a feel for how this works.

We’ll catch you when you fall …

There’s a few more cases where forgetting you’re writing Perl 6 code is gracefully caught by the compiler. For example, starting a file with a “package” declaration, or writing “elseif” or “else if” or “elif”. Now there’s “commatraps” where perl5 allowed writing something like “map { $_ + 5 } 1, 2, 3” where there’s no need to put a comma after the block. Rakudo will remind you of the “Missing comma after block argument to map” if you write code like that.

In addition, something that comes up somewhat often is confusing the Whatever Star with a simple $_. Writing code like “map { * + 5 }, 1, 2, 3” results in a list of three WhateverCode objects, because “* + 5” already means something like “{ $_ + 5 }”, thus turning the whole thing into basically “map { { $_ + 5 } }, 1, 2, 3”. The current error message for that reads “Malformed double closure; WhateverCode is already a closure without curlies, so either remove the curlies or use valid parameter syntax instead of *”. A bit wordy, but I think it helps you towards fixing your code.

Another new error-related feature is that if you get a “Missing or wrong version of dependency of …” error, it’ll now also tell you what exact module had the dependency on the missing thing. This’ll make it much easier to track what you need to recompile/reinstall in order to get things back into working order.

A listy change

TimToady has started “undistinguishing” Parcel and List, so that the two types can become one for the Great List Refactor.

In case you don’t remember, the Great List Refactor is going to make lists (and lists of lists, and itemized lists) and flattening behavior of subs, methods and operators more uniform and easy to remember, but also improve the performance of things like list iteration a whole lot – currently there’s a whole lot of administrative overhead involved in for loops and such …

A performance hit

Sadly, merging the S11 changes that introduce a more database-like way of installing and storing packages made startup quite a bit slower. That’s because we now have a JSON “database” that we have to parse during startup. Sadly, the performance of JSON::Tiny (which is pretty much exactly what we use in CompUnitRepo::Installation) is not terribly good. In the future, the “database” will most likely be precompiled and loading time should be drastically better.

Miscellaneous stuff

There’s of course a few performance improvements again, but nothing mind-blowing this time.

On the ecosystem side of things, there’s a few new modules:

  • overwatch monitors your program’s dependencies and restarts the process if they have changed
  • Pastebin::Shadowcat posts to and retrieves pastes from the pastebin hosted on scsys.co.uk
  • App::Kains is a tool to constrain programs to a namespace-based container on linux
  • EventEmitter adds a coating of sugar on top of Supply to give a subscription interface to any object that allows arbitrary named events to be used

I think that’s most of the things that have happened over the past week; Since I’m already quite late and also running out of energy a little bit, I’ll just end it here. Feel free to leave anything I’ve missed in the comments section below 🙂

Advertisements

One thought on “2015.14: Happy easter, enjoy your unsigned types!

  1. “That’s because we now have a JSON “database” that we have to parse during startup.” Then just embed libsqlite and use native SQL database, instead of that overhyped shitty JSON. You’ll get best performance and ease of use.

Got something to note?

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s