Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6-lwp-gsoc, 2014-07-23

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

All times shown according to UTC.

Time Nick Message
01:14 FROGGS__ joined #perl6-lwp-gsoc
06:15 sergot o/
07:03 FROGGS[mobile] joined #perl6-lwp-gsoc
07:12 FROGGS[mobile] joined #perl6-lwp-gsoc
07:19 FROGGS__ morning
08:12 * sergot is writing the crawler
08:29 FROGGS__ :o)
08:33 sergot Can I get all urls from a site using grammars?
08:34 sergot a\shref '=' \" <url> \" or something?
08:34 sergot I mean, could you help me? I tried some regexes like this one above and they didn't work
08:47 FROGGS__ I'd try: @links = $doc.match(/ \s 'href="' (<-["]>+) '"' /, :g).map({ $_[0] })
08:49 sergot nice, it works!
08:49 FROGGS__ hehe
08:50 FROGGS__ then it must be true what this page writes about me: http://osrc.dfm.io/froggs/
08:50 FROGGS__ :P
08:52 sergot hehe, it is :)
08:52 sergot " It seems like Filip is—or should be—friends with Tobias Leich. "
08:52 sergot interesting site :)
08:52 FROGGS__ :o)
08:55 sergot you have some pushes about 4am!
08:55 FROGGS__ O.o
08:55 sergot or 5
08:55 FROGGS__ perhaps not 4am in our timezone
08:58 sergot oh, maybe :)
09:05 sergot how does try-catch work in p6|?
09:06 sergot try { $ua.get($url) } CATCH { say 'error'; } should work|?
09:09 FROGGS__ no, the catch is in the try block
09:09 FROGGS__ and you usually need a default block within the try
09:09 FROGGS__ (or you switch of exception type)
09:50 sergot FROGGS__++
09:50 dalek http-useragent: 8df0586 | sergot++ | crawler.p6:
09:50 dalek http-useragent: add crawler.p6
09:50 dalek http-useragent:
09:50 dalek http-useragent: to test what works and what not
09:50 dalek http-useragent: review: https://github.com/sergot/http-useragent/commit/8df0586aa1
09:50 sergot thanks
09:51 sergot connection to a ssl site takes long time
09:52 FROGGS__ yes, ssl handshake is costly
09:52 FROGGS__ but also these carray-to-str or what these are called should be improved at soume point
09:53 sergot yeah, I think it should be done now.
09:53 FROGGS__ also the usages of buf8.new(|@array)
09:53 sergot what do you mean?
09:53 FROGGS__ no, please test more sites before optimizing the code
09:54 FROGGS__ this: https://github.com/sergot/openssl/blob/master/lib/OpenSSL.pm6#L69
09:54 sergot ok :)
09:56 sergot FROGGS__: https://github.com/sergot/perl6-encode/blob/master/lib/Encode.pm6
09:56 sergot can we use Buf instaed of buf8 here?
09:57 sergot I think so
10:01 dalek http-useragent: 727cbcb | sergot++ | crawler.p6:
10:01 dalek http-useragent: getting urls moved to sub get-urls
10:01 dalek http-useragent: review: https://github.com/sergot/http-useragent/commit/727cbcbc82
10:02 FROGGS__ buf8 is a Buf
10:03 FROGGS__ but yeah, you can use Buf or Blob in the signatures
10:56 dalek perl6-encode: 1e5cf63 | sergot++ | lib/Encode.pm6:
10:56 dalek perl6-encode: Buf instead of buf8
10:56 dalek perl6-encode: review: https://github.com/sergot/perl6-encode/commit/1e5cf6387b
11:04 sergot FROGGS__: https://github.com/sergot/http-useragent/blob/master/lib/HTTP/UserAgent.pm6#L157
11:04 sergot FROGGS__: what about e.g. Content-Type: application/atom+xml
11:04 sergot ?
11:22 FROGGS__ good question
11:22 FROGGS__ I'd leave it as a buf
11:23 FROGGS__ because one would have to look at the xml's charset tag to encode it properly
11:37 sergot ok :)
11:52 sergot FROGGS__: anyway, can we merge this:
11:53 sergot https://github.com/rakudo/rakudo/pull/294
11:53 sergot ?
11:53 FROGGS__ probably, though the explicit '' makes pretty clear what it does
12:21 sergot did you see what people write on #perl6?
12:22 FROGGS__ yes
12:23 FROGGS__ though it is hard to debug when you don't have a machine available where it fails on
12:24 sergot yeah
13:30 FROGGS[mobile] joined #perl6-lwp-gsoc
16:47 dalek http-useragent: 6485afc | sergot++ | README.md:
16:47 dalek http-useragent: THANKS TO MJ41: PR#33
16:47 dalek http-useragent: review: https://github.com/sergot/http-useragent/commit/6485afc4bc
16:48 dalek http-useragent: bfcc2f9 | (Michal Jurosz)++ | README.md:
16:48 dalek http-useragent: Fix method names
16:48 dalek http-useragent: review: https://github.com/sergot/http-useragent/commit/bfcc2f9f09
16:48 dalek http-useragent: 920c1b9 | (Filip Sergot)++ | /:
16:48 dalek http-useragent: Merge pull request #33 from mj41/patch-1
16:48 dalek http-useragent:
16:48 dalek http-useragent: Fix method names
16:48 dalek http-useragent: review: https://github.com/sergot/http-useragent/commit/920c1b908b
16:48 sergot ym, ok
16:48 sergot done twice :)

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