»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg camelia perl6: ... | irclog: irc.perl6.org | UTF-8 is our friend!
Set by sorear on 25 June 2013.
[Coke] SixModelObject iter = iter(obj, tc); - this is dying, but I'm not getting a stacktrace. 00:23
I have two catch blocks - each with a die_s() - neither of die_s's are appearing either. 00:24
00:28 raiph left 00:35 raiph joined 00:44 aindilis joined 00:45 BenGoldberg joined 01:02 dayangkun joined, woosley joined
[Coke] ah. because it's generating a org.perl6.nqp.runtime.UnwindException 01:15
01:16 crab2313 joined
[Coke] ok, updated my work in progress: gist.github.com/coke/5944808 (shell with env vars) 01:19
01:30 FieldsaBB joined 01:35 yoleaux joined, ChanServ sets mode: +v yoleaux 01:52 konundra left 01:58 FROGGS_ joined 02:28 konundra joined 02:38 daniel-s joined, SamuraiJack joined 02:48 amoe_ joined 02:51 BenGoldberg left 03:03 dayangkun_ joined 03:04 dayangkun_ left 03:07 dayangkun left 03:44 ehouse joined
ehouse In terms of an object what does the method can do. I can't find any documentation on it. 03:49
sorear ehouse: I can't interpret that. 03:54
ehouse > $c.can('feed','nip'); 03:55
Too many positional parameters passed; got 3 but expected 2
I'm trying to debug that 03:56
sorear $c.^can('foo') returns a true value if $c responds to the method "foo"
$c.can('foo') is an alias to .^can
.can() isn't supposed to take more than one argument
ehouse oh well ok. Thanks 03:57
sorear if you want to test more than one method, use &&
TimToady r: say Int.^can('floor).WHAT
camelia rakudo 93f30e: OUTPUT«===SORRY!===␤Unable to parse expression in single quotes; couldn't find final "'"␤at /tmp/y61uleZEwH:1␤------> say Int.^can('floor).WHAT⏏<EOL>␤ expecting any of:␤ method arguments␤ argument list␤ prefix o…
TimToady r: say Int.^can('floor').WHAT
camelia rakudo 93f30e: OUTPUT«(Parcel)␤»
sorear r: say Int.^can('floor').perl
camelia rakudo 93f30e: OUTPUT«(method floor(Int:D : Mu *%_) { ... }, method floor(Cool : Mu *%_) { ... })␤»
03:57 preflex left 03:58 preflex_ joined, ChanServ sets mode: +v preflex_, preflex_ is now known as preflex
TimToady r: say Int.^can('floor').[1].(42.5) 03:58
camelia rakudo 93f30e: OUTPUT«42␤»
TimToady \o/
sorear r. say 42.5.$( Int.^can('floor') ) 04:08
r: say 42.5.$( Int.^can('floor') )
camelia rakudo 93f30e: OUTPUT«No such method 'postcircumfix:<( )>' for invocant of type 'Parcel'␤ in block at /tmp/VswENQ2hKV:1␤␤»
sorear ENOTENOUGHDOTS
r: say 42.5.@( Int.^can('floor') )
camelia rakudo 93f30e: OUTPUT«No such method 'postcircumfix:<( )>' for invocant of type 'List'␤ in block at /tmp/LDE3rmRffI:1␤␤»
sorear how is thi supposed to work?
r: class A { multi method y(Int) { }; multi method y(Str) { } }; say A.can('y').perl 04:10
camelia rakudo 93f30e: OUTPUT«(method y(: , Mu *%_) { ... },)␤»
sorear ok, so it gets the method dispatch list, not the multi list
sorear still isn't sure how you're supposed to be able to use the result from can 04:22
r: class A { multi method y(Int) { }; multi method y(Str) { } }; say A.^find_method('y').perl
camelia rakudo 93f30e: OUTPUT«method y(: , Mu *%_) { ... }␤»
sorear r: class A { multi method y(Int) { }; multi method y(Str) { } }; say Int.^find_method('floor').perl 04:23
camelia rakudo 93f30e: OUTPUT«method floor(Int:D : Mu *%_) { ... }␤»
sorear looks like in rakudo you only have to call the bottom method in the stack, and nextsame is.. ahem... rather magical 04:43
though in 6model-land if you want to call stuff it would be more correct to use find_method 04:44
ehouse: you aren't trying to use the jvm port, are you? 04:50
ehouse sorear: rakudo
sorear ehouse: rakudo on parrot or rakudo on jvm?
04:51 birdwindupbird joined
ehouse sorry rakudo parrot 04:51
sorear "use of uninitialized value of type Any in string context" is a warning, not an error
ehouse I know. My tests are throwing warning and I want to fix them or atleast understand them
sorear r: my $x; say $x eq 'foo' 04:52
camelia rakudo 93f30e: OUTPUT«use of uninitialized value of type Any in string context in block at /tmp/v83x2NMXmo:1␤␤False␤»
sorear r: my $x = 'bar'; say $x eq 'foo' 04:53
camelia rakudo 93f30e: OUTPUT«False␤»
sorear If you try to use a variable without assigning anything to it, perl gives a warning
To avoid that warning, initialize your variables before using them
ehouse oh jeeze. There is a edge case were the variabled wont get declared 04:54
didn
04:54 xinming left
ehouse didn't think that through. Thanks though 04:54
04:56 xinming joined
sorear minor note on terminology 04:56
we say "declared" for what happens when the perl parser sees the word "my"
it's impossible to use a variable at all before declaration
indeed, normally none of your code will run until the perl parser is done with the file 04:57
ehouse ok
05:10 fridim_ left 05:16 daniel-s left
moritz 06:56 < sorear> it's impossible to use a variable at all before declaration 05:52
nearly :-)
or, depends on your definition of "before"
r: END { eval 'say $x' }; my $x = 42;
camelia rakudo 93f30e: OUTPUT«42␤»
moritz that's textually before, but temporally after 05:53
(and eval is cheating, of course)
06:00 dmol joined 06:05 crab2313 left
sorear moritz: I was going for temporally 06:06
& good morning
06:08 crab2313 joined 06:13 kaleem joined 06:29 dayangkun joined 06:39 raiph left 06:43 domidumont joined 06:47 FROGGS_ left 06:48 domidumont left 06:51 xilo left 06:59 domidumont joined 07:08 iSlug joined 07:09 FROGGS joined 07:17 dmol left 07:19 dmol joined 07:33 domidumont left 07:34 domidumont joined
masak good morning, #perl6! 07:40
I'm still a bit stunned that integrating our sprintf code into nqp actually *helped*. :) 07:41
this is the most useful I've felt since YAPC::NA, I believe.
sorear o/ masak 07:42
FROGGS o/
07:59 kst joined 08:02 daniel-s joined 08:05 crab2313 left 08:07 crab2313 joined
sorear .tell jnthn gist.github.com/sorear/5947073 # collected thoughts on Rakudo JVM interop sugar (not discussing strictly internal implementation details, only user-visible aspects) 08:15
yoleaux sorear: I'll pass your message to jnthn.
masak fwiw, invariant wrappers sounds like the better option, even if it's in some sense also more boring/inconvenient. 08:29
what happens if a Java class has a method actually called 'new'? 08:31
08:36 daxim joined 08:37 dakkar joined
moritz hilarity! 08:44
JimmyZ good afternoon, #perl6 08:50
08:50 Stygia joined
moritz good morning, JimmyZ 08:50
JimmyZ \o, moritz :P
moritz in some programs, some parts of the program want notifications when some data changes 08:51
is there a design pattern for such stuff? and if yes, what's its name?
08:55 dayangkun left
JimmyZ observer pattern? 08:58
jnthn morning, #perl6 08:59
yoleaux 08:15Z <sorear> jnthn: gist.github.com/sorear/5947073 # collected thoughts on Rakudo JVM interop sugar (not discussing strictly internal implementation details, only user-visible aspects)
tadzik good morning folks
moritz JimmyZ: looks like it, yes
(or at least similar to what I had in mind)
JimmyZ moritz: or promise / deliver
tadzik pub-sub?
JimmyZ promise is better, methinks 09:00
jnthn sometimes calls the thingy that does pub/sub an "event aggregator" 09:01
moritz pub-sub seems to cut it better, yes
at $work we have a big-ish piece of software with some weird interdependencies 09:02
JimmyZ promise is better because of asynchronous
moritz for example if a person's address changes, we need to check if RIPE data sets need changes too
so currently the code that handles addresses needs also be aware of RIPE objects. That's kinda ugly 09:03
JimmyZ: in this case we actually need synchronous, because the listener might prevent an update
jnthn Meaning that everything a listener does needs to be transactional in some sense? 09:04
moritz yes
jnthn sorear++ # thorough write-up
moritz (performance is not a huge deal; it's an interactive application that doesn't do any batch processing, so if we spend 0.1s per update on verifying stuff, that's fine) 09:05
jnthn sorear: On invariant/covariant, does Java code itself not have the same problem, it's just that you find out about the ambiguity at compile time?
lizmat morning #perl6!
moritz \o lizmat 09:06
jnthn sorear: I think that it may be a bit too surprising of, given two java types where S <: T, their wrappers in Perl 6 land don't reflect that relation.
lizmat \o moritz!
jnthn s/of/if
o/ lizmat
JimmyZ moritz: which language are you using? 09:09
moritz JimmyZ: perl 5 09:10
09:12 iSlug left
JimmyZ moritz: github.com/stevan/promises-perl 09:13
jnthn But promises aren't really a pub/sub mechanism? 09:14
jnthn doesn't see how they help a huge amount here... 09:15
09:15 iSlug joined
JimmyZ yes, it's not, just FYI. 09:16
:P
09:16 woolfy joined
jnthn promises to give Perl 6 promises :) 09:24
masak fwiw, I don't draw a huge distinction between "Observer pattern" and "pub/sub". 09:25
jnthn I think there is an important one, though. With the observer you go directly to the thing doing the notifications and say, "add me to your subscriber list". 09:26
JimmyZ jnthn++, I really want clojure promise/future in Perl 6!!! 09:27
jnthn In an event aggregator / message bus / whatever we call it setup, you go to a central thing and say, "I want the event with this name/type". It's an extra level of decoupling.
masak jnthn: I can see that.
jnthn: I guess I never do it in the latter way, though.
jnthn Yeah, but you've seen loads of my code doing it :P 09:28
ISubscribeTo<T> :)
masak *nod* :) 09:29
ok, I buy the argument about "extra level of decoupling".
09:30 iSlug left
dalek ast: a238cfe | (Elizabeth Mattijsen)++ | S06-signature/introspection.t:
Fix comment
09:32
09:35 iSlug joined
dalek ast: 84d1d91 | (Elizabeth Mattijsen)++ | S12-methods/lvalue.t:
Fix comment
09:37
09:48 eternaleye joined 09:52 iSlug left 10:00 crab2313 left 10:18 fhelmberger joined
lizmat jnthn: trying to add trait_mod for "is default", but cannot seem the right type of invoker for this to add to traits.pm 10:32
or should it be added to BOOTSTRAP ?
10:32 grondilu joined
grondilu rn: say <foo bar>.comb.elems 10:32
camelia rakudo 93f30e, niecza v24-86-g39ab531: OUTPUT«7␤»
lizmat 7 characters of the joined list? 10:33
moritz lizmat: is the problem to get the signature right?
lizmat yes
grondilu rn: say ['foo', 'bar'].comb.elems
camelia rakudo 93f30e, niecza v24-86-g39ab531: OUTPUT«7␤»
lizmat rn: say ['foo', 'bar'].comb
camelia rakudo 93f30e, niecza v24-86-g39ab531: OUTPUT«f o o b a r␤»
grondilu I guess that's the semantic for List.comb 10:34
jnthn lizmat: We don't implement variable traits yet.
moritz I had a bit of code that added them partially for my attempts to do 'is export' on variables
jnthn grondilu: .comb operates on a String 10:35
lizmat jnthn: I thought you'd said it would simply be a matter of adding an multi trait_mod:<is>(Any:D $container, :$default!) {
$container.set_default($default);
}
grondilu was wondering what List.comb was exactly, while he was looking at rosettacode.org/wiki/Letter_frequency#Perl_6
moritz certainly not Any:D
rather Mu
lizmat moritz: tried that, didn't work
jnthn lizmat: Yes, it will be once we actually have variable traits in place :P
We need something cleverer than just passing the container itself.
We need a bit more context.
Otherwise it will be impossible to implement things like "my IO $var will leave { .close } .= new;" 10:36
arnsholt Semi-random question: If I set up a trait_mod:<is> to do "class Foo { has $.stuff is flurble; }", what kind of object will my multi trait_mod:<is>($stuff, :$flurble!) get as its first argument?
jnthn Attribute
There are some examples of this one in traits.pm :) 10:37
arnsholt Oh, goody
lizmat ok, this feels like I'm getting in too deep for my level of comprehension
arnsholt And examples, even better!
jnthn lizmat: I suspect the answer is going to be some kind of VariableDecl object.
arnsholt I think I want to use that kind of thing for inlined/non-inlined structs and arrays in NativeCall 10:38
jnthn lizmat: I dunno quite what it should be called.
lizmat ContainerDecl ?
jnthn Well, attributes involve containers too...
lizmat I mean, we already have a "default" attribute in the ContainerDescription object 10:39
jnthn *nod*
lizmat ok, I'll hold this train of thought for a later time, instead I'll add some todo tests 10:43
jnthn *nod*
Perhaps I can put it in this evening...
arnsholt Developing a branch non-publically is interesting, a propos nothing. I think I'm going to have to resist the temptation to rebase it *too* much before I push it ^_^
jnthn All your rebase are belong to you until you push... :) 10:44
arnsholt Quite. The temptation to hide all intial mistakes is great indeed =)
lizmat jnthn: that would be great, but please don't let me interrupt your flow wrt the JVM effort 10:46
jnthn lizmat: Well, we're already well past the 95% spectest target I had for the July release... :P
lizmat: Plus it's nice to do improvements that help Rakudo everywhere as well as Rakudo on JVM :) 10:47
lizmat that's true :-)
masak grondilu: but in that code .comb is not run on a List, but on its elements. hence the » 10:48
grondilu masak: that's because it's a new code I've just been adding 10:57
former code was (my %count){$_}++ for lines.comb; 10:58
jnthn It's one of .categorize or .classify do that idiomaticer? 11:01
*Doesn't
masak grondilu: that just looks wrong/untested to me. 11:02
grondilu: at the very least, it relies on the stringification of the List that lines() outputs. 11:03
grondilu lines».comb?
masak right.
but why does the author insist on first breaking up into lines and only then into characters?
grondilu doesn't lines always return a list of strings?
masak rn: say "foo".lines.^name 11:04
camelia rakudo 93f30e: OUTPUT«List␤»
..niecza v24-86-g39ab531: OUTPUT«Array␤»
masak yes, seems so.
grondilu masak: because you want to count characters?
oh, I guess you meant we could write bag slurp.comb 11:05
grondilu tends to use lines everytime he wants to read $*IN
but with slurp you'll get the linefeeds 11:06
11:07 konundra left
masak grondilu: you'll get the linefeeds, just like you'd get spaces and tabs and '.' and '-' and other characters you may not be interested in counting. 11:10
11:13 salv0 joined 11:16 eternaleye left
lizmat n: my $a is default(42) 11:25
camelia niecza v24-86-g39ab531: OUTPUT«===SORRY!===␤␤Trait default not available on variables at /tmp/XaDbIeDyF1 line 1 (EOF):␤------> my $a is default(42)⏏<EOL>␤␤Potential difficulties:␤ $a is declared but not used at /tmp/XaDbIeDyF1 line 1:␤------> m…
lizmat
.oO( need to fudge niecza "is default" tests )
masak oh, that reminds me of my idea for subtype defaults. 11:27
daxim jnthn, xeno left a comment last week on your jvm progress blog entry to ask something 11:28
yoleaux 29 Jun 2013 20:35Z <raiph> daxim: is that about my weird "divided we fall"?
daxim .tell raiph I have no context 11:30
yoleaux daxim: I'll pass your message to raiph.
11:31 eternaleye joined
moritz now raiph won't have any context either when receiving the message 'I have no context' 11:33
lizmat jnthn: given "my $a = 1", what would be the quickest way to get at the ContainerDescription?
11:37 ecocode joined 11:40 eternaleye left 11:42 eternaleye joined
arnsholt Jonathan Worthington: "architectural mastermind" =D 11:42
masak mwhahaha 11:45
arnsholt My thoughts exactly =D 11:47
moritz found it quite fittin 11:49
g
arnsholt Yeah, it's a very good fit. But it's a very amusing turn of phrase as well. I liked it =) 11:52
masak "mastermind" makes me think of www.imdb.com/title/tt1001526/
arnsholt Exactly! =D 11:53
jnthn daxim: ah, I must missed the email notifying me somebody had left a comment somehow... 11:54
jnthn will reply later on today
lizmat: It's an attribute on Scalar, so nqp::getattr would allow access to it 11:55
arnsholt jnthn: I think I'm going to add another op for native calls: cannativecall (or something like that). That way we can fail at least a bit gracefully if something doesn't work out, and tests related to it in the NQP test suite (forthcoming) can skip 11:57
11:59 konundra joined
daxim masak, I expected a halle berry filmification of the hasbro board game. my SON, I AM DISAPOINT knows no bounds :( 12:01
masak daxim: oh. I know nothing about the board game, unfortunately. 12:02
daxim it's the castle puzzle in nethack. 12:03
nethackwiki.com/wiki/Mastermind
masak hm :) 12:04
daxim perhaps next masakism can have a challenge to implement a solver
masak perhaps :) 12:06
I like implementing games.
12:08 futurechimp joined
masak futurechimp: hello, and welcome to the future. 12:09
:)
we're hard at work distributing it more evenly.
futurechimp hi masak, thanks for the welcome. I'm a Ruby and Scala programmer, just curious about Perl6's status, so I thought I'd come hang out for a bit. 12:12
masak nice! 12:13
yes, hanging out is encouraged. :) 12:14
12:14 SmokeMachine joined
moritz wow, rakudo-jvm takes onl 38s to parse the setting on $desktop 12:15
*only
12:15 SmokeMachine left
dalek ast: 1a0d5d1 | (Elizabeth Mattijsen)++ | S02-names/is_default.t:
Some tests for "is default" on scalars
12:15
12:15 SmokeMachine joined
arnsholt moritz: Oh, nice! 12:15
moritz but 'make spectest' makes all tests scroll past very fast, allw ith 'Non-zero exit status: 2 Parse errors: No plan found in TAP output' :( 12:16
any idea what that is about?
oh, File::Slurp missing 12:18
clkao hychen: /win 12 12:19
masak Access Control Error: can't tell someone else to switch windows in irssi. 12:20
dalek kudo/nom: f45f221 | (Elizabeth Mattijsen)++ | t/spectest.data:
Add "is default" tests to roast
12:25
p: b5d98d9 | moritz++ | tools/jvm/eval-client.pl:
Stop using File::Slurp

it's not a core module, and more importantly, the error message sucks when it's missing (because the TAP harness swallows it up by default).
lizmat moritz: any particular reason why you just have line 12 say "return <$IN>" and forger about the rest of the lines?? it would save one time copying of the contents of the file slurped 12:27
*forget
and the file would be auto-closed anyway 12:28
12:30 ajr joined, ajr is now known as Guest65514
moritz lizmat: not really 12:31
but since the files being read there are much smaller than 1kb, I see no reasons for optimizations
daxim act.yapc.eu/ye2013/talk/4945 # trolololol 12:32
FROGGS >.< 12:33
well, the audience will tell him/her
timotimo well, hopefully?
maybe mst sits in the next room and can speak up or something :P
masak I think the people expressing that kind of opinion have a right to do so. 12:34
FROGGS well, mst could throw his ol' crutch or so :P
masak: they have 12:35
masak orthogonally, I think it's a stupid opinion.
especially the name/numbering.
but also other things about it.
daxim wow that one's EVAN BETTAR act.yapc.eu/ye2013/talk/4943
FROGGS but it sounds a bit like "just ship perl5 next time with moose in core"
masak daxim: that one was discussed a week or so ago.
moritz are those talks approved?
daxim no 12:36
moritz wonders why people are so obsessed with putting stuff in p5 core
FROGGS moritz: because everything gets more awesome when somebody puts it in core 12:37
lizmat well, at least p5-mop seems to be revived
and that *would* put Moose in the core, literally
moritz p5-mop is something that actually makes sense in core :-)
lizmat: not as far as I understand (but my understanding might be way off)
lizmat well, put the hooks for Moose into the core, is maybe more accurate 12:38
FROGGS my question is more: does this end up in a 99.9% compatible Perl 5 or will this be a dialect then?
lizmat p5-mop? should not be a dialect 12:39
FROGGS maybe a 'use mop' pragma makes sense 12:40
masak lizmat: probably more (but still not completely accurate) to say that it'd put Class::MOP (Moose's underpinnings) in core.
lizmat that's what I meant with "hooks" :-)
actually, I forgot what the hooks were called :-) 12:41
12:43 dayangkun joined 12:44 woolfy1 joined 12:47 woolfy left
[Coke] .tell colomon here's a bug for you: gist.github.com/coke/5948500 12:47
yoleaux [Coke]: I'll pass your message to colomon.
12:47 Guest65514 is now known as ajr_
FROGGS [Coke]: that is jakudo? 12:48
hmm, Isee 12:50
it doesnt like the 1e-5, this works: say (123.456789).round(0.00001) 12:51
daxim .tell raiph promoted to cult leader, eh? 12:52
yoleaux daxim: I'll pass your message to raiph.
masak daxim: what in the world are you two talking about? 12:54
daxim I'm talking about <perlmonks.org/?node_id=1040306> in which he engaged in dialog that earned him a new signature 12:56
rjbs comp.lang.perl7.die.die.die 12:57
daxim I recognise that reference 12:58
[Coke] FROGGS: aye. only failure in that file.
lizmat std: my $h = {}[Int,Str]
[Coke] rjbs++
camelia std 85cf51d: OUTPUT«ok 00:00 46m␤» 12:59
lizmat rn: my $h = {}[Int,Str]
camelia rakudo 93f30e: OUTPUT«Parameter '' requires an instance, but a type object was passed␤ in method Bridge at src/gen/CORE.setting:3554␤ in sub infix:<<> at src/gen/CORE.setting:3478␤ in sub infix:<<> at src/gen/CORE.setting:3324␤ in method postcircumfix:<[ ]> at src/gen/CORE.setting:1…
..niecza v24-86-g39ab531: OUTPUT«Potential difficulties:␤ $h is declared but not used at /tmp/kwpdSH16mq line 1:␤------> my ⏏$h = {}[Int,Str]␤␤Unhandled exception: Cannot unbox a BigInteger from an object of repr P6opaque␤ at <unknown> line 0 (ExitRunloop @ 0) ␤ at /…
lizmat wonder whether that syntax could be used as a shortcut for my $h= Hash[Int,Str].new
moritz please don't 13:00
{ } already has enough (or too many, depending on your POV) meanings
lizmat std: my $h = [Int,Str]{} 13:01
camelia std 85cf51d: OUTPUT«ok 00:00 46m␤»
lizmat fair enough :-)
13:02 mstefanko joined
lizmat looking at Hash.perl, making sure it will serialize typed hashes correctly 13:02
jnthn why not just my Int %h{Str}; 13:03
Unless you explicitly want it in a scalar...
lizmat r: (my Int %{Str}=a=>1).say # too bad that doesn't work 13:05
camelia rakudo 93f30e: OUTPUT«===SORRY!===␤Unsupported use of %{Str}; in Perl 6 please use %Str␤at /tmp/PwINW6Ga4b:1␤------> (my Int %{Str}⏏=a=>1).say # too bad that doesn't work␤»
[Coke] jnthn: Buf/encode look like one of the bigger gaps left.
FROGGS jnthn: btw, how do I detect if an arg passed to nqp::sprintf is a bigint? its REPR is P6opaque and nqp:isbig_I doesnt seem to work well (NullPointerException) 13:06
jnthn FROGGS: Yes, I suggested that we stash a function somewhere in hllsym like we do with sprintf, that lets us register a type as being a bigint type 13:07
FROGGS: Then just call that from somewhere in BOOTSTRAP, or the setting.
FROGGS jnthn: an nqp::sprintf_I ? 13:08
jnthn no
doens't need to be an op for now
can just nqp::gethllsym('nqp', 'sprintf_bigint_reg')(Int); or so
FROGGS okay, I think I understand 13:09
lizmat jnthn: I'm puzzled by " multi method perl(Hash:D \SELF:) { nqp::iscont(SELF)" How can nqp::iscont(SELF) ever return true? 13:10
13:10 PacoAir joined, Pleiades` joined
jnthn r: say nqp::iscont(my %h); say nqp::iscont({}) 13:11
camelia rakudo f45f22: OUTPUT«0␤1␤»
13:12 PacoAir left
lizmat r: my %h=a=>1; say %h.perl # then why isn't this stringified with {} ? 13:12
camelia rakudo f45f22: OUTPUT«("a" => 1).hash␤»
13:12 PacoAir joined
lizmat sorry, I read that wrong 13:13
13:19 xilo joined
timotimo i'm wondering if a fast path for X on range objects would be a good thing to make? 13:24
given that the visit_nodes_cross benchmark is so utterly slow for rakudo
hm, that's not actually quite right; the for version isn't very much faster 13:25
13:26 espent joined
lizmat smells like po to me 13:26
timotimo although if there are range objects, it *could* use while loops with native integers which about 3x faster
yeah, i guess you're right.
lizmat do we have native integers then?
apart from the specification of them|?
moritz sure 13:27
r: my int $x = 42; say $x
camelia rakudo f45f22: OUTPUT«42␤»
timotimo yeah and the jvm likes them a lot
even on nqp
13:28 espent left 13:32 daniel-s_ joined 13:34 mikemol joined
[Coke] yawns. 13:35
lizmat r: my int $a; $a++ for (^100000) # well, not where it matters
camelia rakudo f45f22: OUTPUT«Cannot modify an immutable value␤ in sub postfix:<++> at src/gen/CORE.setting:3615␤ in sub postfix:<++> at src/gen/CORE.setting:2066␤ in block at /tmp/bwU6asfKWc:1␤␤»
timotimo yeah, the ++ operator doesn't work on natives yet
r: my int $a; $a = $a + 1 for (^100000)
camelia rakudo f45f22: ( no output )
timotimo neither do any of the OP= forms :(
r: my int $a; $a = $a + 1 for (^1000000); say $a;
camelia rakudo f45f22: OUTPUT«(timeout)» 13:36
timotimo r: my int $a; $a = $a + 1 for (^500000); say $a;
camelia rakudo f45f22: OUTPUT«(timeout)»
timotimo r: my int $a; $a = $a + 1 for (^250000); say $a;
come on, don't give me that, camelia :(
camelia rakudo f45f22: OUTPUT«250000␤»
timotimo ah, there we go
r: my $a = 0; $a++ for (^250000); say $a;
camelia rakudo f45f22: OUTPUT«250000␤»
timotimo well, the difference is not big enough apparently ... 13:37
lizmat fwiw, my int $a=0; $a = $a + 1 for (^100000) benchmarks 40% slower than its Int counterpart
timotimo but once jnthn makes the jvm compile-time dispatch for native types work, there'll be a big difference
oh? wow.
moritz lizmat: you're mostly benchmarking 'for', not native ints 13:38
timotimo oh, it should be better with a while loop then?
moritz try something like my int $a = 0; $a = $a + 1 while $a < 100_000;
timotimo anyway, i guess i'll drop the X optimisation for now 13:40
ah, range used to have an optimized path for int/num which is now ifdef-parrot'd 13:42
13:42 raiph joined
timotimo that does seem like something i could maybe do 13:43
jnthn There's a JVM-optimized path below it 13:46
timotimo i don't see it; is it in some branch? 13:47
jnthn no, it's one of the things I did that improved the benchmark results
It's there, right below the Q:PIR version 13:48
#?if !parrot
timotimo oh, that's optimized?
13:48 crab2313 joined
timotimo i don't have the same version as you it seems 13:48
hold on
haha, i was stuck on the jvm-support branch
that's quite silly
ah yes, now i do see it 13:49
[Coke] jnthn: I got really close on shell-with-env-vars, and ended up getting stuck on an unwind exception.
timotimo moving on :)
[Coke] gist.github.com/coke/5944808 , if you have a sec.
(dies on the iter() call) 13:50
jnthn [Coke]: You're passing a Perl 6 Hash in there, while iter wants a lower level hash 13:52
timotimo i think i'll look at pypy's benchmarks and port some of those over; they are mostly (exclusively?) non-micro benchmarks
[Coke] jnthn: ah. Any suggestions on how to either get the lower level hash, or how to iterate over a perl6 hash in java? 13:53
jnthn [Coke]: you can pull out the underlying storage by doing something like nqp::getattr(%*ENV, EnumMap, '$!storage') or so
[Coke] (pointers to code most welcome.)
Danke. 13:54
13:54 BenGoldberg joined 13:56 btyler joined, thou joined, skids joined
sergot hi o/ 13:58
[Coke] jnthn: I really feel like I'm poking around in the dark here. 13:59
13:59 pmurias joined
[Coke] (Just fyi. I'm not saying this needs fixing from rakudo/jvm) 13:59
dalek p: 063e151 | (Pawel Murias)++ | t/nqp/68-associative-for.t:
Add test for iterating over a hash.
pmurias hi 14:00
jnthn: nqp::iterval(...) is the expected way to get the value part of a pair?
14:00 crab2313 left
jnthn pmurias: It's the low level way 14:01
pmurias: Used in the NQP MOP. Once the NQP setting is loaded, we can set up something higher level.
So that there's something to call $_.key and $_.value one
*on
pmurias so the test should test both forms? 14:02
jnthn Yes, though maybe some existing test covers the hash iteratin already... 14:03
pmurias I'm afraid not
jnthn :) 14:04
pmurias++ # improving NQP test suite :)
pmurias I discovered that hash iteratin was missing from rakudo-js while debugging ClassHOW.attributes ;)
jnthn ;) 14:05
timotimo does the fannkuch benchmark sound like something that would be nice to have? 14:08
hm, i'd have to build permutations :|
oh! turning a list of probabilities into a list of cumulatives seems like the perfect use case for triangle reduce! 14:11
GlitchMr jjinux.blogspot.com/2008/09/python-...-on-c.html 14:12
for i in itertools.islice(itertools.count(123), 5):
print i
I like how short it looks in Perl 6 - for (123..Inf)[^5] { .say }
timotimo r: my @probs = 0.27, 0.12, 0.12, 0.27, 0.02 xx 11; my @cumul = [\+] @probs; say @cumul
camelia rakudo f45f22: OUTPUT«0.27 0.39 0.51 0.78 0.8 0.82 0.84 0.86 0.88 0.9 0.92 0.94 0.96 0.98 1␤»
timotimo 9 lines of code in the python example for the same concept :3
dalek p: 8e3a39e | (Pawel Murias)++ | t/nqp/68-associative-for.t:
Test both using ops and methods to get the key/value while iterating a hash.
14:14
[Coke] jnthn: where are "iterkey_s" and friends defined? 14:16
oh. in the file I'm using. :P 14:17
moritz src/vm/parrot/QAST/Operations.nqp
and src/vm/jvm/QAST/Compiler.nqp
[Coke] moritz: src/vm/jvm/runtime/org/perl6/nqp/runtime/Ops.java is where I found it. Danke. 14:18
timotimo meh, these benchmarks are all quite long and have next to no comments and apparently also the shortest variable names they could come up with ... 14:19
dalek kudo/nom: 6933c1d | (Elizabeth Mattijsen)++ | src/core/Hash.pm:
Make sure .perl work correctly for typed hashes
14:21
14:21 futurechimp left
dalek kudo-js: 7325198 | (Pawel Murias)++ | / (3 files):
Specific the setting as a code_ref attribute. Do not use the version of a code_ref with statics and setting inline.
14:26
kudo-js: 8d7235a | (Pawel Murias)++ | src/QAST/Compiler/JavaScript.nqp:
Do not generate old style code refs. That should clean up the output significantly.
kudo-js: 22eedfc | (Pawel Murias)++ | nqp:
Update nqp submodule version.
kudo-js: 5697e3c | (Pawel Murias)++ | / (3 files):
Implement iterating with a for over a hash. Pass test 68.
14:29 ajr joined, ajr_ left
[Coke] jnthn: more stupid questions: how do I get the string value of a key in a six hash? iterval() returns the value itself, which is not amenable to .toString() - it looks like iterval(blah, tc).get_str(tc) is wrong. (get another unwind exception). do I need iterval(thing, tc).native_s ? 14:29
14:29 ajr is now known as Guest70764 14:30 Guest70764 is now known as ajr_
[Coke] ... no, that's not how native_s works. :P 14:31
jnthn iterkey_s 14:32
[Coke] jnthn: ... but I'm trying to get the value?
jnthn Oh...
iterval(blah, tc).get_str(tc) shoulda been right :S 14:33
[Coke] there is not iterval_s
*no
jnthn: yes, that generates an unwind exception.
jnthn You can always trying calling smart_stringify I guess...
[Coke] hokay. 14:34
lizmat has anyone ever felt the need for a "nis_deeply" function in Test.pm ? 14:38
aka, making sure that two structures are *not* equal
and would anybody mind if I added that to Test.pm ? 14:39
[Coke] what test do you need it for?
lizmat I want to make sure that a typed hash with a certain structure is not the same as an untyped hash with the same structure 14:40
aka: are my %h=a=>1 and my Int %a=a=>1 different
I guess you could argue this is more a test of "eqv" 14:41
r: say (my %h=a=>1) eqv (my Int %a=a=>1) 14:42
camelia rakudo f45f22: OUTPUT«True␤»
lizmat looks at the spec of eqv 14:43
[Coke] jnthn: org.perl6.nqp.runtime.UnwindException
jnthn OK, then no idea, but you should never really see that exception.
14:43 kaleem left
[Coke] it's happening in two tests in roast already. 14:45
lizmat r: say (my %h=a=>1) eqv (my Int %a=a=>"1") 14:46
camelia rakudo f45f22: OUTPUT«Nominal type check failed for parameter '$x'; expected Int but got Str instead␤ in method STORE_AT_KEY at src/gen/CORE.setting:7390␤ in method STORE at src/gen/CORE.setting:7268␤ in block at /tmp/DVaTUzwyss:1␤␤»
lizmat r: say (my %h=a=>"1") eqv (my Int %a=a=>1)
camelia rakudo f45f22: OUTPUT«False␤»
[Coke] jnthn: gist.github.com/coke/5949477 is the loop where the exception is thrown (happens on line 4) 14:47
(note that I'm actually catching Exception in my method and printing the stacktrace (before I did that, the program would just stop) 14:48
14:51 bluescreen10 joined
dalek ast: 6127abe | (Elizabeth Mattijsen)++ | S32-hash/perl.t:
Added tests for .perl on hashes, explicitely typed or not
14:52
15:02 eternaleye left
dalek kudo/nom: 577a030 | (Elizabeth Mattijsen)++ | t/spectest.data:
Added Hash.perl tests to roast
15:04
FROGGS perl6-jvm -e 'say 1e-5'# 9.999999999999999E-6 15:07
nqp-jvm -e 'say(1e-5)' # 1.0E-5
jnthn: do you have an idea where I can start hunting that down? 15:08
15:08 eternaleye joined
moritz FROGGS: it's probably just a different default stringification 15:08
jnthn FROGGS: Probably looking at what Num.Str is doing... :) 15:11
FROGGS perl6-jvm: nqp::p6box_s(nqp::unbox_n(self)) 15:12
jnthn hm, that hsould be using coerce_is or so, same as NQP does. 15:13
FROGGS aha!
lizmat r: use Test; is_deeply (my Int %h=a=>1), (my %h=a=>1), "should this be ok or not?" 15:17
camelia rakudo 577a03: OUTPUT«Potential difficulties:␤ Redeclaration of symbol %h␤ at /tmp/La8sWNQqbT:1␤ ------> Test; is_deeply (my Int %h=a=>1), (my %h⏏=a=>1), "should this be ok or not?"␤ok 1 - should this be ok or not?␤»
lizmat r: use Test; is_deeply (my Int %h=a=>1), (my %i=a=>1), "should this be ok or not?"
camelia rakudo 577a03: OUTPUT«ok 1 - should this be ok or not?␤»
dalek pan style="color: #395be5">perl6-examples: 08824dd | (Konrad Borowski)++ | euler/prob005-glitchmr.pl:
Remove useless spaces around `..`

I never liked these with ranges.
15:18
lizmat in other words: is "is_deeply" simply a wrapper around "eqv", or should it do more ? 15:19
if the former, shouldn't it be called "is_eqv" then?
FROGGS jnthn: I cant just call coerce_i2s(1e-5) from perl6 land, right?
lizmat
.oO( wonder what masak's, TimToady's or pmichaud's thoughts would be on that )
15:20
jnthn FROGGS: Um, i2s is *integer* to string, not number.. 15:21
FROGGS: But that's what's generated automatically in the code if we need to get from one to the other.
15:24 kaare_ joined
[Coke] hurls www.feorag.com/assets_c/2013/07/Eur...p-919.html for jnthn 15:27
FROGGS Cwrw # *lol* 15:28
./perl6 -e 'say 1e-5' # %_ <-- hehe, that is not what I wanted *g* 15:29
jnthn [Coke]++ 15:30
Cwrw...how on earth is that said?
dalek kudo/nom: 8bd124f | (Elizabeth Mattijsen)++ | src/core/Array.pm:
Make sure .perl works correctly on Array's with constrained values
15:31
FROGGS I can say it after a lot of it
jnthn Yeah...I see a bootstrapping problem.
nwc10 jnthn: w is a vowel, and I think it's pronnounced a bit like a short oo or u 15:32
jnthn ooh, didn't know Belorusian spells it differently to Russian and Ukrainian. :)
lizmat beer can be ordered non-verbally
so not a really big bootstrapping problem :-)
15:33 Moukeddar joined
jnthn
.oO( I got drunk in Wales while implementing continuations, and now I have cwrwtines... )
15:33
15:34 FieldsaBB left
lizmat r: Array[Int,Str].new # is this error message LTA enough to do something about ? 15:35
camelia rakudo 577a03: OUTPUT«===SORRY!===␤Too many positional parameters passed; got 3 but expected 2␤»
jnthn Should probably say something nicer.
At least mention it's to do with an array...
lizmat yup, my thoughts exactly 15:36
any problem making PARAMETRIZE_TYPE a mutil method ?
*multi
jnthn Well, that may be special-casing rather than fixing the general issue...
r: role R { }; R[Int] 15:37
camelia rakudo 577a03: OUTPUT«None of the parametric role variants for 'R' matched the arguments supplied.␤Cannot call ''; none of these signatures match:␤:(Mu )␤current instr.: 'specialize' pc 23746 (src/gen/perl6-metamodel.pir:10970) (src/gen/Metamodel.nqp:2143)␤called from Sub 'specialize' p…
jnthn oh wait, it works different to that...
lizmat -ll-exception told me it was the call to PARAMETRIZE_TYPE that was bombing 15:39
jnthn Yeah
masak [Coke]: nice! I especially like how the Vatican holds the Romance flag high in a country that seemingly has succumbed to Germanic influence.
also interesting that Icelandic has the Germanic one, whereas Scandinavia and the Baltics have the Saxon one. 15:40
er, the Anglic* one
I bet there are interesting trading/historical reasons.
& 15:41
(that French has abandoned its Romance roots isn't surprising. French was always the outlier among the Romance languages.) :) 15:42
15:42 konundra left
lizmat n: Array[Int].new(1, 2) 15:46
camelia niecza v24-86-g39ab531: OUTPUT«Unhandled exception: System.NullReferenceException: Object reference not set to an instance of an object␤ at Builtins.InvokeSub (Niecza.P6any obj, Niecza.Variable[] pos) [0x00000] in <filename unknown>:0 ␤ at Niecza.Kernel.ToComposable (Niecza.STable arg…
lizmat n: Hash[Int,Str].new
camelia niecza v24-86-g39ab531: OUTPUT«Unhandled exception: System.NullReferenceException: Object reference not set to an instance of an object␤ at Builtins.InvokeSub (Niecza.P6any obj, Niecza.Variable[] pos) [0x00000] in <filename unknown>:0 ␤ at Niecza.Kernel.ToComposable (Niecza.STable arg…
dalek ast: 4753065 | (Elizabeth Mattijsen)++ | S32-array/perl.t:
Add tests for Array.perl, for both implicit and explicitly constrained values
15:49
ast: ca24260 | (Elizabeth Mattijsen)++ | S32-hash/perl.t:
Fudge pugs/niecza properly for typed hashes
15:50 raiph left 15:52 raiph joined 15:53 raiph left
FROGGS jnthn: that call to coerce_n2s happens when I do nqp::p6box_s(nqp::unbox_n( ? 15:53
FROGGS feels like just having opposite pieces of a huge puzzle 15:54
jnthn FROGGS: Should be 15:55
FROGGS k, thanks
jnthn FROGGS: Oh...maybe the NQP say(...) one goes through a different codepath.
FROGGS: It may do its thing inside the smart_stringify method. 15:56
FROGGS hmmm, I've sen that one...
jnthn FROGGS: 'cus say takes a slurpy, so the thing gets boxed.
15:59 ecocode left
dalek kudo/nom: 2329a2c | (Elizabeth Mattijsen)++ | src/core/Hash.pm:
Hopefully create a smaller / faster .perl
16:07
kudo/nom: 5b9d80b | (Elizabeth Mattijsen)++ | t/spectest.data:
Add Array.perl tests to roast
16:13 FROGGS[mobile] joined
TimToady sorear: the identification of java.lang.String / Str would seem to preclude doing NFG; Java strings are closer to (but probably not identical to) a postulated Uni type (with NFC/NFD constrained types) that does codepoints rather than graphemes 16:15
jnthn They don't even do codepoints, they do 16-bit thingies. 16:16
TimToady s/probably// :)
16:17 FROGGS left
jnthn ;) 16:17
TimToady I dont want people to say, Oh, Perl 6 is great, except on the JVM, where they adopted the JVMs string model
16:18 domidumont left
TimToady season with ' to taste 16:18
jnthn Aye, but I didn't really want to delay getting JVM support at all on doing an NFG implementation ;)
[Coke] I think the odds of that sentence being spoken are pretty low!
TimToady my ' key is getting gimpy...
16:18 baest joined
jnthn I agree it's where things should end up. 16:18
16:19 salv0 left
TimToady from past experience, it's an easy place to get stuck in a false minimum 16:19
diakopter TimToady: don't worry; be happy
NFG'll get there 16:20
TimToady .u 😅
yoleaux U+1F605 SMILING FACE WITH OPEN MOUTH AND COLD SWEAT [So] (😅)
diakopter *guffaw* 16:21
jnthn ...ouch!
I suspect Moar is in the best place to get NFG stuff sorted out first. 16:22
TimToady just don't wanna end up with different semantic models on different VMs 16:23
any estimates on whether NFG *can* be implemented efficiently on JVM?
diakopter ... someone should spec Uni..... 16:24
TimToady looks around, whistling...
diakopter TimToady: for all I know, NFG strings on MoarVM would be more efficient (space *and* time) than java.lang.String 16:26
well, definitely space.
jnthn TimToady: I suspect it's the kind of code that JITs well.
I mean, it's mostly dealing with integers ;)
diakopter er.
I meant JVM 16:27
NFG strings on JVM
TimToady .u 😎
yoleaux U+1F60E SMILING FACE WITH SUNGLASSES [So] (😎)
diakopter except that pesky "one of every codepoint" string
that one probably wouldn't take up less space. 16:28
jnthn Well, if we do something ropey then we can do better on concat than we can with Java strings, no doubt.
16:28 grondilu left, Moukeddar left
diakopter also pre-hashing and runtime de-duping all strings less than a certain size 16:29
jnthn The reason I say "nail it on Moar first" is kinda 'cus that approach worked well for 6model: get the design right on one VM, then port it elsewhere.
16:29 ajr_ left
diakopter
.oO( after trying on .NET and then Parrot ... )
16:29
16:30 ajr joined, ajr is now known as Guest57953
jnthn The .NET one was the "one to throw away". The Parrot 6model impl is fairly right. 16:30
lizmat is this proper English? "Can only specify type-constrainted Hash with [ValueType] or [ValueType,KeyType]" 16:31
fixing a LTA error message for Hash[Foo,Bar,Baz]
diakopter perhaps slightly better would be to move "only" to after "with" 16:32
if it's a legal document
jnthn I'm...not sure Rakudo errors count as a legal document... :P
.oO( I hope to never see one on a legal document... )
diakopter er, before "with"
jnthn "Can only type-constrain a Hash with [ValueType] or ..." is an alternative 16:33
diakopter "you agree to UTF-8 reading error forthwith"
16:34 salv0 joined
TimToady "...provided at least one of the following is true:" 16:34
16:34 FROGGS joined
TimToady "All parts of this error message are severable..." 16:34
"This rotten error message shall be enforced under the laws of the State of Denmark." 16:36
lizmat TiimToady: any suggestions on fixing:
r: $/=Any; say $/.chars
camelia rakudo 5b9d80: OUTPUT«No such method 'chars' for invocant of type 'Any'␤ in block at /tmp/p5k5lEo8RK:1␤␤»
lizmat which is effectively what happens if we didn't have a match
TimToady $/ is supposed to go to Nil when not matching
diakopter r: $/.chars
camelia rakudo 5b9d80: OUTPUT«No such method 'chars' for invocant of type 'Any'␤ in block at /tmp/ech_WS_tiH:1␤␤»
TimToady r: say Nil.chars
camelia rakudo 5b9d80: OUTPUT«0␤»
TimToady hmm 16:37
lizmat but, as soon as you "assign" Nil to $/
you will get any, at least if we're going by the spec
TimToady bind instead?
diakopter r: $/:=Nil; say $/.chars
camelia rakudo 5b9d80: OUTPUT«0␤»
TimToady arguable that should warn
n: say Nil.chars 16:38
camelia niecza v24-86-g39ab531: OUTPUT«Nil␤»
TimToady that's more correct
n: say Nil.chars + 0
camelia niecza v24-86-g39ab531: OUTPUT«Use of Nil as a number␤ at /home/p6eval/niecza/lib/CORE.setting line 1384 (warn @ 5) ␤ at /home/p6eval/niecza/lib/CORE.setting line 474 (Nil.Numeric @ 4) ␤ at <unknown> line 0 (ExitRunloop @ 0) ␤ at /tmp/vnP2W8GpPc line 1 (mainline @ 3) ␤ at /home/p6e…
TimToady n: say Nil.foo.bar.baz 16:39
camelia niecza v24-86-g39ab531: OUTPUT«Nil␤»
16:39 FROGGS left
diakopter r: say Nil.die 16:39
camelia rakudo 5b9d80: OUTPUT«No such method 'die' for invocant of type 'Nil'␤ in block at /tmp/U06dp2Vjbn:1␤␤»
diakopter n: say Nil.die
camelia niecza v24-86-g39ab531: OUTPUT«Nil␤»
lizmat r: $/ := Nil; "abc" ~~ m/a/' # binding to Nil is not really an option, as it will other matches fail 16:40
camelia rakudo 5b9d80: OUTPUT«===SORRY!===␤Two terms in a row␤at /tmp/OK4bXieszt:1␤------> $/ := Nil; "abc" ~~ m/a/⏏' # binding to Nil is not really an opt␤ expecting any of:␤ postfix␤ infix stopper␤ infix or meta-infix␤ state…
lizmat r: $/ := Nil; "abc" ~~ m/a/ # binding to Nil is not really an option, as it will other matches fail
camelia rakudo 5b9d80: OUTPUT«Cannot modify an immutable value␤ in block at /tmp/_t3oI72GTu:1␤␤»
diakopter I think it'd be neat if camelia attempted to run every IRC message on rakudo/niecza, and if it parsed, send the outputs 16:41
er, nm. that would... nm.
TimToady wonders whether we should bifurcate Nil into two concepts, 1) you expected something and got nothing, and 2) you want to send a message to a container to set itself to default 16:42
lizmat I think we need something like that
TimToady anyway, why is $/ defaulting to Any? why not default it to Nil?
lizmat because otherwise it's going to be vary hard to work with $/ after failed matched
diakopter C# has "default" 16:43
lizmat that would be another approach indeed
r: my Nil $a=1 # but would this then not be a problem?
camelia rakudo 5b9d80: OUTPUT«Type check failed in assignment to '$a'; expected 'Nil' but got 'Int'␤ in block at /tmp/ZH9spxTLkl:1␤␤»
16:43 Stygia left
lizmat I guess we want: 16:44
my $a is default(Nil)
TimToady r: my Mu $slash is default(Nil); $slash = Nil; say $slash
camelia rakudo 5b9d80: OUTPUT«Nil␤»
TimToady btw, Nil.foo.bar.baz returning Nil is specced at S02:2271
lizmat r: my Mu $slash is default(Nil); $slash = 5; say $slash 16:45
camelia rakudo 5b9d80: OUTPUT«5␤»
lizmat r: my Mu $slash is default(Nil); $slash = 5; say $slash; undefine $slash; say $slash
camelia rakudo 5b9d80: OUTPUT«5␤Nil␤»
lizmat is confused: "is default" is working already ?
TimToady thought you checked it in 16:46
16:46 woosley left, SamuraiJack left
diakopter $a .= default // public static class MyExtensionMethods { public static T Default<T>(this T input) { return default(T); } } 16:46
16:47 fhelmberger left
TimToady hey, this is a family channel, watch the cussing 16:47
16:48 SamuraiJack joined
TimToady is more thinking about the placeholder Nil when used to indicate a missing positional argument 16:48
.= won't work for that
lizmat r: my Int $a is default(42); say $a; $a=Nil; say $a 16:49
camelia rakudo 5b9d80: OUTPUT«(Int)␤(Int)␤»
16:49 rindolf joined, woosley joined
TimToady obviously a rakudobug; where's masak++ when you need him? :) 16:50
lizmat r: my Mu $slash; $slash = Nil; say $slash
camelia rakudo 5b9d80: OUTPUT«Nil␤»
lizmat is default just doesn't work yet
the fact that it now seems to work, is because the Nil -> default value translation is not done for Mu values 16:51
r: my Int $slash; $slash = Nil; say $slash
camelia rakudo 5b9d80: OUTPUT«(Int)␤»
lizmat changing that fails basically the whole regex engine, and that's what I'm trying to fix 16:52
16:52 Guest57953 left
lizmat see gist.github.com/lizmat/5941715 for an overview of failing tests in that case 16:53
so the way forward to me is:
1. make is default work
2. make sure $/ and friends are default Nil 16:54
3. fixup any other problems in the regex engine
jnthn said he might be inspired to do 1. tonight 16:57
jnthn Aye, though that was before he learend he has to get up at 6:30am tomorrow :/ 16:58
lizmat :-(
jnthn Though, trying to sleep much earlier than usual will be useless. 16:59
17:00 bluescreen10 left
lizmat you can sleep on the train on Wed ? 17:01
jnthn Well, my train on Wed from Copenhagen isn't until 13:something, meaning I don't have to leave home until round midday :) 17:02
Nice how the cheaper tickets and more sleep matched up for once... :) 17:03
lizmat isn't it great to have Sweden connected like that
jnthn Yes! Oh my, before the bridge...musta been "fun"
lizmat I remember it: it was no fun, especially with any kind of not excellent weather 17:04
17:04 SamuraiJack left, dakkar left
jnthn The prelim YAPC::EU schedule so far has me up against masak! o.O 17:05
lizmat *sigh* 17:06
TimToady we will force people to listen to Perl 6 regardless of which track they choose! :)
jnthn ;)
17:07 birdwindupbird left
lizmat some people might interprete that schedule as forcing the Hallway++ track 17:07
TimToady we can have representation there too...
jnthn oh, there's a third option ;)
I'm not sure how 6-y masak's talk is, either ;) 17:08
dalek kudo/nom: c52f245 | (Elizabeth Mattijsen)++ | src/core/ (2 files):
Make PARAMETRIZE_TYPE errors a bit less LTA
17:11
jnthn fetching dinner & 17:12
[Coke] skips like "1 skipped: Underlying Parrot problem" should probably just be skipped on rakudo.parrot now. 17:16
(new in today's run)
todo PASSED: %p doesn't yet throw exception
diakopter r: my Int $a is default(42); say $a; $a:=Nil; say $a
camelia rakudo 5b9d80: OUTPUT«(Int)␤Type check failed in binding; expected 'Int' but got 'Nil'␤ in block at /tmp/xQ_JhdPV8r:1␤␤» 17:17
[Coke] ^^ from rakudo.jvm
diakopter hunh. so it's the Scalar that has the type?
moritz what else could have it? 17:18
lizmat class Perl6::Metamodel::ContainerDescriptor {
has $!of;
17:19 spider-mario joined
[Coke] integration/advent2009-day02.t is now aborting in rakudo.jvm instead of failing a test. 17:20
17:23 konundra joined
[Coke] ah, sprintf related, will no doubt clear up soon. 17:26
17:28 FROGGS joined 17:31 domidumont joined
lizmat cycling and dinner& 17:32
17:34 daxim left 17:40 bluescreen10 joined
BenGoldberg r: my Int $a is default("foo"); say($a) 17:42
camelia rakudo 5b9d80: OUTPUT«(Int)␤»
BenGoldberg r: my int $a is default(4); say($a)
camelia rakudo 5b9d80: OUTPUT«0␤»
BenGoldberg Why is "is default" ignored? 17:43
timotimo not yet completely implemented 17:46
timotimo is probably going to hold a 10-minute lightning talk about functional programming in perl6 at a functional programming meetup 17:48
diakopter r: my Int $a is default(die die die); 17:56
camelia rakudo 5b9d80: OUTPUT«===SORRY!===␤␤»
diakopter r: my Int $a is default(die *);
camelia rakudo 5b9d80: OUTPUT«===SORRY!===␤Whatever<-497475241>␤»
diakopter o_O
n: my Int $a is default(die *);
camelia niecza v24-86-g39ab531: OUTPUT«===SORRY!===␤␤Trait default not available on variables at /tmp/uhSVSLTGz8 line 1:␤------> my Int $a is default(die *)⏏;␤␤Potential difficulties:␤ $a is declared but not used at /tmp/uhSVSLTGz8 line 1:␤------> my I…
17:59 Targen joined
dalek rl6-roast-data: 56a191e | coke++ | / (5 files):
today (automated commit)
18:07
[Coke] 97% even. 18:08
rakudo.parrot has had 2 failures for 3 days
timotimo why is the rakudo.jvm column moved off to the side? 18:09
[Coke] because I forgot to correct it.
timotimo ah :)
[Coke] updates to github.com/coke/perl6-roast-data/b...aster/cull to fix it welcome. 18:10
timotimo doesn't touch perl5 code :P
18:13 ajr joined 18:14 ajr is now known as Guest58437 18:15 Guest58437 is now known as ajr_
[Coke] besides, it's a CSV file. spacing is irrelevant! ;) 18:16
jnthn r: say 26190 - 25405 18:17
camelia rakudo c52f24: OUTPUT«785␤»
18:19 btyler_ joined 18:21 btyler left
moritz r: say (26190 - 25405) / 26190 18:24
camelia rakudo c52f24: OUTPUT«0.029973␤»
[Coke] wordcase would get us a dozen. sprintf still has a little way to go. 18:27
Buf/encode, also.
r: say 26190*.98-25405 18:28
camelia rakudo c52f24: OUTPUT«261.2␤»
[Coke] diakopter++ for hosting a new testing box, btw! 18:29
gist.github.com/coke/5879701 updated. big wins would be: "Unhandled file open mode 'rp'", "Method 'postcircumfix:<( )>' not found", "Calling 'f4' will never work with argument types" 18:34
18:35 colomon joined
[Coke] 'rp' is implementing q:x - I can probably handle that if I can build off shell() 18:35
colomon \o 18:36
yoleaux 12:47Z <[Coke]> colomon: here's a bug for you: gist.github.com/coke/5948500
FROGGS hi colomon
colomon hi FROGGS
fixed several bugs, discovered several more. :\
[Coke]: I'm not sure that's actually a bug... 18:37
[Coke] colomon: still some sprintf failures in roast - can you make those go away? ;)
colomon [Coke]: not right away, for sure!
[Coke] colomon: perhaps a bug in the test, then?
colomon [Coke]: I'm not really sure one way or another 18:38
sergot What is the laziest way to add something (Str) before each item in an Array?
timotimo zip it?
colomon sergot: "something" X~ @array
sergot colomon++ thanks ! :) 18:39
colomon FROGGS: if you haven't commited anything on sprintf if, I will do mine and push them
[Coke] r: say "0x" X~ <dead beef>
camelia rakudo c52f24: OUTPUT«0xdead 0xbeef␤»
FROGGS colomon: your patch was the last commit 18:40
18:42 colomon left 18:47 stevan_ joined
[Coke] r: say for 1 18:48
camelia rakudo c52f24: OUTPUT«␤»
[Coke] t/spec/S16-io/bare-say.t - this test is broken, assumes hash ordering. 18:49
(last one in the file)
also, no reason for it to be an is_run test, I don't think. I think an in-memory run would be fine. 18:50
RT #74822
(ah, yes, has to be is_run due to say) 18:51
dalek p: 30a0f0f | (Solomon Foster)++ | t/jvm/06-sprintf.t:
14 more tests for %e, %f, %g.
18:52
[Coke] but all it needs to verify is that there is only one trailing newline.
18:57 autumn joined 18:58 colomon joined
dalek p: 5d68e65 | (Solomon Foster)++ | src/HLL/sprintf.nqp:
Incorporate FROGGS++'s changes.
19:05
colomon I will continue working on %e, %f, %g. If anyone has useful NQP suggestions for converting a float to a big int, please e-mail me. ;) 19:30
id @gmail.com 19:31
19:35 domidumont left 19:36 colomon left
dalek p: f4db52b | (Tobias Leich)++ | t/jvm/06-sprintf.t:
fixed padding in test for %g's precision
19:36
FROGGS I dont think I can fix (1e-5).Str or bigint stuff for srpintf :/ 20:03
sprintf*
geekosaur .oO { sierpinskf? } 20:07
FROGGS :o)
[Coke] is reminded he never got further than 2 tests in rosetta code suite. 20:08
masak o/ 20:11
timotimo señor print the first 20:12
FROGGS .u 讁
yoleaux No characters found
[Coke] .u crazy. 20:14
yoleaux U+002E FULL STOP [Po] (.)
U+0061 LATIN SMALL LETTER A [Ll] (a)
U+0063 LATIN SMALL LETTER C [Ll] (c)
FROGGS nqp-jvm bug: ./nqp -e 'say(nqp::sprintf("%#x", [nqp::ord("\x28b21")]))' # 0x8b21 20:20
(and it is not sprintf's fault)
20:25 kaare_ left, _jaldhar joined 20:29 rindolf left 20:30 jaldhar_ joined, _jaldhar left
masak rn: say (1e-5).Str 20:35
camelia niecza v24-86-g39ab531: OUTPUT«1.0000000000000006E-05␤»
..rakudo c52f24: OUTPUT«1e-05␤»
masak .oO( <niecza> ...close enough. ) 20:36
FROGGS at least there is a 1 on the left and a 5 on the right
masak :)
lizmat is back and sitting on the terrace :-) 20:37
20:41 woolfy joined, konundra left 20:44 woolfy1 left
masak "the terrace" sounds like a really nice place to do some coding in the summer. :) 20:52
jnthn The one time I lived in a place with a balcony, it kinda was nice for that :) 20:53
Apart from I coded on the balcony in the winter :)
masak yes, but you have infamously strange temperature preferences :P 20:54
jnthn No, it's just that winter there is almost like Swedish summer :P
masak has a balcony, but does far too little coding on it, he realizes
lizmat r: 1/0 20:55
camelia rakudo c52f24: ( no output )
jnthn r: say 1/0 20:56
camelia rakudo c52f24: OUTPUT«Divide by zero␤ in method sink at src/gen/CORE.setting:10543␤ in method BUILDALL at src/gen/CORE.setting:822␤ in method bless at src/gen/CORE.setting:763␤ in method new at src/gen/CORE.setting:748␤ in method new at src/gen/CORE.setting:746␤ in method floor at…
lizmat r: 1/0 # isn't this supposed to be sink context?
camelia rakudo c52f24: ( no output )
jnthn r: 1/0; 'x'
camelia rakudo c52f24: ( no output )
jnthn Hm
lizmat and shouldn't that throw?
jnthn yeah
I'm a bit surprised.
lizmat I was as well :-)
[Coke] is 1/0 an exception or a failure?
r: my $a = 1/0; 'x'; say $a;
lizmat r: say (1/0).WHAT
camelia rakudo c52f24: OUTPUT«WARNINGS:␤Useless use of constant string "x" in sink context (line 1)␤Divide by zero␤ in method sink at src/gen/CORE.setting:10543␤ in method BUILDALL at src/gen/CORE.setting:822␤ in method bless at src/gen/CORE.setting:763␤ in method new at src/gen/CORE.settin…
rakudo c52f24: OUTPUT«(Rat)␤»
lizmat I smell a Rat 20:57
jnthn Oh...
[Coke] r: say ((1/0)+0).WHAT
camelia rakudo c52f24: OUTPUT«(Rat)␤»
jnthn r: 1 / 0
camelia rakudo c52f24: ( no output )
lizmat r: say (1 / 0).WHAT
jnthn r: my $x = 0; 1 / $x
camelia rakudo c52f24: OUTPUT«(Rat)␤»
rakudo c52f24: ( no output )
21:02 dayangkun left
lue r: (1/0).perl.say 21:03
camelia rakudo c52f24: OUTPUT«<1/0>␤»
lue r: <1/0>.WHAT.say
camelia rakudo c52f24: OUTPUT«(Str)␤»
21:04 skids left 21:06 stevan_ left 21:08 spider-mario left 21:11 PacoAir left 21:17 dayangkun joined
lizmat jnthn: is "for $trait_list {" at line 1920 of Actions.nqp the place where "is default" for scalar would actually be set? 21:17
jnthn lizmat: Well, that's the attribute case. 21:20
dalek p: 53a9e36 | (Tobias Leich)++ | src/vm/jvm/runtime/org/perl6/nqp/runtime/Ops.java:
dont use (char) typecast for codepoints

This typecast does not support codepoints > 0x10000. This fixes at least one test in roast.
jnthn FROGGS: ooh, good catch!
FROGGS :o)
jnthn I'm not gonna get to the var trait stuff tonight :( 21:21
I may manage it tomorrow.
Or I have a long train journey on Wednesday :)
masak :)
jnthn had to do a little reading for his emergency assignment tomorrow...and should attempt not to stay up too late :) 21:22
lizmat okidoki
then sleep well and have a fruitful emergency assignment tomorrow!
jnthn Well, got an email to finish before I sleep... :)
Will be about for another 20 mins :) 21:23
lizmat [Coke]: "rakudo.parrot has had 2 failures for 3 days" I cannot reproduce those errors 21:26
masak lizmat: there are some known platform-dependent and maybe even stochastic failures in some test files. 21:34
now that I think about it, I'm not sure why we haven't isolated them and put them in quarantine.
21:38 konundra joined
lizmat I'n not even sure *which* particular test gives an error in those files 21:46
21:47 woolfy1 joined
[Coke] these are new failures, masak. 21:48
lizmat: one moment.
21:49 woolfy2 joined, woolfy left 21:51 woolfy1 left
[Coke] ... nope. I can't repro them either. weird. 21:52
(on feather, where they happened in the first place, using the last built rakudo.parrot)
masak glances meaningfully at his use of the word "stochastic" 21:56
lizmat you seem determined to put your point across ;-) 21:57
jnthn
.oO( sto-kass-tic )
masak .oO( random puns ) 21:59
22:02 Gruber joined 22:05 jferrero joined, genehack joined
[Coke] is there a mnemonic for remembering which side is which in a smartmatch? 22:11
jnthn The right side knows what's right, and so is in charge of the matching :P 22:13
'night, #perl6
masak 'night, jnthn!
22:14 stevan_ joined
masak .oO( the left side only gets what's left, after the matching is already finished ) :) 22:14
TimToady std: (my Int %{Str}=a=>1).say 22:15
camelia std 85cf51d: OUTPUT«ok 00:00 45m␤»
diakopter heh.
TimToady r: (anon Int %your_ad_here{Str}=a=>1).say 22:16
diakopter TimToady: is that adapter less noisy
camelia rakudo c52f24: OUTPUT«===SORRY!===␤anon scoped variables not yet implemented. Sorry. ␤at /tmp/6T8bIsiSl0:1␤------> (anon Int %your_ad_here{Str}⏏=a=>1).say␤ expecting any of:␤ postfix␤ statement end␤ statement modifier␤ …
TimToady aww
diakopter: yes, thanks
22:16 pmurias left
diakopter I also have the 65W version (much smaller/lighter) 22:18
TimToady my computer bag has wheels, so I don't have to optimize for that :) 22:19
22:22 woolfy joined
lizmat gnight #perl6! 22:23
TimToady o/
22:25 woolfy2 left
diakopter TimToady: do you have some thoughts on Uni? 22:27
I seem to have lost our irclogs when we chatted a year ago or so on it
TimToady just that, when we do switch Str to NFG semantics, we'll need some way to name the codepoint based types when we really mean those 22:29
much as we currently spec Buf and utf8 types
masak 'night, #perl6 22:30
TimToady \o
what JVM offers currently is more like buf16 and utf16 than it is like Uni 22:31
Uni is, in my mind, free of surrogate pairs 22:33
and ord("\0") == 0
well, maybe it comes out that way in Java too 22:34
don't remember the exact form of the null braindamage
I guess it was in their UTF-8, iirc 22:35
22:45 skids joined