»ö« 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.
skids r: say ((0,1,2).map: { last($_) }).perl 00:57
camelia rakudo-moar fd5f8e: OUTPUT«().list␤»
..rakudo-parrot fd5f8e: OUTPUT«(0,).list␤»
..rakudo-jvm fd5f8e: OUTPUT«Unhandled exception: Failed to load config.properties␤ in (gen/jvm/stage2/NQPHLL.nqp:8)␤ in (gen/jvm/stage2/NQPHLL.nqp:8)␤ in (gen/jvm/stage2/NQPHLL.nqp)␤ in (src/vm/jvm/ModuleLoader.nqp:78)␤ in load_module (src/vm/jvm/ModuleLoader.nqp:60…»
benabik Hmmmm… Optimizer fail. 03:11
Compiling RESTRICTED.setting with rakudo-parrot started failing at 1775172: “Various return typecheck/decont optimizations.” 03:12
git-bisect++
Merft. And the revert has merge conflict, so I can’t test that. 03:13
Blarg. Can’t login to RT. Don’t have time to sort this out and file a proper bug report. Hopefully someone can find this in the clogs. 03:16
BenGoldberg m: say first-index { $_ > 5 }, 2..7; 03:44
camelia rakudo-moar fd5f8e: OUTPUT«4␤»
BenGoldberg m: say first-rindex { $_ > 5 }, 2..7;
camelia rakudo-moar fd5f8e: OUTPUT«5␤»
BenGoldberg wonders why first-rindex is not named 'last-index'
moritz wonders that too 03:45
grondilu saw the lines about last-index 03:56
grondilu was about to ask why there is not a 'last' command that would work as 'first' 03:57
grondilu remembered having thought about it once and concluded that it was not useful, but forgot why :-)
m: sub Last(&f, *@a) { .[.end] given @a ...^ {!.&f} }; say Last * < 6, ^10; 04:00
camelia rakudo-moar fd5f8e: OUTPUT«5␤»
BenGoldberg Well, 'last' by itself could be mistaken for a loop control statment ;) 04:16
But last-index ought to be fine.
m: sub last-index(&f, *@a) { first { f($a[$_]) }, reverse 0 .. @a-1 }; say last-index { * eq 'c' }, 'a'..'e'; 04:18
camelia rakudo-moar fd5f8e: OUTPUT«===SORRY!=== Error while compiling /tmp/lgBe1dYnIb␤Variable '$a' is not declared␤at /tmp/lgBe1dYnIb:1␤------> b last-index(&f, *@a) { first { f($a[$_]⏏) }, reverse 0 .. @a-1 }; say last-index␤ expecting any…»
BenGoldberg m: sub last-index(&f, *@a) { first { f(@a[$_]) }, reverse 0 .. @a-1 }; say last-index { * eq 'c' }, 'a'..'e';
camelia rakudo-moar fd5f8e: OUTPUT«4␤»
BenGoldberg Hmm, not quite what I wanted. 04:19
moritz kresimirbojcic.com/2013/02/24/perl-...topia.html # found just now in my twitter stream 07:49
FROGGS nice post indeed :o) 08:06
grondilu "I pity them because Python feels like jail to me since it has all of those “purity”, “sanity” (however you want to call them) constraints." LoL I wouldn't dare state something like that but I do think something similar. 08:35
jnthn I was amused by the comment about learning Perl 6 before it became cool :) 08:49
Anyway, yes, nice read :)
grondilu made a joke on rosettacode.org/wiki/Self-hosting_compiler. I hope that won't bother anyone or anything ;-) 09:05
I was trying to be sarcastic though, because the idea of self-hosting compiler is not trivial, and 'eval slurp' really is a Perl 6 compiler written in Perl 6. 09:08
masak grondilu: maybe I'm a bit picky, but that does not qualify as a "self-hosting compiler" to me. 09:11
grondilu it's more of an interpreter than a compiler if that's what you mean. But there's not much difference. 09:12
masak if someone asks you to implement binary search, and you call a function that does binary search, you have not implemented binary search. 09:13
if someone asks you to implement a self-hosting compiler, and you call 'eval', you have not implemented a self-hosting compiler.
grondilu masak: if to implement a language you're allowed to use parts of that language, then there is no reason to exclude any of these parts. 09:14
moritz the specs don't mandate that the compiler must be self-hosting; so a call to eval might or might not call into a self-hosting compiler 09:16
vendethiel (shouldn't that be EVAL ?) 09:19
grondilu oh yeah I forgot about the change in casing
nwc10 also, semantics here, isn't the question "implement" rather than "provide"? ie implied is "not using a builtin" 09:20
masak my point. 09:21
grondilu everything at some point calls a builtin.
nwc10 yes, agree, your point, but I was trying to be annoyingly clearer (and probably failing)
masak yes. thank you. :) I'm glad someone agreed. 09:22
&
xiaomiao more important: how big is the smallest quine? 09:23
moritz xiaomiao: the empty string 09:29
xiaomiao ah, stabbed by a definition ...
I bleed happily ;)
moritz print slurp $*PROGRAM;
m: say $*PROGRAM 09:30
camelia rakudo-moar fd5f8e: OUTPUT«===SORRY!===␤Dynamic variable $*PROGRAM not found␤»
moritz m: say $*PROGRAM_NAME
camelia rakudo-moar fd5f8e: OUTPUT«/tmp/ZlHCnt85d7␤»
moritz ok, s/PROGRAM/PROGRAM_NAME/
moritz what's the R* release blocking on? 09:43
jnthn moritz: Uploading the last RC I put out to the proper place and sending announcements 09:49
I gotta leave in 10 mins for a train... 09:50
lizmat BenGoldbeg / moritz: the reason I called it first-rindex, was because of rindex on strings 12:18
last-index actually makes a lot of sense to me, I just didn't think about it that way
wrt to last{ &code ), that should work, no, signature wise ?
dalek ast: e344eb2 | (Elizabeth Mattijsen)++ | S17-supply/grab.t:
Add tests for Supply.grab
12:36
kudo/nom: 90e6e84 | (Elizabeth Mattijsen)++ | t/spectest.data:
Make sure we do the Supply.grab tests
12:43
nwc10 jnthn: "imitation is the scincerest form of flattery" - is anything other than Perl 6 flattering C#'s concurrency (not-)primitives to the same degree? 12:44
dalek ecs: 419d760 | (Elizabeth Mattijsen)++ | S17-concurrency.pod:
Spec Supply.(sort|reverse)
13:02
dalek ast: 61c77b9 | (Elizabeth Mattijsen)++ | S17-supply/ (2 files):
Add tests for Supply.(reverse|sort)
13:20
kudo/nom: f557986 | (Elizabeth Mattijsen)++ | / (2 files):
Implement Supply.(sort|reverse), make sure we test
13:28
lizmat cycling&
PerlJam p6: say $*OUT: "foo" 13:35
camelia rakudo-{parrot,moar} fd5f8e: OUTPUT«===SORRY!=== Error while compiling /tmp/tmpfile␤Two terms in a row␤at /tmp/tmpfile:1␤------> say $*OUT⏏: "foo"␤ expecting any of:␤ postfix␤ infix stopper␤ infix or meta-i…»
..niecza v24-109-g48a8de3: OUTPUT«===SORRY!===␤␤Invocant handling is NYI at /tmp/tmpfile line 1 (EOF):␤------> say $*OUT: "foo"⏏<EOL>␤␤Unhandled exception: Check failed␤␤ at /home/p6eval/niecza/boot/lib/CORE.setting line 1502 (die …»
..rakudo-jvm fd5f8e: OUTPUT«Unhandled exception: Failed to load config.properties␤ in (gen/jvm/stage2/NQPHLL.nqp:8)␤ in (gen/jvm/stage2/NQPHLL.nqp:8)␤ in (gen/jvm/stage2/NQPHLL.nqp)␤ in (src/vm/jvm/ModuleLoader.nqp:78)␤ in load_module (src/vm/jvm/ModuleLoader.nqp:60…»
Woodi hi
FROGGS o/ 13:36
Woodi m: my %d = <1 a 2 b 3 c 4 d 5 e 6 f 7 g 22 s 23 t 31 u>; my $ds = 2; my $de = 4; say %d.keys.sort({ $^a <=> $^b }).grep( $ds .. $de ); 13:37
camelia rakudo-moar fd5f8e: OUTPUT«2 3 4 22 23 31␤»
Woodi how to get list items only in range ? 13:38
vendethiel m: my %d = <1 a 2 b 3 c 4 d 5 e 6 f 7 g 22 s 23 t 31 u>; my $ds = 2; my $de = 4; say %d.keys.sort()[$ds .. $de]
camelia rakudo-moar fd5f8e: OUTPUT«22 23 3␤»
vendethiel m: my %d = <1 a 2 b 3 c 4 d 5 e 6 f 7 g 22 s 23 t 31 u>; my $ds = 2; my $de = 4; say %d.keys.sort(&infix:{'<=>'})[$ds .. $de] 13:39
camelia rakudo-moar fd5f8e: OUTPUT«===SORRY!=== Error while compiling /tmp/kNyjK_vSgN␤You can't adverb that␤at /tmp/kNyjK_vSgN:1␤------> $de = 4; say %d.keys.sort(&infix:{'<=>'}⏏)[$ds .. $de]␤ expecting any of:␤ postfix␤ st…»
Woodi and "sort :num" would be nice...
vendethiel m: say &infix:<<=>>
camelia rakudo-moar fd5f8e: OUTPUT«sub infix:<=> (\a, \b) { #`(Sub|140296936880832) ... }␤»
vendethiel :[
m: say &infix:<<<=>>> 13:40
jnthn nwc10: Well, the Rx stuff has been ported all over the place. The only reason .Net got it first was 'cus the guy who came up wiht it was working at Microsoft at the time. Nowadays he regards the Java/Scala Rx implementations as leading the way, afaict.
camelia rakudo-moar fd5f8e: OUTPUT«===SORRY!=== Error while compiling /tmp/rrh7bum3HU␤Two terms in a row␤at /tmp/rrh7bum3HU:1␤------> say &infix:<<<=>>>⏏<EOL>␤ expecting any of:␤ postfix␤ infix stopper␤ infix or me…»
jnthn m: say &infix:<< <=> >>
camelia rakudo-moar fd5f8e: OUTPUT«sub infix:<<=>> (Any, Any $?) { #`(Sub+{<anon>}|140034408264448) ... }␤»
Woodi hmm, @a[ $low .. $min ] should work ?
vendethiel m: say (^50)[10..15] # it should 13:42
camelia rakudo-moar fd5f8e: OUTPUT«10 11 12 13 14 15␤»
jnthn Or figure out how to type guillemots
uh
guillemets... :)
Woodi thanx vendethiel 13:43
timotimo did the mystery of why the star would try to use the binary "nqp"? 14:06
skids timotimo: Well, no, but I did get things functional. 14:15
Oh, well, yes that part. 14:16
timotimo OK
skids Or part of it was I was using PREFIX= instead of --prefix.
So I actually wasn't installing anything. 14:17
Sorry just woke up. A bit incoherent. 14:18
timotimo oh
we may want to check for PREFIX being set and warn? 14:19
skids That would probably speed things up for a few old C jockeys like me :-) 14:20
Today's problem is golfing a bug that only happens 1/N times I run a program under moar. 14:22
Which my hunch is, is MMD related.
timotimo old C jockeys don't read the readme, so our tools need to be a bit more careful :P 15:13
skids No, I read the readme and did it anyway out of habit :-) 15:15
timotimo :D 15:16
hmm
maybe we could learn a little something from rakudobrew
timotimo maybe scripts "justbuild-moar", "justbiald-parrot", "justbuild-jvm" that behave more like traditional things, with PREFIX and stuff 15:17
timotimo doesn't sound too helpful, on second thought 15:18
skids Nah best to break the old bad habits. 15:20
skids Damn. I golfed away the bug, then put back what I took out and its still gone. Grr. 15:20
dalek kudo-star-daily: c7a16e4 | coke++ | log/ (3 files):
today (automated commit)
15:31
skids timotimo: alternative explanation for slowness at high number of iterations if it did not turn out to be 32768: CPU thermals. 15:56
Was just noticing that hapenning here. 15:57
skids Ah my bug golf just got to a manageable size: gist.github.com/skids/f55b1106964e500f5d60 16:19
timotimo ah, hmm. 16:28
moritz skids: I think that's related to MoarVM moving objects around in memory
moritz skids: compacting GC and all that 16:28
skids It's definitely racy. 16:29
moritz which means the memory address changes, and thus the default stringification of an object
m: say (class Foo { }).new
camelia rakudo-moar fd5f8e: OUTPUT«Foo.new()␤»
moritz m: say ~(class Foo { }).new
camelia rakudo-moar fd5f8e: OUTPUT«Foo<139707849948776>␤»
skids moritz: are objects as keys still stringified in MOARVM? 16:31
timotimo m: say (my %foo).perl 16:32
camelia rakudo-moar fd5f8e: OUTPUT«().hash␤»
timotimo m: say (my %foo).WHAT.perl
camelia rakudo-moar fd5f8e: OUTPUT«Hash␤»
timotimo the default for a hash is to stringify strings
unless you define it thusly:
m: my %foo{Any}; %foo{Int} = 1; say %foo.keys>>.WHAT;
camelia rakudo-moar fd5f8e: OUTPUT«(List)␤»
timotimo m: my %foo{Any}; %foo{Int} = 1; say %foo.keys.perl; 16:33
camelia rakudo-moar fd5f8e: OUTPUT«(Int,).list␤»
timotimo m: my %foo{Any}; %foo = 1; say %foo.keys.perl;
camelia rakudo-moar fd5f8e: OUTPUT«Odd number of elements found where hash expected␤ in method STORE at src/gen/m-CORE.setting:9315␤ in block at /tmp/ThAF3_0u_5:1␤␤»
timotimo what did i just do
benabik %foo = 1 Forgot a key?
timotimo m: my %foo; %foo{Int} = 1; say %foo.keys.perl;
camelia rakudo-moar fd5f8e: OUTPUT«use of uninitialized value of type Int in string context␤("",).list␤»
timotimo yes, i removed the wrong {} :)
look how it stringified Int in that context, but not in the first one
skids I updated the gist. Switching to my %store{Any} still metastable. 16:38
timotimo ah, that's not good 16:39
can you output the contents of the hash a bit more precisely?
perhaps even with .DUMP?
skids I can try, but depending on where you put the "say" the bug will dissapear. 16:40
timotimo hah! :)
that sucks
skids Well, I can get the bug to happen while saying %store.keys, and they stringify to C.new(), and I say they because sometimes there are two which should not happen. 16:52
(gist updated)
skids Grr the more I golf the harder it is to make the bug appear. But it is often still there, just not statitstically likely. 17:19
masak maybe it's size-related? 17:22
jnthn I think it's the same issue we have on the JVM with .WHICH: they value can change over time for the same object. 17:25
skids Might be optimizability related.
jnthn *the
timotimo aye, the pypy people have some wild things with "id" and dictionaries using ids as keys 17:26
thou I think I spy an obscure typo in S05:1884; Need a space before foo in: / (<* <foo bar baz> >) / Otherwise <foo bar baz> is parsed as <foo(/bar baz/)>, and intention is to parse it as [ 'foo' | 'bar' | 'baz' ].
synopsebot Link: perlcabal.org/syn/S05.html#line_1884
thou Can anyone confirm I'm reading the spec right?
timotimo but it's inside <* > 17:28
does that make a difference?
skids (The reason for the object hash is just a workaround for the diamond composition problem, and will go away eventually)
thou Not as I read it. "A leading * indicates that the following pattern allows a partial match." -- <foo bar baz> is interpreted as a pattern. 17:29
timotimo oh, ok 17:30
i didn't even know about <* >, do we implement that yet? 17:31
thou Dunno. :-)
timotimo does it mean hitting eof will not cause an error condition?
thou Yes. "It always succeeds." 17:32
dalek ecs: dc55e28 | (Tim Smith)++ | S05-regex.pod:
Fix syntax of example <* < foo bar baz > >
17:42
thou OK, I am pretty sure I'm right, so I fixed it. :-) 17:43
timotimo thanks 18:19
i'm still wondering what we'd need to do to get .WHY on most things in the setting if we have a repl session 18:29
tadzik there was an idea to lazy load them from what p6doc uses
because putting all the things in the setting would be meh 18:30
maybe one day we'll be so fast and tiny that it won't be :)
but now, /me is building rakudo-jvm to see if he can afford more than one bullet in his game until collision detection becomes unbearably slow 18:31
uhh, what does "This representation can not unbox another" mean? :o 18:33
raydiak pleasant prenoon, perl people 18:36
tadzik hello raydiak 18:37
raydiak \o tadzik...working on cool game stuff?
tadzik yep :)
I've sort of hit the performance limits
and it makes me sad
because even if I use proper and clever algorithms it will still be too slow, I estimated 18:38
so I have to drop lots of things to C
at which points it makes more sense to just have box2d do it all
which is probably a good idea anyway
raydiak yeah me too...was going to enter that contest, but only got through the window to run at a single-digit FPS 18:39
tadzik but I'll definitely write some pure-p6 benchmark related to it, so I can notice if one day it becomes alrighty fast
uhh, really?
raydiak aye
tadzik that shouldn't happen
what machine is that?
raydiak even on half-decade+ old laptops?
tadzik ah, hm
I could check that on my half-decade old laptop :P 18:40
FROGGS tadzik: even Perl 5 was too slow to do things in P5 directly
tadzik or on that P4 computer nearby
FROGGS: wow, really?
even with proper quadtrees and all that? 18:41
FROGGS yes, that is why I wrote that LayerManager in XS for example
tadzik hm :) That boosted my morale a bit
FROGGS no quadtrees involved, but we calculate only the areas that have changes, so there is less to update on screen 18:42
tadzik but really, I have a pretty good i5 in this laptop, and it can't really handle checking one bullet against 20 ships in reasonable time
FROGGS changed*
tadzik so I don't think that building a proper tree and all that will make it any better
if it can't handle 120 &infix:<<=>'s basically
but well, for this week I have animations, gamepad support (if it's the xbox pad) and more niceness 18:45
so maybe people will forgive me that they need insane computing power to run it :o
FROGGS *g* 18:47
tadzik++
tadzik I wonder what would happen if I threw more threads on
FROGGS you'd have a bigger knot 18:49
tadzik perlcabal.org/syn/S17.html#line_809 18:50
shouldn't that be "Supplies"?
FROGGS: well, not so sure 18:51
there are a lot of things that can be done independently
FROGGS yes, sure
I was just kidding :o)
tadzik I really need to catch up with all that nice threading stuf 18:52
github.com/perl6/roast/blob/master...read.t#L98 is that the easiest way to "run this N things in parallel and wait until they all finish?" 18:53
FROGGS no, normally you write 'await' before the loop, and 'start' within the loop 18:55
FROGGS Thread.start is like something internal that should normally not be used 18:55
tadzik right, hence "lowlevel" probably :) 18:56
FROGGS perhaps you read jnthn.net/papers/2014-nlpw-reactive.pdf
tadzik I didn't immediately find the idiomatic way in neither spec nor tests
FROGGS wait... there were better slides 18:57
raydiak tadzik: checked just FYI, and the laptop is a 1.7 GHz 32-bit Pentium M w/a 533 MHz FSB...so probably a couple notches below most of your target audience :)
FROGGS tadzik: ahh, have you read jnthn++'s latest blög? 6guts.wordpress.com 18:58
tadzik raydiak: well, I'd like my target audience to be as broad as possible
besides, it's a side-scrolling jumping game
tadzik it's a bit embarassing that you need a fluid-cooled quadcore beast to run it smoothly 18:59
FROGGS: I probably did, but I may not remember all of it :) Will look, thansk
ah, that's nice indeed :)
raydiak agreed...I just mean a lot of modern stuff is painful on this thing 19:00
tadzik I can make steroids torment 4 cores instead of one
FROGGS tadzik: there is "the idiom" and also a nice explanation (including a must-know)
tadzik Unhandled exception: When invoking protect, Provided outer frame 0x36e27e0 (MVMStaticFrame protect) does not match expected static frame type 0x36e2540 (MVMStaticFrame ) 19:03
oh nice :)
FROGGS uff 19:19
tadzik ah damnits 19:27
if it wasn't for the PLPW talk I'll probably have just thrown it all to the trash can and forgot about the games thingy
FROGGS :/ 19:28
timotimo aye, perl6 performance can be a frustrating thing :| 19:31
timotimo you can program stuff that's kinda performant in nqp ... but then you get almost no sugar 19:31
lizmat indeed 19:33
oops
tadzik: don't use Thread, use Promises 19:34
or simpler: start { };
which gives a promise
tadzik yeah, I went for start {}s :)
timotimo: well, performance is one thing
but I keep noticing that I keep getting things more or less wrong from place to place 19:35
lizmat is hoping we can tap graphics cards processors transparently in Perl 6 soon
tadzik :o
timotimo i'm also afflicted by an insufficient amount of practice writing actual perl6 code rather than rakudo guts
tadzik for instance, I just tried making physics (velocity) dependent on the actual time that passed since last frame 19:36
and it's all broken
timotimo oh, apologies
tadzik mostly on the user side in this case, not on the framework side
but the fact that I'm making this kind of mistakes makes me thing that there are a lot of hidden bugs in there :)
lizmat tadzik: is there no way that you can use Promises to generate frames async?
tadzik lizmat: not exactly, they all depend on the previous ones 19:37
lizmat is there rendering involved after a frame is done? 19:37
can you offload that to a Promise ?
tadzik yes, but the cost of rendering is infinitesimal compared to actual computation
or so I think :) 19:38
lizmat Benchmark it, I would say :-)
tadzik but the rendering step is basically dropping everything to SDL, which is doing things in roughly 0 time
timotimo well, the rendering is in C, handled by sdl, afaict, and hardware-accelerated
tadzik well, the state changing step is the biggest dealbreaker
lizmat perhaps the dropping can be offloaded?
I mean, Perl 6 *is* doing something to make it so SDL can work with it ? 19:39
tadzik mostly collision detection recently
timotimo aren't the things you're giving to sdl CStruct repr'd objects 19:39
?
tadzik they are 19:40
timotimo that means the "dropping to sdl" stuff is spread all over the code
wherever you $my_object.x += 5 it'll "do that
"
:\
tadzik no, no 19:41
the C-repr'd objects basically never change
you query them sometimes though 19:42
timotimo oh
in that case i don't know how things are offloaded onto sdl
tadzik well, the entire rendering is "take @!entities and .draw() them all" 19:43
where draw is "give SDL $!tex, $!x and $!y and tell it to draw it"
lizmat could you do it without gather / take ? 19:45
that's known to be a performance bottleneck, is it not?
timotimo ah, hmm. 19:46
timotimo i think he didn't mean "take" as in "take" 19:47
tadzik no, there's no take
I'll just show you the code
it'll be a pre-release :o
dalek ecs: 6f87cb5 | (Elizabeth Mattijsen)++ | S17-concurrency.pod:
s/C<Supply>s/Supplies
tadzik lizmat++ 19:48
tadzik github.com/tadzik/steroids/blob/ma...te.pm#L103 this is how drawing is done 19:50
should be fairly easy to measure how much time it takes, I'll do that
well, it reaches 10ms if GC comes by, but it's usually 1ms 19:53
tadzik I wonder, if I'll put enough \'s in arguments list, will it never trigger GC? :o 19:54
more generally: what can I do to avoid allocating new objects whenever possible
yeah, I should probably follow setting's footsteps 19:55
I almost never need the containers
...does it sound like it makes any sense?
lizmat some 19:56
maybe events inner loop could be better as a map ? 19:57
no, that's bogus 19:58
tadzik could it? I don't need the results
I could have a map in animations() maybe
jnthn for uses map...
lizmat also, I wonder whether we could use a better idiom for "@!entities.=grep(* !=== $d);" 19:59
tadzik something like Array.remove 20:00
lizmat perhaps, or maybe just :delete the element you want removed ? 20:01
tadzik ..oh
yeah, that makes sense :)
lizmat or turn @entities into a hash ? 20:02
tadzik wait, is that perl6?
lizmat and just :delete on key
tadzik r: my @a = 1, 2, 3; @a[1]:delete; @a.perl.say
lizmat not sure how many sprites we're talking about here
camelia rakudo-{parrot,moar} fd5f8e: OUTPUT«Array.new(1, Any, 3)␤»
..rakudo-jvm fd5f8e: OUTPUT«Unhandled exception: Failed to load config.properties␤ in (gen/jvm/stage2/NQPHLL.nqp:8)␤ in (gen/jvm/stage2/NQPHLL.nqp:8)␤ in (gen/jvm/stage2/NQPHLL.nqp)␤ in (src/vm/jvm/ModuleLoader.nqp:78)␤ in load_module (src/vm/jvm/ModuleLoader.nqp:60…»
tadzik well, sort of
is there something like .indexof()? 20:03
lizmat first-index ?
tadzik doc.perl6.org/type/Array doesn't mention it
lizmat @entities[first-index( * === $d )]:delete 20:04
tadzik r: my @a = 1, 2, 3; say @a.first-index(2)
camelia rakudo-{parrot,moar} fd5f8e: OUTPUT«1␤»
..rakudo-jvm fd5f8e: OUTPUT«Unhandled exception: Failed to load config.properties␤ in (gen/jvm/stage2/NQPHLL.nqp:8)␤ in (gen/jvm/stage2/NQPHLL.nqp:8)␤ in (gen/jvm/stage2/NQPHLL.nqp)␤ in (src/vm/jvm/ModuleLoader.nqp:78)␤ in load_module (src/vm/jvm/ModuleLoader.nqp:60…»
BenGoldberg r: my @a = 'a'..'d'; say @a.first-index('c')
camelia rakudo-{parrot,moar} fd5f8e: OUTPUT«2␤»
..rakudo-jvm fd5f8e: OUTPUT«Unhandled exception: Failed to load config.properties␤ in (gen/jvm/stage2/NQPHLL.nqp:8)␤ in (gen/jvm/stage2/NQPHLL.nqp:8)␤ in (gen/jvm/stage2/NQPHLL.nqp)␤ in (src/vm/jvm/ModuleLoader.nqp:78)␤ in load_module (src/vm/jvm/ModuleLoader.nqp:60…»
tadzik yeah, and then 'next unless $_' in the entities loops
BenGoldberg m: my @a = 'a'..'d'; say @a[@a.first-index('c')]:delete; say @a 20:05
camelia rakudo-moar fd5f8e: OUTPUT«c␤a b (Any) d␤»
lizmat perhaps: next unles nqp::exists or something, lemme check
BenGoldberg m: my @a = 'a'..'d'; say @a[@a.first-index('c')]:splice; say @a
camelia rakudo-moar fd5f8e: OUTPUT«Unexpected named parameter 'splice' passed␤ in sub postcircumfix:<[ ]> at src/gen/m-CORE.setting:2432␤ in block at /tmp/LcGz_SKN55:1␤␤»
tadzik Any's false, it shouldn't be necessary 20:06
but removing sprites doesn't happen very often, I don't think it's the most costly thing 20:07
right now, apparently NativeCalls is diffent on each backend
and my code only works on moar
lizmat :-(
tadzik I wonder when did that happen 20:08
jnthn Probably tells us we need more NativeCall tests...
tadzik now I have to reduce this beast to a small testcase :o 20:09
dalek ast: 7267957 | (David Warring [email@hidden.address] | integration/advent2012-day24.t:
adding 2012 advent day 24
20:20
tadzik oh, actually it's not nativecall 20:22
or not entirely
github.com/tadzik/steroids/blob/ma...ids.pm#L35 this breaks on parrot
I assume this also breaks on JVM, but silently 20:26
dalek ast: d99bd72 | (Elizabeth Mattijsen)++ | S17-lowlevel/ (2 files):
Discourage use of these tests as inspiration
tadzik :) 20:27
this should keep me away :P
tadzik lizmat++ 20:27
jnthn: re nativecall, JVM says "This representation can not unbox another" 20:28
github.com/tadzik/steroids/blob/ma...ids.pm#L19 here
same when I substitute the variables with values
dalek ecs: 9878e9a | (Elizabeth Mattijsen)++ | S17-concurrency.pod:
Fix uniq () glitch
20:32
jnthn tadzik: Please can you file a ticket on NativeCall for that? 20:33
tadzik jnthn: sure, as soon as I find out what exactly happens :) 20:34
I'd feel bad about "here, this monstrosity that takes 10 seconds to compile is broken":) 20:35
jnthn yes, a golf is appreciated
arnsholt++ may look into it given it's a NativeCall on JVM issue, if he's the tuits :D
tadzik who parrots the parrots/ 20:36
I mean, who'll look into the parrot issue? :P
jnthn On NativeCall, not immediately sure. The recent build breakage on Parrot wants looking into. I think somebody bisected it earlier...will have to look when I've tuits 20:38
dalek ast: fcb68fb | (Elizabeth Mattijsen)++ | integration/advent2012-day24.t:
Add a plan
tadzik no, it's not nativecall 20:39
dalek kudo/nom: 424d99c | (Elizabeth Mattijsen)++ | t/spectest.data:
Add missing advent2012 tests to roast
tadzik github.com/tadzik/steroids/blob/ma...ids.pm#L35 this results in Can not bind attribute '$!game' declared in class 'Steroids::State' with this object
lizmat dwarring++
tadzik so nqp::bindattr bails out when asked to set a private attr on other class 20:40
lizmat could it be the :: in Steroids::State ?
aka, shouldn't that just be State ?
tadzik hmm
tadzik then it says Undeclared name: State 20:41
lizmat how is Steroids::State defined? class Steroids::State {} ? or class Steroids { class State {} } ? 20:42
tadzik Steroids::State 20:50
lizmat then, the way I understand things, that's the right class to specify in bindattr 20:51
mayby jnthn can chime in?
jnthn yes, agree it's the right thing. 20:52
Try an nqp::decont($state) as the first arg to nqp::bindattr 20:53
On MoarVM the signature binding lowerer sometimes optimizes away containers when it believes it can get away with it.
But it's "get away wiht it" in the "using Perl 6 syntax" sense, and using nqp:: ops might well expose the difference. 20:54
tadzik heh, the bug is actually with exporting 20:55
(the nativecall one)
I'll try the bindattr in a second
tadzik bug reported 20:58
jnthn: yes, decont makes thins work :) 20:59
(very slowly)
jnthn MoarVM runs it faster than Parrot, huh... :)
tadzik heheh 21:00
my $key = nqp::p6box_i($k) but role { method Str { $str } };
this makes Parrot react funny
jnthn has started on the next round of MoarVM speedup work also :)
tadzik \o/
vendethiel yay :-) 21:01
dalek ecs: 6499b5c | (Elizabeth Mattijsen)++ | S32-setting-library/Containers.pod:
Rename first-rindex to last-index

This makes much more sense :-)
tadzik p: my int32 $k = 7; my $key = nqp::p6box_i($k) but role { method Str { $str } } 21:02
camelia rakudo-parrot fd5f8e: OUTPUT«===SORRY!=== Error while compiling /tmp/4SKRt5l9LP␤Variable '$str' is not declared␤at /tmp/4SKRt5l9LP:1␤------> p6box_i($k) but role { method Str { $str⏏ } }␤ expecting any of:␤ postfix␤»
lizmat moritz++ and others++
tadzik p: my int32 $k = 7; my $key = nqp::p6box_i($k) but role { method Str { 'yak' } }
camelia ( no output )
tadzik p: my int32 $k = 7; my $key = nqp::p6box_i($k) but role { method Str { 'yak' } }; say $key
camelia rakudo-parrot fd5f8e: OUTPUT«yak␤»
tadzik huh
there is something weird about lexicals and nativecalls and this "but role" 21:03
github.com/tadzik/steroids/blob/ma...ate.pm#L19 -- if I don't do assignment to $str and just use the SDL call in the method Str { }, the code dies with Lexical with name '$k' has wrong type 21:04
this also breaks on parrot even with the $str assignment 21:05
dalek kudo/nom: 5622537 | (Elizabeth Mattijsen)++ | / (2 files):
Rename first-rindex to last-index
21:18
ast: d8fdf05 | (Elizabeth Mattijsen)++ | S32-list/ (2 files):
Rename first-rindex.t - last-index.t
21:19
ast: 41b1391 | (Elizabeth Mattijsen)++ | S32-list/last-index.t:
Rename first-rindex to last-index
lizmat I figured since first-rindex was not in last month's release, I could change it now without a deprecation cycle
jnthn lizmat: yeah, it only went in a couple of days ago, right? 21:20
lizmat I specced it on 28/04
jnthn yeah...just change it if it's that recent
dalek ast: 7e5b462 | (David Warring [email@hidden.address] | integration/advent2012-day15.t:
fudged on jvm
21:31
dalek kudo/nom: 8abc689 | (Elizabeth Mattijsen)++ | docs/ChangeLog:
Added some ChangeLog entries
21:34
jnthn lizmat: async sockets are missing :) 21:36
lizmat see, I forgot something :-)
lizmat Hmmm... shouldn't we call IO::Socket::Async.chars_supply just "receive" ? 21:41
jnthn ^^^ 21:42
jnthn That feels too...synchronous-suggestive to me.
I'm not attached to the name
though chars_supply and bytes_supply are hard to beat on explaining what they are doing :)
lizmat yeah, but you don't call it "signal_supply" either 21:43
jnthn yeah
lizmat just "signal"
lizmat something to ponder :-) 21:44
jnthn aye
dalek kudo/nom: 5037864 | (Elizabeth Mattijsen)++ | docs/ChangeLog:
Mention IO::Socket::Async additions
21:45
tadzik . o O ( Is this a real bug? Is it just fantasy? ) 22:01
jnthn
.oO( Caught an exception, can't belive it's reality )
22:02
lizmat
.oO( Will you do the fandango ? )
22:03
tadzik this is crazy :S
but here's exception, so throw me maybe 22:04
jnthn open("gangnam-style")
tadzik but really, aargh 22:05
I have two subs, their &sub.WHICH is different 22:06
when passed to C, their address is the same
of course when I wrote a similar testcase in zavolaj's test suite it works like a charm
dalek ast: 3449e3b | (David Warring [email@hidden.address] | integration/advent2012-day14.t:
tidied. fudged on jvm
jnthn tadzik: ah...are you doing closures? 22:07
tadzik yes
jnthn And passing differnet closures off to C-land?
ah...I hit issues there
tadzik :S
jnthn Is this wiht Moar?
tadzik github.com/tadzik/steroids/blob/ma...ate.pm#L17 this is the issue
yes
thing is, when activate() is called on a different object, C still gets the old &update_cb
C call in #49 22:08
jnthn: any workarounds?
jnthn gist.github.com/jnthn/f281ac967aabf9275a31
tadzik make just one global closure and change what it does?
woolfy So, when is Perl 6 going to run on a Raspberry Pi? :-)
jnthn Try that patch
tadzik will do
jnthn woolfy: Potentially, when nwc10++ wakes up tomorrow morning, we'll learn it does ;)
dalek kudo/nom: 0244475 | Mouq++ | src/core/ (2 files):
Add List.rotor
22:09
tadzik as a contrast to all the Space videos posted here, here's Dogecar: i.imgur.com/gr2q5aI.jpg 22:15
jnthn Such accelerate. 22:17
Mouq Very speed. 22:18
tadzik jnthn: yay, it helped :) 22:19
then it segfaulted, but it's probably my fault 22:20
or not 22:21
Timbus ahhaha the dogecoin car 22:24
[steering column rattle intensifies]
tadzik jnthn: backtrace: gist.github.com/tadzik/7dfdd5b6fb129371c296 22:25
I should make a debug build
tadzik but it segfaults all the older games too 22:31
dalek kudo/nom: beba99f | Mouq++ | src/core/List.pm:
Make List.rotor more robust and lazy
lizmat Mouq++ 22:42
Mouq: Supply.rotor will actually also send the last (incomplete) parcel, does List.rotot do that also?
*rotor
.oO( I just can't type rotot )
22:43
Mouq lizmat: perl6 -e'.say for (^10).rotor(3,0)' 22:44
0 1 2
3 4 5
6 7 8
9
lizmat I'll take that as a yes :-) 22:46
and on that note, I bid you all gnight!
Mouq 'night lizmat++ :) 22:47