Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2009-12-02

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:12 dukeleto IllvilJa: the colorizing servers idea is pretty neat
00:14 IllvilJa I have a perl script which creates the icons for me, and the reason I got interested in Perl modules for dealing with vectors is that I use vector "physics" to automatically adjust the 16 ANSI colors used evilvte so they don't clash with the arbitrary colors chosen for background, foreground, cursor etc.
00:15 IllvilJa If the background color get's "too close" to one of the ANSI colors, it will move slightly as if it were subject to a repulsive force.
00:17 masak interesting idea.
00:18 cognominal masak: on which branch is this  &LazyMap::iter ?
00:19 masak cognominal: it's in src/perl6/LazyMap.pm in the pugs repo.
00:19 cognominal I though that was rakudo
00:19 masak cognominal: no, rakudo still uses PGE.
00:20 cognominal I thouth PGE was used to boot nqp-rx
00:20 * cognominal has trouble to get the big picture...
00:20 japhb cognominal, It was used to initially get early nqp-rx up and running, but now nqp-rx is fully bootstrapped and no longer needs anything but itself and base parrot.
00:21 japhb s/It/PGE/
00:21 diakopter pmurias: LOL :)
00:21 masak Rakudo's master branch is still on PGE. npq-rx is two things: a (re-)implementation of nqp, and a complete replacement for PGE. the ng branch of Rakudo uses nqp-rx instead of PGE.
00:22 Wolfman2000 Evening masak. Do you have your Perl Gift ready?
00:22 masak Wolfman2000: I do indeed. I've even set it on auto-post. :)
00:22 Wolfman2000 ...one can do that?
00:23 diakopter jnthn: cool links
00:23 masak Wolfman2000: and moritz_ has his ready for day-after-tomorrow, so now there's a gap where yours should be. :)
00:23 Wolfman2000 ...funny, I thought I was...nevermind. Guess my days are getting bumped. I'll double check the schedule
00:24 masak in fact, I don't know why my post hasn't posted itself already. I'll go and help it along.
00:24 diakopter moritz_: sprixel is being reconceived/regestated/rebirthed as an nqp-rx-alike
00:24 diakopter except very much nqnqp-rx
00:24 Wolfman2000 I may as well know...when does "December 3rd" begin for everyone here?
00:24 diakopter NOT QUITE nqp.
00:24 cognominal dropping pge altogether?  it sounds likes the Camelia imago is out of the pupa and ready to  extends its wings :)
00:26 payload joined #perl6
00:26 diakopter jnthn: o wait
00:26 diakopter so
00:27 diakopter oky doky.
00:27 jnthn ...
00:27 jnthn :-)
00:27 masak colomon: help! I can't publish my post! :/
00:28 diakopter CLOS -> Perl Object System -> it's just a POS
00:28 diakopter how unfortunate
00:28 diakopter ok, enough of my off-hue remarks
00:28 masak ah. there we go.
00:29 jnthn lol
00:29 jnthn diakopter: I think we won't call it that, tempting as it may be. ;-)
00:31 diakopter lolmasakhazblogggggged
00:33 masak hold on, I found a way to shorten my Christmas Tree generator by one character :)
00:33 jnthn wheredidmasakblogged?!
00:33 Wolfman2000 jnthn: the calendar
00:33 diakopter golfing on Christmas?
00:33 masak http://perl6advent.wordpress.com/2009/​12/02/day-2-the-beauty-of-formatting/
00:33 jnthn oooh...now it appeareth to me!
00:34 diakopter std: say " "x 9-$_,"#"x($_*2-1)for 0..9,2xx 3
00:34 p6eval std 29238: [31m===[0mSORRY![31m===[0m␤Whitespace is required between alphanumeric tokens at /tmp/v1C57DLkoj line 1:␤------> [32msay " "x 9-$_,"#"x($_*2-1)for 0..9,2[33m⏏[31mxx 3[0m␤    expecting any of:␤     POST␤   postfix␤  postfix_prefix_meta_operator␤       standard stopper␤ terminator␤
00:34 p6eval ..    whitespace␤FA…
00:35 diakopter std: say " "x 9-$_,"#"x($_*2-1)for 0..9,2 xx 3
00:35 p6eval std 29238: ok 00:01 106m␤
00:35 masak bah, STD is too picky :)
00:35 diakopter :)
00:36 masak besides, that's the old version. :P
00:36 masak std: say " "x 9-$_,"#"x$_*2-1 for 0..9,2xx 3
00:36 p6eval std 29238: [31m===[0mSORRY![31m===[0m␤Whitespace is required between alphanumeric tokens at /tmp/sEI0yxZyIi line 1:␤------> [32msay " "x 9-$_,"#"x$_*2-1 for 0..9,2[33m⏏[31mxx 3[0m␤    expecting any of:␤      POST␤   postfix␤  postfix_prefix_meta_operator␤       standard stopper␤ terminator␤
00:36 p6eval ..    whitespace␤FAI…
00:36 jnthn masak: Are your euro prices based on hopes of future Euro <=> SEK parity? ;-)
00:37 jnthn 5 euros is a bit steep for an apple. :-P
00:37 masak jnthn: I'd say!
00:37 jnthn masak:   say .fmt                         # 'huey dewey louie'
00:37 masak jnthn: you have to consider that the apple is golden.
00:37 jnthn I think maybe you write a <foo bar baz> but blog eated it?
00:37 masak jnthn: oops, thanks!
00:37 masak I'll add a space to placate STD while I'm at it...
00:38 jnthn masak++ # nice post
00:39 masak thanks. .fmt is underappreciated.
00:39 IllvilJa K folks... it's bedtime here.
00:39 IllvilJa CU tomorrow.
00:39 diakopter rakudo: say " "x 9-$_,"#"x$_*2+1 for 0..5,1,1
00:39 p6eval rakudo 7ce13d:          #␤        ###␤       #####␤      #######␤     #########␤    ###########␤        ###␤        ###␤
00:40 jnthn masak: Your hash example just increased my fondness.
00:40 jnthn I could see myself using that.
00:40 diakopter basement cat frowns a little deeper
00:42 Schwern joined #perl6
00:43 Schwern joined #perl6
00:55 Wolfman2000 ...I double checked the schedule. Defined types haven't been introduced.
00:55 Wolfman2000 I think my Gift will be the Defined Types with multi subs. Constraints can be taken by someone else.
00:56 Wolfman2000 Is that alright with you guys?
00:56 Wolfman2000 rakudo: my $tmp; say $tmp
00:57 p6eval rakudo 7ce13d: Use of uninitialized value␤␤
00:57 Wolfman2000 ...aww, I was hoping it would say Mu
00:57 Wolfman2000 rakudo: my $tmp = Mu; say $tmp
00:57 p6eval rakudo 7ce13d: Object()␤
00:58 jnthn Wolfman2000: We likely won't handle Mu properly until ng lands.
00:58 tjc joined #perl6
00:59 diakopter ng: my $tmp = Mu; say $tmp
00:59 p6eval ng a77213: Mu()␤
00:59 Wolfman2000 ...I think that will be a good thing. I don't want to introduce Mu to the users yet.
00:59 Wolfman2000 Int, Num, Str, Bool (?), and Rat (?) perhaps
00:59 masak Wolfman2000: it's very much alright to take Defined Types with multi subs. what to you mean by that, more exactly?
01:00 Wolfman2000 rakudo: my Rat $fraction = 4/5; say $fraction.nu ~ '/' ~ $fraction.de;
01:00 p6eval rakudo 7ce13d: Method 'nu' not found for invocant of class 'Rat'␤in Main (file src/gen_setting.pm, line 324)␤
01:00 jnthn huh?
01:00 jnthn rakudo: my Rat $fraction = 4/5; say $fraction.numerator
01:00 p6eval rakudo 7ce13d: 4␤
01:00 jnthn ah.
01:00 Wolfman2000 rakudo: my Rat $fraction = 4/5; say $fraction.numerator ~ '/' ~ $fraction.denominator;
01:00 p6eval rakudo 7ce13d: 4/5␤
01:00 Wolfman2000 ...can we get .nu and .de in there at some point please?
01:01 Wolfman2000 or even .numer and .denom
01:01 masak Wolfman2000: why?
01:01 Wolfman2000 masak: why to which question?
01:01 masak there's .numberator and .denominator. why synonyms?
01:01 masak s/nub/num/
01:01 Wolfman2000 masak: you just proved my point
01:02 Wolfman2000 not exactly easy to spell, is it?
01:02 jnthn rakudo: my Rat $fraction = 4/5; say $fraction.nude.join('/')
01:02 p6eval rakudo 7ce13d: 4/5␤
01:02 masak Wolfman2000: well, yes, but it's 2 o'clock here. :)
01:02 Wolfman2000 rakudo: my Rat $fraction = 4/5; say $fraction.nude.WHAT
01:02 p6eval rakudo 7ce13d: List()␤
01:02 cspencer joined #perl6
01:02 masak Wolfman2000: I think 'numerator' is much clearer than 'nu' or 'numer'.
01:03 masak Wolfman2000: and I think the Huffmanization is about right, since one shouldn't need to go picking out the numerator that often anyway.
01:03 jnthn .oO( must resist temptation to use inappropriate variable names when storing Rats )
01:03 masak jnthn: $headmaster.nude.WHAT? :P
01:03 jnthn eww!
01:03 Wolfman2000 ...well, I have enough time. I'll start my dr--
01:04 Wolfman2000 masak--: BAD
01:04 masak 哈哈
01:04 Wolfman2000 I don't recall what those characters mean
01:04 jnthn masak: That...wasn't what I had in mind. ;-)
01:04 masak no, me neither. never mind. :)
01:04 jnthn lol
01:05 masak Wolfman2000: they signify laughter.
01:05 * jnthn wonders if he should sleep soonish, given his earlyish flight.
01:05 * Juerd_ would probably have to lookup the words "numerator" and "denominator" each time he'd use them.
01:05 jnthn s/sleep/attempt to sleep/
01:05 jnthn Juerd_: Just go .nude then.
01:05 masak Juerd_: maybe we should call them .stuff-above and .stuff-below
01:06 Juerd_ .lhs .rhs
01:06 masak oh no please no :)
01:06 Juerd_ .howmany .howmuch ;)
01:07 Juerd_ Hm, what would be the worst I can think of?
01:07 Juerd_ I have to admit... it's hard to compete with .stuff-above.
01:07 Juerd_ Oh! .super and .sub of course. Entirely unobvious to many people.
01:08 masak .this and .these :)
01:08 Juerd_ .Pair.key and .Pair.value
01:08 jnthn .no-wai-i'll-forget-this and .don't-think-i'll-forget-this-either
01:09 masak .tit and .tat
01:09 jnthn .ceiling-cat and .basement-cat
01:09 Juerd_ Ooh.
01:09 masak definitely.
01:09 Juerd_ Where can I vote?
01:09 Tene lojban: .selfrinu and .terfrinu
01:09 jnthn Oh wait...are we designing Perl 6 or LOLCODE at the moment?
01:09 masak jnthn: there's a module right there.
01:09 * jnthn often gets confused between the two...
01:09 Juerd_ Perlol 6, jnthn
01:10 masak Tene: 'sel' and 'ter' from 'ceiling' and 'terre', respectively?
01:10 jnthn \o/
01:10 Tene masak: Of course!
01:10 masak Tene: Lojban is, like, really easy!
01:10 jnthn .hore and .dole # obligator slovak
01:10 sjohnson a use lolcode; would be cool
01:11 masak .uppe and .nere # Swedish!
01:11 jnthn *obligatory
01:11 Juerd_ .teller and .noemer  # Dutch
01:11 jnthn masak: huh? Swedish words that don't look like rude words in English?
01:11 masak actually, .up and .dn has a nice visual symmetry to them...
01:11 jnthn wow!
01:11 masak jnthn: yeah, would you know!
01:11 Juerd_ masak: Whoa
01:11 jnthn That's...delightful!
01:12 masak I didn't originate that, Hofstadter did, or someone before him.
01:12 Juerd_ masak: Did you know that or did you just find that out?
01:12 Tene masak: ... ><
01:12 Tene masak: You know I hate you, right?
01:12 Tene ;)
01:12 masak Tene: so you keep telling me. :P
01:12 xinming_ joined #perl6
01:12 masak Tene: I forget what it was last time.
01:13 Tene Okay, going home now, hopefully I don't fall asleep upon arival like last night.
01:13 Tene masak: the elevator.
01:13 masak oh, right!
01:13 masak Schindler's Lift.
01:13 jnthn Tene: suggest not falling asleep on the way too :-)
01:13 jnthn lol!
01:13 Tene jnthn: my gf says the same thing. :P
01:13 masak jnthn: Tene hated me through Twitter for that one.
01:14 masak there's something about puns and hate...
01:15 Juerd_ http://juerd.nl/i/66c301d8e​4774ce10232b4bacd163e5a.png  # I'm confused now.
01:15 jaldhar joined #perl6
01:15 jnthn Juerd_: Say it's modern art and make millions.
01:15 Juerd_ It's modern art
01:15 Juerd_ ???
01:15 Juerd_ Profit!
01:16 Tene hi jaldhar
01:16 masak Juerd_: nice!
01:16 masak jaldhar! \o/
01:16 diakopter Juerd: how about .ⁿ and .ₓ
01:17 Tene How about ÷ and RTL-÷
01:17 Juerd_ my $foo = ½;
01:17 Tene Nah, not consistent enough to be silly.
01:18 Tene .u ∅
01:18 phenny U+2205 EMPTY SET (∅)
01:18 Juerd_ my $bar = 33⅓;
01:18 jaldhar hello all.
01:19 jnthn OK...I haz a flight in...soon...night all
01:19 diakopter nite
01:19 ihrd joined #perl6
01:19 masak ihrd! \o/
01:20 ihrd masak: HAI
01:20 Wolfman2000 ...I'm missing something...
01:20 Wolfman2000 Int, Str, Num, Rat...what are the other defined types?
01:20 * Wolfman2000 is working on the preview
01:21 diakopter http://perlcabal.org/syn/S0​2.html#Built-In_Data_Types
01:21 masak Wolfman2000: what do you mean, defined types?
01:21 Wolfman2000 yeah
01:21 Wolfman2000 diakopter: thanks
01:21 Juerd_ jnthn: Good night
01:21 * Juerd_ also z
01:22 * masak tries to write his own LazyMap
01:22 masak ...in Perl 6.
01:22 Wolfman2000 ...I thought I saw constraints in there...wait a second
01:23 diakopter masak: you
01:23 Wolfman2000 ...nevermind, over thinking. Just stick with my plan.
01:23 masak diakopter: who, me?
01:24 diakopter you...
01:24 masak you...
01:24 diakopter you and your ... codings
01:24 masak yeah, sorry about that.
01:24 masak in 2010, I'll try to cut down on the coding, and just bark at people on Twitter instead.
01:25 diakopter excellent
01:25 masak either that, or I'll start my personal defamation campaign against Guido and Matz, to spread the idea that Ruby and Python are *dying*, oh noes!
01:27 masak not many people know it, but Ruby started dying the day DHH released Rails, and it has been successively dying since. Python was dead already in 2002, but no-one noticed.
01:27 masak man, this is fun! I don't know why I say these things more often.
01:27 masak s/say/don't say/
01:28 Wolfman2000 masak: I'd be careful with that comment about Python already dead...
01:28 masak Wolfman2000: oh? are you implying that it's a blatant untruth?
01:28 * Wolfman2000 still has a website that uses python.
01:28 colomon masak++ # nice post, and it's up!  woo-hoo!
01:28 * masak does a jig
01:28 masak Wolfman2000: just to be clear, I wasn't 1% serious about Python/Ruby being dead.
01:29 avar Write a post called "Perl 6 isn't dead, but Ruby/Python are Mü"
01:29 masak heh.
01:30 masak I got tweets like these today. http://twitter.com/mdhughes/status/6246967483 http://twitter.com/mdhughes/status/6247027414
01:30 masak I guess that might be why I'm a bit... on edge.
01:31 xinming joined #perl6
01:33 colomon Errrr... last time I checked, Rakudo had regular monthly releases.
01:33 Wolfman2000 rakudo: multi sub identify(Int $x) { return "$x is an integer" }; multi sub identify(Str $x) { return "\"$x\" is a string" }; say 42.identify();
01:33 p6eval rakudo 7ce13d: Method 'identify' not found for invocant of class 'Int'␤in Main (file src/gen_setting.pm, line 324)␤
01:33 Wolfman2000 ...thought so
01:34 masak colomon: thing is, Python people who say things like the above have ears like the rest of us, but they work very selectively.
01:34 colomon Does this joker think that software development takes no time?
01:34 diakopter std: ☃
01:34 p6eval std 29238: [31m===[0mSORRY![31m===[0m␤Bogus statement at /tmp/JRx2zNQqjp line 1:␤------> [32m<BOL>[33m⏏[31m☃[0m␤    expecting any of:␤    infix or meta-infix␤      infix stopper␤    prefix or term␤   standard stopper␤ statement end␤  statement list␤   term␤     terminator␤
01:34 p6eval ..whitespace␤FAILED 00:01 104m␤
01:34 Wolfman2000 .u ☃
01:34 phenny U+2603 SNOWMAN (☃)
01:34 masak colomon: well, he unfairly compared Perl 6 to Python 3000, and goes downhill from there. I guess it makes sense for a Python person.
01:35 masak colomon: one can't just go to the Python camp and say "can't we all get along". they'd just say "HSSSSSSS!" :)
01:36 colomon I suppose we just need some Parseltongues.... ;)
01:36 masak .u ☄
01:36 phenny U+2604 COMET (☄)
01:36 masak rakudo: say 'foo' ~~ m☃ foo ☄
01:37 p6eval rakudo 7ce13d: foo␤
01:37 masak \o/
01:37 * masak loves that bug
01:38 brrant joined #perl6
01:38 colomon how can you tell it's a bug?
01:38 TimToady std: say 'foo' ~~ m☃ foo ☄
01:38 p6eval std 29238: [31m===[0mSORRY![31m===[0m␤Unrecognized regex metacharacter (must be quoted to match literally) at /tmp/B0OEyyPQ1M line 1:␤------> [32msay 'foo' ~~ m☃ foo [33m⏏[31m☄[0m␤    expecting any of:␤  quantifier␤      regex atom␤      regex_infix␤      standard stopper␤  terminator␤
01:38 p6eval ..ws␤FAILED 00:01 106m␤
01:38 colomon ooooo, I see.  well, sort of.
01:39 masak colomon: because you're only supposed to use brackets there. mirror-matching characters.
01:39 diakopter std: say 'foo' ~~ m☃ foo ☃
01:39 p6eval std 29238: ok 00:01 105m␤
01:39 Wolfman2000 okay, I have my draft for Day 3 saved
01:39 masak Wolfman2000++
01:39 diakopter std: say 'foo' ~~ ☃ foo ☃
01:39 p6eval std 29238: [31m===[0mSORRY![31m===[0m␤Confused at /tmp/rrQ1OUvkGf line 1:␤------> [32msay 'foo' ~~ [33m⏏[31m☃ foo ☃[0m␤    expecting any of:␤       infix or meta-infix␤      infix stopper␤    prefix or term␤  standard stopper␤ term␤  terminator␤FAILED 00:01 105m␤
01:39 Wolfman2000 I just need a way for you guys to see it...
01:39 masak colomon: there's a certain symmetry to SNOWMAN and COMET being mirror-matching... but they aren't.
01:40 diakopter std: say 'foo' ~~ s☃ foo ☃ aa ☃
01:40 sjohnson pastebin?
01:40 p6eval std 29238: ok 00:01 104m␤
01:40 Wolfman2000 sjohnson: too public
01:40 masak Wolfman2000: I see it.
01:40 Wolfman2000 you do masak? How?
01:40 masak through Wordpress.
01:40 masak I have an account on wordpress.com.
01:41 masak so do the other authors.
01:41 sjohnson there's also private paste Wolfman2000
01:41 Wolfman2000 ...well, do your proofing thing
01:41 masak sure thing.
01:41 sjohnson might have what you want...  privatepaste.org i think
01:41 sjohnson .com
01:41 TimToady std: say 'foo' ~~ m 彗 foo 彗
01:41 p6eval std 29238: [31m===[0mSORRY![31m===[0m␤Alphanumeric character is not allowed as delimiter at /tmp/0bOIhqpC0D line 1:␤------> [32msay 'foo' ~~ m [33m⏏[31m彗 foo 彗[0m␤FAILED 00:01 104m␤
01:42 diakopter pugs: say 'foo' ~~ s☃ foo ☃ aa ☃
01:42 p6eval pugs: Error eval perl5: "if (!$INC{'Pugs/Runtime/Match/HsBridge.pm'}) {␤    unshift @INC, '/home/p6eval/.cabal/share/Pugs-6​.2.13.14/blib6/pugs/perl5/lib';␤    eval q[require 'Pugs/Runtime/Match/HsBridge.pm'] or die $@;␤}␤'Pugs::Runtime::Match::HsBridge'␤"␤*** '<HANDLE>' trapped by operation mas…
01:43 diakopter whoops
01:43 masak Wolfman2000: I'm having trouble with the term 'defined types'. now I see what you mean by it, but...
01:43 Wolfman2000 Well, what else are they supposed to be called?
01:43 TimToady specced types?
01:43 Wolfman2000 TimToady: perhaps you can clear it up
01:44 masak Wolfman2000: 'declaration types', maybe?
01:44 diakopter what's rong with "built-in"
01:44 masak Wolfman2000: 'the type you set when you declare the variable'.
01:44 masak diakopter: because that's not what Wolfman2000 means.
01:44 masak actually, 'static type' might be fine.
01:46 Wolfman2000 ...make up your mind
01:46 masak Wolfman2000: 'this two gifts' -> 'these two gifts'.
01:46 agentzh joined #perl6
01:46 Wolfman2000 masak: thanks for catching that one
01:47 masak 'multi subs allow for polymorphism' -- I'm not 100% sure that's true.
01:47 masak can I get confirmation who actually knows OO/type theory?
01:48 masak s/who/from someone who/
01:48 masak Wolfman2000: re making up my mind, I think 'static types' would be a big improvement over 'defined types'.
01:48 colomon btw, someone asked in a comment on the first post how to set the perl6 REPL to automatically "say" the result of everything you type into it.
01:48 Wolfman2000 masak: That's how I recall polymorphism
01:48 masak Wolfman2000: to me 'defined types' translate to 'anything below Mu in the type hierarchy'.
01:49 JimmyZ joined #perl6
01:49 masak Wolfman2000: Google 'defined:' has this to say: "Type polymorphism in object-oriented programming is the ability of one type, A, to appear as and be used like another type, B."
01:49 Wolfman2000 ...guess I meant method overloading
01:50 masak yes, I think so.
01:51 Wolfman2000 Or, since this is Perl, sub overloading
01:51 masak well, you can have multi methods in Perl 6 as well. :) but these are subs.
01:52 Wolfman2000 masak: Let the class discussion talk about method overloading
01:52 masak sure, absolutely.
01:52 Wolfman2000 okay, saving yet another draft round
01:52 Wolfman2000 have fun with it
01:53 masak Wolfman2000++
01:57 Wolfman2000 If everything is fine, then...well, soon as I hit the schedule button, it will post Dec 2nd at 19:45 PM EST. That should be about Dec 3rd at the start of the world.
01:57 Limbic_Region joined #perl6
01:58 Wolfman2000 Is it alright if I hit the schedule button then?
01:59 masak Wolfman2000: don't worry, people will be able to review and edit it even after you've pushed it.
01:59 masak so, yes. :)
01:59 Wolfman2000 ...I just realized. The permalink will still say 2009/12/02
02:00 Wolfman2000 So...is my post...already up?
02:00 masak for what it's worth, I didn't publish mine until the GMT had passed into today.
02:00 masak maybe that makes me Europe-centric, I dunno.
02:00 masak no, it's not up.
02:01 cognominal carlmasak versus mdhugues : drowning by numbers :)
02:02 Wolfman2000 Wordpress claims my last edit time was...Dec 2nd, near 2 AM
02:02 Wolfman2000 I no longer know what timezone this blog is for!
02:03 Wolfman2000 ...okay, this blog is GMT based
02:03 Wolfman2000 so I have to stick with that
02:03 Wolfman2000 Thus, my post will be shown tot he world in about 22.5 hours from now
02:05 masak "Polymorphism in Perl is inherently straightforward to write because of the languages use of sigils and references." o.O # from http://en.wikipedia.org/wiki/Polymorphi​sm_in_object-oriented_programming#Perl
02:06 masak cognominal: that discussion was genuinely unsatisfactory. we both came off as fundamentalists in the other's eyes.
02:06 Wolfman2000 masak++ for the refresher
02:06 masak what in the world does polymorphism have to do with Perl 5's sigils?
02:07 Wolfman2000 ...the editor was drunk?
02:07 Wolfman2000 Probably stole some beer from jnthn's fridge
02:09 sjohnson heh
02:14 TimToady eep, the reversed camelia says 69!  8D
02:15 masak risqué Camelia.
02:17 cognominal "risqué" : yet another french word used with a different meaning in English!
02:17 TimToady lesse, the 69 is an xkcd reference, and the MT is then obviously a megatokyo reference
02:18 masak cognominal: enlighten me: what's the french meaning?
02:18 TimToady risky, I presume
02:19 cognominal indeed
02:19 masak aww... I was hoping for some sort of past participle.
02:20 TimToady past participle is no guarantee of future perfect
02:21 masak :P
02:21 alester joined #perl6
02:24 orafu joined #perl6
02:25 cognominal Apparently  69 is the number for fecundity  :   http://en.wikipedia.org/wiki/Feodor_Vassilyev
02:26 TimToady well, y'know, one thing leads to another...
02:26 TimToady dinner &
02:37 envi^office joined #perl6
03:03 masak TimToady: in Cursor.pmc, both L997 and L998 say "no 'warnings';".
03:06 masak L1008 and L1009 too.
03:16 JimmyZ joined #perl6
03:17 colomon rakudo: enum TrigBase { Radians, Degrees };
03:17 p6eval rakudo 7ce13d: Confused at line 2, near "{ Radians,"␤in Main (file <unknown>, line <unknown>)␤
03:18 colomon rakudo: enum TrigBase ( Radians, Degrees );
03:18 p6eval rakudo 7ce13d: Could not find non-existent sub Radians␤in Main (file src/gen_setting.pm, line 324)␤
03:19 colomon ah
03:19 colomon enum TrigBase <Radians Degrees>
03:19 colomon rakudo: enum TrigBase <Radians Degrees>
03:19 * colomon clearly should be in bed.
03:19 p6eval rakudo 7ce13d:  ( no output )
03:20 colomon ng: enum TrigBase <Radians Degrees>
03:20 p6eval ng a77213: Could not find non-existent sub &TrigBase␤current instr.: '_block14' pc 29 (EVAL_1:0)␤
03:20 colomon grumble.
03:22 SirKay joined #perl6
03:24 colomon ng: constant pi = 22/7;
03:24 p6eval ng a77213: Could not find non-existent sub &pi␤current instr.: '_block14' pc 29 (EVAL_1:0)␤
03:24 colomon grumble grumble.
03:24 colomon rakudo: say pi.Rat(1e-10)
03:24 p6eval rakudo 7ce13d: 3.14159265361894␤
03:24 Wolfman2000 ng: constant PI := 22/7;
03:24 p6eval ng a77213: Confused at line 1, near "constant P"␤current instr.: 'perl6;HLL;Grammar;panic' pc 519 (src/stage0/HLL-s0.pir:336)␤
03:25 JimmyZ ng: pi.say
03:25 p6eval ng a77213: Could not find non-existent sub &pi␤current instr.: '_block14' pc 29 (EVAL_1:0)␤
03:26 colomon rakudo: say pi.Rat(1e-10).perl
03:26 p6eval rakudo 7ce13d: 312689/99532␤
03:27 JimmyZ rakudo: pi.say
03:27 p6eval rakudo 7ce13d: 3.14159265358979␤
03:28 JimmyZ ng: (atan(1) * 4).say ;
03:28 p6eval ng a77213: too many positional arguments: 2 passed, 1 expected␤current instr.: 'perl6;Any;atan' pc 202091 (src/gen/core.pir:9666)␤
03:28 JimmyZ ng: (atan(1,1) * 4).say ;
03:28 p6eval ng a77213: too many positional arguments: 2 passed, 1 expected␤current instr.: 'perl6;Any;atan' pc 202091 (src/gen/core.pir:9666)␤
03:29 colomon ng: (atan2(1,1) * 4).say
03:29 p6eval ng a77213: too many positional arguments: 3 passed, 2 expected␤current instr.: 'perl6;Any;atan2' pc 200459 (src/gen/core.pir:8938)␤
03:30 colomon Of course, the reason I was trying to look at enums and pi is that I was looking at what it would take to rebuild the trig functions in ng....
03:30 zloyrusskiy joined #perl6
03:31 colomon Tene: looks like ng's given / when doesn't work because there is no "break"?  Any chance you could fix that up?
03:33 kthakore left #perl6
03:33 * colomon presumes break isn't that different from next and last...
03:41 Tene colomon: It's extremely similar.  In fact, you should do it.
03:42 colomon ai ai ai ai!  I don't know.  Maybe in the morning....
03:43 colomon where should I look in the code?
03:46 colomon src/builtins/control.pir?  looks like it already has break...
03:46 * colomon is off to bed, but will backlog when next awake...
03:54 beggars joined #perl6
04:25 JimmyZ_ joined #perl6
04:29 JimmyZ__ joined #perl6
04:34 JimmyZ___ joined #perl6
04:41 reid06 joined #perl6
04:45 zaphar_ps joined #perl6
04:45 diakopter Tene: did you implement trailing while/until?
04:46 Tene diakopter: No, I slept through all of last night.
04:46 Tene I guess I'll do it now.
04:46 diakopter heh
04:47 diakopter Tene: since you're the CONTROL guru, a question for you
04:47 Tene go ahead
04:48 diakopter to where does control return after a CONTROL block
04:48 diakopter generally
04:49 diakopter well, let me find my specific question
04:49 Tene diakopter: it should return from the block it's a handler for.
04:50 * diakopter searches the irclogs
04:53 diakopter sub baz { sub foo { my $x = { return 42 }; $x; CONTROL { say 'HERE0' }; say 'HERE1' }; sub bar { my $a = foo(); $a() }; { bar; say 'HERE2' }; CONTROL { say 'HERE3' } }; baz
04:53 diakopter Tene: ^^
04:55 Tene what do you expect the output of that to be?
04:55 Tene looks like CONTROL is NYI in ng...
04:56 diakopter well, here's a slightly fixed edition
04:56 Tene justasec, lemme add CONTROL
04:56 Tene easier than switching back to master
04:57 diakopter my $foo; sub baz { $foo = { my $x = { return 42 }; $x(); CONTROL { say 'HERE0' }; say 'HERE1' }; sub bar { my $a = $foo(); $a() }; { bar; say 'HERE2' }; CONTROL { say 'HERE3' } }; baz
04:59 Tene oh, ng doesn't have CATCH either
04:59 sjohnson rakudo:  my %hash = <1 1 2 1 3 1 7 1 8 1>; say $hash.perl;
04:59 p6eval rakudo 7ce13d: Symbol '$hash' not predeclared in <anonymous> (/tmp/0YgZmv7WoB:2)␤in Main (file <unknown>, line <unknown>)␤
04:59 sjohnson rakudo:  my %hash = <1 1 2 1 3 1 7 1 8 1>; say %hash.perl;
04:59 p6eval rakudo 7ce13d:  ( no output )
05:00 sjohnson rakudo:  my %hash = (4 => 1, 5 => 1, 10 => 1, 1 => 1); say %hash.perl;
05:00 p6eval rakudo 7ce13d:  ( no output )
05:01 diakopter $foo & baz are declared.  baz is invoked. now inside baz. $foo is assigned a block. bar is declared. now inside inline block. bar is invoked. (now what?)
05:02 diakopter std: my $foo; sub baz { $foo = { my $x = { return 42 }; $x(); CONTROL { say 'HERE0' }; say 'HERE1' }; sub bar { my $a = $foo(); $a() }; { bar; say 'HERE2' }; CONTROL { say 'HERE3' } }; baz
05:02 p6eval std 29238: ok 00:01 106m␤
05:02 Tene diakopter: you mean, where does the 42 go?
05:02 diakopter no
05:03 diakopter when bar is invoked, $foo is invoked inside bar.
05:03 Tene that's right.
05:03 diakopter , which declares/assigns $x.  and then invokes $x
05:04 Tene Right.
05:04 diakopter is HERE0 outputted?
05:05 diakopter (or HERE3)
05:05 diakopter and if HERE0 is outputted, is HERE1 also outputted?
05:05 Tene rakudo: sub foo { my $x = { return 42; }; $x(); return 137; }; say foo();
05:05 p6eval rakudo 7ce13d: 42␤
05:06 Tene Well, I don't recall the spec saying anything different about control blocks than catch blocks, so in that case, you don't inspect the exception at all, so it's still unhandled, so gets rethrown.
05:06 Tene and then caught as the return value of the block it's in.
05:07 Tene maybe?
05:07 Tene Oh, it's just a block, not a sub.
05:07 diakopter oh, actually I messed up the question
05:07 Tene so it looks like it would print HERE0, HERE3, and then exit.
05:07 diakopter eh?
05:07 diakopter why wouldn't it print HERE1 as well?
05:08 Tene according to rakudo master, = { ... } doesn't catch return exceptions.
05:08 nihiliad joined #perl6
05:08 diakopter ok, disregard.. here's a (still more) fixed example
05:08 Tene ok
05:08 diakopter std: sub baz { our sub foo { my $x = { return 42 }; $x(); CONTROL { say 'HERE0' }; say 'HERE1' }; sub bar { my $a = foo(); $a() }; { bar; say 'HERE2' }; CONTROL { say 'HERE3' } }; baz # what's outputted?
05:09 p6eval std 29238: ok 00:01 106m␤
05:09 diakopter sigh
05:10 Tene diakopter: it doesn't look like foo() returns anysomething invokable...
05:11 gfx joined #perl6
05:11 diakopter here was my original question (sorry for all the noise):
05:13 diakopter std: sub foo { my $x = { return 42 }; CONTROL { say 'caught return' }; $x }; sub bar { my $a = foo(); $a() }; bar();
05:13 p6eval std 29238: ok 00:01 106m␤
05:14 Tene rakudo: sub foo { CONTROL { say 'hi' }; 5 }; say foo()
05:14 p6eval rakudo 7ce13d: 5␤
05:14 Tene I don't know if fall-off-the-end is supposed to generate a return exception, but I kinda think it isn't.
05:15 diakopter rakudo: sub foo { CONTROL { say 'hi' }; return 5 }; say foo()
05:15 p6eval rakudo 7ce13d: hi␤5␤
05:15 diakopter rakudo: sub foo { CONTROL { say 'hi'; return 6 }; return 5 }; say foo()
05:15 Tene infinite loop!
05:15 p6eval rakudo 7ce13d:
05:15 p6eval ..hi␤hi␤hi␤hi␤hi␤hi␤hi␤hi␤hi␤hi␤hi␤hi␤hi␤hi​␤hi␤hi␤hi␤hi␤hi␤hi␤hi␤hi␤hi␤hi␤hi␤hi␤hi␤hi␤​hi␤hi␤hi␤hi␤hi␤hi␤hi␤hi␤hi␤hi␤hi␤hi␤hi␤hi␤h​i␤hi␤hi␤hi␤hi␤hi␤hi␤hi␤hi␤hi␤hi␤hi␤hi␤hi␤hi​␤hi␤hi␤hi␤hi␤hi␤hi␤hi␤hi␤hi␤hi␤hi␤hi␤hi␤hi␤​hi␤hi␤hi␤hi␤hi␤hi␤hi␤hi␤hi␤hi␤hi␤hi␤hi␤hi␤h
05:15 diakopter I guess
05:16 Tene I don't remember the spec saying how you're supposed to modify the return value in a CONTROL
05:16 diakopter rakudo: sub foo { CONTROL { say 'hi'; leave 33; }; return 5 }; say foo()
05:16 Tene in rakudo, you can stuff something different in $!
05:16 p6eval rakudo 7ce13d: hi␤Could not find non-existent sub leave␤in Main (file src/gen_setting.pm, line 324)␤
05:17 diakopter rakudo: sub foo { CONTROL { say 'hi'; give 33; }; return 5 }; say foo()
05:17 p6eval rakudo 7ce13d: hi␤Could not find non-existent sub give␤in Main (file src/gen_setting.pm, line 324)␤
05:17 diakopter rakudo: sub foo { CONTROL { say 'hi'; 33; }; return 5 }; say foo()
05:17 p6eval rakudo 7ce13d: hi␤5␤
05:17 Tene rakudo: sub foo { CONTROL { $!<payload> = 42 }; return 19 }; say foo();
05:17 p6eval rakudo 7ce13d: 42␤
05:17 reid06 joined #perl6
05:24 Wolfman2000 ...ARGH. I spent over 3 hours on what should have been a simple math problem.
05:24 * Wolfman2000 just...got frustrated too easily.
05:31 diakopter hm
05:31 diakopter I can't seem to remember what my question about lexical return vs. CONTROL was...
05:31 diakopter maybe jnthn will remind me tomorrow
05:34 ihrd left #perl6
05:43 MegaTron joined #perl6
05:50 synth joined #perl6
06:33 am0c joined #perl6
06:36 gfx joined #perl6
06:37 kaare joined #perl6
06:48 benatkin joined #perl6
06:48 benatkin is there a way to get a list of methods for an object in rakudo?
06:51 MegaTron left #perl6
06:57 pnate2 joined #perl6
07:00 zloyrusskiy joined #perl6
07:00 Tene rakudo: my Str $a = "foo"; say $foo.^methods();
07:00 p6eval rakudo 7ce13d: Symbol '$foo' not predeclared in <anonymous> (/tmp/ltCE8ryG4T:2)␤in Main (file <unknown>, line <unknown>)␤
07:00 Tene rakudo: my Str $a = "foo"; say $a.^methods();
07:00 p6eval rakudo 7ce13d:
07:00 p6eval ..WHICHperlACCEPTSsprintfScalarComplexStrpredenco​desuccucfirst:fsechtancosrandtruncatefmtfirsttran​ssortsqrtasincoshgrepsubstelemschompucindexchraco​tanhpairssamecasesubstrflipdoesatanhcosecexpacose​ccharscancosechlcfirstrootsmapciscomblogatanminac​osmaxbytessinrindexchoptanhIntvaluesasinhacose…
07:00 Tene benatkin: use .^methods(), which returns an array.
07:06 benatkin Tene: Thanks! That's exactly what I was looking for.
07:12 JimmyZ joined #perl6
07:13 Tene diakopter: turns out what you were trying to do isn't allowed and should fail.  S04 +996
07:21 justatheory joined #perl6
07:22 snearch joined #perl6
07:22 diakopter Tene: ok, good
07:22 diakopter that's what I was hoping
07:23 diakopter I've been reading only S05 lately, so it's all I remember.
07:23 diakopter it's just..... so .... much.  to remember.
07:24 Tene diakopter: if you want to leave the block early, use 'leave' instead of 'return'
07:24 diakopter I mean, the Perl 6 learning curve is very very unsteep, but it makes up for its lack of steepness with length
07:24 Tene 'return' *should* only work in its lexically-enclosing scope, and should fail outside of that.
07:25 diakopter what do you mean by "leave the block early"
07:25 pugs_svn r29239 | mattw++ | [advent] Added two more days for mathw, and two of them have topics.
07:25 Tene Provide a return value for the block other than by falling off the end of it.
07:25 Tene I'm currently working on the ng Exception class.  I almost have something usable, except I'm having trouble with setting the attribute in the constructor.
07:35 diakopter any parser/regex folks around?
07:35 * moritz_ doesn't think he counts
07:36 Tene diakopter: I've done some work on the rakudo parsers, and I think I maybe patched PGE once.  What's up?
07:37 Tene diakopter: how does this look to you: sub foo { CONTROL { $!.payload(42); $!.rethrow(); } return 19; }; say foo();
07:37 diakopter I wasn't trying to do anything in particular other than peer into the darker corners of the spec
07:38 diakopter b/c CONTROL didn't (well, still doesn't) make much sense to me
07:38 diakopter actually, it's the 'lexical return' that I don't get
07:39 Tene diakopter: that means that the return exception that's generated should be created with information identifying the sub it's destined for, and if it can't be caught by that sub, then it should fail with an error rather than be caught by a different sub.
07:41 diakopter ok (/me mentally defers thinking about that until next decade)
07:41 diakopter I mean, I get it and all, but it's just too depressing to think about at the moment.
07:41 Tene depressing?
07:44 diakopter must every 'return' create a return Exception?
07:45 Tene If the compiler is able to determine statically that nothing would interfere, optimizations are allowed.
07:45 diakopter is it ever able to do so (and how)?
07:45 Tene Well, for example, look at sub foo { return 42 }
07:46 Tene that return statement isn't nested in an inner block, and there are no CATCH or CONTROL blocks.
07:46 Tene That should be fairly easy to identify and just return that value directly instead of putting it in an exception.
07:47 diakopter or a Capture of that value?
07:47 diakopter or Parcel.
07:47 diakopter sigh.
07:47 Tene That might be more-correct, yes.  I'm not up-to-date on captures/parcels. :)
07:48 diakopter if only there were a 'function' keyword that introduced pure functions, with inputs and an output.
07:49 diakopter at least folks know how to optimize those
07:49 Tene If the compiler is able to determine that a function is "pure", it's free to optimize it away or memoize it.
07:49 pure1111 joined #perl6
07:50 Tene The best way for that to happen, afaict, is to label all of the most-basic items as pure or impure, and then you know that anything built out of only pure items will be pure.
07:50 Tene A trait like 'is pure' could theoretically emit warnings when you've used non-pure items in a function labeled 'pure', for example.
07:52 diakopter yeah, that's how my NFA simulator determines which parts of itself are actually a DFA
07:52 diakopter Tene: do you understand S05's notion of LTM
07:52 Tene No, I haven't read it.
07:52 diakopter !!
07:53 moritz_ diakopter: did you read my notes and LTM?
07:53 diakopter any of S05?  or the LTM section?
07:53 diakopter moritz_: I don't think so? url?
07:53 Tene I've skimmed the LTM section, but I didn't really internalize it.
07:53 moritz_ diakopter: http://perlgeek.de/en/arti​cle/longest-token-matching
07:53 Tene I've got it queued up in a firefox tab right now.
07:54 diakopter heh
07:54 moritz_ nothin really new, just an attempt to translate the technical language into something more readable
07:54 diakopter moritz_: OH. :) good, I can continue asking you about my technique/idea
07:55 lisppaste3 tene pasted "Anyone want to tell me what's wrong with this Exceptions usage before I commit it?" at http://paste.lisp.org/display/91412
07:55 moritz_ Tene++
07:55 diakopter moritz_: oh good (also)... I do need to add a new classification system for declarative vs. procedural
07:56 diakopter moritz_: I think I started explaining my idea the other day
07:56 diakopter but lemme throw an example at you if you don't mind
07:56 moritz_ Tene: I think CATCH and and CONTROL blocks are supposed to contain 'when'-clauses, and if none of them matches, fall through
07:56 moritz_ Tene: but all in all it looks much better than what we had in master
07:56 Tene moritz_: $_ is set to the exception object, so that'll be an option, yes.
07:57 diakopter actually I'll use your example
07:57 Tene ... crap, exceptions isn't what I was asked to do at all. :P
07:57 Tene something about postfix 'for', I think.
07:58 diakopter trailing while/until?
07:58 Tene Yeah, those.
07:58 Tene 'sec, lemme commit ex stuff.
07:59 diakopter .oO( there's nothing like a demanding non-user )
07:59 ng_feed rakudo-ng: (Stephen Weeks)++
07:59 ng_feed rakudo-ng: First draft of CATCH and CONTROL.  Also update Exception to be more usable.
08:00 diakopter moritz_: \s* [ a & b ] [ c | d ]
08:01 diakopter say the input is "qqq\t\nabdffffff", and we're at input index 3 (the tab)
08:01 iblechbot joined #perl6
08:03 moritz_ oh, that's a bad example
08:03 diakopter moritz_: wait, I think you're using & wrongly
08:03 moritz_ because [a & b] can't ever match :/
08:03 diakopter yeah
08:05 diakopter I guess it's a way to get multiple (perhaps overlapping) capturing groups out of the same segment of input
08:05 diakopter but how that's supposed to translate to a regular expression, I haven't yet grokked
08:06 Tene diakopter: You'll like the patch to fix trailing while/until.
08:07 moritz_ diakopter: there is no direct translation
08:07 ng_feed rakudo-ng: (Stephen Weeks)++
08:07 ng_feed rakudo-ng: Fix trailing while/until
08:07 diakopter ok, then how is it usable in LTM
08:07 moritz_ diakopter: but if you think in terms of DFAs, you can construct an automaton for <a> & <b> if you know the DFAs for A and B
08:08 Tene diakopter: happen to know what else needs doing in ng?
08:08 diakopter ok, but it won't be a DFA, it'll be an NFA
08:08 diakopter Tene: lol
08:08 diakopter postfix {}
08:09 Tene ng: my %a; %a{'foo'} = 'lol'; say %a{'foo'};
08:09 p6eval ng a77213: Cannot assign to readonly value␤current instr.: '&infix:<=>' pc 11850 (src/builtins/Junction.pir:273)␤
08:09 Tene o.O
08:09 moritz_ diakopter: but I think it works for NFAs too
08:10 diakopter yes, technically they're all interchangeable... but... crud.
08:11 Tene rakudo: my %a; %a{'foo'} = 'lol'; say %a{'foo'};
08:11 p6eval rakudo 7ce13d: lol␤
08:12 moritz_ diakopter: maybe you can ignore & for now, I don't think STD.pm uses it anywhere, and rakudo doesn't implement it either
08:12 * diakopter looks in STD
08:13 moritz_ or maybe there's a a clever way to emulate & with look-ahead assertions
08:14 diakopter I was thinking that, but it's still adding another post-condition check to verify the lengths
08:14 * diakopter doesn't know this '+&' operator in STD.pm
08:15 diakopter lots of 'em
08:15 diakopter I wish I knew Perl
08:15 moritz_ numeric binary AND
08:15 diakopter ok.
08:15 diakopter thanks
08:16 moritz_ rakudo: say 5 +& 7
08:16 p6eval rakudo 7ce13d: 5␤
08:18 diakopter moritz_: anyway, back to a better LTM example
08:20 diakopter (aa a* a <recursive_rule> | a aa* aaa) b+   # on input "aaaaaaaaaaabbbbbb"
08:20 diakopter er, the aa* should be 'aa'*
08:21 moritz_ rakudo: say +"aaaaaaaaaaabbbbbb".comb(/a/)
08:21 p6eval rakudo 7ce13d: 11␤
08:21 diakopter yay for counting
08:23 moritz_ if <recursive_rule> doesn't have a declarative prefix, the first branch of the alternation wins
08:23 moritz_ and then tries to match <recursive_rule>
08:23 moritz_ if it matches, all is fine
08:23 diakopter what if there were 12 "a"
08:24 moritz_ if not, the second-longest alternative (the second branch) matches
08:25 rfordinal joined #perl6
08:25 moritz_ diakopter: then both branches match the same length, and the disambiguation rules apply
08:25 moritz_ which would favour the first branch, iirc
08:26 moritz_ because of the longer literal prefix
08:26 diakopter ah
08:29 moritz_ does that sound sane to you?
08:29 diakopter yeah
08:30 mathw Ar
08:30 diakopter so, the declarative prefixes are just "aa a* a" and "a 'aa'* aaa"?
08:30 mathw I had a great idea on the way to work about what to do for my third advent calendar spot, and now I've forgotten it
08:31 moritz_ diakopter: if <recursive_rule> starts non-declarative, yes
08:31 diakopter moritz_: so here's my idea to get "automatic LTM"
08:31 diakopter first the rules have to be ordered correctly (so that disambiguation just works)
08:32 diakopter in alternations, I mean.
08:32 diakopter then, all literals and sequences are flipped left-to-right
08:32 diakopter and the tokenizer above would become:
08:33 moritz_ (sorry, have to run... will be back online in 15 or 20min, and backlog)
08:34 diakopter /(.*?)(((a)(a*)(aa))|((aaa)((?:aa)*)(a)))/
08:35 Tene pmichaud: please review my Exceptions commit for sanity.
08:36 diakopter the non-greedy .* forces the generated dfa to eat the minimum number of chars from the beginning (really, the end) of the input string
08:37 diakopter I mean, /^(.*?)(((a)(a*)(aa))|((aaa)((?:aa)*)(a)))$/
08:37 diakopter tested against "bbbbbbaaaaaaaaaaa"
08:39 diakopter yes, the dfa will probably backtrack a lot... but that's not a concerning issue... that's much more efficient (less expensive) than a continuation/coroutine-based nfa simulator backtracking and exhaustively brute-forcing
08:42 diakopter I mean
08:43 payload joined #perl6
08:44 diakopter well
08:44 diakopter I think/hope the relevant backloggers get what I'm saying
08:44 diakopter despite my flubs
08:45 diakopter oh wait, hm
08:48 diakopter I forgot that LTM doesn't backtrack at all..
08:48 moritz_ well, that's only partially true
08:48 diakopter so that example is flawed...
08:50 diakopter it can backtrack?
08:50 moritz_ non-declarative parts in branches can force backtracking
08:51 moritz_ and a calling rule can also force backtracking
08:51 moritz_ regex { <ltm> <foo> } # if <foo> fails, <ltm> has to backtrack
08:51 diakopter but non-declarative parts aren't in ltm
08:51 moritz_ yes, but they can still make a branch of LTM fail that would otherwise win
08:52 cognominal joined #perl6
08:52 diakopter sigh
08:53 diakopter ok
08:53 diakopter that proves my idea won't work..
08:53 moritz_ regex impure { {} 'x' }; regex ltm { a* b* <impure> | a* }
08:53 moritz_ 'aabb' ~~ /<ltm>/
08:53 moritz_ matches aa
08:54 diakopter why
08:54 diakopter (not aabb)
08:54 moritz_ because <impure> doesn't match
08:55 diakopter oh, right
08:55 moritz_ there's no <commit> or so after the declarative prefix
08:55 diakopter so
08:56 diakopter regex impure { {} 'x' }; regex ltm { a* (b*)? <impure>? | a* }
08:56 moritz_ would match 'aabb'
08:57 rfordinal left #perl6
08:57 diakopter wow, hm.
08:57 diakopter (aside)
08:57 moritz_ for ltm purposes b* and (b*)? mean the same thing
08:57 moritz_ just the capture is different
08:58 diakopter sigh.
08:58 diakopter it's going to be easier for me just to do the full-blown NFA simulation throughout
08:59 diakopter but each char in parallel
08:59 diakopter as TimToady wants to do with STD
09:00 diakopter so, as soon as a branch chews a char, it yields to its parent | node
09:00 * moritz_ wanted to write a DFA matcher ever since he thought he grokked LTM, but is kinda scared by the amount of work, and short of tuits
09:00 diakopter the parallel nfa would have the same complexity as an equiv dfa
09:01 diakopter but lots more overhead
09:01 diakopter unless it were compiled to a lot lower level
09:01 diakopter so, in that example
09:01 diakopter assuming full backtracking
09:02 diakopter regex ltm { a* b* <impure> | a* }
09:02 diakopter '|' is the topmost node
09:03 diakopter so it dispatches the highest-priority rule first, which it should be able to determine statically (without descending into them, evaluating them)
09:03 diakopter the engine knows it's in "ltm mode", so the child nodes know where to "return" to when they chew another char
09:04 diakopter ... descend to a*, written as star(lit("a")), let's say
09:05 diakopter all ltm is initially greedy
09:06 diakopter so star tries its rule, which succeeds with one char, but that lit("a") knows to yield back to the topmost '|' (ltm alternation)
09:06 diakopter and informs that node to return to itself on that branch
09:06 diakopter itself meaning that lit("a")
09:10 moritz_ is your input string still 'aabb'?
09:10 diakopter in jsmeta/sprixel, that would be something like   n.t.ltm_node.yielding = n; n = n.t.ltm_node; break;   /* then the ltm_node knows it was on its 0th branch, so it does: */  n.branches[0] = n.yielding;  n.next = new n.kids[0].c(n);
09:10 diakopter yeah
09:11 moritz_ why does lit("a") yields back to the topmost '|'?
09:11 moritz_ I'd expect star(lit("a")) to try to exhaust all matches first
09:11 diakopter for parallel nfa
09:12 diakopter it's this thing TimToady invented... a much more powerful version of "bit-parallel nfa" you can read about on google
09:12 moritz_ ok, I know nothing about those
09:12 diakopter kidding; he didn't invent it..
09:13 diakopter but, I'm explaining my understanding of it here
09:14 diakopter so the topmost '|' then launches the star(lit("a")) from the rhs
09:14 moritz_ ok, go ahead then
09:15 diakopter which does the same thing... and the topmost '|' prunes any branches that didn't chew a char the last run, and dispatches them again
09:15 diakopter it must go char by char b/c otherwise there would be huge state explosion in the diabolical cases
09:16 moritz_ kinda makes sense, yes
09:17 diakopter so, all the states are kept as-is in case the whole pattern needs backtracked
09:18 diakopter actually I'm stupid
09:18 diakopter the left branch is both(star(lit("a")),both(sta​r(lit("b")),rule("impure")))
09:19 diakopter OH
09:19 diakopter so in fact, each branch doesn't need to precompute which portions are 'declarative', because it can discover that lazily
09:21 diakopter when it's in ltm mode and it hits a recursive rule (yes, those can be detected) or any of the other ltm terminators, it just returns 'done_ltm' or whatever.
09:22 diakopter HI ALL YOU BACKLOGGERS.  SORRY FOR ALL THE NONSENSICAL TALK. :)  HAVE A NICE DAY
09:22 diakopter I've always wanted to do that.
09:23 diakopter it'll be easier to detect whether a rule portion is recursive than the full "whether it's procedural"
09:23 diakopter ok bye
09:24 moritz_ bye
09:24 moritz_ masak++ # http://perl6advent.wordpress.com/2009/​12/02/day-2-the-beauty-of-formatting/
09:30 moritz_ phenny: tell masak that I changed two details in your post, s/maps/mappings/ and s/to/too/ - hope that's fine by you
09:30 phenny moritz_: I'll pass that on when masak is around.
09:35 moritz_ obra: could you please add http://perl6advent.wordpress.com/feed/ to planetsix?
09:39 payload1 joined #perl6
09:50 IllvilJa moritz_: I just created Perl6-Term--ANSIColor on github, with the intent of porting (selected parts) of the Perl 5 Term::ANSIColor module.
09:52 IllvilJa moritz_: would it be ok if I... er... borrowed some stuff from your json module?  Things like .gitignore, Configure, general layout etc,  just to get the Per6 Term::ANSIColor module to reach some "skeleton" status.
09:53 moritz_ IllvilJa: sure
09:54 moritz_ IllvilJa: tough the Configure script is most likely very out of date
09:54 IllvilJa moritz_: Thanks. (And thanks for the warning re Configure scripts)
09:59 mberends joined #perl6
10:01 diakopter mberends: hiya
10:01 diakopter moritz_: oh, I'm not really asleep
10:01 mberends diakopter: is that really you? awake at this time?
10:02 diakopter yeah
10:02 mberends diakopter: your LTM explorations are fascinating to trace
10:02 diakopter thanks, I think
10:03 mberends yes
10:03 diakopter so
10:03 diakopter it really would be great to have some ltm tests
10:04 diakopter like, sorely needed
10:04 mberends there was no point until now, since there was no implementation
10:04 diakopter I mean, S05-metasyntax/longest-alternative.t
10:04 diakopter has some
10:04 diakopter but ...
10:05 moritz_ but?
10:05 diakopter they depend on a lot else
10:05 mberends it's one of those unfortunate things that LTM is not the opposite of STM
10:06 mberends ENEEDBIGGERLEXICON
10:06 diakopter "LTM - literals in nested torkens"
10:06 diakopter that's a good one
10:06 diakopter rotfl
10:06 diakopter haha
10:06 pmurias joined #perl6
10:07 diakopter pmurias: omg
10:08 moritz_ diakopter: the fourth block of tests doesn't depend on much else
10:08 diakopter I mean, "torkens" needs to lose the "r"
10:08 diakopter I see 3
10:09 sundar Hi.. When I give --prefix=~/some_dir to Configure.pl of parrot, gmake later *creates* a directory called ~ under the parrot source directory and puts things there, instead of picking my home directory. Is this expected behaviour? (and, is this the place to talk about parrot also?)
10:09 moritz_ sundar: there's a #parrot on irc.perl.org
10:10 moritz_ sundar: usually the shell expands the ~, so it's not really the job of Configure.pl
10:10 BinGOs are you sure that you didn't quote it in some way
10:10 moritz_ I think it's the = that prevents globbing
10:11 moritz_ try
10:11 moritz_ echo ~/argl
10:11 moritz_ vs
10:11 moritz_ echo =~/argl
10:12 mberends :-) it looked as if masak++ had mistakenly put a 0..9 instead of a 1..9 into his xmas tree in http://perl6advent.wordpress.com/2009/​12/02/day-2-the-beauty-of-formatting/ but if you run it, 0..9 is better :)
10:13 diakopter rakudo: say 0,2...9
10:13 p6eval rakudo 7ce13d: Multiple Dispatch: No suitable candidate found for 'cmp', with signature 'PP->I'␤in Main (file <unknown>, line <unknown>)␤
10:13 moritz_ if Configure.pl expanded the ~ itself, there'd be no way to install it into a directory that contains a ~
10:14 mberends ...and that would serve the directory creator right
10:14 moritz_ :-)
10:15 moritz_ anyway, not my place to decide
10:16 sundar I think moritz_ might be right that = prevents globbing (as globbing is obviously not happening here), but Configure.pl just gives the usage and exits if I give it as --prefix ~/some_dir
10:16 sundar Anyway, I'll move this discussion to #parrot, thanks.
10:17 * diakopter wonders what shell sundar has
10:18 sundar diakopter, it's plain old bash, and this is the first time I'm seeing this 'non-globbing' issue..
10:25 * diakopter suddenly entranced by http://lib.tkk.fi/Diss/2009/isbn9789512298884/
10:29 diakopter interesting.....
10:35 pmurias diakopter: omg?
10:39 pmurias diakopter: what's a good description of parallel nfa?
10:40 synth joined #perl6
10:43 mikehh joined #perl6
10:45 diakopter pmurias: I tried to give one above
10:46 diakopter nfa simulation, but with coroutines/continuations, essentially
10:46 pmurias and the paper you read about them in? or did you invent it yourself?
10:46 diakopter so "parallel" can be simulated
10:47 diakopter I invented my understanding of them :D   but I got much of my understanding from discussion with TimToady
10:47 snearch joined #perl6
10:47 diakopter but if you read some of the .pdf and .ppt online about bit-parallel nfa, you'll get some of the idea
10:52 pmurias so the general idea is that you keep a list of possible alternatives and you give the char to all of them?
10:53 pmurias @alternatives .= map { .match($char) };
10:53 lambdabot Unknown command, try @list
10:54 diakopter yes, but recursively, and branches are pruned as they can't keep up
10:54 diakopter pruned (well, really just ignored)
10:54 pmurias can't we neuter lambdabot so it doesn't give us the unknown command?
10:55 diakopter no..
10:57 diakopter the more I learn about the pattern language TimToady et al. have created, the more I realize that it allows full specialization/tailoring of pattern-matching behavior to both the patterns and the inputs at hand
10:58 diakopter imho, the novel expressivity in the pattern language is truly what distinguishes Perl 6 [from all other languages].  Yes, there are scads of other grammar-grammars and lexer/parser-generators, but none as dynamic and specializable.
11:01 diakopter and imho (again), the pattern language is such a big jump in expressivity that it dwarfs all the other language features (new or otherwise) in scale and impact
11:02 diakopter and so, I feel no qualms about claiming that it will de facto, whether anyone likes it or not, be the defining characteristic of Perl 6...
11:02 pmurias most of the time Perl 6 rules will be propably just used as modular regular expressions
11:11 envi^home joined #perl6
11:21 Juerd_ I expect that CPAN will have a huge collection of grammars readily available
11:22 Juerd_ And that it will definitely be an important factor in language choice, for organizations.
11:23 mberends diakopter: I agree with you 100%
11:24 mberends diakopter: you said it very well too, all of it
11:29 mberends that is also why nqp-rx is such a great leap forward. one day there may be a p6re library that becomes as popular to embed as pcre.
11:34 riffraff joined #perl6
11:40 payload joined #perl6
11:55 mberends question to the future: did I think of it first? (p6re)
11:56 * mberends performs a mkdir p6re locally... ;-)
12:04 meppl joined #perl6
12:05 mberends frettled++ is such a helpful backdoor ;)
12:05 frettled sundar: Sorry for not responding earlier.  If --prefix=~/foo becomes a literal, then that is a feature of the shell, not something other stuff can do something about.  Recent bash versions are not so "plain" anymore, they add lots of glossy features which may be useful or annoying, depending on what you're used to.  In the case of --parameter=whatever, this is how bash seems to work in 3.x.  Try "echo --prefix=~" and compare with "echo -- prefix=~"
12:07 SmokeMachine joined #perl6
12:11 JimmyZ joined #perl6
12:14 ihrd joined #perl6
12:25 bluescreen joined #perl6
12:48 JimmyZ joined #perl6
12:51 synth joined #perl6
12:58 bluescreen joined #perl6
13:17 indvin joined #perl6
13:22 takadonet joined #perl6
13:23 takadonet yo yo all
13:24 alexn_org joined #perl6
13:26 iblechbot joined #perl6
13:26 ruoso joined #perl6
13:28 bluescreen joined #perl6
13:31 muixirt joined #perl6
13:36 rodi joined #perl6
13:41 payload joined #perl6
13:46 * colomon completely fails to understand why next and last work in ng, but break doesn't.  The code looks essentially the same.
13:47 moritz_ exceptions! A task for Tene++, I'd assume :-)
13:47 moritz_ ng: sub foo { CONTROL { say $_ }; return 42 }; foo()
13:47 p6eval ng 145824: ␤
13:47 moritz_ ng: sub foo { CONTROL { say $! }; return 42 }; foo()
13:47 p6eval ng 145824: ␤
13:47 moritz_ ng: sub foo { CONTROL { say $!.payload }; return 42 }; foo()
13:47 p6eval ng 145824: 42␤
13:48 moritz_ ng: sub foo { CONTROL { say $!.payload; $!.payload = 23 }; return 42 }; say foo()
13:48 p6eval ng 145824: 42␤Null PMC access in type()␤current instr.: '_block50' pc 353 (EVAL_1:155)␤
13:48 moritz_ ng: sub foo { CONTROL { say $!.payload; $!.payload(23) }; return 42 }; say foo()
13:48 p6eval ng 145824: 42␤␤
13:48 JimmyZ ng: break
13:48 moritz_ ng: sub foo { CONTROL { say $!.payload; $!.payload(23); $!.resume }; return 42 }; say foo()
13:48 p6eval ng 145824: Warning␤
13:48 p6eval ng 145824: 42␤Null PMC access in type()␤current instr.: '_block14' pc 29 (EVAL_1:0)␤
13:48 JimmyZ ng: next
13:48 p6eval ng 145824: Warning␤
13:48 JimmyZ break
13:48 JimmyZ ng: break
13:48 p6eval ng 145824: Warning␤
13:49 JimmyZ ng: loop { last; }
13:49 p6eval ng 145824:  ( no output )
13:49 JimmyZ ng: loop { break; }
13:49 p6eval ng 145824:
13:49 p6eval ..Warning␤Warning␤Warning␤Warning␤Warning␤Warning​␤Warning␤Warning␤Warning␤Warning␤Warning␤Warning␤​Warning␤Warning␤Warning␤Warning␤Warning␤Warning␤W​arning␤Warning␤Warning␤Warning␤Warning␤Warning␤Wa​rning␤Warning␤Warning␤Warning␤Warning␤Warning␤War​ning␤Warning␤Warning␤Warning␤Warning␤Warning␤W…
13:50 JimmyZ oh
13:50 JimmyZ ng: loop { continue; }
13:50 p6eval ng 145824:
13:50 p6eval ..Warning␤Warning␤Warning␤Warning␤Warning␤Warning​␤Warning␤Warning␤Warning␤Warning␤Warning␤Warning␤​Warning␤Warning␤Warning␤Warning␤Warning␤Warning␤W​arning␤Warning␤Warning␤Warning␤Warning␤Warning␤Wa​rning␤Warning␤Warning␤Warning␤Warning␤Warning␤War​ning␤Warning␤Warning␤Warning␤Warning␤Warning␤W…
14:01 JimmyZ__ joined #perl6
14:08 fridim_ joined #perl6
14:08 jimfuller joined #perl6
14:09 rgrau_ joined #perl6
14:20 jnthn o/
14:21 SirKay good morning.
14:22 moritz_ oh hai
14:22 JimmyZ__ howdy
14:24 * jnthn is on the train
14:24 mathw chooooo
14:24 jnthn Flight didn't crash or anything. :-)
14:24 SirKay and hacking perl at the same time?
14:24 mathw I'm wondering if going ice skating after work is a good idea
14:24 jnthn SirKay: I'm on the train with wifi less than an hour.
14:25 jnthn So mostly just glancing emails etc.
14:25 mathw I'm a little out of practice, and if I break my leg it's going to make tomorrow's job interviews a little inconvenient
14:25 mathw jnthn: which country are you in?
14:25 jnthn mathw: England!
14:25 SirKay ah, so you'll be heading out soon then?
14:25 mathw woooo
14:25 mathw So am I!
14:25 mathw jnthn: which bit?
14:26 moritz_ mathw: just be careful :-)
14:26 jnthn The east coast mainline bit, somewhere north of Grantham.
14:28 mathw moritz_: I intend to, quite apart from tomorrow's planned activities, breaking bones is painful
14:28 mathw Or so I've heard
14:28 jnthn mathw: Heading for around Scarborough. :-)
14:28 mathw jnthn: nice
14:28 mathw ish
14:28 jnthn lol
14:28 mathw I'm not sure how nice any of the UK is at the moment
14:28 jnthn Train ticket price wasn't nice, but at least no delays...yet.
14:28 mathw Most of it's damp
14:28 PerlJam good morning
14:28 mathw And the rest is underwater
14:28 jnthn I didn't get rained on yet.
14:28 mathw And I've not been to Scarborough
14:28 mathw Although I know someone at university there
14:28 jnthn Mostly because everywhere I've been is undercover.
14:28 mathw And she seems to like it well enough
14:28 mathw hi PerlJam
14:28 pmichaud It's snowing here.
14:28 mathw Here it's definitely considering raining
14:28 jnthn It's not so bad...actually, it's a village just south of there that I'm really headed for rather than the town itself.
14:28 mathw Probably just in time for our visit to the outdoor ice rink...
14:28 * moritz_ only knows Scarborough from a song ;-)
14:28 jnthn pmichaud: ooh! nice!
14:28 colomon mathw: last time I went skating, I ended up with fourteen stitches and a beard.
14:28 SirKay hey pmichaud.
14:28 PerlJam pmichaud: but will you have a white christmas?
14:28 pmichaud Snow.  In December.  In Dallas.
14:28 mathw Apparently Oxford's due 15mm of rain this afternoon though
14:28 mathw pmichaud: snow in Dallas at all is quite surprising
14:28 jnthn Meh, who cares about Oxford?
14:28 * colomon is jealous of pmichaud's snow.  But it will be here soon enough, he hopes.
14:28 jnthn ;-)
14:29 mathw jnthn: I don't, I'm from Cambridge
14:29 pmichaud colomon: where's "here"?
14:29 mathw drown the place
14:29 colomon pmichaud: Michigan
14:29 jnthn YEAH!
14:29 jnthn Cambridge is *so* much better.
14:29 mathw Oh yes, you went to Cambridge University didn't you
14:29 mathw My Dad works for them
14:29 jnthn Shhh...I was looking objective until you said that. :-P
14:29 mathw I disappointed all my teachers by not applying there
14:30 colomon We've gotten about an eighth of an inch of snow so far this year, which is surprisingly little.
14:30 colomon s/year/winter/
14:30 mathw None here yet, but we'd expect none until January or February, and then not much
14:30 jnthn That'snow good.
14:30 SirKay I learned how to make nested hashes yesterday.
14:30 mathw \o/
14:31 jnthn pmichaud: How goes the iterator interface/
14:31 pmichaud jnthn: been sidetracked on a couple of other items :-|
14:31 pmichaud It's definitely on today's plan, though.
14:31 jnthn Aww, ok.
14:32 jnthn OK, hopefully there's no side-trackings today.
14:32 jnthn I may or may not sneak in some hacking time this evening.
14:32 colomon Also for ng-ers: what's up with break?  It looks like it's implemented just the same as last/next, but doesn't seem to actually work...
14:32 * moritz_ doesn't even know what break is supposed to do
14:32 Bzek joined #perl6
14:33 jnthn I only slept about 3 hours last night though...
14:33 SirKay May I ask a quick question about arrays?
14:33 moritz_ SirKay: never ask to ask, just ask
14:33 mikehh joined #perl6
14:33 SirKay I was being considerate, given that this is about perl 5 and you probably have weightier things on your mind than noob questions :p but...
14:34 moritz_ I thought you meant Perl 6 arrays :-)
14:34 colomon moritz_: it's the magic thing that gets implements what happens at the end of "when" clauses, for one thing.  When it doesn't work, neither does "when".
14:34 SirKay Given the power of hashes, is there a use for arrays in larger, more permanent programs?
14:34 jnthn oh, when is broken?
14:34 moritz_ SirKay: sure
14:34 colomon jnthn: seems that way to me.
14:34 * jnthn wonders if that's a regression
14:34 moritz_ SirKay: whenever you want to preserve order
14:35 colomon > say sin(1, "radians");
14:35 colomon Could not find non-existent sub break
14:35 lambdabot <no location info>: parse error on input `;'
14:35 SirKay Hmm, yes.  I understand.
14:35 jnthn colomon: oh.
14:35 colomon That's in ng, and I'm pretty sure the problem is in Any!to-radians.
14:35 colomon which is just a given/when statement.
14:35 SirKay Perhaps there is a module that has been written to force hashes into a neat little row like arrays?
14:36 PerlJam SirKay: There's a module to get "ordered" hashes if that's what you mean
14:36 moritz_ a hash is a mapping, an array is a mutable list
14:37 SirKay But, it would probably still be slower than just using an array, unless something arcane that requires ordered hashes comes up, right?
14:37 moritz_ an array can answer me questions like "what is the first element" or "what is the last element?"
14:37 pmichaud .oO(I'm so happy we came up with the idea of putting regexes and grammars into NQP... much easier to test/debug)
14:38 moritz_ a hash answers me questions like "what's the element for $key?"
14:38 moritz_ I don't see a good reason to unify two things that serve so different purposes
14:38 jnthn colomon: I see the bug.
14:38 colomon \o/
14:38 SirKay I am simply trying to understand why arrays are irreplacable, when we have hashes.
14:38 jnthn colomon: in when_handler_helper
14:38 jnthn :name('breeak')
14:39 colomon d'oh!
14:39 jnthn should be
14:39 pmichaud SirKay: Hashes don't preserve order.
14:39 jnthn :name('&break')
14:39 PerlJam SirKay: It sounds like you're asking for implementation reasons when the reasons are really conceptual.
14:39 SirKay Not inherently anyway, yeah.
14:39 jnthn oops, I mis-spelt int on IRC
14:39 SirKay Perhaps.
14:39 jnthn The problem is the missing & anyway.
14:39 moritz_ SirKay: well, if you want to get a list of keys from a hash, you can to be able to store it somewhere
14:40 PerlJam SirKay: PHP conflates arrays and hashes.  (They have a single "array" that does both)
14:40 jnthn Adding that back should fix it.
14:40 moritz_ another thing about hashes: they don't permit multiple keys of the same value
14:40 moritz_ that can be a problem for some applications
14:40 SirKay hmm.
14:40 jnthn I need to get off the train Real Soon Now though, and am not sure my compile or test run would finish before I had to go. :-)
14:40 moritz_ lua also unifies arrays ans hashes
14:40 colomon jnthn: I'll take care of it.
14:41 moritz_ s/ans/and/
14:41 moritz_ but IMHO it's not a good idea
14:41 SirKay multiple keys of the same value...I just tested something to see if I understood it, but I didn't.
14:41 jnthn colomon++
14:41 jnthn yay, I did something useful today :-)
14:41 SirKay so I probably am imagining int wrong.
14:41 SirKay it.
14:41 SirKay not int :p
14:43 SirKay thanks for the help everyone.
14:44 moritz_ rakudo: my @a = 'a', 'a'; say @a.elems
14:44 p6eval rakudo 7ce13d: 2␤
14:44 colomon jnthn++ for tracking down the when bug (now fixed on my machine).
14:44 Tene colomon: given/when works now for you?
14:44 moritz_ rakudo: my %a = a=>1, a=>1; say %a.elems
14:44 colomon Tene: based on one quick test, yes.  :)
14:44 p6eval rakudo 7ce13d:  ( no output )
14:44 Tene :)
14:45 bluescreen joined #perl6
14:46 Tene colomon: you have commit privs on rakudo?
14:46 payload joined #perl6
14:46 colomon Tene: most certainly.
14:46 jnthn colomon++ has been comitting lots of stuff :-)
14:47 moritz_ btw the Perl 6 advent calendar had alraedy 730 visitors today (I think the day is measured in UTC, or so)
14:47 colomon moritz_: yes, UTC
14:47 moritz_ s/visitors/views/
14:47 ng_feed rakudo-ng: colomon++
14:47 ng_feed rakudo-ng: Fix when handler by switching 'break' to '&break'.  jnthn++
14:48 PerlJam Given the amount of twittering about the Perl 6 Advent calendar I've seen, I'm not surprised :)
14:49 colomon Given the regression, I think we clearly need a simple given/when test file that can be added to ng's spectest.data.
14:49 colomon But I need to kneed some bread now...
14:49 jnthn colomon: I dont think it's a regression I think it was me copy-pasting
14:49 jnthn omg doncaster
14:49 * jnthn packs up the laptop
14:49 jnthn bbl
14:50 colomon jnthn: whatever -- point is, obviously it isn't being test, and should be.
14:50 * PerlJam wonders if colomon is worried about getting a yeast infection on his knees.
14:51 pmichaud colomon: it might be tested, but we just haven't enabled that spectest yet.
14:51 moritz_ I'll runn tool/update_passing_blah soon
14:52 Tene colomon: you could also update ... ??? !!! to &fail &warn &die
14:52 mathw When it comes to my day for the advent calendar, how do I get my content on it?
14:54 moritz_ mathw: somebody has to invite you to the blog
14:54 patspam1 joined #perl6
14:54 moritz_ mathw: do you have a wordpress.com account?
14:55 am0c joined #perl6
14:56 moritz_ mathw: just /msg me an email address, open an account with that address, and I'll add you
14:57 mathw moritz_: I do have a wordpress.com account
14:59 * moritz_ hugs mathw. Welcome to perl6advent!
14:59 mathw lol
14:59 moritz_ :-)
14:59 mathw rofl
14:59 mathw "Howdy,
14:59 mathw You've been invited to Perl 6 Advent Calendar at http://perl6advent.wordpress.com as an author.
14:59 mathw If you don't care, just ignore this email.  :)
15:00 mathw Cheers,"
15:01 mathw Looks like it worked
15:01 mathw I've got new post options for perl6advent
15:02 mathw Writing my first post might be a good use of my train travel time tomorrow
15:02 mathw I'm torn between doing something suitably geeky, and knitting
15:02 moritz_ geeky knitting!
15:03 mathw Unfortunately my knitting isn't good enough to do anything geeky with it yet
15:03 mathw Unlike my friend, who has been making dice bags with little Cthulhus on them
15:03 mathw I need to learn how to do that...
15:03 * PerlJam thinks knitting is a weird skill for a computer geek
15:04 mathw It's something I'm still acquiring
15:04 mathw Perhaps an unwise choice of hobby for a cat owner
15:04 Day joined #perl6
15:04 Tene Is it possible to pre-post to the advent calendar, and then have it only show up on the public site on the given date?
15:04 mathw But I've only had a few instances of him trying to kill it
15:04 moritz_ Tene: yes
15:04 mathw Tene: wordpress.com should support that, yes
15:04 PerlJam (that said, I did pick up knitting from a friend's mother and made a few coasters, scarfs, shawl before stopping)
15:04 mathw In fact I would recommend it
15:04 PerlJam Tene: yes.
15:04 mathw PerlJam: I can only make scarves at the moment. I have much to learn
15:05 mathw I have an ambition to learn to make socks
15:05 arthur-_ joined #perl6
15:05 Tene I'll sign up for Dec. 17, then.
15:05 * moritz_ has knitted one sock in his life
15:05 mathw But I need to learn many things before then, like knitting tubes
15:05 PerlJam mathw: It's amazing what you can do with the right sized thread, the right sized needles, and a little knowledge of knitting :)
15:05 mathw yes
15:06 Tene I could take Dec 12 too, but I'd like to leave a spot open for anyone else who would like to contribute.
15:06 moritz_ Tene: great. Do you know your topic yet?
15:06 mathw Unfortunately I still lose count of simple rib stitch
15:06 Tene moritz_: No, I don't.
15:06 mathw knit 2/purl 2 seems easy...
15:07 PerlJam mathw:  I think knitting is something like juggling in that it's a repetitive task that doesn't require lots of thought once you find your groove.
15:07 Tene I'll sign up for both, and anyone should feel free to kick me off if someone else wants it.
15:07 mathw yes, that's why I like it
15:07 * moritz_ also added pmichaud to the calendar
15:07 mathw but it's easier to do than juggling, because there are lots of places which don't appreciate me throwing balls around
15:07 PerlJam pmichaud: do you have a wordpress account yet?
15:07 mathw not that I was ever a very good juggler...
15:07 mathw now what was my third topic
15:07 moritz_ PerlJam: already taken care of :-)
15:08 pugs_svn r29240 | tene++ | Take the last two advent slots. If anyone else wants them, feel free to kick me off.
15:08 Tene okay, going to work now, afk.
15:08 PerlJam moritz_: excellent!  :)
15:08 Day joined #perl6
15:12 Day_ joined #perl6
15:12 mariuz joined #perl6
15:13 rodi joined #perl6
15:15 lisppaste3 Day pasted "untitled" at http://paste.lisp.org/display/91438
15:15 colomon Day: you only need to use nopaste for longer things.
15:17 moritz_ Day_: we need people to write tests, modules, documentation, books, compiler, web pages, answer questions etc.
15:17 mathw Woo so the advent schedule is now full!
15:17 moritz_ and blogs, of course :-)
15:19 lisppaste3 Day pasted "untitled" at http://paste.lisp.org/display/91439
15:20 PerlJam Day_: interesting way to communicate.
15:20 moritz_ Day_: try http://webchat.freenode.net/?​channels=perl6&amp;nick=Day__
15:21 lisppaste3 Day annotated #91439 "untitled" at http://paste.lisp.org/display/91439#1
15:21 Day__ joined #perl6
15:21 PerlJam Day__: hooray!  :)
15:21 PerlJam (maybe :)
15:21 moritz_ Day_++
15:22 Wolfman2000 *yawn* morning
15:22 PerlJam greets Wolfman2000
15:22 moritz_ Day__: there should a text box in which you can type directly
15:22 Wolfman2000 won't be around too long: I have one more field experience for this semester, then back to finals working
15:22 moritz_ and then press Return
15:22 * Wolfman2000 really wants Dec 8th to come quickly...that's when he'll be free.
15:23 colomon Tene: do you have a quick ??? !!! test I can run?  I've made the change locally, and the tests pass like before, but I have no idea what it is supposed to do....
15:23 Day__ Would this be the text box?
15:23 moritz_ Day__: yes
15:24 Day__ Ah, yes, so I see it would
15:24 PerlJam Day__: welcome!
15:24 moritz_ colomon: sub foo { !!! }; dies_ok &foo;
15:24 Day__ Okay, thanks for the help.
15:24 moritz_ you're welcome
15:25 colomon > use Test; sub foo { !!! }; dies_ok &foo;
15:25 colomon Unable to parse blockoid, couldn't find final '}' at line 1
15:25 lambdabot <no location info>: parse error on input `;'
15:25 colomon ??????
15:25 Day__ So who should I talk with about documentation?
15:25 PerlJam Day__: what do you want to know or do?
15:25 Day__ I mean, possibly helping with documentation?
15:25 moritz_ Day__: with PerlJam, masak, or me (for example)
15:26 Day__ Briefly, I learned a fair amount of Perl about ten years ago, really enjoyed it, am returning to the project I was working then, have been reading about Perl6, sounds interesting, would like to help.
15:27 moritz_ Day__: we have a specification, and some tutorials for Perl 5 programmers
15:27 moritz_ Day__: what we're lack is user level documentation, either for newcomers, or programmers from other languages
15:27 moritz_ Day__: for the latter we're writing a book, to which you could contribute, for example
15:27 Day__ Yes, well that's what I would be good at - user level - especially since I will be relearning as I go along.
15:28 moritz_ http://github.com/perl6/book/
15:28 PerlJam Day__: Are you familiar with git?
15:28 moritz_ for the rest we don't have a well coordinated effort yet :(
15:28 Day__ moritz: okay, thanks / perljam: no, don't know git.
15:29 PerlJam Day__: are you familiar with revision control systems in general?  Subversion, Visual Source Safe, Bit Keeper, bzr, arch, darcs, CVS, SCCS, etc. ?
15:30 Day__ revision control system: only conceptually; never used one
15:31 Wolfman2000 right...I forgot about the perl 6 book
15:31 Wolfman2000 moritz_: Can you please add me to the book access?
15:31 * Wolfman2000 hopes to contribute something to it
15:31 Wolfman2000 afk
15:32 moritz_ Wolfman2000: what's your github id?
15:32 PerlJam Day__: see http://help.github.com/ to get started with git  There are some links at the bottom of the page that are very useful for a git-beginner
15:32 Day__ moritz: presumably I will learn more useful stuff if I look around the /book/ page, so I will mark that and this and get back to you later. Thanks!
15:32 Day__ And thank you, PerlJam, also!
15:33 moritz_ hugme: add wolfman2000 to book
15:33 * hugme hugs wolfman2000. Welcome to book!
15:33 xinming joined #perl6
15:34 mathw Yeah I need to write something for the book at some point
15:34 mathw I was supposed to be writing documentation from the start... I just sort of didn't
15:34 * mathw hides
15:35 PerlJam mathw: writing is hard  :)
15:35 mathw PerlJam: yes
15:35 mathw Well
15:35 mathw No
15:35 mathw It's knowing *what* to write that's hard
15:35 PerlJam yes.
15:36 PerlJam Once you figure that out, writing gets alot easier.
15:36 mathw Mmm
15:36 PerlJam Being creative is hard  :)
15:36 mathw But even if I don't write, I can proofread
15:36 mathw I can correct misused apostrophes
15:38 PerlJam I found myself wishing for u4x the other day.  (Really, I probably wish for it every day, but most times I can figure it out or look up what I need to know, but the other day I was having a hard time doing that and I pined for a tool that could help me)
15:40 ng_feed rakudo-ng: colomon++
15:40 ng_feed rakudo-ng: Update ??? !!! to &fail &warn &die at Tene++'s request.
15:41 bluescreen joined #perl6
15:44 pmichaud ...on the advent calendar, what's up with the mirrored Camelia?
15:44 moritz_ it forgot something, so it's flying back to fetch it :-)
15:44 perlygatekeeper joined #perl6
15:45 PerlJam pmichaud: mea culpa.  Feel free to change it though.  :)
15:45 PerlJam oh wait .. is pmichaud an admin
15:45 PerlJam ?
15:46 moritz_ PerlJam: I gave pmichaud only author privs, so he probably can't
15:46 moritz_ PerlJam: but feel free to change that
15:46 PerlJam moritz_: feeling quite free :)
15:46 Wolfman2000 back...had to have some breakfast.
15:47 Wolfman2000 moritz_++: thanks
15:47 PerlJam pmichaud: there,  you're an admin, so you should be able to modify the theme.
15:47 pmichaud (not sure I have _time_ to modify the theme today, though)
15:49 * moritz_ doesn't think there's anything wrong with a mirrored camelia
15:49 Wolfman2000 ...definitely makes me glad I already got my Day 3 post put up
15:49 Wolfman2000 or at least, on schedule
15:49 * Wolfman2000 won't have much time today or tomorrow either
15:49 pmichaud (mirrored camelia)   the "tm" is backwards, as are the "p6" in the wings.  :-)
15:49 PerlJam pmichaud: yep.  Feel free to change it  :)
15:50 moritz_ the mt (mirrored tm) stands for movable type, and reminds us of the shame of not having used a perl based blogging system
15:50 Tene pmichaud: term:sym<...> parses, but term:sym<???> and <!!!> don't, with identical rules: { <sym> <args?> }
15:50 Tene any ideas?
15:50 PerlJam moritz_: heh!
15:51 pmichaud Tene: prefix:<?> and prefix:<!> are likely getting in the way.
15:51 Tene Ooo...
15:51 pmichaud Tene: I don't have full LTM in place to be able to figure those out
15:51 * Tene nods.
15:51 Tene I think I'm planning to work on 'fail' semantics today... unthrown exceptions, etc.
15:51 * mathw must make sure to make veiled references to how awful PHP is in one of his posts
15:52 PerlJam mathw: We're in the business of building Perl up, not tearing some other language down.
15:53 nihiliad joined #perl6
15:53 mathw I know, I was kidding
15:53 mathw But I really don't like PHP
15:53 mathw Or Java
15:53 Tene mathw: PHP was a really promising simple little template language... it's a shame it never progressed past version 1.
15:53 pmichaud Tene: as a work around, you could add  <!before '!!!'>   to prefix:sym<!>
15:53 mathw Tene: nice way to put it
15:53 Psyche^ joined #perl6
15:53 PerlJam mathw: start a "PHP is dead" meme  or "Java is dead" see how long you can keep them going.
15:54 frettled haha
15:54 moritz_ oh come on, beating up a disabled kid is just not fair
15:54 moritz_ and no real fun either, too easy
15:55 Wolfman2000 moritz_++ for representing
15:56 frettled If the thread on reddit or whereveritwas hadn't been so Slashdot-at-its-worst, I might have commented that regexp syntax in the languages with PCRE is _not_ the same as in Perl.  And for the PHP-friendlies, that PHP messed up the conditional ternary operator, and really has a screwed up reputation for security vulnerabilities, to the extent that ... oh. I'm ranting again, am I not?
15:57 Wolfman2000 frettled: ...kind of, yeah
15:58 mathw I should clearly never have mentioned it
15:58 mathw It's just made everyone stressed
15:58 mathw I'm going ice skating now anyway
15:58 mathw Bye!
15:58 Tene I'm really not sure that I like the "$! is a list of all of the unthrown exceptions" thing... I'll try to implement it anyway, though.
15:58 frettled mathw: stressed?  naaah
15:58 Tene bye!
15:58 frettled bibi
15:58 PerlJam frettled: screwing up the ternary op isn't so bad.
15:59 PerlJam frettled: for the longest time perl had the precedence of ** wrong.  Should perl be indicted as PHP for that?
15:59 frettled PerlJam: yes.
15:59 quantumEd joined #perl6
15:59 frettled Principle of least surprise.  :)
16:00 astrojp joined #perl6
16:00 PerlJam frettled: getting things wrong will happen.  What deserves indictment is not learning and not growing and not fixing.
16:00 frettled But then again, Perl doesn't look so much like other C-like languages as PHP does.
16:01 frettled PerlJam: and changing things incompatibly in a patch level or minor version. :)
16:01 PerlJam And, as much as PHP annoys me, I prefer to think that PHP (as a community) *is* learning and growing and fixing.  They're just going at a different pace than others.
16:03 moritz_ like... introducing namespaces?
16:03 PerlJam sure.
16:04 PerlJam although they haven't yet learned to use a good namespace separator.
16:04 PerlJam But they will
16:04 PerlJam one day
16:04 PerlJam eventually.
16:04 moritz_ and they haven't learned how to choose a good separator
16:04 PerlJam (just like perl 6 will "arrive".  one day. eventually.)
16:05 frettled :)
16:05 frettled PHP as a community hardly exists.  But they have something that's pretty darn decent, and always has been: online annotated reference documentation.
16:06 frettled AFAICT, PHP has a very fragmented user/developer base/community.
16:07 frettled I also think they have been very successful at delivering a language with extremely quick deployment of web services.  I hope that the efforts masak++ and others are doing with Perl 6's web libraries will bring us close to that.
16:08 Wolfman2000 frettled: thanks for reminding me. Considering the...state of the economy and my lack of money, I need to try to talk to him about converting some of my websites over to Perl 6 so they can be hosted on Feather.
16:08 Wolfman2000 Unless...well, either of you guys won't mind me basically moving in on your virtual space.
16:09 Juerd_ One problem with hosting websites on feather is that they get ugly URLs
16:09 Wolfman2000 ...right. Not exactly an easy way to map www.myurlhere.com to feather.perl.nl:1337 is there
16:10 Juerd_ No.
16:10 Juerd_ Well, you could change the DNS records to point to feather
16:10 Juerd_ But as a rule of thumb, I'd like to support that only for Perl 6 projects
16:11 Wolfman2000 I understand. My Perl 6 Pastebin in Perl 5 could possibly fit that, but none of my other works.
16:11 Juerd_ A website about Perl 6, or about software written in Perl 6, can get this. But just using Perl 6 to build a website doesn't qualify it.
16:11 PerlJam Wolfman2000: have I mentioned nearlyfreespeech.net to you before?
16:11 Wolfman2000 PerlJam: let me take a look
16:12 Wolfman2000 ...sorry, but PHP 5.2 is not a favorite
16:12 frettled heh
16:14 Juerd_ Then which version of PHP do you prefer? ;)
16:14 Wolfman2000 Juerd_: very funny. I'm not a big fan of ANY version of PHP.
16:14 Wolfman2000 Heck, I originally built www.pumpproedits.com WITH PHP, and now it's on Python!
16:15 Wolfman2000 And postgresql
16:16 Juerd_ What's your gripe with php?
16:16 Wolfman2000 language is too messy
16:17 frettled It's also way too easy to create code that allows PHP injection, there are a bazillion ways of executing external code (with or without URLs), etc.
16:17 frettled IIRC, there is no safety net like taint mode.
16:17 frettled (safe_mode remains a joke)
16:21 Wolfman2000 ...looks like python is possible, but...they want .cgi extensions. In other words, no guarantees for frameworks
16:24 frettled mm
16:24 frettled It's difficult to combine frameworks with performance and security for multi-user setups (webhotels).
16:26 frettled CGI is okay-ish, because you can run it with suexec.
16:29 pnate joined #perl6
16:30 Wolfman2000 PerlJam: ...I'm looking at some numbers, and...while it's possibly tempting, I'm going to want to try to speak to someone on their service first.
16:30 Wolfman2000 I just...need confirmation.
16:31 PerlJam Wolfman2000: sure ... I have no stake in you going with them or not.  It just seems like a good option when you're on a budget.
16:32 SirKay I'm bored.
16:32 Wolfman2000 One of the main things that appealed to me with Slicehost originally was the full control.
16:32 Wolfman2000 ...I'm starting to wonder if I really need that anymore.
16:32 kaare_ joined #perl6
16:32 Wolfman2000 afk again
16:39 zloyrusskiy joined #perl6
16:42 astrojp left #perl6
16:47 cdarroch joined #perl6
17:03 rgrau_ joined #perl6
17:20 justatheory joined #perl6
17:30 SmokeMachine joined #perl6
17:43 payload joined #perl6
17:46 stephenlb joined #perl6
17:51 moritz_ hugme: tweet rakudoperl Perl 6 advent calendar day 2: The beauty of formatting at http://perl6advent.wordpress.com/2009/​12/02/day-2-the-beauty-of-formatting/
17:51 * hugme hugs moritz_; tweet delivered
17:52 moritz_ I hope pmichaud doesn't consider this use of the rakudoperl account an abuse
17:52 moritz_ it's not directly rakudo related
17:54 pugs_svn r29241 | lwall++ | [viv] add named access to the infix op
18:01 diakopter moritz_: I doubt it
18:01 snearch joined #perl6
18:02 xenoterracide joined #perl6
18:13 pmurias joined #perl6
18:14 Juerd_ I like to sit back when I read articles, so I increase font size
18:14 Juerd_ But the layout of the perl6advent page results in one small column and lost of wasted space :(
18:14 Juerd_ http://juerd.nl/i/6eaeeb8d9​51be19318b7da17a290943f.png
18:15 pmurias_ joined #perl6
18:15 TimToady a recent firefox should fix that
18:15 TimToady with proper settings
18:15 TimToady when I zoom it widens the whole bar
18:17 nbrown_ joined #perl6
18:17 Juerd_ I'm using a recent firefox though :)
18:17 TimToady maybe it's because I set the "also zoom pictures" bit
18:17 Juerd_ Ah, indeed
18:17 TimToady might have to do that via about:config
18:18 diakopter I couldn't use firefox but for the NoSquint addon
18:18 diakopter it rocks
18:18 Juerd_ I've disabled that because it makes most sites a mess.
18:18 Juerd_ But thanks; I forgot :)
18:18 diakopter NoSquint alleviates that b/c it saves per-site settings..
18:18 pmichaud moritz_: I'm fine with using rakudoperl for these tweets
18:18 Juerd_ diakopter: I'll have a look
18:20 Juerd_ diakopter: That's a great tool.
18:20 pmurias TimToady: infix:~ doesn't have the new infix attribute
18:21 diakopter I seem to recall having to do something special for infix:~
18:21 diakopter oh, it was a chain?
18:21 diakopter I don't remember
18:23 eMaX joined #perl6
18:23 TimToady pmurias: that's because it's list associative, actually, so infix would actually be a list of operators
18:24 pmurias but they would all be identical?
18:24 TimToady not necessarily, if there were an adverb
18:25 TimToady or if two different infixes are really the same thing, such as P6=> and comma
18:25 TimToady P5=> even
18:25 pmurias std: 1 < 4 <= 8
18:25 p6eval std 29241: ok 00:01 105m␤
18:25 TimToady but yeah, they should generally be the same
18:26 TimToady and I suspect the opp will treat , and P5=> as two different ops and break them apart anyway
18:27 TimToady so I suppose we could guess for now that args[1] is the same as args[3,5,7...]
18:27 TimToady but certainly the chaining ops have to track their differences
18:27 diakopter std: 5 <<=>>> 6
18:27 p6eval std 29241: ok 00:01 104m␤
18:28 diakopter what does <<=>>> mean
18:29 TimToady presumably hyper pairs
18:29 TimToady since => wins under ltm
18:29 TimToady I would write it <<[=>]>> to be clearer
18:30 TimToady well, I'd actually use «=>» if it came down to it
18:30 diakopter std: 5 <<<=>>> 6
18:30 p6eval std 29241: ok 00:01 104m␤
18:32 TimToady actually, if there's an adverb, I should guess the final infix, not the first one, and then the adverb distributes
18:32 TimToady assuming the adverb comes at the end
18:33 TimToady should probably spec that...
18:34 rfordinal joined #perl6
18:35 diakopter std: 4()
18:35 p6eval std 29241: ok 00:01 103m␤
18:36 TimToady actually, adverb wraps the whole op these days, so doesn't matter
18:38 pugs_svn r29242 | lwall++ | [viv] add infix to list associative ops too
18:39 diakopter rakudo: 0()
18:40 p6eval rakudo 7ce13d: invoke() not implemented in class 'Integer'␤in Main (file <unknown>, line <unknown>)␤
18:40 diakopter rakudo: ()()
18:40 p6eval rakudo 7ce13d: invoke() not implemented in class 'Undef'␤in Main (file <unknown>, line <unknown>)␤
18:40 diakopter rakudo: .()
18:40 p6eval rakudo 7ce13d: invoke() not implemented in class 'Undef'␤in Main (file <unknown>, line <unknown>)␤
18:40 diakopter rakudo: $_()
18:40 p6eval rakudo 7ce13d: invoke() not implemented in class 'Undef'␤in Main (file <unknown>, line <unknown>)␤
18:40 diakopter ng: $_()
18:40 p6eval ng c40cae: invoke() not implemented in class 'Mu'␤current instr.: '_block14' pc 29 (EVAL_1:0)␤
18:42 pugs_svn r29243 | pmurias++ | [mildew] use the new infix attribute
18:42 pmurias TimToady: updated mildew ;)
18:48 pmurias joined #perl6
18:53 TimToady diakopter: if your reversing algorithm can guarantee to find the first LTM candidate, it could work as an optimization in grammars that don't backtrack LTM much
18:57 justatheory joined #perl6
19:12 rfordinal joined #perl6
19:18 cotto_work joined #perl6
19:20 diakopter TimToady: that includes STD, right?
19:21 TimToady I don't plan on introducing that optimization until I figure out whether we need it based on the performance of the char-by-char NFA
19:22 diakopter ah
19:22 TimToady I'm not sure how much STD backtracks LTM these days
19:22 rfordinal left #perl6
19:22 TimToady I know it does some
19:23 diakopter I worked out an impl of the char-by-char NFA
19:23 diakopter (it could work in Perl 5 just as well as JS)
19:23 TimToady does it allow for the fact that a given rule might return many continuations?
19:24 TimToady a given char position goes 1-to-many, potentially, if there's a branch
19:24 diakopter are you asking whether it keeps all the intermediary states in case it needs to backtrack?
19:24 TimToady I don't know what you mean by intermediary here.  all states are states
19:25 diakopter or asking whether multiple '|' work together?
19:25 TimToady every time you match \d* at a char you return a state after \d* and a state before it
19:25 TimToady s/state/position/
19:26 TimToady though ratcheting helps eliminate some of those transitions
19:26 Guest442 joined #perl6
19:27 diakopter I don't think in terms of 'return'
19:27 diakopter but I might understand you
19:27 TimToady anyway, it's not that I haven't thought through the algoritm I want myself; it's just that I've been too distracted to actually implement it :)
19:28 [particle] i've had the same problem with P = NP
19:28 diakopter would you restate the "every time..." line?
19:31 jhorwitz joined #perl6
19:32 diakopter I'm confused by 'after' and 'before'
19:35 TimToady you won't be if you think of them as declarative rather than procedural
19:35 TimToady prefix them with "we are currently at a position that is" rather than "look"
19:36 TimToady oh way, nm
19:36 TimToady *wait
19:36 TimToady sorry, distracted as usual
19:36 * diakopter spinlocks
19:37 TimToady assuming backtracking, matching \d* leaves you in two possible states, one of which points to a position in the regex before \d so it can match more \d
19:38 TimToady and one pointing after it to indicate looking for whatever follows \d*
19:38 ShaneC joined #perl6
19:40 diakopter yes, each instance of a star node (well, every node) stashes where it started and where it last was
19:40 TimToady ratcheting turns the latter from a "before ." transition to a "before \D" transitition, exclusive with the back state to another \d
19:42 diakopter star and plus were the trickiest to figure out... to backtrack properly, they have to keep track of which "lengths"/"extents" each attempted production chewed, so it doesn't miss any
19:45 diakopter each state stashes references to their related states themselves; there's no "returning", which is what's confusing me
19:45 diakopter unless "returning" means "what's consumed/matched"
19:46 TimToady I use returning to refer to the abstract set of states returned by the function that takes a character and the previous set of states
19:47 TimToady doesn't necessarily mean "return" in an implementation set, more of a mapping
19:47 TimToady s/set/sense/
19:48 diakopter my nfa simulator must be more overheadish/abstracted than I realized...
19:49 diakopter I mean, it's really just recursive descent
19:50 diakopter except without the function calls
19:52 TimToady the problem with a lazy implementation is that it doesn't tell you what the set of longest token patterns actually are, which is one of the benefits to the current approach
19:52 TimToady you can just look in lex/STD/P6/termish and see all the patterns it's looking for
19:53 diakopter but if they're ordered properly by each '|' node, it should all just work out..?
19:53 TimToady this has been very important to me in debugging the grammar
19:53 TimToady not everyone can simulate a JIT lexer in their head
19:53 diakopter well, not all the time anyway
19:54 diakopter :P
20:00 TimToady phone
20:02 diakopter ng: ()()
20:02 p6eval ng c40cae: invoke() not implemented in class 'ResizablePMCArray'␤current instr.: '_block14' pc 29 (EVAL_1:0)␤
20:20 reid06 joined #perl6
20:20 diakopter does anyone know if/where the State of the Onion (video or transcript/slides) 2008 & 2009 are online?
20:20 alester joined #perl6
20:23 rgrau_ joined #perl6
20:28 ng_feed rakudo-ng: (Stephen Weeks)++
20:28 ng_feed rakudo-ng: Fix parsing for ??? and !!! until LTM
20:30 synth joined #perl6
20:31 miker_ joined #perl6
20:34 miker_ left #perl6
20:46 colomon joined #perl6
21:08 justatheory joined #perl6
21:15 payload joined #perl6
21:32 hercynium joined #perl6
21:36 sjohnson afternoon
21:37 colomon 'ello
21:40 sjohnson hi!
21:41 TimToady 今日は!
21:42 japhb joined #perl6
21:43 frettled «Today, wa!» claims Google Translate
21:44 arnsholt -wa is the topic-marker particle in Japanese, IIRC
21:44 arnsholt And I bet it's konnichiwa, now that I think about it
21:45 frettled Ahaha.
21:46 frettled 夕方、TimToady.
21:47 arnsholt (Mostly based on knowing that the middle kanji has a possible reading ni)
21:47 TimToady that would be 今晩は...
21:47 TimToady konbanwa
21:47 arnsholt Dangit =)
21:48 arnsholt Of course. Good evening, innit?
21:48 frettled Kum ba yah.
21:48 TimToady literally, "with respect to this evening..."
21:48 pmichaud ".bless"
21:49 TimToady funny thing is, to get the "wa" you have to type "ha", because that's how it's usually pronounced, except as a particle
21:49 TimToady otherwise your は comes out わ.
21:50 frettled The squigglies look all different then.
21:50 TimToady sorry, been reading Matz's tweets, which puts me into a nihongo mo-do, er, mode
21:53 sjohnson one good thing about coming here
21:53 sjohnson learn about perl 6, and learn some JP !
21:54 perigrin_ joined #perl6
21:54 jrockway joined #perl6
21:54 jjore_ joined #perl6
21:54 Grrrr joined #perl6
21:54 dukelet0 joined #perl6
21:54 Tene joined #perl6
21:54 frettled I'm intrigued by both, but I find it more comfortable and internally rewarding to spend brainpower learning Perl 6.
21:54 sjohnson i wonder if the Ruby fans will be like this
21:54 sjohnson :)
21:54 frettled sjohnson: oh, with documentation that was originally in Japanese, sure thing :D
21:55 arnsholt Hmmmmmmm. To what degree is it possible to embed new languages in Rakudo ATM?
21:55 * arnsholt suddenly got a flash of inspiration
21:55 frettled arnsholt: Parrot doesn't support too many different languages yet, and I think it depends on that.
21:55 arnsholt Perl 6 needs a Lingua::Romana::Perligata ^^
21:56 nsh joined #perl6
21:56 sbp joined #perl6
21:56 frettled arnsholt: ah, you were thinking of natural languages in some way?
21:57 frettled It would be cool to know enough Japanese to do puns in a Perl 6 program's namespace.
21:57 arnsholt No, I was thinking of a module more or less equivalent to Damian Conway's excellent module, which lets you program Perl in Latin =D
21:57 arnsholt (ref http://search.cpan.org/~dconway/Lingua-Romana-​Perligata-0.50/lib/Lingua/Romana/Perligata.pm)
21:58 frettled arnsholt: quite.
21:58 frettled insane.
21:58 arnsholt Yes. It's quite possibly my favourite CPAN module
21:59 arnsholt Which probably means that I'm completely and utterly deranged, but no matter. I've got a BA in Latin, so I'd better use it for something =)
22:00 sjohnson some of the Acme ones are kind of cute
22:00 frettled arnsholt: aha!  But that's useful.  The BA, I mean.
22:01 arnsholt Oh, yes, very useful. Especially with the support subject (40-gruppe) of Sanskrit ;)
22:02 frettled What's a «40-gruppe»?
22:04 arnsholt Oh, right, you graduated a while ago
22:04 arnsholt Essentially the B$whatever these days is made up of two main parts: the 80-group and the 40-group (the number being the number of credits in each group)
22:05 arnsholt The 80-group is your major, and the 40 your minor, to borrow some American terminology
22:05 arnsholt (and 10 credits is a third of a semester)
22:05 frettled Yeah, I celebrated my M.Sc.-equivalent over eight years ago, took the following day off from work, and watched some arabs go a bit over the top in celebrating both my achievement and my now-current employer's five-year anniversary, with some quite spectacular yet extremely tragic fireworks.
22:06 arnsholt Essentially, my BA is useless. It's made up of three languages that haven't had a native speaker for at least 1500 years.
22:06 PerlJam fireworks should never be tragic.  :(
22:06 frettled (IOW: an extreme downer after a very happy day on 2001-09-10)
22:06 arnsholt Probably closer to 2500 years in the most extreme case
22:06 sjohnson PerlJam: until someone loses an eye
22:07 frettled arnsholt: so there are 40 credits to each year of study?
22:08 arnsholt Each year is 60 credits
22:08 PerlJam sjohnson: I was almost that person many years ago.   Ened up with a very black face from a large bottle rocket that went off at quite the wrong angle.
22:08 arnsholt In addition to the two groups you have some free credits to spend and a few mandatory courses
22:08 frettled aha
22:08 sjohnson wow glad to hear you didn't get hit in the face.  i also was close to blowing up my hand with a firecracker with a short wick
22:08 sjohnson the little red cylinder ones
22:08 sjohnson that make a very loud noise
22:08 frettled sjohnson: as long as we don't make this a metaphor for pugs or rakudo, I'm happy
22:09 sjohnson frettled: worry not friend !
22:10 PerlJam Perl 6 is not a bottle rocket!  There will be no explosion or loud bang!  :)
22:10 * sjohnson hides under the bed
22:11 moritz_ re
22:12 sjohnson re?
22:13 trutwijd joined #perl6
22:13 moritz_ turned
22:13 PerlJam one more re and I'll  think we're talking about git
22:13 dukeleto PerlJam: Perl 6 is actually a roman candle
22:13 PerlJam dukeleto: perhaps an infinite roman candle.
22:14 frettled In today's Oslo.pm meet-up, krunen and sjn showed us masak++'s poker code on-screen (gist: 244255), and we noticed the following bit of code that had us scratching our heads for a few seconds:
22:14 trutwijd left #perl6
22:14 frettled my @deck = map -> $suit, $rank { Card.new(:$suit, :$rank) }, (Suit.pick(*) X Rank.pick(*));
22:15 PerlJam frettled: what part confused?
22:15 frettled krunen suggested that (Suit.pick(*) X Rank.pick(*) was a work-around for something in rakudo, and that seemed to be a reasonable explanation to me.
22:15 PerlJam "work around"?
22:15 frettled and then the confusion seemingly ended :)
22:15 dukeleto X is the cross-product operator?
22:15 moritz_ yes
22:15 PerlJam I haven't looked at the cod,e but Suit and Rank are enums?
22:15 PerlJam s/,e/e,/
22:15 frettled PerlJam: mm, there's no need to use pick both in my @deck = ... and  @deck .= pick(*), is there?
22:16 frettled Lines 65-68 http://gist.github.com/244255
22:16 frettled Essentially, what you'd want was simply to get the cross-product of the enums, not the randomized enums.
22:17 frettled If we understood it correctly, there is (currently) not a way of getting all the elements of enums in rakudo.
22:18 frettled Of course we expect masak's code to be technically flawless.  :D
22:19 PerlJam I think it's been postulated that enums should behave much like hashes, so you could use the normal Associative methods
22:21 moritz_ YourEnum.mapping behaves much like a hash
22:23 sjohnson pick is kinda cool
22:24 sjohnson probably make writing card games in p6 a breeze
22:25 sjohnson rakudo:  my @cards = <1 2 3 4 5>;  my $dummy = @cards.pick;  say $dummy~' '~@cards.perl;
22:25 PerlJam Do european card decks have 56 cards?
22:25 sjohnson i don't think so
22:25 frettled nopes, just the standard 52
22:25 sjohnson i think i broke the compiler
22:25 sjohnson no card games allowed i guess
22:25 sjohnson (´ー` )
22:26 PerlJam then perhaps the knight or the jack needs to get the axe :)
22:26 sjohnson either that or it thinks i called it a dummy
22:26 frettled PerlJam: what made you wonder?
22:29 PerlJam frettled: +2deck == 56
22:29 PerlJam er, +@deck even
22:30 frettled really?
22:30 frettled how does that happen?
22:30 mathw rakudo: (1..3 Z 4..6).perl.say
22:31 PerlJam frettled: there are 14 ranks times 4 suits.   That's 56.
22:31 frettled PerlJam: 14 ranks?  Where?
22:32 frettled The enum goes from 2, not 1
22:32 PerlJam 2,3,4,5,6,7,8,9,10, knight, jack, queen, king, ace    ...  I count 14 things :)
22:32 frettled oh, knight and jack
22:33 frettled that was magically fixed in gist: 247670
22:35 frettled phenny: tell masak http://gist.github.com/247670
22:35 phenny frettled: I'll pass that on when masak is around.
22:37 sjohnson i guess this is a subtle hint for me to install rakudo myself
22:38 frettled good thing we have that Perl 6 advent calendar
22:40 PerlJam colomon++ again for setting up the wordpress blog for that.
22:42 moritz_ and more than 1000 page views today
22:42 colomon Just another example of JFDI.  (And setting up a blog was your good idea.)
22:43 RonOreck joined #perl6
22:44 * colomon is glad to be reminded again of the power of just blundering ahead and doing it.  Works in many (most?) aspects of life...
22:44 frettled yup
22:44 PerlJam JFDI++
22:44 frettled @karma JFDI
22:44 lambdabot JFDI has a karma of 1
22:45 frettled JFDI doesn't need much karma, it works anyway.
22:45 moritz_ JFDI++
22:46 colomon JFDI++
22:47 sjohnson is it possible to give karma to made up names?
22:47 sjohnson cowie++
22:47 sjohnson @karma cowie
22:47 lambdabot cowie has a karma of 1
22:48 frettled bogons--
22:48 frettled @karma bogons
22:48 lambdabot bogons has a karma of -1
22:52 sjohnson lambdabot++
22:52 sjohnson @karma lambdabot
22:52 lambdabot lambdabot has a karma of 1
22:52 sjohnson heh, nice
22:53 sjohnson i care about the bots feelings
22:53 moritz_ hugme: hug lambdabot
22:53 * hugme hugs lambdabot
22:55 sjohnson hugme: hug the perl6 dev screw for their hard work
22:55 * hugme hugs the
22:56 Tene "screw"?
22:56 Tene oh "devs crew"
23:01 sjohnson oops
23:02 sjohnson i honeslty didnt mean to do that
23:02 sjohnson maybe that's why hugme didn't follow through
23:02 sjohnson hugme: hug 'everyone here'
23:02 * hugme hugs 'everyone
23:03 sjohnson who owns the hug bot?  maybe it could be programmed with a new features i'd be willing to work on
23:03 * diakopter reads http://irclog.perlgeek.de/text.p​l?channel=perl6;date=2007-02-03 and feels nostalgia
23:05 diakopter moritz_ or carlin?
23:07 * moritz_
23:08 frettled pointme: hugme
23:08 pointme Hugme hugs people! And gives commit access to various repos. It's source is at http://github.com/moritz/hugme/
23:08 frettled pointme: pointme
23:08 pointme Sorry, I don't know anything about that project
23:08 sjohnson it's moritz_'s bot?
23:09 moritz_ pointme is carlin's project
23:09 moritz_ hugme mine
23:09 frettled yup
23:09 moritz_ hugme: show hugme
23:09 hugme moritz_: the following people have power over 'hugme': PerlJam, TimToady, [particle], jnthn, masak, mberends, moritz_, pmichaud. URL: http://github.com/moritz/hugme/
23:09 frettled I thought that pointme knew about itself, but evidently not.  Ah, well.
23:10 frettled hugme: show pointme
23:10 hugme frettled: sorry, I don't know anything about 'pointme'
23:10 frettled heh
23:10 moritz_ pointme: masak
23:10 pointme masak submits rakudo bugs ;-)
23:10 diakopter pointme: moritz_
23:10 pointme Sorry, I don't know anything about that project
23:10 sjohnson moritz_: is it okay to do some hugme dev work on it?
23:10 frettled pointme: frettled
23:10 pointme Sorry, I don't know anything about that project
23:10 frettled It should say «frettled frettles»
23:10 moritz_ sjohnson: sure
23:11 diakopter pointme: Perl6
23:11 pointme Sorry, I don't know anything about that project
23:11 sjohnson sweet thanks
23:11 IllvilJa joined #perl6
23:11 moritz_ sjohnson: it's not updated automatically, so you can't accidentally break things
23:11 moritz_ sjohnson: what's your github ID?
23:12 sjohnson i'll know in a sec ;)
23:12 IllvilJa When building rakudo using "perl Configure.PL --parrot-gen", what version of subversion is required?  I have version 1.6.2 but it seem to be too old, as I get the message "svn: Unrecognized URL scheme for 'https://svn.parrot.org/parrot/trunk'"
23:13 romanhunt joined #perl6
23:13 sjohnson moritz_: smujohnson
23:13 IllvilJa Also trying to check out latest parrot using the recommended 'svn co https://svn.parrot.org/parrot/trunk parrot' fails with the same error message.
23:13 moritz_ IllvilJa: works here wiht 1.5.1
23:13 IllvilJa Hm.  Odd.
23:13 IllvilJa Ok, I'll google it.
23:13 moritz_ IllvilJa: maybe you don't have ssl support?
23:14 romanhunt left #perl6
23:14 IllvilJa Ah.  Could be a reason.  I'll google to see if I need to install some additional package or configure svn to support ssl...
23:14 frettled IllvilJa: are you using Debian, Ubuntu or somesuch?
23:15 IllvilJa frettled: I use Red Hat Enterprise Linux
23:15 frettled Ah, then I can't help you, but it's probably called libssl or something like that, even there.
23:16 romanhunt joined #perl6
23:16 IllvilJa frettled: thanks, I'll have a peek.
23:18 sjohnson moritz_: how do i join?
23:18 sjohnson do i wait for an invite to hugme?
23:22 Wolfman2000 joined #perl6
23:22 masak joined #perl6
23:22 sjohnson hugme: hug sjohnson
23:22 * hugme hugs sjohnson
23:22 Wolfman2000 evening
23:22 masak oh hai, #perl6.
23:22 phenny masak: 09:30Z <moritz_> tell masak that I changed two details in your post, s/maps/mappings/ and s/to/too/ - hope that's fine by you
23:22 phenny masak: 22:35Z <frettled> tell masak http://gist.github.com/247670
23:23 sjohnson sup masak didnt see ya there
23:23 masak moritz_: more than fine.
23:23 masak moritz_: thanks.
23:23 Wolfman2000 ...right, it's soon time for my post to be unleashed to the world.
23:24 masak frettled: is there an easy way in gists to see what it was you changed?
23:25 masak oh, did I do both 'knight' and 'jack'? silly me.
23:25 frettled I don't know of a way, I thought there was.  But yes, that's the only change.
23:26 masak frettled++
23:26 masak I obviously don't play cards enough.
23:26 frettled masak: I didn't react to it until PerlJam++ had hammered it into my head _three_ times that there were 14 ranks :D
23:26 masak :)
23:27 frettled masak: But perhaps you can answer the question I raised earlier, muahaha...
23:27 * masak hasn't backlogged yet
23:27 frettled masak: http://irclog.perlgeek.de/​perl6/2009-12-02#i_1793321 until 22:18
23:28 masak this is what I get for sleeping away half the day... :)
23:28 frettled heh
23:28 frettled you probably deserved it.
23:29 masak frettled: ok, so your question is 'why pick first on the enums and then on the array?'
23:29 masak did I get that right?
23:30 masak the .pick on the enums are a workaround until TimToady makes decides how enums will work in Perl 6. :) the .pick on the array is to shuffle the deck.
23:32 frettled Yes, you got it right.  So it's not a rakudo work-around, but a TimToady work-around.  ;)
23:33 frettled Then I can claim that the reason that krunen, I, and others were unable to answer that question this evening, was that it's not yet decided, so we _couldn't_ know.  Hah.
23:33 IllvilJa Problem with Subversion solved.  $PATH and $LD_LIBRARY_PATH had included a directory with a private install of Subversion under my home directory.  That Subversion were broken, hence the problem.  Now after amending $PATH and $LD_LIBRARY_PATH, I use the system /usr/bin/svn Subversion instead.
23:33 Wolfman2000 aren't enums basically read only arrays?
23:33 frettled IllvilJa: LD_LIBRARY_PATH is evil.
23:33 IllvilJa So now I'm building the latest dev version of rakudo.  Dangerous times lies ahead!
23:34 IllvilJa frettled: LD_LIBRARY_PATH is a bliss if properly setup.
23:34 masak phenny: tell TimToady look at this comment: http://perl6advent.wordpress.com/2009/12/0​2/day-2-the-beauty-of-formatting/#comments -- there's something missing before the '?', probably a <huey dewey louie> which was eaten by the HTML comment sanitizer. would adding an extra parameter :last-separator to .fmt for arrays (and hashes) be worth its weight, you think?
23:34 phenny masak: I'll pass that on when TimToady is around.
23:34 romanhunt hello all. I am a old C and perl (5) programmer who would love to begin helping out. Where do you suggest starting. I need to both learn the parrot src tree and functionality and also read the language spec I suppose
23:34 masak Wolfman2000: no, they are more like hashes than arrays, because they map names to values.
23:35 frettled IllvilJa: which rarely happens :)
23:35 masak Wolfman2000: but they're not exactly hashes either.
23:35 masak romanhunt: first off: welcome.
23:35 frettled romanhunt: Have you visited www.perl6.org?
23:35 frettled romanhunt: (and yes, welcome)
23:36 romanhunt thx.
23:36 romanhunt frettled: no not directly only links off of perl.org
23:36 masak romanhunt: the most important question for you now, I think, is "what do I want to do?". if you don't know, trying a few things out never hurts.
23:36 romanhunt pulled a cp of rakudo and parrot down and got things sorted out
23:37 frettled nice
23:37 romanhunt and scanned some mailing lists for TODO's and BUGS but thats about it
23:37 frettled romanhunt: If I recall correctly, perl6.org has a link to a document by moritz++ about Perl 6 for Perl 5 programmers
23:37 romanhunt ok I will read it immediately
23:38 masak \o/
23:38 frettled and don't hesitate to ask any questions here.
23:38 frettled you might interrupt my off-topic bike-shedding, but that's just for the best.  :D
23:39 Wolfman2000 I agree with frettled. Ask questions. Make them...make us think.
23:39 frettled Wolfman2000: oh, especially _them_
23:39 romanhunt ha ! well thx for the nice welcome. I will do some more reading up and begin to tear into things
23:39 IllvilJa romanhunt: as you probably already noticed, people here are friendly and encouraging.  So welcome and good luck with your closer encounters with Perl 6 and rakodo.
23:39 IllvilJa s/rakodo/rakudo/g
23:40 frettled [OT] IllvilJa: http://linuxmafia.com/faq/Admin/ld-lib-path.html
23:42 IllvilJa frettled: I've read that one and yes it's an interesting article.  But on the other hand, LD_LIBRARY_PATH has served me well when used in a controlled fashion.  But yes, when used in a not so controlled fashion... ;-)
23:43 frettled IllvilJa: I used to do so as well, until I read the origin for that article in the mid nineties :)
23:44 frettled I haven't missed it since.  But a few years ago, I stopped fiddling with that part of compiling myself, now I'm mostly grateful for Debian package maintainers' amazing work.  :)
23:45 IllvilJa Distribution package maintainers, regardless if it's Debian, Red Hat or Gentoo, usually does a quite fantastic job.  Sure, mistakes might happen, but it is a huge effort they take on.
23:48 IllvilJa 'make spectest' for rakudo is a good way to ensure that your computer will have a busy CPU for a looong time.
23:51 masak could somebody help me? I tried to extend .fmt to handle $lastsep: http://gist.github.com/247746
23:52 masak but the for loop doesn't run properly; it seems that the elements of .kv get bunched together in Pairs, or something.
23:55 frettled Isn't that essentially the same as your $suit, $rank { Card.new(:$suit, :$rank) }, ...
23:55 masak in what sense?
23:55 Wolfman2000 Hmm...card game...
23:55 Wolfman2000 frettled: good idea.
23:55 Tene masak: is 'given' specced to work like that?  returning the last value from the 'when' block?
23:56 masak Tene: yes.
23:56 Tene Oh.  I should fix that in ng, then.
23:56 masak :)
23:56 frettled masak: in that you have a pair of values on the RHS of ->
23:56 masak frettled: well, I have a list on the RHS.
23:56 frettled my intuition tells me that I'd expect pairs.
23:56 masak which gets split into tuples.
23:58 masak oh well. now I have a version that works.
23:58 masak but I don't get why that one didn't work.
23:58 masak I'm haunted by bugs. :)
23:58 frettled because of quantum
23:59 masak I did like this instead: http://gist.github.com/247746
23:59 frettled yup, I reloaded and saw it
23:59 frettled I think it's easier to understand what you want to do now, too.

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

Perl 6 | Reference Documentation | Rakudo