Perl 6 language and compiler development | Logs at colabti.org/irclogger/irclogger_log/perl6-dev | For toolchain/installation stuff see #perl6-toolchain | For MoarVM see #moarvm
Set by Zoffix on 27 July 2018.
timotimo lucasb: i'd assume the implementation does that because in the first one, setup of the second lines iterator happens after the first one has been exhausted, but in the second one it sets up two iterators before asking for any elements; something in that vicinity must be doing weird stuff. 00:15
Geth rakudo: mornfall++ created pull request #2511:
Ignore library versions on OpenBSD.
02:34
lucasb m: say 1, 2 Z~ 3, 4 11:49
camelia (13 24)
lucasb m: say 1, 2 Z, 3, 4
camelia ((1 3) (2 4))
lucasb ^^ cool, I can "parameterize" the Z metaop with "~", ",", etc... to get the behavior I want, right? 11:50
m: say ('foo' x 3, 'foo' xx 3)
camelia (foofoofoo (foo foo foo))
lucasb would you agree if I said that the "x" and "xx" operators looks like a imaginary REPEAT metaop, specialized with string concatenation "~" and list creation "," ? 11:51
except that "x" and "xx" are not similar, since "xx" is thunky and "x" isn't 11:53
so in "rand x 3" you get the same number concatenated 3 times 11:54
while in "rand xx 3" you get a list of 3 different numbers
so P5 has this thunky behavior in block-less map/grep, right? 11:58
"map $_, LIST" and "map $x, LIST", despite being very similar, do very different things
I believe this was fixed in P6 by always requiring a block? like in "map {$_}, LIST" 11:59
I agree that "rand xx 3" would be less useful is it wasn't thunky. But I also can understand if someone argues that "xx" breaks the expectation that "simple operators" will only evaluate their operands once 12:07
*...less useful if it wasn't thunky.
timotimo well, it does syntactically not require a block
you can put a sub or variable there, or you can use a whatever-star curried piece of code
lucasb ah, right. I didn't mean syntactically about "map". I think it expects a Code/Callable there..., right? 12:08
timotimo m: (1, 2, 3).map(9).perl.say
camelia Cannot resolve caller map(List: Int); none of these signatures match:
($: Hash \h, *%_)
(\SELF: █; :$label, :$item, *%_)
in block <unit> at <tmp> line 1
timotimo oh? 12:09
m: (1, 2, 3).map({1 => "hi", 2 => "goodbye", 3 => "cat"}).perl.say
camelia Cannot map a List to a Hash.
Did you mean to add a stub ({...}) or did you mean to .classify?
in block <unit> at <tmp> line 1
timotimo ah
that's for when you accidentally mis-spell code as a hash instead
so you get a better error message
lucasb timotimo: BTW, thanks commenting about (lines, lines). Actual bug, right? Deserves an issue? 12:12
timotimo the error should definitely be different 12:12
not entirely sure what the correct behaviour should be 12:13
lucasb why would that be an error?
reading a second time should return a empty list
at least, it was my expectation
timotimo er
i meant to say
that error is definitely wrong
lucasb ah, ok :-)
[Tux] Rakudo version 2018.11-4-g38bc682b0 - MoarVM version 2018.11-8-gef9e65cac
csv-ip5xs0.920 - 0.933
csv-ip5xs-207.013 - 7.416
csv-parser22.675 - 22.724
csv-test-xs-200.428 - 0.430
test8.084 - 8.611
test-t1.743 - 1.789
test-t --race0.844 - 0.859
test-t-2030.601 - 31.642
test-t-20 --race10.618 - 10.732
12:38
Geth nqp/master: 7 commits pushed by (Paweł Murias)++ 13:19
lucasb m: my $x = 'a'.Int; $x 15:28
camelia WARNINGS for <tmp>:
Useless use of $x in sink context (line 1)
lucasb m: my $x = 'a'.Int; $x.sink
camelia Cannot convert string to number: base-10 number must begin with valid digits or '.' in '3⏏5a' (indicated by ⏏)
in block <unit> at <tmp> line 1
lucasb wasn't it supposed to sink itself and throw the failure? 15:29
lucasb bisectable6: my $x = 'a'.Int; $x 15:35
bisectable6 lucasb, Bisecting by exit code (old=2015.12 new=38bc682). Old exit code: 1
lucasb, bisect log: gist.github.com/b5b2809a78d6c67f82...79124cfb7b 15:36
lucasb, (2016-04-09) github.com/rakudo/rakudo/commit/1c...96e30a9bad