Perlito5 now supports calling Perl subroutines from Java.
For example, a Perl module was compiled to "Main.java", and it can be called using:
class TestPerl {
public static void main(String[] args) throws Exception {
// initialize the Perl module - setup global variables
// and create the subroutine entries
Main.init();
// locate the subroutine main::test
// and call it with an argument list
// that is: @res = main::test(123)
PlObject[] res = Main.apply("main::test", new String[]{ "123" });
// do something with the results
for (PlObject s: res) {
System.out.println("Java result: " + s.toString());
}
}
}
"Top-down parsing is guessing"
is my newest blog post. Top-down is the most flexible of parsing methods -- you can add anything else to it. And you have to, because pure top-down parsing is, literally, guessing.
Thanks to @VMBrasseur on Twitter and IRC, several people this year decided to submit Perl (and especially Perl 6) content for OSCON 2016. The talk announcements won't be made until December 25th (I personally submitted two, and I know of at least 4 others who submitted), but I'm pleased to announce that one of the 3-hour tutorials at Austin will be an "Introduction to Perl 6", led by yours truly.
It's been so many times when I wrote about swat and sparrow - a tool-chain for rapid web test automation development .
Well, it's time to represent a SparrowHub - a central repository of sparrow plugins.
About swat and sparrow in few words.
SWAT
Swat - is a web test automation framework for quick and simple web test development. There are a plenty of documentation at swat project page HOW to write swat test suites and a lot examples as well.
SPARROW
Sparrow was designed as evolution for swat related development. Sparrow provides infrastructure for swat related projects. It means you could orchestrate and manage various swat tests and run them as well against dedicated web services. Right now it's quite simple console client with ordinary, naive look but I have a bigger plans for it ;-)
We're pleased to announce the release of DBD::mysql 4.033_01, the Perl DBI driver for MySQL and MariaDB databases. This is not a 'stable' release but merely for testing and feedback. We'll put out a stable 4.034 release soon; probably before christmas.
Linking against SSL by default?
Apart from that, I'd like to announce that we might want to link to
SSL by default. MySQL 5.7 makes SSL connections to databases more
common; right now in DBD::mysql you'd need to pass an option to
Makefile.PL (--ssl) in order to enable linking to libssl. Of course,
many people (and linux distributions!) don't do this by default. On
the expense of the added dependency to libssl we'd want to default to
compiling against libssl. We'd introduce a --nossl flag for the cases
where you'd explicitly NOT want to link to SSL. When DBD::mysql is
compiled against libssl you can still make connections to not-sslified
servers.
Any feedback (+1's, remarks or objections) would be appreciated!
My talk from this months SydneyPM. Wherein I install OpenWRT on to an inexpensive TP-Link pocket router, install perl and attempt to smoke CPAN.
I also introduce OpenWRT in possibly too much detail, and dont really explain what smoking CPAN is.
Exception::Stringy - Modern exceptions for legacy code
A small recap of Perl exceptions
Basic Usage Of Exceptions
In Perl, exceptions are a well known and widely used mechanism. It is an old
feature that has been enhanced over time. At the basic level, exceptions are
triggered by the keyword die. Exceptions were initially used as a way to stop
the execution of a program in case of a fatal error. The too famous line:
open my $fh, $file or die "failed to open '$file', error: $!";
is a good example.
The original way to catch exceptions in Perl has a somewhat strange syntax,
it's based on the eval keyword and the special variable $@:
eval { code_that_may_die(); 1; }
or say "exception has been caught: $@"
I was surprised to see there aren't any 256colors scripts installable from the CPAN. I have one I've been using locally for awhile, so I turned it into a proper module and uploaded it as App::256colors (first!).
Compared to the many other 256colors scripts floating around the internet, this one will print 256 color codes in both integer and hex/rgb format, which can be useful depending on what you're tweaking (e.g. Xdefaults vs PS1). I also think the output format is pretty nice (although I may be biased :) )
Based on the size of your terminal it will wrap the column output accordingly, as well as invoke the less pager with suitable options if the terminal is too small to display all the codes.
It's a pretty simple script, but I've found it invaluable for getting my color schemes "just right."
We can has shirts! Grab one tomorrow for AUD$30 or contact us for shipping etc. (Thanks CSW for the rush order)
Front
Back
We have no Raptors in Australia, so settled on the Australovenator - which is as real and factual as anything on wikipedia.
Speakers:
Lloyd Fournier - getting started with perl 6
Kieren Diment - TBD
Myself - Perl and OpenWRT
Jim Donovan (Lightning Talk) - Skills required nowadays in the Perl5 environment
Location: Date: Wednesday, 16th December 2015
Time: 6-9pm
Place: Ooyala and Telstra Software Group Office, Level 9, 175 Liverpool St, Sydney
Best train station: Museum seems best, followed by Town Hall
The London Perl Workshop 2015 was the first workshop in a long time where I did not present a talk. This left me free to listen to the talks without worrying about my slides or wanting to go through my demo one more time. So, without further ado, here's my retrospective of the talks I saw:
[This is a post in my latest long-ass series. You may want to begin at the beginning. I do not promise that the next post in the series will be next week. Just that I will eventually finish it, someday. Unless I get hit by a bus.
IMPORTANT NOTE! When I provide you links to code on GitHub, I’m giving you links to particular commits. This allows me to show you the code as it was at the time the blog post was written and insures that the code references will make sense in the context of this post. Just be aware that the latest version of the code may be very different.]
Last time I actually got down to it and wrote some code: Date::Easy now has a date constructor for turning arbitrary human-readable strings into date objects. Now it’s time to expand on that and allow even more formats.
My
latest blog post
looks at a grammar reuse, comparing regular expressions, PEG, Perl 6 grammars and general BNF parsers, including Marpa. A good property to have in itself, grammar reusability is crucial if a parser is going to be the basis for language-driven programming.
I released Validator::Custom 1.01. More simple and more flexible interface is added.
Document is rewrited completely. Backword compatible is kept completely.
Checking functions and filtering functions is added. You can use these in your source code.
A validation object which save the result of validation is added.
Usage
You can use checking function and filtering functions. The validation result is saved to the validation object. You don't need to learn complex things.