[Tux] This is Rakudo version 2016.09-123-gd8309d0 built on MoarVM version 2016.09-15-gc8b4228 06:02
csv-ip5xs 3.373
test 17.007
test-t 7.497
csv-parser 18.107
nine [Tux]: did I see correctly that you are working on NativeCall bindings for Text::CSV_XS's parsing code? 06:03
That would be very interesting to comprae ip5xs' performance against, as it's a kinda optimal case that I probably cannot beat 06:04
[Tux] I made a commit on the work I did in trying to use NativeCall to bind to libcsv3
but I horribly failed in making the double callback to work. Feel free to make it work
nine Ah. Ok. Though I guess it probably wouldn't matter which CSV parser you use since they'll all take just a miniscule part of the runtime. 06:05
[Tux] As I was researching NC, I thought it might get a lot closer to the C-timing than all other timings 06:06
nine It's hard to say how far down we could get with that. NativeCall does have considerable overhead. Eventually we will be able to spesh and JIT it though :) 06:14
jnthn nine: Quite a long way down, I'd expect. brrt++'s exprjit work should help a good bunch, but the way we link native callsites will also need some tweaks. 08:47
cygx o/ 09:08
m: my $a; sub foo(--> Nil) { $a = do { 42 } }
camelia rakudo-moar d8309d: OUTPUT«WARNINGS for <tmp>:␤Useless use of constant integer 42 in sink context (line 1)␤»
cygx ^ known?
m: role Foo { method foo { say "ok" } }; enum Bar does Foo <A B>; A.foo; say A ~~ Foo 09:16
camelia rakudo-moar d8309d: OUTPUT«ok␤False␤»
cygx ^ bug?
psch that's interesting 09:18
m: role Foo { method foo { say "ok" } }; enum Bar does Foo <A B>; say A.^methods.map(*.name) 09:20
camelia rakudo-moar d8309d: OUTPUT«(pair enums foo CALL-ME pick perl ACCEPTS gist Int Numeric Str roll kv key value perl Bridge sqrt sign ACCEPTS sin tan cotan acosech Numeric Str abs base narrow conj atan2 cosec new is-prime pred WHICH asec acotan cosh ceiling acos acosec sech unpolar log1…»
psch m: role Foo { method foo { say "ok" } }; enum Bar does Foo <A B>; say A.HOW.^name
camelia rakudo-moar d8309d: OUTPUT«Perl6::Metamodel::EnumHOW␤»
psch m: role Foo { method foo { say "ok" } }; enum Bar does Foo <A B>; say A.HOW.^name.can('mixin')
camelia rakudo-moar d8309d: OUTPUT«()␤»
psch uh, actually, that's .can on a Str isn't it
m: role Foo { method foo { say "ok" } }; enum Bar does Foo <A B>; say A.HOW.^name.WHAT
camelia rakudo-moar d8309d: OUTPUT«(Str)␤»
psch m: role Foo { method foo { say "ok" } }; enum Bar does Foo <A B>; say A.HOW.can('mixin') 09:21
camelia rakudo-moar d8309d: OUTPUT«Too few positionals passed; expected 3 arguments but got 2␤ in any can at gen/moar/m-Metamodel.nqp line 1128␤ in block <unit> at <tmp> line 1␤␤»
psch m: role Foo { method foo { say "ok" } }; enum Bar does Foo <A B>; say A.HOW.^can('mixin')
camelia rakudo-moar d8309d: OUTPUT«No such method 'gist' for invocant of type 'NQPRoutine'␤ in block <unit> at <tmp> line 1␤␤»
psch m: role Foo { method foo { say "ok" } }; enum Bar does Foo <A B>; say A.HOW.^can('mixin').name
camelia rakudo-moar d8309d: OUTPUT«mixin␤»
psch m: role Foo { method foo { say "ok" } }; enum Bar does Foo <A B>; say A.HOW.^roles
camelia rakudo-moar d8309d: OUTPUT«Required named parameter 'local' not passed␤ in any roles at gen/moar/stage2/nqpmo.nqp line 1195␤ in block <unit> at <tmp> line 1␤␤»
psch m: role Foo { method foo { say "ok" } }; enum Bar does Foo <A B>; say A.HOW.^roles(:local) 09:22
camelia rakudo-moar d8309d: OUTPUT«No such method 'gist' for invocant of type 'Perl6::Metamodel::Naming'␤ in block <unit> at <tmp> line 1␤␤»
psch m: role Foo { method foo { say "ok" } }; enum Bar does Foo <A B>; say A.HOW.^roles(:local)>>.name
camelia rakudo-moar d8309d: OUTPUT«No such method 'name' for invocant of type 'Perl6::Metamodel::Naming'␤ in block <unit> at <tmp> line 1␤␤»
psch well, yeah, EnumHOW does P6::MM::Mixin, but apparently it doesn't remember the roles it mixes in..?
m: role Foo { method foo { say "ok" } }; enum Bar does Foo <A B>; try say A.^roles; try say Foo.^roles 09:23
camelia rakudo-moar d8309d: OUTPUT«()␤»
psch m: role Foo { method foo { say "ok" } }; enum Bar does Foo <A B>; say A.^is_composed
camelia rakudo-moar d8309d: OUTPUT«1␤»
psch m: role Foo { method foo { say "ok" } }; enum Bar does Foo <A B>; say A.^is_composed; say Foo.^is_composed
camelia rakudo-moar d8309d: OUTPUT«1␤No such method 'is_composed' for invocant of type 'Perl6::Metamodel::ParametricRoleGroupHOW'␤ in block <unit> at <tmp> line 1␤␤»
psch m: role Foo { method foo { say "ok" } }; enum Bar <A B>; A does Foo; say A.foo 09:24
camelia rakudo-moar d8309d: OUTPUT«ok␤True␤»
psch m: role Foo { method foo { say "ok" } }; enum Bar <A B>; A does Foo; say A.^roles
camelia rakudo-moar d8309d: OUTPUT«No such method 'roles' for invocant of type 'Perl6::Metamodel::EnumHOW'␤ in block <unit> at <tmp> line 1␤␤»
cygx if I read the code correctly, role_typecheck_list is missing from EnumHOW 09:30
jnthn: ^^^ 09:32
jnthn cygx: Probably just never got implemented, and wasn't really missed
Until nowish :)
cygx glad to be of service ;) 09:33
jnthn Can't think of any reason why it shouldn't be there, so just an oversight, I'd say. :)
Please patch it or RT it. 09:34
cygx will do (later) 09:37
jnthn Thanks. Maybe I'll even have a little time to look at it later :) 09:38
Got family visiting this week, though, so mostly taking it easy :)
psch r: my $a = < 1i >; say $a.re 09:39
camelia rakudo-jvm 2a1605: OUTPUT«Attribute '$!re' is not a native num␤ in block <unit> at <tmp> line 1␤␤»
..rakudo-moar d8309d: OUTPUT«0␤»
psch ^^^ that's bad getattr hints. how/where do we set those and can i tell allomorphs to recheck them (or ignore them)..? 09:40
i mean, i suppose we could try and fallback on getattr without a hint in case the hint looks wrong 09:41
but that's one try/catch at least, which is kind of a not-so-performant solution
timotimo hm 09:42
in the case of the error occuring, we could try to recompute and try agai
again*
psch i think 'is box_target' plays a notable role there 09:43
timotimo well, if you derive from a class, the box_target slot ought to stay correct :(
psch timotimo: well, that's kinda what i'm asking. where do we attach hints for attributes to a class (if we do something like that)
timotimo i think we set the hints in code-gen
liken, when a $!foo gets compiled, we look at the containing class and try_get_slot for the hint value 09:44
psch no hits for 'try_get_slot' here 09:45
timotimo it might be called something else on jvm
cygx jnthn: ClassHOW.compose looks strange to me - roles seem to get added to @!role_typecheck_list repeatedly
m: role Foo {}; class Bar does Foo {}; say Bar.HOW.role_typecheck_list(Bar).map(*.^name)
camelia rakudo-moar d8309d: OUTPUT«(Foo Foo Foo Foo)␤»
psch timotimo: i'm grepping through {nqp,}/src 09:46
timotimo: well, rakudo/src and nqp/src, actually :S
jnthn cygx: That's because roles actually exist in multiple forms 09:47
cygx: All of which you could typecheck against
timotimo it should be in nqp, i believe
jnthn m: m: role Foo {}; class Bar does Foo {}; say Bar.HOW.role_typecheck_list(Bar).map({ .HOW.^name }) 09:48
camelia rakudo-moar d8309d: OUTPUT«(Perl6::Metamodel::ParametricRoleGroupHOW Perl6::Metamodel::ConcreteRoleHOW Perl6::Metamodel::ParametricRoleHOW Perl6::Metamodel::ParametricRoleGroupHOW)␤»
jnthn Hm, the group is maybe in there twice...
psch this is actually kinda weird. the ComplexStr has Str!value in field_0, $!re in field_1 and $!im in field_2 09:51
oh, wait, we don't have hints for $!re and $!im do we 09:52
like, in REPRData at least
cause those aren't box targets
timotimo hints are for any slot
if i saw correctly the error came from get_attribute
cygx m: role Foo {}; class Bar does Foo {}; say Bar.HOW.role_typecheck_list(Bar).map({ use nqp; nqp::objectid($_) }) 09:53
camelia rakudo-moar d8309d: OUTPUT«(67452360 67452384 67452408 67452360)␤»
psch timotimo: right, i was looking in the wrong spot. the unbox hints aren't the getattr hints
timotimo huh? they really ought to match, no? :\
psch timotimo: but what's the unbox hint for $!re? 09:54
timotimo "the unbox hint"?
i ... think i'm confused
psch s/hint/slot/
timotimo ah
psch timotimo: the point being that we don't have complex, only Complex
so we don't have unbox slots for Complex parts
timotimo well, if Complex has $!re is box_target, then the hint should point at that attribute
even in the derived class
psch but Complex doesn't have any box_targets
timotimo i thought you were implying that a Complex boxes its real part and ignores the imaginary part for that purpose 09:55
in that case, fine :)
but the .re getting a bogus slot is definitely still wrong
psch timotimo: well, we have the right hints in nameToHintMap, but because we nqp::getattr(..., Complex, '$!im) we use the (presumably cached) hint for Complex, which isn't the same as for ComplexStr 09:57
timotimo ah, that's bad
in moarvm you have the ability to get a wrong hint compiled 09:58
all we have to protect against it is a bounds check
psch i don't know if it happens on moar. it does happen on jvm
timotimo p6: class Test { has int $.a; has int $.b; method test { Proxy.new( FETCH => method ohno(|) { say $!a }, STORE => method ohcrap(|) { } } }; Test.new.test = 10 10:01
camelia rakudo-moar d8309d: OUTPUT«===SORRY!=== Error while compiling <tmp>␤Unable to parse expression in argument list; couldn't find final ')' ␤at <tmp>:1␤------> ay $!a }, STORE => method ohcrap(|) { } ⏏} }; Test.new.test = 10␤ expecting any of:␤ postfi…»
timotimo p6: class Test { has int $.a; has int $.b; method test { Proxy.new( FETCH => method ohno(|) { say $!a }, STORE => method ohcrap(|) { }) } }; Test.new.test = 10
hm
camelia rakudo-moar d8309d: OUTPUT«Memory allocation failed; could not allocate 7936296 bytes␤»
timotimo oh, i didn't mean to STORE, i had to FETCH 10:02
p6: class Test { has int $.a; has int $.b; method test { Proxy.new( FETCH => method ohno(|) { say $!a }, STORE => method ohcrap(|) { }) } }; say Test.new.test
camelia rakudo-moar d8309d: OUTPUT«Memory allocation failed; could not allocate 7936216 bytes␤»
timotimo also, i meant to use r: instead of p6:
p6: class Test { has int $.a; has int $.b; method test { Proxy.new( FETCH => method ohno(|) { $!b }, STORE => method ohcrap(|) { }) } }; say Test.new.test
camelia rakudo-moar d8309d: OUTPUT«Memory allocation failed; could not allocate 7970328 bytes␤» 10:03
timotimo so anyway. since method ohno gets compiled from inside Test, it'll generate a hint for Test, but it'll be called as a method on Proxy
and thus the hint we get for it doesn't point at $!a in Test, it points at whatever-who-knows-what inside Proxy
cygx jnthn: it might actually be a case of bit rot - EnumHOW has @!does_list, ut it's not properly populated nor used anywhere as far as ack can tell 10:04
*but
lizmat Files=1145, Tests=53213, 239 wallclock secs (13.80 usr 3.81 sys + 1483.46 cusr 131.70 csys = 1632.77 CPU) 10:06
psch oh geez
getattr hints belong to a JastField afaict 10:07
r: use nqp; my $i = <1i>; say nqp::getattr(nqp::decont($i), ComplexStr, '$!im')
camelia rakudo-moar d8309d: OUTPUT«P6opaque: no such attribute '$!im' in type ComplexStr when trying to get a value␤ in block <unit> at <tmp> line 1␤␤»
..rakudo-jvm 2a1605: OUTPUT«java.lang.RuntimeException: No such attribute '$!im' for this object␤ in block <unit> at <tmp> line 1␤␤»
psch right 10:08
so yeah, no choice but to either always ignore hints on jvm and always check the nameToHintMap of the *actual* REPRData
...actually that's the only choice
r: use nqp; my $i = <1i>; say nqp::getattr(nqp::decont($i), ComplexStr, '$!re') 10:09
camelia rakudo-moar d8309d: OUTPUT«P6opaque: no such attribute '$!re' in type ComplexStr when trying to get a value␤ in block <unit> at <tmp> line 1␤␤»
..rakudo-jvm 2a1605: OUTPUT«java.lang.RuntimeException: No such attribute '$!re' for this object␤ in block <unit> at <tmp> line 1␤␤»
psch ugh
r: use nqp; my $i = <1i>; say nqp::getattr(nqp::decont($i), Complex, '$!re')
camelia rakudo-jvm 2a1605: OUTPUT«0␤»
..rakudo-moar d8309d: OUTPUT«0e0␤»
psch r: use nqp; my $i = <1i>; say nqp::getattr(nqp::decont($i), Complex, '$!im')
camelia rakudo-moar d8309d: OUTPUT«1e0␤»
..rakudo-jvm 2a1605: OUTPUT«1␤»
psch oh, right, getattr doesn't go hinted
r: use nqp; my $i = <1i>; say $i.im
camelia rakudo-moar d8309d: OUTPUT«1␤»
..rakudo-jvm 2a1605: OUTPUT«0␤»
timotimo yikes 10:10
oh, that's also a ComplexStr
and thus that's teh original bug
psch right, it's the same bug
timotimo r: my $i = 1i; say $i.im
camelia rakudo-jvm 2a1605, rakudo-moar d8309d: OUTPUT«1␤»
timotimo OK
psch because the hints for $!im and $!re all both shifted up by one
on jvm
well, not shifted, incremented
but yeah, that case means we cannot ever rely on hints on jvm if we have a MI class
timotimo do we somehow do multiple inheritance the other way around on JVM?
oh! 10:11
that's the solution
hints are thrown out completely on moarvm if multiple inheritance is involved
psch neat, so i'm kinda smart apparently :3
timotimo github.com/MoarVM/MoarVM/blob/mast...que.c#L232 10:12
check it
psch nice
yeah, i can do that
timotimo i love it when a plan comes togethe 10:13
what is it with the typing today
the bounds check for num_attributes may also want to get ported
otherwise we could be accessing things out of bounds 10:14
lizmat Files=1145, Tests=53213, 234 wallclock secs (13.50 usr 3.85 sys + 1425.29 cusr 130.16 csys = 1572.80 CPU) # better 10:19
cygx jnthn: github.com/rakudo/rakudo/pull/896 10:25
timotimo cygx: doesn't RoleContainer already implement @!role_typecheck_list?
as well as the accessor method? 10:26
cygx timotimo: no, RoleContainer only provides roles_to_compose 10:27
timotimo oh, ok
from a cursory glance, your code looks good
cygx RoleContainer does look rather underpowered 10:28
it might be a good idea to do some refactoring...
jnthn RoleContainer shouldn't do much more than exactly that 10:29
Just like MethodContainer isn't interested in method resolution, but only storage of methods
And dispatchy stuff is in a separate role
If there's copy-paste between ClassHOW and EnumHOW on role-based things than pulling them out to a role is sensible. Just a different one. :) 10:30
cygx good to know 10:31
I speculated about inhertance in the commit message, but not sure if that's a good or bad idea...
are there things a class can do that an enum shouldn't be able to? 10:32
jnthn Inheritance feels a bit off to me 10:33
We do it for GrammarHOW but a grammar really is just a class with a different default parent class 10:34
cygx and an enum could potentially be just a class with a bunch of default instances 10:35
jnthn It's pretty close to that already I think
But there's a bunch of extra meta-methods
I guess look through the roles that EnumHOW and ClassHOW compose and see what the differences are :) 10:36
jnthn is generally not that fond of inheritance
But it might just turn out simpler in this case
Zoffix m: class Foo {}; my $foo = Foo.new; enum Bar <foo>; say Foo ~~ $foo; say Bar ~~ foo # something an enum can do that a class can't 10:37
camelia rakudo-moar d8309d: OUTPUT«False␤True␤»
cygx that looks wrong to me 10:39
Zoffix heh
cygx that aside, the other way around (things a class can do but an enum shouldn't be able to) would be the problem
dalek p: 19877e5 | peschwa++ | src/vm/jvm/runtime/org/perl6/nqp/runtime/Ops.java:
Adjust getattr_{i,n,s} on JVM to mirror MoarVM.

That is, ignore given hints when we have a class with multiple inheritance.
10:41
kudo/nom: e64214d | peschwa++ | tools/build/NQP_REVISION:
Bump NQP_REVISION for getattr_{i,n,s} fix.
ast: e27975f | peschwa++ | S02-literals/allomorphic.t:
Unfudge now passing tests
10:42
kudo/nom: 7a50c30 | lizmat++ | src/core/IO/Path.pm:
Make dir() about 20% faster

Rewrite the gather loop using nqp and being smarter about checks
12:33
lizmat this brings down use lib "."; say $*REPO.id in the rakudo checkout dir down from 1.9 seconds to 1.5 12:35
dalek rakudo/nom: 7a33c2c | cygx++ | src/Perl6/Metamodel/EnumHOW.nqp: 12:55
rakudo/nom: Make enums typecheck against the roles they do, ie
rakudo/nom:
rakudo/nom: role Foo {}
rakudo/nom: enum Bar does Foo <A B>;
rakudo/nom: say A ~~ Foo;
rakudo/nom:
rakudo/nom: will now be True.
rakudo/nom:
rakudo/nom: Note that there are possibly other goodies in ClassHOW that should
rakudo/nom: also live in EnumHOW. It might or might not be a good idea to just
rakudo/nom: have EnumHOW inherit from ClassHOW...
lizmat github.com/rakudo/rakudo/commit/7a33c2c 12:58
travis-ci Rakudo build failed. Elizabeth Mattijsen 'Make dir() about 20% faster 13:19
travis-ci.org/rakudo/rakudo/builds/165220286 github.com/rakudo/rakudo/compare/e...50c308239f
buggable [travis build above] ☠ Did not recognize some failures. Check results manually
hackedNODE Lots of failures in nativecall tests 13:20
(on jvm only)
psch i wonder if that's the getattr change, and if so *why*
cause apparently i forgot to run 'make test' 13:21
ah, it *is* that 13:25
because, obviously, we don't have only P6Opaque as REPR for getattr 13:26
or rather, don't only throw P6Opaques into getattr...
oh, but CStruct doesn't do MI anyway, so i can just instanceof i guess 13:27
still, kinda fragile i suppose, depending on whether we have other REPRs that do MI
and somewhat inelegant to boot /o\
dalek ast: bd1b067 | (Zoffix Znet)++ | S32-temporal/DateTime-Instant-Duration.t:
[coverage] Cover Instant.Date
13:30
lizmat psch: should I revert your PR ? 13:34
psch lizmat: nah, i'm fixing it right now 13:35
lizmat okidoki, psch++
psch it is somewhat of a provisionary solution, i guess i'd have to look closer at how moar does it... 13:37
hm, the way moar does mean i'd have to put the REPRData checks into gen'd code, from the looks of it 13:41
instead of in the getattr op in Ops.java 13:42
i guess i'll bandaid and try and implement it properly over the next few days 13:43
dalek ast: 60008ed | (Zoffix Znet)++ | S32-num/int.t:
[coverage] Add basic cover for UInt
jnthn psch: You may be able to do it simply by not generating code
psch: iirc there's a switch on hint and a default
So for MI could just do the default 13:44
psch jnthn: right, yeah, not generate the check for MI but only generate hinted calls without MI, that sounds a bit saner, thanks :)
jnthn Laziness wins again :) 13:45
hackedNODE m: dd Int.new: :2('1' x 64).Int 13:47
camelia rakudo-moar 4e12d1: OUTPUT«-1␤»
hackedNODE m: dd Int.new: 2**63 13:48
camelia rakudo-moar 4e12d1: OUTPUT«-9223372036854775808␤»
psch well, we apparently only *have* the boolean mi for P6Opaque in the first place 13:52
so, actually, until we get more reprs that do MI i'd go with my bandaid
i'll leave a comment in the getattr impls
dalek p: 1344f28 | peschwa++ | src/vm/jvm/runtime/org/perl6/nqp/runtime/Ops.java:
Correct oversight in hinted getattr_{i,n,s}
13:55
kudo/nom: 832764b | peschwa++ | tools/build/NQP_REVISION:
Bump NQP_REVISION for JVM getattr_{i,n,s}
13:56
travis-ci Rakudo build failed. lizmat 'Merge pull request #896 from cygx/role-typed-enums 13:58
travis-ci.org/rakudo/rakudo/builds/165225924 github.com/rakudo/rakudo/compare/7...12d17ddf8c
buggable [travis build above] ☠ Did not recognize some failures. Check results manually 13:59
hackedNODE Int.new is kinda an odd duck. What is it supposed to be doing? Considering ints just get "new" all by themselves? 14:06
cygx m: use nqp; say nqp::objectid($_) for 42, 42, Int.new(42) 14:07
camelia rakudo-moar 4e12d1: OUTPUT«50103272␤50103272␤50103352␤»
hackedNODE And you can't use 64+ bit things with it. 14:08
And according to coverage report, it ain't in roast
cygx m: use nqp; say nqp::objectid($_) for 42, 42, (42 but False);
camelia rakudo-moar 4e12d1: OUTPUT«57259040␤57259040␤57259120␤»
hackedNODE m: use nqp; say nqp::objectid($_) for 4200, 4200, Int.new(4200) 14:09
camelia rakudo-moar 4e12d1: OUTPUT«68748296␤68748296␤68748376␤»
hackedNODE m: use nqp; say nqp::objectid($_) for 42, 42, (42 does False);
camelia rakudo-moar 4e12d1: OUTPUT«70329512␤70329512␤70329512␤»
hackedNODE m: use nqp; say nqp::objectid($_) for 42, 42, Int.new(42) does False;
camelia rakudo-moar 4e12d1: OUTPUT«67151048␤67151048␤67151128␤»
hackedNODE So that's one use
cygx m: say .so for 42,42,42 does False 14:10
camelia rakudo-moar 4e12d1: OUTPUT«False␤False␤False␤»
cygx m: say .so for 42,42,42 but False
camelia rakudo-moar 4e12d1: OUTPUT«True␤True␤False␤»
lucasb_ hackedNODE: I think it's good to be able to say something like this: 14:12
m: say (Int.new, Num.new, Rat.new, Str.new, Bool.new).perl
camelia rakudo-moar 832764: OUTPUT«(0, 0e0, 0.0, "", Bool::False)␤»
lucasb_ m: Complex.new # can someone make this work, please? :)
camelia rakudo-moar 832764: OUTPUT«Cannot resolve caller new(Complex: ); none of these signatures match:␤ (Complex $: Real \re, Real \im, *%_)␤ in block <unit> at <tmp> line 1␤␤»
hackedNODE lucasb_: and why is it good?
lucasb_: 'cause right now Int.new is broken
lucasb_ hackedNODE: idk, it's just my feeling. I don't have a concrete answer 14:13
why Int.new is broken?
hackedNODE
.oO( programming by feeling... )
lucasb_: it gives incorrect results in range of 2**63-2**64 and then fails to accept any higher values, even though an Int can hold them 14:14
lucasb_ I used Ruby a little, and I can say SomeClass.new for most core classes, and they have a reasonable default value
hackedNODE You can say 0 instead of Int.new
lucasb_ m: say (.new for Int, Str, Rat, Num, Bool).perl # here's one use case, when you don't know what you want to instantiate 14:17
camelia rakudo-moar 832764: OUTPUT«(0, "", 0.0, 0e0, Bool::False)␤»
lucasb_ m: say Range.new # on the other hand, I find this UNreasonable. it shouldn't work, IMO :) 14:18
camelia rakudo-moar 832764: OUTPUT«Any..Any␤»
hackedNODE lucasb_: I'm not following that usecase. What's the endgoal of that program?
lucasb_ hackedNODE: idk. something like, when you receive a type object in a variable, and you don't know what it is. but you expect to be able to just call .new on it without any arguments and get a default value 14:21
hackedNODE You can call .?new :)
But anyway, I think I'm testing a fix right now 14:22
perlpilot lucasb_: ITYM "... get a useful default value" :-) But what if there is no useful default? (See Range :)
hackedNODE or not :( bigint isn't avaiable in src/core/Int 14:23
lucasb_ perlpilot: when the class has a *clear* default value, like 0, 0.0, "", etc. then it's ok 14:24
perlpilot: in the Range case, I think it should be an error
I think the *clear* default value for complex is 0+0i 14:25
hackedNODE Why? :)
lucasb_ why not? :D
hackedNODE Because you appear to have arbitrary picked a number for no specific reason. 14:26
m: say so 0+0i
camelia rakudo-moar 832764: OUTPUT«False␤»
hackedNODE And simply called it "clear" default :)
m: my Complex $z; say +$z
camelia rakudo-moar 832764: OUTPUT«Use of uninitialized value of type Complex in numeric context␤ in block <unit> at <tmp> line 1␤0␤»
lucasb_ I don't think zero is arbitrary. But ok, it can be controversial :) 14:27
perlpilot lucasb_: I think it's clear that a default Range should go from -Inf..+Inf
hackedNODE 0..0, clearly :)
perlpilot no, no, 0..Inf 14:28
lucasb_ remember when Date.new returned xmas date?
tadzik I do :)
hackedNODE It clearly should've been my birthdate 14:29
The world did not exist before then :P
perlpilot no, it should have been Perl's birthdate!
or perhaps TimToady's
dalek kudo/nom: f72cc62 | (Zoffix Znet)++ | src/core/Complex.pm:
Make Complex.new() return 0+0i

Reasoning:
  - Other numerics initialize to 0
  - Complex:U in numeric operations evalutes to 0+0i
  lucasb_++ for noticing
14:35
lucasb_ OMG, thanks hackedNODE++ :) 14:36
hackedNODE :)
lucasb_ now, make Range.new illegal :) lol
hackedNODE nah :} 14:37
dalek ast: 3518585 | (Zoffix Znet)++ | S32-num/complex.t:
Test Complex.new() gives 0+0i
14:38
lizmat dalek ? 14:52
hackedNODE dalek is netsplat 14:53
m: use MONKEY; augment class Int { method realnew ($v) { $v.clone.Int } }; say [ $_, nqp::objectid($_) ] for 2**65, Int.realnew(2**65), (my int $x = 42), Int.realnew($x), Int.realnew("foo") 14:55
camelia rakudo-moar f72cc6: OUTPUT«[36893488147419103232 59743592]␤[36893488147419103232 59743872]␤[42 59743912]␤[42 59743952]␤Cannot convert string to number: base-10 number must begin with valid digits or '.' in '⏏foo' (indicated by ⏏)␤ in method realnew at <tmp> line …»
lizmat github.com/rakudo/rakudo/commit/a4...379c8c2150 # Re-imagine DIR-RECURSE
hackedNODE I think that fix for Int.new can work.
lizmat nine: wonders what that brings for the perl6/mu checkout
hackedNODE It uses .clone to get new object (so we decouple it from any cached constants) and we use .Int to coerce non-intish things to Int
lizmat nine: fwiw, I know think any delay is really caused by slurping fiiles and doing the sha1 on them 14:56
hackedNODE enodalek 15:15
Int.new fix: github.com/rakudo/rakudo/commit/79...161efca854
hackedNODE rakes hack's bash history to find out how to restart the bot :) 15:16
no idea... don't wanna break anything 15:19
m: use nqp; say nqp::istype(role {}, Cool) 15:28
camelia rakudo-moar a48e7a: OUTPUT«1␤»
hackedNODE How come this is true?
lizmat hackedNODE: beats me 15:32
travis-ci Rakudo build passed. Zoffix Znet 'Make Complex.new() return 0+0i 15:37
travis-ci.org/rakudo/rakudo/builds/165253239 github.com/rakudo/rakudo/compare/8...2cc623be6e
lizmat github.com/rakudo/rakudo/commit/ff...62d5f71eeb # Re-imagine DIR-RECURSE further 15:41
nine lizmat: will still not help the mu repo case as long as we don't detect the symlink loop 15:56
lizmat is it really a loop ? 15:57
or just a lot of symlinks causing duplication of files?
geekosaur it was really a loop
some interior symlink that pointed to the top of the repo 15:58
[04 16:26:20] <nine> /home/nine/install/mu/misc/kp6_misc/kp6_ast/root_pugs/misc/kp6_misc/kp6_ast/root_pugs/misc/kp6_misc/kp6_ast/root_pugs/misc/kp6_misc/kp6_ast/root_pugs/misc/kp6_misc/kp6_ast/root_pugs/misc/kp6_misc/kp6_ast/root_pugs/misc/kp6_misc/kp6_ast/root_pugs/misc/kp6_misc/kp6_ast/root_pugs/misc/kp6_misc/kp6_ast/root_pugs/misc/kp6_misc/kp6_ast/root_pugs/misc/kp6_misc/kp6_ast/root_pugs/misc/kp6_misc/kp6_ast/root_pugs/misc/kp6_misc/kp6_a
st/root_pugs/misc/kp6_misc/kp6_ast/root
psch m: say role {}.^mro 15:59
camelia rakudo-moar ff50ce: OUTPUT«((<anon|50771696>))␤»
psch m: say role {}.new.^mro
camelia rakudo-moar ff50ce: OUTPUT«((<anon|55203600>) (Any) (Mu))␤»
lizmat geekosaur: so how can it then not infiniloop ?
geekosaur by tracking already-seen nodes, as nine pointed out right after that
you need that anyway as symlinks are not the only way for it to happen: windows reparse points, AFS volume mount points, and Linux bind mounts being several alternatives 16:00
(and loopback NFS mounts, and ...)
timotimo how do you actually recognize an already-seen node? 16:01
lizmat ok, but this only applies to symlinks to dirs, no ? 16:02
I mean, if we symlink to a file, we probably want to include the file, because it can get unsymlinked and get another content
geekosaur timotimo, presumably every OS has something conceptually similar to unix's stat()/lstat() which gives you some kind of file ID 16:04
(dev/inum on unix)
because that (some kind of unique id) is needed or not even the OS can detect such loops
cygx nqp::stat($_, nqp::const::STAT_PLATFORM_DEV) ~ '.' ~ nqp::stat($_, nqp::const::STAT_PLATFORM_INODE)
timotimo OK 16:06
hackedNODE m: &infix:<**>((my int $a = 2**62), (my int $b = 2**62)) 16:09
camelia rakudo-moar ff50ce: OUTPUT«This type cannot unbox to a native integer: P6opaque, Failure␤ in block <unit> at <tmp> line 1␤␤»
hackedNODE has trouble figuring out where it's getting that from :/ 16:10
s: &infix:<**>, \((my int $a = 2**62), (my int $b = 2**62))
SourceBaby hackedNODE, Sauce is at github.com/rakudo/rakudo/blob/798c...nt.pm#L286
timotimo m: my int $b = 2 ** 62
camelia ( no output )
timotimo it looks very much like it comes from inside moarvm
hackedNODE Weird. 'cause if I run ^ that candidate or the int int candidate in camelia, they work fine 16:11
Just not in core. And I tried with optimize=off, still no love
j: &infix:<**>((my int $a = 2**62), (my int $b = 2**62))
camelia ( no output )
hackedNODE aha
psch j: my int $x = 2 ** 64
camelia ( no output )
psch don't trust natives on jvm :P 16:12
hackedNODE Oh lol
m: use nqp; sub foo (Int:D \a, Int:D \b) { b >= 0 ?? nqp::pow_I(nqp::decont(a), nqp::decont(b), Num, Int) !! 1 / nqp::pow_I(nqp::decont(a), nqp::decont(-b), Num, Int) or a == 0 ?? 0 !! Failure.new(X::Numeric::Overflow.new) }; say foo (my int $a = 2**62), (my int $b = 2**62)
camelia rakudo-moar ff50ce: OUTPUT«Numeric overflow␤ in block <unit> at <tmp> line 1␤␤Actually thrown at:␤ in block <unit> at <tmp> line 1␤␤»
hackedNODE m: use nqp; my int $a = 2**62; my int $b = 2**62; say (nqp::pow_i($a, $b) or $a == 0 ?? 0 !! Failure.new(X::Numeric::Overflow.new))
camelia rakudo-moar ff50ce: OUTPUT«Numeric overflow␤␤Actually thrown at:␤ in block <unit> at <tmp> line 1␤␤»
hackedNODE ^ here both candidates work. Weird
gfldex lizmat: look for ELOOP, you may be able to offload the work to the OS man7.org/linux/man-pages/man7/path_...ion.7.html 16:16
lizmat that's pretty OS gnostic, fon't you think ? :-)
gfldex windows must have a max recursion thing too
geekosaur gfldex, the OS is already catching it currently. there is a delay before it kicks in though 16:17
because at least on linux the loop limit is high enough that it actually hits PATH_MAX first
gfldex if you walk the dir recursively yourself it wont hit until you acutally are 40 elements deep. So by finding a syscall that follows by itself, you may get ELOOP or hit PATH_MAX right away 16:19
geekosaur and the actual loop happens deep enough that you will take a while to hit it in a dense subtree
and the point here is to detect and avoid the loop *before* the OS finally gets around to it, after several minutes and lots of duplicate files processed 16:23
also no, there is no syscall that will immediately detect that foo/bar/baz/quux is a symlink to foo that will loop *if you do a full traversal of foo* 16:24
gfldex whenever I google tricky filesystem stuff and windows I end up on the cygwin mailing list :)
travis-ci Rakudo build failed. Elizabeth Mattijsen 'Re-imagine DIR-RECURSE 16:25
travis-ci.org/rakudo/rakudo/builds/165258075 github.com/rakudo/rakudo/compare/f...8e7a7dd379
buggable [travis build above] ☠ Did not recognize some failures. Check results manually 16:26
lizmat afk for a bit& 16:28
geekosaur ...and if there were you'd probably still be vulnerable to a race 16:29
hackedNODE s/weird//; 16:37
I'm really blind. Not sure where I was looking when I looked for it, but there is a `returns int` on my broken subs that I failed to notice :/
japhb hackedNODE: That's one of the reasons I prefer '--> int)' rather than ') returns int' -- the former stands out for me much better when skimming or debugging code. 16:44
Also, the piece of Haskell that most infected my brain is that return type is part of a function's signature. :-)
hackedNODE I think I was just looking at wrong code :)
m: sub (--> Int) { Failure.new }().Bool 16:46
camelia ( no output )
hackedNODE m: sub (--> int) { Failure.new }().Bool
camelia rakudo-moar ff50ce: OUTPUT«This type cannot unbox to a native integer: P6opaque, Failure␤ in sub at <tmp> line 1␤ in block <unit> at <tmp> line 1␤␤»
hackedNODE m: sub (--> int) { fail }().Bool
camelia ( no output )
hackedNODE Any tips on where the code that handles this stuff is at?
timotimo there's an op that does the return type checking 16:48
but clearly when we're supposed to return a native, we can't just stick an object where the native once was
so there's probably not even a typecheck op inserted there
hackedNODE m: ->-->int { Failure.new }() 16:49
camelia rakudo-moar ff50ce: OUTPUT«Failed␤ in block <unit> at <tmp> line 1␤␤Actually thrown at:␤ in block <unit> at <tmp> line 1␤␤»
gfldex lizmat: stat does not return $dev or $ino for danglink symlinks, so they can be undefined 17:00
geekosaur right, you need to use lstat for that 17:04
although for a dangling symlink you should just treat that the same as any missing file and report a warning or error as appropriate (usually for a dangling symlink a warning is what you want) 17:05
travis-ci Rakudo build failed. Zoffix Znet 'Fix Int.new for large values 17:06
travis-ci.org/rakudo/rakudo/builds/165265560 github.com/rakudo/rakudo/compare/a...8c2e2dca34
buggable [travis build above] ☠ Did not recognize some failures. Check results manually 17:07
dalek ast: f9950fa | RabidGravy++ | S32-list/cross.t:
Simple test for the sub form of 'X'

Closes #165
17:08
hackedNODE How come p6typecheckrv op doesn't show up when I grep nqp or MoarVM repos? I see it generated here: github.com/rakudo/rakudo/blob/nom/....nqp#L8988
timotimo it's a rakudo extensionop
hackedNODE Ah, OK. Found it: github.com/rakudo/rakudo/blob/nom/...s.nqp#L585 17:09
timotimo oh, it's not actually an extop 17:10
sorry
dalek kudo/nom: 6f7e4bd | RabidGravy++ | t/spectest.data:
Add the S32-list/cross.t to the spectest.data

Re github.com/perl6/roast/issues/165
17:19
kudo/nom: 9ea23c9 | (Zoffix Znet)++ | t/spectest.data:
Merge pull request #897 from jonathanstowe/nom

Add the S32-list/cross.t to the spectest.data
gfldex lizmat: perl5 version of loop detection gist.github.com/gfldex/865852d35e1...9178cf79bf 17:41
lizmat: works for symlinks and mount -o bind. No idea about hardlinks on directories. I don't got a OS/fs that would allow me this kind of madness. 17:46
writing perl5 code is really unpleasant now :)
travis-ci Rakudo build errored. Elizabeth Mattijsen 'Squeeze another 20% out of DIR-RECURSE 17:48
travis-ci.org/rakudo/rakudo/builds/165273068 github.com/rakudo/rakudo/compare/7...50cef62d5f
geekosaur that should work, unless the fs itself is broken and cannot unambiguously identify its own files 17:50
hackedNODE 13union again
buggable [travis build above] ☠ Did not recognize some failures. Check results manually
geekosaur (or other corner cases that basically mean there's no way for any program to do so, e.g. accessing it over some network filesystem that loses the original id) 17:51
gfldex techically there is the danger of reused inode numbers but that would require to start a script while the module installer is running. I don't think we support that case right now. 18:03
dalek ast: fa7da3d | RabidGravy++ | S32-list/cross.t:
Use is-deeply rather than `is` for the tests

As per comments on
  github.com/perl6/roast/commit/f995...ed1e506224
  See also #167
18:44
hackedNODE This would be the code that runs any time p6typecheckrv op is run, right? github.com/rakudo/rakudo/blob/nom/...s.nqp#L585 18:48
'cause I stuck a bunch of nqp::say() statements inside of it and one right before this line: github.com/rakudo/rakudo/blob/nom/....nqp#L8989
and the one in Actions printed, but the one in Ops.nqp didn't.
hackedNODE is still trying to find why one Failure works but other doesn't 18:49
m: sub (-->int) { return Failure.new }()
camelia rakudo-moar 9ea23c: OUTPUT«Failed␤ in block <unit> at <tmp> line 1␤␤Actually thrown at:␤ in block <unit> at <tmp> line 1␤␤»
hackedNODE m: sub (-->int) { Failure.new }()
camelia rakudo-moar 9ea23c: OUTPUT«This type cannot unbox to a native integer: P6opaque, Failure␤ in sub at <tmp> line 1␤ in block <unit> at <tmp> line 1␤␤»
psch hackedNODE: well, the code in Ops.nqp is codegen code 18:51
hackedNODE: so your says should happen during CORE.setting compilation
hackedNODE Yeah, they did
nine For those interested, this was my day today :) niner.name/pictures/2016-10-05%20Innsbruck/ 19:09
And no, I didn't take the bus in the first picture. It was just too crazy not to take a picture of...
travis-ci Rakudo build failed. Zoffix Znet 'Merge pull request #897 from jonathanstowe/nom
travis-ci.org/rakudo/rakudo/builds/165301003 github.com/rakudo/rakudo/compare/f...a23c9c4745
gfldex nine: a reasonable move to take pictures of yourself if the landscape is invisible. :) 19:11
really nice weather you got there :) 19:12
hackedNODE "Pale Moon can't find the server at www.niner.name." :(=
buggable [travis build above] ☠ Did not recognize some failures. Check results manually 19:13
nine gfldex: the weather report from this morning was "mostly sunny" btw
psch hah
rindfleischreisen made me think of "Beef Traveler", with their hit single "Hook" :l
hackedNODE :( buggable ate all my RAM 19:14
psch except that's just a (kinda horrible) pun
nine hackedNODE: does seifert.website/pictures/2016-10-05%20Innsbruck/ work by any chance?
hackedNODE yup
psch okay, the sixth picture in the folder is enough for me
lucasb_ mostly snowy
hackedNODE And I can get to niner.name with lynx on the box I'm proxying Pale Moon through, so I think Pale Moon is just dumb :)
psch i'll eat and then sleep 19:15
nine hackedNODE: some people do have trouble accessing niner.name due to some DNS weirdness. Something about inconsistent glue that I seem to be unable to fix. The irony is that seifert.website is configured identically and registered through the same registrar. 19:16
So I slowly start to believe that nic.name is to blame...
moritz nine: I believe ns1.niner.name is to blame 19:36
nine: perlpunks.de/paste/show/57f55681.7717.354 19:37
nine: going for the IPv6 address also gives a timeout 19:38
nine: perlpunks.de/paste/show/57f5573f.1c13.20e that#s the traceroute 19:40
nine ns1.niner.name hasn't had 188.40.80.22 for more than a year 19:44
moritz then the .name nic is to blame 19:45
nine which is Verisign
moritz complain loudly 19:46
all .name nameserver give a glue record ns1.niner.name. IN A 188.40.80.22 19:48
nine moritz: thanks! Just wrote Verisign an Email. Maybe it even helps. 19:51
I will give them a day or two. Then I'll try changing the DNS servers to other host names with DirectNIC. I've updated my records there a couple of times already but never tried different names, so maybe they were being too smart detecting no change. 19:52
It seems like I had the exact same problems the last time I moved to a new server back in 2014. Just found an email by DirectNIC support 20:01
gfldex lizmat: please backlog if you did not do so already 20:09
dalek kudo/nom: 62d8382 | lizmat++ | src/core/ (2 files):
Make DIR-RECURSE handle symlinks

  - only for directories
  - keep a hash of directories seen
  - move stubbing of IO / IO::Path up from Cool to Rakudo::Internals
20:12
lizmat gfldex: I'm not sure how gist.github.com/gfldex/865852d35e1...9178cf79bf helps in our situation
gfldex: please tell me what is wrong with the approach I just took ^^^ 20:13
in the mu repo, I now get: 20:14
$ 6 'use lib "."; say $*REPO.id'
F69C667842D222649E295BFFF370D6AE68003A97
real0m0.685s
gfldex lizmat: as I understand this code, it resolves anything into abspath, what would turn a symlink into an abspath as well and then use a seen-hash to keep track of them. That wont work for loops because in a loop the path name changes with each iteration of that loop. If the objective is to speed up what we have already this is fine. 20:21
if there is a loop however it depends on the OS to crap out. 20:22
lizmat hmmm... I've created a loop here, and it works fine 20:23
gfldex is it fast? 20:24
lizmat no noticeable difference with no loop
$ pwd 20:25
/Users/liz/Github/rakudo.moar/foo
$ ls -ls bar
8 lrwxr-xr-x 1 liz macports 2 Oct 5 21:48 bar -> ..
gfldex is this on Windows? 20:26
lizmat OS X
gfldex no idea what is PATH_MAX on osx, on windows it can go up to 32767
lizmat the thing is is doesn't grow.. IO::Path.resolve will take it to the underlying dir 20:27
so a. the path never grows, and b. is found to be a duplicate
gfldex isn't .. skiped by dir()?
lizmat this isn't using dir() at all 20:28
so, first it sees "bar", finds out it is a dir, *then* finds out it is a symlink, then resolves it, and then ignores if duplicate 20:29
gfldex ls /tmp/dir1/dir5/ # ls: cannot access '/tmp/dir1/dir5/': Too many levels of symbolic links 20:31
lizmat: do you get this error message form bash?
lizmat ENODIR ? 20:32
gfldex i think that would be ELOOP
lizmat well, I don't have a /tmp/dir1 to begin with 20:33
gfldex i created the link inside `cd /tmp/dir1/; ln -s dir5 /tmp/dir1/`
so you would need `bar -> /Users/liz/Github/rakudo.moar/foo/` inside foo 20:34
(i think, my brain is not good with recursion)
lizmat the thing is, that if you have a circular symlink like that, it isn't a dir 20:37
do the infinlooping cannot happen 20:38
also, it's not a regular file either, so it is also ignored
at least in DIR-RECURSE
gfldex that deals with symlinks then but not with the cases of loops that come from other stuff. I would ignore that tho. If you build a loop with mount -o bind you deserve the pain :) 20:39
lizmat and I think it will even handle that correctly 20:40
gfldex does nqp::stat do a lstat before a stat? 20:41
lizmat not as far as I know
nqp::stat is oblivious to symlinks afaik 20:42
gfldex then it should do all tests on it's target. That means a test for directory should succeed on a symlink pointing at a directory
lizmat yup
that was the idea, afaiac 20:43
gfldex ohh, there is nqp::fileislink
lizmat yup
so, as far as I underatand it, the loading of a module in mu should now be around 1 second 20:44
gfldex how do I test that? 20:45
or better, in what directory do I have to place symlinks/junctions/meanies? 20:46
lizmat at any location in or below the dir you specify with "use lib" 20:50
gfldex stat("/tmp/dir1/dir5", 0x7fffa93283d0) = -1 ELOOP (Too many levels of symbolic links) 21:13
lizmat: so it craps out on a stat and the error code is simply ignored and a False returned (or somesuch) 21:14
lizmat not sure if I follow you 21:16
geekosaur only works for explicit loops, again, not for delayed loops that are only triggered by traversals
lizmat the logic in DIR-RECURSE is:
1. do we accept the filename
2. if so, does the file exist and is it a regular file (using stat, oblivious to symlinks) 21:17
3. then we found a file
4. if not, do we accept it as a dirname
5. if so, does the dir exist and is it a dir (again, oblivious to symlinks) 21:18
gfldex step 2 fails with ELOOP, so your code thinks the file doesn't exist. Since such infinite loops don't work anyway that's find.
lizmat 6. then if it is a symlink, resolve it and use that as the path name
7. did we see the directory before, then ignore
8. schedule dir for later processing
gfldex: yup 21:19
gfldex but I don't understand what you need the seen hash for. It should get slower, not faster. 21:20
lizmat if the symlink resolves to a dir that we've seen before, we don't want to do that dir again
gfldex ok, got it 21:21
would it make sense to doc the recursive nature of `use Foo;`? The only nasty case I can think of are plenty of btrfs snapshots somewhere in the module search path. 21:25
or better doc it for `use Lib '/foo/'` and -I 21:26
lizmat gfldex: that's only the case if you have a "use lib" active
yup, well
gfldex do we ignore .git already?
lizmat we ignore every dir that starts with "."
gfldex that needs docing for sure 21:27
lizmat technically, we should probably ignore all dirs that have a name that is not allowed to be part of a class name
since Foo::.git is illegal as name, that works fine
but I'm not sure what would be a fast way to check for identifier legality 21:28
gfldex can you guess what we don't doc yet? :-> 21:31
lizmat plenty ? :-) 21:32
gfldex not really, I'm quite confident that we got pretty much all language features. There may be some hole in grammars left and a few methods that are not doced yet. 21:33
but use lib 'foo' is not doced
lizmat but -I is ? 21:37
gfldex yes 21:38
lizmat m: my token foo { <.ident> [ <[ ' \- ]> <.ident> ]* }; say "bar" ~~ / ^ <foo> $ / # works fine 21:39
camelia rakudo-moar 62d838: OUTPUT«「bar」␤ foo => 「bar」␤»
lizmat m: my token foo { <.ident> [ <[ ' \- ]> <.ident> ]* }; say "bar" ~~ / ^ <.foo> $ / # is this a bug ?
camelia rakudo-moar 62d838: OUTPUT«No such method 'foo' for invocant of type 'Cursor'␤ in block <unit> at <tmp> line 1␤␤»
lizmat gfldex: then at least document 'use lib' there ?
Zoffix m: say (my int $ = 2**62) div (my int $ = 0); CATCH { default { .^name.say; } } 21:51
camelia rakudo-moar 62d838: OUTPUT«X::AdHoc␤»
Zoffix m: say 0/0; CATCH { default { .^name.say; } }
camelia rakudo-moar 62d838: OUTPUT«X::Numeric::DivideByZero␤»
Zoffix Comment says "# relies on opcode or hardware to detect division by 0". Imma change it to a CATCH that throws right exception, unless anyone has objections. github.com/rakudo/rakudo/blob/nom/...nt.pm#L271
or try $b for zero.... 21:52
lizmat Zoffix: having a CATCH block in a block prevents inlining, so there may be performance issues ? 21:53
Zoffix OK, what about checking $b == 0?
m: constant Int $i = 0; 21:54
camelia rakudo-moar 62d838: OUTPUT«===SORRY!=== Error while compiling <tmp>␤Missing initializer on constant declaration␤at <tmp>:1␤------> constant Int⏏ $i = 0;␤»
Zoffix That blows
gfldex that's just LTA, you can't have a runtime type check on a bound container that is bound at compile time 21:56
Zoffix My original usecase is I wanted some `constant` native ints 21:57
gfldex that may be NYI
m: constant int $i = 0;
camelia rakudo-moar 62d838: OUTPUT«===SORRY!=== Error while compiling <tmp>␤Missing initializer on constant declaration␤at <tmp>:1␤------> constant int⏏ $i = 0;␤»
gfldex also LTA 21:58
it's a good question if a native int type constaint on a constant makes sense. They can't be undefined. 21:59
dalek kudo/nom: 8023dfb | (Zoffix Znet)++ | src/core/Int.pm:
Throw on overflow in infix:<*>(int, int)

Detect overflow and return a Failure. Currently won't work entirely right due to RT#129811 ( rt.perl.org/Ticket/Display.html?id=129811 ), but will automatically do the right thing once that is fixed.
Fixes RT#129813: rt.perl.org/Ticket/Display.html?id=129813
22:00
synopsebot6 Link: rt.perl.org/rt3//Public/Bug/Displa...?id=129811
synopsebot6 Link: rt.perl.org/rt3//Public/Bug/Displa...?id=129813
Zoffix gfldex, I guess it's more of a question of *how* to get an immutable native int, rather than constraining anything
m: int.new.say 22:01
camelia rakudo-moar 62d838: OUTPUT«No such method 'BUILDALLPLAN' for invocant of type 'Perl6::Metamodel::NativeHOW'␤ in block <unit> at <tmp> line 1␤␤»
dalek ast: 2240859 | (Zoffix Znet)++ | S32-num/int.t:
[coverage] Cover parts of Int.pm
22:03
Zoffix Int.pm has a nest of bugs :) (not all related to Ints)
Though some can be avoided by removing type constraints on subs. 22:05
I think someone mentioned they make things slower unless they're Nil? Maybe they should be removed from things we "know" always return the right thing, like ** and * on native ints. 22:06
AlexDaniel 🌬 22:07
Zoffix m: '🌬'.uniname.say 22:08
camelia rakudo-moar 62d838: OUTPUT«WIND BLOWING FACE␤»
jnthn Whatever you do, don't remove them on things that "returns int" otherwies you'll mess up static inlining of native operators
(same for "returns num")
Zoffix noted :)
jnthn int.new makes on sense, you can't make an instance of a native type...it should blow up more helpfully though :)
*no sense 22:09
jnthn should get some rest...'night o/ 22:11
Zoffix night 22:12
lizmat just tried to point out you can do: 22:26
$out.put($_) for $file.IO.lines.grep( *.starts-with('>').head($n);
in blogs.perl.org/users/ken_youens-cla...thing.html
but the site doesn't seem to like me anymore, as it is refusing me from logging in :-( 22:27
lizmat gives up
dalek kudo/nom: 338a70a | lizmat++ | src/core/CompUnit/Repository/FileSystem.pm:
Only allow directories that are valid identifiers
22:35
lizmat and on that note: good night, #perl6-dev! 22:36
Zoffix night 22:37
travis-ci Rakudo build failed. Zoffix Znet 'Throw on overflow in infix:<*>(int, int) 23:13
travis-ci.org/rakudo/rakudo/builds/165373282 github.com/rakudo/rakudo/compare/6...23dfbc6ff1
buggable [travis build above] ☠ Did not recognize some failures. Check results manually
travis-ci Rakudo build passed. Elizabeth Mattijsen 'Only allow directories that are valid identifiers' 23:57
travis-ci.org/rakudo/rakudo/builds/165380944 github.com/rakudo/rakudo/compare/8...8a70a236a3