Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2010-08-24

Perl 6 | Reference Documentation | Rakudo

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
00:00 drake1 nice
00:01 drake1 is the name of the subclass still passed to the parent class?
00:01 drake1 as the first argument
00:01 Psyche^ joined #perl6
00:01 jnthn drake1: No, the type object of the subclass is, but since it's a method the first argument goes in self
00:02 jnthn So you can write a constructor that knows what to do with subclasses by writing like method new() { self.bless(*) }
00:02 drake1 so self don't even have to be blessed?
00:02 TimToady everything is blessed in Perl 6
00:02 jnthn It kinda already is.
00:02 drake1 sweet
00:02 TimToady "Everything is an object."
00:03 TimToady rakudo: say 42.WHAT
00:03 drake1 then it's fully integrated object orientation
00:03 p6eval rakudo 819e2c: OUTPUT«Int()␤»
00:04 TimToady we want Perl 6 to be fully OO, fully FP, etc.
00:04 TimToady to the extent they can be all of those things at once
00:04 rgrau_ left #perl6
00:04 rgrau_ joined #perl6
00:04 drake1 then it's more easy to write clean packages
00:05 TimToady they're usually called modules and classes now
00:05 TimToady and grammars
00:05 Patterner left #perl6
00:05 Psyche^ is now known as Patterner
00:05 drake1 dot pm
00:05 TimToady grammars and classes are just fancy modules
00:06 TimToady but they all have their own keyword to declare them now, to document them better
00:06 TimToady and to make it clear what the semantics are in the scope
00:06 drake1 and arbitrary constructors are still allowed
00:06 TimToady but they're still packages at the bottom
00:06 TimToady sure
00:07 drake1 strong concept
00:07 TimToady good defaults, but the flexibility is hidden under that
00:07 TimToady in OO, Perl 5 maked hard things possible, but didn't make easy things easy
00:07 TimToady *made
00:08 TimToady that's a fascinating typo...
00:08 drake1 overall nice
00:09 TimToady I've never had my typing muscles regularize an irregular verb without my planning it consciously
00:09 drake1 im used to code with processes like objects instead though
00:09 jnthn TimToady: The lolspeak. You learns it.
00:09 drake1 and inherit though file descriptor capabilities
00:10 TimToady sounds like something that would naturally be more like delegation in Perl 6
00:11 drake1 the parent processes are typically roots
00:11 TimToady or a prototyping system
00:11 mikehh_ is now known as mikehh
00:12 drake1 it's nice enough to fix things up, thats for sure
00:12 TimToady we thought we'd sneak in a few high-powered features at the same time
00:13 TimToady especially where they help the cleanup
00:13 drake1 it's very comprehensible code imo
00:13 TimToady I'm sure we'll find new ways to make it obscure :)
00:13 drake1 yes
00:13 rgrau_ left #perl6
00:14 TimToady rakudo: say (map * * *, 1...*)[^10]
00:14 p6eval rakudo 819e2c: OUTPUT«Method 'Num' not found for invocant of class 'WhateverCode'␤  in 'Cool::Numeric' at line 1745:CORE.setting␤  in 'Cool::Numeric' at line 1746:CORE.setting␤  in 'infix:<->' at line 6760:CORE.setting␤  in 'infix:<...>' at line 777:CORE.setting␤  in main program body at line
00:14 p6eval ..22:/tmp/Z7…
00:14 TimToady rakudo: say (map * * *, (1...*))[^10]
00:14 p6eval rakudo 819e2c: OUTPUT«212305690132182240306380␤»
00:14 TimToady rakudo: say ~(map * * *, (1...*))[^10]
00:14 p6eval rakudo 819e2c: OUTPUT«2 12 30 56 90 132 182 240 306 380␤»
00:15 TimToady right, * * * doesn't square anymore
00:16 TimToady rakudo: say (map * ** 2, (1...*))[^10]
00:16 p6eval rakudo 819e2c: OUTPUT«149162536496481100␤»
00:17 TimToady rakudo: say ~(map * ** 2, (1...*))[^10]
00:17 p6eval rakudo 819e2c: OUTPUT«1 4 9 16 25 36 49 64 81 100␤»
00:17 TimToady rakudo: say ~(* ** 2 for 1...*)[^10]
00:17 drake1 just wrote a test script for the new module http://pastebin.ca/1923815 is it any different?
00:17 p6eval rakudo 819e2c: OUTPUT«(timeout)»
00:17 drbean joined #perl6
00:18 TimToady rakudo: say ~($_ ** 2 for 1...*)[^10]
00:18 p6eval rakudo 819e2c: OUTPUT«(timeout)»
00:18 TimToady rakudo: say ~(for 1...* { $_ * $_ })[^10]
00:19 p6eval rakudo 819e2c: OUTPUT«(timeout)»
00:19 drake1 not exactly: LIBS = -lpsf\n^Dmake psf_print, but close
00:20 TimToady hmm, I thought for turned into a map now
00:20 risou left #perl6
00:20 rlb3_ joined #perl6
00:23 jnthn TimToady: I thought it did too
00:24 jnthn TimToady: Oh, maybe the postfix form doesn't yet
00:25 TimToady the last one was prefix form
00:26 TimToady rakudo: say ~(for 1..* { $_ * $_ })[^10]
00:26 p6eval rakudo 819e2c: OUTPUT«(timeout)»
00:27 TimToady maybe it thinks the inside of () is a sink context, and turns eager?
00:28 TimToady rakudo: say ~(for 1..* { .say; $_ * $_ })[^10]
00:28 p6eval rakudo 819e2c:
00:28 p6eval ..OUTPUT«(timeout)␤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␤
00:28 jnthn TimToady: Yeah, it's not just the evalbot, it hangs here too
00:29 TimToady it's doing 1..* lazily, or say wouldn't work there
00:29 jnthn TimToady: Oh
00:29 jnthn TimToady: Yeah, it's doing something wrong for sure
00:29 jnthn $P102 = $P79."map"($P101)
00:29 jnthn $P103 = "&eager"($P102)
00:30 jnthn It's eagering it before it even gets to the postcircumfix.
00:31 TimToady rakudo: my @list := do for 1..* { .say; $_ * $_ }; say @list[^10]
00:31 p6eval rakudo 819e2c:
00:31 p6eval ..OUTPUT«(timeout)␤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␤
00:31 TimToady same problem there
00:31 TimToady maybe the sink inside of gather was overgeneralized
00:31 lest_away is now known as lestrrat
00:32 TimToady star: my @list := do for 1..* { .say; $_ * $_ }; say @list[^10]
00:32 p6eval star 2010.07:
00:32 p6eval ..OUTPUT«(timeout)␤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␤
00:33 TimToady star: my @list := { for 1..* { .say; $_ * $_ }}(); say @list[^10]
00:33 p6eval star 2010.07:
00:33 p6eval ..OUTPUT«(timeout)␤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␤
00:34 TimToady rakudo: my @list := { for 1..* { .say; $_ * $_ }}(); say @list[^10]
00:34 p6eval rakudo 819e2c:
00:34 p6eval ..OUTPUT«(timeout)␤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␤
00:35 TimToady rakudo: my @list := { map { .say; $_ * $_ }, 1..* }(); say @list[^10]
00:35 p6eval rakudo 819e2c: OUTPUT«1␤2␤3␤4␤5␤6␤7␤8␤9␤10␤149162536496481100␤»
00:35 rlb3_ left #perl6
00:38 drake1 left #perl6
00:41 colomon rakudo: my $list := { for 1..* { .say; $_ * $_ }}(); say $list[^10]
00:42 p6eval rakudo 819e2c:
00:42 p6eval ..OUTPUT«(timeout)␤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␤
00:43 dalek 6model: 1fbc73b | jnthn++ | dotnet/ (9 files):
00:43 dalek 6model: Big refactor of lexpads to do something rather smarter than just using a Dictionary<string, RakudoObject>. Not taking advantage of it yet anywhere, but this should enable good things.
00:43 dalek 6model: review: http://github.com/jnthn/6model/commit/1fbc73b595be188317400808bbc7fb5d610fca6c
00:47 colomon jnthn++
00:48 Tene I'm always pleased when I see a commit message for a codebase I've never looked at and can successfully predict the character of the changes. :)
00:49 Tene rakudo: my $list := gather { for 1..* { .say; take $_ * $_ }}; say $list[^10]
00:49 p6eval rakudo 819e2c: OUTPUT«1␤2␤3␤4␤5␤6␤7␤8␤9␤10␤149162536496481100␤»
00:50 lestrrat is now known as lest_away
00:52 justatheory left #perl6
00:53 lest_away is now known as lestrrat
00:56 dalek 6model: afb4abf | jnthn++ | dotnet/runtime/Runtime/Signatures/ (2 files):
00:56 dalek 6model: Bind parameters into the lexpad using a positional index rather than a hash index. Wins us a bit. :-)
00:56 dalek 6model: review: http://github.com/jnthn/6model/commit/afb4abf4a2c2ea114cd37e96263f09b48c657624
00:56 jnthn Need to teach a Parrot that trick...
00:57 jnthn TimToady: I have a first form of the proto-controls multi-dispatch working in 6model for lexical multis.
00:58 jnthn TimToady: I didn't work out how to optimize it yet, so it sucks up about 15% of the runtime in a simple integer-loopy benchmark at the moment. And that's actually before we consider any wins from inlining.
00:59 jnthn Plus the multi-dispatcher is cheating like hell on comparing types.
01:00 jnthn Part of the fun is I want to work out a way to optimize it that I can implement in Parrot too.
01:00 jnthn Rather than having to re-invent a new approach there.
01:01 TimToady yay
01:02 jferrero left #perl6
01:02 jnthn Suspect the optimizations will come after my vacation anyways. :-)
01:03 jnthn (Going on Wed, laptop stays at home...)
01:03 TimToady er, yay, I guess...  :)
01:03 jnthn Think I worked out a way to handle :D and :U efficiently, if only we define them the right way.
01:03 colomon jnthn++
01:03 jnthn TimToady: It's yay in the long run.
01:04 TimToady I'm all in favor of people pacing themselves.
01:04 jnthn TimToady: I need the break; my concentration span has become appauling over the last couple of weeks.
01:04 [Coke] who's paul?
01:04 TimToady I could not have lasted ten years if I hadn't learned that.
01:05 mberends jnthn: are you perhaps feeling paurly?
01:05 jnthn Nothing that some days hiking in the Alps, and some hearty central European food washed down with good beer won't fix. :-)
01:05 jnthn My spelling is appalling too :P
01:05 TimToady "I find Paul appealing, but Peale appalling." --Adlai Stevenson
01:07 jnthn Sadly, my Redgate ANTS profiler trial will have run out when I get back from vacation.
01:07 colomon oh noez!
01:07 jnthn Will talk to $dayjob, they're a Redgate partner.
01:07 jnthn It is a *wonderful* tool.
01:08 colomon I keep on thinking about trying to get a profiler running on Rakudo.
01:09 jnthn Yes, Parrot has made a start in that area at least, but we just don't have it as good there yet.
01:11 jnthn What would be really cool is figgering out how to be able to step through Perl 6 code in Visual Studio.
01:12 colomon +1
01:14 BlueT_ left #perl6
01:21 ggoebel left #perl6
01:22 BlueT_ joined #perl6
01:24 whiteknight left #perl6
01:34 thundergnat joined #perl6
01:40 mberends left #perl6
01:41 thundergnat left #perl6
01:44 eternaleye left #perl6
01:45 eternaleye joined #perl6
01:45 dalek 6model: 0e96b52 | jnthn++ | dotnet/runtime/Runtime/ (3 files):
01:45 dalek 6model: Inline lexpads into contexts by making them structs, and a couple of related cleanups to make sure we're not needlessly shuffling data around.
01:45 dalek 6model: review: http://github.com/jnthn/6model/commit/0e96b52aeb4768b9aa77ca312b34a2433797b29b
01:45 dalek 6model: 50be0ea | jnthn++ | dotnet/compiler/PAST2DNSTCompiler.pm:
01:45 dalek 6model: Change missed from earlier commit to refactor signature parameter binding.
01:45 dalek 6model: review: http://github.com/jnthn/6model/commit/50be0ead4f70b6614136b9ad60ddcc582e07f401
01:45 eternaleye left #perl6
01:46 eternaleye joined #perl6
01:47 eternaleye left #perl6
01:47 melte left #perl6
01:47 eternaleye joined #perl6
01:49 melte joined #perl6
01:50 gfx joined #perl6
01:51 am0c left #perl6
01:51 dalek 6model: dcf5ee5 | jnthn++ | common/NQP/NQPSetting.pm:
01:51 dalek 6model: Make our != rather more efficient.
01:51 dalek 6model: review: http://github.com/jnthn/6model/commit/dcf5ee5e58e18781e9d1413a3fabc3e598e7bd7c
01:52 jnthn Enough twiddling...time to sleep.
01:58 crythias left #perl6
02:07 hercynium joined #perl6
02:18 tylercurtis joined #perl6
02:33 lue joined #perl6
02:40 justatheory joined #perl6
02:40 Pavlz left #perl6
02:41 justatheory left #perl6
02:41 justatheory joined #perl6
02:58 [Coke] phenny: tell moritz_ that I added a .revision file, and fixed --gen-parrot for partcl-nqp
02:58 phenny [Coke]: I'll pass that on when moritz_ is around.
03:06 draxil left #perl6
03:08 molaf joined #perl6
03:08 shade\ left #perl6
03:10 shade\ joined #perl6
03:14 plainhao left #perl6
03:30 wooden joined #perl6
03:30 wooden left #perl6
03:30 wooden joined #perl6
03:40 justatheory left #perl6
03:56 meppel joined #perl6
03:59 meppl left #perl6
04:04 sorear std: 1 >>+<<= 2
04:04 p6eval std 32094: OUTPUT«ok 00:01 116m␤»
04:07 tylercurtis std: 1 = 2
04:07 p6eval std 32094: OUTPUT«ok 00:02 116m␤»
04:11 sorear std: sub infix_circumfix_meta_operator:<« »>() {}; 1 «*» 2;
04:11 p6eval std 32094: OUTPUT«[31m===[0mSORRY![31m===[0m␤Confused at /tmp/ufCub9pfD1 line 1:␤------> [32mircumfix_meta_operator:<« »>() {}; 1 «*»[33m⏏[31m 2;[0m␤    expecting any of:␤  bracketed infix␤  infix or meta-infix␤      postfix␤        postfix_prefix_meta_operator␤Parse failed␤FAILED 00:01
04:11 p6eval ..121m␤»
04:12 sftp left #perl6
04:16 draxil joined #perl6
04:21 tylercurtis What's a postfix_prefix_meta_operator?
04:22 azert0x left #perl6
04:30 sorear @foo»++
04:31 sorear it's a prefix to the postfix
04:31 tylercurtis Ah, right.
04:32 * sorear is adding metaops to niecza
04:33 molaf left #perl6
04:51 gfx left #perl6
05:14 NOTevil left #perl6
05:15 Snowclone left #perl6
05:16 itz left #perl6
05:16 breinbaas left #perl6
05:16 itz joined #perl6
05:17 breinbaas joined #perl6
05:19 dalek niecza: 7bd8e6a | sorear++ | / (4 files):
05:19 dalek niecza: Implement += metaoperators
05:19 dalek niecza: review: http://github.com/sorear/niecza/commit/7bd8e6a6a1c310731ba545fa4551f00a2184dd35
05:22 m6locks left #perl6
05:22 tylercurtis rakudo: role A { method a {...} }; class B does A { has $.b handles <a>; }; say "alive"
05:22 p6eval rakudo 819e2c: OUTPUT«===SORRY!===␤A method named 'a' already exists in class 'B'. It may have been supplied by a role.␤»
05:23 tylercurtis That doesn't work. But this does:
05:23 tylercurtis rakudo: role A { method a {...} }; class B does A { has $.b; method a { $.b.a; } }; say "alive"
05:23 p6eval rakudo 819e2c: OUTPUT«alive␤»
05:23 tylercurtis Shouldn't the "handles <a>" be treated as defining a method a in the class, and thus override the role method a?
05:24 x3nU_ joined #perl6
05:30 dukeleto perl6: eval q<<< sub { my grammar A { regex TOP { \d+ } } }; >>>; eval q<<<grammar A { regex TOP { \s+ } } >>>;
05:30 p6eval pugs, rakudo 819e2c:  ( no output )
05:31 Guest23195 joined #perl6
05:31 shade\ left #perl6
05:31 bbkr left #perl6
05:31 pnu left #perl6
05:31 moritz_ left #perl6
05:31 simcop2387 left #perl6
05:32 shade\ joined #perl6
05:32 bbkr joined #perl6
05:32 pnu joined #perl6
05:32 moritz_ joined #perl6
05:32 simcop2387 joined #perl6
05:32 thebzu joined #perl6
05:32 x3nU left #perl6
05:33 shade\ left #perl6
05:33 dukeleto that is odd. that eval gives me this from the commandling perl6 binary: (datura)(~)$ perl6 -v
05:33 dukeleto This is Rakudo Perl 6, version 2010.08-13-g819e2ce built on parrot 2.7.0 r48587
05:33 dukeleto Copyright 2008-2010, The Perl Foundation
05:33 dukeleto (datura)(~)$ perl6
05:33 dukeleto >  sub { my grammar A { regex TOP { \d+ } } }; grammar A { regex TOP { \s+ } }
05:33 dukeleto !class_init_61
05:33 dukeleto > eval q<<< sub { my grammar A { regex TOP { \d+ } } }; >>>; eval q<<<grammar A { regex TOP { \s+ } } >>>;
05:33 dukeleto ===SORRY!===
05:34 dukeleto Illegal redeclaration of symbol 'A'
05:34 dukeleto oops, sorry, meant to paste a gist
05:34 dukeleto gist is at http://gist.github.com/547021
05:34 * dukeleto shakes fists at having multiple paste buffers
05:35 dukeleto i ran into this issue when attempting to declare a package scope grammar in PL/Perl6 and then use it later on
05:35 tylercurtis dukeleto: In that gist, the error looks to be because in the first line, you declare a "grammar A". Then again in the second eval, it attempts to create another "grammar A".
05:36 dukeleto if someone could shed light on whether that is the expected behavior or not, that would be awesome
05:36 sorear dukeleto: I expect it
05:36 sorear down to 100 sorries
05:36 dukeleto tylercurtis: oh, i see. the commandline used to have each input line with it's own scope
05:36 shade\ joined #perl6
05:37 dukeleto tylercurtis: yes, you are right :)
05:37 tylercurtis dukeleto: I'm going to guess that that doesn't solve your original problem, though, no?
05:40 sorear dukeleto: 'grammar' without 'my' is global, it doesn't care about scopes
05:40 sorear (technically only package global, but there are no packages there)
05:42 tylercurtis sorear: What exactly will it mean when you get that 100 sorries figure down to 0?
05:43 sorear It'll mean I'll start having to deal with frontend exceptions
05:43 sorear hopefully that phase won't last long
05:43 sorear niecza tries to generate error messages for code it can't handle... but not always
05:44 sorear after that will be dealing with undefined stuff, like &return
05:50 tylercurtis The N sorries count is for attempting to compile STD?
05:51 sorear yes
05:51 sorear there are a few things not caught at compile time that I know I'll need... like Cursor.at-key, the business end of $<foo>
05:58 tylercurtis sorear: do the tests in test.pl and test2.pl pass?
06:00 * tylercurtis is beginning to consider using Niecza for his planned Bennu rewrite.
06:05 uniejo joined #perl6
06:08 TimToady rakudo: sub hailstone($n) { $n, -> $n { $n %% 2 ?? $n / 2 !! $n * 3 + 1 } ... 1; }; say ~hailstone(27);
06:08 p6eval rakudo 819e2c: OUTPUT«(timeout)»
06:09 TimToady rakudo: sub hailstone($n) { $n, -> $n { $n %% 2 ?? $n / 2 !! $n * 3 + 1 } ... 1; }; say ~hailstone(5);
06:09 p6eval rakudo 819e2c: OUTPUT«5 16 8 4 2 1␤»
06:09 TimToady rakudo: sub hailstone($n) { $n, -> $n { $n %% 2 ?? $n / 2 !! $n * 3 + 1 } ... 1; }; say ~hailstone(10);
06:09 p6eval rakudo 819e2c: OUTPUT«10 5 16 8 4 2 1␤»
06:09 TimToady rakudo: sub hailstone($n) { $n, -> $n { $n %% 2 ?? $n / 2 !! $n * 3 + 1 } ... 1; }; say ~hailstone(20);
06:09 p6eval rakudo 819e2c: OUTPUT«20 10 5 16 8 4 2 1␤»
06:09 TimToady rakudo: sub hailstone($n) { $n, -> $n { $n %% 2 ?? $n / 2 !! $n * 3 + 1 } ... 1; }; say ~hailstone(27);
06:10 p6eval rakudo 819e2c: OUTPUT«src/string/api.c:3335: 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 [0x2aacfc933d73]␤/home/p6eval//p1/lib/libparrot.so.2.7.0(Parrot_confess+0x87)
06:10 p6eval ..[0x2aacfc933ea…
06:10 wtw joined #perl6
06:10 TimToady star: sub hailstone($n) { $n, -> $n { $n %% 2 ?? $n / 2 !! $n * 3 + 1 } ... 1; }; say ~hailstone(27);
06:10 p6eval star 2010.07: OUTPUT«27 82 41 124 62 31 94 47 142 71 214 107 322 161 484 242 121 364 182 91 274 137 412 206 103 310 155 466 233 700 350 175 526 263 790 395 1186 593 1780 890 445 1336 668 334 167 502 251 754 377 1132 566 283 850 425 1276 638 319 958 479 1438 719 2158 1079 3238 1619 4858 2429 7288
06:10 p6eval ..3644 1…
06:11 TimToady rakudo: sub hailstone($n) { $n, -> $n { $n %% 2 ?? $n / 2 !! $n * 3 + 1 } ... 1; }; say ~hailstone(27);
06:11 p6eval rakudo 819e2c: OUTPUT«src/string/api.c:3335: 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 [0x2b565746ed73]␤/home/p6eval//p1/lib/libparrot.so.2.7.0(Parrot_confess+0x87)
06:11 p6eval ..[0x2b565746eea…
06:11 TimToady on my machine, that prints out the array, but some of the entries are garbage
06:12 TimToady something like named  repr_P6opaque repr_P6opaque repr_P6opaque $!llsig $!llsig scalar scalar scalar scalar scalar scalar named named named named scalar scalar $!llsig $!llsig 137 412 206 103 310 155 466 233 700 350 175 526 263 790 395 1186 593 1780 890 44
06:14 sorear tylercurtis: everything in test.pl passes and is tested before push (xbuild /t:Test)
06:14 sorear tylercurtis: the stuff in test2 often doesn't; I use that for TDD
06:14 sorear when a feature is working, it's moved to the main testg
06:16 constant left #perl6
06:17 constant joined #perl6
06:17 constant left #perl6
06:17 constant joined #perl6
06:18 TimToady rakudo: sub hailstone($n) { $n, -> $n { $n %% 2 ?? $n / 2 !! $n * 3 + 1 } ... 1; }; say ~hailstone('27');
06:19 p6eval rakudo 819e2c: OUTPUT«27 82 41 124 62 31 94 47 142 71 214 107 322 161 484 242 121 364 182 91 274 137 412 206 103 310 155 466 233 700 350 175 526 263 790 395 1186 593 1780 890 445 1336 668 334 167 502 251 754 377 1132 566 283 850 425 1276 638 319 958 479 1438 719 2158 1079 3238 1619 4858 2429 7288
06:19 p6eval ..3644 1…
06:19 TimToady oddly, if I pass $n as a string, it works fine
06:20 sorear possibly issues of %% function on Num?
06:20 sorear or Rat rather
06:20 TimToady rakudo: sub hailstone($n) { $n, -> $n { $n %% 2 ?? $n div 2 !! $n * 3 + 1 } ... 1; }; say ~hailstone(27);
06:20 p6eval rakudo 819e2c: OUTPUT«27 82 41 124 62 31 94 47 142 71 214 107 322 161 484 242 121 364 182 91 274 137 412 206 103 310 155 466 233 700 350 175 526 263 790 395 1186 593 1780 890 445 1336 668 334 167 502 251 754 377 1132 566 283 850 425 1276 638 319 958 479 1438 719 2158 1079 3238 1619 4858 2429 7288
06:20 p6eval ..3644 1…
06:21 TimToady works better with div than with /
06:21 TimToady so you could be right
06:21 tylercurtis sorear: I'm now growing increasingly confident that Niecza is be the implementation I  want to use to run the rewritten Bennu (at least until the distant (assuming it ever happens) point at which I implement enough to be able to compile STD and Bennu with Bennu).
06:22 sorear Bennu is written in Perl 6?
06:22 TimToady funny it causes memory corruption on my machine though
06:24 tylercurtis The current version is, with a very small runtime in C. The rewrite will be written entirely in Perl 6. The runtime will be in ugly bootstrappy-pragma C in Perl 6 syntax.
06:26 sorear are you pllaning to fork it, or scrape --stop-after output, or something else entirely?
06:27 dalek niecza: f6e0c6a | sorear++ | / (2 files):
06:27 dalek niecza: Implement :foo«x y»
06:27 dalek niecza: review: http://github.com/sorear/niecza/commit/f6e0c6a083e4d9ac5aa058d047a511ecbe97cc13
06:27 dalek niecza: 7a1ca98 | sorear++ | / (3 files):
06:27 dalek niecza: Silently ignore type constraints on parameters
06:27 dalek niecza: review: http://github.com/sorear/niecza/commit/7a1ca987cd74ff81029619c99e1e53923a7f22b6
06:32 snearch joined #perl6
06:33 sorear 52
06:34 tylercurtis It sounds like you're making considerable progress towards being at the point where Niecza can compile STD. So, once that's possible, I'm hoping to essentially have a Bennu::Actions and do "STD.parse($foo, :actions(Bennu::Actions));" and then, of course, actual compilation and code-generation.
06:38 sorear The big features I know I'm still missing are roles, multimethods, and control exceptions
06:42 Guest23195 is now known as _kaare
06:43 agentzh joined #perl6
06:45 tylercurtis I think I can get by without those until you have them implemented as long as STD doesn't use them. If STD does use them, then I can just wait until you have them implemented.
06:46 sorear s/still missing/$/ & STD still needs/
06:51 TimToady STD uses roles for its mixins, and multimethods to the extent demanded by LTM
06:52 TimToady doesn't really do anything with control exceptions beyond what Perl 5 can do
06:52 sorear multi method tweak
06:53 TimToady ah, yes, that too
06:53 TimToady though that can be faked the way gimme5 did; does viv still turn them into conditionals?
06:55 tylercurtis I'm off to bed now, but I'm going to try building and playing around with Niecza a little tomorrow.
06:55 tylercurtis Good night, #perl6.
06:56 TimToady ah, I see what viv does now, nevermind
06:59 pnate joined #perl6
07:02 tylercurtis left #perl6
07:05 * sorear should probably get rid of the # DO NOT ERASE comments at some point
07:06 sorear I'm planning to do basically the same thing in niecza
07:06 sorear it won't be possible to sort alternatives anyway until the class hierarchy is generated at compile time
07:07 sorear most of the 'interesting' issues in current niecza concern infix:<but>
07:07 sorear (which I guess slangs will have to use)
07:07 flatwhatson left #perl6
07:10 moritz_ how can you get rid of them if you're not supposed to erase them? :-)
07:10 phenny moritz_: 02:58Z <[Coke]> tell moritz_ that I added a .revision file, and fixed --gen-parrot for partcl-nqp
07:13 dalek rakudo: f8763b8 | moritz++ | src/Perl6/Grammar.pm:
07:13 dalek rakudo: add word boundary assertion after alphabetic infix operators
07:13 dalek rakudo:
07:13 dalek rakudo: Fixes RT #77218
07:13 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/f8763b87dcc4b490d7c2ade93f58853bc052a37e
07:28 alanhaggai left #perl6
07:33 drbean left #perl6
07:33 zulon joined #perl6
07:33 wamba joined #perl6
07:33 simcop2387 left #perl6
07:36 simcop2387 joined #perl6
07:52 constant left #perl6
07:53 constant joined #perl6
07:53 constant left #perl6
07:53 constant joined #perl6
07:54 payload joined #perl6
07:54 payload left #perl6
07:56 thebird joined #perl6
08:12 * mathw discovers a class in a C++ project which is quite definitely really a role
08:12 mathw \o/ multiple inheritance allowing me to use it almost like one
08:12 Snowclone joined #perl6
08:18 dakkar joined #perl6
08:43 cogno joined #perl6
08:47 zostay left #perl6
08:47 pugssvn r32095 | moritz++ | [t/spec] tests for RT #77218, identifiers that start with an operator name
08:55 achromic left #perl6
08:56 drbean joined #perl6
08:56 cogno left #perl6
08:58 tadzik1 joined #perl6
08:58 cogno joined #perl6
08:59 tadzik left #perl6
08:59 tadzik1 is now known as tadzik
09:00 moritz_ http://www.perlmonks.org/?node_id=856849 another junctions-as-set abuse
09:04 kiffin joined #perl6
09:04 sorear Does it make any sense at all to have attributes in a grammar?
09:05 moritz_ I don't see why not
09:05 Baggio_ joined #perl6
09:05 moritz_ you'd have to instantiate before parsing to use them
09:06 Baggio_ left #perl6
09:06 moritz_ maybe in some cases that's saner than keeping all state in dynamic variables
09:07 osfameron moritz_: are junctions not *built on* sets?
09:07 moritz_ osfameron: no, they are not sets
09:08 moritz_ at least no in the sense that most people think
09:08 osfameron ah
09:08 moritz_ any(1, 2) could be seen as an infinite set
09:08 moritz_ because all sets that contain 1 or 2 match it, and there are infinitely many of those
09:08 osfameron the superficially set-like properties aren't deep enough to be interesting, basically ?
09:09 cogno left #perl6
09:10 moritz_ well, they are interesting, but that shouldn't let us forget separation of concerns
09:11 moritz_ they are specifically outside of the normal type hierarchy to allow type-based autothreading
09:11 Baggio_ joined #perl6
09:11 moritz_ now if we add set methods to junctions, they need to be exceptions to the autothreading rules
09:12 moritz_ and having many exceptions contradicts the design goal of junction being an intuitive thing to match against
09:12 Mowah joined #perl6
09:14 Baggio_ left #perl6
09:16 moritz_ osfameron: does that make some kind of sense to you?
09:16 moritz_ rakudo: {...}; say "alive"
09:16 p6eval rakudo f8763b:  ( no output )
09:17 BaggioKwok joined #perl6
09:19 masak joined #perl6
09:19 moritz_ rakudo: (sub { ... }).(); say "alive@
09:19 moritz_ rakudo: (sub { ... }).(); say "alive"
09:19 p6eval rakudo f8763b: OUTPUT«===SORRY!===␤Confused at line 22, near "say \"alive"␤»
09:19 p6eval rakudo f8763b: OUTPUT«alive␤»
09:19 osfameron moritz_: hmmm, I understand that junctions /do/ too much for them to be seen as sets.  I was just wondering whether a junction object was in fact built on top of a simpler "set" object that it'd be easier to point people at when they start using junctions for it
09:19 moritz_ rakudo: (sub { ... }).() + 1; say "alive"
09:19 p6eval rakudo f8763b: OUTPUT«Method 'Bridge' not found for invocant of class 'Failure'␤  in 'infix:<+>' at line 3427:CORE.setting␤  in main program body at line 22:/tmp/Qfy3kvoSLL␤»
09:20 moritz_ osfameron: hm... we have a Set type in rakudo, but it's poorly documented and tested
09:20 moritz_ rakudo: (sub { ... }).() ~ 1; say "alive"
09:20 p6eval rakudo f8763b: OUTPUT«Stub code executed␤  in 'infix:<~>' at line 1␤  in main program body at line 22:/tmp/NtTzlMvGZi␤»
09:21 moritz_ rakudo: use fatal; (sub { ... }).()
09:21 p6eval rakudo f8763b: OUTPUT«Stub code executed␤  in <anon> at line 1␤  in main program body at line 22:/tmp/7l7y5B7Dx5␤»
09:22 pugssvn r32096 | moritz++ | [t/spec] some stub code tests; should eventually be moved to a file on its own
09:24 drbean left #perl6
09:24 pugssvn r32097 | moritz++ | [t/spec] test for RT #75828, series operator after comma is caught
09:24 masak <x3nU> seriously, perl6 *really* needs a good tutorial, it would bring a lot of supporters
09:25 masak nuh, yah.
09:25 BaggioKwok left #perl6
09:26 BaggioKwok joined #perl6
09:26 phenny masak: 23 Aug 20:28Z <mberends> tell masak oha++'s Socket.pm and INET.pm patch in http://gist.github.com/543580 tests out OK on all the webservers unmodified in http://github.com/mberends/http-server-simple/tree/master/examples/ so it looks good to commit it. This does not prove binary file I/O yet however, that requires some rewriting.
09:27 moritz_ well, we're writing a book that will be available as a PDF for free - isn't that a good start? :-)
09:27 masak it is.
09:27 mathw :)
09:27 masak mberends: I'll see about applying tonight or tomorrow.
09:28 BaggioKwok left #perl6
09:29 masak interesting comments at http://linuxfr.org/~darkhad/29968.html -- Perl 6 the Soap Opera?
09:30 masak I did not intend to give that impression when writing the original post, but I guess presenting the road as sufficiently non-straight gives some people such an impression anyway.
09:31 masak Rakudo Star release on Thursday?
09:31 moritz_ I thought tonight?
09:32 masak oh. that sounds right, actually.
09:32 mathw If only I spoke French
09:32 masak mathw: there's something called "the Internet" which can translate for you nowadays. quite neat.
09:33 * masak wipes the sarcastic smirk off his face :P
09:33 masak moritz_: was there a "cpan6" meeting today as well?
09:33 moritz_ masak: let's ask sorear about it
09:34 lichtkind joined #perl6
09:34 frettled mathw: "Show romanization
09:34 frettled urghle
09:34 lichtkind hai
09:34 frettled mathw: "Monsieur, vous êtes une peau de vache!"
09:34 mathw masak: usually with quite amusing levels of mistranslation
09:34 masak because if it's 3 hours before #phasers, I'm afraid I can not attend today. I can in general, but due to my exam, I can't today.
09:34 frettled mathw: (a classic insult)
09:34 moritz_ rakudo: say (False, &prefix:<!> ... *).[^10].perl
09:34 masak mathw: still a very good help to grasping what is being said.
09:34 fod left #perl6
09:34 p6eval rakudo f8763b: OUTPUT«get_attr_str() not implemented in class 'Perl6MultiSub'␤  in 'infix:<...>' at line 1␤  in main program body at line 22:/tmp/JDT_MAk9ME␤»
09:34 frettled
09:34 masak lichtkind: hi, child of light.
09:35 lichtkind masak: :)
09:35 frettled masak: what kind of exam?
09:35 masak lichtkind: ...with a warm smile befitting of #perl6 :)
09:35 zag joined #perl6
09:35 masak frettled: Organisk Kemi med Analytiska Tekniker
09:35 moritz_ sounds like fun
09:35 lichtkind masak: i just came to bully moritz_  :)
09:36 frettled masak: ooh.  There must be a use for Perl 6 there!
09:36 masak frettled: stress falls on the penultimate syllable of the last word :P
09:36 masak frettled: I'm sorely tempted to make a full-featured IUPAC <-> molecule converter.
09:36 frettled masak: Just as well, I wouldn't want to do that kind of chemistry with an analytic technician
09:37 frettled masak: ooh, that would be immensely cool
09:37 masak moritz_: it's an interesting course. quite a bit of orbital theory in it.
09:37 moritz_ masak: I've heard that theoretical chemistry is close to some branches of applied quantum mechanics :-)
09:37 masak moritz_: also, I know my brain has been warped by the course. yesterday while reviewing a chapter, I found myself looking at a reaction, thinking "no wai! show me the mechanism for that!". wouldn't have happened a few weeks ago. :)
09:38 frettled Can you confirm that orgchem students often sniff (CH3)2CO? :D
09:38 frettled (re "brain warped by the course")
09:38 masak frettled: unless that compound exudes from the book, I haven't been sniffing it in the past week.
09:39 sorear masak: moritz++ has apparently decided that it's today, yes
09:39 thebird left #perl6
09:39 wamba left #perl6
09:39 _kaare left #perl6
09:39 lue left #perl6
09:39 barika left #perl6
09:39 nadim left #perl6
09:39 huf left #perl6
09:39 phenny left #perl6
09:39 renormalist left #perl6
09:39 aesop left #perl6
09:39 moritz_ have I? :-)
09:39 masak go on an have it without me. I'll read the logs.
09:39 masak I only have one datum to contribute anyway.
09:39 ggoebel joined #perl6
09:39 masak give me a moment, and I'll remember what it was. :)
09:39 sorear ggoebel: have you reported the mono 2.6.7 bug yet?
09:40 frettled masak: good, good, I hope your brain survives
09:40 thebird joined #perl6
09:40 wamba joined #perl6
09:40 _kaare joined #perl6
09:40 lue joined #perl6
09:40 barika joined #perl6
09:40 nadim joined #perl6
09:40 huf joined #perl6
09:40 phenny joined #perl6
09:40 renormalist joined #perl6
09:40 aesop joined #perl6
09:40 sorear I'm hoping that having a meeting this week, even a tiny unproductive one, will act as a leader to some big lightning bolt of a discussion next week
09:41 timbunce joined #perl6
09:45 moritz_ hugme: add lichtkind to book
09:45 * hugme hugs lichtkind. Welcome to book!
09:46 tadzik oh oh, tonight?
09:47 moritz_ did we say 1600 UTC?
09:47 masak moritz_++ # "OH NOEZ!" in #77394 :)
09:47 moritz_ whoa there, somebody reads my tickets
09:48 sorear moritz_: yes
09:48 masak they land on p6c, and I tend to brief through them.
09:49 masak mainly so as to avoid unnecessarily double-submitting.
09:50 * moritz_ tends to grief about them
09:51 sorear griefing tickets?
09:51 moritz_ oh, I meant grieve
09:52 * moritz_ can't spell
09:52 moritz_ grieving RT - a hacker's lament
09:53 masak Rt tickets are love. no need to grieve.
09:54 sorear a lament? really?
09:59 tadzik Parrot needs a LOLCODE compiler
10:00 mathw I thought it already had one
10:00 moritz_ parrot had a lolcode compiler
10:00 moritz_ no idea if it's still working
10:00 mathw bring it back!
10:00 mathw compiler necromancy!
10:00 tadzik I'd love writing in LOLCODE using e.g. Perl 6's Web
10:01 moritz_ http://trac.parrot.org/parrot/wiki/Languages lists it as "Inactive, retired or dormant"
10:01 moritz_ builds against parrot 2.4.0
10:02 moritz_ shouldn't be too hard to resurrect
10:02 jnthn Afternoon
10:02 tadzik fixing it sounds like fun
10:02 tadzik o/ jnthn
10:02 moritz_ \o jnthn
10:02 mathw \o/ jnthn
10:02 mathw |
10:02 mathw \
10:02 mathw bah
10:02 tadzik http://trac.parrot.org/languages/browser/lolcode/trunk # how do I clone this one?
10:02 * sorear out
10:03 moritz_ git svn clone http://trac.parrot.org/languages/browser/lolcode/trunk
10:03 moritz_ or svn co $url
10:03 masak \o/ jnthn
10:04 tadzik moritz_: the thing is it's not an svn url
10:04 moritz_ oh
10:04 tadzik I can't see the real one
10:04 moritz_ https://svn.parrot.org/languages/lolcode/trunk/
10:05 tadzik moritz_++
10:05 tadzik hey, it actually works
10:06 tadzik or maybe it doesn't
10:06 tadzik yes, it does :)
10:07 moritz_ indeed
10:07 moritz_ fascinating
10:08 moritz_ might need switchting to nqp-rx in the long run
10:08 moritz_ unless somebody did that already
10:08 tadzik it passes all tests, and is quite fast :)
10:08 azert0x joined #perl6
10:09 moritz_ tadzik: http://yapc.tv/2008/ye/lt/lt2-09-pmichaud-haz-a-compiler/ if you don't know it yet
10:10 tadzik never seen it, thanks moritz_++
10:12 BaggioKwok joined #perl6
10:12 masak this is it, folks. see you on the other side.
10:12 masak left #perl6
10:14 snearch left #perl6
10:25 tadzik left #perl6
10:26 lestrrat is now known as lest_away
10:27 BaggioKwok left #perl6
10:29 bbkr STD eval is down?
10:30 bbkr std: 1;
10:30 p6eval std :  ( no output )
10:30 moritz_ msg <bbkr> std: say "a" ~~ m:i:i/A/
10:30 moritz_ Can't chdir to '../../src/perl6/snap': No such file or directory at lib/EvalbotExecuter.pm line 134
10:31 moritz_ + 4 screen pages of enterprise-grade stack traces
10:32 bbkr rakudo: say "a" ~~ m:i/:i A/ # this should die in the same way as m:i:i/A/, am I right?
10:32 p6eval rakudo f8763b: OUTPUT«a␤»
10:32 bbkr rakudo: say "a" ~~ m:i:i/A/
10:32 p6eval rakudo f8763b: OUTPUT«duplicate named argument in call␤  in main program body at line 22:/tmp/FjoThAtxNU␤»
10:33 moritz_ hm
10:33 moritz_ I'm not sure if that's correct
10:33 bbkr I'll wait for STD eval to confirm
10:34 moritz_ even if m:i:i// should die, I'm not sure if m:i/:i/ should
10:34 ggoebel left #perl6
10:34 moritz_ looks to me like the regex starts something like a new scope
10:34 moritz_ and my $x; { my $x }  isn't forbidden either
10:34 ruoso left #perl6
10:37 agentzh left #perl6
10:46 felipe joined #perl6
10:50 bbkr std: "a" ~~ m:i:i/A/
10:50 p6eval std 32097: OUTPUT«ok 00:01 118m␤»
10:50 bbkr std: "a" ~~ m:i/:iA/
10:50 p6eval std 32097: OUTPUT«[31m===[0mSORRY![31m===[0m␤Unrecognized regex modifier :iA at /tmp/neu2wc9gMj line 1:␤------> [32m"a" ~~ m:i/:iA[33m⏏[31m/[0m␤Check failed␤FAILED 00:01 118m␤»
10:50 bbkr std: "a" ~~ m:i/:i A/
10:50 p6eval std 32097: OUTPUT«ok 00:01 118m␤»
10:50 bbkr then it looks like Rakudo is too restrictive about  m:i:i/A/ form
10:51 * bbkr reports
10:53 zulon left #perl6
10:53 pnate left #perl6
10:55 shade\ left #perl6
10:56 shade\ joined #perl6
11:00 Mowah left #perl6
11:00 zag left #perl6
11:02 zag joined #perl6
11:02 Mowah joined #perl6
11:06 daxim joined #perl6
11:08 pmurias joined #perl6
11:12 am0c joined #perl6
11:13 bbkr rakudo: say "a" ~~ m:nth(Mu)/a/ # bang!
11:13 p6eval rakudo f8763b: OUTPUT«maximum recursion depth exceeded␤  in 'EnumMap::Capture' at line 4869:CORE.setting␤  in 'EnumMap::Capture' at line 4873:CORE.setting␤  in 'prefix:<|>' at line 677:CORE.setting␤  in 'Cool::match' at line 2406:CORE.setting␤  in 'Cool::match' at line 2406:CORE.setting␤  in
11:13 p6eval ..'Cool::matc…
11:14 pmurias left #perl6
11:15 bbkr why recursion? I thought nth match is just plain iteration...
11:15 bbkr anyway, doesn't look good
11:15 * bbkr reports
11:20 bbkr rakudo: say "a" ~~ m:nth(Any)/a/ # how about this one? it is correct on STD but i'm not sure about result produced
11:20 p6eval rakudo f8763b: OUTPUT«a␤»
11:25 c9s left #perl6
11:31 meppel is now known as meppl
11:36 moritz_ the code tests the presence with .defined
11:37 moritz_ which is a sensible thing to do, if you ask me
11:38 moritz_ std: 1
11:38 p6eval std 32097: OUTPUT«ok 00:01 114m␤»
11:42 envi^home joined #perl6
11:42 bbkr rakudo: say "aa" ~~ m:nth(Any, Any)/aa/ # then this one should not warn, right?
11:42 p6eval rakudo f8763b: OUTPUT«Use of uninitialized value in numeric context␤0␤»
11:42 moritz_ that's something different
11:43 moritz_ there the $nth parameter is defined
11:43 moritz_ it's a list
11:43 moritz_ and the implementation is free to assume it's a list of ints
11:44 bbkr moritz_: right. I keep forgetting that (1) === 1 in P6
11:45 jferrero joined #perl6
11:45 * bbkr is back to bughunt
11:46 * moritz_ thinks we should switch roles for a while... masak, cognominal and bbkr fix bugs, and jnthn and pmichaud report them :-)
11:49 bbkr I have to say I like P6 team attitude towards RT. most of programmers consider bug ticket as attack to their skills, not a information of how to improve code. P6 will be awesome piece of software :)
11:49 lichtkind left #perl6
11:52 dangbinghoo joined #perl6
11:53 ggoebel joined #perl6
11:54 dangbinghoo hello
11:54 dangbinghoo is there any book about learning perl6?
11:55 moritz_ yes
11:55 moritz_ http://github.com/perl6/book/downloads
11:55 Siddy joined #perl6
11:55 moritz_ not yet finished, but should be usable
11:56 bbkr rakudo: say "me" ~~ m:i/<[M]>/ # quick question - should :i modifier also ignorecase ranges, or is that given up P5ism?
11:56 p6eval rakudo f8763b: OUTPUT«␤»
11:56 bbkr s/ranges/character-classes/
11:56 moritz_ bbkr: I guess they should be case ignoran too
11:56 * bbkr reports
11:57 dangbinghoo moritz_: thank you!
11:57 Trashlord left #perl6
11:57 moritz_ dangbinghoo: you're welcome; you can also find most perl 6 related links somewhere on perl6.org
11:59 ggoebel phenny: tell sorear just reported the mono bug. I'm wondering if anyone will agree that failure to compile hello world is a critical failure? (https://bugzilla.novell.com/show_bug.cgi?id=634017)
11:59 phenny ggoebel: I'll pass that on when sorear is around.
11:59 dangbinghoo moritz_: yeah, thanks
11:59 pugssvn r32098 | moritz++ | [t/spec] tests for RT #77356, lexicals in subset declaration; also fix a few tests that made wrong assumptions about the scope of symbols (related to eval_dies_ok)
12:00 moritz_ ggoebel: it'll probably be useful to include a backtrace from gdb in that bug report
12:09 snearch joined #perl6
12:10 ruoso joined #perl6
12:11 bluescreen joined #perl6
12:11 bluescreen is now known as Guest82435
12:13 Cyrus left #perl6
12:13 mdxi left #perl6
12:14 ggoebel moritz: added a backtrace... note if you assume complete ignorance on my part, you'll not overestimate my knowledge of mono, c#, .Net, or most other things.
12:14 ggoebel moritz: the good news I've heard is that ignorance can be cured...
12:14 lest_away left #perl6
12:14 moritz_ it can indeed
12:14 moritz_ through a process called "learning"
12:14 bbkr yep, by removing :i modifier :D
12:16 smash_ joined #perl6
12:16 smash_ hello everyone
12:16 moritz_ oh hai
12:18 smash_ moritz_: sorry, haven't had time to push my CGI-Cookie to github yet
12:18 moritz_ smash_: no worries, I've been busy with other projects anyway
12:19 smash_ PaFo elections took all my spare time this weekend
12:20 sftp joined #perl6
12:21 Italian_Plumber joined #perl6
12:22 pugssvn r32099 | moritz++ | [t/spec] basic test for --help
12:23 moritz_ that's a disadvantage of having yet another foundation
12:24 [Coke] moritz_: hio
12:24 smash_ moritz_: anyway i already created the repo on github and set you up as collaborator, i'll upload what i have later
12:25 dalek rakudo: 82c9e96 | moritz++ | t/spectest.data:
12:25 dalek rakudo: run test(s) for --help
12:25 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/82c9e96c18d9579e2d2e28dad30d9c1eb43ee677
12:29 moritz_ hi [Coke]. I've installed a cron job that rebuilds partcl-nqp every date at 0330 UTC
12:30 mdxi joined #perl6
12:31 moritz_ running that now, and will look at the generated .revision file once it's finished
12:31 Cyrus joined #perl6
12:31 [Coke] moritz_++ !
12:31 lest_away joined #perl6
12:31 lest_away is now known as lestrrat
12:33 [Coke] moritz_: it's the full SHA1. (I just grabbed the git command from rakudo that was pulling the revision). Is that sufficient?
12:33 moritz_ [Coke]: I'll patch p6eval to extract the first 6 digits
12:34 moritz_ would be a bit spammy to use all the digits in the evalbot output
12:34 drbean joined #perl6
12:36 hercynium left #perl6
12:36 moritz_ took about 6.5 minutes to rebuild parrot and partcl
12:37 [Coke] @git log -1 --pretty=format:%H > .revision
12:37 [Coke] (If you want, I can change that. evalbot is the only thing using it am.)
12:37 [Coke] *atm
12:37 moritz_ no, currently I have a quite evil hack in the rakudo build script to get a shorter revision number
12:38 moritz_ and now I have the perfect reason to remove that hack, and put the shortening code into p6eval
12:38 ggoebel left #perl6
12:40 pugssvn r32100 | moritz++ | [evalbot] report partcl-nqp revision
12:42 ruoso left #perl6
12:43 dangbinghoo so perl6 released?
12:43 moritz_ dangbinghoo: a Perl 6 compiler named Rakudo had several releases so far
12:43 Mowah left #perl6
12:43 [Coke] We need to add that to the faq in the release. :|
12:43 Mowah joined #perl6
12:44 slavik joined #perl6
12:44 p6eval left #perl6
12:44 dangbinghoo moritz_:  Rakudo Star is the Perl 6 release?
12:45 moritz_ dangbinghoo: Rakudo Star is *a* Perl 6 release
12:45 p6eval joined #perl6
12:45 [Coke] dangbinghoo: /a/ perl 6 release.
12:45 moritz_ and not a production release
12:45 [Coke] but yes.
12:47 Mowah left #perl6
12:47 Mowah joined #perl6
12:49 dangbinghoo moritz_: but it seems that Rakudo Star is the most complete Perl 6 implemention. I'm reading blogs on pugs.blogs.com, says that Rakudo Star is the new start of Perl 6
12:49 moritz_ yes, it's probably the most usable and most complete compiler at the meoment
12:50 dangbinghoo it says that Perl 6 is now ready because of Rakudo Star.
12:51 pugssvn r32101 | moritz++ | [evalbot] s/partcl-nqp/partcl/ for Coke++
12:51 p6eval left #perl6
12:51 p6eval joined #perl6
12:52 moritz_ it is ready for some things, and not for others
12:52 moritz_ for example rakudo is mightily slow
12:52 moritz_ if that is a problem for you, then it's not ready for you
12:53 dangbinghoo left #perl6
12:54 perlygatekeeper joined #perl6
12:57 mathw I guess it's a problem
12:57 takadonet hehe
12:58 [Coke] partcl: namespace eval moritz { puts moritz++ }
12:58 p6eval partcl d55427: OUTPUT«moritz++␤»
12:58 [Coke] partcl: namespace eval moritz { puts moritz_++ } ;# use right nick. =-)
12:58 p6eval partcl d55427: OUTPUT«moritz_++␤»
12:59 moritz_ a _ more or less doesn't impair my happiness
12:59 moritz_ hey, that was almost a rhyme
12:59 zulon joined #perl6
12:59 jnthn You're a poet but didn't know it ;-)
13:00 moritz_ I accidentally a poet!
13:02 ruoso joined #perl6
13:02 [Coke] moritz_: looks like the short version is just a format of %h instead of %H.
13:02 [Coke] (so let me know if you want me to fix it. Thanks again. =-)
13:03 javs joined #perl6
13:06 drake1 joined #perl6
13:07 drake1 hello, how do you do something like line 37 in http://www.gangsterfreak.com/file:paste ?
13:08 zulon left #perl6
13:08 drake1 simply exchanging -> with `.' ?
13:08 PerlJam drake1: @psf_read[$psf].($.csize, $.font, $char);  # probably.
13:08 orafu left #perl6
13:09 drake1 alright
13:09 orafu joined #perl6
13:09 drake1 that's actually nicer
13:09 drake1 PerlJam: so dots are not only for methods?
13:10 moritz_ $.font is the same as self.font
13:10 PerlJam drake1: what moritz said
13:10 pmurias joined #perl6
13:10 moritz_ so it is a method call
13:10 drake1 ok
13:10 pmurias hello
13:10 moritz_ but you usually write accesses to public attributes that way
13:10 moritz_ hi pmurias
13:13 x3nU_ is now known as x3nU
13:13 cognominal bbkr, on attitude about bug reports. This goes even further than you say, because I whine about stuff that may be important for a user. But fixing them may steal time better used on long term architectural stuff.  jnthn++  and pmichaud++ for their patience.
13:14 kirillm joined #perl6
13:15 kirillm left #perl6
13:16 peters_mops left #perl6
13:16 peters_mops joined #perl6
13:16 kirillm joined #perl6
13:18 PerlJam drake1's question got me  thinking about contexts a little. "$.foo" is really the same as "item self.foo"  and "@.foo" is really the same as "list self.foo" and "%.foo" is really the same as "hash self.foo".  Right?  That's the wordy way to provide context.
13:19 PerlJam If that's all true, what's the wordy contextualizer for "&.foo"  ?
13:20 moritz_ none; there's no operation that coerces a non-code object to a code object
13:20 moritz_ btw 15:09 < drake1> that's actually nicer
13:20 moritz_ sorry
13:20 moritz_ http://ridiculousfish.com/blog/archives/2006/05/30/old-age-and-treachery/ is what I wanted to share - nice read
13:21 drake1 moritz_: then whats the 6y alternative?
13:23 drake1 the array index should be cast to a function
13:24 moritz_ WHY?
13:24 drake1 because the psf version has special read algorithms
13:25 drake1 eg. version 1 and 2 use different algorithms
13:25 drake1 mapped to different index's
13:25 moritz_ I'm not sure we're talking about the same thing
13:26 moritz_ 15:19 < PerlJam> If that's all true, what's the wordy contextualizer for "&.foo"  ?
13:26 moritz_ why would one want a callable context?
13:26 drake1 I mean about line 37 in that paste
13:27 moritz_ huh - din't PerlJam answer that question already?
13:27 drake1 not very clear
13:27 PerlJam what was unclear?
13:28 drake1 whether dots is for methods or values
13:28 PerlJam moritz_: consistency.  (a foolish one perhaps :)
13:28 moritz_ drake1: then it's good style to ask for clarificaion, not just ask the same question again
13:28 moritz_ didn't I answer that too?
13:28 moritz_ 15:10 < moritz_> $.font is the same as self.font
13:29 moritz_ 15:10 < moritz_> so it is a method call
13:29 drake1 but self.font seems like some other language
13:29 PerlJam drake1: really? which one?  :)
13:29 moritz_ it's also Perl 6 :-)
13:29 drake1 PerlJam: struct objects in C
13:30 PerlJam I assure you, it is Perl 6.
13:30 drake1 ok
13:30 [particle] there's plenty of clarification in the spec on that matter.
13:30 drake1 so the non dollar dot strings return a void object?
13:31 PerlJam er, what?
13:31 drake1 if you don't prefix with the dollar, what's the return value?
13:31 jnthn whatever the thing you call returns
13:31 jnthn without any context applied
13:31 drake1 hmm
13:31 PerlJam drake1: whatever the return value is of the method you're calling
13:32 moritz_ (fwiw currently rakudo doesn't force the context as it should
13:32 jnthn (In Perl 6, there's no wantarray or anything like that.)
13:32 moritz_ )
13:32 jnthn (So it's no problem to not know the context.)
13:32 moritz_ rakudo: class A { has @.b = (1, 2); method check { say %.b.perl } }; A.new.check
13:32 p6eval rakudo 82c9e9: OUTPUT«[1, 2]␤»
13:33 PerlJam drake1: $.foo is the same as self.foo,  .foo  is the same as $_.foo  Is that your difficulty?
13:33 moritz_ that's wrong
13:33 moritz_ (rakudo's output, not PerlJam :-)
13:33 drake1 PerlJam: sounded like you were unsure
13:33 PerlJam drake1: so far  today, I've only been unsure about a wordy contextualizer for subroutines.
13:34 moritz_ rakudo: sub curry($x) { { $x } }; my $c = curry 3; say $c()
13:34 drake1 ``self'' is similar to the former symbol table, then?
13:34 p6eval rakudo 82c9e9: OUTPUT«invoke() not implemented in class 'Integer'␤  in main program body at line 22:/tmp/y1dYLQTu9o␤»
13:35 moritz_ no; self is a lexical that holds the invocant
13:35 drake1 ok
13:35 moritz_ rakudo: sub curry($x) { sub { $x } }; my $c = curry 3; say $c()
13:35 p6eval rakudo 82c9e9: OUTPUT«3␤»
13:35 moritz_ PerlJam: you can write a callable contextualizer like that, if you want :-)
13:36 jnthn moritz_: -> { $x } too if you really just want a block.
13:36 moritz_ or {; $x }
13:37 jnthn I think that'd still be taken as an inline block
13:37 jnthn (It's inline vs closure that's the tripping point here, not block vs hash)
13:37 moritz_ oh.
13:37 moritz_ right
13:38 Siddy left #perl6
13:38 ruoso left #perl6
13:40 pmichaud good morning, #perl6
13:40 phenny pmichaud: 23 Aug 19:38Z <moritz_> ask pmichaud it seems that the p6regex tests in nqp-rx assumes that nqp-rx should support the :x($count) modifier -- is that sitll a valid assumption?
13:41 jnthn morning, pmichaud
13:41 pmichaud moritz_: no, those tests are left over from the pge days...
13:41 moritz_ ok, I'll get rid of them (and of the :nth tests too)
13:41 pmichaud wfm
13:41 cognominal rakudo:  sub curry($x) {  *  }; my $c = curry 3; say $c()
13:41 p6eval rakudo 82c9e9: OUTPUT«invoke() not implemented in class 'Whatever'␤  in main program body at line 22:/tmp/7oynNW6Ys_␤»
13:42 moritz_ fyi, 'make test' in nqp-rx now runs the p6regex tests too
13:42 pmichaud does it pass all of them?
13:42 pmurias left #perl6
13:42 pmichaud I had them separate because not all of the p6regex tests were passing yet.
13:42 cognominal should that work?
13:42 pmichaud cognominal: no.
13:42 moritz_ well, I did some fudging
13:42 moritz_ to make them all pass
13:43 pmichaud moritz_: okay, I'll take a look.
13:43 moritz_ I also updated some to the new regex syntax
13:44 pmichaud all of the rx_backtrack tests are being skipped?
13:45 [Coke] wasn't someone saying a few days ago "but surely those parrot strings would get freed in the first GC anyway?"
13:45 moritz_ pmichaud: yes; many of them tested ::, which was too much of a hassle for me to fudge
13:45 pmichaud oh.
13:45 [Coke] (because about the same time, someone in parrot noticed that that was in fact not the case.)
13:46 pmichaud but the rx_backtrack tests (the ones that do work) are pretty important.
13:46 * [Coke] ponders trying to pick pmichaud's brain.
13:46 pmichaud [Coke]: pick my brane about what?  ;-)
13:46 moritz_ pmichaud: should I split the :: tests off into another file?
13:46 pmichaud moritz_: that might be better.
13:46 uniejo left #perl6
13:47 moritz_ oh, not so many as I thought... maybe I'll just fudge them in-place
13:48 dalek nqp-rx: f32c0d3 | moritz++ | t/p6regex/rx_modifiers:
13:48 dalek nqp-rx: get rid of some regex modifier tests that are (intentionally) no longer supported
13:48 dalek nqp-rx: review: http://github.com/perl6/nqp-rx/commit/f32c0d3cfa249e114b2455b53a95253fc15030f8
13:49 pmichaud another possibility is that we could change the p6regex harness to be nqp, now.
13:49 pmichaud instead of .pir
13:49 pmichaud but that's a longer-term change, I suspect.
13:49 pmichaud in general, I'd like to see that spectests and p6regex and <other engine>  can all live from the same body of tests.
13:50 pmichaud that's a little hard to do with the S05-* tests written as p6 scripts, though.
13:52 dangbinghoo joined #perl6
13:53 pmichaud [Coke]: still pondering?  ;-)
13:53 [Coke] pmichaud: trying to make a past::var in package scope go for the get_hll_global instead of just get_global.
13:54 pmichaud coke:  oh... just specify  :namespace([])
13:54 pmichaud that makes it look in hll_global
13:54 [Coke] http://github.com/partcl/partcl-nqp/blob/master/src/Partcl/Actions.pm#L176
13:54 [Coke] pmichaud: ... Oy. Danke.
13:57 [Coke] That almost seems obvious, thank you. =-)
13:58 pmichaud afk for ~1h
13:58 [Coke] pmichaud++
14:00 dalek nqp-rx: c7b2af5 | moritz++ | t/p6regex/ (2 files):
14:00 dalek nqp-rx: fudge backtracking tests, and run them again
14:00 dalek nqp-rx: review: http://github.com/perl6/nqp-rx/commit/c7b2af5ea558ec86abbbc6123e00af5e1c3dd953
14:08 lala left #perl6
14:10 pmurias joined #perl6
14:10 drake1 how do you return the "errno" of a failed system call?
14:11 drake1 maybe just return undef and specify that errno has the condition
14:12 wtw left #perl6
14:13 drbean left #perl6
14:13 ggoebel joined #perl6
14:14 ggoebel hello perl6
14:14 colomon o/
14:14 takadonet ggoebel: morning
14:16 wtw joined #perl6
14:16 drake1 then what about intermixed high level abstractions
14:19 drake1 return value from constructor: undef - get the error code from $! or internal class property would be thread unsafe
14:20 pmurias left #perl6
14:20 zag left #perl6
14:21 moritz_ the idea is to return a Failure object which is undefined, but contains information about the failure
14:22 drake1 then how would the call know how to distinguish an error object from the object it's trying to construct?
14:23 alester joined #perl6
14:23 moritz_ drake1: it's a different type for once
14:23 drake1 so they have to type check
14:23 moritz_ and if you try to call your normal methods on a Failure, it will blow up violently
14:23 moritz_ so when you write
14:23 moritz_ my $fh = open 'filename.txt';
14:23 moritz_ for $fh.lines { .say }
14:24 moritz_ then the $fh.lines blows up, telling you that the open() failed
14:24 moritz_ or you can say
14:24 jdv79 open doesn't throw itself?
14:24 moritz_ my $fh = open 'filename.txt';
14:24 moritz_ if $fh.defined { say "open worked" }
14:24 moritz_ and it will not blow up
14:24 moritz_ jdv79: no, unless you 'use fatal;'
14:24 drake1 moritz_: then it's better to pass the $file pointer
14:25 drake1 from the caller
14:25 moritz_ huh?
14:25 jdv79 weird.  i'd like to see the motivation for that.
14:25 drake1 because then you don't have to intermix with system codes
14:25 moritz_ jdv79: parallelization
14:25 moritz_ jdv79: you don't want some parallel operation to abort, just because 1 of the 5 million operations died
14:25 jdv79 oh, laziness?
14:26 moritz_ http://perlgeek.de/blog-en/perl-6/failing-softly.html
14:26 drake1 open $file, "filename" |die "$!"; my $obj = new CLASS $file
14:27 moritz_ that's not Perl 6 code
14:27 moritz_ and I don't see why you should write something like that
14:27 drake1 but then you still need to have an error code for the read and write calls, damnit
14:28 moritz_ why?
14:28 jdv79 ah, ok
14:28 moritz_ drake1: did you read the link?
14:28 drake1 moritz_: for proper error messaging
14:28 drake1 moritz_: im about to
14:28 moritz_ drake1: why? the failure object knows what went wrong
14:30 drake1 moritz_: yes, but how would the caller see whether it's a failure object or a good one?
14:30 moritz_ drake1: why should it care?
14:30 drake1 if $obj.error
14:30 moritz_ drake1: it can just use it as if its a normal object
14:30 moritz_ and if it's an error, it blows up
14:30 moritz_ or it can check for .defined
14:30 moritz_ but I wrote tha already
14:31 drake1 I don't think it's a good idea to blow it up
14:31 gfldex did you try?
14:31 drake1 that's what I do atm
14:32 drake1 heheh
14:32 moritz_ well, you can always check, and don't blow up
14:33 gfldex is there a nice way to branch on the type of a value
14:33 gfldex beside MMD
14:33 drake1 something like: my $object = new PACKAGE "filename"; die if $object.error ?
14:34 gfldex die unless $object.defined
14:34 jdv79 pretty neat.  i did not know about soft exceptions.
14:34 jdv79 thx!
14:34 drake1 gfldex: yeah
14:34 TimToady more like lazy exceptions
14:34 moritz_ drake1: if you want it to die, why not just use it, and let it blow up during the usage?
14:35 drake1 moritz_: because it's unethical
14:35 moritz_ drake1: it's not unethical in Perl 6
14:35 drake1 ok then
14:35 TimToady it is a way to achieve clarity
14:35 TimToady the advantages of 'use fatal' without the disadvantages
14:35 drake1 moritz_: no. because that would kill the application who use it
14:36 moritz_ drake1: and calling die() wouldn't?
14:36 gfldex if you die by hand you tell somebody that reads that code that you expect stuff to go wrong at this place in the code
14:37 moritz_ every open() can go wrong
14:37 TimToady every print can go wrong
14:37 moritz_ and if the reader knows that it might blow up later on, it's just as good as die()
14:37 gfldex # bla bla bla horribly dies <-- would do the same :)
14:37 drake1 I think Im going to do like this (with in constructor): if(open() == undef) { $self{error} = $cantopen; return undef; }
14:37 moritz_ if you like....
14:38 drake1 then everyone is happy
14:38 TimToady except that's not Perl 6
14:38 TimToady at least two different ways
14:38 moritz_ std: undef
14:38 drake1 you cant address an object property like a hash?
14:38 p6eval std 32101: OUTPUT«[31m===[0mSORRY![31m===[0m␤Unsupported use of undef as a value; in Perl 6 please use something more specific:␤       Mu (the "most undefined" type object),␤   an undefined type object such as Int,␤    Nil as an empty list,␤    :!defined as a matcher,␤  Any:U as a type
14:38 TimToady std: if(open() == undef) { $self{error} = $cantopen; return undef; }
14:38 p6eval ..constraint␤       or fail() as…
14:38 p6eval std 32101: OUTPUT«[31m===[0mSORRY![31m===[0m␤Unsupported use of undef as a value; in Perl 6 please use something more specific:␤       Mu (the "most undefined" type object),␤   an undefined type object such as Int,␤    Nil as an empty list,␤    :!defined as a matcher,␤  Any:U as a type
14:38 p6eval ..constraint␤       or fail() as…
14:38 drake1 if(!defined open...
14:39 TimToady std: if(!defined open()) { $self{error} = $cantopen; return Mu; }
14:39 p6eval std 32101: OUTPUT«[31m===[0mSORRY![31m===[0m␤Word 'if' interpreted as 'if()' function call; please use whitespace instead of parens at /tmp/vYsukWStqc line 1:␤------> [32mif[33m⏏[31m(!defined open()) { $self{error} = $cant[0m␤Unexpected block in infix position (two terms in a row) at
14:39 p6eval ../tmp/vY…
14:39 drake1 hmm
14:39 TimToady std: if !defined open() { $self{error} = $cantopen; return Mu; }
14:39 p6eval std 32101: OUTPUT«[31m===[0mSORRY![31m===[0m␤Variable $self is not predeclared at /tmp/dkey4eeObx line 1:␤------> [32mif !defined open() { $self[33m⏏[31m{error} = $cantopen; return Mu; }[0m␤Variable $cantopen is not predeclared at /tmp/dkey4eeObx line 1:␤------> [32mefined open() {
14:39 p6eval ..$self{er…
14:39 ingy morning
14:39 ingy o/
14:40 colomon \o
14:40 TimToady std: if !defined open() { self.{error} = $cantopen; return Mu; }
14:40 p6eval std 32101: OUTPUT«[31m===[0mSORRY![31m===[0m␤Variable $cantopen is not predeclared at /tmp/Zwwdo1qcLb line 1:␤------> [32mefined open() { self.{error} = $cantopen[33m⏏[31m; return Mu; }[0m␤Undeclared routine:␤        'error' used at line 1␤Check failed␤FAILED 00:03 118m␤»
14:40 drake1 heheh
14:40 TimToady std: if !defined open() { self.{error} = 'cantopen'; return Mu; }
14:40 p6eval std 32101: OUTPUT«[31m===[0mSORRY![31m===[0m␤Undeclared routine:␤      'error' used at line 1␤Check failed␤FAILED 00:01 118m␤»
14:40 * ingy is at a beach house on the new jersey shore
14:40 TimToady std: if !defined open() { self.error = 'cantopen'; return Mu; }
14:40 ingy good wifi here
14:40 p6eval std 32101: OUTPUT«ok 00:03 117m␤»
14:40 drake1 what's the Mu?
14:40 Holy_Cow joined #perl6
14:40 huf the best looking version is the one that works so far. nice
14:41 TimToady but that's terrible to read, and doesn't return any useful info the caller
14:41 moritz_ drake1: I suggest you read S02
14:41 drake1 moritz_: alright
14:42 drake1 instead of blowing up, maybe it's allowed to print to stderr ?
14:42 TimToady open() // fail("Here's your problem")
14:42 moritz_ that would be a warning
14:42 drake1 nice
14:44 drake1 before calling open, I just use ``test'' to set the self{error} then
14:46 drake1 system("test","-f",$filename) || $self{error} = 'dont exist'
14:46 plobsing joined #perl6
14:46 moritz_ you're writing Perl 5 code
14:47 drake1 im trying to learn the new
14:47 TimToady and it's wrong Perl 5
14:47 TimToady system takes && in Perl 5
14:47 moritz_ unless $filename.IO ~~ :e { fail 'does not exist' }
14:47 drake1 yeah perl5 requires the arrow for single dimensional hash
14:48 drake1 fail causes application do die?
14:48 moritz_ see S04
14:48 moritz_ and my blogpost about unthrown exceptions
14:49 drake1 ok
14:51 bjarneh joined #perl6
14:52 daxim moritz_, I've been pondering.  this soft failing compares directly to <http://backpan.perl.org/authors/id/T/TO/TODDR/Toss-0.0.1.tar.gz>, <http://use.perl.org/comments.pl?sid=44521&amp;cid=71693> and <http://p3rl.org/Return::Value>
14:52 dangbinghoo is rakudo written using Perl 5 ?
14:52 daxim rjbs writes there: "Objects that are false are just a dreadful idea in almost every circumstance, especially when the object has useful properties."
14:52 moritz_ dangbinghoo: no, it's mostly written in Perl 6
14:52 gfldex drake1: http://www.presentingperl.org/ye2010/perl-6-signatures-the-full-story/
14:53 gfldex drake1: http://www.jnthn.net/papers/2010-yapc-eu-signatures.pdf
14:53 gfldex tells the story _why_ Failure is cool :)
14:53 dangbinghoo moritz_: what is perl-5.12?
14:53 daxim moritz_, what is better in this newer design compared to the 3 things I pointed above?
14:53 moritz_ dangbinghoo: a new version of Perl 5
14:53 tadzik joined #perl6
14:53 tadzik hello again
14:54 moritz_ daxim: that you don't have to check for the return value; you can just use it
14:54 moritz_ and if you use it as if it were not a failure, but it is one, no information is lost
14:55 dangbinghoo moritz_: I'm installing rakudo, but gentoo is installing perl-5.12 first . is that true? Does rakudo need perl version over 5.10 ?
14:55 tadzik hell no
14:55 drake1 thanks gfldex
14:55 moritz_ another problem with Return::Value is that it tries to be type sensitive, but Perl 5 has no user-visible types beside scalar/hash/array
14:55 tadzik I was running it with 5.10 since I remember (which is like a few months :))
14:55 moritz_ dangbinghoo: no; rakudo needs perl5 for configuration, but 5.8.8 is also fine
14:56 jferrero left #perl6
14:56 dangbinghoo moritz_: so, rakudo need perl5 , and gentoo is now just updating my perl 5 (5.8-->5.12).
14:57 kiffin left #perl6
14:57 moritz_ yes
14:59 dangbinghoo updating perl 5 makes my vim crashed.:-(
15:00 colomon my rakudo builds are done with perl 5.8.9
15:00 moritz_ dangbinghoo: complain to the gentoo developers
15:01 dangbinghoo moritz_: sorry.;-)
15:01 moritz_ no problem
15:01 BinGOs And the moral of the story is, always build your own perl5 independent of your vendors.
15:02 moritz_ (or chose a better vendor :-)
15:02 moritz_ if such a thing exists
15:02 daxim perl on gentoo is a lost cause, alas
15:03 daxim the responsible team is well-meaning, but understaffed
15:03 moritz_ for some years I was rather happy with Debian's perl, but installing modules which require newer core modules is still a PITA
15:03 moritz_ so I'm slowly drifting towards self-compiled perls too
15:04 dangbinghoo moritz_:  gentoo developer would not notice this. gentoo is for someone who is developers . the answer is to reinstall the vim yourself, never ask questions.
15:04 zostay joined #perl6
15:04 moritz_ well, if you're not happy with that attitude, you shouldn't be using gentoo
15:04 BinGOs First thing I do on any new system ( like CPAN Tester boxes ), install a non-threaded perl-5.12.1 under /opt
15:05 dangbinghoo moritz_:  well , I'm trying to design a system like gentoo , but more easier to use.
15:05 Holy_Cow left #perl6
15:07 dangbinghoo moritz_: but it is only my thought , well , a dream
15:08 diakopter BinGOs: urp; first thing I do on machines at $work is to install a threaded perl-5.12.1 since the system one is non-threaded (and old)
15:09 zulon joined #perl6
15:11 diakopter I write new scripts with Thread::Pool::Simple often
15:11 BinGOs I don't want the threads tax.
15:12 diakopter oh
15:13 diakopter I don't want the other-15-cores idle overhead. these machines are not under high load.
15:14 diakopter er, other 7 cores.
15:15 tadzik star comes out today?
15:16 Holy_Cow joined #perl6
15:22 drake1 pretty sweet with signatures
15:24 drake1 mov 4(%ebp), %eax alike
15:26 drake1 just runtime instead
15:29 tylercurtis joined #perl6
15:31 diakopter TimToady: http://www.ccs.neu.edu/home/dimvar/papers/cfa2-NU-CCIS-10-01.pdf
15:32 tadzik hah, pmichaud++ LOLCODE talk is hilarous
15:36 gfldex tadzik: where do you see that one?
15:37 tadzik gfldex: http://yapc.tv/2008/ye/lt/lt2-09-pmichaud-haz-a-compiler/
15:37 Siddy joined #perl6
15:40 dangbinghoo perl6: say 3
15:40 p6eval pugs, rakudo 82c9e9: OUTPUT«3␤»
15:40 dangbinghoo rakudo: say "4"
15:41 p6eval rakudo 82c9e9: OUTPUT«4␤»
15:48 drake1 to specify the grammar for my own parser object, it's enough to specify where each sub branch may occur
15:49 drake1 through symbolic class abbreviations
15:51 moritz_ drake1: see the chapters on regexes and grammars in http://github.com/downloads/perl6/book/2010.08.a4.pdf
15:51 drake1 then it's up to the parent branch how to handle unwelcome ones
15:51 drake1 thanks for all the good pointers
15:52 molaf joined #perl6
15:52 tadzik left #perl6
15:55 drake1 is the infix [max] locale compatible or numeric only?
15:57 zulon left #perl6
15:59 tylercurtis It appears to use infix:<cmp>, so it's generic to whatever cmp does for the arguments.
16:00 drake1 ah, >> is like the `map' func with object methods instead?
16:00 drake1 tylercurtis: ok
16:00 macroron joined #perl6
16:01 dangbinghoo left #perl6
16:02 risou joined #perl6
16:04 moritz_ hugme: add kthakore to book
16:04 TimToady drake1: yes, it's all really just higher-order programming underneath; methods are really just first-class functions that put themselves where a dispatcher can find them
16:04 * hugme hugs kthakore. Welcome to book!
16:05 kuzuha left #perl6
16:05 TimToady diakopter: I'm glad there are people in the world who like to think about such things, and I'm glad I'm not one of 'em.  :)
16:05 drake1 TimToady: very smart
16:06 drake1 almost like MMX cache force
16:06 TimToady which is why we can export a method and turn it into a multi sub, and it works the same; it just has a different dispatcher
16:07 drake1 is it possible to say: @array>>normal_func ? (without the dot)
16:07 TimToady not that way
16:08 drake1 so >> is only for object methods of the array?
16:08 TimToady but prefix operators are also meta-able, and a listop is a prefix
16:08 drake1 oh
16:08 TimToady so normal_func« @array ought to work
16:09 drake1 nice
16:09 TimToady not sure it does in rakudo though
16:09 cogno joined #perl6
16:09 moritz_ I'm pretty sure it doesn't
16:09 TimToady rakudo: say sin« (0,1,2)
16:09 p6eval rakudo 82c9e9: OUTPUT«===SORRY!===␤Confused at line 22, near "say sin\x{ab} ("␤»
16:09 moritz_ (and it's the first time I've read that it shoudl work :)
16:10 TimToady rakudo: say -« (0,1,2)
16:10 p6eval rakudo 82c9e9: OUTPUT«0-1-2␤»
16:10 envi^home left #perl6
16:10 TimToady std: say sin« (0,1,2)
16:10 p6eval std 32101: OUTPUT«[31m===[0mSORRY![31m===[0m␤Unable to parse quote-words subscript; couldn't find right double-angle quote at /tmp/VSiSMXT3Vp line 1 (EOF):␤------> [32msay sin« (0,1,2)[33m⏏[31m<EOL>[0m␤Other potential difficulties:␤  Unsupported use of bare 'sin'; in Perl 6 please use .sin
16:10 p6eval ..i…
16:10 TimToady o_O
16:11 tylercurtis std: [+]<<(0, 1, 2)
16:11 TimToady I though 'sin' was an operator
16:11 p6eval std 32101: OUTPUT«ok 00:01 117m␤»
16:11 drake1 then with an array of home made `sin' capable objects, it's just to @array>>.sin too?
16:12 TimToady std: say abs« (0,1,2)
16:12 p6eval std 32101: OUTPUT«ok 00:03 118m␤»
16:13 TimToady rakudo: say abs« -«(0,1,2)
16:13 p6eval rakudo 82c9e9: OUTPUT«===SORRY!===␤Could not find sub &prefix:<abs>␤»
16:13 TimToady STD has abs as a prefix operator
16:13 drake1 std: sub sin2 { return sin(2); }; @array = (1,2,3); say @array>>.sin2
16:13 p6eval std 32101: OUTPUT«[31m===[0mSORRY![31m===[0m␤Variable @array is not predeclared at /tmp/WDUyVswZPj line 1:␤------> [32msub sin2 { return sin(2); }; @array[33m⏏[31m = (1,2,3); say @array>>.sin2[0m␤Variable @array is not predeclared at /tmp/WDUyVswZPj line 1:␤------> [32m sin(2); }; @array =
16:13 p6eval ..…
16:14 drake1 oh
16:14 Siddy left #perl6
16:15 TimToady strict is the default now
16:15 Trashlord joined #perl6
16:16 TimToady and .sin2 won't work like that, because it's the wrong dispatcher.  however .&sin2 turns out to work
16:16 TimToady (recently discovered)
16:16 drake1 ok
16:16 TimToady std: sub sin2 { return sin(2); }; my @array = (1,2,3); say @array>>.&sin2
16:16 p6eval std 32101: OUTPUT«ok 00:01 124m␤»
16:16 TimToady rakudo: sub sin2 { return sin(2); }; my @array = (1,2,3); say @array>>.&sin2
16:16 p6eval rakudo 82c9e9: OUTPUT«Too many positional parameters passed; got 1 but expected 0␤  in 'sin2' at line 22:/tmp/Sm9fuaOhP5␤  in main program body at line 22:/tmp/Sm9fuaOhP5␤»
16:17 drake1 so arrays values are not automatically subclassing the parent class
16:17 TimToady rakudo: sub sin2($x) { return sin(2); }; my @array = (1,2,3); say @array>>.&sin2
16:17 p6eval rakudo 82c9e9: OUTPUT«0.9092974268256820.9092974268256820.909297426825682␤»
16:17 drake1 cute
16:18 TimToady rakudo: say (1,2,3)».&prefix:<->
16:19 p6eval rakudo 82c9e9: OUTPUT«-1-2-3␤»
16:19 TimToady \o/
16:19 moritz_ rakudo: sub sin2($x) { return sin($x); }; my @array = (1,2,3); say ~@array».&sin2
16:19 p6eval rakudo 82c9e9: OUTPUT«0.841470984807897 0.909297426825682 0.141120008059867␤»
16:19 moritz_ TimToady: that's a neat trick
16:19 [particle] rakudo: say (1,2,3)».&postfix:<!>
16:19 p6eval rakudo 82c9e9: OUTPUT«Could not find sub &postfix:<!>␤  in main program body at line 22:/tmp/T19MM3BnyW␤»
16:20 tylercurtis rakudo: say([0], [1, 2], [3, 4, 5])>>.&prefix:<[+]>
16:20 moritz_ [particle]: that's the one you have to define yourself :-)
16:20 TimToady rakudo: say (1,2,3)».&( * + 42 )
16:20 [particle] feh :(
16:20 p6eval rakudo 82c9e9: OUTPUT«01 23 4 5␤»
16:20 p6eval rakudo 82c9e9: OUTPUT«===SORRY!===␤Non-declarative sigil is missing its name at line 22, near "&( * + 42 "␤»
16:20 TimToady aww
16:20 TimToady std: say (1,2,3)».&( * + 42 )
16:20 p6eval std 32101: OUTPUT«ok 00:01 122m␤»
16:20 jnthn rakudo: sub add($x, $y) { $x + $y }; say (1,2,3)».&add(2);
16:20 TimToady rakudobug
16:20 p6eval rakudo 82c9e9: OUTPUT«345␤»
16:21 jnthn TimToady: Ewww.
16:21 jnthn TimToady: How's it parsed?
16:21 moritz_ rakudo: say ~(1, 2, 3).&prefix:<+>(2)
16:21 moritz_ rakudo: say ~(1, 2, 3).&infix:<+>(2)
16:21 jnthn rakudo: &( * + 42 )
16:21 p6eval rakudo 82c9e9: OUTPUT«too many positional arguments: 2 passed, 1 expected␤  in main program body at line 6760:CORE.setting␤»
16:21 p6eval rakudo 82c9e9: OUTPUT«5␤»
16:21 p6eval rakudo 82c9e9:  ( no output )
16:21 TimToady same as $() or @()
16:21 jnthn Hmm, seems to parse it alone.
16:21 jnthn Yeah
16:22 TimToady rakudo: say (1,2,3)».$( * + 42 )
16:22 p6eval rakudo 82c9e9: OUTPUT«===SORRY!===␤Non-declarative sigil is missing its name at line 22, near "$( * + 42 "␤»
16:22 jnthn Maybe we're missing something in variable
16:22 snearch left #perl6
16:22 drake1 im used to the less friendly while(i=*p++)sin2(i); where the inheritance chain is associated by the `ld' command. different story
16:22 moritz_ jnthn: yes, we also don't parse @$a
16:23 jnthn Ah, ok
16:23 tylercurtis rakudo: say (1,2,3)>>."{ * + 2}"
16:23 p6eval rakudo 82c9e9: OUTPUT«===SORRY!===␤Quoted method name requires parenthesized arguments at line 22, near ""␤»
16:23 * moritz_ thought ld did linking, not inheritance
16:23 tylercurtis rakudo: say (1,2,3)>>."{ * + 2 }"()
16:23 p6eval rakudo 82c9e9: OUTPUT«Method '_block131' not found for invocant of class 'Int'␤  in main program body at line 22:/tmp/5J9Y09Mndo␤»
16:24 tylercurtis Ah, right.
16:24 drake1 ld is all about overloading the methods
16:25 TimToady it's parsed by the line in token variable that reads:
16:25 TimToady | <sigil> <?before '('> <postcircumfix> [<?{ $*IN_DECL }> <.panic: "Can't declare a contextualizer">]?
16:25 TimToady methodop calls variable calls postcircumfix
16:27 TimToady rakudo: my $a; @$a;
16:27 p6eval rakudo 82c9e9: OUTPUT«===SORRY!===␤Non-declarative sigil is missing its name at line 22, near "@$a;"␤»
16:27 macroron left #perl6
16:28 pyrimidine joined #perl6
16:28 jnthn Ah, yes, I think we are missing that case.
16:30 Mowah left #perl6
16:30 tylercurtis rakudo: class A { method defined { True; } }; say A.defined
16:30 p6eval rakudo 82c9e9: OUTPUT«0␤»
16:30 tylercurtis Ah, nice.
16:31 jnthn Hmm.
16:31 * moritz_ kinda thinks it's a bug
16:31 jnthn I don't think that behavior is going to survive the meta-model refactor.
16:32 * tylercurtis kinds thinks it's possibly a bug, too, now.
16:32 jnthn I also suspect anyone overriding defined is going to really want to write multi method defined($self:D:) { True } too
16:33 jnthn So they only override the behavior not on the type object
16:33 jnthn (I'm increasingly suspecting that :D and :U care about the repr's idea of definedness rather than any higher-level one.)
16:33 moritz_ but :D won't check .defined, but rather a lower-level test, no?
16:34 moritz_ ah, jnthn++ is faster than me
16:34 jnthn moritz_: Right, so overriding defined wrongly won't mess up dispatch that is relying on :D and :U
16:34 jnthn It'll just confuse people. :-)
16:34 TimToady it could well be one of those two-level distinctions like ~ vs .Str
16:34 drake1 where's the best place to download parrot?
16:34 moritz_ the internet!
16:34 TimToady no, that's where you download it *from*
16:35 moritz_ ah. Then "a computer"
16:35 tylercurtis parrot.org
16:35 TimToady the best place to download parrot is someone else's computer, because it uses too many resources.  :)
16:35 cogno left #perl6
16:35 moritz_ drake1: do you want to build it from source? do you want a release, or a source repo?
16:35 jnthn TimToady: Yeah, I think it kinda needs to be.
16:36 jnthn TimToady: We get away with various things in Rakudo today because of the type object being of a different type to the type it represents.
16:36 jnthn TimToady: Unfortunately, that way also rather hurts in other places.
16:36 jnthn TimToady: smop++ called that one right.
16:36 TimToady yes, cheaters usually get caught :P
16:37 drake1 moritz_: from source
16:37 moritz_ drake1: svn co https://svn.parrot.org/parrot/trunk/ parrot
16:38 drake1 nice
16:38 TimToady or just use the --gen-parrot option when you configure rakudo
16:40 drake1 I need to play with it
16:41 drake1 got a grammar to try to make parrot compatible
16:44 molaf left #perl6
16:44 pyrimidine moritz_: isn't parrot migrating to github?  I hazily recall dukeleto doing something related to that...
16:45 pyrimidine or maybe just a mirror?
16:45 moritz_ pyrimidine: yep, but the github mirror isn't official yet
16:45 pyrimidine ok
16:46 * TimToady contemplates a "Useless use of bare block" in sub curry($x) { { $x } }
16:47 kirillm left #perl6
16:49 [Coke] ah, there's our ddaily parrot snipe!
16:49 drake1 just fixed the PSF.pm with an -f $file_name || return undef; so now the test: http://pastebin.ca/1924348 is pretty OK
16:50 TimToady [Coke]: glad you noticed :)
16:50 [Coke] oh, i always do. :(
16:50 drake1 how do you create a signature for the "main" function arguments in perl6?
16:51 moritz_ rakudo: sub MAIN($x = 5) { say $x }
16:51 pmichaud no #cpan6sketch ?
16:51 p6eval rakudo 82c9e9: OUTPUT«5␤»
16:51 jferrero joined #perl6
16:51 moritz_ pmichaud: I was only one in there
16:51 pmichaud hmmm.
16:51 pmichaud I had errands to run.
16:51 pmichaud oh well, maybe next week.
16:51 * moritz_ hopes so too
16:58 TimToady speaking of resources, I noticed that rakudo seems to have a small memory leak with http://rosettacode.org/wiki/Hailstone_sequence#Perl_6
16:58 TimToady which I was planning to leave running overnight to see if it completes, but decided I'd run out of memory first
16:59 moritz_ TimToady: it has a memory leak for every loop you can think of
16:59 moritz_ a simple  while 1 { };   leaks already
16:59 TimToady gotcha
16:59 TimToady do we know why?
16:59 dakkar left #perl6
16:59 moritz_ I have no idea
17:00 x3nU what are editors that do syntax highlighting for perl6?
17:00 [Coke] we just had a new committer fix a long standing leak, so if you can golf that, I'm sure we can get him on this one too.
17:00 moritz_ x3nU: vim
17:00 [Coke] (assuming its parrot)
17:00 moritz_ [Coke]: I'll rebuild on newest parrot before continuing to experiment
17:00 moritz_ x3nU: also padra
17:00 TimToady might not be   <-- vague anti-snipe :)
17:00 moritz_ *padre
17:00 tylercurtis x3nU: There's also a cperl-mode.el that supports Perl 6 in the pugs repo.
17:01 x3nU vim is a bit strange for me
17:01 x3nU and i don't want padre because i don't want install strawberry perl ;p
17:01 TimToady sounds like you get to write your own then :)
17:01 [Coke] par for the course around here!
17:02 TimToady though installing strawberry might be *slightly* less work
17:03 [Coke] perma-rant: lack of named tests in tap. (or maybe my rant is that prove doesn't tell you the description.)
17:03 TimToady well, the tests are supposed to pass, not fail  :P
17:03 moritz_ [Coke]: prove --verbose shows me the test names
17:04 x3nU it looks like that i must use vim ;/
17:04 moritz_ nobody forces you :-)
17:04 tylercurtis x3nU: how do you feel about emacs?
17:05 x3nU good operating system but... ;)
17:05 TimToady performance aside, I was rather pleased that we can write the hailstone sequence as a series
17:05 TimToady sub hailstone($n) { $n, { $_ %% 2 ?? $_ div 2 !! $_ * 3 + 1 } ... 1 }
17:06 rgrau_ joined #perl6
17:06 TimToady rakudo: sub hailstone($n) { $n, { $_ %% 2 ?? $_ div 2 !! $_ * 3 + 1 } ... 1 }; say ~hailstone(7)
17:06 p6eval rakudo 82c9e9: OUTPUT«7 22 11 34 17 52 26 13 40 20 10 5 16 8 4 2 1␤»
17:06 colomon "my $m max= +hailstone($_) => $_ for 1..99_999;" feels very unperl6ish to me.
17:06 TimToady though I encountered abject failure in trying to cache results and return a list from the generator
17:07 TimToady in what sense is it unperl6ish?
17:07 TimToady sure won't work in Perl 5...
17:08 TimToady and relies on the fact that 'after' works on pairs
17:08 colomon not conforming to my sense of how things should be done in perl 6  :)
17:08 TimToady we are not Steve Jobs
17:08 colomon actually, does it even work?
17:08 TimToady yes, it does
17:09 colomon afk
17:10 TimToady though I don't recommend running it that many times if you're worried about your air-conditioning bill.
17:10 moritz_ [Coke]: still leaks on newest parrot
17:10 moritz_ about 1MB per second
17:10 wolverian how does the statement modifier for scope in perl 6? is it "do { my ... } for ..." or "my $m = do { ... for ... }"?
17:10 wolverian in the above statement, that is.
17:10 TimToady the while 1 ?
17:10 moritz_ yes
17:10 ruoso joined #perl6
17:10 TimToady statement modifiers modify a whole statement
17:11 TimToady so the my is inside it
17:11 TimToady however, there are no {...}, so the my scopes to the outer block's lexpad
17:11 TimToady it doesn't carp about undefinedness the first time because assignops aren't supposed to
17:12 wolverian ah, I was just wondering if the statement was supposed to make sense or not.
17:12 tylercurtis max works on pairs?
17:12 TimToady yes, it both works and makes sense (fsdo)
17:12 TimToady max works on anything that defines cmp/before/after
17:13 TimToady rakudo: say 1 => 2 before 3 => 4
17:13 p6eval rakudo 82c9e9: OUTPUT«1  1       4␤»
17:13 TimToady er, hmm
17:13 moritz_ rakudo: say (1 => 2) before (3 => 4)
17:13 * drake1 off to workingset
17:13 p6eval rakudo 82c9e9: OUTPUT«1␤»
17:13 drake1 left #perl6
17:13 TimToady there you go
17:13 moritz_ rakudo: say (3 => 2) before (3 => 4)
17:13 dual left #perl6
17:13 p6eval rakudo 82c9e9: OUTPUT«1␤»
17:14 tylercurtis rakudo: say (1 => 4) before (3 => 2)
17:14 p6eval rakudo 82c9e9: OUTPUT«1␤»
17:14 moritz_ rakudo: say (3 => 5) before (3 => 4)
17:14 p6eval rakudo 82c9e9: OUTPUT«0␤»
17:15 TimToady so it's a convenient trick for attaching an extra datum to something you want to use min or max on
17:15 TimToady a mini schwartzian transform, basically
17:18 tylercurtis rakudo: my @array = 1, 2, 3, 4, 5; say "\n", @array.max(:by(-> $n { say "$n"; $n }));
17:18 p6eval rakudo 82c9e9: OUTPUT«2␤1␤3␤2␤4␤3␤5␤4␤␤5␤»
17:19 tylercurtis Shouldn't a unary :by be called only once per element?
17:19 tylercurtis rakudo: my @array = 1, 2, 3, 4, 5; say "\n", @array.sort(:by(-> $n { say "$n"; $n }));
17:19 p6eval rakudo 82c9e9: OUTPUT«␤12345␤»
17:20 [Coke] moritz_: so, while 1 {} -> 192 lines of PIR; hopefully that's golfable.
17:22 colomon TimToady: My particular worry about it working was the "my $m" part of it.  Is "my" there treated roughly like "while my $a = ..." ?
17:22 TimToady yes, it scopes to outside the loop
17:23 TimToady except that we really are using it once as undefined here, unlike in the while
17:25 TimToady S03:3927 talks about op= in relation to undefined targets
17:26 colomon My objection to the line in (my understanding of) a perl 6 idiomatic approach is using an iterated max= rather than just taking .max of the entire array.
17:26 mikehh left #perl6
17:26 TimToady well, there's the little matter of storing 100_000 pairs in memory
17:27 mikehh joined #perl6
17:27 colomon shouldn't happen due to laziness
17:28 TimToady I s'pose
17:28 colomon my $m = (^10000).map({ +hailstone($_) => $_ }).max
17:28 colomon whoops, missed a 0
17:28 TimToady and you probably don't want to run it with 0
17:29 TimToady probably loops forever
17:29 colomon ah, yes, read the conditional wrong for 0
17:29 TimToady rakudo: sub hailstone($n) { $n, { $_ %% 2 ?? $_ div 2 !! $_ * 3 + 1 } ... 1 }; say ~hailstone(0)
17:29 p6eval rakudo 82c9e9: OUTPUT«(timeout)»
17:29 TimToady yep
17:30 colomon my $m = (1..^10000).map({ +hailstone($_) => $_ }).max
17:31 mikehh left #perl6
17:31 TimToady still missing that 0 :)
17:33 colomon damn you, cut-n-paste!
17:33 colomon my subconscious doesn't want to melt the computer of anyone actually trying the code, that's the ticket...
17:33 TimToady anyway, even 10000 is gonna run a goodly long time
17:33 colomon true, just 100 was disturbingly slow.
17:34 TimToady feel free to optimize it :)
17:36 TimToady anyway, in the rosettacode I was more interested in blowing people's branes than doing a standard FPish solution
17:37 cogno joined #perl6
17:37 TimToady working on rosettacode examples is Too Much Fun
17:38 c9s joined #perl6
17:40 colomon TimToady: I have been indeed pondering how to optimize the series operator for some time now.  ;)
17:41 colomon (and well, I think the my $m max= thing did indeed short a few circuits in my brane...)
17:43 mberends joined #perl6
17:46 PerlJam colomon: don't you just look at the output of the profiler and spend time hacking on those things that are run often or take too long?  what's to ponder?  ;)
17:46 [Coke] moritz_: Think I found the leak.
17:46 * tylercurtis just had his brane blown by the slides from jnthn++'s Signatures talk.
17:46 [Coke] Looks like each time through the loop, a new copy of $_, $/, and $! are created.
17:46 * colomon has to remember to look at jnthn++'s slides sometime soon
17:47 colomon [Coke]++
17:47 pmichaud why is that a leak?
17:47 [Coke] I'm assuming something is holding on the old copies.
17:47 [Coke] pmichaud: trying to figure out why "while 1 {}" leaks.
17:47 [Coke] let me post my golfed PIR...
17:47 pmichaud [Coke]: yes, but the fact of creating new $_, $/ and $! at each iteration doesn't explain a leak
17:48 jnthn It'd only be incidental to the whole context PMC that references them leaking, no?
17:48 pmichaud I mean, the contexts should eventually get gc'ed
17:48 pmichaud (or they're supposed to be gc'ed)
17:48 * pmichaud awaits the golfed pir
17:48 wtw left #perl6
17:50 [Coke] http://feather.perl6.nl/~coke/leak.pir?
17:50 molaf joined #perl6
17:50 [Coke] if I uncomment out the "##" block there, it leaks.
17:50 cogno left #perl6
17:51 [Coke] with it as it, it holds steady.
17:51 pmichaud are you sure it's not leaking with the ## block?
17:51 pmichaud seems to me it would simply leak more slowly
17:51 [Coke] I'll leaving it running for a few minutes.
17:52 [Coke] if it's slower, it's MUCCCCCCCCCCCCCCCCCh slower.
17:52 [Coke] holding steady at 414M after a minute.
17:53 pmichaud what if you uncomment one of the declarations.... say, $! ?
17:53 rurban joined #perl6
17:53 jnthn If you change
17:53 jnthn ## find_lex_skip_current $P86, "$_"
17:53 jnthn ## $P87 = new ['Perl6Scalar'], $P86
17:53 jnthn to just
17:53 jnthn $P87 = find_lex_skip_current $P86, "$_"
17:53 jnthn Does it still leak?
17:54 [Coke] avoiding the new? checking...
17:55 [Coke] having just the find_lex_skip_current line is fine.
17:56 jnthn arrrrghhhh!!!
17:56 jnthn pmclass ObjectRef dynpmc group perl6_group manual_attrs {
17:56 jnthn ...which is fine and...
17:56 [Coke] andding in the .lex also seems fine...
17:56 jnthn pmclass Perl6Scalar extends ObjectRef dynpmc group perl6_group auto_attrs {
17:56 [particle] #perl6: where every day is "talk like a pirate" day
17:56 jnthn auto_attrs?!
17:57 jnthn Shoudln't that me manual like its parent?
17:57 [Coke] auto_attrs == "please make parrot manage my memory for attributes."
17:57 pmichaud Perl6Scalar doesn't have any attrs of its own
17:57 pmichaud at least, not that I recall
17:57 jnthn pmichaud: Yes, but it inherits from something that has one.
17:57 jnthn pmichaud: And allocates its own
17:57 pmichaud I bet the source is one of those patches submitted from folks updating the PMC attribute storage
17:58 jnthn pmichaud: We may have a situation where it allocates space due to auto_attrs, but then our init_pmc also allocates space
17:58 jnthn And we lose the pointer to the first.
17:58 [particle] btw built rakudo last night in <360MB with msvc
17:58 [particle] *ram
17:58 tylercurtis Is there any particular reason ObjectRef is manual_attrs?
17:58 jnthn tylercurtis: Yes
17:58 jnthn Well
17:58 jnthn It's that because we allocate the space outselves
17:58 [Coke] yup. it's the new Perl6Scalar ... add one of those 3 back in, it starts leaking again.
17:58 jnthn *ourselves
17:59 jnthn [Coke]: Try s/auto_attrs/manual_attrs/ there
17:59 jnthn (src/pmc/perl6scalar.pmc)
17:59 [Coke] hokay.
17:59 tylercurtis jnthn: right. But is there any benefit to doing that?
18:00 jnthn tylercurtis: Dunno
18:00 [Coke] I'll get back to you in a few hours after core.pir builds. ;)
18:00 jnthn tylercurtis: It was probably written before auo_attrs existed.
18:00 jnthn *auto_attrs
18:00 jnthn We may be able to get it to use auto_attrs. It may even be a performance win.
18:00 pmichaud the commit that added "auto_attrs and manual_attrs"  is http://github.com/rakudo/rakudo/commit/961589a0c26dc2c2adbfd552828b32c5ef4ba7b8#diff-8
18:00 [Coke] jnthn: want me to try that instead? ;)
18:00 pmichaud looks like it came from cotto
18:00 * tylercurtis is going to see what happens if he makes it auto_attrs.
18:01 * [Coke] lets tc try that.
18:01 jnthn [Coke]: I'd be curious to if see the manual_attrs change fixes the leak too.
18:01 javs left #perl6
18:01 jnthn Though feel free to fix the leak and make it faster. ;-)
18:03 * TimToady likes "and"
18:04 tylercurtis Switching to autoattrs made the memory stabilize for me.
18:05 jnthn Nice
18:05 pmichaud I don't quite understand the meaning of "manual_attrs" and "auto_attrs", fwiw
18:06 * tylercurtis runs a spectest and goes for a walk to see if it breaks anything somehow.
18:06 [Coke] jnthn: 30s in, I don't see the leak.
18:06 jnthn \o/
18:06 [Coke] pmichaud: they refer to the memory management for attributes.
18:06 pmichaud [Coke]: okay, I knew that mnuch.
18:06 pmichaud *much
18:06 pmichaud what's the difference between them?
18:06 jnthn pmichaud: auto_attrs has Parrot allocate the thingy that hangs off the PMCs data pointer for you.
18:06 [Coke] basically, "unless you're doing something clever, use auto"
18:07 jnthn pmichaud: manual_attrs = you malloc and free it yourself
18:07 pmichaud jnthn: as in, it allocates and initializes the pointers automatically?
18:07 jnthn pmichaud: Right
18:07 [Coke] tylercurtis: you have a patch?
18:07 pmichaud what does it initialize them to?
18:07 pmichaud PMCNULL ?
18:07 jnthn pmichaud: It allocates a struct with fields for all of the ATTR declarations.
18:08 pmichaud but leaves the fields uninitialized?
18:08 jnthn I believe so yes
18:08 jnthn Probably zeroed
18:08 pmichaud you're saying that auto_attrs allocates the struct, then.
18:08 jnthn Maybe PMCNULL
18:08 jnthn Right
18:08 pmichaud when would we (Rakudo) want to be using manual_attrs, then?
18:08 tylercurtis [Coke]: spectesting right now. Want me to nopaste a patch before I go walking?
18:08 jnthn And what seems to have happened here is that objectref was correctly marked manutal_attrs
18:08 jnthn (because it did its own allocation)
18:08 jnthn But the subclass of it was marked auto_attrs
18:09 sftp left #perl6
18:09 jnthn So Parrot allocated it, but we inherited the pmc_init that did the manual allocation too.
18:09 pmichaud right now we have a mixture of both auto_attrs and manual_attrs in our pmcs
18:09 jnthn pmichaud: I suspect our usage of it mostly dates back to before auto_attrs existed.
18:09 jnthn pmichaud: Or at least in this case.
18:09 pmichaud I'd like to have a reason for using one or the other in each case.
18:09 sftp joined #perl6
18:09 [Coke] tylercurtis: no worries.
18:10 jnthn pmichaud: We likely don't have a consistent approach for now.
18:10 sorear good * #perl6
18:10 phenny sorear: 11:59Z <ggoebel> tell sorear just reported the mono bug. I'm wondering if anyone will agree that failure to compile hello world is a critical failure? (https://bugzilla.novell.com/show_bug.cgi?id=634017)
18:10 jnthn pmichaud: We should really use auto_attrs consistently unless we can't.
18:10 pmichaud jnthn: yes, that's what I'm thinking.
18:10 pmichaud but most of our active pmcs appear to be manual_attrs
18:12 justatheory joined #perl6
18:12 jnthn pmichaud: We could probably change that for most if not all of them.
18:12 pmichaud agreed
18:12 pmichaud tylercurtis: I'd like to see the patch, if you're still here.
18:14 [Coke] even if his patch causes issues, jnthn's suggestion works also.
18:15 szabgab good evening ppl
18:15 szabgab I just got the approval for a Perl booth at T-Dose in Eindhoven, Holland
18:15 pmichaud szabgab++
18:16 szabgab They can also let us have some space for a Perl 6 hackathon
18:16 jnthn szabgab: Nice
18:16 szabgab they told me they won't have a separate room but we can be in one side of the common space
18:16 pmichaud that works
18:16 szabgab I wonder if that would be ok for such thng
18:16 pmichaud in some sense being in the vicinity of others is a good thing :)
18:16 jnthn szabgab: Date?
18:16 pmichaud i.e., we want people to see us working and come and ask questions :)
18:17 szabgab I thought it could be even nice to show work and maybe get some people interested
18:17 pmichaud jnthn: 6-7 Nov 2010
18:17 jnthn ok
18:17 szabgab now I need to go out and ask for sponsorship
18:17 * [Coke] will be there, pending funding. =-)
18:17 szabgab but I'd like to get such commitments :)
18:17 pmichaud [Coke]: really, that's likely?
18:17 [Coke] pmichaud: that I get funding? hell no.
18:18 pmichaud [Coke]: if you had funding, you'd make it?
18:18 [Coke] but "I won't go because I can't afford it" sounds much more negative. ;)
18:18 am0c left #perl6
18:18 szabgab [Coke]: I am trying to organize funding for some people
18:18 PerlJam pmichaud: do you have a way to fund him? :)
18:19 pmichaud PerlJam: I might.... but more to the point, szabgab is also looking for funding for such things.
18:19 szabgab I have no idea if I mangage t get any money at all but I'd like to know who might come if we had the money :)
18:19 jnthn Heh. It's like, almost exactly a month after I'll be in that part of the world.
18:19 szabgab and how much funding they might need
18:19 [Coke] there are other hackers who should get funding before I do, but yah, I'd definitely consider it if money were no object.
18:19 pmichaud wow, I can get round-trip airfare for $730
18:20 jnthn The date sounds weirdly familiar to me. I don't know why.
18:20 pmichaud jnthn: I think it's been mentioned before here
18:20 jnthn Maybe that's why
18:21 dalek book: 7af1026 | kthakore++ | README:
18:21 dalek book: added cache trick to readme
18:21 dalek book: review: http://github.com/perl6/book/commit/7af10266f98de4f6bab3e599c6832f684540e06c
18:21 jnthn It's a weekend.
18:21 jnthn So unless I have to do stuff later on the Friday afternoon or first thing the Monday morning I could make it.
18:21 Mowah joined #perl6
18:21 jnthn I think.
18:23 jnthn Ooh...this is why the date rings a bell. http://2010.useperl.at/apw2010/
18:23 pmichaud yes, that would do it.  :)
18:23 szabgab oh my
18:24 szabgab is that now their good date or bad date?
18:24 jnthn I hadn't particularly made plans to go beyond "ooh, there's a Perl event in a city I like" though :-)
18:24 jdv79 will there be any p6 action at ppw?
18:24 pmichaud looks like round-trip airfare is $830 for me after taxes and such
18:24 risou_ joined #perl6
18:25 saaki left #perl6
18:25 jnthn For me, I can probably get sleeper train tickets for < 100 EUR each way, then it's just somewhere to crash on the Saturday night.
18:25 pmichaud I'll talk to my sponsors and see if they can get me there, if other p6'ers would be likely to make it :)
18:25 risou left #perl6
18:25 pmichaud (or maybe szabgab++ will pull something off :)
18:26 amkrankruleuen joined #perl6
18:26 Mowah left #perl6
18:26 jnthn pmichaud: I probably *can* arrange to be there.
18:26 amkrankruleuen Hello.
18:26 pmichaud if any($masak, $moritz, $mberends) can also make it then it'd very likely worthwhile :)
18:26 pmichaud *it's
18:27 pmichaud that might be a good time for planning and seeing where things stand with the object-model changes
18:27 jnthn Aye
18:27 TimToady I'm planning to go the Hacker's Conference that weekend
18:27 pmichaud ...Hacker's Conference?
18:27 moritz_ highly doubtful; I'd love to, but I probably won't leave my pregnant wife alone
18:27 colomon moritz_++
18:28 jnthn pmichaud: Yeah. I can likely make it without funding, but funding would make it easier.
18:29 pmichaud I'll keep it in mind and see how things develop.
18:29 saaki joined #perl6
18:30 szabgab jnthn: 100 EUR funding I already have , if that's all what you need
18:30 szabgab and in Holland  we can find space to sleep, I am sure
18:31 moritz_ wow, this is *very* old news, but still nice: http://www.theperlreview.com/Interviews/mjd-hop-20050407.html MJD says "Sometimes I wish Perl's syntax were less verbose."
18:32 jnthn szabgab: I can look into it a bit more after my vacation.
18:32 tylercurtis O.o, git is being weird. It shows src/pmc/objectref.pmc as being unchanged, even though it is changed.
18:33 pmichaud objectref.pmc is a generated file
18:33 jnthn tylercurtis: Oh...er...it may be a ...yes that :-)
18:33 pmichaud you likely want to change objectref_pmc.template
18:33 jnthn szabgab: I have a 25% discount card for the sleeper train to get me somewhere in Holland, even if it doesn't go through Eindhoven.
18:34 jnthn szabgab: So can probably do it within not too much over that...the prices fluctuate.
18:35 * jnthn starts to make some noms
18:35 * tylercurtis is wondering whether he should run a spectest with the changes in objectref_pmc.template as well as directly changing objectref.pmc.
18:35 pmichaud yes
18:35 pmichaud in fact, should probably remove objectref.pmc and spectest from there.
18:36 pmichaud depending on how "safe" you want to be :)
18:36 szabgab jnthn, pmichaud [Coke] etc could you please add info about your possible participation to the wiki page at https://www.socialtext.net/perl5/index.cgi?events_2010_t_dose_eindhoven ?
18:37 dual joined #perl6
18:37 jferrero left #perl6
18:37 * tylercurtis is remaking with objectref_pmc.template changed and objectref.pmc deleted.
18:37 tylercurtis I'll make sure it still doesn't leak and then spectest.
18:38 ruoso left #perl6
18:39 Mowah joined #perl6
18:40 pmichaud tylercurtis++
18:41 jferrero joined #perl6
18:41 jnthn tylercurtis: Thanks :-)
18:43 tylercurtis It doesn't appear to leak. Spectest time.
18:43 szabgab T-Dose is a 150-200 ppl event, http://www.t-dose.org/t-dose/photos
18:44 szabgab jnthn, pmichaud [Coke] CFP ends on 31 Aug  http://www.t-dose.org/node/210  it would be nice to see a few Perl 6 related talks as well
18:45 pmichaud szabgab: noted, on my calendar
18:45 tylercurtis Are there any good benchmarks (that take less time than spectesting with and without the change) I can run to make sure that it doesn't hurt performance?
18:46 masak joined #perl6
18:46 * tylercurtis afk.
18:47 masak exalutations, #perl6!
18:48 avuserow hallo masak!
18:48 jnthn I'm sure you can a-test to it having been an eventful day. ;-)
18:49 masak jnthn: the day has indeed had events.
18:49 pmichaud These are puns, right?  Why is this channel so full of puns?  ;-)
18:49 masak pmichaud: it's punful to read, isn't it?
18:50 pmichaud masak: especially using Parrot's current I/O implementation :-P :-P
18:50 [Coke] szabgab: I find the thought of funding extremely unlikely so I'm just going to pass on that. Thanks, though.
18:50 pmichaud [Coke]: how about attending ppw in early october, ooc?
18:50 masak pmichaud: :)
18:50 [Coke] ppw is muuuch easier to swing out of pocket.
18:51 Lorn left #perl6
18:51 pmichaud I know that kid51++ was interested in putting together an east-coast-ish event this fall, and rblackwell has also expressed strong interest in having something happen at ppw
18:52 szabgab [Coke]: just for my education, how much financing would you need to be able to get there ?
18:52 szabgab to T-Dose
18:53 Lorn joined #perl6
18:54 masak judging by http://irclog.perlgeek.de/cpan6sketch/2010-08-24 , there wasn't much interest in a #cpan6sketch today... :/ (or people forgot, or they were unable to come like I was)
18:54 masak but it's #phasers in ~5, right?
18:54 jnthn Yes, it appears so
18:54 jnthn Well remembered!
18:55 avuserow what's #phasers?
18:55 avuserow aside from a channel
18:55 jdv79 set to stun
18:55 avuserow pew pew
18:55 masak avuserow: it's a weekly meeting for Perl 6 people.
18:55 masak avuserow: you can come too if you're interested :)
18:55 jnthn We present the stunning work we've done in the previous week, and get each other fired up for the week to come.
18:56 pmurias joined #perl6
18:56 avuserow sure, why not. I've been rumored to have written Perl 6 before :)
18:56 masak jnthn++ # putting puns to good use!
18:57 masak avuserow: you can write Perl 6 both <?before> and <?after> :)
18:57 [Coke] szabgab: nearest airport to endhoven?
18:57 [Coke] oh. there's one there. my travel site doesn't know it, though. ;)
18:58 szabgab maybe try Amsterdam
18:58 pmichaud amsterdam or brussels are closest
18:58 [Coke] szabgab: ENOFLIGHTS.
19:00 * [Coke] finds that the difference between cost and total cost on the international flight is much greater than domestic.
19:01 masak` joined #perl6
19:01 [Coke] looks like airfare alone is $850 mininum to get to amsterdam. if that helps.
19:01 sorear I do not like <?before>
19:02 masak`` joined #perl6
19:03 masak` left #perl6
19:04 masak`` left #perl6
19:05 masak left #perl6
19:05 [Coke] (I can get to PPW for 250 non-stop, which is a little nicer, and I can probably handle out of pocket.)
19:06 daxim left #perl6
19:06 jdv79 in the error trace "5071:CORE.setting" is referring what file?
19:06 jdv79 *to
19:06 sorear src/gen/core.pm
19:07 [Coke] oooh, 102$ for a 13 hour train ride. ;)
19:10 szabgab [Coke]: what train ride?
19:10 [Coke] from albany NY to pittsburgh PA by way of NYC.
19:10 szabgab ah
19:10 szabgab and yes, that filght ticket cost helps
19:11 risou_ left #perl6
19:11 szabgab you might not be used to that but I constanltly have to pay similar prices from .il even to .eu
19:11 szabgab ok maybe "only" $600
19:11 pugssvn r32102 | pmurias++ | [mildew-hoopl] transforming the AST into a hoopl graph
19:14 pmurias sorear: did you remove .gitignore files from src/perl6?
19:15 amkrankruleuen left #perl6
19:15 bjarneh left #perl6
19:15 bjarneh joined #perl6
19:17 amkrankruleuen joined #perl6
19:22 moritz_ sorear: do you think niecza should be added to the list of implementions that are run when you say 'perl6: say 1'?
19:26 * tylercurtis is back and still spectesting.
19:29 moritz_ tylercurtis: do you run the tests in parallel?
19:30 tylercurtis moritz_: I do not. How do I do that?
19:31 moritz_ export TEST_JOBS=3
19:31 * tylercurtis will need to remember that in the future.
19:31 moritz_ and you need Test::Harness 3.16 or newer
19:31 moritz_ I just have it in my .bashrc
19:35 bjarneh left #perl6
19:39 drake1 joined #perl6
19:40 drake1 Now the little (two days) perl program is complete. Preview: http://www.gangsterfreak.com/file:preview.png
19:41 x3nU >gangsterfreak
19:41 x3nU lol
19:42 am0c^ left #perl6
19:42 tylercurtis ooc, what modules are going to be in Rakudo (*+1)?
19:42 Mowah left #perl6
19:43 masak joined #perl6
19:46 masak jnthn: going on vacation tomorrow? whither?
19:47 jnthn Night train to Munich, there for a night to hang out in beergardens, then on to the Austrian alps for several days, then on to Slovenia for several days there. :-)
19:48 moritz_ sounds like good fun
19:48 jnthn Central Europe FTW \o/
19:48 jnthn moritz_: Yes, those are some of my favorite bits of the world. :-)
19:48 masak jnthn: sounds very good indeed. enjoy.
19:49 jnthn Thanks, it should be very refreshing. :-)
19:50 szabgab jnthn: will you be still in that area in the 2nd half of September?
19:50 jnthn szabgab: No
19:50 szabgab :)
19:50 jnthn szabgab: Will be back in Sweden then
19:50 szabgab or :(
19:51 szabgab we are trying to have a perl get together in Budapest with szbalint
19:51 jnthn Were I still in Blava, I'd have been able to pop down to that pretty easily.
19:52 jnthn Sadly, ratehr further away now.
19:53 slavik left #perl6
19:55 drake1 is http://pastebin.ca/1924527 perl6 compatible?
19:56 * masak enjoys TimToady++'s hailstone sub in the backlog
19:56 PerlJam drake1: what does that mean?
19:56 PerlJam drake1: that looks like perl 5, so I'd say "no, it's not perl 6 compatible"
19:57 drake1 PerlJam: it means to project a character to a canvas
19:58 drake1 scaled times 10
19:59 drake1 time ten in both directions
19:59 Italian_Plumber left #perl6
20:01 masak left #perl6
20:02 masak joined #perl6
20:02 jnthn .oO( masak's network is really uu.seless
20:03 masak rakudo: say ~$_(5) given { $_, { $_ %% 2 ?? $_ / 2 !! $_ * 3 + 1 } ... 1 }
20:03 p6eval rakudo 82c9e9: OUTPUT«5 16 8 4 2 1␤»
20:04 Guest82435 left #perl6
20:04 masak jnthn: there used to be a file-sharing network called uu.suger.nu. various political forces made it change its name. it's now called du.suger.nu. :)
20:04 am0c^ joined #perl6
20:05 jnthn :)
20:05 masak [backlog] we need to improve/nativize the set class to the point where we can answer all junction-as-set abuse FAQs/non-FAQs with "no, do this with a Set instead".
20:06 tylercurtis We can at least tell them to do hash-as-set abuse if Set isn't up to the task.
20:07 patrickas joined #perl6
20:09 jnthn masak: folks on #parrot are wondering about you :-)
20:09 moritz_ 22:08 < nwellnhof> dukeleto: do you know if masak tried an unoptimized build?
20:10 tylercurtis About TT #1746 to be specific.
20:10 masak in Perl 5, there's a nice pattern for creating "local APIs": one 'local'-declares a type glob with an anonymous sub in it. (grep http://cpansearch.perl.org/src/MIYAGAWA/Web-Scraper-0.32/lib/Web/Scraper.pm for 'local' for an example.) I miss this pattern in Perl 6 -- is there any way to do that, and still make the sub calls not look like &*ugly() ?
20:10 masak jnthn: oh noes, one more IRC server to time out on... :/
20:10 * masak heads over there
20:11 TimToady write a lexical pretty() that calls dynamic &*ugly()
20:11 moritz_ rakudo: my &*x = -> {say 3 }; x()
20:11 p6eval rakudo 82c9e9: OUTPUT«Could not find sub &x␤  in main program body at line 22:/tmp/IL01HhjZ00␤»
20:12 masak TimToady: the goal is to have the user of the library not add any boilerplate code.
20:13 TimToady the library can define a routine and export it
20:14 masak ooh
20:14 masak TimToady++
20:14 timbunce left #perl6
20:14 masak wicked.
20:14 xinming_ joined #perl6
20:14 masak I think &pretty would qualify as a trampoline.
20:14 _kaare left #perl6
20:15 TimToady someday it's probably just a macro
20:15 masak because it jumps into itself, and then directly out to something else.
20:15 TimToady unless inlining gets good enough that you don't care
20:15 masak it's a dispatching adapter.
20:16 timbunce joined #perl6
20:16 jnthn TimToady: I've concluded that I probably need to get Rakudo/NQP to inline protos sooner rather than later if I actually want to build primitive stuff in terms of Perl 6-ish multi dispatch, fwiw.
20:16 Guest82435 joined #perl6
20:16 xinming left #perl6
20:17 jnthn TimToady: The extra invocation overhead only to immediately delegate kinda sucks.
20:17 masak timbunce++ # http://twitter.com/carlmasak/status/22024364894
20:18 TimToady a proto is sort of a wannabe macro
20:19 masak TimToady: I'm not sure I like the {*} syntax in protos. I don't have any suggestions, just a general sense of too-much-magic uneasiness.
20:20 masak (I never liked the {*} in grammars either)
20:21 TimToady it's encapsulated magic
20:21 masak lately, Perl 6 has shifted over from "eveybody wants the colon" to "everybody wants the asterisk"
20:21 masak and TimToady seems to get it far more often than he got the colon. :P
20:21 jnthn Let's use {:}
20:21 moritz_ I guess they balance out these days
20:21 jnthn std: {:}
20:21 p6eval std 32102: OUTPUT«[31m===[0mSORRY![31m===[0m␤Preceding context expects a term, but found infix : instead at /tmp/B0W4J11Qss line 1:␤------> [32m{[33m⏏[31m:}[0m␤Parse failed␤FAILED 00:01 116m␤»
20:21 jnthn It's free \o/
20:21 jnthn ;-)
20:22 masak jnthn: :D
20:22 moritz_ std: :
20:22 p6eval std 32102: OUTPUT«[31m===[0mSORRY![31m===[0m␤Preceding context expects a term, but found infix : instead at /tmp/m4itHnwemv line 1:␤------> [32m<BOL>[33m⏏[31m:[0m␤Parse failed␤FAILED 00:01 116m␤»
20:22 masak I know it's encapsulated magic. and I see that its point is to avoid boilerplate as much as possible.
20:22 moritz_ what is infix : ?
20:22 moritz_ rakudo: say 1 : 2
20:22 TimToady invocant marker
20:22 p6eval rakudo 82c9e9: OUTPUT«===SORRY!===␤Confused at line 22, near "say 1 : 2"␤»
20:22 masak I'm just thinking if I don't actually prefer 'proto method bar { &?ROUTINE.multi-dispatch }' or some such.
20:23 jnthn masak: Not if you have to write it in every proto
20:23 tylercurtis -1 to that.
20:23 jnthn masak: Take a look at
20:23 TimToady {*} if huffman coded
20:23 TimToady *is
20:23 TimToady and doesn't commit to the mechanism
20:23 masak yes, I acknowledge that.
20:23 jnthn the protos in http://github.com/jnthn/6model/blob/master/common/NQP/NQPSetting.pm
20:24 masak TimToady: what happens if one does a {*} body with a multi or an only?
20:24 jnthn I know i'd much rather type something shorter. :-)
20:24 jnthn I'm not mad on {*} though. Unless we can add it as a single term.
20:24 jnthn (or maybe that already happened)
20:24 TimToady STD more or less does that, though the block for a proto is specialer
20:24 tylercurtis +(0,1).pick to possibly replacing {*} with something else short.
20:25 masak {[+]}
20:25 jnthn :P
20:25 masak :P
20:25 TimToady I kinda like the "call whatever"
20:25 moritz_ proto foo($a, $b) \o/;
20:26 tylercurtis masak: but how will I say that my proto ignores its multis and just returns 0 without making it too obvious, then?
20:26 masak TimToady: maybe there could be a syntax wherein all multies are specified within the body of the proto? proto foo { multi foo(...) {...}; multi foo(...) {...}; ... }
20:27 TimToady how does that distribute over multiple lexical scopes?
20:27 TimToady especially if the proto is in the setting?
20:27 masak multies can still be added in lower lexical scopes, as usual.
20:27 drake1 shouldn't the console be able to render >> is the little unicode euivalent single numbered >> sequence?
20:27 [particle] {:P}
20:27 masak s/can/could/
20:28 masak drake1: sorry, I didn't understand the question? having rendering problems on the console?
20:28 TimToady drake1: you mean just arbitrarily convert every occurrence of >> to »?
20:28 masak drake1: that sounds like a problem with your console.
20:28 drake1 perl6 seems to understand the unicode for two >> in a single character
20:28 TimToady other way around
20:29 TimToady the >> is a circumlocution that it takes to mean » most of the time
20:29 TimToady but not everywhere
20:29 drake1 and the console could render two 8bit >'s in a row as �
20:29 TimToady std: $_ >> 3
20:29 p6eval std :  ( no output )
20:30 TimToady I wouldn't want that
20:30 TimToady I'd rather know what's really there
20:30 drake1 me either
20:30 TimToady std: $_ >> 3
20:30 p6eval std :  ( no output )
20:30 PerlJam $_ is much greater than 3?  :)
20:30 TimToady why is std misbehaving regularly these days?
20:31 moritz_ TimToady: last time it did, there was no 'snap' subdirectory in src/perl6/
20:31 drake1 I don't even use " alot
20:31 drake1 '' seems better
20:31 moritz_ they mean quite different things in perl
20:31 drake1 also in shell
20:32 moritz_ TimToady: ah, 'make clean' deletes snap. That's probably a bad idea
20:32 TimToady that would do it
20:32 drake1 oh, this window renders '' and " exactly the same
20:32 TimToady as I said, you really want to know what's there underneath
20:32 tylercurtis rakudo: multi infix:«<<» ($a, $b){ $a ~ $b }; say 1 << 2; say 1 « 2;
20:32 p6eval rakudo 82c9e9: OUTPUT«===SORRY!===␤Unsupported use of << to do left shift; in Perl 6 please use +< or ~< at line 22, near "2; say 1 \x{ab}"␤»
20:33 pugssvn r32103 | moritz++ | [std] do not delete snap on "make clean"
20:33 masak jnthn: I see you do lexpad indexing in http://github.com/jnthn/6model/commit/1fbc73b595be188317400808bbc7fb5d610fca6c -- seems to be you're only using half of the benefits of doing so, though.
20:33 TimToady std: $_ >> 3
20:33 p6eval std 32102: OUTPUT«[31m===[0mSORRY![31m===[0m␤Unsupported use of >> to do right shift; in Perl 6 please use +> or ~> at /tmp/L2GV_4XKS_ line 1:␤------> [32m$_ >>[33m⏏[31m 3[0m␤Check failed␤FAILED 00:01 117m␤»
20:33 tylercurtis rakudo: multi postfix:«<<» ($a){ $a ~ '<<'}; say 2<<; say 2«;
20:33 jnthn masak: I'm only ever using it in the binder ATM
20:33 p6eval rakudo 82c9e9: OUTPUT«===SORRY!===␤Confused at line 22, near "say 2\x{ab};"␤»
20:34 jnthn masak: Just didn't get to doing the rest yet.
20:34 tylercurtis rakudo: multi postfix:«<<» ($a){ $a ~ '<<'}; say 2<<;
20:34 p6eval rakudo 82c9e9: OUTPUT«2<<␤»
20:34 masak jnthn: oh, ok.
20:34 jnthn masak: You're welcome to a commit bit though. ;-)
20:34 masak jnthn: I'm still in shock after a week of studying. but thanks :)
20:34 jnthn .oO( take the bait, take the bait... :-) )
20:34 jnthn :-)
20:35 drake1 IFS=.;echo \`''$*"\'
20:35 drake1 left #perl6
20:36 * masak .oO( nice to see other implementation catching up with Yapsi... :P )
20:36 Holy_Cow left #perl6
20:36 jnthn I don't KnowHOW I'll ever catch up with the official implementation though.
20:37 jnthn ;-)
20:37 TimToady you just have to be officious
20:37 * moritz_ will be glad for a pun respite in jnthn's absence :-)
20:37 masak moritz_: don't count on it :P
20:39 jnthn Maybe I should set up a cron job that runs a Perl 6 script that visits IRC each day, makes a pun and leaves. :-)
20:39 TimToady we'd have to break into your machine and perform an ap-pun-dectomy.
20:39 * masak .oO( puns, shoots and leaves )
20:41 tylercurtis A hit-and-pun bot?
20:41 TimToady .oO(shoot happuns...)
20:42 TimToady .oO(if you haven't got a punny, and ha'punny will do...)
20:43 pmurias perl6: say 1
20:43 p6eval pugs, rakudo 82c9e9: OUTPUT«1␤»
20:44 pmurias masak: you could add niecza conditionally that is print out the output if it compiles
20:44 PerlJam TimToady: you've given more than your tuppunce today.
20:44 pmurias masak: meant moritz_
20:44 TimToady I've also got my come-uppunce.
20:44 pmurias left #perl6
20:45 masak 'conditionally that [it] print out the output if it compiles' -- how is this different from any other p6eval target?
20:45 masak it's not like it can print out output if it doesn't compile.
20:46 molaf left #perl6
20:46 masak and it's not like it doesn't print out output when it compiles.
20:46 TimToady std: say barf
20:46 p6eval std 32103: OUTPUT«[31m===[0mSORRY![31m===[0m␤Undeclared routine:␤      'barf' used at line 1␤Check failed␤FAILED 00:03 115m␤»
20:46 [particle] did you hear the one about the guy who walked into a bar and said, "foo!'?
20:46 masak [particle]: no. do tell.
20:47 TimToady did you hear about the marine that was rotten to the corps?
20:47 jnthn Is it different from the one where a guy walked into a bar and said "ouch"?
20:47 masak that's odd, the sea is supposed to be good for you...
20:47 jnthn TimToady: <groan> :-)
20:48 kirillm joined #perl6
20:48 tylercurtis Note to self: always pull before spectesting.
20:49 masak let me change my mind: I like the {*} in protos.
20:49 masak it's very pretty.
20:49 Italian_Plumber joined #perl6
21:01 tylercurtis patch for manual_attrs -> auto_attrs http://nopaste.snit.ch/23082: passes all spectest that Rakudo passed before I made the change. I'm going to spectest with HEAD + the patch now.
21:02 whiteknight joined #perl6
21:08 diakopter std: say
21:08 p6eval std 32103: OUTPUT«Potential difficulties:␤  Unsupported use of bare 'say'; in Perl 6 please use .say if you meant $_, or use an explicit invocant or argument at /tmp/6by9whABnw line 1:␤------> [32msay[33m⏏[31m<EOL>[0m␤ok 00:02 114m␤»
21:09 masak \o/ dynamically scoped subs! it works! -- http://gist.github.com/548328
21:10 diakopter masak: does that mean man_or_boy.t can work?
21:10 masak diakopter: oh, this is not Yapsi. this is still Rakudo.
21:10 masak diakopter: just testing a feature I learned about today.
21:10 diakopter oh
21:11 sftp left #perl6
21:11 tylercurtis Hmm... I'm getting "Did you run make in src/perl6? at STD.pm line 3." errors in the "perl viv --boot --clear-inc --inc lib --inc . -5 -o STD.pm5 STD.pm6" portion of STD's make at r32055.
21:11 masak basically, we have more support for nice APIs/little langauges than I previously knew.
21:13 diakopter tylercurtis: did you run make in src/perl6?
21:13 diakopter oh, you're saying that's what you ran
21:13 tylercurtis Indeed.
21:14 diakopter hrm
21:14 diakopter tylercurtis: what os?
21:14 tylercurtis OS X 10.5
21:18 masak [backlog] moritz_: re switching roles in fixing/reporting bugs... I think such an exercise would lead to many interesting results. I don't think greater throughput would be one of them, though.
21:18 Holy_Cow joined #perl6
21:18 masak Holy_Cow! \o/
21:19 masak Holy_Cow: your nice suggests you're from .in -- are you? :)
21:19 masak s/nice/nick/
21:19 Holy_Cow no :(
21:20 masak ok. do you know Perl 6's top-level object type is called Mu? :)
21:21 PerlJam don't scare away the spiritual bovine :)
21:22 timbunce left #perl6
21:26 masak it's interesting to note that both Data::Decycle (a fairly new CPAN module) and KiokuDB use a "protect these objects from going out of scope" refcount-increasing object pattern.
21:26 masak Perl 6 won't need that.
21:28 timbunce joined #perl6
21:29 sorear masak: ip2location.com is your friend
21:30 * masak tries
21:30 jferrero left #perl6
21:32 tylercurtis sorear: ooc, why does viv --boot put $FindBin::Bin ~ "/boot" (obviously not the actual code) in @INC?
21:32 masak Holy_Cow: ah. Kansas. never been there, but I can see cows being quite revered there too.
21:33 sorear tylercurtis: because the bootstrap versions of STD.pmc and Cursor.pmc are kept in src/perl6/boot
21:34 tylercurtis Ah, I see why STD wasn't building for me, now.
21:35 Holy_Cow in a very different way
21:35 tylercurtis Well, actually, I don't really understand. But I'm pretty sure I know how to fix it.
21:35 Guest82435 left #perl6
21:36 timbunce left #perl6
21:39 azert0x left #perl6
21:39 tylercurtis $FindBin::Bin was being set to ~/bin where I had a script named "viv" that set up the necessary environment variables and ran viv.
21:42 rgrau_ left #perl6
21:43 wamba left #perl6
21:55 masak in 'enum Month <January February ...>', it'd be kinda nice to be able to define a cyclical range such that 'December .. February :wrap' (modulo the name of :wrap) gave (December, January, February).
21:56 masak though Rakudo doesn't have operator adverbs yet.
21:56 sorear range :to is gone
21:56 sorear why :wrap
21:57 jnthn masak: 1..12 xx *
21:57 tadzik joined #perl6
21:57 tadzik 'evening
21:57 jnthn May cut it
21:57 [particle] True .. False
21:57 masak sorear: because an ordinary range of that kind would be empty.
21:57 jnthn masak: Or something like that.
21:57 masak jnthn: not as short/nice syntactically.
21:58 masak this is a case where I'd actually like an adverb. it doesn't have to be core, though.
21:58 Holy_Cow left #perl6
21:58 masak there will be modules.
21:58 jnthn :-)
22:00 masak I could also picture the .. :wrap construct being of good use in array slices.
22:01 masak once we can parameterize arrays over enums a la S09, I mean.
22:01 pyrimidine left #perl6
22:04 masak I tend to think of S09 as The Last Big Unrealized (Original) Synopsis.
22:05 jnthn Yes, there's quite a lot to take on in there.
22:05 masak quite a lot of sugar that would lead to nicer scripts/programs.
22:05 masak a bit like typing does/will.
22:06 shade\ left #perl6
22:06 jnthn I really need to the whole S09 again sometime soon.
22:07 tadzik left #perl6
22:07 masak I should try and write some code that assumes S09 is here. would make for an interesting exercise.
22:08 shade\ joined #perl6
22:09 am0c^ left #perl6
22:21 xinming joined #perl6
22:22 jferrero joined #perl6
22:23 xinming_ left #perl6
22:30 alester left #perl6
22:31 patrickas left #perl6
22:37 tylercurtis Wow. Niecza supports threads.
22:38 masak sorear++
22:38 jnthn I can't wait to get Rakudo on a VM that does that too.
22:39 masak I'd like to add http://www.cs.ubc.ca/local/reading/proceedings/spe91-95/spe/vol21/issue11/spe063ah.pdf to @interesting-papers and also point out that I'd consider it a privilege and a pleasure to do grant work at some point in the future optimizing the heck out of nqp-rx or equiv with techniques like this.
22:42 shade\ left #perl6
22:45 awwaiid joined #perl6
22:46 Italian_Plumber left #perl6
22:47 shade\ joined #perl6
22:58 jnthn masak: Looks interesting.
22:58 TimToady star: sub dif (@all [$, *@tail]) { @tail Z- @all }; say ~dif([1,2,3,4])
22:58 p6eval star 2010.07: OUTPUT«1 1 1␤»
22:58 masak ooh
22:59 TimToady "forward difference"
22:59 masak TimToady: is there a source/reason for all of these all of a sudden?
22:59 TimToady old one used map and slicing
22:59 TimToady I'm trying to avoid working on important stuff :)
22:59 TimToady so I thought I'd take a pass through the rosettacode site
23:00 masak that nested signature trick is worth remembering.
23:00 masak it's quite Prolog-y.
23:01 jnthn Hey, neat.
23:01 jnthn I hadn't thought of using them for that. :-)
23:01 TimToady http://rosettacode.org/wiki/Forward_difference#Perl_6
23:01 TimToady but the hilighting is a bit lame
23:04 tylercurtis looks like the auto_attrs patch passes all the tests that HEAD does.
23:04 masak TimToady: yeah, someone ought to write a Perl 6 parser. :P
23:05 TimToady tylercurtis: \o/
23:06 masak rakudo: &f = {say $^s, $^s.perl;}; f "\&f = \{say \$^s, \$^s.perl;}; f " # quine
23:06 p6eval rakudo 82c9e9: OUTPUT«Could not find sub &f␤  in main program body at line 22:/tmp/KM5_7LUBzo␤»
23:06 amkrankruleuen left #perl6
23:06 masak rakudo: my &f = {say $^s, $^s.perl;}; f "my \&f = \{say \$^s, \$^s.perl;}; f " # quine
23:06 p6eval rakudo 82c9e9: OUTPUT«my &f = {say $^s, $^s.perl;}; f "my \&f = \{say \$^s, \$^s.perl;}; f "␤»
23:06 * masak updates http://rosettacode.org/wiki/Quine#Perl_6
23:07 thundergnat joined #perl6
23:09 masak ...and for 'most impressive and anticlimatic nick of the day', I nominate... thundergnat! :)
23:09 TimToady star: sub dif (@all [$, *@tail]) { @tail Z- @all }; sub difn2 ($a, $n) { ($a, &dif ... *)[$n] }; say ~difn2([1,2,3,4],2)
23:09 p6eval star 2010.07: OUTPUT«0 0␤»
23:11 smash_ left #perl6
23:11 smash_ joined #perl6
23:11 thundergnat rakudo: my ($i, $j);  for (1..5) {print $i //= $j+=5; $i++; print  ",$j "}
23:11 p6eval rakudo 82c9e9: OUTPUT«5,5 6,10 7,15 8,20 9,25 »
23:12 thundergnat Is that a bug or a feature?
23:12 masak looks like a feature.
23:12 masak could you be more specific? :)
23:12 thundergnat I would have expected 5,5 6,5 7,5 8,5 9,5
23:13 masak why? you're not resetting $j between iterations.
23:13 thundergnat It is not short circuiting the ||
23:13 TimToady looks like a bug to me
23:13 masak oh!
23:13 thundergnat er //
23:13 masak thundergnat++
23:13 * masak submits rakudobug
23:13 TimToady pugs: my ($i, $j);  for (1..5) {print $i //= $j+=5; $i++; print  ",$j "}
23:13 thundergnat actually, same for ||
23:13 p6eval pugs: OUTPUT«5,5 6,5 7,5 8,5 9,5 »
23:13 TimToady pugs has it correct
23:13 masak aye, those should be thunks.
23:13 flatwhatson joined #perl6
23:14 masak thundergnat: you've just contributed to the Perl 6 effort. +1 level. :)
23:14 thundergnat glee!!
23:14 masak \o/
23:14 TimToady you now have 3 hit points
23:14 masak wow, that's... not a lot.
23:14 lestrrat is now known as lest_away
23:14 masak we need to be nice to the newbie.
23:15 TimToady go easy on the thundergnat
23:17 smash_ left #perl6
23:17 smash_ joined #perl6
23:21 smash_ left #perl6
23:22 fod joined #perl6
23:25 ispeak_ joined #perl6
23:27 dual left #perl6
23:31 TimToady rakudo: my @a = 1,2,3,4; say @a[1..*]
23:31 p6eval rakudo 82c9e9: OUTPUT«(timeout)»
23:31 TimToady rakudobug
23:32 * masak submits
23:33 Italian_Plumber joined #perl6
23:34 rgrau_ joined #perl6
23:34 dual joined #perl6
23:36 TimToady kills the 99 bottles of beer example :)
23:36 jnthn OH NOES!
23:36 jnthn Wait, does this bug mean the beer goes on infinitely? :-)
23:37 TimToady it means you never get to the beer
23:37 masak jnthn: no, because of the timeout the beer... what TimToady said.
23:37 TimToady always winter, and never christmas
23:37 jnthn :'(
23:39 jnthn rakudo: my @a = 1,2,3,4; say @a[1..Inf]
23:39 masak rakudo: my ($i, $j);  for (1..5) {print $i ||= $j+=5; $i++; print  ",$j "}
23:39 p6eval rakudo 82c9e9: OUTPUT«(timeout)»
23:39 p6eval rakudo 82c9e9: OUTPUT«5,5 6,10 7,15 8,20 9,25 »
23:39 jnthn rakudo: my @a = 1,2,3,4; say @a[1..*-1]
23:39 p6eval rakudo 82c9e9: OUTPUT«Method 'Num' not found for invocant of class 'WhateverCode'␤  in 'Cool::Numeric' at line 1745:CORE.setting␤  in 'Cool::Numeric' at line 1746:CORE.setting␤  in 'Range::new' at line 4676:CORE.setting␤  in 'infix:<..>' at line 4739:CORE.setting␤  in main program body at line
23:39 p6eval ..22:/tmp/W…
23:39 jnthn ew er
23:39 masak :/
23:40 jnthn Why on earth does Cool::Numeric show up twice in the backtrace?
23:40 masak multi delegation?
23:43 * masak submits rakudobug for that, too
23:46 jnthn Doesn't look very delegatory to me.
23:46 masak then I have no idea why.
23:46 masak backtrace printer bug?
23:47 jnthn yeah, that's what I'm fearing
23:47 jnthn Feel free to file it, I can take a look when I'm back.
23:55 ispeak_ left #perl6
23:57 risou joined #perl6

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

Perl 6 | Reference Documentation | Rakudo