Perl 6 - the future is here, just unevenly distributed

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

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

All times shown according to UTC.

Time Nick Message
01:26 FROGGS_ joined #perl6-lwp-gsoc
03:15 FROGGS[mobile] joined #perl6-lwp-gsoc
06:10 sergot o/
06:40 sergot oh, I've just found my module I wrote 2 years ago, and it's not in the ecosystem
06:40 sergot and I dont know why
06:40 sergot https://github.com/sergot/file-path
06:40 sergot could you take a look?
07:15 FROGGS_ sergot: what should I look at?
07:16 FROGGS_ I think Shell::Command also offers this functionality
07:18 FROGGS_ yeah, all but ls_R are provided by Shell::Command
07:18 FROGGS_ ls_R itself can be done by using File::Find
07:27 sergot yeah, nvm :)
07:27 sergot working on Encode
07:28 sergot FROGGS_: is my %h = 'a' => 'a'; the same as a => 'a' ?
07:29 FROGGS_ yes
07:29 FROGGS_ the fat arrow auto quotes
07:30 FROGGS_ are you going to create a script that parses the mappings from ftp.unicode.org?
07:30 FROGGS_ this could the generate a hash oo an array or so
07:30 FROGGS_ or*
07:31 dalek perl6-encode: 286b1fd | sergot++ | / (4 files):
07:31 dalek perl6-encode: prototype
07:31 dalek perl6-encode: review: https://github.com/sergot/perl6-encode/commit/286b1fd29c
07:31 sergot FROGGS_: what do you think about this?
07:32 FROGGS_ I'd only do one hash lookup, and stick &latin2 in the first hash
07:34 sergot Should it work on Str or buf8?
07:35 sergot or both
07:35 sergot ?
07:36 FROGGS_ on buf8 I'd say
07:36 FROGGS_ let's do not make Perl 5's faults and easily allow en./decoding strings several times
07:36 FROGGS_ en-*
07:37 sergot ok :)
07:56 sergot FROGGS: what is the easiest way to change str to buf8?
08:03 FROGGS $str.encode('ascii') I think
08:03 FROGGS but why do you want to do that?
08:04 sergot just in tests.
08:04 sergot change-to-buf8("hey, i'm just a test Å‚Å‚ Ä…Ä…Ä…") ...
08:04 sergot in t/01-basic.t
08:04 FROGGS k
08:05 FROGGS then you probably just want to .encode it (using utf8 implicitly)
08:05 FROGGS I think
08:07 sergot it returns utf8 object I think
08:08 sergot ok got it
08:09 FROGGS the question is: what exactly does the other buffer contain for Å‚?
08:09 FROGGS k
08:09 FROGGS I guess a single byte
08:17 sergot 10:13 < sergot> m: say buf8.new("Ł".encode);
08:17 sergot 10:13 <+camelia> rakudo-moar 9e15cc: OUTPUT«Buf:0x<c5 81>␤»
08:26 FROGGS[mobile] that is utf8
08:27 FROGGS[mobile] and probably not what you want for latin2 tests
08:31 dalek perl6-encode: 0d7de96 | sergot++ | lib/Encode.pm6:
08:31 dalek perl6-encode: one lookup hash removed
08:31 dalek perl6-encode: review: https://github.com/sergot/perl6-encode/commit/0d7de96876
08:31 dalek perl6-encode: 5a4dd07 | sergot++ | lib/Encode.pm6:
08:31 dalek perl6-encode: make it works on buf8
08:31 dalek perl6-encode: review: https://github.com/sergot/perl6-encode/commit/5a4dd07bed
08:31 dalek perl6-encode: 20bfab9 | sergot++ | / (4 files):
08:31 dalek perl6-encode: Latin2 encoding added
08:31 dalek perl6-encode: review: https://github.com/sergot/perl6-encode/commit/20bfab97ed
08:31 sergot what about this?
08:31 sergot anyway, we have only "special" chars there, what about normal ones, like "L", "A". .. .. ?
08:34 FROGGS[mobile] you either map them to the same codepoint (then you can use a 256 element array for each encoding), or you let it fall back to the same codepoint
08:36 FROGGS[mobile] the array would only work in one direction sadly
08:37 FROGGS[mobile] look at how windows1252 is done in MoarVM
08:37 sergot ok
08:38 FROGGS[mobile] there is an array for buf2str, and an if/else tree for the other way
08:39 FROGGS[mobile] because you probably want to replace non-latin2 chars with '?' when decoding a unicode string to a latin2 buf
08:39 dalek perl6-encode: c3e299a | sergot++ | / (2 files):
08:39 dalek perl6-encode: add hadling normaln characters
08:39 dalek perl6-encode: review: https://github.com/sergot/perl6-encode/commit/c3e299a560
08:39 sergot would this work?
08:40 FROGGS[mobile] yes
08:40 sergot \o/
08:41 FROGGS[mobile] (for one direction)
08:41 FROGGS[mobile] :o)
08:41 sergot yeah :)
08:41 FROGGS[mobile] but that might be enough for the current needs
08:42 FROGGS[mobile] bbl
08:42 dalek perl6-encode: 6538f63 | sergot++ | t/01-latin2.t:
08:42 dalek perl6-encode: test messages fixed
08:42 dalek perl6-encode: review: https://github.com/sergot/perl6-encode/commit/6538f63010
08:42 sergot okok
08:50 dalek perl6-encode: 6a1bb99 | sergot++ | / (4 files):
08:50 dalek perl6-encode: die on niy encoding
08:50 dalek perl6-encode: review: https://github.com/sergot/perl6-encode/commit/6a1bb9934a
08:50 sergot die or exception? :)
08:51 FROGGS[mobile] exception
08:51 sergot X::NYI is better here, isn't it
08:51 sergot ?
08:52 FROGGS[mobile] X::Encode::Unkown?
08:53 sergot hm, ok
08:58 dalek perl6-encode: ad70cee | sergot++ | / (2 files):
08:58 dalek perl6-encode: throws exception instaed of dying
08:58 dalek perl6-encode: review: https://github.com/sergot/perl6-encode/commit/ad70ceed98
08:58 sergot done
09:01 dalek perl6-encode: 803b944 | sergot++ | META.info:
09:01 dalek perl6-encode: provides added to META.info
09:01 dalek perl6-encode: review: https://github.com/sergot/perl6-encode/commit/803b94460d
09:01 * sergot is adding this module to the ecosystem
09:04 dalek http-useragent: 83cb6ce | sergot++ | META.info:
09:04 dalek http-useragent: Encode addes as a dependency
09:04 dalek http-useragent: review: https://github.com/sergot/http-useragent/commit/83cb6ce04c
09:08 sergot FROGGS: what do you think to wrap every available encoding, like ascii in the Encode module?
09:08 sergot to make us able to write Encode::decode('ascii', $sth);
09:08 sergot is it ok?
09:10 dalek http-useragent: db4b0a7 | sergot++ | META.info:
09:10 dalek http-useragent: provides to META.info added
09:10 dalek http-useragent: review: https://github.com/sergot/http-useragent/commit/db4b0a703a
09:10 FROGGS[mobile] do not wrap it, just delegate to rakudo
09:11 dalek http-useragent: 9e821cb | sergot++ | lib/HTTP/UserAgent.pm6:
09:11 dalek http-useragent: remove &latin-to-u
09:11 dalek http-useragent: review: https://github.com/sergot/http-useragent/commit/9e821cbcd7
09:12 sergot so, we'll have to write if encoding eq 'iso-8859-2' .... { # use Encode::decode heere; otherwise use .encode
09:12 sergot or am I wrong?
09:14 sergot in HTTP::UserAgent I meanty
09:14 sergot -y *
09:15 FROGGS[mobile] no, do that in Encode
09:15 FROGGS[mobile] perhaps that was what you proposed?
09:15 sergot Yes. :)
09:16 sergot isn't "wrap" a good word here?
09:17 FROGGS[mobile] perhaps it is :o)
09:18 sergot hehe, ok :)
09:22 dalek http-useragent: 9343a64 | sergot++ | t/09-ua-ssl.t:
09:22 dalek http-useragent: plan added
09:22 dalek http-useragent: review: https://github.com/sergot/http-useragent/commit/9343a6416c
09:44 dalek perl6-encode: 3f8655a | sergot++ | / (2 files):
09:44 dalek perl6-encode: utf8 added
09:44 dalek perl6-encode: review: https://github.com/sergot/perl6-encode/commit/3f8655a5af
10:05 dalek perl6-encode: 70d54da | sergot++ | / (2 files):
10:05 dalek perl6-encode: iso-8859-1 added
10:05 dalek perl6-encode: review: https://github.com/sergot/perl6-encode/commit/70d54da8bb
10:08 dalek perl6-encode: 04960f6 | sergot++ | / (2 files):
10:08 dalek perl6-encode: ascii added
10:08 dalek perl6-encode: review: https://github.com/sergot/perl6-encode/commit/04960f6b6f
10:09 sergot http-useragent works now
10:10 FROGGS[mobile] \o/
10:10 sergot aaaaanddd....
10:10 sergot now!
10:10 dalek http-useragent: 2ff14cf | sergot++ | lib/HTTP/UserAgent.pm6:
10:10 dalek http-useragent: use Encode modules instead of built-in .decode method
10:10 dalek http-useragent: review: https://github.com/sergot/http-useragent/commit/2ff14cfe88
10:10 sergot \o/
10:11 sergot All tests successful.
10:12 sergot 3test
10:12 sergot ups
10:12 sergot 3 test
10:12 sergot 3All tests successful.
10:12 sergot :)
10:15 FROGGS[mobile] *g*
10:20 sergot Encode looks nice I think
22:53 sergot joined #perl6-lwp-gsoc
22:57 sergot joined #perl6-lwp-gsoc
22:57 FROGGS joined #perl6-lwp-gsoc
22:57 moritz joined #perl6-lwp-gsoc
22:57 dalek joined #perl6-lwp-gsoc

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