In my last bunch of posts I though I had finally got all my element view, parentheses and 'AND' ; checking coming out all OK so I started today by going back to here I left off in Driver::DBI. The first thing I did was re-run the test suite and I ran into this
# Failed test 'Where with function and 1 param SQL correct'
# at D:\GitHub\database-accessor-driver-dbi\t\lib/Test/Utils.pm line 56.
# Expected SQL--> SELECT people.first_name, people.last_name, people.user_id
FROM people WHERE length(people.last_name) = ?
# Generated SQL-> SELECT people.first_name, people.last_name, people.user_id
FROM people WHERE AND length(people.last_name) = ?
The C programming language has two kinds of comments, ones with a
start and end marker of the form /* comment */, and another one
which starts off with two slashes, //, and goes to the end of the
line, like Perl comments. The /* */ kind are the original kind, and
the // kind were borrowed from C++.[1]
Let's suppose you need to match the original kind of C comments. A
simple regex might look something like this:
qr!/\*.*\*\/!
Here we've escaped the asterisks in the comment with a backslash, \,
and used exclamation marks, !, to demark the start and end of the
regex, so that we don't have to escape / with a backslash.
However, C comments have the feature that they can extend over
multiple lines:
I was handling some bad Markdown input using Text::Markdown, when I saw it generate broken HTML.
I started with (bad) Markdown input " 1. z\n >" and got back HTML <p><ol>\n<li>z</p>\n\n<blockquote>\n <p></li>\n </ol></p>\n</blockquote>.
(See the incorrectly nested HTML tags, <p><ol><li></p>?)
So I tried feeding this bad Markdown to four different Perl Markdown libraries: Text::Markdown, Text::MultiMarkdown, Text::Markdown::Discount, and Markdent, to see which one would give me valid HTML.
The results?
Text::Markdown — invalid HTML
<p><ol>\n<li>z</p>\n\n<blockquote>\n <p></li>\n </ol></p>\n</blockquote>\n
Text::MultiMarkdown — invalid HTML
<p><ol>\n<li>z</p>\n\n<blockquote>\n <p></li>\n </ol></p>\n</blockquote>\n
Markdent — valid HTML, but doesn't generate a simple HTML fragment
<!DOCTYPE html>\n<html><head><title></title></head><body><ol><li>z\n >\n</li></ol></body></html>
The solution? Switch from Text::Markdown to Text::Markdown::Discount.
Today I was having a look at coverage that the '58_parenthes.t' test case gives and with only seven tests it is rather sparse, time to add a few more in.
What I want to first improve is the coverage for 'functions' and 'expressions' to make sure the nested nature or the left and right attributes are correct. I started with this formula 'element' make up of a number of 'expressions','functions', 'params' and 'elements' that use parentheses;
Note that we didn't record all talks as some were given at TPC and will be of much better quality from them. Also we didn't record the workshops, nor the lightning talks. Still, we have some exclusive content, so have a look.
Rakudo and other repositories in perl6 GitHub org have plenty of open bug tickets. We decided it would be neat to give them an extra push with concentrated effort, which is why we'd like to organize a monthly, 1-day virtual event where we pick a repository and everyone works on open tickets in that repository.
The day will be first Saturday of every month. This month we'll be hacking on the Issues of github.com/perl6/doc repository.
Whether you're a seasoned Rakudo developer or just starting out, join us this Saturday in #perl6 on irc.freenode.net chat channel (no specific time) and contribute! If you'd like to simply hang out, you're welcome too, we love company!
I did a little more checking of my tests in '58_parenthes.t' and it would appear that my changes from
yesterday's
post did not actually do the trick as the second test is failing and the 'Condition' part of the has is in error;
Problems with concurrency, a post from the hard reality.
This worries me a bit I must admit; a few years ago, before the official release of P6, I tried my hand at concurrent programming in rakudo and it was so broken that i simply shelved P6 for over a year, it was simply not ready for a lambda dev like me. I would have loved to be in the trenches but I did not have the time to fight with core dumps.
As the speed of P6 is not stellar, I believe many of us, lambdas, will try to run things in parallel, it's also fun, to make them more attractive. The concurrency mechanism in P6 look good on paper, good enough so I can find myself dreaming of throwing in a few keywords in places I think concurrency would make a difference.
There is a nice silver lining to this one, It took a very short time before a lead developer answered me. I believe his answers may be interesting to read.
A description of the problems I encountered is here: gist
Time to do some more catch-up coding as my most recent round of changes to fix all my 'element->view' woes I ended up removing any checks for 'parentheses' I had in place. To recap on the original idea of the parentheses check was to make sure that there was at least one closing bracket for each opening bracket in the 'conditions' being send down to the DAD.
As it stands now I am using the '_parentheses_check' sub to check all the attributes that that may contains not just an 'element' but any class that can use a 'predicate' so 'Elelemets','Functions','Expressions' and 'Conditions' quite an expended set.
Unfortunately I can not really test to see that the positioning of the brackets are syntactically correct as this;
So I'm gearing up to write a "Howto Raspberry Pi with Perl" multi-chapter tutorial, and as I finalize a few last things, I thought I'd put together how all of the software is laid out and is continuously tested.
The RPi::WiringPi distribution is essentially a class that provides access to external sub distributions, and provides several benefits such as maintaining a registry of in-use GPIO pins, and ensuring your Pi is cleaned up back to default on exit, or if an error or signal is caught. The sub modules do none of those things.
I use the automation and dispatching capabilities of my Test::BrewBuild software to handle the test management. This software runs your unit tests on any/all Perlbrew and/or Berrybrew installed instances, with the ability to dispatch your test requests over the network to remote machines. I'm not getting into those details, just know I use the bbtester binary to listen for test requests, and the bbdispatch binary to send them, both on the same Raspberry Pi hardware.
ok 46 - Second Gather element does not inherit view
not ok 47 - Third Gather element inherits view
and a
Can't call method "predicates" on an undefined value at 57_dad_elements.t line 486.
# Looks like your test exited with 255 just after 49.
A quick check of the test and the input and found a 'condtions' where I should have had a 'conditions' so that fixed that and all the links and sorts passed but I did get this for the gather
This module offers a way to check your web pages for correct gzip compression. It not only checks that your web page is compressed properly when required, but also checks that the web page is not accidentally compressed when not required, and that the compression actually does something useful in terms of reducing the page size. I wrote it because I couldn't find anything to do that on CPAN.
At TPC in Amsterdam I gave 2 lightning talks under the title perldoc -O. It was a questionary for the attendance which should give me some orientation which feature to prioritize or how to modify them best. I also spoke and mailed with all people I deemed relevant and want now to lay out the feature set I want to achieve with the rewrite.
SPVM project is improved day by day. SPVM is the project which provide static type data structure to Perl, and improve the performance of numeric and array operation.