Josh ben Jore
- Website: search.cpan.org/~jjore
Recent Actions
-
Commented on Major DB::Color update (Perl QA Hackathon)
The dualvar isn't merely numeric or "truthy", it is the address of a COP opcode. At http://perl5.git.perl.org/perl.git/blob/HEAD:/mg.c#l2008 the numeric address is turned into a pointer and dereferenced to toggle a flag on a COP* dbstate opcode....
-
Posted Optimizing my freenode IRC to Josh ben Jore
I wrote this obtuse little function to display six different IRC channels on freenode at once.
(defun irc-java () (interactive) (delete-other-windows) (switch-to-buffer (get-buffer "#perl")) (let* ( (p (frame-parameters)) …
-
Posted Littlest uuencode to Josh ben Jore
Hi, For your amusement, here's a very small uuencode program.
perl -0777 -e '$uue = pack u, <>; print "begin 0644 $ARGV\n${uue}end\n"' your-file.bin
-
Posted Avoid my keys() accident to Josh ben Jore
I broke $work yesterday when a change I'd made that I thought was mundane was not in fact. I'd changed some code from:
if ( keys %$hash_ref ) {
toif ( %$hash_ref ) {
under the theory that we weren't supporting any perl less than… -
Posted Ponies are the truth to Josh ben Jore
Did you know you can modify perl's readonly constants for undef, true and false? Yep.
&Internals::SvREADONLY( \ !!1, 0 ); ${ \ !!1 } = 'ponies!'; &Internals::SvREADONLY( \ !!1, 1 ); print !!1; # ponies!
Same thing for \ undef and \ !!0…
-
Commented on Benchmarking string trimming
the point is, the ways to get optimal performance is to know what sorts of optimizations and work-avoidances your regexp engine provides and in extremis, to look at the compiled form of your regexp....
-
Posted Benchmarking string trimming to Josh ben Jore
Clever Regexps vs Multiple Simple Regexps:
In reading some code I ran across the expression
s/^\s*|\s*$//g
which is a trim function. It is not the optimal way to write this. The optimal way is two simpler expressions:s/^\s+//; s…
-
Posted My gladiators are getting entangled to Josh ben Jore
Hi,
-
Posted The mod_perl debugger you've always wanted to Josh ben Jore
To use the nice mod_perl debugger you've always wanted:
- get a terminal server http://bit.ly/drrYdS
- upgrade your debugger http://bit.ly/cMFiwZ
- connect the two
- pour the espresso onto the ic…
-
Commented on Unicode in Perl, FTW (Я очень рад, ведь я, наконец, возвращаюсь домой)
It might not work for your environment if your terminal isn't properly set up for being UTF-8....
-
Commented on Design implications of MI strategies
I'm not sure if it's entirely relevant but I noticed while reading the MRI Ruby VMs (1.8 and 1.9) that possibly Ruby's OO implementation might be completely replaceable. It's somewhat plausible that for various optimization (whether premature or not) C...
-
Posted Unicode in Perl, FTW (Я очень рад, ведь я, наконец, возвращаюсь домой) to Josh ben Jore
Found on my hard drive. I love that it's source code that's literally in UTF-8 and it all just looks "right" or whatever that Russian says.
use utf8; use Encode 'encode'; print encode("ascii", 'Я очень рад, ведь я, наконец, возвращаюсь домой', sub{ s…
-
Posted Under the covers of perldoc to Josh ben Jore
Sometime last year I had to go find out what happens under the covers when a user types a command like "perldoc strict." Here's the trace of which commands call which other commands. It's all in good fun.
I'd used
strace
to get a process-by-process trace of… -
Commented on Why Perl 6 is different
FWIW, it seems that I might be wholely unable able re-create Perl's "strict" or even stricter things in Ruby. Currently there's no idea of a pragma to affect a bit of compilation. I've got a bare idea of perhaps implementing...
Comment Threads
-
educated_foo commented on
Why Perl 6 is different
@Steven Haryanto -- (Common) Lisp is actually pretty ugly and practical. This is actually why I prefer it to Scheme, which is stubbornly idealistic. Until recently, Scheme didn't even have modules or namespaces because the designers couldn't agree on the "right way" to design them.
-
Ovid commented on
Major DB::Color update (Perl QA Hackathon)
Thanks Josh. That's what we were suspecting, but none of us had enough internals knowledge to be sure.
-
Gábor Szabó - גאבור סבו commented on
Major DB::Color update (Perl QA Hackathon)
I'll try to move the source of Syntax::Highlight::Engine::Kate to github tomorrow to make it easier for you or anyone else to send patches.
Thanks for the detailed bug reports!
- Gábor Szabó - גאבור סבו commented on Major DB::Color update (Perl QA Hackathon)
-
Ovid commented on
Major DB::Color update (Perl QA Hackathon)
Thanks Gabor :)
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.