Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2010-09-01

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00:00 alksentrs So you don't have to put parens in ( ...long expression... ).perl.say
00:01 masak alksentrs: .perl.say given ...long expression...
00:01 alksentrs rakudo: .perl.say given 3 + 5
00:01 p6eval rakudo f8e959: OUTPUT«8␤»
00:02 Psyche^ joined #perl6
00:03 TimToady rakudo: 3+5 ~~ .perl.say
00:03 p6eval rakudo f8e959: OUTPUT«8␤»
00:04 alksentrs Perl 6 has a steep learning curve
00:04 TimToady in spots
00:05 alksentrs When I was learning it, anything involving : as syntax was incomprehensible
00:05 alksentrs e.g.  :a<b>
00:05 TimToady yes, : is one of the highly context sensitive characters
00:06 masak alksentrs: you are not alone in that.
00:06 jhuni left #perl6
00:06 Patterner left #perl6
00:06 Psyche^ is now known as Patterner
00:08 Italian_Plumber joined #perl6
00:10 risou joined #perl6
00:10 alksentrs In something like say(2 + * + (* + 4)), how does Perl know how far to extend the implicit block?
00:11 TimToady to the first approximation, it's only defined over infixes
00:11 TimToady with *.foo as a special case
00:11 alksentrs right
00:11 TimToady and unaries, I mean
00:11 risou left #perl6
00:12 alksentrs ok
00:12 TimToady rakudo: sort -*, <3 5 2 59 382 7>
00:12 p6eval rakudo f8e959:  ( no output )
00:12 TimToady rakudo: say sort -*, <3 5 2 59 382 7>
00:12 p6eval rakudo f8e959: OUTPUT«382597532␤»
00:13 TimToady rakudo: say ~sort -*, <3 5 2 59 382 7>
00:13 p6eval rakudo f8e959: OUTPUT«382 59 7 5 3 2␤»
00:13 TimToady arguably *.foo is just a unary
00:14 TimToady but the args have to curry correctly
00:14 azert0x left #perl6
00:15 TimToady re steep learning curve, we hope that for most people that turns into a long learning curve, where they learn things only as they need them, and can get away with cargo-cult programming where they don't understand completely yet
00:15 Quadrescence rakudo: say ~sort  ***, <3 5 2 59 382 7>
00:15 p6eval rakudo f8e959: OUTPUT«===SORRY!===␤HyperWhatever (**) not yet implemented at line 22, near "*, <3 5 2 "␤»
00:16 TimToady some people insist on marching straight up the cliff, though :)
00:16 Quadrescence rakudo: say ~sort 2**, <3 5 2 59 382 7>
00:17 p6eval rakudo f8e959: OUTPUT«===SORRY!===␤Confused at line 22, near "say ~sort "␤»
00:17 TimToady ** is an operator
00:17 Quadrescence yes indeed
00:17 Quadrescence rakudo: say ~sort 2*(*), <3 5 2 59 382 7>
00:17 p6eval rakudo f8e959: OUTPUT«2 3 5 7 59 382␤»
00:17 Quadrescence good work good work
00:18 Quadrescence let's take a look at ambiguity
00:18 Quadrescence rakudo: say ~sort 2***, <3 5 2 59 382 7>
00:18 lichtkind left #perl6
00:18 p6eval rakudo f8e959: OUTPUT«2 3 5 7 59 382␤»
00:18 TimToady not really ambiguous under LTM rules
00:19 Quadrescence This reminds me of Mathematica's pure functions, kind of. (<expression-containing-#>)&
00:19 Quadrescence (#+1)& ==> (lambda (x) (+ x 1))
00:20 azert0x joined #perl6
00:20 TimToady x +?
00:20 TimToady oh, lisp
00:20 TimToady :)
00:21 Quadrescence (:
00:21 TimToady -> $x { $x + 1 } hereabouts
00:21 TimToady is how we spell lambda
00:21 TimToady well, that, and *+1
00:21 TimToady and { $^x + 1 }
00:21 TimToady and { $_ + 1 }
00:21 TimToady and...and...and...
00:21 alksentrs On http://perlcabal.org/syn/, would it be possible to have better link descriptions than "X tags" and "C tags"? Not everyone knows POD.
00:22 TimToady um, yes?
00:25 TimToady alksentrs: would you like a pugs commit bit so you can fix it?
00:25 alksentrs I've never used SVN before... (I have used Git)
00:25 TimToady we're probably switching it to git pretty soon
00:27 Quadrescence TimToady: I dare you to use ⍵ instead of * as the formal parameter. ;)
00:28 TimToady why?  is there prior art?
00:28 Quadrescence Should I leave "why?" as an exercise?
00:28 * TimToady tends not to have read math papers
00:29 * TimToady prefers his greek to come the classical way
00:29 Quadrescence I guess you tend not to read APL either. ;)
00:29 Quadrescence (neither do I)
00:30 ruoso joined #perl6
00:30 alksentrs Why are there 2 versions of Term::ANSIColor on http://modules.perl6.org/ ? (Perl6-Term--ANSIColor and perl6-Term-ANSIColor.)
00:30 _macdaddy left #perl6
00:30 azert0x left #perl6
00:31 masak rakudo: my @a = 1, 2, 3; my %h = :@a; @a = (); say %h.perl # sometimes I expect cloning behavior in the second statement
00:31 p6eval rakudo f8e959: OUTPUT«{"a" => []}␤»
00:32 masak or maybe in the third one.
00:32 TimToady maybe you should program in a language without side effects
00:33 masak :)
00:34 alksentrs rakudo: {}[-1]
00:34 p6eval rakudo f8e959: OUTPUT«Null PMC access in get_string()␤  in 'Any::postcircumfix:<[ ]>' at line 1659:CORE.setting␤  in main program body at line 1␤»
00:34 * masak submits rakudobug
00:35 Quadrescence rakudo: {{}}[-1]
00:35 TimToady std: {}[-1]
00:35 p6eval rakudo f8e959:  ( no output )
00:35 p6eval std 32122: OUTPUT«[31m===[0mSORRY![31m===[0m␤Unsupported use of [-1] subscript to access from end of array; in Perl 6 please use [*-1] at /tmp/wdmhyaF1XE line 1:␤------> [32m{}[-1][33m⏏[31m<EOL>[0m␤Parse failed␤FAILED 00:01 115m␤»
00:36 alksentrs rakudo: {}()
00:36 p6eval rakudo f8e959: OUTPUT«invoke() not implemented in class ''␤  in main program body at line 22:/tmp/7rA5fvKgZR␤»
00:36 masak rakudo: {}[2]
00:36 p6eval rakudo f8e959:  ( no output )
00:36 alksentrs "class '' "?
00:36 TimToady usually means a parrot type leaking through
00:37 masak moritz_++ submitted a very similar ticket today.
00:38 Quadrescence rakudo: {}[({{2}}[0])[0]]
00:38 p6eval rakudo f8e959:  ( no output )
00:39 alksentrs rakudo: grammar G {}; G.parse('')
00:39 p6eval rakudo f8e959: OUTPUT«Method 'TOP' not found for invocant of class ''␤  in 'Grammar::parse' at line 5871:CORE.setting␤  in main program body at line 22:/tmp/fVBDHf3NAX␤»
00:45 espadrine left #perl6
00:46 masak Rakudo really sucks at reporting the right names of classes.
00:46 masak rakudo: class A {}; A.foo
00:46 p6eval rakudo f8e959: OUTPUT«Method 'foo' not found for invocant of class ''␤  in main program body at line 22:/tmp/IiczNZ8QJZ␤»
00:50 dalek yapsi: da2dcaa | masak++ | / (2 files):
00:50 dalek yapsi: [Yapsi] Detect variable use before declaration
00:50 dalek yapsi:
00:50 dalek yapsi: A semi-substantial patch. Keeps track of the 'currently visible variables'
00:50 dalek yapsi: to detect a use-before-declaration. This unbreaks two previously failing
00:50 dalek yapsi: tests.
00:50 dalek yapsi: review: http://github.com/masak/yapsi/commit/da2dcaa28bb85ebd5c8325dfd0fe537569e5e124
00:56 dalek yapsi: 5f23b48 | masak++ | t/runtime.t:
00:56 dalek yapsi: [t/runtime] uncommented one more test
00:56 dalek yapsi:
00:56 dalek yapsi: This test has been working since before last release, as a matter of fact.
00:56 dalek yapsi: review: http://github.com/masak/yapsi/commit/5f23b482895574f1aa70f5ed21a3c771ce140594
00:57 pugssvn r32123 | colomon++ | [t/spec] Unfudge two tests that now work.
01:02 masak left #perl6
01:03 dalek yapsi: 6baad9f | masak++ | t/ (2 files):
01:03 dalek yapsi: [t] whitespace therapy
01:03 dalek yapsi: review: http://github.com/masak/yapsi/commit/6baad9f567be58b1a631cefcefeaee027ba8e71a
01:05 meppl left #perl6
01:09 cjk101010 left #perl6
01:21 alksentrs left #perl6
01:23 yrgd left #perl6
01:31 yrgd joined #perl6
01:36 jferrero left #perl6
01:37 hercynium left #perl6
01:37 whiteknight left #perl6
01:45 hercynium joined #perl6
01:52 masak joined #perl6
01:55 masak did you know that you can now use 'when' as a statement modifier? http://www.effectiveperlprogramming.com/blog/543
02:04 masak std: my $a = our $a
02:04 p6eval std 32123: OUTPUT«Potential difficulties:␤  Useless redeclaration of variable $a (see line 1) at /tmp/QdzuD4bQpC line 1:␤------> [32mmy $a = our $a[33m⏏[31m<EOL>[0m␤ok 00:01 117m␤»
02:08 agentzh joined #perl6
02:08 masak another use case for the $obj.&subroutine() form: inside an interpolated string, when you're too lazy to use curlies ;-)
02:11 TimToady gah, they put break semantics on the statement modifier.  I wish they'd follow Perl 6's lead here instead of just making stuff up.
02:13 tylercurtis O.o while (...) { ... when ...; }
02:13 masak TimToady: you should go talk to them.
02:14 colomon oooo!  to maximize something, one should not use min!
02:14 FurnaceBoy colomon++
02:14 masak colomon: I think I read a theorem about that once.
02:14 * colomon couldn't figure out how he'd broken the weasel evolution algorithm....
02:15 masak colomon: did yours try to produce the diametrical opposite of METHINKS IT LOOKS LIKE A WEASEL? :P
02:15 colomon yes, exactly.
02:19 FurnaceBoy lol
02:19 FurnaceBoy Shakespeare refudiated?
02:19 colomon "QFDCATVXGTHKZXTPWIZWUGRDGKRI"
02:20 masak yes. that is the diametrical opposite.
02:20 * FurnaceBoy blinks
02:20 masak it has no characters in common in the appropriate locations.
02:20 FurnaceBoy ahhh a derangement ?
02:20 masak not at all.
02:20 masak simply optimized for not being like the target string. :)
02:20 FurnaceBoy ic
02:21 colomon and since it was the initial string, it never got any worse or better, it just stayed there.
02:21 masak of course. it's optimal :)
02:21 colomon slowly recalculating, desperately looking for a string which was even worse.
02:22 masak :)
02:22 masak can't improve on perfection.
02:24 leprevost joined #perl6
02:27 jhuni joined #perl6
02:27 Italian_Plumber left #perl6
02:32 flatwhatson left #perl6
02:36 flatwhatson joined #perl6
02:40 bluescreen joined #perl6
02:41 bluescreen is now known as Guest97742
02:46 colomon my version of the weasel: http://gist.github.com/560146
02:52 masak colomon: (^($target.chars)).map({ @chars.pick })
02:52 masak that looks odd to me.
02:53 masak @chars.pick($target.chars) would have worked fine.
02:53 colomon ooooo, better!
02:53 colomon and looked nicer.
02:53 colomon masak++
02:55 masak hm, { fitness $_ } or *.&fitness ? :)
02:56 masak the 'say' line should be moved to the start of the while loop to avoid duplication.
02:56 masak oh, belay that.
02:56 colomon masak: I've been trying to figure out the right approach for that.
02:56 masak then you won't get the last one, of course.
02:56 colomon yeah, it needs to come before and after.
02:57 masak we need an NOW_AND_LAST block :P
02:57 masak s/an/n/
02:57 masak erghbl.
02:57 masak s/an/a/
03:00 colomon eerr, wait, it needs :replace
03:00 masak oops. sorry :/
03:02 colomon next step: optimize max?
03:04 colomon right now it does twice as many calls to $by (in this script) than it actually needs to.
03:04 masak why?
03:05 tylercurtis It does $by($a) cmp $by($b) every time with a unary $by instead of caching the transformed values.
03:05 colomon you don't need to cache.
03:06 colomon you just need to keep track of the least result from $by as well as the input value that got that least result
03:06 masak colomon++
03:07 colomon I've been meaning to get around to implementing that for about five months, I think.  :)
03:07 dju left #perl6
03:08 colomon afk # bed
03:09 masak 'night, colomon!
03:09 FurnaceBoy left #perl6
03:15 dju joined #perl6
03:27 Transformer joined #perl6
03:29 isBEKaml joined #perl6
03:29 Transformer left #perl6
03:29 isBEKaml yapsi: say 42
03:29 p6eval yapsi:  ( no output )
03:29 hercynium left #perl6
03:29 isBEKaml ehh. p6eval yapsi borken?
03:30 masak seems so. :/
03:30 masak morning, isBEKaml :)
03:30 isBEKaml morning, masak!
03:30 * masak is attempting to implement 'our' declarations
03:31 jaldhar joined #perl6
03:31 colomon left #perl6
03:32 isBEKaml great! I see you also fixed the variable declaration thingy.
03:32 _jaldhar left #perl6
03:33 masak I did. that's tonight's results so far.
03:39 molaf joined #perl6
03:40 REPLeffect left #perl6
03:42 lue ohai o/
03:42 masak hello lue
03:42 masak rakudo: say ?( any(Bool::True, Bool::False) )
03:42 p6eval rakudo 2ac5fe: OUTPUT«1␤»
03:42 masak rakudo: say so any(Bool::True, Bool::False)
03:42 p6eval rakudo 2ac5fe: OUTPUT«any(Bool::True, Bool::False)␤»
03:42 * masak submits rakudobug
03:54 REPLeffect joined #perl6
03:57 isBEKaml masak: I see.
03:57 masak this 'our' variables business is a bit funny too.
03:57 isBEKaml bbiab # coffee
03:58 ash_ joined #perl6
03:59 masak so far I have this: I need to create a SIC block which is never actually executed. call it 'package'. all it contains is directives for all the 'our'-declared variables in the program.
03:59 lue Is there a Perl 6 Pod interpreter out there already? [I'm going to write one anyway, just curious]
03:59 masak lue: there's three that I know of.
03:59 Util perl6: my @x = 1, 2, 3; my ( $first, *@rest ) := |@x; say [ :@x, :$first, :@rest ].perl;
03:59 p6eval pugs: OUTPUT«*** Wrong number of binding parameters: 1 actual, 2 expected␤    at /tmp/ygSvi6KIGA line 1, column 18-46␤»
03:59 p6eval ..rakudo 2ac5fe: OUTPUT«["x" => [1, 2, 3], "first" => \(1, 2, 3), "rest" => []]␤»
04:00 masak lue: see http://gist.github.com/500732
04:01 masak Util: I'm not sure binding of a list of things has been correctly implemented in Rakudo yet.
04:03 masak std: label1: say "OH HAI"; label1: say "OH HAI again!"
04:03 p6eval std 32123: OUTPUT«[31m===[0mSORRY![31m===[0m␤Illegal redeclaration of 'label1' at /tmp/ntrRpTkFQO line 1:␤------> [32mlabel1: say "OH HAI"; label1: [33m⏏[31msay "OH HAI again!"[0m␤Illegal redeclaration of symbol 'label1' (see line 1) at /tmp/ntrRpTkFQO line 1:␤------> [32mlabel1: say "OH
04:03 p6eval ..HA…
04:04 lue .oO(I remember being specifically told 'not to worry about it' when I coded := a while ago, likely because it's more difficult than I would imagine.)
04:04 masak std: if 1 { if 2 { label1: say "OH HAI" } }; if 3 { if 4 { label1: say "OH HAI again" } }
04:04 p6eval std 32123: OUTPUT«ok 00:01 116m␤»
04:04 masak TimToady: ^^
04:04 ash_ is that wrong?
04:04 masak lue: indeed. don't worry about it. :)
04:05 masak ash_: I maintain that it is.
04:05 ash_ how/why?
04:05 masak ash_: let's say you want to goto label1. which one do you end up with?
04:05 fitnerd joined #perl6
04:06 ash_ none, you shouldn't be able to jump into a conditional block scope, imo
04:06 masak well, you can.
04:06 masak as long as the block doesn't require params.
04:06 Util masak: thanks!
04:06 masak np
04:07 masak the odd thing about labels is that they're not only visible to their enclosed scopes, but also to their surrounding scopes.
04:07 ash_ err, really?
04:07 masak in other words, you can goto both outwards and inwards.
04:07 ash_ thats going to be confusing...
04:07 masak the only restriction being the parameters thing.
04:07 ash_ hmm
04:07 masak because of that, I think that my second program is as illegal as my first one.
04:07 ash_ well, under those conditions, then std seems to be off
04:08 ash_ i still am not sure i'd want to be able to jump into a block, can you jump into a loop?
04:08 TimToady I want to be able to go from one when block to the next with goto
04:09 TimToady the conflicting labels will be caught when we start hoisting labels up into parent blocks
04:09 TimToady we don't do that now, so we can't see the conflict
04:09 masak ok.
04:10 lue masak: being a TI-BASIC programmer, that kind of scope-jumping seems perfectly alright to me [that doesn't mean I support labels, of course :)]
04:10 masak ash_: you can jump into a while loop (one without -> and params), but likely not into a for loop.
04:10 masak lue: :)
04:11 masak lue: most BASICs solve this by not really encapsulating the call stack.
04:11 ash_ so... you can jump into: loop { }, while { }, until { } style loops?
04:11 masak right. provided they don't do -> $a, $b stuff.
04:12 molaf left #perl6
04:12 masak which they might.
04:13 isBEKaml masak: sorry, I didn't notice your ping. seemingly we were typing at the same and I went off. :/
04:14 masak no worries.
04:14 isBEKaml masak: talking about the 'our' business, if we were to go by the way you describe, wouldn't it be cumbersome to write find-declarations or find-variables within 'package'.
04:15 lue .oO(in TI-BASIC, you're allowed to be lazy and in many cases leave off the final quote or parenthesis. I'm glad I found Perl 6.
04:16 isBEKaml masak: basically, leaving the whole set of 'our' declared variables and blocks in the 'package' would mean we have to find ways to jump around to them when called from elsewhere in the program.
04:17 masak isBEKaml: I've been thinking about that in the past few days.
04:17 isBEKaml am I sorely wrong here? (I won't be surprised)
04:17 masak isBEKaml: the amazing thing is, lexical lookup stays the same.
04:17 masak it's being done through the exact same mechanism as with 'my'.
04:18 masak the only thing that's different is that the container that the variable points to happens to reside in the special never-called 'package' block.
04:18 TimToady http://rosettacode.org/wiki/One-dimensional_cellular_automata#Perl_6
04:19 masak so all wee need to do is to provide the runtime with enough information to know when a declared variable should be bound to a variable in the package block.
04:19 isBEKaml masak: I guessed as much about the lexical lookup. I was more concerned about variable state with 'our'. They are mutable everywhere, right? :)
04:19 lue masak: I would love to help out with rakudo's parsing of Pod. My idea is a standalone program, like P5's perldoc.
04:19 masak well, neither more or less than 'my' variables :)
04:20 isBEKaml but _not_ everywhere.
04:20 masak lue: then you might enjoy checking out mberends++' module.
04:20 lue [One reason I'm interested in it is so I can read S26 nicely formatted :)]
04:20 masak isBEKaml: well, neither are 'our' variables, viewed in that light.
04:20 masak std: { our $b }; say $b
04:21 p6eval std 32123: OUTPUT«Potential difficulties:␤  $b is declared but not used at /tmp/Xbufh2uJOg line 1:␤------> [32m{ our $b[33m⏏[31m }; say $b[0m␤ok 00:01 117m␤»
04:21 masak hm.
04:21 masak maybe I do have the wrong mental model, after all.
04:22 isBEKaml rakudo: { our $b } say $b;
04:22 p6eval rakudo 2ac5fe: OUTPUT«===SORRY!===␤Confused at line 22, near "{ our $b }"␤»
04:22 isBEKaml rakudo: { our $b }; say $b;
04:22 masak TimToady: ain't you glad we added .rotate now? :)
04:22 p6eval rakudo 2ac5fe: OUTPUT«===SORRY!===␤Symbol '$b' not predeclared in <anonymous> (/tmp/UZTaRlfTea:22)␤»
04:23 masak TimToady: which one is right, STD or Rakudo?
04:23 TimToady hmm.
04:23 TimToady std: { our $b }; say GLOBAL::<$b>
04:24 p6eval std 32123: OUTPUT«Potential difficulties:␤  $b is declared but not used at /tmp/kz2poooqe_ line 1:␤------> [32m{ our $b[33m⏏[31m }; say GLOBAL::<$b>[0m␤ok 00:02 117m␤»
04:24 s_mosher TimToady, these concise examples on rosettacode are becoming more and more readable to me. I'm not sure if that's my fault, yours/whomever's, or Perl6's.
04:24 TimToady surely the current package is GLOBAL...
04:24 TimToady s_mosher: you are doubtless being corrupted by the dark side of the duct tape.
04:25 masak TimToady: you mean that the lookup happens on the $b in GLOBAL::, so it's not an error?
04:25 TimToady std: { our $b }; say OUR::<$b>
04:25 p6eval std 32123: OUTPUT«Potential difficulties:␤  $b is declared but not used at /tmp/YjGJWYZ04w line 1:␤------> [32m{ our $b[33m⏏[31m }; say OUR::<$b>[0m␤ok 00:01 117m␤»
04:25 s_mosher that would explain some other things I've been noticing too ;)
04:25 TimToady std: { our $b }; say $GLOBAL::b
04:25 p6eval std 32123: OUTPUT«Potential difficulties:␤  $b is declared but not used at /tmp/wtcFqXz8Vp line 1:␤------> [32m{ our $b[33m⏏[31m }; say $GLOBAL::b[0m␤ok 00:01 117m␤»
04:26 TimToady oh, it's not complaining about the use, but the lack of use inside the block
04:26 s_mosher in some of the examples the Perl6 code comes off as more or less equally readable as the problem statement
04:26 TimToady s_mosher: that's one of our nefarious plans
04:26 s_mosher I can't say the same for (in this case) say the picolisp example that invariably follows
04:26 masak I think I will not worry about this for the first iteration of 'our' declarations. Rakudo doesn't seem to.
04:26 cjk101010 joined #perl6
04:27 isBEKaml rakudo: {our $b = 42; say $b; }; $b = 24; say $b
04:27 p6eval rakudo 2ac5fe: OUTPUT«===SORRY!===␤Symbol '$b' not predeclared in <anonymous> (/tmp/dnghhC1WQB:22)␤»
04:27 s_mosher I think it's great that it's working out that way. I never would have expected that.
04:27 masak Rakudo follows the mental model I had just moments ago.
04:27 TimToady I coulda done Z+ with shift and unshift, but then I'd've had to supply extra 0s
04:27 masak s_mosher: I hope we'll be able to surprise more people that way.
04:27 Italian_Plumber joined #perl6
04:27 Italian_Plumber left #perl6
04:28 s_mosher the big advantage is the Perl6 code is quicker to read than the problem statement is
04:28 TimToady well, people say the same about Haskell, but I'll be darned if I can see it
04:28 s_mosher well, in this case
04:28 s_mosher I can't read haskell, even when I can, I can't
04:28 isBEKaml TimToady: "Perl6 quicker to read than the problem statement." Another slogan? :)
04:29 TimToady Perl 6: just ignore the comments...
04:29 Raihjken joined #perl6
04:30 Raihjken lolwow umm hi. First time here :)
04:30 TimToady "self-documenting code"  where have I heard that before...
04:30 TimToady howdydoo
04:30 Raihjken lawlz maybe in class
04:30 Raihjken I know my teacher spoke about it a couple times :D
04:30 lue .oO(Perl 6: Do * you want.)
04:30 Raihjken Anyway was just lookin at Perl6, saw a link "come here to get started"
04:30 Raihjken Soo.. yeah
04:31 TimToady and here you came
04:31 Raihjken yeah
04:31 TimToady what sort of things are you interested in?
04:31 Raihjken I've programmed with perl before, I'm not a total noob, well.. mostly.
04:31 masak Raihjken: welcome!
04:31 Raihjken I think the only thing I made that worked, was a program that could read and write little text files, and play the music you wrote :)
04:31 Raihjken as beeps :/
04:32 TimToady beeps are a good start
04:32 masak rakudo: say ~<beep boop>.pick(3, :replace)
04:32 p6eval rakudo 2ac5fe: OUTPUT«beep beep boop␤»
04:32 masak :)
04:32 Raihjken lol umm I'm guessing I got a whisper or something from Masak, how would i go about replying (never being in an irc thing before)
04:32 Raihjken lawl
04:32 lue beeps are what all the cool 80's equipment used. Hello Raihjken o/
04:32 Raihjken I used the Audio::Beep Module
04:32 Raihjken and some simple code
04:32 Raihjken :P
04:33 Raihjken So you guys work on Perl6?
04:33 TimToady we pretend to
04:33 Raihjken :P
04:33 masak we like to think we are
04:33 TimToady we're really just playing
04:33 Raihjken nice.
04:33 Raihjken brb Shadow is shoving his face into his foot guessing he wants his litterbox changed >.>
04:33 Raihjken my foot*
04:33 Raihjken I think he's hinting XD
04:34 TimToady my brother-in-law's critter is also named Shadow
04:34 Raihjken kewl
04:34 TimToady mine isn't, but I'm quite certain she wants her litterbox changed
04:35 Raihjken I have two cats that are actually mine, Shadow and Ashes, were fostering a cat named spark that we helped out (he bit an electrical cord as a kitten and umm it wasn't pretty especially with the resulting mouth infection)
04:35 Raihjken Bella is my parents >.>
04:35 Raihjken THen we have the 3 dogs, and the weird dog I Dunno it's name but it looks kinda weird, were fostering it
04:35 TimToady are you familiar with any other programming languages?
04:35 Raihjken <3
04:35 Raihjken Umm
04:35 tylercurtis TimToady: does the :: sigil impose a type constraint?
04:35 TimToady :: isn't really a sigil
04:36 masak more like a collection of dots :P
04:36 Raihjken I know HTML, some JavaScript, some CSS, very little Java/C++ and not a whole lot of perl but enough to do the little things I need it to do
04:36 masak \o/
04:36 Raihjken I've read extremely little of the jargon file >.>
04:36 Raihjken lulz
04:37 Raihjken I haven't had time this summer to do much been at my girlfriends camp, I just turned 18 a couple weeks ago
04:37 masak congratulations.
04:37 masak it's a nice age.
04:37 isBEKaml jargon file in catb? We don't use too many jargons here. ;)
04:37 TimToady ah, sorear++, who hangs around here, is just a bit older
04:37 Raihjken she kinda leaves the computer stuff to me, ice skating and bead-art are more her thing <3
04:37 Raihjken thans
04:37 TimToady I'm a bit older than that
04:37 Raihjken lawl yeah the one on catb
04:37 Raihjken XD
04:38 Raihjken Everyone here works on Perl6?
04:38 masak isBEKaml: we don't use jargon here? that's an interesting statement.
04:38 Raihjken like.... Everyone?
04:38 Raihjken XD
04:38 masak Raihjken: no.
04:38 isBEKaml masak: :P
04:38 TimToady when jnthn comes back from vacation, you'll find a kindred lolcat
04:38 Raihjken XDXD
04:38 Raihjken caturday is better imo.
04:38 isBEKaml masak: I said "We don't use too many jargons here"
04:38 masak Raihjken: we have many people here who never say anything. when we need to vacuum, we just lift them gently.
04:38 tylercurtis Does the :: not-really-a-sigil impose a type constraint?
04:39 Raihjken umm
04:39 masak isBEKaml: how much is too much in this case?
04:39 masak tylercurtis: sometimes.
04:39 TimToady tylercurtis: depends on how you're using it
04:39 Raihjken the only things I know that you put before code would be
04:39 Raihjken use Tk
04:39 isBEKaml masak: well, that depends on how much is too much. :P
04:39 Raihjken use Strict
04:39 Raihjken and use warnings
04:39 Raihjken XD
04:39 * tylercurtis is wondering if he can treat self in methods without explicit invocant parameters as ::self.
04:39 Raihjken :P
04:39 TimToady I doubt it
04:40 TimToady std: ::self
04:40 p6eval std 32123: OUTPUT«ok 00:01 114m␤»
04:40 Raihjken XD
04:40 Raihjken what was that S:
04:40 masak Raihjken: I think you'll blend in here just fine. we need to find a way to direct your youthful energy into a project.
04:40 Raihjken kewl
04:40 TimToady and suppress about half of the XDs
04:40 Raihjken only one thing
04:40 masak Raihjken: maybe talk to lue too, when he's around.
04:40 Raihjken I start school next wing
04:40 lue hai o/
04:40 Raihjken week*
04:40 Raihjken wow
04:40 Raihjken huge typo
04:41 masak oh, there's my lue <3
04:41 Raihjken :)
04:41 TimToady lue is also one of our loose cannons
04:41 masak that's why I thought of him :)
04:41 Raihjken lawl so now I'm a loose cannon :P
04:41 masak XD
04:41 lue .oO(I do have a certain fondness for bullet bill's)
04:41 Raihjken So is their any kind of ..
04:41 Raihjken ETA for Perl6?
04:42 TimToady it's already here, in spots
04:42 masak Raihjken: last Christmas. didn't you get the memo? :)
04:42 Raihjken lol
04:42 Raihjken last christmas my mom gave me a mickey of vodka and told me to get lost
04:42 Raihjken XD
04:42 lue depends on which parts of Perl 6 you want :)
04:42 Raihjken nice
04:42 TimToady but all of the examples on http://rosettacode.org/wiki/Category:Perl_6 run under rakudo
04:42 Raihjken This might sound kinda odd
04:42 Raihjken but I've noticed almost every "nerd" (pardon) has a cat :O
04:43 Raihjken or at least the ones I know
04:43 Raihjken rakudo?
04:43 TimToady we need cats to keep us humble
04:43 masak Raihjken: rakudo is a Perl 6 implementation.
04:43 tylercurtis It occurs to me that given that I plan to use STD as the parser for Bennu, there's no reason to worry about that.
04:43 TimToady rakudo: say "Hi, Raihjken!"
04:43 p6eval rakudo 2ac5fe: OUTPUT«Hi, Raihjken!␤»
04:43 Raihjken the only thing i remember was a site I came across with a parrot on the page, screaming "I RUN PERL6 pick me!" lawl can't remember what it was claled
04:43 Raihjken called*
04:44 Raihjken is that Rakudo?
04:44 masak aye.
04:44 isBEKaml Rakudo runs on parrot, yes. And, parrot is a VM.
04:44 Raihjken mmk
04:44 Raihjken *is barely keeping up*
04:44 Raihjken Parot is a Virtual Machine... like Java?
04:44 Raihjken or like
04:44 Raihjken fake-linux on a windows box
04:44 Raihjken XD
04:45 masak yes, like the JVM.
04:45 TimToady Java is the language, JVM is the, er, Java VM
04:45 Raihjken mk
04:45 TimToady or like C# to .NET
04:45 Raihjken is Rakudo truly perl6 then?
04:45 TimToady a goodly part of it
04:45 Raihjken cool
04:45 Raihjken I'm not a super-nerd sometimes I wish I was tho
04:45 TimToady have you studied math?
04:45 Raihjken I suck at math
04:46 TimToady what do you like to do?
04:46 Raihjken But my girlfriend is really good in french, and I used to write poetry frequently
04:46 Raihjken in english of course
04:46 Raihjken :P
04:46 ash_ rakudo: say [+] 1, 1, * + * ... 21;
04:46 p6eval rakudo 2ac5fe: OUTPUT«54␤»
04:46 Raihjken English and Music have kinda always been my thing i guess still got my clarinet and guitar sitting here
04:47 TimToady I've done guitar but never the licorice stick
04:47 Raihjken lol
04:47 masak Raihjken: how did you learn about Perl 6?
04:47 TimToady but mostly now I play the drums
04:47 TimToady violin is what I'm good at, though...
04:48 Raihjken umm I kinda got bored of perl, now I'm kinda just plain bored, so I figured wth, lets take a fresh look at perl, and then this link for perl6 was at perl.org and I figured wth, lets see whats up maybe my dumb luck as a noob could help someone
04:48 tylercurtis Raihjken: If you're interested in trying out Rakudo, http://github.com/rakudo/star/downloads or http://try.rakudo.org/ for an online shell.
04:48 _sri joined #perl6
04:48 masak Raihjken: your dumb luck as a noob can definitely help someone!
04:48 ash_ try.rakudo.org should be getting an update, (tonight/tomorrow) if i can figure out whats wrong with ipc::run :-(
04:48 TimToady it would probably be helpful to the people writing the documentation to have feedback on where you find it confusin
04:49 masak Raihjken: we need much of that kind of help around here.
04:49 tylercurtis alternately, as TimToady demonstrated earlier, there's an evalbot here in the channel.
04:49 masak ash_++
04:49 cjk101010 left #perl6
04:49 Raihjken evalbot?
04:49 cjk101010 joined #perl6
04:49 ash_ rakudo: say "Hi from an evalbot";
04:49 isBEKaml rakudo: say 42; # evalbot.
04:50 TimToady pugs: say "me too"
04:50 p6eval rakudo 2ac5fe: OUTPUT«Hi from an evalbot␤»
04:50 p6eval rakudo 2ac5fe: OUTPUT«42␤»
04:50 p6eval pugs: OUTPUT«me too␤»
04:50 Raihjken "Hi from evalbot"
04:50 masak rakudo: say "hi Raihjken! XD"
04:50 Raihjken XD
04:50 p6eval rakudo 2ac5fe: OUTPUT«hi Raihjken! XD␤»
04:50 lue .oO(do I dare?)
04:50 ash_ std: say "i validate syntax too"
04:50 p6eval std 32123: OUTPUT«ok 00:01 115m␤»
04:50 Raihjken lol
04:50 masak std: "two terms" "in a row"
04:50 p6eval std 32123: OUTPUT«[31m===[0mSORRY![31m===[0m␤Two terms in a row at /tmp/NaJY05ZXh5 line 1:␤------> [32m"two terms" [33m⏏[31m"in a row"[0m␤    expecting any of:␤ bracketed infix␤  infix or meta-infix␤      statement modifier loop␤Parse failed␤FAILED 00:01 116m␤»
04:50 Raihjken lol
04:50 Raihjken error
04:50 Raihjken in the face.
04:50 Raihjken anyway
04:50 lue perl6: say "Hello Raihjken, from the P6 world!"
04:50 Raihjken SO you guys want me to read documentation
04:50 TimToady it's sorry
04:50 p6eval pugs, rakudo 2ac5fe: OUTPUT«Hello Raihjken, from the P6 world!␤»
04:51 masak "Perl 6: it's sorry"
04:51 TimToady "when all else fails, read the directions."
04:51 Raihjken lol you guys need people to read your documentation and make it make sense eh?
04:51 Raihjken Alright any links to the documentations
04:51 Raihjken any emails I can send my progress too?
04:52 Raihjken I can do it whenever I'm bored at school
04:52 ash_ http://perlcabal.org/syn/ is a good starter, maybe?
04:52 Raihjken I just spent 500 bucks on a laptop >.>
04:52 TimToady or the book
04:52 ash_ that or a the book
04:52 Raihjken and a 140 on a 20" monitor,. and then got a 500 GB Hard drive and Lightscribe burner XD
04:52 Raihjken lawl
04:52 ash_ http://github.com/perl6/book/downloads
04:52 ash_ has a downloadable version of the perl6 book, its a pdf
04:52 Raihjken "The official Perl 6 Documentation"
04:52 Raihjken alrighjt
04:52 fitnerd left #perl6
04:53 Raihjken just read all that stuff then eh?
04:53 Raihjken kewl
04:53 TimToady sure, that's all :)
04:53 Raihjken ummm
04:53 Raihjken is their some sort of admin
04:53 Raihjken or heiarchy?
04:53 masak not really.
04:53 Raihjken Would I email stuff to someone?
04:53 ash_ you can talk about it in here
04:53 TimToady we're a careful organized anarchy
04:53 Raihjken umm
04:53 Raihjken ok
04:53 ash_ or the mailing list
04:53 Raihjken lol
04:53 TimToady *carefully
04:54 Raihjken thats a paradox, anarchy is never organized, anarchy itself is the definition of chaos
04:54 isBEKaml "organized anarchy". TimToady++
04:54 TimToady if you don't like paradoxes, you don't wanna hang around here
04:54 Raihjken lol I don't mind em
04:54 Raihjken some are fuin
04:54 Raihjken fun*
04:55 TimToady where are you going to school?
04:55 ash_ is ^* a valid range?
04:55 lue .oO[ we're an autonomous anarcho-syndicalist commune :) ]
04:55 Raihjken Korah Collegiate
04:55 ash_ rakudo: say ^5;
04:55 p6eval rakudo 2ac5fe: OUTPUT«01234␤»
04:55 TimToady rakudo: say (^*).WHAT
04:55 p6eval rakudo 2ac5fe: OUTPUT«Can't take numeric value for object of type Whatever␤  in 'Any::Numeric' at line 1341:CORE.setting␤  in 'prefix:<^>' at line 6774:CORE.setting␤  in main program body at line 22:/tmp/IR9YoqcGSN␤»
04:55 Raihjken I've just finished grade 12, but it was too late to apply for college so I'm kinda just taking whatever courses to fill time until applications are accepted again
04:56 Raihjken is this room itself run in Perl?
04:56 Raihjken That'd be pretty cool, just sayin
04:56 TimToady that's okay, many of us are late bloomers
04:56 ash_ rakudo: for ^5 { say $_; }
04:56 masak "Paradoxes are only conflicts between reality and your feelings of what reality ought to be" -- Feynman
04:56 p6eval rakudo 2ac5fe: OUTPUT«0␤1␤2␤3␤4␤»
04:56 Raihjken lol
04:56 ash_ rakudo: for ^* { say $_; last if $_ > 5; };
04:56 p6eval rakudo 2ac5fe: OUTPUT«Can't take numeric value for object of type Whatever␤  in 'Any::Numeric' at line 1341:CORE.setting␤  in 'prefix:<^>' at line 6774:CORE.setting␤  in main program body at line 22:/tmp/sqs1VA_D0x␤»
04:56 ash_ eh, just curious
04:57 ash_ std: for ^* { say $_; last if $_ > 5; };
04:57 Raihjken lol
04:57 p6eval std 32123: OUTPUT«ok 00:01 118m␤»
04:57 ash_ rakudo bug?
04:57 TimToady in theory should mean the same as either { ^$_ } or 0..^*
04:57 TimToady but not both
04:57 masak agreed.
04:57 Raihjken umm *clearly has alot of reading of Perl to do*
04:57 Raihjken :S
04:58 Raihjken I dunno I've pretty much used it like it's C++ XD
04:58 TimToady no pain, no gain :)
04:58 Raihjken Only with easier syntax
04:58 Raihjken :P
04:58 tylercurtis rakudo: my @a = 1, 2, 3, 4; .say for @a[^*];
04:58 p6eval rakudo 2ac5fe: OUTPUT«Can't take numeric value for object of type Whatever␤  in 'Any::Numeric' at line 1341:CORE.setting␤  in 'prefix:<^>' at line 6774:CORE.setting␤  in main program body at line 22:/tmp/O9CqNLHBnA␤»
04:58 TimToady Perl 6 is even easier, except when it isn't
04:58 masak Perl 6 has easy syntax.
04:58 Raihjken and finally something that doesn't take 300 lines to make a simple window D:
04:58 masak one just needs to know it, then it's easy.
04:58 TimToady there's just lots of it
04:59 * tylercurtis thinks he recalls seeing use of ^* as a { ^$_ } in the spec somewhere.
04:59 Raihjken umm anyway it is like quarter after 1 AM here
04:59 lue masak: speaking of paradoxes, can I cause one with your debugger yet?
04:59 Raihjken lol!
04:59 Raihjken I've never used debuggers
04:59 masak lue: I was planning to avoid that.
04:59 Raihjken never got the hang of em
04:59 Raihjken but that sounds like fun
04:59 masak lue: something like the old future being invalidate if you change the present.
04:59 Raihjken but I'm gonna head to bed, maybe play some Mabinog ifirst
04:59 TimToady o/
04:59 masak Raihjken: it was nice to meet you.
05:00 masak come back soon.
05:00 Raihjken ty nice to meet you guys too
05:00 Raihjken alright
05:00 Raihjken well
05:00 isBEKaml o/
05:00 masak \o
05:00 Raihjken I'm going back to lake superior this weekend
05:00 Raihjken but I'll be sure to check in once in a whil
05:00 Raihjken while*
05:00 Raihjken when I have internet
05:00 TimToady don't sink
05:00 Raihjken (and not Megan's weird dialup bs either)
05:00 masak TimToady: from lake superior, the only way is down :P
05:00 Raihjken lol
05:00 lue I suppose you could solve it by having tardis [that's the name of the debugger] only rewind time, instead of jumping back.
05:01 Raihjken well ttyl guys
05:01 masak lue: that's the plan.
05:01 Raihjken left #perl6
05:01 * masak needs to go offline for a while
05:01 masak bbl
05:01 masak left #perl6
05:01 TimToady o/
05:01 isBEKaml \o
05:08 TimToady I note that an 18-year-old guy was not put off by seeing Camelia on perl6.org.  :)
05:08 ash_ i like the Camelia logo
05:08 kaare joined #perl6
05:09 ash_ i am only 24
05:09 kaare is now known as Guest86362
05:09 * tylercurtis is another 18-year-old male who is not bothered by Camelia.
05:09 TimToady we just need to work on the turtle graphics a bit more, and we can get the 8-year-olds too
05:10 ash_ could i bug someone with linux, perl5 and rakudo to see if they can help me find out whats wrong with this program?
05:10 ash_ will need a cpan module too, IPC::Run if your willing to help
05:11 ash_ i get 2 different functionalities on 2 different OS's, this wasn't happening with an earlier version of rakudo, but i can't think whats changed to cause the problem :-(
05:11 TimToady what does it do?
05:13 ash_ on OS X, sub processes run fine, and are controllable via IPC::Run, on linux though, when I try to write to the stdin of the subprocess, it gives me "> " like rakudo was started as the parent process and blocks
05:13 ash_ os x and linux have identical versions of parrot, perl, rakudo, and IPC::Run :-\
05:14 TimToady is the sub-process running rakudo?
05:14 TimToady maybe it's REPL running is getting spooked somehow
05:15 s_mosher ash_, I have those things
05:15 ash_ its a parent perl process making a subprocess that is an instance of rakudo's repl
05:15 TimToady like maybe it thinks there aren't any args, or some such
05:16 cls_bsd joined #perl6
05:16 TimToady oh, you *want* the repl
05:17 ash_ s_mosher: http://gist.github.com/560253 is a gist of the problem, if that can run to the end, then it should work, it works on OS X, you'll need to correct the path to perl6 though
05:17 TimToady sounds more like your subprocess's STDIN is getting closed or redirected somehow
05:17 ash_ TimToady: ya, i do want the repl, its how try.rakudo.org will work, if i can fix this problem
05:19 s_mosher ash_, I'll give it a shot.
05:19 TimToady maybe a close-on-exec flag is wrong
05:21 ash_ hmm, perl -e "print $^F" prints 2 on both systems
05:21 ash_ the thing is, rakudo from like 2 weeks ago didn't cause this problem
05:22 ash_ if i change it to use perl5, it works too, and python works
05:22 ash_ so, i am wondering if its a change in parrot/rakudo thats causing my issue
05:22 TimToady seems like it must be
05:22 s_mosher ash_, it runs to completion here
05:23 ash_ s_mosher: really? what os? (and revision of rakudo)
05:23 ash_ i assume linux since i asked for it, but which one :P
05:24 s_mosher I rebuilt rakudo from git last night or today some time. Linux is 2.6.32 amd64
05:24 s_mosher it's Debian if that matters
05:25 s_mosher oh, have version string: This is Rakudo Perl 6, version 2010.08-26-g6ccdcda built on parrot 2.7.0 r48628
05:25 ash_ which commit if you do: git log
05:25 ash_ k
05:25 ash_ thanks
05:27 [Coke] left #perl6
05:27 ash_ same parrot revision... i wonder if it was the change to make FORBID_PIR work
05:29 ash_ i am going to revert to your build and see if the problem goes away
05:31 s_mosher I might have been less than hygenic when updating rakudo btw
05:32 s_mosher I don't think I left anything dangerous laying about when updating, but I didn't look as hard as I do when I'm being paid
05:32 ash_ lol, its fine
05:33 [Coke] joined #perl6
05:33 s_mosher I know, I'm just paranoid that something weird happened and you'll get a different result
05:38 wtw joined #perl6
05:39 ash_ almost done rebuilding, my test server is running on an intel atom, so its kinda slow :P
05:42 ash_ s_mosher: by completion, it printed 'done' with some other stuff, right?
05:42 ash_ its still doing it for me
05:43 s_mosher yeah
05:43 au|irc joined #perl6
05:43 s_mosher aside from that, was there anything specific you were looking for in the output?
05:43 ash_ no, just that it didn't block waiting on input
05:44 ash_ for me, it blocks and only does the first print and never finishes
05:45 s_mosher oh huh
05:45 s_mosher um... well bad news sorta
05:46 s_mosher okay I updated, rebuilt, tried again
05:46 s_mosher because I'm curious
05:46 s_mosher and it runs to completion, but I get different (more) output
05:46 ash_ how different?
05:47 s_mosher an added line: "print 2"
05:47 ash_ ah, that should be there
05:48 ash_ something like: "print 2\n> 2" ?
05:49 s_mosher sec
05:49 redicaps joined #perl6
05:50 redicaps left #perl6
05:50 s_mosher oh well this isn't so different then
05:50 s_mosher print 2... and whatever is to follow gets cut off
05:51 s_mosher sometimes I get nothing, sometimes just p, sometimes whatever
05:51 s_mosher usually just "p\ndone\n" at that point
05:52 ash_ hmm
05:52 s_mosher I scanned the $p in the script and thought nothing of it at first
05:52 ash_ odd
05:52 ash_ i haven't had it just do "p\ndone\n" before
05:52 ash_ hmm
05:52 ash_ i need to test it more
05:52 s_mosher I was getting that even before rebuilding
05:53 sorear hello #perl6
05:54 ash_ hi sorear
06:01 ash_ s_mosher: now its working occasionally and then not other times
06:01 ash_ i am confused
06:02 s_mosher ash_, I'm going over it with strace
06:02 s_mosher to see whether (and if so maybe why) the repl is going away early
06:03 jhuni left #perl6
06:03 s_mosher I'm seeing a hilarious volume of calls to brk()
06:04 ash_ i don't know what brk does
06:05 s_mosher it gets memory from the system
06:05 ash_ those might be from pump
06:06 ash_ IPC::Run uses the pump sub to check if std in, out, or err need to be updated and updates them
06:07 s_mosher okay, I found the part where it's reading chars in
06:09 uniejo joined #perl6
06:09 s_mosher well it's writing the result
06:10 s_mosher or it writes a "2" for some reason anyway, but no newline apparently. then the prompt again
06:11 s_mosher oh right, you didn't have a newline in the code you sent over
06:12 sorear don't use strace with iphd
06:12 sorear the reparenting screws things up
06:12 s_mosher oh dang
06:12 sorear it's easier just to boot a freebsd vm and use ktrace instad, less intrusive
06:12 s_mosher but I love strace
06:12 s_mosher heh
06:12 sorear oh, I misread
06:12 sorear you probably aren't using iphd
06:13 sorear thought you were ash with the trace
06:16 moritz_ good morning
06:17 tylercurtis :( Rakudo blows up with the profiling runcore for me.
06:18 ash_ lol, i tried redirecting the output from the perl6 sub process to /dev/null and it still ends up on stdout of the parent process, thats not right
06:18 s_mosher ash_, from what I'm seeing the parent is getting all the data
06:19 ash_ moritz_: well, if feather3 ran OS X, i think i'd have try.rakudo.org ready to go, but IPC::Run seems to be acting funny with recent versions of rakudo, i haven't figured out why (this problem doesn't show up with perl5, or python interps)
06:20 ash_ oh, it only shows up in linux as far as i can tell too, so i am having trouble tracking down the problem
06:21 cxreg left #perl6
06:22 sorear good morning moritz_
06:22 sorear seen pmurias?
06:23 s_mosher ash_, your print $out comes one statement too early
06:23 s_mosher and I spent all this time not noticing it
06:24 ash_ s_mosher: no, thats probably spill from the child process ending up on the parent processes stdout, (probably)
06:24 ash_ take the print $out, out and see if it still happens (i bet it does)
06:25 s_mosher is it supposed to start printing $out  before "pump$p until $out [...]" ?
06:25 s_mosher I took it out, and no output from the repl
06:25 sorear niecza: say "hi"
06:25 p6eval niecza 1d65d67: OUTPUT«Can't locate STD.pm in @INC (@INC contains: /home/p6eval/niecza/src /opt/perl-5.12.1/lib/site_perl/5.12.1/x86_64-linux /opt/perl-5.12.1/lib/site_perl/5.12.1 /opt/perl-5.12.1/lib/5.12.1/x86_64-linux /opt/perl-5.12.1/lib/5.12.1 .) at /home/p6eval/niecza/src/Niecza/Grammar.pm
06:25 p6eval ..line 3.␤…
06:26 masak joined #perl6
06:26 cxreg joined #perl6
06:27 s_mosher ash_,  if I move it down one, I get expected results. if I match 2 instead of >\s it even chops off the prompt
06:28 s_mosher it really looks like the "sometimes working sometimes not" behaviour is just a... race product (?)
06:28 ash_ you can move it to after the $p->finish if you want, that should be fine, and take out the $p->pump until line
06:28 sorear o/ masak
06:28 ash_ ya, it sounds like it might be a race condition happening
06:28 masak [backlog] a real good turtle graphics module would be interesting. preferably coupled with tutorial/SVG/web capabilities somehow. lurkers, take note.
06:28 masak sorear: \o
06:29 masak sorear: just got 'our' variables to work in Yapsi :)
06:29 s_mosher ash_, I have it just before the finish line.
06:29 s_mosher just after the last pump
06:29 ash_ $p->finish waits until the subprocess exits,
06:29 ash_ so there shouldn't be any changes to the $out var after that time
06:30 s_mosher right.
06:30 dalek yapsi: 095c93b | masak++ | / (3 files):
06:30 dalek yapsi: [Yapsi] 'our'-scoped variables
06:30 dalek yapsi:
06:30 dalek yapsi: The compiler declares a block 'GLOBAL' containing only the 'our'-scoped
06:30 dalek yapsi: variables. The runtime then makes sure the appropriate variables are bound
06:30 dalek yapsi: to the variables in this block.
06:30 dalek yapsi: review: http://github.com/masak/yapsi/commit/095c93b069094dc9da0355ea6515e7e2bdc07e47
06:30 dalek yapsi: 94758a5 | masak++ | doc/ChangeLog:
06:30 dalek yapsi: [doc/ChangeLog] updated for 2010.09
06:30 dalek yapsi: review: http://github.com/masak/yapsi/commit/94758a51f40f17b0a9a844ff4a13a9f93d4b659a
06:31 s_mosher I mean the problem is gone when I start outputting at the correct time
06:32 ash_ well, in the repl server, i need to not finish the processes until i absolutely have to, (for instance if they become inactive for more than 60 seconds), so i need to be able to write and read from them without killing them
06:33 ash_ in theory, if i do $p->pump until $out =~ /\n>\s/m; it should wait until it gets the "\n> " that means the rakudo repl is waiting for input again, so it should be done processing the old input, thats when i know to read
06:33 sorear masak: neat!  did niecza help at all?
06:34 masak haven't checked how niecza does it. but I'm willing to compare notes now.
06:34 s_mosher ash_, yeah.. that isn't the problem though
06:34 dju_ joined #perl6
06:34 dju left #perl6
06:34 s_mosher check line 18
06:34 s_mosher it should come after line 20
06:35 s_mosher you're just printing it before you get it, then moving on
06:35 masak sorear: notably, I'm curious about the case C< { our $b }; say $b > discussed in the backlog.
06:36 masak moritz_: good morning. it seems p6eval's yapsi target is less-than-functional.
06:37 dju joined #perl6
06:37 dju_ left #perl6
06:38 sorear masak: that case is an error, $b in the outer scope doesn't resolve to anything
06:38 tadzik joined #perl6
06:38 sorear GLOBAL:: and UNIT:: are disjoint
06:38 masak right.
06:39 tadzik hello
06:39 masak the only save I could imagine was if GLOBAL:: was nested outside of UNIT::
06:39 masak but it isn't.
06:39 masak tadzik: hi! \o/
06:39 rgrau__ left #perl6
06:40 masak std: { say our $b }; say $b # this shouldn't work, but does
06:40 p6eval std 32123: OUTPUT«Potential difficulties:␤  $b is declared but not used at /tmp/Przv78_ZFb line 1:␤------> [32m{ say our $b[33m⏏[31m }; say $b # this shouldn't work, but do[0m␤ok 00:01 117m␤»
06:40 masak also, it gives a warning about declare-but-not-use even when I use the variable...
06:40 masak std: { our $b say $b }; say $b # this shouldn't work, but does
06:40 p6eval std 32123: OUTPUT«[31m===[0mSORRY![31m===[0m␤Two terms in a row at /tmp/nEoFF8iFIK line 1:␤------> [32m{ our $b [33m⏏[31msay $b }; say $b # this shouldn't work, [0m␤    expecting any of:␤      bracketed infix␤  constraint␤       infix or meta-infix␤      statement modifier loop␤
06:40 p6eval ..trait␤Parse failed␤FAILED 00:…
06:41 masak er.
06:41 ash_ s_mosher: http://gist.github.com/560253 here, i updated this to be close to what i am using on my server
06:41 masak std: { our $b; say $b }; say $b
06:41 p6eval std 32123: OUTPUT«ok 00:01 117m␤»
06:41 masak sorear: so we agree that the above shouldn't parse?
06:41 sorear yes.
06:42 masak good. now we just need to convince TimToady :)
06:43 dju left #perl6
06:43 s_mosher ash_, that works as expected here
06:44 s_mosher are you still having problems?
06:44 ash_ ya
06:44 ash_ its not working here
06:44 ash_ i get timeouts
06:44 ash_ and the output is very different
06:45 sorear there's something weird and wrong with either JSON::Tiny or viv
06:45 sorear parsing 1 copy of sample.json: 4.1 seconds
06:45 sorear 2 copies: 12.9 seconds
06:45 dju joined #perl6
06:47 masak huh.
06:48 f00li5h left #perl6
06:49 ash_ my test server and feather3 have the same response, with nearly the same version of rakudo
06:50 s_mosher I'm trying with this now: 2010.08-28-g2ac5feb built on parrot 2.7.0 r48628
06:51 s_mosher what could I have done while building to make rakudo behave differently?
06:51 ash_ i don't know
06:51 ash_ i might have something configured wrong, i haven't a clue at this point
06:51 s_mosher I suspect something else is at play, but I'd rather not assume my build is sane
06:51 moritz_ sorear: viv runs JSON::Tiny?
06:51 moritz_ niecza: say "alive"
06:52 p6eval niecza 33f66ad: OUTPUT«alive␤»
06:52 sorear moritz_: I had to change \, to "," in a couple places
06:52 sorear also I just extracted the grammar, not the whole module
06:52 sorear neat, I made JSON::Tiny 4x faster with a few ::
06:53 moritz_ sadly rakudo doesn't understand those
06:53 sorear and it's not O(n^(>1)) anymore
06:54 sorear 60kb in ~9s, I have a baseline for "viv speed"
06:55 * sorear goes back to the niecza regex rewrite (which will add ::, among everything else)
06:55 sorear 600kb in 94s, definitely O(N) now
06:57 ash_ s_mosher: i am checking out rakudo's latest build and last months tag to see if there is any difference between the two
07:00 ash_ feather3 is also giving me problems, so i seem to have 2 systems configured oddly
07:00 lue goodnight o/
07:01 masak 'night, lue
07:04 cxreg left #perl6
07:05 cxreg joined #perl6
07:09 cxreg rakudo: eval "did I get utf8 working in irc?"
07:09 justatheory left #perl6
07:09 p6eval rakudo 2ac5fe:  ( no output )
07:10 tylercurtis \o lue, goodnight.
07:11 cxreg rakudo: say say ^5
07:11 p6eval rakudo 2ac5fe: OUTPUT«01234␤1␤»
07:11 cxreg whoops
07:11 moritz_ rakduo: say "møøse in UTF-8"
07:11 cxreg that's odd, the chevron thingies worked, but it's still partially broken
07:11 s_mosher ash_, it seems to be hanging on me when I try it with python...
07:11 moritz_ raukdo: say "møøse in UTF-8"
07:12 * moritz_ can't type "rakudo"
07:12 moritz_ rakudo: say "møøse in UTF-8"
07:12 p6eval rakudo 2ac5fe: OUTPUT«møøse in UTF-8␤»
07:12 ash_ s_mosher: what about changing it to: my $p = start [ $^X, '-pe', 'BEGIN { $| = 1 }' ], \$in, \$out, timeout(5); (also you need to remove the pump until
07:12 ash_ that will make a perl5 interp that echos stdin to stdout
07:15 s_mosher yeah that works fine
07:15 ash_ i can get it to work with python by doing a few minor tweeks, only to what its starting and the input its sending python
07:15 wamba joined #perl6
07:16 s_mosher yeah, what happens here is that unless I give python garbage (to make it vomit and die) it continues to wait on input after I send it data
07:17 moritz_ http://news.perlfoundation.org/2010/09/hague-grant-acceptance-meta-mo.html \o/
07:18 ash_ woot, jnthn++ pmichaud++
07:18 s_mosher oh right, my mistake. python works too when I keep my wits about me.
07:18 ash_ tpf++
07:20 s_mosher yeah, that's good to see
07:20 cxreg moritz_: so what is the character before the »?
07:20 cxreg it's coming out goofy
07:20 ash_ ␤?
07:20 cxreg yeah that
07:20 ash_ .u ␤
07:20 phenny U+2424 SYMBOL FOR NEWLINE (␤)
07:20 moritz_ right, it's an N/L
07:21 moritz_ many fonts render it weirdly
07:21 cxreg oh, it's /supposed/ to look like that?!
07:21 moritz_ it's sufficiently rare in "normal" text or code that we can use it indicate newlines
07:22 ash_ it doesn't hurt that it is unicode for the symbol for newline too :P
07:25 ash_ s_mosher: thanks for the help, i think i might start looking into other ways of handling this since ipc::run is acting so weirdly
07:26 s_mosher ash_, no problem.
07:27 ash_ any thoughts on a sub-process management tool? or am i going to have to make one from scratch :-(
07:28 s_mosher it's a shame ipc isn't doing it.
07:29 moritz_ ash_: IO::Pty::HalfDuplex
07:29 ash_ i don't get why it worked for python and perl5 though, but perl6 is acting odd
07:29 s_mosher nothing comes to mind, though. I've never had a pleasant time dealing with the output of other interactive programs.
07:30 s_mosher yeah, that is odd
07:31 ash_ moritz_: will do
07:33 jhuni joined #perl6
07:35 s_mosher well, I'm off to Zzzz-land
07:37 ash_ me too
07:38 ash_ thanks again
07:38 s_mosher sure, any time
07:38 s_mosher 'night
07:39 moritz_ sleep well
07:42 masak time for me to sleep too. :)
07:42 masak 'night, #perl6
07:43 isBEKaml goodnight, masak!
07:43 tadzik masak: isn't that a morning for you?
07:43 masak sun-in-sky-wise, yes. subjectively, no.
07:43 tadzik I see
07:43 masak later today, there'll be a Yapsi release!
07:44 * masak zzz
07:44 tadzik sleep well then :)
07:44 masak left #perl6
07:44 * tadzik is the same TZ and has just woke up
07:44 isBEKaml tadzik: +2?
07:44 tadzik isBEKaml: yep
07:44 isBEKaml tadzik: :)
07:45 tadzik well, not just, 3hs ago :)
07:49 sorear tadzik: masak traditionally only stays awake for a few minutes at a time
07:51 tadzik heh
07:55 happig joined #perl6
07:57 cognominal left #perl6
07:58 drbean left #perl6
07:58 happig clear
08:08 azawawi joined #perl6
08:08 azawawi hi
08:08 phenny azawawi: 30 Aug 00:14Z <sorear> tell azawawi I've solved a couple problems you were facing; check out STD 32116 on CPAN
08:10 dalek rakudo: 606c5fb | moritz++ | src/core/operators.pm:
08:10 dalek rakudo: prevent not and so from autothreading
08:10 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/606c5fb615b2986a068c769ef72d7a8448154a84
08:10 dalek rakudo: dc99008 | tadzik++ | src/Perl6/Grammar.pm:
08:10 dalek rakudo: Added more info to an error message for <>
08:10 dalek rakudo:
08:10 dalek rakudo: Signed-off-by: Moritz Lenz <moritz@faui2k3.org>
08:10 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/dc9900803a0956dbf634114835fff4c8ad71d7d5
08:16 azawawi sorear: ping
08:20 tylercurtis left #perl6
08:21 espadrine joined #perl6
08:24 tadzik rakudo: say $_ for <>
08:24 p6eval rakudo 2ac5fe: OUTPUT«===SORRY!===␤Unsupported use of <>; in Perl 6 please use lines() or () at line 22, near "<>"␤»
08:24 tadzik nah
08:24 moritz_ update will start in 11min
08:24 moritz_ and take another ~20min or so
08:25 zag joined #perl6
08:27 mberends joined #perl6
08:28 drbean joined #perl6
08:35 azawawi phenny: tell sorear Does that mean that  syml_search_path is absolute since it is not taking the given values.
08:35 phenny azawawi: I'll pass that on when sorear is around.
08:39 Guest86362 is now known as kaare_
08:40 dakkar joined #perl6
08:40 drbean left #perl6
08:43 azawawi left #perl6
08:45 drbean joined #perl6
08:50 sorear phenny: tell azawawi Pronoun resolution error
08:50 phenny sorear: I'll pass that on when azawawi is around.
08:50 phenny sorear: 08:35Z <azawawi> tell sorear Does that mean that  syml_search_path is absolute since it is not taking the given values.
08:56 drbean left #perl6
08:59 tadzik left #perl6
09:03 proller joined #perl6
09:11 daxim joined #perl6
09:13 happig left #perl6
09:13 tadzik joined #perl6
09:34 jhuni left #perl6
09:52 moritz_ hugme: add sorear to json
09:52 * hugme hugs sorear. Welcome to json!
09:52 moritz_ sorear: you're welcome to maintain your copy of json's Grammar.pm in a branch in my repo
10:00 meppl joined #perl6
10:00 Italian_Plumber joined #perl6
10:05 wallberg joined #perl6
10:15 cotto_work left #perl6
10:16 agentzh left #perl6
10:26 colomon joined #perl6
10:26 leprevost left #perl6
10:40 Italian_Plumber left #perl6
10:52 M_o_C joined #perl6
10:52 ruoso left #perl6
10:57 Italian_Plumber1 joined #perl6
10:57 colomon rakudo: grammar A { regex B { \w+\D }; method C($a) { $a ~~ m/ <B> / }; }; say A.new.C("fred1").perl
10:57 p6eval rakudo dc9900: OUTPUT«Method 'B' not found for invocant of class 'Cursor'␤  in <anon> at line 22:/tmp/W2L3AqZjZQ␤  in 'Cool::match' at line 2421:CORE.setting␤  in 'A::C' at line 22:/tmp/W2L3AqZjZQ␤  in main program body at line 22:/tmp/W2L3AqZjZQ␤»
10:58 colomon help?
11:10 elekt joined #perl6
11:11 f00li5h joined #perl6
11:15 jferrero joined #perl6
11:19 azert0x joined #perl6
11:21 Mowah joined #perl6
11:26 kjeldahl joined #perl6
11:33 Guest97742 left #perl6
11:33 envi^home joined #perl6
11:33 sftp joined #perl6
11:37 daemon left #perl6
11:49 moritz_ colomon: self.parse($a, :rule<B>)
11:56 snearch joined #perl6
11:56 broquaint joined #perl6
12:08 takadonet joined #perl6
12:08 stepnem left #perl6
12:11 stepnem joined #perl6
12:13 hudnix left #perl6
12:14 hudnix joined #perl6
12:16 drbean joined #perl6
12:17 moritz_ http://journal.stuffwithstuff.com/2010/08/31/type-checking-a-dynamic-language/
12:18 M_o_C left #perl6
12:23 colomon moritz_++
12:23 colomon does that work externally as well?
12:23 moritz_ yes
12:23 colomon rakudo: grammar A { regex B { \w+\D }; method C($a) { self.parse($a, :rule<B>); }; }; say A.new.C("fred1").perl
12:23 p6eval rakudo dc9900: OUTPUT«Match.new(␤ from => 0,␤ orig => "fred1",␤ to   => 4,␤)␤»
12:24 colomon rakudo: grammar A { regex B { \w+\D }; method C($a) { self.parse($a, :rule<B>); }; }; say A.new.parse("fred1", :rule<B>).perl
12:24 p6eval rakudo dc9900: OUTPUT«Match.new(␤ from => 0,␤ orig => "fred1",␤ to   => 4,␤)␤»
12:24 moritz_ (it's even specced, iirc :-)
12:26 pmichaud good morning, #perl6
12:26 phenny pmichaud: 31 Aug 18:00Z <moritz_> ask pmichaud in trace output from NQP-rx with <DEBUG(1)>, whas is the second number in the second column? ie the /1 in  1283276995.944721 17/1 START    comment
12:29 frettled moritz_: *lightbulb* — aha!
12:29 pmichaud moritz_: first number is string offset, second number is line number
12:30 azawawi joined #perl6
12:30 kaare_ pmichaud: Your august rakudo start announcement wasn't picked up by planetsix.perl.org or any other aggregator I follow.
12:30 espadrine left #perl6
12:30 pmichaud kaare_: I noticed that also.  I'm not sure what happened there.
12:30 pmichaud oh, I didn't post it to use.perl.org, I bet.
12:31 pmichaud and rakudo.org doesn't have a working rss feed.  :-(
12:31 kaare_ yep, ony rakudo.org
12:31 pmichaud should I go ahead and post it now to use.perl.org ?
12:31 zulon joined #perl6
12:31 kaare_ I would vote yes.
12:31 azawawi phenny: tell sorear Thanks for the latest STD syml inclusion. Fixed S:H:P6 to re-use it. http://padre.perlide.org/trac/changeset/12415
12:31 phenny azawawi: I'll pass that on when sorear is around.
12:31 phenny azawawi: 08:50Z <sorear> tell azawawi Pronoun resolution error
12:31 espadrine joined #perl6
12:31 kaare_ If I didn't search for it, I wouldn't know it was announced.
12:31 azawawi left #perl6
12:33 kaare_ Not sure that use.perl.org's rss feed is much better though :-/
12:34 snearch left #perl6
12:35 yrgd left #perl6
12:36 _jaldhar joined #perl6
12:36 jaldhar left #perl6
12:36 __rnddim__ joined #perl6
12:36 lue left #perl6
12:37 pmichaud http://use.perl.org/~pmichaud/journal/40518
12:37 colomon rakudo: grammar A { regex B { \w+\D }; method C($a) { self.parse($a, :rule<B>); }; }; say A.parse("fred1", :rule<B>).perl
12:37 pmichaud (use.perl.org's rss feed)  well, I know that articles I post there tend to make it to the aggregators
12:37 p6eval rakudo dc9900: OUTPUT«Match.new(␤ from => 0,␤ orig => "fred1",␤ to   => 4,␤)␤»
12:51 bluescreen joined #perl6
12:51 bluescreen is now known as Guest59170
12:52 pmichaud http://twitter.com/aledalgrande/status/22614181643    # huh?!?!
12:52 takadonet ..
12:53 daxim quick! reply with something witty and scathing that would make sideshow bob proud!
12:54 cognominal joined #perl6
12:54 tadzik ignorance is bliss. It also makes you look silly though
12:55 zulon left #perl6
12:55 takadonet tadzik: nice
12:56 kaare_ left #perl6
12:56 pmichaud sometimes the simplest replies are easiest:  http://twitter.com/pmichaud/status/22704356371
12:58 frettled pmichaud++ — for applying KISS
12:58 proller left #perl6
12:59 proller joined #perl6
13:02 elekt yrb: Nice, i'll check it out
13:09 orafu left #perl6
13:09 orafu joined #perl6
13:12 Holy_Cow joined #perl6
13:12 colomon whee, 21 passing tests for ABC!
13:13 colomon 31
13:15 ruoso joined #perl6
13:21 zulon joined #perl6
13:23 f00li5h left #perl6
13:23 f00li5h joined #perl6
13:23 tadzik please say that the smoking stats motivated you :)
13:25 colomon I'm happy to say the smoking stats motivated me.
13:25 colomon though I don't actually know where they are.
13:25 tadzik yay :)
13:25 colomon mostly I want to have a functional ABC parser.  I actually could have used one last week.
13:25 tadzik well, the last html ones are quite old: http://tjs.azalayah.net/ser.html
13:26 colomon actually, I used your tool in a completely different fashion this morning.
13:26 tadzik which tool?
13:26 colomon neutro
13:26 tadzik well, neutro is for installing specifically
13:26 tadzik smoker.pl is a wrapper around neutro for some smoketesting capabilities
13:27 colomon after doing the big smoke test, I switched to ~/.perl6/lib and did an ack search through all the installed modules.
13:28 tadzik and the smoke test was run manually?
13:28 colomon yes
13:28 colomon well, manually using smoker.pl.
13:28 tadzik hmm
13:28 colomon and actually, I used the run from a week or two ago.
13:28 tadzik I see
13:29 colomon it's a great way to search against the source of the current modules.
13:29 daxim rakudo-star-2010.08 build errors   http://paste.scsys.co.uk/49772?tx=on
13:29 daxim scroll down to the ===SORRY!=== sections
13:30 tadzik bbl
13:30 tadzik left #perl6
13:33 colomon 74 passing tests
13:40 zulon left #perl6
13:41 drbean left #perl6
13:48 pmichaud daxim: (build errors) -- yes, we still need to work on DESTDIR a bit more
13:48 hudnix left #perl6
13:52 hudnix joined #perl6
13:58 sftp left #perl6
13:59 sftp joined #perl6
14:03 uniejo left #perl6
14:11 tylercurtis joined #perl6
14:11 smash joined #perl6
14:13 smash hello everyone
14:13 smash moritz_: ping
14:14 dju_ joined #perl6
14:15 fda314925 left #perl6
14:15 proller_ joined #perl6
14:15 dju left #perl6
14:16 proller left #perl6
14:16 fda314925 joined #perl6
14:16 daemon joined #perl6
14:19 patspam joined #perl6
14:19 zag left #perl6
14:19 moritz_ smash: pong
14:20 sftp_ joined #perl6
14:21 sftp left #perl6
14:22 colomon rakudo: my $match = "abcdefg" ~~ /./; say $match.perl
14:22 p6eval rakudo dc9900: OUTPUT«Match.new(␤ from => 0,␤ orig => "abcdefg",␤ to   => 1,␤)␤»
14:22 colomon rakudo: my $match = "abcdefg" ~~ /\w*/; say $match.perl
14:22 p6eval rakudo dc9900: OUTPUT«Match.new(␤ from => 0,␤ orig => "abcdefg",␤ to   => 7,␤)␤»
14:22 colomon rakudo: my $match = "abcdefg" ~~ /[\w]*/; say $match.perl
14:23 p6eval rakudo dc9900: OUTPUT«Match.new(␤ from => 0,␤ orig => "abcdefg",␤ to   => 7,␤)␤»
14:23 smash moritz_: finally got time to set up those benchmarks for rakudo http://gil.di.uminho.pt/users/smash/rakudo-bench.html
14:23 colomon rakudo: regex A { \w }; my $match = "abcdefg" ~~ /[<A>]*/; say $match.perl
14:23 p6eval rakudo dc9900: OUTPUT«Useless declaration of has-scoped regex in a module; add our or my to install it in the lexpad or namespace␤Method 'A' not found for invocant of class 'Cursor'␤  in <anon> at line 22:/tmp/LGV9_G0r_5␤  in 'Cool::match' at line 2421:CORE.setting␤  in 'Regex::ACCEPTS' at line
14:23 p6eval ..5824:COR…
14:23 colomon rakudo: our regex A { \w }; my $match = "abcdefg" ~~ /[<A>]*/; say $match.perl
14:23 p6eval rakudo dc9900: OUTPUT«Method 'A' not found for invocant of class 'Cursor'␤  in <anon> at line 22:/tmp/pvpHLBQUnY␤  in 'Cool::match' at line 2421:CORE.setting␤  in 'Regex::ACCEPTS' at line 5824:CORE.setting␤  in main program body at line 22:/tmp/pvpHLBQUnY␤»
14:25 colomon rakudo: grammar A { regex B { \w ':' }; regex C { <B>+ }; };   my $match = A.parse("a:b:c:", :rule<C>); say $match.perl
14:25 p6eval rakudo dc9900: OUTPUT«Match.new(␤ from => 0,␤ orig => "a:b:c:",␤ to   => 6,␤ named => {␤  B => [␤    Match.new(␤     from => 0,␤     orig => "a:b:c:",␤     to   => 2,␤    ),␤    Match.new(␤     from => 2,␤     orig => "a:b:c:",␤     to   => 4,␤    ),␤    Match.new(␤     from => 4,␤     orig =>
14:25 p6eval .."a:b:c:",…
14:25 colomon rakudo: grammar A { regex B { \w ':' }; regex C { <B>+ }; };   my $match = A.parse("a:b:c:", :rule<C>); say $match<B>.perl
14:25 p6eval rakudo dc9900: OUTPUT«[Match.new(␤ from => 0,␤ orig => "a:b:c:",␤ to   => 2,␤), Match.new(␤ from => 2,␤ orig => "a:b:c:",␤ to   => 4,␤), Match.new(␤ from => 4,␤ orig => "a:b:c:",␤ to   => 6,␤)]␤»
14:26 colomon rakudo: grammar A { regex B { \w ':' }; regex C { <B>+ }; };   my $match = A.parse("a:b:c:", :rule<C>); say $match<B>.elems
14:26 p6eval rakudo dc9900: OUTPUT«3␤»
14:26 colomon rakudo: grammar A { regex B { \w ':' }; regex C { <B>+ }; };   my $match = A.parse("a:b:c:", :rule<C>); for $match<B> -> $m { say $m }
14:26 p6eval rakudo dc9900: OUTPUT«a: b: c:␤»
14:26 colomon and there is my issue.
14:27 moritz_ for $match<B>.flat
14:28 moritz_ rakudo: grammar A { regex B { \w ':' }; regex C { <B>+ }; }; my $match = A.parse("a:b:c:", :rule<C>); for $match<B>.flat -> $m { say $m }
14:28 p6eval rakudo dc9900: OUTPUT«a:␤b:␤c:␤»
14:28 moritz_ colomon: better? :-)
14:29 colomon yes.  is it supposed to be needed?
14:30 colomon moritz_++
14:32 moritz_ yes
14:32 moritz_ it's needed for the distinction (.)(.) vs. (.)**2
14:33 espadrine left #perl6
14:34 smash moritz_: got my link ?
14:37 colomon 114 passing tests in ABC/t/01-regexes.t, that's all for that file.
14:37 moritz_ smash: yes, just haven't had a chance to look yet
14:38 smash moritz_: sure, take your time
14:38 espadrine joined #perl6
14:41 colomon http://www.codequarterly.com/code-challenges/markup/  -- is someone already on this?  :)
14:44 smash colomon: not me, but looks interesting
14:44 colomon seems like the sort of thing which should be pretty easily done in p6
14:45 daxim can HTML be parsed by a p6 grammar?
14:46 smash daxim: i don't see why not
14:46 smash colomon: true
14:47 moritz_ daxim: it can, though parsing wrong HTML will be rather painful
14:48 daxim aha, in case of wrong HTML, will there be by default a sane message like "expected 'foo', but found 'bar' at line xx column yy"?
14:48 daxim or does the programmer have to provide this?
14:49 moritz_ "depends"
14:49 daxim hm hm :S
14:50 moritz_ rakudo: say '<a>foobar</b>' ~~ /[ '<' (\w+) '>'] ~ [ '</' $0 '>' ] <-[<>]> /
14:50 p6eval rakudo dc9900: OUTPUT«Unable to parse _block119, couldn't find final [ '</' $0 '>' ] at line 1␤  in <anon> at line 22:/tmp/xLLPVkDLhv␤  in 'Cool::match' at line 2421:CORE.setting␤  in 'Regex::ACCEPTS' at line 5824:CORE.setting␤  in main program body at line 22:/tmp/xLLPVkDLhv␤»
14:50 zulon joined #perl6
14:50 moritz_ seems it needs a bit of improvement :-)
14:50 patrickas joined #perl6
14:55 colomon rakudo: say '<a>foobar</a>' ~~ /[ '<' (\w+) '>'] ~ [ '</' $0 '>' ] <-[<>]> /
14:56 p6eval rakudo dc9900: OUTPUT«Unable to parse _block119, couldn't find final [ '</' $0 '>' ] at line 1␤  in <anon> at line 22:/tmp/ghvxdCynhH␤  in 'Cool::match' at line 2421:CORE.setting␤  in 'Regex::ACCEPTS' at line 5824:CORE.setting␤  in main program body at line 22:/tmp/ghvxdCynhH␤»
14:56 TimToady rakudo: say '<a>foobar</a>' ~~ /[ '<' (\w+) '>'] ~ [ '</' $0 '>' ] <-[<>]>* /
14:56 p6eval rakudo dc9900: OUTPUT«<a>foobar</a>␤»
14:59 colomon rakudo: say '<a>foobar</b>' ~~ /[ '<' (\w+) '>'] ~ [ '</' $0 '>' ] <-[<>]>* /
14:59 p6eval rakudo dc9900: OUTPUT«Unable to parse _block119, couldn't find final [ '</' $0 '>' ] at line 1␤  in <anon> at line 22:/tmp/fdMSYRwzYH␤  in 'Cool::match' at line 2421:CORE.setting␤  in 'Regex::ACCEPTS' at line 5824:CORE.setting␤  in main program body at line 22:/tmp/fdMSYRwzYH␤»
15:01 wtw left #perl6
15:03 HarryS left #perl6
15:03 HarryS joined #perl6
15:11 HarryS left #perl6
15:11 alester joined #perl6
15:13 justatheory joined #perl6
15:20 bbkr hmm, in which part of S05 is this regexp tilde trick described?
15:21 bbkr nvm, found it under "New metacharacters"
15:22 slavik bbkr: tilde trick?
15:23 TimToady the "between" matcher
15:24 TimToady '[' ~ ']' <subscript>
15:24 TimToady used above for tags
15:24 bbkr slavik: that you can write regexp like / [ '<h1>' ~ '</h1>' <header_text> / instead of / [ '<h1>' <header_text> '</h1>'  /
15:25 slavik oh
15:25 TimToady mostly it swaps the next two atoms, but also helps with error reporting
15:25 slavik so ~ is like a "stuff" symbol?
15:25 dju_ left #perl6
15:25 slavik nice!
15:25 slavik TimToady++ :)
15:25 TimToady STD is full of it.
15:25 TimToady wait, did I say that? :)
15:26 dju joined #perl6
15:29 bbkr rakudo: say so "abc" ~~ /a ~ (c) (b)/; say $0 # wow, it even reverts capture order :)
15:29 p6eval rakudo dc9900: OUTPUT«1␤b␤»
15:29 TimToady uhhh
15:30 TimToady that seems like a bug to me
15:32 slavik2 joined #perl6
15:32 * bbkr reports
15:33 slavik left #perl6
15:33 HarryS joined #perl6
15:38 Trashlord left #perl6
15:39 bbkr std: "abc" ~~ /^ a ~ ($0) ($0) $/; # stupid code
15:39 p6eval std 32123: OUTPUT«ok 00:01 119m␤»
15:39 bbkr rakudo: "abc" ~~ /^ a ~ ($0) ($0) $/; # stupid code
15:39 p6eval rakudo dc9900: OUTPUT«Unable to parse _block119, couldn't find final ($0) at line 1␤  in <anon> at line 22:/tmp/9Z5ccHwRQh␤  in 'Cool::match' at line 2421:CORE.setting␤  in 'Regex::ACCEPTS' at line 5824:CORE.setting␤  in main program body at line 10:/tmp/9Z5ccHwRQh␤»
15:39 HarryS left #perl6
15:40 bbkr TimToady: is above one a STD bug or Rakudo one?
15:40 moritz_ it doesn't have to be on at all
15:41 moritz_ matching an undefined variable fails
15:41 moritz_ which is why ($0) doesn't match, hence the error message
15:41 patspam left #perl6
15:42 bbkr moritz_: but following your logic this one should fail in the same way:
15:42 bbkr rakudo: "abc" ~~ /^ a ($0) ($0) $/;
15:42 p6eval rakudo dc9900:  ( no output )
15:42 moritz_ bbkr: only the ~ thing actually throws an expression
15:42 moritz_ *exception
15:43 patspam joined #perl6
15:45 bbkr ok, not a bug then
15:47 TimToady BTW, if anyone thinks of some good show-off ideas for Perl 6 on rosettacode, we can add new problem specifications
15:47 Alias Best features are the thinks nobody else has
15:47 Alias things
15:47 Alias Does stuff like [+] work yet?
15:47 TimToady sure
15:48 TimToady lots of the current entries use it :)
15:48 TimToady and other metas like Z+
15:49 moritz_ TimToady: so how does it feel to actually write Perl 6 code? :-)
15:49 TimToady quite a relief
15:49 smash i might borrow some scripts from rosettacode to add the scripts list for my benchmark
15:49 smash s/to add/to add to/
15:49 TimToady smash: btw, that red-black tree could actually be quite useful
15:50 smash TimToady: sorry. didn't had the time to look at it, but it's on my todo list
15:50 smash i should still try to finish the bead sort one
15:51 TimToady I thought http://rosettacode.org/wiki/Formal_power_series#Haskell might also be up your alley
15:52 bbkr rakudo: say [+](True, True, True) # bug? True + True should be True or 2?
15:52 TimToady Alias: pretty much all of the examples on http://rosettacode.org/wiki/Category:Perl_6 currently work under rakudo
15:52 p6eval rakudo dc9900: OUTPUT«3␤»
15:52 TimToady + coerces to numeric
15:52 bbkr then it's correct
15:52 TimToady we have lots of other ways to do "or"
15:52 smash TimToady: might as well write a haskell to perl6 converter :-)
15:53 TimToady and a perl6 to haskell converter while you're at it :)
15:54 smash TimToady: you're giving me a headache already
15:55 PerlJam A simple perl5 to perl6 converter would be more useful I think
15:55 PerlJam A complex perl5 to perl6 converter would be most useful too :)
15:56 moritz_ the problem is that no code generator produces both idiomatic *and* correct code
15:56 moritz_ nobody wants a code generator that produces incorrect code
15:57 moritz_ and nobody wants to change generated, non-idiomatic code
15:57 TimToady as long as the places where it's guessing are clearly marked for audit, it can be useful
15:57 PerlJam It probably needs to be 2 pass to get correct + idiomatic
15:57 TimToady that was a2p's approach
15:58 * moritz_ thinks that code translation is not the right approach to code reuse, in the general case
15:58 TimToady where the 2nd pass is "the programmer rewrites this so it works"
15:58 PerlJam moritz_: of course not, but it could make a good bootstrap
15:58 TimToady translation is mostly useful for educational purposes
15:58 TimToady that's how a2p ended up being used
15:58 TimToady in which case idiomatic and almost correct is kinda what you want
16:00 TimToady but it's really much more important to be able to intermix p5 and p6 modules, so people can translate (auto or by hand) piecemeal
16:00 TimToady whether the intermixing is done by emulation or cooperating interpreters is another question
16:01 TimToady emulation solves the multiple runloop problem but is not usually complete emulation
16:01 TimToady bug compatibility is difficult
16:03 HarryS joined #perl6
16:04 TimToady Luxembourg?
16:04 alester pmichaud: I haven't forgotten about the rakudo.org RSS feed.
16:05 wamba left #perl6
16:05 Util My approach in 5-to-6 conversion (PPI-based) is to change the syntax to Perl6, while logging (1) things that the converter is can't be 100% sure it has converted correctly (like bitwise-or), (2) things it has not even tried to convert, but recognizes that need converting, and (3) P5 idioms that it can recognize as having equivilant improved P6 idioms, but at a higher level of abstraction than it can process (like sort changing into 1-var form). Lower level idiom
16:06 TimToady Util: that looks chopped
16:06 bbkr rakudo: 01 # known STD discrepancy?
16:06 p6eval rakudo dc9900:  ( no output )
16:06 Util The idea is to make a human's brain a well-defined part of the conversion process, by telling him exactly what else needs to be done.
16:06 PerlJam Util: you have such a converter?
16:07 Util TimToady: chopped, as in "Util is missing an obvious piece of the conversion process in his description"?
16:07 TimToady your message was chopped
16:07 molaf joined #perl6
16:07 PerlJam Util: chopped as in the last thing I saw was "Lower level idiom"
16:08 Util ... Lower level idiom (like "no parens needed for for loops") I am trying to handle.
16:09 HarryS left #perl6
16:10 Util Chopped in the IRClog on perlgeek.de, but not on my screen. /me lacks IRC-fu.
16:10 zulon left #perl6
16:11 Util PerlJam: Yes, I just started brushing the dust off this morning. Plan to load to GitHub later this week.
16:11 PerlJam Util++ cool
16:12 silug joined #perl6
16:13 Ross joined #perl6
16:13 TimToady more like IRC lacks Util-fu.  :)
16:14 cdarroch joined #perl6
16:14 cdarroch left #perl6
16:14 cdarroch joined #perl6
16:15 Topic for #perl6 is now Util hey, its John Harrison, from Auburn
16:16 ash_ oops
16:16 ash_ umm
16:16 ash_ sorry
16:16 ash_ i fail at irc
16:16 ash_ what was the title of the channel? (and why did it let me do that? o.0)
16:17 Topic for #perl6 is now »ö« Welcome to Perl 6! | http://perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg p6eval perl6: ... | irclog: http://irc.pugscode.org/ | UTF-8 is our friend! | Rakudo Star Released!
16:17 ash_ thanks moritz_ sorry about that :-x
16:17 daxim good clients keep a history of topics
16:17 Util ash_: I think you meant `/msg Util` instead of `/topic`
16:18 bbkr rakudo: */x # another Rakudo vs STD compatibility bug
16:18 p6eval rakudo dc9900:  ( no output )
16:18 ash_ i did /t because i thought it meant 'tell' but ya
16:18 ash_ i am irc stupid right now
16:19 moritz_ bbkr: it's the old "doesn't check for subs at compile time" bug
16:20 bbkr moritz_: I'm not sure. in this case * Whatever messes it
16:20 bbkr rakudo: 1/x
16:20 p6eval rakudo dc9900: OUTPUT«Could not find sub &x␤  in main program body at line 22:/tmp/nHp6_cau91␤»
16:20 moritz_ bbkr: it's like { $_ / x }
16:21 moritz_ bbkr: and because nothing calls it, the existance check for &x is never done
16:21 ash_ rakudo: my $a = * / x; say $a(1);
16:21 p6eval rakudo dc9900: OUTPUT«Could not find sub &x␤  in <anon> at line 22:/tmp/0Ker9myfF2␤  in main program body at line 22:/tmp/0Ker9myfF2␤»
16:21 ash_ that error message doesn't come up until you call $a
16:21 ash_ since whatever's are lazy
16:22 bbkr moritz++ ash++ # nice explanation
16:22 TimToady doing the proper check is a bit tricky
16:22 TimToady std: { $_ / x }; sub x {...}
16:22 p6eval std 32123: OUTPUT«ok 00:01 118m␤»
16:23 TimToady std: { $_ / x };
16:23 p6eval std 32123: OUTPUT«[31m===[0mSORRY![31m===[0m␤Undeclared routine:␤      'x' used at line 1␤Check failed␤FAILED 00:02 117m␤»
16:23 TimToady you have to remember all the lexical scopes to re-search at CHECK time
16:24 masak joined #perl6
16:24 masak oh hai, #perl6
16:24 TimToady short nap
16:24 smash masak: hello
16:25 masak I'm just stopping by. will have a longer session later tonight.
16:25 risou joined #perl6
16:29 risou_ joined #perl6
16:29 isBEKaml hi masak!
16:29 masak hi!
16:30 risou left #perl6
16:32 bbkr std: +q # some perlbot bug I think...
16:32 p6eval std 32123: OUTPUT«Invalid class name (STD::stop::) at /opt/perl-5.12.1/lib/site_perl/5.12.1/x86_64-linux/Class/MOP.pm line 89␤   Class::MOP::load_first_existing_class('STD::stop::') called at /opt/perl-5.12.1/lib/site_perl/5.12.1/x86_64-linux/Class/MOP.pm line 137␤
16:32 p6eval ..Class::MOP::load_class('STD::stop::'…
16:33 bbkr should I report it somewhere?
16:33 HarryS joined #perl6
16:34 ash_ wow, nice bug
16:34 moritz_ just hilight TimToady
16:34 ash_ rakudo: +q # just wondering
16:34 p6eval rakudo dc9900:  ( no output )
16:36 cytzol joined #perl6
16:36 bbkr std: q # TimToady this breaks perlbot
16:36 p6eval std 32123: OUTPUT«Invalid class name (STD::stop::) at /opt/perl-5.12.1/lib/site_perl/5.12.1/x86_64-linux/Class/MOP.pm line 89␤   Class::MOP::load_first_existing_class('STD::stop::') called at /opt/perl-5.12.1/lib/site_perl/5.12.1/x86_64-linux/Class/MOP.pm line 137␤
16:36 p6eval ..Class::MOP::load_class('STD::stop::'…
16:39 HarryS left #perl6
16:43 pmichaud good afternoon
16:43 moritz_ oh hai
16:44 TimToady std: q
16:44 p6eval std 32123: OUTPUT«Invalid class name (STD::stop::) at /opt/perl-5.12.1/lib/site_perl/5.12.1/x86_64-linux/Class/MOP.pm line 89␤   Class::MOP::load_first_existing_class('STD::stop::') called at /opt/perl-5.12.1/lib/site_perl/5.12.1/x86_64-linux/Class/MOP.pm line 137␤
16:44 p6eval ..Class::MOP::load_class('STD::stop::'…
16:45 masak hi pmichaud
16:45 TimToady shortest STDbug ever :)
16:46 * bbkr bows
16:46 pmichaud std: Q
16:46 p6eval std 32123: OUTPUT«Invalid class name (STD::stop::) at /opt/perl-5.12.1/lib/site_perl/5.12.1/x86_64-linux/Class/MOP.pm line 89␤   Class::MOP::load_first_existing_class('STD::stop::') called at /opt/perl-5.12.1/lib/site_perl/5.12.1/x86_64-linux/Class/MOP.pm line 137␤
16:46 p6eval ..Class::MOP::load_class('STD::stop::'…
16:46 pmichaud (one bit shorter...?)
16:46 TimToady looks a bit taller to me
16:47 smash pmichaud: rakudo-star speed is improving, http://gil.di.uminho.pt/users/smash/rakudo-bench.html
16:48 colomon ooo, that's just the sort of benchmark graph I've been hoping to see.
16:48 ash_ i like the angle those lines are at (in the context of what they are graphing)
16:49 smash everyone feel free to add new scripts to the github repository so they can be added to the benchmark
16:49 bbkr smash: simple grammar test would also be nice, since Rakudo is very "grammar oriented"
16:49 colomon smash++
16:50 colomon though I think I was thinking of benchmarks which took a couple of minutes to run now.
16:50 colomon will that mess things up?
16:50 TimToady some of those lines will intersect 0 within a year
16:50 ash_ wait, is doing nothing slower than saying "hello world"?
16:50 ash_ thats... kinda funny actually
16:51 smash colomon: i'm only planning on running the benchmark once a day, so taking a couple of minutes to run is fine
16:51 colomon and you are planning on running it once a day?  smash++ indeed!
16:51 colomon I will try to get you an assortment of benchmarks in the next few days.
16:52 colomon (I've been planning on doing benchmarks anyway, and since you're doing all the hard organizational work...)
16:52 smash ash_: the do_nothing script is the faster
16:52 smash colomon: i can set you up with commit rights on github if you want to add the scripts yourself
16:53 kirillm left #perl6
16:53 ash_ do_nothing: 1.695492 s, hello: 1.684894 s  (for 2010.08)
16:53 ash_ rakudo: say 1.695492 - 1.684894
16:53 p6eval rakudo dc9900: OUTPUT«0.010598␤»
16:53 ash_ its a very small amount, but still
16:53 smash ash_: oh, that one.. yeap, but something external to the process can have tampered that
16:54 ash_ i know
16:54 ash_ i am sure, its hard to have 100% consistent and accurate benchmarks
16:54 smash i might add something to try to prevent that, like running the example more than one time and choosing the faster value (or something like that)
16:55 dakkar left #perl6
16:55 colomon smash: that would be nice, and probably easier than me forking it and then sending you pull requests.
16:55 pmichaud it might be nice to have the benchmarks in the perl6-examples repository.  or I can set up a benchmarks repository in the perl6 account
16:55 kirillm joined #perl6
16:55 patrickas the angle of the line seems ... treacherous
16:55 pmichaud (or in the rakudo account, if we want these to be rakudo-specific)
16:56 smash pmichaud: that is also possible, i can change the scripts source from one repo to another
16:56 pmichaud so, where would you like to move them?  ;-)
16:57 ash_ smash: i'd say run each example 10 times and list their average and std deviation
16:57 pmichaud I think minimum might make more sense.
16:57 smash pmichaud: any place is fine by me as long as i can clone it
16:57 smash ash_: that's one way to go to
16:58 ash_ min and max are good too
16:59 pmichaud smash:  should I call it rakudo-bench-scripts or perhaps just bench-scripts ?
16:59 pmichaud i.e., are these intended to be rakudo specific?
17:00 pmichaud max is likely to illustrate system load/timing errors more than anything else
17:00 smash any particular reason why they should be rakudo specific ?
17:00 pmichaud smash: not that I can think of
17:00 pmichaud I'll call it bench-scripts
17:00 * smash nods.
17:01 smash colomon: i guess you won't need commit rights to my github repo now (which will be deleted soon)
17:01 pmichaud http://github.com/perl6/bench-scripts
17:02 pmichaud smashz and colomon have commit bits
17:02 pmichaud feel free to add the repo to hugme
17:02 smash pmichaud: excelent, thank you
17:03 colomon pmichaud++  smash++
17:03 smash i'll add my current scripts there to get things started, we can remove them later as more interesting scripts come up
17:03 masak pmichaud: seems we both replied with the same URL to @aledalgrande :) don't know if people who spout "not released" are receptible enough, sadly.
17:03 HarryS joined #perl6
17:05 bbkr std: \/ a / # bug? i'm not sure if escaping is allowed in bare code, like in this case for regexp beginning
17:06 p6eval std 32123: OUTPUT«ok 00:02 117m␤»
17:06 moritz_ maybe it's a capture?
17:06 smash pmichaud: i can do a similar setup with devel releases
17:07 smash if anyone thinks that would be interesting
17:07 bbkr rakudo: (\/ a /).WHAT.say
17:07 p6eval rakudo dc9900: OUTPUT«Capture()␤»
17:07 bbkr moritz++
17:08 zulon joined #perl6
17:09 M_o_C joined #perl6
17:09 pmichaud masak: on the plus side, there are tweets like  http://twitter.com/zenogantner/status/22723693733  :-)
17:09 HarryS left #perl6
17:09 ash_ moritz_++ IO::Pty::HalfDuplex seems to be working out for me, thanks for the suggestion (is that by sorear?)
17:09 moritz_ it is
17:10 moritz_ sorear++
17:10 ash_ sorear++
17:10 ash_ i thought it was, but wasn't sure if that was his name or not (saw it on cpan)
17:10 pmichaud masak: for some reason your tweet stream doesn't appear in my default stream.   hmmm....
17:10 espadrine left #perl6
17:11 masak pmichaud: that gentletwitterer just wrote something about LTA errors, and I wrote back.
17:12 pmichaud masak: I wonder why I'm not seeing your tweets by default.
17:12 masak no idea.
17:12 masak ok, I'll be going away for a few hours now.
17:12 masak when I get back, we'll have a Yapsi release \o/
17:12 colomon huh.  I normally see masak++'s tweets, but I'm not seeing any in the last couple of hours.
17:13 TimToady rakudo: say :10(':16<bad.decaf>')
17:13 p6eval rakudo dc9900: OUTPUT«DON'T PANIC! Invalid character (:)! Please try again :) ␤  in main program body at line 1␤»
17:13 masak the last non-directed tweet was 14 hours ago, so that's all right.
17:13 pmichaud ...DON'T PANIC?
17:13 masak that's lue's addition, I think.
17:14 masak should the above work?
17:14 pmichaud yes, the str-to-num conversions still need a fair bit of work.
17:14 * masak submits rakudobug
17:15 ash_ rakudo: say :10(:16<10>)
17:15 p6eval rakudo dc9900: OUTPUT«16␤»
17:15 ash_ rakudo: say :2(:16<10>)
17:15 p6eval rakudo dc9900: OUTPUT«DON'T PANIC! Invalid character (6)! Please try again :) ␤  in main program body at line 1␤»
17:16 masak could probably do better than that error message.
17:16 pmichaud agreed.
17:16 TimToady is it taking () as *quotes*?!?!
17:16 pmichaud I think it's stringifying the argument
17:16 masak aye.
17:16 pmichaud rakudo:  say :2('16')
17:16 p6eval rakudo dc9900: OUTPUT«DON'T PANIC! Invalid character (6)! Please try again :) ␤  in main program body at line 1␤»
17:16 TimToady stringifying without evaluating?
17:16 pmichaud with evaluating, in this case
17:16 TimToady oh, yes
17:16 TimToady with
17:17 pmichaud since :16<10>  is '16'
17:17 TimToady 16 has a 6, duh
17:17 patrickas left #perl6
17:18 ash_ rakudo: say :2(16) # so this works?
17:18 amkrankruleuen joined #perl6
17:18 p6eval rakudo dc9900: OUTPUT«DON'T PANIC! Invalid character (6)! Please try again :) ␤  in main program body at line 1␤»
17:18 ash_ no, i don't understand :2 i guess
17:18 amkrankruleuen Hello!
17:18 TimToady that's a function
17:18 TimToady not a quoting construct
17:18 masak amkrankruleuen: hi!
17:19 TimToady so it evaluates the 16, and the function coerces to Str, and '16' is an invalid binary digit
17:19 TimToady well, '6' is
17:19 TimToady it can work accidentally though
17:19 TimToady rakudo: say :2(11)
17:19 p6eval rakudo dc9900: OUTPUT«3␤»
17:20 ash_ ah, see i thought it would convert 16 to base 2
17:20 frettled I was confused by that one when I tried it, too.
17:20 ash_ so you'd 10000
17:20 ash_ i see, i am going the wrong way with it
17:20 TimToady we don't have a good generic conversion going the other way yet
17:21 pmichaud rakudo:  say 16.fmt('%b')
17:21 p6eval rakudo dc9900: OUTPUT«10000␤»
17:21 TimToady "generic"
17:21 pmichaud (not general, but good for binary)
17:21 TimToady not good enough for fractions though
17:21 ash_ 12.base(:2) # would be neat  or raxdix could work
17:22 ash_ radix*
17:23 masak fwiw, I think :10(':16<bad.decaf>') is *brilliant*. there was a p6l thread recently requesting conversion from an arbitrary base.
17:23 masak if no-one else replies to that thread, I will.
17:24 pmichaud masak: what are you expecting there, ooc?
17:24 frettled masak: please do, I was a bit disappointed in the response.
17:24 TimToady std: the correct answer is 912559.729
17:24 p6eval std 32123: OUTPUT«[31m===[0mSORRY![31m===[0m␤Undeclared routines:␤     'answer' used at line 1␤  'correct' used at line 1␤ 'is' used at line 1␤      'the' used at line 1␤Check failed␤FAILED 00:01 115m␤»
17:24 masak pmichaud: the decimal number corresponding to the hexadecimal number 0xbad.decaf
17:25 TimToady or no, that's decaf.bad
17:25 pmichaud masak: that's just  :16<bad.decaf>
17:25 masak hm.
17:25 masak I just realized that.
17:25 pmichaud as we just mentioned, the :10 syntax doesn't do conversion to another base.
17:25 masak indeed.
17:25 TimToady 5655.675452
17:25 pmichaud rakudo:  say :16<bad.decaf>
17:25 p6eval rakudo dc9900: OUTPUT«2989.87028408051␤»
17:26 frettled rakudo: say :16<deadbeefcafef00dbabe>
17:26 TimToady hmm, no I gave the octal answer :(
17:26 p6eval rakudo dc9900: OUTPUT«-4.68830549077146e+18␤»
17:26 frettled hah
17:26 masak anyway, the thread is here: http://www.mail-archive.com/perl6-language%40perl.org/msg32514.html
17:26 pmichaud I somewhat like the .base() notation -- then it's just  :16<bad.decaf>.base(10)
17:26 pmichaud or
17:27 pmichaud I somewhat like the .base() notation -- then it's just  :16<bad.decaf>.base(8)
17:27 masak .base(10) would be a no-op, wouldn't it?
17:27 TimToady point is :10($anything) works if $anything is :16<deadbeefcafef00dbabe>
17:27 TimToady or is supposed to
17:27 masak TimToady: there's now a rakudobug in RT about that.
17:27 TimToady so does any other :<num>
17:27 ash_ .base(8) or .base(:8) ?
17:27 pmichaud TimToady: right -- that's what I meant earlier when I said that str-to-num conversions need work.
17:28 masak ash_: the latter is a parsefail, I think.
17:28 ash_ oh
17:28 pmichaud masak: .base(10)  might force a decimal point
17:28 ash_ rakudo: sub base(:$8) { }
17:28 TimToady std: 42.:8
17:28 risou joined #perl6
17:28 p6eval rakudo dc9900: OUTPUT«===SORRY!===␤Unable to parse postcircumfix:sym<( )>, couldn't find final ')' at line 22␤»
17:28 p6eval std 32123: OUTPUT«[31m===[0mSORRY![31m===[0m␤Unsupported use of . to concatenate strings; in Perl 6 please use ~ at /tmp/2LND3B1MHD line 1:␤------> [32m42.:[33m⏏[31m8[0m␤Parse failed␤FAILED 00:01 115m␤»
17:28 pmichaud masak: e.g.,   (1/3).base(10)
17:28 pmichaud the point is that .base creates a Str
17:29 masak anyway, let's make sure we don't re-make the mistake of bin(), oct(), and hex() -- where people expect it to go the wrong direction half of the time.
17:29 pmichaud masak: I think we already have that mistake, as evidenced by people expecting :2(...)  to do something other than what it does :-)
17:29 isBEKaml left #perl6
17:30 masak maybe there's no way not to make that mistake.
17:30 masak at least not with nice names.
17:30 TimToady yes, but there's the correspondence with the :2<1111> form at least
17:30 [Coke] colomon: nice graph. (except: UGH YELLOW ON WHITE). ;)
17:30 risou_ left #perl6
17:30 colomon [Coke]: errr, what?
17:30 frettled pmichaud: I think it has something to do with how it's applied.
17:31 frettled I think the current syntax is close to useless.
17:31 pmichaud frettled: I suspect it's that people think "I need to do a base conversion... Oh yes, :16() is what I want"
17:31 pmichaud without recognizing that conversion is a two-way-street.
17:31 [Coke] colomon: smash's graph.
17:31 masak swimming &
17:31 masak left #perl6
17:31 frettled pmichaud: yup
17:32 ash_ ya, i just assumed :16 would give me the base 16 version of whatever i passed it
17:32 frettled pmichaud: I really like bc(1)'s way of handling it, that's rather nice and intuitive.  But it's not easy to translate that into something that's sensible in a programming language, I'm afraid.
17:32 frettled ash_: I think there's room for a spec improvement there, too.
17:33 frettled I dropped the ball on that one.  I'm good at dropping balls, recently.
17:33 ash_ rakudo: say 123.':8';
17:33 p6eval rakudo dc9900: OUTPUT«===SORRY!===␤Quoted method name requires parenthesized arguments at line 22, near ";"␤»
17:33 HarryS joined #perl6
17:33 ash_ rakudo: say 123.':8'();
17:33 p6eval rakudo dc9900: OUTPUT«Method ':8' not found for invocant of class 'Int'␤  in main program body at line 22:/tmp/AXGkZbqef5␤»
17:34 frettled ash_: IIRC, there is nothing in the spec about conversion between arbitrarily chosen bases.
17:34 pmichaud we can convert strings using bases up to 36.  there's no conversion for going the other way yet.
17:35 ash_ i am not sure arbitrary is right though, 2, 8, 10, 16 (and sometimes 64) are very common in programming languages, so its not purely arbitrary
17:35 frettled I think a clarification of the current spec is needed, with some minor additions.
17:35 M_o_C left #perl6
17:37 ash_ saying i want 15 in base pi would be nifty, but i don't think thats something the core of perl6 needs to support
17:37 M_o_C joined #perl6
17:38 frettled That is a strawman.
17:38 frettled Integer bases are reasonable.
17:40 HarryS left #perl6
17:40 ash_ i guess i don't like the idea of anything other than 2, 8, 10 and 16 because i don't know the calculations or operations required to produce any other bases
17:40 ash_ so, take my opinion with a grain of salt :P
17:42 sahadev joined #perl6
17:44 frettled rakudo: my $x = 30; my $y = :13($x); say $x; say $y;
17:44 p6eval rakudo dc9900: OUTPUT«30␤39␤»
17:45 molaf left #perl6
17:45 javs joined #perl6
17:46 frettled ash_: the calculation required for other bases isn't particularly more complicated than converting between base 10 and the others you mentioned.
17:46 frettled If you know how to convert from base 10 to base 8 and back again, then you have the basic knowledge needed.
17:49 smash more values for http://gil.di.uminho.pt/users/smash/rakudo-bench.html (trying to get a bit more accurate info)
17:50 smash ash_: the average time for the hello.p6 is slower than the do_nothing ;-)
17:50 ash_ lol, aww, now its not faster to say "hello world", than it is to do nothing :P
17:51 smash hehe
17:51 ash_ i noticed :P
17:51 pmichaud multi sub base(0, $b) { '' }; multi sub base($n, $b) { base($n div $b, $b) ~ substr("0123456789abcdefghijklmnopqrstuvwxyz", $n % $b, 1); }; say base(:16<deadbeef>, 8);
17:51 pmichaud (a not terribly efficient base converter)
17:51 pmichaud rakudo: multi sub base(0, $b) { '' }; multi sub base($n, $b) { base($n div $b, $b) ~ substr("0123456789abcdefghijklmnopqrstuvwxyz", $n % $b, 1); }; say base(:16<deadbeef>, 8);
17:51 p6eval rakudo dc9900: OUTPUT«No applicable candidates found to dispatch to for 'infix:<div>'. Available candidates are:␤:(Int $a, Int $b)␤␤  in 'base' at line 22:/tmp/3KqAXzAAZL␤  in main program body at line 22:/tmp/3KqAXzAAZL␤»
17:51 pmichaud hmmm
17:51 pmichaud rakudo: multi sub base(0, $b) { '' }; multi sub base($n, $b) { base($n div $b, $b) ~ substr("0123456789abcdefghijklmnopqrstuvwxyz", $n % $b, 1); }; say base(258, 8);
17:51 p6eval rakudo dc9900: OUTPUT«402␤»
17:52 ash_ still, those are pretty consistent results, but i don't know if any of those are terribly difficult problems in terms of like O(N^M)
17:52 pmichaud rakudo: multi sub base(0, $b) { '' }; multi sub base($n, $b) { base($n div $b, $b) ~ substr("0123456789abcdefghijklmnopqrstuvwxyz", $n % $b, 1); }; say base(258, 13);
17:52 p6eval rakudo dc9900: OUTPUT«16b␤»
17:52 colomon smash: more tests coming soon.... ;)
17:53 smash ash_: better 'bench-oriented-scripts' are needed, yes
17:53 smash smash: nice
17:54 pmichaud in our case, we're wanting to benchmark basic ops as well as computationally complex ones, I think.
17:54 M_o_C left #perl6
17:54 szabgab left #perl6
17:54 colomon absolutely good to have the simple ones in there, yup.
17:55 ash_ you could take, like: http://shootout.alioth.debian.org/u32/program.php?test=binarytrees&amp;lang=perl&amp;id=2 and convert it from perl5 to perl6
17:55 ash_ the more, the better
17:56 szabgab joined #perl6
17:58 moritz_ should I add bench-scripts to hugme?
17:58 pmichaud +1
17:59 smash i'm deleting my github repository for the scripts then
17:59 ash_ ooo, a regex test http://shootout.alioth.debian.org/u32/program.php?test=regexdna&amp;lang=perl&amp;id=4 might be fun to convert to perl6
18:00 hugme left #perl6
18:00 hugme joined #perl6
18:01 jaldhar_ joined #perl6
18:04 moritz_ hugme: show bench-scripts
18:04 hugme moritz_: the following people have power over 'bench-scripts': P⁣erlJam, T⁣imToady, [⁣particle], c⁣olomon, j⁣nthn, m⁣asak, m⁣oritz_, p⁣michaud, s⁣mash. URL: http://github.com/perl6/bench-scripts/
18:04 _jaldhar left #perl6
18:05 zulon left #perl6
18:11 espadrine joined #perl6
18:11 tadzik joined #perl6
18:12 moritz_ http://perlgeek.de/en/article/debug-a-perl-6-grammar any final comments before I publish it for real? (ie link to it from the menus)
18:12 tadzik 'evening
18:14 pmichaud moritz_: reading
18:15 ash_ moritz_: in the backtracking control section, should you mention that rule/token have an implied :ratchet?
18:16 ash_ eg, rule { } is the same as regex :ratchet :sigspace { }
18:16 pmichaud "the difference to the previous one tells you how much time was spent in that rule."    better might be  "the difference to the previous one tells the time between regex events"
18:16 pmichaud since it's possible that some rules could turn off debugging (or might be missing the debugging statements)
18:16 moritz_ pmichaud: agreed, will change
18:17 moritz_ ash_: I'll mention token/rule, but it's not a tutorial for regexes, so I won't explain too much
18:17 patspam left #perl6
18:17 ash_ moritz_: alright, just thought it might be worth noting, even if its a sidenote
18:17 31NABC854 joined #perl6
18:18 PerlJam moritz++
18:18 moritz_ if you have more debugging hints, please let me know
18:19 pmichaud maybe even "... between logged regex events"
18:20 pmichaud "PASSing rules have and additional" ->  s/and/an/
18:20 PerlJam moritz_: in the backtracking control section you have a rule that says "# switch off backtracking from here on" before :!ratchet.   That's exactly backwards isn't it?
18:20 PerlJam s/a rule/a comment within a rule/
18:21 jhuni joined #perl6
18:21 pmichaud s/endvebatim/endverbatim/  # maybe
18:21 macroron joined #perl6
18:23 moritz_ PerlJam: you're right
18:23 moritz_ updated.
18:25 dual left #perl6
18:25 daxim left #perl6
18:25 PerlJam When did <?DEBUG> start outputting timestamps?
18:25 pmichaud a couple of weeks ago
18:26 pmichaud I'm using it to time where the parser is spending its efforts
18:26 PerlJam okay, just checking.  I guess I haven't installed the latest release on this laptop.
18:27 PerlJam moritz_: maybe add a small note that says if you're using an older release, you won't get the timestamps
18:27 ash_ left #perl6
18:27 moritz_ PerlJam: good idea
18:27 Guest59170 left #perl6
18:28 Guest59170 joined #perl6
18:28 risou left #perl6
18:32 kjeldahl left #perl6
18:33 jhuni left #perl6
18:39 * TimToady is back after a network outrage
18:40 TimToady well, actually, my WiFi reset itself to factory spec, and it took me that long to get it reconfigured
18:41 PerlJam TimToady: at least it wasn't a neural network outage
18:41 TimToady well, part of it was, till I remembered my password
18:42 TimToady hmm, better go check my inbound settings though...
18:44 ash_ joined #perl6
18:47 ash_ rakudo: &GLOBAL::dir    := sub {die 'fail'}; say 1...5; # why does ... use dir?
18:47 p6eval rakudo dc9900: OUTPUT«fail␤  in <anon> at line 22:/tmp/sv5akghK_V␤  in 'Block::ACCEPTS' at line 5783:CORE.setting␤  in 'infix:<...>' at line 768:CORE.setting␤  in 'infix:<...>' at line 840:CORE.setting␤  in main program body at line 22:/tmp/sv5akghK_V␤»
18:50 ash_ i just realized that the safemode file i am using for try.rakudo.org won't let you use ... ops
18:50 ash_ well, as a series
18:54 ash_ http://github.com/moritz/try.rakudo.org/blob/master/backend/p6safe.pl is the safe mode file i am using, if your curious
18:59 moritz_ ash_: does that actually work?
18:59 ash_ ya
18:59 ash_ and, thanks to  IO::Pty::HalfDuplex the daemon for try.rakudo.org is working too
18:59 moritz_ I ask because stuff is in the lexical scopes, not global
19:00 ash_ i have an extra newline i am hunting down thats messing up a regex, then i think its ready for testers
19:01 ash_ you can download the file and run it with rakudo if you want to test it (you'll need to change the $*ARGFILE line to match your system though
19:01 ash_ )
19:02 ash_ hmmm, no your right, thats not functioning as expected, nevermind
19:02 ash_ i still don't understand why ... calls dir though
19:03 moritz_ you need to go through the lexpad
19:04 moritz_ ash_: http://github.com/perlsix/Mu/blob/master/misc/evalbot/evalbot.pl#L113
19:05 moritz_ the second Q:PIR block shows how manipulate the lexpad
19:06 ash_ ah, okay, thanks
19:06 ash_ hmm, now it doesn't complain when i use ...
19:06 ash_ thanks
19:06 ash_ i was just doing it wrong
19:08 PerlJam ash_: still, ... somehow calling GLOBAL::dir() is weird
19:09 ash_ rakudo: &GLOBAL::dir := sub {die 'fail'}; 1...5; # this? ya, i duno whats up with this
19:09 p6eval rakudo dc9900: OUTPUT«fail␤  in <anon> at line 22:/tmp/SDXuJLrfUq␤  in 'Block::ACCEPTS' at line 5783:CORE.setting␤  in 'infix:<...>' at line 768:CORE.setting␤  in 'infix:<...>' at line 840:CORE.setting␤  in main program body at line 22:/tmp/SDXuJLrfUq␤»
19:10 cytzol left #perl6
19:13 pugssvn r32124 | moritz++ | [t/spec] unfudge tests for RT #77604
19:17 hercynium joined #perl6
19:21 plainhao joined #perl6
19:22 tylercurtis rakudo: fail 'test'; say 5;
19:22 p6eval rakudo dc9900:  ( no output )
19:23 dalek left #perl6
19:24 dalek joined #perl6
19:25 dalek nqp-rx: 71b25e6 | pmichaud++ | src/Regex/Cursor-builtins.pir:
19:25 dalek nqp-rx: Add regex debugging for cclass-based builtins.
19:25 dalek nqp-rx: review: http://github.com/perl6/nqp-rx/commit/71b25e6614005be5784adfabdd7952f2384f48ba
19:25 dalek nqp-rx: 29ce78f | pmichaud++ | src/Regex/Cursor-builtins.pir:
19:25 dalek nqp-rx: Add debugging output to <alpha>.
19:25 dalek nqp-rx: review: http://github.com/perl6/nqp-rx/commit/29ce78fc7d15d11ff60f3a810e66a6eedb7fe2ab
19:25 dalek nqp-rx: 5349f17 | pmichaud++ | / (3 files):
19:25 dalek nqp-rx: Comment out split() function for now; it causes the Parrot build to fail
19:25 dalek nqp-rx: (during the building of opsc).  We can restore split() when the conflict
19:25 dalek nqp-rx: is repaired.
19:25 dalek nqp-rx: review: http://github.com/perl6/nqp-rx/commit/5349f1795fb2dd7420a41be28c9d192c10cfb059
19:25 dalek nqp-rx: 699da41 | pmichaud++ | src/stage0/ (5 files):
19:25 dalek nqp-rx: Update bootstrap.
19:25 dalek nqp-rx: review: http://github.com/perl6/nqp-rx/commit/699da41629139480236eb42cd3c49e59af320811
19:28 TimToady y'know, printf formats are really kind of an abomination, and could use to be refactored almost as much as traditional regexen
19:28 moritz_ aye
19:28 mikehh joined #perl6
19:28 moritz_ and they should be able to address params by name too
19:28 moritz_ not only by position
19:34 ash_ have you guys ever seen randexp? its a ruby module, its rather nifty, its for generating random data, but you specify things in regex form, so if you want a name you could say /\w{5}/ will generate a word with 5 characters, might be fun to make something like that for p6
19:34 Tene pmichaud: http://github.com/blog/712-pull-requests-2-0
19:34 pmichaud Tene: yes, I noticed that.
19:35 TimToady ash_: seems to me someone was working on that back in the pugs days
19:35 pmichaud Tene: that seems to resolve a lot of the issues I had with pull requests... but as before I'd need to see it work.
19:35 pmichaud and I'm not yet sure we want to move off of RT for such things yet.
19:36 Tene I figured, just mentioning in case you hadn't noticed it yet.
19:36 pmichaud afk, kid pickup
19:39 HarryS joined #perl6
19:40 proller_ left #perl6
19:45 HarryS left #perl6
19:50 jdv79 left #perl6
19:59 Italian_Plumber1 left #perl6
20:00 TimToady phone
20:00 pmichaud phone
20:00 pmichaud darn, a couple of seconds late :)
20:04 __rnddim__ is now known as lue
20:04 lue hello o/
20:04 tadzik oh, lue incognito! :) hi
20:05 ash_ who wants to break http://75.143.73.208 for me?
20:05 tadzik !
20:05 ash_ the first request is always kinda slow
20:06 ash_ but after that, it should be fairly responsive (its startup time on parrot/rakudo)
20:06 tadzik help cannot be entered
20:06 lue it only happens when my internet mysteriously stops working (and even then it's rare for freenode to keep me from using lue)
20:06 nine_ left #perl6
20:06 Mowah left #perl6
20:06 tadzik ash_: I accidentally exit'
20:06 nine joined #perl6
20:07 tadzik I wonder if I enter stuff into your console now
20:07 ash_ lol, exit kills the daemon, oops...
20:07 ash_ i'll add that to the safemode...
20:07 TimToady camelia is pretty jaggy when scaled
20:08 lue only if you scale the raster version :)
20:08 ash_ mgiht want to refresh your browsers
20:08 ash_ might*
20:08 rindolf joined #perl6
20:08 tadzik now nothing works
20:09 ash_ hmm
20:09 HarryS joined #perl6
20:10 amkrankruleuen left #perl6
20:10 moritz_ Cannot connect to rakudo eval server
20:10 ash_ ya, i just reset the eval server
20:11 Mowah joined #perl6
20:11 ruoso left #perl6
20:11 ash_ how about now?
20:12 dual joined #perl6
20:12 tadzik ash_: you may want to add a note about this startup time, it may seem offpissing for some folks
20:12 tadzik ash_: now it seems to load forever
20:13 jferrero left #perl6
20:13 tylercurtis ash_:  you should probably also note that sending multiple lines of input doesn't work well.
20:13 PerlJam ash_: does it have something on $*IN ?
20:13 ash_ ya, same as p6eval
20:14 ash_ somethings keeps causing the server to die, i am not sure what...
20:14 Italian_Plumber joined #perl6
20:14 lue I just can't seem to get it working.
20:14 PerlJam ash_: for lines -> $x { say $x } # broke it.
20:14 TimToady std: for lines -> $x { say $x } # broke it.
20:14 p6eval std 32123: OUTPUT«[31m===[0mSORRY![31m===[0m␤Function 'lines' needs parens to avoid gobbling block at /tmp/9SQnX6cBf3 line 1:␤------> [32mfor lines[33m⏏[31m -> $x { say $x } # broke it.[0m␤Missing block (apparently gobbled by 'lines') at /tmp/9SQnX6cBf3 line 1:␤------> [32mfor lines -> $x
20:14 p6eval ..{…
20:15 PerlJam rakudo: for lines -> $x { say $x }
20:15 tadzik well, multi-line stuff seems not to work at all
20:15 p6eval rakudo dc9900: OUTPUT«===SORRY!===␤Missing block at line 22, near ""␤»
20:15 PerlJam rakudo
20:15 HarryS left #perl6
20:15 ash_ hmm, i'll look into the multi-line stuff
20:15 PerlJam rakudo: for lines() -> $x { say $x }
20:15 p6eval rakudo dc9900: OUTPUT«Land der Berge, Land am Strome,␤Land der Äcker, Land der Dome,␤Land der Hämmer, zukunftsreich!␤Heimat bist du großer Söhne,␤Volk, begnadet für das Schöne,␤vielgerühmtes Österreich,␤vielgerühmtes Österreich!␤␤Heiß umfehdet, wild umstritten␤liegst dem Erdteil du inmitten,␤einem
20:15 p6eval ..stark…
20:16 tadzik I doubt if REPL supports'em
20:16 tadzik doesn't seem so
20:17 ash_ lol, there are some glaring issues with it, i'll try to fix some of them, then let you guys know
20:18 amkrankruleuen joined #perl6
20:19 Italian_Plumber left #perl6
20:20 amkrankruleuen left #perl6
20:20 amkrankruleuen joined #perl6
20:20 Italian_Plumber joined #perl6
20:21 kolibrie_ is now known as kolibrie
20:24 ash_ brb restarting
20:24 ash_ left #perl6
20:26 lue Can anyone point to an explanation of the difference between regex, token, and rule (in a grammar)? I've read what the differences, I just have no idea what that means to me.
20:27 lue [why should I care if backtracking is disabled or not?]
20:27 PerlJam lue: backtracking is was allows quantified constructs or alternation to "back up" and try again.
20:27 [particle] do you want to use *, +, or ? regex modifiers?
20:28 [particle] if you do, you need backtracking
20:28 moritz_ lue: if you care what your regex should match, you should care about backtracking
20:28 moritz_ [particle]: that's not strictly true
20:28 moritz_ rakudo: say '123abc' ~~ /:ratchet \d+ <alpha> /
20:28 [particle] ok, you're right, i'm telling half-truths
20:28 p6eval rakudo dc9900: OUTPUT«123a␤»
20:28 moritz_ no backtracking, still works
20:29 lue Of course. What I meant was that the explanations for these differences are terse (the ones I've found), and don't really explain it.
20:31 moritz_ lue: the best verbose explanation about backtracking is in "Mastering Regular Expressions" by J. Friedl
20:31 lue In my experience, information on Perl 6 regexes tend to assume I've used regexes in P5 before or that I have a pretty good grasp of them already. [anyone willing to prove me wrong feel free]
20:31 moritz_ lue: http://github.com/perlpilot/perl6-docs/blob/master/intro/p6-regex-intro.pod does not
20:31 Tene lue: prove you wrong about your experiences?
20:31 moritz_ PerlJam++ for it
20:32 kjeldahl joined #perl6
20:34 ash_ joined #perl6
20:34 lue .oO(I consider the fact that I've never used P5 before a good thing for the documentation side of things)
20:34 PerlJam lue: If you have any suggestions for making that document clearer, feel free to offer them.
20:35 envi^home left #perl6
20:37 [Coke] TimToady: I am actually looking forward to redoing printf formats in tcl as a grammar in nqp. As much as one can look forward to such things, anywya.
20:37 lue PerlJam: pretty good so far.
20:39 PerlJam It's hard to write something where you have to simultaneously know the subject and forget everything you know about it  :)
20:39 HarryS joined #perl6
20:41 ash_ left #perl6
20:42 pmichaud lue: 'rule' basically means that whitespace in the pattern corresponds to (optional-ish) whitespace in the target
20:42 moritz_ PerlJam: that's pretty mmuch always the case when you write for beginners :-)
20:42 pmichaud rakudo:  say ?('a b c' ~~ regex { a b c })
20:42 p6eval rakudo dc9900: OUTPUT«0␤»
20:42 pmichaud rakudo:  say ?('a b c' ~~ rule { a b c })
20:42 p6eval rakudo dc9900: OUTPUT«1␤»
20:43 pmichaud the first only matches "abc".  The second will match "a b c" or  "a\tb c" or "a     b c"
20:43 pmichaud (or various other combinations where there's whitespace between the a, b, and c)
20:43 perlygatekeeper left #perl6
20:44 svetlins joined #perl6
20:45 pmichaud 'token' (ratcheting)  indicates what should be done when encountering a quantifier or other things that could backtrack
20:45 pmichaud consider the case of the * quantifier
20:45 pmichaud in a regex, the * quantifer says "match as many of these as you can, and then continue with the rest of the match"
20:45 pmichaud but if the rest of the match fails, we backtrack and try with one fewer match in the * quantifier
20:46 HarryS left #perl6
20:46 pmichaud and we keep doing that until we're completely unable to match no matter how many times the * quantifier matches
20:46 tadzik left #perl6
20:47 pmichaud that's the default for 'regex' -- backtracking is enabled by default
20:47 pmichaud but backtracking can also be expensive -- especially if we know that we're parsing something that can't possibly backtrack and match
20:47 pmichaud or where we know that we don't want to do any backtracking
20:49 sftp_ left #perl6
20:49 tylercurtis Valgrind does not seem to like Rakudo. On every spectest(with valgrind --leak-check=full), I'm seeing at least 122k bytes "definitely lost".
20:50 lue so regex has a stronger will to live, [to put it in non-coding terms], by constantly taking away one match from a quantifier and seeing if that's what's needed to match?
20:50 pmichaud so, 'token' is a regex where the backtracking is disabled by default.  With the * quantifier, that means we match as many as we can, and continue the match.  If the latter part doesn't match, we don't try again with smaller numbers of matches on the *
20:50 pmichaud yes, regex will try more possibilities for matching
20:51 pmichaud so, consider something like
20:51 pmichaud '123X' ~~ regex { \d+ Z }
20:51 pmichaud actually, let's stick with *
20:51 pmichaud '123X' ~~ regex { \d* Z }
20:52 pmichaud the regex will match the '123', and then look for a Z.  That fails, so it tries again by looking at the '12' and seeing if it can match a 'Z'.  That fails, so it looks at the '1' and see if it can match a 'Z'.  That fails, so it tries just matching a Z at the beginning.
20:52 masak joined #perl6
20:52 pmichaud ultimately it fails
20:52 masak ahoy!
20:52 pmichaud but if we do
20:52 pmichaud '123X' ~~ token { \d* Z }
20:53 pmichaud the \d* will match the '123', and then we look for a Z, and not finding one, we fail the match immediately at that point.
20:53 lue hello masak o/
20:53 pmichaud because the 'token' disables backtracking on the quantifier
20:54 pmichaud now then, granted that a sufficiently smart optimizer could look at   regex { \d* Z }   and figure out that since Z is not a digit, there's no need to backtrack on the \d* anyway and it optimizes it out.  But that doesn't always work in a general case.
20:55 [particle] especially if you don't have an optimizer at all...
20:55 lue I was wondering about that, but chalked it up to "you just don't know". Maybe the guy retooled \d to mean base 36.
20:55 ash_ joined #perl6
20:57 pmichaud \d doesn't mean "integer" in this case :-)
20:57 pmichaud but yes, I see what you mean :-)
20:58 masak haven't backlogged yet. I was thinking after I logged off that .into(:base($n)) would be a pretty ideal syntax for a radix conversion method.
20:59 pmichaud I don't know that .into is the right verb or adjective I'd want to use here, though.
20:59 pmichaud unless there are other things we plan to .into besides just bases
20:59 masak if it's a multi, that's certainly possible.
21:00 masak .into( :base64 )
21:00 pmichaud I think I'd just prefer .base(64) in that case
21:00 Mowah left #perl6
21:00 pmichaud I don't see what ".into" adds
21:00 masak .base has the bin/oct/hex deficiency of not specifying direction.
21:00 frettled pmichaud: seems reasonable
21:01 rindolf left #perl6
21:01 frettled .base(:8(15))
21:01 PerlJam 15.base(8)
21:02 whiteknight joined #perl6
21:02 frettled That's not quite what I meant :)
21:02 masak frettled: what DID you mean?
21:02 masak I'm looking at that, scratching my head.
21:02 frettled my $x = 69;  say $x.base(:8(15));
21:02 PerlJam then I think you get my point :)
21:03 masak why would anyone do :8(15) inside .base() ? :/
21:03 frettled :8(15) is what it is today (though I may not like it)
21:03 frettled masak: $x.base(:8($y))
21:03 frettled :)
21:04 * masak tries a primal scream
21:04 PerlJam masak: wow.  I think I heard you all the way over here in Texas.
21:04 PerlJam either that, or it was one of my kids in the other room
21:04 pmichaud .oO( faster than the speed of sound? )
21:04 masak the trick is to breathe in first.
21:05 pmichaud I tried inhaling once... didn't like it.  :-P
21:05 pmichaud I haven't inhaled since.
21:05 kjeldahl left #perl6
21:05 * PerlJam inhales all the time.
21:05 PerlJam I'm inhaling right now even
21:05 * frettled only inhales while not exhaling.
21:05 lue there should be some pragma to have Perl 6 handle your integers differently. Something like  use base :16 [or however pragmas work], which then prints integers and treats numbers in the file as being in base 16.
21:06 frettled lue: like obase in bc(1)?
21:06 [Coke] frettled is clearly not tuvan.
21:06 PerlJam lue: Sounds confusing ... but, sure, why not
21:06 frettled The :base thingy works similarly to a very local ibase
21:06 frettled [Coke]: nopes, I never managed to do both :)
21:07 dalek yapsi: 2a0ab24 | masak++ | .gitignore:
21:07 dalek yapsi: [.gitignore] Makefile
21:07 dalek yapsi: review: http://github.com/masak/yapsi/commit/2a0ab24a5670fb0e2a5d6241aaae11ad490e6b87
21:07 pmichaud masak: then I'd suggest  .to-base(16)
21:07 pmichaud instead of  .into(:base(16))
21:07 frettled PerlJam: We must remember to cater for the obfuscating contests ;)
21:07 frettled pmichaud: .ibase and .obase ;)
21:07 pmichaud or .as-base
21:07 frettled bonus: eliminates :base
21:07 masak pmichaud: that dash is a great pity. it'd be nice to avoid dashes and underscores in core-y things.
21:07 PerlJam frettled: apparently normal perl 6 code is already obfuscating enough for some people.
21:08 lue the difference here is that you wouldn't need a prefix (like 0x) to specify its a hex number, because the interpreter has been told to handle everything as hex (this sounds weird for hex, but becomes a good thing for oddball bases like 36)
21:08 masak pmichaud: some metamodel stuff does not succeed doing this, but otherwise I think everything is dash-free and underscore-free.
21:08 frettled PerlJam: that just proves it's Perl, people say the same about v5.x, too :)
21:08 pmichaud there's always   15.Str(:base(16))
21:08 Ross left #perl6
21:09 masak pmichaud: not sure I like that.
21:09 masak feels arbitrary.
21:09 HarryS joined #perl6
21:09 PerlJam .oO(what *isn't* arbitrary on some level?)
21:09 pmichaud but it's a bit more precise than anything else we've selected :)
21:09 masak might just be me not being used to the thought, though.
21:09 frettled 15.Str(:base(:8(10))) # Nice and evil
21:09 frettled I would have severe problems trying to explain why it's like that, though.
21:10 masak I think I don't like the special-casing of what was a normal casting method just moments ago.
21:10 masak it's a step up in complexity, in a way.
21:10 lue use base :16; my $a = 10; say $a.to-base(10); # here, say would print 16
21:10 pmichaud frettled: you keep using that term :8(10).  I do not think it means what you think it means.  </montoya>
21:10 masak +1
21:11 pmichaud but why the colon on :16?
21:11 pmichaud I think there's a bit too much significance being attached to the colon here.
21:11 lue Or however pragmas are supposed to work
21:12 frettled pmichaud: does it not mean to represent in base 10 the base 8 number 10?
21:12 lue .oO(I just realized that my solution would likely lead to each number having a 'base' attribute.)
21:12 pmichaud frettled: it does not.
21:12 lue s/number/variable/
21:12 pmichaud frettled: it simply is the value of '10' interpreted as base 8
21:13 frettled pmichaud: except that there seems to be an implied understanding that values are in base 10.
21:13 frettled (see p6l)
21:13 pmichaud frettled: that's not exactly correct.
21:13 pmichaud when output, a value is displayed in base 10 by default
21:13 PerlJam rakudo: say :8(99)
21:13 p6eval rakudo dc9900: OUTPUT«DON'T PANIC! Invalid character (9)! Please try again :) ␤  in main program body at line 1␤»
21:13 PerlJam I like that message for some reason  :)
21:14 frettled pmichaud: the semantics are, in effect, the same for the example, though
21:14 pmichaud in particular,  :8(16) would output what?
21:14 frettled 14 in decimal, I would hope.
21:14 masak 14.
21:14 pmichaud right
21:14 pmichaud that says nothing about how it's represented internally, though.
21:14 frettled no
21:14 pmichaud in fact, it's likely to be internally represented as   00001110
21:14 frettled but that's also irrelevant to the example, is it not?
21:15 HarryS left #perl6
21:15 Quadrescence left #perl6
21:15 pmichaud frettled: it may be.  But with :8(10)  some people attach meaning to the '10' as being how it's represented internally
21:16 frettled pmichaud: ah, now I see what you mean.
21:16 pmichaud right... it's a bit of a confusing pun for some folks
21:16 frettled I guess that is a side effect of the rather special syntax.
21:16 frettled My use _was_ intended as a mere obfuscation of the decimal number 8.
21:16 pmichaud ah
21:17 pmichaud well, technically   :2(10), :4(10), :16(10),  :20(10)   all end up being the value of the radix.  :-)
21:17 frettled I tried to indicate how evil it might be.
21:17 pmichaud yes, it's evil.
21:17 lue my pragma idea stems from the fact that how you handle the number is different to how its handled internally. Therefore, you should be able to handle numbers in base 32 if you want.
21:17 pmichaud we must learn to control our evil ways :-)
21:18 frettled lue: yup
21:19 frettled pmichaud: I guess my beef is that we have a very special syntax for specifying the radix of the postinfix variable, and that this syntax has no similar counterpart for doing other radix operations.
21:19 frettled (if that made sense, my communication skills may be improving)
21:20 PerlJam s/variable/value/
21:20 pmichaud frettled: your beef is that :16($x)  only handles conversion from a string to a numeric, and we don't have the inverse.
21:20 frettled PerlJam: thanks
21:20 pmichaud I agree
21:20 pmichaud but we're not sure what to call the inverse.
21:20 31NABC854 left #perl6
21:20 frettled $x.16 ;)
21:21 lue right now it's called .fmt('%x')
21:21 PerlJam lue++
21:21 pmichaud lue: for hexadecimal, yes.
21:21 pmichaud lue: what if I want base 20?
21:21 lue exactly.
21:21 patspam joined #perl6
21:21 PerlJam .base and .unbase  :)
21:21 lue I think it's ugly for just radix conversion, and it doesn't handle every base.
21:23 PerlJam Clearly the inverse of :16($x) should be $x:16   :)
21:23 pmichaud :16)$x(
21:23 frettled PerlJam: oh.  I slipped the shift!
21:23 frettled (that was what I meant)
21:23 frettled pmichaud++
21:24 pmichaud :-16($x)  :-P
21:24 lue is pasing a positional parameter to a pragma the same as with anything else?  use base 16  ?
21:24 PerlJam lue: that'll work
21:25 frettled pmichaud: http://en.wikipedia.org/wiki/Negative_base
21:25 masak smash++ # http://gil.di.uminho.pt/users/smash/rakudo-bench.html
21:26 PerlJam smash++ indeed
21:26 masak smash: if there's anything you can do about that bright-yellow-on-white, a great number of pairs of eyes will thank you.
21:27 Tene One common failure of these discussions I've seen elsewhere is a failure to keep the distinction between "a number" and "a representation of a number in a given base" appropriately distinct.  AFAIK, numbers themselves don't have bases, only formattings that are rendered or parsed do.
21:27 Tene Seems like it's all pretty clear here, though.
21:27 Tene (I just skimmed. ;)
21:28 masak Tene++
21:29 masak yes, I think that confusion plays into many discussions about this. including some we've had today.
21:29 lue If there are no objections to my idea of a pragma controlling which base a number is represented in, I'd like to hear what the people at p6l think.
21:29 frettled tired minds generate all sorts of nonsense.
21:29 Tene Given that understanding, I rather liked .Str(:base(36))
21:30 masak lue: you don't need anyone's permission to post to p6l :)
21:30 Tene The correspodning suggestion to decode it seems to be Str.Int(:base(36));
21:30 masak aye.
21:31 masak maybe I can convince myself to like that after all.
21:31 frettled lue++: if you can avoid the presentation/representation confusion Tene++ mentions, that would be awesome.
21:31 Tene I didn't actually follow what you disliked about that, masak.
21:32 masak Tene: merely the action of putting a named parameter into an otherwise "pure" conversion method.
21:32 masak there are no other cases, as far as I remember, of conversion methods taking named parameters. as such, this would be a first. that's the only thing that bothers me.
21:32 Quadrescence joined #perl6
21:32 PerlJam and what would "hello
21:32 PerlJam blah
21:33 Tene masak: That's a very good point.
21:33 PerlJam and what would "hello".Str(:base(36)) actually do?
21:33 masak Tene: it's one of those "I'm an implementor, I want to keep complexity down" points-of-view.
21:33 frettled PerlJam: confuse people
21:33 Tene PerlJam: ITYM .Int()
21:35 PerlJam I don't think so.
21:35 Tene masak: I think that the main thrust of my suggestion was that "render this number using a particular base" is an operation on an Int that produces a String, and the reverse is the reverse.
21:35 Guest59170 left #perl6
21:35 lichtkind joined #perl6
21:35 Tene So, a method on Int, and a complementary method on Str
21:35 lichtkind hi tene :)
21:35 frettled Tene: that makes sense
21:36 masak Tene: aye, I got that. that's what made me not dislike the suggestion .Str(:base) so much.
21:38 frettled Combined with pragmas for input and output base, this can become fairly useful, I think.
21:38 PerlJam but only for integers?
21:39 Tene perhaps something like: use base :render(36), :parse(16); oslt
21:39 Trashlord joined #perl6
21:39 PerlJam 3.1415  <-- always decimal no matter what ?
21:39 HarryS joined #perl6
21:39 dalek book: 90f4939 | chromatic++ | src/roles.pod:
21:39 dalek book: Edited roles chapter; added some author notes.
21:39 dalek book: review: http://github.com/perl6/book/commit/90f4939a74c158a4f3419eb576bc1b42e7db7593
21:39 TimToady it should all be part of a refactored printf format
21:39 TimToady and :16() should reject anything that is already numeric
21:40 frettled I hope the refactored printf format won't be using a "printf" name :)
21:40 TimToady if I start refactoring formats, it'll end up about as far from printf as p6 regex from p5
21:40 PerlJam TimToady: well volunteered!  ;)
21:41 frettled PerlJam: well mst'ed!
21:41 Tene Yes, :16(10) is a little uncomfortable to me.
21:41 TimToady however, as a short term expedient, .fmt('%32X', :base($r)) could override the 16-ness of X
21:41 Tene :16('10') is nicer to me.
21:42 frettled I fear that we may be heading in a direction that makes radix conversions cumbersome.
21:42 TimToady I don't know how to do a general radix on top of existing printf formats though
21:43 TimToady which is why it occurred to me that they were basically beyond redemption
21:43 frettled ISTR that there are legitimate, mathematical uses of performing some operations in one base, and others in another.
21:43 lue [backlogging] feel free to remove those DON'T PANIC's. I look at them and wonder what I was thinking :)
21:43 frettled (going from e.g. base 10 to 8, or vice versa, with the "same" number)
21:43 frettled lue: you forgot to bring your towel?
21:44 Tene I still don't think it would be that unusual for some conversion methods in some classes to have optional parameters, though.
21:44 frettled That's okay.
21:44 frettled I'm worried about having to convert back and forth between strings and numerical types.
21:45 TimToady lue: regarding pragmas, they're usually for when your language sucks over a large lexical scope, or you want your language to suck over a large lexical scope.
21:45 Tene frettled: Numbers don't have bases, only representations of numbers have bases.
21:45 TimToady in this case, it would be the latter
21:45 HarryS left #perl6
21:45 javs left #perl6
21:46 frettled Tene: s/representations/presentations/?
21:46 Tene frettled: Sure.  I don't disagree with that.
21:46 frettled Tene: anyway, that objection is problematic
21:46 Tene frettled: hm?
21:47 masak yapsi: our $a = 42; { my $a = 5; { say our $a } }
21:47 p6eval yapsi:  ( no output )
21:47 masak :/
21:47 frettled Tene: remember that in programming, you don't always receive input to your methods as user input (strings)
21:47 frettled Tene: and it might not even be desirable
21:48 frettled An objection to that is, of course, "use multis!"
21:48 Tene frettled: It's not clear to me at all what that's supposed to be an objection to?
21:48 Tene If you want a number, you ask for a number.  Why would you want your users to give you a string?
21:49 frettled Tene: in the way we were heading, you'd have to do your radix arithmetic with strings.
21:49 lue .oO(I agree, presentation gets the point across better. Changing email to reflect that.)
21:49 rgrau_ joined #perl6
21:49 TimToady alternately, :16($number) should just return $number always if it's already numeric
21:50 Tene frettled: explain "radix arithmetic"?
21:50 frettled TimToady: essentially rendering it a noop, you mean?
21:50 Tene TimToady: I'd much prefer that it at least warn.
21:50 TimToady yes, but that doesn't help when someone does the equivalent of :8(777)
21:50 TimToady so I think non-strings should just blow up
21:50 Tene Agreed
21:51 frettled Tene: Let's assume that you want to use a special radix, say base 1000.  You can run into overflow blow-up.
21:52 PerlJam std: say :8(777)
21:52 p6eval std 32123: OUTPUT«ok 00:01 116m␤»
21:52 sbp how do you specify the repertoire for large bases?
21:52 phenny sbp: 20:59Z <Morbus> tell sbp http://thisismyjoystick.com/editorials/final-fantasy-xiv-how-the-fatigue-system-really-works/
21:52 sbp I mean the characters used for that base
21:52 Tene frettled: I don't know "overflow blow-up".  Can you explain what "use" means there?
21:52 sbp something in base 1000 is going to need a lot of characters to represent it
21:53 frettled Tene: what sbp said, or it is going to need a very large integer.
21:53 frettled to store in
21:53 PerlJam frettled: you mean a sequence of integers.
21:53 frettled PerlJam: are you confusing integers with digits?
21:54 PerlJam oh, I did. sorry
21:54 mberends left #perl6
21:54 PerlJam the juxtaposition of "lots of characters" and "very large integer" on my screen confused my meager brain
21:56 frettled my $x = :1000000(1000000)
21:56 Tene frettled: It's entirely possible that I'm just not aware of the relevant math here, and I feel like at least one of us is confusing levels here.
21:57 frettled Tene: Ok.  What I tried to say, was that it appeared that there was a suggestion that any handling of radix conversion would have to involve a string.
21:57 pugssvn r32125 | lwall++ | [S02] outlaw :8(777) and such
21:58 Tene frettled: Let me take a sec to confirm if I'm understanding you here.
21:58 sbp I guess now would be a bad time to mention non-integer bases...
21:58 frettled sbp: We've been there briefly :D
21:58 [particle] NOT CORE
21:58 Tene sbp: also mixed redix systems :)
21:59 TimToady modules have to be good for something
21:59 sbp actually mixed radix systems would be kind of helpful
21:59 * frettled has handily avoided talking about mixed radix, to avoid confusing things further.
21:59 Tene "radix conversion" meaning "If I have a number X, what is the base-16 interpretation of the base-8 presentation of X"?
21:59 sbp modules: hehe
21:59 [particle] don't forget surreal radix systems
21:59 [particle] :surreal(71) # "you are more beautiful than a bouquet of fossils."
22:00 frettled sbp: golden ratio base, prime base, factorial base, ...
22:00 TimToady if they were fossilized with rose quartz that would almost make sense
22:00 masak please to read through and comment, kthx: http://github.com/masak/yapsi/blob/master/doc/announce/2010.09
22:00 sbp imaginary base?
22:01 Tene frettled: "radix conversion" meaning "If I have a number X, what is the base-16 interpretation of the base-8 presentation of X"?
22:01 sinusoid234 joined #perl6
22:01 TimToady std: :φ(42)
22:01 p6eval std 32123: OUTPUT«ok 00:01 115m␤»
22:01 Holy_Cow left #perl6
22:01 TimToady there you go :P
22:01 drbean joined #perl6
22:01 masak TimToady++ # that' sick :P
22:01 masak s/'/'s/
22:02 frettled Tene: That seems essentially correct, yes.
22:02 frettled std: :!(42)
22:03 Tene For example, :10(52).fmt("%o") is "64".  :16("64") is 100.  So the radix conversion from 8 to 16 of 52 is 100?
22:03 p6eval std 32123: OUTPUT«[31m===[0mSORRY![31m===[0m␤Malformed False pair; expected identifier at /tmp/lQQOKpyogY line 1:␤------> [32m:![33m⏏[31m(42)[0m␤Parse failed␤FAILED 00:01 114m␤»
22:03 sbp "SIC is explicitly not compatible with later, earlier, or present versions of itself." :-)
22:03 PerlJam rakudo: say :16<64>
22:03 p6eval rakudo dc9900: OUTPUT«100␤»
22:03 Tene frettled: Is this 1) something that people actually do and has meaning? and 2) something that can be expressed mathematically instead?
22:03 masak sbp: I wish that was less true. :)
22:04 diakopter rakudo: say :16<-1>
22:04 p6eval rakudo dc9900: OUTPUT«===SORRY!===␤Malformed radix number at line 22, near "<-1>"␤»
22:04 mikehh left #perl6
22:04 dalek yapsi: f2b8060 | masak++ | doc/announce/2010.09:
22:04 dalek yapsi: [doc/announce/2010.09] added
22:04 dalek yapsi: review: http://github.com/masak/yapsi/commit/f2b8060a9b89c4c75083bb33b8f20dab3b7ce257
22:04 masak more reviewers, moar! :)
22:05 frettled Tene: That conversion doesn't really make sense, unless you by 100 mean binary true-false-false
22:05 TimToady .oO("this book fills a much needed gap")
22:05 Tene frettled: then I completely misunderstand what you mean by "radix conversion".
22:05 frettled Tene: and even so, it doesn't even seem correct
22:06 Tene decimal 52 expressed in base 8 is "64".  "64" interpreted in base 16 is decimal 100.
22:06 awwaiid joined #perl6
22:07 sorear hello #perl6
22:07 phenny sorear: 12:31Z <azawawi> tell sorear Thanks for the latest STD syml inclusion. Fixed S:H:P6 to re-use it. http://padre.perlide.org/trac/changeset/12415
22:07 masak sorear: hi!
22:07 masak sorear: about to release Yapsi 2010.09! :)
22:07 frettled Tene: uhm, you ought to end up with :16(34) and :10(52).
22:08 diakopter .oO("this gap books a much needed fill")
22:08 sinusoid234 left #perl6
22:09 Tene frettled: Um... those are the same number.
22:09 frettled yes.
22:09 patspam left #perl6
22:09 Tene Are you saying that radix-conversion is the identity function?
22:09 HarryS joined #perl6
22:09 Tene 'cos that doesn't sound so difficult to implement to me.
22:09 frettled radix-conversion yields the same underlying number.
22:09 patspam joined #perl6
22:10 Tene frettled: numbers don't have radixes, afaik.  afaik, radix is only a property of the presentation of a number.  Am I misinformed here?
22:10 jhuni joined #perl6
22:10 frettled where "underlying" might mean "the actual number"
22:10 * frettled is _not_ a mathematician.
22:10 Tene So, yes, you're telling me that you're expecting trouble implementing the identity function. :P
22:10 dalek yapsi: 44c8530 | masak++ | doc/announce/2010.09:
22:10 dalek yapsi: [doc/announce/2010.09] pidgeon
22:10 dalek yapsi: review: http://github.com/masak/yapsi/commit/44c85306f40e3f376233cd11a40ba10e1a299493
22:10 frettled Tene: I have severe terminology problems here, for a lack of mathematical background, but as I mentioned initially:
22:11 frettled Tene: there may be legitimate, mathematical uses of interpreting a number differently depending on the radix.
22:11 TimToady you're asking for a Str-to-Str crossbar topology when we want a Str-to-Num-to-Str star topology.
22:11 Tene frettled: I was reading all of that assuming that you were much-more-informed mathematically than I am.
22:11 frettled meaning that it would be legitimate, _numerically_, to look at the radix as a property of the number, rather than a string presentation.
22:12 frettled Tene: sorry, I thought I made that caveat very clear early on.
22:12 Tene frettled: I must have missed that; sorry. :)
22:12 TimToady perhaps this belongs on p6l.  :P
22:12 Tene You could always ask #math
22:13 masak "belongs on p6l" -- is that an assessment or a curse? :)
22:13 frettled TimToady: Num-to-Num, perhaps.
22:13 frettled masak: yes.
22:13 * lue message to p6l sent
22:13 * frettled is growing increasingly tired, so perhaps this is a bad time to try clarifying, it appears that I'm only making things more confusing instead.
22:13 * masak switches to next level of Yapsi release
22:14 TimToady and how will we marshall these Nums-with-baggage for talking with normal languages?
22:14 lue .oO(Funny, I got done with my message to p6l about bases when TimToady suggested it go there)
22:14 frettled With brutal force.
22:14 patspam left #perl6
22:15 TimToady lue: I already gave my opinion of pragmas above.  They're nearly always a design smell, or the desire for a design smell.
22:15 Tene frettled: afaict by asking google, no, that's not an operation that really makes sense.
22:15 HarryS left #perl6
22:15 Tene Numbers don't have bases.
22:15 TimToady because all their bases are belong to us
22:16 frettled :D
22:16 Tene If you want to perform an operation that depends on the presentation of a number, you do need to actually computer the presentation.
22:16 perigrin is that considered acidic wit?
22:16 lue is that why S31 is under-specced? :)
22:16 TimToady more like caustic
22:16 perigrin TimToady: it's certainly been a corrosive influence in my life.
22:16 * sbp learns the answer to his earlier question about specifying a repertoire when he finds out that only radices in 2..36 are supported
22:17 frettled perigrin: we might be getting to a very base argument
22:17 dalek yapsi: e06cad0 | masak++ | doc/announce/2010.09:
22:17 dalek yapsi: [doc/announce/2010.09] reformulation, addition
22:17 dalek yapsi: review: http://github.com/masak/yapsi/commit/e06cad0d4b49e6adb01dc14d9c5dc4e922b04031
22:17 sbp hi perigrin
22:17 perigrin hey sbp :)
22:18 masak .tar.gz file uploaded. http://github.com/masak/yapsi/downloads
22:18 lue Even though I personally have no immediate need for the pragma, I don't see why we can't have it.
22:18 * masak posts announcement
22:19 masak lue: I agree with that. I also don't see why we can't have it.
22:20 * frettled will sleep a bit on the problem and see if a more coherent presentation can be made in a few days.  :)
22:20 perigrin phrettled: phear the phinal phorm of the phuss
22:20 frettled heh
22:20 frettled Good night, #perl6!
22:20 TimToady o/
22:20 * frettled → idle.
22:20 masak dream radical dreams, frettled.
22:21 PerlJam lue: If the community wants it, they'll create it.  :)
22:22 lue .zZ(√)
22:26 synth left #perl6
22:30 macroron left #perl6
22:31 TimToady rakudo: my &postfix:<²> := * ** 2; say 3²;
22:31 p6eval rakudo dc9900: OUTPUT«===SORRY!===␤Confused at line 22, near "say 3\x{b2};"␤»
22:32 TimToady rakudo: sub postfix:<²> ($x) { $x ** 2 }; say 3²;
22:32 p6eval rakudo dc9900: OUTPUT«9␤»
22:32 masak p6c announcement and blog post announcement have been posted. stand down release mode.
22:32 lichtkind TimToady:  can you please give me the exact url to ypu rosetta examples?
22:32 lichtkind your
22:32 TimToady http://rosettacode.org/wiki/Category:Perl_6
22:33 sbp is there a non "hack the grammar" way to get postfix:<...> to operate over a regex?
22:33 sbp so that you could capture a wider range of postfix superscript digits say
22:33 sbp (and many other applications, I'm sure)
22:34 pmichaud (r32125)   Does this include things like...?   my $a = '771' + '6';  say :8($a);   # blows up because $a is numeric
22:34 TimToady yes
22:34 lichtkind thanks
22:34 pmichaud blow up +1
22:35 pmichaud and "blow up" means "returns Failure"?  Or is it MMD dispatch error?
22:35 TimToady I think this one might rate a stub that blows up with a specific message
22:36 pmichaud stub dies or fails, then?
22:36 TimToady I'm fine with dies
22:36 pmichaud "Attempt to do radix conversion of non-Str value..."  ?
22:37 ash_ left #perl6
22:39 HarryS joined #perl6
22:39 awwaiid left #perl6
22:40 broquaint left #perl6
22:42 masak pmichaud: wfm.
22:42 sbp rakudo: my $x = Any; say :8($x)
22:42 sorear hey pmichaud
22:42 p6eval rakudo dc9900: OUTPUT«DON'T PANIC! Invalid character (A)! Please try again :) ␤  in main program body at line 1␤»
22:42 sbp is that an appropriate message there?
22:42 masak sbp: no.
22:42 masak sbp: I submitted a ticket about that today.
22:42 sbp ah, sorry
22:43 masak no worries :)
22:43 masak http://rt.perl.org/rt3/Ticket/Display.html?id=77626
22:45 sorear pmichaud: what is your take on http://github.com/perl6 versus http://github.com/perlsix ?
22:45 drbean left #perl6
22:45 HarryS left #perl6
22:46 lue rakudo: grammar a { regex TOP { <Abe> }; regex Abe { Abe }; }; if "Abe" ~~ /<a::Abe>/ { say "hi" };
22:46 p6eval rakudo dc9900: OUTPUT«===SORRY!===␤regex assertion not terminated by angle bracket at line 22, near "::Abe>/ { "␤»
22:46 masak lue: known TODO.
22:46 lue mberends seems to have made <a::Abe> do what it should in his Pod parser.
22:47 masak lue: that's because that's alpha code.
22:47 masak lue: if you want mberends' code to run, you might fare best with the January 2010 release of Rakudo.
22:48 masak or perhaps earlier still.
22:48 sorear wait, I'm confused
22:48 pmichaud sorear: not sure we want/need separate "perl6" and "perlsix" github accounts.  Seems like it's likely to cause a lot of confusion.
22:48 sorear pmichaud: That's what I said when moritz_ announced he created perlsix
22:49 sorear I thought alpha's critical weakness was NOT having working grammars
22:49 masak sorear: not at all.
22:49 pmichaud alpha's weakness was not having protoregexes (among other things)
22:49 masak sorear: they just worked in a way that wasn't extensible to what we ultimately wanted.
22:49 lue Ah well. At least TIMTOWTDI, or I'd have nothing to do but define a grammar :) .
22:49 pmichaud also the fact that the regex engine was almost entirely pir
22:50 masak sorear: moritz_ had two reasons for perlsix, IIUC. (1) it's a special type of account. I forget the name. perl6 isn't, I think. (2) moritz_ didn't have sufficient privs for perl6.
22:50 pmichaud we can turn perl6 into an organizational account
22:50 masak sorear: those two reasons may or may not be good, and they may change over time.
22:50 pmichaud we don't need to create a new account for that.
22:50 masak organisational account! that's it!
22:50 sorear masak: I'm pretty sure there's a "convert unspecial account into special account" button
22:51 pmichaud I already did that conversion for the 'parrot' github account.
22:51 masak right. I'm more explaining than defending moritz_' choice.
22:51 masak I'd also prefer just one account.
22:51 pmichaud anyway, if we want to move perl6 to an organizational account, that shouldn't be a problem.
22:51 pmichaud and I'd prefer to keep "perl6" than to switch to "perlsix"... unless we plan to say "perlsix" most other places as well.
22:52 pmichaud I don't even know who owns "perlsix.org"  :-P
22:52 pmichaud ah, it's diakopter++
22:53 plainhao left #perl6
22:53 masak +1 for keeping perl6
22:53 sorear +1
22:53 pmichaud anyway, I'll convert perl6 over to an organizational account in the next day or so.  I need to make sure we won't lose anything in the process, and I suspect hugme might need some tweaking
23:01 wallberg hi all! a question regarding Perl 6 objects: how are "attributes" stored internally in an object? one thing I like about Perl 5 is that I can bless either an arrayref or a hashref depending on my needs. I've found blessed arrays to be a little more memory efficient and quicker to retrieve data from, which can make a difference when using hundreds of thousands of objects... what is going on behind the scenes in a Perl 6 class?
23:02 masak wallberg: S12 has the full story, but...
23:02 masak wallberg: ...the default is an 'opaque object', the internals of which you're not supposed to care about.
23:03 masak wallberg: that said, hashes and other things are spec'd to work too as underlying attribute storage thingies.
23:04 wallberg masak: so an 'opaque object' is a computer science thing that schmucks like I shouldn't bother losing sleep over?
23:05 TimToady we will certainly be trying to optimize opaque attributes into very efficient storage
23:05 masak wallberg: the take-away point of it is, I believe, that there's no way to get at the attributes from outside the class except through the declared access methods.
23:06 TimToady which can also be heavily optimized in many cases
23:07 masak wallberg: if all you desire is a mental model, one can certainly think of the opaque object as a normal hash which one cannot get at directly.
23:07 wallberg masak: yup. Wikipedia: "In computer science, an opaque data type is a data type that is incompletely defined in an interface, so that ordinary client programs can only manipulate data of that type by calling procedures that have access to the missing information." http://en.wikipedia.org/wiki/Opaque_data_type
23:07 masak wallberg: though for optimization reasons, that might in actuality be the case.
23:08 masak wallberg: ooh, I wasn't aware there was a Wikipedia article about it :)
23:08 masak but yes, the idea behind opaqueness is encapsulation.
23:08 masak er, information hiding. er, something.
23:09 HarryS joined #perl6
23:10 wallberg TimToady: so access and memory storage efficiency can theoretically approach that of an array or even surpass it?
23:10 TimToady yes, depending on usage patterns
23:11 masak wallberg: jnthn++ just got a grant approved where he, roughly described, will turn attribute access from hash indexing into array indexing under the hood.
23:13 rgrau__ joined #perl6
23:15 rgrau_ left #perl6
23:15 HarryS left #perl6
23:15 wallberg masak: cool! in a little project I worked a year ago, I declared named constants in Perl 5 and interacted with an array object much like a hash object but with noticeable speed benefits. looking forward to see what a real programmer can produce in this context :-)
23:19 rgrau__ left #perl6
23:20 masak me too.
23:23 lue How do you match a set of brackets in a regex? In cases like embedded comments, where you don't know what the brackets are going to be.
23:23 rgrau__ joined #perl6
23:23 synth joined #perl6
23:24 azert0x left #perl6
23:24 masak lue: see STD.pm6, line 1045 :)
23:25 masak actually, the relevant parts are on lines 848 to 1066.
23:26 Sanitoeter left #perl6
23:27 TimToady the real work is done at line 501, where we derive a new language in which starter and stopper are appropriately defined
23:27 lue AAH!
23:29 lue I'm quite surprised that's not readily available. Seems to me it'd be a common thing you need to match.
23:29 masak packaging it up into a module shouldn't be too difficult.
23:29 rgrau__ left #perl6
23:30 masak but arguably not the responsibility of STD.pm6 :)
23:31 felipe left #perl6
23:31 lue something like  /<bracket a> [0..9,A..F]+ <bracket a>/  maybe, where 'a' helps identify which brackets are supposed to pair up.
23:32 TimToady lue: in general you also have to correctly match whatever is inside your brackets.  comments are special case; the general problem is much harder
23:35 masak lue: what you might be looking for is the concept of a circumfix operator.
23:35 TimToady circumfixes are also a special case
23:35 lue .oO(In any case, I'm certainly not putting that many lines of code in my code.)
23:36 lue rakudo: say "( hi )" ~~ / '(' [<!before ')'> .]+ ')' /
23:36 p6eval rakudo dc9900: OUTPUT«( hi )␤»
23:37 lue circumfixes are what I'm after, I'm sure. How to match them is my question :)
23:37 TimToady congratulations, you've invented Q.  now handled nested brackets and escapes.  :)
23:37 TimToady *handle
23:38 TimToady eventually you'll write the nibbler at line 432
23:38 * masak .oO( TimToady is smug because he's already stumbled upon all the hard problems we'll face in the next ten or so years )
23:39 TimToady if you want to parse ( hi ) where hi is an expression, then circumfix is fine.  otherwise, not
23:39 masak nod
23:39 lue I wonder how common this problem is. [Which would determine if it would go in core or in a module]
23:40 masak eventually there'll probably be an idiom for making a quoting construct for a sublanguage.
23:40 TimToady you can't just think of all these things as the same thing; it's crucial to know what language you're parsing inside, and how it relates (or not) to the language or languages outside
23:40 masak lue: don't worry too much about core-or-module.
23:40 prism joined #perl6
23:41 PerlJam lue: See Text::Balanced on CPAN  :)
23:41 lue .oO[ When I first thought of this problem, I kinda hoped \( and \) would work and dwim :) ]
23:42 TimToady not if the language inside is .*?
23:43 TimToady if you want that kind of behavior, you have to use (knowingly or not) something like nibbler
23:43 daemon left #perl6
23:44 TimToady I keep wanting to use the phrase "half-assed solutions", but that would not be polite.
23:44 lue I'm not quite sure I see all of these different cases [I'm new to regexes and grammars and such]. I should probably ask more specific questions when they need to be asked.
23:45 smash masak: i'll try to put some better colors in there
23:45 masak \o/
23:45 smash colomon: you're scripts ruined the server, hehe
23:46 * masak just fixed an embarassing bug in Yapsi wherein duplicate labels and insufficiently clever lookup caused the runtime to jump out of blocks without unrolling the stack
23:47 smash colomon: updated with mandrelbrot scripts http://gil.di.uminho.pt/users/smash/rakudo-bench.html
23:49 smash cya all tomorrow
23:49 smash left #perl6
23:54 wallberg left #perl6
23:57 dalek yapsi: c65b333 | masak++ | lib/Yapsi.pm:
23:57 dalek yapsi: [Yapsi] bumped SIC version
23:57 dalek yapsi:
23:57 dalek yapsi: Between releases, the SIC version is always the version number of the
23:57 dalek yapsi: upcoming release.
23:57 dalek yapsi: review: http://github.com/masak/yapsi/commit/c65b333b0927fc1fa2874abcbf3fa620a8b1d798
23:57 dalek yapsi: 96ca8f0 | masak++ | / (2 files):
23:57 dalek yapsi: [Yapsi] made labels globally unique
23:57 dalek yapsi:
23:57 dalek yapsi: Because they were only unique for each block, the label lookup (which
23:57 dalek yapsi: traverses the whole SIC) accidentally the whole call stack in some cases.
23:57 dalek yapsi: review: http://github.com/masak/yapsi/commit/96ca8f0cb30cebbaa1ee3acd6b05188679d5049d

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

Perl 6 | Reference Documentation | Rakudo