Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2010-08-28

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:02 Psyche^ joined #perl6
00:03 Patterner left #perl6
00:03 Psyche^ is now known as Patterner
00:04 masonkramer left #perl6
00:09 Boyo joined #perl6
00:09 Boyo is now known as Boyo17
00:10 meppl left #perl6
00:11 risou left #perl6
00:11 dalek 6model: 78103c0 | ++ | java/runtime/ (7 files):
00:11 dalek 6model: [java] expand the dependency circle with Context and ThreadContext
00:11 dalek 6model: review: http://github.com/jnthn/6model/commit/78103c0042b7defcceda68fc2cdffa8c7e706cd8
01:07 hsb left #perl6
01:11 isBEKaml joined #perl6
01:30 drbean joined #perl6
01:39 sekimura left #perl6
01:46 justatheory left #perl6
01:47 masonkramer joined #perl6
01:47 justatheory joined #perl6
01:48 jaldhar joined #perl6
02:14 masonkramer left #perl6
02:15 Boyo17 left #perl6
02:40 Holy_Cow joined #perl6
02:40 Holy_Cow left #perl6
02:56 justatheory left #perl6
03:06 whiteknight left #perl6
03:07 sftp_ left #perl6
03:33 tylercurtis joined #perl6
03:44 molaf joined #perl6
03:45 envi^home joined #perl6
03:52 _twitch joined #perl6
04:07 zorgnax left #perl6
04:07 synth joined #perl6
04:17 hercynium left #perl6
04:19 molaf left #perl6
04:35 plobsing left #perl6
04:42 tylercurtis What context is the last statement in a compilation unit in? Sink?
04:46 isBEKaml .u �
04:46 phenny UnicodeDecodeError: 'utf8' codec can't decode byte 0xb8 in position 0: unexpected code byte (file "/usr/lib/python2.5/encodings/utf_8.py", line 16, in decode)
04:46 isBEKaml pytohn? :)
04:46 isBEKaml Not bad.
04:51 hans__ joined #perl6
04:54 hans__ hi I am new to perl 6 I'll need some help
04:54 tylercurtis hans__: What do you need help with?
05:00 hans__ some tests because I'm new to irc, too
05:00 patspam left #perl6
05:01 hans__ how can I add 2 numbers and print to the screen?
05:05 hans__ \msg p6eva rakudo say 37 + 5
05:06 hans__ \msg p6eval rakudo say 37 +5
05:06 isBEKaml hans__: you need a forward slash. Like so, "/msg p6eval rakudo: say 37 + 5"
05:06 hans__ thank you
05:07 azert0x left #perl6
05:07 isBEKaml np and welcome to perl6! hang out here more often. :)
05:11 drbean left #perl6
05:16 cognominal left #perl6
05:23 hans__ how do you parse options in a perl6 program? (e.g. getopt in perl5)
05:23 tylercurtis hans__: http://perlcabal.org/syn/S06.html#Declaring_a_MAIN_subroutine
05:26 tylercurtis hans__: http://perlgeek.de/en/article/5-to-6#post_14 is a more tutorial-like article about MAIN subs.
05:28 cognominal joined #perl6
05:30 fod left #perl6
05:31 plobsing joined #perl6
05:38 isBEKaml http://perl6advent.wordpress.com/2009/12/24/day-24-the-perl-6-standard-grammar/
05:39 isBEKaml the link to Rakudo's Grammar.pm in the page is broken. It points to ng.
05:39 isBEKaml I think it should point to master always.
05:49 Guest23195 joined #perl6
05:50 plobsing left #perl6
05:55 sorear if you want to get fancier, you can also use the @*ARGS array
05:57 sorear ng is master, no?
05:58 isBEKaml sorear: I thought so, when I clicked on the link. github threw me a 404.
06:00 isBEKaml Do anyone of you have a link to get the text of day24 in p6advent2009 calendar? firefox here is hung over that I'm building rakudo. :(
06:00 isBEKaml Or is available anywhere in pugs repo?
06:01 mberends isBEKaml: http://svn.pugscode.org/pugs/t/spec/integration/
06:02 isBEKaml mberends: that's the test. I wanted "Text".
06:02 isBEKaml mberends: I'm viewing it over lynx, but that's pretty uncomfortable. :/
06:03 mberends oops, misread (just woken up). I'll try.
06:04 thepler left #perl6
06:07 isBEKaml mberends: :) thanks.
06:08 mberends isBEKaml: http://nopaste.snit.ch/23180
06:09 isBEKaml mberends: oh, you still haven't had your coffee? Day24. :D
06:09 mberends oh :D
06:09 isBEKaml mberends: well, never mind. I'm about to finish it. :D
06:11 hans__ thank you for the tip, bye
06:11 hans__ left #perl6
06:11 mberends isBEKaml: no, gotta get it right now... ;) (Booting the numb skull)
06:12 isBEKaml mberends++ # MOAR COPHEEE
06:14 mberends isBEKaml: http://nopaste.snit.ch/23181 : Perl 6 Advent Calendar 24th December 2009 - The Perl 6 standard grammar - pmichaud
06:14 mberends ok, I feel awake now :)
06:18 isBEKaml mberends: :)
06:24 lue how can I make a range/series count by, say, every other number? (i.e. have 0..10 count 0,2,4,6,8,10)
06:28 isBEKaml rakudo: (0,2 ... *).munch(6).say
06:28 p6eval rakudo a20e62: OUTPUT«0246810␤»
06:28 isBEKaml lue: ^^
06:29 lue rakudo: say (0,2 ... 10)
06:29 p6eval rakudo a20e62: OUTPUT«0246810␤»
06:29 lue thank you. [the spec said that  0 ... *+2, 10  would work. It doesn't, so I was a bit confused]
06:30 isBEKaml pfft, YAGNI moment. But never mind. :)
06:31 TimToady 0, *+2 ... 10 is what the spec says
06:34 jhuni joined #perl6
06:35 lue S03:3380 states otherwise [which is where I found information].
06:39 molaf joined #perl6
06:41 pugssvn r32108 | lwall++ | [S03] fix fossil found by lue++
06:41 TimToady the section that is about the series operator is more authoritative
06:41 molaf left #perl6
06:42 lue rakudo: my $a = "hello there"; my @b = $a.comb[$_] for 0..3; say @b
06:42 p6eval rakudo a20e62: OUTPUT«l␤»
06:42 lue now why am I suddenly unable to do this? [I'm pretty sure I have it right]
06:43 TimToady you donh't
06:43 TimToady you're reiniting @b each time
06:44 lue aah.
06:44 lue rakudo: my $a = "hello there"; my @b; @b = $a.comb[$_] for 0..3; say @b
06:44 p6eval rakudo a20e62: OUTPUT«l␤»
06:44 TimToady the assignment operator clobbers @b
06:45 TimToady it's not the same as a push
06:45 tylercurtis rakudo: my $a = "hello there"; my @b = ($a.comb[$_] for 0..3); say @b
06:45 p6eval rakudo a20e62: OUTPUT«␤»
06:45 tylercurtis rakudo: my $a = "hello there"; my @b ,= $a.comb[$_] for 0..3; say @b
06:45 p6eval rakudo a20e62: OUTPUT«hell␤»
06:45 TimToady what you want is a 0..3 subscript to slice it
06:47 lue rakudo: my $a = "hello!"; my @b = $a.comb[0, 2 ... $a.chars]; say @b
06:47 p6eval rakudo a20e62: OUTPUT«hloAny()␤»
06:48 shade\ left #perl6
06:48 lue rakudo: my $a = "hello!"; my @b = $a.comb[0, 2 ... ^$a.chars]; say @b
06:48 p6eval rakudo a20e62: OUTPUT«hello!␤»
06:48 lue rakudo: my $a = "hello!"; my @b = $a.comb[0, 2 ...^ $a.chars]; say @b
06:48 p6eval rakudo a20e62: OUTPUT«hello!␤»
06:49 TimToady rakudo: my $a = "hello!"; say $a.comb[0, 2 ... *]
06:49 p6eval rakudo a20e62: OUTPUT«(timeout)»
06:49 TimToady heh
06:50 lue rakudo: my $a = "hello!"; say $a.comb[$_] for 0, 2 ... *
06:50 p6eval rakudo a20e62: OUTPUT«(timeout)()␤Any()␤Any()␤Any()␤Any()␤Any()␤Any()␤Any()␤Any()␤Any()␤Any()␤Any()␤Any()␤Any()␤Any()␤Any()␤Any()␤Any()␤Any()␤Any()␤Any()␤Any()␤Any()␤Any()␤Any()␤»
06:52 TimToady rakudo: my $a = "hello!" say $a.comb[0,2...$a.chars-1]
06:52 p6eval rakudo a20e62: OUTPUT«===SORRY!===␤Confused at line 22, near "my $a = \"h"␤»
06:52 TimToady rakudo: my $a = "hello!"; say $a.comb[0,2...$a.chars-1]
06:52 p6eval rakudo a20e62: OUTPUT«hlo␤»
06:52 TimToady that will have to do for now, till subscripts trim infinite lists correctly
06:53 TimToady or till ...^ implemented
06:54 lue rakudo: my $a = "hello"; say $a.comb[0,2...$a.chars-1]
06:54 p6eval rakudo a20e62: OUTPUT«hlo␤»
06:55 shade\ joined #perl6
06:58 shade\ left #perl6
06:58 lue rakudo: my $a = "hello!"; say $a.comb[1,3...$a.chars-1]
06:58 p6eval rakudo a20e62: OUTPUT«el!␤»
06:59 lue rakudo: my $a = "hello"; say $a.comb[1,3...$a.chars-1]
06:59 p6eval rakudo a20e62: OUTPUT«el␤»
07:02 isBEKaml left #perl6
07:02 shade\ joined #perl6
07:03 isBEKaml joined #perl6
07:05 lue is there an easy way to turn every element in an array (say [1,2,3]) into a string?
07:05 moritz_ ~<<[1, 2, 3]
07:05 moritz_ .map ~*
07:06 TimToady .map *.=Str to do it in place
07:06 lue Ah, I forgot that ~ strigifies.
07:06 TimToady well, with a colon
07:06 lue [IIUC, I'm trying to implement the Luhn test for Rosetta Code]
07:08 isBEKaml rakudo: (0...^ 6).perl.say
07:08 p6eval rakudo a20e62: OUTPUT«((0), [1, 2, 3, 4, 5])␤»
07:08 isBEKaml rakudo: (0 ... ^6).perl.say
07:08 p6eval rakudo a20e62: OUTPUT«((0), [1, 2, 3, 4, 5])␤»
07:08 TimToady doesn't know that yet
07:08 TimToady std: 0 [...^] 6
07:08 p6eval std 32108: OUTPUT«[31m===[0mSORRY![31m===[0m␤Unable to parse bracketed infix at /tmp/C2mxzvJEsY line 1:␤------> [32m0 [33m⏏[31m[...^] 6[0m␤Couldn't find final ']'; gave up at /tmp/C2mxzvJEsY line 1:␤------> [32m0 [...[33m⏏[31m^] 6[0m␤Parse failed␤FAILED 00:01 115m␤»
07:09 isBEKaml Why is '0' separated from the rest?
07:09 TimToady curious
07:09 isBEKaml and, I'm curious about the difference between '0 ... ^6' and '0 ...^ 6'. Is there any?
07:10 TimToady no
07:10 TimToady not yet
07:10 TimToady not till it's implemented
07:10 _twitch left #perl6
07:10 isBEKaml :0
07:10 TimToady rakudo: say 0 ... 0,1,2,3,4,5
07:10 p6eval rakudo a20e62: OUTPUT«012345␤»
07:10 isBEKaml what would be the difference then?
07:11 TimToady rakudo: say 0 ... (0,1,2,3,4,5)
07:11 p6eval rakudo a20e62: OUTPUT«012345␤»
07:11 TimToady ...^ would do what you want, and ...  ^ wouldn't
07:11 TimToady rakudo: say 0 ... [0,1,2,3,4,5]
07:11 p6eval rakudo a20e62: OUTPUT«012345␤»
07:11 TimToady rakudo: say 0 ... 0..5
07:12 p6eval rakudo a20e62: OUTPUT«012345␤»
07:12 drbean joined #perl6
07:13 gfx joined #perl6
07:13 isBEKaml I think I get it. Also, the output here is somewhat confusing - a20e62: OUTPUT�((0), [1, 2, 3, 4, 5])NL�
07:13 TimToady kinda looks like someone tried to implement ...^ and failed
07:14 TimToady but that wouldn't explain 0 ... ^6
07:14 isBEKaml it's the same in both (with and without space)
07:14 TimToady rakudo: say 0 ... (^6)
07:14 p6eval rakudo a20e62: OUTPUT«012345␤»
07:14 TimToady beats me
07:15 isBEKaml I think .perl is the culprit.
07:15 isBEKaml rakudo: say (0 ... (^6)).perl;
07:15 p6eval rakudo a20e62: OUTPUT«((0), [1, 2, 3, 4, 5])␤»
07:15 isBEKaml :|
07:15 lue rakudo: say (0 ...^ 6).Str; say (0 ... ^6).Str;
07:16 p6eval rakudo a20e62: OUTPUT«0 1 2 3 4 5␤0 1 2 3 4 5␤»
07:26 moritz_ (grammar.pm link fixed on the advent calendar)
07:38 zulon joined #perl6
07:42 dalek 6model: 451f57c | ++ | java/runtime/ (3 files):
07:42 dalek 6model: [java/runtime/Makefile] update the circular dependency diagram, uncomment most parts of Context
07:42 dalek 6model: review: http://github.com/jnthn/6model/commit/451f57c9ae1bb20ebe686e861dd103053aedd9fe
07:43 isBEKaml java runtime? why don't I see the author here than just the '++' :)
07:44 sorear it's mberends, but dalek fails as usual on it
07:44 mberends isBEKaml: my git settings are slightly br0ken on this project
07:44 isBEKaml mberends! awesome. :)
07:44 mberends other projects work fine from the same computer
07:45 mberends I like the ascii art in the Makefile :)
07:45 moritz_ mberends: usually it's fine to have username and email in the global git config, and no user/email in the per-repo config at all
07:45 sorear mberends: you are familiar with the way dalek gets nicknames, right?
07:46 * sorear achieves Enlightenment Level 1 with the nqp-rx parser engine
07:47 zulon left #perl6
07:51 mberends moritz_, sorear: I'm totally ignorant about dalek's workings. I have only global git settings and they work with other projects (rakudo etc). Also 6model commits displayed fine initially but dalek began dropping my ID after a while. The 6model git log still records my name the same as before. I can't be bothered much to look into it right now, in a few days I'll be at home and will try pushing from a clone on another computer.
07:52 moritz_ mberends: I also noticed that git log showed your name correctly. (which is why I wondered why you attributed it your git config, not dalek)
07:53 isBEKaml mberends: I think you'll have to look at user.name and user.email listings in git config --list
07:54 mberends isBEKaml: just checked, and it's only global user.name and user.email. :-(
07:55 isBEKaml mberends: I think if your commits show up properly int he logs, it's dalek that's the problem not your config settings.
07:55 moritz_ curl http://github.com/api/v2/yaml/commits/list/jnthn/6model/master
07:55 moritz_ shows that the 'login' field is empty
07:55 moritz_ which I don't understand
07:56 moritz_ mberends: ah, you use a different email address than that registered with github
07:57 moritz_ (github vs. mberends) @ autoexec.demon.nl
07:57 moritz_ maybe that causes github not to recognize your commits as coming from the 'mberends' github account
07:58 isBEKaml moritz_: I'm curious. I can see mberend's commits in the git repo logs I just cloned.
07:59 isBEKaml moritz_: even the email you refer to is seen to the same in the git logs and the curl output.
07:59 isBEKaml or am I missing something?
08:00 moritz_ isBEKaml: but it's not the one you see on http://github.com/mberends/
08:00 moritz_ isBEKaml: and since git allows you to push other people's commits, there has to be a way to map the commits back to a nickname
08:00 mberends moritz_: that makes a lot of sense. I should rename my global user.email to github@autoexec, it's part of my spam management strategy.
08:00 moritz_ s/nickname/github login/
08:01 moritz_ I've also asked Infinoid to make the author info fallback to the name if login is empty
08:02 isBEKaml moritz_: ah, makes sense. gravatars and email mapping.
08:07 isBEKaml mberends: is there any reason you have put xml like entries in a string of single line comments?
08:07 isBEKaml mberends: I kind of find that distracting when looking over the java code. :)
08:08 zulon joined #perl6
08:09 mberends isBEKaml: I usually prefer a mx line length of 72 chars (for POD etc) but this was trying to deviate as little as possible from the C# original. So I blame jnthn++ ;)
08:09 wamba joined #perl6
08:10 isBEKaml mberends: if you're trying to document the methods that are there in the java code, you're probably better off with javadoc comments unless you want to generate pods from them. :)
08:11 isBEKaml mberends: also, you can use /* ... */ multiline comments. /// is rather distracting to code-reading.
08:12 mberends isBEKaml: so I agree with you, I don't like the long lines either. I do plan to improve the comments. It's nice to be motivated by knowing people like you are reading them :-)
08:14 sorear aha
08:15 sorear using github's data is _so much smarter_
08:15 sorear back before the move to github api, dalek got usernames by scraping CREDITS
08:15 sorear parrot's CREDITS.
08:15 sorear no matter what project you were on
08:16 isBEKaml mberends: I was only curious when I was cloning the repo. But now I'm interested! =)
08:16 tylercurtis Good night, #perl6.
08:17 mberends isBEKaml: jnthn++ has been above average in commenting his C# code, but to me it is still not explanatory enough. After I've hacked some more code to 1) compile, and 2) run? I'll definitely add more docs.
08:17 isBEKaml mberends: I cannot speak for C#, but I sure can help around with java.
08:18 mberends isBEKaml: cool! Patches Welcome (tm) as always :)
08:18 isBEKaml mberends: ah, looking over C# code, I see that you have tried to retain much of what is there. :)
08:19 tylercurtis left #perl6
08:19 mberends isBEKaml: especially when I don't understand (yet) what it all does.
08:19 Mowah joined #perl6
08:20 isBEKaml mberends: I don't have the full picture either. More than once, I was wondering "What is he trying to do?"
08:22 mberends isBEKaml: learning more is my main reason working on this.  Oh, and collecting karma points.
08:23 isBEKaml mberends++ I will try going over it sometime. If I do "get" something, you'll definitely see me pushing patches! :)
08:24 isBEKaml s/pushing/\1 git pull/
08:24 mberends isBEKaml: an interesting "challenge" is guessing what is in some of the files that jnthn has not committed yet, but uses on the dotnet side ;)
08:25 isBEKaml mberends: not committed yet?
08:25 isBEKaml I don't understand.
08:26 isBEKaml mberends: Ah, mind reading and anticipation! :D
08:26 mberends isBEKaml: in the dotnet/ tree there are references to classes for which no source files have been pushed.
08:27 * mberends must show jnthn the 'git status' command some time
08:35 isBEKaml mberends: your makefile is pretty weird. you have added every class as a target in it.
08:35 isBEKaml mberends: why not just compile them all together? or simpler, use ant?
08:36 mberends isBEKaml: I'm trying to keep things portable for Windows nmake, which is not as clever as GNU make.
08:37 isBEKaml mberends: No, that is not what I meant. javac has some switches that enable you to compile all classes.
08:37 isBEKaml mberends: ant works fine on windows too.
08:38 dalek 6model: 3aa2fd7 | mberends++ | java/runtime/Rakudo/Metamodel/KnowHOW/KnowHOWBootstrapper.java:
08:38 dalek 6model: [KnowHOWBootstrapper.java] a mostly commented out version, mainly for karma points
08:38 dalek 6model: review: http://github.com/jnthn/6model/commit/3aa2fd7b068d4a5945529e429fbf9df74803ffdc
08:39 mberends isBEKaml: I'll look into it, unless you beat me to it. But if ant is an extra dependency to install on Windows, I'm reluctant to add that to the beginner's requirements list.
08:41 isBEKaml mberends: every java user would know about ant i think. Besides, I don't think you're going to allow the end user to build classes themselves, right? YOu're only going to provide the compiled binaries. So it's just a build dependency.
08:42 isBEKaml mberends: s:1st/user/developer/
08:46 mberends isBEKaml: yes Ant is well known.  The beginner developer may or may not have it, and so far I do not mind maintaining a few extra Makefile lines to lower the barrier to getting started. I hope jnthn will soon be trying to compile the java code, and I'd rather not hassle him with needing to install Ant if he doesn't have it yet.
08:49 mberends moritz_, sorear: \o/ I got my karma points, thanks for the help!
08:50 isBEKaml mberends: hmmm, forked the repo. I expect some miracle will happen soon! :)
08:50 * isBEKaml hopes for a miracle opening....
08:50 mberends isBEKaml: anticip....ation! # sorry, Rocky Horror
08:54 mberends afk & # England -> Slovenia -> Netherlands
08:55 moritz_ Slovenia doesn't look like the shortest route to me, if you want to travel from England to the Netherlands :-)
09:03 isBEKaml mberends: :)
09:07 mberends the route is more -Ofun that -Ofast
09:07 sorear does anyone else want to share the karma from niecza?
09:07 sorear ;)
09:08 mberends sorear: yes, please. Do you charge in tuits?
09:09 sorear tuits and inspiration
09:11 sorear rakudo: say "foo" ~~ /<from>/
09:11 p6eval rakudo a20e62: OUTPUT«Method '!cursor_names' not found for invocant of class 'Integer'␤  in <anon> at line 22:/tmp/MurOlDi3PK␤  in 'Cool::match' at line 2404:CORE.setting␤  in 'Regex::ACCEPTS' at line 5812:CORE.setting␤  in main program body at line 22:/tmp/MurOlDi3PK␤»
09:11 sorear rakudo: say "foo" ~~ /<next>/
09:11 p6eval rakudo a20e62: OUTPUT«␤»
09:12 zulon left #perl6
09:14 isBEKaml tuits,what do they mean?
09:15 isBEKaml tuits seems to be the currency here. :)
09:15 sorear puns.
09:15 moritz_ sometimes you just don't get aroundtoit
09:15 moritz_ that's when you need a round tuit
09:15 isBEKaml punnderrrific!
09:19 M_o_C joined #perl6
09:19 M_o_C left #perl6
09:19 M_o_C joined #perl6
09:23 drbean left #perl6
09:23 patch hasn't been updated since the star 2010.07 download: http://rakudo.org/how-to-get-rakudo
09:26 mberends left #perl6
09:29 moritz_ updated, thanks
09:29 moritz_ phenny: tell pmichaud when you write a release guide for *, be sure to mention updating http://rakudo.org/how-to-get-rakudo
09:29 phenny moritz_: I'll pass that on when pmichaud is around.
09:38 gfx left #perl6
09:42 meppl joined #perl6
09:43 risou_ joined #perl6
09:46 dalek left #perl6
09:46 dalek joined #perl6
09:50 risou_ left #perl6
09:57 dalek rakudo: a3d4be0 | moritz++ | src/core/Range.pm:
09:57 dalek rakudo: delete trailing blanks in Range.pm
09:57 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/a3d4be0e6d831f8d17b611f8c0953806bda15930
09:59 risou_ joined #perl6
10:00 TiMBuS is .so still part of the perl 6 spec?
10:00 TiMBuS there's already .Bool and prefix:<?>
10:00 moritz_ rakudo: say 3.so
10:00 p6eval rakudo a20e62: OUTPUT«1␤»
10:03 TiMBuS or is .Bool not the proper way to do it
10:03 * moritz_ would be fine with removing .s
10:03 moritz_ .so
10:04 moritz_ but since it's spec, I've implemented it
10:04 TiMBuS hmm
10:04 TiMBuS rakudo: say (my @a).so
10:04 p6eval rakudo a20e62: OUTPUT«0␤»
10:05 TiMBuS oh right, thats different to what i was thinking
10:05 TiMBuS rakudo: say (my @a).defined
10:05 p6eval rakudo a20e62: OUTPUT«1␤»
10:07 TiMBuS also, is there a reason behind .Bool and .Str being Ucfirst as opposed to .list and .hash?
10:10 risou_ left #perl6
10:12 risou_ joined #perl6
10:13 moritz_ I guess it's because .list and .hash refer to syntactic forms
10:13 moritz_ @() -> .list,  %() -> .hash
10:13 moritz_ not sure if that's a good reason though
10:13 TiMBuS thats what I was thinking
10:13 risou_ left #perl6
10:16 hans__ joined #perl6
10:22 moritz_ phenny: tell ash_ that I made FORBID_PIR persist between REPL lines
10:22 phenny moritz_: I'll pass that on when ash_ is around.
10:24 hans__ left #perl6
10:24 moritz_ rakudo: my $1
10:24 p6eval rakudo a20e62:  ( no output )
10:27 dalek rakudo: a821f58 | moritz++ | src/Perl6/Actions.pm:
10:27 dalek rakudo: change FORBID_PIR from contextual to global; this makes it persist through multiple REPL lines
10:27 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/a821f587479e91e0b640cc64d4e1b237f466ec10
10:30 bbkr left #perl6
10:35 sorear TiMBuS: in S13 or S14, .(type name) is how Perl 6 does explicit coercions
10:35 sorear right now it's just a convention but we plan to tie it into my Int $x and similar... eventually... somehow...
10:36 sorear Bool and Str are type names
10:36 TiMBuS as is Hash and List
10:36 moritz_ it's used by the sub f ($x as Int) { ... }   syntax
10:36 sorear %() does not return a Hash, @() does not return a List
10:36 TiMBuS er.
10:37 moritz_ what does it return? Associative and Positional?
10:37 sorear in the former case, I think so
10:38 sorear but that's not central to the purpose of either operator
10:39 sorear e.g. Match ~~ Associative, but %($/) is emphatically not the same as $/
10:39 moritz_ STD.pm6 line 2376: <[\@\%\&]> # is there a good reason for those backslasshes?
10:39 sorear (if it was, why would the %() special case exist)
10:39 moritz_ sorear: good point
10:39 TiMBuS well calling the method forms .hash and .list was probably incorrect then
10:39 sorear TiMBuS: no, they're contextualizers, look at S02 again
10:40 moritz_ how would you name them?
10:40 sorear moritz_: perl 5 character classes are double quotish interpolating
10:41 moritz_ but STD.pm6 is suposed to be Perl 6, no?
10:41 TiMBuS if .hash doesnt make a Hash, it shouldnt be .hash? im not sure what I would call it
10:41 sorear TiMBuS: .hash is the contextualizer for hash context.  calling it anything else would be wrong
10:42 sorear moritz_: I am not going to touch the viv character class translator
10:42 moritz_ so it's a hack. Ok
10:42 TiMBuS .hashify
10:42 TiMBuS hashualize
10:43 sorear hashualize context is questionable grammar
10:43 moritz_ gesundheit!
10:43 TiMBuS well fine we can add hasualise as well :p
10:43 * moritz_ out
10:49 masonkramer joined #perl6
10:51 zulon joined #perl6
10:51 bbkr joined #perl6
10:57 masonkramer left #perl6
11:01 whiteknight joined #perl6
11:04 M_o_C left #perl6
11:10 [Coke] left #perl6
11:11 [Coke] joined #perl6
11:17 Italian_Plumber joined #perl6
11:26 [Coke] left #perl6
11:27 [Coke] joined #perl6
11:32 azert0x joined #perl6
11:40 shade\ left #perl6
11:41 shade\ joined #perl6
11:43 isBEKaml_ joined #perl6
11:46 zulon left #perl6
12:04 stepnem left #perl6
12:06 stepnem joined #perl6
12:06 drbean joined #perl6
12:08 colomon loliblogged! http://justrakudoit.wordpress.com/2010/08/28/the-serial-operator-and-memoization/
12:17 shade\ left #perl6
12:25 snearch joined #perl6
12:29 gfldex colomon: i feel well informed now
12:29 shade\ joined #perl6
12:30 shade\ left #perl6
12:30 shade\ joined #perl6
12:31 shade\ left #perl6
12:31 sftp joined #perl6
12:32 dalek rakudo: 4ca5220 | moritz++ | src/Perl6/Grammar.pm:
12:32 dalek rakudo: forbid my $1
12:32 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/4ca5220bdefc2e018242f2bb5ce49ae57b18b3f0
12:33 shade\ joined #perl6
12:34 amkrankruleuen joined #perl6
12:35 amkrankruleuen Hi.
12:36 risou_ joined #perl6
12:48 timbunce joined #perl6
12:50 jhuni left #perl6
12:51 Ross joined #perl6
13:09 orafu left #perl6
13:09 orafu joined #perl6
13:12 Ross left #perl6
13:13 [Coke] left #perl6
13:20 Ross joined #perl6
13:26 drbean left #perl6
13:35 timbunce left #perl6
13:47 zulon joined #perl6
13:49 amkrankruleuen left #perl6
13:51 janosik joined #perl6
13:53 janosik left #perl6
14:09 zby_home_ joined #perl6
14:17 wamba left #perl6
14:19 ruoso joined #perl6
14:20 M_o_C joined #perl6
14:25 Ross left #perl6
14:27 M_o_C left #perl6
14:28 M_o_C joined #perl6
14:28 M_o_C left #perl6
14:29 M_o_C joined #perl6
14:31 plobsing joined #perl6
14:39 M_o_C left #perl6
14:55 zulon left #perl6
14:58 risou_ left #perl6
15:01 isBEKaml_ left #perl6
15:03 [Coke] joined #perl6
15:04 justatheory joined #perl6
15:06 molaf joined #perl6
15:06 M_o_C joined #perl6
15:07 M_o_C left #perl6
15:11 M_o_C joined #perl6
15:14 lanny joined #perl6
15:15 lanny rakudo: my $a = [0..300]; $a[^300].join(' ').say
15:15 p6eval rakudo 4ca522: OUTPUT«src/string/api.c:3341: failed assertion 'pos <= res->strstart + Buffer_buflen(res) + 1'␤Backtrace - Obtained 13 stack frames (max trace depth is 32).␤/home/p6eval//p2/lib/libparrot.so.2.7.0 [0x2b2f00dec1a3]␤/home/p6eval//p2/lib/libparrot.so.2.7.0(Parrot_confess+0x87)
15:15 p6eval ..[0x2b2f00dec2d…
15:18 grondilu joined #perl6
15:18 lanny That came in on the parrot upgrade in commit 03a9388.  I've submitted a rakudobug but hoping it can get looked at so it doesn't get into R*.
15:19 lanny Great work in perl6 and rakudo, all.  /me goes back to lurking.
15:19 lanny left #perl6
15:21 moritz_ I'll try to bisect, and see which parrot revision caused it
15:23 moritz_ I'm afraid it already went into the 2010.08 R* release
15:25 grondilu left #perl6
15:33 Mowah left #perl6
15:37 moritz_ star: my $a = [0..300]; $a[^300].join(' ').say
15:37 p6eval star 2010.07: OUTPUT«0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95
15:37 p6eval ..96 9…
15:38 moritz_ on rakudo  7b0031 I get some garbage out
15:38 moritz_ scalar scalar scalar ... scalar named named named named named named named named named named repr_P6opaque named $!llsig named 105 106 107 ... 194 195 1`�_}$!llsig2`�_}!llsig 2`�_}subtype_realtype`�_}Mu 213 2`�_}named7 2`�_}self21 2`�_}repr_P6opaque7 2`�_}!llsig 2`�_}subtype_realtype`�_}�2 243 2`�_}$!llsig2`�_}named1 2`�_}P6opaque`�_}$!flat 2`�_}@!rest 2`�_}$OUT67 2`�_}!llsig 2`�_}subtype_realtype`�_}Mu 281 2`�_}Mu 285 2`
15:39 moritz_ wtf?
15:39 Mowah joined #perl6
15:44 M_o_C left #perl6
15:45 M_o_C joined #perl6
15:46 M_o_C left #perl6
15:46 M_o_C joined #perl6
15:46 zulon joined #perl6
15:50 amiri joined #perl6
15:52 stepnem left #perl6
15:52 stepnem joined #perl6
16:04 patspam joined #perl6
16:10 amiri left #perl6
16:11 amiri joined #perl6
16:14 snearch left #perl6
16:15 isBEKaml moritz_: my local rakudo build at a20e62d shows the right output and doesn't spew garbage.
16:16 isBEKaml moritz_: masak++'s any-list was the last commit there. You might want to bisect it from there.
16:16 TimToady phenny: tell @tylercurtis depends on the compunit: eval returns a value, main doesn't
16:16 phenny TimToady: I'll pass that on when @tylercurtis is around.
16:17 justatheory left #perl6
16:18 moritz_ isBEKaml: it's a bit hard to bisect when I don't get the same output as the ticket suggests
16:18 moritz_ isBEKaml: it means that something is broken locally
16:18 moritz_ (probably on my machine)
16:18 moritz_ which is not a good precondition for bisecting
16:19 isBEKaml moritz_: oh
16:19 isBEKaml moritz_: I was thinking since I could get the right output, this brokenness was something recent, but then yours suggests that it goes way back.
16:22 moritz_ I get the garbage locally even on newest rakudo, and no segfault
16:23 isBEKaml moritz_: what's the ticket id anyway?
16:24 moritz_ isBEKaml: I haven't actually looked in the ticket, just saw the report from lanny++ in the backlog
16:26 TimToady I got garbage like that some days ago, and mentioned it here
16:29 TimToady here: http://irclog.perlgeek.de/perl6/2010-08-24#i_2739992
16:31 TimToady I'm running 2010.08-8-gd1015f0, and still makes the garbage.  will try a pull
16:37 tylercurtis joined #perl6
16:38 pmurias joined #perl6
16:39 TimToady It still malfs, and what's more, it's non-deterministic from run to run
16:39 TimToady rakudo: sub hailstone($n) { $n, -> $n { $n %% 2 ?? $n / 2 !! $n * 3 + 1 } ... 1; }; say ~hailstone(27);
16:39 p6eval rakudo 4ca522: OUTPUT«src/string/api.c:3341: failed assertion 'pos <= res->strstart + Buffer_buflen(res) + 1'␤Backtrace - Obtained 24 stack frames (max trace depth is 32).␤/home/p6eval//p2/lib/libparrot.so.2.7.0 [0x2b72dd2081a3]␤/home/p6eval//p2/lib/libparrot.so.2.7.0(Parrot_confess+0x87)
16:39 p6eval ..[0x2b72dd2082d…
16:40 TimToady rakudo: sub hailstone($n) { $n, -> $n { $n %% 2 ?? $n / 2 !! $n * 3 + 1 } ... 1; }; say ~hailstone(27);
16:40 isBEKaml uh, yeah. that's what I got here too.
16:40 p6eval rakudo 4ca522: OUTPUT«src/string/api.c:3341: failed assertion 'pos <= res->strstart + Buffer_buflen(res) + 1'␤Backtrace - Obtained 24 stack frames (max trace depth is 32).␤/home/p6eval//p2/lib/libparrot.so.2.7.0 [0x2b445e9901a3]␤/home/p6eval//p2/lib/libparrot.so.2.7.0(Parrot_confess+0x87)
16:40 p6eval ..[0x2b445e9902d…
16:40 TimToady that's not what I get at home
16:40 TimToady is the server 64-bit?
16:41 TimToady more to the point, is parrot/rakudo compiled 64 bit?
16:43 isBEKaml star: sub hailstone($n) { $n, -> $n { $n %% 2 ?? $n / 2 !! $n * 3 + 1 } ... 1; }; say ~hailstone(27);
16:44 p6eval star 2010.07: OUTPUT«27 82 41 124 62 31 94 47 142 71 214 107 322 161 484 242 121 364 182 91 274 137 412 206 103 310 155 466 233 700 350 175 526 263 790 395 1186 593 1780 890 445 1336 668 334 167 502 251 754 377 1132 566 283 850 425 1276 638 319 958 479 1438 719 2158 1079 3238 1619 4858 2429 7288
16:44 p6eval ..3644 1…
16:44 moritz_ server is 64bit
16:44 moritz_ and parrot too
16:44 isBEKaml it's 32 bit here and I get those stack frames.
16:47 TimToady I'm comiled 32
16:47 TimToady *p
16:48 TimToady though I'm on a 64-bit arch
16:50 isBEKaml rakudo: sub hailstone($n) { $n, -> $n { $n %% 2 ?? $n / 2 !! $n * 3 + 1 } ... 1; }; say hailstone(27);
16:51 p6eval rakudo 4ca522:
16:51 p6eval ..OUTPUT«278241124623194471427121410732216148424212136418291274137412206103310155466233700350175526263790395118659317808904451336668334167502251754377113256628385042512766383199584791438719215810793238161948582429728836441822911273413674102205161543077923246162308115457717328664331300650325…
16:51 TimToady works on the server
16:51 TimToady but maybe it's "Hey, I'm 64-bits, I don't need no stinkin' GC."
16:51 stepnem left #perl6
16:53 TimToady or maybe it's just the indeterminacy being differently indeterminate...
16:53 stepnem joined #perl6
16:57 TimToady rakudo: sub hailstone($n) { $n, -> $n { $n %% 2 ?? $n / 2 !! $n * 3 + 1 } ... 1; }; say ~hailstone(77031);
16:57 p6eval rakudo 4ca522: OUTPUT«(timeout)»
16:57 TimToady rakudo: sub hailstone($n) { $n, -> $n { $n %% 2 ?? $n / 2 !! $n * 3 + 1 } ... 1; }; say ~hailstone(77031);
16:58 p6eval rakudo 4ca522: OUTPUT«(timeout)»
16:58 TimToady that number makes a very pretty pattern of garbage at home...
16:59 TimToady (it's the longest sequence under n == 100000)
17:03 M_o_C left #perl6
17:04 TimToady are the words in the garbage any kind of clue? It seems to generate fruns from the set: $!llsig named %.15g repr_P6opaque named self scalar
17:04 envi^home left #perl6
17:07 TimToady BTW, someone should go through all the rosettacodes and make sure all appropriate entries are added to the test suite
17:07 TimToady that would be a good task for someone who wants to contribute but doesn't know how
17:08 moritz_ TimToady: the names seem to be related to rakudo dynops or their usage
17:08 TimToady the rosettas tend to put stress on the design of everything
17:09 tylercurtis sorear: looking for help on Niecza?
17:10 grondilu joined #perl6
17:11 TimToady oh bleh, twitter brain damage, I sent the phenny message to @tylercurtis
17:11 TimToady I am officially twitterpated.
17:11 grondilu Hi, I like the idea of a Grammar object.   Has anyone ever written for the Mediawiki syntax ?
17:11 grondilu (written one)
17:12 TimToady haven't heard of one, but this is the right place to ask
17:12 tylercurtis TimToady: I saw it in the backlog. I hadn't thought about evals. Thanks.
17:12 moritz_ grondilu: I don't know one either; but would be nice to have one :-)
17:12 grondilu I could try it, but I'm not an expert and I don't want to do it if someone already did.
17:13 TimToady not even for the learning experience?  :)
17:13 grondilu yes, sure
17:13 moritz_ nobody starts out as an expert :-)
17:13 moritz_ if you want some advice, start with *very* simple grammar, improve it step by step, and test it after each step
17:14 TimToady and start by only writing tokens, not rules
17:14 grondilu ok
17:14 TimToady people get into trouble with implicit whitespace matching
17:14 moritz_ since the debugging facilities for grammars are somewhat limited, that's the only way not to get stuck with frustration
17:15 grondilu so far I have the perl6 book :  http://github.com/downloads/perl6/book/2010.08.a4.pdf.  Will this doc be enough for me to start ?
17:16 moritz_ yes; if you know some Perl 5, http://perlgeek.de/en/article/5-to-6 might be good additional information
17:16 TimToady knowledge of how to grep the synopses is also quite helpful
17:17 grondilu "synopses" ?
17:17 TimToady the specs
17:17 moritz_ and don't hesitate to come back here and ask questions
17:17 TimToady http://perlcabal.org/syn/
17:19 Juerd grondilu: It's probably impossible to do everything mediawiki does with a clean grammar, given the way it's parsed by the php code.
17:20 TimToady that's what dirty grammars are for :)
17:20 TimToady we have those too...
17:20 TimToady .oO(STD)
17:20 grondilu well if I could do 90%, that will be fine.
17:20 zulon left #perl6
17:20 grondilu I'll just verbatim the rest.
17:21 Juerd grondilu: In any case, I'd love to see a mediawiki grammar emerge
17:21 Juerd And then wiki software. And then... :)
17:21 TimToady ...profit
17:21 moritz_ I don't know much about mediawiki syntax; but for some formats it's also a good idea to split up on empty lines first, and then parse the chunks separately
17:22 Juerd moritz_: Not so for MW, IIRC
17:23 grondilu that wouldn't work for ''' and '' (bold and italic format) for instance, I'm afraid.  Since several paragraphs can be enclosed in a '' or ''' pair.
17:23 Juerd Paragraphs are separated by empty lines, but not everything is a paragraph
17:24 TimToady grammars can certainly heed/ignore line boundaries at need
17:25 grondilu so I guess we can't use empy lines as separator for anything else than paragraphs.
17:25 moritz_ Juerd, grondilu: that's why I warned that I don't know mediawiki syntax enough :-)
17:26 molaf left #perl6
17:27 TimToady Perl 6 grammars are not restricted to context-free.
17:27 grondilu A good mediawiki example would be the Wikipedia:SandBox page I guess.  I'll make my experiments on that.  http://en.wikipedia.org/wiki/Wikipedia:SandBox
17:31 colomon left #perl6
17:32 grondilu left #perl6
17:37 TimToady rakudo: my $a = [<0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138
17:37 p6eval rakudo 4ca522: OUTPUT«===SORRY!===␤Confused at line 22, near "my $a = [<"␤»
17:37 TimToady truncated, I imagine
17:37 plobsing left #perl6
17:37 TimToady but that doesn't mess up here, only use of .. or ...
17:39 TimToady btw the end of that was: 296 297 298 299 300>]; $a[@($a)].join(' ').say
17:39 TimToady so not using range in the subscript either
17:41 moritz_ rakudo: say True xor True
17:41 p6eval rakudo 4ca522: OUTPUT«1␤»
17:41 pochi left #perl6
17:41 moritz_ rakudo: say True xor False
17:41 p6eval rakudo 4ca522: OUTPUT«1␤»
17:41 moritz_ huh?
17:41 moritz_ rakudo: say True ?^ False
17:41 p6eval rakudo 4ca522: OUTPUT«1␤»
17:41 moritz_ rakudo: say True !^ False
17:41 p6eval rakudo 4ca522: OUTPUT«0␤»
17:42 TimToady rakudo: say (True xor True)
17:42 p6eval rakudo 4ca522: OUTPUT«␤»
17:42 TimToady marriage rotting your brain already?  :P
17:42 moritz_ seemslike
17:43 zulon joined #perl6
17:43 moritz_ (though $wife says "cuddling should prevent it")
17:44 TimToady lovely word, "should"
17:45 moritz_ hugme: hug me
17:45 * hugme hugs moritz_
17:45 TimToady makes no commitment to whether it actually does or not...
17:45 TimToady hugme: hug yourself
17:45 * hugme hugs yourself
17:46 TimToady .oO(Babel 17)
17:47 moritz_ speaking of brain rot... my installed rakudo segfaults a simple test script that loads a grammar from a .pm file
17:48 pmurias left #perl6
17:48 * TimToady hides behind a lollipop
17:48 mmmpork left #perl6
17:57 Mowah left #perl6
17:59 justatheory joined #perl6
18:01 justatheory left #perl6
18:03 moritz_ huh
18:04 moritz_ "use Test;" segfaults.
18:04 moritz_ (on latest parrot)
18:05 TimToady that seems...suboptimal...
18:18 IllvilJa left #perl6
18:19 moritz_ indeed
18:23 [Coke] left #perl6
18:23 moritz_ works on HEAD~2
18:27 c9s joined #perl6
18:38 pochi joined #perl6
18:40 zulon left #perl6
19:01 tadzik joined #perl6
19:01 tadzik oh hai
19:10 [Coke] joined #perl6
19:18 TimToady http://rosettacode.org/wiki/Combinations#Perl_6 very much resembles the Haskell solution
19:28 IllvilJa joined #perl6
19:29 colomon joined #perl6
19:33 wamba joined #perl6
19:50 diakopter .
19:56 Packetknife joined #perl6
19:56 Packetknife left #perl6
19:56 Packetknife joined #perl6
19:57 TimToady hmm, seems like one could solve spiral and zigzag arrays with a grammar
19:58 diakopter "solve"?
19:58 TimToady like turtle graphics with backtracking
19:59 TimToady http://rosettacode.org/wiki/Spiral_matrix
19:59 TimToady http://rosettacode.org/wiki/Zig-zag_matrix
20:00 Packetknife left #perl6
20:01 TimToady course, that probably means it can be done with signature matching as well
20:01 diakopter the Python functional solution could be golfed, I think
20:01 dalek rakudo: d9aa575 | moritz++ | src/Perl6/Grammar.pm:
20:01 dalek rakudo: reset $*IN_DECL for regex bodies
20:01 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/d9aa575119292737ecc7e63d22da2070f03defa1
20:02 TimToady yes, well, there are various approaches to either problem
20:02 TimToady but a turtle's point of view is rather close to a human's
20:04 * diakopter thinks about a grammar way
20:04 TimToady so such a solution could be very readable, I suspect, assuming a good set of turtle primitives for moving around a matrix
20:05 diakopter o wait
20:05 * diakopter thinks about a flattening way
20:06 TimToady basically, a turtle can keep egocentric directions, not just geographic
20:06 perigrin Part of the Me Generation.
20:06 TimToady and you can then turn the entire coordinate system merely by turning the turgle
20:06 TimToady fsdo turgle
20:07 * perigrin rummages around and finds a bag of 't's for TimToady so he won't have to replace them with g's anymore.
20:07 perigrin er 'g's
20:07 diakopter turtles get squished all the time
20:07 perigrin diakopter: that's because they stack so well.
20:07 diakopter :) esp the ones toward the bottom, yeah
20:08 TimToady see also "Whorf Revisited", http://www.nytimes.com/2010/08/29/magazine/29language-t.html?_r=1&amp;ref=general&amp;src=me&amp;pagewanted=print
20:08 perigrin yeah you can't fool me there ... there is no bottom ... it's turtles all the way down.
20:08 perigrin well and a few turgles for when you need another cuppa
20:08 patrickas joined #perl6
20:09 patrickas o/
20:09 TimToady don't think another cuppa will help cure my neuronal woes when it comes to turgles
20:09 perigrin TimToady: out of *that much* T(ea)?
20:09 perigrin ouch.
20:10 diakopter tea is easier to gurgle than coffee
20:10 Ross joined #perl6
20:10 TimToady not really, coffee has a velar, and tea only has a dental
20:10 patrickas TimToady: Got a minute for a series spec question ?
20:11 TimToady well, alveolar
20:11 diakopter hah
20:11 TimToady patrickas: well, yeah, though I'm overdue for lunch...
20:11 TimToady if you don't mind munching sounds
20:11 patrickas What should this produce ? (10,11,12,3,4,5,6,7...4) : Nil because rhs on the wrong side or (10,11,12,3,4) because lhs should get "processed" anyway ?
20:11 * diakopter thinks of "coffee" from Smash Bros
20:12 TimToady I can argue that one both way, alas
20:12 patrickas but I can't implement it both ways :-(
20:13 TimToady the question is how far back the filtration of the end value goes
20:14 patrickas the whole return Nil for rhs o nthe wrong side feels weird to me
20:14 patrickas but I can see where it would make some sense
20:14 patrickas but there are so many weird edge cases ... I had to give up on trying to reason it out on my own :-)
20:15 TimToady I would prefer (10,11,12,3,4) myself
20:15 stepnem left #perl6
20:15 stepnem joined #perl6
20:16 patrickas Well ... your preferences are my orders :-)
20:16 TimToady the retroactive bit only works on intuited functions, anyway, I think, so it shouldn't go back further than the last 3 values, since those may be "tacked on" to a different sequence
20:18 patrickas ok so I use the last three values to determin if on the wrong side
20:18 patrickas but I also make sure that the rhs is not between any two items of the lhs
20:19 patrickas does that seem reasonable enough ?
20:19 * diakopter identifies the odd vs even distinction in the spiral matrix
20:20 patrickas or do you mean i drop the whole check when the lhs has more than three items?
20:20 timbunce joined #perl6
20:20 TimToady "turn ($x++ %% 0 ?? left !! right)"
20:20 TimToady %% 2 rather
20:21 TimToady no, just apply to the last three values
20:22 patrickas so in that case we get Nil because looking at the last three values ( 5,6,7 ) 4 is  on the wrong side
20:22 TimToady the question is whether we've already returned anything in front of that irretrievably
20:23 TimToady ^10, 5,6,7 ... 4
20:24 patrickas yes I think that case should produce 0,1,2,3,4
20:24 patrickas and the previous one 10,11,12,3,4
20:26 patrickas but this means we are checking all items of the lhs to decide if 4 is on the wrong side .... otherwise result of the whole series op is just Nil
20:26 TimToady why should that chop all the way back to the 4?  what if they really want 0..9 followed by 5,6,7...4
20:27 patrickas precedence ?
20:27 patrickas i my head ... has the lowest precedence
20:27 TimToady well, higher than listops and such, but yes, pretty low
20:27 TimToady I suppose they can always parenthesize
20:28 TimToady which is the argument on the other side
20:28 patrickas so you want (^10) , ( 5,6,7 ... 4) but you are asking for ( ^10 , 5,6,7 ) ... 4
20:29 patrickas the major reason that is bothering me for not stipping at the first 4
20:29 patrickas is things like the prime number generator series
20:30 * patrickas trying to get it right
20:32 diakopter TimToady: well, it's n is odd/even, not x or y on the grid
20:32 M_o_C joined #perl6
20:32 diakopter for me
20:33 TimToady yes, that's why I incremented it myself
20:34 diakopter hum
20:36 TimToady re they NYT article, I speak an egocentric language, but my brain is nonetheless tracking directionality continually like a geographic language speaker
20:36 TimToady it would not take me long to get used to speaking in a geographic language
20:36 TimToady "turn north, the look east"
20:37 TimToady "there's a spider crawling on your west arm"
20:37 * patrickas I was wrong about the prime number thingy ... it does not have more than three items on the lhs
20:39 Mowah joined #perl6
20:39 patrickas I am inclined to check all of the lhs for on-the-wrong-side-ness but I have no strong feelings about it wither ways
20:39 Ross left #perl6
20:39 TimToady well, how do you know which side is wrong for 1, *+2 ... $x where $x == 0
20:40 TimToady or $x == 2
20:40 patrickas we do not do the check for "code" generated series
20:40 TimToady have to
20:40 TimToady @array[0, *+2 ... $max]
20:40 patrickas only intuited ones
20:41 TimToady mmm
20:41 patrickas I dn't know I never thought about it ... I thought the spec was clear on this part
20:41 TimToady it seems hard to argue that 0,2 ... $max is different from 0, *+2 ... $max
20:42 TimToady esp when used as a subscript
20:42 patrickas I thought the argument was whenever you have Code all bests are off ... since you could have something generating numbers .. somethign depending on io ....
20:43 patrickas s/bests/bets/
20:43 patrickas s/something generating numbers/something generating random numbers/
20:43 moritz_ TimToady++ # sharing that nyt link
20:43 TimToady you mean like, say, hailstones.  :)
20:44 patrickas moritz_ \o/ congratsssssssss
20:44 TimToady which, however, still would work with the inequality test
20:44 TimToady but point taken
20:45 moritz_ thanks patrickas
20:46 TimToady but yeah, all my memories are tagged with the direction I was facing
20:46 patrickas I wanted to say MABROUUUKKKKK but I thought it would sound to weird in here!
20:46 TimToady if I have any visual memory, that is
20:46 patrickas It just feels like I'd need to solve the halting problem first ... then I could check if the rhs in on the wrong side of the Code part... not sure if that's really the case though
20:46 shade\ left #perl6
20:48 TimToady we can certainly limit the inequality to intuited cases for now, and see how it goes
20:49 patrickas ok..
20:49 Ross joined #perl6
20:50 patrickas and for the original question? intuited series with more than 3 items on the lhs ?
20:50 shade\ joined #perl6
20:52 TimToady the last three have to be literal, but the ones before that don't, so I'm still inclined to only treat the last three as part of the controlled list
20:52 TimToady 1 .. 10, 9, 8 ... 1
20:53 ruoso left #perl6
20:53 moritz_ rakudo: my $a = '.*'; say 'abc' ~~ / $a /
20:53 TimToady clearly wants to be mean 1,2,3,4,5,6,7,8,9,10,9,8,7,6,5,4,3,2,1 somehow
20:53 p6eval rakudo 4ca522: OUTPUT«␤»
20:53 moritz_ rakudo: my $a = '.*'; say '.*' ~~ / $a /
20:53 p6eval rakudo 4ca522: OUTPUT«.*␤»
20:53 patrickas parentisize!
20:54 TimToady I suspect we might want to require the series intuiter to operator at compile time, not run time
20:54 patrickas besides
20:54 patrickas 1 .. 10, 9, 8 ... 1 will mean that in all cases
20:54 TimToady so the above just gets compiled to 1 .. 10, 9, 8, *-1 ... 1
20:55 patrickas At least regarding the "is on the wrong side issue"
20:55 TimToady okay, ... 5
20:55 patrickas because in that case the rhs is clearly not on the wrong side
20:55 TimToady 1 .. 10, 9, 8, *-1 ... 5
20:56 patrickas I see your point ... but that's another issue.
20:56 TimToady well, has to handle ... 5.5 too
20:56 * moritz_ is scared by the complextiy of the series operator
20:56 patrickas no I mean
20:56 sorear good * #perl6
20:56 patrickas my question was about the "is on the wrong side" check
20:57 nimiezko joined #perl6
20:57 patrickas none of your last few examples are ambiguous
20:57 patrickas the answer is NO in all cases
20:57 TimToady I'd still argue it belongs only on the part of the series that is intuited
20:57 masak joined #perl6
20:57 moritz_ good morning sorear
20:57 masak ahoy, #perl6!
20:57 Ross left #perl6
20:58 TimToady it applies to the ... 5case above
20:58 Ross joined #perl6
20:58 TimToady whether you get the 1,2,3 out
20:59 * moritz_ has an interesting parsing question, but hesitates to hijack the current discussion
20:59 patrickas Yes ... this is another issue that needs to be discussed too
20:59 TimToady directionality is determined from the final values 10 9 8, not the 1
21:00 TimToady also, part of the reason it probably must be syntactic is that the 10 in 1..10, 9, 8  wants to particpate differently in the range and in the intuition
21:00 patrickas yes but the dilemma in your examples is should we return 1,2,3,4,5 OR 1,2,3,4,5,6,7,8,9,10,9,8,7,6,5
21:00 TimToady the latter
21:01 patrickas In noen of the cases should Nil be returned
21:01 TimToady directionality by the last items, not the first
21:01 patrickas that's what I means it is anothe rissue
21:01 TimToady I think I said that already
21:02 patrickas thee isn't even a question if we should return Nil or something else .... we definetely want to return something else in all of your last examples, but there is an argument about that something else.
21:03 TimToady Nil is just a limiting case of what I've already said
21:03 patrickas Oh ok
21:04 TimToady but I'd really prefer that intuited inequality not veto anything before the last 3 elements
21:04 TimToady where that can be examined in the parser
21:05 TimToady @values, 10, 9, 8 ... 5  has guaranteed semantics regardless of what's in @values
21:05 patrickas ok but that means a whole lots of tests need to be changed
21:05 TimToady it always makes @values, followed by 10,9,8 ... 5
21:07 patrickas ok if no one else has a problem with that, I'll about implementing it that way.
21:07 ruoso joined #perl6
21:08 patrickas to me it just feels weird er that 1,2,3,4,5,6 ... $x
21:08 patrickas would behave inone way when x is 4,5 or 6 and a different way when $x is 1,2 or 3
21:08 TimToady lemme think about it smore
21:09 patrickas OK
21:10 patrickas moritz_ sorry for now giving you a chance to speak!
21:10 patrickas s/now/not/ :-(
21:10 moritz_ np, it's a bit wordy anyway
21:10 moritz_ I'm writing a mail to p6u right now
21:11 masak yay! someone using p6u :)
21:11 tylercurtis left #perl6
21:11 masak moritz_++
21:11 masak I'm a Perl 6 user, and I hardly ever use it. I tend to use a certain channel on freenode.
21:12 masak has anyone else gotten this error message lately? 'postcircumfix:<Nil()> not defined for type Array()'
21:12 masak I find it weird and disconcerting.
21:12 TimToady maybe that's because it *is* weird and disconcerting
21:12 moritz_ rakudo: say Nil ~~ Parcel
21:12 p6eval rakudo d9aa57: OUTPUT«1␤»
21:13 moritz_ rakudo: say Nil ~~ Positional
21:13 p6eval rakudo d9aa57: OUTPUT«1␤»
21:13 tadzik http://github.com/masak/web/blob/master/lib/LolDispatch.pm#L7 -- where are awesome things like this one documented?
21:13 masak I'll try to find the cause of it. it occurred in Yapsi when I was youing with making closures first-class.
21:13 masak tadzik: hardly anywhere at all, sadly :(
21:14 masak tadzik: if you go through my blog posts about Web.pm, you'll find a lot of clues. but maybe not about that one, that's Tene++'s code.
21:15 tadzik then it needs a blag post :)
21:15 masak I couldn't agree more. that module is pretty awesome.
21:15 masak maybe it'd even run, too. under alpha, at least.
21:16 moritz_ I think it did
21:16 tadzik duh. I feel like fixing it after exams just to witness the awesomeness
21:16 masak moritz_: oh, it definitely did, once.
21:17 masak tadzik: that would be, for lack of a better word, awesome.
21:17 tadzik masak: I need to pass my *$*&$! linear algebra first
21:17 Tene tadzik: LolDispatch was just a short proof-of-concept.
21:17 masak ooh! linear algebra! why didn't you *say* so? :D
21:17 tadzik masak: hum?
21:17 * masak likes it
21:18 tadzik oh, you can help me then :)
21:18 masak I certainly can.
21:18 Tene tadzik: The traits aren't being done right and such.  It was just intended to explore how traits were implemented in rakudo at the time.
21:18 tadzik I didn't have and problems today, but I will certainly have in the next few days. Got xmpp masak?
21:18 tadzik Tene: I see
21:18 masak tadzik: I have GChat.
21:18 Ross left #perl6
21:18 masak er, GTalk.
21:19 tadzik masak: you mean this thing from Gmail? That's xmpp
21:19 masak that's why I brought it up :)
21:19 tadzik mind sharing?
21:19 masak sounds like something a Vulcan would do... :P
21:19 Tene tadzik: I don't recall why LolDispatch got committed.  It wasn't intended for wide public use.
21:21 Tene If it does end up useful or inspiring work on something else, that's great.
21:21 wamba left #perl6
21:22 Ross joined #perl6
21:23 Tene anyway, it should work fine if you fix the syntax for the trait definitions, and maybe other minor changes.  iirc, I was relying on intenrals that have changed significantly by now.
21:24 masak but the intent of the module should still very much work.
21:24 masak once all those changes are made, I mean.
21:24 Tene That's right.
21:24 Tene I did something like that with my POE-alike toy
21:25 Tene http://github.com/tene/Doten/blob/master/dt.pl
21:26 Tene still not done the right way there either, though
21:27 Tene I also experimented with "is memoized" or "is cached" or something, but I couldn't manage to replace or wrap the sub from the trait handler.
21:28 * moritz_ sent is mail, and now goes to bed
21:29 * masak can haz it o/
21:31 masak interesting question.
21:31 gfldex I wonder what a guugu yimithirr would do aboard the ISS. North is flipping every 45 minutes.
21:31 gfldex nice article :)
21:32 szbalint Hm, so "run" returns the return code of a command that was executed. How do I get back the output the executed command wrote to STDOUT?
21:32 TimToady no, north stays the same
21:33 TimToady give or take a bit of inclination
21:33 TimToady but I can testify that travel in a vehicle is a problem for geographic brains
21:34 TimToady usually I just peg one end of the vehicle as notional north, and leave it there until I have to forcibly reorient on landing
21:35 TimToady reorienting can be quite difficult when you're brain is hardwired to track the direction you think you're facing
21:35 TimToady it's a bit like asking a synasthete to see different colors around letters and numbers than they're used to...
21:36 TimToady I don't have much control of my brain circuitry on that level
21:36 diakopter get a rootkit; they're free :P
21:37 TimToady often I think I've reoriented, and my brain suddenly snaps back to the old orientation
21:38 gfldex My head-north of my hometown is off by about 15' . Proly because I got my head before I got a map. :)
21:39 TimToady and the sun angles really screwed me up in south america, because my brain thinks it knows where the ecliptic is
21:39 TimToady I have to be very careful the first time I visit somewhere
21:40 TimToady I spent the entire second half of my childhood with the sun rising in the north and setting in the south
21:40 TimToady because I have Bremerton WA 90° off in my head
21:41 diakopter TimToady: a spiral matrix one-liner will be difficult.
21:41 TimToady my parents old house was 180° off on the inside, and there was nothing to be done about it
21:42 TimToady not hard if you have an appropriate turtle
21:42 Ross left #perl6
21:42 TimToady it's just lay an egg, move forward || right
21:43 TimToady assuming forward fails outside the matrix or where there's already an egg
21:45 masak my room is 180° off on the inside. it's the half-twist of the stairs to the second floor that never registered somehow.
21:45 diakopter egg already right ?? move forward !! turn right (don't need to worry about the edges, just go until eggs run out)
21:45 diakopter er, turn left....
21:45 diakopter heh
21:49 tadzik rakudo: say 'alive'; #= testing
21:49 p6eval rakudo d9aa57: OUTPUT«===SORRY!===␤Whitespace character is not allowed as a delimiter at line 22, near " testing"␤»
21:49 tadzik what kind of thing is this?
21:50 masak rakudo: say 'alive'; #=[ testing ]
21:50 p6eval rakudo d9aa57: OUTPUT«alive␤»
21:50 masak tadzik: I don't like it, but it's spec.
21:50 TimToady std: say 'alive'; #= testing
21:50 masak tadzik: my plan is to change the spec.
21:50 p6eval std 32108: OUTPUT«ok 00:01 115m␤»
21:50 masak hm. or not spec.
21:50 masak :)
21:51 tadzik duh
21:51 TimToady looks like LTM failure to me
21:51 tadzik . o O ( masak submits a rakudobug )
21:51 masak I think it's just failure, period.
21:51 * masak submits rakudobug
21:51 diakopter ouch
21:51 masak tadzik:
21:51 masak tadzik++
21:51 tadzik Druid++
21:51 tadzik . o O ( class masak does Druid)
21:55 szbalint Is it possible to run an external program from Rakudo and capture it's output, without resorting to temporary files?
21:55 tadzik qx//
21:55 tadzik or qxx//, if you want interpolation
21:56 szbalint ty :)
21:57 masak qqx//
21:57 masak (to parallel qq[])
21:57 tadzik or right
21:57 tadzik I miss backticks though :)
21:58 masak tadzik: backticks now serve a higher purpose...
21:58 masak ...nothing. :)
21:59 tadzik (:
21:59 tadzik oh, not really :)
21:59 tadzik rakudo: say 'alive'; #`[ fasd ] say 'and well';
21:59 p6eval rakudo d9aa57: OUTPUT«alive␤and well␤»
21:59 tadzik well, that's a backtick
21:59 masak bleh.
22:00 tadzik I liked this #=[] notatio better though
22:00 masak I think the design decision behind that one was "intentionally uncommon".
22:00 tadzik rakudo: #=[ fasd ] say 'test';
22:00 p6eval rakudo d9aa57: OUTPUT«test␤»
22:00 masak double bleh.
22:00 tadzik hmm
22:00 tadzik that's actually fun
22:00 tadzik reads like: Comment equals fasd
22:01 masak for a very long time, the response to delimited comments was: "there's line-ending comments, and there's Pod. deal with it."
22:01 masak then @Larry succumbed, and the result was the ugly syntax we have today.
22:02 tadzik is it that ugly really?
22:02 masak oh, believe me.
22:02 tadzik There is plenty of #=[] in Druid, and it looks not that bad for me
22:02 masak :(
22:03 tadzik hugme: hug masak
22:03 * hugme hugs masak
22:03 * masak feels better now
22:03 Tene What's wrong with using =begin comment/=end comment ?
22:03 tadzik verbosity
22:03 tadzik imho
22:04 tadzik hmmmm
22:04 tadzik rakudo: say 'alive'; "test"; say 'and well';
22:04 p6eval rakudo d9aa57: OUTPUT«alive␤and well␤»
22:04 tadzik oh funny
22:05 tadzik rakudo: say 'alive'; """I can haz pythonz?"""; say 'and well';
22:05 p6eval rakudo d9aa57: OUTPUT«===SORRY!===␤Confused at line 22, near "\"\"\"I can h"␤»
22:05 masak we've had delimited comments all along, and we didn't know it. they're called "literal strings" :P
22:05 tadzik I wonder if they're even ignored by Rakudo on this stage
22:06 tadzik nope :)
22:09 masak tadzik++ # http://rosettacode.org/wiki/Combinations#Perl_6
22:10 tadzik ...me?
22:10 tadzik TimToady++ # passing along
22:10 masak sorry, that was today's tab fail for me. :)
22:11 tadzik well, I don't mind a nice, friendly karma :)
22:12 Mowah left #perl6
22:21 szbalint finally! It's 00:19, but I've completed my first real Perl 6 thing: http://paste.scsys.co.uk/49497
22:21 szbalint *00:21
22:21 timbunce left #perl6
22:22 tadzik congratulations :)
22:22 tadzik and goodnight guys o/
22:22 tadzik left #perl6
22:24 zby_home_ left #perl6
22:24 zby_home_ joined #perl6
22:24 justatheory joined #perl6
22:27 timbunce joined #perl6
22:28 nimiezko left #perl6
22:31 timbunce left #perl6
22:33 masonkramer joined #perl6
22:36 M_o_C left #perl6
22:41 masonkramer left #perl6
22:47 masak "Perl 6 -- there's some madness to the method after all"
22:47 masak would that work as the title for a talk?
22:48 Guest23195 left #perl6
22:57 masonkramer joined #perl6
22:57 masonkramer left #perl6
23:00 risou_ joined #perl6
23:02 jhuni joined #perl6
23:03 szbalint masak: yes!
23:04 masak I might use that for Paris, then.
23:16 macroron joined #perl6
23:21 lue ohai o/
23:22 zby_home_ left #perl6
23:25 masak lue: はい!
23:26 lue .oO(quick! Where is my transliterator?)
23:28 masak just said 'hai' :)
23:29 lue I could guess that. [Although I'm not familiar with my kana yet]
23:30 masak you need pulactice!
23:31 masak :)
23:32 sorear purakuteisu?
23:33 masak right; that.
23:34 lue .oO(I have yet to find a decent ogg recording that I can play of the japanese 'u' and 'r')
23:34 patrickas left #perl6
23:34 masak rolling 'r', 'u' like in most of the world.
23:35 sorear lue: there's no substitute for a flesh teacher if you want to speak correctly
23:36 lue Of course, I wouldn't expect to learn perfect pronunciation any other way.
23:37 masak it's pronounced as it sounds.
23:37 masak Japanese is easy that way. :)
23:38 lue I need to know how it sounds though! :)  .oO(If I just want to hear it, I should find the next time a Japanese game show comes on air)
23:40 masak left #perl6
23:40 shade\ left #perl6
23:43 shade\ joined #perl6
23:43 shade\ left #perl6
23:44 awwaiid joined #perl6
23:47 sorear lue: japonic u, when it's pronounced at all, sounds exactly like english short u in e.g. rune
23:48 sorear the trick is that Japanese orthography does not admit terminal consonants or paired consonants
23:49 shade\ joined #perl6
23:49 TimToady but has more variation than english, since in a five vowel system it isn't competing with, say "oo"
23:49 TimToady as in "took"
23:49 TimToady sometimes get a bit ü ish too
23:50 sorear school would become sukūl; the first u is inserted just to avoid /sk/, which is unwritable
23:50 TimToady since there's still a culture left over from samurai days of not moving your lips much while talking
23:51 sorear erm, sukūru
23:51 TimToady from a standpoint of syllable length, it's not so much dropped there as turns into a double long ss
23:51 TimToady sskul
23:51 TimToady ss ku and ru are all basically the same length
23:52 TimToady japanese is very syllable timed, like spanish but unlike english
23:52 TimToady which is stress timed
23:53 sorear as for r, the japanese only have one consonant between l and r
23:53 TimToady and we have four, m, n, p, and q.  :D
23:54 sorear this has the very useful consequence that the ear of a native Japanese /cannot hear/ the difference
23:54 sorear if you say lu, or ru, or anything in between, they will hear HIRIGANA SYLLABLE LU
23:54 sorear so... don't worry about it
23:55 sorear (it cuts both ways.  the most painful part of Japanese I for me was learning to distinguish o from ō)

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

Perl 6 | Reference Documentation | Rakudo