Zoffix m: dd % .classify-list: sub ($x) { $x eq 'a' ?? 'z' !! <x y> }, <a b c> 00:00
camelia rakudo-moar e8a61d: OUTPUT«Hash % = {:x(${:y($["b", "c"])}), :z($["a"])}␤»
Zoffix m: dd % .classify-list: sub ($x) { $x eq 'a' ?? 'a' !! <a b> }, <a b c>
camelia rakudo-moar e8a61d: OUTPUT«Type Array does not support associative indexing.␤ in block <unit> at <tmp> line 1␤␤Actually thrown at:␤ in block <unit> at <tmp> line 1␤␤»
Zoffix heh. piece of crap :)
And I guess that might answer my question as to why mapper needs to return same-level items 00:01
Zoffix will fix this tomorrow
committable6, 2016.09 dd % .classify-list: sub ($x) { $x eq 'a' ?? 'a' !! <a b> }, <a b c> 00:02
committable6 Zoffix, ¦«2016.09»: No build for this commit
Zoffix :/
committable6, 2016.08 dd % .classify-list: sub ($x) { $x eq 'a' ?? 'a' !! <a b> }, <a b c>
committable6 Zoffix, ¦«2016.08»: Hash % = {:a($["a"])}
Zoffix committable6, 2016.08 dd % .classify-list: sub ($x) { $x ne 'a' ?? 'a' !! <a b> }, <a b c> 00:03
committable6 Zoffix, ¦«2016.08»: P6opaque: no such attribute '$!reified' in type List when trying to get a value␤ in block <unit> at /tmp/5vB89pKlip line 1␤ «exit code = 1»
japhb Zoffix: Thanks for posting the workaround, I should have thought of the mixed-in-role approach, duh. (I still find myself stuck in C thinking when it comes to attaching extra data to something generated by a library.) 00:20
yoleaux2 24 Sep 2016 20:55Z <Zoffix> japhb: Here's one way of doing it: gist.github.com/zoffixznet/c47f02f...e0be1f6dcd Feel free to open an Issue in the repo and I'll take a look at it. Will probably be just another subclass of IRC::Client::Message
japhb I created an issue as requested.
Zoffix thanks 00:30
MasterDuke m: say :36<Ⅷ> 00:37
camelia rakudo-moar e8a61d: OUTPUT«===SORRY!=== Error while compiling <tmp>␤Malformed radix number␤at <tmp>:1␤------> say :36<⏏Ⅷ>␤ expecting any of:␤ number in radix notation␤»
MasterDuke i have a patch to src/Perl/Grammar.nqp that changes the error message to "Only 'Nd' digits are allowed here, not 'No' or 'Nl' numbers at -e:1 ------> say :36<Ⅷ⏏> expecting any of: number in radix notation" 00:38
however, it breaks a couple radix literal tests, but only because it changes the type of the Exception they're expecting 00:40
i could probably work the patch so the Exception type doesn't change, but it (probably) won't be quite as clean 00:41
does anybody have an opinion? 00:42
and relatedly, should i go ahead and try to do something similar to the (probably lots of) other places where only Nd's are allowed? 00:43
dalek kudo/nom: 74ca01d | (Zoffix Znet)++ | src/core/Hash.pm:
Revert "Fix Hash.classify-list for mixed-level classifications"

This reverts commit b4a4b604945772a828e9edb0fa8b1cb295e8bf7a.
Mixed-level classifications cause issues when values at one level
  are same as keys for deeper levels and speculation explicitly says
all lists returned from mappers for multi-level classifications must be of same length.
Instead, logic needs to be added to check that all levels are the same, so we do not produce confusing error messages when they aren't the same.
01:40
ast: 9f1d349 | (Zoffix Znet)++ | S32-list/classify-list.t:
Remove mixed-level classify tests

Mixed level functionality was added to Rakudo *today* in [^1] and removed same day in [^2], because it can't work perfectly due to key clashes (and speculation advises for same-level multi-level classifications only). The multi-level classify tests were added at the same time the feature was added to Rakudo, so it's fine to remove them as they were not part of 6.c and exited for less than 24 hours.
  [1] github.com/rakudo/rakudo/commit/b4...9edb0fa8b1
  [2] github.com/rakudo/rakudo/commit/74...76e6adbc27
01:41
Zoffix s/exited/existed/;
dalek kudo/nom: 690d4a8 | (Zoffix Znet)++ | src/core/Exception.pm:
Do not add quotes around $.value on X::Invalid::ComputedValue

to make it more flexible
01:56
Zoffix I'm trying to throw X::Invalid::ComputedValue in Hash.pm, but it's telling me ``Could not find symbol '&ComputedValue'``. How do I get around that? 02:10
Zoffix notices exception stubs in Array.pm 02:11
I guess that's the normal way.
dalek kudo/nom: 9dcde75 | (Zoffix Znet)++ | src/core/Hash.pm:
Throw helpful error when attempting to use mixed-level classify

It looks a bit messy, but without it, the range of errors received when attempting mixed-level classify reference guts and are very confusing.
02:37
ast: e82a9f1 | (Zoffix Znet)++ | S32-list/classify-list.t:
Mixed-level classify on Hashes throws
ShimmerFairy Weird, I'm finding myself in a place where a role Foo[::T = DefType] { has T @.stuff; ... } works when I use the module in a perl6 -e test line, but not within a script. 03:00
even weirder, it doesn't work at all if I try to use the role directly, but the above-mentioned behavior _does_ happen in trying to use a class that does the role. 03:03
[Tux] This is Rakudo version 2016.09-48-g9dcde75 built on MoarVM version 2016.09-1-gdebb859 07:51
csv-ip5xs 9.282
test 16.120
test-t 7.013
csv-parser 19.308
nine_ Zoffix: indeed, S17-procasync/stress.t (with 400 iterations) runs in 6 seconds when there's no concurrent backup. The 10000 iteration version takes 118 seconds. 07:54
Zoffix: the funny part is that I could run FlightGear without noticing any performance issue during the backup but this test was slowed down 40x.
psch i'm guessing bisectable6 is moar only, right? 08:02
'cause NC on r-j used to work at least better than it does now, and it'd be great if i didn't have to bisect something with a 15+ min build process... :)
nine_ psch: I think so. Well at least bisecting r-j should be easier, since it's only 2 moving layers of the stack 08:03
psch nine_: yeah, it's pretty straight foward wrt commands, but the build time... :) 08:07
the issue is kind of a funny one, anyway
like, 01-argless.t for example fails because it gets a null where it apparently didn't use to get a null
because the test file hasn't been touched in over a year
nine_ Being straight forward should mean that it can run automatically over night? 08:14
timotimo sadly git bisect doesn't allow you to speculatively find out which commits would be next if the currently suggested commit is good or bad 08:16
so you can't just build two rakudos in parallel :\
hack has like 5 cores, right?
psch humm, i think bisect is out as a tool anyway 08:17
considering the one revision i thought should *definitely* be good isn't
timotimo oh fuck
psch honestly though, that's kind of what i thought when looking at the code in question just now 08:18
as in, i have no idea if i misremember it having worked correctly
timotimo right :|
psch because it kinda shouldn't
it's about the first test in 01-argless.t, which does absolutely nothing on the C side
which means we rightly get null from the C interop layer 08:19
i guess we somewhen got a wrapper type that wraps null..?
timotimo we turn null into Any or whatever type was annotated
psch right, which means we kind of want Nil 08:20
buuut we're going through getattr, which, being nqp, doesn't know gcx
timotimo not really, we don't have scalars that would be assigned into for the Nil mechanism to happen
what is gcx?
psch GlobalExt, the extension to the GlobalContext
timotimo oh? 08:21
i don't know what that is :S
psch well, the GlobalContext knows things like KnowHOW and BOOTHash
timotimo oh,ok
psch and GlobalExt knows things like Array, Nil, Positional
timotimo we stash that off of a pointer in MVMInstance on moar
i think Array lives in the HLL maybe? 08:22
psch well, HLL handling is a purely nqp thing 08:23
timotimo oh? 08:24
well, you have to install stuff there from nqp-level code
psch as in, nothing in rakudo/src/vm/jvm deals with HLLConfig
timotimo maybe through the ops we hvae for that 08:25
curhllsym or what it's called
psch hm, HLLConfig has nullValue
points to Mu in perl6 08:26
i guess i'll try returning that when we getattr and attr that's null on the java side
s/and /an /
timotimo hmm. on moar we have VMNull, which is a non-explodey null value to replace having null in object registers and attributes and such 08:27
though we also use c-level null to signify "this slot has to be initialized when it's accessed"
psch right, i don't think we have a VMNull equivalent on nqp-j 08:28
i think i tried implementing it once
timotimo that's how we get around allocating Scalar objects for $_, $/, and $! in every single block even if they don't use it
psch hm, i'll try the stupid simple thing first 08:34
which is "just check if it's null too, and assign null if it is"
s/too,/first/ # maybe
timotimo OK :) 08:35
psch - if (field.getType().isAssignableFrom(tc.native_j.getClass())) {
+ if (tc.native_j == null || field.getType().isAssignableFrom(tc.native_j.getClass())) {
(yay *really* long lines with lots of indentation)
i mean, any class is assignable from null so it should be fine haha..ha 08:36
nine_ Are COMPOSE phasers actually implemented? 08:37
Ah, I can get by with a mainline in the role anyway 08:40
psch well 08:49
"Use of uninitialized value %CONFIG of type Any in string context." says NC
in sub compile_test_lib at /home/psch/rakudo/rakudo/t/04-nativecall/CompileTestLib.pm (CompileTestLib) line 9 08:50
r: say $*VM.platform-library-name("01-argless.c")
camelia rakudo-moar 9dcde7: OUTPUT«Type check failed in binding to $library; expected IO::Path but got Str ("01-argless.c")␤ in block <unit> at <tmp> line 1␤␤»
..rakudo-jvm cd19db: OUTPUT«Type check failed in binding $library; expected IO::Path but got Str ("01-argless.c")␤ in block <unit> at <tmp> line 1␤␤»
psch oh meh
but it passes the test so i guess that's fine? :P 08:51
ya, except for that warning the "pass null through without complaints" patch brings me down to 5 failed tests in t/04-nativecall/ 08:58
note, that's really *tests*, not test files \o/
oh geez 09:02
# at t/04-nativecall/15-rw-args.t line 56
# expected: '12.12'
# got: '12.119999885559082'
m: say 1212e-2
camelia rakudo-moar 9dcde7: OUTPUT«12.12␤»
psch j: say 1212e-2
camelia rakudo-jvm cd19db: OUTPUT«12.120000000000001␤»
lizmat Files=1139, Tests=53042, 239 wallclock secs (13.58 usr 3.99 sys + 1471.23 cusr 138.09 csys = 1626.89 CPU)
psch m: printf "%.12f", 12e12 09:03
camelia rakudo-moar 9dcde7: OUTPUT«12000000000000.000000000000»
psch m: printf "%.12f", 1212e-2
camelia rakudo-moar 9dcde7: OUTPUT«12.120000000000»
psch m: printf "%.16f", 1212e-2
camelia rakudo-moar 9dcde7: OUTPUT«12.1200000000000000»
psch okay someone is cheating there
j: use java::lang::Double:from<JavaRuntime>; my $dbl = Double.new("12.12"); say $dbl 09:08
camelia rakudo-jvm cd19db: OUTPUT«12.12␤»
psch help :P
j: use java::lang::Double:from<JavaRuntime>; my $dbl = Float.new("12.12"); say $dbl
camelia rakudo-jvm cd19db: OUTPUT«===SORRY!=== Error while compiling <tmp>␤Undeclared name:␤ Float used at line 1␤␤»
psch j: use java::lang::Float:from<JavaRuntime>; my $dbl = Float.new("12.12"); say $dbl 09:09
camelia rakudo-jvm cd19db: OUTPUT«12.119999885559082␤»
psch okay, so we accidentally single precision, apparently
that explains the NC failure mode, but not the perl6 num failure mode..?
j: my num64 $x = 1212e-2; printf "%2.16f", $x 09:17
camelia rakudo-jvm cd19db: OUTPUT«12.1200000000000010»
psch the other two failures in 14-rw-args.t are also some kind of type confusion 09:18
probably signed instead of unsigned
...or something
# expected: '387'
# got: '65411'
or hm, is that endianess..?
m: printf "%16b", 387 09:20
camelia rakudo-moar 9dcde7: OUTPUT« 110000011»
psch m: printf "%016b", 387
camelia rakudo-moar 9dcde7: OUTPUT«0000000110000011»
psch m: my $a = join "", reverse ((sprintf "%016b", 387).comb: /\d ** 8/); say :2($a) + 2**15 # probably not..? 09:23
camelia rakudo-moar 9dcde7: OUTPUT«66305␤»
psch m: printf "%8b", 153; say(); printf "%8b", -103 09:24
camelia rakudo-moar 9dcde7: OUTPUT«10011001␤-1100111»
psch r: my int8 $x = -64; my uint8 $y = $x; say $y 09:29
camelia rakudo-moar 9dcde7: OUTPUT«192␤»
..rakudo-jvm cd19db: OUTPUT«-64␤»
dalek kudo/nom: ac0c831 | (Zoffix Znet)++ | lib/Test.pm6:
Fix PERL6_TEST_DIE_ON_FAIL not exiting on failed subtests
09:35
ast: db94d84 | (Zoffix Znet)++ | S24-testing/8-die_on_fail.t:
PERL6_TEST_DIE_ON_FAIL exits even when failures are inside subtests
psch okay this is weird 09:44
i mean, i debug-steps through NativeCallOps.java
and it hits the UCHAR case, so it adds 0x100
and then it returns a BigInteger that has the value that we expect
but it fails the test 09:45
hm, well, there's a BigInteger with the right value in Ops.result_o(tc.curFrame) at least... 09:46
maybe i should check what's in result_I
*i
aha, reducing the test file to the one test that fails doesn't hit the breakpoint i set 09:53
so i've been looking in the wrong spot anyway, and confirmed via the debugger that something that works, actually works
dalek kudo/nom: 3448c71 | lizmat++ | src/core/Junction.pm:
Fix for RT #129349
10:09
ast: bc3cf5e | (Zoffix Znet)++ | S03-junctions/misc.t:
Remove trailing whitespace
10:21
ast: 510a916 | (Zoffix Znet)++ | S03-junctions/misc.t:
Junctions with autovivification work

RT#129349: rt.perl.org/Ticket/Display.html?id=129349
10:22
kudo/nom: 448f826 | (Zoffix Znet)++ | src/core/Hash.pm:
Remove needless //= [] check

Autovivification takes care of it for us.
10:27
MasterDuke psch: github.com/perl6/whateverable/issues/41, it doesn't do r-j yet, but we're thinking about adding it 11:41
psch MasterDuke: ah, neat, thanks for the info :) 11:45
nebuchadnezzar hello, it looks like rakudo “make test” returns 0 even when some tests failed (lists.alioth.debian.org/pipermail/...937.html), do you have any idea why? 11:52
psch dimly recalls a recent patch fixing subtest failure propagation 11:54
travis-ci Rakudo build failed. Zoffix Znet 'Remove needless //= [] check 11:59
travis-ci.org/rakudo/rakudo/builds/162551181 github.com/rakudo/rakudo/compare/3...8f8263c093
buggable [travis build above] ☠ Did not recognize some failures. Check results manually
Zoffix nebuchadnezzar, harness was broken. Fixed recently.
s/harness/script that runs the harness/;
nebuchadnezzar, here's the commit that fixed it. 12 days ago: github.com/rakudo/rakudo/commit/62...77a91b8d38 12:00
Zoffix wishes someone with OSX would fix flapping in t/04-nativecall/13-union.t 12:01
Can't reproduce it on Linux :/
nebuchadnezzar Zoffix: thanks 12:06
psch well, i fixed one of the two USHORT problem with NativeCall... 12:21
err, UCHAR actually
USHORT still has a problem, which seems quite a bit less obvious 12:22
r: my int8 $x = -103; my uint8 $y = $x; say $x; say $y
camelia rakudo-moar 448f82: OUTPUT«-103␤153␤»
( no output )
psch j: my int8 $x = -103; my uint8 $y = $x; say $x; say $y
camelia rakudo-jvm cd19db: OUTPUT«-103␤-103␤» 12:23
psch that's fixed now when we go via NC
the other one is weird though
# expected: '387'
# got: '65411'
it's about *returning* an USHORT, and the difference between the values just seems completely arbitrary
m: say 65411 - 387
camelia rakudo-moar 448f82: OUTPUT«65024␤»
psch because what kind of value is that even
m: say 65535 +^ 387 12:25
camelia rakudo-moar 448f82: OUTPUT«65148␤»
psch m: say 387.base(2); say 65411.base(2) 12:26
camelia rakudo-moar 448f82: OUTPUT«110000011␤1111111110000011␤»
psch ohhh
m: say 65536 +^ 2**15
camelia rakudo-moar 448f82: OUTPUT«98304␤»
psch m: say 65535 +^ 2**15 12:27
camelia rakudo-moar 448f82: OUTPUT«32767␤»
psch m: say 65535 +^ 2**7
camelia rakudo-moar 448f82: OUTPUT«65407␤»
psch m: say 65535 +^ (2**7 + 1)
camelia rakudo-moar 448f82: OUTPUT«65406␤»
psch anyway, that seems to be it
so the USHORT that we return for some reason has the high byte completely set
oh wow 12:28
we're using .byteValue() for USHORT and UINT
that's clearly bogus
ah, and that's *also* why the double test fails, because we're using .floatValue() there 12:29
masak the plot thinnens 12:37
psch yes. should be down to 2 failed tests after this build
FROGGS psch++
yoleaux2 21 Sep 2016 11:00Z <jnthn> FROGGS: I *think* you worked on process code long ago. I just fixed rt.perl.org/Ticket/Display.html?id=129291 by doing github.com/MoarVM/MoarVM/commit/de...e30170e8d3 which I *think* makes sense, but if you have a moment to glance it and comment it'd be great. Thanks! :-)
psch and then we should have a clean 'make test' on r-j again, which means we probably want travis to pay attention to r-j again 12:38
r: use NativeCall; class C is repr('CStruct') { method foo { say "foo" } }; C.new.foo 12:55
camelia rakudo-moar 448f82: OUTPUT«foo␤»
..rakudo-jvm cd19db: OUTPUT«␤(timeout)␤»
psch r: use NativeCall; class C is repr('CStruct') { method foo { say "foo" } }; C.new.foo
camelia rakudo-moar 448f82: OUTPUT«foo␤»
..rakudo-jvm cd19db: OUTPUT«===SORRY!===␤java.nio.channels.OverlappingFileLockException␤»
psch that's gonna be a fun one i think 12:57
java.lang.IllegalArgumentException: Structure class __CStruct__0 has unknown or zero size (ensure all fields are public)
is the actual error message in the test
and some google usage suggests that structs with size zero are not supported with JNA (or C, for that matter) 12:58
dunno, that might be have false 13:00
we do have a comment in reprs/CStruct.java that says we want to implement a given interface, but the object.asm visit call doesn't seem to implement it
geekosaur isn't that complaining about the method? or are you stripping that when building the repr? 13:08
psch main[1] where [1] com.sun.jna.Structure.deriveLayout (Structure.java:1,183)
geekosaur: it's failing with that Exception inside of jna.Structure 13:09
geekosaur: so it's really JNA complaining that it can't derive the layout of a zero-size struct
AlexDaniel MasterDuke: actually, to be able to build r-j we should at least fix r-m :'( 14:02
dalek p: 720d052 | peschwa++ | src/vm/jvm/runtime/org/perl6/nqp/runtime/ (2 files):
Fix some NativeCall type confusion.
14:05
kudo/nom: 99e98c3 | peschwa++ | src/core/VM.pm:
Fix unitialized warning for VM.platform-library-name

We might want a different solution WRT VM in general though, as the .config/.properties split on R-J seems confusing.
kudo/nom: bb52f81 | peschwa++ | tools/build/NQP_REVISION:
Bump NQP_REVISION for JVM NativeCall fixes
psch two remaining failures in 'make test' 14:06
and both too opaque for me to make sense of right now :S
there's still potential problems in jvm NC with unsigned types 14:07
timotimo oh unsigned types ... ;(
psch but i have no idea how we'd fix those anyway, because the jvm doesn't do unsigned primitives...
and, well, i don't think we want to wrap a BigInteger around what's supposed to be native types... :l 14:08
timotimo hm, right
psch but we really can't do anything else, cause half of ulong doesn't fit in long 14:09
and long is our native_i type
so, yeah, it's probably forever weird vOv
nine_ Cool! I've now got a v6::inline implementation that's more transparent, more correct, less leaky and simple enough so even I can understand it :) 14:21
timotimo yeah! 14:23
psch \o/ 14:28
i wish i actually understood the bits i'm fixing here :P
well, the type confusion stuff was straight forward enough, actually 14:31
i mean, i have no idea about the JNA layer, which means the remaining to failures are gonna be pretty hard 14:32
one's the struct thing i talked about earlier, the other is about function pointers...
timotimo oh, function pointers 14:37
that's already fun on moarvm ... not :)
psch oh god, what have i done 14:46
java.lang.invoke.WrongMethodTypeException: expected (ThreadContext,CodeRef,CallSiteDescriptor,SixModelObject)void but found (ThreadContext,CodeRef,CallSiteDescriptor,SixModelObject)void
..that's nom/HEAD, too
and why, anyway
i mean, the method types are identical..?
timotimo not to java they aren't! 14:49
java stares deep into your soul
psch ooohkay 14:55
it's past the point where it failed like thatn ow
*now
i am confused
like, it was the exact same command
timotimo :( 14:56
stale caches? nondeterministic failure? :(
psch i'm going with gamma rays i think vOv 14:57
timotimo subspace interference 14:58
travis-ci Rakudo build passed. Pepe Schwarz 'Bump NQP_REVISION for JVM NativeCall fixes'
travis-ci.org/rakudo/rakudo/builds/162574306 github.com/rakudo/rakudo/compare/4...52f81e710b
timotimo passed \o/ 14:59
but it doesn't yet make sure jvm survives tests?
psch crazy
nah, it doesn't
'make test' still has two failures anyway
timotimo oh, all of them failed :)
psch so, yeah, you'd have to check where and how they failed 15:00
timotimo and the reason why travis-ci comes in here like we have a revolving door is that one flappy nativecall test on moar, i think
psch well, none of the travis jvm runs failed with WrongMethodTypeException 15:01
so that's pretty good, 'cause that was kinda scary, honestly
timotimo i agree 15:02
BBIAB
dalek ast: 96f6b08 | (Zoffix Znet)++ | S32-list/classify-list.t:
.classify-list; Callable mapper is executed only once per each item
17:04
FROGGS .tell jnthn that patch to not set ->process again looks totally valid 17:26
yoleaux2 FROGGS: I'll pass your message to jnthn.
gfldex m: sub f($x where { fail X::AdHoc.new(msg=>'bad') }){}; f(1) 17:56
camelia rakudo-moar bb52f8: OUTPUT«Unexplained error␤ in any at /home/camelia/rakudo-m-inst-2/share/perl6/runtime/CORE.setting.moarvm line 1␤ in sub f at <tmp> line 1␤ in block <unit> at <tmp> line 1␤␤»
gfldex m: sub f($x where { fail X::AdHoc.new(payload=>'bad') }){}; f(1) 17:57
camelia rakudo-moar bb52f8: OUTPUT«bad␤ in any at /home/camelia/rakudo-m-inst-2/share/perl6/runtime/CORE.setting.moarvm line 1␤ in sub f at <tmp> line 1␤ in block <unit> at <tmp> line 1␤␤»
gfldex m: sub f($x where { fail X::AdHoc.new(payload=>'bad') }){}; class X::Custom is Exception { method message { "also bad" } }; sub g($x where { fail X::Custom.new } ) {}; g 18:00
camelia rakudo-moar bb52f8: OUTPUT«Too few positionals passed; expected 1 argument but got 0␤ in sub g at <tmp> line 1␤ in block <unit> at <tmp> line 1␤␤»
gfldex m: class X::Custom is Exception { method message { "also bad" } }; 18:01
camelia ( no output )
gfldex m: class X::Custom is Exception { method message { "also bad" } }; sub g($x where { X::Custom.new }; g
camelia rakudo-moar bb52f8: OUTPUT«===SORRY!=== Error while compiling <tmp>␤Invalid typename 'g' in parameter declaration.␤at <tmp>:1␤------> } }; sub g($x where { X::Custom.new }; g⏏<EOL>␤»
gfldex m: class X::Custom is Exception { method message { "also bad" } }; sub g($x where { X::Custom.new }); g
camelia rakudo-moar bb52f8: OUTPUT«===SORRY!=== Error while compiling <tmp>␤A unit-scoped sub definition is not allowed except on a MAIN sub;␤Please use the block form.␤at <tmp>:1␤------> } }; sub g($x where { X::Custom.new });⏏ g␤»
gfldex m: class X::Custom is Exception { method message { "also bad" } }; sub g($x where { X::Custom.new }) {}; g 18:02
camelia rakudo-moar bb52f8: OUTPUT«Too few positionals passed; expected 1 argument but got 0␤ in sub g at <tmp> line 1␤ in block <unit> at <tmp> line 1␤␤»
gfldex m: class X::Custom is Exception { method message { "also bad" } }; sub g($x where { X::Custom.new(1) }) {}; g
camelia rakudo-moar bb52f8: OUTPUT«Too few positionals passed; expected 1 argument but got 0␤ in sub g at <tmp> line 1␤ in block <unit> at <tmp> line 1␤␤»
geekosaur it's the "g" at the end that is your error
gfldex m: class X::Custom is Exception { method message { "also bad" } }; sub g($x where { X::Custom.new }) {}; g(1)
camelia ( no output )
gfldex sub g($x where { X::AdHoc.new(msg=>'bad') }) {}; g(1) 18:03
m: sub g($x where { X::AdHoc.new(msg=>'bad') }) {}; g(1)
camelia ( no output )
gfldex m: sub g($x where { fail X::AdHoc.new(msg=>'bad') }) {}; g(1)
camelia rakudo-moar bb52f8: OUTPUT«Unexplained error␤ in any at /home/camelia/rakudo-m-inst-2/share/perl6/runtime/CORE.setting.moarvm line 1␤ in sub g at <tmp> line 1␤ in block <unit> at <tmp> line 1␤␤»
gfldex m: sub g($x where { fail X::AdHoc.new(payload=>'bad') }) {}; g(1)
camelia rakudo-moar bb52f8: OUTPUT«bad␤ in any at /home/camelia/rakudo-m-inst-2/share/perl6/runtime/CORE.setting.moarvm line 1␤ in sub g at <tmp> line 1␤ in block <unit> at <tmp> line 1␤␤»
gfldex m: class X::Custom is Exception { method message { "also bad" } }; sub g($x where { fail X::Custom.new }) {}; g(1)
camelia rakudo-moar bb52f8: OUTPUT«also bad␤ in any at /home/camelia/rakudo-m-inst-2/share/perl6/runtime/CORE.setting.moarvm line 1␤ in sub g at <tmp> line 1␤ in block <unit> at <tmp> line 1␤␤»
gfldex m: class X::Custom is Exception { method message { "also bad" } }; sub g($x where { fail X::Custom.new }) {}; g(1) 18:39
camelia rakudo-moar bb52f8: OUTPUT«also bad␤ in any at /home/camelia/rakudo-m-inst-2/share/perl6/runtime/CORE.setting.moarvm line 1␤ in sub g at <tmp> line 1␤ in block <unit> at <tmp> line 1␤␤»
gfldex it would be nice to get the argument name into the where clause somehow 18:40
and sorry for the spam
psch m: sub g($x where -> $x { fail X::AdHoc.new(payload=>'bad ' ~ $x.VAR.name) }) {}; g(1) 18:42
camelia rakudo-moar bb52f8: OUTPUT«bad $x␤ in any at /home/camelia/rakudo-m-inst-2/share/perl6/runtime/CORE.setting.moarvm line 1␤ in sub g at <tmp> line 1␤ in block <unit> at <tmp> line 1␤␤»
psch gfldex: note that actually the name of the param of the pointy block, so you have to take care to keep the orig param and the block param the same
+is
timotimo hmm 18:50
Zoffix m: dd {'cat2',}(); dd {['cat2']}() 18:51
camelia rakudo-moar bb52f8: OUTPUT«("cat2",)␤["cat2"]␤»
Zoffix Is the first one a list of lists?
psch m: my $a := 'cat2',; say $a.WHAT; say $a[0].WHAT 18:52
camelia rakudo-moar bb52f8: OUTPUT«(List)␤(Str)␤»
Zoffix m: my $a := ['cat2']; say $a.WHAT; say $a[0].WHAT 18:53
camelia rakudo-moar bb52f8: OUTPUT«(Array)␤(Str)␤»
Zoffix hm
dalek kudo/nom: c2455ca | (Zoffix Znet)++ | src/core/Hash.pm:
Fix and improve Hash.categorize-list

  - Fix incorrect multi-level nesting with % and @ mappers
  - Do not crash on degenerate case of 0-item multi-level iterables
  - Throw on lazy (infinite) lists instead of hanging
  - Do not execute mapper more than once per item being categorized
  - Detect when attempt to use mixed-level categorization is made and throw
   useful error instead of spilling guts on conflicts
19:37
kudo/nom: 4a80126 | (Zoffix Znet)++ | src/core/Baggy.pm:
Fix incorrect name of type in error message
20:52
kudo/nom: 04f4b76 | (Zoffix Znet)++ | src/core/ (3 files):
Fix and improve Baggy.categorize-list

  - Fix incorrect multi-level category behaviour with % and @ mappers
  - Throw on attempts to use multi-level categorization instead of spilling guts
  - Throw on lazy (infinite) lists instead of hanging
  - Do not execute mapper more than once per item being categorized
  - Detect all Iterables and not just List
ast: 635d5d4 | (Zoffix Znet)++ | S32-list/classify-list.t:
Add vim comment at end
20:53
ast: 29366a2 | (Zoffix Znet)++ | S32-list/categorize-list.t:
Add tests for [Hash|Baggy].categorize-list
20:54
kudo/nom: 922afd3 | (Zoffix Znet)++ | t/spectest.data:
Add S32-list/categorize-list.t test file
20:55
ast: 2727a1b | (Zoffix Znet)++ | S32-list/categorize-list.t:
Add vim comment at end
Zoffix Huh. TIL. constant get frozen with precompiled modules: github.com/zoffixznet/perl6-CoreHa...ery/pull/3 21:48
During their installation :/
ugexe constant is compile time isnt it? 22:20
timotimo yup
Zoffix Yeah. That's why they get frozen. 22:25
timotimo yup
MasterDuke does Python have constants and do they work the same way with its .pyc files as Perl 6? 22:30
timotimo no, python doesn't have constants 22:32