»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, std:, or /msg camelia p6: ... | irclog: irc.perl6.org | UTF-8 is our friend! | feather will shut down permanently on 2015-03-31 Set by jnthn on 28 February 2015. |
|||
00:01
Akagi201 joined
00:05
Akagi201 left
00:19
jack_rabbit_ joined
00:26
skids joined
00:28
raiph joined
00:39
laouji left
00:40
laouji joined
00:43
laouji left,
laouji joined,
pdcawley joined
01:01
Celelibi left
01:05
Celelibi joined
01:07
Sqirrel left
|
|||
labster | m: "|".IO.perl.EVAL | 01:14 | |
camelia | rakudo-moar af823c: OUTPUT«Method 'IO' not found for invocant of class 'Any' in block <unit> at EVAL_0:1 in any <unit-outer> at EVAL_0:1 in block <unit> at /tmp/zFcIhD9qTq:1» | ||
labster | m: "foo|bar".IO.perl.EVAL | ||
camelia | rakudo-moar af823c: OUTPUT«5===SORRY!5=== Error while compiling EVAL_0Two terms in a rowat EVAL_0:1------> 3q|foo|7⏏5bar|.IO(:SPEC(IO::Spec::Unix),:CWD</home expecting any of: infix infix stopper statement end statemen…» | ||
labster | m: "foo".IO.perl.EVAL.say | 01:16 | |
camelia | rakudo-moar af823c: OUTPUT«"/home/camelia/foo".IO» | ||
01:17
colomon left,
Akagi201 joined,
colomon joined
01:21
chenryn joined
01:24
aborazmeh joined,
aborazmeh left,
aborazmeh joined
01:25
chenryn left
01:29
aborazmeh left
01:30
yeahnoob joined
01:32
lembark joined
01:44
BenGoldberg joined
01:47
lembark left,
chenryn joined
01:51
aborazmeh joined,
aborazmeh left,
aborazmeh joined
01:56
vendethiel joined
02:12
konsolebox joined
02:14
konsolebox left,
konsolebox joined,
jack_rabbit_ left,
andreoss left
02:15
noganex_ joined,
jack_rabbit_ joined
02:17
kurahaupo joined,
noganex left
02:18
jack_rabbit_ left,
jack_rabbit joined
02:20
dayangkun joined
02:25
rmgk_ joined,
rmgk left,
rmgk_ is now known as rmgk
02:30
lembark joined
02:38
lembark left
02:49
lembark joined
02:58
jack_rabbit left
02:59
cognominal left,
Sqirrel joined
03:00
cognominal joined,
BenGoldberg left
03:18
laouji_ joined
03:21
laouji left
03:22
vendethiel left
03:24
lembark left
03:28
mr-foobar joined
03:30
aborazmeh left
03:40
raiph left
03:45
Erendis42d left
03:48
hobbs left
03:50
lembark joined
04:01
aindilis left,
aindilis joined
04:05
chenryn left
04:08
jack_rabbit joined
04:14
lembark left
04:19
chenryn joined,
skids left
04:23
jack_rabbit left
04:28
kaare_ joined
04:29
jack_rabbit joined
|
|||
dalek | kudo-star-daily: cc8774d | coke++ | log/ (2 files): today (automated commit) |
04:35 | |
04:35
hobbs joined
04:44
lembark joined
04:49
diana_olhovik_ joined
04:53
lembark left
05:02
cognominal left
05:25
[Sno] left
05:27
lembark joined
05:31
aborazmeh joined,
aborazmeh left,
aborazmeh joined
05:36
diana_olhovik_ left
06:01
domidumont joined
06:02
laouji joined
06:05
domidumont left,
laouji_ left
06:06
domidumont joined
06:15
diana_olhovik joined
06:21
mr-foobar left
06:26
mr-foobar joined
06:30
aborazmeh left
06:51
RabidGravy joined
06:52
laouji left
06:53
laouji joined
07:03
quester joined
07:08
zakharyas joined
07:11
bjz joined,
Alina-malina left,
larion left
07:12
Alina-malina joined
07:14
[Sno] joined
07:17
lembark left
07:20
bjz left
07:21
bjz joined,
bjz left,
Ven joined
07:24
mr-foobar left
07:25
mr-foobar joined
|
|||
Ven | \o, #perl6! | 07:29 | |
07:33
gtodd left
07:34
abraxxa joined
07:36
larion joined,
bjz joined
07:37
darutoko joined,
rindolf joined
07:44
gtodd joined
07:45
lizmat joined
|
|||
lizmat | good *, #perl6! | 07:45 | |
openjdk.java.net/projects/panama/ # wonder if this could be of interest to rakudo on jvm users | |||
07:49
bjz left
07:54
kst` joined,
lizmat left
07:55
lizmat joined
07:56
kst left
|
|||
lizmat | m: my $a will begin { $_ = 42 }; say $a | 07:56 | |
camelia | rakudo-moar af823c: OUTPUT«5===SORRY!5=== Error while compiling /tmp/j_k4AQLrszCannot assign to an immutable valueat /tmp/j_k4AQLrsz:1» | ||
07:57
gtodd left,
gtodd1 joined
07:59
bjz joined
|
|||
dalek | kudo/nom: a34d024 | lizmat++ | / (2 files): Make my $a will begin { $_ = 42 } work |
08:02 | |
08:02
xfix joined
08:03
larion left,
bjz left
|
|||
labster | m: 3.path # I should be deprecated | 08:04 | |
camelia | ( no output ) | ||
lizmat | m: 3.IO.perl.say | 08:08 | |
camelia | rakudo-moar af823c: OUTPUT«q|3|.IO(:SPEC(IO::Spec::Unix),:CWD</home/camelia>)» | ||
08:08
virtualsue joined
|
|||
lizmat | .oO( need some inspiration to get back to the newio branch ) |
08:09 | |
but meanwhile, commute to Oslo & | 08:10 | ||
08:10
lizmat left
08:13
telex left,
virtualsue left
08:14
telex joined
08:17
gtodd1 left
08:25
fhelmberger joined
08:27
gtodd joined
08:29
kurahaupo left
08:30
dakkar joined
08:31
|Tux| left
|
|||
btyler | timotimo: fun to see you mention ZK -- I wrote the run animation for some of the walker bots years and years ago :) | 08:32 | |
08:34
Isp-sec joined
08:36
|Tux| joined
08:37
larion joined
08:45
domidumont left
08:49
domidumont joined,
pecastro joined
08:53
brrt joined
08:54
espadrine_ joined
09:01
laouji left
|
|||
itz | damm missing jnthn tutorial in .no .. I hope it's re-appearing over the summer at YAPC::EU or somewhere else? | 09:03 | |
nwc10 | oh g.noes | 09:04 | |
09:07
FROGGS joined
|
|||
brrt | jnthn giving tutorials again | 09:07 | |
how come i didn't know | |||
itz | it does look like perl6.101 rather than jit.301 :) | 09:08 | |
FROGGS | [Coke] / bartolin: do you already have a way to know what test files in roast we do *not* run? | 09:13 | |
brrt | fair enough :-) | ||
FROGGS | [Coke] / bartolin: I found it quite surprising that we did not run S05-capture/alias.t until yesterday | ||
09:14
Ven left
|
|||
dalek | pan style="color: #395be5">perl6-examples: bff64aa | paultcochrane++ | categories/rosalind/trie-grondilu.pl: [rosalind] simplify command line data input |
09:17 | |
pan style="color: #395be5">perl6-examples: 5f3c6ac | paultcochrane++ | categories/rosalind/trie-grondilu.pl: [rosalind] Add usage information |
|||
pan style="color: #395be5">perl6-examples: d08200a | paultcochrane++ | lib/Pod/Htmlify.pm6: Sort menu tabs |
|||
pan style="color: #395be5">perl6-examples: 1fbd9ec | paultcochrane++ | categories/rosalind/trie-grondilu.pl: [rosalind] add problem description to trie example |
|||
pan style="color: #395be5">perl6-examples: 29b25be | paultcochrane++ | / (4 files): Merge branch 'master' of github.com:perl6/perl6-examples |
|||
09:18
andreoss joined
|
|||
dalek | pan style="color: #395be5">perl6-examples: 9702a33 | paultcochrane++ | lib/Pod/Htmlify.pm6: Loop over categories table sorted by key |
09:18 | |
09:24
_mg_ joined
|
|||
FROGGS | std: class Foo { has $.x is rw }; class Bar is Foo { }; my Foo $u .= new(:5x); say $u.x; $u = Bar.new(Foo{:12x}); | 09:26 | |
camelia | std 28329a7: OUTPUT«ok 00:00 143m» | ||
FROGGS | std: class Foo { has $.x is rw }; class Bar is Foo { }; my Foo $u .= new(:5x); say $u.x; $u = Bar.new(Foo::x => 12); | 09:28 | |
camelia | std 28329a7: OUTPUT«5===SORRY!5===Preceding context expects a term, but found infix => instead at /tmp/lZ7s0c3QBi line 1:------> 3new(:5x); say $u.x; $u = Bar.new(Foo::x 7⏏5=> 12);Parse failedFAILED 00:00 140m» | 09:29 | |
FROGGS | I think I'd prefer this to set the parent's attribute | ||
Foo{ ... } just looks weird IMO | |||
TimToady: what do you think? | |||
09:31
quester left
|
|||
FROGGS | or is Foo::x already a sub call? | 09:31 | |
m: class Foo { }; say (Foo{:12x}) | 09:32 | ||
camelia | rakudo-moar a34d02: OUTPUT«(Any)» | ||
FROGGS | m: class Foo { }; say (Foo{:12x}).WHAT | ||
camelia | rakudo-moar a34d02: OUTPUT«(Any)» | ||
FROGGS | hmmm | ||
09:33
rba_ joined
|
|||
FROGGS | and one would have to repeat the Foo:: for every attr in my proposed version | 09:33 | |
RabidGravy | I think there needs to be something on the run time application of roles in the docs.perl6.org/language/objects#Roles - will do that later | 09:34 | |
09:34
TimToady left
09:35
domidumont left,
domidumont joined
09:37
_mg_ left
|
|||
RabidGravy | right, off out to strike my blow for democracy now. catch y'all later. | 09:40 | |
09:40
virtualsue joined
|
|||
itz | "vote early, vote often" | 09:40 | |
DrForr | Chicago FTW. | 09:41 | |
09:41
rba_ left
09:45
RabidGravy left
09:46
TimToady joined
09:48
Zoffix joined
|
|||
brrt | oh, yeah, good luck british people | 09:51 | |
09:56
rba_ joined
|
|||
brrt | try not to make any irrevocable geopolitical mess | 09:56 | |
itz | we've out sourced that to the EU ;) | 09:57 | |
dalek | kudo/nom: 89c43cc | FROGGS++ | t/spectest.data: run test S12-class/parent_attributes.t |
||
ast: 80cd397 | FROGGS++ | S12-class/parent_attributes.t: RT #125129 skip test for initializing parent attrs |
09:58 | ||
synbot6 | Link: rt.perl.org/rt3/Public/Bug/Display...?id=125129 | ||
09:58
Ven joined
10:01
rba_ left
10:03
bjz joined
10:05
Isp-sec left
10:06
yeahnoob left,
andreoss left,
FROGGS left
10:14
Ven left
10:20
bjz left
10:21
grondilu joined
10:26
RabidGravy joined,
FROGGS joined
10:28
ssqq joined
10:29
ssqq left
10:30
dayangkun left,
chenryn left
10:31
grondilu left
10:32
grondilu joined
|
|||
grondilu | Hello. What is this 'will' thing and where is it documented? (it's no easy to grep it in the spec) | 10:33 | |
10:34
brrt left
|
|||
grondilu grepped C<will> and found something in S14 | 10:35 | ||
FROGGS | [Coke] / bartolin: nvm, I've got a one-liner that does what I need | ||
RabidGravy | grondilu, design.perl6.org/S14.html#Traits | ||
the actually implemented traits may or may not be documented elsewhere | 10:39 | ||
10:44
bjz joined,
virtualsue left
10:46
RabidGravy left
10:52
espadrine_ is now known as espadrine
10:53
cygx joined,
uncleyear left
|
|||
cygx | o/ | 10:53 | |
grondilu | m: say (^100)[*-10 .. *-1]; | 10:54 | |
camelia | rakudo-moar 89c43c: OUTPUT«90 91 92 93 94 95 96 97 98 99» | ||
cygx | Is github.com/cygx/p6-tinycc/commit/b...6413a607b1 the correct way to declare callback parameter in NativeCall? | ||
10:55
uncleyear joined
|
|||
grondilu | m: my @primes = 2, grep *.is-prime, (3, 5 ... 999_997); say @primes[*-10..*-1]; # wondering if this is supposed to be fast | 10:55 | |
cygx | (the native trait gets applied in EXPORT to a .clone of that sub) | ||
10:55
uncleyear left,
uncleyear joined
|
|||
camelia | rakudo-moar 89c43c: OUTPUT«(timeout)» | 10:55 | |
11:02
chenryn joined
|
|||
timotimo | grondilu, try a simple range instead? | 11:02 | |
FROGGS | cygx: there needs to be whitespace between the param name and the signature | 11:05 | |
cygx: dunno if that's all | |||
cygx | FROGGS: Rakudo helpfully told me I should use :() for signatures | 11:14 | |
FROGGS: but I only got it to parse by omitting the name | |||
so what should it read? | |||
sub tcc_set_error_func(Pointer, Pointer, &cb (Pointer, Str)) | |||
11:16
Akagi201 left
|
|||
FROGGS | yes, that should work | 11:28 | |
11:32
konsolebox left
11:34
sue_ left
|
|||
cygx | sadly, it does not for me :( | 11:36 | |
if anyone else wants to look into it, here's a test case: gist.github.com/cygx/2f4aecee744fccefcab9 | |||
I used a recent version of TCC from repo.or.cz/w/tinycc.git | 11:37 | ||
11:40
_mg_ joined
11:44
rbaumer joined
11:45
konsolebox joined
|
|||
dalek | ast: 66f2576 | FROGGS++ | S02-literals/pod.t: fudge test because of a bug and lang spec reasons |
11:46 | |
11:46
FROGGS left
11:48
andreoss joined
11:49
raiph joined
11:50
FROGGS joined
|
|||
andreoss | m: my $x = 1; let $x = EVAL 'die'; say $x | 11:51 | |
camelia | rakudo-moar 89c43c: OUTPUT«Died in block <unit> at EVAL_0:1 in any <unit-outer> at EVAL_0:1 in block <unit> at /tmp/KTX74XZIEP:1» | ||
11:53
rbaumer left
|
|||
nwc10 | a | 11:54 | |
11:56
rba_ joined
11:59
FROGGS left
|
|||
dalek | ast: fd322e4 | FROGGS++ | S02-magicals/block.t: skip &?BLOCK test on rakudo, RT 125131 |
11:59 | |
12:03
[Sno] left
12:05
rba_ left
12:06
rba_ joined,
[Sno] joined,
sue_ joined
12:10
FROGGS joined
|
|||
dalek | ast: dcbfdc7 | FROGGS++ | S02-magicals/subname.t: bring subroutine name tests in shape |
12:10 | |
12:14
rba_ left,
rba_ joined
|
|||
nwc10 | domm++ # giving a talk that keeps FROGGS hacking :-) | 12:20 | |
FROGGS | *g* | 12:22 | |
12:25
mr-foobar left,
rba_ left
12:27
larion left
|
|||
dalek | ast: ae9c765 | FROGGS++ | S04-statements/when.t: skip tests for NYI'd exception type RT #125132 |
12:29 | |
synbot6 | Link: rt.perl.org/rt3/Public/Bug/Display...?id=125132 | ||
12:33
chenryn left
12:36
aborazmeh joined,
aborazmeh left,
aborazmeh joined
12:41
mr-foobar joined
12:43
pdcawley left
|
|||
dalek | ast: c719c99 | FROGGS++ | S05-modifier/repetition-exhaustive.t: fudge test about too greedy captures RT 125133 |
12:48 | |
12:48
RabidGravy joined
12:50
cygx left
12:53
brrt joined
12:56
cschwenz joined
12:59
muraiki joined
13:00
bbkr joined
13:01
cognominal joined
13:02
_mg_ left
13:08
[Sno] left
13:11
Akagi201 joined
13:14
[Sno] joined
13:17
rba_ joined
13:19
aborazmeh left
13:27
cognominal left
13:28
rajmund joined
13:30
rajmund left
13:31
larion joined
|
|||
dalek | c: c092762 | paultcochrane++ | lib/Type/List.pod: Update classify() example output |
13:31 | |
c: 6b192ff | paultcochrane++ | lib/ (3 files): Merge branch 'master' of github.com:perl6/doc |
|||
13:32
cschwenz left
13:37
rba_ left,
skids joined
13:40
cognominal joined
13:47
rba_ joined
13:48
Akagi201_ joined
13:50
Akagi201 left
13:51
mattp left,
mattp_ joined
14:12
Sqirrel left,
Sqirrel joined
14:16
aborazmeh joined,
aborazmeh left,
aborazmeh joined
14:20
rba_ left
14:22
rararara left
14:23
rba_ joined
14:28
lolisa joined
14:30
brrt left
14:31
aborazmeh left,
rba_ left
14:33
Ven joined
|
|||
jnthn | evening, #pelr6 | 14:47 | |
*perl :) | |||
RabidGravy | erp | ||
dalek | pan style="color: #395be5">perl6-examples: 8a8cb90 | paultcochrane++ | categories/euler/prob151-shlomif.p6: [euler] add docs for solution to problem 151 |
14:48 | |
pan style="color: #395be5">perl6-examples: 90ef9b2 | paultcochrane++ | categories/euler/prob151-shlomif.p6: Correct expected result Compare sorted output lists in event006 This allows us to better compare the output data, rather than simply the ordering of the output data which doesn't matter in this case. |
|||
14:48
dalek left
|
|||
hoelzro | morning #perl6 | 14:48 | |
[ptc] | oh dear, there I go killing dalek again... | ||
14:49
dalek joined,
ChanServ sets mode: +v dalek,
raiph left,
cognominal left
|
|||
moritz | [ptc]++ # only a killed dalek is a good dalek | 14:49 | |
[ptc] | heh :-) | 14:50 | |
14:51
FROGGS left
14:55
bs4h joined
14:58
araujo joined,
araujo left
|
|||
nwc10 | this dalek seems to have more lives than a cat | 15:00 | |
impossible to exterminate it | |||
15:01
bs4h left
|
|||
nwc10 | FROGGS is live again | 15:01 | |
(That's why he has pinged out) | |||
Ven | I've seen pypy.js linked here, but it's actually more impressive than it first looked! | 15:02 | |
"An rpython JIT backend that emits asmjs at runtime: ./deps/pypy/rpython/jit/backend/asmjs/." | |||
15:03
abraxxa left
15:06
raiph joined
15:14
vendethiel joined
15:21
gfldex joined
15:22
tinyblak left
|
|||
masak | afternoon, #perl6 | 15:26 | |
nwc10 | heresy! :-) | 15:27 | |
15:29
rindolf left
|
|||
nwc10 | although it would explain why I'm feeling a bit tired. | 15:31 | |
15:37
vendethiel left,
chenryn joined
|
|||
timotimo | evening | 15:38 | |
15:38
zakharyas left
|
|||
nwc10 | "herersier" :-) | 15:38 | |
15:38
rba_ joined
|
|||
TimToady | .tell FROGGS it seems to me that Foo::x doesn't scale well to multiple attributes, but I agree Foo{} is weird, so maybe we can think of something better | 15:39 | |
yoleaux | TimToady: I'll pass your message to FROGGS. | ||
15:43
tinyblak joined,
rindolf joined
15:45
chenryn left
15:46
chenryn joined
15:49
chenryn left
15:50
rba_ left
15:51
diana_olhovik left
|
|||
jnthn | TimToady: Bah, I was gonna implement Foo{...} in the near future; it's been one of those "easy enough" things that I never quite got to... :) | 15:53 | |
15:53
vendethiel joined
|
|||
japhb | What is FROGGS speaking about this session? | 15:53 | |
timotimo | what does the "glob" function in perl5 do? search for files by shell expression? | ||
15:53
Akagi201_ left
|
|||
japhb | jnthn: Can we get yoleaux in #moarvm, or is there a reason not to? | 15:53 | |
timotimo: Yeah, basically | 15:54 | ||
jnthn | japhb: I don't mind yoleaux being there, though most people on the channel are also on #perl6 :) | ||
japhb | (There are some details about *which* shell expansion, but yeah) | ||
jnthn | japhb: and so can use the bot there | ||
japhb: And the bot doesn't namespace .tell's by channel anyways :) | |||
japhb | jnthn: Yeah, I just figured to .ask questions or .tell things in the right channel, but if it doesn't namespace, I guess that doesn't matter much. | 15:55 | |
15:55
chenryn joined
|
|||
japhb | Speaking of yoleaux uses ... | 15:55 | |
15:55
Ven left
|
|||
itz | such as the standard Unix shell /bin/csh would do | 15:55 | |
:D | |||
. o O ( standard in 1984?) | 15:56 | ||
japhb | .ask FROGGS Besides the "C++ in progress" bit, what else has changed? I assume OpaquePointer -> Pointer ..... And what was the rant about? | ||
yoleaux | japhb: I'll pass your message to FROGGS. | ||
geekosaur | back in the day, it would try to use csh's glob operator because that would do output in a way useful to avoid special characters | ||
(like space and newline) | |||
timotimo | what do we recommend people to use in perl6? | 15:57 | |
japhb | itz: Well, there's some bits about bsd_glob IIRC, so not exactly what a shell user might naively assume | ||
15:58
aindilis left
|
|||
itz | timotimo: I assumed "dir" | 15:58 | |
examples.perl6.org/categories/cookb...ttern.html | 15:59 | ||
japhb | Cellular dead spots, I shake my fist at theee | 16:00 | |
tony-o | m: .basename.say for '.'.IO.dir | ||
camelia | rakudo-moar 89c43c: OUTPUT«.bash_historyp6eval-tokenstd.sshstarperl5.perl6.rccp1nqp-js.bashrcevalbot.logstar-2014.09rakudo-star-2015.03.tar.gzugexe-was-hererakudo-star-2015.02rakudo2.viminforakudo-inst-2.cpanmmbox.perlbr…» | ||
16:00
larion left
|
|||
timotimo | thanks itz | 16:02 | |
japhb wonders what .rcc is for | 16:03 | ||
16:04
spider-mario joined
|
|||
tony-o | m: .basename.say for '.'.IO.dir: test => /^'.'/ | 16:07 | |
camelia | rakudo-moar 89c43c: OUTPUT«.bash_history.ssh.perl6.rcc.bashrc...viminfo.cpanm.perlbrew.npm.lesshst..local» | ||
16:08
AndChat|228864 joined
|
|||
ugexe | is there a best practice for when to use a rule vs token? or should i only base that on the need of back tracking and code formatting via spaces? | 16:08 | |
timotimo | i think so | ||
jnthn | They have identical backtracking semantics | 16:10 | |
They only differ by sigspace | |||
16:10
AndChat|228864 is now known as jimmyz_
|
|||
timotimo | er, right | 16:11 | |
itz | is there a simple mapping rosetta of glob -> dir and similar | 16:12 | |
? | |||
timotimo | is there more to glob than * and ? ? | 16:13 | |
itz | maybe an error should suggest dir rather than just undefined for glob? | 16:14 | |
16:14
vendethiel left
|
|||
timotimo | well, once we get it, using something that's not defined will also look through the ecosystem for modules that provide it | 16:15 | |
16:16
kaare_ left
|
|||
itz | so I typo something basic and wait for lots of network access :) | 16:17 | |
geekosaur | traditional glob was * ? [cset] (no ability to invert, simple ranges). modern shells typically add cset inversion (! instead of ^) | ||
and often have many more glob operators | |||
timotimo | no, no, that's all in the data you update from the 'nets with "panda update" | ||
that'll surely scale very well | 16:18 | ||
16:18
kaare_ joined
|
|||
geekosaur | but the minimal set that glob would be expected to support is ? * and [cset]/[!cset] | 16:18 | |
timotimo | ah, i forgot about that part | 16:19 | |
16:19
cognominal joined,
liztormato joined
16:20
domidumont left
|
|||
liztormato waves from Oslo | 16:21 | ||
16:21
jimmyz_ left
|
|||
itz | timotimo: is that in the main panda now .. I remember reading about this in p6weekly | 16:21 | |
16:21
eternaleye left
|
|||
timotimo | no, it's not | 16:21 | |
but panda already requires a "provides" section for all modules | 16:22 | ||
itz | which branch? | ||
timotimo | it's not implemented at all :) | ||
itz | ah ok | ||
16:22
telex left
|
|||
timotimo | er, actually i was wrong | 16:22 | |
that feature is about having a "use" statement for something that's not installed | |||
16:23
kaare_ left
|
|||
itz | I meant the data structure serialisation | 16:24 | |
16:24
eternaleye joined
|
|||
itz | ah its in MoarVM not panda yet? | 16:24 | |
timotimo | oh! | ||
16:24
telex joined
|
|||
timotimo | i'm confused :) | 16:24 | |
16:24
liztormato left
|
|||
timotimo | we currently have the same data that'd go into the serialized blob ... it's just in a json file instead | 16:25 | |
itz | I was interested in stealing it to use elsewhere :) | 16:26 | |
16:27
eternaleye left
16:30
kaare_ joined
16:31
eternaleye joined
|
|||
timotimo | it's in the "jsoff" branch, but it doesn't work completely yet | 16:32 | |
dalek | rl6-roast-data: 4ee886b | coke++ | / (9 files): today (automated commit) |
16:34 | |
itz | timotimo: ty | 16:35 | |
timotimo | as in: expect explosions | ||
16:37
vendethiel joined
|
|||
[Coke] | FROGGS / bartolin - tools/update-passing-test-data.pl | 16:38 | |
16:47
chenryn left
|
|||
pmichaud | good morning, #perl6 | 16:48 | |
16:48
mr-foobar left
|
|||
TimToady | good morning, pmichaud :) | 16:48 | |
long time no see! | |||
PerlJam | pmichaud: greetings! | 16:49 | |
TimToady | (we just dropped pm off at the airport a few minutes ago :) | 16:50 | |
pmichaud | TimToady: yes, long time no see. Like, perhaps 30 minutes. | ||
[Coke] wonders what conference he's missing right now | 16:51 | ||
jnthn | o/ pmichaud | ||
TimToady | you missed Collision | ||
jnthn | and you'll soon miss OSDC.no | 16:52 | |
[Coke] | *sigh* | 16:53 | |
pmichaud | I made it to Collision, and expect to be at OSDC.no in about 24 hrs | ||
16:53
diana_olhovik_ joined
|
|||
jnthn | pmichaud: When you land? | 16:54 | |
jnthn at 13:30 or so | |||
But my flight is only 55 mins ;) | |||
16:54
Akagi201 joined
|
|||
pmichaud | jnthn: I land at 09:50 | 16:56 | |
16:57
espadrine left
|
|||
jnthn | OK, way before me. :) | 16:57 | |
16:59
vendethiel left,
Akagi201 left
|
|||
pmichaud | jnthn: you arrive 13:30 fri? | 17:00 | |
jnthn | pmichaud: Yes, tomorrow | ||
13:30 today already came and went ;) | |||
(locally) | |||
pmichaud | ah, yes. | ||
17:05
dakkar left
17:10
_mg_ joined
|
|||
tadzik | I'll be there at 13:50 or so | 17:14 | |
jnthn | tadzik: oh, didn't even know you're coming :) | 17:20 | |
andreoss | is implementing <=> enough for max to work on objects of my own class? | ||
17:20
vendethiel joined
|
|||
hoelzro | andreoss: I think it would probably be cmp you'd have to implement | 17:22 | |
hoelzro checks impl of max | |||
yes, max uses cmp | |||
tadzik | jnthn: that's what sh... yeah, passively though, not giving a talk or anything :) | 17:23 | |
andreoss | it seems to throw results at random, even with cmp defined | 17:24 | |
jnthn | :P | ||
tony-o | andreoss: how old is your build | ||
timotimo | github.com/beefsack/git-mirror - this could be interesting | ||
tony-o | beefsack | 17:25 | |
PerlJam | andreoss: and did you implement cmp correctly? ;) | ||
jnthn | tadzik: I'm sure you'll make enough noise anyway :P | ||
tadzik | hehe | ||
I guess that says a lot about me, not sure if it's good or bad... :P | 17:26 | ||
pmichaud | boarding soon... back again later | ||
timotimo | tadzik: we should get back into game dev again :P | ||
jnthn | pmichaud: Safe flight! :) | 17:28 | |
timotimo | aye, safe flight! | ||
andreoss | PerlJam: paste.debian.net/172705/ | 17:29 | |
may be not | |||
tony-o: This is perl6 version 2015.04-168-g1763049 built | |||
[Coke] | Writing a class to get the comparator seems very java. | 17:34 | |
17:35
larion joined
|
|||
tadzik | timotimo: oh yes :) | 17:37 | |
17:40
espadrine joined
|
|||
TimToady | jnthn, FROGGS: the advantage of the Foo{} notation is twofold; it naturally looks like a hash of values, and it bundles them together as a single unit that can be passed to parent objects without having to examine each attribute at every BUILD level | 17:42 | |
and as a special form, we can force it to check that the types are known, and allow it to pass a bundle to an uninstantiable role parent, as well as to a class parent | 17:43 | ||
17:43
vendethiel left
|
|||
TimToady | sightseeing & | 17:44 | |
17:45
espadrine_ joined
|
|||
PerlJam | andreoss: What makes you think it "throws results at random"? | 17:45 | |
17:46
espadrine left
|
|||
timotimo | $*PROGRAM_NAME.IO.dirname ~ '/base_exp.txt' - hooray, concatenating strings with ~ :) | 17:46 | |
17:48
domidumont joined
|
|||
raydiak | m: class C { has Numeric $.a }; multi sub infix:<cmp> (C $a, C $b) { $a.a <=> $b.a }; my $a = C.new: :a(1e2); my $b = C.new: :a(10); say $a max $b; | 17:50 | |
camelia | rakudo-moar 89c43c: OUTPUT«C.new(a => 10)» | ||
tony-o | timotimo: wouldn't it be better as $*SPEC.catdir($*PROGRAM_NAME.IO.dirname, 'base_exp.txt') / | ||
timotimo | tony-o: say that to andreoss :) | 17:51 | |
raydiak | ^^^ how would anyone make that work as intended? golfed restating of andreoss's problem | ||
timotimo goes AFK for a bit | |||
andreoss | PerlJam: in 1 time of 10 it looks random | ||
or maybe even 20 | |||
PerlJam | perhaps libtommath can't handle so many digits? | 17:52 | |
(or maybe <=> has trouble with them) | |||
raydiak | I think it's not using the custom cmp at all and is instead doing max on the stringification of the object, as illustrated above | ||
timotimo | libtommath is supposed to handle as many digits as your RAM can hold | 17:53 | |
PerlJam | or maybe what raydiak said. | ||
:) | |||
raydiak | and the way he's doing it, he's not going to get a bunch of digits, that's why he does log(base) instead of exp**10 | 17:54 | |
tony-o | andreoss: do you have a test file? it works consistently for me | ||
colomon | I’m not seeing the original (probably just need to backlog more) but there’s a decent change log doesn’t work properly on huge numbers? | ||
raydiak | erm, log(base)*exp instead of base**exp | ||
colomon | ah, found link | 17:55 | |
raydiak | they're only 6 digits | ||
m: say log(1e9) | |||
camelia | rakudo-moar 89c43c: OUTPUT«20.7232658369464» | ||
andreoss | tony-o: i just run it in a loop | 17:56 | |
raydiak | m: class C { has Numeric $.a }; multi sub infix:<cmp> (C $a, C $b) { say "CALLED"; $a.a <=> $b.a }; my $a = C.new: :a(1e2); my $b = C.new: :a(10); say $a max $b; | 17:57 | |
camelia | rakudo-moar 89c43c: OUTPUT«C.new(a => 10)» | ||
tony-o | i put a few lines in the file and did: for i in {0..100}; do perl6 andreoss.pl6; done and it printed out the max number 100 times | ||
raydiak | ^^ very simple illustration that it's not getting called at all | ||
andreoss | tony-o: you can get the original file from PE, the link is in the pod | 17:58 | |
tony-o | maybe my test file just sucked | ||
colomon | oh, right! | ||
it’s not getting called because of scoping | |||
ie rakudo’s core cannot see your custom cmp | 17:59 | ||
raydiak | ah ha | ||
now that we're on the right track...afk :) | |||
colomon | that’s been plaguing me for 5+ years now. :) | ||
andreoss | colomon: i put warn in my cmp, and it's indeed not called | 18:00 | |
should have done it earlier | |||
geekosaur | shouldn't it support an adverb then? max :by(mycmp) | ||
colomon | geekosaur: I don’t know about that, but for sure you can call it as ($a, $b).max(:by(mycmp)) | 18:01 | |
Looking at the source, I don’t think you can use :by for infix:<max> | 18:02 | ||
github.com/rakudo/rakudo/blob/nom/...ny.pm#L675 | 18:03 | ||
hardcoded to use infix:<cmp> | 18:04 | ||
m: class C does Real { has $.a; method Bridge() { $.a } }; my $a = C.new: :a(1e2); my $b = C.new: :a(10); say $a max $b; | 18:06 | ||
camelia | rakudo-moar 89c43c: OUTPUT«100» | ||
colomon | of course, that’s basically saying C is a Real number, which may not be desirable in general | ||
timotimo | oh, hold on | ||
yeah, you can't get the "cmp" into the scope of the sorting thingie | 18:07 | ||
until we have "lift" or something equivalent | |||
colomon | right | ||
and AFAIK, we don’t have lift yet | |||
moritz | lift was unspecced | 18:08 | |
timotimo | right | ||
colomon | on the other hand, if you tell p6 your type is a Real, the core will treat it as one, even today. | ||
raydiak | back; good morning #perl6 :) | ||
I also saw in S03 "As with all cmp-based operators, this may be modified by an adverb specifying different semantics."...is that implemented? even just for cmp vs leg vs <=> if not for custom routines? if so what does it look like? | 18:09 | ||
moritz | gist.github.com/anonymous/48efcb021cc1dd55fdd2 you can emulate lift with CALLER::LEXICAL | 18:10 | |
TimToady++ | |||
tony-o | ++ for the hitchhiker's ref | 18:11 | |
colomon | that emulation doesn’t help at all for Rakudo’s core, does it? | ||
18:11
aborazmeh joined,
aborazmeh left,
aborazmeh joined
|
|||
colomon | raydiak: it’s not implemented anyway in Rakudo so far as I know | 18:12 | |
moritz | colomon: it would, I think, but it'd wreak havoc to static inlining | 18:15 | |
as well as static dispatch | |||
andreoss | m: sub my-max($a, $b) { $a }; say [&my-max] 1, 2, 3, 4, 5; | 18:16 | |
camelia | rakudo-moar 89c43c: OUTPUT«5===SORRY!5=== Error while compiling /tmp/13H49C8Z3ITwo terms in a rowat /tmp/13H49C8Z3I:1------> 3sub my-max($a, $b) { $a }; say [&my-max]7⏏5 1, 2, 3, 4, 5; expecting any of: infix infix stopper postf…» | ||
andreoss | m: sub my-max($a, $b) { $a }; say [my-max] 1, 2, 3, 4, 5; | ||
camelia | rakudo-moar 89c43c: OUTPUT«5===SORRY!5=== Error while compiling /tmp/BeujDZ22GrTwo terms in a rowat /tmp/BeujDZ22Gr:1------> 3sub my-max($a, $b) { $a }; say [my-max]7⏏5 1, 2, 3, 4, 5; expecting any of: infix infix stopper postfi…» | ||
colomon | moritz: I mean, without us spreading CALLER::LEXICAL use liberally throughout the core code, it will not work with the core. | 18:18 | |
m: sub my-max($a, $b) { $a }; say [[&my-max]] 1, 2, 3, 4, 5 | |||
camelia | rakudo-moar 89c43c: OUTPUT«1» | ||
geekosaur | I am not sure that max should use any cmp in scope | ||
explicit declaration with an adverb seems much more sensible | 18:19 | ||
colomon | andreoss: your my-max is not very smart. ;) | ||
geekosaur | "oops this module I imported started exporting a max function" | ||
colomon | andreoss: what with it’s “the first argument is always the max” approach | ||
andreoss | colomon: how do i turn it into reducer? | ||
oh. i see | 18:20 | ||
colomon | andreoss: if my-max is a sub which takes two arguments, [&my-max] works as an infix operator | ||
andreoss | m: sub infix:«my-max»($a, $b) { $a }; say [&my-max] 1, 2, 3, 4, 5; | 18:21 | |
camelia | rakudo-moar 89c43c: OUTPUT«5===SORRY!5=== Error while compiling /tmp/gHu10Nvm6PTwo terms in a rowat /tmp/gHu10Nvm6P:1------> 3x:«my-max»($a, $b) { $a }; say [&my-max]7⏏5 1, 2, 3, 4, 5; expecting any of: infix infix stopper pos…» | ||
colomon | then to reduce, you need another set of [ ] | ||
so [[&my-max]] | |||
andreoss | what if it's infix already? | 18:23 | |
colomon | then [infix-already] is reduce | 18:24 | |
timotimo | actually, isn't CALLER::LEXICAL the easiest case you can imagine for static inlining? | ||
andreoss | m: sub infix:«my-max»($a, $b) { $a }; say [my-max] 1, 2, 3, 4, 5; | ||
camelia | rakudo-moar 89c43c: OUTPUT«1» | ||
andreoss | oh, & was unnecessary | ||
18:24
espadrine_ left
|
|||
andreoss | colomon: thanks | 18:24 | |
18:25
rba_ joined
|
|||
andreoss | paste.debian.net/172728/ | 18:26 | |
tony-o | http::server::async is so borken now | 18:31 | |
18:33
rba_ left,
vendethiel joined
|
|||
colomon | andreoss: you’re welcome | 18:35 | |
afk | |||
18:36
aborazmeh left
18:37
domidumont left
18:38
andreoss left
18:41
panagis joined
18:43
panagis left,
Akagi201 joined
18:47
bayprogrammer left
18:48
diana_olhovik_ left,
Akagi201 left
18:51
diana_olhovik joined
18:56
vendethiel left
19:12
espadrine_ joined
19:14
spider-mario left
19:15
_mg_ left
19:16
_mg_ joined
|
|||
dalek | pan style="color: #395be5">perl6-examples: f53afbe | paultcochrane++ | / (2 files): [wsg] sort input test file list |
19:18 | |
19:21
Peter_R left
19:22
_mg_ left
19:23
FROGGS joined
|
|||
FROGGS | . | 19:23 | |
yoleaux | 15:39Z <TimToady> FROGGS: it seems to me that Foo::x doesn't scale well to multiple attributes, but I agree Foo{} is weird, so maybe we can think of something better | ||
15:56Z <japhb> FROGGS: Besides the "C++ in progress" bit, what else has changed? I assume OpaquePointer -> Pointer ..... And what was the rant about? | |||
19:24
Peter_R joined
|
|||
FROGGS | japhb: right (Pointer), and the rant was about stupid documentation | 19:24 | |
japhb: like the documentation for 'prefix' here: www.xmlsoft.org/html/libxml-tree.html#xmlNs | 19:28 | ||
19:28
Peter_R left
|
|||
FROGGS | japhb: or this: www.xmlsoft.org/html/libxml-xpath.h...eSetCreate | 19:31 | |
TimToady: I'd like to get it in line with how we access methods of a "parent" role/class... but it feels ununifiable | 19:33 | ||
FROGGS .oO( Dog.Bark::new( :loud ) ) | 19:34 | ||
19:34
rindolf left,
tinyblak left
19:55
zakharyas joined
19:56
domidumont joined
20:00
bayprogrammer joined
20:02
oetiker left
20:03
vendethiel joined,
beastd joined
20:04
raiph left
20:13
pyrimidine left
|
|||
moritz | amusing fact: pylint reports duplicated code, and sometimes it reports a duplicated piece of code twice (once for each file it's in) | 20:13 | |
20:15
domidumont left
|
|||
FROGGS | *g* | 20:15 | |
20:17
xfix left
20:19
pyrimidine joined,
yoleaux left,
yoleaux joined
20:20
ChanServ sets mode: +v yoleaux
20:22
mr-foobar joined
20:25
vendethiel left,
Isp-sec joined
20:27
fhelmberger left
20:31
darutoko left
20:32
Akagi201 joined
20:33
spider-mario joined
20:37
Akagi201 left
20:38
muraiki left
|
|||
dalek | osystem: 4f81142 | (Jonathan Stowe)++ | META.list: Add Sys::Utmp |
21:08 | |
21:08
[Sno] left
|
|||
RabidGravy | there | 21:09 | |
apologies in advance if it core dumps on your system :) | 21:13 | ||
timotimo | why did libcrypt disappear? | 21:14 | |
RabidGravy | because, er, I accidentally deleted the line | 21:15 | |
timotimo | ah | ||
i wonder when we'll see recordings from perl6 related things | 21:16 | ||
dalek | osystem: ff8b6c0 | (Jonathan Stowe)++ | META.list: Put back Crypt::Libcrypt |
21:17 | |
RabidGravy | going to make a Libshout thing next :) | 21:18 | |
rjbs | So, I rebuilt my rakudo today to get the awesome new "will lazy" | ||
lizmat++ jnthn++ | 21:19 | ||
...and now I'm at the next thing that "Moose could do this for me." :) | |||
masak | :) | 21:20 | |
rjbs | m: class YourFace { has $.x will lazy { 1 } ; has $.z will lazy { $.x + 1 } } ; my $yf = YourFace.new; | ||
camelia | rakudo-moar 89c43c: OUTPUT«5===SORRY!5=== Error while compiling /tmp/vmAvcIVdmnVirtual call $.x may not be used on partially constructed objectsat /tmp/vmAvcIVdmn:1------> 3ill lazy { 1 } ; has $.z will lazy { $.x7⏏5 + 1 } } ; my $yf = YourFace.new; expectin…» | ||
rjbs | In Moose, we often have two lazy attributes, where one will, if needed during its default-building, cause the other to become built. | ||
masak | that's obviously wrong. | ||
FROGGS | m: class YourFace { has $.x will lazy { 1 } ; has $.z will lazy { $!x + 1 } } ; my $yf = YourFace.new; | 21:21 | |
masak | as in, I agree with your expectation that the above program should work. | ||
camelia | rakudo-moar 89c43c: OUTPUT«===SORRY!===No such method 'wrap' for invocant of type 'Any'» | ||
jnthn | I don't think it cna. | ||
FROGGS | :S | ||
jnthn | *can | ||
masak | jnthn: because of possible circularities? | ||
rjbs | Well, but note this: | ||
jnthn | No, just because it's a block, so how will it ever be able to see self? | ||
21:22
diana_olhovik left
|
|||
jnthn | I think we can (maybe already do?) feed the self in as $_... | 21:22 | |
rjbs | It's complaining about being called on a partially-constructed object when neither block should have ever been called. | ||
jnthn | That's a compile-time bit of semantic analysis. | 21:23 | |
rjbs | Anyway: making it easy to "chain" lazily-defaulted attributes has been a big win in Moose. I believe the utility would translate. | ||
masak | jnthn: don't the (non-block) thunks in attribute initializer rhs-es already see self? | ||
rjbs | jnthn: Okay, thought it might be. | ||
21:23
lizmat joined
|
|||
jnthn | masak: Yes, by a good amount of compiler magic to special case it. | 21:23 | |
masak | *nod* | ||
jnthn | In which case maybe we do want to do it with an "is lazy" so we can use the real thunk that can see self... | ||
masak | +1 | ||
jnthn | I still think that's possible, I was just tied for time so worte up the fasted solution that could possibly work. | 21:24 | |
I didn't expect it to go into CORE. | |||
*fastest | |||
lizmat | good *, #perl6! | ||
and I never thought it did not belong in core | |||
jnthn | Maybe I'll try the other apporach once I've more time (probably this weekend, though shold finish my tut slides first) | ||
lizmat: A solution to the problem may, but "we have something that kinda works, put it in!" is the PHP way :P | 21:25 | ||
masak | I repeatedly suggested it should not go in core. | ||
21:25
skids left
|
|||
lizmat | so we remove it: it's not been in a compiler release | 21:25 | |
and rjbs can find another way to do the same thing now | 21:26 | ||
jnthn | Well, leave it for a moment, I'll play around with an alternative. | ||
Or some alternatives. | |||
masak | ++jnthn | ||
jnthn | And we can see what we like most. | ||
I think the fact the current way doesn't let you chain makes it a no-go. | |||
And I don't want more special cases. :) | 21:27 | ||
21:27
yqt joined
|
|||
lizmat | jnthn: I haven't backlogged sufficiently yet: doesn't chain ? | 21:27 | |
masak | rjbs: ooc, what does Moose do in the face of circularly dependent lazies? | ||
jnthn | lizmat: You can't do $.foo or self.foo in there | ||
lizmat: and there's no easy way to fix that. | |||
lizmat | ah, ok | ||
jnthn | If you make circularly dependent laziness you'll get the stack overflow you deserve, surely. | 21:28 | |
:) | |||
lizmat | yeah, that's a no go (and a problem with some of the other "will foo" phasers as well) | ||
masak | jnthn: feels statically catchable, tho' | ||
jnthn | Maybe by some kinda linter | ||
We're having a hard enough time getting the compiler fast enough without loading it up with static checks for things that are unlikely. | 21:29 | ||
timotimo | if you happen to write your lazy thunks tail-call-optimizable, you'll just infiniloop | ||
rjbs | masak: circular dependency will result in the usual deep recursion | ||
masak | oh, ok. | ||
rjbs | "Deep recursion of your_attr_builder" | ||
masak | if it's good enough for Moose... :) | 21:30 | |
rjbs | I've talked about how we'd solve some of those problems, but this is Good Enough. | ||
Also, have to consider: | |||
has $.x = $.should-be-lazy + 1 | |||
So now we're calling the lazy block on a partially constructed object. That can be Bad. | |||
21:31
zakharyas left
|
|||
rjbs | I have go to! There are quesadillas waiting to get et. BBL. ;) | 21:31 | |
21:31
Zoffix left
|
|||
jnthn | Can anybody give me some good real world examples of moose lazy build stuff? | 21:31 | |
Because having done OOP in a bunch of languages...I've not found it a common enough case that it's something I'd hugely miss. | |||
(As a core feature) | 21:32 | ||
masak | jnthn: board game. primary data structure is a list of move events. sometimes we ask for pieces on the board. board is lazily created from events. | 21:33 | |
RabidGravy | W3C::SOAP uses it heavily | ||
jnthn | masak: But...you'd need to invalidate that on getting more events? | ||
21:34
FROGGS left
|
|||
masak | jnthn: let's assume it's an immutable game state object. more events creates new immutable game states. | 21:34 | |
jnthn: anyway, derived costly-ish attributes based on unchanging primary attributes -- that's what comes to mind. | 21:35 | ||
jnthn | *nod* | ||
masak | also "client may not always ask for this" | ||
lizmat | the example that rjbs originally had was: | 21:36 | |
jnthn | I guess what feels odd to me is this: I view the method as primary and the state to cache it as secondary. | ||
lizmat | my $fh is lazy { open $file } will leave { .?close } or something like that | ||
jnthn | If I was trying to factor out something to solve this problem, I'd almost certainly be writing a "is cached-on-instance" style trait. | 21:37 | |
lizmat | s/my/has/ | ||
jnthn | Which creates an attribute, adds it to the class, and wraps the method. | ||
Heck, given "is cached" on a method will *always* have the invocant in the argument tuple, it's possible that we should have "is cahed" on methods create a secret attribute to cache the things in. | 21:38 | ||
So that the per-instance cache goes away when the object does | |||
And then the whole thing is method thingy() is cached { ...lazy init here... } | |||
Which I like a whole lot more than trying to dangle it off an attribute. | 21:39 | ||
It feels odd to declare the means rather than the purpose, imho. | |||
lizmat | jnthn: but wouldn't you want things cached between objects of the same class ? | 21:42 | |
especially when parallelizing ? | |||
jnthn | lizmat: That's my point: "is cached" on methods *already* must be facotring in the instance, 'cus it's just a normal argument | 21:43 | |
lizmat: So the current behavior memory leaks. | |||
lizmat looks at the code again | |||
jnthn | I may be mis-remembering the code :) | ||
I do think that per-instance application of "is cached" makes sense though | |||
21:44
brrt joined
|
|||
jnthn | If you want otherwise, write a sub... :) | 21:44 | |
lizmat | well, "is cached" is now a Routine trait, so it works both for subs and methods | ||
right? | |||
jnthn | Right, but does it treat methods specially in any way? | ||
lizmat | no, it does't atm | ||
jnthn | OK, so it will be putting self in the arg tuple to cache on, and then preventing objects ever getting freed. | 21:45 | |
lizmat | gotcha | ||
now .... waking up, finally :-) | |||
jnthn | So I'm suggesting that we store the cached things per instance. | ||
So that a simple "is cached" method is enough to handle the lazy init problem, and also generalizes. | 21:46 | ||
brrt | this is too interesting a discussion | ||
yes | |||
21:46
raiph joined
|
|||
brrt | wait | 21:46 | |
lizmat | I must be dense, but I don't see how an cache / instance is helping the lazy init issue | ||
brrt doesn't neither | 21:47 | ||
:-) | |||
masak | 'night, #perl6 | 21:48 | |
jnthn | lizmat: If you have an immutable, lazily initialized attribute, then its semantically equivalent to a method that runs on its first call and caches the value produced | ||
*it's | |||
lizmat | gnight masak | 21:49 | |
I see what you mean... | |||
except that the cache ever only has one element | |||
jnthn | Additionally, hanging it off the attribute is a bit confusing, since only the $.foo style access triggers, the init, not the $!foo. Which I can see tripping people up. | ||
lizmat | true that, but that is a more general WAT that I think will be a rite of passage for P6 users | 21:50 | |
jnthn | lizmat: That's fine, so does he cache on a sub get-thingy is cached { ...gets the thingy once... } | ||
*the | |||
rjbs | Can is-cached things be cleared easily enough via some means? | ||
lizmat | rjbs: not at the moment. | 21:51 | |
jnthn | rjbs: Not yet | ||
rjbs | That will be important. If "x" is derived at high cost from mutable "y"... | ||
...then when "y" changs, "x" should be cleared but not reocmputed. | |||
lizmat | rjbs: S06:2146 | ||
synbot6 | Link: design.perl6.org/S06.html#line_2146 | ||
rjbs | Thank you, click... | 21:52 | |
brrt | is cached on object instances seems rather problematic anyway | ||
rjbs | Hm! I think "no caching at all" may be a deal breaker. | ||
Imagine if the attribute was meant to hold a filehandle, and the compiler was running in a "don't bother caching" mode. It's no good. | 21:53 | ||
brrt | well, spec says we don't have to cache at all | 21:54 | |
lizmat | rjbs: well, then we have once blocks | ||
method fh { once $!fh = open $file; $!fh } | |||
rjbs | brrt: Right. That's why I'm saying that "is cached" may not be appropriate. | ||
lizmat: Yeah, things like that. | 21:55 | ||
lizmat | so maybe "once" blocks are the solution to this issue | ||
21:55
rba_ joined
|
|||
rjbs | My whole mindset right now is "what stuff does Moose make trivial that Perl 6 makes annoying." | 21:55 | |
It's fine if that's /intended/, because Moose is built on top of a toolkit, and Perl 6 gives a better toolkit. | 21:56 | ||
You could build a better Moose with less work, one imagines. | |||
lizmat | actually, once already caches: | ||
rjbs | but I'd like to get the places where "trivial in Moose, three lines of real code in perl6" into the light | ||
lizmat | m: sub a { once 42 }; say a; say a | ||
camelia | rakudo-moar 89c43c: OUTPUT«4242» | ||
rjbs | lizmat: I'm not sure that code demonstrates anything? | ||
m: sub a { 42 }; say a; say a | 21:57 | ||
camelia | rakudo-moar 89c43c: OUTPUT«4242» | ||
lizmat | m: sub a { once { say "once"; 42 }; say a; say a | ||
camelia | rakudo-moar 89c43c: OUTPUT«5===SORRY!5=== Error while compiling /tmp/HuN_L79t3sMissing blockat /tmp/HuN_L79t3s:1------> 3 { once { say "once"; 42 }; say a; say a7⏏5<EOL> expecting any of: postfix statement end statement modifier…» | ||
lizmat | m: sub a { once { say "once"; 42 } }; say a; say a | ||
camelia | rakudo-moar 89c43c: OUTPUT«once4242» | ||
rjbs | That's nice! | ||
jnthn | Yes, but note the scope is per closure clone rather than per instnace. | ||
I wonder if we could come up with a per-instance variant of "once"... | 21:58 | ||
But then, that doesn't solve the invalidation issue either. | |||
lizmat | that could work with a hidden attribute ? | ||
jnthn | lizmat: yeah | ||
rjbs | I want to go and do some less interesting things, I'm afraid. But let me just tell you what this looks like in Moose: | ||
jnthn | But...again, if invalidation matters... | ||
lizmat | same as "once" works with a hidden state var (just explaining) | ||
rjbs | has x => (is => 'ro', default => sub { $self->y ** 2 }, clearer => 'clear_x'); | 21:59 | |
Sometimes written: | |||
has x => (is => 'ro', lazy_build => 1); sub build_x ($self) { $self->y ** 2 } | |||
with the clear_x implicit | |||
This makes it basically trivial to use attributes as invalidate-able caches. | 22:00 | ||
Maybe all I want is a trait so I can say: | 22:01 | ||
has $.x is lazy-built; method build-x { ... }; | 22:02 | ||
...which implies that the reader for x is a lazy-caching reader, and that a clear-x is generated. | |||
22:03
vendethiel joined
|
|||
rjbs | Anyway: I realize that my depth of work in p6 is shallow, so it's easy for me to ask for something that's not what I should want. I'm very aware of that... but I also want to make sure that I say my peace about what seems to be missing. ;) | 22:03 | |
lizmat | :-) | ||
brrt | uhm, i've got sanity test failures on g89c43cc | 22:14 | |
i'm testing a special branch, so that could be it; but i'm just checking here if that's known | |||
lizmat | if it's: t/01-sanity/54-use-lib.t | 22:15 | |
don't worry | |||
brrt | yeah | ||
that one | |||
lizmat | will fix that one now | ||
brrt | and nativecall? | ||
04-nativecall/02-simple-args.t, seen that one failing too | 22:16 | ||
thanks :-) | 22:17 | ||
dalek | kudo/nom: 6b4f9be | lizmat++ | t/01-sanity/54-use-lib.t: Fix sanity test, brrt++ for spotting |
22:18 | |
lizmat | the nativecall one is one that is awaiting a fix by either FROGGS or jnthn, I forget | ||
brrt | lizmat++ thanks | ||
ok, then i'm not worried | |||
22:19
Erendis42d joined
|
|||
Erendis42d | ^v^ | 22:19 | |
22:19
andreoss joined
|
|||
brrt | ooh, lots of perl6 on osdc.no | 22:21 | |
22:25
raiph left,
vendethiel left
|
|||
brrt afk | 22:31 | ||
22:31
brrt left
|
|||
timotimo | great | 22:32 | |
tony-o: did you look at Pluggable yet with the newest CompUnitRepo stuff? (which is probably what makes things fail?) | 22:33 | ||
tony-o | timotimo: i haven't updated http::server::async or pluggable recently, been working on zef and a test harness with "binary" for perl6 | 22:34 | |
timotimo | mhh, OK | 22:35 | |
tony-o | i have been having a lot of issues with random errors and successes when using the start { } blocks | ||
timotimo | well, i use HTTP::Server::Async for a thing i'm developing on and off | ||
tony-o | is it working for you? i don't even get one successful request | ||
timotimo | right, my thing is supposed to use Proc::Async::Alot, which is currently unstable as F* | ||
tony-o | lol | 22:36 | |
i haven't seen any issue with Proc::Async and Overwatch but Overwatch uses it in a pretty basic way | |||
22:36
[Sno] joined
|
|||
timotimo | right | 22:37 | |
something's racy | |||
tony-o | H:S:A seems to work as long as there isn't asynchronous requests | ||
Racy in HSA or in core? | |||
timotimo | no, in core | ||
jnthn | tony-o: Probably in core; I've fixed a couple of nasty things recently, but have a bunch more to go. | 22:38 | |
tony-o | i ran into a problem earlier today where END { } block in a module was called prior to the last statement in the main script.. | 22:40 | |
22:40
bjz left
|
|||
lizmat | did you use start blocks ? | 22:40 | |
or any asynchrony ? | |||
tony-o | no start blocks, i awaited any of the async stuff i did in the END block | 22:41 | |
i'll see if i can come up with a more concise example | 22:42 | ||
22:44
Erendis42d left,
rba_ left
|
|||
jnthn | 'night, #perl6 | 22:44 | |
tony-o | night | 22:45 | |
timotimo | gnite jnthn | ||
22:45
rba_ joined,
kaare_ left
|
|||
lizmat also calls it a day | 22:46 | ||
gnight #perl6! | |||
tony-o | night lizmat | 22:47 | |
22:50
rba_ left
22:51
beastd left
22:53
espadrine_ left
22:58
skids joined
|
|||
timotimo | oh, i need to leave the internets early today as well | 22:59 | |
23:05
Isp-sec left
|
|||
timotimo | none of the json_fast tests caught that both "true" and "false" resulted in Bool::True ... | 23:08 | |
tony-o | does code in an END block run after the process exits? | 23:09 | |
Juerd | tony-o: How would it run, if not as part of the process? | 23:10 | |
tony-o | as part of a sub process that isn't killed when the parent exits | 23:11 | |
23:11
larion left
|
|||
tony-o | i get output after 'prove' thinks the process exited | 23:11 | |
even though bash doesn't think so, so i guess it's a problem with prove | |||
23:14
vendethiel joined
23:18
rba_ joined
23:22
telex left
23:23
rba_ left
23:24
telex joined
|
|||
timotimo | and JSON::Fast's nom-ws is tha allocation king, at 7102971 BOOTCode objects | 23:25 | |
andreoss | m: my $x = 123; say $x.reverse | ||
camelia | rakudo-moar 6b4f9b: OUTPUT«123» | ||
andreoss | how do i find out from which class method is inherited? | 23:26 | |
23:29
Erendis42d joined
|
|||
Erendis42d | re | 23:29 | |
TimToady | m: my $x = 123; say $x.can("reverse")[0].signature | 23:31 | |
camelia | rakudo-moar 6b4f9b: OUTPUT«(Any: *%_)» | ||
TimToady | m: my $x = 123; say $x.can("flip")[0].signature | ||
camelia | rakudo-moar 6b4f9b: OUTPUT«(Cool: *%_)» | ||
TimToady | that's the one you want | ||
andreoss | .reverse appears undocumented doc.perl6.org/type/Any | 23:32 | |
what is it supposed to do? | 23:33 | ||
TimToady | well, it's really a List op, but most of the list ops actually live in Any due to the desire to treat a single element as a degenerate list of one element | ||
"sure, I can reverse a list containing one element!" | 23:34 | ||
23:34
gfldex left
|
|||
TimToady | so if you search for 'reverse' on docs, it takes you straight to a page that says you should use 'flip' on strings :) | 23:35 | |
similarly, flip is really a string op, despite living in Cool | 23:36 | ||
23:37
vendethiel left
|
|||
TimToady | well, the one that 123 finds, anyway | 23:37 | |
m: my $x = '123'; say $x.can("flip")[0].signature | |||
camelia | rakudo-moar 6b4f9b: OUTPUT«(Str: Any |)» | ||
nebuchadnezzar | TimToady: so, one need to check for type instead of $x.can ? | ||
TimToady | the auto-coercsions in general are defined by finding a candidate outside the normal one, which coerces to the normal type and then calls the normal method | 23:38 | |
m: my $x = (123,).list; say $x.can("reverse")[0].signature | 23:39 | ||
camelia | rakudo-moar 6b4f9b: OUTPUT«(List: *%_)» | ||
TimToady | the docs could probably be a bit clearer about the distinction | ||
andreoss | i've always forgot to use the search on the doc.perl6 since it's needed JS, and i have it turned off | 23:40 | |
TimToady | everything has advantages and disadvantages :) | ||
andreoss | is there a plan for some optional warnings for using List methods on non-List objects? | 23:42 | |
23:42
BenGoldberg joined,
kurahaupo joined
|
|||
TimToady | one could do that with an alternative setting, I suppose, that overloaded the Any class with warning methods | 23:44 | |
23:46
adu joined
|
|||
TimToady | more sightseeing & | 23:46 | |
tony-o | m: class A { method r(){ "hi".say; }; }; class B is A { method s() { self.WALK(:name<r>)[0].signature.say; }; }; B.new.s; | ||
camelia | rakudo-moar 6b4f9b: OUTPUT«(A: *%_)» | ||
tony-o | m: class A { method r(){ "hi".say; }; }; class B is A { method s() { self.WALK(:name<r>).perl.say; }; }; B.new.s; | ||
camelia | rakudo-moar 6b4f9b: OUTPUT«[method r (A $: *%_) { #`(Method|53612824) ... }]<>» | ||
adu | TimToady! | 23:47 | |
yoleaux | 25 Apr 2015 03:45Z <labster> adu: facts are facts | ||
3 May 2015 19:36Z <raydiak> adu: github.com/andydude/p6-c-parser/issues/4 | |||
adu | damnit, I need to login more | ||
adu has been busy working and saving for a house | 23:48 | ||
raydiak? | 23:49 | ||
raydiak: ping | |||
tony-o | andreoss: this will give you just the 'A' part | ||
m: class A { method r(){ "hi".say; }; }; class B is A { method s() { self.WALK(:name<r>)[0].package.say; }; }; B.new.s; | |||
camelia | rakudo-moar 6b4f9b: OUTPUT«(A)» | ||
tony-o | m: class A { method r(){ "hi".say; }; }; class B is A { method s() { (self.WALK(:name<r>)[0].package ~~ B).say; }; }; B.new.s; | 23:50 | |
camelia | rakudo-moar 6b4f9b: OUTPUT«False» | ||
tony-o | m: class A { method r(){ "hi".say; }; }; class B is A { method s() { (self.WALK(:name<r>)[0].package ~~ A).say; }; }; B.new.s; | ||
camelia | rakudo-moar 6b4f9b: OUTPUT«True» | ||
23:52
rurban joined
23:53
rurban left
|
|||
adu | I can't find any documentation about "__extension__" | 23:54 |