»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, std:, or /msg camelia p6: ... | irclog: irc.perl6.org | UTF-8 is our friend!
Set by masak on 12 May 2015.
00:05 eli-se joined 00:06 spider-mario left 00:18 kaare_ left
rjbs How can I (probably with throws-like?) test that the exception message from some code matches a regex? 00:29
I tried: throws-like(sub { ... }, /foo/) but that's no good. 00:30
timotimo why would you ever want to match the message with a regex?
japhb timotimo: Testing that the exception class message method is correct? 00:31
rjbs What japhb said.
Let me state my real goal, and you can tell me what you think. 00:32
I have a class, and it has a bunch of error conditions that die("foo")
Creating a hierarchy of exception classes seems like overkill. 00:33
timotimo hm
fair enough
rjbs I want to see "did I get the right error in this case"?
Normally, I do something like: my $error = exception { some_code }; like($@, qr/too many chefs/);
er, s/$@/$error/
timotimo hmm 00:34
rjbs Hm. The web page says: 00:37
throws-like($code, $ex_type, $description?)
but the source of Test.pm says:
sub throws-like($code, $ex_type, $reason?, *%matcher) is export {
00:37 eli-se left
rjbs that %matcher thing seems plausibly important? 00:37
TimToady put message => on teh // 00:39
rjbs Okay. Do I want X::AdHoc for $ex_Type or anything? Or just *? I'll go try!
TimToady m: use Test; throws-like(EVAL '1e0 / 0', message => /division/,"oops") 00:40
camelia rakudo-moar 55ed38: OUTPUT«Too many positionals passed; expected 1 argument but got 2␤ in block <unit> at /tmp/C_ZVq31Tw6:1␤␤»
rjbs I got a weirder error.
TimToady m: use Test; throws-like(EVAL( '1e0 / 0' ), message => /division/,"oops")
camelia rakudo-moar 55ed38: OUTPUT« 1..3␤ ok 1 - Use of uninitialized value <element> of type Any in string context in sub proclaim at lib/Test.pm:504␤␤ not ok 2 - right exception type (Str)␤ ␤# Failed test 'right exception type (Str)'␤# at /home/camelia/rakudo-inst…»
rjbs I'll gist it.
TimToady hmm
rjbs gist.github.com/rjbs/7aa7adfc92c68cb6217a 00:41
TimToady anyway, there's lots of examples in roast
00:41 gfldex left
TimToady m: use Test; throws-like(EVAL( '1e0 / 0' ), Exception, message => /division/,"oops") 00:42
camelia rakudo-moar 55ed38: OUTPUT« 1..3␤ ok 1 - Use of uninitialized value <element> of type Any in string context in sub proclaim at lib/Test.pm:504␤␤ ok 2 - right exception type (Exception)␤ not ok 3 - .message matches ␤ ␤# Failed test '.message matches '␤# …»
TimToady m: use Test; throws-like(EVAL( '1e0 / 0' ), Exception, message => /zero/,"oops")
camelia rakudo-moar 55ed38: OUTPUT« 1..3␤ ok 1 - Use of uninitialized value <element> of type Any in string context in sub proclaim at lib/Test.pm:504␤␤ ok 2 - right exception type (Exception)␤ ok 3 - .message matches ␤ok 1 - oops␤»
rjbs I ack'd for throws-like in rakudo checkout and found nearly nothing. Roast another repo? 00:43
TimToady m: use Test; throws-like(EVAL( '1e0 / 0' ), *, message => /zero/,"oops")
camelia rakudo-moar 55ed38: OUTPUT« 1..3␤ ok 1 - Use of uninitialized value <element> of type Any in string context in sub proclaim at lib/Test.pm:504␤␤ ok 2 - right exception type (Whatever)␤ ok 3 - .message matches ␤ok 1 - oops␤»
rjbs Found it.
TimToady m: use Test; throws-like({ '1e0 / 0' }, *, message => /zero/,"oops")
camelia rakudo-moar 55ed38: OUTPUT« 1..3␤ not ok 1 - code dies␤ ␤# Failed test 'code dies'␤# at /tmp/Ey7sRY6xTB line 1␤ ok 2 - # SKIP Code did not die, can not check exception␤ ok 3 - # SKIP Code did not die, can not check exception␤ # Looks like you failed 1…»
TimToady m: use Test; throws-like('1e0 / 0', *, message => /zero/,"oops") 00:44
camelia rakudo-moar 55ed38: OUTPUT« 1..3␤ ok 1 - '1e0 / 0' died␤ ok 2 - right exception type (Whatever)␤ ok 3 - .message matches ␤ok 1 - oops␤»
rjbs Funny, in roast they're all throws_like.
(low line, not hyphen minus)
TimToady for old times' sake :)
m: use Test; throws-like('1e0 / 0', *.say, message => /zero/,"oops")
camelia rakudo-moar 55ed38: OUTPUT« 1..3␤ ok 1 - '1e0 / 0' died␤Divide by zero␤ in block <unit> at EVAL_0:1␤ in any <unit-outer> at EVAL_0:1␤ in block at lib/Test.pm:443␤ in sub subtest at lib/Test.pm:272␤ in sub throws-like at lib/Test.pm:470␤ in block <unit> a…»
TimToady m: constant x = 1,2,3,x; 00:46
camelia rakudo-moar 55ed38: OUTPUT«Unhandled exception: No exception handler located for warn␤ at <unknown>:1 (/home/camelia/rakudo-inst-1/share/perl6/runtime/CORE.setting.moarvm:print_exception:4294967295)␤ from src/gen/m-CORE.setting:14919 (/home/camelia/rakudo-inst-1/share/perl6/…»
TimToady .tell jnthn see warning failure at irclog.perlgeek.de/perl6/2015-05-16#i_10612721 00:47
yoleaux TimToady: I'll pass your message to jnthn.
TimToady m: my \x = 1,2,3,x; 00:48
camelia rakudo-moar 55ed38: OUTPUT«5===SORRY!5=== Error while compiling /tmp/jHHkJVI2eX␤Variable '&x' is not declared␤at /tmp/jHHkJVI2eX:1␤------> 3my \x = 1,2,3,7⏏5x;␤»
TimToady that one is also not quite right...
00:48 cognominal left
vendethiel why is unit need there? github.com/perl6/roast/commit/1c4b...b5855fR114 00:55
timotimo vendethiel: we just changed how the "semicolon form" of classes works 01:01
we now require a "unit" in front
because that's harder to confuse people with who expect "class Foo;" to be a stub declaration 01:02
rjbs Hm, so I can pass (message => 'exact string') but not (so far): (message => /act str/) 01:09
or => * ~~ /act str/
Odd, because Test.pm has $got ~~ $v 01:12
01:19 airdisa left
TimToady rjbs: I just demonstrated using a pattern above 01:22
01:23 vendethiel left
TimToady with message => /zero/ 01:23
rjbs Sorry, I must have missed it, looking up.
TimToady maybe you put parens around it, causing it to not be a named arg? 01:24
rjbs Hm. Hm hm hm.
no...
01:24 jack_rabbit left
rjbs I'll update my gist. 01:25
gist.github.com/rjbs/7aa7adfc92c68cb6217a
TimToady I thought throws-like wants a string to eval 01:26
rjbs So, I think I'm matching your example's use of message=>/.../
throws-like:$code (specified as either something Callable, or as a something to be EVALled)
the passing of a sub is definitely okay, it works if I replace the /..../ with the exact string
01:28 vendethiel joined
rjbs "Code object coerced to string" is a bit odd to me, too 01:28
TimToady oh, heh, remember that /x is default now, except it's actually mandatory, so your space disappears unless you :s
so try /'terminated early'/ 01:29
or /:s terminated early/
or /terminated.early/ 01:30
rjbs Okay! I wondered if that was related, actually, but the output of the test was so weird that I discounted it. :(
TimToady++ # knows his perl! that was it
so you can put modifiers to the regex right inside the opening /? 01:31
Anyway, great, thank. That error message is kind of a mess, though.
TimToady in fact, you may not put them at the end anymore
that's Too Late
rjbs I would've expected: s:/.../
but I guess that would be a s//// with nomodifiers?
TimToady well, it'd have to be rx:s or so
rjbs rx is the new qr? 01:32
TimToady m: use Test; throws-like('1e0 / 0', *.say, message => rx:s/by zero/,"oops")
camelia rakudo-moar 55ed38: OUTPUT« 1..3␤ ok 1 - '1e0 / 0' died␤Divide by zero␤ in block <unit> at EVAL_0:1␤ in any <unit-outer> at EVAL_0:1␤ in block at lib/Test.pm:443␤ in sub subtest at lib/Test.pm:272␤ in sub throws-like at lib/Test.pm:470␤ in block <unit> a…»
TimToady m: use Test; throws-like('1e0 / 0', *, message => rx:s/by zero/,"oops")
camelia rakudo-moar 55ed38: OUTPUT« 1..3␤ ok 1 - '1e0 / 0' died␤ ok 2 - right exception type (Whatever)␤ ok 3 - .message matches ␤ok 1 - oops␤»
TimToady yes, rx:s works
rjbs Cool. Thanks, again, I really appreciate your and #perl6's patience as I putz around blindly. 01:33
TimToady but for :s you can also put it inside, like (?x:...) in Perl 5
rjbs Ah, ok.
I'm going to stick to outside, as otherwise I don't trust myself to see it.
TimToady just remember that m// is different, and evaluates immediately, so you have to use // or rx// to produce a Regex object 01:34
m: use Test; throws-like('1e0 / 0', *, message => rule { by zero },"oops")
camelia rakudo-moar 55ed38: OUTPUT« 1..3␤ ok 1 - '1e0 / 0' died␤ ok 2 - right exception type (Whatever)␤ ok 3 - .message matches ␤ok 1 - oops␤»
TimToady or use rule {}, which implies sigspace
it's sort of unfortunate that rule implies :s, but token implies :r 01:36
yes 01:42
rx is the new qr
we don't call it qr because regexes are strings, so it's wrongish to say it's "quoted" 01:43
*aren't
my n't key is going haywire again...
dinner &
rjbs Enjoy!
TimToady likewise ;)
01:46 ilbot3 left 01:48 ilbot3 joined
raydiak I think something important just got accidnetally deleted from an ext4 fs. besides the backups, any advice anyone? 01:49
geekosaur unix.stackexchange.com/questions/12...xtundelete 01:52
but you have to be able to unmount the fs
raydiak thanks, will read...proably shut down and flash a recovery distro to thumbdrive :P 01:53
(from another machine) 01:54
raydiak was *in the process* of putting it in git so this didn't happen :P
shutting down for damage control & 01:57
02:03 noganex_ joined 02:06 noganex left 02:13 xinming joined 02:24 aborazmeh joined, aborazmeh left, aborazmeh joined 02:29 rmgk_ joined, rmgk is now known as Guest60953, Guest60953 left, rmgk_ is now known as rmgk 02:30 cognominal joined 02:32 zacts left 02:42 vendethiel left
rjbs oh, man. my buzz killed by the realization that $a2-19 is not a valid identifier 02:51
03:02 danaj left
rjbs I have finished translating this library in its entirety! 03:08
03:14 danaj joined
jdv79 what does it mean? 03:14
03:14 adu joined
rjbs Well, it means I can stop trying to translate it, if nothing else. 03:14
03:15 adu left
rjbs Next up, I will probably ask for input on how my code is not being very perl6ish. I'll point out where stuff seemed really weird and find out whether it's bugs in perl6, missing implementations, or my expectations being wrong. 03:16
the main part of the code is github.com/rjbs/ZMachine-Whiz/blob...e/ZSCII.pm
but now, time to sleep
03:20 isBEKaml joined
jdv79 happy zzz'ing 03:21
skids abrij.org/~bri/perl6_big_nfa.svg # biofabric-style map of one of the large NFAs in perl6. Use firefox for mouseovers. Also you'll have to zoom in a lot. 03:40
yoleaux 15 May 2015 12:20Z <jepeway> skids: re: subclassing DateTime -- .utc and .local seem fundamental enough that they belong in DateTime proper and so the timezone slicing they do (where what they return is forced to have an Int timezone) feels to me like it should be fixed, rather than overridden
15 May 2015 13:05Z <jepeway> skids: see github.com/cjepeway/p6-tz for what I'm trying to do.
03:41 koo6 left 03:45 FROGGS_ joined 03:49 FROGGS left, Sqirrel left 03:55 isBEKaml left 04:04 BenGoldberg left 04:07 atweiden left 04:08 jack_rabbit joined 04:25 koo6 joined 04:42 kaare_ joined 04:45 isBEKaml joined 05:00 xinming left 05:01 xinming joined 05:24 isBEKaml left 05:25 isBEKaml joined 05:31 laouji left 05:41 Sqirrel joined 05:44 skids left 05:45 Psyche^ joined 05:50 Patterner left 05:53 spintronic joined
spintronic wow how late do you guys work on this stuff? 05:53
05:57 spintronic left 06:02 diana_olhovik_ joined 06:15 diana_olhovik_ left
raydiak geekosaur++ # I got it *all* back with extundelete, after long hassling trying to get one iso or another properly written to usb from my windows partition and booting with enough functionality 06:24
raydiak considers creating his own version of a rescue partition like you find on commercially prebuilt computers these days...and a proper emergency usb stick...and more stringent backup policies... 06:25
though for now at least the thing I orignally lost now exists on two servers, one usb stick, and four times across two partitions on this laptop :) 06:29
06:29 domidumont joined 06:34 domidumont left 06:35 domidumont joined
TimToady .tell jnthn the remaining problem on restart-concurrent looks like this: gist.github.com/anonymous/c733890dc297680e5ed3 06:35
yoleaux TimToady: I'll pass your message to jnthn.
raydiak and now on github too...anyway, g'night #perl6 o/ 06:47
06:51 isBEKaml left, isBEKaml joined 06:59 koo6 left 07:01 koo6 joined, diana_olhovik_ joined 07:02 RabidGravy joined 07:08 diana_olhovik_ left 07:09 lolisa left 07:19 stux|RC-only joined 07:22 domidumont1 joined 07:23 isBEKaml left 07:24 isBEKaml joined, domidumont left 07:30 rindolf joined
FROGGS[mobile] morning #perl6 07:38
[Tux] Inline::Perl5 fails after the unit changes 07:42
FROGGS[mobile] do you have a paste? 07:43
a precomp test failed yesterday
07:46 rindolf left 07:47 berekuk joined 07:52 berekuk left 08:02 bjz left, bjz joined, espadrine joined 08:03 bjz left 08:05 bjz joined 08:15 FROGGS_ is now known as FROGGS 08:16 brrt joined
FROGGS jnthn / lizmat: after installing 230 dists `perl6 -e1` is unchanged startup time wise, but a single use statement makes the startup time grow from .13s to .83s 08:17
08:19 brrt left
FROGGS jnthn / lizmat: uff, using MIME::Base64 takes 1.46s all in all 08:19
08:20 darutoko joined
FROGGS jnthn / lizmat: but tbf, the code in CURLI.candidates is far from ideal performance wise... 08:21
08:26 telex left 08:28 telex joined, berekuk joined 08:33 isBEKaml left 08:40 cognominal left 08:41 gfldex joined
masak good antenoon, #perl6 08:45
08:48 domidumont1 left 08:55 eli-se joined 08:59 aborazmeh left 09:00 aborazmeh joined, aborazmeh left, aborazmeh joined
jnthn FROGGS: Is that dramatically worse than before? And, is it good enough that we can consider shipping a Star this month if all else is well? 09:03
yoleaux 00:47Z <TimToady> jnthn: see warning failure at irclog.perlgeek.de/perl6/2015-05-16#i_10612721
06:35Z <TimToady> jnthn: the remaining problem on restart-concurrent looks like this: gist.github.com/anonymous/c733890dc297680e5ed3
FROGGS jnthn: it is way better then before... before it took >5s 09:04
jnthn: problem is that we need proper fixes to panda and rakudo 09:05
the 'we put string into @*INC' is nothing panda can work with
jnthn FROGGS: I meant "before we had the module databsae at all" rather than "when the module database was JSON" :) 09:06
(But maybe that's what you answered :))
FROGGS no, I was talking about JSON 09:08
I can test that to a CURLF later
jnthn ok
FROGGS++ 09:09
09:14 vendethiel joined 09:16 tardisx` joined, pmichaud_ joined, smash__ joined, pmichaud left 09:17 [particle]1 joined, coffee` left, Timbus joined, coffee` joined 09:25 rindolf joined
vendethiel o/, #perl6! 09:28
09:29 RabidGravy left
vendethiel timotimo: yes, I know it was changed, but it seems to me in github.com/perl6/roast/commit/1c4b...b5855fR114 the unit is unnecessary 09:30
timotimo: ah,I just didn't see the fix github.com/perl6/roast/commit/6e5d...db41bf562e 09:31
09:32 telex left, telex joined 09:33 Peter__R joined, TimToady_ joined, raydiak_ joined 09:34 mls_ joined 09:36 mephinet- joined, jack_rabbit_ joined 09:37 Timbus left, jack_rabbit left, LordV left, rhr left, Peter_R left, mephinet left, mls left, raydiak left, yakudza left, yakudzo joined, rhr joined 09:39 salva joined 09:40 Bucciarati joined
[Tux] FROGGS, gist.github.com/Tux/91961f13fc1dd35eb08c 09:41
09:41 revdiablo joined 09:44 Timbus joined, LordV joined 09:46 mst joined 09:47 isBEKaml joined, isBEKaml left 09:48 eli-se left
jnthn star: constant x = (1,x); 09:57
camelia star-m 2015.03: OUTPUT«===SORRY!===␤Cannot invoke this object (REPR: Null, cs = 0)␤»
jnthn star: constant x = 1,x; 09:58
camelia star-m 2015.03: OUTPUT«===SORRY!===␤Cannot invoke this object (REPR: Null, cs = 0)␤»
[Tux] File::Temp also very noisy, but it does install and work 10:07
gist.github.com/Tux/8a1ceb0def1560fa2622
10:07 koo6 left
lizmat good *, #perl6! 10:08
FROGGS hi lizmat
[Tux]: I've seen the same I::P5 issue yesterday when testing CURLI
lizmat FROGGS: at the hackathon after the OSDC.no, I discussed this briefly with pmichaud
he came up with the idea of not having a single CURLI "database" 10:09
but rather a master index, (always read at CURLI init)
and another "database" for each installed distribution
I'm warming up to that idea more and more 10:10
FROGGS I was under the impression that you have CURLIs per location
so, one for site, one for home etc 10:11
lizmat yes, you would
and then per location, per distribution, another database
FROGGS so every location has its database and CURLI object
lizmat yes
FROGGS per dist?
installed dist?
lizmat and each installed distribution inside that would have a "database" as well 10:12
FROGGS why that?
lizmat well, a handy accessible version of META6.json (not necessarily in JSON )
I see the following advantages:
1. the init time for a CURLI would decrease significantly, as it would not have to load all of the installed dist data 10:13
FROGGS 1) does not hold
lizmat 2. only modules that you actually use, would get loaded: CPU win and memory win
FROGGS that is also not true
lizmat ?? 10:14
FROGGS because to know what dists you have to care about you have to know what these dists provide
and you dont know what dists provide without looking at their information
lizmat well, maybe the master index should contain only the "provides" information, aka the keys you'd expect in a -use- statement 10:16
FROGGS so the MANIFEST file we have now is basically what you called master index, but we don't have duplicate information for that stored in extra databases
ahh
we could have a provides and files index (which maps to .candidates and .files)
lizmat which would punycoded point to the info *that* needs
yes
FROGGS that sounds sensible 10:17
lizmat and I would also think that you would only need the provides, as the files are secondary *after* a module is loaded, no ? 10:18
FROGGS lizmat: if you run a script 'foo' from path, you need files first 10:19
or if dist Font::Awesome just provides a .ttf file, and you app wants to get that shared resource only 10:20
lizmat wouldn't you have to "use Font::Awesome" first ?
FROGGS depends on how we expose %?RESOURCE I guess 10:21
I mean, the scripts do: CompUnitRepo.files('foobar', :name, :auth, :ver)
lizmat I would think you need to have *some* Perl hook to expose the .ttf 10:22
FROGGS and you can do that with font files too
lizmat to have a %?RESOURCE, implies a package in which that lives 10:23
and that implies loading a module to me
FROGGS yes yes
but you get your hands at the files via CUR.files
dalek kudo/nom: 652c245 | jnthn++ | src/core/Exception.pm:
Ignore warnings when printing exception.

Not a prefect solution, but actually getting an exception message out is better than choking over warnings issues while producing it.
10:24
jnthn .tell TimToady did something about the warning while printing exception bug 10:25
yoleaux jnthn: I'll pass your message to TimToady.
lizmat FROGGS: I'm not sure having to access CUR.files is long term a good solution 10:26
I would need to think about that some more
FROGGS lizmat: IMO that this is a very good way to query the repositories 10:27
lizmat I would be afraid of false positives
FROGGS lizmat: you need to keep in mind that there is also panda that needs to get its hands on information
dalek c: b53d3e0 | (Steve Mynott)++ | lib/ (2 files):
fix 3 typos
lizmat FROGGS: yes, I know too well, recently :-) 10:28
FROGGS lizmat: there can't be any since that is the only way to query our repositories that we also use internally
lizmat in any case, are you happy with the current state of CURLI to have a rakudo* after next week's release
? 10:29
FROGGS if I fix panda properly, yes, I think so 10:30
lizmat cool!
FROGGS++
10:46 Alina-malina left 10:53 rindolf left 11:04 cygx joined
cygx I re-submitted my IO::Handle.open pull request so the commit gets an updated commit message: github.com/rakudo/rakudo/pull/430 11:10
the parameters remain as dicussed in the previous PR
11:11 rindolf joined 11:17 domidumont joined
dalek Heuristic branch merge: pushed 120 commits to rakudo/newio by lizmat 11:17
11:17 eli-se joined 11:20 coffee` left 11:25 coffee` joined 11:26 chenryn joined 11:30 chenryn left 11:34 Peter__R left 11:37 Peter_R joined 11:45 molaf_ left 11:59 diana_olhovik_ joined 12:03 spider-mario joined 12:09 b^_^d left 12:10 Alina-malina joined 12:13 aborazmeh left
cygx m: say <\<\<> <<=><< <\<\<> 12:17
camelia rakudo-moar 652c24: OUTPUT«<< => <<␤»
timotimo that can be expressed less confusingly :) 12:19
cygx it started with a legitimate use case for <<=><< 12:21
m: say() <== <\<\<> <<=><< <\<\< \<\<>
camelia rakudo-moar 652c24: OUTPUT«<< => << << => <<␤»
timotimo i'd spell that «=>« fwiw :) 12:22
dalek ast: d773322 | usev6++ | S04-statements/lazy.t:
Update tests for 'lazy'

  'lazy' NYI -- currently works like 'do'
12:23
12:25 diana_olhovik_ left 12:30 aborazmeh joined, aborazmeh left, aborazmeh joined
timotimo i only now saw jnthn++ blogged a few hours ago :) 12:33
12:34 smash__ is now known as smash
cygx bye o/ 12:34
12:34 cygx left 12:40 sue__ joined
FROGGS wasnt there a way for a method to alias several named params to one? 12:42
ohh, probably found it
m: class Foo { has $.auth; submethod BUILD(:author(:$!auth)) { } }; say Foo.new( :auth(42) ) 12:45
camelia rakudo-moar 652c24: OUTPUT«Foo.new(auth => 42)␤»
FROGGS m: class Foo { has $.auth; submethod BUILD(:author(:$!auth)) { } }; say Foo.new( :author(42) )
camelia rakudo-moar 652c24: OUTPUT«Foo.new(auth => 42)␤»
FROGGS if anybody is curious
timotimo FROGGS: i'm glad the serialization stuff is working out at last :) 12:46
FROGGS timotimo: yes, seems so :o) 12:47
12:49 koo6 joined
itz_ I couldn't see an obvious way of doing a DNS lookup .. is it necessary to wrap gethostbyname with NativeCall? 12:55
FROGGS itz_: we could/should make this available as a sub or method me thinks 12:58
12:59 domidumont left 13:00 chenryn joined
timotimo i had a little thing built while working on UDP sockets 13:01
(sadly, i didn't work on that very much)
13:04 chenryn left 13:05 brrt joined, chenryn joined 13:13 brrt left
vendethiel m: sub bar (|args = \(1,2,3)) {...} 13:21
camelia rakudo-moar 652c24: OUTPUT«===SORRY!===␤At Frame 2, Instruction 4, op 'param_sp' has invalid number (3) of operands; needs 2.␤»
13:28 aborazmeh left 13:30 airdisa joined 13:32 kaare_ left 13:45 eli-se left
FROGGS lizmat: does CompUnit.load work? 13:52
13:54 raiph joined
rjbs Unhandled exception: No exception handler located for warn 13:54
O_o
jnthn fixed something that gave exactly that error this morning 13:55
rjbs Seems to tbe the result of too many )'s. 13:56
jnthn Around a BEGIN or constant by any chance?
DrForr rjbs: Or repeating 'returns...' as well, I've gotten that twice.
jnthn DrForr: Example? 13:57
vendethiel went to the "rust 1.0 paris meetup" last night...
(and promoted perl6!)
rjbs vendethiel: How was it?
DrForr m: sub foo() returns Int returns Int { }
camelia rakudo-moar 652c24: OUTPUT«Code object coerced to string (please use .gist or .perl to do that) in any at src/Perl6/World.nqp:2467␤5===SORRY!5=== Error while compiling /tmp/vBsGs5SkEH␤Redeclaration of return type for foo (previous return type was Int)␤at /tmp/vBsGs5SkEH:…»
vendethiel well, it was really a "meetup" as there were no formal talks, only a few people projects introduced, and tons and tons of talking
DrForr Must've gotten fixed.
vendethiel so I talked about perl6 here and there :-)
13:58 chenryn left 13:59 chenryn joined
rjbs I was looking for info on declaring the return type of a routine, but only found some ancient notes about using --> 14:00
Is this still a thing?
jnthn Yes 14:01
rjbs Yes, works... sometimes!
jnthn You get a choice.
rjbs a choice?
jnthn You can use --> *or* returns
DrForr Hadn't realized they were equivalent.
jnthn Well, --> is meant to also let you declare a variable to assign into that will become the return value, by spec. 14:02
However, we don't do that bit yet, so they're equivalent.
Heh, and I probably meant "by design" since I'll bet we've know spec tests for the variable thing... :)
rjbs Hm... 14:03
arnsholt I think people have mostly settled on using the returns trait for top-level stuff, but for embedded signatures (like callbacks) you have to use -->
rjbs Aha, my test wasn't exercising the thingy I wanted.
that's why it didn't appear to work properly
jnthn++ thanks 14:04
DrForr looks at FD_SET and wonders where this is enshrined in perl6. 14:08
rjbs gets some type checks passing just before the kid explodes. "We need to make a music video now, dad!" Off Ig o... 14:13
14:21 chenryn left 14:23 pochi_ joined 14:25 sue_ left 14:34 sue__ left 14:38 sue_ joined
itz_ Text::VimColor seems nicer than pygmentize 14:39
does anyone know if examples.perl.org has vim 7.4 14:41
lizmat FROGGS: sadly not 14:45
FROGGS lizmat: yeah, I figured I'll keep it delegating to the old module loader 14:46
lizmat yeah :-(
afk again until later &
FROGGS that's no problem, I clean up a lot already without that
14:48 skids joined
timotimo itz_: VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Mar 31 2015 23:36:03) 14:50
are you interested in any specific compilation flags? 14:51
(i'm expecting examples.perl6.org gets built and uploaded from hack.p6c.org
itz_: -perl this might be problematic perhaps? is that flag needed for Text::VimColor?
itz_ timotimo: I don't think so .. I just used it with a self built vim and I'm not embedding perl5 14:52
14:55 baest joined 14:56 airdisa_ joined 14:57 airdisa left, Sqirrel left 14:58 krakan joined
skids thought --> and returns differed in some subtle way involving where/when typechecking happens 14:58
14:59 dalek left 15:01 synbot6 left 15:02 dalek joined, LordV left, ChanServ sets mode: +v dalek 15:03 diana_olhovik_ joined 15:13 atweiden joined 15:19 telex left 15:20 telex joined, koo6 left
atweiden m: my Regex $r = / \w ** 3 123 /; my Str $w = "abc123"; say "both regex and string work" if "abc123" ~~ $r && "abc123" ~~ $w 15:24
camelia rakudo-moar 652c24: OUTPUT«both regex and string work␤»
atweiden ^am slightly confused why this commit was needed github.com/atweiden/nightscape/com...b3dc2a022e 15:25
had to go from passing Regex $r to passing Str $w essentially
skids Well,how did it exhibit failure? 15:27
atweiden Method 'match' not found for invocant of class 'Any' 15:28
15:31 vendethiel left 15:37 diana_olhovik_ left 15:38 diana_olhovik_ joined 15:39 airdisa_ left
skids I can't get a golfed version of _ls_entries to fail like that. 15:39
atweiden m: my Regex $r = / \w ** 3 123 /; say "this is why i needed sleep" if $r 15:40
camelia rakudo-moar 652c24: OUTPUT«Method 'match' not found for invocant of class 'Any'␤ in block <unit> at /tmp/oZn2EwixCw:1␤␤»
atweiden this error message appears to be from github.com/atweiden/nightscape/blo...ape.pm#L48
how do you check if a Regex stored in a variable exists?
jnthn if defined $r
if $r tries to evaluate the regex against $_
Which holds Any 15:41
atweiden works now, ty jnthn 15:42
15:48 domidumont joined, domidumont left 15:49 diana_olhovik_ left, domidumont joined 15:57 espadrine left 16:02 mst left, mst joined, kaare_ joined 16:06 brrt joined, airdisa joined
TimToady_ hmm, I wonder if we could warn somehow on /two words/ and no sigspace 16:09
16:10 molaf joined
TimToady_ alternately, always take a space between two \w as literal 16:15
FROGGS :S 16:16
"whitespace is not significant, unless..."
16:17 koo6 joined
TimToady_ yes, but the failure mode currently can be *very* frustrating to people who forget we're /x 16:17
16:18 TimToady_ is now known as TimToady 16:19 TimToady left, TimToady joined
TimToady and we don't want to frustrate people like rjbs++ 16:20
yoleaux 10:25Z <jnthn> TimToady: did something about the warning while printing exception bug
TimToady I will not always be around to spot the issue
basically, we can either disallow /two words/, or dwim it, but the current situation is not friendly 16:24
FROGGS yeah... 16:25
TimToady how often to people put spaces into alnums with the express intention of NOT matching a space there?
maybe matching hex: /aaaa bbbb ccc/
but it seems like a rare thing to want to do 16:26
if it's a warning, we need a way of disabling it
jnthn I'd lean towards disallow (or maybe warning); the dwim's behavior is confusing when there's also sigspace which allows it but with a different behavior.
TimToady well, it could be dwimmed with same behavior, \s+ 16:27
jnthn I fear that'll create more confusion that it solves... 16:28
TimToady "Fear is the mindkiller."
if a warning, how to disable... there #OK, and maybe explicit :!s 16:30
both ucky
rjbs To be fair, the thing that frustrated me was the error message, not the behavior. 16:31
I didn't get "<message string> doesn't match /regexp thing/" but some totally weird other thing that made it unclear that I'd even got the syntax of the test right, let alone the semantics. 16:32
But I cede that plenty of people may get confused by the /x-ness. But that might be just fine.
TimToady I thought that error was from the 1st sub argument
so an independent failure mode 16:33
(which also needs fixing)
skids Hrm, some recent change seems to allow Failures to escape from throws-like and hit DESTROY.
TimToady well, that's why I put the DESTROY message in, to catch those failure leaks :) 16:35
the biggest one turned out to be multidim subscripts, but I know there are others
some of them are probably places that should be sunk, but aren't, but this does seem like that kind of leak, offhand 16:37
*n'5 16:38
*n't
gotta get that n't key fixed...
rjbs TimToady: I'll try to reproduce this error... 16:40
TimToady: gist.github.com/rjbs/08c27a2152f428d3c5b8 16:41
16:41 brrt left
rjbs If that had said "Expected: string matching /your face/" I would've worked it out. I think. I at least would've not immediately panicked. :) 16:42
TimToady okay, it's trying to stringify the regex there and flubbing the message 16:44
m: say ~/your face/
camelia rakudo-moar 652c24: OUTPUT«Code object coerced to string (please use .gist or .perl to do that) in block <unit> at /tmp/4cSn4yj7Ur:1␤␤»
rjbs Aha, that makes sense!
TimToady m: say /your face/
camelia rakudo-moar 652c24: OUTPUT«␤»
TimToady but that's the gist, which is not terribly helpful either 16:45
m: say /your face/.perl
camelia rakudo-moar 652c24: OUTPUT«Use of Nil in string context in block <unit> at /tmp/yn9upIKehL:1␤regex ($: *%_) { #`(Regex|59431952) ... }␤»
TimToady nor is that...
rjbs The more I accidentally run perl instead of perl6, the more mortified I am by how many p6 programs are valid non-strict p5 programs, most of which do nothing. 16:46
Or maybe less mortified and more amused. Or possibly both. 16:47
TimToady well, the new 'unit' thing should help with that, at least for modules 16:49
doesn't help scripts though
16:52 sue_ left 16:58 koo6 left
rindolf TimToady: hi, sup? 16:59
17:05 espadrine joined 17:09 eli-se joined 17:10 koo6 joined
dalek kudo/nom: 1c4a70e | TimToady++ | lib/Test.pm:
at least use .perl if "Expected" not a string

Still not ideal, but at least it says it's a regex now.
17:10
17:11 yqt joined
ugexe is there a way to use a ::($rulename) in a regex where if $rulename fails it just moves on to the next match instead of dying? 17:16
17:18 zakharyas joined
TimToady I don't understand what you mean by ::($rulename), can you give an example? 17:20
within a regex, / <$rulename> || <otherrule> / oughta be close to what you want
well, might need to be <$::($rulename)> or so 17:21
<$rule> probably requires a hard ref 17:22
17:22 raiph left
ugexe i want to use the result of a match as a rule 17:23
so if <address=alpha> matched abcd, then <::($address)> would act like <abcd> 17:24
$<name>=["Connection"] ':' <.OWS> <Connection> <- this is the type of thing im trying to refactor (the rulename = the previous match) 17:26
having 'Connection' twice feels wrong
(elsewhere there is a token Connection {}) 17:27
s05 says a leading :: indicates a indirect subrule, and lists / <::($somename)> / as an example 17:29
17:29 cognominal joined
TimToady you might need a ~ in there somewhere to stringify the old match 17:29
m: my $somename = 'alpha'; say 'abc' ~~ /<::($somename)>+/ 17:30
camelia rakudo-moar 652c24: OUTPUT«「abc」␤»
TimToady the mechanism seems to work, at least with a built-in method 17:31
are you doing this in a grammar, or trying to do it with lexical scopes?
ugexe in a grammar 17:32
TimToady have you tried <::(~$somename)> ?
ugexe not yet, but im about to :) 17:33
TimToady or stringified the earlier match somehow?
ugexe no... i think in my head i assumed that since im matching a literal string that the match was a string for some reason
TimToady you'd think a symbolic ref would stringify by default...
17:34 raiph joined, koo6 left
TimToady m: "rand" ~~ /(\w+)/; say ::($0) 17:35
camelia rakudo-moar 652c24: OUTPUT«===SORRY!===␤No such symbol 'rand'␤»
TimToady m: "pi" ~~ /(\w+)/; say ::($0)
camelia rakudo-moar 652c24: OUTPUT«3.14159265358979␤»
TimToady seems to stringify automatically there 17:36
m: "alpha" ~~ /(\w+)/; my $alpha = $0; say 'foo' ~~ /<::($alpha)>/ 17:37
camelia rakudo-moar 652c24: OUTPUT«「f」␤»
TimToady seems to stringify there too, so dunno where you're going rwong
you're not trying to use $<thatthing> inside as a reference to a previous regex, are you? 17:38
you have to save it in a temporary if you want to do that, like I did with $alpha, since $0 would refer to the current regex, not the previous
p6 regex don't rely on string interpolation like p5 regex do 17:39
or use ::($oldmatch<thatthing>) if you saved the previous match in $oldmatch 17:40
ugexe i get Method '' not found for invocant of class 'Zef::Grammars::HTTP::RFC7230'. The <::($rulename)> is from an inherited rule, but i dont think that would affect it. Running with grammar::tracer/debugger dies with the same message too so ive lost the easy way to step through it :(
TimToady how are you loading $rulename, and is it in an appropriate scope to be visible? 17:41
well, it must be visible or it would give a compile-time error 17:42
so must be a lifetime/dynamic issue
ugexe its inherited from another class (a role really). 'is ExtendedRules'
if i hard code the rule in its fine
hard code the rule as in <Rule>
TimToady you can't inherit a variable, so I don't know what you mean by the variable $rulename is inherited
is your code literally <::($rulename)>? 17:43
ugexe but <$rulename> is a token that is inherited
TimToady what sets $rulename?
ugexe in $<name>=["Accept"] ':' <::($<name>)>, $rulename is $<name>
in $<name>=["Accept"] ':' <Accept>, this works. token Accept is inherited 17:44
TimToady m: say "alpha:foo" ~~ /$<name>="alpha" ':' <::($<name>)>/ 17:46
camelia rakudo-moar 652c24: OUTPUT«Use of Nil in string context in block <unit> at /tmp/nPHFuHrFYp:1␤Method '' not found for invocant of class 'Cursor'␤ in block <unit> at /tmp/nPHFuHrFYp:1␤␤»
TimToady okay, I think I've reproduced it there
ah, I think this is a known bug 17:47
ugexe yeah that looks like what ive experienced
TimToady m: say "alpha:foo" ~~ /$<name>="alpha" ':' {} <::($<name>)>/
camelia rakudo-moar 652c24: OUTPUT«「alpha:f」␤ name => 「alpha」␤»
TimToady yes, known bug
rakudo doesn't set up $/ unless you poke an extraneous {} in there
ugexe how does {} work around it?
ah
thanks, id have never figured that out 17:48
TimToady everyone keeps hoping someone else will fix this :)
so I guess I'd better put it on my personal todo list
I suspect the actual solution is to not really use a Match object for refs to $/ inside a regex, but fake access into the current Cursor instead, rather like STD does 17:50
ugexe and here i thought it had to do with :: discarding the previous match or something. must have been thinking of ::: 17:51
TimToady that :: has nothing to do with backtracking, just symreffing 17:52
same as ::($foo) outside in normal p6
on top of which, :: and ::: aren't implemented yet in rakudo...
FROGGS I was thinking about implementing ::, but I dunno where to start 17:54
TimToady well, all such cuts have to basically throw out some of the bstack 17:55
FROGGS m: say "alpha:foo" ~~ /$<name>="alpha" ':' <{ say $<name> }> /
camelia rakudo-moar 1c4a70: OUTPUT«「alpha」␤Nil␤»
FROGGS m: say "alpha:foo" ~~ /$<name>="alpha" ':' <{ say $.CURSOR.caps<name> }> /
camelia rakudo-moar 1c4a70: OUTPUT«5===SORRY!5=== Error while compiling /tmp/346AuGzq6w␤Variable $.CURSOR used where no 'self' is available␤at /tmp/346AuGzq6w:1␤------> 3 ~~ /$<name>="alpha" ':' <{ say $.CURSOR7⏏5.caps<name> }> /␤ expecting any of:␤ argument li…»
FROGGS m: say "alpha:foo" ~~ /$<name>="alpha" ':' <{ say self.CURSOR.caps<name> }> /
camelia rakudo-moar 1c4a70: OUTPUT«5===SORRY!5=== Error while compiling /tmp/FUMD6pwjnu␤'self' used where no object is available␤at /tmp/FUMD6pwjnu:1␤------> 3pha:foo" ~~ /$<name>="alpha" ':' <{ say 7⏏5self.CURSOR.caps<name> }> /␤ expecting any of:␤ argument li…»
FROGGS m: say "alpha:foo" ~~ /$<name>="alpha" ':' <{ say $/.CURSOR.caps<name> }> /
camelia rakudo-moar 1c4a70: OUTPUT«Method 'caps' not found for invocant of class 'Cursor'␤ in block <unit> at /tmp/unXZs2mM3d:1␤␤»
TimToady whether trimming the bstack will automatically manage the cstack correctly is something I don't know offhand 17:59
17:59 koo6 joined
ugexe is <sym> constructed at a different point that named matches? 18:01
s/that/than/
FROGGS ugexe: yes 18:02
18:03 yqt left
ugexe m: grammar X { TOP { <header> }; proto token header {*}; token header:sym<Accept> { ':' <.ws> {} <::($<sym>)> }; multi token Accept { <alpha> }; }; X.parse("Accept: asdf"); # just foolin around, but this is why i asked 18:03
FROGGS nqp/src/QRegex/P6Regex/Actions.nqp:568: my $loc := nqp::index(%*RX<name>, ':sym<');
camelia rakudo-moar 1c4a70: OUTPUT«Error while constructing error object:Could not locate compile-time value for symbol Undeclared::Symbols␤===SORRY!===␤Error while compiling, type X::Undeclared::Symbols␤ routine_suggestion: (unstringifiable object)␤ post_types: (unstringifiable o…»
FROGGS m: grammar X { TOP { <header> }; proto token header {*}; token header:sym<Accept> { ':' <.ws> {} <::('&' ~ $<sym>)> }; multi token Accept { <alpha> }; }; X.parse("Accept: asdf"); 18:04
camelia rakudo-moar 1c4a70: OUTPUT«Error while constructing error object:Could not locate compile-time value for symbol Undeclared::Symbols␤===SORRY!===␤Error while compiling, type X::Undeclared::Symbols␤ routine_suggestion: (unstringifiable object)␤ post_types: (unstringifiable o…»
18:04 zakharyas left
FROGGS m: grammar X { TOP { <header> }; proto token header {*}; token header:sym<Accept> { ':' <.ws> {} <{ say $<sym>; '' }> <::($<sym>)> }; multi token Accept { <alpha> }; }; X.parse("Accept: asdf"); 18:04
camelia rakudo-moar 1c4a70: OUTPUT«Error while constructing error object:Could not locate compile-time value for symbol Undeclared::Symbols␤===SORRY!===␤Error while compiling, type X::Undeclared::Symbols␤ routine_suggestion: (unstringifiable object)␤ post_types: (unstringifiable o…»
18:05 zakharyas joined
FROGGS ewww 18:05
ugexe: 1) don't use X as package name 18:06
ugexe: 2) 'TOP' need to be a token or rule or regex
m: grammar G { token TOP { <header> }; proto token header {*}; token header:sym<Accept> { <sym> ':' <.ws> {} <::($<sym>)> }; multi token Accept { <alpha> }; }; say G.subparse("Accept: asdf"); 18:07
camelia rakudo-moar 1c4a70: OUTPUT«「Accept: a」␤ header => 「Accept: a」␤ sym => 「Accept」␤»
ugexe why does this compiler keep assuming i have any clue what im doing??
FROGGS :P 18:08
m: grammar G { token TOP { <header> }; proto token header {*}; token header:sym<Accept> { <sym> ':' <.ws> {} <::($<sym>)> }; multi token Accept { <alpha>+ }; }; say G.subparse("Accept: asdf");
camelia rakudo-moar 1c4a70: OUTPUT«「Accept: asdf」␤ header => 「Accept: asdf」␤ sym => 「Accept」␤»
FROGGS m: grammar G { token TOP { <header> }; proto token header {*}; token header:sym<Accept> { <sym> ':' <.ws> <::($<sym>)> }; multi token Accept { <alpha>+ }; }; say G.subparse("Accept: asdf");
camelia rakudo-moar 1c4a70: OUTPUT«Use of Nil in string context in regex header:sym<Accept> at /tmp/MNzsykzoZl:1␤Method '' not found for invocant of class 'G'␤ in regex header:sym<Accept> at /tmp/MNzsykzoZl:1␤ in regex header at /tmp/MNzsykzoZl:1␤ in regex TOP at /tmp/MNzsykzoZl…»
FROGGS so, $<sym> also needs a proper $/ 18:09
18:10 raiph left 18:15 raiph joined
DrForr Gotta experiment with the 'proto token' declaration. 18:15
18:15 atweiden left, eli-se left 18:22 yqt joined 18:29 airdisa left
TimToady hah, put in a non-sigspace warning, and found errors in S32-exceptions/misc.t :D 18:40
18:45 araujo left
FROGGS :D 18:45
18:49 xfix joined, xfix left, xfix joined
dalek ast: 6117739 | TimToady++ | S32-exceptions/ (2 files):
we accidentally some sigspace
18:52
rjbs TimToady: It's always fun when new warnings find core bugs. We've seen that a lot in the last couple years, too.
dalek p: 1036654 | TimToady++ | src/QRegex/P6Regex/Grammar.nqp:
warn on nonsig space between alnums
rjbs My favorite were "return foo() or die" which turned up all over.
TimToady "That trick never works!" 18:53
FROGGS rjbs: I also found bugs in P5's test suite when working on the v5 slang... since v5's grammar was stricter
18:53 araujo joined
FROGGS like that one: 18:56
splice @Foo::ISA, 0, 0, 'Bar';
-ok( !oo->isa('Bar'), 'splice @ISA and make Foo a Bar');
+ok( Foo->isa('Bar'), 'splice @ISA and make Foo a Bar');
from t/op/splice.t
18:57 kaare_ left
TimToady oo! 18:57
18:57 travis-ci joined
travis-ci NQP build failed. TimToady 'warn on nonsig space between alnums' 18:57
travis-ci.org/perl6/nqp/builds/62842572 github.com/perl6/nqp/compare/f2f81...366545ca12
18:57 travis-ci left
geekosaur oo-bleck :p 18:58
FROGGS wow, my CURLI stuff does not give any spectest fallout... and Inline::Perl5 works too (except that precomp.t fail which happens with nom too)
t/qregex/01-qregex.t (Wstat: 0 Tests: 767 Failed: 6)
Failed tests: 722-727
TimToady oo, I dint run the nqp tests :) 18:59
FROGGS I tend to forget 'oo 19:00
raydiak_ ood
TimToady and apparently .worry is fatal in nqp...
maybe there's a .be-happy method I can use 19:01
FROGGS groans
rjbs searches for information on .worry
rjbs finds article from 2004, "I'm worried about Perl 6."
FROGGS hehe
rjbs will have to let that guy know that it's doing fine.
FROGGS rjbs++ 19:02
19:03 airdisa joined 19:05 araujo left 19:06 araujo joined
dalek p: 6aeeff1 | TimToady++ | t/qregex/rx_modifiers:
work around new non-sigspace warning
19:15
masak tries to reproduce rjbs++' search, but only finds people being worried about JavaScript, and the future of Python 19:16
TimToady FROGGS++ for spotting nqp test failure, TimToady-- for not 19:17
19:19 zakharyas left, rindolf left
FROGGS travis++ for telling me :o) 19:21
19:27 travis-ci joined
travis-ci NQP build passed. TimToady 'work around new non-sigspace warning' 19:27
travis-ci.org/perl6/nqp/builds/62844296 github.com/perl6/nqp/compare/10366...eeff16f7bf
19:27 travis-ci left
dalek p/curly: 8dab64c | FROGGS++ | src/vm/moar/QAST/QASTOperationsMAST.nqp:
map new scdisclaim op on moar
19:29
kudo/curly: 1633ebb | FROGGS++ | src/core/Distribution.pm:
restructure Distribution; do work once
19:32
19:38 eli-se joined
dalek kudo/nom: 580ede2 | TimToady++ | tools/build/NQP_REVISION:
bump NQP to get new warning
19:41
kudo/curly: 038589a | FROGGS++ | src/core/CompUnitRepo/Locally.pm:
do no create CURL directories "automagically"

We will ever only create dirs when asked to place files there. This solves RT #125141. This also implies that we cannot skip CURLs just because their directory does not exist yet.
19:42
kudo/curly: 66a5ab0 | FROGGS++ | src/core/CompUnitRepo/Locally.pm:
use # instead of : for path-spec/include-spec
19:43
kudo/curly: 233f299 | FROGGS++ | src/core/CompUnit.pm:
add :ver/:auth to CompUnit so it matches "use" statements
19:46
kudo/curly: b10fc74 | FROGGS++ | src/core/Inc.pm:
put CUR object into %*CUSTOM_LIB for panda

Panda needs to check whether site or home are under control of a CUR, and therefore manage theirself.
19:50
TimToady re <<=><< I'd probably spell it X=> instead 19:53
or maybe 𒆨 19:55
19:56 brrt joined
dalek kudo/curly: 173258a | FROGGS++ | src/core/CompUnit (4 files):
serialize CURLI database to "bytecode" instead of json

This has several reasons. The most important one is that this let use get rid of the performance penalty which json gave us. When hundreds of dists were installed the startup time increased to over 5s easily. Now the startup time for -e1 is unchanged (lazy deserialization ftw), and using (and therefore locating) modules is more effective. Also a benefit of not having to deal with json is that we can stick Distribution and CompUnit objects in our database, which reduces our CURL code a lot.
19:57
jnthn hah, I'd never quite imagined lazy deserialization would end up being useful *here* also :D 19:58
FROGGS++
FROGGS :o)
jnthn It was a darn nuisance to implement, so I'm kinda glad. :P
FROGGS jnthn: now I'm going to clean up MoarVM so it is pushable, and then I'll care about jvm 19:59
jnthn++ # aye
there is one issue though, when the MANIFEST is invalid (outdated), I cannot catch the exception thrown by nqp::deserialize 20:00
it explodes in GC_WORKLIST_ADD or so
raydiak_ m: say ''
camelia rakudo-moar 1c4a70: OUTPUT«␤»
jnthn o.O
20:00 eli-se left
jnthn I'd appreciate a compact test case 20:00
FROGGS jnthn: I think it is unhappy with the string heap it is never going to use or so
TimToady m: say() 20:01
camelia rakudo-moar 1c4a70: OUTPUT«␤»
jnthn OK
raydiak_ anyone else seen this today? ==> Fetching Shell::Command␤extend/trunc NYI␤ in sub find at @targets:626␤ in sub rm_rf at lib/Shell/Command.pm:28␤...
FROGGS jnthn: we usually never carry on after failing there, but I want/need to
raydiak_: no 20:02
20:02 raydiak_ is now known as raydiak
jnthn FROGGS: Yeah, I suspect it's fixable 20:02
Without too much pain
FROGGS ==> Successfully installed Shell::Command
jnthn: that's why I want to care about that later
20:02 eli-se joined
jnthn FROGGS: OK. Well, I should really rest rather than code this evening, but I'll happily take a look in the next couple of days. 20:03
FROGGS jnthn: sure :o) 20:04
jnthn: have a nice evening/rest
20:05 fhelmberger joined
raydiak wow getting all kinds of interesting stuff trying to rebootstrap panda, now a "Bytecode validation error" about "register operand index out of range"...maybe rakduobrew and bootstrap panda fresh from scratch or something 20:06
FROGGS yeah, sounds like moar/rakudo mismatch or so
TimToady pretty much always prefers --> over returns
jnthn TimToady: Odd, I more naturally reach for the latter. :) 20:07
TimToady I noticed that, which is why I said that :)
raydiak FROGGS: but whenever I get this sorted out...it's my first stab at making panda search show multiple projects by the same name :)
eli-se --> is weird as it's inside the parentheses
TimToady it's not weird there as it's part of the API 20:08
FROGGS \o/
++raydiak
raydiak FROGGS++ # always helpful and encouraging :)
FROGGS *g* 20:09
raydiak: it is more fun this way :o)
raydiak huh, fresh rakudobrew gives same bytecode error when trying to bootstrap it's own panda even...will gist
FROGGS :S
TimToady considering the signature to be only input API is sort of an implementation-oriented point of view, or at least dispatch-oriented, in my opinion 20:10
20:10 fhelmberger left
raydiak gist.github.com/raydiak/4052b5cc235b37be6772 20:10
masak --> is one of the things not making sense on the binding side of the signatures/binding unification. 20:11
raydiak (the command was 'rakudobrew build moar' and all the output before the gist looked like always)
argh scratch that, sorry getting too many windows open, mixed them up :P 20:12
DrForr I just replaced some CPointers with callbacks, it'd be nice to know how to typedef the callbacks like you do in C, but I assume there's a new Perl mechanism.
TimToady masak: it's not about bindings, it's about functions 20:14
FROGGS sub foo(&cb :(int32 --> Str)) is native { * } # DrForr
masak TimToady: right. 20:15
m: say \($x).WHAT
camelia rakudo-moar 1c4a70: OUTPUT«5===SORRY!5=== Error while compiling /tmp/NB2m5NN7wv␤Variable '$x' is not declared␤at /tmp/NB2m5NN7wv:1␤------> 3say \(7⏏5$x).WHAT␤»
masak m: say :($x).WHAT
camelia rakudo-moar 1c4a70: OUTPUT«(Signature)␤»
masak m: my :($x) := 4; say $x
camelia rakudo-moar 1c4a70: OUTPUT«5===SORRY!5=== Error while compiling /tmp/224SoODavW␤Malformed my␤at /tmp/224SoODavW:1␤------> 3my7⏏5 :($x) := 4; say $x␤»
DrForr FROGGS: I understand the mechanism, I'd just like to be able to package (int32 --> Str) as a type in its own right.
masak m: my $x; :($x) := 4; say $x
camelia rakudo-moar 1c4a70: OUTPUT«Too few positionals passed; expected 1 argument but got 0␤ in block <unit> at /tmp/JF1hL5H_mR:1␤␤»
masak m: my $x; :($x) := (4,); say $x 20:16
camelia rakudo-moar 1c4a70: OUTPUT«4␤»
masak m: my $x; :($x --> Int) := (4,); say $x
camelia rakudo-moar 1c4a70: OUTPUT«4␤»
masak TimToady: my point is that in that binding above, the `--> Int` is nonsensical.
TimToady well, the space isn't supposed to be allowed before the colon there anyway... 20:17
FROGGS DrForr: IMO it is not designed to work that way...
TimToady but it's a constraint on what function you can bind, even if it's not currently enforced
DrForr FROGGS: No worries, I'll suss it out. 20:18
TimToady the constraint becomes more important when binding to &cb:(int32 --> Str) and such 20:19
dalek kudo/curly: 9791ed5 | FROGGS++ | src/core/CompUnit.pm:
initialize :aut/:ver to avoid warnings
20:21
FROGGS fwiw, I pushed to panda/curly 20:26
dalek kudo-star-daily: 7c137cb | coke++ | log/ (2 files):
today (automated commit)
kudo-star-daily: 068a2d9 | coke++ | log/ (2 files):
today (automated commit)
rl6-roast-data: 8f9c91f | coke++ | / (9 files):
today (automated commit)
eli-se I haven't written Perl 6 code since a long time. Might write a bra*nfuck compiler in it and read the changelog (if there is one). 20:28
TimToady m: /foo bar/ 20:29
camelia rakudo-moar 580ede: OUTPUT«Potential difficulties:␤ Space is not signficant here; please use quotes or :s (:sigspace) modifier (or, to suppress this warning, omit the space, or otherwise change the spacing)␤ at /tmp/4kh26Mv_J4:1␤ ------> 3/foo7⏏5 bar/␤»
FROGGS m: /foo bar/ 20:32
camelia ( no output )
FROGGS m: /foo␤bar/ 20:33
camelia ( no output )
TimToady it checks only for a single space
FROGGS yeah, I guessed it is intentional
20:34 darutoko left 20:37 zakharyas joined
raydiak FROGGS: github.com/raydiak/panda/compare/m...iak:plural seems enough to get both Foos to show up from panda search without obviously breaking anything else 20:40
tadzik++ did a nice job on the encapsulation here
FROGGS raydiak: wow, I expected more changes... 20:41
raydiak FROGGS: me too :)
FROGGS raydiak: now we need a way to pick... 20:42
raydiak but it passes all it's tests, and even "panda look Foo" works (just pulls the last one in the list, obviously, no way to...
yeah that :)
FROGGS like filtering with --auth and --ver, and when it is still ambiguous it should prompt or so
bartolin m: say '3e4d5'.Int 20:43
camelia rakudo-moar 580ede: OUTPUT«Cannot convert string to number: trailing characters after number in '3e4⏏d5' (indicated by ⏏)␤ in block <unit> at /tmp/D7PawNJp0i:1␤␤»
bartolin ^^ it is correct that this fails, isn't it?
20:43 cognominal left
FROGGS bartolin: aye 20:43
bartolin will change two bogus tests in S32-num/int.t; FROGGS++ 20:44
TimToady it ain'ta gonna magically turn into hex for you
bartolin *g*
FROGGS m: try +'3e4d5'; say 'alive'
camelia rakudo-moar 580ede: OUTPUT«alive␤»
FROGGS that was broken for a long time though, and jnthn++ fixed it just recently 20:45
TimToady darn his hide, he keeps making the rest of us look like slackers... :) 20:46
FROGGS :P
20:46 dolmen joined
raydiak FROGGS: I'll have a look at --ver and --auth next then :) though I'll be leaving relatively soonish for a few errands and to visit my mother, so might not have anything to show for that until at least this PDT evening 20:46
dalek ast: 5afa999 | usev6++ | S32-num/int.t:
Fix two skipped tests
FROGGS raydiak: np, have fun :o)
I pushed all my curly stuff today... and need to port nqp::scdisclaim to jvm tomorrow *shudder* 20:47
raydiak of course, if it goes like the first step did, it could be done before I leave :)
FROGGS raydiak: just pass it around and smartmatch against it, if it was supplied 20:48
raydiak: like here: github.com/rakudo/rakudo/blob/curl...on.pm#L221 20:49
you need to turn both sides into a Version though 20:50
rule is: nothing or Whatever means v0
like seen here: github.com/rakudo/rakudo/blob/curl...ion.pm#L23
20:50 domidumont left
TimToady maybe I'll try to tackle cursors pretending to be pseudo-match objects soon, to solve both the need-{} problem and maybe gain some performance through procrastinating actual Match construction till it's no longer needed 20:51
FROGGS yeah
TimToady but speaking of procrastinating...
slacker nap &
FROGGS *g*
TimToady: nap well :o)
gnight #perl6 20:52
masak 'night, FROGGS
bartolin o/
eli-se goodbye frog 20:54
raydiak FROGGS: I see, makes sense...g'night o/ 20:55
21:01 xfix left 21:02 airdisa left 21:03 brrt left
dalek pan style="color: #395be5">perl6-examples: aacc2a9 | paultcochrane++ | t/categories/cookbook/17sockets.t:
[cookbook] add test for 17sockets subcategory
21:03
pan style="color: #395be5">perl6-examples: 22f1c61 | paultcochrane++ | categories/ (3 files):
Merge branch 'master' of github.com:perl6/perl6-examples
pan style="color: #395be5">perl6-examples: f0c2694 | paultcochrane++ | categories/euler/prob105-shlomif.p6:
[euler] progress info now printed with --verbose option
pan style="color: #395be5">perl6-examples: 0a0b8b5 | paultcochrane++ | categories/euler/prob105-shlomif.p6:
[euler] document solution to problem 105
pan style="color: #395be5">perl6-examples: a99a9d4 | paultcochrane++ | categories/euler/prob105-shlomif.p6:
[euler] set input file location independently to run location
pan style="color: #395be5">perl6-examples: fb2fa40 | paultcochrane++ | t/categories/euler.t:
Handle script files ending in .p6
pan style="color: #395be5">perl6-examples: 7f4b99d | paultcochrane++ | t/categories/euler.t:
[euler] Add test for solution to problem 105
c: 272df19 | paultcochrane++ | lib/Language/unicode_entry.pod:
Mention how to produce super/subscripts
21:06
c: 8d609da | paultcochrane++ | / (6 files):
Merge branch 'master' of github.com:perl6/doc
masak [ptc]: `git pull --rebase` will avoid merges such as the above one. 21:12
21:12 FROGGS left 21:13 CAAWGJB joined
masak also, [ptc]++ # commits 21:13
[ptc] masak: k, thanks
sorry for the merge commits, they annoy me too...
masak git is confusing until it isn't :) 21:14
21:16 FROGGS joined
[ptc] heh :-) 21:17
I've just stumbled across an interesting issue: if a module can't be found, perl6 returns 0 back to the shell 21:18
shouldn't it return non-zero?
masak I'd assume so.
[ptc] maybe it's been fixed since 2015.04
however, I'm updating the travis build scripts for Rakudo and I happened to notice that although a module wasn't found, the script returned everything ok 21:19
masak tries locally
I'm getting 1 here.
[ptc] hrm, maybe it has been fixed more recently
21:20 zakharyas left
[ptc] hrm, I'm getting 0 here (Debian Linux, This is perl6 version 2015.04-229-ga7cf7ce built on MoarVM version 2015.04-103-g65c89e7) 21:21
masak what exactly is it that you're running? 21:22
[ptc] it's not a major issue which has to be fixed quickly, just thought it might be good for someone to know about it
masak I tried `perl6 -MFoo -e 'say 42'` without a Foo.pm
21:23 espadrine left
[ptc] I'm using `perl6 -Ilib t/*.t; echo $?` and the module IO::Capture::Simple doesn't exist in perl6's search path 21:23
although your example gives me an exit code of 1
masak ok, now we're talking :) 21:24
[ptc]: I task you with finding out why yours returns 0 and mine 1 ;)
what's the significant difference?
21:24 dolmen left
[ptc] well, mine is running a file directly 21:25
masak nope.
[ptc]: I put `use Foo;` in a file and ran it. still 1.
[ptc] um, the wildcard? 21:26
masak that's shell, not perl6
[ptc] that's what I thought...
masak also, I don't think you can run several *.t files like that.
[ptc] masak: `perl6` is only looking in -Ilib? 21:27
ah
masak only the first argument to `perl6` is the script file.
but this should all be unrelated to the issue you're seeing.
still haven't found out why.
[ptc] at least it's an interesting problem :-)
masak yes. good luck :) 21:28
[ptc] thanks for the tip about multiple files, that should stop me tripping up again later :-) 21:29
masak sometimes I feel that bash is very antiquated. 21:31
21:32 raiph left
masak its quoting, escaping and glob expansion all feel like they have fundamental design flaws that trip people up. 21:32
21:34 Sqirrel joined
[ptc] g'night masak :-); g'night #perl6 21:36
geekosaur it's also trying to maintain compatibility with a standard based on an antiquated shell that had design flaws
and sadly there are scripts that depend on its idiosyncrasies
spider-mario I can’t stand bash 21:38
ugexe powershell is great
spider-mario when I have to write a shell script, I’ll generally write a fish script, or a perl script if it’s somewhat complex
I think most of the bash I write is for arch linux PKGBUILDs 21:39
and even then… :D
aur.archlinux.org/packages/ru/rust-git/PKGBUILD 21:40
look at `prepare()` :p
21:42 FROGGS left, FROGGS joined 21:52 quester joined 21:59 FROGGS left 22:00 andreoss joined
andreoss m: <1/2>.denominator.say 22:01
camelia rakudo-moar 580ede: OUTPUT«2␤»
andreoss m: Rat.new(numerator => 1, denominator => 3).denominator.say 22:02
camelia rakudo-moar 580ede: OUTPUT«1␤»
andreoss m: Rat.new(:numerator(1), :denominator(3)).numerator.say 22:03
camelia rakudo-moar 580ede: OUTPUT«0␤»
22:08 cognominal joined
raydiak m: my $r = rx/foo/; say ?$r 22:10
camelia rakudo-moar 580ede: OUTPUT«Method 'match' not found for invocant of class 'Any'␤ in block <unit> at /tmp/tVcGRB2OJY:1␤␤»
raydiak is that what it's supposed to do?
ugexe m: my $r = rx/foo/; say .$r 22:18
camelia rakudo-moar 580ede: OUTPUT«Method '!cursor_start' not found for invocant of class 'Any'␤ in block <unit> at /tmp/iIhpvU6X1s:1␤␤»
lizmat is too tired too look at backlog now, will do so tomorrow
raydiak if it wasn't clear what I'm trying to do, I just want to know if the thing in $r boolifies to true...I figured this would always be true for regex objects except for the Regex class object, but I guess boolifying them triggers a match attempt of some sort instead 22:35
raydiak ended up with $r ~~ Regex || ?$r for now 22:37
since I don't actually care about the undef (Regex) case in this instance 22:38
TimToady m: Rat.new(numerator => 1, denominator => 3).nude.say 22:45
camelia rakudo-moar 580ede: OUTPUT«0 1␤»
TimToady m: Rat.new(1, 3).nude.say
camelia rakudo-moar 580ede: OUTPUT«1 3␤»
TimToady m: Rat.new(numerator => 21, denominator => 3).nude.say 22:46
camelia rakudo-moar 580ede: OUTPUT«0 1␤»
TimToady odd
m: Rat.new().nude.say
camelia rakudo-moar 580ede: OUTPUT«0 1␤»
TimToady strange default 22:47
and another call for "unused named parameter" warning
er, argument
masak wouldn't such a warning kind of spoil the hoops we jump through in the name of S12 "Interface Consistency"? 22:48
TimToady well, it'd only complain if there were no candidate that wants that name, I presume 22:50
andreoss m: <1/2>.denominator.say
camelia rakudo-moar 580ede: OUTPUT«2␤»
TimToady andreoss: it's easier to type .nude and get both of them 22:51
andreoss why those are not passed to thhe constructor?
TimToady same reason Int.new(:value(42)) doesn't work 22:52
it's not necessarily a good reason
andreoss m: Rat.new(nu => 1, de => 3).denominator.say
camelia rakudo-moar 580ede: OUTPUT«1␤»
masak m: class C { method foo { say "C" } }; class D is C { method foo(:$bar) { say "D ($bar)" } }; say .foo(:bar(42)) for C.new, D.new
camelia rakudo-moar 580ede: OUTPUT«C␤True␤D (42)␤True␤»
TimToady no, it's just ignoring our args
masak m: class C { method foo { say "C" } }; class D is C { method foo(:$bar) { say "D ($bar)" } }; .foo(:bar(42)) for C.new, D.new
camelia rakudo-moar 580ede: OUTPUT«C␤D (42)␤»
masak TimToady: in the above code, should it warn that C's .foo doesn't expect a :bar ? 22:53
TimToady we have only a constructor that takes up to two positionals for Rat
22:53 andreoss left
TimToady masak: once we actually have a list of candidates for a known type, we can compute the set of wanted names, as long as nobody has explicitly referenced %_ 22:54
labster There are a lot of Parrot related PRs in the Rakudo repo. Should I just close them, or is there a branch somewhere that I can put Parrot commits in?
22:55 andreoss joined
andreoss m: &(Rat.new).perl.say 22:55
camelia rakudo-moar 580ede: OUTPUT«0.0␤»
TimToady it defaults to 0/1
andreoss how can i see the signature here?
skids TimToady: I would assume callsame/nextsame counts as explcitly referencing %_?
TimToady m: say Rat.new(1,2,3)
camelia rakudo-moar 580ede: OUTPUT«Too many positionals passed; expected 1 to 3 arguments but got 4␤ in block <unit> at /tmp/fPR65tjznN:1␤␤»
TimToady m: say Rat.can('new') 22:56
camelia rakudo-moar 580ede: OUTPUT«new new␤»
TimToady m: say .signature for Rat.can('new')
camelia rakudo-moar 580ede: OUTPUT«Use of Nil in string context in block at /tmp/_SgYLcofrx:1␤(Rat: Int \nu = { ... }, Int \de = { ... }, *%_)␤($: Any |)␤»
TimToady hum, where's the Nil from? 22:57
m: say Rat.can('new')[0].signature 22:58
camelia rakudo-moar 580ede: OUTPUT«Use of Nil in string context in block <unit> at /tmp/XYgMtaVvR4:1␤(Rat: Int \nu = { ... }, Int \de = { ... }, *%_)␤»
TimToady m: say Rat.can('new')[1].signature
camelia rakudo-moar 580ede: OUTPUT«($: Any |)␤»
japhb Can't install Inline::Python right now on a fresh build ... known? 23:03
raydiak maybe I don't fully comprehend the semantics involved, but I never really got the whole interface consistency excuse...I for one wouldn't expect nextsame et al to accept and magically shunt args through that I didn't declare params for. naievely before knowing the real rules, if they pass a named that I didn't explicitly declare, I wouldn't expect multidispatch to even call a routine in the first place if the 23:04
signature doesn't match the args without special *%_ magic
japhb Looks to be not finding its .so: "unable to find Inline/pyhelper.so IN @*INC"
23:05 berekuk left
japhb raydiak: You have an array of things that are either Foo or Bar, where Bar inherits from Foo. You want to call a method (defined in Foo, enhanced in Bar) on all elements of the array, and for Bar elements to use its extra settings. How do you do that cleanly? 23:06
(And if your answer is a type test on each element, assume the array is filled with 56 different types all inheriting from a common base, and try again.) 23:07
masak japhb++ # good explanation
TimToady plus, assume some of the arguments are aimed at a single layer, while others are aimed at most or all of them
japhb .? allows automatically ignoring if an object doesn't have a method, but it is the named argument magic that allows us to do it if the method exists, but subtypes have more settings 23:08
raydiak japhb++ quite illustrative :) will ponder...
masak I've come to think of it as "base class method must assume unknown named arguments are for deriving classes' methods"
23:08 eli-se left
japhb nodnod 23:08
23:09 BenGoldberg joined
masak 'night, #perl6 23:10
raydiak g'night masak o/
japhb o/ masak
raydiak off the top of my head I'd try to arrange things so the Bar method is responsible for calling the Foo method instead of the other way around
jdv79 kinda like a big blowtorch - meh'cur" work broke it... 23:11
japhb raydiak: If it is an outside iterator that is calling the same method on all elements, how does that work?
jdv79 uh, no
raydiak shouldn't multidispatch select Bar in preference to Foo anyway?
jdv79 japhb: rumor is the recent "cur" work broke it Inline::Python
japhb raydiak: named arguments aren't engaged in multidispatch
jdv79: Awww 23:12
jdv79 i also would like to install it; someday
japhb raydiak: Also, my argument applies to regular methods as well, not just multimethods
raydiak japhb: the last statement is specifically refering to multidispatch on the invocant's type
hm 23:13
japhb raydiak: It sounds like you're looking for multimethods and .? instead of . for your method dispatch method
raydiak wait what does nextsame have to do with non-multis? 23:14
oh, right, b/c there can be one per level of inheritance even if it's not a multi 23:15
japhb: thanks for helping me make sure I fully understand the problem...will ponder more :) 23:16
23:19 andreoss left
dalek kudo/nom: 8eb18e8 | TimToady++ | src/core/Parameter.pm:
don't do ~Nil in Param.perl
23:22
23:27 jack_rabbit_ left, jack_rabbit_ joined 23:28 jack_rabbit_ left
raydiak would it be a more reasonable compromise to tell people to add explicit *% when they require it for nextsame? 23:29
23:29 jack_rabbit joined
raydiak rather than compromise the integrity of parameter-checking on every single method call on anything anywhere? 23:31
23:31 spider-mario left
TimToady that only works one direction, and probably the wrong direction 23:33
a parent class cannot predict what a child class will want, so every parent would have to add *% 23:34
which is equivalent to what we have
raydiak /o\ 23:38
ah well, I'll let it percolate in my mind until it settles or another question bubbles up (later) 23:40
23:51 redhands joined 23:54 redhands left 23:55 raiph joined