»ö« 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.
00:02 jnap joined
timotimo jvm-sockets is 3 weeks old, is there something newer up on github to try? 00:06
00:07 dayangkun joined
timotimo the network graph up on github seems b0rked somehow 00:07
it's empty
00:07 dayangkun left, zwut00 left
timotimo works in firefox, though 00:08
00:15 araujo joined, TimK1 joined
TimK1 rn: sub infix:<add> (@a, $n) is equiv<X> { @a <<+>> $n }; say 1 .. 3 add 5; 00:20
camelia niecza v24-92-g3961d5d: OUTPUT«6 7 8␤»
..rakudo 484f08: OUTPUT«===SORRY!=== Error while compiling /tmp/5w0Zggre2N␤Can't use unknown trait 'is equiv' in a sub+{precedence} declaration.␤at /tmp/5w0Zggre2N:1␤------> ␤ expecting any of:␤ rw parcel hidden_from_backtrace␤ pure default DEPRECATE inl…
TimK1 rn: sub infix:<add> (@a, $n) is equiv(&infix:<X>) { @a <<+>> $n }; say 1 .. 3 add 5; 00:21
camelia niecza v24-92-g3961d5d: OUTPUT«6 7 8␤»
..rakudo 484f08: OUTPUT«===SORRY!=== Error while compiling /tmp/J6R82sHIP7␤Routine given to equiv does not appear to be an operator␤at /tmp/J6R82sHIP7:1␤------> ␤»
TimK1 rn: sub infix:<add> (@a, $n) is equiv(&infix:<+>) { @a <<+>> $n }; say (1 .. 3) add 5; # definitely not what I wanted
camelia rakudo 484f08, niecza v24-92-g3961d5d: OUTPUT«6 7 8␤»
00:21 sizz joined
TimK1 "is equiv" ov Rakudo seems to behave equally strangely for a bunch of operators. 00:23
timotimo r: say 1 .. 3 X 5 00:26
camelia rakudo 484f08: OUTPUT«1 5 2 5 3 5␤»
timotimo i see what you mean 00:27
but yeah, i think infix:<X> is a bit slippery
TimK1 My thought was, in general, if I create a custom list infix operator, I probably want it to behave with list-infix precedence. So 1..3 FOO 5 should act the same as 1..3 X 5, 1..3 Z 5, 1..3 minmax 5, etc. 00:31
dalek ast: a01bfab | coke++ | S05-substitution/subst.t:
start lines with test verbs for fudging
00:35
ast: 29b2876 | coke++ | S (3 files):
niecza fudge
[Coke] there is one niecza failure left - botched plan count in S05-substitution/subst.t
niecza sees 139 tests, rakudo sees 140. I could use a pair of eyes on that.
timotimo is it not enough to compare the output of the fudger? 00:36
00:36 fridim_ joined
colomon will try to take a look. actually just looking at end.t at the moment, and wondering WTH that method is. 00:36
timotimo gives you the index of the last element 00:37
[Coke] if someone has a built rakudo.parrot and could gist the results, that woudl be awesome.
timotimo can do in 30minutes
[Coke] r: my @a=1,2,3; say @a.end
camelia rakudo 484f08: OUTPUT«2␤»
[Coke] but it's supposed to be Cool, I guess.
timotimo well since cool has other similar methods yeah sure 00:38
[Coke] so, going forward, let's try to keep niecza fudged so we can have a clean slate to work from. 00:39
colomon [Coke]: gist.github.com/colomon/6431447 00:41
00:42 TimK1 left
timotimo i was not able to build niecza last time i tried 00:42
it was for doing benchmarks
[Coke] timotimo: maybe github.com/coke/perl6-roast-data/b.../niecza.sh has a clue for fixing your build? 00:44
[Coke] finds a case where he can todo rakudo.parrot, but has to skip rakudo.jvm 00:45
timotimo i got some not found things for mono while compiling
[Coke] timotimo: ah. 00:46
colomon: ? 00:47
oh, you want me to compare the fudged file?
ok.
colomon [Coke]: you asked for the fudged output of subst.t from rakudo.parrot, no? 00:48
[Coke] I was looking for the test run output; I probably misspoke 00:50
colomon oh, can do that to 00:51
o
[Coke] I see differences on the fudged file, but nothing obvious.
colomon gist.github.com/colomon/6431519 00:52
[Coke] *facepalm* 00:55
throws_like is -two- tests.
so that last block does need a DOES 00:56
dalek ast: f71e492 | coke++ | S05-substitution/subst.t:
niecza fudge - fix DOES count for throws_like
00:57
[Coke] colomon++
01:02 FROGGS_ joined
timotimo niecza built successfully \o/ 01:04
01:05 cognominal left, cognominal joined 01:06 FROGGS left
[Coke] woot. 01:08
01:16 jnap left
colomon is spectesting a niecza patch. [Coke]++ 01:21
[Coke] sweet! 01:24
didn't think that would pay off so soon!
colomon it's a simple patch, mind you. 01:25
timotimo i'm wondering how to implement this properly: i have a list of strings and a big string. i want to make sure all of the substrings are in the string in order and give helpful TAP output ...
dalek ast: 79a7a58 | coke++ | S05-mass/properties-derived.t:
rakudo.jvm fudge
[Coke] there, that avoids: S05-mass/properties-derived.rakudo.jvm aborted 228 test(s) 01:26
timotimo maybe i should actually do a bit of actual html parsing
[Coke] goes to pick up the kid from rehearsal. 01:27
colomon [Coke]++ 01:29
timotimo r: my @expected = <foo bar baz>; my $teststr = @expected.join(" "); say @expected.map({ $teststr.index($_) }); 01:31
camelia rakudo 484f08: OUTPUT«0 4 8␤»
timotimo r: my @expected = <foo bar baz>; my $teststr = @expected.join(" "); say [<] @expected.map({ $teststr.index($_) });
camelia rakudo 484f08: OUTPUT«True␤»
timotimo that seems sensible-ish
TimToady are overlaps allowed? 01:32
timotimo don't think so.
i mean: i don't think i need it to 01:33
TimToady well, that method allows them
timotimo or even: i don't think i need to care more specifically
but it's a good point.
TimToady or you could .join('.*?') and then <$pattern>
timotimo mhm, but am i going to get sensible "this one piece is missing" errors out of that? 01:34
TimToady wrap each bit in ['string'||{die 'string is missing'}] 01:35
timotimo oh, that sounds nice actually
i should probably use "nok" instead, though
(this is just for testing that the stuff in the html output of Pod::To::HTML kind of corresponds to the input)
hm, how much do i have to worry about quoting? 01:37
i should be able to just refer to @foo[0], @foo[1], ... instead of interpolating into the pattern?
01:39 cooper joined
TimToady no, because [] is too ambiguous with grouping 01:40
timotimo aaw.
but escaping ' and \ is enough, right?
is there a mysql_real_escape_ex sub i can use or something? 01:41
TimToady you can do "@foo[0]" 01:42
timotimo ah, that's good
TimToady "{@foo.shift}"
timotimo that seems dangerous for backtracking :) 01:43
also, i'll need to map over the bits anyway to generate the proper errors
r: <foo bar baz>.pairs.perl.say 01:44
camelia rakudo 484f08: OUTPUT«(0 => "foo", 1 => "bar", 2 => "baz").list␤»
timotimo r: <foo bar baz>.kv.perl.say
camelia rakudo 484f08: OUTPUT«((0, "foo"), (1, "bar"), (2, "baz")).list␤»
timotimo r: <foo bar baz>.kv.map({ say "$^idx has $^val" })
camelia rakudo 484f08: OUTPUT«0 has foo␤1 has bar␤2 has baz␤»
timotimo great
lucky that idx comes before val lexicographically 01:45
r: my @foo = <foo bar baz>; say @foo.keys.map({ say q{["\@foo[$^idx]" || { die "\@foo[$^idx] is missing" } } }) 01:47
camelia rakudo 484f08: OUTPUT«["\@foo[$^idx]" || { die "\@foo[$^idx] is missing" } ␤["\@foo[$^idx]" || { die "\@foo[$^idx] is missing" } ␤["\@foo[$^idx]" || { die "\@foo[$^idx] is missing" } ␤True True True␤»
timotimo r: my @foo = <foo bar baz>; say @foo.keys.map({ say q{["@foo[$^idx]" || { die "@foo[$^idx] is missing" } } })
camelia rakudo 484f08: OUTPUT«["@foo[$^idx]" || { die "@foo[$^idx] is missing" } ␤["@foo[$^idx]" || { die "@foo[$^idx] is missing" } ␤["@foo[$^idx]" || { die "@foo[$^idx] is missing" } ␤True True True␤»
timotimo hm, {} won't do it seems
r: my @foo = <foo bar baz>; say @foo.keys.map({ say q/["@foo[$^idx]" || { die "@foo[$^idx] is missing" } / })
camelia rakudo 484f08: OUTPUT«["@foo[$^idx]" || { die "@foo[$^idx] is missing" } ␤["@foo[$^idx]" || { die "@foo[$^idx] is missing" } ␤["@foo[$^idx]" || { die "@foo[$^idx] is missing" } ␤True True True␤» 01:48
timotimo ah, BS, q is the wrong, qq is right
r: my @foo = <foo bar baz>; say @foo.keys.map({ say qq{["@foo[$^idx]" || { die "@foo[$^idx] is missing" }} })~
camelia rakudo 484f08: OUTPUT«===SORRY!=== Error while compiling /tmp/DiaET0QlU5␤Two terms in a row␤at /tmp/DiaET0QlU5:1␤------> || { die "@foo[$^idx] is missing" }} })~⏏<EOL>␤ expecting any of:␤ postfix␤ statement end␤ statement modi…
timotimo r: my @foo = <foo bar baz>; say @foo.keys.map({ say qq{["@foo[$^idx]" || { die "@foo[$^idx] is missing" }} })
camelia rakudo 484f08: OUTPUT«["foo" || { die "foo is missing" }␤["bar" || { die "bar is missing" }␤["baz" || { die "baz is missing" }␤True True True␤»
timotimo r: my @foo = <foo bar baz>; say @foo.keys.map({ say qq{["\@foo[$^idx]" || { die "\@foo[$^idx] is missing" }} })
camelia rakudo 484f08: OUTPUT«["@foo[0]" || { die "@foo[0] is missing" }␤["@foo[1]" || { die "@foo[1] is missing" }␤["@foo[2]" || { die "@foo[2] is missing" }␤True True True␤»
timotimo r: my @foo = <foo bar baz>; say @foo.keys.map({ say qq/ ["\@foo[$^idx]" || { die "\@foo[$^idx] is missing" }] / }).join(".*?") 01:49
camelia rakudo 484f08: OUTPUT«===SORRY!=== Error while compiling /tmp/hlhQVRJ0jW␤Placeholder variable $^idx may not be used here because the surrounding block takes no signature␤at /tmp/hlhQVRJ0jW:1␤------> x]" || { die "\@foo[$^idx] is missing" }⏏] / }).join(".…
timotimo r: my @foo = <foo bar baz>; say @foo.keys.map({ say qq/ ["\@foo[$^idx]" || \{ die "\@foo[$^idx] is missing" }] / }).join(".*?")
camelia rakudo 484f08: OUTPUT« ["@foo[0]" || { die "@foo[0] is missing" }] ␤ ["@foo[1]" || { die "@foo[1] is missing" }] ␤ ["@foo[2]" || { die "@foo[2] is missing" }] ␤True.*?True.*?True␤»
timotimo r: my @foo = <foo bar baz>; my $rex = @foo.keys.map({ say qq/ ["\@foo[$^idx]" || \{ die "\@foo[$^idx] is missing" }] / }).join(".*?"); say "foo meep bar meep baz" ~~ /<$rex>/
camelia rakudo 484f08: OUTPUT« ["@foo[0]" || { die "@foo[0] is missing" }] ␤ ["@foo[1]" || { die "@foo[1] is missing" }] ␤ ["@foo[2]" || { die "@foo[2] is missing" }] ␤Nil␤» 01:50
01:50 cognominal left
timotimo r: my @foo = <foo bar baz>; my $rex = @foo.keys.map({ qq/ ["\@foo[$^idx]" || \{ die "\@foo[$^idx] is missing" }] / }).join(".*?"); say "foo meep bar meep baz" ~~ /<$rex>/ 01:50
camelia rakudo 484f08: OUTPUT«===SORRY!=== Error while compiling eval_0␤Variable '@foo' is not declared␤at eval_0:1␤------> my $x = anon regex { ^ ["@foo[0]⏏" || { die "@foo[0] is missing" }] .*? [␤ expecting any of:␤ postfix␤ statement end␤…
01:50 cognominal joined
timotimo oh, huh? 01:50
TimToady o.O
timotimo these go through eval and don't get the right lexical scope?
TimToady rakudobug, I'll venture 01:51
timotimo because i interpolated a regex?
i'll golf it, but someone else needs to file it for me
TimToady n: my @foo = <foo bar baz>; my $rex = @foo.keys.map({ qq/ ["\@foo[$^idx]" || \{ die "\@foo[$^idx] is missing" }] / }).join(".*?"); say "foo meep bar meep baz" ~~ /<$rex>/
camelia niecza v24-92-g3961d5d: OUTPUT«Unhandled exception: bar is missing␤ at /home/p6eval/niecza/lib/CORE.setting line 1535 (die @ 5) ␤ at (eval) line 1 (ANON @ 18) ␤ at /tmp/iWflDHNeMb line 1 (ANON @ 5) ␤ at /home/p6eval/niecza/lib/CORE.setting line 3107 (Regex.ACCEPTS @ 10) ␤ at /tmp/i…
TimToady niecza gets heartburndifferently 01:52
timotimo r: my @foo = <foo bar baz>; my $rex = @foo.keys.map({ qq/ ["\@foo[$^idx]" || \{ die "\@foo[$^idx] is missing" }] / }).join(".*?"); say $rex
camelia rakudo 484f08: OUTPUT« ["@foo[0]" || { die "@foo[0] is missing" }] .*? ["@foo[1]" || { die "@foo[1] is missing" }] .*? ["@foo[2]" || { die "@foo[2] is missing" }] ␤»
timotimo these pieces of whitespace are ignored the way i interpolated the regex, right? 01:53
TimToady yes, whitespace is always ignored unless :sigspace is in the air
timotimo good
colomon is now trying to put "sigspace is in the air" to the Love Boat theme…. 01:56
timotimo r: my $foo = "hi"; my $pat = '$foo'; "hi" ~~ /<$pat>/ 01:57
camelia rakudo 484f08: OUTPUT«===SORRY!=== Error while compiling eval_0␤Variable '$foo' is not declared␤at eval_0:1␤------> my $x = anon regex { ^$foo⏏ }␤»
timotimo that's sufficiently short for a rakudobug submission, no?
TimToady yes 01:58
02:00 dayangkun joined
timotimo when dumping the qast, the regex has a bare QAST::Node in there :| 02:04
the one directly outside of the Var for $pat
self.HOW.name(self) should actually give the correct result, so it's actually a bare QAST::Node?! 02:06
indeed, it seems to do that 02:07
dalek ecza: 1042054 | (Solomon Foster)++ | lib/CORE.setting:
Try adding Any.end.
02:12
02:22 slavik joined 02:24 TimK1 joined
dalek ast: b4311be | (Solomon Foster)++ | S32-array/end.t:
Unfudge for Niecza.
02:31
02:52 kbaker left 02:53 TimK1 left
[Coke] colomon++ #awesome 03:03
03:03 xorp joined
colomon Tiny steps forward.... 03:05
03:16 abnorman left
diakopter nqp: our $foo is export; BEGIN { $foo := nqp::list_i(); }; 03:29
camelia nqp: OUTPUT«Method 'name' not found for invocant of class 'NQPMu'␤current instr.: '' pc 129723 (src/stage2/gen/NQP.pir:46360) (src/stage2/gen/NQP.nqp:2786)␤»
diakopter *cry*
JimmyZ nqp: BEGIN {our $foo is export; $foo := nqp::list_i(); }; 03:32
camelia nqp: OUTPUT«Method 'name' not found for invocant of class 'NQPMu'␤current instr.: '' pc 129723 (src/stage2/gen/NQP.pir:46360) (src/stage2/gen/NQP.nqp:2786)␤»
03:32 abnorman joined
diakopter what *can* you do in nqp's BEGIN?? 03:34
JimmyZ nqp: BEGIN { } 03:35
camelia nqp: ( no output )
diakopter :)
JimmyZ nothing :P
diakopter okay, I found rakudo\src\gen\BOOTSTRAP.nqp's BEGIN {} 03:45
03:59 frettled left
diakopter nqp-jvm: my $foo; class A { method bar () { $foo := nqp::list_i() } }; BEGIN { A.new().bar() } 03:59
camelia nqp-jvm: OUTPUT«java.lang.NullPointerException␤ at org.perl6.nqp.runtime.Ops.invokeInternal(Ops.java:1229)␤ at org.perl6.nqp.runtime.Ops.invoke(Ops.java:1200)␤ at 32E184A159F2AB2B80B927BE69AB29A193D0E286.qb_25(<generated>)␤ at org.perl6.nqp.runtime.Ops.invokeInternal(Ops.java:1240)␤ at
..…
diakopter bah.
[Coke] that is an old version of nqp-jvm, yes?
diakopter nqp: my $foo; class A { method bar () { $foo := nqp::list_i() } }; BEGIN { A.new().bar() }
camelia nqp: OUTPUT«Lexical '$foo' not found␤current instr.: 'bar' pc 6 ((file unknown):26) (/tmp/FW7Pxwnn5E:1)␤»
diakopter r: my $foo; class A { method bar () { $foo := nqp::list_i() } }; BEGIN { A.new().bar() }
camelia rakudo 484f08: OUTPUT«===SORRY!===␤Can only use nqp_set_sc_for_object with a SixModelObject␤»
diakopter *headdesk*
I can't get a list of integers serialized for teh life of me
03:59 frettled_ joined
diakopter I'm starting to guess that NQP's BEGIN can only call things in a dependency SC 03:59
03:59 Psyche^ left 04:00 ilogger2 joined, ChanServ sets mode: +v ilogger2
diakopter hm 04:00
better, I might be able to serialize *from another SC* 04:01
diakopter goes to try
04:02 dalek joined, ChanServ sets mode: +v dalek 04:58 SamuraiJack__ joined 05:00 agre joined 05:20 hummeleBop joined 05:33 fhelmberger joined 05:42 fhelmberger left 06:05 kaleem joined 06:42 iSlug joined 06:48 salv0 joined 06:50 odoacre joined 06:56 salv0 left, salv0 joined, zakharyas joined
masak morning, sixers. 06:58
07:01 FROGGS_ joined 07:07 domidumont joined 07:09 dmol joined 07:11 zakame joined
diakopter I'm more of a 'Niner 07:11
07:12 domidumont left 07:13 domidumont joined 07:19 FROGGS_ is now known as FROGGS 07:24 ssutch_ joined 07:25 ssutch_ is now known as ssutch 07:26 scottp joined 07:34 dmol left
moritz r: say infix:<X>(1, 2) 07:38
camelia rakudo 484f08: OUTPUT«1 2␤»
08:10 dakkar joined 08:21 donaldh joined, dmol joined 08:31 pernatiy joined
jnthn diakopter: what, I showed you how you should shove stuff into a package to have it serialized... 08:37
diakopter: The only thing you can talk about outside of the BEGIN is a type name. 08:42
diakopter jnthn: :( I didn't see/remember what you showed me 08:44
jnthn diakopter: In a gist last night...
moritz it was a gist
diakopter looks in the kkkkklogs
jnthn oh, maybe on #moarvm 08:45
diakopter augh; I completely missed that message
<- poor showing
jnthn gist.github.com/jnthn/6429209
oh...
OK, then you weren't ignoring my suggestion, just missed it. :) 08:46
diakopter nope, not ignoring.. just ignorant :D
meanwhile I broke'd the nobank branch... but am still fixing.
jnthn ok 08:47
Well, it's a branch
08:51 fhelmberger joined
tadzik hahahaahah 09:00
Jolla, the new phone vendor said they'll ship their phones by christmas 09:01
sounds legit
FROGGS *g*
09:01 Rotwang joined
FROGGS .oO( Do It The Perl 6 Way(tm) ) 09:01
jnthn Fif yhry fdy which one?
wtf
Did they say...
tadzik go home keyboard, you're drunk 09:02
jnthn yeah, not one I'm used to :) 09:03
09:16 danaj left 09:29 danaj joined 09:39 danaj left 09:41 Rotwang left 09:42 lizmat joined
moritz r: sub mysleep($x) { sleep $x; return now - ENTER new }; say mysleep 2 09:42
camelia rakudo 484f08: OUTPUT«===SORRY!=== Error while compiling /tmp/J6TCW66tm_␤Undeclared routine:␤ new used at line 1␤␤» 09:43
moritz r: sub mysleep($x) { sleep $x; return now - ENTER now }; say mysleep 2
camelia rakudo 484f08: OUTPUT«use of uninitialized value of type Nil in numeric context in sub mysleep at /tmp/LJ0f3fmxws:1␤␤Instant:1378287830.626545␤»
lizmat good *, #perl6!
moritz :/
\o lizmat
lizmat r: { say ENTER "foo" } 09:44
camelia rakudo 484f08: OUTPUT«Nil␤»
lizmat not good
moritz I have no idea what the spec says on that
lizmat r: { say BEGIN "foo" }
camelia rakudo 484f08: OUTPUT«foo␤» 09:45
lizmat should be the same, I thnk
FROGGS are phasers supposed to return something? 09:46
moritz FROGGS: depends on the phaser
FROGGS: it doesn't make any sense to return something from a CATCH or a LEAVE block
lizmat r: say now - BEGIN now 09:47
camelia rakudo 484f08: OUTPUT«0.0512249␤»
lizmat r: say now - BEGIN now
camelia rakudo 484f08: OUTPUT«0.0490507␤»
lizmat breakfast& 09:48
09:52 danaj joined 09:59 rindolf joined
dalek rlito: a8106a1 | (Flavio S. Glock)++ | / (7 files):
Perlito5 - js - more support for typeglob assignment
10:05
10:08 denysonique joined 10:12 danaj left 10:18 pernatiy left, domidumont left 10:25 danaj joined 10:26 jaldhar joined 10:29 ssutch left 10:34 daxim joined 10:40 sqirrel joined 10:44 kaleem left, kaleem joined
lizmat moritz: thinking more about it, it also doesn't make sense for LEAVE / END type phasers to return anything 10:45
Ah, LEAVE you already mentioned :-)
10:48 woolfy joined 10:56 logie joined 11:01 logie left
lizmat $ perl6 -e 'my $a=set(<a b c>); say set($a).perl' 11:14
set(set("a", "b", "c"))
running spectest now
Teratogen CONN, SONAR. CRAZY IVAN! 11:18
moritz Teratogen: please stop that
Teratogen ok =(
sorry watched The Hunt for Red October again
tadzik <hipster>I liked the book better</hipster. 11:19
Clancy is generally good at submarine stuff in his books
lizmat r: my $a=set(<a b c>); say set($a).perl' 11:25
camelia rakudo 484f08: OUTPUT«===SORRY!=== Error while compiling /tmp/trhSMTEbcN␤Two terms in a row␤at /tmp/trhSMTEbcN:1␤------> my $a=set(<a b c>); say set($a).perl⏏'␤ expecting any of:␤ method arguments␤ postfix␤ infix stopper␤ …
lizmat r: my $a=set(<a b c>); say set($a).perl
moritz trailing '
camelia rakudo 484f08: OUTPUT«set("a b c")␤»
lizmat just double checking it didn't work yet :-) 11:26
11:26 salv0 left
dalek rlito/replito: a8106a1 | (Flavio S. Glock)++ | / (7 files):
Perlito5 - js - more support for typeglob assignment
11:26
rlito/replito: ca778b8 | (Stanislaw Pusep)++ | / (7 files):
Merge branch 'master' into replito
rlito/replito: d2ac8c9 | (Stanislaw Pusep)++ | html/replito.html:
replito @INC fix
rlito/replito: c528e36 | (Stanislaw Pusep)++ | / (4 files):
Perlito5 - js - can't handle "return ()"; trying "return (true)" instead
11:31 salv0 joined 11:33 sqirrel left
JimmyZ Do most users want 'now - begin now' every sleep? 11:38
moritz JimmyZ: dunno, but sleep usually isn't performance critical 11:39
so it doesn't hurt do a few extra operations
JimmyZ but it inc CO2 11:41
:P
and weather gets more warm 11:42
FROGGS moritz: that is not that true 11:43
11:43 crab2313 joined
FROGGS if you write an event loop (for a game), sleeping 10 or 20ms should be a cheap as possible 11:43
JimmyZ always return now - begin now is not cheap 11:44
the user don't want it, or they can get it themself if they want
jnthn ENTER should indeed return the value 11:45
Just NYI
JimmyZ sleep should do the sleep thing
not always return now - begin now
11:46 spider-mario joined
JimmyZ it's a really bad design 11:46
lizmat jnthn: fwiw, I don't think rakudo uses the return value of nqp::sleep anywhere 11:48
JimmyZ I'd like to change the spec if there is a one
jnthn lizmat: I'm not even sure what it returns :)
lizmat rakudo only uses nqp::sleep in sink context 11:49
jnthn Then, it doesn't matter :)
JimmyZ so remove the new sleep from MoarVM? 11:50
11:50 jnap joined
jnthn I'm pretty sure on JVM if you don't use it in sink context, it returns exactly what you gave it. It may well be the same on Parrot. 11:50
11:50 jaldhar left
jnthn QAST::Operations.add_core_pirop_mapping('sleep', 'sleep', '0n', :inlinable(1)); 11:51
yup.
In sink context, nothing, in non-sink context, returns its argument. 11:52
JimmyZ on MoarVM can returns arg 0 if not sink
jnthn "returns"
No, the op should just be sleep r(int64)
11:52 sqirrel joined
jnthn And any "return" is just 'cus it does the (... , 0) thing in the NQP op mapper. 11:53
JimmyZ QAST::MASTOperations.add_core_moarop_mapping('setpayload', 'bindexpayload', 1);
the '1'
jnthn Right.
Just like that, but 0 :)
('cus args are numbered from 0)
JimmyZ yes, I said 0 :)
11:54 domidumont joined
JimmyZ jnthn: are you fine to revert the new sleep commit? 11:54
jnthn I didn't read it... 11:55
nqp::sleep on MoarVM was wrong before...'cus it accepted an integer microseconds rather than a floating point number of seconds...
jnthn looks at the commit
wtf is microsleep... :/ 11:56
JimmyZ jnthn: it's the old sleep
jnthn Yeah, we don't need that. A double allows plenty of prevision.
*precision
And yeah, returning the time slept for is useless in so far as it's unused by Rakudo. 11:57
11:57 colomon joined
jnthn Unless we spec that we want that behavior everywhere... 11:58
JimmyZ so remove the microsleep and make sleep args as double?
jnthn well, it already is a double it seems
lizmat fwiw, Rakudo's sleep() *does* return the amount actually slept
jnthn So yeah, remvoe microsleep and we don't need sleep to call now twice...
lizmat: Hm, but does it at Perl 6 level? 11:59
JimmyZ just remove the return
right?
lizmat jnthn: yes
jnthn JimmyZ: Well, it'd be consistent with other backends...
(to remove it)
lizmat: You know if that's spec'd? :) 12:00
JimmyZ QAST::MASTOperations.add_core_moarop_mapping('sleep', 'sleep', 0);
jnthn wfm 12:01
lizmat that does not seem to be specced
but perl5's sleep *does*
jnthn Ah...
lizmat p5eval: say sleep 2
jnthn wonders if it's useful... :)
p5eval lizmat: 21
jnthn And if it's measuring or returning or just returning the argument... 12:02
lizmat don't know either… but Perl6 sleep does seem like something you wouldn't put in a game
it would for sure be an nqp::sleep in a game 12:03
12:03 sqirrel left
lizmat anyway, most uses that I've seen for the retiurn value of sleep() is to make intervals with fixed time length 12:03
for that, I specced and implemented interval()
so maybe the need for a return value of sleep() is no longer there 12:04
jnthn It looks like POSIX-y sleep returns the number of unslept seconds 'cus a signal may wake you from slumber and it's a way to see if that might have taken place...
12:10 mtj_ joined 12:12 xenoterracide joined 12:13 bloonix joined
dalek kudo/nom: ec890db | (Elizabeth Mattijsen)++ | src/core/Set.pm:
Make Set work according to spec, without using typed hashes :-)
12:14
ast: 1d1e315 | (Elizabeth Mattijsen)++ | S0 (4 files):
Fudges / unfudges while working on Set
nwc10 it's not clear to me, for the common case, whether it's more useful for sleep to actually sleep (and loop to restart), or to give up on a signal 12:18
also, looks like it is more work to return "unslept time" for sub-second sleeps
12:23 jaldhar joined
colomon woah, lizmat++ 12:26
lizmat colomon o/ 12:27
colomon \o
lizmat not sure if I can use the same approach for bags yet
colomon you'd have to make a second hash in the Bag, I think. 12:28
lizmat or use pairs as values
colomon yeah, that would work too
KeySet first?
lizmat doing that now, but alas: 12:29
ok 3 - Default value is false
Segmentation fault: 11
nwc10 yay. a Rakudobug? 12:31
lizmat $ perl6 -e 'say KeySet.new( <a b c>)<a>'
Segmentation fault: 11
only in my local copy, though :-)
found it, I think 12:32
12:33 mtk joined 12:41 benabik joined 12:48 PacoAir joined 12:49 mtj_ left 12:58 ajr joined, ajr is now known as Guest2761 12:59 Guest2761 is now known as ajr_
dalek kudo/nom: 2af0f88 | (Elizabeth Mattijsen)++ | src/core/ (2 files):
Remove some unneeded (double) stubs
13:07
13:08 kbaker joined 13:15 salv0 left 13:22 lowpro30 joined
moritz fwiw I have the impression that setting compilation time slowed down in the past weeks 13:24
from 70s to 115s or so
masak that's... significant. 13:25
masak pictures something that would track that over time, along with building every commit and running the spectests
donaldh it got bigger.
FROGGS masak: I see that too infront of my inner eye 13:26
lizmat $ wc -l src/gen/CORE.setting
16147 src/gen/CORE.setting
FROGGS masak: travis could do that fwiw
~3k loc more than in april or so
masak what's the percentual increase? 13:27
13:28 not_gerd joined
moritz r: say 3 / 16 * 100 13:28
camelia rakudo 2af0f8: OUTPUT«18.75␤»
FROGGS nah, if you add an infix it is one line more compared to, say, 1s more stage parse
benabik FROGGS: I think travis limits the time of a job, it seems unlikely you couple compile Rakudo and run spec tests.
moritz r: say 115/70 * 100
camelia rakudo 2af0f8: OUTPUT«164.285714␤»
FROGGS benabik: I'm not talking about spectests
but one could see the parse time
benabik: it already builds parrot, and this takes its time too 13:29
13:29 lowpro30_ joined
benabik FROGGS: It also times out on Parrot tests on a regular basis, so... 13:32
13:33 lowpro30 left 13:34 zakame left
FROGGS :/ 13:36
gah, we just build moarvm+nqp+rakudo in 20s then, and we are fine -.-
ahh, plus spectest in < 1minute 13:37
== WORLD DOMINATION BEFORE CHRISTMAS \o/
masak s/CHRISTMAS/BREAKFAST/
FROGGS *g* 13:38
masak: you are Brain then?
masak I am *a* brain, if that's what you mean.
FROGGS ohh, I was thinking my role more as Pinky
masak in other news, it should of course be called "body transplant", not "brain transplant".
FROGGS bbl 13:40
13:40 FROGGS left 13:44 btyler joined
donaldh in perlcabal.org/syn/S32/IO.html#IO%3A%3APipe does the redirection spec :err<Str> mean readirect to file? 13:45
PerlJam donaldh: as opposed to ... ? 13:46
13:46 benabik left
PerlJam donaldh: writing to the string? 13:46
13:47 skids joined
donaldh a named thing? 13:47
so pathname then? 13:49
and for IO::Pipe.from what should happen to the command's stdin ? 13:51
13:51 benabik joined 13:52 sorear joined, kbaker left 13:59 kaare_ joined
dalek ast: 2df4c4a | (Elizabeth Mattijsen)++ | S02-types/ (2 files):
Fudges while work continues on Key|KeySet
13:59
kudo/nom: 8bfb3c7 | (Elizabeth Mattijsen)++ | src/core/KeySet.pm:
Make KeySet a Set, and make it work according to spec
14:01
lizmat 1 file changed, 30 insertions(+), 56 deletions(-) # in my work to reduce Kloc in CORE.setting
cycling and dinner&
colomon has no memory of writing those tests. :( 14:03
14:03 thou joined 14:06 bluescreen10 joined 14:08 logie joined
colomon apparently wrote Set and Bag .ACCEPTS for Niecza, too. 14:08
14:12 kbaker joined
not_gerd this is how I'd factor sleep(): gist.github.com/gerdr/6437734 14:29
thoughts?
14:32 ajr_ left, pernatiy joined, ajr joined 14:33 kaleem left, ajr is now known as Guest84187
diakopter not_gerd: ww? 14:34
not_gerd diakopter: see backlog 14:35
it would change NQP semantics, ie it's now MoarVM specific
diakopter ok, like, all 30 miles of backlog? :) 14:36
not_gerd discussion begins at irclog.perlgeek.de/perl6/2013-09-04#i_7540766 14:37
JimmyZ not_gerd: rakudo doesn't need return sleep time
14:38 Guest84187 left
JimmyZ and it needs float args for sleep 14:40
diakopter nqp: class Foo {}; BEGIN { Foo.WHO<@s> := nqp::list_i(4,5,6); }; say(@Foo::s.WHAT) 14:44
camelia nqp: OUTPUT«Can only use get_what on a SixModelObject␤current instr.: '' pc 113 ((file unknown):163223069) (/tmp/AXk_qgAAab:1)␤»
diakopter jnthn: npq::list_i() returns a non-6model pmcia?
not_gerd JimmyZ: just because the user-facing interface wants floats doesn't mean it makes sense for the low-level API to do so
14:44 FROGGS joined
FROGGS o/ 14:45
JimmyZ addded a ceil_n in top level inc indirect goto :P 14:48
moritz nqp: nqp::list_i().WHAT 14:49
camelia nqp: OUTPUT«Can only use get_what on a SixModelObject␤current instr.: '' pc 43 ((file unknown):162079872) (/tmp/X33hIl1Kjh:1)␤»
moritz diakopter: looks like it
jnthn diakopter: On Parrot, yes
diakopter: On JVM and Moar, everything is a 6mode obj
diakopter k 14:50
can list_i be serialized by parrot?
14:55 jaldhar left
slava jnthn: in the future (once rakudo, jvm and moar are all ready to go) which will be the recommended vm for running system scripts (not long lived code) 14:55
diakopter sh
jnap I imagine moarvm is aimed at fast startup 14:56
FROGGS slava: probably the one that fits your needs best
slava FROGGS: I am not sure of the various strengths between jvm/rakudo/moarvm
FROGGS if, for example moarvm would not run on your os, but the jvm, then the choice gets simpler 14:57
jnap slava: I mostly just lurk here, but my understanding is that the jvm version is aimed at people that need to use the jvm because work dictates it, or because the want the potential java interoperability
jnthn diakopter: yes
diakopter slava: rakudo is the name of the perl 6 implementation, not a backend
slava ahh 14:58
then parrot/jvm/mvm :D
FROGGS slava: we can't really talk about it until rakudo runs on moarvm
slava I see, fair enough
thank you. :)
jnthn slavka: Rakudo on JVM will likely always start up slowly, so for short-running things I expect MoarVM will win. :)
jnap whereas moarvm is a special purpose vm aimed to just your Perl6, and is aimed to be fast startup and similar to the current perl cli, or at least that is my understanding
jnthn um, slava :)
FROGGS but we expect it to be awesome fwiw *g*
diakopter irrationally
slava haha
jnthn yay, hometime... 14:59
FROGGS \o/
jnthn goes to see how late the trains are running today
bbl &
nwc10 optimist on the "today" part?
FROGGS hehe 15:00
15:05 thou left 15:06 thou joined 15:16 JimmyZ_ joined
Util r: my $a = 1; my $b = 2; my $c = 3; ( $a, $b, $c ) .= rotate; say $a, $b, $c; 15:20
camelia rakudo 8bfb3c: OUTPUT«No such method 'rotate' for invocant of type 'Parcel'␤ in method dispatch:<.=> at src/gen/CORE.setting:1152␤ in block at /tmp/X5VIP_BnX4:1␤␤»
Util r: my $a = 1; my $b = 2; my $c = 3; ( $a, $b ) .= reverse; say $a, $b, $c; 15:23
camelia rakudo 8bfb3c: OUTPUT«213␤»
Util If .reverse is valid for Parcel, shouldn't .rotate also be legal?
TimToady presumably 15:29
Util TimToady: Thanks! I will try a LHF implementation. 15:31
15:31 TimK1 joined
perigrin .fold .spindle .mutilate 15:44
15:45 dmol left 15:49 segomos_ is now known as segomos, segomos left, segomos joined, zakharyas left 15:52 segomos is now known as _2short, _2short is now known as segomos 16:00 JimmyZ_ left 16:03 crab2313_ joined 16:07 not_gerd left 16:15 kaleem joined 16:19 fhelmberger left 16:34 slava joined, kaleem left 16:35 kaleem joined 16:36 dmol joined 16:38 spider-mario left 16:44 Celelibi joined
dalek p/donaldh-sockets: 66c9113 | (Donald Hunter)++ | src/vm/jvm/ (6 files):
Added server socket and process pipe to IO.
16:48
p/donaldh-sockets: 9636fe9 | (Donald Hunter)++ | / (4 files):
Add nqp::openpipe tests (JVM only)
16:49 locsmif joined 16:56 eternaleye joined 17:02 eternaleye left 17:04 eternaleye joined 17:05 pmurias joined
pmurias jnthn: the cstack reg is a pmc right? and we assing a integer to it? 17:06
diakopter cstack stands for cursorstack
jnthn We assing cursors (other PMCs) to it.
uh, assign 17:07
FROGGS do we say assing now?
ahh
diakopter assing
jnthn ...damn, I was like, "lol, assing"...then typed it :/
17:07 isBEKaml joined
FROGGS Python does assing :P 17:07
pmurias heh 17:08
jnthn: github.com/perl6/nqp/blob/master/s....nqp#L1205
jnthn Oh...if you mean like
assign cstack, 42
Or whatever
It's setting the height of it
diakopter it's a parrot trick
jnthn That is, it's nqp::setelems
We use it to chop the top off
On JVM the thing is actually called setelems.
On Moar too...I hope :P 17:09
17:09 kbaker left
pmurias on Moar it's assing cstack, 42 ;) 17:09
jnthn That typo is becoming the butt of many jokes...
diakopter on Moar it's SeTeLeMs[[[c-s-t-a-c-k, FORTY_TWO)))| 17:10
pmurias I king
sorry
isBEKaml diakopter: camelcased is bad enough as it is. Now you want HYPHENS too? :P 17:12
and bad parens
17:12 ssutch joined
diakopter yes :D 17:12
isBEKaml "fingers on fire, fingers on fire" - so said diakopter. 17:14
17:20 dakkar left 17:24 kaleem left 17:25 isBEKaml left 17:27 isBEKaml joined, isBEKaml left, isBEKaml joined 17:28 not_gerd joined 17:31 rindolf left 17:32 rindolf joined 17:41 sqirrel joined
TimK1 rn: sub f (@a) { @a }; say f 1 ... 10; # should be 1 2 3 4 5 6 7 8 9 10 17:44
camelia rakudo 8bfb3c, niecza v24-94-g1042054: OUTPUT«1 2 3 4 5 6 7 8 9 10␤»
TimK1 rn: sub f (Num @a) { @a }; say f 1 ... 10; # same thing, but with type in signature
camelia niecza v24-94-g1042054: OUTPUT«1 2 3 4 5 6 7 8 9 10␤»
..rakudo 8bfb3c: OUTPUT«Nominal type check failed for parameter '@a'; expected Positional but got List instead␤ in sub f at /tmp/rE76b6Mr4d:1␤ in block at /tmp/rE76b6Mr4d:1␤␤»
TimK1 sub f (Num @a) { @a }; say f [1 ... 10]; # same thing, except passing an Array 17:45
rn: sub f (Num @a) { @a }; say f [1 ... 10]; irc://irc.freenode.net:6667/# same thing, except passing an Array
camelia niecza v24-94-g1042054: OUTPUT«===SORRY!===␤␤Confused at /tmp/SkNWDK7xXh line 1:␤------> f (Num @a) { @a }; say f [1 ... 10]; irc⏏://irc.freenode.net:6667/# same thing, e␤␤Undeclared routine:␤ 'irc' used at line 1␤␤Parse failed␤␤»…
..rakudo 8bfb3c: OUTPUT«===SORRY!=== Error while compiling /tmp/nHVFulkM2Y␤Two terms in a row␤at /tmp/nHVFulkM2Y:1␤------> f (Num @a) { @a }; say f [1 ... 10]; irc⏏://irc.freenode.net:6667/# same thing, e␤ expecting any of:␤ argument list␤ …
TimK1 (I'll get it yet.)
rn: sub f (Num @a) { @a }; say f [1 ... 10]; irc://irc.freenode.net:6667/# same thing, except passing an Array
camelia niecza v24-94-g1042054: OUTPUT«===SORRY!===␤␤Confused at /tmp/QFGbnEAgEt line 1:␤------> f (Num @a) { @a }; say f [1 ... 10]; irc⏏://irc.freenode.net:6667/# same thing, e␤␤Undeclared routine:␤ 'irc' used at line 1␤␤Parse failed␤␤»…
..rakudo 8bfb3c: OUTPUT«===SORRY!=== Error while compiling /tmp/X09fhwxzoe␤Two terms in a row␤at /tmp/X09fhwxzoe:1␤------> f (Num @a) { @a }; say f [1 ... 10]; irc⏏://irc.freenode.net:6667/# same thing, e␤ expecting any of:␤ argument list␤ …
TimK1 rn: sub f (Num @a) { @a }; say f [1 ... 10]; # same thing, except passing an Array 17:46
camelia rakudo 8bfb3c: OUTPUT«Nominal type check failed for parameter '@a'; expected Positional but got Array instead␤ in sub f at /tmp/l7pZg_NrYr:1␤ in block at /tmp/l7pZg_NrYr:1␤␤»
..niecza v24-94-g1042054: OUTPUT«1 2 3 4 5 6 7 8 9 10␤»
TimK1 (The travails of copy-and-paste programming.)
Both List and Array do Positional, so I believe Niecza is right. (Don't understand what any of it has to do with the type declaration of the formal param.)
17:47 kbaker joined 17:50 isBEKaml left, panchiniak joined
TimK1 files bug 17:59
moritz TimK1: it's already known 18:01
n: sub f(Str @a) { say @a }; f [1, 2, 3]
camelia niecza v24-94-g1042054: OUTPUT«1 2 3␤»
moritz niecza simply doesn't check the type of @a 18:02
18:02 abnorman joined
moritz and rakudo is right in rejecting it, but gives a bad error message 18:02
TimK1 That explains why Niecza accepts it. 18:03
Why should Rakudo reject it, however?
timotimo r: sub f(Int @a) { say @a }; my Int @foo = 1 ... 10; f(@foo);
camelia rakudo 8bfb3c: OUTPUT«1 2 3 4 5 6 7 8 9 10␤»
TimK1 I see.
timotimo @a could be lazy, how do you infer that it's actually an Int @a without making it eager immediately, *or* even worse exploding after partially computing the thing
i once had a suggested patch that would explode at compile time when you had code like sub foo (Int *@a), i.e. a typed slurpy, because those are even worse 18:04
but it wasn't accepted
18:06 abnorman left
TimK1 Make sense, but a little confusing at first. Thanks for the explanation. I'm trying to figure out what the best practice should be, then. Sounds like use static or dynamic typing for everything (the two extremes, including for array literals) should be the two practices that work reliably. Might be some effort in figuring out whether there's any practical middle-ground. 18:08
timotimo the middle ground is what we're hoping to make practical with our "gradual typing" 18:15
moritz TimK1: if you want fully static typing, Perl 6 isn't the language you're looking for
18:16 lowpro30_ left
moritz finding a suitable middle ground is just a matter of experience and preference 18:18
timotimo i'm sometimes a bit sad about how hard it is to statically optimize such things
sub foo(Int @a) { my Int $b = @a[0] }; <- is it safe to elide the type check for the assingment to $b? no, because @a could have all kinds of roles attached to it, or be a subclass of List that does weird things :( 18:19
dalek ecs: fcd17ad | larry++ | S29-functions.pod:
split sleep() into three functions

Specify sleep in terms of Reals, Durations and Instants, so that Int, Rat and FatRat types are also allowed as inputs. Use sleep() now when you don't care how long it really sleeps, and you may use sleep-timer() to convey the intent to measure remaining time. Use sleep-till() to sleep to a particular Instant without cumulative clock drift.
TimK1 moritz: I don't want static typing. (I actually appreciate dynamic typing.) Experience and preference: That's one reason I've been experimenting with P6.
moritz TimK1: ok, great :-) 18:20
TimK1 timotimo: The power of Perl in action? :)
timotimo yeah :| 18:21
i can understand why nqp is considered "more optimizable" ... there's list_i, list_n, list_s and list. much easier 18:25
18:25 sftp joined
timotimo (funny how i only just started an optimizer for nqp, there was none before at all) 18:26
18:28 crab2313 left 18:29 crab2313_ left 18:32 TimK1 left 18:33 iSlug left, daxim left
arnsholt timotimo: Oh, speaking of the optimiser, you forgot to add the command line flag to turn it off =) 18:33
timotimo oopsie daisies 18:34
arnsholt --optimize=off didn't seem to work for me the other day, at any rate =)
18:34 SamuraiJack__ left 18:41 rindolf left 18:43 Rotwang joined, dmol left 18:47 agre left 18:48 agre joined 18:54 jnap left 18:58 abnorman joined
slava arnsholt: why would you NOT want to optimize stuff? :P 19:03
jnthn slava: If you suspect there's a bug in the optimizer and want to make sure that ain't the problem :) 19:04
diakopter also, if you want to study performance characteristics of particular code 19:07
19:08 ajr joined, ajr is now known as Guest18525 19:09 Guest18525 is now known as ajr_
dalek ecs: 7e9c2b6 | larry++ | S29-functions.pod:
merge interval and sleep-till to one function

The sleep-till function now returns a boolean to make it easy to do cycle-skipping like the old interval function does. The old interval function is deprecated for being a bit too special-purpose and maintaining implicit state. Better to make the user keep the timebase state explicit, I feel.
19:10
TimToady for now ... * -> $tick { sleep-till($tick) and do_stuff() } # very succinct now 19:17
19:17 domidumont left
lizmat puts it on her list of things to fix 19:18
slava :( 19:19
19:20 jnap joined 19:21 REPLeffect joined
TimToady lizmat++ 19:21
arnsholt jnthn: Passing an NQP array to an op that's specified as P in that argument is the right thing to do, no? 19:28
19:29 sqirrel left
jnthn arnsholt: Should be 19:31
19:32 cognominal joined
arnsholt Probably not a wrong op spec, then 19:32
It's just so weird that the get keyed VTABLE returns a completely spurious pointer 19:33
Oh, which PMC is implementing lists these days? Are they still RPAs, or has everything been moved over to something 6model based?
19:33 iSlug joined
moritz nqp: say(pir::type__PS(nqp::list())) 19:37
camelia nqp: OUTPUT«error:imcc:syntax error, unexpected PREG, expecting '(' ('$P5005')␤ in file '(file unknown)' line 41␤␤␤»
moritz nqp: say(pir::type__SP(nqp::list()))
camelia nqp: OUTPUT«error:imcc:syntax error, unexpected SREG, expecting '(' ('$S5001')␤ in file '(file unknown)' line 165723932␤␤␤»
19:38 TimToady left
moritz nqp: say(pir::type_str__SP(nqp::list())) 19:38
camelia nqp: OUTPUT«error:imcc:syntax error, unexpected SREG, expecting '(' ('$S5001')␤ in file '(file unknown)' line 158994204␤␤␤»
19:38 REPLeffect left
moritz nqp: my $a := nqp::list(); say($a.HOW.name($a)) 19:39
camelia nqp: OUTPUT«Can only use get_how on a SixModelObject␤current instr.: '' pc 53 ((file unknown):44) (/tmp/8pINiNpg_j:1)␤»
arnsholt just spotted something potentially important
moritz arnsholt: seems it's not a 6model object at least 19:40
arnsholt I never call the native_call_setup op in the test file...
moritz nqp: say(nqp::list().typename)
camelia nqp: OUTPUT«Method 'typename' not found for invocant of class 'ResizablePMCArray'␤current instr.: '' pc 49 ((file unknown):40) (/tmp/g1qxm4K5I4:1)␤»
moritz ok, still RPA :-)
arnsholt Which means that I'm kind of surprised class Call is repr('NativeCall') works at all 19:41
jnthn: Should "class Foo is repr('BogusREPR') { ... }" explode in NQP?
jnthn Probably. 19:42
19:42 diakopter joined
jnthn C:\consulting\rakudo\nqp>nqp.bat -e "class Foo is repr('Blah') { }" 19:43
java.lang.RuntimeException: No REPR Blah
arnsholt Wut? "KnowHOWREPR cannot box other types"
jnthn Does on nqp-jvm.
arnsholt Doesn't on my Parrot REPL =)
19:43 anocelot joined
jnthn And Moar is equally unhappy 19:43
arnsholt nqp: class Foo is repr('Blah') { }
camelia nqp: ( no output )
jnthn So, Parrot is the odd one out. My fault, of course... :)
FROGGS jnthn: it is always your fault :o) 19:44
err, :P
jnthn FROGGS: I noticed :P
19:44 TimToady joined
ingy timotimo: ping 19:46
arnsholt jnthn: What's ""KnowHOWREPR cannot box other types" mean? 19:47
jnthn arnsholt: On Parrot, probably that you typo'd a REPR name and KnowHOWREPR is number 0... :)
arnsholt Hmm 19:48
So what I'd expect to happen -before- I added the init op... 19:49
jnthn arnsholt: Remember that class Foo { } and similar happens at compile itme 19:50
arnsholt: So if you're doing an init op as a normal nqp::op in the mainline, even if it's before the class decl, it'll be too late. 19:51
(Use BEGIN if so)
arnsholt Excellent point!
YAAAAAY! 19:52
It's alive!
timotimo ingy: pong 19:53
arnsholt I'm very thankful this didn't turn out to be some kind of deep and inscrutable bug. Just my own mess up ^_^
ingy timotimo: can I ask you some p6 module questions?
rakudo doesn't have panda, just R*, yes? 19:54
19:55 btyler left 19:56 REPLeffect joined
FROGGS rakudo is just the compiler 19:57
no modules (except Test.pm perhaps)
moritz and lib.pm :-)
ingy updates wiki.perl6.org/Create%20and%20Distr...%20Modules 19:58
19:58 pmurias left
FROGGS true :o) 19:59
ingy ok so to test yaml-pm6 I'm pointing PERL6LIB at testml-pm6 and running prove … 20:06
timotimo: seem right?
PerlJam ingy: "prove -e perl6", right? 20:07
timotimo ingy: i'd suggest you use "ufo"
call ufo to make a makefile, run "make test" and done :) 20:08
ingy PerlJam: yes 20:09
timotimo: so ufo is still in the picture? ok… 20:10
moritz for development, yes
PerlJam didn't even know ufo still worked
(I haven't used it in a long while)
dalek kudo/nom: 78ccd95 | (Elizabeth Mattijsen)++ | src/core/ (2 files):
Cleanup of .gist/.perl for KeySet|Set
20:11
ingy is there a repo that has all the modules as git submodules? 20:12
dalek ast: dc2594c | (Elizabeth Mattijsen)++ | S02-types/keyset.t:
Unfudge test previously fudges when .gist and .perl failed on KeySet
ingy I can see that R* is built that way 20:13
it still has the .gitmodules in the download 20:14
moritz I think that's an oversight
jnthn lizmat++ # improving stuff faster than I can keep up with 20:15
lizmat jnthn: I just realized I didn't need typed hashes after all
now on to Bag/KeyBag :-)
20:19 locsmif left
timotimo cool 20:19
timotimo will now watch moritz' talk :) 20:20
20:22 telex left
dalek rl6-roast-data: 25b2d34 | coke++ | / (5 files):
today (automated commit)
20:23
20:23 hummeleBop left
masak timk's comment at the end of rt.perl.org/rt3/Ticket/Display.html?id=66892 is easy to explain; the expression `$n == any(3..5)` is missing a `so` -- without it, the type of the expression isn't Bool, but Junction. 20:24
moritz still the error message is LTA 20:26
masak *nod*
[Coke] colomon++ niecza's passing percentage went up today 20:28
colomon \o/ 20:29
20:29 telex joined
lizmat colomon: in Bag.pm, why are we making this a KeyBag: "method pick($count = 1) { self.KeyBag.pick($count) }" 20:32
colomon lizmat: pick needs to have something which can be modified to work on (so that things picked get removed) 20:33
though something seems a touch wonky about this usage... 20:34
TimToady except in the special case of $count == 1, where you can just do a roll instead
colomon sure, that could be made more efficient
20:34 kaare_ left
lizmat r: my $a=set(<a b c>); say $a.pick(2); say $a # no special stuff on sets, still it works ? 20:35
colomon in general it could be more efficient, because KeyBag.pick itself makes a duplicate KeyBag to work on.
camelia rakudo 8bfb3c: OUTPUT«a b␤set(a, b, c)␤»
lizmat this is how Set.pm implements pick: method pick($count = 1) { %!elems.values.pick($count) } 20:36
colomon lizmat: Set / KeySet just make a List of their keys and call pick on that
ingy github.com/perl6/modules seems out of date and maybe a good candidate to be a submodule umbrella
colomon lizmat: you can't do that on Bag / KeyBag because the list could be ludicrously long
because rolls / picks have to consider the counts in the bag 20:37
lizmat gotch
a
timotimo no gasps and cheers during your talk so far, moritz :( 20:38
TimToady nr: (^100000000).pick(5).say
camelia rakudo 8bfb3c: OUTPUT«76465851 84035743 12790234 8519591 70628155␤»
..niecza v24-94-g1042054: OUTPUT«63474057 10458857 57336877 14183682 5757114␤»
TimToady nr: (^5).pick(10).say 20:39
camelia niecza v24-94-g1042054: OUTPUT«4 2 1 0 3␤»
..rakudo 8bfb3c: OUTPUT«3 2 0 4 1␤»
TimToady wonders where the crossover point is...
lizmat so there is no persistence inside the object for .pick
TimToady how could there be, if the object happens to be immutable? 20:40
lizmat
.oO( inside out objects )
TimToady and even if not, it would not be threadsafe
20:42 locsmif joined
ingy is github.com/masak/ufo the canonical home of ufo? 20:43
lizmat shelves some ideas for now 20:44
timotimo yes, it is
20:44 sqirrel joined
ingy seems weird to not be under perl6/ 20:44
ingy suspends all disbelief 20:45
and exterminates rational thought 20:46
(Naked Lunch)++
FROGGS ingy++ 20:49
*g*
21:03 bruges_ joined 21:04 zwut00 joined
ingy it seems that moving a rakudo/ repo directory after a `make install` into ./install/ breaks the install 21:05
probably known. I'll just reinstall and see what happens 21:06
jnthn ingy: Your install was inside the rakudo repo?
ingy jnthn: yeah, the deafult 21:08
*default
timotimo r: for 1, 10, 100 { say "trying to do the thing $_"; die "retry please" unless (False, False, False, False, True).pick; CATCH { when X::AdHoc { retry } } };
camelia rakudo 8bfb3c: OUTPUT«===SORRY!=== Error while compiling /tmp/zZ3j_275nR␤Undeclared routine:␤ retry used at line 1. Did you mean '&return'?␤␤»
timotimo :(
there's some statement like that, right? to start a loop body over from the beginning?
jnthn redo, though not sure how it works out inside a CATCH :) 21:09
ingy error while loading shared libraries: libparrot.so.5.5.0
timotimo r: for 1, 10, 100 { say "trying to do the thing $_"; die "retry please" unless (False, False, False, False, True).pick; CATCH { when X::AdHoc { redo } } };
camelia rakudo 8bfb3c: OUTPUT«trying to do the thing 1␤trying to do the thing 1␤trying to do the thing 1␤trying to do the thing 1␤trying to do the thing 10␤trying to do the thing 10␤trying to do the thing 100␤»
timotimo cool beans!
ingy jnthn: do I need to start completely from scratch? 21:10
21:11 skids left
ingy does 21:13
21:17 dmol joined, dayangkun joined
ingy git hub repos jnthn -r | git hub clone - 21:17
ingy clones all of jnthn in one command :P 21:18
diakopter except the ones you can't see ;)
ingy o_0
jnthn ingy: Yeah, with a --prefix or so that's outside of the repo 21:19
FROGGS yeah, there are hidden repo's of Python 4 and C\\\
timotimo m)
jnthn Shh! 21:21
timotimo moritz: in your save-state/save-config example slide you put a call to save-config before its definition! =o
masak jnthn: I swear, I didn't tell FROGGS about Python 4! I definitely didn't mention C++22 either. 21:22
FROGGS ohh, sekrit repo was sekrit? 21:23
jnthn masak: So long as you don't leak COBOL-2020 it's all good
masak oh, I would never mention (or confirm the existence) of one of the super-sekkrit projects. that goes without saying. 21:24
s/\) of/of) /
FROGGS masak: should we register python4.org and just print in font-size 250 *LOL* after a few seconds? 21:28
(with links to project euler of course :o)
diakopter :/ 21:29
FROGGS uhh, downgraded the kernel of one of our important servers at work... the nic was down for 200s, I thought I killed it :/ 21:30
timotimo :D 21:31
was kind of hard to understand the questions 21:34
jnthn guesses the video of his async one didn't land yet... 21:35
timotimo i would remember the ghasps and cheers :) 21:37
masak FROGGS: though I appreciate the thought, I do believe we are above that. :) 21:40
FROGGS: our job isn't to taunt happy fun ball, it's to make things more awesome by doing the seemingly impossible. and then blogging about it. 21:41
FROGGS: things like v5. :) FROGGS++
FROGGS *g*
timotimo \o/
let's not be childish asshats, let's be awesome space robots instead!
FROGGS masak: a-pro-pos v5, do I get your +1 for making nqp::pack and nqp::unpack? 21:42
and btw, I do want to have a way to tell sprintf/pack/unpack how big INTSIZE is for example... 21:43
masak FROGGS: how does it being nqp-level rhyme with being tied to Buf?
FROGGS like a dynamic variable %*THINGSIZES or so
masak FROGGS: yes, let's get together (online) and talk about INTSIZE. need to strike a balance between nice defaults and sane configuration... 21:44
FROGGS masak: like with sprintf and Int I guess, having an argument handler
lizmat r: my %e; (%e{$_.WHICH} //= ($_ => 0)).value++ for <a b b c c c>; say %e.perl # scoping issue?
camelia rakudo 78ccd9: OUTPUT«("Str|a" => Any => 1, "Str|b" => Any => 2, "Str|c" => Any => 3).hash␤»
masak our job there is more to be compatible than to be innovative, if you ask me.
lizmat why are the pairs all Any?
r: my %e; for <a b b c c c> -> $k { (%e{$k.WHICH} //= ($k => 0)).value++}; say %e.perl # this seems to work 21:46
camelia rakudo 78ccd9: OUTPUT«("Str|a" => "a" => 1, "Str|b" => "b" => 2, "Str|c" => "c" => 3).hash␤»
lizmat feels like a rakudobug to me
FROGGS r: my %e; -> $_ { (%e{$_.WHICH} //= ($_ => 0)).value++ } for <a b b c c c>; say %e.perl # scoping issue?
camelia rakudo 78ccd9: OUTPUT«("Str|a" => "a" => 1, "Str|b" => "b" => 2, "Str|c" => "c" => 3).hash␤» 21:47
masak 'night, #perl6
FROGGS gnight masak
jnthn lizmat: I'm tired, but yes, looks like...
lizmat will use FROGGS++ quick fix
gnight masak
and report as rakudobug 21:48
21:49 sqirrel left
lizmat #119609 created 21:51
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...?id=119609
lizmat tadzik++ 21:52
FROGGS lizmat++ and tadzik++
donaldh jnthn: is there any way to call IO::Spec.rel2abs from ModuleLoader.search_path, once the setting has loaded? 21:55
jnthn donaldh: Well, I guess %settings cache hash has the UNIT of setting handy... :) 21:56
See load_setting
lizmat $ perl6 -e 'my $h = bag(<a b c b c c>); say bag($h).perl'
bag(bag("a","b","b","c","c","c"))
hehe
jnthn lizmat++ # bags of improvements
'night, #perl6
FROGGS gnight jnthn
lizmat gnight, jnthn
donaldh jnthn: thanks for the pointer. 21:58
'night jnthn
21:59 dmol left, PacoAir left
lizmat TimToady: wonder whether it would be nice to have a left-autoquoting version of xx 22:00
22:00 not_gerd left, Fatalnix joined
lizmat x> ? 22:00
a x> 3 would be the same as "a" xx 3
Fatalnix So I just decided to look at Perl 6 in depth, opened up the pdf book and OMG WAT HAPPENED is my first response.
timotimo what can we help you with today? 22:01
lizmat and the pdf book is a bit outdated, afaik
22:01 sqirrel joined
Fatalnix looked it, I think it was 2012 22:01
diakopter Fatalnix: depending on your meaning of "in depth", I'd avoid the pdf book and instead read through the rosettacode entries first 22:02
Fatalnix resettacode..
diakopter (example implementations of common things, where you can compare them to the same effects in other languages) 22:03
timotimo agreed, rosettacode is excellent
diakopter rosettacode.org/wiki/Category:Perl_6
click on a bunch of those
you'll get the hang of Perl 6 by example 22:04
Fatalnix hmm
diakopter has a sneaking suspicion a decent chunk of those will make it into the new progperl6
22:05 Rotwang left
tadzik hah, synopsebot was a good karma investment :) 22:05
Fatalnix I'm just a little scared because when I looked I saw %foo being accessed like %foo instead of $foo, and $bar->foo becoming $bar.foo and obviously not being the same thing
:D
22:06 Vlavv joined
timotimo :) 22:06
Fatalnix Hmm. How mature is Perl6 anyways
for production use
timotimo "sigil invariance" (the former thing) is quite clear IMO. $bar->foo turning into $bar.foo is, in my opinion, also nicer to look at and write
diakopter Fatalnix: depends on your product
tadzik 13 year olds are pretty immature, if you ask me 22:07
but when I was 13 I probably thought different than that :)
Fatalnix heh.
well I'm 25 years old but I like being immature.
It's the only way I know to stay young :D
tadzik high five
diakopter fist bump 22:08
timotimo five to the two!
Fatalnix lol
oh god Perl6 has class and method and enum
timotimo i think you mean "oh good" :)
Fatalnix lol
diakopter Fatalnix: the question is.. what doesn't it have? 22:09
Fatalnix not bad. I've been getting used to Moose in Perl5 really
geekosaur Moose is derived from the original Perl6 MOP proposal 22:10
22:10 FROGGS left
Fatalnix and it looks like 6 still has the default variable 22:10
geekosaur (which has moved on a bit, so now they've diverged some)
diakopter .ask TimToady are the links on the Perl_6 rc page supposed to link to the p6 section anchors?
yoleaux diakopter: I'll pass your message to TimToady.
22:10 sqirrel left
geekosaur in fact the original version of Moose was the Perl5-based prototype for the original MOP 22:10
22:17 bluescreen10 left
Fatalnix what's the resemblance of say class foo { has bar $.baz, in terms of $.baz. why the period? 22:17
timotimo it's kind of like "$object.baz" 22:18
Fatalnix okay thats what I thought 22:19
diakopter the period means it can be accessed with a period (publicly)
Fatalnix so $. is kinda like using $self
timotimo has $!foo is private access, it kind of looks like you have to go through a door to get to the data
Fatalnix ohh 22:20
donaldh omg, IO-Socket-INET tests passing on JVM.
Fatalnix wait, JVM, WHAT?
timotimo oooooh yeah!
will you push it? :)
diakopter Fatalnix: rakudo perl 6 is being ported to the JVM and others
Fatalnix are you telling me that I will be able to make my own Minecraft mods in Perl now?
donaldh bigger timeouts required for spawning server and client right enough
Fatalnix hmm 22:21
donaldh omg, only 3% battery left
timotimo oh god
push quickly
diakopter AAAAAAAAAAAAAAAAAAAAAAAAAA
timotimo before your computer implodes
Fatalnix mash that A button
donaldh some cleanup and this might be ready to land 22:22
timotimo lovely :)
donaldh has been golfing the IO-Socket-INET test suite all evening.
Fatalnix maybe this means we'll get a Perlonxen I dreamed of like erlangonxen.org
because Perl on bare vm metal would be insane.
22:22 PZt left
Fatalnix gotta chop up stuff for dinnae 22:22
diakopter Fatalnix: heh.
donaldh 'night #perl6 22:23
timotimo 'night donaldherooftheday
donaldh :D
22:23 donaldh left, REPLeffect left
timotimo Fatalnix: with rakudo on the jvm you can currently play with our parallelism mechanisms 22:23
promises, async blocks, channels and KeyReducer, as well as a bit of async IO 22:24
22:24 cogno joined
diakopter Fatalnix: thanks for the link; I hadn't seen that. noted. 22:24
22:25 PZt joined 22:28 Mouq joined 22:30 agre left 22:35 cogno left
Fatalnix hmm. Honestly, I hate the JVM, but itl be super useful for MC mods :D 22:35
because I absolutely hate Java 22:36
diakopter: oh you mean erlangonxen? yeah. I saw that and I was like, why can't I have this except for Perl?! because I'm going to be controlling my octocopter with a parallel api
postimg.org/image/rnmi5zvn7/full/ 22:38
due to be 3D printed.
22:38 xenoterracide left
dalek kudo/nom: c3d6b59 | (Elizabeth Mattijsen)++ | src/core/Set.pm:
Style nit
22:40
kudo/nom: a256161 | (Elizabeth Mattijsen)++ | src/core/Bag.pm:
Rework of Bag, allowing bags of bags
22:40 skids joined
dalek ast: 3eae565 | (Elizabeth Mattijsen)++ | S02-types/bag.t:
Temporary fudges while work is being done on Bag
22:41
lizmat and on that thought, I'm going to hit the sack
gnight #perl6!
timotimo gnite :)
22:46 EvanTeitelman joined 22:52 cogno joined 22:56 cogno left 23:05 locsmif left 23:12 locsmif joined, locsmif left, locsmif joined 23:13 panchiniak left 23:15 bruges_ left, pernatiy left 23:16 clkao joined 23:17 bruges joined 23:18 markov joined 23:19 locsmif left 23:21 locsmif joined, locsmif left, locsmif joined 23:30 markov left 23:34 zwut00 left 23:38 thou left 23:45 markov joined 23:50 markov left 23:52 jnap left