»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg p6eval perl6: ... | irclog: irc.pugscode.org/ | UTF-8 is our friend! | Rakudo Star Released!
Set by moritz_ on 1 September 2010.
00:02 Psyche^ joined 00:03 masak left 00:07 Patterner left, Psyche^ is now known as Patterner
dalek ok: ed5a622 | chromatic++ | src/preface.pod:
Edited the preface; minor changes.
00:07
ok: ed1c156 | chromatic++ | src/operators.pod:
Edited operators chapter.
00:10 Italian_Plumber1 joined 00:11 HarryS joined 00:12 Italian_Plumber left 00:17 HarryS left 00:21 awwaiid joined
lue afk 00:26
00:36 dream joined 00:38 araujo left 00:41 HarryS joined 00:43 bluescreen joined, bluescreen is now known as Guest31804 00:44 meppl left 00:47 HarryS left, Sanitoeter joined
TimToady j 00:49
pmichaud: the lack of big Ints was also a recurring theme
00:49 masak joined
TimToady and binary data 00:52
and slices and matrices 00:53
and sets
awwaiid and tostadas 00:54
TimToady I'm allergic to those, so you can do 'em
oh, and state 00:55
though that's usually pretty easy to workaround, it sometimes requires you to name something that doesn't really need a name
awwaiid you're alergic to tostadas? My condolences. 00:57
TimToady lack of list associativity tended to force extra parens on Z and X, too
colomon phenny: tell smash "Ruined the server"? (Heh. In 1992 I once brought UMich's math dept's computer network to its knees doing distributed fractal calculations.) 00:58
phenny colomon: I'll pass that on when smash is around.
masak I should make those "features whose absence are felt" list more often.
s/list/lists/ 00:59
colomon masak++ 01:01
masak TimToady: we have Set. could you be more specific as to what's missing?
colomon Is Set actually up and running? 01:04
masak rakudo: say Set.new(1..5, 3..7).elems
p6eval rakudo dc9900: OUTPUT«7␤»
colomon rakudo: my $a = Set.new(1, 3, 6).perl
p6eval rakudo dc9900: ( no output )
colomon rakudo: my $a = Set.new(1, 3, 6); say $a.perl 01:05
p6eval rakudo dc9900: OUTPUT«Set.new(1, 3, 6)␤»
masak \o/
colomon sweet! I completely missed that one.
TimToady rakudo: my $a = Set.new(1, 3, 6); say $a{3}
p6eval rakudo dc9900: OUTPUT«get_pmc_keyed() not implemented in class 'Set'␤ in 'at_key' at line 27:CORE.setting␤ in 'Any::postcircumfix:<{ }>' at line 1694:CORE.setting␤ in main program body at line 1␤»
TimToady rakudo: my $a = Set.new(1, 3, 6); my $b = Set.new(3,6,9); say $a ∩ $b; 01:08
p6eval rakudo dc9900: OUTPUT«===SORRY!===␤Confused at line 22, near "say $a \u2229 $"␤»
TimToady rakudo: my $a = Set.new(1, 3, 6); my $b = Set.new(3,6,9); say $a (+) $b;
p6eval rakudo dc9900: OUTPUT«===SORRY!===␤Confused at line 22, near "say $a (+)"␤»
TimToady rakudo: my $a = Set.new(1, 3, 6); my $b = Set.new(3,6,9); say $a (|) $b; 01:09
p6eval rakudo dc9900: OUTPUT«Set()<0x60f4ed0>␤»
TimToady rakudo: my $a = Set.new(1, 3, 6); my $b = Set.new(3,6,9); say $a (&) $b;
p6eval rakudo dc9900: OUTPUT«Set()<0x5e01fc0>␤»
masak I put the Unicode variants in the Set.pm module, but I don't recall them ever working. 01:10
TimToady rakudo: use Set; my $a = Set.new(1, 3, 6); my $b = Set.new(3,6,9); say $a ∩ $b;
p6eval rakudo dc9900: OUTPUT«===SORRY!===␤Unable to find module 'Set' in the @*INC directories.␤(@*INC contains:␤ lib␤ /home/p6eval/.perl6/lib␤ /home/p6eval//p2/lib/parrot/2.7.0-devel/languages/perl6/lib␤ .)␤»
masak nono, it's already part of the core setting. 01:11
01:11 HarryS joined
masak sorry for the confusion. 01:11
TimToady and it's probably worth a set() composer
01:12 whiteknight left
TimToady funny that there are bag brackets but no set brackets 01:12
rakudo: my $bag ⟅1,2,2,2,3,4,5,5⟆; 01:13
p6eval rakudo dc9900: OUTPUT«===SORRY!===␤Confused at line 22, near "my $bag \u27c51"␤»
TimToady rakudo: my $bag = ⟅1,2,2,2,3,4,5,5⟆;
p6eval rakudo dc9900: OUTPUT«===SORRY!===␤Confused at line 22, near "my $bag = "␤»
masak seems I removed the Unicode variants because non-latin-1 doesn't belong in the setting: github.com/rakudo/rakudo/commit/e75...0199601a3d 01:14
01:17 HarryS left
TimToady rakudo: my $a = Set.new(1, 3, 6); my $b = Set.new(3,6,9); say $a (|) $b; # doesn't do anything in list context, should default to .keys 01:17
p6eval rakudo dc9900: OUTPUT«Set()<0x63026f0>␤»
TimToady rakudo: my $a = Set.new(1, 3, 6); my $b = Set.new(3,6,9); say ~($a (|) $b).keys; 01:18
p6eval rakudo dc9900: OUTPUT«1 3 6 9␤»
TimToady rakudo: my $a = Set.new(1, 3, 6); my $b = Set.new(3,6,9); say ~($a (&) $b).keys; 01:19
p6eval rakudo dc9900: OUTPUT«3 6␤»
TimToady rakudo: my $a = Set.new(1, 3, 6); my $b = Set.new(3,6,9); say ~($a (-) $b).keys;
p6eval rakudo dc9900: OUTPUT«1␤»
TimToady rakudo: my $a = Set.new(1, 3, 6); my $b = Set.new(3,6,9); say ~($a (/) $b).keys;
p6eval rakudo dc9900: OUTPUT«===SORRY!===␤Confused at line 22, near "say ~($a ("␤»
TimToady rakudo: my $a = Set.new(1, 3, 6); my $b = Set.new(3,6,9); say ~($a (^) $b).keys; 01:21
p6eval rakudo dc9900: OUTPUT«===SORRY!===␤Confused at line 22, near "say ~($a ("␤»
masak I can define (/) if you want.
TimToady wonders what symmetric difference is
masak it isn't in there.
but since I have (|) and (&), I guess we could have (^)
TimToady and what is the approved way to test for membership, if .{} doesn't work? 01:24
masak .exists($thingy) 01:25
I can add .{} too -- should it return a Bool?
TimToady it should return the value of the key-value pair :) 01:26
which for sets is boolean, but for bags is a number
as far as I recall, the only place where we break the Hash contract is that list context returns keys instead of pairs 01:27
masak ok.
TimToady not sure how that translates to bags though, unless its $key xx $value 01:28
masak seems fair.
TimToady $bag.pick(*) would then work fairly naturally to give you three red marbles and two white ones
er, .pick(5) 01:29
though that could be optimized I suspect
and a set listop could be quite handy 01:30
masak 'set'?
TimToady my %set := set 1,3,5;
01:30 drbean joined
masak I think some people on p6l will like that. 01:31
I think I might, too.
TimToady well, I would, I suspect
and being in the setting, the user can override it for other purposes
shadow it lexically, I mean
masak nod
01:41 HarryS joined, cdarroch left 01:44 araujo joined
masak araujo! \o/ 01:47
01:47 HarryS left
colomon phenny: tell tadzik If you switch ABC to git://github.com/colomon/ABC.git, it should pass all tests. :) 01:50
phenny colomon: I'll pass that on when tadzik is around.
lichtkind good night 02:02
masak 'night, lichtkind.
lichtkind :)
02:02 lichtkind left
araujo masak! 02:07
:)
masak \o/
02:10 Italian_Plumber1 left 02:11 HarryS joined
dalek kudo: d75c61d | masak++ | src/core/Set.pm:
[Set] implemented .symmetricdifference and (^)
02:14
02:17 guidjos joined, HarryS left 02:18 guidjos left 02:22 cjk101010 left
masak rakudo: say ([1, 3, 4] (^) [3, 4, 6]).keys.perl 02:30
p6eval rakudo dc9900: OUTPUT«===SORRY!===␤Unable to parse postcircumfix:sym<( )>, couldn't find final ')' at line 22␤»
masak ETOOSOON 02:31
02:39 petdance joined 02:41 HarryS joined 02:43 feiquet joined, Sanitoeter left
dalek kudo: 27d54dc | masak++ | src/core/Set.pm:
[Set] implemented postcircumfix:<{ }>
02:44
masak TimToady: I don't know how to make Set give its keys in list context. 02:46
but the other things should be in place now.
I can add the 'set' listop too, if you spec it :) 02:47
02:48 HarryS left 02:53 jacob_applebaum left 02:58 Sanitoeter joined
masak rakudo: say ([1, 3, 4] (^) [3, 4, 6]).keys.perl 02:59
p6eval rakudo d75c61: OUTPUT«[1, 6]␤»
masak \o/
03:02 espadrine_ joined, espadrine left, espadrine_ is now known as espadrine 03:03 jacob_applebaum joined
masak rakudo: say ([1, 3, 4] (^) [3, 4, 6]){6} 03:07
p6eval rakudo d75c61: OUTPUT«get_pmc_keyed() not implemented in class 'Set'␤ in 'at_key' at line 27:CORE.setting␤ in 'Any::postcircumfix:<{ }>' at line 1694:CORE.setting␤ in main program body at line 1␤»
03:11 HarryS joined 03:17 HarryS left 03:20 cjk101010 joined 03:22 espadrine left, espadrine_ joined 03:36 mfollett joined
masak reads 'Perl4 to Perl5 Traps' and goes 'eeeew!' 03:38
03:39 agentzh joined
masak rakudo: my @list = (1,2,3,4,5); my $n = shift @list + 2; say "n is $n" 03:40
p6eval rakudo d75c61: OUTPUT«Method 'shift' not found for invocant of class 'Num'␤ in 'shift' at line 2894:CORE.setting␤ in main program body at line 22:/tmp/sYT2bmCkRo␤»
masak used to work in Perl 4 :)
masak shudders
03:41 HarryS joined
masak rakudo: my $a = 0; $_ = "foo"; /foo/ ?? $a += 2 !! $a -= 2; say $a 03:41
p6eval rakudo d75c61: OUTPUT«===SORRY!===␤Confused at line 22, near "/foo/ ?? $"␤» 03:42
masak rakudo: my $a = 0; $_ = "foo"; $_ ~~ /foo/ ?? $a += 2 !! $a -= 2; say $a
p6eval rakudo d75c61: OUTPUT«===SORRY!===␤Confused at line 22, near "$_ ~~ /foo"␤»
masak std: my $a = 0; $_ = "foo"; /foo/ ?? $a += 2 !! $a -= 2; say $a
p6eval std 32123: OUTPUT«===SORRY!===␤Precedence of += is too loose to use between ?? and !!; please use parens around inner expression at /tmp/LpslE728ON line 1:␤------> my $a = 0; $_ = "foo"; /foo/ ?? $a +=⏏ 2 !! $a -= 2; say $a␤Parse failed␤FAILED 00:01 120m␤»
masak STD++
mfollett rakudo: my %hash; push(%hash<books>, 'Cooking for Geeks'); 03:43
p6eval rakudo d75c61: OUTPUT«Method '!fill' not found for invocant of class ''␤ in 'List::push' at line 2639:CORE.setting␤ in main program body at line 22:/tmp/zcftSEWYZa␤»
mfollett Anyone know what I'm doing wrong there?
masak submits rakudobug
mfollett: looks good to me. 03:44
tylercurtis masak: what did the "shift @list + 2" line do in Perl 4?
mfollett masak: ok, good, I thought I was crazy
masak tylercurtis: shifted @list and added 2 to the result.
mfollett: as a general rule, you're not. :)
mfollett masak: heheh, thanks. How do I submit a bug? 03:45
masak mfollett: it's already been taken care of. see above.
but for next time, [email@hidden.address] will do.
mfollett masak: Thanks!
03:46 Guest31804 left
masak you're welcome. hope those geeks don't go hungry, now. 03:46
mfollett heheh
tylercurtis masak: I instinctively feel like that's scary, but I don't find Forth and related languages similarly scary, so I'm not sure it really is. 03:47
03:47 HarryS left
masak tylercurtis: shift was probably special-cased in some manner, only expecting one term. 03:48
rakudo: say abs -4 + 2
p6eval rakudo d75c61: OUTPUT«2␤»
tylercurtis rakudo: say abs -4, 2 03:51
p6eval rakudo d75c61: OUTPUT«42␤»
masak Perl 4 allowed whitespace (!) as a delimiter for quote constructs. 03:52
as in 'my $b = q baz ;'
\xF0 because perl 4 was off the hook 03:54
masak rakudo: if { 1 } { say "True!" } else { say "False!" }
p6eval rakudo d75c61: OUTPUT«True!␤»
masak well, we re-introduced that syntax :)
rakudo: if { 0 } { say "True!" } else { say "False!" }
p6eval rakudo d75c61: OUTPUT«True!␤» 03:55
masak but it always returns True, because closures are such positive creatures.
tylercurtis perlcabal.org/syn/S03.html#Named_un...precedence about named unary precedence, do all unary functions that have that precedence, or only ones in the setting, or only certain ones?
03:56 molaf joined
masak seems to me there's a small group of special-cased ones. 03:56
tylercurtis viv seems to indicate that is indeed the case. 03:59
04:00 bluescreen joined
masak I tried to check locally too, but my setup is b0rked. 04:00
04:00 bluescreen is now known as Guest10103
masak anyway, that means Rakudo is in the wrong with 'abs 4 - 2' 04:01
tylercurtis masak: why?
masak because if 'abs' is unary, it only expects one term, the 4. 04:02
whereas Rakudo prints '2', which means the abs ate the '4 - 2'.
rakudo: my $x = 'aaa'; print ++$x, ' : '; print -$x, ' : '; say ++$x; 04:03
p6eval rakudo d75c61: OUTPUT«aab : -0 : aac␤»
masak submits rakudobug
tylercurtis rakudo: say abs 4 - 2
p6eval rakudo d75c61: OUTPUT«2␤»
tylercurtis rakudo: say abs 2 - 4 04:04
p6eval rakudo d75c61: OUTPUT«2␤»
masak this one is not spec'd, and Perl 5 prints '-aab' for the middle term.
buubot: eval my $x = 'aaa'; print ++$x, ' : '; print -$x, ' : '; say ++$x;
buubot masak: ERROR: Can't modify constant item in postincrement (++) at (eval 40) line 1, near "say ++" syntax error at (eval 40) line 1, near "++$x"
masak buubot: eval my $x = 'aaa'; print ++$x, ' : '; print -$x, ' : '; print ++$x, "\n";
buubot masak: aab : -aab : aac 1
masak buubot++ 04:05
buubot masak: Couldn't match input.
masak buubot--
buubot masak: Couldn't match input.
tylercurtis "say abs 2 - 4" should parse as "say(abs(2 - 4))" since additive ops have tighter precedence than named unaries.
So, that rakudo example looks right to me.
mfollett One more question which I have posted on pastie.org here: pastie.org/1133033 the error is at the bottom. 04:06
masak tylercurtis: oh. all right then. :) 04:07
mfollett: try return self.bless(*, %params); 04:08
or maybe return self.bless(*, |%params);
mfollett masak: thanks! masak++ 04:09
masak it worked? great! :)
04:11 HarryS joined
mfollett What is the asterisk in this case? 04:11
masak mfollett: it means "I want to use whatever's the standard underlying representation of an object" 04:12
mfollett ok 04:13
thanks
TimToady * means "I don't care, you pick." except when it means, "there an argument missing here in this curry expression"
which is still the same basic idea, someone else picks the value 04:14
masak right. the question had 'in this case' in it, so I went with the special case.
TimToady nod
mfollett thanks to both :) 04:15
TimToady was just waxing didactic
masak goes offline for a while 04:16
04:17 masak left, HarryS left 04:32 redicaps joined 04:34 molaf left 04:35 redicaps left 04:39 cjk101010 left 04:41 HarryS joined 04:47 HarryS left 04:48 BaggioKwok joined 04:54 espadrine joined, espadrine_ left 04:58 cjk101010 joined 05:09 feiquet left 05:11 HarryS joined 05:15 BaggioKwok left 05:17 HarryS left 05:23 masak joined 05:40 kaare joined, kaare is now known as Guest3461 05:41 HarryS joined
masak buubot: sub foo { my $a = shift; sub bar { say $a } }; bar; foo(42); bar 05:41
buubot masak: No factoid found. Did you mean one of these: ['s penis]
masak buubot: eval sub foo { my $a = shift; sub bar { say $a } }; bar; foo(42); bar 05:42
buubot masak: ERROR: Can't call method "say" on an undefined value at (eval 40) line 1.
masak buubot: eval sub foo { my $a = shift; sub bar { print $a, "\n" } }; bar; foo(42); bar
buubot masak: 42 1
masak ooh, is buubot running without -w?
buubot: eval sub foo { my $a = shift; sub bar { print $a, "!" } }; bar; foo(42); bar
buubot masak: !42!1
05:43 petdance left
masak locally, I get the "Variable "$a" will not stay shared' warning. 05:43
05:43 kjeldahl joined
BinGOs try 'use warnings' 05:43
masak buubot: eval use warnings; sub foo { my $a = shift; sub bar { print $a, "!" } }; bar; foo(42); bar
buubot masak: Variable "$a" will not stay shared at (eval 40) line 1. Use of uninitialized value $a in print at (eval 40) line 1. !42!1
masak \o/
BinGOs++ 05:44
BinGOs takes a bow.
masak for some reason I got to thinking about the discussion at irclog.perlgeek.de/perl6/2010-04-27#i_2269618 05:45
it's now almost half a year later, and I can read it and be a little less uncertain about what was said, due to having implemented some of the things discussed :) 05:46
05:46 HarryS left 05:47 wtw joined
masak alpha: for ^3 { state $x++ }; say $x 05:49
p6eval alpha 30e0ed: OUTPUT«Symbol '$x' not predeclared in <anonymous> (/tmp/DAYwFQgtKy:10)␤in Main (file <unknown>, line <unknown>)␤»
masak std: for ^3 { state $x++ }; say $x
p6eval std 32123: OUTPUT«===SORRY!===␤Variable $x is not predeclared at /tmp/jNoFRS4bCA line 1:␤------> for ^3 { state $x++ }; say $x⏏<EOL>␤Check failed␤FAILED 00:01 117m␤»
masak oh right.
alpha: for ^3 { say state $x++ }
p6eval alpha 30e0ed: OUTPUT«Use of uninitialized value␤␤1␤2␤»
masak alpha: for ^3 { say ++state $x } 05:50
p6eval alpha 30e0ed: OUTPUT«1␤2␤3␤»
05:51 mfollett left
masak <TimToady> so, unless we put state variables somewhere special outside the active lexpad, we *must* reuse the same lexpad for re-invocation 05:51
fwiw, I talked to jnthn and he said (IIUC) that for the state implementation for alpha, he placed state variables in a special "block lexpad" that didn't get wiped upon block reactivation. 05:52
with that model, state vars and recursion would behave just like state vars and loop iterations. there's something to be said for that. 05:54
alpha: sub foo { my $a = shift; our sub bar { say $a } }; bar; foo(42); bar 05:59
p6eval alpha 30e0ed: OUTPUT«Confused at line 10, near "= shift; o"␤in Main (file <unknown>, line <unknown>)␤»
masak er.
alpha: sub foo($a) { our sub bar { say $a } }; bar; foo(42); bar
p6eval alpha 30e0ed: OUTPUT«Null PMC access in type()␤in Main (file <unknown>, line <unknown>)␤»
masak rakudo: sub foo($a) { our sub bar { say $a } }; bar; foo(42); bar 06:00
p6eval rakudo 27d54d: OUTPUT«Null PMC access in type()␤ in 'bar' at line 22:/tmp/pT5utjXSiF␤ in main program body at line 22:/tmp/pT5utjXSiF␤»
masak all Rakudo ng has is a better stack trace ;-)
06:01 TimToady left
masak here's how this oughta work, in an official, complete implementation: the lexpad of &foo contains a variable $a. in its tabula rasa state, the sub bar binds to this $a but in the static lexpad of &foo, because &foo hasn't run yet. 06:02
Perl 5 gets this right.
06:02 TimToady joined
masak the first time &foo runs, a dynamic (or runtime) lexpad is created for &foo. 06:02
it's created with the values copied from the static lexpad, so if &foo contained a BEGIN block, things still work out. 06:03
also, &bar is rebound, so that its $a no longer points to the static lexpad, but to the new one.
06:04 stepnem left
masak that way, when &bar is called after foo(42), it'll see the $a from that invocation of &foo where $a is 42. 06:04
and it'll print 42.
this all boils down to two simple rules: (1) closures in a block are cloned at block activation, so that they have their lexicals pointing always to the freshest outer lexpads. (2) if a block has never been activated, the closures in it (possibly visible through "our" scoping and the like) instead point to an outer static lexpad. 06:06
06:06 stepnem joined 06:07 jhuni left
masak I bet most of this looks like Greek to people who haven't thought about it much. but it's heady stuff, and amenable to longish blog posts with pretty diagrams :) 06:07
\xF0 you could make one 06:08
masak I'd like to, at some point.
though I'd prefer to have it working in Yapsi first.
06:08 feiquet joined, uniejo joined
sorear hello #perl6 06:09
\xF0 hello sorear :p
sorear masak: after much long and hard thinking, the implementation of static lexpads in niecza does NOT involve any copying 06:10
masak o/ sorear
sorear it simplifies things a lot
masak let's define 'copying' exactly here. 06:11
copying of what?
sorear values, from static lexpads, into nonstatic ones
06:11 HarryS joined
sorear niecza has an egalitarian model, no lexpad is priveleged that way 06:11
masak interesting.
in the absence of copying, I'm not sure how BEGIN works. 06:12
or any mechanism that leaves a value in the static lexpad for later use.
sorear I handle BEGIN my $x = 1; say $x; by only creating one mainline pad and using it for both BEGIN and runtime 06:13
1 never needs to be copied because it's in the right place all along
(the real reason I did this was to avoid double initialization of classes, but it turned out to have huge ramifications on the static lexpad mechanism)
masak hm. 06:14
Occam called, and he wants your model. 06:15
I do too, now.
but I don't understand it fully yet, I think. 06:16
06:16 HarryS left
masak in 'for ^3 { my $a }', how many lexpads are ever created? 06:16
06:18 azert0x joined
moritz_ good morning 06:18
06:18 azert0x left
masak mornin', moritz_ 06:19
feiquet hello, there 06:23
moritz_ hi 06:25
feiquet I have a question. I can cast Real value $r into Int using $r.Int but can't with Int($r). Is this type of casting still unimplemented?
moritz_ yes
feiquet Oh, with Rakudo Star.
thanks, moritz_. 06:26
and.. is there any unimplemented things list of Rakudo *?
moritz_ rakudo.org/status # end of page 06:27
masak std: / $0 (foo) /
p6eval std 32123: OUTPUT«ok 00:01 117m␤»
masak I think referring to capture variables in a regex when the corresponding pair of parentheses hasn't been seen yet, should be parse-time illegal. 06:28
moritz_ phenny: tell pmichaud if you turn perl6 into an organization account (github), I'm happy to delete perlsix to avoid confusion 06:29
phenny moritz_: I'll pass that on when pmichaud is around.
feiquet moritz_: Thank you. hm...
sorear masak: 4. One root lexpad (static and dynamic are the same), 1 dynamic lexpad per block execution
masak: there would be 5, but niecza can optimize out the static lexpad if there are no BEGIN blocks 06:30
moritz_ feiquet: our bug tracker also contains lots of small-scale things that aren't implement yet
sorear masak: this is possible *because* of the equality of the design - static lexpads are only used for static code, not cloning
masak sorear: ah, so the look would have one more lexpad if it had a BEGIN block?
sorear yes
masak s/look/loop/
sorear: in 'for ^3 { say my $a; BEGIN { $a = 42 } }' under your model, which three values get printed? 06:31
three Anys?
feiquet moritz_: I once get such a message, but I this time I can only get a message like "sub &int does not exist". so I asked.. Thanks, again. 06:32
sorear niecza: for 1, 2, 3 { say my $a; PRE-INIT { $a = 42 } }
p6eval niecza 33f66ad: OUTPUT«Any()␤Any()␤Any()␤»
moritz_ feiquet: int != Int
06:32 oatspeas joined, azert0x joined, azert0x left
masak right, $a gets set to 42 and then that value is never inherited to the dynamic lexpads. 06:32
moritz_ int the native type, which is also not yet implemented
sorear yes
the really nice thing about the singleton pad model is that singleton pads don't need to exist as objects 06:33
masak please elaborate.
also, why did you call 'BEGIN' 'PRE-INIT'? :) 06:34
06:34 oatspeas left, azert0x joined
sorear before singleton pads, attempting to access a global in the setting's setting from a nested loop: th.outer.outer.outer.outer.outer.outer.lex["&infix"] 06:34
06:34 Ross joined
sorear now: SAFE.F1_23_infix 06:34
06:34 azert0x left
feiquet moritz_: oh sorry I know. Because neither int() nor Int() moved, I ignored that. 06:34
sorear er, &infix:<+>
I called it PRE-INIT because it's not really a BEGIN - it doesn't run at parse time 06:35
06:36 azert0x joined, azert0x left
masak the four things that tchrist wanted from regexes in his FMTEYEWTK post on regexes in 1996: (1) 1-st class regexes (2) user-defined charclasses (3) recursive matches with nesting (4) Unicode support. 06:36
06:37 mberends joined
masak sorear: hm. Yapsi does the '.outer' x $N thing right now. :/ 06:37
sorear: does the SAFE.F1_23_infix<+> trick only work for things like the setting, which is never reactivated? 06:38
06:39 Mowah joined 06:40 justatheory left 06:41 HarryS joined 06:46 HarryS left 06:48 Ross left 06:50 azawawi joined
azawawi hi 06:50
masak azawawi: hi!
azawawi prepares to release S:H:P6 0.85 which is based on cpan STD 32116 :) 06:51
06:52 mberends left
tylercurtis Is there some method that is called on objects in sink context? 06:56
06:58 Ross joined
masak not sure what you mean, but... no. probably not. 06:59
tylercurtis Well, an object can behave differently in some contexts by overriding methods (.Bool, .list, .Numeric, etc.). Turns out that now that I think about it, I don't need to behave differently in sink context, but I'm still a little curious about how that could be done. 07:01
07:01 azert0x_ joined 07:02 azawawi left
tylercurtis Or if it could be done at all. 07:02
Or if it should be possible.
07:02 feiquet left 07:03 feiquet joined, feiquet left, schpey joined
masak sink context tends to indicate the lack of interest in the return value. so there's not really a pressing need to call a conversion method in that case. 07:03
but I see your point, I think. would be nice to have an overridable hook.
07:04 Mowah left
tylercurtis Possible use case: an embedded language for writing blog posts. You might have a bold function that either adds bold text as a top-level element of the post's body in sink context or returns an object that can be used as a child of other elements in non-sink context. 07:05
moritz_ tylercurtis: there is a method that's called in sink context 07:06
it's .sink, unsurprisingly
it's just NYI
tylercurtis moritz_: good to know.
moritz_ it's used for eagerly evaluating lazy lists, for example
tylercurtis moritz_++ thanks 07:07
masak I find mention of the 'sink' statement prefix in the spec, but nothing on a .sink method. 07:08
but if it's parallel to 'list' and 'hash', then maybe a method form is implied... 07:09
07:11 Ross left, HarryS joined 07:14 stepnem left
moritz_ it's been discussed here 07:14
sorear yes 07:15
07:16 HarryS left
sorear masak: conversion to C# globals works for any block which can be very easily proven to be entered exactly once - the setting, the mainline of every file, code in bare blocks in the mainline, code in classes/packages 07:16
07:16 stepnem joined
masak sorear: I definitely like that part of your model. 07:17
sorear sink context as agreed on here is rather problematic from an optimization standpoint
niecza implements the following alternate model: a for look is run immediately if and only if a bare block in the same place would be 07:18
i.e if it is the direct child of a statementlist node
masak ...except if it's last in a sub... 07:19
sorear that's the biggest point of difference between niecza's model and the proposed rakudo model, yes 07:20
my $x; sub foo { temp $x = 5; for 1 { say $x } }; foo; # in niecza this will print 5 once I implement temp, in rakudo it will print Any() 07:21
tylercurtis almost suggested 'do for ...' before realizing how counter-intuitive that would be. 07:22
07:22 Guest3461 is now known as kaare_
masak rakudo: my @foo = 'a'..'f'; my @bar = 1..10; @foo[0..3] = @bar[5..8]; say @foo.perl 07:24
p6eval rakudo 27d54d: OUTPUT«[6, 7, 8, 9, "e", "f"]␤» 07:25
masak rakudo: my @foo = 'a'..'f'; my @bar = 1..10; my @idx1 = 1, 6, 2; my @idx2 = 8, 1, 4; @foo[@idx1] = @bar[@idx2]; say @foo.perl
p6eval rakudo 27d54d: OUTPUT«["a", 9, 5, "d", "e", "f", 2]␤» 07:26
masak \o/
07:29 elekt left
sorear wonders if renaming PRE-INIT to BEGIN would solve more confusion than it creates 07:30
rakudo: say Any.flat.WHAT 07:33
p6eval rakudo 27d54d: OUTPUT«List()␤»
07:37 elekt joined, drbean left 07:39 stepnem left, stepnem joined 07:41 HarryS joined 07:46 stepnem left, prism is now known as daemon 07:47 stepnem joined, HarryS left
masak are there :c :d :s adverbs on the tr/// construct in Perl 6? 07:49
07:49 espadrine left
sorear std: tr///d 07:51
p6eval std 32123: OUTPUT«===SORRY!===␤Unsupported use of suffix transliteration modifiers; in Perl 6 please use prefix adverbs at /tmp/pehCUyOJAm line 1:␤------> tr///d⏏<EOL>␤Other potential difficulties:␤ Unsupported use of /g; in Perl 6 please use :d at
../tmp/pehCUyOJ…
masak str: tr:d///
std: tr:d/// 07:52
p6eval std 32123: OUTPUT«===SORRY!===␤Unrecognized quote modifier: d at /tmp/dPapJafcrK line 1:␤------> tr⏏:d///␤Check failed␤FAILED 00:01 114m␤»
masak guess not.
sorear in light of what came before, I would say that is a bug
masak hm, true. 07:53
does tr/X// still return the number of Xes in the string? the spec doesn't seem to have an opinion.
07:54 jedai_ left
sorear the spec is billed specifically as documenting all differences between Perl 6 and Perl 5 07:54
rakudo: say (^10).WHAT 07:55
p6eval rakudo 27d54d: OUTPUT«Range()␤»
sorear rakudo: say (^10).Str
p6eval rakudo 27d54d: OUTPUT«0 1 2 3 4 5 6 7 8 9␤»
sorear rakudo: say (^10).perl
p6eval rakudo 27d54d: OUTPUT«0..^10␤»
07:55 jedai joined
sorear ..^ ? 07:56
masak sorear: yes, but sometimes it's hard to tell if an omission is deliberate or if no-one has thought of asking whether things should remain the same. 07:57
sorear really doesn't like how niecza is trending towards replacing Perl 6 with C# 07:58
tylercurtis sorear: what is the CursorBase::_REDUCE stuff in Niecza::Actions for? 08:02
sorear tylercurtis: _REDUCE is the connection point between Cursor-based grammars and action classes; by overriding it, I can customize the handling of action methods 08:04
IIRC I 1. make unimplemented action methods into sorries, instead of ignored 2. present a nicer naming convention for :sym<> mangling 08:05
the "standard" way to do this is AUTOLOAD, I'm trying something different
(note that AUTOLOAD makes typoes in Niecza/Actions.pm much harder to catch)
08:10 schpey left, schpey joined, timbunce joined 08:11 HarryS joined 08:12 Zapelius joined 08:16 svetlins left, HarryS left 08:18 jhuni joined
tylercurtis Good night, #perl6. 08:23
08:27 dakkar joined
masak 'night, tylercurtis. 08:27
08:32 tylercurtis left 08:34 daxim joined 08:40 schpey left 08:41 HarryS joined 08:47 HarryS left
masak zzz 08:56
08:56 masak left 09:04 schpey joined
sorear out 09:11
09:11 HarryS joined 09:15 foodoo joined 09:17 HarryS left 09:22 meppl joined 09:38 proller joined 09:41 HarryS joined 09:43 proller left
bbkr rakudo: say (^0).WHAT 09:46
09:46 proller joined
p6eval rakudo 27d54d: OUTPUT«Range()␤» 09:46
bbkr \o/
09:47 HarryS left 09:53 smash joined
smash hello everyone 09:53
phenny smash: 00:58Z <colomon> tell smash "Ruined the server"? (Heh. In 1992 I once brought UMich's math dept's computer network to its knees doing distributed fractal calculations.)
smash colomon: you also messed up the graph's scale :-) 09:54
bbkr The following code: use Test; eval_lives_ok "" for 1..10000 # is seriously leaking memory somewhere 09:58
moritz_ eval '' while 1; also leaks 09:59
so I think it's eval() that leaks
smash on rakudo ?
moritz_ yes
bbkr yes, I've tested it on Star 2010.08 10:00
should I report or already known?
moritz_ please report
10:01 foodoo left 10:04 wamba joined
smash rakudo: eval "say 1" for 1..4; 10:07
p6eval rakudo 27d54d: OUTPUT«1␤Null PMC in copy␤ in 'eval' at line 1117:CORE.setting␤ in main program body at line 22:/tmp/kyKDs6lmfi␤»
smash !? 10:08
moritz_ rakudo: eval 'say 1' for 1..2 10:11
p6eval rakudo 27d54d: OUTPUT«1␤Null PMC in copy␤ in 'eval' at line 1117:CORE.setting␤ in main program body at line 22:/tmp/v6wffwm3tF␤»
moritz_ rakudo: eval 'say 1'; eval 'say 1'
10:11 HarryS joined
p6eval rakudo 27d54d: OUTPUT«1␤1␤» 10:11
moritz_ rakudo: sub e { eval 'say 1' }; e() for 1..2
p6eval rakudo 27d54d: OUTPUT«1␤1␤»
moritz_ rakudo: for 1..2 { eval 'say 1' } 10:12
p6eval rakudo 27d54d: OUTPUT«1␤1␤»
moritz_ this is most interesting
rakudo: eval '' for 1..2
p6eval rakudo 27d54d: OUTPUT«Null PMC in copy␤ in 'eval' at line 1117:CORE.setting␤ in main program body at line 22:/tmp/Lspsx0wm8T␤»
moritz_ executing the same eval twice without an enclosing block triggers this error 10:13
smash: care to submit?
smash moritz_: sure 10:14
moritz_ I've reduced the PIR output to just contain a single "&eval"($P0) in the loop, and that still leaks 10:17
10:17 HarryS left
smash moritz_: reported 10:17
moritz_ smash++ 10:18
10:18 jhuni left
smash moritz_: (leak) GC ? 10:19
bbkr rakudo: use Test; eval_lives_ok '1<&1' # this is Test.pm bug, right? warning should not be emmited in case of eval_lives_ok? 10:21
p6eval rakudo 27d54d: OUTPUT«Use of uninitialized value in numeric context␤ok 1 - ␤»
bbkr rakudo: use Test; eval_lives_ok 'warn 666'; # like in this case - warning is not emitted 10:23
p6eval rakudo 27d54d: OUTPUT«not ok 1 - ␤»
10:26 dream left
bbkr hmm, I think there is another bug here: eval_lives_ok 'warn 666' should pass, as this is legal syntax and not dies during execution, right? 10:28
rakudo: warn 666; say "alive";
p6eval rakudo 27d54d: OUTPUT«666 at line 22:/tmp/dHXfETMIWs␤alive␤»
10:32 foodoo joined, cognominal left 10:33 agentzh left 10:35 cognominal joined
bbkr reports both bugs 10:36
std: 1<&1
p6eval std 32123: OUTPUT«===SORRY!===␤Whitespace required before < operator at /tmp/VhphRglbVX line 1:␤------> 1<⏏&1␤ expecting escape␤Parse failed␤FAILED 00:01 114m␤»
bbkr rakudo: !1<&1; say "alive" 10:37
p6eval rakudo 27d54d: OUTPUT«Use of uninitialized value in numeric context␤alive␤»
10:41 xinming left, HarryS joined 10:44 broquaint joined 10:45 xinming joined
TiMBuS github.com/blog/712-pull-requests-2-0 ooo well there you go 10:52
11:04 broquaint left 11:06 broquaint joined 11:15 PacoLinux left 11:16 Italian_Plumber joined, dju left 11:17 dju joined, dju left, dju_ joined, PacoLinux joined
moritz_ nopaste.snit.ch/23213 # perl 5 from winxed via blizkost 11:26
11:27 broquaint left, broquaint joined 11:28 lamstyle left 11:30 envi^home joined, Trashlord left 11:31 Trashlord joined 11:33 lamstyle joined 11:42 stepnem left 11:43 stepnem joined
takadonet morning all 11:43
11:48 M_o_C joined
colomon \o 12:03
12:21 felipe joined
daxim latest rakudo-star packaged as RPM, enjoy download.opensuse.org/repositories/...SUSE_11.3/ 12:24
12:24 sftp joined 12:31 snearch joined, amkrankruleuen left
moritz_ daxim++ 12:31
12:31 amkrankruleuen joined 12:32 jferrero joined, schpey left 12:35 cjk101010 left 12:38 awwaiid left 12:42 meteorjay left, meteorjay joined 12:44 alanm_ joined 12:46 alanm_ left 12:47 drbean joined 12:49 HarryS left 12:53 bluescreen joined 12:54 bluescreen is now known as Guest22756 12:59 ash_ joined
ash_ so... i did more improvements to my test instance of try.rakudo, 75.143.73.208/ anyone want to break it now? 13:00
if you type exit, or if you cause the rakudo instance to die, it restarts it now 13:01
moritz_ \o/ seems to work 13:02
ash_ you loose your previous data (obviously) but it does better now
moritz_: anymore suggestions for improvement? 13:03
moritz_ override exit() :-)
well, not sure actually
ash_ hmm, alright i tried overriding it like we did with open
but it didn't work
rakudo: &GLOABAL::exit := sub { fail 'foo' }; exit; 13:04
p6eval rakudo 27d54d: ( no output )
moritz_ rakudo: &GLOABAL::exit := sub { die 'foo' }; exit; say "alive"
p6eval rakudo 27d54d: ( no output )
moritz_ you probably need the lexical manipulation again
ash_ well, i tried that too, but it says it can't find it in the lexpad 13:05
moritz_ huh
well, then don't bother
13:06 drbean left
ash_ "Lexical '&exit' not found" 13:06
when i try to override it in pir like you did with open, etc.
13:06 xinming left
moritz_ ah hm, it's defined in PIR 13:07
ash_ ah
i don't know how to override that then
i'd like to, to give a message or something
13:07 xinming joined
moritz_ ash_: github.com/perlsix/Mu/blob/master/m...ot.pl#L117 should work the same way as for !qx 13:08
13:10 orafu left, kaare_ left
ash_ ah, thanks tat got it 13:10
13:10 orafu joined
ash_ now... do i an exit and add a message saying your instance has been reset? or do i forbid 'exit' 13:10
moritz_ maybe add the message for now 13:12
ash_ i guess you could kinda use 'exit' to reset your repl
since it automatically re-starts the repl if it dies
13:14 svetlins joined
moritz_ maybe it would be more generic if the restart itself produced a message 13:15
13:15 Holy_Cow joined
moritz_ so that if you trigger a rakudobug that makes rakudo segfault or exit, you see what happens 13:15
13:16 stepnem left
ash_ ya, i am going with that optioin 13:18
in the event i detect a dead subprocess, i am adding a message 13:19
restarting server, so if your using it, it might be down for a sec
13:19 stepnem joined
ash_ now, if you crash the repl, it tells you "Rakudo REPL has closed... restarting" 13:27
or call exit
smash colomon: updated gil.di.uminho.pt/users/smash/rakudo-bench.html (separated graphics based on values) 13:28
ash_ anymore comments on 75.143.73.208/? 13:29
13:30 HarryS joined, uniejo left 13:32 macroron joined
smash ash_: is the 'up' key working ? i keep getting the 'no history' message 13:34
ash_ ya, i was thinking about implementing a command history
so you could scroll through it with up and down
smash oh, nice
ash_ but that might not play well with the multi-line text box
i am still considering it 13:35
i'll take those alerts out for now
if you refresh now, it should not alert you
smash yeap, no alerts.. it's the typical 'up arrow' on the multi-line box 13:36
ash_ i think i'll make it store the current command, and then cycle through the history if your cursor is at the top of the box and you press up, likewise down will cycle in the other direction 13:38
13:38 Axius joined
smash sounds sane 13:39
13:41 Guest22756 left 13:42 Guest22756 joined 13:45 ash_ left 13:46 Axius left
pmichaud good morning, #perl6 14:03
phenny pmichaud: 06:29Z <moritz_> tell pmichaud if you turn perl6 into an organization account (github), I'm happy to delete perlsix to avoid confusion
moritz_ good morning pmichaud. It seems phenny has a message for you almost every day now :-) 14:04
14:09 risou joined, patspam joined
pmichaud indeed, it does. Not sure if that means I'm not around enough or ... :-) 14:10
moritz_ it might mean you're a focal point of rakudo development 14:11
which is not very surprising, considering that you're the pumpking :-)
pmichaud okay, github perl6 is now an organization account 14:16
14:17 M_o_C left
moritz_ \o/ 14:17
pmichaud: any objections to adding a "dev" team, and giving it commit + admin rights for the pugs repo (which I'll clone into the perl6 account), perl6-examples and ecosystem? 14:19
and add every current perl6 or pugs committer to it
pmichaud the name "dev" doesn't feel right. But other than that, no objection. 14:20
moritz_ butterflies? bugs? hackers?
daxim have you applied my migration article? I expect nothing less than a *superb* git repo conversion ;) 14:21
moritz_ lambdacamels?
daxim: you're welcome to contribute a superb conversion
daxim hackers sounds fine
pmichaud committers
colomon smash: I was hoping you'd do that!
pmichaud I don't know. It just feels like we should have something more flashy than "dev". Plus some contributors might not consider themselves "developers" (even though they are) 14:22
"friends of camelia" :-P
we can go with "dev" for now, but I might want to change it someday :) 14:23
moritz_ no hurry, I won't do any work on it in the next few hours anyway
pmichaud for the parrot organization I just created a "Parrot" team
so maybe it should just be a "Perl 6" team :-)
moritz_ good idea
14:25 ash_ joined 14:29 foodoo left 14:31 javs joined 14:32 javs left, Zapelius left 14:35 stepnem left 14:36 mfollett joined, stepnem joined
ash_ moritz_: do you have any complaints about the try.rakudo sample? if not i might move it over to replace the one thats live 14:40
[particle] whee! sign me up :)
"i'm a perl 6, and perl 6 was my idea" 14:41
ash_ 75.143.73.208/ if anyone else wants to take a gander at it
bbkr hmm, why change of signature from "multi prefix:<so>($x)" to "multi prefix:<so>(Mu $x)" in 606c5fb prevents autothreading? I don't get this magic :P 14:42
moritz_ ash_: +1 to going live
14:43 wtw left
pmichaud bbkr: The "Mu $x" disables autothreading 14:43
moritz_ bbkr: autothreading over junctions it type based. Without a constraint, $x defaults to Any
ash_ its probably at least better than the current live :-x
pmichaud multi prefix:<so>($x) is the same.... what moritz++ said
moritz_ and because Any !~~ Junction, it autothreads
pmichaud actually, because Junction !~~ Any :-)
ash_ so... moritz_ if i need to have my daemon process running in the background of feather, do you have any suggestions for handling that? 14:44
daxim ash_, output → 'hello world! ☕'.say hello world! ���
bbkr moritz_: thanks for explanation. another bit of knowledge :)
ash_ oh... hm.... i haven't tested unicode yet... thanks daxim, i'll look into that
moritz_ ash_: I usually just start a screen process with the daemon running
ash_ moritz_: do i need to put anything in say /etc/init.d ? incase the server gets reset and i am not around to manually restart it? 14:45
moritz_ ash_: I have an @reboot line in my user crontab
ash_ to start the daemon you simply do "perl backend/persist.pl" (so no real magic there)
moritz_ ash_: though it's probably best to create a separate user for that 14:46
bbkr ash: say '<script>alert("666")</script>' # executes JS on your 75.143.73.208/ page :)
ash_ alright
moritz_ su adduser tryrakudobackend or so
ash_ thanks bbkr, i hadn't tested cross site scripting yet, i'll check into escaping javascript 14:48
bbkr ash: and unicode is garbled in output 14:49
14:50 patspam left
moritz_ daxim++ bbkr++ # breaking stuff 14:50
14:50 javs joined
ash_ bbkr: yup, daxim noticed that too, i am looking at it now 14:51
moritz_ and ash_++ # building stuff :-)
ash_ moritz_: if i make a user for tryrakudobackend can i increase the restrictions on the account any? (incase someone finds a security hole in the backend, which is probably easier than it should be) 14:52
bbkr ash: "use Test" prints 'P' char to output.
14:53 molaf joined
smash colomon: more updates on gil.di.uminho.pt/users/smash/rakudo-bench.html (more ey-candy graphics) 14:53
ash_ weird, i have no idea why its printing P
smash++ # awesome graphs 14:54
moritz_ ash_: easist way is to call ulimit before starting the daemon
ash_ ah, k, i'll do that, i guess i need to make a startup script, that sets ulimit and launches the file
14:55 proller left
smash phenny: tell masak check the new colors on gil.di.uminho.pt/users/smash/rakudo-bench.html better to read now i guess 14:55
phenny smash: I'll pass that on when masak is around.
14:58 proller joined
pmichaud (bench graphs) wow 14:58
14:58 perlygatekeeper joined
pmichaud smash++ smash++ 14:59
15:04 alksentrs joined 15:05 envi^home left
sjn likes the rakudo bench page 15:06
wish there was info % change though
info on* % change 15:07
smash sjn: more info can be added
15:07 ruoso joined
sjn yay! \o/ 15:07
[particle] smash: can you make the y-axis of those graphs 0-based? 15:08
sjn a row with mean % change from the previous version, perha5Dps? :)
15:08 envi^home joined
smash [particle]: i can try 15:08
[particle] as it is, it makes it look like there's been a 30% reduction in pascals_triangle.p6
ash_ btw, anyone using the try.rakudo test site, if it goes up an down, thats cause i am restarting it
[particle] ash_: it would be better if you could make that announcement *on* try.rakudo somehow :) 15:09
ash_ also, its running on a 1.66 ghz atom processor... so its really slow
[particle]: i mean 75.143.73.208/ not the actual try.rakudo.org
smash sjn: sure, i can try to add that value 15:10
15:10 ruoso left
ash_ but yes, if i can figure out a reasonable way of displaying an announcement to web-clients, i'll add that 15:10
bbkr is there any switch to enable safe mode in Rakudo? 15:11
moritz_ no
I've tried to implement it, and I couldn't figure it out 15:12
ash_ bbkr: github.com/moritz/try.rakudo.org/bl.../p6safe.pl is the pseudo safe mode i stole from moritz_++
moritz_ both p6eval and try.rakudo.org use a hack that relies on code that we paste at the start of each evaluation
bbkr rakudo: say slurp '/etc/services' # curious 15:13
p6eval rakudo 27d54d: OUTPUT«Operation not permitted in safe mode␤ in 'Safe::forbidden' at line 2:/tmp/GTXQl_TPOa␤ in main program body at line 22:/tmp/GTXQl_TPOa␤»
bbkr rakudo: eval "say slurp '/etc/services'" # curious
p6eval rakudo 27d54d: ( no output )
ash_ rakudo: say lines # it does have stuff fed to STDIN 15:14
p6eval rakudo 27d54d: OUTPUT«Land der Berge, Land am Strome,Land der Äcker, Land der Dome,Land der Hämmer, zukunftsreich!Heimat bist du großer Söhne,Volk, begnadet für das Schöne,vielgerühmtes Österreich,vielgerühmtes Österreich!Heiß umfehdet, wild umstrittenliegst dem Erdteil du inmitten,einem starken
..Herzen …
smash [particle]: i can, but i don't like it very much
sjn smash++
[particle] smash: because you need more vertical space to display the results ?
smash [particle]: because i use the same vertical space and the lines get more over each other (worst on the sclower scripts graphic) 15:15
ash_ oh, btw, on my test try.rakudo site (the ip one) it resets your session if your inactive for more than 10 minutes, i might adjust that but its currently set to 10 minutes
smash [particle]: you can check it out: gil.di.uminho.pt/users/smash/test.html 15:16
[particle] smash: yes, i imagine in the mandlebrot script, they'd be very close to each other
ooh, actually, i like that
however, i'd drop 'rakudo-star-' from the x-axis labels, and make the title 'Rakudo Star Benchmarks by release' 15:17
then the charts could be made more vertical, and less horizontal
(to fit in a narrower browser)
also, s/ammount/amount/ 15:18
:g
smash [particle]: i can do that sure, in 20m or so, right now i'm a bit busy
[particle] smash++
smash afk, even.. brb
15:20 Mowah joined
pugssvn r32126 | lwall++ | [S02] spec set and bag composers 15:21
pmichaud The 0-based graphs are much better. 15:22
in the realm of extreme bikeshedding -- iwbni the legend in the "faster scripts" graph was in approximately the same order as the lines 15:23
i.e., pascal's triangle first, then recursion, then iteration, then ...
I suspect there's also an argument to be made that some of these bench mark scripts aren't all that illustrative (more) 15:24
for example, "iteration.pl" is only testing 5 iterations
that tells us more about the cost of startup and setup than the cost of iteration itself :-|
bbkr ash: when script dies on your page it should have all variables cleaned up.
ash_ what do you mean? 15:25
bbkr you can call "my $x = 1". then "die", then "say $x" and it will still print 1 15:26
pmichaud same for recursion; 12 subroutine calls doesn't really seem that heavy of a bench mark
moritz_ bbkr: it just wraps every line in a try block (the REPL does that implicitly) - I like it
15:27 hercynium left
bbkr moritz_: indeed, "die CATCH {say 1}" worked 15:27
"die; CATCH {say 1}" 15:28
ash_ bbkr, its the real repl that rakudo uses, so...
moritz_ would hate to lose all variables, just because he made a small mistake
[particle] pmichaud: would you rather see the script names sorted by highest left-most value (2010.07 here) or highest right-most? i tend to think right-most
pmichaud right-most would be fine 15:29
ash_ 75.143.73.208/?input=eval%20'fail%201' 15:31
i don't get why that causes it to crash 15:32
pmichaud ash_: I think it's a problem in the way that the REPL is trapping exceptions. Feel free to file a rakudobug for it if one doesn't exist already. 15:33
ash_ alright, (the restarting twice message is my bad, its only restarting once)
rakudo: fail 'foo' 15:34
p6eval rakudo 27d54d: ( no output )
ash_ rakudo: eval "fail 'foo'"
p6eval rakudo 27d54d: ( no output )
ash_ doing: eval 'a' in the repl (normal terminal repl) is that supposed to die? 15:35
pmichaud I guess 'no'. 15:36
ash_ saying just: a says Could not find sub &a, but in an eval it causes the repl to die 15:37
guess i'll file that as a bug for rakudo, if i don't see it in the tracker 15:38
ah, ticket 77040 already address the issue 15:42
rakudo: Failure.new 'foo'
p6eval rakudo 27d54d: OUTPUT«===SORRY!===␤Confused at line 22, near "Failure.ne"␤» 15:43
ash_ Failure.new("OH NO!")
rakudo: Failure.new("OH NO!")
p6eval rakudo 27d54d: OUTPUT«Method 'handled' not found for invocant of class 'Str'␤current instr.: 'perl6;Failure;defined' pc 16376 (src/gen/Attribute.pir:16)␤»
ash_ does the repl override die? 15:49
just curious why using die in the repl doesn't cause it to stop but using fail does 15:50
colomon smash: bravo! 15:51
bbkr ash: your page should forbid "BEGIN { push @*INC, '/something/here'}", or modyfying @*INC in general 15:52
TimToady anyone know why my @array; @array.push($_) for 1..100000 segfaults? 15:53
ash_ bbkr: good point, i think i can make the variable read only 15:54
15:56 dual left
ash_ TimToady: to see where it crashes i am running for 1..100000 { .say; @array.push($_); }; its really slow after about 2500 iterations 15:58
16:00 patspam joined
TimToady well, it's probably tormenting the GC 16:01
ash_ just hit 4k, so far no crash 16:02
16:02 Ross joined
ash_ its fairly stable in terms of memory, its sitting at 180 MB, growing fairly slow 16:03
maybe .1 every 10 or so seconds 16:04
16:07 justatheory joined
smash [particle]: updated gil.di.uminho.pt/users/smash/rakudo-bench.html change the title, and dropped 'rakudo-star-' from the x-axis labels 16:08
ash_ just hit 5k, still counting 16:11
smash ash_: Segmentation fault @ 54460 here 16:13
ash_ mine must be a lot slower than yours
i am not even to 6k yet ;P
pmichaud 15:53 <TimToady> anyone know why my @array; @array.push($_) for 1..100000 segfaults? 16:15
I suspect it's an artifact fo the 1..100000
*of
in particular, trac.parrot.org/parrot/ticket/1723 16:16
smash pmichaud: you might be right because say $_ for 1..100000; also seg faults
pmichaud perhaps I can switch statement_modifier:for to use map (same as statement:for) 16:17
that might resolve the issue
or maybe I should look at ParrotIter and make sure it's not holding the entire chain of iterators 16:18
moritz_ when I do a set_hll_global without a first key argument, what's the default?
pmichaud the hll root
moritz_ how do I write that as a key? 16:20
pmichaud I don't think there's a way to write it as a key.
if there is, it'd be []
moritz_ so I can't get shich it with get_hll_global? 16:21
16:21 hercynium joined
pmichaud I don't understand. 16:21
moritz_ when the source contains
set_hll_global '@INC', $P2
what's the appropriate get_hll_global line to obtain @INC again?
pmichaud get_hll_global '@INC'
or
$P2 = get_hll_global '@INC' 16:22
16:22 azert0x_ left
moritz_ wrote the $P2 to the end. Stupid me 16:22
[particle] what do you think you're writing... assembler code?
pmichaud why would @INC be appearing in get_hll_global, ooc?
moritz_ because it was set with set_hll_global 16:23
pmichaud okay, why is it being set in the hll root, ooc?
(that was my real question :-)
moritz_ because that's where contextuals end up being looked for? 16:24
pmichaud no
contextuals look in PROCESS:: and GLOBAL::
moritz_ well, it seems to work anyway 16:25
I see only one location, where INC is set up
pmichaud if so, I suspect it's a fossil/bug.
moritz_ (in src/Perl6/Compiler.pir, last touched by jnthn++)
16:25 amkrankruleuen left, amkrankruleuen joined, ajs joined
ajs Anyone know how you're supposed to return multiple, possibly lazy lists from a sub, and how you should go about recieving them so as not to flatten? I was trying to implement Python's itertools.tee in Perl 6, and couldn't figure out how to return the new lists. 16:30
pmichaud just return the lists as normal 16:31
receive them into scalars, or bind them
ajs Hmm... ok, I must be doing something wrong. I was doing that, and Rakudo was flattening them in an odd way. Lemme see if I can manage a small test case.
pmichaud rakudo: sub xyz() { gather { for 1..100 { say 'take'; take $_ } } }; my $a = xyz(); say $a[4]; 16:32
p6eval rakudo 27d54d: OUTPUT«take␤take␤take␤take␤take␤5␤»
pmichaud rakudo: sub xyz() { gather { for 1..100 { say 'take'; take $_ } } }; my $a = xyz(); say $a[4]; say $a[2]; say $a[6]; 16:33
p6eval rakudo 27d54d: OUTPUT«take␤take␤take␤take␤take␤5␤3␤take␤take␤7␤»
16:33 azert0x joined 16:35 Holy_Cow left
ajs rakudo: sub a() { my @x = 1...3; my @y = 5..7; return @x, @y } ; my($x,$y) = a(); say $x.WHAT 16:35
p6eval rakudo 27d54d: OUTPUT«Int()␤»
ajs That's what I'm running into.
pmichaud need a space 16:36
16:36 patspam left, Holy_Cow joined
ajs a space? 16:36
pmichaud after 'my'
but that's not the issue
in this case you'll need to do a binding
or use captures/references
rakudo: sub a() { return 1..3, 5..7; }; my :($x, $y) := a(); say $x.WHAT; 16:37
p6eval rakudo 27d54d: OUTPUT«===SORRY!===␤Malformed my at line 22, near ":($x, $y) "␤»
16:37 patspam joined
pmichaud rakudo: sub a() { return 1..3, 5..7; }; my ($x, $y) := a(); say $x.WHAT; 16:37
p6eval rakudo 27d54d: OUTPUT«Range()␤»
ajs ah, nice
pmichaud if you use assignment, then you end up doing a list assignment
the other way is to make sure that the lists you return are items 16:38
rakudo: sub abc() { my @a = 1..3; my @b = 5..7; return @a.item, @b.item }; my ($x, $y) = a(); say $x.WHAT;
p6eval rakudo 27d54d: OUTPUT«Could not find sub &a␤ in main program body at line 22:/tmp/bSQHkFzdmq␤»
pmichaud rakudo: sub abc() { my @a = 1..3; my @b = 5..7; return @a.item, @b.item }; my ($x, $y) = abc(); say $x.WHAT;
p6eval rakudo 27d54d: OUTPUT«Array()␤»
pmichaud by having them as items, they won't flatten in list context
16:39 cdarroch joined, cdarroch left, cdarroch joined
pmichaud you can also do 16:39
rakudo: sub abc() { my $a = 1..3; my $b = 5..7; return $a, $b; }; my ($x, $y) = abc(); say $x.WHAT;
p6eval rakudo 27d54d: OUTPUT«Range()␤»
pmichaud anyway, the key thing to remember is that @a flattens over list assignment
ajs that definitely was my problem, thanks 16:40
pmichaud so with
16:40 patspam left
pmichaud rakudo: sub abc() { my @a = 1..3; my @b = 5..7; return @a,@b }; my ($x, $y) = abc(); say $x.WHAT; 16:40
p6eval rakudo 27d54d: OUTPUT«Int()␤»
pmichaud it ends up being the same as
my ($x, $y) = 1, 2, 3, 5, 6, 7
which means that $x is 1 and $y is 2
ajs right
I guess that makes sense... it's going to be a common question, I expect. 16:41
pmichaud in general, if you don't want eager/flattening, don't use @ :-)
16:42 pyrimidine joined 16:44 daemon left, daemon joined
smash pmichaud: (nqp-rx question) is there an direct equivalent to somehing like: rule 'oexpr' is optable { ... } (from PCT) ? 16:46
pmichaud smash: no 16:47
smash: we now use the <EXPR> rule inherited from HLL::Grammar
smash pmichaud: right 16:48
let me see
16:48 tylercurtis joined
pmichaud could others run a quick test for me? 16:50
I'm getting some very bizarre output.
first, sanity check: from the REPL
for 1..100 { $_ } 16:51
anyone get anything other than a list of numbers from 1 to 100 ?
moritz_ I get the list here
smash i get the list too
pmichaud okay
now
for 1..200 { $_ }
I'm getting gist.github.com/562541 16:52
smash i get 'name' instead of the first 12 numbers
*named
moritz_ gets the same as smash 16:53
and on second execution 'scalar' xx 5, 6..20
pmichaud also
moritz_ tehn $!llsig on third execution
pmichaud gist.github.com/562544
that looks like a serious problem.
moritz_ it does 16:54
smash yeap, same behaviour here as moritz_
pmichaud okay, time to see if it's a recent problem or if it's been around a while
rakudo: say ~(for 1..200 { $_ }) 16:56
16:56 envi^home left
p6eval rakudo 27d54d: OUTPUT«src/string/api.c:3341: failed assertion 'pos <= res->strstart + Buffer_buflen(res) + 1'␤Backtrace - Obtained 24 stack frames (max trace depth is 32).␤/home/p6eval//p1/lib/libparrot.so.2.7.0 [0x2b37798191a3]␤/home/p6eval//p1/lib/libparrot.so.2.7.0(Parrot_confess+0x87) 16:56
..[0x2b37798192d…
pmichaud star: say ~(for 1..200 { $_ })
p6eval star 2010.07: OUTPUT«1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96
..97 …
pmichaud looks like a recent parrot change :-(
17:00 SHODAN joined 17:06 dakkar left
smash pmichaud: can i use the --target=parse to test a grammar even if i don't have the actions part ? 17:08
moritz_ if you have missing action methods, they are just ignored
pmichaud smash: yes, as long as the actions aren't needed to affect the parse
(in rakudo, the actions actually modify the parsing a bit) 17:09
smash ok, thks
SHODAN just read about all planned features of perl6 :D
sounds like an awesome language
moritz_ SHODAN: did you also read about the already implemented features? :-)
SHODAN yes. i've downloaded rakudo and tried it out a bit 17:10
moritz_ they are awesome too (even if not quite as awesome as the full spec)
SHODAN haven't done perl in ages though, but it still feels perlish 17:11
moritz_ that's what most of us think too
17:18 Chillance joined
ajs Well, I desperately need to go take care of other things, but if anyone has a minute and can suggest a workaround for my tee implemention's non-laziness, I'd love to hear it: gist.github.com/562575 ... I'll check back later 17:18
17:19 florz joined
ash_ moritz_: how is that message? for when you don't have javascript enabled 17:19
florz hi 17:20
ash_ greetings
pmichaud ajs: ummmm, why not my @iters = for 1..10 { @list.iterator.list }
er, with parens
moritz_ ash_+++ # good 17:21
pmichaud ajs: ummmm, why not my @iters = (for 1..10 { @list.iterator.list })
colomon pmichaud: was just sitting here wondering if that would work.
moritz_ ajs: if you write a few test cases, I might understand what you want, and maybe help you 17:22
colomon docs.python.org/library/itertools.h...rtools.tee
ajs Python tee gives you a list of iterators that all appear to be the same as the original, but which, in the background, all feed from the original iterator in unison 17:23
pmichaud ajs: so does what I just wrote, iiuc
ajs or what colomon said ;)
pmichaud: really? I would have thought that the returned iterators would be independent... if the original iterator is an input filehandle, will each of the iterators loop over the input file? 17:24
moritz_ I don't understand how that differs from my @a := gather { ... }
colomon rakudo: my @list := 1...*; my @iters = (for 1..10 { @list.iterator.list }); say @iters[0].munch(5).perl; say @iters[1].munch(5).perl
p6eval rakudo 27d54d: OUTPUT«Method 'iterator' not found for invocant of class 'Int'␤ in <anon> at line 22:/tmp/DqWVgNjsDa␤ in main program body at line 1␤»
moritz_ you get a single array, which you can iterate as often as you want
pmichaud depends on what you mean by "loop over the input filehandle"
colomon rakudo: my @list := (1...*); my @iters = (for 1..10 { @list.iterator.list }); say @iters[0].munch(5).perl; say @iters[1].munch(5).perl
florz I am trying to construct a (generalized) cartesian product from > 2 lists/ranges - as in, a list of n-tuples. I just can't seem to figure it out, probably I'm just lacking in perl6 basics ... and hints that don't require me to internalize half of perl6's grammar for now would be appreciated ;-)
p6eval rakudo 27d54d: OUTPUT«(timeout)» 17:25
pmichaud florz: @list1 X @list2
rakudo: my @a = <a b c>; my @b = <1 2 3>; say (@a X @b).perl;
p6eval rakudo 27d54d: OUTPUT«(("a", "1"), ("a", "2"), ("a", "3"), ("b", "1"), ("b", "2"), ("b", "3"), ("c", "1"), ("c", "2"), ("c", "3"))␤»
florz pmichaud: > 2 lists!?
pmichaud rakudo: my @a = <a b c>; my @b = <1 2 3>; my @c = <x y z>; say (@a X @b X @c).perl;
ajs first element off the first teed iterator should be the same as the first element off the second teed iterator, even if the base iterator from which they were constructed is non-reentrant (e.g. destroys its input)
p6eval rakudo 27d54d: OUTPUT«No applicable candidates found to dispatch to for 'infix:<X>'. Available candidates are:␤:(Any $lhs, Any $rhs)␤␤ in main program body at line 22:/tmp/tpMYeKyWWj␤» 17:26
colomon pmichaud: @list1 X @list2 X @list3 is NYI in rakudo, right?
pmichaud grrrr
in ng, it's NYI
it worked in alpha
alpha: my @a = <a b c>; my @b = <1 2 3>; my @c = <x y z>; say (@a X @b X @c).perl;
p6eval alpha 30e0ed: OUTPUT«["a", "1", "x", "a", "1", "y", "a", "1", "z", "a", "2", "x", "a", "2", "y", "a", "2", "z", "a", "3", "x", "a", "3", "y", "a", "3", "z", "b", "1", "x", "b", "1", "y", "b", "1", "z", "b", "2", "x", "b", "2", "y", "b", "2", "z", "b", "3", "x", "b", "3", "y", "b", "3", "z", "c",
.."1", "…
ash_ did that flatten?
pmichaud alpha incorrectly flattened, yes.
ash_ okay, but it did the @a X @b X @c correctly 17:27
pmichaud florz: anyway, X is defined to work on >2 lists
it's just failing in rakudo at the moment
17:27 patspam joined
colomon pmichaud: my @iters = (for 1..10 { @list.iterator.list }); doesn't seem to actually work. 17:28
infinite loop.
tylercurtis rakudo: my @a = <a b c>; my @b = 1, 2, 3; my @c = <x y z>; say ((@a X @b) X @c).perl
p6eval rakudo 27d54d: OUTPUT«(("a", "x"), ("a", "y"), ("a", "z"), (1, "x"), (1, "y"), (1, "z"), ("a", "x"), ("a", "y"), ("a", "z"), (2, "x"), (2, "y"), (2, "z"), ("a", "x"), ("a", "y"), ("a", "z"), (3, "x"), (3, "y"), (3, "z"), ("b", "x"), ("b", "y"), ("b", "z"), (1, "x"), (1, "y"), (1, "z"), ("b", "x"),
..("b",…
pmichaud colomon: it's likely flattening
tylercurtis Ah, right.
ash_ tylercurtis: that should have 3 elements in each not two
alpha: my @a = <a b>; my @b = <z x>; my @c = <1 2>; say all(@a X @b X @c) cmp all(@c X @a X @b) 17:29
p6eval alpha 30e0ed: OUTPUT«all(all(Order::Decrease, Order::Same, Order::Increase), all(Order::Decrease, Order::Same), all(Order::Same, Order::Increase), all(Order::Decrease, Order::Increase, Order::Same), all(Order::Decrease, Order::Increase, Order::Same), all(Order::Decrease, Order::Increase,
..Order::Same))␤»
ash_ that... must not be what i meant
pmichaud ajs: perhaps
(testing)
tylercurtis rakudo: my @a = <a b c>; my @b = 1, 2, 3; my @c = <x y z>; say ((@a X @b) <<X>> @c).perl
p6eval rakudo 27d54d: OUTPUT«===SORRY!===␤Unsupported use of >> to do right shift; in Perl 6 please use +> or ~> at line 22, near "@c).perl"␤»
pmichaud rakudo: my $list = $*IN.lines; say $list[0]; say $list[3];
p6eval rakudo 27d54d: OUTPUT«Land der Berge, Land am Strome,␤Heimat bist du großer Söhne,␤»
florz pmichaud: thx - at least a learned a bit while trying to figure out why everything I tried didn't quite work ;-) 17:30
pmichaud rakudo: my $list = $*IN.lines; say $list[0]; say $list[3]; say $list[0]
p6eval rakudo 27d54d: OUTPUT«Land der Berge, Land am Strome,␤Heimat bist du großer Söhne,␤Land der Berge, Land am Strome,␤»
ash_ alpha: my @a = <a b>; my @b = <z x>; my @c = <1 2>; say all(@a X @b X @c) ~~ all(@c X @a X @b)
p6eval alpha 30e0ed: OUTPUT«all(Bool::False)␤»
moritz_ rakudo: multi sub infix:<X>(\$a) { }; 1, 2 X 3, 4 X 5, 6
p6eval rakudo 27d54d: OUTPUT«No applicable candidates found to dispatch to for 'infix:<X>'. Available candidates are:␤:(Any \|$a)␤:(Any $lhs, Any $rhs)␤␤ in main program body at line 22:/tmp/f8UwpR6v8L␤»
pmichaud rakudo: my $list = $*IN.lines; my $iter1 = $list.iter.list; my $iter2 = $list.iter.list; say $iter1[3]; say $iter2[0];
p6eval rakudo 27d54d: OUTPUT«Method 'iter' not found for invocant of class 'List'␤ in main program body at line 22:/tmp/1qJ1aEVFWH␤»
moritz_ rakudo: multi sub infix:<X>(|$a) { }; 1, 2 X 3, 4 X 5, 6
p6eval rakudo 27d54d: OUTPUT«No applicable candidates found to dispatch to for 'infix:<X>'. Available candidates are:␤:(Any |$a)␤:(Any $lhs, Any $rhs)␤␤ in main program body at line 22:/tmp/QK8wvUMpcn␤»
pmichaud rakudo: my $list = $*IN.lines; my $iter1 = $list.iterator.list; my $iter2 = $list.iterator.list; say $iter1[3]; say $iter2[0]; 17:31
moritz_ why doesn't that dispatch?
p6eval rakudo 27d54d: OUTPUT«Heimat bist du großer Söhne,␤Land der Berge, Land am Strome,␤»
ajs Wait... er... does that mean rakudo is memoizing input filehandles? That seems... costly
moritz_ I thought it took the raw capture
pmichaud ajs: in this case it's memoizing them
ajs: in the general case it does not
rakudo: my $list = $*IN.lines; my @iters = (for 1..10 { $list.iterator.list.item }); say @iters[0][4]; say @iters[5][0]; 17:32
p6eval rakudo 27d54d: OUTPUT«Volk, begnadet für das Schöne,␤Land der Berge, Land am Strome,␤»
pmichaud :-) works :-)
ajs neet
pmichaud in this case, since I've bound the filehandle input, it will remember the lines read as they're requested 17:33
17:33 _jaldhar_ joined
pmichaud but the point is that our iterators are immutable, so creating N of them works out okay 17:33
ash_ rakudo: multi sub infix:<X>(*@a) { say @a }; [1, 2] X [3, 4] X [5, 6] # moritz_ is that what you wanted?
p6eval rakudo 27d54d: OUTPUT«1 23 45 6␤» 17:34
ajs will it save all previous inputs? One of the things python's tee is used for is allowing you to loop over infinitely long input iterators in many child-iterators, saving only the values which have not yet been consumed by any single child iterator. This turns out to be essential for things like Hamming number generation and the like
moritz_ ash_: no, I want to bind the raw capture
ash_ ah
pmichaud ajs: in this case it depends on whether the original list is saving inputs
ajs ok, well that seems fair.
pmichaud anyway, we'd probably need to see some use cases 17:35
but I think the core pieces exist
ajs I'll have to do more testing tonight... for now I should go away. thanks all!
pmichaud in order to write infix:<X> properly we need **@a binding
or we can do it using the raw capture
at the moment infix:<X> in rakudo is written using 2 arguments, which limits it to the binary cases of X 17:36
moritz_ I couldn't get it to work with the raw capture
17:37 jaldhar_ left
pmichaud it's a bit trickier there, yes. 17:37
ash_ if you have an infix twice in an expression, does it only dispatch once?
moritz_ if it's list assoc, yes 17:38
ash_ ah, okay
interesting
pmichaud some operators like infix:<,> infix:<X> etc are list associative 17:40
moritz_ S03 knows more :-) 17:41
ash_ i'll look at S03, i just didn't know that about list assoc ops 17:42
pmichaud my $rhs-list = flat($rhs.flat); 17:43
that's.... weird
src/core/metaops.pm:20
17:45 rindolf joined 17:46 proller left 17:52 snearch left 17:54 rindolf left
ash_ flat($rhs.flat); seems redundant 17:54
moritz_ it's not 17:55
(afaict)
flat isn't recursive
hm...
I was thinking of flat($rhs>>.flat) 17:56
17:56 alksentrs left 17:57 tadzik joined, ruoso joined
ash_ rakudo: my @a = [[1, [2], 3], 4, [[[[5]]]]]; say @a.perl; say flat(@a>>.flat).perl # ah, i see now 17:58
p6eval rakudo 27d54d: OUTPUT«[[[1, [2], 3], 4, [[[[5]]]]]]␤([1, [2], 3], 4, [[[[5]]]])␤»
18:01 ajs left
ash_ moritz_: btw, i am using the bug tracker in github for try.rakudo.org, so if you or anyone else see's a bug, feel free to file it there and i'll try to check it 18:02
moritz_ ok
ash_ also, feature requests can go there if i am not around, or they can go there anyway to keep track of them 18:03
[Coke] SHODAN reminds me I should see if I can get system shock running again. 18:05
18:07 mikehh joined
colomon pmichaud: presumably given 18:14
my $lhs-list = flat($lhs.list);
my $rhs-list = flat($rhs.flat);
there, one of them is a typo?
pmichaud I think they should both be .flat
colomon unless there's some reason I don't understand why they should be different.
pmichaud and no flat()
18:14 rindolf joined
pmichaud oh, wait 18:14
both should be .list, and keep flat() I guess. 18:15
that's safe for now.
*safer
it won't matter soon anyway, as I'll change the code to generalize for N lists
colomon btw, just checked, and blame says pmichaud checked in those two lines. ;) 18:16
you're getting slices up and running soon? pmichaud++
pmichaud no, I'm just going to fix the code so that it does the equivalent of slicing
colomon take a slurpy array of whatever? 18:17
pmichaud no, using a capture
colomon er, not whatever, that has a precise meaning in p6. :)
looking forward to seeing what you come up with for this. 18:18
pmichaud right now I'm trying to track down whatever parrot bug is causing the for loop to fail 18:19
that looks pretty serious
ash_ pmichaud: which for loop?
pmichaud rakudo: for 1..200 { $_ } 18:20
p6eval rakudo 27d54d: ( no output )
pmichaud rakudo: say ~(for 1..200 { $_ })
p6eval rakudo 27d54d: OUTPUT«src/string/api.c:3341: failed assertion 'pos <= res->strstart + Buffer_buflen(res) + 1'␤Backtrace - Obtained 24 stack frames (max trace depth is 32).␤/home/p6eval//p1/lib/libparrot.so.2.7.0 [0x2ad5c9baa1a3]␤/home/p6eval//p1/lib/libparrot.so.2.7.0(Parrot_confess+0x87)
..[0x2ad5c9baa2d…
pmichaud that one.
ash_ odd, i get something different when i do that 18:21
pmichaud the only correct answer is the values 1 through 200 separated by spaces (and a newline at the end)
star: say ~(for 1..200 { $_ })
p6eval star 2010.07: OUTPUT«1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 18:22
..97 …
pmichaud ...2010.07 ?
ash_ gist.github.com/562663 is what i get...
PerlJam pmichaud: I get the correct answer on the rakudo I built yesterday. SHA1 dc9900803a0956dbf634114835fff4c8ad71d7d5
(At least in the REPL)
ash_ i don't know why $!llsig is in there 51 times though 18:23
pmichaud PerlJam: try
> for 1..200 { $_ }
(in the repl
)
moritz_ twice
PerlJam hrm. 18:24
ash_ gist.github.com/562663 updated gist, wow, that is a weird bug
18:24 perlygatekeeper left
ash_ one time it prints "self" 51-ish times, next it prints "scalar" 51-ish times 18:24
err, not 51, but a bunch 18:25
pmichaud PerlJam: did it fail for you this time?
(in the repl?) 18:26
PerlJam gist.github.com/562672
TimToady is back from power outrage
pmichaud PerlJam: hmmm.
PerlJam: also interesting is > for 1..1000 { $_ }
rindolf TimToady: outrage!
TimToady: hi.
moritz_ welcome back TimToady 18:27
pmichaud sends TimToady on a power trip. :-)
PerlJam pmichaud: that one dies horribly
TimToady I always read "outage" as "outrage" anyway, so I figured I'd just go with it.
ash_ running it a bunch, i haven't seen any seg faults (built rakudo from master yesterday) but i am getting strange output
i am on OS X, if that makes a difference 18:28
colomon TimToady++
18:28 risou_ joined
pmichaud my desktop machine feels much slower than I think it ought to be. anyone have any suggestions for performance analysis tools? 18:29
(linux preferred, but I could install that microsoft "os" if I needed to)
18:31 risou left
rindolf pmichaud: well, there's LM-Bench which I haven't tried. 18:31
ash_ top -o cpu -O time to see whats eating processor time
TimToady we've seen the trash output bug before 18:32
colomon for 1..1000 { $_ } -- very freaky results on my Mac.
18:32 patspam left
rindolf pmichaud: and there's some stuff here too - catb.org/jargon/html/B/benchmark.html 18:32
pmichaud rindolf: excellent, thanks. 18:33
I just got a new SSD drive in this box that helps a bit... but I still want more power :-)
rindolf pmichaud: ah.
pmichaud (trash output bug) it was new to me. afaict it works fine in the 2010.08 release, which means it's recent
ash_ more != enough
rindolf pmichaud: what are this machine's specs?
pmichaud it's a dell dimension 9150 (yes, a little old), 2gb ram 18:34
TimToady no, it's from before 2010.08
it's just rather configuration dependent
PerlJam It looks like a problem with building strings in parrot to me.
pmichaud TimToady: hmm. It seems far more repeatable now, then. 18:35
colomon pmichaud: woah, all my "serious" desktops have 8gb of ram.
pmichaud I'm trying it with the star release and can't get it to give me trash output
colomon: I have more memory arriving tomorrow :)
[Coke] 8GB!?
[Coke] is clearly in the wrong line of work. 18:36
my netbook has 1gb, my imac only has 3gb. (and that was aftermarket)
<- jealous.
colomon [Coke]: $work requires all as much memory as possible. I'm hoping to have 8gb on my laptop next time I get a new one...
s/all//
pmichaud TimToady: aha, you're correct. 18:37
TimToady I first reported it with the hailstone series: irclog.perlgeek.de/perl6/2010-08-24#i_2739989
pmichaud for 1..20000 { $_ } exhibits the bug in latest star release
something is causing it to show up much sooner now, though.
ash_ for 1...20000 { $_ } dies for me, seg fault
sorear hello #perl6 18:38
TimToady also discusses more thoroughly at irclog.perlgeek.de/perl6/2010-08-28#i_2757516
*ed
pmichaud (2gb vs 8gb) even with only 2gb, my system rarely hits swap. 18:44
sorear still has the .375gb he had a month ago...
ash_ but with 8, you can load part of your file system into RAM
18:44 lichtkind joined
ash_ for even faster access (so it won't have to touch a disk at all) 18:44
TimToady well, the disk cache is supposed to do that anyway 18:45
pmichaud disk cache does that already
and I guarantee the ssd is pretty fast :)
ash_ as fast as ram?
ah, well ssd
nm then
pmichaud sorear: I'll send you the dimms I'm replacing, if they'd fit :-) 18:46
ash_ when they come down in price, i'd love to buy one, just can't afford it on my meager GRA pay
colomon pmichaud: try loading four 1gb long CAD files into memory at once. :) 18:47
18:48 masak joined
masak ahoy, #perl6! 18:48
phenny masak: 14:55Z <smash> tell masak check the new colors on gil.di.uminho.pt/users/smash/rakudo-bench.html better to read now i guess
TimToady yoha!
sorear ahello masak! 18:49
masak smash: I like it a lot. smash++
TimToady Util: the rosettacode.org/wiki/Anagrams#Perl_6 uses uri(), which doesn't seem to exist. How're you running it? 18:54
ash_ rakudo: say uri 19:01
p6eval rakudo 27d54d: OUTPUT«Could not find sub &uri␤ in main program body at line 22:/tmp/baSKIE8ya7␤»
19:07 x3nU left, justatheory left 19:08 x3nU joined 19:13 cbk joined
moritz_ rosettacode.org/wiki/Hamming_numbers#Haskell 19:19
19:19 [particle] left
moritz_ I've implemented the merge part 19:19
but the straight-forward haskell translation doesn't work yet :( 19:20
returns (1, Any xx *)
19:22 [particle] joined
TimToady I already have a hamming entry 19:23
moritz_ that page doesn't show one
TimToady I didn't install it 'cus it was breaking rakudo 19:24
it's at wall.org/~larry/hamming
masak there's an RT ticket about it.
TimToady yes, because *@tail apparently won't bind to a non-reified part of the list 19:25
masak rt.perl.org/rt3/Ticket/Display.html?id=77474
rindolf Bug with Rakudo: /usr/bin/perl5.10.1 t/harness --help does not display anything helpful.
Neither does t/harness -h
masak rindolf: feel free to submit. 19:26
moritz_ rindolf: you're supposed to call 'make test' or 'make spectest' or so, which the README documents
rindolf PackFile_unpack: This Parrot cannot read bytecode files with version 8.2.
moritz_: that's what I did, but the tests fail.
masak: I will thanks. 19:27
Let's fork on github.
moritz_ rindolf: that means you have an old parrot lying arround
which you have to remove first
masak rindolf: that's... what moritz_++ said.
rindolf moritz_: ah.
moritz_: I've already did perl Configure.pl --gen-parrot
moritz_ rindolf: try rm -rf parrot parrot_install first 19:28
[Coke] rindolf: are you working out of a git checkout of rakudo?
19:28 patspam joined
moritz_ rindolf: and if you have no previous files in your rakudo dir, git clean -xdf 19:28
rindolf which: no parrot in (/home/shlomif/apps/test/quadpres/bin/:/home/shlomif/apps/vim/bin:/home/shlomif/apps/git/bin
moritz_ s/previous/precious/
[Coke] (what moritz said).
rindolf [Coke]: yes, I am.
moritz_ rindolf: not just parrot, but also .pbc files built from previous parrot versions
[Coke] so it's the parrot & parrot_install dirs in your rakudo checkout. 19:29
19:29 timbunce left
TimToady moritz_: if you want something similar but more challenging, try rosettacode.org/wiki/Formal_power_series#Haskell 19:35
19:35 justatheory joined
TimToady or rosettacode.org/wiki/Pattern_matching, but you might have to fight smash++ for it 19:36
the formal power series might run into the same problem as hamming, though 19:37
masak probably. 19:38
19:39 mantovani left
TimToady hopes it is not intrisically related to the distinction Perl 6 makes between lazy lists and eager scalars. 19:39
*trin
binding to a non-reified element feels a lot like autoviv though 19:40
hamming is the first place that the non-list-associativity of X* bit me 19:42
19:43 nimiezko joined, hillu joined, Juerd_ joined, cls_bsd_ joined, Cyrus__ joined
TimToady course, the merge isn't written to be 3-way anyway 19:43
19:43 jedai_ joined, diakopte1 joined 19:47 Cyrus left, Juerd left, Juerd_ is now known as Juerd, hillu_ left, diakopter left, cls_bsd left, jedai left, Quadrescence left, Sarten-X left 19:52 molaf left 19:55 mantovani joined, thepler joined 19:57 ash_ left, Italian_Plumber left 19:58 SHODAN left 20:00 Quadrescence joined, skyheights joined 20:01 skyheights left 20:09 pyrimidine left 20:10 justatheory left
TimToady std: sub sideffect (--> Nil) {...} 20:11
p6eval std 32123: OUTPUT«ok 00:01 116m␤»
20:12 tadzik left
TimToady that should be sufficient to put the final statement into sink context 20:12
and eagerize any for loop
early enough to be optimized 20:13
and I don't buy the temp vs lazy list argument 20:14
temps on lexicals should be implemented more like dynvars anyway, so the correct temporary gets bound into any closure 20:15
rindolf moritz_: OK, pull from github.com/shlomif/rakudo
20:15 Italian_Plumber joined
masak 'temp vs lazy list argument' -- url? 20:16
TimToady irclog.perlgeek.de/perl6/2010-09-02#i_2775221
masak thanks 20:17
printing Any() in that case feels Wrong on a visceral level, yes. 20:19
but that's before any actual arguments from data model kick in -- so I'm glad there is one :)
nimiezko Is there any way to perform a deep copy of an object ?
rakudo: my %q = (1=>[1..5]) ; my %w = %q ; %w{1}[2]++ ; say %q.perl ;
p6eval rakudo 27d54d: OUTPUT«{"1" => [1, 2, 4, 4, 5]}␤» 20:20
masak nimiezko: it's a Difficult Problem to provide deep copying in the language itself, due to the very diverse demands on cloning of objects of different types. 20:21
nimiezko: in other words, you might be best off writing your own custom recursive-multis solution.
in the above case, you need one multi for arrays and one for hashes. 20:22
masak tries writing one
20:22 dual joined
TimToady there's always eval($x.perl) 20:23
or any other serializer/deserializer
20:24 justatheory joined
TimToady if we had access to the decontainerizer used by eqv, that'd also be helpful, maybe 20:24
rakudo: my %q = (1=>[1..5]) ; my %w := eval(%q.perl); %w{1}[2]++ ; say %q.perl ; 20:25
p6eval rakudo 27d54d: OUTPUT«{"1" => [1, 2, 3, 4, 5]}␤»
TimToady tries not to notice the fact that eval works in a bot 20:26
sorear eh? 20:27
the bot IS eval
nimiezko recursive REPL
masak rakudo: run("ls")
rindolf Can someone pull the t/harness --help display from github.com/shlomif/rakudo ?
p6eval rakudo 27d54d: OUTPUT«Operation not permitted in safe mode␤ in 'Safe::forbidden' at line 2:/tmp/MQzRYSC6XH␤ in main program body at line 22:/tmp/MQzRYSC6XH␤»
sorear rakudo: eval 'run("ls")' 20:28
masak rakudo: eval q[ run("ls") ]
p6eval rakudo 27d54d: ( no output )
masak hm.
pmichaud rindolf: submit a patch or a pull request, perhaps?
sorear eval hides errors, remember?
moritz_ rakudo: eval 'run("ls")'; print $!
sorear because it means try eval
p6eval rakudo 27d54d: OUTPUT«Operation not permitted in safe mode»
sorear a disgusting p5ism
rindolf pmichaud: OK, I'll issue a pull request. 20:29
moritz_ agrees
rindolf pmichaud: the changeset is there in the repo.
pmichaud rindolf: you'll likely get a message saying "we don't take pull requests"... but this is a good chance for me to look at github's new 2.0 pull request system
moritz_ Pod::Usage is core module since 5.6... no concerns here
masak I don't think I'd mind getting rid of the disgusting p5ism. I just don't have a strong opinion about it. 20:30
20:31 macroron left
rindolf pmichaud: github.com/rakudo/rakudo/pull/2 20:31
pmichaud oh, drat 20:32
20:32 macroron joined
sorear rakudo: my $*FORBID_PIR; eval 'say pir::spawnw__is("ls")' 20:32
p6eval rakudo 27d54d: OUTPUT«build␤Configure.pl␤CREDITS␤docs␤dynext␤LICENSE␤Makefile␤parrot␤perl6␤perl6.c␤perl6_group.c␤perl6_group.h␤perl6_group.o␤perl6.o␤perl6.pbc␤README␤src␤t␤Test.pir␤Test.pm␤tools␤VERSION␤0␤»
pmichaud it's far too easy to accidentally hit "apply" instead of "ignore" in the web-based interface. :-(
moritz_ curses 20:33
masak .oO( I accidentally the patch? )
good thing git is good at reverting.
pmichaud the problem with "for 1..20000 { $_ }" goes back through at least star-2010.07
cognominal rakudo: my $a=[]; say @$a 20:37
p6eval rakudo 27d54d: OUTPUT«===SORRY!===␤Non-declarative sigil is missing its name at line 22, near "@$a"␤» 20:38
pmichaud rindolf: applied, thanks.
rindolf pmichaud: thanks and yw.
20:38 kjeldahl left
cognominal is there a bug report for this parsing bug? I hate clipped nails as a workaround 20:38
20:39 Mowah left, macroron left
sorear it looks like for @array { last } is an O(N) operation in Rakudo 20:40
pmichaud ...that's odd, it shouldn't be.
masak cognominal: dunno if there's a bug report. it's been unimplemented for quite some time now :)
sorear if @array has a million reified elements, ListIter will return a million values at once, oblivious to how many will actually be consumed 20:41
pmichaud it doesn't really return a million values
sorear ?
pmichaud it does end up with a new RPA with a million elements, yes. 20:42
cognominal right now, I am trying to write a patch to add signatures to curried subs.
pmichaud but that million elements is really just references to the containers in @array
dalek kudo: 3b2529b | shlomif++ | t/harness:
Add a --help/-h flag to t/harness.
20:43
kudo: a0e9d2f | kyleha++ | t/harness:
[t/harness] spelling fix
pmichaud i.e., it doesn't create new PMCs (at least, it shouldn't)
20:46 patspam left, patspam joined 20:48 bacek joined 20:49 aloha joined 20:51 aloha left
masak rakudo: my $s = Set.new(1..5); say $s{5}; say $s<5> # one has to be careful with Set indexing, since they (currently) do not coerce keys to Str by default 20:51
p6eval rakudo 27d54d: OUTPUT«1␤0␤»
pmichaud masak: ooc, why did you implement postcircumfix:<{ }> instead of overloading at_key() ? 20:52
or is it that slicing operations are different for sets than hashes?
masak because I'm slightly unfamiliar with the state of the art.
no. 20:53
I can change the patch to use at_key()
pmichaud that might be better-ish.
masak is there a similar underlying method for postcircumfix:<[ ]> ?
pmichaud at_pos()
masak ok.
masak fixes
sorear pmichaud: so the cost of a sizeof(PMC*) * 1000000 block copy is ignorable for Rakudo's current purposes, you say? 20:57
pmichaud sorear: I'm not saying that necessarily, no. :) 20:58
I haven't looked at it from that perspective. But it should be the case that it's not like it's creating 1000000 new PMCs, either. :-) 20:59
I can re-evaluate ListIter sometime. At the time, I was just trying to get something/anything that could possibly work.
21:02 javs left
florz pmichaud: BTW, regularly the announcements on www.rakudo.org/ contain hard linebreaks which makes reading them in my browser somewhat unpleasent ... 21:02
pmichaud florz: yes, I'm growing to dislike drupal a lot. 21:03
21:03 Ross left
florz IC =:-) 21:03
lue hello o/ 21:04
colomon \o 21:05
pmichaud I'm open to suggestions for an alternate cms.
21:06 mikehh left
dalek kudo: 870efdb | masak++ | src/core/Set.pm:
[Set] replaced postcircumfix:<{ }> with at_key

Suggested by pmichaud++.
21:06
21:06 Mowah joined
pmichaud well, the for() problem exists as far back as 2010.06 -- 2010.05 doesn't seem to have the problem. 21:08
So, it's either something related to lists/iterators, or a parrot change, or a dispatcher change, or something that changed in May/June 21:09
this does not feel like a fun one to track down. :|
PerlJam pmichaud: you built 2010.06 with a modern parrot or a contemporary parrot? 21:10
pmichaud 2010.06 with contemporary parrot
part of the problem is that one cannot always move far away from contemporary parrots
21:10 ruoso left
pmichaud I'd be surprised if 2010.06 built with current parrot. 21:10
florz pmichaud: vi, wml and git? ;-) I don't have a clue of CMSes either ...
21:12 whiteknight joined
sorear wonders how mowyw fares 21:13
crazy idea: persistant lists in Perl 6
with O(1) "copying" and O(log n) shift() I can make for some nice iterators 21:14
pmichaud ...O(log n) shift? do tell :) 21:15
21:15 Guest22756 left
sorear pmichaud: elements stored in a trie, so all read/writes are log time; probably using the old two-pointer-deque trick to do shift 21:17
masak sorear++ # rocks
pmichaud sounds interesting
sorear if I wanted to get really fancy I could use finger trees for O(log n) splice() and catenation
but that would probably hurt the other constant factors too much
TimToady see red/black trees in rosettacode.org/wiki/Pattern_matching 21:18
21:23 rindolf left 21:29 risou joined, Mowah left 21:30 sahadev left
sorear I wonder how list assignment would work in a persistant environment 21:31
masak by 'persistant', do you mean 'persistent'? 21:32
sorear currently list assignment is thought of as turning the RHS into iterators then using it to fill the list
sure
masak ok.
sorear an O(n) operation that makes fine sense currently
21:33 risou_ left
sorear but it doesn't make so much sense in an environemtn where O(log n) catenation is possible 21:33
21:33 cbk left
sorear how can I define = and , to make @a = @b , @c exploit the full asymptotic performance of the primitives? 21:33
21:33 wamba left
masak unproportianally many solutions on Rosetta Code seem to be translations of Haskell solutions :) wonder why. 21:34
sorear: I only have a very-very thin grasp of your question, but it would seem to me that infix:<,> could be made lazy in this case. 21:35
sorear: that is, there's some structure representing the concatenation of @b and @c that gets triggered when @b runs out.
dalek kudo: 33e94e7 | masak++ | src/core/Set.pm:
[Set] implemented .hash
21:36
21:41 patspam left
sorear nah, eager 21:44
masak or that. should work anyway.
sorear I want to define , and = such that @a = @b , @c works in O(log n) time 21:45
masak the idea is that for all purposes, the structure represnting the concat is invisible. I guess that leads to a tree structure of some sort.
sorear I already have the technology to make @a := concat(@b, @c) that fast
masak: you're going the wrong way. I have technology far better than invisible concats 21:46
I just need to *expose it to Perl*
masak ok :)
21:47 Holy_Cow left
masak sorear: have you seen portal.acm.org/citation.cfm?doid=1596550.1596551 ? 21:50
21:50 EvanCarroll joined
diakopte1 masak: would you like a copy of that? I can get it if you'd like. 21:50
masak a copy of what? the pdf? 21:51
diakopte1 yes
masak I've read it twice, I think. :)
so no pressing need. but thanks.
diakopte1 the abstract?
masak no, the slides.
I just found the video, so I will probably watch that over lunch.
diakopte1 oh 21:52
ok
Tene There was a paper a while back about how lisp was doing it all wrong for concurrency, and that lists should be trees isntead of chained cons cells. I don't quite remember who wrote it, but one of the other big names in PL design, I think.
masak Tene: might be the one we're just talking about.
sounds very similar.
the author is GLS, indeed a very big name. 21:53
Tene Um. Yes. Yes it is exactly the same paper I was thinking of.
masak++
sorear masak: no, but the concepts in the abstract are not unfamiliar to me
diakopte1 well in general if you need any fulltext academic publications (this appears to be one of the ones [minority, seems to me] that's publicly available) I can get them for you.
21:53 aloha joined
masak Tene: by the way -- hi -- ihrd wrote an interesting email to us. I'll think some more and then try to write a good reply. 21:53
sorear masak: O(log N) list techology - www.soi.city.ac.uk/~ross/papers/FingerTree.pdf
Tene masak: It sounds similar to my concerns about claiming we're done when it runs on alpha and not recent releases. 21:54
masak diakopte1: thanks. I'll remember that.
diakopte1: I already have relatively good access, being at the university and all.
21:55 aloha left, aloha joined
masak Tene: I respect the objection about alpha. and I agree that we'll want to upgrade to Rakudo master as soon as possible. my decision about that is based on not wasting extra time shaving yaks within the scope of the grant. 21:55
bacek ~~ 21:56
masak and believe me, upgrading code to master is time-consuming. :/
Tene masak: It's only a question, as far as I'm concerned. It doesn't get to be an objection unless I'm willing to actually fix it.
masak though a test suite and a clear head help a lot.
bacek aloha, seen masak
aloha bacek: masak was last seen in #perl6 0 seconds ago saying "though a test suite and a clear head help a lot.".
bacek sorear, aloha is here now 21:57
masak Tene: I'm willing to actually fix it, soon as we finish the grant.
sorear seen Tene
aloha Tene was last seen in #perl6 56 seconds ago saying "masak: It's only a question, as far as I'm concerned. It doesn't get to be an objection unless I'm willing to actually fix it.".
sorear bacek++ awesome
masak bacek++
Tene aloha: seen aloha
aloha Tene: aloha was last seen in #perl6 2 mins 3 seconds ago joining the channel.
Tene aloha: lies! 21:58
masak :)
sorear seen dukeleto
aloha Sorry, I haven't seen dukeleto.
masak bacek: what does aloha trigger on, besides 'seen'?
Tene aloha: owner?
aloha Tene: Sorry, I don't know.
tylercurtis karma masak
aloha masak has karma of 0.
Tene aloha: aloha?
aloha Tene: I give up.
tylercurtis karma bacek
aloha bacek has karma of 2.
masak masak++ # gotta test 21:59
aloha: karma masak
aloha masak: masak has karma of 0.
masak :)
pmichaud okay, the problem with the for() loop giving wrong output is undoubtedly related to the join. 22:01
22:02 TiMBuS left 22:05 TiMBuS joined
sorear Can @array = @array[0..499_999, 500_000..999_999] be made as efficient as @array := @array.subrange(0, 500_000).append(@array.subrange(500_000, 500_000))? 22:05
22:07 mfollett left
bacek masak, it's just Bot::BasicBot::Pluggable. 22:08
masak ok. 22:09
sorear bacek: why do you get karma and masak doesn't?
or is it because he karmaed himself 22:10
masak it is.
lue new karmabot ?
sorear lue: incidentally
masak I think its chief claim to fame is as the new seenbot.
sorear lue: bacek++ is working on a less spammy purl replacement for #parrot; I saw the seen function and invited it here 22:11
pmichaud less spammy purl replacement +1 sorear++ bacek++ 22:13
22:13 tylercurtis left
pmichaud *sigh* pir::trace causes segfaults 22:17
pmichaud cries
masak hugme: hug pmichaud 22:18
hugme hugs pmichaud
22:18 au|irc left
pmichaud gist.github.com/563074 # trace produces segfault -- code runs fine if "trace 1" is commented out. :-( 22:20
masak confirmed. 22:22
22:23 aloha left
pmichaud yay, I golfed it! 22:23
22:24 aloha joined
sorear aloha: karma sorear 22:24
aloha sorear: sorear has karma of 0.
sorear aloha: karma bacek
aloha sorear: bacek has karma of 0.
pmichaud gist.github.com/563082 # segfault in pir's join 22:25
sorear bacek: no persistent database?
bacek sorear, I just recreated it few minutes ago
aloha, now share DB between #parrot and #perl
22:27 meppel joined
bacek explain sorear 22:27
aloha positive: just for fun (bacek); negative: nothing; overall: 1.
bacek done and dusted
sorear buubot: karma sorear
buubot sorear: sorear has karma of 880
sorear bacek: won't that get a bit... long? 22:28
22:28 meppl left
bacek sorear, ? 22:29
22:30 risou_ joined, rgrau` joined
Tene sorear++ # foo 22:31
explain sorear
aloha positive: for another reason (nwellnhof), foo (Tene), just for fun (bacek); negative: nothing; overall: 3.
Tene bacek: won't the output of 'explain' get absurdly long after a while?
masak sorear++ # so basically, I can write anything I want here, and it'll show up in 'explain'?
explain sorear 22:32
aloha positive: so basically, I can write anything I want here, and it'll show up in 'explain'? (masak), for another reason (nwellnhof), foo (Tene); negative: nothing; overall: 4.
lue would making /<A::B>/ work be considered LHF?
22:32 risou left
bacek Tene, it's limited to 3 comments 22:32
last 3 :)
Tene Ahh.
masak bacek++
Tene sorear++ # www.youtube.com/watch?v=_RyodnisVvU 22:33
Actually unrelated to sorear, just being silly.
masak :)
Tene++ # silly
Tene Oh, one other comment to the radix discussion on the ML... "base" likely is a poor choice for that. 22:35
22:35 alester left
Tene as it would cause confusion with p5 "use base" 22:35
At least do something more like "use radix" :P
lue what is 'use base' in P5?
masak Tene: that is a cute robot! 22:36
Tene { use base qw/Foo Bar/; } roughly equals: { BEGIN { require Foo; require Bar; push @ISA, qw/Foo Bar/; }
masak: my favorite is still: www.youtube.com/watch?v=ejROvUC-gWU 22:37
lue
.oO([in response to P5 use base] that seems a bit useless)
22:38
Tene I was very entertained by "difficult to film, as it likes drumming on the camera"
lue: because it only saves a few lines? 22:39
Declarative syntax still has value, even if the alternative isn't very long, IMO.
masak wow. robots. they'll be mainstream soon. 22:41
lue making the regex /<A::B>/ work in rakudo wouldn't be too terribly difficult, would it? 22:43
masak lue: it'd be a patch to nqp-rx. that in itself doesn't mean it'd be difficult, though. 22:45
lue does parrot pull the latest copy of nqp-rx when it compiles [like rakudo does with parrot] ? 22:47
Tene lue: no 22:48
lue: parrot gets occasional manual imports of nqp-rx 22:49
lue Hm. Which would mean (if I have this right) that it would take longer for me to get the fix. I'm not even sure how I would test it to make sure it works in the first place. 22:51
22:51 meppel is now known as meppl
Tene lue: you can compile nqp from the nqp-rx repo just fine. It makes an nqp binary. 22:52
then just run ./nqp foo.pl
lichtkind it is important to stop with the top rule in a grammar definition? 22:53
Tene lichtkind: I'm sorry, but I don't follow. What do you mean by stop? 22:54
lichtkind i mean last line in a grammar is in example i see the top rule 22:55
has it be that way?
sorear How badly would I break Perl 6 if I made "array" and "hash" indexing O(log n) ?
lichtkind: order of rules in a grammar is irrelevant except for protoregex tiebreaking 22:57
sorear is running a big thought experiment on immutable arrays to go with immutable iterators... 22:58
(except, they'd actually be trees)
masak nom &
22:58 masak left
lichtkind sorear: thnk you 22:59
22:59 _jaldhar_ left 23:00 skangas left, _jaldhar_ joined 23:02 nimiezko left 23:03 envi^home joined 23:04 _jaldhar_ left, _jaldhar_ joined
dalek ok: 2767aa1 | chromatic++ | src/grammars.pod:
Edited grammars chapter; needs a lot of work.
23:05
23:12 rgrau` left 23:14 envi^home left 23:18 cdarroch left, masonkramer joined
lue does anyone know where character classes (the <> kind) are handled in nqp-rx? 23:19
pmichaud src/Regex/Cursor-builtins.pir
lue domo arigato, pmichaud 23:20
pmichaud afk, meeting 23:23
23:26 sftp left
lichtkind sorear: do you also know why rakudo test numbers recently went doen? 23:26
down
lue it seems like <A::B> doesn't even parse in nqp-rx. Is this the case? 23:35
Tene lue: I think so. 23:37
23:38 jferrero left 23:41 smash left 23:43 masonkramer left 23:44 jimi_hendrix joined
jimi_hendrix what is the current status of perl6? 23:44
PerlJam jimi_hendrix: um ... 42 23:49
jimi_hendrix: what do you mean by "status"?
Tene jimi_hendrix: Perl 6 is useful for many tasks, but insufficient for some tasks.
I use Perl 6 all the time. There are some features that are unimplemented, or have bugs. Performance isn't good enough for some tasks. 23:50
23:50 Patterner left
Tene rakudo.org/announce/rakudo-star/2010.08 includes a list of most of the major missing features in Rakudo. 23:52
Rakudo is currently the most-complete implementation of Perl 6
23:54 jferrero joined