stas
- Website: github.com/creaktive
- About: Perl Programmer. Cloud Explorer.
Recent Actions
-
Posted Seamless Proxy Auto-Config for CLI apps to stas
Suppose you are in a corporate network environment and often times find yourself manually setting/unsetting the
HTTP_PROXY
environment variable in order to access different hosts (for instance, "yay proxy" for the external hosts and "nay proxy" for the internal… -
Commented on Web Scraping with Modern Perl (Part 1)
Thanks a lot for figuring this out, Scott! I've already fixed the gist....
-
Posted YAPC::EU 2013 afterimage to stas
This was the biggest Perl event I've attended so far. Also, it was the first one I've attended outside of Brazil. And I'm happy to see that there is so many people in Ukraine who are passionate about Perl! So, listing some of my impressions below.
-
Commented on Ludic Perl
Thanks Toby! This also reminded me of Perl Top Users @ Stack Overflow....
- Posted Ludic Perl to stas
-
Posted Web Scraping with Modern Perl (Part 2 - Speed Edition) to stas
tl;dr
Grab the gist with the complete, working source code. Benchmark it against the one featured on the ="https://blogs.perl.org/users/stas/2013/01/web-scraping-with-mod…
-
Commented on Put a fancy CPU/RAM usage chart in tmux status bar
Thanks, Sawyer X! BTW, rainbarf is on the CPAN now, right where it belongs: https://metacpan.org/module/rainbarf...
-
Posted Put a fancy CPU/RAM usage chart in tmux status bar to stas
Prologue
So, once upon a time I had a crazy idea: to put an almost complete resource meter into the tmux status bar. You know, the clock is so boring. Let's add a battery indicator there. And the load numbers. And the memory usage...
Nee…
-
Posted Web Scraping with Modern Perl (Part 1) to stas
tl;dr
Grab the gist with the complete, working source code.
I often hear the question: "so, you're Perl guy, could you show me how to make a web crawler/spider/scraper, then?" I hope this post series will become my ultimate a…
-
Posted Merry XS-mas! to stas
Some time ago, I've acknowledged the LWP::Protocol::Net::Curl existence here. Lots of things
-
Commented on cpantimes
Great job! My two cents: the non-verbosity of cpantimes make it hard to figure out if it is actually working, so I'd mention http://metabase.cpantesters.org/tail/log.txt as a debug aid....
-
Commented on CPAN module recommendation system
Thanks for your comments :) @Olaf: I'll have to polish API/JS side a bit before tweaking MetaCPAN. Querying module recommendations from MetaCPAN will add an unique feature: the per-module recommendations will take into account logged user's favorites/dependencies. So, every user...
-
Posted CPAN module recommendation system to stas
A little confession/reasoning/backstory: I love CPAN surfing. You know, watching the latest releases, browsing module dependencies and other modules by the same authors... And favoriting the interesting stuff. Stats show that I'm…
-
Commented on Categorizing CPAN modules
Thanks for raising an issue, Steven! Your post made me unbox and polish a toy project of mine which envolves tapping into the collective wisdom of Perl community: CPAN::U is a collaborative filter based recommendation system for Perl developers. It...
-
Commented on TMTOWTDI, plus benchmarking
Awesome :D I hope you plan to release this code as Sort::Key::Top::PP and/or integrate it into Sort::Key::Top as a fallback when compiler is unavailable....
-
Commented on TMTOWTDI, plus benchmarking
Did it using binary search (code stolen from List::BinarySearch): pureperl3 => sub { my @top; for my $word (keys %words) { if (@top $words{$top[0]}) { unless (@top) { @top = ($word); } else { my ($low, $high) = (0, scalar...
-
Commented on TMTOWTDI, plus benchmarking
Excellent point! I've forgot completely to point that both quickselect and selection-by-sorting algorithms execute in a linear time. So, the quickselect/quicksort performance ratio of 10x will be the same while selecting 10 or 1000 elements. I am not good at...
-
Posted TMTOWTDI, plus benchmarking to stas
There's a very common Perl idiom for getting "top N elements" from an array:
@top = (sort @a) [0 .. $n - 1]
. Mostly, it's good enough for anything one would dare to store in RAM.Then, there is Sort::Key:…
-
Posted Google Refine + Perl to stas
Google Refine is awesome. If you're unaware of what it is, access their official page an…
-
Commented on libcurl as LWP backend (or "all your protocol are belong to us")
In a few keystrokes: use LWP::Protocol::Net::Curl sslversion => 3;. 3 means to force SSLv3, while 1 means TLSv1. However, the right way of doing this would be use Net::Curl::Easy qw(:constants); and then accessing the constants CURL_SSLVERSION_TLSv1 or CURL_SSLVERSION_SSLv3. Check http://curl.haxx.se/libcurl/c/curl_easy_setopt.html#CURLOPTSSLVERSION...
-
Posted libcurl as LWP backend (or "all your protocol are belong to us") to stas
Suppose you are planning to scrap a few thousands of pages using WWW::Mechanize.
Over HTTPS. Via SOCKS5 tunnel. On an aged CentOS box (think Perl v5.8). With no root privileges. Bonus points if it uses HTTP compression. Better prepare for some serious yak shaving.
If only WWW::Mech…
-
Commented on HTML-Tree 5: Now with weakref support
What do you think about https://rt.cpan.org/Ticket/Display.html?id=72975 ? :)...
Comment Threads
-
Toby Inkster commented on
cpantimes
If there's an error sending a report, then you should get a stack trace dumped to STDERR.
It would be nice to also mention successfully sending a report. They annoying thing is that the test is run after cpanminus has printed "Building and testing $dist ..." but before it prints "OK\n". So if I want cpantimes to print anything, it needs to be between them. :-(
Ideas for a good way to proceed would be welcome.
-
Hercynium commented on
cpantimes
This is really great!
Since cpanminus, one of the few reasons I still use CPAN.pm at all is to send test reports for dists that unexpectedly fail.
Have you checked with miyagawa on getting this functionality into cpanm? Perhaps as a plugin? (I remember that cpanm was going to support plugins at one point but it looks like those plans were put aside some time ago)
-
Ether commented on
cpantimes
It would be nice to also mention successfully sending a report.
It would be *very* useful indeed to print the URL of the submitted report.
-
https://me.yahoo.com/a/_69n7mM4udJCGK3Q97vL2m2knx.UCoJr#50374 commented on
Put a fancy CPU/RAM usage chart in tmux status bar
Hiya,
I can't get the bars to show up like you have (https://github.com/creaktive/rainbarf#iterm2-with-tmux-powerline-solarized-theme-and-terminus-font)I am using OSX, iTerm2, Solarized, and tried terminus, but it still donesnt work.
Cheers
Ian -
https://www.google.com/accounts/o8/id?id=AItOawlsH6xT98cO8R6i25T3JKnyf3im9QgVvvA commented on
Web Scraping with Modern Perl (Part 1)
Hey Great tutorial. thx.
So let's say I want to access the dom for each page that's traversed? How do I do that? Also what is
push @urls, $link;
doing in parse_html, it doesn't seem to do anything (at least I can comment it out and it makes no difference).
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.