Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2010-09-05

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:04 justatheory left #perl6
00:05 [Coke] ~
00:08 justatheory joined #perl6
00:09 pjcj joined #perl6
00:16 svetlins joined #perl6
00:19 svetlins left #perl6
00:19 svetlins joined #perl6
00:22 svetlins left #perl6
00:22 svetlins joined #perl6
00:25 araujo left #perl6
00:25 svetlins left #perl6
00:26 svetlins joined #perl6
00:29 svetlins left #perl6
00:29 svetlins joined #perl6
00:29 alksentrs joined #perl6
00:31 KyleHa joined #perl6
00:31 svetlins left #perl6
00:31 KyleHa Hello #perl6!
00:32 svetlins joined #perl6
00:37 lue hello o/
00:37 svetlins left #perl6
00:38 KyleHa I see write access to the new Git repos that have been spawned from the old pugs repo.
00:38 KyleHa s/see/seek/
00:38 svetlins joined #perl6
00:39 TimToady have you a github account?
00:40 KyleHa Yes.  It is called 'kyleha'.
00:40 TimToady now I just have to figger out how to do it...
00:41 KyleHa If I knew, I'd help.  :)
00:42 KyleHa From here, there may be an 'Admin' button up near Watch and Fork:  http://github.com/perl6/specs
00:42 TimToady there's a switch context button
00:43 TimToady I believe I've done it
00:43 masak joined #perl6
00:43 KyleHa Yes!
00:44 masak hi, #perl6!
00:44 phenny masak: 04 Sep 14:18Z <isBEKaml> tell masak yapsi fails on recent version of rakudo though it works on older 2010.07 and .08 versions. -->bin/yapsi  -e 'say 42'
00:44 KyleHa Thanks, TimToady!
00:44 masak isBEKaml: thanks. will investigate.
00:44 colomon joined #perl6
00:45 masak moritz_++ # Pugs repository move
00:46 KyleHa moritz_++ # Agreed
00:46 masak Juerd++ # feather
00:46 colomon Juerd++ moritz_++
00:46 phenny colomon: 04 Sep 19:31Z <smash> tell colomon http://gil.di.uminho.pt/users/smash/rakudo-bench.html updated with new test scripts
00:46 colomon phenny: tell smash Yay!  And I just added another....
00:46 phenny colomon: I'll pass that on when smash is around.
00:47 lue why is the spectest repo called roast? [I expect some witty backronym here :)]
00:48 TimToady repo of all spec tests is only the first
00:49 KyleHa The announcement I saw called it 'spectests', so I was confused for a minute or two.
00:49 whiteknight joined #perl6
00:50 TimToady yes, but we've been speculating all day about a real name, both before and after that
00:50 * masak likes 'roast'
00:51 TimToady and I decided it was better to rename it before everyone starts programming to the old name
00:51 masak it's close to other test-related words, such as 'smoke'.
00:52 TimToady Really Obnoxious Anti-Subset Test
00:52 lue Refurbished Official Assimilation of Standard Tests
00:53 KyleHa What's wrong with the old name?
00:53 TimToady not tab friendly with specs
00:53 Getty then you could call it "Borg" ;)
00:53 KyleHa Can't argue with that.
00:54 Psyche^ joined #perl6
00:54 TimToady and I tend to cd to directores by unique substrings
00:54 lue .oO(I guess I'll give in to putting all my module code in a subfolder for now)
00:54 TimToady which is hard when one name is (nearly) a substring of the other
00:55 Patterner left #perl6
00:55 Psyche^ is now known as Patterner
00:55 TimToady and I thought it was high time to give the validation suite a (slightly) more official proper name
00:56 masak wow. interesting flood of newcomers earlier today.
00:56 lue .oO(you could've named it 'Repository of Tests' (RT) if you wanted to make a joke)
00:57 masak lue: that'd be "RoT", would it not? :)
00:57 TimToady and roast isn't a joke?
00:59 TimToady afk &
00:59 masak heating things so that they get a crispy surface is serious business, no joking.
01:01 masak at some point I will write a blog article about the inverse correlation between how long people remain on this channel, and the extent of their lack of grasp of English.
01:02 KyleHa I was thinking http://en.wikipedia.org/wiki/Roast_(comedy)
01:02 masak the underlying reasons probably aren't very funny. it's taxing to be on the channel without extensive English language skills. and not much to be done about that, except try to accomodate people.
01:04 lue I do notice that you don't get a lot of bad english here. Maybe it's time for one or two #perl6-[language code] channels?
01:05 lue rakudo: my $a = 3 #= hello␤ say "I'm alive"
01:06 p6eval rakudo ff5b4c: OUTPUT«===SORRY!===␤Whitespace character is not allowed as a delimiter at line 22, near " hello\n sa"␤»
01:06 lue methinks that's a bug.
01:06 masak lue: it's the ' ' after the '#='
01:06 meppl joined #perl6
01:07 masak std: #= hello
01:07 p6eval std 32123: OUTPUT«ok 00:01 113m␤»
01:07 masak I think that one has been reported.
01:08 masak lue: it's not that everone here has perfect English. but people with very limited bandwidth due to insufficient grasp of English tend to be short-lived, or to stay away altogether. I can think of numerous examples.
01:09 masak s/short-lived/short-lived on the channel/ # :)
01:10 dalek rakudo: c7f6f27 | kyleha++ | / (2 files):
01:10 dalek rakudo: spectests in git
01:10 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/c7f6f270a2545dbad015c4f1f4da81cfd97a5691
01:10 lue .oO(Half of me is a really lousy guy to talk to about problems here with English, considering I'm half American.)
01:11 lue masak: how is 'bandwith' and 'insufficient grasp of English' linked?
01:12 masak lue: for example: I can write in Chinese, but I can't do it as quickly as the ones on #perl-cn. nor can I read as quickly.
01:12 masak if I had a better grasp on Chinese, I'd be able to read and write faster.
01:12 risou joined #perl6
01:17 alksentrs Hello #perl6
01:17 masak alksentrs! \o/
01:17 lue hello alksentrs o/
01:17 alksentrs What does o/ actually mean?
01:18 masak it's a figure or a head and a waving arm.
01:18 masak s/or/of/
01:18 alksentrs "Hello"
01:18 masak or "Goodbye" :)
01:18 jhuni left #perl6
01:19 diakopte1 or a person swinging by one arm
01:19 alksentrs When I started reading the IRC logs, occasionally they were quite hard to follow (even though I'm a native English speaker)
01:19 diakopte1 join the club
01:20 masak heh
01:20 alksentrs The mixture of IRC terms, Perl guts and internet memes
01:20 alksentrs "lexpad"
01:20 masak alksentrs: I think I felt like that for the first four or so years.
01:20 masak alksentrs: oh oh! I can explain "lexpad" to you! :)
01:20 alksentrs It's the symbol table
01:20 alksentrs or something
01:20 masak aye.
01:21 alksentrs Is there a glossary?
01:21 masak alksentrs: my $a; my $b; { my $a } # how many lexpads do you count here?
01:21 alksentrs 2? (guess)
01:21 masak me too.
01:21 masak alksentrs: there's no glossary as far as I know. but the IRC logs sometimes underline words and give explanations.
01:22 alksentrs A Wiki page could be created
01:22 masak well volunteered!
01:22 masak and keeping it up-to-date will make sure you learn all the terms :)
01:23 alksentrs right...
01:23 masak :)
01:23 alksentrs I've written/writing a couple of Perl6 programs
01:23 masak great. how does it feel?
01:23 alksentrs fun
01:24 masak \o/
01:24 alksentrs I'm writing a little interpreter for an esoteric language
01:24 diakopte1 and that's a person drowning in quicksand
01:24 masak diakopte1: you should get paid for explaining Internet lore.
01:25 diakopte1 hm
01:25 alksentrs I ran into an issue w.r.t. parsing C-style integer literals
01:25 alksentrs Attempting to parse 0x0 would parse 0 as an integer, and then fail on the x0
01:25 alksentrs token int { $<dec> = <digit>+ | $<hex> = [[0x|0X] <xdigit>+] }
01:26 * diakopte1 wanders around github perl6.. then looks for some gui tool to use git
01:26 diakopte1 o_O TortoiseGit
01:26 masak alksentrs: try changing the order of those
01:27 diakopte1 masak:   std: 4 ?? !! 4
01:27 masak token int { $<hex> = [[0x|0X] <xdigit>+] | $<dec> = <digit>+ }
01:27 alksentrs I thought order didn't matter with |
01:27 alksentrs but did with ||
01:27 masak alksentrs: you're right, it doesn't.
01:27 masak alksentrs: but Rakudo doesn't have Real LTM yet.
01:29 Tene Yes, what masak said
01:29 alksentrs masak: It works! (I think)
01:30 * masak wonders idly if we'll see an "always put longest token first" idiom emerge in Perl 6 code
01:31 masak (1) it enhances readability
01:31 masak (2) it works against implementations that don't have LTM
01:31 lue would I just use @*ARGS to get a filename from the commandline?
01:31 ingy need some naming help
01:32 masak phenny: tell isBEKaml negatory on the Yapsi fail. repeat, negatory on being able to reproduce bin/yapsi -e 'say 42' fail on recent Rakudo. over.
01:32 phenny masak: I'll pass that on when isBEKaml is around.
01:32 masak lue: that, or MAIN.
01:33 lue I think I'll have fun with @*ARGS though :)
01:34 alksentrs Question: If you've caught an exception, how do you print a backtrace? (I've managed to get either infinite looping or error message only)
01:34 masak alksentrs: try/CATCH is seriously b0rk. :(
01:35 alksentrs masak: Ah. Never mind.
01:35 masak rakudo: try { no-such-sub(42) }; say $!
01:35 p6eval rakudo ff5b4c: OUTPUT«Could not find sub &no-such-sub␤»
01:35 masak rakudo: try { no-such-sub(42) }; say $!.backtrace
01:35 p6eval rakudo ff5b4c: OUTPUT«Method 'backtrace' not found for invocant of class 'Perl6Exception'␤  in main program body at line 22:/tmp/wB7GnLlSjG␤»
01:35 * masak submits rakudobug
01:36 masak ingy: go right ahead.
01:36 sorear hello #perl6
01:36 diakopte1 ahoi
01:37 masak hi sorear
01:38 sorear diakopte1: what's so suprising about 'niecza: say 3'
01:38 diakopte1 I didn't know you/moritz made it work on my vps
01:39 diakopte1 (yet)
01:39 alksentrs left #perl6
01:41 KyleHa left #perl6
01:45 risou left #perl6
01:45 sorear diakopte1: huh, I thought p6eval was running on moritz_'s personal equipment
01:46 diakopte1 sigh
01:46 * masak has a weird mental image reading that
01:46 * sorear attempts to resolve
01:47 lue can I change the error message that pops up with MAIN ?
01:47 masak rakudo: sub MAIN($foo) {}
01:47 p6eval rakudo ff5b4c: OUTPUT«Usage:␤/tmp/9eJ3nshzSH foo␤»
01:47 masak lue: that one?
01:48 lue yes. "Usage: \n -e '...' x y z" isn't optimal
01:49 araujo joined #perl6
01:49 masak rakudo: sub MAIN($foo) {}; sub MAIN_HELPER($retval, $MAIN?) { say "OH HAI" }
01:49 p6eval rakudo ff5b4c: OUTPUT«OH HAI␤»
01:49 masak lue: ^
01:50 lue :D
01:51 masak the answer was in src/core/MAIN.pm, found by doing "ack -Q 'Usage: ' src/" #teachamantofish
01:52 lue .oO(too bad I could never get ack working on my remote server...)
01:52 masak grep would work just as well in this case.
01:53 lue I especially like the part where stray arguments get stuffed into remaining parameters
01:53 crythias left #perl6
01:55 sorear git-grep is better for rakudo anyway
01:55 sorear and I think it comes with git
01:56 masak sorear++ # git grep
01:56 masak didn't know about that one.
01:58 lue rakudo: sub MAIN($foo) {}; sub USAGE($retval, $MAIN?) { say "OH HAI" }
01:59 p6eval rakudo ff5b4c: OUTPUT«Not enough positional parameters passed; got 0 but expected between 1 and 2␤  in 'USAGE' at line 22:/tmp/GGFB9WPtlP␤  in 'MAIN_HELPER' at line 6917:CORE.setting␤  in main program body at line 1:/tmp/GGFB9WPtlP␤»
01:59 lue rakudo: sub MAIN($foo) {}; sub USAGE { say "OH HAI" }
01:59 p6eval rakudo ff5b4c: OUTPUT«OH HAI␤»
01:59 masak oh, indeed.
01:59 masak USAGE, not USAGE_HELPER.
01:59 masak lue++
02:02 sorear hugme: show mu
02:02 hugme sorear: sorry, I don't know anything about 'mu'
02:02 sorear hugme: show nqp
02:02 hugme sorear: sorry, I don't know anything about 'nqp'
02:02 sorear hugme: show nqp-rx
02:02 hugme sorear: the following people have power over 'nqp-rx': P⁣erlJam, T⁣imToady, [⁣particle], c⁣olomon, j⁣nthn, m⁣asak, m⁣oritz_, p⁣michaud. URL: http://github.com/perl6/nqp-rx/
02:03 lue I love Perl 6! It's the only language I've seen with such impressive commandline argument handling.
02:04 diakopte1 THIS JUST IN: programmers flock to Perl 6... DEVELOPING...
02:06 diakopte1 tough crowd
02:06 masak diakopte1: ok, is that a meme or something? I saw "DEVELOPING" in you twitter feed as well.
02:06 masak s/you/your/
02:06 diakopte1 oh, just a variant of crythias' joke I retweeted, yeah :)
02:07 lue .oO(No matter how many times I look at Go, I just can't seem to like it.)
02:07 masak I get it. it would be more funny if I had heard it before, though :)
02:07 masak lue: I think it looks OK. it would be fun to try to write an LTM grammar engine in it.
02:09 sorear lue: Perl has had built-in argument processing for ages and ages :)
02:10 tylercurtis Go has some annoyances (like the lack of a nice build system and the total lack of any capability of dynamic loading).
02:10 tylercurtis But it also is pretty nice in some ways.
02:11 lue For one thing, there's no PPC compiler, so I can't even run a Go program :)
02:11 jjore joined #perl6
02:11 * lue wonders if an OS in Perl 6 is possible (with a perl6 frontend for gcc of course)
02:12 Italian_Plumber joined #perl6
02:18 jhuni joined #perl6
02:19 sorear really? no ppc compiler?
02:19 sorear I don't beleive that
02:22 lue Well, their gccgo program should. Their custom-built family of compilers doesn't.
02:22 sorear oh right
02:22 sorear you like to ignore gccgo
02:26 lue [ like I'd expect them to take the time to build a compiler for PPC in the first place :) ]
02:28 ingy masak: got it all figured out. thx
02:29 masak \o/
02:30 whiteknight left #perl6
02:30 lue http://gist.github.com/565675 typing    perl6 file.p6 INPUTTEXT    doesn't put INPUTTEXT in $input. I think it has something to do with giving $input a shortname.
02:31 masak lue: if you use named parameters, you have to specify named options on the command line.
02:32 lue alright.
02:48 azert0x left #perl6
03:04 lue How can I check if a module exists if I do something like eval("A::$name") ? Is there some cool trick, or would I have to live with try/catch ?
03:06 masak rakudo: module Exists {}; say eval("Exists").WHAT; say eval("DoesNotExist").WHAT
03:06 p6eval rakudo c7f6f2: OUTPUT«Method 'WHAT' not found for non-object␤  in main program body at line 22:/tmp/pLDHBKcHMz␤»
03:06 masak oh right.
03:06 masak rakudo: class Exists {}; say eval("Exists").WHAT; say eval("DoesNotExist").WHAT
03:06 p6eval rakudo c7f6f2: OUTPUT«Exists()␤Failure()␤»
03:07 masak rakudo: class Exists {}; say eval("Exists") !~~ Failure; say eval("DoesNotExist") !~~ Failure
03:07 p6eval rakudo c7f6f2: OUTPUT«1␤0␤»
03:08 masak rakudo: sub itExists($class) { eval($class) !~~ Failure }; class Exists {}; say .&itExists for <Exists DoesNotExist>
03:08 p6eval rakudo c7f6f2: OUTPUT«1␤0␤»
03:10 masak bbl &
03:10 masak left #perl6
03:10 lue arigato, masak-san
03:16 Italian_Plumber left #perl6
03:28 BillN1VUX joined #perl6
03:39 jacob_applebaum left #perl6
03:41 masak joined #perl6
03:41 meppel joined #perl6
03:42 jacob_applebaum joined #perl6
03:45 meppl left #perl6
03:51 BillN1VUX left #perl6
03:51 meppel is now known as meppl
03:53 vanadium joined #perl6
03:58 BillN1VUX joined #perl6
04:06 envi^home joined #perl6
04:06 Chillance_ left #perl6
04:09 meppl left #perl6
04:22 plobsing left #perl6
04:25 BillN1VUX left #perl6
04:26 BillN1VUX joined #perl6
04:28 Guest23195 joined #perl6
04:30 gfx joined #perl6
04:32 masak so, I was looking at http://samizdat.cc/cyoa/ -- which is a case of someone knowing how to create beautiful diagrams to show data.
04:32 BillN1VUX left #perl6
04:32 masak and I was thinking about how to do this more easily.
04:32 TimToady thinking is dangerous
04:32 masak can't help it. :)
04:33 masak and I just spent 15 minutes writing up the first diagram -- the one with all the pages in different colors -- in a yet-unwritten diagram DSL.
04:33 masak http://gist.github.com/565752
04:33 mfollett joined #perl6
04:34 masak I've cheated a bit with the colors of the different texts, just not to overcomplicate things. likely the margins and things like that are wrong, too. but the general structure is there, both of the diagram and of my DSL.
04:34 masak imagine having this tool. :)
04:35 BillN1VUX joined #perl6
04:36 masak basically, it's a way to map an object hierarchy onto the elements of an SVG file, not having to care too much about lengths and coordinates.
04:37 lue masak: I couldn't get the first link working.
04:37 Tene the samizdat page won't load for me :(
04:38 masak hm. me neither, now.
04:38 masak maybe we slashdotted it :/
04:38 Tene google has a cache of it, but that won't load either
04:39 Tene as it's waiting for the cached page, according to my status bar?
04:39 Tene http://shorl.com/trabrihyhibiko -- google cache
04:39 masak I'll make a screenshot for you.
04:39 ruiwk joined #perl6
04:40 TimToady when is the buf patch showing up, and does it do buf32?
04:40 masak it looks like this: http://masak.org/carl/cyoa-table.png
04:40 TimToady (have a rosettacode problem that could sure use it)
04:41 masak TimToady: sorry, are you expecting a buf patch from me? :/
04:43 TimToady just thought you might know somethin' about it :)
04:43 masak could you be a bit more specific about what it is you expect showing up?
04:43 masak if it's the 'buf' type with a small-letter 'b', then you might have to wait a while :/
04:44 TimToady well, what I'd really like is compact arrays...
04:44 masak same here, along with a bit of S09 goodness...
04:44 TimToady that and oh about 30 other things
04:46 masak we're all at the mercy of the implementors, and their ability to push out features.
04:48 TimToady it's just a bit hard to debug the Hofstadter-Conway $10,000 sequence when it takes an hour of CPU to get to the segfault
04:48 masak that's why we need more performance. :)
04:49 lue [I'm guessing it's not this simple, but] for a module's Makefile, do you just need to put it in one of the locations in @*INC ?
04:50 Tene masak: Interesting sketch.
04:50 masak lue: you can put the Makefile anywhere you want.
04:50 masak lue: but it has to know where to find the files to make.
04:51 masak Tene: thanks. I think I will eventually build a module that does that. might be a while, though.
04:51 sorear TimToady: I have an optimizer, can I help?
04:52 lue aah, bad grammar on my part. $_ = the module
04:52 Tene masak: that kind of ties into the whole tree transformers, action methods, tree matching grammars, etc. area.
04:52 TimToady ooh, it got up to 2**16, maybe I've licked the segfault; needs to get up to 2**20
04:52 masak Tene: aye.
04:52 masak Tene: which is another reason it'd be fun to explore.
04:53 masak Tene: also, it'd be an opportunity to toy with a cusom metaclass.
04:53 Tene Yes.
04:53 TimToady the only way to get rid of the segfaults was to banish all range and series and for loops, and use loop () {...}
04:53 masak iterators are evil :)
04:53 TimToady looks like it's handling the array with a million entries this time
04:54 masak someone should do a one-week project in which a lot of different Perl 6 loops and series forms get compiled down to simple while loops and assignments in C. :)
04:54 lue .oO(it's likely a bit more than putting modules in the first location in @*INC and the program in the right bin/ folder)
04:54 sorear masak: You look dangerously close to rewriting dot
04:54 masak sorear: I've toyed a bit with dot.
04:54 diakopte1 masak: you is up late
04:55 masak diakopte1: yes. :)
04:55 masak been shifting my waketimes all week. will soon fix them down again on something I like.
04:57 diakopter joined #perl6
04:57 masak sorear: IIUC, dot is exclusively for making graphs. my little language is more for laying out SVG objects in general.
04:59 masak that said, I've sometimes been wanting something very much like dot, too.
04:59 masak would proabbly be interesting to hook up inline dot to Perl 6 as well.
05:00 Tene graphviz is great. I've done a lot with graphviz.
05:00 Tene masak: you'd really like http://search.cpan.org/~lbrocard/GraphViz-2.04/lib/GraphViz/Regex.pm if you haven't seen it before.
05:01 * masak hasn't
05:01 Tene I have a little cgi that runs it up at: http://allalone.org/cgi-bin/regex-graph
05:01 masak oh, that one! yes, I've seen that.
05:01 masak acme++
05:01 sorear TimToady: Why is it that, after my @*foo; my int @*bar; ... @*foo[0] := @*foo[3] works, but @*bar[0] := @*bar[3] doesn't?
05:02 Tene I rendered something like that for STD.pm a year or two ago.
05:04 lue rakudo: class Foo {}; my $a = "Foo"; say eval($a) !~~ Failure
05:04 p6eval rakudo c7f6f2: OUTPUT«1␤»
05:06 lue however, replacing $a with "use A::B" results in eval($a) being a Failure.
05:06 TimToady sorear: are you speakin' of rakudo?
05:06 lue Is it some weird thing with eval() that's not letting "use A::B" work ?
05:08 Sec left #perl6
05:09 masak rakudo: class A::B {}; my $a = "A::B"; say eval($a) !~~ Failure
05:09 p6eval rakudo c7f6f2: OUTPUT«1␤»
05:09 masak lue: worksforme.
05:09 sorear lue: please read perlmod and perlsub
05:11 Trashlord left #perl6
05:11 lue what're perlmod and perlsub?
05:11 sorear perl 5 documentation
05:11 sorear 'man perlmod' on any Unix after installing Perl
05:12 sorear otherwise see perldoc.perl.org
05:12 lue I remember from a distant conversation that eval() was the only way to use a module you didn't know the name of. Is that true?
05:12 sorear no, string require will also do the job
05:13 masak lue: http://perldoc.perl.org/perlmod.html http://perldoc.perl.org/perlsub.html
05:13 sorear also see S01:0027
05:14 sorear despite its position, this paragraph is one of the most overlooked parts of the spec
05:14 diakopter :)
05:14 masak I know about it, but I don't give it much weight.
05:15 Trashlord joined #perl6
05:15 masak for example, S03 says nothing about how to negate strings.
05:15 diakopter hum, the S01.html#line_0027 anchor link doesn't seem to work
05:15 masak in Perl 5, -$str gives '-' . $str
05:15 masak I highly doubt that's the case in Perl 6.
05:16 sorear diakopter: does S01:27 work?
05:16 TimToady maybe we should add to that "...except for the places where Perl 5 is obviously completely bogus."
05:16 diakopter yup
05:16 masak TimToady: yeah, that'd make it less ambiguous :P
05:16 tylercurtis rakudo: say (-'12foo').perl;
05:16 p6eval rakudo c7f6f2: OUTPUT«-12␤»
05:16 diakopter I mean, sorear, yup
05:17 sorear If we allowed leading dashes in identifiers that rule wouldn't be needed
05:18 sorear It exists, AFAICT, mostly to allow use Foo -option => 2;
05:18 sorear which a few legacy modules *cough Tk* want
05:18 masak oh, that's why :/
05:18 sorear |("-foo" => 2) gets a little annoying after a while
05:19 lue perl(mod&sub) will tell me all I want to know, and more, right?
05:19 masak lue: when you ask such a question, what to you fashion the answer to be? :)
05:19 sorear lue: It will tell you everything about "use" but not much about "class"
05:19 sorear ignore the stuff about Exporter, that's been replaced
05:23 lue I'm sorry. It's nighttime here, and I'm getting impatient, so I have this "I WANT AN ANSWER NOW!" attitude, which I'm trying to hide. [ Being told to read two fairly large documents to get an answer doesn't help :) ]
05:23 masak hugme: hug lue
05:23 * hugme hugs lue
05:24 masak lue: http://catb.org/~esr/faqs/smart-questions.html :)
05:24 mfollett left #perl6
05:25 sorear lue: "I WANT AN ANSWER NOW" and "the use of modules in Perl 6 is not very Perl 6" are incompatible attitudes
05:26 masak did lue ever say the latter?
05:27 sorear 16:45 CDT
05:28 Trashlord left #perl6
05:28 Sec joined #perl6
05:28 sorear http://irclog.perlgeek.de/perl6/2010-09-04#i_2785572
05:29 masak ah, just found it.
05:29 lue I think today I've been trying to do too many things I shouldn't need to be doing :)
05:29 constant left #perl6
05:30 constant joined #perl6
05:30 constant left #perl6
05:30 constant joined #perl6
05:32 Tene lue: I'd still like to see a discussion on p6l about /.../Foo::Bar.pm
05:33 sorear I oppose it, fwiw
05:33 masak me too.
05:33 sorear for entirely pragmatic reasons
05:33 masak aye.
05:33 sorear @*INC searches are expensive
05:34 sorear doing twice as many for aestetic reasons is untenable
05:34 masak if someone wants that, let them override the module loader.
05:34 masak sorear: twice as many? I count more. for each new path component, you have to check if the rest of the components exist in the colon form.
05:34 masak that's O($components)
05:35 sorear masak: Oh, I assumed it was all-or-nothing
05:35 Tene masak: it depends on exactly what you allow.
05:35 masak right.
05:35 sorear also Foo::Bar::Baz.pm is illegal on most filesystems, even classical Unix
05:35 lue I don't know what it is, I just can't seem to get a handle on modules :/
05:36 Tene I don't expect that just allowing :: to replace / in any module name is going to be the right answer, but I wouldn't be surprised if something good came out of a discussion that started there.
05:36 Tene I also wouldn't be surprised if nothing of note came out of it, though. :)
05:36 masak lue: start simple. all 'use A::B' does is find A/B.pm6 for you.
05:40 Tene lue: what are you trying to do with modules that you can't do?
05:40 sorear lue's greatest problem and greatest virtue is that he doesn't take "you're doing it wrong" for an answer
05:43 cognominal joined #perl6
05:45 Trashlord joined #perl6
05:52 Trashlord left #perl6
05:57 masak I'm preparing for sending in my code patches for GSoC. it is with some pride I note how many non-Buf commits I've made to the spec during the summer.
05:58 sorear Pride?
05:59 TimToady you didn't know he was a lion?
05:59 masak is that not the word? the noun form of "proud"? :)
05:59 masak 8 Buf-related commits to the spec, 8 other commits.
06:00 cognominal left #perl6
06:00 cognominal joined #perl6
06:01 Trashlord joined #perl6
06:02 moritz_ good morning
06:02 masak mo', mo'
06:03 Tene masak: yes, that's the right word.
06:03 lue good morn' moritz_ o/
06:05 dalek niecza: 3e8d824 | sorear++ | lib/Cursor.cs:
06:05 dalek niecza: [nrx] use Take mechanism for extra cursor returns
06:05 dalek niecza: review: http://github.com/sorear/niecza/commit/3e8d8249615a7666dd950e1d89a37da200927cbf
06:05 dalek niecza: ebb3662 | sorear++ | / (3 files):
06:05 dalek niecza: [nrx] Expose basic nrx functionality to CgOp
06:05 dalek niecza: review: http://github.com/sorear/niecza/commit/ebb3662856339891aa1856a4040b33d9232ddb06
06:06 Trashlord left #perl6
06:08 Trashlord joined #perl6
06:12 masak wow. I download *all* of perl6/roast, and it takes a fraction of the time it usually took to update t/spec :)
06:14 lue afk and goodnight o/
06:14 masak 'night, lue
06:15 moritz_ is perl6/roast the new spectest suite?
06:16 TimToady ayup
06:16 TimToady many backronyms welcome
06:17 TimToady repo of all spec tests is the first
06:17 moritz_ really obsessive, always stupid tests
06:17 TimToady many puns also available
06:18 moritz_ Perl 6 - pun -driven development
06:18 TimToady really obnoxious anti-subset tests
06:19 masak repo official although somewhat turgid
06:19 TimToady ruby obviously ain't so trippin'
06:19 masak :D
06:19 masak hm, meant 'turbid'...
06:19 moritz_ sounds like frech word order (masak's "repo official")
06:20 masak moritz_: or just no verb. :)
06:20 TimToady rakudo only apes sincere truth
06:20 masak hey! :)
06:20 f00li5h joined #perl6
06:21 masak I mean, ook ook!
06:21 TimToady carpe diem: only one complaint per day
06:21 masak ETOOFEWDAYS
06:22 masak http://samizdat.cc/cyoa/ is back up!
06:22 f00li5h left #perl6
06:22 f00li5h joined #perl6
06:23 TimToady roast only almost seems terrific
06:23 masak moritz_: I made a sketch for a DSL this morning: http://gist.github.com/565752 is a recipe for the first diagram (third image) on http://samizdat.cc/cyoa/ -- maybe you have some views on such a DSL.
06:24 TimToady rapid online answers seem trite
06:25 cognominal really only another stupid testsuite
06:25 TimToady reliable official assertions sometime tomorrow
06:26 masak ropes of all sizes, together
06:26 TimToady replicable ontology and sure thing
06:27 TimToady rants over any stupid task
06:27 masak :)
06:27 gfx left #perl6
06:28 TimToady I think roast will do.  :)
06:28 TimToady most importantly, it starts with a different letter
06:29 masak respect others' answers, so tough
06:29 TimToady test harness could be renamed "rotisserie" or some such
06:29 sorear roast: it's what make spectest does to CPUs
06:31 masak ooh! and some people may have noticed how I cheated and didn't include the 'pages' thing on the left in http://gist.github.com/565752 -- I skipped it because it was too hard to do declaratively. I now realize the positioning of those should be done with action methods! \o/
06:31 masak and perhaps inline code blocks is a non-bad idea too.
06:33 ruiwk left #perl6
06:37 mathw o/
06:37 masak \o
06:41 masak could an &exists sub be written in pure Perl 6? it can't, right? because at the point the arguemnt is sent in, it has already evaluated to the hash value (which may or may not exist), and the info on the key is gone.
06:42 moritz_ one could try to introspect the returned value for a WHENCE closure that points to a hash... no idea if that works
06:43 masak up until a few moments ago, I've been wanting &exists just as it is in Perl 5. but now that I realize how magical it is, I might appreciate more the need for other solutions.
06:44 masak still don't like adverbs very much, though.
06:44 f00li5h left #perl6
06:44 masak if you ask me, 'if %my-hash-with-a-long-name<and>[100]<long><key><accesses> :exists' is end-weighted in a bad way.
06:45 * diakopter starts yet another rerererererererererererewrite
06:45 masak compare 'if exists %my-hash-...'
06:45 TimToady point of the :exists/:deletes adverb is it highjacks subscript notation for, say, multidimensional subscripts
06:45 masak I don't grok what you mean by that.
06:45 TimToady otherwise we need some other way to treat a slice subscript as first class
06:46 Guest23195 left #perl6
06:46 masak that's basically what &exists needs to do, one way or the other, no?
06:46 TimToady how do you delete @array[42; *; 0..5]?
06:46 masak and &delete, too.
06:47 masak right. the magical part of both subs is that they expect the evaluation of the argument to be delayed.
06:47 masak which it isn't.
06:47 TimToady and an adverb can modify the last operation to be 'en passant'
06:47 TimToady otherwise they have to be macros
06:48 masak couldn't 'exists' and 'delete' just be macr... what TimToady said.
06:48 TimToady that's essentially what they are in Perl 5
06:48 Tene masak: you could write an 'exists' macro
06:48 masak I think my stance now is that we should keep those macros for Perl 6.
06:48 Tene oh, he said that
06:49 masak because of people like me, who would otherwise get them through a pragma.
06:49 TimToady I'm sure that would make many p5 programmers happy, or less unhappy
06:50 * moritz_ feels like a p5 programmer today
06:50 Ross joined #perl6
06:50 * TimToady looks for his pajama top, and realizes he wore it all day
06:50 BillN1VUX left #perl6
06:51 masak just as I like to have the choice between prefix:<++> and postfix:<++> even when the evaluation order doesn't matter, I'd like the choice between &exists and :exists
06:51 f00li5h joined #perl6
06:52 BillN1VUX joined #perl6
06:52 TimToady well, if you can figure out what .[stuff]:exists translates to, you're home free, give or take
06:53 masak :)
06:53 masak "Perl 6: it looks easy, but..."
06:53 mathw then you just need to implement macros in Rakudo
06:55 masak tempting...
06:57 Ross left #perl6
06:57 Ross joined #perl6
06:58 sorear cheat
06:59 sorear allow macros - that are written in NQP-rx in Perl6::Actions in the form of a conditional in term:name
06:59 * diakopter growls at whoever deleted my ToJS.pm from std's dir
06:59 sorear or is that term:identifier, I can't remember which is which
06:59 diakopter now I can't even find a copy
06:59 moritz_ diakopter: locally revert 197a3b4569dd8485c1c77aaf110462718a42ff70
06:59 sorear diakopter: that would probably be me.  I removed all traces of js-sprixel
07:00 diakopter moritz_: i don't use git (yet)
07:00 moritz_ diakopter: then you won't have fun with src/perl6/ anymore anyway
07:00 moritz_ lives now in http://github.com/perl6/std/
07:00 diakopter not yet
07:01 moritz_ speaking of which... we need a whole bunch of new dalek monitoring targets
07:01 diakopter found a copy
07:02 moritz_ perl6/{perl6.org,modules.perl6.org,mu,roast,std,specs}
07:14 masak nom /
07:14 masak &
07:14 masak left #perl6
07:22 zulon joined #perl6
07:23 * TimToady attempts to use his pajamas as intended
07:23 TimToady &
07:25 ruiwk joined #perl6
07:26 sorear apparently ok $thing-that-should-be-0, 0, "blah blah" is not a valid test
07:26 moritz_ it is not
07:26 moritz_ because ok() expects only 2 args
07:26 moritz_ did you mean to use is() instead?
07:26 sorear yes ;)
07:27 sorear niecza doesn't know to carp on excess args yet
07:27 sorear so I just got a failure (?0 === False)
07:27 sorear and was baffled
07:28 szabgab joined #perl6
07:28 masonkramer_ left #perl6
07:28 tylercurtis left #perl6
07:29 drbean left #perl6
07:29 rbuels left #perl6
07:29 moritz_ understandable
07:29 tylercurtis joined #perl6
07:30 drbean joined #perl6
07:30 justatheory left #perl6
07:30 ruiwk hi
07:30 gabiruh joined #perl6
07:30 moritz_ good morning
07:30 ruiwk how i gonna try the code in the perl6 pdf file in linux
07:30 masonkramer joined #perl6
07:31 moritz_ you store it in a file
07:31 moritz_ and run  perl6 file.pl
07:32 ruiwk i type using ?
07:33 moritz_ sorry, I don't understand the question
07:33 ruiwk i need sth like notepad or other ?
07:33 moritz_ you need a text editor, yes
07:33 moritz_ like gedit
07:33 moritz_ kwrite
07:34 ruiwk and save it as .pl file
07:34 moritz_ right
07:34 ruiwk padre is it avaiable for perl6?
07:34 moritz_ yes, that too
07:35 ruiwk moritz:thx very munch
07:35 ruiwk i going to install padre 1st
07:35 moritz_ bbl
07:36 zulon left #perl6
07:42 rbuels joined #perl6
07:42 Trashlord left #perl6
07:43 Trashlord joined #perl6
07:45 dalek niecza: 6652b77 | sorear++ | / (2 files):
07:45 dalek niecza: [nrx] Support exhaustion of match lists
07:45 dalek niecza: review: http://github.com/sorear/niecza/commit/6652b77347c10e4f8c1be347e928a14b9d7d1bfc
07:45 dalek niecza: 605deee | sorear++ | / (3 files):
07:45 dalek niecza: [nrx] Expose backtracking and labels to cgop
07:45 dalek niecza: review: http://github.com/sorear/niecza/commit/605deee1f25ff1b097bde00672dff6698cdd9814
07:54 rbuels left #perl6
07:56 _jaldhar joined #perl6
07:57 jaldhar left #perl6
07:58 thepler joined #perl6
07:59 rbuels joined #perl6
08:02 tylercurtis left #perl6
08:03 xinming left #perl6
08:03 xinming joined #perl6
08:15 ruiwk how to test is it perl 6 is installed in my system ?
08:16 ruiwk coz i try the hello world code and get error
08:18 sorear please say in more detail what you are doing and what happens
08:19 ruiwk i use Padre ide to try the code
08:19 ruiwk i type
08:20 ruiwk use v6;
08:20 ruiwk say "hello";
08:20 ruiwk and save it as .pl file
08:20 ruiwk run it
08:21 sorear why are you using padre?
08:21 ruiwk and get error state tat perl v6.00 is requires--this is onlyv5.10.1
08:21 sorear how are you running it?
08:21 sorear you need to run it with Perl 6, not Perl 5.10.1
08:22 ruiwk just press the play button in the ide
08:22 sorear padre is a Perl 5 ide
08:22 ruiwk ooo
08:23 ruiwk i i try to install the rakudo star also
08:23 sorear there might be some way to get it to use Perl 6 for running, but I'm not the one to ask
08:23 sorear seen azawawi
08:23 aloha Sorry, I haven't seen azawawi.
08:23 ruiwk ok thx
08:24 sorear until someone tells you, you should use perl6 from the command line
08:24 sorear perl6 <full path to where you saved the file>
08:29 colomon I think there is a way to get padre to run Perl 6 files.  But I forget what it is.  (Played with padre for about ten minutes sometime last year...)
08:30 * diakopter just wrote a reader (in C#) for a custom (not yet committed) serialization format for std
08:30 sorear not JSYNC? :(
08:31 diakopter nah that's too complex
08:33 diakopter and nih
08:36 diakopter now to strip down the old sprixel.pl to emit this format
08:38 diakopter my ToJS.pm emitter for std was scads (eyeballed) faster than the yaml one(s)
08:38 diakopter this new format is much more compact, and should be more efficient to emit as well
08:39 sorear how does it stack up to the Storable emitter?
08:39 diakopter no idea
08:39 risou joined #perl6
08:39 diakopter never tried it
08:40 * diakopter wonders if this is still the right interface:  STD->parse($s, actions => 'Actions', setting => $setting)->{'_ast'}
08:41 sorear yes
08:41 diakopter thanks :)
08:41 sorear although I'd recommend against using Actions if you can avoid it
08:41 diakopter oh?
08:41 diakopter what should be used
08:41 sorear STD->parse($s, setting => $setting)
08:42 diakopter k
08:42 sorear Actions takes one parse tree and turns it into a slightly different parse tree
08:42 diakopter $setting is CORE, right?
08:42 sorear the only real "value added" is that operands become children of binops instead of siblings
08:43 diakopter oh; I like that added value
08:43 sorear at the cost of being fairly slow (adds 10-20% to parse time) and having bitten me many times
08:43 sorear bug-wise
08:43 diakopter oh; good to know; thanks
08:43 lasse_ joined #perl6
08:44 sorear \o/ regexes work again under the new niecza parser engine
08:44 * diakopter wonders how big the output of STD in this format will be
08:44 sorear (regressed quite a bit, but still)
08:45 diakopter how big is STD in Storable
08:45 sorear 15MB
08:45 diakopter ah; tiny
08:45 diakopter compared to yaml
08:45 diakopter which was in the hundreds of MB iirc
08:50 dalek niecza: ce9e29e | sorear++ | / (5 files):
08:50 dalek niecza: [nrx] compile /literalstring/
08:50 dalek niecza: review: http://github.com/sorear/niecza/commit/ce9e29ef244fa7264297e5db2c2aae06acdb9786
08:50 dalek niecza: 066f98c | sorear++ | / (3 files):
08:50 dalek niecza: [nrx] implement /a||b/ form
08:50 dalek niecza: review: http://github.com/sorear/niecza/commit/066f98cc2cd377b88e90abab1b951dfad0b4dd39
08:51 diakopter sorear: thanks tons for making (and letting me help you make) std windows-friendly
08:51 kuzuha left #perl6
08:54 BillN1VUX left #perl6
08:54 BillN1VUX joined #perl6
09:25 azawawi joined #perl6
09:25 azawawi hi
09:25 azawawi sorear: ping
09:28 sorear azawawi: pong
09:30 azawawi sorear: i ran into a problem installing S:H:P6 that re-uses cpan STD.
09:30 azawawi sorear: apparently some old files are still there from old version  (e.g. uniprops)  and that breaks tests
09:30 azawawi sorear: s/version/versions
09:31 sorear if I see the maintainer of S:H:P6 around, I'll relay that.
09:32 azawawi :)
09:32 azawawi im the maintainer of it.
09:34 azawawi sorear: im thinking of removing STD old files on re-installation... is it wise?
09:34 azawawi sorear: especially *.pmc and uniprops
09:34 Mowah joined #perl6
09:36 azawawi sorear: an example of the failure since CursorBase finds uniprops in the root before the data directory. http://www.cpantesters.org/cpan/report/8409438
09:37 masak joined #perl6
09:37 sorear do I look like #toolchain to you
09:37 sorear I am not the person to ask about CPAN subtleties
09:37 sorear also, I'm half asleep
09:37 azawawi sorear: sorry :)
09:38 * azawawi fixes it
09:38 azawawi left #perl6
09:38 * sorear out.
09:44 dalek niecza: 9cf770c | sorear++ | / (4 files):
09:44 dalek niecza: [nrx] Reimplement quantifiers
09:44 dalek niecza: review: http://github.com/sorear/niecza/commit/9cf770cbe1d133a22ae6423ca1b0e0f580efd7c5
09:54 rhebus joined #perl6
09:54 rhebus morning
09:55 masak o/
09:55 rhebus most of the perl6-examples don't have very good docs explaining what they do. perl6-examples/99-problems/P01-scottp.pl has a good example; does anyone mind if I start filling in similar docs for other examples?
09:56 rhebus seems like perl6-examples has been somewhat unloved in terms of recent commits
09:56 rhebus but I don't want to tread on anyone's toes
09:56 masak rhebus++ # I say go right ahead
09:57 masak in this world, comments and documentation are scarce resources.
09:57 rhebus that's what I'm noticing
09:57 rhebus I started learning perl 6 properly yesterday
09:57 rhebus and it's not easy
09:58 masak nod
09:58 rhebus which brings me to a second question: perl6-examples/99-problems/P01-scottp.pl has some pod in it. Is perl 6 pod the same as perl5 pod?
09:58 masak no.
09:58 rhebus or is there anything I need to know before adding pod?
09:58 masak it's close, but not the same.
09:59 masak there's no =cut, for one thing.
09:59 masak you can write things with =begin TAG/=end TAG
09:59 masak or =for TAG
09:59 masak or just =TAG
09:59 rhebus hmm, perl6-examples/99-problems/P01-scottp.pl has =cut. Does it need updating? Is there somewhere I can learn p5pod -> p6pod reasonably quickly?
10:00 rhebus and how do I view pod in a p6 script?
10:01 masak you're a couple of months early :)
10:01 masak I'm planning to do grant work on exactly this.
10:01 Trashlord left #perl6
10:01 rhebus is =cut in p6 pod harmful? should I cut it out? (it's not necessary for p6 pod parsers in perl6-examples/99-problems/P01-scottp.pl, since it's at the end of the file)
10:02 masak I actually don't know how a conformant Pod parser should treat =cut. it's a good question.
10:02 masak don't think S26 brings that up.
10:02 rhebus actually, the =cut confuses p5pod, i think I'll dike it out
10:02 Trashlord joined #perl6
10:03 * rhebus consults S26
10:05 rhebus argh, can't even view S26 on github because github is confused by the pod its written in :/
10:07 masak indeed.
10:07 masak now you see the very depth of the lack of a solid Pod parser.
10:08 masak also, S26 is still slightly slushy, and not finalized in all respects...
10:08 rhebus is it possible/desirable to write pod which is both pod5 and pod6?
10:09 masak beyond very simple things, I wouldn't think so.
10:09 rhebus :/
10:10 rhebus makes writing pod6 difficult then. not sure whether to just put pod5 in the examples for the moment or not bother and just put it all in comments
10:10 masak I'd do the latter for now.
10:10 rhebus yeah sounds reasonable
10:10 masak inside the comments, you could put real Pod6, if you like. :)
10:11 masak for practice.
10:11 rhebus no i couldn't
10:11 rhebus not without learning it
10:11 rhebus and it's not easy to learn
10:11 rhebus specially not without a program to tell me when i've got it wrong
10:13 rhebus or rather, i could, but that would take tuits from other tasks such as writing the documentation :)
10:13 masak nod
10:14 masak let's split up -- you write documentation, I make a Pod parser :)
10:14 rhebus :)
10:14 whiteknight joined #perl6
10:17 * moritz_ back
10:18 BillN1VUX left #perl6
10:18 moritz_ rakudo: sub MAIN($foo) { }; sub USAGE { say "Usage: not like this" }
10:18 p6eval rakudo c7f6f2: OUTPUT«Usage: not like this␤»
10:18 moritz_ lue: see above
10:19 masak moritz_: lue eventually figgered it out.
10:19 masak despide my confusing advice.
10:19 isBEKaml joined #perl6
10:19 masak isBEKaml! \o/
10:19 isBEKaml OHHAI!
10:19 phenny isBEKaml: 01:32Z <masak> tell isBEKaml negatory on the Yapsi fail. repeat, negatory on being able to reproduce bin/yapsi -e 'say 42' fail on recent Rakudo. over.
10:20 isBEKaml negatory? punnerific! :D
10:21 isBEKaml masak: hmm, I can still produce it here. Simply change the shebang in bin/yapsi to point to daily Rakudo build location.
10:21 Guest23195 joined #perl6
10:21 Guest23195 left #perl6
10:22 masak er. when I make install my Rakudo, I get the latest when running Yapsi.
10:22 Guest23195 joined #perl6
10:22 masak and it works here.
10:22 masak I still agree with moritz_' diagnosis, that you have a stale .pir file somewhere.
10:22 isBEKaml you make install to a global location ?
10:22 isBEKaml that you can get from /usr/bin/env perl6 ?
10:22 rhebus rakudo accepts my vim .swp files without error. interesting.
10:22 rhebus (stupid windows cmd.exe tab completion)
10:23 isBEKaml bin/yapsi -e 'say 42' Could not find sub &Nil
10:23 masak isBEKaml: yes. I make install to a global location.
10:23 moritz_ find / -name '*.pir'
10:24 isBEKaml moritz_: root? you don't want to do that. :)
10:24 moritz_ -or -name '*.pbc'
10:24 moritz_ isBEKaml: I'm very sure it's a stale .pir or .pbc file. If you cleaning attempts so far haven't been successful, it's time to think more globally
10:25 masak ~/.perl6/lib, perhaps.
10:26 isBEKaml moritz_: I cleaned out ~/.perl6/lib and the yapsi .pir file before doing make on yapsi.
10:26 moritz_ isBEKaml: what about parrot_install/ ?
10:27 isBEKaml moritz_: I'm looking at that now
10:27 masak left #perl6
10:29 isBEKaml wow, I still have alpha on the path. pfft
10:29 M_o_C joined #perl6
10:37 rhebus rakudo: <A B C D E F>[1 .. *].say
10:38 p6eval rakudo c7f6f2: OUTPUT«(timeout)»
10:38 rhebus :/
10:39 rhebus is it possible to do ranged subscripting of lists and/or arrays yet?
10:39 moritz_ yes, just not with infinite lists
10:39 moritz_ rakudo: say <a b c d e f>[1..4]
10:39 p6eval rakudo c7f6f2: OUTPUT«bcde␤»
10:40 rhebus hmm, the example I'm working on is "get the last two elements of a list"
10:40 rhebus rakudo: say <a b c d e f>[*-2,*-1]
10:40 moritz_ [*-2, *-1]
10:40 p6eval rakudo c7f6f2: OUTPUT«ef␤»
10:40 rhebus but it doesn't scale to "last three" or "last N" elements
10:40 moritz_ right
10:41 moritz_ that would be *-$n .. *, but that doesn't work yet in rakudo for a variety of reasons
10:41 isBEKaml rakudo: say (2,4, *** ... *).munch(15)
10:41 p6eval rakudo c7f6f2: OUTPUT«===SORRY!===␤HyperWhatever (**) not yet implemented at line 22, near "* ... *).m"␤»
10:41 moritz_ for now you have to obtain the count of elements, and do the math yourself
10:41 moritz_ isBEKaml: spaces help
10:42 isBEKaml rakudo: say (2,4, * * * ... *).munch(15)
10:42 p6eval rakudo c7f6f2: OUTPUT«2483225681922097152171798691843.6028797018964e+166.1897001964269e+262.23007451985306e+431.38034926935811e+703.07828173409332e+1134.24910394253414e+1831.30799390525667e+297␤»
10:42 isBEKaml moritz_: Just wanted to see how rakudo did that. "HyperWhatever (**) not yet implemented " - made me laugh silly.
10:43 moritz_ isBEKaml: glad it amused you :-)
10:43 rhebus where can I read about #?rakudo skip?
10:43 rhebus is it just a test directive or does it work in general code?
10:44 moritz_ rhebus: http://github.com/perl6/roast#readme
10:44 rhebus would be useful for valid perl6 examples which don't compile on rakudo yet
10:44 svetlins_ joined #perl6
10:44 rhebus s/compile/work/
10:46 svetlins left #perl6
10:46 rhebus aha, so it's a test suite thing
10:52 zulon joined #perl6
10:55 snearch joined #perl6
10:59 Trashlord left #perl6
11:00 Trashlord joined #perl6
11:02 isBEKaml heh. it works now. I cleaned out 2010.07 rakudo and 2.6.0 parrot both in a global install and ~/.perl6/lib. did a fresh Yapsi build and installed the libs to ~/.perl6/lib. It just works. Weird.
11:02 isBEKaml Yapsi was working all the while with 2010.07 globally installed rakudo.
11:03 isBEKaml rakudo: say (1,2,4, * * * ... *).munch(15)
11:03 p6eval rakudo c7f6f2: OUTPUT«12483225681922097152171798691843.6028797018964e+166.1897001964269e+262.23007451985306e+431.38034926935811e+703.07828173409332e+1134.24910394253414e+183␤»
11:04 isBEKaml this is wrong!
11:04 synth left #perl6
11:04 isBEKaml rakudo: say (1,1,2,4, * * * ... *).munch(15)
11:04 p6eval rakudo c7f6f2: OUTPUT«112483225681922097152171798691843.6028797018964e+166.1897001964269e+262.23007451985306e+431.38034926935811e+703.07828173409332e+113␤»
11:05 isBEKaml rakudo: say (1,2,2, * * * ... *).munch(15)
11:05 p6eval rakudo c7f6f2: OUTPUT«122483225681922097152171798691843.6028797018964e+166.1897001964269e+262.23007451985306e+431.38034926935811e+703.07828173409332e+113␤»
11:06 rhebus does ~@x put spaces between the elements of any Positional?
11:06 isBEKaml the ~ prefix stringifies the variable IIRC
11:07 isBEKaml rakudo: my @x = [1,2,3,4,5,6]; (~@x).say
11:07 rhebus but where can I read about what the stringification process means in detail?
11:07 p6eval rakudo c7f6f2: OUTPUT«1 2 3 4 5 6␤»
11:08 isBEKaml S03, I think. http://perlcabal.org/syn/ .
11:10 rhebus there's a little discussion in http://perlcabal.org/syn/S03.html#Symbolic_unary_precedence but it doesn't say in detail what will happen when anything is stringified. In particular, do all Positionals stringify the same way?
11:11 isBEKaml I'm not qualified enough to answer that. :-)
11:12 rhebus heh
11:14 rhebus well, I'll document it as such in the examples and someone can correct it later if i'm wrong
11:16 isBEKaml where are you documenting these?
11:16 rhebus perl6-examples/99-problems/*
11:17 rhebus they have minimal docs at the moment, most are just code with no explanation. the main thing is getting a problem specification into each one
11:17 rhebus then perhaps some explanation as to what's going on
11:18 rhebus then we can point people to it for some good beginner examples
11:18 rhebus fine accuracy isn't the main goal; but I like to be as accurate as I can anyway :)
11:19 Tene rhebus: might also be nice to pull in Perl 6 examples from rosettacode.
11:19 rhebus Tene: yeah that would be good
11:19 rhebus I'm starting small, and just documenting 99-problems
11:19 rhebus then I might try the rest of perl6-examples if i have tuits
11:20 Ross left #perl6
11:20 lasse_ left #perl6
11:23 isBEKaml rakudo: sub gcd($x,$y) { my ($a,$b) = ($x,$y); if ($b == 0) { return $a; } else { return gcd($b, $a mod $b); }; }; say gcd(36,63);
11:23 p6eval rakudo c7f6f2: OUTPUT«9␤»
11:23 isBEKaml rhebus: ^^ recursive. :)
11:23 rhebus isBEKaml: huh?
11:24 isBEKaml rhebus: your gcd solution was a non-recursive one. I just made it recursive.
11:24 hatseflats joined #perl6
11:24 rhebus isBEKaml: it was non-recursive because rakudo doesn't do tail-call (yet)
11:24 isBEKaml rhebus: http://github.com/perl6/perl6-examples/blob/master/99-problems/P32-rhebus.pl
11:25 isBEKaml rhebus: TCO isn't mandatory. :)
11:25 rhebus but if you think that's better (after all, these are perl 6 examples, not rakudo examples) then be my guest
11:25 rhebus isBEKaml: yeah, particularly for euclid's algorithm, which shouldn't recurse too deeply
11:26 isBEKaml rhebus: euclid's algorithm is particularly a recursive one, IIRC.
11:26 isBEKaml yeah, there's a small chance that it can go out of the stack depth.
11:26 isBEKaml never pushed rakudo there.
11:27 isBEKaml rakudo: sub gcd($x,$y) { my ($a,$b) = ($x,$y); if ($b == 0) { return $a; } else { return gcd($b, $a mod $b); }; }; say gcd(1916, 2644);
11:27 p6eval rakudo c7f6f2: OUTPUT«4␤»
11:27 isBEKaml rakudo: sub gcd($x,$y) { my ($a,$b) = ($x,$y); if ($b == 0) { return $a; } else { return gcd($b, $a mod $b); }; }; say gcd(15553, 23456)
11:27 p6eval rakudo c7f6f2: OUTPUT«1␤»
11:27 rhebus you need to put pretty large fibonacci pairs into euclid to get a large depth
11:28 isBEKaml rhebus: hmm, you can try that out. You can see the sub yourself.
11:28 rhebus rakudo: sub gcd($x,$y) { my ($a,$b) = ($x,$y); if ($b == 0) { return $a; } else { return gcd($b, $a mod $b); }; }; say gcd(14930352, 24157817);
11:29 isBEKaml rhebus: I can't think of any. Just saw your P32 solution, found it non-recursive, tried a recursive one on p6eval.
11:29 p6eval rakudo c7f6f2: OUTPUT«1␤»
11:29 rhebus those are the smallest pair of numbers for which steps == 45 (I think)
11:30 rhebus we need to go *much* bigger to get down to, say, 100
11:30 rhebus It's only an example, if you want to push it to github I don't think there's much argument against it
11:31 Ross^ joined #perl6
11:34 rare joined #perl6
11:36 isBEKaml rakudo: sub gcd($x,$y) { my ($a,$b) = ($x,$y); if ($b == 0) { return $a; } else { return gcd($b, $a mod $b); }; }; say gcd(2232,654)
11:36 p6eval rakudo c7f6f2: OUTPUT«6␤»
11:36 isBEKaml rhebus: I'm not about to push to github over this silly thing. You're free to push that bit in if you like.
11:37 isBEKaml Besides, you're doing good already.
11:37 rhebus i'm focussing elsewhere too :)
11:37 rhebus that's why i wanted you to do it :P
11:42 isBEKaml Well, no. That's not necessary.
11:44 masonkramer left #perl6
11:46 isBEKaml left #perl6
11:47 svetlins_ left #perl6
11:56 azert0x joined #perl6
11:56 zulon left #perl6
12:01 REPLeffect left #perl6
12:04 svetlins_ joined #perl6
12:08 meppl joined #perl6
12:17 REPLeffect joined #perl6
12:43 rhebus haha, just seen this in S03: "(And please do not overload the bitshift operators to do I/O.)" :)
12:45 f00li5h left #perl6
12:45 f00li5h joined #perl6
12:49 moritz_ rakudo: class A { method @.a; method Str { ~@.a>>.uc } }; say A.new(a => [<foo bar baz>])
12:49 p6eval rakudo c7f6f2: OUTPUT«===SORRY!===␤Malformed method at line 22, near "@.a; metho"␤»
12:49 moritz_ rakudo: class A { has @.a; method Str() { ~@.a>>.uc } }; say A.new(a => [<foo bar baz>])
12:49 p6eval rakudo c7f6f2: OUTPUT«FOO BAR BAZ␤»
12:51 M_o_C left #perl6
12:51 rhebus is pack a builtin?
12:52 rhebus aha, it's listed in S32/Str
12:58 ruiwk left #perl6
13:09 * moritz_ has a simple class for Nonograms that supports stringification, provided all column and row specs are signle digits
13:09 orafu left #perl6
13:09 orafu joined #perl6
13:10 larsen joined #perl6
13:23 zulon joined #perl6
13:31 masonkramer joined #perl6
13:45 tadzik joined #perl6
13:46 tadzik hello #perl6
13:46 snearch left #perl6
13:47 moritz_ o/
13:48 stepnem left #perl6
13:49 M_o_C joined #perl6
13:50 M_o_C left #perl6
13:52 M_o_C joined #perl6
13:55 Axius joined #perl6
13:56 M_o_C left #perl6
13:58 M_o_C joined #perl6
14:00 masonkramer left #perl6
14:00 stepnem joined #perl6
14:05 gfldex how do i say a white space that aint a newline in a grammar?
14:05 moritz_ \h
14:05 moritz_ is "horizontal whitespace"
14:06 rhebus you can't call splice on a Parcel can you?
14:06 moritz_ I don't think parcels are mutable, so "no"
14:06 rhebus thanks
14:08 rhebus I'm working on P21 from 99-problems: "# P21 (*) Insert an element at a given position into a list." That's a find description for LISP, which has no mutable objects; but how do I express "don't modify the original sequence, create a copy" in perl6 context?
14:08 rhebus "Create a new list by inserting an element at a given position into a list"
14:08 rhebus seems a bit clunky
14:09 rhebus i suppose I could just have the example do both styles
14:09 moritz_ my @copy = @old; @copy.splice(...)
14:09 moritz_ "Insert an element at a given position into an array"
14:09 rhebus sorry, i'm asking how to document it clearly, rather than how to code it :)
14:09 rhebus moritz_: that sounds like mutating the original array, rather than creating a copy
14:10 moritz_ it modifies the problem a bit, according to what you can do in Perl 6
14:10 rhebus yeah
14:10 moritz_ which is fine, IMHO
14:10 rhebus i think the best answer is to do it both ways and demonstrate the difference
14:10 rhebus which i will do
14:10 moritz_ if you don't like, that you can say "copy the list with a new element inserted"
14:14 Trashlord left #perl6
14:15 plobsing joined #perl6
14:16 Trashlord joined #perl6
14:16 pmichaud good morning, #perl6
14:17 rhebus o/
14:17 moritz_ \o
14:17 rhebus \m/
14:18 tadzik \o/
14:20 moritz_ pmichaud: I have received a mail with two desktop ini files (for gnome or kde, afaict) for inclusion in R* - they are basically links to documentation, along with a description
14:20 moritz_ gerd said they'd help the Fedora package
14:21 Italian_Plumber joined #perl6
14:21 moritz_ should I add them in a subdirectory? or should we avoid non-portable files in R*?
14:24 rhebus in parameter lists, what does (@x is readonly) mean for arrays? what does it stop me doing?
14:24 moritz_ assigning to @x
14:24 moritz_ @a = 1, 2,3 # boom
14:25 rhebus but i can still do .splice
14:25 rhebus ?
14:25 [Coke] .
14:25 moritz_ it's also illegal to modify @a (like with @a.push(3)), but the compiler isn't forced to enforce that
14:26 rhebus rakudo: sub foo (@x is readonly) { @x.push(3) } my @a = <a b c>; foo(@a); @a.say
14:26 p6eval rakudo c7f6f2: OUTPUT«===SORRY!===␤Confused at line 22, near "sub foo (@"␤»
14:26 rhebus rakudo: sub foo(@x is readonly) { @x.push(3) }; my @a = <a b c>; foo(@a); @a.say
14:26 p6eval rakudo c7f6f2: OUTPUT«abc3␤»
14:26 rhebus ok so it's not allowed, but it's not forbidden :)
14:26 moritz_ correct
14:27 rhebus and readonly is default, so if i want to mutate it I need (@a is rw)?
14:27 moritz_ correct again
14:27 rhebus thanks very much
14:28 pmichaud moritz_: thinking
14:29 macroron joined #perl6
14:31 jaldhar_ joined #perl6
14:33 dangbinghoo joined #perl6
14:33 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!
14:33 tylercurtis joined #perl6
14:34 x3nU_ joined #perl6
14:34 x3nU_ left #perl6
14:35 _jaldhar left #perl6
14:35 pmichaud moritz_: where are the .ini files?  i.e., where's the patch?  (and why did it come to you via email, ooc?)
14:36 gfldex can i dump Match?
14:36 arnsholt To a certain extent
14:37 arnsholt There's a lot of information in there, so finding what you want can be tricky though
14:37 dangbinghoo left #perl6
14:38 gfldex Match.perl() seams to take a while :)
14:38 _jaldhar_ joined #perl6
14:40 ingy gfldex: try it in 2020.
14:41 jaldhar_ left #perl6
14:43 sahadev joined #perl6
14:48 tadzik I personally prefer Match.Str :)
14:49 rhebus rakudo: say 5 !%% 3
14:49 p6eval rakudo c7f6f2: OUTPUT«===SORRY!===␤Infix !% is deprecated in favor of infix %% at line 22, near "% 3"␤»
14:51 rhebus if i have 2 Ints, does it matter if I use % or mod?
14:51 Axius left #perl6
14:54 TimToady probably not
14:55 M_o_C left #perl6
14:57 jhuni left #perl6
14:59 rhebus sad, P91-edpratomo.pl gives erroneous results. It's quite impressive otherwise...
15:00 rhebus it's a knight's tour solver
15:07 Axius joined #perl6
15:08 pmichaud did anyone see moritz_++'s announcement on any mailing list other than perl6-compiler yesterday?  I seem to have only received the one copy.
15:10 rhebus i got it on perl6-language
15:12 colomon pmichaud: when you've got a second, I've got a weird observation from working on benchmarking stuff yesterday.  might be interesting.  (might be obvious?)
15:12 ruoso left #perl6
15:18 ruoso joined #perl6
15:19 pmichaud I've got a second
15:20 sahadev left #perl6
15:25 tadzik I've got it on p6u
15:26 moritz_ pmichaud: http://moritz.faui2k3.org/tmp/rakudo.desk.in.tar.gz contains the files. No idea why gerd sent it to me, not to a bug tracker
15:28 pmichaud rhebus/tadzik:  thanks.  I don't know why I only received the p6c copy.
15:29 rhebus pmichaud: are all the mailing lists handled by the same software? Is it being Too Clever?
15:29 moritz_ pmichaud: it probably filters out dupes
15:29 moritz_ where it = the mailing list software
15:30 rbuels left #perl6
15:30 pmichaud hmmm
15:30 pmichaud wfm, I guess.
15:31 timbunce joined #perl6
15:31 moritz_ on the web interface, I see it both on p6l and p6c
15:31 moritz_ haven't checked the others
15:31 moritz_ and it was on planetsix, which means it must have gone to p6a too
15:35 risou_ joined #perl6
15:35 colomon pmichaud: say ~slurp('unixdict.txt').words.pick(300);  works fine
15:35 colomon (unixdict.txt is a 25,104 line file, each line with a single work on it.)
15:36 Axius left #perl6
15:36 colomon for lines('five-letter-words.txt') { say $_ } segfaults reliably
15:36 colomon sorry, lines('unixdict.txt'), I mean.
15:36 pmichaud colomon: from the repl or as a script?
15:37 colomon script
15:37 pmichaud I'm thinking it's the gc bug.
15:37 colomon seems likely (which is why I didn't report it)
15:37 colomon but it seems weird to me that constructing two 25,000 element arrays works fine.
15:37 pmichaud arrays != linked lists, though
15:37 pmichaud it's linked lists that cause problems
15:38 risou left #perl6
15:38 pmichaud in other words, it's not the size of the array, it's the length of the pointer chain that causes Parrot problems
15:38 jferrero joined #perl6
15:38 colomon words does generate a linked list, right?
15:38 pmichaud I don't know -- I'd have to look.
15:38 pmichaud and it depends on how the iterator gets consumed.
15:38 colomon yes, it does
15:38 pmichaud i.e., if we aren't keeping the head of the list anywhere, then it doesn't matter.
15:38 colomon huh.
15:38 pmichaud because the list gets regularly gc'ed
15:39 colomon say ~slurp('unixdict.txt').words.pick(300) .... pick copies the list to an array internally
15:39 colomon I don't know if that operation would keep the head of the list or not?
15:40 pmichaud probably not
15:40 Axius joined #perl6
15:40 colomon my @l = @.list.Seq;  is what .pick does
15:40 pmichaud that doesn't keep the head around, no.
15:41 pmichaud .Seq will end up consuming the iterators, converting things into an array
15:41 pmichaud so there's no "long chain of nodes", because it's being compressed into an array
15:41 colomon by the same token, +slurp('unixdict.txt').words.grep(/(.)$0/) segfaults
15:42 pmichaud I suspect that one is keeping the head around somewhere.
15:42 colomon grep is "for @.list" internally
15:44 pmichaud it's also gather/take
15:44 pmichaud which does tend to build chains
15:45 pmichaud but I don't think that's the problem here.
15:45 colomon but words is already using gather / take to build a chain of that length.  (and it works in the other one)
15:46 pmichaud I suspect prefix:<+> keeps the head.  In fact, it probably must.
15:46 pmichaud how about  +slurp('unixdict.txt').words.grep(/(.)$0/).Str  ?
15:46 colomon pmichaud: but it's keeping the head of the result of the grep, which is significantly shorter
15:47 pmichaud sorry
15:47 pmichaud .Seq
15:47 colomon trying
15:47 pmichaud url for unixdict.txt?
15:47 pmichaud I'll try a few here locally.
15:49 colomon http://github.com/perl6/bench-scripts/blob/master/unixdict.txt
15:50 colomon still segfaults with Seq
15:52 colomon trying again with a tighter grep which should produce a very small list at the other end.
15:53 colomon still segfaults.
15:55 rhebus rakudo: +$_.say for ((1,2),3,(4,5),(6));
15:55 p6eval rakudo c7f6f2: OUTPUT«1␤2␤3␤4␤5␤6␤»
15:55 tylercurtis rakudo: +.say for ((1, 2), 3, (4, 5), (6))
15:55 pmichaud omg slurp is painfully slow
15:55 p6eval rakudo c7f6f2: OUTPUT«1␤2␤3␤4␤5␤6␤»
15:56 moritz_ there was a parrot patch that made readall() read the whole file at once. It made rakudo module loading segfault :/
15:56 pmichaud yes, that patch was broken
15:56 pmichaud I knew it was broken as soon as I saw the patch.
15:57 moritz_ did it confuse characters and bytes?
15:57 rhebus rakudo: (<a b c> X <1 2 3>).perl
15:57 p6eval rakudo c7f6f2:  ( no output )
15:57 rhebus rakudo: (<a b c> X <1 2 3>).perl.say
15:57 p6eval rakudo c7f6f2: OUTPUT«(("a", "1"), ("a", "2"), ("a", "3"), ("b", "1"), ("b", "2"), ("b", "3"), ("c", "1"), ("c", "2"), ("c", "3"))␤»
15:58 pmichaud it basically tried to solve the problem in the wrong way.
15:58 rhebus rakudo: say (<a b c> X <1 2 3>).map: { ~$_ }
15:58 p6eval rakudo c7f6f2: OUTPUT«a 1a 2a 3b 1b 2b 3c 1c 2c 3␤»
15:58 pmichaud I don't understand why readall() thinks that it has to do line-oriented reads.
15:58 moritz_ rakudo: say ~(<a b c> X~ <1 2 3>)
15:58 p6eval rakudo c7f6f2: OUTPUT«a1 a2 a3 b1 b2 b3 c1 c2 c3␤»
15:59 rhebus moritz_: nice, thanks
16:00 pmichaud it should be reading the file in large (e.g., ~4k) chunks.
16:00 moritz_ agreed
16:00 pmichaud that way we're doing 500 reads and concatenations instead of 25,000
16:01 zulon left #perl6
16:01 pmichaud sorry, 50 reads versus 25,000
16:02 rhebus rakudo: ((1,2,3) X* (1,2,3)).perl.say
16:02 p6eval rakudo c7f6f2: OUTPUT«(1, 2, 3, 2, 4, 6, 3, 6, 9)␤»
16:03 colomon pmichaud: I just rewrote the script to recode grep by hand using .list, loop, and shift.  That version works fine.
16:03 colomon so it seems like it's the for statement in grep which is the source of the problem.
16:03 [Coke] http://somuchpun.com/2010/09/04/funny-puns-camelflage/
16:04 pmichaud colomon: oh yes, it is likely the for statement
16:04 pmichaud well
16:04 pmichaud hrm
16:06 pmichaud I would rewrite grep
16:06 pmichaud as
16:06 pmichaud self.map({ next unless $_ ~~ $test; $_})
16:06 Axius left #perl6
16:06 pmichaud or even better
16:06 pmichaud self.map({ $_ if $_ ~~ test })
16:07 pmichaud and avoid the gather/take altogether
16:07 moritz_ rakudo: say <a b c>.map({$_ if $_ ~~ 'b' }).perl
16:07 p6eval rakudo c7f6f2: OUTPUT«(Nil, "b", Nil)␤»
16:07 moritz_ rakudo: say <a b c>.grep('b').perl
16:07 p6eval rakudo c7f6f2: OUTPUT«("b")␤»
16:07 colomon pmichaud: for what it's worth, I left out the gather / take from the above description, but it was there and does work in this case.
16:07 moritz_ is that actually the same?
16:08 colomon map does seem like it should be more efficient, though.
16:08 pmichaud moritz_: good question.
16:08 moritz_ I'd argue since .perl sees a difference, it can't be the same
16:08 justatheory joined #perl6
16:08 svetlins_ left #perl6
16:09 pmichaud then there's a question as to which is correct :)
16:09 moritz_ I'm pretty sure that grep is correct
16:10 colomon pmichaud: how fast is doing "next" in map?  My (admittedly weak) intuition is that it is on the slow side...
16:10 pmichaud colomon: it's an exception... but so is gather/take
16:10 pmichaud so they're roughly equivalent.
16:10 colomon pmichaud: right, but it switches the sense of the exception.
16:10 pmichaud doing next won't help here, though.
16:10 pmichaud if we're wanting to avoid the Nils
16:11 rhebus gah, new laptop has no capslock light. i ONLY KNOW i'VE HIT IT WHEN IT'S TOO LATE
16:11 colomon oh, really?
16:11 pmichaud rakudo: say <a b c>.map({next unless $_ ~~ 'b'; $_}).perl
16:11 p6eval rakudo c7f6f2: OUTPUT«(Nil, "b", Nil)␤»
16:11 colomon gotcha.
16:11 pmichaud next puts a value into the output list also
16:11 colomon I missed that step of the above logic.
16:11 pmichaud maybe
16:12 pmichaud rakudo:  say <a b c>.map({$_ if $_ ~~ 'b'}).list.perl
16:12 p6eval rakudo c7f6f2: OUTPUT«(Nil, "b", Nil)␤»
16:12 pmichaud I'm wondering if .list should remove the Nil's
16:13 rhebus rakudo: say <a b c>.map({ $_ ~~ 'b' ?? $_ !! () }).list.perl
16:13 p6eval rakudo c7f6f2: OUTPUT«((), "b", ())␤»
16:13 sahadev joined #perl6
16:14 pmichaud I need a short break, then will look at this problem more directly.
16:15 rhebus which synopsis should I consult re $^a and $^b?
16:16 rhebus tried S02, S04, S06, nothing concrete talking about them
16:16 tylercurtis http://perlcabal.org/syn/S06.html#Placeholder_variables
16:16 moritz_ S06
16:17 * moritz_ decides he needs a turtle
16:17 rhebus thanks
16:17 pmichaud oh!
16:17 pmichaud try recoding grep to use .map instead of 'for'
16:18 pmichaud since right now our 'for' is inherently eager
16:18 pmichaud brb
16:21 stepnem left #perl6
16:24 colomon trying now
16:26 colomon errr.... huh
16:26 colomon no segfault, but the script doesn't work right, either.
16:26 stepnem joined #perl6
16:33 pmichaud okay, first I think the incredibly slow slurp has to go.
16:33 TimToady .list is not .flat
16:33 zulon joined #perl6
16:34 colomon oh, I'll bet the map doesn't do anything, because nothing is using its output
16:34 colomon pmichaud: sadly, slurp is actually the first way to do I/O at the minute in rakudo.  :(
16:34 pmichaud colomon++ correct
16:34 pmichaud colomon: right, which is why I'm going to fix it to be not slow.
16:34 colomon *fast way
16:35 colomon pmichaud++
16:35 vanadium left #perl6
16:35 TimToady btw, is sink context careful to throw away its eager evaluations as it makes them, or can they hang around as a space leak?
16:35 pmichaud we don't have a full sink context yet
16:35 pmichaud but it will throw them away
16:35 TimToady it can't just call .eager, I think, since that would treasure everything up
16:36 pmichaud right.  I've worked on sink a couple of times, but keep running into a design difficulty (I don't remember what it is, but it has to do with lack-of-want)
16:37 moritz_ my @x = 1..*; # how do we ensure that @x isn't in sink context, even though it's returned from the 'my' declaration?
16:37 TimToady sinkness is something that has to propagate down from nodes to statement lists; it can't be determined during the initial parse of the statement list
16:38 pmichaud oh yes, that was it.  we didn't have a good way to avoid sinkness on assignment and the like
16:38 TimToady so has to be an ast operation
16:38 pmichaud the attributes that were in STD.pm6 weren't sufficient to describe the cases
16:39 Axius joined #perl6
16:40 TimToady STD doesn't do ast yet without something like viv adding actions, which sorear++ keeps deprecating, but I still think is useful from a typological perspective so nodes can dispatch on type rather than examining data
16:40 pmichaud right
16:40 TimToady disregarding whether or not it's buggy :)
16:40 pmichaud we didn't have the right set of operator attributes to be able to sufficiently describe sink context
16:41 pmichaud I'll look at it again in a bit... I want to fix slurp($filename) first.
16:42 TimToady btw, my Hofstadter-Conway $10000 sequence finally got all the way through a million entries; took 3 hours though
16:42 TimToady and had to use only loop (), no lists
16:43 TimToady rakudo/parrot tended to roll over on any sequence longer the 32768
16:43 rhebus perl6: say list(1..4).map { 42 }
16:44 p6eval pugs: OUTPUT«*** ␤    Unexpected "{"␤    expecting operator, ":" or ","␤    at /tmp/OUomH3SQc_ line 1, column 20␤»
16:44 p6eval ..rakudo c7f6f2: OUTPUT«===SORRY!===␤Confused at line 22, near "say list(1"␤»
16:44 rhebus perl6: say list(1..4).map: { 42 }
16:44 p6eval pugs: OUTPUT«42424242␤»
16:44 p6eval ..rakudo c7f6f2: OUTPUT«42␤»
16:44 rhebus perl6: say list(1..4).map: { ( 1..16).pick }
16:44 p6eval rakudo c7f6f2: OUTPUT«15␤»
16:44 p6eval ..pugs: OUTPUT«7228␤»
16:44 rhebus perl6: say ~list(1..4).map: { ( 1..16).pick }
16:45 p6eval rakudo c7f6f2: OUTPUT«6␤»
16:45 p6eval ..pugs: OUTPUT«6 11 13 13␤»
16:45 rhebus hmm, is there another way to generate N numbers from (1..K).pick in rakudo?
16:45 moritz_ (1..K).pick(N, :replace)
16:46 rhebus thank you
16:50 Ross^ left #perl6
16:50 Italian_Plumber1 joined #perl6
16:50 Italian_Plumber left #perl6
16:51 zulon left #perl6
16:51 Italian_Plumber1 left #perl6
16:52 pmichaud http://gist.github.com/566158  # time of old slurp versus new slurp
16:56 pmichaud spectesting now.
16:56 arnsholt Nice. That's a respectable speedup
17:00 rhebus right
17:00 rhebus i think that's enough work documenting the perl6-examples for now
17:01 * tylercurtis is curious to see how pmichaud++ got that speedup.
17:04 masonkramer joined #perl6
17:05 pmichaud http://gist.github.com/566173  # how I got the speedup.
17:06 Axius left #perl6
17:09 M_o_C joined #perl6
17:09 moritz_ pmichaud: I'm pretty sure it needs a leading ~ on the last line
17:09 moritz_ pmichaud: otherwise it will be a parrot string, and methods like .trans fail
17:10 Axius joined #perl6
17:11 pmichaud moritz_: you're probably right, but it's no different than what IO.slurp() is currently doing.  (I.e., it's likely to fail in the same manner as before.)
17:11 moritz_ pmichaud: then the previous is probably buggy too
17:11 pmichaud right
17:12 pmichaud I'm thinking it's time to just do type mapping for Str
17:13 pmichaud rather than stick spurious ~'s all over the place.
17:14 pmichaud maybe I'll try that when this current spectest run is done
17:16 icwiener_ joined #perl6
17:26 envi^home left #perl6
17:28 Axius left #perl6
17:47 Trashlord left #perl6
17:47 risou_ left #perl6
17:50 * moritz_ is currently very annoyed by "Use of uninitialized value in numeric context" without line number
17:51 mathw line numbers are nice
17:51 Trashlord joined #perl6
17:52 dalek rakudo: 77a72a3 | pmichaud++ | src/core/IO.pm:
17:52 dalek rakudo: Refactor slurp($filename) to use Parrot's .readall($filename);
17:52 dalek rakudo: this results in a massive speedup for slurping a file into a string.
17:52 dalek rakudo: See TT #1749 for related parrot details.
17:52 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/77a72a31234229635f720f853d59b865342df17a
17:56 Mowah left #perl6
18:05 diakopter 09:33 -!- dangbinghoo changed the topic of #perl6 to:
18:05 * diakopter wonders what it was prior...
18:07 tadzik I had both in a message and I didn't see any difference either
18:11 pmichaud moritz_: yes, I need to go fix up the annotations to be accessible from more than just exceptions.
18:14 justatheory left #perl6
18:15 jaldhar joined #perl6
18:18 PacoLinux left #perl6
18:18 _jaldhar_ left #perl6
18:19 colomon sorry about disappearing off the face of the conversation back there.  sudden call to deal with groceries and make noms.  :)
18:20 pmichaud colomon: 16:52 <pmichaud> http://gist.github.com/566158  # time of old slurp versus new slurp
18:20 colomon I saw!  pmichaud++
18:21 colomon grep(Mu $test) { gather { @.map({ take $_ if $_ ~~ $test; }).eager; } leads to segfault again.
18:22 pmichaud colomon: how long does it usually take for
18:22 pmichaud for lines('unixdict.txt') { say $_ }
18:22 pmichaud to segfault?
18:23 colomon about a minute, I think, but let me time it.
18:23 icwiener_ left #perl6
18:23 pmichaud okay
18:23 pmichaud just hadn't seen a segfault yet on this end
18:23 colomon running here.....
18:24 colomon segfault here, right after indefensible
18:24 pmichaud I'm up to 'our'
18:24 _jaldhar joined #perl6
18:24 colomon interesting.
18:25 pmichaud 'raze'
18:25 pmichaud 'sand'
18:25 pmichaud 'snub'
18:25 pmichaud segfault after 'stagecoach'
18:25 pmichaud okay, let me look.  I suspect it's an eager/sink issue.
18:26 colomon good hunting!
18:26 diakopter seems I can't pipe input to viv anymore
18:28 jaldhar left #perl6
18:32 Trashlord left #perl6
18:33 Trashlord joined #perl6
18:34 jaldhar_ joined #perl6
18:36 masonkramer left #perl6
18:37 _jaldhar left #perl6
18:38 rhebus left #perl6
18:40 Mowah joined #perl6
18:40 alester joined #perl6
18:40 rhebus joined #perl6
18:42 whiteknight left #perl6
18:44 jacob_applebaum left #perl6
18:46 reisio joined #perl6
18:48 Axius joined #perl6
18:54 sahadev left #perl6
18:55 PacoLinux joined #perl6
18:56 macroron left #perl6
18:57 Axius left #perl6
19:03 colomon pmichaud: your new slurp is slightly wrong.
19:03 colomon returns a String instead of a Str
19:03 colomon > slurp('five-letter-words.txt').trans("a" => "A")
19:03 colomon too few positional arguments: 2 passed, 3 (or more) expected
19:04 moritz_ I've commented as much in the backlog
19:04 colomon hmmm... how to easily add a test for that to real-strings.t?
19:04 colomon moritz_++
19:07 colomon on it.
19:10 pmichaud colomon: as I noted, that problem existed with the previous slurp() also.
19:10 pmichaud and I don't thinkt he answer is for us to be adding ~ to everything that might return a Parrot String.
19:10 Axius joined #perl6
19:10 colomon do you have a better answer than adding
19:10 colomon %r = new ['Str']
19:10 colomon assign %r, $S0
19:10 colomon at the end of the PIR?
19:11 colomon (or whatever is needed for your code here.)
19:11 pmichaud yes, let's try type-mapping Parrot's String PMC to a Rakudo Str.
19:12 colomon was there a test which showed the previous version was wrong?  (I mean in spectest)
19:12 pmichaud I don't think there's a test that showed the previous version as being wrong, no.
19:12 moritz_ don' tthink so
19:12 pmichaud I'm fine with adding a test for it.
19:13 colomon I've just added it
19:13 pmichaud let's see what happens with type mapping
19:14 colomon doh!  I don't have permission to push to spectest
19:14 colomon roast
19:14 colomon Or maybe I've just got it checked out incorrectly.
19:14 * moritz_ should be able to fix that
19:14 moritz_ colomon: ah, you need to edit .git/config
19:14 pmichaud the default checkout doesn't grant push privs
19:14 moritz_ colomon: and change the url to git@github.com:perl6/roast.git
19:15 pmichaud ...roast?
19:15 moritz_ roast
19:15 pmichaud why roast?
19:15 colomon it's what my computer does when I run the full thing.  ;)
19:15 rhebus should I return Bool::True or is returning 1 fine? (similarly Bool::False and 0)
19:15 colomon moritz_++ # updated test checked in
19:15 pmichaud I don't like that name.  I'd much prefer 'spectests', as that's what they are.
19:15 colomon pushed, I mean.
19:16 Italian_Plumber joined #perl6
19:16 colomon rhebus: I prefer Bool::True if that's really what you mean.
19:16 rhebus yeah, it's for a sub is_prime (P31 in 99-problems)
19:17 colomon rhebus: if your testing for truth either has the same result, but Bool::True better documents what you are returning, IMO.
19:17 pmichaud there are other differences
19:18 pmichaud i.e.,   ~~ $true   is different from ~~ `
19:18 pmichaud i.e.,   ~~ $true   is different from ~~ 1
19:18 tylercurtis pmichaud: TimToady likes his tab-completion.
19:18 pmichaud tylercurtis: ah.  :-(
19:18 * moritz_ also prefered spectests, which is why he named the repo that way initially
19:18 rhebus pmichaud: that's a very good point.
19:19 pmichaud also,  True.succ  is different from 1.succ
19:19 pmichaud hll_map fail
19:20 colomon afk # get ready to head out for the coldest folk in the park of the year...
19:21 pmichaud go ahead and add the prefix ~'s if you'd like.
19:22 pmichaud I don't feel like trying to resolve the hll_map issues anytime soon (esp. since I fear it will just make things even slower)
19:24 tylercurtis pmichaud: although, looking back at the log, he was talking about names for it before he commented on the tab-completion collision.
19:24 smash hello everyone
19:24 phenny smash: 00:46Z <colomon> tell smash Yay!  And I just added another....
19:24 pmichaud tylercurtis: okay.  If it's a TimToady preference, then I'll squelch my distaste.  :)
19:24 smash pmichaud: updated http://gil.di.uminho.pt/users/smash/rakudo-bench.html
19:25 smash colomon: will update tests and run later
19:25 sahadev joined #perl6
19:25 tadzik smash: how come it's being updated while Rakudo version remains the same?
19:26 smash tadzik: the bench scripts changed
19:26 tadzik ah, I see
19:26 pmichaud the iteration and recursion bench scripts weren't at all indicative of... well, anything.
19:27 pmichaud 5 loop iterations isn't really a stressful test.  :)
19:27 rbuels joined #perl6
19:27 tylercurtis Wow, iteration-for.p6 really messes up the scale on the light scripts graph.
19:28 pmichaud ...but look at how much it improved :)
19:28 pmichaud (or, restated, how wrong it was before :)
19:29 tylercurtis (whoever made that happen)++
19:29 smash pmichaud: yes, big improvement
19:30 tadzik I believe it's colomon++
19:30 moritz_ and pmichaud++
19:30 pmichaud I think the version that went into 2010.08 was mine.
19:30 pmichaud still, colomon++ did a lot of the improvemtn as well.
19:33 reisio left #perl6
19:34 rhebus given a list <a b c d e> and an infix:<foo> ($a,$b), I want to construct the list (a foo b, b foo c, c foo d, d foo e). Here's what I've got:
19:34 lue ohai o/
19:34 smash in sub f(@list) {....}, is list flattened ?
19:34 rhebus rakudo: my @l = <a b c d e>; my $prev = shift @l; my @m = gather for @l {take $pref ~ $_; $prev = $_; }
19:34 p6eval rakudo 77a72a: OUTPUT«===SORRY!===␤Symbol '$pref' not predeclared in <anonymous> (/tmp/E714ekAf5C:22)␤»
19:34 rhebus rakudo: my @l = <a b c d e>; my $prev = shift @l; my @m = gather for @l {take $prev ~ $_; $prev = $_; }
19:34 p6eval rakudo 77a72a:  ( no output )
19:35 rhebus rakudo: my @l = <a b c d e>; my $prev = shift @l; say my @m = gather for @l {take $prev ~ $_; $prev = $_; }
19:35 p6eval rakudo 77a72a: OUTPUT«␤Cannot modify readonly value␤  in '&infix:<=>' at line 1␤  in main program body at line 22:/tmp/mxmTqqLiDR␤»
19:35 rhebus well something like that anyway
19:35 pmichaud rhebus: how about:   @list[0..3] »foo« @list[1..4]
19:35 rhebus pmichaud: wonderful, thanks
19:36 rhebus i suppose it generalises: @list[0..+@list-2] >>foo<< @list[1..+@list]? (or with * when rakudo supports that)
19:37 pmichaud yes, something like that
19:37 pmichaud there's also:
19:37 pmichaud for ^(@list-1) { $list[$_] foo $list[$_+1] }
19:38 pmichaud sorry, @list[$_] and @list[$_+1]
19:39 pmichaud rakudo:  my @l = <a b c d e>;  my @a = (for ^(@l-1) { @l[$_] ~ @l[$_+1] });  say @a.perl;
19:39 p6eval rakudo 77a72a: OUTPUT«["ab", "bc", "cd", "de"]␤»
19:40 rhebus that works too
19:41 timbunce left #perl6
19:44 lue rakudo: my $a = 3; say $a\i
19:44 p6eval rakudo 77a72a: OUTPUT«0 + 3i␤»
19:44 lue rakudo: my $a = 3; say ($a)i
19:44 p6eval rakudo 77a72a: OUTPUT«0 + 3i␤»
19:46 rhebus does perl6 ever need << and not «? how do you set your editor up for the funny unicode symbols?
19:46 rhebus ie can « shift bits?
19:46 pmichaud << is never a bitshift
19:47 pmichaud bitshift is +< or +>  or ~< or ~>
19:47 moritz_ rhebus: on linux, compose < <  produces «
19:47 rhebus i'm on windows, using vim
19:47 Axius left #perl6
19:47 pmichaud in vim, ctrl-k + < + <
19:47 moritz_ Ctrl+k < <
19:47 rhebus oh thanks
19:47 pmichaud see  :dig   for the vim shortcuts
19:47 moritz_ :help digraph # for more info
19:48 timbunce joined #perl6
19:48 Ross^ joined #perl6
19:48 rhebus thanks
19:48 * moritz_ likes Ctrl+k OK  for ✓
19:49 lue I don't really see tests for ($x)i and $x\i (I see tests that *use* them, but no tests *for* them). Should I add them in?
19:49 pmichaud tests good
19:49 * tylercurtis is stealing Perl 6's module syntax for Perl 5 (because he's too lazy to type "package Foo;␤use warnings;␤use strict;␤" and such all the time).
19:51 perigrin tylercurtis: don't just say package Foo;\nuse Moose;\n and you'e done :)
19:52 lue rakudo: my $a = 0.53; say $a.perl
19:52 p6eval rakudo 77a72a: OUTPUT«53/100␤»
19:56 rhebus can I get a review on my P33 example: http://gist.github.com/566270 I worry I'm using hyper operators because they're cool rather than because they're the best tool :/
19:57 rhebus in particular, infix:<coprime> seems an odd choice for an operator (or would do outside perl 6 anyway)
19:57 tylercurtis perigrin: module, not class. For classes, I usually just use MooseX::Declare.
19:57 pmichaud gcd is:    ($a, $b, *%* ... 0).[*-2]
19:59 rhebus pmichaud: wow, not come across that syntax yet. will add it to the example when I understand it
20:00 tylercurtis rhebus: * % * is a closure created by the whatevers(*). It means { $^a % $^b }
20:01 pmichaud when we have the ability to mark infix operators as chained, you would be able to do:
20:01 tylercurtis rhebus: most operators can be curried like that.
20:01 perigrin tylercurtis: I haven't written anything that isn't a class in so long ...
20:01 pmichaud [coprime] @fib;     # true if all adjacent elements of @fib are coprime
20:01 perigrin well ... except for Roles.
20:02 pmichaud rhebus: I think the use of the hyper is okay here.
20:04 tadzik left #perl6
20:08 pmichaud http://gist.github.com/566282  # why Parrot's GC is so painful  :(
20:08 pmichaud http://gist.github.com/raw/566282/69c06d2e2f6c955080159ab614c797f36a3d4f56/gistfile1.perl # without github formatting ugliness
20:09 moritz_ waitwaitwait
20:09 moritz_ loading perl6.pbc makes it 11 times slower?
20:09 pmichaud yes.
20:09 moritz_ just because it marks-and-sweeps all PMCs in there each time?
20:09 pmichaud note that I'm not even in the perl6 HLL namespace.
20:11 osfamero1 joined #perl6
20:11 rhebus tylercurtis, pmichaud thanks for your feedback
20:11 perigrin_ joined #perl6
20:11 jjore_ joined #perl6
20:11 draxil_ joined #perl6
20:11 BillN1VUX joined #perl6
20:14 lue just running    perl6 path/to/test.t    is good enough for making sure the tests you added works, right?
20:15 moritz_ in general 'make t/spec/foo/bar.t'
20:15 __sri joined #perl6
20:15 moritz_ if fudge is involved
20:15 yahooooo7 joined #perl6
20:15 lue hm, I made my changes in roast/, not rakudo/t/spec
20:16 sahadev left #perl6
20:16 PacoLinux left #perl6
20:16 tylercurtis left #perl6
20:16 jjore left #perl6
20:16 bacek left #perl6
20:16 draxil left #perl6
20:16 p6eval left #perl6
20:16 Quadrescence left #perl6
20:16 tylercurtis joined #perl6
20:19 inotifyAPI joined #perl6
20:19 inotifyAPI left #perl6
20:19 timbunce left #perl6
20:22 PerlJam joined #perl6
20:22 p6eval joined #perl6
20:23 Quadrescence joined #perl6
20:24 sjohnson joined #perl6
20:24 bacek joined #perl6
20:28 rhebus gah, vim is munging » to » when I reopen a file with a hyper operator
20:28 sahadev joined #perl6
20:28 moritz_ rhebus: then some settings wrt character encodings are broken
20:28 rhebus quite
20:29 moritz_ having an UTF-8 locale, and  set encoding=utf-8  in .vimrc helped on linux
20:31 svetlins joined #perl6
20:31 lichtkind joined #perl6
20:31 PacoLinux joined #perl6
20:32 rhebus yeah, set encoding=utf8 in _vimrc works for me
20:32 sorear good * #perl6
20:33 lue hello sorear o/
20:33 pmichaud message sent to parrot-dev
20:33 pmichaud afk, computer repair
20:33 lichtkind szabgab: thanks
20:34 Mowah left #perl6
20:39 lue [on a dry run]:
20:39 lue You can't push to git://github.com/perl6/roast.git
20:39 lue Use git@github.com:perl6/roast.git
20:40 sorear That error message contains fix instructions
20:40 sorear Use them
20:44 moritz_ sorear: reading error messages is so web 1.0
20:44 Trashlord left #perl6
20:46 tylercurtis_ joined #perl6
20:46 tylercurtis left #perl6
20:46 tylercurtis_ is now known as tylercurtis
20:54 justatheory joined #perl6
20:59 nimiezko joined #perl6
21:00 rhebus Here's my P34 (euler's totient function): http://gist.github.com/566318 how does it look?
21:03 BillN1VUX RosettaCode claims primality test $n %% none 2, 3, *+2 ... sqrt $n  works with Rakudo Star version 2010.08  but with $n = 2  generates infinite list instead of terminating.  i
21:04 rhebus it never generates a value in sequence which is eqv sqrt(2)
21:05 BillN1VUX series ends on eqv not > ?
21:05 BillN1VUX tutorial seemed to say > iirc
21:05 rhebus so says S03
21:05 rhebus http://perlcabal.org/syn/S03.html#List_infix_precedence
21:06 BillN1VUX S03 by definition is right, but that doesn't seem useful.
21:06 BillN1VUX wonder why rosetta said it worked
21:07 rhebus replace the limit with a closure? (2,3,*+2... *<sqrt $n)
21:08 rhebus except "(We can't implement this till we fix all the old usages of right-hand generators, however.)"
21:10 rhebus eqv means that the constructor doesn't care if the sequence is increasing or decreasing
21:11 rhebus hmm, playing with the REPL suggests it's not eqv in rakudo atm
21:12 rhebus I can't read, sorry: "If any value in the series is eqv to the limit value, the series terminates, including that final limit value. For any value after the first lefthand value, if that value and the previous value fall on opposite sides of the limit, the series terminates without including either the limit value or the value that exceeded the limit."
21:12 BillN1VUX fall on opposite.
21:12 rhebus aaah so they're always above sqrt(2) so the limit doens't terminate
21:12 BillN1VUX i see.  both 2 3 are >
21:12 BillN1VUX yup
21:12 BillN1VUX that's behavior seen
21:13 rhebus could hack a fix with 2+sqrt $n
21:14 sahadev left #perl6
21:14 BillN1VUX would be close enough
21:15 rhebus night all o/
21:15 BillN1VUX so FAD and it's bug in the example. thanks.  going to use this example with Rakudo* demo for our PM group
21:18 rhebus left #perl6
21:20 shortcircuit BillN1VUX: The code on Rosetta Code is all visitor-contributed. Somone indicated that it worked with Rakudo, but that template usually means that a code example depends on a particular implementation of a language. We have no automated testing or unit tests. Any code review is done at the charity of time of other visitors.
21:21 BillN1VUX shortcircuit: understood.  odd that someone labelled it as working with the exact version it fails with.
21:22 BillN1VUX shortcircuit: is Rosetta culture normal wiki culture of see something wrong, log in and fix it ?
21:22 Ross^ left #perl6
21:36 BillN1VUX shortcircuit: interesting, p6eval and TimToady are both on #RosettaCode  too
21:37 shortcircuit BillN1VUX: Yeah
21:37 shortcircuit BillN1VUX: By all means, if something's broken, fix it. If you do something that's against the grain of the wiki, someone will leave a note on your talk page and help you integrate.
21:38 BillN1VUX maybe I'll register so I can fix that and fix credit on Abigail's primality Regex - which is stated as translation from Python.
21:39 Guest23195 left #perl6
21:40 nimiezko left #perl6
21:40 alester left #perl6
21:41 lichtkind mberends: ohai
21:42 tylercurtis left #perl6
21:47 kst`` joined #perl6
21:48 kst` left #perl6
21:49 kst`` is now known as kst
22:01 svetlins left #perl6
22:01 svetlins joined #perl6
22:02 svetlins left #perl6
22:03 svetlins joined #perl6
22:05 lue [stupid question time] It's not really mentioned, but I assume the Pod6:: organization is required?
22:05 svetlins left #perl6
22:06 svetlins joined #perl6
22:07 svetlins left #perl6
22:07 svetlins joined #perl6
22:15 svetlins left #perl6
22:15 svetlins joined #perl6
22:18 svetlins left #perl6
22:18 svetlins joined #perl6
22:20 svetlins left #perl6
22:20 lue afk
22:20 svetlins joined #perl6
22:22 svetlins left #perl6
22:22 svetlins joined #perl6
22:24 TimToady http://rosettacode.org/wiki/Hofstadter-Conway_$10,000_sequence#Perl_6
22:24 svetlins left #perl6
22:24 svetlins joined #perl6
22:26 svetlins left #perl6
22:26 svetlins joined #perl6
22:27 M_o_C left #perl6
22:27 rgrau_ joined #perl6
22:27 svetlins left #perl6
22:28 svetlins joined #perl6
22:29 svetlins left #perl6
22:30 svetlins joined #perl6
22:32 plobsing_ joined #perl6
22:32 svetlins left #perl6
22:32 svetlins joined #perl6
22:34 svetlins left #perl6
22:34 svetlins joined #perl6
22:37 svetlins left #perl6
22:37 svetlins joined #perl6
22:40 svetlins left #perl6
22:40 svetlins joined #perl6
22:42 svetlins left #perl6
22:43 svetlins joined #perl6
22:45 diakopter sorear: ping
22:46 diakopter I'm getting an '_xact' node that is an arrayref blessed as 'STD::P6' ... any ideas?
22:46 svetlins left #perl6
22:46 diakopter while parsing position 173765 of STD.pm6
22:46 diakopter :)
22:46 svetlins joined #perl6
22:47 diakopter svetlins: yer connection flappeth
22:47 svetlins left #perl6
22:47 diakopter :/
22:48 sorear diakopter: I'm only now starting to understand how the _xact system works
22:49 diakopter ok..
22:49 diakopter I'm only now starting to learn of the existence of the _xact system
22:49 diakopter :)  what is it?
22:50 sorear it's how STD/Cursor handles cut operators
22:51 diakopter oh, ok
22:51 sorear _xact nodes reify choice points
22:52 diakopter cool, makes sense.  I handled that in perlesque's grammar engine, just not with a cute name like that
22:52 sorear &CursorBase::_COMMITLTM (/ :: /) walks the _xact list to commit all choice points until the last open |-alternation
22:52 sorear etc
22:53 sorear theoretically, all _xact nodes are supposed to be stripped out during the match-building process and you shouldn't see them outside the dynamic scope of ->parse
22:55 diakopter :)
22:55 diakopter well they're there, creeping around my parse tree result
22:56 diakopter STD::Regex::_X_SsSlash
22:56 diakopter is the node under which the first appears
22:57 diakopter STD::Q::_X_SQcc::_X_SsBra_Ket is another
22:57 diakopter they're all one of those two types, so far
23:00 sorear mm nibblers
23:04 * diakopter adds an exception to ignore/strip _xact nodes
23:04 diakopter (to my emitter)
23:05 diakopter C:\perl6\std>perl sprixel_csv.pl STD.pm6 >out3.csv
23:05 diakopter hah
23:07 diakopter interesting... I think it finished
23:07 diakopter now to see how long the reader takes to reconstruct the asg
23:07 diakopter ooo 10 seconds
23:07 diakopter not awful
23:10 diakopter the tree takes 360MB of .net memory; heh
23:12 diakopter 24,311,313 out3.csv
23:12 diakopter bytes
23:12 diakopter so about twice Storable's
23:12 diakopter does Storable use compression?
23:13 Bucciarati joined #perl6
23:13 jhuni joined #perl6
23:15 diakopter the .csv compresses nicely to 3.1MB
23:15 diakopter extracts in .5s
23:15 * diakopter slows down the channel spamming
23:21 diakopter sorear: do you think it's ok if I add sprixel_csv.pl to std/tools/
23:22 * diakopter clicks wildly around in TortoiseGit
23:27 patrickas joined #perl6
23:32 patrickas the new rosetta code for primality test seems awfully complicated
23:33 patrickas http://rosettacode.org/wiki/Primality_by_trial_division#Perl_6
23:33 rgrau_ left #perl6
23:34 sorear diakopter: it's ok
23:34 echosystm joined #perl6
23:34 echosystm hi guys
23:34 sorear diakopter: don't think Storable uses compression, but it is a binary format
23:34 sorear hi echosystm
23:35 echosystm a problem i'm having in perl 5 is the lack of class/static methods and variables
23:35 rgrau_ joined #perl6
23:35 sorear echosystm: perl 5 doesn't have class members at all; the standard way to fake a class variable is 'our'
23:36 echosystm yep
23:36 echosystm now my question is, will this be improved at all in perl 6?
23:36 echosystm in php and python, it's possible to do "late static binding"
23:36 sorear well, perl 6 has actual classes
23:37 sorear rakudo: class Foo { method bar() { say "hi" } }; Foo.bar
23:37 p6eval rakudo 77a72a: OUTPUT«hi␤»
23:37 sorear perl 6 doesn't have static methods as such; every method can be used as static if it doesn't access instance slots
23:38 echosystm yep
23:38 echosystm i understand and that is what we do in perl5
23:38 patrickas left #perl6
23:38 sorear then why are you asking me?
23:38 echosystm but theres no concept of late binding in perl 5
23:38 echosystm for example
23:38 sorear there's no concept of anything but late binding in perl 5
23:38 sorear except for operators
23:38 rgrau_ left #perl6
23:39 aesop joined #perl6
23:39 echosystm this is difficult for me to explain
23:39 echosystm in python and php, i can create a class with a class variable $a
23:39 echosystm i can then declare a static method referencing theCurrentClass::$a
23:40 echosystm when i subclass this class and override the value of $a, the inherited static method will now point to the new value of $a
23:40 sorear I don't understand why you're here
23:40 echosystm this isnt possible in perl 5
23:40 echosystm and im trying to find out if it is possible in perl 6
23:41 sorear You're wrong.  MooseX::ClassAttribute
23:42 echosystm will this be possible in perl 6 without the overhead of another library?
23:44 sorear That is a very silly question
23:44 diakopter libraries aren't overhead, necessarily.
23:44 diakopter not everything can be "native"
23:44 sorear If you take away the culture of creating and using libraries, there is no reason to keep using Perl
23:45 sorear anyways, the answer is in S12
23:45 echosystm libraries shouldn't be required to compensate for lacking features in the language
23:45 echosystm thats part of the reason people have such a love-hate relationship with perl
23:46 echosystm our company uses 100% perl, but everyone hates it for reasons like this
23:46 echosystm i'm not trying to troll or put the wind up you, but it needs to be said
23:46 sorear sheesh
23:47 diakopter the same attitude explains the Perl6 features-kitchensink-ness ... there are almost always more than layer of primitives in languages
23:47 diakopter more than 1
23:47 sorear echosystm: we try not to be hostile here, and we expect newcomers to do the same.
23:47 diakopter sorry, that last msg should've been split into 2
23:47 BillN1VUX patrickas: sadly the old code failed
23:47 smash left #perl6
23:48 echosystm im not trying to be hostile, im just trying to be honest
23:48 BillN1VUX patrickas: discussed the problem here 2 hours ago
23:48 echosystm constructive criticism isn't always easy to swallow
23:49 echosystm basically everyone at our company is hoping for perl6 to be the fresh start that will save our sanity
23:49 sorear the syntax is "our $.foo" btw
23:50 diakopter echosystm: may I ask how many perl folks at your company
23:50 echosystm we have about ~50 developers, but most of our ~60 odd network "engineers" use perl on a daily basis
23:51 diakopter it's hard to assess your claim "everyone hates it for reasons like this"
23:52 diakopter because "reasons like this" can be very very big
23:52 echosystm of course, its a sweeping generalisation
23:52 echosystm i should have been more verbose
23:53 plobsing_ left #perl6
23:53 echosystm most of the people i interact with here dislike having to use Moose - they see it as a failure of the language
23:54 diakopter think about it the other way
23:55 diakopter if you just had the fancy object layers, but no access to muck around in the guts of the low-level primitives, they would complain about that.
23:56 echosystm well, one would think that, yet most here prefer java which is obviously far more abstract
23:57 chromatic joined #perl6
23:57 diakopter the fancy object layers have to be implemented somewhere.. they probably have a very skewed idea of how much "runtime overhead" the fancy object layers bring.
23:57 diakopter chromatic: o hai :)  good timing
23:57 chromatic Gentlemen, don't be rude.
23:57 chromatic echosystm has a valid point.
23:58 chromatic With that said, echosystm, unless very very fast and frequent startup is a necessity for your applications, the Moose penalty is minimal.
23:58 chromatic The benefits are large.
23:58 echosystm i think everyone here is going to be happy with perl6
23:58 echosystm i think our WTFs per minute will definitely be reduced :P
23:59 echosystm but the topic of class methods/variables is still a bit of an issue
23:59 chromatic echosystm, your coworkers may benefit from reading: http://www.modernperlbooks.com/drafts/modern_perl/chapter_07.html
23:59 echosystm in the perl community there seems to be this idea that class members are a bastardisation of a pure object model

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

Perl 6 | Reference Documentation | Rakudo