
Ben Bullock
- Website: www.lemoda.net/
- About: Perl user since about 2006, I have also released some CPAN modules.
Recent Actions
-
Commented on Regarding the closure of rt.cpan.
Has there actually been any effort to email people about this being closed? I think a lot of people don't even know about it. You can find lots of recent distributions on CPAN where the author says to report bugs...
-
Commented on Regarding the closure of rt.cpan.
You can approve/disapprove comments on blogs.perl.org. I get lots of spam comments, or "asdfg" comments, you can easily remove them....
-
Commented on Mood Lighting
Video of bulbs would be nice....
-
Commented on You think you're an X, but you're only a Y
Generally I use the "boolean" module from CPAN if I want to force things: https://metacpan.org/release/boolean It's pretty effective. Probably some Perl person will tell you there is some dreadful thing or another wrong with this module, since that always seems...
-
Commented on You think you're an X, but you're only a Y
Most people seem to end up using "looks_like_number" in Scalar::Util for these kinds of jobs. https://perldoc.perl.org/Scalar::Util#looks_like_number Apparently it's based on an internal function that Perl uses to distinguish the two: https://perldoc.perl.org/perlapi#looks_like_number I suppose I could use that in the JSON...
-
Posted You think you're an X, but you're only a Y to The Incredible Journey
The other day I was converting the output of a ="https://metacpan.org/…
-
Commented on Perl Weekly Challenge 94: Group Anagrams and Binary Tree to Linked List
> "Actually, I even suspect that Perl and Raku arrays are in fact implemented as some form of linked list behind the scene." Perl arrays/lists use C arrays, not linked lists. Here is the source code of av.h (perl 5.32):...
-
Posted ABC Mart to The Incredible Journey
One thing which I like about Mojolicious is that they put all the functions and methods …
-
Commented on From a Reflection on The Weekly Challenge 092 Task 1
Some people on reddit also answered your query: https://www.reddit.com/r/perl/comments/koahhf/from_a_reflection_on_the_weekly_challenge_092/ The replies might sound a bit sarcastic but that is because it's actually quite a well-known problem....
-
Commented on Perl Weekly Challenge 93: Max Points and Sum Path
Checking for collinearity of three points in the completely general case is a matter of calculating the determinant of 1 x_1 y_1 1 x_2 y_2 1 x_3 y_3 like this https://github.com/benkasminbullock/perlweeklychallenge-club/blob/master/challenge-093/bkb/perl/ch1.pl#L37-L48 Some other people such as Dave Jacoby had examples...
-
Commented on Perl Weekly Challenge 93: Max Points and Sum Path
Does your method find (0,0), (1,2), (2,4) collinear?...
-
Commented on From a Reflection on The Weekly Challenge 092 Task 1
https://gist.github.com/benkasminbullock/79836f8a979f5f2e84d2aa1a8f7b3fea [ben@mikan] {17:30 05} ~ 514 $ perl ch-1.pl '茫茫人海' '夜夜笙歌' 茫茫人海 夜夜笙歌 1 The secret is to bang the rocks together: use Unicode::UTF8 'decode_utf8'; binmode STDOUT, ":encoding(utf8)"; my $l = decode_utf8 ($ARGV[0]); my $r = decode_utf8 ($ARGV[1]); print...
-
Commented on Misusing newSVpv
Thank you for the kind words. I believe that the newSV() method which I've pointed to is the correct resolution for this particular problem....
- Posted I'm Making Headway Now to The Incredible Journey
-
Commented on Alles in Ordnung
I can use the Perl sort as long as I don't mind just using the Perl ordering which comes from Perl_sv_cmp. The problem is that I don't know how to use a user-defined sort. It got a bit ridiculous and...
-
Posted Misusing newSVpv to The Incredible Journey
I managed to cause another set of obscure bugs by misusing newSVpv. The goal of this code is to split the RGB and the alpha…
-
Commented on First Perl Steering Council elected to replace Pumpking position
Thanks to these people for their work in keeping things going....
-
Posted Alles in Ordnung to The Incredible Journey
Perl returns its hash values in a random order. Since 5.14 or so, the you get a different ordering each time.
for my $k (keys %hash) { }
No problem you say, I'll use sort to…
-
Posted The Persuaders! to The Incredible Journey
The Persuaders! is a particularly silly 1970s action TV series which lasted for only one season. Tony Curtis plays Danny Wilde to Roger Moore's Lord Brett Sinclair. Tony is the funny guy and Roger is the straight man. After the Persuaders,…
-
Commented on Drawing a blank with XS
XS is its own weird little world, like C++ templates or quantum field theory or something like that. Do you know what the syntax for comments in XS is? # comment Now the syntax for preprocessor conditionals in XS is...
-
Posted Drawing a blank with XS to The Incredible Journey
I spent quite a lot of time trying to work out what this error message meant:
Error: Unterminated '#if/#ifdef/#ifndef' in Libpng.xs, line 1328
The first problem here is that line 1328 is the end of the file, so that wasn't a big help.
A…
-
Commented on Perl dying? Well now I don't care
If at first you don't succeed, try, try and try again....
-
Commented on Bill & Ted's Bogus Journey
All of my CPAN modules were set up to be installed at CPAN so they mostly don't install from github, and unfortunately the stupid name I picked for my build module got used by someone else for an actual CPAN...
-
Commented on Bill & Ted's Bogus Journey
Does the diag() output always show up in the CPAN tester output? That was the basic problem for me, I couldn't reliably get the version number of the remote machine without the skip_all trickery. Different CPAN testers use different testing...
-
Commented on Strawberryperl.com - https any time soon?
Is there an alternative download site for strawberry perl?...
-
Posted Bill & Ted's Bogus Journey to The Incredible Journey
Most operating systems have a version of libpng, the library for reading and writing the PNG (portable network graphics) image format on them. Unfortunately, though, the libpng is often fairly old.
I wrote a CPAN module which links a…
-
Posted The mysterious case of the SVt_PVIV to The Incredible Journey
The other day I wanted to send my friend some silly emojis on LINE and so I updated my flaky old Unicode browser to the new-fangled Unicode with values above 0x10000, so that I could fetch the Emojis, which start
-
Posted JSON::Create now features indentation to The Incredible Journey
In version 0.27 of JSON::Create I added a new indentation feature. This was added basically out of necessity. Originally the purpose of the module was sending short bits of JSON over the internet, but I've…
-
Commented on Where is Rob?
It seems easy to find Rob Seegel using Google, but that seems to be an unauthorised release, https://metacpan.org/permission/distribution/Tk-MListbox with the actual namespace owner/author having been https://metacpan.org/author/HJHELGE The above person is apparently also easy to find on Instagram and Facebook, unless...
-
Commented on Why you should use ppport.h in your XS code modules
Thank you for the reminder, I've just added ppport.h to Image::PNG::Libpng: perl -MDevel::PPPort -e'Devel::PPPort::WriteFile'...

Comment Threads
-
C.-Y. Fung commented on
Perl Weekly Challenge 93: Max Points and Sum Path
> that the points of a straight line have to be immediate neighbors and that the lines can only be horizontal, vertical or diagonal. ...
Hi Ben. Similar to Laurent, I also implemented a solution under a similar interpretation of "straight line(s)".
As I remember, the event organizer, Mohammad, has expressed that participants can implement a script as the coders preferred whatever reasonable.
I did my choice due to the two reasons.
The first is that the two examples provided are the diagonal lines with integral-coordinate points.
The second r…
-
laurent_r commented on
Perl Weekly Challenge 93: Max Points and Sum Path
Hi Ben, I basically agree with C.-Y. Fung's answer. My method definitely doesn't look for points like (0,0), (1,2), (2,4). As I said in the introduction part, it appears that the given co-ordinates will be integers, that the points of a straight line have to be immediate neighbors (i.e. no gaps between them) and that the lines can only be horizontal, vertical or diagonal. Points like (0,0), (1,2), (2,4) don't fit this bill.
-
C.-Y. Fung commented on
From a Reflection on The Weekly Challenge 092 Task 1
Thank you Ben!
-
C.-Y. Fung commented on
From a Reflection on The Weekly Challenge 092 Task 1
> ...it's actually quite a well-known problem.
Thank you Ben again. Haha I don't mind about the tone; every stuff in a knowledge domain for a beginner is fresh-new.
-
Toby Inkster commented on
Mood Lighting
The way I currently have it, one cycle takes about 20 minutes; it's very subtle and slow, so a video would not be especially interesting.
I'll try filming a faster sequence with more contrast between the colours though.

About blogs.perl.org
blogs.perl.org is a common blogging platform for the Perl community. Written in Perl with a graphic design donated by Six Apart, Ltd.