Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6-lwp-gsoc, 2014-09-05

| Channels | #perl6-lwp-gsoc index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
01:58 FROGGS_ joined #perl6-lwp-gsoc
06:37 sergot morning o/
06:44 sergot FROGGS++ (optional https)
06:44 sergot I have a question
06:45 sergot isn't "$url.substr(4, 1) eq 's'" faster than "$url ~~ /^https/"?
06:47 sergot another one:
06:47 sergot it wont run ssl tests, right?
06:49 sergot we should also assign it to $conn here: https://github.com/sergot/http-useragent/blob/master/lib/HTTP/UserAgent.pm6#L94
06:53 sergot the last problem, I noticed it a few days ago, panda doesn't install some dependencies.
06:54 sergot actually, it doesn't install the last one
06:54 sergot MIME::Base64 in this case
06:59 sergot or it may be a problem with "refreshing" META file
07:05 moritz sergot: you should to $url.substr(0, 5) eq 'https'
07:06 moritz sergot: checking just one character feels slightly fragile
07:15 dalek http-useragent: 69fef63 | sergot++ | lib/HTTP/UserAgent.pm6:
07:15 dalek http-useragent: fix SSL connection - assigning to $conn
07:15 dalek http-useragent: review: https://github.com/sergot/http-useragent/commit/69fef633f4
07:15 dalek http-useragent: 326176d | sergot++ | t/09-ua-ssl.t:
07:15 dalek http-useragent: Skip only when IO::Socket::SSL is not available
07:15 dalek http-useragent: review: https://github.com/sergot/http-useragent/commit/326176d46e
07:15 dalek http-useragent: 4679036 | sergot++ | / (2 files):
07:15 dalek http-useragent: mark SSL optional as done, version++
07:15 dalek http-useragent: review: https://github.com/sergot/http-useragent/commit/4679036e24
07:15 sergot moritz++ # thanks
07:15 sergot anyway, .substr is faster, isnt it?
07:17 dalek http-useragent: ff303ac | sergot++ | README.md:
07:17 dalek http-useragent: bold instead of italics
07:17 dalek http-useragent: review: https://github.com/sergot/http-useragent/commit/ff303acfb9
07:20 FROGGS_ sergot: that was the reason why I changed it, "blars://" does not imply SSL :o)
07:21 FROGGS_ ohh dang, I forgot to make the tests skip conditionally # sergot++
07:22 sergot FROGGS_: oh, right, shame on me :)
07:23 FROGGS_ sergot: I dunno is substr is faster than a match, but you could bench it :P
07:23 FROGGS_ I just chose to use the regex because it is easier to put in alternatives this way, in case we will have some in future
07:24 sergot ok :)
07:26 * sergot is reading about Promises
08:19 sergot $ time perl6  -e '"https://".substr(0, 5) eq "https" for ^1000000'
08:19 sergot real0m11.413s
08:20 sergot $ time perl6 -e '"https://" ~~ /^https/ for ^1000000'
08:20 sergot real0m13.379s
08:21 FROGGS hmmm, I had expected a larger difference
08:23 sergot $ time perl6 -e '"https://" ~~ m/^https/ for ^1000000'
08:23 sergot real1m52.301s
08:23 sergot why it takes so long with 'm'?
08:24 sergot 'does it take' actually
08:37 moritz because it does moar operations
08:37 moritz m/.../ immediately matches
08:37 moritz creates a Match object
08:37 moritz and then smart-matches the string against the Match
08:42 sergot moritz++ thanks :)
15:07 dalek joined #perl6-lwp-gsoc
15:44 FROGGS joined #perl6-lwp-gsoc

| Channels | #perl6-lwp-gsoc index | Today | | Search | Google Search | Plain-Text | summary