»ö« 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:02
Manifest0 left
00:08
Manifest0 joined
00:12
Manifest0 left
00:17
Manifest0 joined
00:25
MasterDuke joined
00:27
aborazmeh joined,
aborazmeh left,
aborazmeh joined,
MasterDuke left,
MasterDuke joined
00:46
Manifest0 left
00:51
Manifest0 joined
01:01
mowcat joined
|
|||
Xliff | m: my ($x, $y) = CArray[num64] xx 2; for ^10 { my gdouble ($x, $y) = 1.Num xx 2; $x[$_] = $x; $y[$_] = $y; }; | 01:03 | |
camelia | 5===SORRY!5=== Type 'gdouble' is not declared at <tmp>:1 ------> 3CArray[num64] xx 2; for ^10 { my gdouble7⏏5 ($x, $y) = 1.Num xx 2; $x[$_] = $x; $y[ Malformed my at <tmp>:1 ------> 3, $y) = CArray[num64] xx 2; for ^10 { my7⏏… |
||
Xliff | m: my ($x, $y) = CArray[num64] xx 2; for ^10 { my num64 ($x, $y) = 1.Num xx 2; $x[$_] = $x; $y[$_] = $y; }; | ||
camelia | 5===SORRY!5=== Error while compiling <tmp> Undeclared name: CArray used at line 1. Did you mean 'Array', 'array'? |
||
Xliff | m: use NativeCall; my ($x, $y) = CArray[num64] xx 2; for ^10 { my num64 ($x, $y) = 1.Num xx 2; $x[$_] = $x; $y[$_] = $y; }; | ||
camelia | Cannot modify an immutable Num (1) in block <unit> at <tmp> line 1 |
||
Xliff | ^^ WTF?? | ||
timotimo | how about a .new? | 01:04 | |
Xliff | /o\ | ||
m: use NativeCall; my ($x, $y) = CArray[num64].new xx 2; for ^10 { my num64 ($x, $y) = 1.Num xx 2; $x[$_] = $x; $y[$_] = $y; }; | |||
camelia | Cannot modify an immutable Num (1) in block <unit> at <tmp> line 1 |
||
Xliff | Or not? | ||
timotimo | oh, why would you try to change $x[$_] inside the loop? | ||
those are just num64 values? | |||
Xliff | m: use NativeCall; my ($x, $y) = CArray[num64].new xx 2; for ^10 { my num64 ($xx, $yy) = 1.Num xx 2; $x[$_] = $xx; $y[$_] = $yy; }; | 01:05 | |
camelia | ( no output ) | ||
Xliff | m: use NativeCall; my ($x, $y) = CArray[num64].new xx 2; for ^10 { my num64 ($xx, $yy) = 1.Num xx 2; $x[$_] = $xx; $y[$_] = $yy; }; say $x.REPR | ||
camelia | CArray | ||
01:11
Manifest0 left
01:17
Manifest0 joined
01:23
Manifest0 left
01:29
Manifest0 joined
01:33
Manifest0 left
01:38
Manifest0 joined
01:41
qiqi joined
01:49
qiqi left
01:51
espadrine_ left
01:52
qiqi joined
01:54
noisegul_ joined
01:58
noisegul left
02:01
Manifest0 left
02:02
kst left
02:08
mowcat left,
mowcat joined
02:10
Manifest0 joined
02:24
kst joined
02:25
Manifest0 left
02:34
Manifest0 joined
02:42
Manifest0 left
02:48
Manifest0 joined
02:49
xiaoyafeng joined
03:04
Manifest0 left
03:10
Manifest0 joined
|
|||
holyghost | hi | 03:20 | |
03:22
Manifest0 left
03:26
Manifest0 joined
03:28
vrurg left
03:31
Cabanossi left
03:37
javan joined
|
|||
javan | I already found how to access the DOM, are there any samples/examples how to interop perl6 to js libraries | 03:40 | |
03:41
Manifest0 left
03:43
Cabanossi joined
03:49
Manifest0 joined
03:55
Manifest0 left
03:59
aborazmeh left
04:00
Manifest0 joined
04:05
qiqi left
04:07
javan left
04:14
qiqi joined,
Manifest0 left
|
|||
Xliff | javan: What do you mean? | 04:18 | |
04:18
kaare_ left
04:19
kaare_ joined
04:20
Manifest0 joined
04:24
qiqi left
04:26
jeromelanteri joined,
qiqi joined
04:28
xiaoyafeng left
04:44
Manifest0 left,
kent\n left
04:45
curan joined
04:47
kent\n joined
04:49
Manifest0 joined
04:53
Manifest0 left
04:59
Manifest0 joined
05:05
qiqi left
05:06
Manifest0 left
05:10
Actualeyes joined
05:11
Manifest0 joined
05:15
Manifest0 left
05:21
Manifest0 joined
05:32
Manifest0 left,
molaf joined
05:34
qiqi joined
05:39
Manifest0 joined
05:41
sauvin joined
05:46
nadim_ joined
05:47
Manifest0 left
05:51
abraxxa joined
05:53
Manifest0 joined
05:55
abraxxa left,
abraxxa joined
05:57
mowcat left
05:59
vrurg joined
06:05
Manifest0 left
06:10
patrickb joined
06:11
Manifest0 joined
06:19
ravenousmoose joined
06:24
xiaoyafeng joined,
agentzh left,
molaf left,
domidumont joined,
netrino joined
06:26
agentzh joined
06:30
Summertime left
06:31
Summertime joined
06:46
Manifest0 left
06:47
squashable6 left
06:48
squashable6 joined
06:51
Manifest0 joined
06:57
Manifest0 left
07:03
Manifest0 joined
07:15
netrino left
07:20
kensanata joined
07:23
reach_satori_ left
07:28
Manifest0 left
07:33
Manifest0 joined
07:35
dakkar joined
07:38
Manifest0 left
07:43
Manifest0 joined
|
|||
SmokeMachine | Isn't `modules.perl6.org` being refreshed? I've uploaded a new module yesterday (Cro::HTTP::Session::Red) and it's not there yet (modules.perl6.org/search/?q=Cro%3A...%3A%3ARed) | 07:45 | |
07:48
zakharyas joined
07:50
feldspath_ joined
|
|||
lizmat | timotimo did a manual refresh the other day... not sure why that doesn't happen automatically | 07:51 | |
07:52
dolmen joined
|
|||
moritz | probably because it's still running on provisional infra | 07:54 | |
07:58
jeromelanteri left
07:59
yqt joined
08:00
ravenousmoose left
08:02
rindolf joined,
ravenousmoose joined
08:05
dolmen left
08:06
feldspath_ left,
Manifest0 left
08:12
Manifest0 joined
|
|||
ufobat_ | manual tasks, badness factor of 10! | 08:12 | |
08:13
dolmen joined
08:16
qiqi left
08:20
qiqi joined
08:21
Manifest0 left
08:25
molaf joined
08:26
Manifest0 joined
|
|||
moritz | kinda reminds of me latex log output with "hbox overflow, badness 1000" or so :D | 08:32 | |
08:33
lizmat left
08:35
dolmen_ joined,
dolmen left
08:41
reach_satori_ joined
08:46
vrurg left
08:47
pmurias joined
|
|||
pmurias | .tell javan you mean from rakudo.js or from moar? | 08:48 | |
yoleaux | pmurias: I'll pass your message to javan. | ||
08:49
reach_satori_ left
08:57
lizmat joined
08:59
ravenousmoose left
09:04
Manifest0 left
09:08
feldspath_ joined
09:11
Manifest0 joined,
masak joined
09:12
squashable6 left,
woolfy left
09:15
squashable6 joined,
ChanServ sets mode: +v squashable6
09:17
[Sno] left,
woolfy joined
09:22
[Sno] joined
09:26
aindilis left
09:28
Manifest0 left
09:29
ravenousmoose joined,
reach_satori_ joined
09:33
sena_kun joined
09:34
Actualeyes left
09:35
Manifest0 joined
09:36
reach_satori_ left
09:38
aindilis joined
09:40
ChoHag left
09:41
aindilis left,
ayerhart_ left
09:42
aindilis joined
09:44
ayerhart joined
|
|||
sena_kun | github.com/rakudo/rakudo/issues/2862 <- this ticket can be closed | 09:47 | |
09:48
xiaoyafeng left
|
|||
moritz | nope, needs a test first | 09:48 | |
sena_kun | moritz, it has a test, no? | ||
argh, sorry | |||
where I was looking. :| | 09:49 | ||
09:50
pmurias left
09:51
ravenousmoose left
|
|||
sena_kun tries to write a test | 09:52 | ||
09:52
grumble left
09:55
ravenousmoose joined
09:58
grumble joined
10:01
domidumont left,
ayerhart left
10:02
Manifest0 left
10:06
[particle]1 left
10:07
Manifest0 joined
10:11
[particle] joined
10:16
Manifest0 left
10:18
breinbaas joined
10:21
Manifest0 joined
10:25
Manifest0 left
10:26
breinbaas left,
cpan-p6 left
10:27
cpan-p6 joined,
cpan-p6 left,
cpan-p6 joined,
breinbaas joined
10:35
Manifest0 joined
10:37
pmurias joined
|
|||
sena_kun successfully built all the needed stuff and wrote a test | 10:47 | ||
10:50
dolmen_ left
10:57
Manifest0 left
11:01
Voldenet left
11:02
Manifest0 joined
11:05
kurahaupo_ joined
11:07
Voldenet joined,
Voldenet left,
Voldenet joined,
kurahaupo left
11:12
zakharyas left
11:13
Manifest0 left
11:16
squashable6 left
11:17
qiqi left,
mowcat joined
11:18
Manifest0 joined
11:21
reach_satori_ joined,
squashable6 joined,
ChanServ sets mode: +v squashable6
11:23
dolmen_ joined
11:34
pmurias left
11:35
Manifest0 left
11:36
pmurias joined
11:40
Manifest0 joined
11:44
antoniogamiz joined
11:46
noisegul_ is now known as noisegul
12:01
dolmen_ left
12:04
dolmen joined
12:09
dolmen left
12:14
Manifest0 left
12:15
domidumont joined
12:19
reach_satori_ left
12:21
curan left,
MasterDuke left,
aborazmeh joined,
aborazmeh left,
aborazmeh joined
12:23
Manifest0 joined,
dolmen joined
12:26
dolmen left
12:39
robertle joined
12:43
pmurias left
12:48
Manifest0 left
12:54
Manifest0 joined
12:58
feldspath joined
12:59
feldspath_ left
13:04
robertle left
13:06
robertle joined
13:12
kurahaupo_ left,
kurahaupo joined,
zakharyas joined
13:21
Manifest0 left
13:25
Sgeo__ joined
13:26
lizmat left
13:27
Manifest0 joined
13:28
Sgeo_ left
13:33
mowcat left
13:37
woolfy left
13:39
aborazmeh left
13:40
antoniogamiz left
13:42
skids joined
13:46
vrurg joined
13:50
Manifest0 left
13:56
Manifest0 joined
14:02
robertle left
14:03
Manifest0 left
14:08
Manifest0 joined
14:12
Manifest0 left
14:13
zacts joined
|
|||
Geth | doc: lukasvalle++ created pull request #2794: Example for the "hyper for" and the "race for" statements. |
14:14 | |
14:15
xiaoyafeng joined
14:17
robertle joined,
Manifest0 joined
|
|||
robertle | is there a way I can 'use' a class/module from rakudo itself in my perl 6 program? for example, can I use Perl6::Grammar to parse a piece of perl into an AST of sorts? | 14:18 | |
14:30
Actualeyes joined
14:33
dolmen joined
|
|||
robertle | or taking a step back, how can I 'use' stuff from a nqp file in perl6? | 14:36 | |
14:37
dolmen left
|
|||
vrurg | robertle: You don't need to 'use' it, its already at your hands. | 14:38 | |
14:38
dolmen joined
|
|||
vrurg | robertle: $*LANG would give you a grammar instanse, for example. | 14:39 | |
robertle | m: $*LANG.WHAT | 14:41 | |
camelia | ( no output ) | ||
robertle | m: say $*LANG.WHAT | ||
camelia | (Failure) | ||
Geth | doc: 46f4f1369f | Altai-man++ (committed using GitHub Web editor) | doc/Language/control.pod6 Move links from anchors to a section header Previously, there was an odd text e.g. "with orwith without", apparently added to serve as a search anchor. Luckily, we can just inline anchors into the appropriate section header and have a cleaner text on the actual page, preserving the search results. |
14:42 | |
synopsebot | Link: doc.perl6.org/language/control | ||
vrurg | robertle: BEGIN say $*LANG.^name | 14:43 | |
m: BEGIN say $*LANG.^name | |||
camelia | Perl6::Grammar | ||
SmokeMachine | m: use Perl6::Grammar:from<nqp>; say Perl6::Grammar | ||
camelia | ===SORRY!=== Could not find Perl6::Grammar at line 1 in: inst#/home/camelia/.perl6 inst#/home/camelia/rakudo-m-inst-1/share/perl6/site inst#/home/camelia/rakudo-m-inst-1/share/perl6/vendor inst#/home/camelia/rakudo-m-inst-1/s… |
||
SmokeMachine | m: use Perl6::Grammar:from<nqp>; say Perl6::Grammar.^name | ||
camelia | ===SORRY!=== Could not find Perl6::Grammar at line 1 in: inst#/home/camelia/.perl6 inst#/home/camelia/rakudo-m-inst-1/share/perl6/site inst#/home/camelia/rakudo-m-inst-1/share/perl6/vendor inst#/home/camelia/rakudo-m-inst-1/s… |
||
vrurg | SmokeMachine: Perl6 prefix is not needed. | 14:44 | |
SmokeMachine | use Perl6::Grammar:from<NQP>; say Perl6::Grammar.^name | ||
evalable6 | Perl6::Grammar | ||
14:45
patrickb left
|
|||
SmokeMachine | vrurg: Hi!!! I was wondering about your last Red issue... | 14:45 | |
robertle | awesome, the thing I was originally wondering about was that :from<NQP> | 14:46 | |
but it's also interesting that the BEGIN phaser changes things: | |||
m: BEGIN say $*LANG.^name | 14:47 | ||
camelia | Perl6::Grammar | ||
robertle | m: say $*LANG.^name | ||
camelia | Failure | ||
robertle | why is that? | ||
SmokeMachine | vrurg: I think I'll make Metamodel::Red::Dirtable store the original value of the attribute... so on update it could try to use the id's original value, and if it's not set use the actual value... | 14:48 | |
vrurg | SmokeMachine: It could be fixed with some work I haven't done yet. It needed .e language spec to be available. | ||
14:48
dolmen left
|
|||
vrurg | Oops, you mean not the last one, but before the last? #159? | 14:49 | |
SmokeMachine | vrurg: what do you think about it? | ||
14:49
dolmen joined,
harmth joined
|
|||
SmokeMachine | vrurg: Oh! sorry!!! yes... #159± | 14:49 | |
s/±/!/ | 14:50 | ||
vrurg | SmokeMachine: not getting into details (no idea about ::Dirtable and how it works, though understand the purpose) but basically it's perhaps the only way to do it. | ||
The old value has to be kept around for WHERE caluse. | 14:51 | ||
SmokeMachine | vrurg: another option would do that only for ids... | ||
vrurg | I'm more worried about threading matters. This is where the real can of worms is hiding. | ||
SmokeMachine | (the ::Dirtable is the way Red knows what was changed... that way it uses only what was changed on updates...) | 14:52 | |
vrurg | SmokeMachine: as soon as ids are the only index objects – that's ok. I mean, whichever field can appear in WHERE is the subject for ::Dirtable. | 14:53 | |
SmokeMachine: unfortuantely, I might not be of much help is some near future. Time to roll back the stack of problems I was trying to fix in rakudo. :) | 14:55 | ||
SmokeMachine | vrurg: a few time ago, me and jonathanstowe has fixed some breaks that were "fixed" with `no precompilation` on Red... I think this one must be fixed the same way (I hope...) | ||
vrurg have to run now. Breakfast time... | |||
14:55
pmurias joined
|
|||
vrurg | SmokeMachine: Something I wasn't been able to fix even with `no precompilation`. But don't remember what was it. The problem with operators and threads could be fixed with a subset fix I almost have on my hands. But future will show. | 14:57 | |
SmokeMachine | vrurg: Thanks! and sorry for not fixing the issues yet... my wife's brother has passed away and she is needing me... so I am not finding time to fix bugs currently... | ||
15:01
harmth left
15:07
mowcat joined
15:10
HarmtH joined
15:11
Manifest0 left
15:12
domidumont left
15:13
dolmen left
15:14
johnjohn101 joined,
dolmen joined
15:17
Sgeo__ left,
Manifest0 joined
15:18
robertle left,
Sgeo joined
15:21
natrys joined
|
|||
Geth | doc/master: 4 commits pushed by lukasvalle++, Altai-man++ | 15:22 | |
15:30
feldspath left
15:59
zacts left
16:08
Sgeo left,
robertle joined
16:09
maettu left
16:12
kaare_ left
|
|||
vrurg | SmokeMachine: oh, so sorry to hear that! | 16:15 | |
16:20
maettu joined,
lizmat joined
16:21
dogbert17 left
|
|||
sena_kun | SmokeMachine, take care. | 16:23 | |
16:24
maettu left
16:26
zacts joined,
maettu joined
16:28
abraxxa left
16:36
dolmen left
16:37
dakkar left
16:38
Kaiepi left,
maettu left
16:39
zacts left
16:41
maettu joined
16:51
_jrjsmrtn joined,
__jrjsmrtn__ left
16:55
yqt left
16:56
HarmtH left
16:59
lizmat left
17:18
mowcat left
17:19
Kaiepi joined
17:28
lizmat joined,
Manifest0 left
17:34
Manifest0 joined
17:41
Manifest0 left,
zakharyas left
|
|||
Xliff | jnthn: How would you write the following test with "is": "ok $a <= 2, 'This is acceptable'" | 17:43 | |
17:43
dolmen joined
|
|||
timotimo | Xliff: i would use "cmp-ok" | 17:43 | |
otherwise, since "is" uses string equivalence .. don't use "is" :) | |||
i might actually suggest cmp-ok with ~~ and a Range literal, tbh | 17:44 | ||
m: use Test; cmp-ok 1, *..2, "it fits" | |||
camelia | not ok 1 - # Failed test at <tmp> line 1 # Could not use '-Inf..2' as a comparator. If you are trying to use a meta operator, pass it as a Callable instead of a string: &[*..2] |
||
timotimo | m: use Test; cmp-ok 1, "~~", *..2, "it fits" | ||
camelia | ok 1 - it fits | ||
timotimo | m: use Test; for ^10 { cmp-ok $_, "~~", *..2, "it fits" } | ||
camelia | ok 1 - it fits ok 2 - it fits ok 3 - it fits not ok 4 - it fits # Failed test 'it fits' # at <tmp> line 1 # expected: -Inf..2 # matcher: 'infix:<~~>' # got: 3 not ok 5 - it fits # Failed test 'it fits' # at <tmp> line 1 #… |
||
17:46
Manifest0 joined,
Actualey` joined
17:48
Actualeyes left
18:03
netrino joined
18:05
pmurias left
18:09
|Sno| joined,
dolmen left
18:11
[Sno] left
18:13
pecastro joined
|
|||
jnthn | Xliff: The tests good good now, but lib/Cro/HTTP/Client/CookieJar.pm6 still seems to be a bit off so far as indentation goes :) | 18:16 | |
18:17
zacts joined
|
|||
Xliff | jnthn: OK. I will look into the indentation, later. I've got errands to run, right now. Thanks for the comment. | 18:19 | |
18:25
sauvin left
18:33
johnjohn101 left,
nadim_ left
18:36
zacts left
18:38
lizmat left,
nadim_ joined
18:41
molaf left
|
|||
Elronnd | can someone explain why this grammar doesn't work properly? sprunge.us/XyucnO | 18:41 | |
I want to match an expression like 5 + 6d6 - 7d4 | |||
it works fine with only two atoms in the expression, like 5 + 6d6, but when I get up to 3, parsing returns Nil | |||
18:44
Kaiepi left
18:51
agentzh left
18:53
agentzh joined
|
|||
tobs | Elronnd: I have no explanation (yet) but after playing with it a little, I got something that does work sprunge.us/KfvUNr | 18:54 | |
sena_kun | can anyone help me(a novice) with a little rakudo bug hunt? :) I wanted to look at some testneeded ticket, but github.com/rakudo/rakudo/issues/2901 looks not so hard, just need to know where to look. | 18:55 | |
s/ticket/tickets/ | |||
18:58
zakharyas joined,
zacts joined
|
|||
tobs | Elronnd: I'm fairly sure it has something to do with <atom> recursing into <expr> and longest token matching | 18:59 | |
19:04
johnjohn101 joined
|
|||
timotimo | sena_kun: that looks interesting. your first step could be outputting the --target=ast and --target=optimize with one vs the other | 19:06 | |
that should give you some method calls that lead you to interesting code | |||
though it could as well be that it directly compiles to moar bytecode (and what the other backends have) | 19:07 | ||
19:10
cwilson joined
|
|||
sena_kun | timotimo, thanks! trying that... | 19:10 | |
19:12
Manifest0 left
|
|||
timotimo | if the latter, you'll probably have to look at QASTRegexCompilerMAST at some point | 19:12 | |
sena_kun | --optimize=0 does not change results, can I expect it isn't an optimizer? | 19:13 | |
timotimo | usually. though --optimize=off is another valid setting that does a tiny bit different stuff, too | ||
sena_kun | ok, I see differences in ast output. let me some time to digest it firstly and think a bit... | 19:14 | |
timotimo | the qast output is a bit easier to figure out with one of zoffix' tools, i think it's called Q | 19:15 | |
rakudo.party/post/Perl-6-Core-Hack...STalicious | 19:16 | ||
hold on | |||
tobs | m: say 'a' ~~ / 'a' & 'a' / # maybe that can help you to narrow it down more | ||
camelia | 「a」 | ||
19:16
Manifest0 joined
|
|||
timotimo | that's not the post that has the tool in it | 19:16 | |
github.com/perl6-community-modules/q | 19:17 | ||
this is the tool i'm refering to. it's in the ecosystem, too | |||
sena_kun | well, it seems that the working one compiles into conjseq, and the broken on into concat | 19:19 | |
- QAST::Regex(:rxtype(conjseq) :subtype()) a && a | |||
but | |||
- QAST::Regex(:rxtype(concat) :subtype()) a & a | |||
Elronnd | tobs: ok, thanks! | ||
sena_kun | and it seems to think that `&` is an anon subrule, as it declares it `QAST::Var(lexical &ANON_VAR__1 :decl(statevar))` at the beginning of the Stmts block | 19:20 | |
now need to read the article for clues where this code is actually generated... | 19:21 | ||
'a' & 'a' generates a conj too, but not `a & a` | 19:23 | ||
robertle | DrForr: you around? I am wondering if I can somehow use perl6-commonmark, but somehow intercept/transform certain parts before they are rendered? like e.g. syntax-highlighting a code block | 19:24 | |
19:25
cpage joined
19:31
pmurias joined
19:33
Cabanossi left
19:40
Manifest0 left
19:43
Cabanossi joined
19:44
zacts left
|
|||
Elronnd | will I get crucified if I call it a pesl instead of a repl? | 19:45 | |
because really it's loop { say EVAL prompt } | 19:46 | ||
19:46
Manifest0 joined
19:48
ravenous_ joined,
kst left
19:49
ravenousmoose left
19:50
ravenousmoose joined
|
|||
sena_kun | so `:rxtype<concat>` is generated in nqp, I suspect, around github.com/perl6/nqp/blob/master/s...#L190-L201 area | 19:51 | |
19:51
ravenousmoose left,
ravenous_ is now known as ravenousmoose
19:52
Guest1336 joined,
ravenousmoose left
19:53
ravenousmoose joined,
mowcat joined
20:02
robertle left
20:04
espadrine_ joined
20:09
ufobat__ joined
20:12
ufobat_ left
|
|||
ugexe | m: Nil = 1 | 20:21 | |
camelia | Cannot modify an immutable Str (Nil) in block <unit> at <tmp> line 1 |
||
ugexe | Nil is not Str though | ||
m: "Nil" = 1 | 20:22 | ||
camelia | Cannot modify an immutable Str (Nil) in block <unit> at <tmp> line 1 |
||
ugexe | probably a low hanging fruit | ||
20:24
alpha6 left,
vrurg left
|
|||
sena_kun | m: class A { has $.a = 'hehe'; method a { say $!a } }; A.new(a => Nil).a; | 20:26 | |
camelia | (Any) | ||
sena_kun | hmm... | ||
m: class A { has $.a = 'hehe'; method a { say $!a } }; A.new(:a<Nil>).a; | |||
camelia | Nil | ||
sena_kun | it throws an exception at github.com/rakudo/rakudo/blob/762c...il.pm6#L16 | ||
github.com/rakudo/rakudo/blob/358d....pm6#L2377 <- but here it somehow doesn't print Nil | 20:27 | ||
m: class A { has $.a = 'hehe'; method a { say $!a.^name } }; A.new(:a<Nil>).a; | 20:28 | ||
camelia | Str | ||
sena_kun | ah, no, here it is, a Str | ||
m: class A { has $.a = 'hehe'; method a { say $!a.^name } }; A.new(a => Nil).a; | |||
camelia | Any | ||
sena_kun | but this leaves $!a just unassigned... | ||
ugexe++ | 20:29 | ||
probably worth a "good first ticket"(though I don't see what the solution can be right now), with the log above | 20:30 | ||
timotimo | ugexe: wow that's fascinating | ||
ugexe: but yeah, the default should really not be "value" there :D | 20:31 | ||
20:31
molaf joined
20:32
alpha6 joined
|
|||
timotimo | so putting Nil there potentially gave it the default value? which is a string of value "value" | 20:32 | |
sena_kun | well, :a<Nil> is a Pair with Str value | ||
so an attribute is not 'Value', but 'Nil', but in the end it is a Str anyway, not Nil | 20:33 | ||
timotimo | ha | ||
i didn't look at that piece of the code yet | |||
sena_kun | it would be different with `value => Nil` pair | ||
and that gives us `Any`, because the attribute is really not initialized in this case, I guess | 20:34 | ||
sena_kun gave up on & bug | |||
20:34
zakharyas left
|
|||
timotimo | you weren't able to find out where it figured it should declare a '&' variable? | 20:34 | |
sena_kun | well, I ended up in Grammar.nqp/Actions.nqp in nqp repo, which is really not my thing... Probably. | 20:35 | |
timotimo | OK | ||
sena_kun | I don't mind looking at it a bit more, just don't know how bad it can be, as Perl 6 parsing is... complicated situation. | 20:36 | |
timotimo | i hope in the future we'll have something in the debugserver that allows for sensible stepping through parsing stuff | ||
we'll most probably need ot change the code-gen to put some extra metadata in the code | |||
but it'd be worth a lot | |||
sena_kun .oO ( and I wasn't able to do `{ nqp::say("this thing foo!") }`(yes, this is a cursed code) in Grammar/Actions.nqp, so | 20:37 | ||
timotimo | right now, it's completely unfeasible to put Grammar::Tracer or even Grammar::Debugger into rakudo's Grammar.nqp | ||
you should be able to use "note" | |||
as a sub | |||
i think "say" got deprecated when we got rid of string-based IO in moarvm | |||
sena_kun | I saw prints being invoked when compiled nqp itself, but on `z build rakudo` it says "confused at line 2"(and then my foo-bar line) | 20:38 | |
20:38
rindolf left
|
|||
timotimo | that's interesting | 20:38 | |
you didn't put anything into the Grammar part, right? | 20:39 | ||
sena_kun | I tried to, since I hoped to see what rules are called and at least narrow from 5 things that produce `concat` to a single one | ||
oh, it works with note | |||
that's more interesting | 20:40 | ||
20:41
zacts joined
|
|||
timotimo | you probably already know this, but you'll have to be extra careful putting code blocks into grammars, because code blocks end the "declarative prefix" part of an alternation and thus can change parse results | 20:41 | |
sena_kun | timotimo, gist.github.com/Altai-man/c9d7c1df...abcf9cbf69 <- something like this is not ok? | 20:43 | |
also, now I think it is better to just `note` from Actions code, not Grammar, because grammar may alter options... | 20:44 | ||
timotimo | hm, it has a sequence of || right after it, which i think also terminates the declarative prefix immediately | 20:45 | |
in theory it could perhaps take the first part of the || sequence as declarative, but i don't think that's the semantics we've specified for that | |||
sena_kun | and no output. :| | 20:50 | |
timotimo | mhm | ||
it does kind of look like every termish you encounter will have gone through termseq -> termaltseq -> termconjseq -> termalt -> termconj -> termtermish | 20:51 | ||
so the most interesting part is, did it branch off into any of the [ blah ]* parts of these tokens | |||
20:55
natrys left
20:56
HarmtH joined
|
|||
sena_kun | m: /&& 3/ | 20:56 | |
camelia | ( no output ) | ||
sena_kun | : ) | ||
20:56
ravenousmoose left
|
|||
sena_kun | what a valid syntax to see... | 20:57 | |
tadzik | :o | 20:58 | |
timotimo | kind of like | 20:59 | |
m: my @foo = ,5 | |||
camelia | 5===SORRY!5=== Error while compiling <tmp> Preceding context expects a term, but found infix , instead. at <tmp>:1 ------> 3my @foo = ,7⏏055 |
||
timotimo | oh, except not allowed here | ||
jnthn | It's a special case so when you write a load of | or || alternations, you can line them up vertically have a | before the first one :) | ||
timotimo | and you're even allowed to have a | before the first one if you have only the first one | 21:00 | |
21:00
HarmtH left,
HarmtH_ joined
|
|||
sena_kun is too shy to point out he knew the syntax already in this warm mood | 21:01 | ||
21:03
skids left
|
|||
timotimo | i need a pun to fit the cat picture i took so i can write a blog post about my recent work :| | 21:04 | |
life as a perl6 hacker is tough sometimes | |||
sena_kun | just go meta | ||
e.g. "And here is our obligatory cat picture just for the sake of it (yes, I wasn't able to find a connection point to use, so here we go):". | 21:05 | ||
:) | |||
timotimo | no, i'm sure i can make it work somehow | ||
21:05
HarmtH_ is now known as HarmtH
|
|||
sena_kun | is going meta for weaklings? | 21:06 | |
timotimo | "i know writers who use subtext and they're all cowards" | ||
sena_kun | it is handy sometimes, when you don't know what to respond and you can always go the "And I had some responses to choose from, but you know, I have any" route, which is a response itsef. | ||
s/any/none/ | 21:07 | ||
my junctions are not healthy today | |||
timotimo | "sorry, i didn't upgrade my charisma stat enough to give you the response i wanted" | 21:10 | |
21:10
john_parr left
21:28
Kaiepi joined
21:29
HarmtH left,
pmurias left,
nadim_ left
21:34
rindolf joined
21:39
kensanata left
21:44
antoniogamiz joined
21:48
zacts left
21:50
khisanth_ left
21:55
Manifest0 left
21:59
antoniogamiz left,
Manifest0 joined
22:03
khisanth_ joined
22:05
pmurias joined
22:12
pmurias left
22:14
Manifest0 left
22:20
Manifest0 joined,
johnjohn101 left
22:23
Sgeo joined
|
|||
jnthn | timotimo: What's the topic of the blog post? :) | 22:24 | |
22:25
Manifest0 left
22:30
Manifest0 joined
|
|||
timotimo | confprog | 22:37 | |
it's related to the grant, though it's not part of the original list of milestones/deliverables | |||
i still think it makes a good work report topic | |||
jnthn | "A little paws from the grant work" :P | 22:38 | |
22:38
Kaiepi left
|
|||
timotimo | i'll show you the cat picture i'll be using and my current post title :) | 22:38 | |
22:40
Sgeo_ joined
|
|||
timotimo | find it in the slack channel | 22:40 | |
22:41
Kaiepi joined
22:42
Kaiepi left
22:43
Sgeo left,
HarmtH joined
22:55
kurahaupo left,
kurahaupo joined,
kurahaupo left
22:56
kurahaupo joined,
pecastro left
22:58
netrino left
23:04
woolfy joined
23:06
MasterDuke joined,
MasterDuke left,
MasterDuke joined
23:15
espadrine_ left
23:17
yqt joined
23:21
rindolf left
23:26
Manifest0 left
23:29
cpan-p6 left
23:32
Manifest0 joined
23:33
yqt left
23:35
cpan-p6 joined,
cpan-p6 left,
cpan-p6 joined
23:37
Sgeo_ left,
aborazmeh joined,
aborazmeh left,
aborazmeh joined
23:39
vrurg joined
23:42
sena_kun left
23:43
Sgeo joined
23:49
Manifest0 left
23:58
Manifest0 joined
23:59
john_parr joined
|