I plan to release SPVM 1.0 at the end of July.
I plan to release SPVM 1.0 at the end of July.
If you have any feedback on the bugs or features, please contact Github Issue or kimoto.yuki@gmail.com
I plan to release SPVM 1.0 at the end of July.
If you have any feedback on the bugs or features, please contact Github Issue or kimoto.yuki@gmail.com
These are some answers to the Week 105 of the Perl Weekly Challenge organized by Mohammad S. Anwar.
Spoiler Alert: This weekly challenge deadline is due in a couple of days (March 28, 2021). This blog post offers some solutions to this challenge, please don’t read on if you intend to complete the challenge on your own.
You are given positive numbers $N and $k.
Write a script to find out the $Nth root of $k. For more information, please take a look at the wiki page.
Example:
Input: $N = 5, $k = 248832
Output: 12
Input: $N = 5, $k = 34
Output: 2.02
A runner has to run from the upper-left corner to the lower-right corner in a race. The stadium of this race is rectangular, and each square meter area has different level of difficulty (caused by sand, cement, grass, slope...). Our runner has to choose a path with the least difficulty to complete the race.
My description makes it look like something from a competitive programming problem. Maybe someone will discover sometimes I made sentimental names in the codes. (I was a long-distance runner in high school and university, by the way.)
The heart of my solution for this task is:
I feel that Perl users are losing confidence because of negative feedback from other communities.
The opinions of people who intend to harm Perl are 99% useless in my experience.
Handling character codes is actually simple.
Because all you have to do is remember the following three things.
1. use utf8 and save file as UTF-8
2. if you print text, encode text to platform charset(Linux is UTF-8, Windows is cp932)
3. if you get text from outside, decode text from platform charset(Linux is UTF-8, Windows is cp932)
If "use v7;" enabled "use utf8", it would be less memorable and less mistake.
Beginners will first remember that Perl source code is stored in UTF-8.
Next, the introductory person will notice that using a print statement results in a "Malformed ..." warning.
And, to get rid of the warning, he will have to encode with the platform character code.
Once he have learned that, he will naturally learn that he need to decode when he bring in text from the platform.
GraphQL is the new, shiny way to do APIs. It minimises number of round-trips for clients to query what need. But what about real-time updates? How can we cut down the time needed for clients to get new information? Are we forcing them to constantly poll? That seems expensive and also slow.
GraphQL's official standard now includes "subscriptions". The obvious transport for that is WebSockets, and the de facto standard for that is Apollo GraphQL's subscriptions-transport-ws.
As of 0.16, Mojolicious::Plugin::GraphQL supports WebSockets, and GraphQL subscriptions, conforming to the Apollo protocol.
A well-known model for distributing information in an event-driven way is "publish/subscribe" (or "pub/sub"). To both demonstrate the subscription capability, and to provide useful functionality, there is now a new "convert plugin" for GraphQL with the two Mojo modules that implement pub/sub (with Redis and PostgreSQL): GraphQL::Plugin::Convert::MojoPubSub.
These are some answers to the Week 63 of the Perl Weekly Challenge organized by Mohammad S. Anwar.
Spoiler Alert: This weekly challenge deadline is due in a couple of days (June 7, 2020). This blog post offers some solutions to this challenge, please don’t read on if you intend to complete the challenge on your own.
Define sub last_word($string, $regexp) that returns the last word matching $regexp found in the given string, or undef if the string does not contain a word matching $regexp.
For this challenge, a “word” is defined as any character sequence consisting of non-whitespace characters (\S) only. That means punctuation and other symbols are part of the word.
The $regexp is a regular expression. Take care that the regexp can only match individual words! See the Examples for one way this can break if you are not careful.
Examples:
As one of Perl user, +1 "use v7;" in newer version of Perl.
use v5.14
This syntax is the history of Perl and is also a mechanism for maintaining backward compatibility with newer versions of Perl.
The reason this was not used is simply the small granularity.
I don't remember much about Perl, so I can't tell the difference between use v5.20 and use v5.30.
And because the warnings and utf8 aren't turn on, I couldn't find a meaning to actively use it.
use v7; is very easy to understand.
use v7;
Imagine an application user actively uses it instead of writing use strict, use warnings, use utf8;, use feature'say', ....
I also think that I use it aggressively in application code.
There's a lot in it and we could question some of the methodology, but here's some thoughts.

Perl developers are older (and there aren't that many of them) but salaries are excellent.
I would note that TIOBE didn't match up too closely with common usage but there's no silver lining.
Ruby is now in consistent decline, I have read people linking this to Twitter moving away from Ruby on Rails but can't cite that claim. My observation is that RoR seems to have gone out of fashion in favor of lightweight server frameworks and I would suggest that Kubernetes has sidelined Puppet, so organizations aren't bringing in Ruby via apps/frameworks they want to use.
These are some answers to the Week 104 of the Perl Weekly Challenge organized by Mohammad S. Anwar.
Spoiler Alert: This weekly challenge deadline is due in a couple of days (March 21, 2021). This blog post offers some solutions to this challenge, please don’t read on if you intend to complete the challenge on your own.
Write a script to generate first 50 members of FUSC Sequence. Please refer to OEIS for more information.
The sequence is defined as below:
fusc(0) = 0
fusc(1) = 1
for n > 1:
when n is even: fusc(n) = fusc(n / 2),
when n is odd: fusc(n) = fusc((n-1)/2) + fusc((n+1)/2)
Some months ago I started working in a system similar to ActiveRecord. But then it became pretty big so then I centered my attention in a SQL AST manager instead.
So I made a library that is basically an Arel port. You can see the README with most of the basic info. After looking at implementations in CPAN I realized there are many of them already but all of them based on hash structures.
This impl can instead represent a full SQL AST mainly using builder chainable methods.
I need some feedback on wether you think it will be something that is useful.
Thanks in advance.
Repo link: https://bitbucket.org/juankpro/perl-sql/src/master/
PD: Here is another question. If you try to download and use the lib right now it will not work because it depends on another library made by me as well: https://bitbucket.org/juankpro/model-support/admin
This library is a group of packages with somewhat unrelated utility functions that allows me to support my own perl OOP engine implementation shared through other libraries I'm working on. I don't know what's the best approach to handle this. Is it ok to upload this library separately? if I need to reuse this code again, how do I prevent collisions if my other libs will use it as well?
Previously it was only possible to output text with strings using text_out()
method. Now, a more versatile and modern way is added with text_shape() method
that converts text string in a series of glyphs, that allows the following:
In addition to that, infrastructure was added to support RTL and shaping in all
standard Prima widgets. Run podview Prima::Drawable::Glyphs and check out the
examples in the end of the document.
PostScript backend rewritten to generate embedded Type1 fonts. This allows to generate unicode text in PostScript documents.
In X11 backend, standard key combination (Ctrl+Shift+U) accepts unicode hex number as a character input. Try typing "a" then Ctrl+Shift+U 300 ENTER.
Prima::*Dialog packages are moved to Prima::Dialog::* namespace

The Dancer Core Team would like to announce the availability of Dancer2 0.300004. This release brings several important fixes and enhancements:
Session cookies can be restricted to a first-party or same-site context
There were a number of spots where Dancer2 would return a 500 error upon receiving an invalid request, rather than (correctly) returning 400 - Bad Request. Many, if not all, of these have been fixed.
For more information about same-site context, please refer to [RFC-6265bis]( https://tools.ietf.org/html/draft-ietf-httpbis-cookie-same-site).
To use this, add the cookie_same_site key to your session engine configuration
in the appropriate YAML file. Valid settings include Strict, Lax, and None.
The complete changelog is as follows: 0.300004 2020-05-26 20:52:34-04:00 America/New_York
These are some answers to the Week 100 of the Perl Weekly Challenge organized by Mohammad S. Anwar.
You are given a time (12 hour / 24 hour).
Write a script to convert the given time from 12 hour format to 24 hour format and vice versa.
Ideally we expect a one-liner.
Example 1:
Input: 05:15 pm or 05:15pm
Output: 17:15
Example 2:
Input: 19:15
Output: 07:15 pm or 07:15pm
There have been several! LANraragi, ZEVENET CE, LedgerSMB, and Sympa. All great perl software!
LANraragi v.0.7.0 -- Cat People (Putting Out Fire)
Web application for archival and reading of manga/doujinshi. Lightweight and Docker-ready for NAS/servers.
This release includes an API revamp, categories have finally been added, PDF files are now first class citizens, Docker image is much smaller, and many other fixes and small features.
Check it out here: https://github.com/Difegue/LANraragi/releases/tag/v.0.7.0
ZEVENET Community Edition v5.11.1
The community edition of this load balancer appliance is bugfixes.
Check it out at: https://github.com/zevenet/zlb/releases/tag/v5.11.1
LedgerSMB 1.7.14
This accounting software's release is composed primarily of bugfixes.
Check it out at: https://github.com/ledgersmb/LedgerSMB/releases/tag/1.7.14
Sympa 6.2.56
This release is a all bugfixes for this mailing list management software
Check it out at: https://github.com/sympa-community/sympa/blob/6.2.56/NEWS.md
Given a list of 4 or more numbers, write a script to find the contiguous sublist that has the maximum product. The length of the sublist is irrelevant; your job is to maximize the product.Example
Input:
[ 2, 5, -1, 3 ]Output:
[ 2, 5 ]which gives maximum product10.
The easiest (but probably not the fastest) method would be to start from each position and compute the products of all the possible sublists starting at the position, remembering the positions where the product is maximal.
I automatically reached for List::Util’s product to get the products easily, but alas! Running
product(-1, 3)
caused a Floating point exception (bug reported). So, I had to implement product myself:
After almost half a year of work I finally publish my new project Vikna which is also the subject of my talk at the upcoming Conference in the Cloud.
As the subject says, it is a clear pre-release and a proof of concept for the preview of those who might be interested. In the project I tried to get hold of all the best what Raku can offer in the field of asynchronous/threaded processing and OO. Whish you can as much fun trying it as I have in developing!
These are some answers to the Week 99 of the Perl Weekly Challenge organized by Mohammad S. Anwar.
Spoiler Alert: This weekly challenge deadline is due in a couple of days (February 14, 2021). This blog post offers some solutions to this challenge, please don’t read on if you intend to complete the challenge on your own.
You are given a string $S and a pattern $P.
Write a script to check if given pattern validate the entire string. Print 1 if pass otherwise 0.
The patterns can also have the following characters: - ? - Match any single character. - * - Match any sequence of characters.
Example 1:
Input: $S = "abcde" $P = "a*e"
Output: 1
Example 2:
Input: $S = "abcde" $P = "a*d"
Output: 0
Example 3:
blogs.perl.org is a common blogging platform for the Perl community. Written in Perl with a graphic design donated by Six Apart, Ltd.