»ö« 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. |
|||
timotimo | do you want to dive into the CORE.setting? :) | 00:00 | |
psch | uhm, sure? | 00:01 | |
i mean, how much worse than the optimizer can it be? | |||
timotimo | well, it's mostly pure-perl6 | ||
but with the occasional nqp op | |||
maybe you can come up with an interesting module | |||
00:04
raiph joined
|
|||
psch | i did have a look at the perl6-most-wanted, but there wasn't really anything i'd consider myself well capable of | 00:04 | |
timotimo | well, then optimize for fun :) | 00:05 | |
i made the ADT module for fun, for example | 00:07 | ||
i don't think anybody uses it, though | |||
00:08
arnsholt_ joined,
arnsholt left
|
|||
vendethiel | timotimo: just linked it to some of my friends. That + subsets are changing what they think of perl6 :p | 00:10 | |
timotimo | oh god what have i done =o | ||
psch | oh no! timotimo++ is indirectly promoting use of perl6! | 00:11 | |
what's gonna happen to the validity of uneducated_{f,p}oo's criticism? | |||
that aside, i had been looking at RT #92826 recently, and i remember having partly solved it but not getting it quite to spec | 00:12 | ||
synopsebot | Link: rt.perl.org/rt3//Public/Bug/Displa...l?id=92826 | ||
psch | which is probably because i don't really grok the grammar at all | ||
timotimo | unspace are cool to have | ||
but apparently not so easy to have in the grammar :P | |||
psch | m: "5"\ .\ say | 00:13 | |
camelia | rakudo-moar 257e61: OUTPUT«===SORRY!=== Error while compiling /tmp/KStfdHmjNCConfusedat /tmp/KStfdHmjNC:1------> "5"\ .\ ⏏say expecting any of: unspace horizontal whitespace» | ||
psch | iirc i had that case working | ||
timotimo | hah, "expecting any of: unspace" | 00:14 | |
psch | but there was another case that didn't work; i forgot the details and i probably trashed what i had | ||
yeah that's another RT ticket | |||
timotimo | i wonder why it does that | ||
psch | it expects an unspace after the unspace, curiously | ||
timotimo | but i'm not sure i want to dive in | ||
do you have a line number for me? | |||
psch | note the $eject it's before the say | ||
00:14
woolfy joined
|
|||
timotimo | ah, indeed | 00:14 | |
that's pretty bad :) | |||
00:15
woolfy left
|
|||
timotimo | is that inside token methodop? | 00:16 | |
psch | i *think* adding a non-capturing optional unsp before the non-capturing group in token methodop (line 4289) solved that case | ||
00:16
virtualsue joined
|
|||
timotimo | do you know how to trace the grammar yet? | 00:16 | |
psch | no | 00:17 | |
i hardly know anything haha :) | |||
i'm mostly blindly stumbling through and trying things | |||
i do know about --ll-exception | |||
timotimo | usually it should be enough to --rxtrace | ||
but that only traces into compunit and then a different grammar class takes over | |||
so you'll need to put a Perl6::Grammar.trace-on(Perl6::Grammar) somewhere before the parse happens | 00:18 | ||
psch | oh, ok | 00:20 | |
what does that actually mean? | |||
timotimo | er, i forgot to put the .HOW in between | ||
github.com/perl6/nqp/blob/master/s...W.nqp#L805 that's where it leads | 00:21 | ||
00:22
btyler left
|
|||
TimToady | std: "5"\ .\ say | 00:25 | |
camelia | std 09dda5b: OUTPUT«ok 00:01 121m» | ||
00:25
jnap joined
|
|||
timotimo | in nqp, can a knowhow not get native attributes? | 00:25 | |
nqp: knowhow foobar { has int $!bar } | 00:27 | ||
camelia | ( no output ) | ||
timotimo | nqp: class foobar { has int $!bar } | ||
camelia | ( no output ) | ||
timotimo | that's weird o_O | ||
turning some of the attributes of NQPClassHow into native attributes gives a parsefail | 00:28 | ||
oh well. can't fix all the things :\ | 00:29 | ||
00:30
jnap left
|
|||
psch | timotimo: i don't understand how to use your information wrt trace-on | 00:35 | |
timotimo | you could slap it into Perl6/Compiler.nqp | ||
00:35
virtualsue left
|
|||
psch | okay. the .HOW goes before trace-on? i.e. Perl6::Grammar.HOW.trace-on(Perl6::Grammar) | 00:36 | |
timotimo | i think so | 00:37 | |
psch | add i just add that somewhere in command_eval? | ||
timotimo | command_eval may be too late | ||
i think you can put it in the outermost scope | |||
where it adds the stages and such | |||
i'm leaving now. good luck! | 00:38 | ||
psch | thanks and bye | 00:39 | |
00:40
colomon joined
|
|||
psch | i don't think i'll get anywhere with this information today though... timotimo++ # things to revise tomorrow | 00:41 | |
psch & | 00:42 | ||
00:42
psch left
00:46
thou left
|
|||
colomon | "When pre-compiling a module, its dependencies must be pre-compiled first." | 01:06 | |
01:26
jnap joined
01:28
kivutar left
01:30
jnap left
01:32
thou joined
01:39
jeffreykegler left
01:42
BenGoldberg left
01:47
yoleaux left,
yoleaux joined,
ChanServ sets mode: +v yoleaux
|
|||
TimToady | rosettacode.org/wiki/Casting_out_nines#Perl_6 | 01:49 | |
colomon | pandabrew not working for me today? | 01:51 | |
Cannot call 'postcircumfix:<{ }>'; none of these signatures match: | |||
in any at gen/parrot/BOOTSTRAP.nqp:1219 | |||
02:00
rindolf left
02:11
BenGoldberg joined
|
|||
colomon | hmmm, $p.name is Miu | 02:11 | |
Mu | |||
02:15
FROGGS_ joined
|
|||
smls | TimToady: Why do you use those ghastly naked backslash-variables so much... | 02:18 | |
02:19
FROGGS left
|
|||
smls | :) | 02:24 | |
TimToady | to indicate that they're "constant" over the life of the block | 02:26 | |
02:26
jnap joined
02:27
yoleaux left
|
|||
TimToady | and so that the compiler can do SSA optimization more easily | 02:27 | |
02:27
yoleaux joined,
ChanServ sets mode: +v yoleaux
02:28
yoleaux left
|
|||
raydiak | am I the only one who gets warm fuzzy feelings from memories of childhood BASIC adventures when looking at those? | 02:29 | |
smls | raydiak: nope :) | 02:30 | |
02:31
yoleaux joined,
ChanServ sets mode: +v yoleaux
|
|||
TimToady | (which is, by the way, the main reason the = is required) | 02:32 | |
(or an argument/default in the case of a parameter) | |||
02:38
raiph left
02:41
raiph joined
02:44
raiph left
03:00
Guest62859 is now known as ponbiki
|
|||
lue | colomon: I get the same thing with just panda. | 03:09 | |
colomon: look anything like this? gist.github.com/lue/1029c4d379bb8143b8f3 | |||
colomon | yeah, I got basically all that. | ||
03:09
btyler joined
|
|||
lue | Glad to see I'm not the only one after all :) | 03:10 | |
03:11
kc6000 joined
|
|||
colomon | lue: absolutely is panda for me too, pandabrew is calling it. | 03:11 | |
lue | I figured that's what it was. | ||
r: my $a = Hash[Mu,Int].new(1,2); say $a{1}; | 03:17 | ||
camelia | rakudo-parrot dc42ad, rakudo-jvm dc42ad, rakudo-moar dc42ad: OUTPUT«2» | ||
03:17
raiph joined
|
|||
lue | r: my $a = Hash[Mu,Int].new(1,2); say $a{Mu}; | 03:17 | |
camelia | rakudo-moar dc42ad: OUTPUT«Cannot call 'postcircumfix:<{ }>'; none of these signatures match::(Any \SELF, Any $key):(Any \SELF, Any $key, :BIND($BIND)!):(Any \SELF, Any $key, Any :SINK($SINK)!, *%other):(Any \SELF, Any $key, Any :delete($delete)!, *%other):(Any \SELF,…» | ||
..rakudo-parrot dc42ad: OUTPUT«Cannot call 'postcircumfix:<{ }>'; none of these signatures match::(Any \SELF, Any $key):(Any \SELF, Any $key, :BIND($BIND)!):(Any \SELF, Any $key, Any :SINK($SINK)!, *%other):(Any \SELF, Any $key, Any :delete($delete)!, *%other):(Any \SEL…» | |||
..rakudo-jvm dc42ad: OUTPUT«Cannot call 'postcircumfix:<{ }>'; none of these signatures match::(Any \SELF, Any $key):(Any \SELF, Any $key, :BIND($BIND)!):(Any \SELF, Any $key, Any :SINK($SINK)!, *%other):(Any \SELF, Any $key, Any :delete($delete)!, *%other):(Any \SELF, …» | |||
03:36
atroxaper joined
03:53
daniel-s joined
03:54
btyler left
03:59
regreg left
04:06
atroxaper left
04:07
btyler joined
04:08
jnap left,
jnap joined
04:13
jnap left
04:15
atroxaper joined,
skids left
04:22
kaleem joined
04:29
jeffreykegler joined
04:31
mcglk left
04:34
mcglk joined
04:38
skids joined,
jnap joined
04:40
kaleem left
04:43
jnap left
05:01
raiph left
05:09
daniel-s left
05:10
daniel-s joined
05:13
atroxaper left
05:21
atroxaper joined
05:24
SamuraiJack joined
|
|||
[Coke] | I just saw 6gvts.wordpress.com/2014/01/24/janu...much-more/ ... mmmhehehehe | 05:30 | |
atroxaper | What is that?! | 05:32 | |
[Coke] | I have no idea, but it's hilarious. :) | 05:33 | |
atroxaper | If you has haters - you are best! :) | 05:34 | |
[Coke] | "submitted by educated_poo". that sounds familiar. | 05:36 | |
05:39
jnap joined
|
|||
[Coke] | ~~ zzz | 05:39 | |
05:41
atroxaper left,
kc6000 left
05:42
atroxaper joined
05:43
jnap left
05:47
atroxaper left
05:51
atroxaper joined
06:02
atroxaper left
06:11
BenGoldberg left
06:25
btyler left
06:28
erkan joined,
erkan left,
erkan joined
06:32
rurban1 joined
06:37
jeffreykegler left
06:40
jnap joined
06:41
eternaleye left,
eternaleye joined
06:44
jnap left
07:19
rurban1 left
07:31
Alula joined
07:41
jnap joined
07:42
krunen left
07:43
atroxaper joined
07:45
jnap left,
SamuraiJack left,
krunen joined
07:48
SamuraiJack joined
|
|||
nwc10 | moritz: yes, "tomorrow" is starting at 23:00 | 07:56 | |
replace MySQL with a real database? | |||
07:58
arnsholt_ left
07:59
arnsholt joined
|
|||
FROGGS_ | MySQL is not that bad... I am working about 10 years with MySQL and there was never an issue that could not be solved | 07:59 | |
and this issue sounds rather solvable | |||
08:00
PZt left
|
|||
diakopter | I'm pretty sure it's using pg | 08:07 | |
08:08
regreg joined
08:19
SamuraiJack left,
rurban1 joined
08:21
xfix left
08:23
xfix joined
08:25
arnsholt left
08:26
arnsholt joined
08:32
dmol joined
08:35
daxim left
08:41
jnap joined
08:45
szbalint left
08:46
jnap left
08:48
daxim joined
|
|||
moritz | nwc10: oh noez | 08:50 | |
08:50
FROGGS[mobile]2 joined,
FROGGS[mobile] left
|
|||
moritz | ilbot support pg now, but I don't have a migration script that can clean up the character encoding mess that's in mysql right now | 08:50 | |
08:50
rurban1 left
|
|||
moritz | *supports | 08:51 | |
08:51
darutoko joined
|
|||
diakopter | sounds like a smopp | 08:53 | |
moritz | depends on the quality of the result that I try to achieve | 08:54 | |
08:54
baest_ joined
08:55
baest left
|
|||
moritz | doesn't help that there are 8.6mio rows to migrate | 08:59 | |
09:02
berekuk joined
|
|||
timotimo | o/ from over here | 09:04 | |
moritz | \o from there | 09:05 | |
09:15
tgt joined
09:27
telex left,
telex joined
09:30
stevan_ left,
slavik left,
renormalist left,
ruoso left
09:34
stevan_ joined,
slavik joined,
renormalist joined,
ruoso joined
09:37
telex left
09:38
telex joined
09:42
jnap joined
09:46
tgt left
09:47
jnap left,
rurban1 joined
09:50
tgt joined
|
|||
raydiak | within a redefinition of postcircumfix:<[ ]>, how do I call the un-overloaded version of [] instead of recursively calling the routine I'm inside of? | 09:54 | |
(or otherwise index into the object without [] ) | |||
moritz | raydiak: are you sure you actually need to overload postcircumfix:<[ ]> ? | ||
09:55
FROGGS_ is now known as FROGGS
|
|||
moritz | raydiak: the usual method to overload indexing is by providing a method at_pos, which is called by .[] | 09:55 | |
*is to | |||
raydiak | moritz: absolutely not sure, but that's as a good a reason to try it out as to not, if you ask me :) | ||
moritz | m: class A { method at_pos($idx) { 5 * $idx } }; say A.new[12] | ||
camelia | rakudo-moar dc42ad: OUTPUT«60» | 09:56 | |
moritz | m: class A { method at_pos($idx) { 5 * $idx } }; say A.new[12..14] | ||
camelia | rakudo-moar dc42ad: OUTPUT«60 65 70» | ||
moritz | raydiak: that might be a much nicer interface for you; the .[] already resolves slices and all, and at_pos only needs to providing indexing for a single integer | ||
raydiak | that'd be great for most cases of my question...but I specifically wanted to return a slice from a single index in this case | 09:57 | |
09:58
molaf joined
|
|||
timotimo | you can still return a slice from at_pos :P | 09:58 | |
kind of like an array of arrays | |||
raydiak | oh, okay, great then | ||
moritz | m: class A { method at_pos($idx) { $idx..($idx + 3) } }; say A.new[12] | ||
camelia | rakudo-moar dc42ad: OUTPUT«12..15» | ||
09:58
berekuk left
|
|||
moritz | m: class A { method at_pos($idx) { ($idx..($idx + 3)).list } }; say A.new[12] | 09:58 | |
camelia | rakudo-moar dc42ad: OUTPUT«12 13 14 15» | ||
raydiak | great, thanks as always moritz++ | 09:59 | |
moritz | if you do want to overload .[] (which I don't recommend, if you can avoid it) you can use $array.at_pos to get low-level access to the array | ||
raydiak: you're welcome | |||
timotimo | we do have some syntax specced to get at individual candidates, don't we? | 10:00 | |
the difficult thing is that values rather than just types can determine what candidates gets the job | |||
10:00
berekuk joined
|
|||
raydiak | I'm just messing around, but got it in my head to try a 2D matrix class as a single array | 10:01 | |
timotimo | that's sensible | 10:02 | |
personally, i'd back that with a nqp::list_n bound to a private var for a bit less overhead | |||
but i'm an internals hacker :P | |||
raydiak | nqp is rakudo-only and entirely outside of the spec, correct? | 10:03 | |
moritz | yes | ||
timotimo | yes | ||
there still needs to be a nice mechanism for plopping in backend-specific and backend-agnostic implementations | 10:04 | ||
raydiak | it's certainly a thought when it's closer to working and ready to worry about working faster | 10:05 | |
timotimo | yeah, fair enough | ||
10:06
atroxaper left
|
|||
raydiak | \o/ it works...so the generator I wrote for vector operations might be easily reusable to write the matrix operations | 10:12 | |
if this things gets much more flexible, it's going to be another new module, too | 10:13 | ||
FROGGS | masak: when do we want to do our RT hackathon? next weekend? | 10:16 | |
timotimo | something a little similar to NumPy for perl6 will be very important in the long run | ||
but we really, really need native arrays | |||
raydiak | yes, I spent days trying to figure out how to fit like 0.5 megapixels in under 2 gigs :) | 10:18 | |
timotimo | yeah :( | ||
with low-level operations on nqp::list_* you can get pretty close to a sensible memory usage | 10:19 | ||
but that's no replacement for a correct implementation of native arrays | |||
10:20
rurban1 left
|
|||
raydiak | jnthn++ mentioned it was high up on his list when he takes a break from moar | 10:22 | |
10:22
atroxaper joined
|
|||
timotimo | yes | 10:22 | |
i'm glad that the same thing will also cause native variables work better as lvalues | |||
as in my int $foo; $foo++ | 10:23 | ||
r: my int $foo = 10; $foo++; say $foo; | |||
camelia | rakudo-jvm dc42ad: OUTPUT«Cannot modify an immutable value in sub postfix:<++> at gen/jvm/CORE.setting:4349 in sub postfix:<++> at gen/jvm/CORE.setting:1763 in block at /tmp/tmpfile:1» | ||
..rakudo-parrot dc42ad: OUTPUT«Cannot modify an immutable value in sub postfix:<++> at gen/parrot/CORE.setting:4353 in sub postfix:<++> at gen/parrot/CORE.setting:1767 in block at /tmp/tmpfile:1» | |||
..rakudo-moar dc42ad: OUTPUT«No such method 'STORE' for invocant of type 'Int' in sub postfix:<++> at src/gen/m-CORE.setting:4349 in sub postfix:<++> at src/gen/m-CORE.setting:1763 in block at /tmp/tmpfile:1» | |||
moritz | regarding ilbot mysql -> pg conversion, there are 120 lines of non-UTF8 in the mysql database that need to be manually fixed up | ||
diakopter | wat | ||
timotimo | manually? o_O | ||
diakopter | wat to moar above | ||
timotimo | er | 10:24 | |
how does it have an Int in there? | |||
diakopter | wat | ||
m: my int \foo = 4; foo++ | 10:25 | ||
camelia | rakudo-moar dc42ad: OUTPUT«Type check failed in binding; expected 'Int' but got 'int' in any bind_error at src/vm/moar/Perl6/Ops.nqp:216 in block at /tmp/QSnoXuRm9M:1» | ||
timotimo | is that about Want not working? | ||
diakopter | *shrug | ||
timotimo | if our QAST::Want won't create natives, there's quite a bit of performance to be had | ||
moritz | it seems like does create natives | 10:26 | |
it just doesn't box correctly | |||
FROGGS | - QAST::Want 4 - QAST::WVal(Int) - Ii - QAST::IVal(4) | ||
- QAST::WVal(int) | |||
timotimo | hm, okay | ||
... WVal(int) is a thing? | 10:27 | ||
diakopter | m: my int \::foo = 4; foo++ | 10:29 | |
camelia | rakudo-moar dc42ad: OUTPUT«===SORRY!===Type 'int' is not declared. Did you mean 'Int'?at /tmp/Dm4g0Udr90:1------> my int ⏏\::foo = 4; foo++Malformed myat /tmp/Dm4g0Udr90:1------> my int ⏏\::foo = 4; foo++…» | ||
diakopter | o_O | ||
FROGGS | std: my int \::foo = 4; foo++ | 10:30 | |
camelia | std 09dda5b: OUTPUT«===SORRY!===Multiple prefix constraints not yet supported at /tmp/Z3Uaf2EI3a line 1:------> my int ⏏\::foo = 4; foo++Malformed my at /tmp/Z3Uaf2EI3a line 1:------> my int ⏏\::foo = 4; foo++…» | ||
10:34
rindolf joined
|
|||
raydiak | \o night all | 10:37 | |
timotimo | gnite raydiak! | ||
moritz | moritz.faui2k3.org/tmp/broken-utf8.log those are the lines with non-UTF-8 encoding | 10:39 | |
timotimo | hah | 10:40 | |
one of the early lines is about encoding breakage actually | |||
that amuses me | |||
masak | antenoon, #perl6 | ||
moritz | I wonder if I should just decode them all as ISO-8859-15 | ||
moritz -> afk | |||
masak | tadzik++ # star | 10:41 | |
10:43
jnap joined
|
|||
nwc10 | moritz: well, the first line appears to be Swedish in MacRoman :-) | 10:44 | |
I can't work out what the Ât an ÂL are, but the latter I think is trying to be a pound sign | 10:45 | ||
10:47
jnap left
|
|||
sergot | o/ | 10:51 | |
10:51
denis_boyun joined
|
|||
tadzik | o/ | 11:02 | |
FROGGS | o/ | 11:08 | |
11:19
SamuraiJack joined
11:22
eternaleye left
11:24
rurban1 joined
11:25
eternaleye joined
|
|||
FROGGS | question: to open a pipe we do open( ..., :p ), right? | 11:27 | |
why don't I find a single test about that? | |||
11:36
krunen left
11:38
daniel-s_ joined,
berekuk left
11:39
daniel-s left
11:40
arnsholt left,
arnsholt joined
11:44
jnap joined
11:45
berekuk joined
11:48
jnap left
11:50
rurban1 left
11:57
krunen joined
12:05
vendethiel left
12:07
sunnavy left,
SamuraiJack left
12:10
SamuraiJack joined
12:11
synopsebot left
12:12
hugme left,
[Coke] left,
[Coke] joined,
dalek left,
masak left,
Juerd left,
Util left,
pmichaud left,
masak joined
12:13
dalek joined,
ChanServ sets mode: +v dalek,
sergot left,
Juerd joined,
pmichaud joined,
sergot joined
12:14
Util joined
12:15
SamuraiJack left
12:16
Util left
12:18
masak left,
PerlJam left,
d4l3k_ joined,
dalek left,
tadzik left
12:19
[Coke] left,
d4l3k_ is now known as dalek,
Juerd left,
PerlJam joined,
hugme joined,
ChanServ sets mode: +v hugme,
[Coke] joined,
Juerd joined,
synopsebot joined
12:20
Util joined,
masak joined,
tadzik joined,
rindolf left
12:21
rindolf joined
12:25
vendethiel joined
12:28
PZt joined
|
|||
colomon | module smoke test blew up last night because panda is broken. :( | 12:31 | |
12:31
vendethiel left
12:32
vendethiel joined
12:39
atta joined,
tgt left
12:41
tgt joined,
eternaleye left
12:44
jnap joined
|
|||
vendethiel | are there splats in perl6? sub second-to-last(*@ [*@, $value, $]) { $value } | 12:44 | |
(I know [*@, $a] works but I'm looking for more "advanced" features) | 12:45 | ||
12:47
eternaleye joined,
rindolf left
|
|||
vendethiel | I can understand why multiple variadics aren't allowed, but `sub some-vals(*@ [$fst, *@, $lst]) { $fst ~ $lst }` seems like a nice feature to have | 12:47 | |
12:48
rindolf joined
12:49
jnap left
12:52
psch joined,
smls left
|
|||
psch | hi #perl6 | 12:52 | |
timotimo | hi psch | ||
vendethiel: where does "splat" come from? | |||
psch | "splat" is an old berkley name for * isn't it | 12:53 | |
should be in esr's jargon file somewhere i think | |||
vendethiel | timotimo: ES6 / ruby | 12:54 | |
timotimo | ah | ||
psch | timotimo: i added the .trace-on in main.nqp, which is where the stages are added and the compiler gets build | 13:01 | |
unfortunate side-effect: stage parse went up to ~1800 seconds | |||
...but it's for debugging so that's ok-ish, except it takes long :) | |||
it did kill one of my terminals though... | 13:02 | ||
timotimo | wow | 13:03 | |
psch | about 18 times slower for me, i'm usually at around 100 seconds for jvm and moar each | 13:04 | |
colomon | vendethiel: I believe the pattern matching you're looking for is available, but you've got the format wrong. but then, I can never remember exactly how to do it. | 13:06 | |
timotimo | psch: it turns off the method cache, so that could explain it :P | 13:07 | |
no, wait | |||
i think it replaces all methods returned with a wrapped method that also prints a little bit | 13:08 | ||
psch | timotimo: the later sounds likely | ||
there was much output | |||
13:10
spider-mario joined
|
|||
colomon | m: sub first-and-last([$first, *@, $last]) { $fst ~ $lst }; say first-and-last(1 … 10); | 13:19 | |
camelia | rakudo-moar dc42ad: OUTPUT«===SORRY!=== Error while compiling /tmp/Hh8K3jtNYgCannot put required parameter $last after variadic parametersat /tmp/Hh8K3jtNYg:1------> sub first-and-last([$first, *@, $last⏏]) { $fst ~ $lst }; say first-and-l…» | ||
colomon | p: sub first-and-last([$first, *@, $last]) { $fst ~ $lst }; say first-and-last(1 … 10); | 13:20 | |
camelia | rakudo-parrot dc42ad: OUTPUT«===SORRY!=== Error while compiling /tmp/4zEgsLKjMiCannot put required parameter $last after variadic parametersat /tmp/4zEgsLKjMi:1------> sub first-and-last([$first, *@, $last⏏]) { $fst ~ $lst }; say first-and…» | ||
13:21
rindolf left
13:22
rindolf joined
|
|||
colomon | m: sub first-and-last([$first, *@]) { $first }; say first-and-last(1 … 10); | 13:23 | |
camelia | rakudo-moar dc42ad: OUTPUT«===SORRY!=== Error while compiling /tmp/RgjmGYmFMIUnable to parse expression in argument list; couldn't find final ')' at /tmp/RgjmGYmFMI:1------> *@]) { $first }; say first-and-last(1 ⏏… 10); expec…» | ||
colomon | m: sub first-and-last([$first, *@rest]) { $first }; say first-and-last(1 … 10); | 13:24 | |
camelia | rakudo-moar dc42ad: OUTPUT«===SORRY!=== Error while compiling /tmp/nxCS32olChUnable to parse expression in argument list; couldn't find final ')' at /tmp/nxCS32olCh:1------> est]) { $first }; say first-and-last(1 ⏏… 10); expec…» | ||
colomon | m: sub first-and-last([$first, *@rest]) { $first }; say first-and-last(1…10); | 13:25 | |
camelia | rakudo-moar dc42ad: OUTPUT«===SORRY!=== Error while compiling /tmp/rKh2Z2jMxyUnable to parse expression in argument list; couldn't find final ')' at /tmp/rKh2Z2jMxy:1------> @rest]) { $first }; say first-and-last(1⏏…10); expect…» | ||
colomon | p: sub first-and-last([$first, *@rest]) { $first }; say first-and-last(1…10); | ||
camelia | rakudo-parrot dc42ad: OUTPUT«===SORRY!=== Error while compiling /tmp/WapcSw9t2VUnable to parse expression in argument list; couldn't find final ')' at /tmp/WapcSw9t2V:1------> @rest]) { $first }; say first-and-last(1⏏…10); expe…» | ||
psch | EELLIPSIS | ||
colomon | oh, idiot IRC client | ||
p: sub first-and-last([$first, *@rest]) { $first }; say first-and-last(<a b c>); | 13:26 | ||
camelia | rakudo-parrot dc42ad: OUTPUT«a» | ||
psch | hrm, my ~40 minute build blew up, turns out moar can't handle .trace-on | 13:27 | |
at least that's what i take from this | 13:28 | ||
gist.github.com/peschwa/8752353 | |||
(that's not the build of course, but it's the same error) | |||
updated the gist with the actual build error | 13:29 | ||
oh i found something else i gisted a few days back | 13:30 | ||
r: True.foo | 13:31 | ||
camelia | rakudo-parrot dc42ad, rakudo-jvm dc42ad, rakudo-moar dc42ad: OUTPUT«No such method 'foo' for invocant of type 'Bool' in block at /tmp/tmpfile:1» | ||
psch | that did blow up in the REPL for moar as well | ||
gist.github.com/peschwa/8697850 # as per here | |||
13:38
virtualsue joined
13:45
jnap joined
13:48
rindolf left,
krunen left,
rindolf joined
13:49
spider-mario left
13:50
jnap left,
spider-mario joined
14:04
aindilis left
|
|||
colomon | gist.github.com/colomon/8752778 # the panda error | 14:05 | |
tadzik: ^^ | |||
tadzik: sorry I don't have time to debug it here at the moment. | |||
tadzik | colomon: yeah, looking into it | ||
colomon | tadzik++ | ||
14:10
aindilis joined
|
|||
vendethiel | p: sub fst([$fst, *@]) { $fst }; say fst <a b c>; | 14:12 | |
camelia | rakudo-parrot dc42ad: OUTPUT«a» | ||
vendethiel | p: sub fst([$fst, $snd, *@]) { $snd }; say fst <a b c>; | 14:13 | |
camelia | rakudo-parrot dc42ad: OUTPUT«b» | ||
vendethiel | p: sub fst([$, $snd, *@]) { $snd }; say fst <a b c>; | ||
camelia | rakudo-parrot dc42ad: OUTPUT«b» | ||
vendethiel | p: sub fst([$, $snd, *@, $lst]) { $snd ~ $lst }; say fst <a b c d e>; | ||
camelia | rakudo-parrot dc42ad: OUTPUT«===SORRY!=== Error while compiling /tmp/lEZnK856veCannot put required parameter $lst after variadic parametersat /tmp/lEZnK856ve:1------> sub fst([$, $snd, *@, $lst⏏]) { $snd ~ $lst }; say fst <a b c d e>;…» | ||
vendethiel | ^ colomon: that's why I'd like to do | ||
14:14
beastd joined
|
|||
psch | m: sub fst([$fst, *@tail]) { $fst ~ @tail[*-1] }; say fst <a b c>; # have to deal with @tail directly | 14:15 | |
camelia | rakudo-moar dc42ad: OUTPUT«ac» | ||
tadzik | ok, json in somewhat broken on moarvm | 14:21 | |
gist.github.com/tadzik/8753025 | 14:24 | ||
gives different results for the panda bootstrap file on parrot and on moar | |||
vendethiel | psch: yeah, I guess, not that big of a deal. Is there a reason for that, though ? Some languages implement it | 14:25 | |
tadzik | moritz: ^^ | ||
psch | vendethiel: as for reasons, i'm afraid i'm definitely the wrong person to ask; i'd imagine it comes down to optimization concerns | 14:26 | |
14:27
virtualsue left
|
|||
FROGGS | tadzik: is it possible that the version differs for perl6-p and perl6-m? | 14:29 | |
because the latest .ast/make changes could explain the difference | |||
I'd guess you have to itemize hashes (json objects) or so | 14:30 | ||
tadzik | FROGGS: oh! | 14:33 | |
FROGGS: yeah, I don't update rakudo-parrot that often | |||
14:41
erkan left
14:46
jnap joined
14:51
jnap left
14:54
kaare_ left
14:55
rindolf left
14:56
rindolf joined
14:57
kivutar joined
|
|||
tadzik | FROGGS: hm, but, how do I itemize them, if list repots 18 elements? | 15:07 | |
FROGGS | I think a "make $( ... )" would do | 15:08 | |
tadzik | ohh, in JSON code> | ||
I mean, JSON-Tiny's code | |||
FROGGS | in the json actions | ||
tadzik | so it _is_ brokeN :) | ||
FROGGS | hey, I am just guessing :o) | ||
tadzik | :P | ||
moritz | tadzik: are rakudo-m and rakudo-p on the same revision? to me it looks like before vs. after 8128f6a5 (rakudo commmit) | 15:12 | |
tadzik: also updating to newest json in panda should help | |||
tadzik | moritz: oh, indeed, that helped | 15:15 | |
15:15
denis_boyun left
|
|||
tadzik | (stupid submodules grumble grumble) | 15:15 | |
I have to commit the | |||
* them between pulling and bootstrap.pl, cos bootstrap.pl will reset them to the commited state | |||
(stupid bootstrap.pl grumble) | 15:16 | ||
moritz | :-) | ||
dalek | nda: f80ec50 | tadzik++ | ext/JSON__Tiny: Update JSON::Tiny |
15:18 | |
15:24
jnap joined
|
|||
dalek | nda: ae6eab5 | (Tobias Leich)++ | lib/Panda/Fetcher.pm: cleanup path to pass use it in substr See irclog.perlgeek.de/perl6/2013-11-25#i_7914075 |
15:31 | |
nda: c00f5cf | tadzik++ | lib/Panda/Fetcher.pm: Merge pull request #62 from FROGGS/patch-1 cleanup path to pass use it in substr |
|||
15:35
rindolf left,
rindolf joined
|
|||
tadzik | yay, I went through all the pull requests | 15:36 | |
15:39
krunen joined,
ggoebel1113 left
15:42
kivutar left
|
|||
moritz | tadzik++ | 15:43 | |
15:47
SamuraiJack joined
15:56
zakharyas joined
|
|||
timotimo | hm. fosdem is going on right now, isn't it? | 15:56 | |
moritz does a trial mysql -> pg transition for ilbot on his laptop | 15:57 | ||
15:57
mberends joined
|
|||
tadzik | timotimo: aye | 15:58 | |
15:59
Psyche^_ joined
|
|||
timotimo pages through the perl track | 16:00 | ||
do i see correctly that there are no live streams? | |||
16:02
denis_boyun joined
16:03
Psyche^ left
|
|||
dalek | nda: adb7195 | tadzik++ | lib/Panda/App.pm: Make "panda info" output nicer and more useful. Closes #49 |
16:05 | |
psch | timotimo: streaming.fosdem.org has a stream for "Stop Building Bridges to Nowhere: Build Bridges to MoarVM instead", but the sound seems broken | 16:06 | |
16:07
rurban1 joined
|
|||
tadzik | I only see a flower | 16:09 | |
psch | i had video with audio static a moment ago, but it's gone now it seems | 16:11 | |
well, the talk is scheduled to be over now | 16:12 | ||
spider-mario | moritz : github.com/rakudo/star/commit/0a16...921d11R167 ← shouldn’t there be brackets? | 16:20 | |
(L. 167) | |||
16:21
rindolf left
|
|||
spider-mario | this line results in the following warning: | 16:21 | |
Useless use of private hash in void context at Configure.pl line 167. | |||
16:21
rindolf joined
|
|||
moritz | spider-mario++ # good catch | 16:22 | |
16:23
molaf_ joined,
raiph joined
|
|||
moritz | this whole thing will come crashing down eventually, I fear | 16:23 | |
dalek | ar: a49cc41 | moritz++ | Configure.pl: [Configure.pl] properly parentize. This is not Perl 6 code. spider-mario++ |
||
moritz | because parrot and moar have conflicit ideas of what CC, LDFLAGS etc. should be | ||
16:24
arnsholt left
|
|||
moritz | so merging it all into a single hash is headed for DOOM anyway | 16:24 | |
16:24
arnsholt joined,
jeffreykegler joined
16:26
molaf left
16:32
benabik joined
|
|||
benabik | "Stage parse: 66865.559", I think that's a new record. | 16:36 | |
(Personal record at least.) | |||
16:37
rindolf left,
ajr joined,
rindolf joined,
ajr is now known as Guest91810
|
|||
moritz | benabik: you ahven't seen paste.scsys.co.uk/297069 :-) | 16:38 | |
m: say 1144911.468 / 66865.559 | |||
camelia | rakudo-moar dc42ad: OUTPUT«17.122588746» | ||
moritz | benabik: that's from nwc10++ who patched MoarVM locally to do a full GC run after each allocation, or something like that :-) | 16:39 | |
benabik | moritz: What was that? Mine was just having my computer go to sleep mid-parse. | ||
Ah, GC torture testing... That's slow. | |||
16:49
virtualsue joined
16:52
FROGGS left
17:02
rindolf left
17:03
rindolf joined
17:09
cooper left
17:14
cooper joined
17:15
cooper left,
cooper joined
|
|||
vendethiel | what's the bottom type in perl6 ? | 17:18 | |
17:20
rurban1 left
|
|||
psch | r: "foo".^mro.say; 5.^mro.say | 17:20 | |
camelia | rakudo-parrot dc42ad, rakudo-jvm dc42ad, rakudo-moar dc42ad: OUTPUT«(Str) (Cool) (Any) (Mu)(Int) (Cool) (Any) (Mu)» | ||
psch | r: (1|2).^mro.say | ||
camelia | rakudo-parrot dc42ad, rakudo-jvm dc42ad, rakudo-moar dc42ad: OUTPUT«(Junction) (Mu)» | ||
psch | ok, bottom type is not the same as object root | 17:21 | |
psch needs to learn more CS terminology | |||
benabik | Mu is something of the top type. Anything can be assigned to Mu. I don't know that there is a bottom that can be assigned to anything. (Unless you mean bottom in a different way than type lattices.) | ||
diakopter | psch: jnthn is streaming now | ||
psch | diakopter: thanks, i'll have a look | ||
vendethiel: from the wikipedia page to bottom type i think Nil might be what you want | 17:22 | ||
vendethiel | psch: thanks | ||
benabik | Oooh, Nil. Lack of value, yes. | ||
vendethiel | psch: because it's gradually typed, variant type is at the bottom. | 17:23 | |
which means casting Nil to something else is an upcast | |||
benabik | There is also Failure, but I'm not sure how it interacts with typechecking. | ||
psch | m: my Mu $f = Failure.new; my Any $g = Failure.new; my Cool $h = Failure.new | ||
camelia | rakudo-moar dc42ad: OUTPUT«Not enough positional parameters passed; got 1 but expected 2 in method new at src/gen/m-CORE.setting:12181 in block at /tmp/wT8HayeF5o:1» | ||
benabik | m: my Mu $f = Failure.new('Mu'); my Any $g = Failure.new('Any'); my Cool $h = Failure.new('Cool') | 17:27 | |
camelia | rakudo-moar dc42ad: OUTPUT«No such method 'throw' for invocant of type 'Str' in method sink at src/gen/m-CORE.setting:12212 in method BUILDALL at src/gen/m-CORE.setting:923 in method bless at src/gen/m-CORE.setting:842 in method new at src/gen/m-CORE.setting:827 …» | ||
colomon | jnthn++ streaming? link? | ||
benabik | m: my Mu $f = fail('Mu'); my Any $g = fail('Any'); my Cool $h = fail('Cool') | 17:28 | |
camelia | rakudo-moar dc42ad: OUTPUT«Unhandled exception: Mu at src/gen/m-CORE.setting:10811 (/home/p6eval/rakudo-inst-2/languages/perl6/runtime/CORE.setting.moarvm:throw:129) from src/gen/m-CORE.setting:12212 (/home/p6eval/rakudo-inst-2/languages/perl6/runtime/CORE.setting.moarvm:s…» | ||
virtualsue | there's a live stream of the perl devroom at fosdem: europe1.fosdem.sesse.net/ (room k3.201) if anyone is interested | ||
benabik | psch: I suppose it's less type checking failure and more the eagerness with which failure throws. :-/ | 17:29 | |
colomon | I can hear jnthn! \o/ | ||
17:29
krunen left
|
|||
benabik | ... Missed beginning. What's topic of talk? | 17:31 | |
colomon | benabik: I have a vague memory it's a generic p6 talk? | 17:32 | |
virtualsue | what you can do now with perl6 | ||
psch | "What you can do today" i think | ||
yeah, that | |||
virtualsue | snap | ||
fosdem.org/2014/schedule/track/perl/ | 17:33 | ||
benabik | Yeah, the stream list said the room was empty so I was a bit confused. | ||
virtualsue++ # Useful links | 17:34 | ||
virtualsue | no problem | ||
i'm enjoying the talk in person :) | |||
benabik | Woo, perl6-m | 17:35 | |
psch | m: try { my $x = X::AdHoc.new(:payload("foo")); my Mu $f = Failure.new($x); my Any $g = Failure.new.($x); my Cool $h = Failure.new($x); CATCH { when Any { say "Any"; .rethrow }; when Cool { say "Cool"; .rethrow }; when Mu { say "Mu"; } } } | 17:36 | |
camelia | rakudo-moar dc42ad: OUTPUT«AnyNot enough positional parameters passed; got 1 but expected 2 in method new at src/gen/m-CORE.setting:12181 in block at /tmp/wWjG9eXWrg:1» | ||
psch | right, the .rethrow didnt even work | ||
m: try { my $x = X::AdHoc.new(:payload("foo")); my Mu $f = Failure.new($x); my Any $g = Failure.new.($x); my Cool $h = Failure.new($x); CATCH { when Any { say "Any"; }; when Cool { say "Cool"; }; when Mu { say "Mu"; } } } | |||
camelia | rakudo-moar dc42ad: OUTPUT«Any» | ||
colomon | ugh, static | ||
raydiak | ow fix teh mic :P | ||
psch | ...but that just shows that any Exception matches Any | ||
benabik | r: say Mu ~~ Failure, Any ~~ Failure, Cool ~~ Failure | 17:37 | |
camelia | rakudo-parrot dc42ad, rakudo-jvm dc42ad, rakudo-moar dc42ad: OUTPUT«FalseFalseFalse» | ||
17:37
jnap left
|
|||
psch | benabik: well they're all above Failure, ~~ against undefined lhs checks nqp::istype(rhs, lhs) | 17:38 | |
benabik | Erm, did I do that backwards? | ||
psch | m: say Failure ~~ Mu | ||
camelia | rakudo-moar dc42ad: OUTPUT«True» | ||
benabik | r: say Failure ~~ Mu, Failure ~~ Any, Failure ~~ Cool | ||
camelia | rakudo-parrot dc42ad, rakudo-jvm dc42ad, rakudo-moar dc42ad: OUTPUT«TrueTrueFalse» | ||
psch | r: Failure ~~ Exception # this surprised me just now | 17:39 | |
camelia | ( no output ) | ||
psch | r: say Failure ~~ Exception, Exception ~~ Failure | ||
camelia | rakudo-parrot dc42ad, rakudo-jvm dc42ad, rakudo-moar dc42ad: OUTPUT«FalseFalse» | ||
benabik | Failure has-a Exception, not is-a | 17:40 | |
17:40
rindolf left
17:41
rindolf joined
|
|||
dalek | osystem: 1220bd8 | sergot++ | META.list: HTTP::Request added, Response and UA soon |
17:41 | |
raydiak turns off fosdem static | 17:46 | ||
\o morning #perl6 | |||
benabik is going to wait for the slides rather than periodically getting deafened by static. | |||
psch | hi raydiak++ # turning off the static | ||
TimToady | obviously they're mixing together a wired and wireless mic feed, and he's using the wired, so the wireless mic is off, and we're picking up static instead | 17:47 | |
probably someone demoing their software radio :) | 17:48 | ||
benabik | Wouldn't be nearly as bad if the static was the same volume as jnthn, instead of significantly louder. | ||
rindolf | Hi all. | ||
TimToady | it comes and goes, I just run it down to make the static bearable, then I know when it's gone away again | ||
then I run the volume back up | |||
rindolf has CPANTS overload, but has already done most of the work. | |||
17:50
araujo joined,
krunen joined
17:58
erkan joined
|
|||
colomon | jnthn++ | 18:02 | |
18:06
virtualsue left
18:10
regreg left
18:11
atroxaper left
18:12
atroxaper joined,
ilbot3 left,
ilbot3 joined
|
|||
Ulti | ghv.artzub.com/#repo=rakudo&cli...ser=rakudo this is neat | 18:21 | |
18:21
colomon left
18:24
colomon joined,
jnap joined
|
|||
TimToady | why is the primary language of star 'Perl' | 18:26 | |
rakudo's is 'Perl 6' | |||
well, Perl6, but yeah | |||
raydiak | I've heard that the perl 6 recognition on github still has its flaws | 18:28 | |
18:29
jnap left
|
|||
Ulti | plus I guess historically everything was marked as Perl rather than Perl 6 | 18:29 | |
18:36
rurban1 joined
18:41
vendethiel left
18:43
darutoko left
|
|||
raydiak | amusing anecdote for the day: the g/f saw a mention of "hacking" on my screen and became concerned about the nature of my work | 18:46 | |
18:48
erkan left
|
|||
diakopter | *giggle* | 18:50 | |
18:52
xinming_ joined
18:54
rurban1 left,
FROGGS[mobile]2 left
18:55
xinming left,
vendethiel joined
18:57
tgt left
19:01
FROGGS[mobile] joined,
tgt joined
19:04
rindolf left
|
|||
vendethiel | :r say 0..1.perl; say 0...3.perl | 19:04 | |
19:05
rindolf joined
|
|||
vendethiel | not sure what's the difference between .. and ... :o) | 19:05 | |
moritz | r: say (0..1).^name | 19:07 | |
camelia | rakudo-parrot dc42ad, rakudo-jvm dc42ad, rakudo-moar dc42ad: OUTPUT«Range» | ||
moritz | r: say (0...1).^name | ||
vendethiel | oh, with three dots it's a list. | ||
camelia | rakudo-parrot dc42ad, rakudo-jvm dc42ad, rakudo-moar dc42ad: OUTPUT«List» | ||
moritz | vendethiel: basically .. creates a Range object, and only supports "increment by one" | ||
but it also supports range checking etc. | |||
vendethiel | moritz: what's the purpose of .. if it's more limited ? Lists are lazy too, ain't they ? | ||
moritz | but ... also supports smart increemnts | ||
vendethiel: but you can do smart-match against a Range in O(1) | 19:08 | ||
vendethiel | moritz: smart-matching lists force them to be evaluated ? | ||
oh okay, three dots is eager | 19:09 | ||
moritz | vendethiel: three dots aren't eager | ||
vendethiel | r: 0...Inf | 19:10 | |
camelia | ( no output ) | ||
vendethiel | uh, that coredumped for me | ||
moritz | vendethiel: but since lists aren't always monotonic, smart-matching has to iterate the whole list until it finds something | ||
vendethiel | maybe it was "fixed" recently | ||
19:10
jnap joined
|
|||
moritz | vendethiel: well, if you run it in the REPL, it tries to print the value of the last expression | 19:10 | |
vendethiel: and to print it, it has to iterate it | |||
vendethiel | ah yes, thanks | 19:11 | |
moritz | vendethiel: to prevent that, add a ; 1; at the end | ||
vendethiel | yeah that's what I did :). I know scala and some others languages just show `Stream(1, Stream(?))` or something | ||
moritz | that's something we could consider too | 19:12 | |
at least for .gist, not .Str | |||
19:14
rindolf left
19:15
rindolf joined,
tgt left
|
|||
timotimo | d'oh, i missed the streams | 19:19 | |
19:19
rindolf left
|
|||
timotimo | are there stream dumps anywhere? | 19:19 | |
19:20
kanishka joined,
rindolf joined
|
|||
raydiak | r: say 1.5 ~~ (1..2); say 1.5 ~~ (1...2); | 19:20 | |
camelia | rakudo-parrot dc42ad, rakudo-jvm dc42ad, rakudo-moar dc42ad: OUTPUT«TrueFalse» | ||
raydiak | vendethiel: ^ | ||
vendethiel | raydiak: yep thanks :) | ||
19:20
kaare_ joined
|
|||
vendethiel | whereas a smartmatch on a list would only check its elements then | 19:21 | |
raydiak | right, just like the 1...2 is doing | ||
vendethiel | yeah that's what I meant. | ||
raydiak | sounds like you got it figured out, then :) | 19:22 | |
vendethiel | Yeah, 3 days of Perl6 and I can read many examples and just understand them/figure out what they do | 19:23 | |
psch | unspace.t down to 12 skips from 18 \o/ | ||
there's at least one test that utterly confuses me though | |||
vendethiel | at first I was scared all these operators would take a long time to learn but really, it's just combinations | ||
raydiak | yep...most languages seem scary until you know them | 19:24 | |
I was scared of all the symbols that weren't on my keyboard | 19:25 | ||
vendethiel | oh, some languages are still scary after using them for almost 2 years :p. | ||
psch | unspace.t:83 doesn't make sense to me. what i see is that it calls postcircumfix:<( )> on a Str and the test is skipped (for niecza) with exactly that as a message and "parse failure" for rakudo... | ||
but .("x") on a function that returns 'a' *should* complain about not finding postcircumfix:<( )>, right? :/ | 19:26 | ||
timotimo | er ... | 19:27 | |
19:27
araujo left,
tgt joined
|
|||
timotimo | you mean like sub foobar($arg) { return 'a' }; foobar.("x")? | 19:27 | |
19:27
araujo joined
|
|||
timotimo looks up the actual test itself | 19:28 | ||
psch | timotimo: exactly like that, but unspaced of course | 19:29 | |
timotimo | it'd seem like that's supposed to pass "x" to the version of foo that takes an argument and returns it | 19:30 | |
so sub foo($x) { $x } | |||
psch | but the method dot goes on the return value, not the function | ||
which is consistent with say and whatelsehaveyou | |||
vendethiel | r: class A { sub one { 'a'; } submethod two { 'b' } method thr { 'c'} }; my A @a .= new; say @a.one~@a.two~@a.thr; | ||
camelia | rakudo-parrot dc42ad, rakudo-jvm dc42ad, rakudo-moar dc42ad: OUTPUT«===SORRY!=== Error while compiling /tmp/tmpfileTwo terms in a rowat /tmp/tmpfile:1------> class A { sub one { 'a'; } ⏏submethod two { 'b' } method thr { 'c'}  ex…» | ||
timotimo | hmm. | ||
vendethiel | r: class A { sub one { 'a'; }; submethod two { 'b' }; method thr { 'c'} }; my A @a .= new; say @a.one~@a.two~@a.thr; | 19:31 | |
psch | timotimo: i think the intention was somewhat like foo\ ("x")\ .\ lc or somesuch | ||
camelia | rakudo-parrot dc42ad, rakudo-jvm dc42ad, rakudo-moar dc42ad: OUTPUT«No such method 'two' for invocant of type 'Array[A]' in block at /tmp/tmpfile:1» | ||
vendethiel | r: class A { sub one { 'a'; }; submethod two { 'b' }; method thr { 'c'} }; my A @a .= new; say @a.one~@a.thr; | ||
camelia | rakudo-parrot dc42ad, rakudo-jvm dc42ad, rakudo-moar dc42ad: OUTPUT«No such method 'thr' for invocant of type 'Array[A]' in block at /tmp/tmpfile:1» | ||
vendethiel | whoops. | ||
timotimo | psch: no, i do think that ought to execute the sub foo with the argument "x" | ||
vendethiel | r: class A { sub one { 'a'; }; submethod two { 'b' }; method thr { 'c'} }; my A $a .= new; say $a.one~$a.two~$a.thr; | ||
timotimo | rather than call postcircumfix on the result | ||
psch | r: say.("foo") | ||
camelia | rakudo-jvm dc42ad: OUTPUT«one(A<1820025559>bc)» | ||
..rakudo-parrot dc42ad: OUTPUT«one(A<-9014862644126962107>bc)» | |||
..rakudo-moar dc42ad: OUTPUT«one(A<140363782481680>bc)» | |||
rakudo-parrot dc42ad: OUTPUT«No such method 'postcircumfix:<( )>' for invocant of type 'Bool' in any at gen/parrot/BOOTSTRAP.nqp:1692 in any at gen/parrot/BOOTSTRAP.nqp:1674 in block at /tmp/tmpfile:1» | |||
..rakudo-jvm dc42ad: OUTPUT«No such method 'postcircumfix:<( )>' for invocant of type 'Bool' in any at gen/jvm/BOOTSTRAP.nqp:1680 in any at gen/jvm/BOOTSTRAP.nqp:1663 in block at /tmp/tmpfile:1» | |||
..rakudo-moar dc42ad: OUTPUT«Cannot find method 'postcircumfix:<( )>' in block at /tmp/tmpfile:1» | 19:32 | ||
timotimo | oh, huh. | ||
psch | r: &say.("foo") | ||
camelia | rakudo-parrot dc42ad, rakudo-jvm dc42ad, rakudo-moar dc42ad: OUTPUT«foo» | ||
psch | that might be it? | ||
vendethiel | what did I do ôÔ | ||
timotimo | &x may be bound to any object that does the Callable role, such as any Block or Routine. The Callable role implies the ability to support postcircumfix:<( )>. | ||
vendethiel | r: class A { sub one { return 'a'; }; submethod two { return 'b' }; method thr { return 'c'} }; my A $a .= new; say $a.one; say $a.two; say $a.thr; | 19:34 | |
camelia | rakudo-parrot dc42ad, rakudo-jvm dc42ad, rakudo-moar dc42ad: OUTPUT«one(A.new())bc» | ||
timotimo | vendethiel: the sub "one" ought to be called via A::one, i believe | ||
ah, duh :) | |||
vendethiel | the "NL" seems messed ? | ||
timotimo | it's the one method on Any that's leaking through | ||
it's like the "one" sub; it creates a junction | |||
vendethiel | r: class A { sub foobv { return 'a'; }; submethod two { return 'b' }; method thr { return 'c'} }; my A $a .= new; say $a.foobv; say $a.two; say $a.thr; | ||
camelia | rakudo-parrot dc42ad, rakudo-jvm dc42ad, rakudo-moar dc42ad: OUTPUT«No such method 'foobv' for invocant of type 'A' in block at /tmp/tmpfile:1» | ||
vendethiel | r: A::foobv().say | 19:35 | |
camelia | rakudo-moar dc42ad: OUTPUT«===SORRY!===Could not find symbol '&foobv'» | ||
..rakudo-jvm dc42ad: OUTPUT«Could not find symbol '&foobv' in method <anon> at gen/jvm/CORE.setting:12211 in any at gen/jvm/Metamodel.nqp:2610 in any find_method_fallback at gen/jvm/Metamodel.nqp:2609 in any find_method at gen/jvm/Metamodel.nqp:947 in any at gen/…» | |||
..rakudo-parrot dc42ad: OUTPUT«Could not find symbol '&foobv' in method <anon> at gen/parrot/CORE.setting:12232 in any at gen/parrot/Metamodel.nqp:2693 in any find_method_fallback at gen/parrot/Metamodel.nqp:2681 in any find_method at gen/parrot/Metamodel.nqp:948 …» | |||
psch | class A { sub one { return 'a'; }; submethod two { return 'b' }; method thr { return 'c'} }; my A $a .= new; say $a.one; say $a.two; say $a.thr; | ||
timotimo | i think the sub also has to be declared "has" | ||
psch | ahgrh | ||
copied the \n... | |||
vendethiel | r: class A { sub foobv { return 'a'; }; } say A::foobv | ||
camelia | rakudo-parrot dc42ad, rakudo-jvm dc42ad, rakudo-moar dc42ad: OUTPUT«===SORRY!=== Error while compiling /tmp/tmpfileTwo terms in a rowat /tmp/tmpfile:1------> class A { sub foobv { return 'a'; }; } ⏏say A::foobv expecting any of:…» | ||
vendethiel | r: class A { sub foobv { return 'a'; }; }; say A::foobv(); | ||
camelia | rakudo-moar dc42ad: OUTPUT«===SORRY!===Could not find symbol '&foobv'» | ||
..rakudo-jvm dc42ad: OUTPUT«Could not find symbol '&foobv' in method <anon> at gen/jvm/CORE.setting:12211 in any at gen/jvm/Metamodel.nqp:2610 in any find_method_fallback at gen/jvm/Metamodel.nqp:2609 in any find_method at gen/jvm/Metamodel.nqp:947 in any at gen/…» | |||
..rakudo-parrot dc42ad: OUTPUT«Could not find symbol '&foobv' in method <anon> at gen/parrot/CORE.setting:12232 in any at gen/parrot/Metamodel.nqp:2693 in any find_method_fallback at gen/parrot/Metamodel.nqp:2681 in any find_method at gen/parrot/Metamodel.nqp:948 …» | |||
vendethiel | It's lexically scoped :P. | 19:36 | |
I guess that at first. But then, there's no "visibility" of sorts ? | |||
psch | timotimo: so i add the & to realize the intention of the test? or is there something else i'm missing? | ||
timotimo | i'm not certain :( | 19:37 | |
moritz | vendethiel: you can say 'our sub foobv', but the idiomatic thing is to export it instead | 19:38 | |
vendethiel | r: class A { our sub foobv { return 'a'; }; }; say A::foobv(); | ||
camelia | rakudo-parrot dc42ad, rakudo-jvm dc42ad, rakudo-moar dc42ad: OUTPUT«a» | ||
vendethiel | class A { my method tryprivate { return 'a'; } }; say A.new.tryprivate() | 19:39 | |
r: class A { my method tryprivate { return 'a'; } }; say A.new.tryprivate() | |||
whoops :) | |||
camelia | rakudo-parrot dc42ad, rakudo-jvm dc42ad, rakudo-moar dc42ad: OUTPUT«No such method 'tryprivate' for invocant of type 'A' in block at /tmp/tmpfile:1» | ||
vendethiel | yay, so that's how you <visibility> | 19:40 | |
timotimo | not really | ||
using method !private is more common | |||
vendethiel | r: class A { method tryprivate !private { return 'a'; } }; say A.new.tryprivate() | ||
camelia | rakudo-parrot dc42ad, rakudo-jvm dc42ad, rakudo-moar dc42ad: OUTPUT«===SORRY!=== Error while compiling /tmp/tmpfileMissing blockat /tmp/tmpfile:1------> class A { method tryprivate ⏏!private { return 'a'; } }; say A.new.tr expect…» | ||
vendethiel | or should that be unspaced? | ||
moritz | r: class A { method !tp { return 'a' } }; say A.new!tp | 19:41 | |
timotimo | r: class A { method !tryprivate { return 'a'; } }; say A.new.tryprivate() | ||
camelia | rakudo-parrot dc42ad, rakudo-jvm dc42ad, rakudo-moar dc42ad: OUTPUT«===SORRY!=== Error while compiling /tmp/tmpfilePrivate method call to tp must be fully qualified with the package containing the methodat /tmp/tmpfile:1------> ethod !tp { return 'a' …» | ||
rakudo-parrot dc42ad, rakudo-jvm dc42ad, rakudo-moar dc42ad: OUTPUT«No such method 'tryprivate' for invocant of type 'A' in block at /tmp/tmpfile:1» | |||
19:43
rindolf left,
rindolf joined
|
|||
vendethiel | r: class A { method !tp { return 'a' } }; say A::tp(A.new) | 19:43 | |
camelia | rakudo-jvm dc42ad: OUTPUT«Could not find symbol '&tp' in method <anon> at gen/jvm/CORE.setting:12211 in any at gen/jvm/Metamodel.nqp:2610 in any find_method_fallback at gen/jvm/Metamodel.nqp:2609 in any find_method at gen/jvm/Metamodel.nqp:947 in any at gen/jvm…» | ||
..rakudo-moar dc42ad: OUTPUT«===SORRY!===Could not find symbol '&tp'» | |||
..rakudo-parrot dc42ad: OUTPUT«Could not find symbol '&tp' in method <anon> at gen/parrot/CORE.setting:12232 in any at gen/parrot/Metamodel.nqp:2693 in any find_method_fallback at gen/parrot/Metamodel.nqp:2681 in any find_method at gen/parrot/Metamodel.nqp:948 in …» | |||
raydiak | r: class A { trusts GLOBAL method !tp { return <a> } }; say A.new!A::tp | 19:45 | |
camelia | rakudo-parrot dc42ad, rakudo-jvm dc42ad, rakudo-moar dc42ad: OUTPUT«===SORRY!=== Error while compiling /tmp/tmpfileTwo terms in a rowat /tmp/tmpfile:1------> class A { trusts GLOBAL ⏏method !tp { return <a> } }; say A.new!A expec…» | ||
raydiak | r: class A { trusts GLOBAL; method !tp { return <a> } }; say A.new!A::tp | ||
camelia | rakudo-parrot dc42ad, rakudo-jvm dc42ad, rakudo-moar dc42ad: OUTPUT«a» | ||
vendethiel | that seems dangerous. | ||
trusts is like C++'s friend ? | |||
kanishka | is there any alternative for logstash or fluentd in perl ? | 19:46 | |
raydiak | well calling a private method from outside the class requires some extra messing about...it is, after all, supposed to be private | ||
idk C++ | |||
vendethiel | yeah I like it better that way too =) | ||
my only question left is WRT subtyping, so let's do it : | 19:47 | ||
r: class A { my sub a { return 1 }; }; class B extends A { sub b { return $self->a() + 1 } }; say B.new.a() | 19:48 | ||
camelia | rakudo-parrot dc42ad, rakudo-jvm dc42ad, rakudo-moar dc42ad: OUTPUT«===SORRY!=== Error while compiling /tmp/tmpfileUnable to parse class definitionat /tmp/tmpfile:1------> s A { my sub a { return 1 }; }; class B ⏏extends A { sub b { return…» | ||
vendethiel | r: class A { my sub a { return 1 }; }; class B does A { sub b { return $self->a() + 1 } }; say B.new.a() | ||
camelia | rakudo-parrot dc42ad, rakudo-jvm dc42ad, rakudo-moar dc42ad: OUTPUT«===SORRY!=== Error while compiling /tmp/tmpfileA is not composable, so B cannot compose itat /tmp/tmpfile:1------> » | ||
vendethiel | r: class A { my sub a { return 1 }; }; class B is A { sub b { return $self->a() + 1 } }; say B.new.a() | ||
moritz | vendethiel: inheritance is done with 'is' | ||
camelia | rakudo-parrot dc42ad, rakudo-jvm dc42ad, rakudo-moar dc42ad: OUTPUT«===SORRY!=== Error while compiling /tmp/tmpfileUnsupported use of -> as postfix; in Perl 6 please use either . to call a method, or whitespace to delimit a pointy blockat /tmp/tmpfile:1---…» | ||
vendethiel | moritz: 2fast | ||
r: class A { my sub a { return 1 }; }; class B is A { sub b { return $self.a() + 1 } }; say B.new.a() | 19:49 | ||
camelia | rakudo-parrot dc42ad, rakudo-jvm dc42ad, rakudo-moar dc42ad: OUTPUT«===SORRY!=== Error while compiling /tmp/tmpfileVariable '$self' is not declaredat /tmp/tmpfile:1------> class B is A { sub b { return $self.a()⏏ + 1 } }; say B.new.a()[0…» | ||
moritz | vendethiel: and if you want to call stuff as methods, you have to declare them as methods | ||
vendethiel | moritz: so sub is lexically scoped | ||
moritz | yes | ||
vendethiel | and method isnt ? | ||
moritz | and methods live in the method table | ||
vendethiel | yeah | ||
moritz | and $self is spelled self | ||
vendethiel | so $self only when you explicitly set it to be a parameter? | 19:50 | |
moritz | yes | ||
vendethiel | ie sub b($self:) {} | ||
moritz | correct | ||
19:50
SamuraiJack left
|
|||
vendethiel | I'll try it in my text editor cause it's a bit hard to see what's going on here | 19:50 | |
Is there a perl6 bundle for SublimeText/TextMate etc? | 19:51 | ||
19:51
rurban1 joined
|
|||
moritz | r: class A { method a { 1 } }; class B is A { method b { $.a + 1 } }; say B.new.a; ay B.new.b | 19:51 | |
camelia | rakudo-parrot dc42ad, rakudo-jvm dc42ad, rakudo-moar dc42ad: OUTPUT«===SORRY!=== Error while compiling /tmp/tmpfileUndeclared routine: ay used at line 1» | ||
moritz | r: class A { method a { 1 } }; class B is A { method b { $.a + 1 } }; say B.new.a; say B.new.b | ||
camelia | rakudo-parrot dc42ad, rakudo-jvm dc42ad, rakudo-moar dc42ad: OUTPUT«12» | ||
vendethiel | moritz: can you inherit with a specific visibility ? | 19:52 | |
to make all methods of your superclass "private" | |||
moritz | I'm aware of p6 syntax hilighting for vim, emacs and pygments | ||
vendethiel: no | |||
if you want that, you are better off doing delegation | 19:53 | ||
vendethiel | so there's still a way to do it :P. | 19:54 | |
19:54
jnap left
|
|||
moritz | well, it's not inheritance anymore :-) | 19:54 | |
vendethiel | yeah, but that allows for more complicated things, like multiple inheritance if somebody wants that etc. | ||
psch | m: class A { method a { "a" } }; class B { method a { "b" } }; class C is A is B { }; C.new.a | 19:57 | |
camelia | ( no output ) | ||
psch | m: class A { method a { "a" } }; class B { method a { "b" } }; class C is A is B { }; C.new.a.say | ||
camelia | rakudo-moar dc42ad: OUTPUT«a» | ||
psch | m: class A { method a { "a" } }; class B { method a { "b" } }; class C is B is A { }; C.new.a.say | ||
camelia | rakudo-moar dc42ad: OUTPUT«b» | ||
vendethiel | oh, it does have that -- for better or worse | ||
moritz: googling and getting on some of yours answers from 2010 on stackoverflow | 19:58 | ||
19:59
kaare_ left
|
|||
moritz | vendethiel: that kinda hard to avoid if you google for p6 stuff :-) | 20:00 | |
you end up on my or masak++'s blog, or slides from jnthn++, or stackoverflow or doc.perl6.org or perlmonks... | |||
vendethiel | haha yeah but those are already opened ;) | 20:01 | |
is there something like `super`/`superclass` ? `class A { our sub a { return 'a'; }; }; class B is A { method b { return superclass::a() ~ 'b'; } ` I can see why it could be a problem WRT multiple inheritance though | |||
moritz | there is the nextsame/nextwith/callsame/callwith group of redispatchers | 20:02 | |
and you can say self.A::a() | 20:03 | ||
(ie fully qualify a method with the class name) | |||
vendethiel | moritz: just A would be enough, no need for self.A, is there ? | ||
I guess it justs casts to an A | |||
moritz | there's no casting | 20:05 | |
and A::a would try to call a sub, not a method | |||
psch | with "our sub" you can call without self, yeah, but i don't think you inherit it either | ||
vendethiel | no it's not inherit it anymore, it's just fully qualified sub call | ||
moritz | we really do care about the sub/method distiction in Perl 6 | ||
20:08
atroxaper left
|
|||
vendethiel | I can guess. `submethod` seems a bit confusing, not sure what's the use-case | 20:09 | |
raydiak | non-inheritable method; e.g. a method that isn't functional or meaningful to a subclass | 20:11 | |
sergot | r: my %h = <a a>; sub add(*%hash) { for %hash.kv -> $k, $v { %h{$k} = $v }; }; my $to_add = "a"; add($to_add => "b"); | ||
camelia | rakudo-parrot dc42ad, rakudo-jvm dc42ad, rakudo-moar dc42ad: OUTPUT«Too many positional parameters passed; got 1 but expected 0 in sub add at /tmp/tmpfile:1 in block at /tmp/tmpfile:1» | ||
sergot | how can i do this? | ||
vendethiel | wait, can you do `submethod !a` ? If so, it's cool | ||
timotimo | should work actually | 20:12 | |
moritz | vendethiel: private methods are never inherited | ||
vendethiel: so the 'submethod !' is really redundant | |||
vendethiel | moritz: oh yeah, I was mixing two things | ||
sergot | I mean, using variable in *%hash. | ||
as a key | |||
moritz | sergot: add |($to_add => "b") | 20:13 | |
sergot | moritz++ thanks! :) | ||
20:13
rindolf left
20:14
rindolf joined
|
|||
moritz | good news: I have an experimental mysql -> pg translation for ilbot | 20:16 | |
bad news: it takes about 1 hour to do the migration | |||
on my rather beefy laptop | |||
and on my rather slow vhost, it'll likely take half a day | |||
timotimo | do you have an idea what is to blame? | ||
moritz | timotimo: yes, encoding fu | 20:17 | |
timotimo | aaw man :( | ||
that's rough | |||
do you think you can do it incrementally at all? | |||
i think postgres full text search should be a bit helpful | 20:18 | ||
20:18
denis_boyun left
|
|||
moritz | and it's 8.6 mio rows, so it's simply a non-trivial amount of data | 20:18 | |
timotimo | that's fair | ||
moritz | though I'm a bit worried; the gzip'ed mysqldump is 425MB, the gzip'd pgdump is 215MB | 20:19 | |
that's... worrying | |||
timotimo | hmm | ||
moritz | gzip should fudge out most of the formatting differences | 20:20 | |
timotimo | can you diff a part of it and see if it's just systematically more compact commands? | ||
moritz | not easily | ||
timotimo | mhm :( | ||
ISTR postgres is good at storing data, but what you have there is the text file | 20:21 | ||
hm, doesn't postgres have a special minimized format for data importing? | |||
like heredocs? | |||
moritz | yes, I think so | 20:22 | |
oh, I think the answer is simply "data truncation during import" | 20:23 | ||
timotimo | ouch | ||
moritz | there are some pathologically blown-up lines in mysql table | ||
due to UTF-8 not quite decoded as UTF-8 | 20:24 | ||
and I've simply truncated those | |||
timotimo | :( | ||
moritz | m: say (387575619 - 391371730) / 391371730 | ||
camelia | rakudo-moar dc42ad: OUTPUT«-0.0096995023» | 20:25 | |
moritz | but that's less than 1% | ||
timotimo | well, i guess that means the original data was b0rked anyway? | ||
moritz | so, not quite the answer | ||
yes | |||
20:25
rurban1 left
|
|||
moritz | mkaing the import incremental is the next step | 20:26 | |
20:26
arnsholt left
20:27
arnsholt joined
|
|||
moritz | timotimo: irclog.perlgeek.de/perl6/2014-01-15#i_8123929 example of such a line | 20:28 | |
timotimo | ah! those :) | 20:29 | |
20:29
tgt left
|
|||
timotimo | i remember those :D | 20:29 | |
nwc10 | p: say q0/No escaping or anything, suspiciously like Q!/ | ||
camelia | rakudo-parrot dc42ad: OUTPUT«␀␀␀[␀␀␀3␀␀␀1␀␀␀m␀␀␀=␀␀␀=␀␀␀=␀␀␀␀␀␀[␀␀␀0␀␀␀m␀␀␀S␀␀␀O␀␀␀R␀␀␀R␀␀␀Y␀␀␀!␀␀␀␀␀␀[␀␀␀3␀␀␀1␀␀␀m␀␀␀=␀␀␀=␀␀␀=␀…» | ||
moritz | usually if the IRC line length limit truncates UTF-8 continuation bytes | 20:30 | |
and thus the autodetector refuses to classify it as UTF-8 | |||
falls back to Latin-1 | |||
and produces lot and lots of mojibake | |||
20:30
zakharyas left
20:34
rindolf left
20:35
rindolf joined
20:36
denisboyun joined
20:38
dag_ joined,
arnsholt left
|
|||
dalek | osystem: 08ba60c | sergot++ | META.list: HTTP::Headers added |
20:38 | |
dag_ | moritz: Saw you're doing Postgres imports - you do know about COPY? It really is your friend. | 20:39 | |
20:39
arnsholt joined
|
|||
dalek | kudo/nom: fb5e3dc | (Pepe Schwarz)++ | src/Perl6/Grammar.nqp: Adjusted Grammar.nqp to parse a few more unspace-related tests. |
20:40 | |
kudo/nom: 535d912 | (Matthew Wilson)++ | src/Perl6/Grammar.nqp: Merge pull request #250 from peschwa/slightly_improved_unspace Adjusted Grammar.nqp to parse a few more unspace-related tests. |
|||
diakopter | psch++ | ||
dag_ | moritz: COPY FREEZE was added in 9.3 - even faster. | ||
dag_ has got to go again... | 20:41 | ||
20:41
dag_ left
|
|||
timotimo | are there any slide pdfs of perl6-related talks yet? | 20:42 | |
diakopter | from ever? :) | ||
dalek | ast: 9801c79 | (Pepe Schwarz)++ | S02-lexical-conventions/unspace.t: Added test for RT #92826, RT #79340, RT #117465, un-skipped 6 tests. |
20:43 | |
synopsebot | Link: rt.perl.org/rt3//Public/Bug/Displa...l?id=92826 | ||
20:43
tgt joined
|
|||
timotimo | psch: lookin' good! :) | 20:44 | |
psch | timotimo: i just left the one i was unsure about but added a similar one... | 20:45 | |
the &foo <> foo distinction isn't clear to me | |||
at least in that context, which probably means i can't divine the intention of the original test | |||
timotimo | it does make sense the way you interpreted it | ||
if you have &foo you refer to the sub, if you have only foo you refer to the result | 20:46 | ||
i don't know why i didn't understand that before | |||
diakopter | well, the address-of or reference to a name of thing can be viewed as a deferral of the invocation of that thing | ||
(invocation... and resolution!) | 20:47 | ||
timotimo | diakopter: is your talk about moarvm going to talk a lot about the perl5 interop of moarvm? | ||
diakopter | I didn't do it; I was feeling too poorly | 20:48 | |
timotimo | fair enough | ||
was it going to be about that? or did i misunderstand the abstract? | |||
dalek | osystem: 8cb43e4 | sergot++ | META.list: HTTP::Message added |
20:49 | |
psch | timotimo: so the test should probably go '&foo\ .\ ("x")' you say? | ||
timotimo | sounds sensible | ||
diakopter | I wanted to no | ||
I mean | |||
no | |||
timotimo | but i'd like an actual perl6 pro to confirm that | ||
diakopter | it's still foo.() | ||
20:49
denisboyun left
|
|||
diakopter | the unspace should be viewed as non-existent | 20:50 | |
timotimo | right. and foo.() calls postcircumfix:<( )> on the result of foo | ||
psch | diakopter: but foo.("x") errors with 'cant find postcircumfix:<( )> for Str' | ||
diakopter | ah ok, yes. | ||
psch | which is the given reason for skipping the test | ||
i wonder if i can unskip it for niecza too | 20:51 | ||
n: sub foo($x) { $x }; &foo\ .\ ("x") | |||
camelia | ( no output ) | ||
psch | n: sub foo($x) { $x }; &foo\ .\ ("x").say # ENOSAY | ||
camelia | niecza v24-109-g48a8de3: OUTPUT«x» | ||
moritz | the error for foo.() looks correct to me | ||
it parses as foo().() | 20:52 | ||
psch | so everyone agrees that the test doesn't test what it's supposed to test? :) | ||
moritz | if /me is everybody, yes! :-) | ||
timotimo | well, me, too | ||
dalek | ast: 8752897 | (Pepe Schwarz)++ | S02-lexical-conventions/unspace.t: Corrected und and skipped a test for Rakudo and Niecza |
20:53 | |
psch | errr | ||
that should've read "corrected and unskipped"... :) | |||
fixing that involves push --force i gather? | 20:54 | ||
timotimo | it would | 20:55 | |
is it that important? | |||
psch | not really, i'd just say it's confusing if it's as-is | ||
but then any confusion might be cleared by viewing the actual commit | |||
i'm just a bit antsy not to do anything wrong is all heh | 20:56 | ||
timotimo | the philosophy of #perl6 is "-Ofun" and "easier to ask for forgiveness than permission" | ||
so i'd say it's fine | |||
20:57
rindolf left
|
|||
psch | r: /\ X/ # RT #77522 | 20:57 | |
synopsebot | Link: rt.perl.org/rt3//Public/Bug/Displa...l?id=77522 | ||
camelia | rakudo-parrot dc42ad, rakudo-jvm dc42ad, rakudo-moar dc42ad: OUTPUT«===SORRY!=== Error while compiling /tmp/tmpfileUnspace not allowed in regexat /tmp/tmpfile:1------> /\ ⏏X/ # RT #77522» | ||
synopsebot | Link: rt.perl.org/rt3//Public/Bug/Displa...l?id=77522 | ||
moritz | std: /\ X/ | 20:58 | |
camelia | std 09dda5b: OUTPUT«===SORRY!===No unspace allowed in regex; if you meant to match the literal character, please enclose in single quotes (' ') or use a backslashed form like \x20 at /tmp/et6ck2Pacv line 1:------> /\⏏ X/Parse failed…» | ||
moritz | looks correct to me | ||
20:58
rindolf joined
|
|||
timotimo | oh? i didn't know about this | 20:58 | |
psch | r: try EVAL '/\ X/'; $!.perl.say | ||
camelia | rakudo-parrot dc42ad, rakudo-jvm dc42ad, rakudo-moar dc42ad: OUTPUT«X::Comp::AdHoc.new(filename => "eval_0", line => 1, column => Any, modules => Array.new(), is-compile-time => Bool::True, pre => "/\\ ", post => "X/", highexpect => Array.new(), payload => "Unspace not allowed in re…» | ||
psch | can't test that :/ | 20:59 | |
timotimo | but it seems like a good call to force spaces to be quoted | ||
psch | there's an awful lot of bugs that need to have their X::AdHoc or X::Comp::AdHoc converted to something narrower typed | 21:00 | |
but i don't think doing it everywhere the same i did it in the optimizer is the right way; i'm already a bit uncomfortable with the amount of code duplication i introduced from World to the optimizer... | 21:01 | ||
moritz | psch: maybe there needs to be role that supplies code to both World and Optimizer | 21:03 | |
psch | moritz: yes, a role for Exception-y stuff probably makes sense | 21:06 | |
and when it's in a role that role can also be bolted onto e.g. Metamodel/MultipleInheritance.nqp for e.g. RT #117165 i guess | 21:12 | ||
synopsebot | Link: rt.perl.org/rt3//Public/Bug/Displa...?id=117165 | ||
psch | and all the others! | ||
21:12
rindolf left
|
|||
timotimo | psch: inside the grammar it's much easier to make typed exceptions work | 21:12 | |
psch | well, yes, finding the needed information probably is difficult if there's no cursor or anything around anymore | 21:14 | |
so blindly converting nqp::die calls into "build and throw a typed exception" isn't the best course, is it | |||
timotimo | since you have a cursor, you can actually use its typed exception helper method | 21:15 | |
moritz | blindly doing software development is never a good course :-) | ||
21:16
kanishka left,
xenoterracide left
|
|||
psch | moritz: i'm afraid i'm pretty much missing the whole bigger picture; grokking the whole process from hitting enter to getting output is beyond me... :) | 21:16 | |
timotimo | that process is surprisingly easy to grasp once you know where you have to look | 21:17 | |
are you interested in a little guided tour? | |||
psch | give me 5 minutes :) | ||
timotimo | actually, the RaNIW course material also covers this rather well, i believe | ||
moritz | psch: have you looked at the slides from the "Rakudo and NQP internals workshop"? | 21:18 | |
timotimo | hm, does google docs multi-user stuff offer a good way to show someone slides and write comments all over the place? | ||
that may be worth trying out | |||
6guts.wordpress.com/2013/09/17/mate...ls-course/ ← | 21:19 | ||
moritz | also, docs/architecture.svg in rakudo | 21:20 | |
21:21
rurban1 joined
|
|||
psch | moritz: yes, i have, and it has helped, but it still lead me to misunderstandings like building a QAST::Statement that builds and throws an exception, instead of doing it how i sent the PR | 21:21 | |
in the optimizer that is, for my first PR which was solved much different | |||
s/much/very/ | |||
timotimo | docs.google.com/document/d/1yjduln...sp=sharing - check this out! :) | 21:22 | |
moritz | psch: well, in the end only practise makes you familiar enough with the codebase to avoid that | ||
timotimo | this way we can look at the slides and see each others cursors and have in-line comments | ||
unfortunately, the slides themselves are embedded as images rather than text | |||
so copy/paste is not an option | |||
er, actually, it's both slides *and* the text on the slides below it | 21:23 | ||
that's acceptable | |||
psch | moritz: that's what i thought, which i why i frequently resort to asking questions | 21:24 | |
moritz | psch: which is a good approach :-) | ||
psch | timotimo: alright, let's go through the slides together | 21:25 | |
timotimo | can you click the "speech bubble" icon on the top right, so it'll show you as signed in? | 21:26 | |
psch | oh, right | ||
let me get the link out of the vm | |||
timotimo | a really big portion of the slides is ... gone | 21:33 | |
we need to do this differently i'm afraid | 21:34 | ||
psch | edumentab.github.io/rakudo-and-nqp-...ls-course/ these is what i looked at a few times | ||
timotimo | that's the right one, aye | 21:35 | |
the first thing we may want to discuss is the "compile-time and runtime blur" on slide 12 | |||
since you mentioned a misunderstanding you had about creating a QAST tree to do error output | 21:36 | ||
psch | right | ||
well, it worked-ish in the optimizer, since optimize returns an ast itself | 21:37 | ||
timotimo | normally, you do QAST composition to compile something to your VM's native code to be executed later | ||
psch | but obviously "replace the whole tree with a shorter one that throws an exception" isn't really how optimizing works | ||
timotimo | no :) | ||
there is a legitimate use case for that exact thing, though | |||
21:37
FROGGS[mobile] left
|
|||
timotimo | when we in-line blocks into their caller's tree, we can't just say "this block has disappeared", since the serialization context keeps a reference to it and if we just delete it, at compile time it'll complain that the block has gone | 21:38 | |
so we replace it with a block that nqp::die's with "optimized-out code being run! something went terribly wrong!" | |||
anyway | |||
21:38
FROGGS[mobile] joined
|
|||
psch | okay | 21:38 | |
timotimo | in the case you were having, you wanted the compilation process to abort with an error, so that's why you throw an exception | 21:39 | |
interestingly, if you're doing an "eval", the exception is thrown from NQP code and lands in perl6-level code | |||
well, it's not really an amazing thing, it's necessary even; you call lots of nqp-implemented stuff from perl6 code at some point and the exceptions should be able to freely pass the barrier between nqp-land and perl6-land | 21:40 | ||
the big difference between nqp and perl6 at the QAST level really is just what subs and operators you call | |||
psch | right | 21:41 | |
diakopter | well args are bundled and unbundled differently | ||
timotimo | do you have an overview over what slide 14 shows? | ||
21:41
denis_boyun joined,
btyler joined
|
|||
timotimo | diakopter: that's right, but that's just calling into a different binder :P | 21:41 | |
psch | i'm really not seeing how "eval" is special in the above example, because in the end the optimizer also build an exception in nqp code, which can be caught... oh but it can only be caught if it's in an eval because otherwise compilation doesnt finish | 21:42 | |
sergot | How to call inherited new() and then assign values to not inherited fields? | ||
timotimo | er .. | ||
psch | timotimo: "passing to perl6-land" means "can be interacted with in perl6 code", right? | ||
timotimo | yeah | 21:43 | |
psch | timotimo: and the optimizer build a perl6 exception with nqp code, with find_symbol and whatnot | ||
21:43
jeffreykegler left
|
|||
psch | so what makes eval special in the example is letting us put the whole compilation process into the runtime | 21:43 | |
which lets much (everything?) nqp be handles on a perl6 level | 21:44 | ||
*handled | |||
timotimo | i ... guess? | ||
psch | should this have been obvious or is it a weird way of looking at it..? | 21:45 | |
diakopter | well have you used eval before in other languages? | ||
timotimo | well, really the special thing about the perl6 exception is that the code you're writing is NQP and you're instantiating a perl6 class | 21:46 | |
psch | diakopter: of course, but i have never looked at any other languages internals, or actually thought about how the translation happens | ||
diakopter | oh | ||
21:46
araujo left
|
|||
timotimo | which is why you have to do the find_symbol thing; you're traversing the "world" of the program you've been compiling (or the context of the stuff you're compiling in, in case of a run-time eval) | 21:46 | |
it also means that you can lexically override exception classes that the compiler will create at compile-time, which is pretty crazy/scary | 21:47 | ||
diakopter | bo | ||
no | |||
timotimo | it does not? | ||
diakopter | only js has lexical eval and nobody uses it because its so pessimizing | 21:48 | |
psch | intuitively i'd think there's a difference between "looking through world" and "changing world" | ||
timotimo | diakopter: i think you may have misunderstood what i meant | ||
moritz | hey, hey, I changed the World today... | ||
timotimo | i mean class X::AdHoc { ... some crazy stuff ... }; eval 'some code that creates an X::AdHoc'; | ||
diakopter | yeah | 21:49 | |
timotimo | i shouldn't say "create". i should have said "instantiates" | ||
21:50
daniel-s_ left
|
|||
diakopter | r: class A { BEGIN EVAL 'say A' } | 21:51 | |
camelia | rakudo-moar 535d91: OUTPUT«===SORRY!===Cannot invoke null object» | ||
..rakudo-parrot 535d91, rakudo-jvm 535d91: OUTPUT«===SORRY!===No such method 'gist' for invocant of type 'A'» | |||
21:51
arnsholt left
|
|||
diakopter | r: class A { BEGIN EVAL 'print A' } | 21:51 | |
camelia | rakudo-parrot 535d91: OUTPUT«===SORRY!===Nominal type check failed for parameter '$got'; expected Any but got A instead» | ||
..rakudo-moar 535d91: OUTPUT«===SORRY!===Cannot invoke null object» | |||
..rakudo-jvm 535d91: OUTPUT«===SORRY!===Nominal type check failed for parameter '$got'» | |||
21:51
arnsholt joined
|
|||
diakopter | O_O | 21:52 | |
21:52
Guest91810 left
|
|||
diakopter | r: class A { EVAL 'print A' } | 21:52 | |
camelia | rakudo-parrot 535d91: OUTPUT«use of uninitialized value of type A in string context in block at eval_0:1» | ||
..rakudo-jvm 535d91, rakudo-moar 535d91: OUTPUT«use of uninitialized value of type A in string context» | |||
21:52
denis_boyun left
|
|||
diakopter | r: class A {}; EVAL 'print A' | 21:53 | |
camelia | rakudo-parrot 535d91: OUTPUT«use of uninitialized value of type A in string context in block at eval_0:1» | ||
..rakudo-jvm 535d91, rakudo-moar 535d91: OUTPUT«use of uninitialized value of type A in string context» | |||
diakopter | r: class A {}; BEGIN EVAL 'print A' | 21:54 | |
camelia | rakudo-parrot 535d91: OUTPUT«use of uninitialized value of type A in string context in block at eval_0:1» | ||
..rakudo-jvm 535d91, rakudo-moar 535d91: OUTPUT«use of uninitialized value of type A in string context» | |||
diakopter | *shrug* | ||
21:54
rurban1 left
|
|||
timotimo | that makes sense, though, doesn't it? | 21:55 | |
r: class A {}; BEGIN EVAL 'print A.new' | |||
camelia | rakudo-moar 535d91: OUTPUT«A<140001956467000>» | ||
..rakudo-jvm 535d91: OUTPUT«A<851990465>» | |||
..rakudo-parrot 535d91: OUTPUT«A<5562644992239816926>» | |||
diakopter | hahahhahahahahhahahahahahahahahaha | ||
timotimo | … | 21:56 | |
diakopter | I mean.. | ||
no the surprising one is the first try above | 21:58 | ||
timotimo | you mean the null object invocation? | 21:59 | |
diakopter | yeah | ||
timotimo | ah well. | 22:00 | |
diakopter | also "expected Any but got A instead" | ||
timotimo | perl6 isn't ready for production yet, obviously. | ||
i suppose it got executed before it was composed | |||
psch | timotimo: my understanding of the items on slide 14 goes about as far as they are described there. as in, they're pretty black-boxy concepts | 22:05 | |
to be honest i'd rather postpone this though, i'm getting rather tired | 22:06 | ||
lue | Heh, I'm trying to do rosettacode.org/wiki/I_before_E_except_after_C, and I just discovered why some of my numbers are off: the given wordlist has meier and weierstrass :) | 22:07 | |
diakopter | heh perl. www.windytan.com/2014/02/mystery-si...opter.html | ||
22:07
FROGGS joined,
FROGGS[mobile] left
|
|||
timotimo | psch: no worries :) | 22:12 | |
22:13
FROGGS left
|
|||
psch | i'm off then, g'night #perl6 o/ | 22:13 | |
timotimo | gnite! | 22:14 | |
raydiak | good night | ||
timotimo | i just had my hand off one key on the right side and wrote fride instead m) | ||
friede sei mit dir, mein freund! | |||
22:14
psch left
22:27
bjz_ joined,
bjz left
22:31
denis_boyun joined
|
|||
dalek | kudo-star-daily: a5a9a18 | coke++ | log/ (5 files): today (automated commit) |
22:32 | |
rl6-roast-data: a21f187 | coke++ | / (6 files): today (automated commit) |
|||
22:33
raiph left
22:36
FROGGS joined
22:37
colomon left,
denis_boyun left,
colomon joined
22:38
berekuk left
|
|||
[Coke] | all R* tests passed. \o/ | 22:48 | |
lue | \o/ | 22:51 | |
timotimo | \o/ | 22:52 | |
dalek | ast: 8ade4d7 | timo++ | S14-roles/parameterized-type.t: bump the plan for S14-roles/parameterized-type.t |
22:55 | |
22:55
rurban1 joined
22:59
japhb_ left,
japhb left
23:05
spider-mario left
23:06
japhb_ joined
23:07
thou left,
arnsholt left
23:08
japhb joined,
kaare_ joined
23:09
arnsholt joined
23:11
woolfy joined
23:13
arnsholt left
23:14
araujo joined
23:15
arnsholt joined
23:21
arnsholt left
23:29
denisboyun joined
23:32
beastd left
23:36
arnsholt joined
23:37
tgt left
23:39
mberends left
23:40
tgt joined
23:49
dmol left
23:51
tgt left
23:56
xenoterracide joined
23:58
krunen left
|