Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2014-10-26

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00:00 raiph goodnight #perl6
00:02 colomon forth++
00:05 colomon I don't see how that deserves to be called Forth -- it's basically just a simple RPN calculator with . added to print results
00:06 colomon though compiling to assembly is kind of crazy
00:06 * colomon is trying to resist the temptation...
00:12 * colomon wonders whether his Forth implementation is relying on undocumented behavior
00:12 xfix joined #perl6
00:13 colomon m: say 10 div 4
00:13 camelia rakudo-moar 315ec6: OUTPUT«2␤»
00:13 colomon m: say 4 Rdiv 10
00:13 camelia rakudo-moar 315ec6: OUTPUT«2␤»
00:27 colomon https://gist.github.com/colomon/2bb128f3b40df3ffaee8 # simple stack intepreter
00:27 * colomon tries to resist adding the ability to compile new words to it....
00:45 colomon https://gist.github.com/colomon/2bb128f3b40df3ffaee8 # now with the ability to add new words, starting to look like a Forth
00:53 SHODAN joined #perl6
01:09 j4jackj joined #perl6
01:21 aindilis joined #perl6
02:23 timotimo i must say: not having any practical experience with x86 and x86_64 and "long mode" makes it kinda hard to implement stuff for moarvm's jit ...
02:23 timotimo i'm struggling to get dynasm to accept my attempts at implementing brshift_i and blshift_i
03:00 noganex joined #perl6
03:18 noganex_ joined #perl6
03:24 avuserow joined #perl6
04:13 molaf_ joined #perl6
04:18 mauke_ joined #perl6
04:19 dalek roast: cb97064 | (David Warring david.warring@gmail.com)++ | S05-mass/charsets.t:
04:19 dalek roast: Revert "refudged parrot blank chars - still failing, e.g.:"
04:19 dalek roast:
04:19 dalek roast: This reverts commit 03f5fc743eb9c3c9bded68241564f851b5587061.
04:19 dalek roast: Accidently checked in other junk junk along with this refudge,
04:19 dalek roast: review: https://github.com/perl6/roast/commit/cb9706421e
04:19 dalek roast: ee9b239 | (David Warring david.warring@gmail.com)++ | S (6 files):
04:19 dalek roast: Merge branch 'master' of https://github.com/perl6/roast
04:19 dalek roast: review: https://github.com/perl6/roast/commit/ee9b239807
04:19 dalek roast: 4e0125c | (David Warring david.warring@gmail.com)++ | S05-mass/charsets.t:
04:19 dalek roast: refudge blank, punct for parrot 6.8.0 / unicode 5.2
04:19 dalek roast: review: https://github.com/perl6/roast/commit/4e0125c524
04:46 ggoebel111111112 joined #perl6
05:13 [particle] joined #perl6
05:47 Mso150_e joined #perl6
05:51 xenoterracide joined #perl6
06:48 darutoko joined #perl6
06:53 rindolf joined #perl6
06:55 ragz joined #perl6
06:55 ragz hi
06:55 ragz whoami
06:55 ragz who is this
06:56 bonsaikitten what :D
07:10 rindolf joined #perl6
07:20 sivoais joined #perl6
07:46 FROGGS[mobile] joined #perl6
07:47 lizmat_ good *, #perl6!
07:51 lizmat commute to T-Dose, day 2
07:51 lizmat &
07:53 woolfy left #perl6
07:53 masak good daylight savings morning, #perl6
07:55 vendethiel joined #perl6
07:56 FROGGS[mobile] morning
07:57 FROGGS[mobile] tadzik: are we going to implement the report receiving service in Perl 6?
07:58 FROGGS[mobile] tadzik: we probably only need HTTP::UA and DBIish
08:00 FROGGS[mobile] tadzik: maybe bailador but then we should patch it to use HTTP::UA
08:06 FROGGS joined #perl6
08:21 vendethiel joined #perl6
08:24 rindolf masak: good morning.
08:41 pdcawley joined #perl6
08:49 lizmat joined #perl6
08:50 ptc_p6 joined #perl6
08:51 lizmat greetings from T-Dose, day 2
08:51 lizmat FROGGS , tadzik: how would this service compare to CPAN Testers ??
08:51 spider-mario joined #perl6
08:52 spider-mario joined #perl6
09:06 James__ left #perl6
09:11 FROGGS lizmat: it would receive our test results
09:11 gfldex joined #perl6
09:11 FROGGS lizmat: so it would be kind of identical in the end
09:12 lizmat so what would be against trying to integrate it with CPAN testers >
09:12 lizmat ?
09:12 FROGGS lizmat: were we care about additional info like backends and such
09:12 lizmat maybe now is the time to talk to mst about this  :-)
09:12 FROGGS lizmat: that we would need their help to fiddle with their database, website, stats generating scripts and so on
09:13 lizmat well, maybe not the time yet to do that just yet, but at least keep it in mind  :-)
09:14 FROGGS lizmat: we would be faster when we do that ourself... it would take O(months) to get that integrated into P5's system that's for sure
09:14 FROGGS I just know that barbie is quite busy and it is hard to even get tiny patches in
09:14 lizmat perhaps something to put on the list of things to do for the next QA hackathon :)
09:15 FROGGS I have not a good feeling about getting this into P5's cpantesters at all
09:15 FROGGS yeah
09:18 rmgk_ joined #perl6
09:20 rurban joined #perl6
09:21 Isp-sec joined #perl6
09:24 Akagi201 joined #perl6
09:27 lizmat I'm pretty sure we can work the backend thing out with cpan-testers
09:27 lizmat although it may be quite some work on their end  :-)
09:41 virtualsue joined #perl6
09:45 woolfy joined #perl6
10:02 kurahaupo joined #perl6
10:12 FROGGS I've got a nice bug:
10:12 FROGGS $ perl6 -e '%*ENV<foo> = 42; run "echo", "1"'
10:12 FROGGS $ perl6 -e 'run "echo", "1"'
10:12 FROGGS 1
10:12 FROGGS $ perl6 -e '%*ENV<foo> ~= 42; run "echo", "1"'
10:12 FROGGS 1
10:20 bartolin $ /perl6-m -e '%*ENV<foo> = 42; say qx[echo 1]'
10:20 bartolin This type cannot unbox to a native string in sub QX at src/gen/m-CORE.setting:847 in block <unit> at -e:1
10:20 bartolin $ perl6-m -e '%*ENV<foo> ~= 42; say qx[echo 1]'
10:20 bartolin 1
10:20 FROGGS ahh
10:20 FROGGS bartolin++
10:20 FROGGS now I know how to fix it :o)
10:21 bartolin ohh, FROGGS++
10:21 moritz \o
10:21 bartolin looked somehow similiar like RT #120529
10:21 synopsebot Link: https://rt.perl.org/rt3//Public/Bug/Display.html?id=120529
10:21 bartolin (that's why I tried with qx[echo 1])
10:22 FROGGS hi moritz
10:22 FROGGS bartolin: it is not really related to that ticket
10:24 bartolin FROGGS: yeah, I thought so as well. I just wanted to try with qx instead of run ...
10:24 bartolin and if the result gave you and idea, great!
10:24 FROGGS yeah, was helpful anyway :o)
10:28 tadzik FROGGS: why do we need UA on the receiving part?
10:29 FROGGS tadzik: I thought that only HTTP::UA implements http properly, but I would be happy to be convinced of the opposite :o)
10:29 tadzik heh, fair point
10:29 tadzik perhaps parts of its code can be adopted by a proper http server
10:30 tadzik or one could go so far to write a bridge between P6 and nginx or something
10:30 tadzik we're PSGI after all, can't be _that_ hard
10:30 FROGGS so yes, Bailador works fine as it is on my box, and we can think about HTTP::UA when we actually know about issues
10:30 tadzik if we can find a snappy enough deserialization mechanism
10:33 moritz which reminds me that I want to profile from-json again soon :-)
10:34 FROGGS moritz++
10:34 lizmat tadzik: it would be nice if we would have a Perl 6 port of Sereal  :-)
10:40 tadzik lizmat: troo
10:40 lizmat think it would be faster as well  :-)
10:41 kjs_ joined #perl6
10:41 tadzik seems to be mostly written in C too
10:42 tadzik well, XS
10:49 lizmat the Sereal library is pure C, afaik
10:49 lizmat the Perl 5 interface is XS indeed
10:50 lizmat I think  it should be possible to use NatveCall for the Sereal interface
11:08 denis_boyun_ joined #perl6
11:22 colomon I can confirm (just checked source) that the Perl 5 version is just a few lines and calls to XS.
11:24 woolfy lizmat is slightly distracted here at T-DOSE; actually somebody came at our booth with a Perl 5 program with a problem, lizmat++ is helping to solve it (me is so proud)
11:30 timotimo colomon: you mean sereal?
11:30 timotimo ah, yeah
11:30 timotimo ought to be simple-ish to port, then :P
11:35 colomon timotimo: yes
11:35 colomon I'm confused though, I can't find the actual C source.
11:37 BenGoldberg joined #perl6
11:53 lizmat the announcement: http://blog.booking.com/sereal-a-binary-data-serialization-format.html
11:55 leont joined #perl6
12:03 ghostlines joined #perl6
12:17 colomon actually, there's badish news on this front.
12:17 colomon It's C, but it's XS C
12:18 xinming joined #perl6
12:20 timotimo oh? sereal itself is built on top of XS?
12:21 timotimo rather than sereal being a C library that's bound with via XS?
12:27 lizmat huh???   how can it bind to Python then ???
12:27 lizmat that's not how I internalized it
12:28 colomon I might be reading stuff wrong here.
12:29 colomon but SV *info, isn't that an XS data structure?
12:29 lizmat yup
12:30 lizmat ok, scratch Sereal then
12:30 lizmat :-(
12:30 colomon Python version appears to be incomplete
12:30 colomon Java version appears to be a pure Java implementation
12:31 lizmat I can't believe they bound it so tightly to Perl 5 internals
12:32 lizmat so, forget about it...  :-)
12:32 lizmat I will
12:32 colomon the Python implementation has its own set of C files, which are full of PyObject pointers
12:32 colomon lizmat: they wanted something for Perl 5 which was fast.  Makes perfect sense.
12:33 lizmat yeah, I know...   :-)
12:33 * lizmat is just disappointed
12:33 FROGGS tadzik: I've got now a service running that record the submitted reports :o)
12:33 lizmat FROGGS++
12:33 FROGGS so, I'll now wire it up to generate the stats page
12:36 lizmat cool!
12:47 dalek rakudo/nom: 6ef0c72 | (Elizabeth Mattijsen)++ | src/core/CompUnitRepo/Locally.pm:
12:47 dalek rakudo/nom: Fix some signatures and simplify methods
12:47 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/6ef0c72b27
12:49 * colomon is fighting off the urge to convert his primitive Forth in p6 script to primitive Factor in p6...
12:50 ggoebel111111113 joined #perl6
12:51 d4l3k_ joined #perl6
12:52 noganex joined #perl6
12:53 brother| joined #perl6
12:53 yogan_ joined #perl6
12:54 Woodi_ joined #perl6
12:55 ntln joined #perl6
12:57 Juerd joined #perl6
12:57 mattp_ joined #perl6
12:58 daxim joined #perl6
12:58 ggherdov joined #perl6
12:59 dalek panda/reporter: 3f598d3 | (Tobias Leich)++ | / (5 files):
12:59 dalek panda/reporter: submit reports for failure and success
12:59 dalek panda/reporter:
12:59 dalek panda/reporter: (to localhost for now)
12:59 dalek panda/reporter: review: https://github.com/tadzik/panda/commit/3f598d32a0
12:59 ivanshmakov joined #perl6
13:02 lizmat Is there a reason why autogenerated accessors are not multi's?
13:03 lizmat m: class A {}; say A.WHICH  # WHICH comes from Mu:U:
13:03 camelia rakudo-moar 315ec6: OUTPUT«A␤»
13:03 lizmat m: class A { has $.WHICH }; say A.WHICH  # huh?
13:03 camelia rakudo-moar 315ec6: OUTPUT«Cannot look up attributes in a type object␤  in method WHICH at src/gen/m-CORE.setting:3184␤  in block <unit> at /tmp/BA6M8J3n_F:1␤␤»
13:05 lizmat why can't that fall back to Mu's WHICH(Mu:U:) as well ?
13:07 FROGGS because WHICH(A:U:) is more specific
13:10 lizmat eh, where did that come from?
13:10 lizmat why wouldn't we generate the standard accessor with (?CLASS:D:) ?
13:11 FROGGS hmmm, good question
13:13 FROGGS in Attribute.pm:79 it just calls $package.HOW.add_method($package, $meth_name, $meth);
13:14 masak hello #perl6 from a train! \o/
13:14 FROGGS so the accessor will probably just look like WHICH(A:)
13:14 FROGGS hi masak!
13:14 masak hi!
13:14 masak I'm doing a lot of Perl 6 right now, but not much of it is leaking onto the channel.
13:14 masak except for that named-args vs attributes complaint yesterday :0
13:14 masak :)
13:14 lizmat FROGGS: will look at changing that and seeing the fallout for that
13:14 FROGGS lizmat: ahh, in line 27 there is method (Mu $self:), and that could be tweaked
13:14 forestial joined #perl6
13:15 FROGGS also line 39, 48, ...
13:15 immortal joined #perl6
13:15 lizmat yup, will start tweaking, thanks for the poinyer
13:19 akagi201__ joined #perl6
13:26 cibs joined #perl6
13:27 zakharyas joined #perl6
13:28 erkan joined #perl6
13:30 masak does anyone else have this? I feel perfectly happy to do `$.method` on things that are only methods, not attributes -- but I'm more likely to do it if it's a method that returns something.
13:31 masak if it's a method that mainly has a side effect, I'm more likely to do `self.method`
13:33 lizmat fwiw, I'm a little uneasy with using $.method if there is no attribute for it
13:33 molaf__ joined #perl6
13:33 lizmat to the point I would suggest disallowing it
13:34 cxreg2 joined #perl6
13:34 masak I'm not just not uneasy about it -- I think it's wonderfully consistent and should be encouraged.
13:35 masak way I see it, it can only help promote the understanding of the unification between public attributes and methods.
13:35 guru joined #perl6
13:35 * masak writes `$.WHAT` for the first time in code
13:36 rmgk_ joined #perl6
13:37 * masak is surprised when this doesn't work
13:37 masak m: class A { method foo { say self.WHAT } }; A.new.foo
13:37 camelia rakudo-moar 315ec6: OUTPUT«(A)␤»
13:37 masak m: class A { method foo { say $.WHAT } }; A.new.foo
13:37 camelia rakudo-moar 315ec6: OUTPUT«No such method 'WHAT' for invocant of type 'A'␤  in method foo at /tmp/OI1QEko7Pu:1␤  in block <unit> at /tmp/OI1QEko7Pu:1␤␤»
13:38 masak I would vote "bug" on this, except that I can consider leaving room for some compelling counterargument that I haven't thought of.
13:38 rurban1 joined #perl6
13:38 tardisx` joined #perl6
13:39 mephinet joined #perl6
13:40 masak m: class A { method foo { say self.^name } }; A.new.foo
13:40 camelia rakudo-moar 315ec6: OUTPUT«A␤»
13:40 masak m: class A { method foo { say $.^name } }; A.new.foo
13:40 camelia rakudo-moar 315ec6: OUTPUT«Any␤»
13:40 masak o.O
13:40 masak ok, that last one I'm not 100% I'd want to work, but...
13:40 dalek rakudo/nom: d9c80f4 | (Elizabeth Mattijsen)++ | src/core/CompUnitRepo/Local (3 files):
13:40 dalek rakudo/nom: CURL: Deprecate .path in favour of .IO
13:40 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/d9c80f4791
13:40 masak ...I also don't understand where the Any is coming from.
13:41 djanatyn joined #perl6
13:45 masak m: say $.^name
13:45 camelia rakudo-moar 315ec6: OUTPUT«Any␤»
13:45 masak ok, ah.
13:45 masak m: say $
13:45 camelia rakudo-moar 315ec6: OUTPUT«(Any)␤»
13:45 masak it's probably the new `$` syntax that makes the above valid at all.
13:46 masak well, I could see a world in which `$.^foo` meant `self.^foo`, that's all. I'm not sure it should mean that.
13:49 lizmat m: use strict; say $
13:49 camelia rakudo-moar 315ec6: OUTPUT«(Any)␤»
13:49 lizmat .oO( just checking )
13:53 colomon joined #perl6
14:00 erkan joined #perl6
14:00 b2gills I think I figured out where and how to fix `enum Phonetic (:Alpha<A>, <Beta Charlie>)` src/Perl6/Actions line 3303 needs to check if it gets `<Beta Charlie>` and do something different.
14:03 Woodi joined #perl6
14:04 kernel1 joined #perl6
14:05 b2gills @values.push($*W.compile_time_evaluate($<term>, $_));
14:07 mephinet joined #perl6
14:10 simcop2387 joined #perl6
14:12 colomon joined #perl6
14:13 b2gills That lines needs to break apart $<term> or $_ (idk which) and push the "inner" values
14:15 b2gills I would fix it if I knew the structure of the variables were, and how to break them apart
14:18 masak is there a recent spec commit for `$` in non-signature use? I can't seem to find it by skimming the spec log.
14:21 FROGGS masak: TimToady committed something about that AFAIK
14:24 masak yeah, still can't find it, neither with --author=TimToady nor --author=Wall
14:24 masak ISTR it being this year, so I shouldn't even have to look that far back.
14:27 masak ah, found this: https://github.com/rakudo/rakudo/commit/ce263122bc0ae6e2fee51c166c06abd9d00ba771
14:27 masak that one only *speculates* that the semantics be `state $`, though.
14:27 masak I haven't found a spec or decision about it.
14:27 masak right now the semantics seems to be `my`...
14:27 FROGGS masak: maybe this? https://github.com/rakudo/rakudo/commit/5f9cd5182fa0054f1fa46779b61c28c88cb45451
14:28 vendethiel FROGGS: "spec" :p
14:28 FROGGS vendethiel: what?
14:28 masak m: sub foo { ($ = "A")++ }; say foo for ^5
14:28 camelia rakudo-moar 315ec6: OUTPUT«A␤A␤A␤A␤A␤»
14:28 vendethiel FROGGS: that's not a spec commit
14:28 FROGGS ohh
14:28 lizmat m: sub a { $++ }; say a; say a    # I think that's state by default
14:28 camelia rakudo-moar 315ec6: OUTPUT«0␤1␤»
14:29 masak waitwait
14:29 masak lizmat: how is yours qualitatively different from mine?
14:29 masak the only difference I see is the assignment.
14:29 lizmat not by much
14:29 masak and yet they have different behaviors. o.O
14:29 lizmat I'd say, yours is NYI
14:29 * masak submits rakudobug
14:30 vendethiel masak: it's my $; not state $
14:30 masak something is *very* fishy there.
14:30 vendethiel (bare $ is, I mean)
14:30 lizmat m: sub foo { ($ = 0)++ }; say foo for ^5
14:30 camelia rakudo-moar 315ec6: OUTPUT«0␤0␤0␤0␤0␤»
14:30 masak vendethiel: what makes you say that?
14:30 vendethiel seeing the commit that added it to rakudo :-)
14:30 masak vendethiel: see lizmat++'s eval.
14:30 vendethiel and telling TimToady: NOT TO MAKE IT STATE :P
14:30 masak huh.
14:30 masak why not?
14:30 lizmat m: sub a { $++ }; say a for ^5
14:30 camelia rakudo-moar 315ec6: OUTPUT«0␤1␤2␤3␤4␤»
14:31 masak seems it is in some cases...
14:31 vendethiel masak: ETOOMUCHMAGIC.
14:31 vendethiel ETOOIMPLICIT
14:31 lizmat fwiw, I'm fine with state, as my wouldn't make much sense
14:31 masak I'm fine with state, too.
14:32 masak I can see where vendethiel is coming from, but I don't mind much.
14:32 vendethiel newcomers will mind...
14:32 masak if I can write `$++` instead of `(state $)++` 500 times before I die, that will be worth it :)
14:33 vendethiel ++state is cool too :p
14:33 vendethiel or er, state++
14:34 masak m: sub foo { ++$ }; say foo for ^5
14:34 camelia rakudo-moar 315ec6: OUTPUT«1␤2␤3␤4␤5␤»
14:34 vendethiel m: sub a { state++ }; say a for ^5
14:34 camelia rakudo-moar 315ec6: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/7a8JxXYEd3â�¤Malformed stateâ�¤at /tmp/7a8JxXYEd3:1â�¤------> [32msub a { state[33mâ��[31m++ }; say a for ^5[0mâ�¤    expecting any of:â�¤        scoped declaratorâ�¤Â»
14:34 vendethiel m: sub a { (state)++ }; say a for ^5
14:34 camelia rakudo-moar 315ec6: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/8nHJRjW3siâ�¤Malformed stateâ�¤at /tmp/8nHJRjW3si:1â�¤------> [32msub a { (state[33mâ��[31m)++ }; say a for ^5[0mâ�¤    expecting any of:â�¤        scoped declaratorâ�¤Â»
14:34 vendethiel meh.
14:34 masak declarators don't work that way.
14:34 masak they want a declaratee.
14:35 vendethiel and when do they want it
14:38 masak vendethiel: I mean, I can't think of a single case where you write a declarator (`my`, `our`, `state`, `has`, etc) and then nothing afterwards. it feels "wrong", parsing-wise.
14:38 vendethiel well, semantics-wise for me
14:38 lizmat m: sub a { (state $ = "A")++ }; say a for ^5
14:38 camelia rakudo-moar 315ec6: OUTPUT«A␤B␤C␤D␤E␤»
14:39 lizmat m: sub a { ($ = "A")++ }; say a for ^5   # should just be the same
14:39 camelia rakudo-moar 315ec6: OUTPUT«A␤A␤A␤A␤A␤»
14:39 denis_boyun_ joined #perl6
14:39 masak huh. medical emergency on the train. they're calling out for a doctor or a nurse on the PA system.
14:40 * lizmat hopes it's not for masak
14:40 lizmat FROGGS: -                        method (Mu $self:) is rw {
14:40 lizmat +                        multi method (Mu:D $self:) is rw {
14:41 FROGGS lizmat: and?
14:41 FROGGS does it do what we want?
14:42 lizmat does not work  :-(
14:42 masak lizmat: it's not for me. it's someone in the next car down.
14:42 lizmat FROGGS: Stage parse      : Error while constructing error object:Could not locate compile-time value for symbol Anon::Multi
14:42 lizmat Cannot iterate object with P6str representation
14:42 lizmat m: multi method {}   # possibly related
14:42 camelia rakudo-moar 315ec6: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/BngLNBrgXPâ�¤Cannot put multi on anonymous methodâ�¤at /tmp/BngLNBrgXP:1â�¤------> [32mmulti method {}   # possibly related[33mâ��[31m<EOL>[0mâ�¤    expecting any of:â�¤        statement listâ�¤â€¦Â»
14:42 lizmat FROGGS: it doesn't build that way  :-(
14:42 FROGGS eww
14:42 FROGGS m: multi anon method {}
14:42 camelia rakudo-moar 315ec6: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/16k__iOIC5â�¤Missing blockâ�¤at /tmp/16k__iOIC5:1â�¤------> [32mmulti anon [33mâ��[31mmethod {}[0mâ�¤    expecting any of:â�¤        statement listâ�¤        prefix or termâ�¤        prefix or m…»
14:43 FROGGS m: multi method :: {}
14:43 camelia rakudo-moar 315ec6: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/pvK5JkarHMâ�¤Cannot put multi on anonymous methodâ�¤at /tmp/pvK5JkarHM:1â�¤------> [32mmulti method :: {}[33mâ��[31m<EOL>[0mâ�¤    expecting any of:â�¤        statement listâ�¤Â»
14:43 lizmat so I'm giving up for now
14:43 FROGGS yeah, though I guess we can make anon multis work
14:44 FROGGS (soonish)
14:44 masak anon multis? exciting!
14:45 masak how do I... call those?
14:46 vendethiel don't. they're crippled by the lexpad bug thingie :)
14:48 masak what lexpad bug thingie?
14:48 masak did I miss something crucial in the backlog?
14:48 vendethiel no, I'm just talking about anon multis
14:48 masak can you demonstrate the bug somehow?
14:48 vendethiel I tried to return a multi from a sub once. that didn't go well!
14:49 * masak adds it to "anecdotal evidence"
14:50 vendethiel wait, no, it wasn't even related to anon multi. just returning multis
14:51 xenoterracide joined #perl6
14:52 masak if you say so.
14:59 colomon joined #perl6
15:05 dalek rakudo/nom: 5513af3 | (Elizabeth Mattijsen)++ | src/core/CompUnit.pm:
15:05 dalek rakudo/nom: Fix signatures, simplify some methods
15:05 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/5513af3c15
15:11 daxim joined #perl6
15:14 masak m: say (1..10).map({ $_ %% 2 ?? $_ * 10 !! () }).perl
15:14 camelia rakudo-moar 315ec6: OUTPUT«((), 20, (), 40, (), 60, (), 80, (), 100).list␤»
15:14 masak m: say (1..10).map({ $_ %% 2 ?? $_ * 10 !! () }).flat.perl
15:14 camelia rakudo-moar 315ec6: OUTPUT«(20, 40, 60, 80, 100).list␤»
15:14 masak m: say (1..10).map({ $_ %% 2 ?? $_ * 10 !! () }).uniq.perl
15:14 camelia rakudo-moar 315ec6: OUTPUT«(20, 40, 60, 80, 100).list␤»
15:14 masak ok, goodenuf.
15:17 TimToady I'm pretty sure .flat will be more efficient than .uniq
15:19 lizmat on .uniq
15:20 lizmat is there a reason why .squish is like Unix's 'uniq' program, and .uniq is not ?
15:20 TimToady because Unix is wrong?
15:22 geekosaur uniq is more like squash consecutive lines, not actually uniquify (unless you sorted first), yeh
15:22 lizmat well, it might give some people coming from Unix, the wrong idea about the functionality of .uniq ?
15:22 TimToady so might .grep ;)
15:22 lizmat geekosaur: Unix's uniq is like Perl6's squish
15:22 geekosaur yes, exactly
15:23 geekosaur that would be why I described Unix uniq's behavior as squashing :p
15:23 lizmat ah, ok  :-)
15:23 geekosaur (and that does tend to be a Unix newbie trap, which is a pretty good argument that Unix is wrong)
15:23 masak TimToady: I was in a situation where I wanted to .uniq anyway. I mainly wanted to make sure .uniq flattened.
15:23 lizmat anyway, I was asked this yesterday by a visitor at the booth
15:23 masak and yes, I want .uniq, and not .squish in this case.
15:24 TimToady we also have prior art for squishing in p5's tr///s
15:24 xenoterracide joined #perl6
15:24 lizmat fwiw, I have been caught out by Unix's 'uniq' behaviour, so I can see TimToady's point about Unix being wrong
15:24 TimToady maybe we should rename .uniq to .unique
15:25 lizmat and then .squish to .uniq ?
15:25 TimToady nope
15:25 lizmat ok, that was a suggestion I got
15:25 geekosaur now *that* would be confusing
15:25 TimToady no need to propagate the mistakes of other cultures
15:25 geekosaur .uniq vs .unique
15:25 lizmat but .unique would make it different from .uniq, and thus be a warning flag
15:25 lizmat I can dig that
15:26 lizmat and it would allow a clear deprecation path
15:30 TimToady m: say (1..10).map({ $_ %% 2 ?? $_ * 10 !! next }).perl
15:30 camelia rakudo-moar 315ec6: OUTPUT«(20, 40, 60, 80, 100).list␤»
15:30 mst ideally, if you call 'uniq' on an unsorted stream, a small gnome exits the back of the computer and hits the developer with a mallet
15:30 TimToady there's a cool idiom
15:32 gtodd are type modifiers documented anywhere?  as in Str vs. Str:D
15:32 TimToady method uniq (|) { die "Unsupported use of .uniq; in Perl 6, please use .squish, unless you really meant .unique" }
15:33 TimToady gtodd: S12:1629
15:33 synopsebot Link: http://perlcabal.org/syn/S12.html#line_1629
15:33 lizmat TimToady: first a deprecation cycle, as we probably have code out there depending on uniq
15:35 TimToady shore
15:39 TimToady as for $ = 'A', currently that's equivalent to (state $) = 'A', since the $ doesn't actually parse as a declarator, but is promoted to a declaration in the actions
15:39 TimToady maybe we can fix that somehow
15:40 TimToady could also argue that it should be restricted to integers
15:41 * TimToady loves to argue so much that he often ends up arguing both sides.  :)
15:42 * TimToady would've made a bad lawyer... :)
15:42 lizmat I agree
15:42 lizmat I disagree
15:42 mst if you get DID, nobody's going to notice ...
15:43 dalek specs: 221ef4b | (Elizabeth Mattijsen)++ | S (3 files):
15:43 dalek specs: Don't use 'uniq', use 'unique' instead
15:43 dalek specs:
15:43 dalek specs: To prevent confusion by Unix 'uniq' users
15:43 dalek specs: review: https://github.com/perl6/specs/commit/221ef4b034
15:44 mst some unix commands have secret long names
15:44 mst for example
15:44 mst 'rm -rf did you really mean to do that?'
15:44 mst but also 'uniq did you really mean sort -u?'
15:48 TimToady "Your Honor, in all fairness, I do think the defendent probably did it.  But then I also think you're a crooked judge."  --Honest Abe.
15:52 TimToady Lawyers are taught to never say what they really think.  That's why it's such good training for politics.
15:55 huf so why have there been so few actors in politics?
15:55 geekosaur because the scriptwriters are terrible?
15:56 huf :)
15:57 ab5tract joined #perl6
15:59 woolfy left #perl6
16:03 Tekk_` joined #perl6
16:04 masak heh. I just wrote `has Int $.attr = Inf` in code; which fails to typecheck in current Rakudo because Inf is still only a Num :)
16:04 * masak fakes it by declaring a constant INF larger than anything else
16:04 TimToady I have not noticed actors refraining from saying what they think when they're off camera; you will note that our last actor-president had some troubles with saying what he thought occasionally.
16:06 TimToady but he was the teflon president with respect to his own words as well as others'. :)
16:13 lizmat T-Dose shutting down&
16:13 test__ joined #perl6
16:13 flussence joined #perl6
16:14 gtodd thanks
16:15 test__ left #perl6
16:16 huf TimToady: yeah, would have to be a serious method actor :)
16:35 kjs_ joined #perl6
16:36 kaare_ joined #perl6
16:39 breinbaas joined #perl6
16:44 dalek specs: d728b4a | TimToady++ | S12-objects.pod:
16:44 dalek specs: Don't assume .WHAT and friends are normal
16:44 dalek specs:
16:44 dalek specs: Some of them may be implemented as normal methods or operators for now,
16:44 dalek specs: but we still reserve the right to change any of them into magical ponies.
16:44 dalek specs: review: https://github.com/perl6/specs/commit/d728b4a044
16:45 Celelibi joined #perl6
16:45 raiph joined #perl6
16:47 masak :)
16:47 masak well, I guess that answers that.
16:47 TimToady .oO(a compelling counterargument: "Because I said so!")
16:47 masak indeed.
16:48 TimToady what I meant by "macro", which usage you'll be pleased that I've excised
16:48 masak was just gonna say.
16:48 masak precision++
16:49 masak I am implicitly in favor of any mention of "macro" or "macro-ish" in the spec that doesn't actually accord with (present or future) macro spec ;)
16:49 masak TimToady++
16:50 masak TimToady: what do you think of the idea of warning on unknown nameds to .new ?
16:51 TimToady it would be nice to generalize it
16:52 masak how?
16:52 masak TimToady: also (later), what would you think of merging (the effects of) https://github.com/masak/data-pretty into spec/Rakudo?
16:52 TimToady by actually implementing class closing and finalizing as specced
16:53 TimToady and maybe with a mechanism for marking which nameds have actually been looked at, for a run-time warning
16:53 masak do you think implementing a stopgap warning would be harmful?
16:53 masak with the "wrong" mechanism
16:54 TimToady well, I've proposed a wronger mechanism, just look to see if anyone has defined that method/attribute anywhere in any class, without considering inheritance
16:55 zakharyas joined #perl6
16:57 masak hm, method/attribute. yes, I guess if it's an rw method, things could be set that way too.
16:57 TimToady without having looked at your proposal closely (been sick), my gut feeling is that I'm okay with sub-lists prettifying, but wouldn't want top level lists to behave differently then they do when interpolated in a string or list
16:57 TimToady *than
16:58 masak just to be clear, would you be fine with changing prettifying all those situations, as long as they're consistent?
16:59 masak probably not, on a second re-read.
17:01 * TimToady is still not in a state to make important decisions, really...
17:01 masak okioki
17:01 masak yes, it's because it's a rather broad change that I'd like to get a go-ahead on it.
17:03 mst masak: you might look at MooseX::StrictConstructor
17:03 mst which some people use
17:03 mst but, in general, I'm not fond of
17:03 * TimToady would, however, like to avoid the pythonic solution of forcing people to use formatters more often than necessary
17:03 mst the key thing being that, yes, catching a typo in named constructor params is nice
17:03 TimToady Perl still believes in interpolation, by and large.
17:03 mst BUT
17:03 Alula joined #perl6
17:04 mst being able to pass basically a hash-o-stuff to a constructor and know that it'll use the things it understands and ignore the rest ... is really useful
17:04 masak mst: interesting data point.
17:04 mst plus there's assorted cleverness you can do in BUILD with otherwise-unused names
17:04 masak even interestinger.
17:05 masak mst: how would you feel about it if (a) it only triggered syntactically, i.e. when you actually used some nameds, not a flattened hash, in the source text
17:05 TimToady sure, but arguably that kind of magic doesn't have to be default
17:05 masak and (b) it would turn off itself if you had a sufficiently weird BUILD, or maybe a BUILD at all
17:05 masak ?
17:06 * TimToady inclines to default to strict, but make it really easy to turn off
17:06 TimToady a trait, in the absence of other evidence
17:06 mst oh, also, StrictConstructor used a neat trick to deal with BUILD
17:06 mst basically, if you handle a key in the args, you delete it from the hashref
17:07 mst and then at the end of BUILDALL, it checks if the only -remaining- keys are ones it knows about
17:07 mst and if not, then throws an exception
17:07 TimToady that disallows passing the same parameter to multiple levels
17:07 mst swings, roundabouts, etc.
17:08 TimToady so we've leaned away from the deletion approach
17:08 mst I've never seen anybody complain about that
17:08 mst I don't personally like it very much
17:08 TimToady and it's kinda heavy
17:08 mst but I've not yet seen anybody lose a foot
17:09 TimToady .oO(It has not yet been proven that tobacco causes cancer...)  :P
17:09 mst sure ... you're making all the arguments that I agree with, and I'm steelmanning the opposition :)
17:09 ghostlines joined #perl6
17:10 masak fwiw I would be happy enough if this warning happened at compile-time.
17:10 mst also, presumably perl6 knows enough about its constructor signature that you could do something along the lines of Class.new(params_understood_by(Class, %stuff))
17:10 mst which would handle the case I was talking about before
17:10 kjs_ joined #perl6
17:14 TimToady see also the ideas at S12:2172 re closing and finalizing classes at LINK time
17:14 synopsebot Link: http://perlcabal.org/syn/S12.html#line_2172
17:15 * masak .oO( as opposed to at ZELDA time )
17:19 TimToady Maybe we need an "app" declaration that says "I am not, nor have I ever been, a module."
17:22 TimToady which basically would mean "My CHECK time is everyone's LINK time."
17:22 TimToady and you may not compile me as a module
17:22 timotimo sounds kinda good to me
17:23 TimToady you can run multiple of me in a PROCESS (like in a webserver), but I must have my own GLOBAL
17:26 rindolf joined #perl6
17:29 thou joined #perl6
17:32 masak I'm having mild warning bells go off on that idea. they're softly mumbling "singleton" and "final class".
17:33 vendethiel masak: you need an entry point, though
17:33 masak how would one be able to run multiple apps, if one is not meant to refer to it as a module?
17:34 TimToady that would be betweenthe app and the framework in which it is loaded
17:34 TimToady see apache
17:35 * masak .oO( app-ache )
17:35 * masak detrains &
17:36 timotimo against that, you can take an appspirin
17:36 vendethiel .oO( not sure aspirines can fight trains )
17:36 lizmat joined #perl6
17:44 woolfy joined #perl6
17:44 timotimo ooooh interesting
17:45 timotimo moarvm's profiler does the profiling *before* END blocks are run!
17:45 lizmat .oO( isn't YOU_ARE_HERE just the first END block? )
17:49 FROGGS_ joined #perl6
17:50 timotimo heh.
17:51 kernel joined #perl6
17:51 [particle] joined #perl6
17:52 dalek rakudo/nom: d44f431 | (Elizabeth Mattijsen)++ | src/core/ (5 files):
17:52 dalek rakudo/nom: Deprecate .uniq in favor of .unique
17:52 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/d44f4313b4
17:56 lizmat dinner&
17:58 ugator joined #perl6
18:02 timotimo what's the most idiomatic way - except for with a slice - to loop over all but the first element in an array?
18:03 timotimo m: for "a".."f" { FIRST { next }; .say }
18:03 camelia rakudo-moar 315ec6: OUTPUT«a␤b␤c␤d␤e␤f␤»
18:03 timotimo m: for "a".."f" { once { next }; .say }
18:03 camelia rakudo-moar 315ec6: OUTPUT«b␤c␤d␤e␤f␤»
18:03 timotimo m: for ^2 { for "a".."f" { once { next }; .say } }
18:03 camelia rakudo-moar 315ec6: OUTPUT«b␤c␤d␤e␤f␤b␤c␤d␤e␤f␤»
18:03 timotimo not bad :)
18:05 timotimo oh ... damn ... Internal error: zeroed target thread ID in work pass
18:07 timotimo too lazy to golf that right now
18:07 timotimo https://gist.github.com/timo/19bca00c702507cabad3
18:12 TimToady m: for "a".."f" { once next; .say }
18:12 camelia rakudo-moar 315ec6: OUTPUT«b␤c␤d␤e␤f␤»
18:12 TimToady don't need the block
18:13 timotimo fair enough :)
18:17 bjz joined #perl6
18:19 timotimo well, that change makes it run again
18:19 timotimo but it's much, much slower all in all
18:23 jepeway joined #perl6
18:26 rurban joined #perl6
18:31 ghostlines joined #perl6
18:42 kjs_ joined #perl6
18:44 Sqirrel joined #perl6
18:45 FROGGS_ m: my $x; say $x /= 0 # I think this is LTA
18:45 camelia rakudo-moar 315ec6: OUTPUT«No zero-arg meaning for infix:</>␤  in method Numeric at src/gen/m-CORE.setting:13670␤  in sub infix:</> at src/gen/m-CORE.setting:4485␤  in block  at src/gen/m-CORE.setting:18918␤  in block <unit> at /tmp/1O0D4Jzow6:1␤␤»
18:45 FROGGS_ std: my $x; say $x /= 0
18:45 camelia std 14ad63b: OUTPUT«ok 00:00 139m␤»
18:46 timotimo huh, how does that happen?
18:47 FROGGS_ I dunno... the Any in $x triggers it
18:47 TimToady "No identity value to autovivify $x with"
18:48 TimToady but arguably / could have an identity value of 0
18:48 TimToady since it works on the left anyway
18:50 TimToady but you'd think it should be 1 to go with *
18:51 TimToady probably the current setup is most correct, but yeah, the message is LTA
18:51 FROGGS_ yeah
18:53 timotimo OK
18:53 raiph TimToady: Are your APW keynote slides available online? At least from the halfway point where you introduced the "belief" photos and began the explicit part of the travel metaphor discussion?
18:53 vendethiel .oO( please only post the power-thingie photos )
18:54 timotimo ?
18:54 timotimo why only them?
18:54 raiph TimToady: Because much of the video from that point on doesn't show your slides.
18:58 * lizmat takes an early night
18:59 raiph TimToady: I'd be happy to type up my guess of the topics, but lazy sounds better in this instance...
18:59 timotimo fwiw, the excel formula benchmark thingie allocates 12100000 scalar containers from at_pos (after i changed all the @ast[$i] to @ast.at_pos($i) - no clue how many it was before
19:00 timotimo which is a whole lot more than the second place which is 3600248 from gimme and 3600000 from push
19:00 timotimo and then 601018 in reify, which is almost nothing in comparison
19:02 timotimo scalars make up 21803529 allocations, which is unsurprisingly much more than int, parcel, num and str
19:03 timotimo m: say 21803529 - 8303365 - 4101028 - 3500398 - 1700012
19:03 camelia rakudo-moar 315ec6: OUTPUT«4198726␤»
19:03 FROGGS_ gnight lizmat
19:03 timotimo 600104 ← this is how many BOOTCode objects we build, weird.
19:03 timotimo all in src/gen/m-BOOTSTRAP.nqp:1488
19:04 timotimo ah, that's the clone method of Block.HOW
19:06 FROGGS_ \o/ cpandatesters now also generated the os/compiler/backend matrix properly!
19:06 FROGGS_ (besides listing the reports)
19:07 FROGGS_ now I need to display the report details
19:08 Guest1419 joined #perl6
19:20 Woodi hallo #perl6
19:20 Woodi m: grammar H { rule TOP { 'class Abc {' <body> '};' }; rule body { <words>+ % \s+ }; rule words { \S+ }; }; say H.parse( 'class Abc { a  };' );
19:20 camelia rakudo-moar 315ec6: OUTPUT«「class Abc { a  };」␤ body => 「a  」␤  words => 「a  」␤␤»
19:21 Woodi I'm pretty sure words was defined as *\S* ..
19:23 bartolin are there plans to switch to parrot 6.9.0?
19:23 bartolin the other day (shortly before this month's release of Rakudo) lizmat++ got a
19:23 bartolin lot of spectest failures after trying to bump PARROT_REVISION (also a few
19:23 bartolin changes in Rakudo where needed, see branch parrot-690)
19:23 bartolin lizmat's spectest failures: https://gist.github.com/lizmat/05a8462ffe4d6b0a8e52
19:23 bartolin I also tried to use parrot 6.9.0 and it looks as if most of the spectest
19:23 bartolin failures are caused by segfaults (maybe related to GC). Here is one example:
19:23 bartolin $ perl6-p -e 'for 1 .. 50 { print "$_ "; EVAL q[ "abc" ~~ m/ \d / ]; }'
19:23 bartolin 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 Segmentation fault
19:24 TimToady Woodi: don't use 'rule' when you want 'token'
19:26 Woodi oki, I will check tokens
19:29 FROGGS_ bartolin: yes, I'd like to switch to a properly working new parrot revision :o)
19:30 FROGGS_ bartolin: which also means that I'll try parrot soonish to support rurban hunting down any issues
19:30 TimToady maybe we should warn on use of \s within a rule
19:31 FROGGS_ TimToady: at least when it is surrounded by space, aye?
19:31 bartolin FROGGS_: I'd like to help with that, but have no idea how. would it be useful to get more examples like the above?
19:32 FROGGS_ bartolin: a gdb backtrace would be helpful
19:33 bartolin FROGGS_: okay, I'll take a look
19:38 dalek rakudo/nom: a07bdab | moritz++ | docs/ChangeLog:
19:38 dalek rakudo/nom: [docs] update ChangeLog
19:38 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/a07bdab42a
19:39 vendethiel "Vendethiel (aka Ven aka nami doc)"
19:39 vendethiel I'm sorry, raiph :P
19:39 aindilis joined #perl6
19:50 zakharyas joined #perl6
19:53 bartolin FROGGS_: here is a gdb backtrace: https://gist.github.com/usev6/6e57582839549b6d7698
19:53 Mso150 joined #perl6
19:53 bartolin FROGGS_: I'm not familiar with gdb, so I hope that's the right information
19:58 bartolin FROGGS_: and here is a second gdb backtrace: https://gist.github.com/usev6/1ba6157dae245b239260
19:59 rindolf joined #perl6
20:01 FROGGS_ bartolin: yes, that's perfect
20:02 FROGGS_ rurban: do you know about that regression?
20:02 FROGGS_ rurban: at least this looks like parrot is to blame: https://gist.github.com/usev6/6e57582839549b6d7698
20:05 * bartolin is reading a gdb tutorial now ;-)
20:13 vendethiel m: 3.<+>(5)
20:13 camelia rakudo-moar 315ec6: OUTPUT«postcircumfix:<{ }> not defined for type Int␤  in method <anon> at src/gen/m-CORE.setting:13676␤  in any find_method_fallback at src/gen/m-Metamodel.nqp:2725␤  in any find_method at src/gen/m-Metamodel.nqp:988␤  in block <unit> at /tmp/7VmewNMIas:1…»
20:14 vendethiel m: 3.:<+>(5) #that's prefix?
20:14 camelia rakudo-moar 315ec6: OUTPUT«Cannot find method 'postcircumfix:<( )>'␤  in block <unit> at /tmp/5JiJH64ogZ:1␤␤»
20:18 vendethiel mmh, S06, help me..
20:19 vendethiel not S06 then. Well alright
20:21 cxreg joined #perl6
20:22 vendethiel Didn't we have a math-parser-thingie on rosettacode? can't remember the name, and searching "math" doesn't bring anything
20:24 vendethiel (very simple parsing algorithm, like 3+2*5)
20:25 Ven joined #perl6
20:26 Ven m: say infix:{"+"}(1, 2)
20:26 camelia rakudo-moar 315ec6: OUTPUT«===SORRY!===␤Cannot find method 'has_compile_time_value'␤»
20:26 Ven m: say infix:["+"](1, 2)
20:26 camelia rakudo-moar 315ec6: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/JC4eD2yyjhâ�¤Undeclared routine:â�¤    infix:["+"] used at line 1. Did you mean 'infix:<+>', 'infix:<+&>', 'infix:<+|>', 'infix:<+^>', 'infix:<+<>'?â�¤â�¤Â»
20:27 vendethiel m: say infix:<+<>(1)
20:27 camelia rakudo-moar 315ec6: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/JHfySKmcBLâ�¤Unable to parse expression in quote words; couldn't find final '>'â�¤        â�¤at /tmp/JHfySKmcBL:1â�¤------> [32msay infix:<+<>(1)[33mâ��[31m<EOL>[0mâ�¤    expecting any of:â�¤   …»
20:27 vendethiel camelia's escaping is :P
20:34 rindolf joined #perl6
20:40 moritz camelia only escapes newlines and zero bytes, iirc
20:42 mauke joined #perl6
20:45 mauke_ joined #perl6
20:50 vendethiel err, rakudo*
20:55 mauke joined #perl6
20:56 masak I'm currently doing long-running analyses of some data I've collected. it's all in Perl 6. I didn't think the task would end up being CPU-bound, but it did.
20:57 masak still, this is *much* more feasible than only a year ago.
20:57 dylanwh FROGGS_: sorry, i didn't get to looking at anything this weekend, at least not yet. It's not over yet. :)
20:58 FROGGS_ dylanwh: well, I already got something working on my box, and I'll show it tomorrow or on tuesday... then I'll accept pull requests :o)
21:00 dylanwh :-D
21:02 dalek roast: 27a7e32 | usev6++ | S04-exceptions/control_across_runloop.t:
21:02 dalek roast: Unfudge now passing test for rakudo.parrot; RT #122325
21:02 dalek roast: review: https://github.com/perl6/roast/commit/27a7e3281a
21:02 synopsebot Link: https://rt.perl.org/rt3//Public/Bug/Display.html?id=122325
21:02 mauke joined #perl6
21:06 Mso150_r joined #perl6
21:07 mauke_ joined #perl6
21:08 timotimo i'm getting pretty annoyed by our lack of awesome natives :P
21:08 timotimo having to turn $foo++ into $foo = $foo + 1 and such ...
21:09 timotimo (i'm still fiddling around with that benchmark i stumbled upon on twitter recently)
21:10 mauke joined #perl6
21:12 Mso150_r_s joined #perl6
21:13 mauke__ joined #perl6
21:13 mauke__ joined #perl6
21:16 mauke joined #perl6
21:21 timotimo https://gist.github.com/timo/2d2cc1260428e5758086
21:22 mauke joined #perl6
21:24 erkan joined #perl6
21:28 mauke_ joined #perl6
21:37 mauke_ joined #perl6
21:39 masak sounds like an excellent reason to improve our natives ;)
21:41 mauke joined #perl6
21:41 jepeway how do, p6peeps?
21:42 FROGGS_ very good
21:44 mauke_ joined #perl6
21:44 jepeway marvy, marvy.
21:45 FROGGS_ gnight #perl6
21:45 jepeway ah, well, ciao, FROGGS_.
21:47 jepeway so, i've been playing with time zones a bit, hooking into the Olson DB via NativeCall.
21:47 jepeway Code's at fatal: No configured push destination.
21:47 jepeway urk, no, that's not where the code is :)
21:47 jepeway it's at https://github.com/cjepeway/p6-tz
21:49 jepeway i have questions re: how one applies timezone rules to a DateTime to determine an offset from UTC.
21:49 jepeway well, less questions, and more just puzzlement, i s'pose.
21:50 mauke joined #perl6
21:51 jepeway anybody 'round to be puzzled at?
21:54 mauke_ joined #perl6
21:57 * masak is around, kinda
21:58 masak jepeway: could you phrase your puzzlement in terms of code, preferably just one line, preferably using camelia?
21:58 mauke joined #perl6
21:59 jepeway masak: I'll give it a go.
22:00 jepeway (did this one a few weeks back, hope it's illustrative)
22:01 jepeway m: (DateTime.new(now + $_ * 60 * 60 * 24).in-timezone(-60*60*4).Str.substr(*-5) for ^365).Set.say # might like this to be 2 elts (-0400 & -0500) in US/Eastern timezone
22:01 camelia rakudo-moar 315ec6: OUTPUT«set(-0400)␤»
22:02 jepeway obviously, the in-timezone method that takes an int won't ever show anything other than '-0400'
22:02 xenoterracide joined #perl6
22:02 masak obviously.
22:02 jepeway but you'd like some kinda object to hold rules so that something like "iterate over all days of a year and get >1 offset" works.
22:03 masak yes, I see what you're saying.
22:03 jepeway well, that's what I'm puzzling: would you like that behavior?
22:03 jepeway ah, cool.
22:03 masak it's almost like we have two kinds of things here that we call "timezone":
22:03 masak (a) the thing with a certain offset from UTC.
22:04 masak (b) the way time is kept in a given roughly longitudinal stripe on the surface of the Earth, including daylight savings shenanigans.
22:05 masak we also note that the (b) notion "controls" the (a) notion.
22:05 jepeway yup, yup, yup.  2 things: offset & rule(s) to calculate offset.
22:05 masak and that the Temporal spec as it stands today only ever cares about the (a) notion.
22:05 jepeway indeed so.
22:06 masak well, so much for the easy observations :)
22:07 jepeway heh.
22:07 masak I think it would be easier to talk about, at least for now, if we had two words.
22:07 masak something like "timezone" (established in S32/Temporal already) and "time rules".
22:07 masak doesn't have to be perfect terms. just enough to distinguish for now.
22:08 jepeway sure.
22:08 Alina-malina joined #perl6
22:08 masak I think the question we should try to answer is this: what can we do, *outside* of Temporal.pm, to make a set of objects that work like DateTime objects, except that they also know how to play by the time rules?
22:09 jepeway i see some mention of "wallclock time" when discussing this, so, perhaps "offset" and "wallclock rules?"
22:09 * jepeway promises to bikeshed no further
22:09 masak like a Temporal.pm, but implemented externally to Rakudo.
22:09 masak I can live with "wallclock rules", if you prefer that.
22:09 jepeway understood.
22:10 masak one of the difficulties you'll be running into is this: last night, in fact, in Europe, we had a DST hour added.
22:10 jepeway (understood re: new DateTime-like objects).
22:10 masak so for me, this day contains 25 hours.
22:11 masak which in turn means, for example, that there are *two* TAI moments today that go by the wallclock time 02:34:56.
22:11 jepeway yes, know that problem. (uh, do you mean subtracted?)
22:11 masak well, an extra hour was shoved into the day.
22:12 jepeway (ah, yes.  still thinking offsets).
22:12 masak correspondingly, at the other end of the year, there will be DateTime objects that refer to no valid TAI moment. like a "hole" in the wallclock timeline.
22:12 jepeway so, the only way i see to distinguish those two 2:34:56 wall clock times is with a TZ abbreviation...which you might not know.
22:13 jepeway yup: that day has 23 hours, and there's not 1:10AM, eg.
22:13 masak right.
22:13 masak these problems are not insurmountable. but they need to be tackled, and kind of "all at once", with a strategy.
22:13 jepeway it's...icky, for the hours where the warps occur.
22:14 masak when I see a mature enough solution to that -- and feel free to be inspired by CPAN's DateTime, fwiw -- we might talk about merging stuff into Rakudo and/or the spec.
22:14 masak massive bonus points for passing tests :)
22:14 mauke joined #perl6
22:15 masak at this point, most of the Temporal spec has been written by other people. but I take pride in having a role in putting it on a sane path at some point, around 2010 or so.
22:16 masak I remember deliberately leaving wallclock rules out of it, because it felt like that part was as big as all the rest of it.
22:16 jepeway i mean, what does my DateTime $t .= new (year => 2014, month => 10, day => 26, hour => 1, minute => 2, timezone => TZ.new('Austria/Vienna')) mean?
22:16 masak right. that's a legitimate question.
22:16 jepeway yes, it took me a bit to see what was left out and what included as v. wise, in S32/Temporal
22:17 masak there's even some wording about it in the beginning. (that I wrote)
22:18 jepeway i've been wondering whether such "bogus" expressions of wall clock time should be Failures.
22:18 masak "...this module doesn't handle all the world's time zones, locales, date formatters or calendars..."
22:18 masak jepeway: I'm fine with them dying outright.
22:18 jepeway yes, read that too, and was quite inspired, honestly.
22:20 jepeway in the "hey, that's a pretty well thought call on separation of concerns," i mean
22:21 mauke_ joined #perl6
22:21 jepeway any thoughts on dragging olson db into rakudo (if it comes to that?)  or should a pp impl be the eventual target?
22:27 mauke joined #perl6
22:30 jepeway (though I'm going to keep working with Olson via NativeCall for now)
22:31 * jepeway saw that retupmoca (I think?) wrote a grammar for the plain-text Olson files
22:32 mauke_ joined #perl6
22:32 masak I have no current opinion on the coreness of Olson.
22:33 masak nor do I see a need to have one until a proposed concrete improvement is at hand ;)
22:33 jepeway hokay.
22:35 jepeway might you cast your august eyes on some unworthy code @ https://github.com/cjepeway/p6-tz/blob/master/TimeZone.pm ?
22:37 jepeway presently, I'm thinking most of what an augmented DateTime needs is an in-timezone multi that delegates to its TimeZone object.
22:38 jepeway and some serious trickery in the TZ objects to handle ambiguous and "can't exist" wallclock times
22:40 jepeway (oh, in-timezone multi: one takes an Instant, another takes a DateTime)
22:41 jepeway but, if this discussion is really in the realm of "hey, you figure this stoof out and get back to us/me with more than you've already got," well, I can dig it :)
22:41 mauke joined #perl6
22:42 jepeway s/than/ than what/
22:44 mauke_ joined #perl6
22:49 masak :)
22:50 masak it's getting late here, so I'd better save casting eyes, august or not, on code until tomorrow.
22:50 masak but I can surely look at it then.
22:50 masak thanks for thinking about this.
22:50 jepeway coolio.
22:50 masak jepeway++
22:50 masak 'night, #perl6
22:51 jepeway hey, it's fun.  thanks for yer time, masak++.  g'nite, rest well.
22:57 mauke joined #perl6
23:00 mauke_ joined #perl6
23:00 mauke_ joined #perl6
23:03 mauke joined #perl6
23:21 mauke joined #perl6
23:25 mauke_ joined #perl6
23:26 kurahaupo joined #perl6
23:31 mauke joined #perl6
23:45 araujo joined #perl6
23:45 araujo joined #perl6
23:49 BenGoldberg joined #perl6

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

Perl 6 | Reference Documentation | Rakudo