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.
00:06 patrickb left
MasterDuke timotimo: you mean do i see output printing while building nqp? 01:06
whoops, i commented out the CATCH block of directive b 01:10
ah ha. `This representation (P6str) cannot unbox to a native num (for type BOOTStr)` 01:13
01:45 MasterDuke left 01:54 MasterDuke joined 01:55 MasterDuke left, MasterDuke joined 02:05 AlexDani` joined 02:09 lizmat left 02:10 AlexDaniel left 02:39 Kaypie left, Kaypie joined 02:42 leont left 03:30 |Tux| left 03:31 |Tux| joined 05:59 AlexDani` is now known as AlexDaniel 07:21 ufobat_ joined 07:25 ufobat left 08:00 lizmat joined 08:27 patrickb joined
lizmat Files=1266, Tests=88057, 383 wallclock secs (20.53 usr 5.98 sys + 2730.56 cusr 244.06 csys = 3001.13 CPU) 08:57
11:02 leont joined
[Tux] timing is slow today. maybe because I am working from home 11:09
AlexDaniel m: say <foo>.Int
camelia Cannot convert string to number: base-10 number must begin with valid digits or '.' in '3⏏5foo' (indicated by ⏏)
in block <unit> at <tmp> line 1
AlexDaniel hmm, why are we using ascii quotes in error messages? 11:10
even g++ seems to be happy to use ‘’
timotimo because while you may often copy-paste stuff into perl6 code or the repl, you would more often coyp-paste error messages out of perl6 into something that doesn't "get it" 11:11
(not actually the reason, just an idea)
AlexDaniel yeah… I didn't even get your point, to be honest :) 11:13
timotimo ha
AlexDaniel note that there's ⏏ right next to '
[Tux] Rakudo version 2018.12-272-gc6053e6a5 - MoarVM version 2018.12-45-ga9d02578a
csv-ip5xs0.760 - 0.805
csv-ip5xs-206.602 - 7.191
csv-parser22.600 - 23.795
csv-test-xs-200.433 - 0.451
test7.353 - 7.829
test-t1.922 - 2.133
test-t --race0.864 - 0.935
test-t-2031.895 - 32.937
test-t-20 --race10.244 - 10.315
11:14
lizmat AlexDaniel timotimo FWIW, I think those error messages are from a time when Perl 6 did not allow other quotes yet 11:17
timotimo that's fair. if you want machine-readable errors, you'd go for JSON output anyway, right? 11:18
does the json exception renderer also do compile-time exceptions?
lizmat probably 11:25
11:37 dct joined
lizmat m: sub postfix:<.foo>(|) { say "bar" }; 42.foo # wheee! 11:51
camelia No such method 'foo' for invocant of type 'Int'
in block <unit> at <tmp> line 1
lizmat huh?
that works locally ?
ah, the comment is disrupting 11:53
m: sub postfix:<.foo>(|) { say "bar" }; 42.foo; # wheee!
camelia bar
14:08 leont left 15:55 Ven`` joined 16:15 patrickb left 16:35 dct left, dct_ joined 19:38 Ven`` left
masak um. why is the comment disrupting? 20:04
gfldex m: my @a = 1..3; while @a.shift -> $n { say $n } 20:21
camelia 1
2
3
gfldex Is that ^^^ specced? If so it's an ENODOC.
timotimo what about it is what you're asking for? 20:22
that while passes the thing it checks to the block?
m: my @a = 0..3; while @a.shift -> $n { say $n } # btw 20:23
camelia ( no output )
gfldex We don't doc that while/until takes a pointy to alias (or replace) $_ . 20:35
timotimo fair enough. hopefully we do doc the thing about if doing that 20:36
20:38 j3nnn1 joined
gfldex if and else are covered in the docs. 20:39
timotimo with/without?
i mean, all other things and such
gfldex checking … 20:40
with, orwith, without are missing -> too
timotimo m: with Any -> $m { $m.say } orwith 1 -> $n { $n.say } 20:41
camelia 1
masak m: given 42 -> $n { say $n } # by the way :) 20:45
camelia 42
gfldex m: given 42 -> $n { dd $_, $n } 20:46
camelia Any $_ = Any
42
gfldex .oO( snap goes the trap )
I would even consider given with a pointy warn-worthy. 20:48
b2gills gfldex: `while … -> $n {…}` works for the same reason the following works `given … -> $n {…}` `if … -> $n {…}` `with … -> $n {…}` `whenever … -> $n {…}` 20:49
In fact I think it works with all keywords of the form `keyword (CONDITION) {BLOCK}`
gfldex ENODOC files as #2598 20:50
20:53 ufobat_ left
masak gfldex: why in the world would you want to warn on given with a pointy? 20:55
do you detest every feature you don't have a use case for? ;)
(off the top of my head, one possible use: parameter destructuring) 20:56
timotimo i like given for introducing a limited scope for a variable, and i think it can sometimes read better than a regular assignment 20:57
masak I'm pretty sure I've used it like that somewhere too, yes 20:58
gfldex masak: I don't detest it's because I don't got a use for it. I can clearly see the use. But from the standpoint of a beginner it might be pretty confusion, given that given is advertised as being „Perl 6's topicalizing keyword“. 21:09
timotimo but nobody except for perl5ers would know what a "topicalizer" is 21:10
gfldex that is a different problem 21:11
timotimo well, if they're already completely new to the concept, the docs could at that point just throw in "$_ by default" to clear everything up 21:12
masak gfldex: sorry if I went off on the offensive on that one -- I think Perl 6 should stay out of the way of creative uses of features and their corner cases, especially if (a) they're consistent, and (b) they don't get anyone harmed 21:15
I think `given` with a pointy is a great example of something that just worked. what's to say the beginner (or someone else) just decided to try it, see if it does what they suspect it would? 21:16
s/just worked/just works/
gfldex If you write code that might be true. If you change code that might lead to staring at the source for halve an hours without spotting where the Any comes from. 21:17
masak I think a warning would be of negative use -- `given` with a pointy works just the way `for` with a pointy does, or for that matter a first-class block. all of these bind $_ if you don't specify `->`, and bind whatever you specify if you do 21:18
gfldex I know what I'm talking about. I have done the staring thing way to often. :)
masak I hear you, and I understand. I still don't think there's anything _a priori_ wrong about a `given` with a pointy 21:20
we tend to give people enough rope to shoot themselves in the foot
what's the difference between introducing a pointy on a `given`, and any other inconsistent change to one's source code that happens to introduce a bug? 21:21
m: given "outer" { given "inner" -> $s { say $_ } } 21:22
camelia outer
gfldex lizmat: while stealing code I notices that Rakudo::Internals.FILETEST-* unbox a lot and are used pretty much all the time after boxing the $abspath.
timotimo i wouldn't be surprised if Comma couldn't highlight a $_ that's not being set, but already used, at least for common cases 21:25
like, you could totally have set-the-value $_ be a sub call with an "is rw" argument
gfldex lizmat: I also learned that nqp is faster then threading (for traversing directory trees) what I shall blog about.
21:47 robertle left 22:13 dct_ left 23:07 j3nnn1 left 23:45 dct_ joined 23:55 leont joined