educated_foo
- About: I blog about Perl.
Recent Actions
-
Commented on Indented comments
(Oh, FFS, I misspoke the incantation to make code display properly here, and can't ninja-edit to fix it. Sorry.)...
-
Commented on Indented comments
If you use relatively short functions and blocks, and name functions and variables sensibly, comments rarely add anything. Code tells you how, while comments tell you why, e.g. # sort values first to increase floating point accuracy sort @x; $x...
-
Commented on The clearest way(s) to check if a List contains...
That person also says it works differently in 5.10, 5.12, and 5.14, which doesn't exactly inspire confidence....
-
Commented on The clearest way(s) to check if a List contains...
Because 'flour' is converted to a regex, and matches e.g. 'afflourent'....
-
Commented on The clearest way(s) to check if a List contains...
Since smart match is broken and changes between versions, grep ($_ eq 'flour') seems like the best way to me....
-
Commented on Improved autobox-ing. I'm loving it :o)
Ick. I've never felt the appeal of autobox. If you want to write things in that order, Ruby already exists, and it even lets you use "." instead of "->". It's cool that Perl can be contorted to do this,...
-
Commented on Site Front Page
Hear, hear! Auto-chopping is the only true solution, since some of the people posting giant wads of text don't care about guidelines. Until that exists, I'm grateful to the mods for splitting (or, frankly, nuking) such posts....
-
Commented on ::NonOO suffix for non-OO version of a module
I like Nooo. See also Object::Import and Acme::Nooo for generic solutions to this problem, which work in at least some cases....
-
Commented on ::NonOO suffix for non-OO version of a module
Dear God... my $finder = Number::Closest->new(number => $num, numbers => \@num) ; my $closest = $finder->find; # finds closest number All that, plus Moose, to do a bit of subtraction and sorting? How about @closest = sort { abs($a-$num) <=>...
-
Commented on Slideshare? Really?
The ETag exploit and Evercookie are designed specifically to defeat private mode. FTA: "KISSmetrics’ tracking tool is capable of session tracking even where the user has Private Browsing Mode enabled, and is blocking Flash, HTML5 [local storage] and HTTP cookies."...
-
Commented on Slideshare? Really?
Do you get stats on how many people see your talks because they're browsing Slideshare vs. how many do because you linked to them from some Perl place or from a search? I would guess the latter, based on what...
-
Posted Slideshare? Really? to educated_foo
While I enjoy reading the presentations people post here, I've never been that happy with their using Slideshare. What's wrong with just putting a PDF somewhere? As it turns out, Slideshare is actually somewhat slimy -- they got caught using
-
Commented on OI::M::Finally({IO::All})
Good to see that Zoidberg's alive again. My zsh muscle memory was a bit too strong the last time I tried it, but it was a really nice merger of Perl and Unix the shell. That said, I was thinking...
-
Commented on OI::M::Finally({IO::All})
Apropos: let you run code in the middle of a pipeline of commands. This is the killer feature for fully participating in pipelines, instead of just running them (as Perl and Python do). (For bonus points, the code should be...
-
Commented on What exactly is going on at Perlmonks?
No, I just think you're being obnoxious and playing to "the crowd," for some version thereof. But you can believe what you want, and even tell me that *I* believe what you want......
-
Commented on What exactly is going on at Perlmonks?
Faux outrage may make you feel righteous, but it's almost never helpful....
-
Commented on Code Pornography
I don't see why that is a "problem"? Think "booth babes," but with much lower cost and importance....
-
Commented on Chicago.PM - Dependency Injection (also: Beam::Wire)
In general, if you want to maximize the number of people who can view your slides, you should use PS, PDF, HTML, text, or some other offline format which you probably already used to prepare them....
-
Commented on Fat Versus Thin Core
To my knowledge, Strawberry Perl and ActivePerl are the only "other" Perls that have much traction. And that's because they fill a very specific gap (Windows). I was thinking more of perl5i, DWIMperl, Task::Kensho, Modern::Perl, and all the other stuff...
-
Commented on Fat Versus Thin Core
Which Linux distro is the standard now? They all use more-or-less the same kernel, but there's no agreement on what else to include, and this situation has stayed the same for years. The choice of a "standard" is really complex,...
-
Commented on Encouraging bloggers to use the 'extended' feature
It might encourage him to post less....
-
Commented on Encouraging bloggers to use the 'extended' feature
I suspect that antisocial morons like Shlomi Fish will always ruin these attempts....
-
Commented on Idea: perl community homepage
Yes, let's link to that. Smiley face. Blogs.perl.org and the perl5-porters archive are probably enough, though the Perl equivalent of http://rubydramas.com/ could add some flavor....
-
Commented on CPAN::Nearest is now Text::Fuzzy
Nice -- I enjoyed the description of the heuristics you use to avoid the full dynamic programming....
-
Commented on What would Psychic::Ninja do?
I think the output format sniffing is too ambitious, and may be counterproductive since knowing both input and output types could make the program much smarter. For example, if you know your input is HTML and your output is CSV,...
-
Commented on What's wrong with CPAN?
> I don't think I've ever submitted a review for a module. I should, but I don't. I'm not really sure why. I'm a bit stumped as well. For some reason, people will buy something on Amazon, get it in...
-
Commented on What's wrong with CPAN?
what educated_foo said! (I can't believe I just typed that.) Even a stopped clock... Frighteningly, I found myself agreeing with you in another thread....
-
Commented on What's wrong with CPAN?
Whipupitude: Your "SEE ALSO" section should read like the "prior work" in an academic paper. It should list similar things, and explain why yours is different or better. Poor design: These are ideological problems too often to worry about them....
-
Commented on Don't release experiments to CPAN
People aiming to write stable releases could avoid non-stable deps, the same way people writing "tiny" releases already avoid non-core deps This sounds like a good idea. One place to start would be to add DSLIP filtering to MetaCPAN, search.cpan.org,...
-
Commented on Don't release experiments to CPAN
I meant the D field of the DSLIP. Maybe they're the same....
Comment Threads
-
mascip commented on
Indented comments
PS: like educated_foo, i use comments only to express the purpose of the paragraph. Not implementation details. Reading only the comments, you should understand what my code does.
-
Aristotle commented on
Indented comments
The way I see comments is: they are not there to say what the code is for or is supposed to – that’s what documentation is for; they are also not there to say how the code does it – the code itself should make that clear; but if after understanding what the code is for and how it goes about, your first thought would be “why on Earth does it do it this way, when it would be so much more understandable/less work/more robust/etc to do in this more obvious way”, and if the original author of the code had a good reason not to do it that way…
-
Aristotle commented on
Indented comments
Or to put it another way, the point of a comment is to stop the next maintenance programmer from trying to “improve” the code without awareness of whatever specific reason was behind the strangeness.
(There is also a converse at work here: it tells the maintenance programmer to check if that reason still holds, and if not, to clean up the code accordingly. The trivial case of this is the well-known FIXME.)
-
Michael G Schwern commented on
Improved autobox-ing. I'm loving it :o)
As a point of information, you mentioned Method::Signatures for code that doesn't need speed optimizing implying that the signatures would slow things down.
Method::Signatures has little overhead itself. With the exception of the type checks, all code is inlined. The required argument checks are little more than things like "@_ > 2". Code like "method foo($this, $that)" is essentially free.
Type checks have the cost of type checks. Mouse type checks for the basic types are exceptionally fast and basically free. Moose type checks are another matter. We're working on m…
-
mascip commented on
Improved autobox-ing. I'm loving it :o)
Thank you for the explanation and sorry for the mistake, i won't make it again.
I've also read that you might make type checks disable-able, maybe with an environment variable. Thus enabling to develop with type-checks, without slowing down the program in production.
About blogs.perl.org
blogs.perl.org is a common blogging platform for the Perl community. Written in Perl and offering the modern features you’ve come to expect in blog platforms, the site is run by Dave Cross and Aaron Crane, with a design donated by Six Apart, Ltd.