The MAIN Thing

If you're coming to Perl 6 from Perl 5, the global variable  @*ARGS will be familiar to you as the place to get the command-line arguments to your program:
$ cat main1.pl6
#!/usr/bin/env perl6

put "ARGS = ", @*ARGS.join(', ');
[saguaro@~/work/perl6/main]$ ./main1.pl6 foo bar baz
ARGS = foo, bar, baz
The @ is the sigil that denotes the variable as an array, and the * is the "twigle" that denotes that the variable is a global.  If you follow the above link to the documentation, you'll find a whole host of other dynamic and environmental variables like user, hostname, PID, cwd, etc. Dealing directly with @*ARGS is fine your program accepts a few positional arguments where the first argument means one thing (name), the second argument another thing (rank), the third another (serial number), etc:
$ cat main2.pl6
#!/usr/bin/env perl6

my ($name, $rank, $serial-num) = @*ARGS;
put "name ($name) rank ($rank) serial number ($serial-num)";
$ ./main2.pl6 Patch Private 1656401
name (Patch) rank (Private) serial number (1656401)

C::Blocks Advent Day 6

This is the C::Blocks Advent Calendar, in which I release a new treat each day about the C::Blocks library. Over the last few days I have illustrated how to use C::Blocks to write procedural code, how to get data across the Perl/C divide, including using types to do that concisely, and how to write code that is shared across modules and scripts. Yesterday I provided some benchmarks that I hope give a sense for the performance of C::Blocks, and start to indicate the circumstances when it might be useful. Today I am going to illustrate the many ways you can generate and/or modify your C code using C::Blocks including source filters, interpolation blocks, and the good old string eval.

Rakudo.js update

I have added support for uncached methods (ones that are looked up dynamically by find_method on the metaclass instance rather then set by nqp::setmethcache) by putting an ES6 Proxy inside of our prototype chain.

It's the first use of ES6 that isn't merely a convenience as I don't know of a way to do it without that without introducing a serious performance penalty.
Nqp-js has been refactored to use instances of a class with a VMArray repr instead of a custom JS class wrapping array.
After figuring out I need to pass the --max-old-space-size option to node (which stops node.js from aborting rakudo.js if it does a gc run and judges that we use more memory then we deserve even if we have free RAM around), rakudo.js finally compiled the full setting.

Perl 5 Porters Mailing List Summary: December 1st-7th

Hey everyone,

Following is the p5p (Perl 5 Porters) mailing list summary for the past week.


C::Blocks Advent Day 5

This is the C::Blocks Advent Calendar, in which I release a new treat each day about the C::Blocks library. Yesterday I showed how to declare and share C functions, which I think is C::Blocks’ killer feature. Today I will show some simple benchmarks that illustrate the performance of C::Blocks-compiled code.

Sorry that this Fifth Advent entry is being posted on the Seventh day of December! I got some really weird benchmark results and it took a while to really dig through them and figure out what was going on. I’ll have to work double-time for the next few days to get caught back up!

My first ever talk at London Perl Workshop 2016

On the day of the event, I reached the center at about 8:45 am with plenty of time to go through the registration procedure. I have been attending the London Perl Workshop for the last 4 years. But this year was little special as I was giving a talk, thanks to Neil Bowers. In fact he helped me prepare the notes and sharing his own experiences.

I was assigned "Room 2" for my talk. When I got there I realised that I didn't have the right connector to connect my laptop with the big screen. Dave Cross was also giving a talk in the same room and he suggested I talk to Mark Keating. Luckily, Mark had spare connector for me. I was sorted and ready to go. I still had 3 hours before my talk, so I attended the talk by Dave Cross about what new features added to perl.

Little Bugs

Sometimes littlest bugs can really get on your nerves


Though not as much as the little critter above.

All started with a little module I wanted to upload to CPAN, well I did all the right things, test suite, manifest, makefile, POD coverage etc. I just wanted to do one test install on a clean box so I used my own Windblows PC.

Well it unzipped fine, passed its tests and installed with no problems. Great let see if it works

 d:\test perl
d:\test Use of uninitialized value $template in split at /usr/local/share/perl/5.18.2/Mojo/ line 151,  line 2231.
  [exist] d:\test
  [write] d:\test\RoutesRestfulCode
d:\test Use of uninitialized value $template in split at /usr/local/share/perl/5.18.2/Mojo/ line 151,  line 2231.

Aggh what is the above, this worked fine on Linux??

I must of buggered up my templates somehow but they are only a few lines

GitPrep v2.5 released today. Theme color become dark blue.

GitPrep v2.5 released today. Theme color become dark blue.

Let's try GitPrep example.

I'm going to implement "wiki" in next release!

About is a common blogging platform for the Perl community. Written in Perl and offering the modern features you’ve come to expect in blog platforms, the site is hosted by Dave Cross and Aaron Crane, with a design donated by Six Apart, Ltd.