»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_log/perl6 | UTF-8 is our friend! 🦋 Set by Zoffix on 25 July 2018. |
|||
00:06
Kaiepi joined
00:07
Manifest0 left
00:09
eseyman left
00:11
xiaoyafeng left
00:12
Manifest0 joined
00:18
eseyman joined
00:20
Sgeo left
00:22
zacts joined
00:28
zacts left
00:30
zacts joined
00:34
sivoais left,
sivoais joined
00:35
Manifest0 left
00:39
zacts left
00:40
Manifest0 joined
00:45
Sgeo joined
00:49
Manifest0 left
00:55
Manifest0 joined
01:00
zacts joined
01:02
Manifest0 left
01:04
zacts left
01:07
Manifest0 joined
01:26
aborazmeh left
01:27
Manifest0 left
01:33
Manifest0 joined
01:40
qiqi joined
01:48
Manifest0 left
01:52
molaf left
01:53
Manifest0 joined
01:54
noisegul_ joined
01:57
noisegul left
02:03
Manifest0 left
02:04
molaf joined
02:05
Sgeo_ joined
02:07
Manifest0 joined
02:08
Sgeo left
02:19
Manifest0 left
02:24
Manifest0 joined
02:26
squashable6 left
02:29
kst joined
02:30
squashable6 joined,
ChanServ sets mode: +v squashable6
02:31
Manifest0 left
02:38
Manifest0 joined
02:53
Manifest0 left
02:58
Manifest0 joined
03:04
Manifest0 left
03:09
epony left,
Manifest0 joined
|
|||
AndroidKitKat | Is there a more graceful way to "pop" an item from the front of an array other than to delete[0] | 03:16 | |
I'm used to Python lists where a .pop() removes an item from the front so if you had list = [1, 2, 3] and did num = list.pop() | 03:17 | ||
you would get 1 | |||
MasterDuke | AndroidKitKat: that's `shift` in perl (5|6) | 03:19 | |
AndroidKitKat | Thanks! | ||
MasterDuke | np | ||
AndroidKitKat | I was looking through the docs for that, appreciate it | ||
I must've failed reading comprehension lmao | 03:20 | ||
MasterDuke | hm, wonder if the docs for `pop` should mention `shift`... | 03:21 | |
03:23
xiaoyafeng joined
03:25
Manifest0 left
03:30
Manifest0 joined
03:34
Manifest0 left
|
|||
cpan-p6 | New module released to CPAN! FileSystem::Parent (0.2.1) by 03LEMBARK | 03:35 | |
03:37
xiaoyafeng left
03:40
Manifest0 joined
03:43
epony joined
03:44
mowcat left
03:50
Manifest0 left
03:54
Manifest0 joined
03:59
Manifest0 left
04:05
Manifest0 joined
04:06
grayrider joined
04:18
cpan-p6 left
04:20
cpan-p6 joined,
cpan-p6 left,
cpan-p6 joined
04:24
Actualey` left
04:29
Manifest0 left
04:37
Manifest0 joined
04:49
ayerhart joined
04:50
curan joined
04:59
qiqi left
|
|||
holyghost | I'm off to my kids | 05:09 | |
05:09
holyghost left
|
|||
Geth | doc: Elronnd++ created pull request #2795: Replace "two's complement" with "logical negation" to better reflect the meaning and usage of the operator |
05:12 | |
Elronnd | Arghh | 05:15 | |
why does it say logical negation | |||
05:17
sauvin joined
05:22
ufobat__ left
05:23
feldspath joined
|
|||
Voldenet | bitwise negation may be technically incorrect when the two's complement doesn't match bitwise negation of the number | 05:28 | |
05:28
qiqi joined,
Manifest0 left
|
|||
Elronnd | is what it's doing not bitwise negation? | 05:30 | |
Voldenet | I'm not sure how is "163**251" stored or if it's even specified anywhere | 05:31 | |
bitwise negation implies that it flips the bits in given bytes | 05:32 | ||
Elronnd | ohh because width is ambiguous | 05:33 | |
Voldenet | indeed, and length is certainly not flipped | 05:34 | |
Elronnd | hah | ||
hmmm | |||
I just think that _the_ two's complement is an odd phrasing because there are any number of those | 05:35 | ||
Voldenet | docs.perl6.org/language/5to6-perlop does this right | ||
>use prefix +^ for bitwise integer negation. Assumes two's complement. | 05:36 | ||
05:36
Manifest0 joined
05:38
feldspath left
05:40
Woodi left
05:41
domidumont joined
05:44
molaf left
05:49
jmerelo joined
|
|||
jmerelo | squashable6: status | 05:49 | |
squashable6 | jmerelo, Next SQUASHathon in 13 days and ≈22 hours (2019-06-01 UTC-14⌁UTC+20). See github.com/rakudo/rakudo/wiki/Mont...Squash-Day | ||
05:51
Manifest0 left
|
|||
Geth | doc: a640eda155 | Elronnd++ | doc/Language/js-nutshell.pod6 Replace "two's complement" with "bitwise negation" to better reflect the meaning and usage of the operator |
05:54 | |
doc: a69bccb37d | (Juan Julián Merelo Guervós)++ (committed using GitHub Web editor) | doc/Language/js-nutshell.pod6 Merge pull request #2795 from Elronnd/master Replace "two's complement" with "bitwise negation" to better reflect the meaning and usage of the operator |
|||
synopsebot | Link: doc.perl6.org/language/js-nutshell | ||
05:56
Manifest0 joined
05:59
squashable6 left
06:00
Manifest0 left
|
|||
Elronnd | Has anyone used Terminal::Print? How can I move the cursor to a specific spot? | 06:02 | |
06:02
squashable6 joined,
ChanServ sets mode: +v squashable6
|
|||
jmerelo | Elronnd: not me, sorry... | 06:03 | |
Elronnd | it looks really nice but...no docs, compared with ncurses | ||
jmerelo | .seen japhb | 06:04 | |
yoleaux | I saw japhb 16 May 2019 17:58Z in #moarvm: <japhb> I love that algorithm. | ||
jmerelo | Elronnd: you can try and talk to him in that channel ^^^ | 06:05 | |
Elronnd | alright, I will take a look there | ||
thanks! | 06:06 | ||
jmerelo | Elronnd: sure. Good luck! | ||
Elronnd | err, here is here too :P | ||
06:06
Manifest0 joined
|
|||
Elronnd | japhb: do you know how I can move the cursor to a specific place with Terminal::Print? | 06:07 | |
06:11
feldspath joined
06:19
Manifest0 left
06:22
Woodi joined
06:24
ChoHag joined,
Manifest0 joined
06:31
feldspath left
06:35
feldspath joined
06:39
Manifest0 left
06:40
antoniogamiz joined
06:45
Manifest0 joined
06:48
jmerelo left
06:50
Manifest0 left
06:53
netrino joined,
feldspath left
06:55
Manifest0 joined
06:56
abraxxa joined
06:59
feldspath joined
07:07
ChoHag left
07:08
Manifest0 left,
robertle joined
07:10
lizmat joined
07:14
Manifest0 joined,
feldspath left,
feldspath joined
07:20
lizmat left,
Manifest0 left
07:21
ChoHag joined
07:23
feldspath_ joined,
woolfy left,
feldspath left
07:25
Manifest0 joined
|
|||
masak | morning, #perl6 | 07:28 | |
07:29
Actualeyes joined
07:30
Manifest0 left
|
|||
antoniogamiz | masak: o/ | 07:33 | |
mm is there an operator to compare lists despite the order of the elements? | |||
07:36
rindolf joined
07:37
Manifest0 joined
|
|||
masak | antoniogamiz: if multiplicity also doesn't matter, I'd throw the lists into Sets, and compare | 07:43 | |
antoniogamiz: otherwise, call .unique on both and compare | |||
07:43
Manifest0 left
|
|||
masak | hm, I wonder if one could write an `infix:<eqv>` multi with an `:under(&transform)` adverb... | 07:44 | |
07:45
feldspath_ left
|
|||
masak | m: multi infix:<eqv>($l, $r, :under(&transform)!) { transform($l) eqv transform($r) }; say([1, 2, 3] eqv [1, 3, 2] :under(*.unique)) | 07:46 | |
camelia | 5===SORRY!5=== Error while compiling <tmp> You can't adverb &infix:<eqv> at <tmp>:1 ------> 3[1, 2, 3] eqv [1, 3, 2] :under(*.unique)7⏏5) |
||
antoniogamiz | mmm ty masak :) | ||
masak | aww | ||
why can't I adverb &infix:<eqv>? it'd be so much fun! :) | |||
07:46
feldspath_ joined
|
|||
masak | I think I've hit this limitation before. can't adverb built-in operators | 07:46 | |
m: sub infix:<EQV>($l, $r, :under(&transform)!) { transform($l) eqv transform($r) }; say([1, 2, 3] EQV [1, 3, 2] :under(*.unique)) | 07:48 | ||
camelia | False | ||
masak | dunno why that one doesn't say `True`... | ||
(halp) | |||
having an operator like that would be genuinely useful -- not arguing for dumping it in CORE right now, but I'd sure like to be able to define it in my code | 07:49 | ||
07:49
Manifest0 joined
07:50
netrino left
07:51
dolmen joined
07:55
qiqi left
07:56
feldspath_ left,
Manifest0 left
08:01
Manifest0 joined
|
|||
tobs | m: sub infix:<EQV>($l, $r, :under(&transform)!) { transform($l) eqv transform($r) }; say([1, 2, 3] EQV [1, 3, 2] :under(*.sort)) | 08:02 | |
camelia | True | ||
08:02
antoniogamiz left
|
|||
tobs | masak: unique didn't do anything on those operands, you wanted to sort them | 08:02 | |
08:05
netrino joined
|
|||
masak | oh, right *facepalm* | 08:05 | |
masak can't even blame lack of coffee | 08:06 | ||
08:07
netrino_ joined
|
|||
masak | anyway, adverbs are underused (and mostly for good reason; they're dangerous/weird), but this is exactly what they're good for | 08:07 | |
08:09
feldspath_ joined
08:10
netrino left
08:12
nadim_ joined
08:16
reach_satori joined
08:18
ChoHag left
08:19
ChoHag joined
08:24
Manifest0 left
08:25
Ekho left,
zakharyas joined
08:26
qiqi joined,
pecastro joined
08:31
Manifest0 joined
08:37
Ekho joined
08:38
Manifest0 left
08:43
Manifest0 joined
08:56
Manifest0 left
08:59
aindilis left,
qiqi left
09:01
aindilis joined
09:02
Manifest0 joined
09:04
qiqi joined
|
|||
Geth | doc: lukasvalle++ created pull request #2796: document antipairs for Setty |
09:13 | |
09:13
SergiusUA joined
09:19
Manifest0 left
09:23
domidumont1 joined
09:24
Manifest0 joined
09:26
domidumont left,
aindilis left
09:27
aindilis joined
09:31
qiqi left
09:34
Cabanossi left
|
|||
Geth | doc: 5ddf5a7585 | lukasvalle++ | doc/Type/Setty.pod6 document antipairs for Setty |
09:35 | |
doc: af5b559f6a | lukasvalle++ | doc/Type/Setty.pod6 document antipairs for Setty,reorder in page |
|||
doc: a7c427895d | (Juan Julián Merelo Guervós)++ (committed using GitHub Web editor) | doc/Type/Setty.pod6 Merge pull request #2796 from lukasvalle/master document antipairs for Setty |
|||
synopsebot | Link: doc.perl6.org/type/Setty | ||
09:36
rgrau left
09:38
qiqi joined
09:45
Manifest0 left
09:47
Cabanossi joined
09:50
Manifest0 joined
09:59
Manifest0 left
10:04
Manifest0 joined
10:17
sena_kun joined
10:19
Sgeo_ left
10:20
Sgeo_ joined
10:26
klapperl left
|
|||
sena_kun | 6c: sub a { fail "One" }; try a.new; say $!.message | 10:28 | |
committable6 | sena_kun, ¦6c (37 commits): «One» | ||
10:33
klapperl joined,
Manifest0 left
10:38
Manifest0 joined
10:43
dolmen left,
Manifest0 left
10:49
Manifest0 joined
10:58
Manifest0 left
11:01
zakharyas left
11:03
Manifest0 joined
11:05
filthyjvmuser joined
|
|||
filthyjvmuser | hello | 11:05 | |
moritz | hi there. Nice nickname :D | 11:06 | |
filthyjvmuser | thanks, it's very related to the questions i'm going to ask really quick | ||
11:06
dolmen joined
|
|||
filthyjvmuser | can you use Java annotations on a Perl 6 function? and are there any documented examples of using Perl 6 to integrate within a more complicated Java framework? | 11:08 | |
specifically, i'd like to write plugins for this Minecraft server: www.spongepowered.org/ | |||
but i don't expect there to be any examples for that | 11:09 | ||
but maybe there's something for Spring or another more common Java framework | |||
timotimo | oh, interesting. i don't think we have something for that yet | ||
i.e. getting a function be annotated some specific way | |||
filthyjvmuser | got it | 11:10 | |
timotimo | would be a fascinating puzzle to figure out i'm sure | ||
you should be able to write a thin wrapper in java that just has the functions annotated with the annotations you need and they just call into perl6 code, though | 11:11 | ||
11:12
qiqi left
|
|||
filthyjvmuser | that's still way better than writing Java directly :-) | 11:12 | |
thanks for the advice | |||
timotimo | i hope it works! :) | ||
filthyjvmuser | me too! thanks again :-) | 11:13 | |
11:13
filthyjvmuser left
11:19
Manifest0 left
11:24
Manifest0 joined
11:29
SergiusUA left
11:30
SergiusUA joined
11:31
Manifest0 left
11:34
Cabanossi left
11:36
Manifest0 joined
11:47
Manifest0 left
11:48
Cabanossi joined
11:52
Manifest0 joined
|
|||
hahainternet | i see there's a couple of language server implementations on github, is there one that people prefer? | 12:14 | |
12:19
Manifest0 left
|
|||
Kaiepi | m: my Instant $b = now; (my @ = (1..100)) for 1..10_000; say now - $b | 12:20 | |
camelia | 0.118631 | ||
Kaiepi | m: my Instant $b = now; (my @foo; @foo.STORE: (1..100)) for 1..10_000; say now - $b | ||
camelia | 0.12148629 | ||
timotimo | m: my Instant $b = now; (my @foo; @foo.STORE: (1..100)) for 1..10_000; say now - $b | ||
camelia | 0.1338259 | ||
timotimo | oops | ||
m: my Instant $b = now; ((my @).STORE: (1..100)) for 1..10_000; say now - $b | |||
camelia | 0.116912 | ||
timotimo | watch out for noisy timings on camelia | 12:21 | |
12:22
Guest5089 joined
|
|||
Kaiepi | .STORE gets called on assignment to @ sigilled variables right? | 12:23 | |
timotimo | i believe so, yeah | ||
it might be .STORE directly or it might be nqp::p6store | |||
Kaiepi | nqp::p6store? | ||
timotimo | find it in src/vm/moar/Perl6/Ops.nqp | 12:24 | |
it's a bit more than just calling .STORE | |||
12:24
Manifest0 joined
|
|||
timotimo | first it checks if there is a container | 12:24 | |
if it's a container, it will nqp::assign instead | 12:25 | ||
Kaiepi | m: use nqp; my @foo; nqp::p6store(@foo, [1,2,3]); @foo | ||
camelia | WARNINGS for <tmp>: Useless use of @foo in sink context (line 1) |
||
Kaiepi | m: use nqp; my @foo; nqp::p6store(@foo, [1,2,3]); say @foo | ||
camelia | [1 2 3] | ||
Kaiepi | m: my Instant $b = now; nqp::p6store(my @, (1...*)) for 1..10_000; say now - $b | 12:26 | |
camelia | 5===SORRY!5=== Error while compiling <tmp> Could not find nqp::p6store, did you forget 'use nqp;' ? at <tmp>:1 ------> 3nt $b = now; nqp::p6store(my @, (1...*))7⏏5 for 1..10_000; say now - $b |
||
Kaiepi | m: use nqp; my Instant $b = now; nqp::p6store(my @, (1...*)) for 1..10_000; say now - $b | ||
camelia | 0.0973934 | ||
Kaiepi | m: use nqp; my Instant $b = now; ((my @).STORE: (1...*)) for 1..10_000; say now - $b | ||
camelia | 0.0988337 | ||
Kaiepi | m: use nqp; my Instant $b = now; nqp::p6store(my @, (1...*)) for 1..100_000; say now - $b | 12:27 | |
camelia | 0.6454862 | ||
Kaiepi | m: use nqp; my Instant $b = now; ((my @).STORE: (1...*)) for 1..100_000; say now - $b | ||
camelia | 0.6283517 | ||
Kaiepi | should bench my feed operator parallelization pullreq with nqp::p6store vs STORE method calls | ||
even though they look to be the same speed | 12:28 | ||
timotimo | yeah, i wouldn't expect a speed difference | ||
12:35
Manifest0 left
12:37
zakharyas joined
12:41
Manifest0 joined
12:47
Manifest0 left
|
|||
Kaiepi | timotimo, p6store is actually faster than the method call to STORE | 12:51 | |
timotimo | that's a little odd | 12:52 | |
12:54
Manifest0 joined
|
|||
Kaiepi | this is what i used to bench hastebin.com/azijorohis.pl | 12:54 | |
nqp::p6store's average is 3 seconds faster than the STORE method call | |||
's | |||
timotimo | oh | ||
try switching the two run-with-blah around | 12:55 | ||
also, you can drop the "gather" and "take" by just putting a "do" before the "for" | |||
12:58
abraxxa left
|
|||
timotimo | not very important, just an optimization opportunity | 13:01 | |
13:02
Manifest0 left
13:05
MasterDuke left
|
|||
Kaiepi | m: my class A { method a(--> Int) { 1 } }; my A $a .= new; say $a.('a') | 13:06 | |
camelia | No such method 'CALL-ME' for invocant of type 'A' in block <unit> at <tmp> line 1 |
||
Kaiepi | m: my class A { method a(--> Int) { 1 } }; my A $a .= new; say $a.'a' | ||
camelia | 5===SORRY!5=== Error while compiling <tmp> Quoted method name requires parenthesized arguments. If you meant to concatenate two strings, use '~'. at <tmp>:1 ------> 3Int) { 1 } }; my A $a .= new; say $a.'a'7⏏5<EOL> |
||
Kaiepi | m: my class A { method a(--> Int) { 1 } }; my A $a .= new; say $a.('A::a') | 13:07 | |
camelia | No such method 'CALL-ME' for invocant of type 'A' in block <unit> at <tmp> line 1 |
||
Kaiepi | m: my class A { method a(--> Int) { 1 } }; my A $a .= new; say $a.A::{'a'} | ||
camelia | No such method 'A' for invocant of type 'A'. Did you mean 'a'? in block <unit> at <tmp> line 1 |
||
Kaiepi | m: my class A { method a(--> Int) { 1 } }; my A $a .= new; say $a.{'a'} | ||
camelia | Type A does not support associative indexing. in block <unit> at <tmp> line 1 |
||
Kaiepi | m: my class A { method a(--> Int) { 1 } }; my A $a .= new; say $a.::{'a'} | ||
camelia | 5===SORRY!5=== Error while compiling <tmp> Malformed class-qualified postfix call at <tmp>:1 ------> 3-> Int) { 1 } }; my A $a .= new; say $a.7⏏5::{'a'} expecting any of: dotty method or postfix postfix |
||
Kaiepi | m: my class A { method a(--> Int) { 1 } }; my A $a .= new; say $a.A::<a> | 13:08 | |
camelia | No such method 'A' for invocant of type 'A'. Did you mean 'a'? in block <unit> at <tmp> line 1 |
||
Kaiepi | m: my class A { method a(--> Int) { 1 } }; my A $a .= new; say $a.<a> | ||
camelia | Type A does not support associative indexing. in block <unit> at <tmp> line 1 |
||
Kaiepi | m: use nqp; my class A { method a(--> Int) { 1 } }; my A $a .= new; say nqp::callmethod(nqp::decont($a), 'a') | ||
camelia | 1 | ||
13:09
Manifest0 joined
|
|||
Kaiepi | m: my class A { method a(--> Int) { 1 } }; my A $a .= new; say $a.^lookup('a')($a) | 13:15 | |
camelia | 1 | ||
Kaiepi | surely there's a better way to call a method given a method name as a string | 13:16 | |
jnthn | $a."$the-string"() | ||
13:17
Manifest0 left
13:25
Manifest0 joined
13:29
curan left,
jeromelanteri joined
13:30
kurahaupo_ joined
13:32
SergiusUA left
13:33
kurahaupo left
13:34
skids joined
13:43
SergiusUA joined
13:45
SergiusUA left,
SergiusUA joined
13:57
Manifest0 left
14:02
Manifest0 joined
14:04
jelkner joined
14:11
Manifest0 left,
aborazmeh joined,
aborazmeh left,
aborazmeh joined
14:14
nadim_ left
|
|||
Geth | doc: lukasvalle++ created pull request #2797: add .map, .flat, .concise, and .summary for Backtrace |
14:15 | |
14:16
Manifest0 joined
14:21
zacts joined
14:23
Manifest0 left
14:28
Manifest0 joined
14:30
domidumont joined
|
|||
Geth | doc: 3b6c405aa7 | Coke++ | doc/Language/control.pod6 fix typo |
14:32 | |
synopsebot | Link: doc.perl6.org/language/control | ||
14:32
zacts left
14:33
domidumont1 left,
pmurias joined
|
|||
pmurias | . | 14:33 | |
14:36
zacts joined
14:37
mornfall joined,
lizmat joined
14:39
dolmen left
14:40
lizmat_ joined
14:43
powerbit left,
dolmen joined,
lizmat left
14:47
lizmat_ left
14:48
quipa joined
14:49
robertle left
14:55
Guest1336 left
14:56
aborazmeh left
15:06
feldspath_ left
15:11
Manifest0 left
15:15
sauvin left
15:16
Manifest0 joined
15:18
ravenousmoose_ joined
15:19
MilkmanDan left
15:20
MilkmanDan joined
15:23
domidumont left
15:27
sauvin joined
15:31
sauvin left
15:32
sauvin joined
15:35
sauvin left
15:40
zacts left
15:45
reach_satori left
15:47
jmerelo joined
|
|||
jmerelo | releasable6: status | 15:48 | |
releasable6 | jmerelo, Next release in ≈34 days and ≈3 hours. 1 blocker. 140 out of 405 commits logged (⚠ 2 warnings) | ||
jmerelo, Details: gist.github.com/8b1c52402183b1adfe...a8d05a09d3 | |||
15:53
sauvin joined
15:55
ravenousmoose_ left,
zakharyas left
16:02
Manifest0 left
16:07
Manifest0 joined
|
|||
El_Che | we had a release? | 16:12 | |
Geth | doc: f1e7907e66 | (JJ Merelo)++ | type-graph.txt VM not correctly included in type-graph.txt |
16:13 | |
16:14
ravenousmoose_ joined
|
|||
sena_kun | El_Che, we didn't, just the date was delayed to June | 16:15 | |
16:16
kurahaupo_ left,
kurahaupo joined
16:21
Manifest0 left
|
|||
Geth | doc: 8c2c9828a0 | (JJ Merelo)++ | doc/Type/Iterable.pod6 Reflow and check definition |
16:24 | |
doc: 7b9506cc08 | (JJ Merelo)++ | doc/Type/Test.pod6 Eliminates wrong preamble (for a method), closes #2799 |
|||
synopsebot | Link: doc.perl6.org/type/Iterable | ||
Link: doc.perl6.org/type/Test | |||
AndroidKitKat | I know this is a noob question, but I'm not sure why I can't do what I'm doing on line 21 gist.github.com/c5ce0d0e8d16994e5b...e177eee30a | ||
are members of an array not mutable? | 16:25 | ||
jnthn | No, scalar parameters to a block are immutable by default | ||
jmerelo | AndroidKitKat: that might be a list, not an array. lists are immutable | ||
jnthn | Use <-> instead of -> | ||
jmerelo | m: my @numbers; say @numbers.^name | ||
camelia | Array | ||
jnthn | Which will default to rw | ||
jmerelo | jnthn++ | 16:26 | |
AndroidKitKat | Thanks | ||
I'll probably have more questions later, I appreciate it | |||
jmerelo | AndroidKitKat: use this or StackOverflow (or both). You'll be very welcome. | ||
sena_kun: what was the problem with this release? | |||
sena_kun: there was only one blocker... | |||
sena_kun | jmerelo, no idea, ping kawaii | 16:27 | |
probably personal reasons | |||
16:27
lizmat joined
|
|||
jmerelo | sena_kun: OK. | 16:27 | |
El_Che | sena_kun: ah good, I thought I was out of the loop :) | ||
16:29
lizmat left
16:30
lizmat joined
16:31
Manifest0 joined
|
|||
namibj | Fuck, I just dropped my phone screen-first from like 120~130cm onto an i think basalt paving stone. | 16:32 | |
Screen works, touch works, glass is pretty shattered. | 16:33 | ||
Oh sorry, wrong chat ;) | |||
16:35
dolmen left
|
|||
AndroidKitKat | Sorry to hear about your phone though | 16:36 | |
jmerelo | AndroidKitKat: :-) | 16:37 | |
16:40
jeromelanteri left
|
|||
kurahaupo | jmerelo: have a break, have a … ? | 16:53 | |
16:53
pmurias left
16:55
robertle joined,
zacts joined
16:56
domidumont joined
|
|||
jmerelo | kurahaupo: :-) | 16:59 | |
17:00
feldspath_ joined
17:01
natrys joined,
reach_satori joined
17:04
feldspath joined
17:05
feldspath_ left
17:07
ravenousmoose joined
17:10
dolmen joined,
ravenousmoose_ left,
dolmen left,
feldspath left
|
|||
HarmtH | Is there a way to set a default value for a multi-dimensional hash? | 17:11 | |
jmerelo | HarmtH: as in, all values being the same? I don't think so. A multidimensional hash is a hash of hashes... So I don't see how you could do that. But I might be wrong. | 17:12 | |
HarmtH: why do you want to do that? | 17:13 | ||
17:13
domidumont left,
reach_satori left,
reach_satori joined
|
|||
HarmtH | In my particular case? A programming puzzle. Have a 2-dimensional grid for which I would like a default value. | 17:13 | |
17:13
ravenousmoose left
|
|||
jmerelo | HarmtH: wouldn't a multidimensional array be better? | 17:14 | |
17:14
ravenousmoose joined
17:15
zacts left,
reach_satori left,
reach_satori joined
|
|||
HarmtH | Sometimes | 17:15 | |
But sometimes the array is sparse, or you'd like to use negative indices | 17:17 | ||
17:17
reach_satori_ joined,
a3f left
17:18
spaceotter joined,
reach_satori left
17:19
satori__ joined
|
|||
jmerelo | lizmat has published this: modules.perl6.org/dist/Array::Spar...:ELIZABETH Maybe it can be useful. | 17:21 | |
spaceotter | Hey guys I have a small issuse with the repl. If I type characters like üöä§ and want to delete them i get a wired questionmark :o | ||
17:22
reach_satori_ left,
satori__ left
17:23
satori__ joined
|
|||
SyrupThinker | HarmtH: Is the // operator viable for your usecase? | 17:24 | |
HarmtH | SyrupThinker: Mostly, yes | ||
SyrupThinker: But a default value is more elegant imho | |||
jmerelo | spaceotter: yep, that will happen in most consoles. I use the emacs console for that reason. | 17:25 | |
17:25
a3f joined
17:26
satori__ left
|
|||
b2gills | spaceotter: You could just keep hitting backspace until the question marks disappear. Or you could use `rlwrap` or I think the readline binding fixes that. (I use `$ rlwrap perl6` when I use the REPL.) | 17:29 | |
17:29
reach_satori joined
|
|||
spaceotter | Oh, good to know. Thank you guys :) | 17:30 | |
17:30
molaf joined,
reach_satori_ joined
17:33
rindolf left,
reach_satori left,
molaf left
17:34
molaf joined
17:35
rindolf joined
|
|||
Geth | doc: 7bc42b8329 | (JJ Merelo)++ | doc/Language/exceptions.pod6 Reflow and some clarifications |
17:40 | |
synopsebot | Link: doc.perl6.org/language/exceptions | ||
jmerelo | Anyone can help with this? stackoverflow.com/questions/561906...ng-or-file | ||
17:41
reach_satori joined,
lala_ joined,
reach_satori_ left,
lala_ left
|
|||
timotimo | jmerelo: i think you have to set the :target to "syntaxcheck" in EVAL | 17:44 | |
what do you mean "safe", though? | |||
17:45
reach_satori left,
pmurias joined
|
|||
timotimo | because syntaxcheck will also cause some code to run | 17:49 | |
17:50
zakharyas joined
|
|||
ugexe | gist.github.com/ugexe/b3de0a3a78290061f116 :facemelt: | 17:50 | |
ah that doesn't take a string though | 17:51 | ||
jmerelo | timotimo: mainly not gobbling up a lot of memory like it happened here github.com/perl6/doc/issues/2764# | 17:55 | |
ugexe: right. It will maybe be a bit faster than perl6 -c, but I think the slowest part is creating the file and calling that on it. | 17:56 | ||
timotimo: and I'm not sure that's documented... | 17:58 | ||
timotimo | huh, really? | ||
18:00
quipa left
|
|||
jmerelo | timotimo: where's that :target defined? github.com/rakudo/rakudo/blob/1ec4...gnCode.pm6 | 18:01 | |
tobs | m: use nqp; say so try { nqp::getcomp('perl6').compile($_) } for 'my $s = π', 'my $s = π-' | ||
camelia | True False |
||
jmerelo | tobs: hey, that's cool... | ||
tobs | that's what I managed to read, but if there's an option to EVAL that'd be much less nqp-y | ||
timotimo | it's part of %n | ||
but apparently it calls compiler.compile without passing that | 18:02 | ||
jmerelo | timotimo: so you say it's not really working? | ||
timotimo | so actually there doesn't appear to be a way to reach it with the official EVAL sub | ||
jmerelo | timotimo: %n is not used actually there... | ||
timotimo: that a bug? | 18:03 | ||
timotimo | not sure | ||
ugexe | I'm not sure if you'd want to reuse the same compiler object | ||
tobs | good point | 18:04 | |
timotimo | yaeh, with nqp::getcomp you can get at everything the compiler offers | ||
i think the compiler objects we currently have don't store any state that changes just because of compilation | |||
so re-using it should be fine | |||
on the other hand, the objects are so lightweight that making a new one should have barely any cost to it | 18:05 | ||
ugexe | i was thinking if you have 2 unrelated files, that both do something like change the grammar, which are both compiled with the same object | ||
timotimo | ah, no i believe the grammar, actions, and world object are built inside the compile method and not shared | 18:06 | |
and changes to the grammar like with slangs and such are lexically scoped, which means we make copies and revert later as well | 18:07 | ||
jmerelo | oh wow | ||
that's fast | |||
tobs++ | |||
tobs | glad I could contribute a bit to my own issue :p | 18:08 | |
timotimo | \o/ | ||
18:12
vrurg left
|
|||
jmerelo | tobs: :-) | 18:12 | |
18:13
vrurg joined,
dotdotdot joined
|
|||
ugexe | fwiw you dont need to call .compile if you are just interested if it will .parse | 18:16 | |
jmerelo | tobs: it's not failing for errors, however, I don't know why... | ||
18:16
elmer667 joined
18:18
espadrine_ joined
|
|||
jmerelo | ugexe: thanks. But it's not failing, for some reason | 18:18 | |
20:01:11 tobs | m: use nqp; say so try { nqp::getcomp('perl6').compile($_) } for 'my $s = π', 'my $s = π-' │+squashable6 | 18:19 | ||
m: use nqp; say so try { nqp::getcomp('perl6').parse($_) } for 'bad code', 'my $s = π-' | |||
camelia | False False |
||
timotimo | m: say bad code | 18:22 | |
camelia | 5===SORRY!5=== Error while compiling <tmp> Undeclared routines: bad used at line 1. Did you mean 'bag'? code used at line 1 |
||
ugexe | fwiw probably need a `my $*LINEPOSCACHE;` | ||
jmerelo | m: use nqp; say so try { nqp::getcomp('perl6').parse($_) } for '2+3', 'my $s = π-' | 18:23 | |
camelia | 1 False |
||
jmerelo | m: use nqp; say so try { nqp::getcomp('perl6').parse($_) } for 'bad code', 'my $s = π-' | ||
camelia | False False |
||
tobs | that seems to work, or am I missing something? | ||
18:24
sauvin left
|
|||
ugexe | m: use nqp; say nqp::getcomp("perl6").parse($_).so for q|bad code|, q|my $s = π| | 18:24 | |
camelia | Dynamic variable '$*LINEPOSCACHE' not found |
||
ugexe | m: use nqp; my $*LINEPOSCACHE; say nqp::getcomp("perl6").parse($_).so for q|bad code|, q|my $s = π| | 18:25 | |
camelia | 5===SORRY!5=== Error while compiling <tmp> Undeclared routines: bad used at line 1. Did you mean 'bag'? code used at line 1 |
||
tobs | ahh, I think .compile took care of setting that up, which is why it worked initially | 18:26 | |
ugexe | well you used try, which i removed | ||
tobs | m: use nqp; say so nqp::getcomp('perl6').compile($_) for 'my $s = π' | ||
camelia | True | ||
tobs | m: use nqp; say so nqp::getcomp('perl6').parse($_) for 'my $s = π' | 18:27 | |
camelia | 1 | ||
ugexe | the LINEPOSCACHE is probably for reporting the error | ||
tobs | I see, that makes sense | ||
18:28
CepriN joined
|
|||
jmerelo | ugexe: parse is faster and does not produce warnings, which were not caught by the redirected $*ERR since they were produced in NQP | 18:29 | |
ugexe: it's producing an error in "<anon|4047>::Metamodel::MethodContainer is not composable, so <anon|4071>::Metamodel::ParametricRoleHOW cannot compose it | 18:30 | ||
I remember I fixed that somehow... That error was produced before with EVAL too. | |||
18:31
SergiusUA left,
espadrine_ left
|
|||
jmerelo | m: use nqp; say so nqp::getcomp('perl6').parse($_) for 'my $s = πp' | 18:32 | |
camelia | Dynamic variable '$*LINEPOSCACHE' not found |
||
jmerelo | m: use nqp; my $*LINEPOSCACHE; say so nqp::getcomp('perl6').parse($_) for 'my $s = πp' | 18:33 | |
camelia | 5===SORRY!5=== Error while compiling <tmp> Undeclared routine: πp used at line 1 |
||
jmerelo | right | ||
we need the try anyway to avoid that. | |||
18:38
Manifest0 left
|
|||
Geth | doc: d51503be0d | (JJ Merelo)++ | 2 files Using low-level parse to speed up things Thanks to @ugexe and @taboege for hints on how to make this. I've checked memory, and it's actually taking quite a bit of memory, but not as much as EVAL and it's actually faster than that. It's also producing a false positive with `class ... (6 more lines) |
18:38 | |
jmerelo | ugexe , taboege: you might want to answer it in StackOverflow. Thanks a lot. | 18:39 | |
tobs | m: use nqp; say so try nqp::getcomp('perl6').parse('class Metamodel::ParametricRoleHOW {}') | 18:41 | |
camelia | False | ||
tobs | m: use nqp; my $*LINEPOSCACHE; say so try nqp::getcomp('perl6').parse('class Metamodel::ParametricRoleHOW') | 18:42 | |
camelia | False | ||
tobs | m: use nqp; my $*LINEPOSCACHE; say so try nqp::getcomp('perl6').parse('class Metamodel::ParametricRoleHOW {}') | ||
camelia | 1 | ||
tobs | I don't know why it's 1 under `so` and why it again needs LINEPOSCACHE but there's a difference at least. | 18:43 | |
18:43
Manifest0 joined
|
|||
tobs | jmerelo: I might be able to fix that, having touched the heuristic that adds empty blocks after things to make them compile last squasthon | 18:45 | |
jmerelo | tobs: that would be nice. I don't know why it happens, and precisely in that class. There are others like it | 18:53 | |
Geth | doc: taboege++ created pull request #2803: Point out difference between finite and infinite Range subscripts |
18:55 | |
doc: 68fbdb7d40 | (Tobias Boege)++ | doc/Language/list.pod6 Point out difference between finite and infinite Range subscripts |
18:56 | ||
doc: d8b0b50613 | (Juan Julián Merelo Guervós)++ (committed using GitHub Web editor) | doc/Language/list.pod6 Merge pull request #2803 from taboege/subscript-range-whatever Point out difference between finite and infinite Range subscripts |
|||
synopsebot | Link: doc.perl6.org/language/list | ||
jmerelo | tobs: but you have privs, right? | ||
tobs | oh, then I'm not sure I understand what's going on, but will investigate… | ||
18:56
zakharyas left
|
|||
tobs | jmerelo: do I? I'm "in the perl6 organization", but I'm not sure what it entails to be honest | 18:57 | |
(maybe whoever invited me placed too much trust in me) | |||
jmerelo | tobs: it entails a great honor and a great responsability :-) | ||
tobs: but that includes perl6/doc, too. I'm happy to review your PRs if you're not sure, of course. | 18:58 | ||
(but I'll also review most commits anyhow, so... ) | |||
18:58
jmerelo left
|
|||
tobs | .tell jmerelo good, will read up and keep that in mind for easy changes | 18:59 | |
yoleaux | tobs: I'll pass your message to jmerelo. | ||
19:04
CepriN left
19:10
Manifest0 left
19:12
spaceotter left
19:18
jelkner left,
Manifest0 joined
|
|||
tobs | .tell jmerelo huh, the only mention of that class is in Type/Metamodel/ParametricRoleHOW.pod6 and that tested successfully 10 times in a row for me just now. Is it maybe flapping for you? | 19:19 | |
yoleaux | tobs: I'll pass your message to jmerelo. | ||
19:22
molaf left
19:29
Manifest0 left
19:31
lizmat left
19:32
lizmat joined
19:35
Manifest0 joined
19:36
lizmat left
19:38
reach_satori joined
|
|||
ugexe | timotimo: wouldn't augments live across compiler objects? | 19:41 | |
er, across compiles from the same compiler object | 19:42 | ||
class Foo { }; EVAL(q|use MONKEY-TYPING; augment class Foo { method bar { say 42 } }|); Foo.bar | 19:43 | ||
evalable6 | 42 | ||
ugexe | that also shows a problem with using EVAL | ||
so if you have two unrelated modules and one augments a core class, the second module will not have the expected class | 19:44 | ||
m: use nqp; my $*LINEPOSCACHE; nqp::getcomp("perl6").compile(q|use MONKEY-TYPING; augment class Int { method bar { die 42 } }|); nqp::getcomp("perl6").compile(q|BEGIN say Int.bar|); | 19:47 | ||
camelia | 5===SORRY!5=== Error while compiling <tmp> An exception occurred while evaluating a BEGIN at <tmp>:1 Exception details: 42 in method bar at <tmp> line 1 in code at <tmp> line 1 |
||
ugexe | ^ | ||
similar if calling .parse | 19:49 | ||
when instead i think what is expected is an error about method bar not existing on Int | |||
well, what is expected of a solution to the earlier problem rather | 19:50 | ||
19:53
cpan-p6 left
19:54
elmer667 left
|
|||
ugexe | creating a new compiler object doesn't change the outcome though... | 19:58 | |
m: use nqp; use Perl6::Grammar:from<NQP>; use Perl6::Actions:from<NQP>; use Perl6::Compiler:from<NQP>; my $*LINEPOSCACHE; | |||
camelia | ( no output ) | ||
ugexe | sub compiler() { my $c = Perl6::Compiler.new; $c.parseactions(Perl6::Actions.new); $c.parsegrammar(Perl6::Grammar.new); $c }; my $c1 = compiler(); my $c2 = compiler(); $c1.compile(q|use MONKEY-TYPING; augment class Int { method bar { die 42 } }|); $c2.compile(q|BEGIN say Int.bar|); | ||
timotimo | ugexe: ouch :) | 20:02 | |
20:02
HoloIRCUser joined
20:03
HoloIRCUser is now known as zzzzzzzzz,
cpan-p6 joined,
cpan-p6 left,
cpan-p6 joined,
zzzzzzzzz is now known as Guest62255
|
|||
tobs | hmm, could I change &ok to always succeed that way? | 20:05 | |
timotimo | you could .wrap it | 20:06 | |
ugexe | and if it was a class it would require supercedes instead of augments | ||
20:06
Guest62255 left
20:09
zacts joined
20:15
Manifest0 left
20:17
xinming_ joined
20:19
xinming left
20:22
Manifest0 joined
20:23
espadrine_ joined
20:25
zacts left
20:27
pmurias left
20:37
reach_satori_ joined
|
|||
Geth | doc/master: 5 commits pushed by lukasvalle++, Altai-man++ | 20:39 | |
20:40
reach_satori left
20:56
dolmen joined
20:57
ravenousmoose left
|
|||
Geth | doc/note-start-special-vars: 9025ba0559 | Altai-man++ | doc/Language/control.pod6 Explain $! and $/ in start block |
21:02 | |
doc: Altai-man++ created pull request #2804: Explain $! and $/ in start block |
|||
21:03
skids left
|
|||
sena_kun | 6c: my $a = anon sub foo {}; my $b = anon sub bar {} | 21:04 | |
committable6 | sena_kun, ¦6c (37 commits): «» | ||
sena_kun | 6c: my $a = anon sub foo {}; my $b = anon sub foo {} | ||
committable6 | sena_kun, ¦6c (37 commits): «» | ||
21:06
zacts joined
21:07
Sgeo_ left,
Sgeo_ joined
21:16
natrys left
|
|||
sena_kun | 6c: say (1, 2, 3).Seq eqv (1, 2, 3) | 21:18 | |
committable6 | sena_kun, gist.github.com/2e8260c96c6cd73380...98a81d0bf3 | 21:19 | |
21:20
molaf joined
|
|||
sena_kun | 6c: Num.new(5).WHAT.say | 21:23 | |
committable6 | sena_kun, ¦6c (37 commits): «(Num)» | ||
sena_kun | 6c: say Nil.chrs; | 21:24 | |
committable6 | sena_kun, gist.github.com/0e9e83fbbd5f32d98e...eb68ea2875 | ||
sena_kun | 6c: say Hash<foo>:delete; | 21:26 | |
committable6 | sena_kun, gist.github.com/faf21ad658eb570275...4ad153146b | ||
21:30
zacts left
|
|||
Geth | doc/add-cando-example: b25e802cfe | Altai-man++ | doc/Type/Code.pod6 Add cando example with Block |
21:38 | |
cpan-p6 | New module released to CPAN! Font::FreeType (0.1.9) by 03WARRINGD | 21:40 | |
Geth | doc: Altai-man++ created pull request #2805: Add cando example with Block |
||
21:43
dolmen left
|
|||
Geth | doc/pair-pair-method: 1719332eec | Altai-man++ | doc/Type/Pair.pod6 Document Pair.Pair method |
21:45 | |
doc: Altai-man++ created pull request #2806: Document Pair.Pair method |
|||
21:48
|oLa| joined
21:49
|oLa| left
|
|||
Geth | doc/Enumeration-Int-method: 619fa6a1d3 | Altai-man++ | doc/Type/Enumeration.pod6 Document Enumeration.Int |
21:59 | |
doc: Altai-man++ created pull request #2807: Document Enumeration.Int |
22:00 | ||
22:05
adu joined
|
|||
sena_kun just loves it when theere are docs available | 22:09 | ||
22:12
rindolf left
22:16
zacts joined
22:17
netrino_ left
|
|||
Geth | doc/note-start-special-vars: 1124099187 | Altai-man++ | doc/Language/control.pod6 Clarify a sentence; jnthn++ |
22:17 | |
jnthn | sena_kun++ # working on docs | 22:18 | |
sena_kun | slightly easier than fixing rakudo bugs. :) | ||
sena_kun is still a bit sad about & && issue though | |||
22:20
MasterDuke joined,
MasterDuke left,
MasterDuke joined
|
|||
jnthn | sena_kun: haha... github.com/rakudo/rakudo/blob/mast....nqp#L5585 | 22:20 | |
22:20
rindolf joined
|
|||
jnthn | That's...suspect :) | 22:21 | |
A space matches \W | |||
That's why 'a' & 'a' is OK but a & a is not :P | |||
I bet if you tighten up that lookahead it'll be OK | |||
sena_kun | >a totally different bug location | 22:22 | |
www.youtube.com/watch?v=tXKTkZ8gyUA | |||
jnthn | Maybe try <+[\W]-[\s]> instead of the \W | ||
sena_kun | jnthn, thanks! | ||
jnthn | Though maybe <:punct> is better | ||
sena_kun | I'll try it out now... | ||
22:25
woolfy joined
|
|||
sena_kun | yay, the first fix works. running spectest... | 22:31 | |
jnthn | Cool; it might just have an impact on what's considered the declarative prefix, but I hope not an adverse one. | ||
(In theory it shouldn't, but iirc there's some small gremlins there...) | 22:32 | ||
sena_kun | do you recommend <:punct> over it? | 22:33 | |
22:36
rindolf left
22:37
zacts left
|
|||
jnthn | sena_kun: Yes, but I might have totally made it up :) | 22:40 | |
m: say '!.?:*' ~~ /<:punct>+/ | 22:42 | ||
camelia | 「!.?:*」 | ||
jnthn | Hm, seems workable | ||
May be a bit cheaper, and should be free of LTM concerns | 22:43 | ||
sena_kun is sad to kill spectest, so will keep it until the end to show respect | |||
jnthn | Hm, not sure we complete those <:uniprop> things in Comma yet. Another once for the wish list. :) | ||
*one | |||
sena_kun | Result: FAIL | 22:45 | |
oops | |||
t/spec/S05-mass/rx.rakudo.moar, no TAP plan found... trying out with <:punct> | 22:46 | ||
jnthn | Did it fix the bug despite the regression? :) | 22:51 | |
'cus if we so at least we know we're fixing the right place :) | |||
sena_kun | it did | ||
jnthn | I did a bigint opt today and failed precisely one spectest. It was an off-by-one. :) | 22:52 | |
(In my code) | |||
sena_kun | I also see tons of warnings like `Space is not significant here`, so I am rebuilding it with \W to check if they were there before... | ||
yes, warnings were there from the start | 22:53 | ||
jnthn | btw, for those here who don't follow MoarVM/Rakudo guts: factor of > 2 speedup on Rat math is coming. :) | 22:54 | |
sena_kun | jnthn, it means an opportunity to do some math grinding and not being too shy when folks ask e.g. "Do you have numpy here?"? | 22:55 | |
(yes, I know that numpy is based a lot on arrays, not just numbers, but it has plenty of math things included too) | 22:56 | ||
jnthn | Well, for that you probably want natives anyway | 22:57 | |
I did some opt on those recently, though there's certainly more to come :) | |||
timotimo | at some point i hope we can get 128bit floating points into moarvm :) | ||
sena_kun | isn't PEA based on lowering objects on heap into natives in registers? | 22:58 | |
(if you super-duper simplify it, just so I could get it a tiny bit) | |||
timotimo | that's the "scalar replacement" bit | 22:59 | |
PEA is the analysis that we do to figure out when that's possible, and when it has to be undone in the code for things to stay safe | |||
23:00
zacts joined
|
|||
timotimo | EA would let us do scalar replacement when objects that are created will never be seen again, but PEA will allow us to do scalar replacement in cases where the object has some secape routes, but they aren't too commonly used | 23:00 | |
sena_kun | well, I mean the "action" part, not the "deciding" part. | ||
jnthn | sena_kun: What timotimo said, but: yes, it's true that for Num it is a pretty much "straight" unbox, and once we get good at that then for scalars `num` vs `Num` will matter a bit less. BUT, with arrays, there's still quite a significant difference in storage size, and thus in cache efficiency. | 23:01 | |
sena_kun | so the test case is fixed, but gist.github.com/Altai-man/0ced0c83...8e78bdd04e | ||
jnthn | Int vs. int is far less clear-cut because that's not a straight unboxing | ||
sena_kun | are .rakudo.moar files generated from .t ones or not? | 23:02 | |
jnthn | Since Int is auto-upgrade to big integer | ||
sena_kun | seems like the answer is "yes" | ||
jnthn | And so we need upgrade checks in the JIT output | ||
ugexe | yes | ||
jnthn | sena_kun: make t/spec/foo/bar.t will do the fudge and then run the .rakudo.moar if one is produced; spectest does that at the start too; only ever edit the .t file | 23:03 | |
(the the .rakudo.moar is good to read) | 23:04 | ||
('cus the line numbers match up) | |||
sena_kun | so it seems that `/a |& b/` regex cannot be parsed with <:punct> instead of \W. | ||
jnthn | What on earth... | ||
What does the diff you have look like? | 23:05 | ||
sena_kun | or I might got the wrong line... | ||
diff of the "fix"? | |||
jnthn | Yeah | ||
But...is that even valid syntax? | |||
sena_kun | one second | ||
jnthn | The leading & is only allowed at the start of a regex for a [...] group, ain't it? | ||
sena_kun | gist.github.com/Altai-man/baf7fa4d...9f2c049284 | 23:06 | |
^ diff | |||
jnthn | m: use Test; ok 'a' ~~ /a |⏏& b/, 'alternation and conjunction (|&) | ||
camelia | 5===SORRY!5=== Unrecognized regex metacharacter ⏏ (must be quoted to match literally) at <tmp>:1 ------> 3use Test; ok 'a' ~~ /a |7⏏5⏏& b/, 'alternation and conjunction (|&) Unable to parse expression in single quotes; couldn't f… |
||
jnthn | m: use Test; ok 'a' ~~ /a |& b/, 'alternation and conjunction (|&) | ||
camelia | 5===SORRY!5=== Error while compiling <tmp> Unable to parse expression in single quotes; couldn't find final "'" (corresponding starter was at line 1) at <tmp>:1 ------> 3|& b/, 'alternation and conjunction (|&)7⏏5<EOL> expecting … |
||
jnthn | m: use Test; ok 'a' ~~ /a |& b/, 'alternation and conjunction (|&)' | ||
camelia | ok 1 - alternation and conjunction (|&) | ||
sena_kun | github.com/perl6/roast/blob/master.../rx.t#L828 <- from roast | 23:07 | |
jnthn | I'm not sure I trust this test at all | ||
Moment, let me check something | |||
Yes, the "allow a leading alternation/conjunction operator" is a nibbler level thing, like I thought | 23:08 | ||
23:09
woolfy left
|
|||
jnthn | m: use Test; ok 'a' ~~ /a | [& b]/, 'alternation and conjunction (|&)' | 23:09 | |
camelia | ok 1 - alternation and conjunction (|&) | ||
23:10
zacts left
|
|||
jnthn | Seems to me the test was passing for the completely wrong reason before now, and I'm not entirely sure its expectation is legitimate. | 23:12 | |
Though I wouldn't mind a second opinion... | |||
sena_kun | well, I see a commit... | ||
github.com/perl6/roast/commit/ee1b...f26fd21c0b <- this one, by TimToady | 23:13 | ||
jnthn | ooh, that's an answer then | ||
sena_kun | it says that the precedence differs | ||
jnthn | Yeah, it's right on that | ||
OK, so if we want to fix the immediate bug, we need to fix something else first :) | 23:14 | ||
The something else being src/QRegex/P6Regex/Grammar.nqp in the NQP repo | |||
sena_kun looked there from the start | 23:15 | ||
hmm | |||
jnthn | Yeah, in nibbler at the moment we have an alternation of those things to just silently "eat" at the start | ||
But I guess we need to move those | 23:16 | ||
sena_kun | jnthn, if you are fancy to bring the fight to the floor^W^W^W^W^W^W hunt it down, I'll present results nicely, otherwise I'll at least update the ticket description with findings | ||
sena_kun .oO ( www.youtube.com/watch?v=NM7wpkL-Amw ) | 23:17 | ||
jnthn | sena_kun: If you fancy trying it: probably toss the group starting line 135 in nibbler. Then in termaltseq put [ <!rxstopper> '||' { $*SEQ := 1; } <.ws> ]? at the start. And in termalt put at the start [ <!rxstopper> '|' <.ws> ]?, etc. | 23:18 | |
sena_kun | let's see... | 23:19 | |
jnthn | So we just move the eating of the initial throw-away thingy into the rule that parses things at that level | ||
Rather than doing them all at the top nibbler level | |||
It's only termaltseq that is "weird" and sets a $*SEQ, the rest are just simple matchings. | |||
sena_kun | let's see if I can work as a simple diff applier here... | 23:20 | |
jnthn | :) | 23:21 | |
sena_kun | jnthn, is `etc.` and the end implies something after `termalt`? :) | 23:22 | |
jnthn | I figure you've written enough grammars it makes some kind of sense too. Admittedly writing the grammar for grammars is a tiny bit meta, but that's compiler life... | ||
sena_kun | well, to be fully honest I cannot say I have a lot of concentration right now | ||
jnthn | sena_kun: Yes, the leading && handling goes in termconjseq, and the leading & in termconj :) | 23:23 | |
haha, me either :D | |||
sena_kun | ok, building nqp-rakudo and then trying out the test... | ||
jnthn | Spent all my brane on graph theory and the horrors of the x64 instruction set today :P | 23:24 | |
sena_kun | I just a bit non-chalantly downloaded newest Idea... Just to see that we have a lot of exceptions on mere attempt to run Comma from run configuration | 23:25 | |
and they say "You need at least 183 to work with 191", but the truth it - it _doesn't_ work at all, you still need 191. | 23:26 | ||
jnthn | Oh heck, yes | ||
sena_kun apparently failed as patch, because there is still a null | 23:27 | ||
let me re-read it again and try to grasp... | |||
jnthn | And you can't use 191 to develop something built on an earlier enough platform version either. | 23:28 | |
Or at least, not without more fun than I was willing to have :) | |||
sena_kun | ah, I see what I did wrong, likely... | ||
jnthn | Feel free to send a diff if you want me to chck | ||
*czech | |||
oh goodness, *check | 23:29 | ||
23:29
aborazmeh joined,
aborazmeh left,
aborazmeh joined
|
|||
sena_kun | gist.github.com/Altai-man/588562b1...c06cec79a4 | 23:30 | |
23:30
pecastro left
|
|||
jnthn | Yeah, that's what I had in mind | 23:30 | |
sena_kun does a build/test | 23:31 | ||
jnthn | make test in NQP should give some clue of if it's right-ish :) | ||
sena_kun | nqp has a test suite itself? | ||
I see, that's admirable | |||
rx.t passes, regex.t passes. \o/ | 23:33 | ||
running spectest again... | |||
jnthn | :) | 23:41 | |
sena_kun | Unrecognized regex metacharacter @ (must be quoted to match literally) | 23:48 | |
sigh | |||
gist.github.com/Altai-man/806a226e...e877455c9e <- output | 23:49 | ||
23:50
Elronnd left
|
|||
sena_kun | `my @var = <a b ab c>; my \$aref = @var; 'a0' ~~ m/@\$aref[0]/` fails | 23:51 | |
m: my @var = <a b ab c>; my $aref = @var; 'a0' ~~ m/@$aref[0]/; | |||
camelia | Potential difficulties: Apparent subscript will be treated as regex at <tmp>:1 ------> 3ab c>; my $aref = @var; 'a0' ~~ m/@$aref7⏏5[0]/; |
||
sena_kun | m: my @var = <a b ab c>; my $aref = @var; say 'a0' ~~ m/@$aref[0]/; | ||
camelia | Potential difficulties: Apparent subscript will be treated as regex at <tmp>:1 ------> 3>; my $aref = @var; say 'a0' ~~ m/@$aref7⏏5[0]/; 「a0」 |
||
sena_kun | github.com/perl6/roast/blob/master....t#L34-L35 <- those two are not too ok | 23:54 | |
m: '@' ~~ /<:punct>/ | 23:58 | ||
camelia | ( no output ) | ||
sena_kun | m: say '@' ~~ /<:punct>/ | ||
camelia | 「@」 | ||
sena_kun | m: say '@' ~~ /\W/ | ||
camelia | 「@」 |