leonerd
- Website: leonerd.livejournal.com/
Recent Actions
-
Commented on Ch-ch-ch-ch-changes
Almost everyone here is adding the same predictable things... "real" OO, without defining what that means, and function/method prototypes/signatures, as a way of unpacking arguments. That's not what I'd like to see. What I'd like to see is the idea...
-
Commented on Can we afford bad code on blogs.perl.org?
Cats with poor grammer? ITYM grammar. :)...
-
Commented on Ouch - Exceptions that don't hurt.
One small question: Why the decision to only use numbers for error codes, rather than strings? Not every problem domain uses numeric error codes; to take a random example offhand, XMPP uses named errors on the XML stream which don't...
-
Commented on A very basic LISP style expression parser
I have a rather-much larger and more complete Scheme interpreter, written as a small Perl module. Currently it handles most of the basic types (booleans, integers, strings, pairs, lists), lambda expressions, variables in environments. About the only thing it's missing...
-
Commented on Does breaking encapsulation indicate the wrong type of hammer?
Sometimes breaking encapsulation like that is outright-essential. Consider local in: sub with_debug { my $self = shift; my ( $code, @args ) = @_; local $self->{debugging} = 1; $self->$code( @args ); } That simply cannot be done without breaking the...
-
Commented on use types
Rather than Attribute::Handlers you might prefer Zefram's Attribute::Lexical instead....
-
Commented on Why Module::Build sucks
I would like to add, for the record, it was originally my stabbings at Socket::GetAddrInfo that started this entire post. Socket::GetAddrInfo is now happily building using Module::Build, and has PASSes on MSWin32....
-
Commented on A lookback on the past few months
You mention being unsatisfied by the current state of Epoll-based event systems. Any particular reason behind this? Personally, I find that IO::Epoll works very well as the basis behind IO::Async::Loop::Epoll, which is the preferred IO::Async loop on Linux. Is there...
-
Commented on Chained Gradients
You may or maynot be aware of Convert::Color, but that makes the above program rather much simpler: #!/usr/bin/perl use strict; use warnings; use Convert::Color; my $steps = 32; my @start = Convert::Color->new( "rgb8:ff0000" )->as_hsv->hsv; my @end = Convert::Color->new( "rgb8:00ffff" )->as_hsv->hsv;...
-
Commented on Fun with recursive anonymous subroutines
Another way you might want to look at to do that is CPS. A basic way to repeatedly call the anonymous closure is to use kwhile. What you've built there is recursive descent on a data structure, so you might...
-
Commented on Compiling Libraries, part II
Ahhh.. I see. Then yes, that makes much more sense that way....
-
Commented on Compiling Libraries, part II
Call me a purist, but I disagree with the principle of taking a non-Perl C library and bundling the code with a Perl module. You haven't fundamentally solved anything, because that C library will almost certainly have its own dependencies,...
-
Commented on Inline::C optimizations
> I'm still considering using Async but lack good examples :( Do you mean as in IO::Async? Perhaps you could suggest some more examples you'd like to see?...
-
Commented on How do you run your daemons?
For FastCGI webapp runners I let the webserver manage their execution. For most other "daemons", I usually have them running foreground, rather than background, in screen sessions. I find them easier to find and control this way....
-
Commented on Combinatory Substitution
Rather than presume a constant length match length, and hardcode that 2 twice, consider: $word = "noogoo"; push @where, [ $-[0], $+[0]-$-[0] ], while $word =~ /oo/g; for my $p (@where) { my $other = $word; substr($other,$p->[0],$p->[1], "aa"); push @words,...
-
Commented on Perl, a multi paradigm language
Surely you don't even need to name a function. map {join("\t", sub{ @_, $_[-2]/$_[-1]**2 }->(split /\t/))} Though, perhaps it reads a little neater if you do :)...
Comment Threads
-
JT Smith commented on
Ouch - Exceptions that don't hurt.
By popular request I will be putting out a new release today that adds the following functionality:
1) The ability to use text-based codes as well as numeric.
2) Aliases for ouch() and kiss() called throw() and catch() for those that don't like the sugary names. Though you will have to import these separately.
-
Blog commented on
Can we afford bad code on blogs.perl.org?
Thank you all for your support. I plan to go to continue to learn perl and my posts are back online, All constructive comments are welcome. A community is made to grow together.
See you on the blog! ;) -
tempire commented on
Ouch - Exceptions that don't hurt.
Excellent. Exactly what I've been looking for.
-
David Cantrell commented on
Ch-ch-ch-ch-changes
LISP-stylee macros.
Ability to have multiple versions of modules installed.
A text/character encoding system that doesn't confuse the hell out of me.
-
Reini Urban commented on
use types
Attribute::Lexical does not help with my attributes at compile-time. Because core does not support it yet. So you cannot optimize on lexicals, based on attributes.
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.