»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg camelia perl6: ... | irclog: irc.perl6.org | UTF-8 is our friend! Set by sorear on 25 June 2013. |
|||
raiph | goodnight #perl6 | 00:00 | |
00:00
raiph left
|
|||
colomon | forth++ | 00:02 | |
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:05 | ||
though compiling to assembly is kind of crazy | 00:06 | ||
colomon is trying to resist the temptation... | |||
00:08
notfix left
|
|||
colomon wonders whether his Forth implementation is relying on undocumented behavior | 00:12 | ||
00:12
xfix joined
|
|||
colomon | m: say 10 div 4 | 00:13 | |
camelia | rakudo-moar 315ec6: OUTPUT«2» | ||
colomon | m: say 4 Rdiv 10 | ||
camelia | rakudo-moar 315ec6: OUTPUT«2» | ||
colomon | gist.github.com/colomon/2bb128f3b40df3ffaee8 # simple stack intepreter | 00:27 | |
colomon tries to resist adding the ability to compile new words to it.... | |||
00:39
leont left
|
|||
colomon | gist.github.com/colomon/2bb128f3b40df3ffaee8 # now with the ability to add new words, starting to look like a Forth | 00:45 | |
00:50
SHODAN left
00:53
SHODAN joined
01:05
kurahaupo left
01:09
j4jackj left,
j4jackj joined
01:21
aindilis joined
|
|||
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 | |
i'm struggling to get dynasm to accept my attempts at implementing brshift_i and blshift_i | |||
03:00
noganex joined
03:03
noganex_ left
03:18
noganex_ joined
03:21
noganex left
03:24
avuserow joined
03:34
[particle] left
04:01
eternaleye left
04:13
molaf_ joined,
slavik left,
molaf left
04:18
mauke_ joined
|
|||
dalek | ast: cb97064 | (David Warring [email@hidden.address] | S05-mass/charsets.t: Revert "refudged parrot blank chars - still failing, e.g.:" This reverts commit 03f5fc743eb9c3c9bded68241564f851b5587061. Accidently checked in other junk junk along with this refudge, |
04:19 | |
ast: ee9b239 | (David Warring [email@hidden.address] | S (6 files): Merge branch 'master' of github.com/perl6/roast |
|||
ast: 4e0125c | (David Warring [email@hidden.address] | S05-mass/charsets.t: refudge blank, punct for parrot 6.8.0 / unicode 5.2 |
|||
04:21
mauke left
04:23
mauke_ is now known as mauke
04:43
araujo left
04:45
BenGoldberg left
04:46
ggoebel111111112 joined
04:50
ggoebel111111111 left
05:13
[particle] joined
05:47
Mso150_e left,
Mso150_e joined
05:51
xenoterracide joined,
bcode is now known as zombcode
06:04
xenoterracide left
06:48
darutoko joined
06:53
rindolf joined
06:55
ragz joined
|
|||
ragz | hi | 06:55 | |
whoami | |||
who is this | |||
06:56
ragz left
|
|||
bonsaikitten | what :D | 06:56 | |
07:01
rindolf left
07:10
rindolf joined
07:18
sivoais left
07:20
sivoais joined
07:46
FROGGS[mobile] joined
|
|||
lizmat_ | good *, #perl6! | 07:47 | |
07:47
lizmat_ is now known as lizmat
|
|||
lizmat | commute to T-Dose, day 2 | 07:51 | |
& | |||
07:51
lizmat left
07:52
vendethiel left
07:53
woolfy left
|
|||
masak | good daylight savings morning, #perl6 | 07:53 | |
07:55
vendethiel joined
|
|||
FROGGS[mobile] | morning | 07:56 | |
tadzik: are we going to implement the report receiving service in Perl 6? | 07:57 | ||
tadzik: we probably only need HTTP::UA and DBIish | 07:58 | ||
tadzik: maybe bailador but then we should patch it to use HTTP::UA | 08:00 | ||
08:06
FROGGS joined,
FROGGS[mobile] left
08:16
vendethiel left
08:21
vendethiel joined
|
|||
rindolf | masak: good morning. | 08:24 | |
08:35
pdcawley left
08:41
pdcawley joined
08:49
lizmat joined
08:50
ptc_p6 joined
|
|||
lizmat | greetings from T-Dose, day 2 | 08:51 | |
FROGGS , tadzik: how would this service compare to CPAN Testers ?? | |||
08:51
spider-mario joined
08:52
spider-mario left,
spider-mario joined
09:06
James__ left
|
|||
FROGGS | lizmat: it would receive our test results | 09:11 | |
09:11
gfldex joined
|
|||
FROGGS | lizmat: so it would be kind of identical in the end | 09:11 | |
lizmat | so what would be against trying to integrate it with CPAN testers > | 09:12 | |
? | |||
FROGGS | lizmat: were we care about additional info like backends and such | ||
lizmat | maybe now is the time to talk to mst about this :-) | ||
FROGGS | lizmat: that we would need their help to fiddle with their database, website, stats generating scripts and so on | ||
lizmat | well, maybe not the time yet to do that just yet, but at least keep it in mind :-) | 09:13 | |
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 | |
I just know that barbie is quite busy and it is hard to even get tiny patches in | |||
lizmat | perhaps something to put on the list of things to do for the next QA hackathon :) | ||
FROGGS | I have not a good feeling about getting this into P5's cpantesters at all | 09:15 | |
yeah | |||
09:18
rmgk_ joined,
rmgk left,
rmgk_ is now known as rmgk
09:20
rurban joined
09:21
Isp-sec joined
09:24
Akagi201 joined
|
|||
lizmat | I'm pretty sure we can work the backend thing out with cpan-testers | 09:27 | |
although it may be quite some work on their end :-) | |||
09:28
[particle] left
09:41
virtualsue joined
09:45
woolfy joined
09:55
ptc_p6 left
10:02
kurahaupo joined
|
|||
FROGGS | I've got a nice bug: | 10:12 | |
$ perl6 -e '%*ENV<foo> = 42; run "echo", "1"' | |||
$ perl6 -e 'run "echo", "1"' | |||
1 | |||
$ perl6 -e '%*ENV<foo> ~= 42; run "echo", "1"' | |||
1 | |||
bartolin | $ /perl6-m -e '%*ENV<foo> = 42; say qx[echo 1]' | 10:20 | |
This type cannot unbox to a native string in sub QX at src/gen/m-CORE.setting:847 in block <unit> at -e:1 | |||
$ perl6-m -e '%*ENV<foo> ~= 42; say qx[echo 1]' | |||
1 | |||
FROGGS | ahh | ||
bartolin++ | |||
now I know how to fix it :o) | |||
bartolin | ohh, FROGGS++ | 10:21 | |
moritz | \o | ||
bartolin | looked somehow similiar like RT #120529 | ||
synopsebot | Link: rt.perl.org/rt3//Public/Bug/Displa...?id=120529 | ||
bartolin | (that's why I tried with qx[echo 1]) | ||
FROGGS | hi moritz | 10:22 | |
bartolin: it is not really related to that ticket | |||
bartolin | FROGGS: yeah, I thought so as well. I just wanted to try with qx instead of run ... | 10:24 | |
and if the result gave you and idea, great! | |||
FROGGS | yeah, was helpful anyway :o) | ||
tadzik | FROGGS: why do we need UA on the receiving part? | 10:28 | |
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 | ||
perhaps parts of its code can be adopted by a proper http server | |||
or one could go so far to write a bridge between P6 and nginx or something | 10:30 | ||
we're PSGI after all, can't be _that_ hard | |||
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 | ||
tadzik | if we can find a snappy enough deserialization mechanism | ||
moritz | which reminds me that I want to profile from-json again soon :-) | 10:34 | |
FROGGS | moritz++ | ||
lizmat | tadzik: it would be nice if we would have a Perl 6 port of Sereal :-) | ||
tadzik | lizmat: troo | 10:40 | |
lizmat | think it would be faster as well :-) | ||
10:41
kjs_ joined
|
|||
tadzik | seems to be mostly written in C too | 10:41 | |
well, XS | 10:42 | ||
lizmat | the Sereal library is pure C, afaik | 10:49 | |
the Perl 5 interface is XS indeed | |||
I think it should be possible to use NatveCall for the Sereal interface | 10:50 | ||
11:08
denis_boyun_ joined
11:16
denis_boyun_ left
|
|||
colomon | I can confirm (just checked source) that the Perl 5 version is just a few lines and calls to XS. | 11:22 | |
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:24 | |
timotimo | colomon: you mean sereal? | 11:30 | |
ah, yeah | |||
ought to be simple-ish to port, then :P | |||
colomon | timotimo: yes | 11:35 | |
I'm confused though, I can't find the actual C source. | |||
11:37
BenGoldberg joined
|
|||
lizmat | the announcement: blog.booking.com/sereal-a-binary-da...ormat.html | 11:53 | |
11:55
leont joined
11:59
kjs_ left
12:03
ghostlines joined
12:15
Mso150_e left
|
|||
colomon | actually, there's badish news on this front. | 12:17 | |
It's C, but it's XS C | |||
12:17
xinming left
12:18
xinming joined
|
|||
timotimo | oh? sereal itself is built on top of XS? | 12:20 | |
rather than sereal being a C library that's bound with via XS? | 12:21 | ||
12:25
mephinet left
|
|||
lizmat | huh??? how can it bind to Python then ??? | 12:27 | |
that's not how I internalized it | |||
colomon | I might be reading stuff wrong here. | 12:28 | |
but SV *info, isn't that an XS data structure? | 12:29 | ||
lizmat | yup | 12:30 | |
ok, scratch Sereal then | |||
:-( | |||
colomon | Python version appears to be incomplete | ||
Java version appears to be a pure Java implementation | |||
lizmat | I can't believe they bound it so tightly to Perl 5 internals | 12:31 | |
so, forget about it... :-) | 12:32 | ||
I will | |||
colomon | the Python implementation has its own set of C files, which are full of PyObject pointers | ||
lizmat: they wanted something for Perl 5 which was fast. Makes perfect sense. | |||
lizmat | yeah, I know... :-) | 12:33 | |
lizmat is just disappointed | |||
FROGGS | tadzik: I've got now a service running that record the submitted reports :o) | ||
lizmat | FROGGS++ | ||
FROGGS | so, I'll now wire it up to generate the stats page | ||
12:36
dwarring left
|
|||
lizmat | cool! | 12:36 | |
dalek | kudo/nom: 6ef0c72 | (Elizabeth Mattijsen)++ | src/core/CompUnitRepo/Locally.pm: Fix some signatures and simplify methods |
12:47 | |
colomon is fighting off the urge to convert his primitive Forth in p6 script to primitive Factor in p6... | 12:49 | ||
12:50
ggoebel111111113 joined
12:51
d4l3k_ joined
12:52
noganex joined,
ggoebel111111112 left
12:53
brother| joined,
yogan_ joined
12:54
Woodi_ joined
12:55
ntln joined
12:56
dalek left,
ggherdov left,
ntln- left,
brother left,
yogan left,
noganex_ left,
PZt left,
Woodi left,
ivanshmakov left,
mattp_ left,
Juerd left
12:57
Juerd joined,
mattp_ joined,
d4l3k_ is now known as dalek,
daxim left
12:58
daxim joined,
ggherdov joined
|
|||
dalek | nda/reporter: 3f598d3 | (Tobias Leich)++ | / (5 files): submit reports for failure and success (to localhost for now) |
12:59 | |
12:59
ivanshmakov joined
|
|||
lizmat | Is there a reason why autogenerated accessors are not multi's? | 13:03 | |
m: class A {}; say A.WHICH # WHICH comes from Mu:U: | |||
camelia | rakudo-moar 315ec6: OUTPUT«A» | ||
lizmat | m: class A { has $.WHICH }; say A.WHICH # huh? | 13:04 | |
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» | ||
lizmat | why can't that fall back to Mu's WHICH(Mu:U:) as well ? | 13:05 | |
FROGGS | because WHICH(A:U:) is more specific | 13:07 | |
lizmat | eh, where did that come from? | 13:10 | |
why wouldn't we generate the standard accessor with (?CLASS:D:) ? | |||
FROGGS | hmmm, good question | 13:11 | |
in Attribute.pm:79 it just calls $package.HOW.add_method($package, $meth_name, $meth); | 13:13 | ||
masak | hello #perl6 from a train! \o/ | 13:14 | |
FROGGS | so the accessor will probably just look like WHICH(A:) | ||
hi masak! | |||
masak | hi! | ||
I'm doing a lot of Perl 6 right now, but not much of it is leaking onto the channel. | |||
except for that named-args vs attributes complaint yesterday :0 | |||
:) | |||
lizmat | FROGGS: will look at changing that and seeing the fallout for that | ||
FROGGS | lizmat: ahh, in line 27 there is method (Mu $self:), and that could be tweaked | ||
13:15
forestial joined
|
|||
FROGGS | also line 39, 48, ... | 13:15 | |
13:15
immortal joined
|
|||
lizmat | yup, will start tweaking, thanks for the poinyer | 13:15 | |
13:16
forestial left
13:17
erkan left
13:19
akagi201__ joined
13:21
cibs left
13:26
cibs joined
13:28
zakharyas joined,
erkan joined
|
|||
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:30 | |
if it's a method that mainly has a side effect, I'm more likely to do `self.method` | 13:31 | ||
lizmat | fwiw, I'm a little uneasy with using $.method if there is no attribute for it | 13:33 | |
13:33
molaf__ joined
|
|||
lizmat | to the point I would suggest disallowing it | 13:34 | |
13:34
BenGoldberg left,
cxreg2 joined
|
|||
masak | I'm not just not uneasy about it -- I think it's wonderfully consistent and should be encouraged. | 13:34 | |
way I see it, it can only help promote the understanding of the unification between public attributes and methods. | 13:35 | ||
13:35
guru joined
|
|||
masak writes `$.WHAT` for the first time in code | 13:35 | ||
13:35
guru is now known as Guest24645
13:36
Guest24645 is now known as ajr_,
rmgk_ joined,
rmgk left,
rmgk_ is now known as rmgk,
colomon left
|
|||
masak is surprised when this doesn't work | 13:37 | ||
m: class A { method foo { say self.WHAT } }; A.new.foo | |||
camelia | rakudo-moar 315ec6: OUTPUT«(A)» | ||
masak | m: class A { method foo { say $.WHAT } }; A.new.foo | ||
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» | ||
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 | |
13:38
rurban1 joined,
tardisx` joined
13:39
rurban left,
mephinet joined,
immortal left,
molaf_ left,
djanatyn left,
tardisx left,
cxreg left,
Alula left
|
|||
masak | m: class A { method foo { say self.^name } }; A.new.foo | 13:40 | |
camelia | rakudo-moar 315ec6: OUTPUT«A» | ||
masak | m: class A { method foo { say $.^name } }; A.new.foo | ||
camelia | rakudo-moar 315ec6: OUTPUT«Any» | ||
masak | o.O | ||
ok, that last one I'm not 100% I'd want to work, but... | |||
dalek | kudo/nom: d9c80f4 | (Elizabeth Mattijsen)++ | src/core/CompUnitRepo/Local (3 files): CURL: Deprecate .path in favour of .IO |
||
masak | ...I also don't understand where the Any is coming from. | ||
13:41
djanatyn joined
|
|||
masak | m: say $.^name | 13:45 | |
camelia | rakudo-moar 315ec6: OUTPUT«Any» | ||
masak | ok, ah. | ||
m: say $ | |||
camelia | rakudo-moar 315ec6: OUTPUT«(Any)» | ||
masak | it's probably the new `$` syntax that makes the above valid at all. | ||
well, I could see a world in which `$.^foo` meant `self.^foo`, that's all. I'm not sure it should mean that. | 13:46 | ||
lizmat | m: use strict; say $ | 13:49 | |
camelia | rakudo-moar 315ec6: OUTPUT«(Any)» | ||
13:49
erkan left
|
|||
lizmat | .oO( just checking ) |
13:49 | |
13:53
colomon joined
14:00
erkan joined
|
|||
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:01 | |
14:01
erkan is now known as Guest70355
14:04
Woodi_ left
14:05
Woodi joined,
kernel1 joined,
kernel1 is now known as jsimonet
|
|||
b2gills | @values.push($*W.compile_time_evaluate($<term>, $_)); | 14:05 | |
14:08
simcop2387 left
14:10
mephinet left,
mephinet joined,
simcop2387 joined
14:11
colomon left
14:12
flussence left,
colomon joined
|
|||
b2gills | That lines needs to break apart $<term> or $_ (idk which) and push the "inner" values | 14:13 | |
I would fix it if I knew the structure of the variables were, and how to break them apart | 14:15 | ||
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:18 | |
FROGGS | masak: TimToady committed something about that AFAIK | 14:21 | |
masak | yeah, still can't find it, neither with --author=TimToady nor --author=Wall | 14:24 | |
ISTR it being this year, so I shouldn't even have to look that far back. | |||
14:26
colomon left
|
|||
masak | ah, found this: github.com/rakudo/rakudo/commit/ce...d9d00ba771 | 14:27 | |
that one only *speculates* that the semantics be `state $`, though. | |||
I haven't found a spec or decision about it. | |||
right now the semantics seems to be `my`... | |||
FROGGS | masak: maybe this? github.com/rakudo/rakudo/commit/5f...c88cb45451 | ||
vendethiel | FROGGS: "spec" :p | 14:28 | |
FROGGS | vendethiel: what? | ||
masak | m: sub foo { ($ = "A")++ }; say foo for ^5 | ||
camelia | rakudo-moar 315ec6: OUTPUT«AAAAA» | ||
vendethiel | FROGGS: that's not a spec commit | ||
FROGGS | ohh | ||
lizmat | m: sub a { $++ }; say a; say a # I think that's state by default | ||
camelia | rakudo-moar 315ec6: OUTPUT«01» | ||
masak | waitwait | 14:29 | |
lizmat: how is yours qualitatively different from mine? | |||
the only difference I see is the assignment. | |||
lizmat | not by much | ||
masak | and yet they have different behaviors. o.O | ||
lizmat | I'd say, yours is NYI | ||
masak submits rakudobug | 14:30 | ||
vendethiel | masak: it's my $; not state $ | ||
masak | something is *very* fishy there. | ||
vendethiel | (bare $ is, I mean) | ||
lizmat | m: sub foo { ($ = 0)++ }; say foo for ^5 | ||
camelia | rakudo-moar 315ec6: OUTPUT«00000» | ||
masak | vendethiel: what makes you say that? | ||
vendethiel | seeing the commit that added it to rakudo :-) | ||
masak | vendethiel: see lizmat++'s eval. | ||
vendethiel | and telling TimToady: NOT TO MAKE IT STATE :P | ||
masak | huh. | ||
why not? | |||
lizmat | m: sub a { $++ }; say a for ^5 | ||
camelia | rakudo-moar 315ec6: OUTPUT«01234» | ||
masak | seems it is in some cases... | 14:31 | |
vendethiel | masak: ETOOMUCHMAGIC. | ||
ETOOIMPLICIT | |||
lizmat | fwiw, I'm fine with state, as my wouldn't make much sense | ||
masak | I'm fine with state, too. | ||
I can see where vendethiel is coming from, but I don't mind much. | 14:32 | ||
vendethiel | newcomers will mind... | ||
masak | if I can write `$++` instead of `(state $)++` 500 times before I die, that will be worth it :) | ||
vendethiel | ++state is cool too :p | 14:33 | |
or er, state++ | |||
masak | m: sub foo { ++$ }; say foo for ^5 | 14:34 | |
camelia | rakudo-moar 315ec6: OUTPUT«12345» | ||
vendethiel | m: sub a { state++ }; say a for ^5 | ||
camelia | rakudo-moar 315ec6: OUTPUT«===SORRY!=== Error while compiling /tmp/7a8JxXYEd3Malformed stateat /tmp/7a8JxXYEd3:1------> sub a { state⏏++ }; say a for ^5 expecting any of: scoped declarator» | ||
vendethiel | m: sub a { (state)++ }; say a for ^5 | ||
camelia | rakudo-moar 315ec6: OUTPUT«===SORRY!=== Error while compiling /tmp/8nHJRjW3siMalformed stateat /tmp/8nHJRjW3si:1------> sub a { (state⏏)++ }; say a for ^5 expecting any of: scoped declarator» | ||
vendethiel | meh. | ||
masak | declarators don't work that way. | ||
they want a declaratee. | |||
vendethiel | and when do they want it | 14:35 | |
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 | ||
lizmat | m: sub a { (state $ = "A")++ }; say a for ^5 | ||
camelia | rakudo-moar 315ec6: OUTPUT«ABCDE» | ||
lizmat | m: sub a { ($ = "A")++ }; say a for ^5 # should just be the same | 14:39 | |
camelia | rakudo-moar 315ec6: OUTPUT«AAAAA» | ||
14:39
denis_boyun_ joined
|
|||
masak | huh. medical emergency on the train. they're calling out for a doctor or a nurse on the PA system. | 14:39 | |
lizmat hopes it's not for masak | 14:40 | ||
FROGGS: - method (Mu $self:) is rw { | |||
+ multi method (Mu:D $self:) is rw { | |||
does not work :-( | 14:41 | ||
masak | lizmat: it's not for me. it's someone in the next car down. | ||
lizmat | FROGGS: Stage parse : Error while constructing error object:Could not locate compile-time value for symbol Anon::Multi | ||
Cannot iterate object with P6str representation | |||
FROGGS | lizmat: and? | 14:42 | |
does it do what we want? | |||
lizmat | m: multi method {} # possibly related | ||
camelia | rakudo-moar 315ec6: OUTPUT«===SORRY!=== Error while compiling /tmp/BngLNBrgXPCannot put multi on anonymous methodat /tmp/BngLNBrgXP:1------> multi method {} # possibly related⏏<EOL> expecting any of: statement list…» | ||
lizmat | FROGGS: it doesn't build that way :-( | ||
FROGGS | eww | ||
m: multi anon method {} | |||
camelia | rakudo-moar 315ec6: OUTPUT«===SORRY!=== Error while compiling /tmp/16k__iOIC5Missing blockat /tmp/16k__iOIC5:1------> multi anon ⏏method {} expecting any of: statement list prefix or term prefix or m…» | ||
FROGGS | m: multi method :: {} | 14:43 | |
camelia | rakudo-moar 315ec6: OUTPUT«===SORRY!=== Error while compiling /tmp/pvK5JkarHMCannot put multi on anonymous methodat /tmp/pvK5JkarHM:1------> multi method :: {}⏏<EOL> expecting any of: statement list» | ||
lizmat | so I'm giving up for now | ||
FROGGS | yeah, though I guess we can make anon multis work | 14:44 | |
(soonish) | |||
masak | anon multis? exciting! | ||
how do I... call those? | 14:45 | ||
vendethiel | don't. they're crippled by the lexpad bug thingie :) | 14:46 | |
masak | what lexpad bug thingie? | 14:48 | |
did I miss something crucial in the backlog? | |||
vendethiel | no, I'm just talking about anon multis | ||
masak | can you demonstrate the bug somehow? | ||
vendethiel | I tried to return a multi from a sub once. that didn't go well! | ||
masak adds it to "anecdotal evidence" | 14:49 | ||
vendethiel | wait, no, it wasn't even related to anon multi. just returning multis | 14:50 | |
14:51
xenoterracide joined
|
|||
masak | if you say so. | 14:52 | |
14:57
ghostlines left
14:58
daxim left
14:59
colomon joined
|
|||
dalek | kudo/nom: 5513af3 | (Elizabeth Mattijsen)++ | src/core/CompUnit.pm: Fix signatures, simplify some methods |
15:05 | |
15:11
daxim joined
|
|||
masak | m: say (1..10).map({ $_ %% 2 ?? $_ * 10 !! () }).perl | 15:14 | |
camelia | rakudo-moar 315ec6: OUTPUT«((), 20, (), 40, (), 60, (), 80, (), 100).list» | ||
masak | m: say (1..10).map({ $_ %% 2 ?? $_ * 10 !! () }).flat.perl | ||
camelia | rakudo-moar 315ec6: OUTPUT«(20, 40, 60, 80, 100).list» | ||
masak | m: say (1..10).map({ $_ %% 2 ?? $_ * 10 !! () }).uniq.perl | ||
camelia | rakudo-moar 315ec6: OUTPUT«(20, 40, 60, 80, 100).list» | ||
masak | ok, goodenuf. | ||
TimToady | I'm pretty sure .flat will be more efficient than .uniq | 15:17 | |
15:17
xenoterracide left,
leont left
|
|||
lizmat | on .uniq | 15:19 | |
is there a reason why .squish is like Unix's 'uniq' program, and .uniq is not ? | 15:20 | ||
TimToady | because Unix is wrong? | ||
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 ? | ||
TimToady | so might .grep ;) | ||
lizmat | geekosaur: Unix's uniq is like Perl6's squish | ||
geekosaur | yes, exactly | ||
that would be why I described Unix uniq's behavior as squashing :p | 15:23 | ||
lizmat | ah, ok :-) | ||
geekosaur | (and that does tend to be a Unix newbie trap, which is a pretty good argument that Unix is wrong) | ||
masak | TimToady: I was in a situation where I wanted to .uniq anyway. I mainly wanted to make sure .uniq flattened. | ||
lizmat | anyway, I was asked this yesterday by a visitor at the booth | ||
masak | and yes, I want .uniq, and not .squish in this case. | ||
TimToady | we also have prior art for squishing in p5's tr///s | 15:24 | |
15:24
xenoterracide joined
|
|||
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 | ||
lizmat | and then .squish to .uniq ? | 15:25 | |
TimToady | nope | ||
lizmat | ok, that was a suggestion I got | ||
geekosaur | now *that* would be confusing | ||
TimToady | no need to propagate the mistakes of other cultures | ||
geekosaur | .uniq vs .unique | ||
lizmat | but .unique would make it different from .uniq, and thus be a warning flag | ||
I can dig that | |||
and it would allow a clear deprecation path | 15:26 | ||
TimToady | m: say (1..10).map({ $_ %% 2 ?? $_ * 10 !! next }).perl | 15:30 | |
camelia | rakudo-moar 315ec6: OUTPUT«(20, 40, 60, 80, 100).list» | ||
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 | ||
TimToady | there's a cool idiom | ||
15:30
akagi201__ left
|
|||
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" } | ||
gtodd: S12:1629 | 15:33 | ||
synopsebot | Link: perlcabal.org/syn/S12.html#line_1629 | ||
lizmat | TimToady: first a deprecation cycle, as we probably have code out there depending on uniq | ||
TimToady | shore | 15:35 | |
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 | ||
maybe we can fix that somehow | |||
could also argue that it should be restricted to integers | 15:40 | ||
TimToady loves to argue so much that he often ends up arguing both sides. :) | 15:41 | ||
TimToady would've made a bad lawyer... :) | 15:42 | ||
lizmat | I agree | ||
I disagree | |||
mst | if you get DID, nobody's going to notice ... | ||
dalek | ecs: 221ef4b | (Elizabeth Mattijsen)++ | S (3 files): Don't use 'uniq', use 'unique' instead To prevent confusion by Unix 'uniq' users |
15:43 | |
mst | some unix commands have secret long names | 15:44 | |
for example | |||
'rm -rf did you really mean to do that?' | |||
but also 'uniq did you really mean sort -u?' | |||
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:48 | |
Lawyers are taught to never say what they really think. That's why it's such good training for politics. | 15:52 | ||
15:52
rurban1 left
|
|||
huf | so why have there been so few actors in politics? | 15:55 | |
geekosaur | because the scriptwriters are terrible? | ||
huf | :) | 15:56 | |
15:57
ab5tract joined
15:59
woolfy left
16:03
Tekk_` joined
|
|||
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 | |
16:04
Tekk_ left
|
|||
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. | ||
but he was the teflon president with respect to his own words as well as others'. :) | 16:06 | ||
16:08
xenoterracide left,
isacloud______ is now known as isacloud
|
|||
lizmat | T-Dose shutting down& | 16:13 | |
16:13
lizmat left,
test__ joined,
flussence joined
|
|||
gtodd | thanks | 16:14 | |
16:15
test__ left
16:16
rindolf left
|
|||
huf | TimToady: yeah, would have to be a serious method actor :) | 16:16 | |
16:32
thou left
16:35
kjs_ joined
16:36
kaare_ joined
16:39
breinbaas left,
breinbaas joined
|
|||
dalek | ecs: d728b4a | TimToady++ | S12-objects.pod: Don't assume .WHAT and friends are normal Some of them may be implemented as normal methods or operators for now, but we still reserve the right to change any of them into magical ponies. |
16:44 | |
16:45
Celelibi joined,
raiph joined
|
|||
masak | :) | 16:47 | |
well, I guess that answers that. | |||
TimToady | .oO(a compelling counterargument: "Because I said so!") |
||
masak | indeed. | ||
TimToady | what I meant by "macro", which usage you'll be pleased that I've excised | 16:48 | |
masak | was just gonna say. | ||
precision++ | |||
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 | ||
TimToady++ | |||
TimToady: what do you think of the idea of warning on unknown nameds to .new ? | 16:50 | ||
TimToady | it would be nice to generalize it | 16:51 | |
masak | how? | 16:52 | |
TimToady: also (later), what would you think of merging (the effects of) github.com/masak/data-pretty into spec/Rakudo? | |||
TimToady | by actually implementing class closing and finalizing as specced | ||
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? | ||
with the "wrong" mechanism | |||
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:54 | |
16:54
zakharyas left
16:55
zakharyas joined
|
|||
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 | ||
*than | |||
masak | just to be clear, would you be fine with changing prettifying all those situations, as long as they're consistent? | 16:58 | |
probably not, on a second re-read. | 16:59 | ||
TimToady is still not in a state to make important decisions, really... | 17:01 | ||
masak | okioki | ||
17:01
kjs_ left
|
|||
masak | yes, it's because it's a rather broad change that I'd like to get a go-ahead on it. | 17:01 | |
mst | masak: you might look at MooseX::StrictConstructor | 17:03 | |
which some people use | |||
but, in general, I'm not fond of | |||
TimToady would, however, like to avoid the pythonic solution of forcing people to use formatters more often than necessary | |||
mst | the key thing being that, yes, catching a typo in named constructor params is nice | ||
TimToady | Perl still believes in interpolation, by and large. | ||
mst | BUT | ||
17:03
Alula joined
|
|||
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. | ||
mst | plus there's assorted cleverness you can do in BUILD with otherwise-unused names | ||
masak | even interestinger. | ||
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 | ||
masak | and (b) it would turn off itself if you had a sufficiently weird BUILD, or maybe a BUILD at all | ||
? | 17:06 | ||
TimToady inclines to default to strict, but make it really easy to turn off | |||
a trait, in the absence of other evidence | |||
mst | oh, also, StrictConstructor used a neat trick to deal with BUILD | ||
basically, if you handle a key in the args, you delete it from the hashref | |||
and then at the end of BUILDALL, it checks if the only -remaining- keys are ones it knows about | 17:07 | ||
and if not, then throws an exception | |||
TimToady | that disallows passing the same parameter to multiple levels | ||
mst | swings, roundabouts, etc. | ||
TimToady | so we've leaned away from the deletion approach | 17:08 | |
mst | I've never seen anybody complain about that | ||
I don't personally like it very much | |||
TimToady | and it's kinda heavy | ||
mst | but I've not yet seen anybody lose a foot | ||
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
|
|||
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)) | ||
which would handle the case I was talking about before | |||
17:10
kjs_ joined
|
|||
TimToady | see also the ideas at S12:2172 re closing and finalizing classes at LINK time | 17:14 | |
synopsebot | Link: perlcabal.org/syn/S12.html#line_2172 | ||
masak .oO( as opposed to at ZELDA time ) | 17:15 | ||
TimToady | Maybe we need an "app" declaration that says "I am not, nor have I ever been, a module." | 17:19 | |
which basically would mean "My CHECK time is everyone's LINK time." | 17:22 | ||
and you may not compile me as a module | |||
timotimo | sounds kinda good to me | ||
TimToady | you can run multiple of me in a PROCESS (like in a webserver), but I must have my own GLOBAL | 17:23 | |
17:24
ajr_ left
17:26
rindolf joined
17:29
thou joined
|
|||
masak | I'm having mild warning bells go off on that idea. they're softly mumbling "singleton" and "final class". | 17:32 | |
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? | ||
TimToady | that would be betweenthe app and the framework in which it is loaded | 17:34 | |
see apache | |||
masak .oO( app-ache ) | 17:35 | ||
masak detrains & | |||
timotimo | against that, you can take an appspirin | 17:36 | |
17:36
ab5tract left
|
|||
vendethiel | .oO( not sure aspirines can fight trains ) |
17:36 | |
17:36
lizmat joined
17:44
woolfy joined
|
|||
timotimo | ooooh interesting | 17:44 | |
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
|
|||
timotimo | heh. | 17:50 | |
17:51
kernel joined,
[particle] joined,
kernel is now known as Guest33617
|
|||
dalek | kudo/nom: d44f431 | (Elizabeth Mattijsen)++ | src/core/ (5 files): Deprecate .uniq in favor of .unique |
17:52 | |
17:53
FROGGS left,
jsimonet left
17:56
Tekk_` is now known as Tekk_,
Tekk_ is now known as Guest67700
|
|||
lizmat | dinner& | 17:56 | |
17:57
Guest67700 is now known as Tekk_`
17:58
ugator joined
|
|||
timotimo | what's the most idiomatic way - except for with a slice - to loop over all but the first element in an array? | 18:02 | |
m: for "a".."f" { FIRST { next }; .say } | 18:03 | ||
camelia | rakudo-moar 315ec6: OUTPUT«abcdef» | ||
timotimo | m: for "a".."f" { once { next }; .say } | ||
camelia | rakudo-moar 315ec6: OUTPUT«bcdef» | ||
timotimo | m: for ^2 { for "a".."f" { once { next }; .say } } | ||
camelia | rakudo-moar 315ec6: OUTPUT«bcdefbcdef» | ||
timotimo | not bad :) | ||
oh ... damn ... Internal error: zeroed target thread ID in work pass | 18:05 | ||
too lazy to golf that right now | 18:07 | ||
gist.github.com/timo/19bca00c702507cabad3 | |||
TimToady | m: for "a".."f" { once next; .say } | 18:12 | |
camelia | rakudo-moar 315ec6: OUTPUT«bcdef» | ||
TimToady | don't need the block | ||
timotimo | fair enough :) | 18:13 | |
18:15
ghostlines left
18:17
bjz_ left,
bjz joined
|
|||
timotimo | well, that change makes it run again | 18:19 | |
but it's much, much slower all in all | |||
18:23
jepeway joined
18:26
rurban joined
18:30
kjs_ left
18:31
ghostlines joined
18:42
kjs_ joined
18:44
Sqirrel joined
|
|||
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» | ||
FROGGS_ | std: my $x; say $x /= 0 | ||
camelia | std 14ad63b: OUTPUT«ok 00:00 139m» | ||
timotimo | huh, how does that happen? | 18:46 | |
FROGGS_ | I dunno... the Any in $x triggers it | 18:47 | |
TimToady | "No identity value to autovivify $x with" | ||
but arguably / could have an identity value of 0 | 18:48 | ||
since it works on the left anyway | |||
but you'd think it should be 1 to go with * | 18:50 | ||
probably the current setup is most correct, but yeah, the message is LTA | 18:51 | ||
FROGGS_ | yeah | ||
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? | ||
vendethiel | .oO( please only post the power-thingie photos ) |
||
timotimo | ? | 18:54 | |
why only them? | |||
raiph | TimToady: Because much of the video from that point on doesn't show your slides. | ||
18:55
Guest1419 left
|
|||
lizmat takes an early night | 18:58 | ||
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 | ||
which is a whole lot more than the second place which is 3600248 from gimme and 3600000 from push | 19:00 | ||
and then 601018 in reify, which is almost nothing in comparison | |||
scalars make up 21803529 allocations, which is unsurprisingly much more than int, parcel, num and str | 19:02 | ||
m: say 21803529 - 8303365 - 4101028 - 3500398 - 1700012 | 19:03 | ||
camelia | rakudo-moar 315ec6: OUTPUT«4198726» | ||
FROGGS_ | gnight lizmat | ||
timotimo | 600104 ← this is how many BOOTCode objects we build, weird. | ||
all in src/gen/m-BOOTSTRAP.nqp:1488 | |||
ah, that's the clone method of Block.HOW | 19:04 | ||
FROGGS_ | \o/ cpandatesters now also generated the os/compiler/backend matrix properly! | 19:06 | |
(besides listing the reports) | |||
now I need to display the report details | 19:07 | ||
19:08
Guest1419 joined
19:16
darutoko left
|
|||
Woodi | hallo #perl6 | 19:20 | |
m: grammar H { rule TOP { 'class Abc {' <body> '};' }; rule body { <words>+ % \s+ }; rule words { \S+ }; }; say H.parse( 'class Abc { a };' ); | |||
camelia | rakudo-moar 315ec6: OUTPUT«「class Abc { a };」 body => 「a 」 words => 「a 」» | ||
Woodi | I'm pretty sure words was defined as *\S* .. | 19:21 | |
19:23
aindilis left
|
|||
bartolin | are there plans to switch to parrot 6.9.0? | 19:23 | |
the other day (shortly before this month's release of Rakudo) lizmat++ got a | |||
lot of spectest failures after trying to bump PARROT_REVISION (also a few | |||
changes in Rakudo where needed, see branch parrot-690) | |||
lizmat's spectest failures: gist.github.com/lizmat/05a8462ffe4d6b0a8e52 | |||
I also tried to use parrot 6.9.0 and it looks as if most of the spectest | |||
failures are caused by segfaults (maybe related to GC). Here is one example: | |||
$ perl6-p -e 'for 1 .. 50 { print "$_ "; EVAL q[ "abc" ~~ m/ \d / ]; }' | |||
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 Segmentation fault | |||
TimToady | Woodi: don't use 'rule' when you want 'token' | 19:24 | |
Woodi | oki, I will check tokens | 19:26 | |
FROGGS_ | bartolin: yes, I'd like to switch to a properly working new parrot revision :o) | 19:29 | |
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 | ||
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? | ||
FROGGS_ | bartolin: a gdb backtrace would be helpful | 19:32 | |
bartolin | FROGGS_: okay, I'll take a look | 19:33 | |
19:35
cxreg2 left
|
|||
dalek | kudo/nom: a07bdab | moritz++ | docs/ChangeLog: [docs] update ChangeLog |
19:38 | |
vendethiel | "Vendethiel (aka Ven aka nami doc)" | 19:39 | |
I'm sorry, raiph :P | |||
19:39
aindilis joined
19:49
zakharyas left
19:50
zakharyas joined
|
|||
bartolin | FROGGS_: here is a gdb backtrace: gist.github.com/usev6/6e57582839549b6d7698 | 19:53 | |
19:53
Mso150 joined
|
|||
bartolin | FROGGS_: I'm not familiar with gdb, so I hope that's the right information | 19:53 | |
19:58
rindolf left
|
|||
bartolin | FROGGS_: and here is a second gdb backtrace: gist.github.com/usev6/1ba6157dae245b239260 | 19:58 | |
19:59
rindolf joined
|
|||
FROGGS_ | bartolin: yes, that's perfect | 20:01 | |
rurban: do you know about that regression? | 20:02 | ||
rurban: at least this looks like parrot is to blame: gist.github.com/usev6/6e57582839549b6d7698 | 20:03 | ||
bartolin is reading a gdb tutorial now ;-) | 20:05 | ||
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…» | ||
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:16
xfix is now known as notfix
|
|||
vendethiel | mmh, S06, help me.. | 20:18 | |
not S06 then. Well alright | 20:19 | ||
20:21
cxreg joined
|
|||
vendethiel | Didn't we have a math-parser-thingie on rosettacode? can't remember the name, and searching "math" doesn't bring anything | 20:22 | |
(very simple parsing algorithm, like 3+2*5) | 20:24 | ||
20:25
Ven joined
|
|||
Ven | m: say infix:{"+"}(1, 2) | 20:26 | |
camelia | rakudo-moar 315ec6: OUTPUT«===SORRY!===Cannot find method 'has_compile_time_value'» | ||
Ven | m: say infix:["+"](1, 2) | ||
camelia | rakudo-moar 315ec6: OUTPUT«===SORRY!=== Error while compiling /tmp/JC4eD2yyjhUndeclared routine: infix:["+"] used at line 1. Did you mean 'infix:<+>', 'infix:<+&>', 'infix:<+|>', 'infix:<+^>', 'infix:<+<>'?» | ||
20:27
Ven left
|
|||
vendethiel | m: say infix:<+<>(1) | 20:27 | |
camelia | rakudo-moar 315ec6: OUTPUT«===SORRY!=== Error while compiling /tmp/JHfySKmcBLUnable to parse expression in quote words; couldn't find final '>' at /tmp/JHfySKmcBL:1------> say infix:<+<>(1)⏏<EOL> expecting any of: …» | ||
vendethiel | camelia's escaping is :P | ||
20:34
rindolf left,
rindolf joined
20:37
mauke left
20:38
zakharyas left
|
|||
moritz | camelia only escapes newlines and zero bytes, iirc | 20:40 | |
20:42
mauke joined,
ghostlines left
20:45
mauke_ joined,
mauke left
20:47
kaare_ left
|
|||
vendethiel | err, rakudo* | 20:50 | |
20:51
mauke_ left
20:55
mauke joined
20:56
raiph left
|
|||
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:56 | |
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. :) | ||
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) | 20:58 | |
20:59
mauke left
|
|||
dylanwh | :-D | 21:00 | |
21:01
notfix is now known as xfix
|
|||
dalek | ast: 27a7e32 | usev6++ | S04-exceptions/control_across_runloop.t: Unfudge now passing test for rakudo.parrot; RT #122325 |
21:02 | |
synopsebot | Link: rt.perl.org/rt3//Public/Bug/Displa...?id=122325 | ||
21:02
mauke joined
21:06
Mso150_r joined
21:07
mauke_ joined,
Mso150 left
|
|||
timotimo | i'm getting pretty annoyed by our lack of awesome natives :P | 21:08 | |
having to turn $foo++ into $foo = $foo + 1 and such ... | |||
(i'm still fiddling around with that benchmark i stumbled upon on twitter recently) | 21:09 | ||
21:10
mauke left,
mauke joined
21:12
Mso150_r_s joined
21:13
mauke_ left,
mauke__ joined,
mauke__ left,
mauke__ joined
21:15
mauke left,
Mso150_r left
21:16
mauke joined
21:18
mauke__ left
|
|||
timotimo | gist.github.com/timo/2d2cc1260428e5758086 | 21:21 | |
21:21
mauke left
21:22
mauke joined
21:24
erkan joined
21:27
Guest70355 left
21:28
mauke_ joined
21:29
mauke left
21:30
xfix is now known as notfix
21:32
mauke_ is now known as mauke
21:37
mauke_ joined
|
|||
masak | sounds like an excellent reason to improve our natives ;) | 21:39 | |
21:40
mauke left
21:41
mauke joined
|
|||
jepeway | how do, p6peeps? | 21:41 | |
FROGGS_ | very good | 21:42 | |
21:43
mauke_ left
21:44
mauke_ joined
|
|||
jepeway | marvy, marvy. | 21:44 | |
FROGGS_ | gnight #perl6 | 21:45 | |
21:45
mauke left
|
|||
jepeway | ah, well, ciao, FROGGS_. | 21:45 | |
21:46
molaf__ left
|
|||
jepeway | so, i've been playing with time zones a bit, hooking into the Olson DB via NativeCall. | 21:47 | |
Code's at fatal: No configured push destination. | |||
urk, no, that's not where the code is :) | |||
it's at github.com/cjepeway/p6-tz | |||
21:48
mauke_ left
|
|||
jepeway | i have questions re: how one applies timezone rules to a DateTime to determine an offset from UTC. | 21:49 | |
well, less questions, and more just puzzlement, i s'pose. | |||
21:50
mauke joined
|
|||
jepeway | anybody 'round to be puzzled at? | 21:51 | |
21:54
mauke_ joined
21:56
mauke left
|
|||
masak is around, kinda | 21:57 | ||
jepeway: could you phrase your puzzlement in terms of code, preferably just one line, preferably using camelia? | 21:58 | ||
21:58
mauke joined
|
|||
jepeway | masak: I'll give it a go. | 21:59 | |
(did this one a few weeks back, hope it's illustrative) | 22:00 | ||
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:01
mauke_ left
|
|||
jepeway | obviously, the in-timezone method that takes an int won't ever show anything other than '-0400' | 22:02 | |
22:02
xenoterracide joined
|
|||
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. | ||
masak | yes, I see what you're saying. | 22:03 | |
jepeway | well, that's what I'm puzzling: would you like that behavior? | ||
ah, cool. | |||
masak | it's almost like we have two kinds of things here that we call "timezone": | ||
(a) the thing with a certain offset from UTC. | |||
22:04
mauke left
|
|||
masak | (b) the way time is kept in a given roughly longitudinal stripe on the surface of the Earth, including daylight savings shenanigans. | 22:04 | |
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. | ||
masak | and that the Temporal spec as it stands today only ever cares about the (a) notion. | ||
jepeway | indeed so. | ||
masak | well, so much for the easy observations :) | 22:06 | |
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
Alina-malina left
|
|||
masak | something like "timezone" (established in S32/Temporal already) and "time rules". | 22:07 | |
doesn't have to be perfect terms. just enough to distinguish for now. | |||
jepeway | sure. | 22:08 | |
22:08
Alina-malina joined
|
|||
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:08 | |
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 | |||
masak | like a Temporal.pm, but implemented externally to Rakudo. | ||
I can live with "wallclock rules", if you prefer that. | |||
jepeway | understood. | ||
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). | ||
masak | so for me, this day contains 25 hours. | ||
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
rindolf left
|
|||
masak | well, an extra hour was shoved into the day. | 22:11 | |
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. | ||
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. | ||
yup: that day has 23 hours, and there's not 1:10AM, eg. | 22:13 | ||
masak | right. | ||
these problems are not insurmountable. but they need to be tackled, and kind of "all at once", with a strategy. | |||
jepeway | it's...icky, for the hours where the warps occur. | ||
22:14
spider-mario left
|
|||
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 | |
massive bonus points for passing tests :) | |||
22:14
mauke joined
|
|||
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:15 | |
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? | ||
masak | right. that's a legitimate question. | ||
jepeway | yes, it took me a bit to see what was left out and what included as v. wise, in S32/Temporal | ||
22:17
Exodist left
|
|||
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. | ||
masak | "...this module doesn't handle all the world's time zones, locales, date formatters or calendars..." | ||
jepeway: I'm fine with them dying outright. | |||
jepeway | yes, read that too, and was quite inspired, honestly. | ||
22:19
xenoterracide left,
denis_boyun_ left
|
|||
jepeway | in the "hey, that's a pretty well thought call on separation of concerns," i mean | 22:20 | |
22:21
mauke_ joined
|
|||
jepeway | any thoughts on dragging olson db into rakudo (if it comes to that?) or should a pp impl be the eventual target? | 22:21 | |
22:22
mauke left,
Mso150_r_s left
22:26
ugator left
22:27
mauke_ left,
mauke joined
|
|||
jepeway | (though I'm going to keep working with Olson via NativeCall for now) | 22:30 | |
jepeway saw that retupmoca (I think?) wrote a grammar for the plain-text Olson files | 22:31 | ||
22:32
mauke_ joined,
mauke left
|
|||
masak | I have no current opinion on the coreness of Olson. | 22:32 | |
nor do I see a need to have one until a proposed concrete improvement is at hand ;) | 22:33 | ||
jepeway | hokay. | ||
might you cast your august eyes on some unworthy code @ github.com/cjepeway/p6-tz/blob/mas...imeZone.pm ? | 22:35 | ||
22:36
mauke_ left
|
|||
jepeway | presently, I'm thinking most of what an augmented DateTime needs is an in-timezone multi that delegates to its TimeZone object. | 22:37 | |
and some serious trickery in the TZ objects to handle ambiguous and "can't exist" wallclock times | 22:38 | ||
(oh, in-timezone multi: one takes an Instant, another takes a DateTime) | 22:40 | ||
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 | ||
22:41
mauke joined
|
|||
jepeway | s/than/ than what/ | 22:42 | |
22:44
mauke_ joined
22:46
mauke left
22:49
mauke_ left
|
|||
masak | :) | 22:49 | |
it's getting late here, so I'd better save casting eyes, august or not, on code until tomorrow. | 22:50 | ||
but I can surely look at it then. | |||
thanks for thinking about this. | |||
jepeway | coolio. | ||
masak | jepeway++ | ||
'night, #perl6 | |||
jepeway | hey, it's fun. thanks for yer time, masak++. g'nite, rest well. | 22:51 | |
22:57
mauke joined
23:00
mauke_ joined,
mauke_ left,
mauke_ joined
23:02
mauke left
23:03
mauke joined
23:05
mauke_ left
23:08
mauke left
23:10
kurahaupo left
23:21
mauke joined
23:25
mauke_ joined,
Isp-sec left
23:26
kurahaupo joined
23:28
mauke left
23:29
rurban left
23:31
mauke joined
23:34
mauke_ left
23:39
gfldex left
23:45
araujo joined,
araujo left,
araujo joined
23:47
FROGGS_ left
23:49
BenGoldberg joined
23:54
kjs_ left
|