Functional fun with logical expressions
Here's a quickly thrown-together version of "Fun with logical expressions", written in Haskell:
Here's a quickly thrown-together version of "Fun with logical expressions", written in Haskell:
Part II of a series on Apache's mod_rewrite.
http://openbedrock.blogspot.com/2015/04/using-apaches-swiss-army-knife_6.html
The M4 language is a powerful macro processor, turing complete as well as a practical programming language. It is the core tool behind GNU Autoconf, in particular.
MarpaX::Languages::M4 package is a Marpa::R2/Moops powered implementation of it, 99% with the GNU M4 version ([1]) and have switches to alter its behaviour as wanted, so that one can have e.g. POSIX M4 as well.
MarpaX::Languages::M4 is distributed with an m4pp
command-line, with all the GNU M4 implementation options, plus some other handy items, for example:
and some "advanced" options to alter the behaviour or extend M4 as you wish:
Addendum 2: This set of rules is incomplete. See Fun with logical expressions 2 for an improved version.
Addendum: I've written a more or less equivalent Haskell version of this program.
Some programmers, when confronted with a boolean expression, think "I know, I'll use regular expressions". Now they have
true
problems.
This post was inspired by the TAUT exercise on SPOJ.
You're given a boolean expression consisting of variables (each being either true
or false
), a unary operator (not
), and several binary operators (and
, or
, implies
, equals
). Your task is to determine whether the expression is a tautology, i.e. whether it evaluates to true
for all possible variable values.
To make parsing easier, we're going to use a very simplified syntax:
Today we would like to announce that Booking.com is sponsoring the 2015 Perl QA Hackathon. Booking.com has been supporting many Perl events and was the main sponsor and host of the QA Hackathon in 2014.
Booking.com is one of the world’s leading e-commerce companies.
Each day, over 800,000 room nights are reserved on our websites and apps by both leisure and business travelers.
Truly international, Booking.com is available in 42 languages, and offers over 600,000 properties in 211 countries. Over 8,600 people all over the world are dedicated to serving Booking.com’s customers, and we love having the opportunity to create an even better experience for them. We have our IT Department with over 750 employees and more than 54 nationalities based in Amsterdam, the Netherlands. Booking.com is a dedicated contributor to the Perl and MySQL community.
Will you be joining us? Please following this link to see our current vacancies workingatbooking.com.
The last three months have been some of the most professionally productive months I've had in years. In true Perl fashion, it all boils down to a Perl-related "hack" with StickK.com.
I am looking to contact Jochen Wiedmann who is the BZ::Client author (amongst other modules) whom I am guessing resides in Finland. I have emailed the associated cpan.org email address and I created an RT ticket 1 year ago. Hopefully ownership of this module can be shared and development continued.
In the interim, users of BZ::Client (i.e. Bugzilla XMLRPC Client) might be interested in my GitHub Repo which includes a number of patches.
Update: Contact has been made! Persons with patches for BZ::Client are encouraged to submit them via GitHub for inclusion in a soon to be released new version.
Influenced by the original Pull Request Challenge, I am excited to announce that NYC Perl Hackathon 2015 will have its own Mini CPAN Pull Request Challenge.
Here's how it works:
A list of CPAN distributions will be published in the Mini CPAN PR Challenge project page one day before the hackathon begins.
On the day of the Hackathon, Hackathon participants will choose 1 distribution and start hacking on it.
If you are new to this challenge, we have a list of suggestions to help you get started on your assignment.
If you want to be part of this challenge please register as a Hackathon Attendee and add yourself as a participant in the projects page.
When I click on "login" from the front page and type in my username & password, I get a "Permission denied." error message. If I need to log in, I have to reset my password, and then I'm logged in.
Maybe you are already registered for this year’s MojoConf in New York City (June 4th-6th) or maybe you are still thinking about it. Either way, a great way to introduce yourself to the Mojolicious community is to give a talk! But what should you talk about? The cool stuff you do with Mojolicious!
Last years talks were on a wide range of topics. When I write a talk, I usually write really technical talks; I’m always trying to pack too much code into each slide. But when I’m in the audience, the ones that really knock my socks off are the ones I don’t expect.
Last year, Rich Elberger (this year’s host, incidentally) gave a talk that took me completely by surprise, he’s gaining traction using Mojolicious in an Enterprise system! How cool is that?!
The HTML::FormFu module is well known enough to be mentioned in detail in both published Catalyst books. Despite a reasonable learning curve, once mastered saves enormous time in creating web-based forms.
The author/maintainer, Carl (aka fireartist), has been nice enough to allow me to get involved and I have pulled in a number of patches that kind people have submitted via github and RT. Only minor changes thus far, but it's great to have something so useful that people take time to tweak, fix and repair it - then submit their changes for inclusion. I am readying a release for the near future.
Which brings me to the point of my post.
If you or your organization are harboring some fixes or enhancements to HTML::FormFu, please send them through for inclusion via https://github.com/fireartist/HTML-FormFu
I was reviewing some code I had written for a simple RPG dice algorithm (although there's already a good module for this, Game::Dice) and I realized again that I have a prefererence for functions that can fit on one screen. One strategy is breaking up the code into smaller routines but I sometimes like to compact it vertically as much as possible first.
This function roll
, given a string of "dice language," should return the results of such a dice roll. An example of this would be "3d10+1" to roll three 10-sided dice and then add 1, or "4d6b3" which says to roll four 6-sided dice and take the best three.
Just to tell that there is another regexp engine coming out, re::engine::GNU. that will hopefully show how perl's regexp facility is well done, thanks to its perlreapi.
This library will bring into perl POSIX BRE, Gnu Emacs, AWK regexps etc...
The funny thing is that I took the liberty to exploit what perlreapi says: "Since any scalar can be passed as a pattern, it's possible to implement an engine that does something with an array etc...". The idea is have a default syntax (GNU Emacs), and to use an array or a hash at the right-hand side to specify the syntax of the regular expression string, i.e.:
use re::engine::GNU; 'test' =~ /\(tes\)t/ && print "ok 1\n"; 'test' =~ [ 0, '\(tes\)t' ] && print "ok 2\n"; 'test' =~ { syntax => 0, pattern => '\(tes\)t' } && print "ok 3\n";
For details and registration check out the Master classes.
So this year the YAPC::BR will be held at Taubaté - SP, of course in Brazil. I' m one of the hosts and we are moving forward to make a nice event.
The dates were decided during the last YAPC but I delayed this post and all English information until I payed the Hotel from venue and are 100% ok with the date. So in 18th to 20th of September this year we have another Perl conference.
The theme of event is CPAN and Perl Community. I mainly get inspired by guru at the end of YAPC::BR last year when everybody was induced to publish a module on CPAN. We brazilians are kind of shy to publish modules so make the event around it should be useful and fun.
What to expect from the event?
This year YAPC::EU conference will be happening at the beginning of September and we don't want you to spend your summer thinking about what could you be presenting in Granada, so we set the call for proposals deadline on June 30.
There already almost 30 talks accepted that amount more than 15 hours of interesting stuff for the more than 100 people that have already registered. What are you waiting to submit your proposal?
Would you like to organize any kind of training course instead? Please, see our call for instructors.
Well I have said it in the past I!=SysAdmin and with the problems I have had of late I think I might as well share with other so they will not have the same three very bad days I just had.
To make a short story a little longer it started when the development box I usually work-with was rebuild after a fatal crash on the rather tired box it was on.
Things where fine on the new box the old code worked and we seemed to see no problems a few runs of cpanm would not fix. The problems started after we got caught up with the backed up day to day production fixes and I started to play with some new things that I am using.
blogs.perl.org is a common blogging platform for the Perl community. Written in Perl with a graphic design donated by Six Apart, Ltd.