Perl 6 - the future is here, just unevenly distributed

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

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

All times shown according to UTC.

Time Nick Message
01:32 FROGGS_ joined #perl6-lwp-gsoc
06:12 sergot morning o/
06:18 dalek openssl: d2befe3 | sergot++ | lib/OpenSSL.pm6:
06:18 dalek openssl: trait_mod<is> trick
06:18 dalek openssl: review: https://github.com/sergot/openssl/commit/d2befe3af0
06:21 sergot Yes, it fixed the bug
06:25 dalek io-socket-ssl: acfa59d | sergot++ | lib/IO/Socket/SSL.pm6:
06:25 dalek io-socket-ssl: trait_mod<is> trick
06:25 dalek io-socket-ssl: review: https://github.com/sergot/io-socket-ssl/commit/acfa59d5e3
06:47 FROGGS joined #perl6-lwp-gsoc
06:50 dalek http-useragent: f13e3ee | sergot++ | META.info:
06:50 dalek http-useragent: author added
06:50 dalek http-useragent: review: https://github.com/sergot/http-useragent/commit/f13e3eeef9
06:51 dalek openssl: 1fe0963 | sergot++ | META.info:
06:51 dalek openssl: author added
06:51 dalek openssl: review: https://github.com/sergot/openssl/commit/1fe096380a
06:52 dalek io-socket-ssl: f23bbc7 | sergot++ | META.info:
06:52 dalek io-socket-ssl: author added
06:52 dalek io-socket-ssl: review: https://github.com/sergot/io-socket-ssl/commit/f23bbc73dc
06:52 sergot FROGGS: hi! :)
06:52 FROGGS hi sergot
06:52 sergot FROGGS: I've fixed that bug, could you check it ? :)
06:52 FROGGS ohh nice!
06:52 FROGGS yes, will do
06:57 sergot great :)
06:58 FROGGS io-socket-ssl$ perl6-m -Ilib test.p6
06:58 FROGGS Response: Buf:0x<48 54 54 50 2f 31 2e 31 20[...]
06:58 FROGGS seems to work \o/
06:58 FROGGS sergot++
06:59 sergot \o/
06:59 sergot another bug is about 'iso-8859-2'
07:00 sergot FROGGS: do you have some time now?
07:00 FROGGS like 40mins, yeah
07:01 FROGGS what exactly is encoded that way?
07:02 sergot in my case it's google.com
07:02 sergot my $response = $ua.get('http://google.com/');
07:05 sergot you can use ex_example.p6 from http-useragent repo
07:06 FROGGS do you mean ex_readme.p6 by any chance?
07:07 sergot ohh, yes
07:07 sergot sorry :)
07:08 FROGGS it prints the html source of your page, and then stops with:
07:08 FROGGS Response error: '404 Not Found'
07:08 FROGGS in method get at lib/HTTP/UserAgent.pm6:133
07:08 FROGGS in block  at ex_readme.p6:1
07:08 FROGGS err, ex_readme.p6:14
07:08 sergot yes, that's correct, replace filip.sergot.pl with google.com
07:08 FROGGS ahh
07:09 FROGGS perl6-m ex_readme.p6
07:09 FROGGS Type check failed in assignment to '$url'; expected 'Str' but got 'HTTP::Header'
07:09 FROGGS in method get at lib/HTTP/UserAgent.pm6:130
07:09 FROGGS in block  at ex_readme.p6:6
07:10 sergot git pull
07:10 sergot I've fixed that alraedy
07:10 sergot :)
07:10 FROGGS http-useragent$ git pull
07:10 FROGGS Already up-to-date.
07:10 FROGGS ahh wait
07:10 FROGGS need to reinstall
07:10 sergot This was about redirects
07:14 FROGGS http-useragent$ perl6-m ex_readme.p6
07:14 FROGGS <!doctype html><html itemscope="" itemtype="http://schema.org/WebPage" lang="de">[...]
07:14 sergot umm
07:15 sergot yes
07:15 sergot because you are in iso-8859-1 standard, and Poland is in -2 I think
07:15 FROGGS that's also what I think, yes
07:16 sergot We should do something with this anyway
07:16 sergot right?
07:16 sergot brb
07:16 FROGGS I guess we have to map such an input stream to utf8 so that it'll work on all backends without much fuzz
07:17 FROGGS this can (should?) be moved to nqp or rakudo at some point I think
08:06 sergot Can we just .decode to 'utf8' always?
08:06 sergot or did you mean something else?
09:04 moritz joined #perl6-lwp-gsoc
09:56 * sergot is writing a blogpost about gsoc
10:08 FROGGS joined #perl6-lwp-gsoc
10:12 FROGGS sergot: when you decode to utf8, won't your chars with accents be mangled and displayed as the 8859-1 chars with the same ord?
10:34 FROGGS when there is a byte 0xA3 in that buf, it should look like Ł and not £ for example
10:36 sergot FROGGS: true
10:45 moritz "decode to utf8" doesn't make sense
10:45 moritz either you decode, then it's into Perl 6's internal format, whatever that is
10:45 moritz and you simply get a Str
10:45 moritz or you encode to a specific encoding (and get a Buf)
10:46 moritz in the case of HTTP header, they should be ASCII
10:46 moritz but it's safer to decode the header as Latin-1, so that it won't barf on non-ASCII characters
10:47 moritz and then look at the content type for how to decode the body (if at all; you wouldn't Str-decode a PNG)
10:47 moritz basically only if the content-type is text/*
10:51 sergot moritz: I noticed that p6 doesnt handle Latin-2 e.g.
10:51 sergot What in such cases?
11:25 moritz teach it to handle it?
13:56 sergot hm, we can do this :)
18:21 FROGGS joined #perl6-lwp-gsoc
18:23 FROGGS yay, my HTTP::Status PR got merged
19:04 sergot \o/
19:36 dalek joined #perl6-lwp-gsoc
23:04 dalek joined #perl6-lwp-gsoc

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