Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2009-12-12

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:01 TimToady std: say exp
00:01 p6eval std 29330: Potential difficulties:␤  Unsupported use of bare 'exp'; in Perl 6 please use .exp if you want to exp $_, or use an explicit argument at /tmp/3w6GAfqXKX line 1:␤------> [32msay exp[33m⏏[31m<EOL>[0m␤ok 00:01 106m␤
00:07 ascent_ joined #perl6
00:17 sjohnson rakudo:  my %hash; %hash.animal = 'cow'; say %hash.perl
00:17 p6eval rakudo 7ef386: Method 'animal' not found for invocant of class 'Perl6Hash'␤in Main (file src/gen_setting.pm, line 324)␤
00:20 sjohnson hmm
00:20 sjohnson rakudo:  my %hash; %hash{animal} = 'cow'; say %hash.perl
00:20 p6eval rakudo 7ef386: Could not find non-existent sub animal␤in Main (file src/gen_setting.pm, line 324)␤
00:20 sjohnson rakudo:  my %hash; $hash{animal} = 'cow'; say %hash.perl
00:20 p6eval rakudo 7ef386: Symbol '$hash' not predeclared in <anonymous> (/tmp/es2iMMkxEw:2)␤in Main (file <unknown>, line <unknown>)␤
00:21 Tene rakudo: my %h; %h<animal>='cow'; %h{'vegetable'}='potato'; say %h.perl;
00:21 p6eval rakudo 7ef386: {"vegetable" => "potato", "animal" => "cow"}␤
00:24 sjohnson thanks Tene
00:24 sjohnson any other timtowtdi ways?
00:24 [particle] rakudo:  my %hash; $hash{'animal'} = 'cow'; say %hash.perl
00:24 p6eval rakudo 7ef386: Symbol '$hash' not predeclared in <anonymous> (/tmp/6CPJ1XGVx5:2)␤in Main (file <unknown>, line <unknown>)␤
00:24 [particle] er...
00:25 [particle] rakudo:  my %hash; %hash{'animal'} = 'cow'; say %hash.perl
00:25 p6eval rakudo 7ef386: {"animal" => "cow"}␤
00:35 sjohnson Tene++ [particle]++ #  smart dudes
00:37 TimToady .oO(they're smart because they read the docs)
00:40 Tene What?  I never read the docs when I can avoid it...
00:41 sjohnson TimToady: that... and they are helpful !
00:41 sjohnson can't get that from reading docs.. unless it's some sort of irc code of conduct document
00:42 sjohnson but i should read those apocolypses
00:43 sjohnson a lot of interesting and cool things in there.  maybe the end of the world isn't such a bad thing
00:43 colomon It's easier to read the tests.
00:43 colomon In some cases, it's almost easier to read the source.  :)
00:48 diakopter the designer is more difficult to read
00:51 TimToady mene, mene, tekel, upharsin
00:56 diakopter see what I mean?
00:59 RichiH can't you guys move the release date of perl6's advent calendar forward by two hours?
00:59 RichiH i mean, i am usually awake at 0200local, but still
00:59 colomon RichiH: huh?
01:00 RichiH colomon: they are released around 0200 local
01:00 colomon We usually release at midnight UTC, though today is running late.
01:00 RichiH the new blog posts, i mean
01:00 diakopter talk about seeing the writing on the Wall..  (I just now got that, btw)
01:00 RichiH ah, i always checked at 0200, not 0100
01:01 colomon diakopter: wait, is TimToady's quote the writing on the wall from... errrr... Ezekiel?
01:01 RichiH colomon: who controls it?
01:01 diakopter Daniel 5
01:01 diakopter close
01:01 diakopter (not sarcastic "close")
01:02 diakopter get it?  Wall?
01:02 colomon RichiH: no one controls it, per se.  It's more of a happy anarchy.
01:02 * diakopter rolls
01:02 RichiH k
01:03 colomon diakopter: :)  Didn't take it as sarcastic, I definitely don't consider keeping track of what happens where in there one of my specialities.
01:07 diakopter so, is #perl the Medes? or the Persians?
01:13 colomon /me is reading up on the subject...
01:14 colomon In the context of Daniel, is there a practical difference between the two?
01:19 diakopter I don't know/remember
01:29 ash_ joined #perl6
01:41 ascent_ joined #perl6
01:50 rgrau joined #perl6
01:51 Exodist joined #perl6
01:57 Baggio_ joined #perl6
02:09 ashizawa joined #perl6
02:19 carlin joined #perl6
02:20 zaslon joined #perl6
02:20 zaslon lolmasakhazblogged! masak++ 'Some module names don't deserve to be short': http://use.perl.org/~masak/journal/40008?from=rss
02:20 mubot joined #perl6
02:20 pointme joined #perl6
02:33 cotto joined #perl6
02:33 carlin PerlJam: ping
02:41 carlin phenny: tell PerlJam there's a copy of your Benchmark.pm in perl6-examples lib and in its own repo, which causes problems for proto. Would you mind removing or renaming the perl6-examples copy?
02:41 phenny carlin: I'll pass that on when PerlJam is around.
02:46 carlin phenny: tell masak november and uri (owned by ihrd) have a lib/URI.pm
02:46 phenny carlin: I'll pass that on when masak is around.
03:01 carlin phenny: tell masak ... but it looks like that is the last conflict \o/
03:01 phenny carlin: I'll pass that on when masak is around.
03:04 TimTom rakudo: my @abc = <a b c>; @abc = @abc[1 .. *]; say ~@abc
03:04 p6eval rakudo 7ef386: Use of uninitialized value␤b c ␤
03:05 TimTom ng: my @abc = <a b c>; @abc = @abc[1 .. *]; say ~@abc
03:05 p6eval ng 77ed1d: too few positional arguments: 3 passed, 4 (or more) expected␤current instr.: 'perl6;Code;new' pc 11596 (src/builtins/Positional.pir:142)␤
03:05 TimTom ng: my @abc = <a b c>; @abc = @abc[1,2]; say ~@abc
03:05 p6eval ng 77ed1d: No applicable candidates found to dispatch to for 'postcircumfix:<[ ]>'␤current instr.: '!postcircumfix:<[ ]>' pc 264446 (src/gen/core.pir:0)␤
03:06 TimTom Ah.  It's caused by .. * going one too many so an undef gets tacked on the end
03:16 romanhunt joined #perl6
03:17 colomon joined #perl6
03:20 TiMBuS joined #perl6
03:35 Wolfman2000 ...anyone know how long it takes for github to refresh its network graphs? I want to see how mine recently changed with two branches
03:36 Wolfman2000 err, two extra branches
03:38 c9s joined #perl6
03:58 carlin No advent post today?
04:00 colomon Tene said he was working on it last time I checked.
04:00 colomon We've got two future posts which are finished which can be moved up in a pinch...
04:01 Tene carlin: I'll be done shortly.  It's pretty boring, though.
04:08 nihiliad joined #perl6
04:36 astrojp left #perl6
04:39 jaldhar_ joined #perl6
04:43 thowe joined #perl6
04:52 drbean joined #perl6
05:00 drbean__ joined #perl6
05:02 Tene Anyone want to review my post before I post it?
05:03 diakopter I could
05:03 Wolfman2000 I can
05:03 Tene http://perl6advent.wordpress​.com/?p=236&amp;preview=true
05:03 diakopter no access for moi
05:03 Tene huh
05:03 Tene eh, I'll just post it.  I can always edit it after.
05:03 Wolfman2000 I have access
05:04 Wolfman2000 hold on Tene
05:04 * diakopter waits :)
05:04 Wolfman2000 ...I feel something is missing, but unsure what
05:04 Wolfman2000 push it through
05:05 Tene Yeah, there's probably lots missing.
05:05 Tene http://perl6advent.wordpress.com/2009​/12/12/day-12-modules-and-exporting/
05:05 drbean___ joined #perl6
05:05 Tene I'll add content on any requested topics.
05:06 Tene Wolfman2000: Please feel free to make suggestions.
05:06 zaslon lolperl6adventhazblogged! perl6advent++ 'Day 12: Modules and Exporting': http://perl6advent.wordpress.com/2009​/12/12/day-12-modules-and-exporting/
05:06 Wolfman2000 Tene: if I had any, I'd had give them
05:07 Wolfman2000 I'd have given*
05:07 Tene I mostly just figured this was a pretty basic topic that wasn't actually covered by anybody else.
05:08 Tene i didn't stake any territory earlier, so everyone else took the fun stuff. ;)
05:10 drbean__ joined #perl6
05:29 diakopter ng: my $a = 3; say $a while($a++) < 5
05:29 p6eval ng 77ed1d: 4␤5␤
05:29 diakopter std: my $a = 3; say $a while($a++) < 5
05:29 p6eval std 29330: [31m===[0mSORRY![31m===[0m␤Two terms in a row at /tmp/FAQhVPKMTx line 1:␤------> [32mmy $a = 3; say $a while[33m⏏[31m($a++) < 5[0m␤    expecting nofun␤FAILED 00:01 108m␤
05:29 diakopter ngbug
05:30 diakopter std LTA error: Two terms in a row; expecting nofun
05:30 diakopter what's that std? you're having too much fun?
05:43 thowe OK, so trying to configure without hal...  I have a mouse cursor in my console, but not in X.  moused says it can't start because psm0 doesn't exist.  My mouse device appears to be ums0...
05:43 thowe do I need to tell moused it is ums0?
05:44 thowe hmm, moused is running, it would seem...
05:44 thowe why no mouse in X?
05:44 diakopter EKNOECLEW
05:46 Tene thowe: kill X, then run 'X -configure' from the console as root, and follow the instructions.
05:48 thowe I've already done this.  I have an X configuration.  That's not new to me.  What's new to me is FreeBSD and not using hal.  WIth hal it all works, but I'm being told hal is evil.  But without it I can't seem to make X think I have a KB or mouse...
05:49 thowe this is 8.0 BTW
05:49 Tene ah
05:50 thowe If I install xorg default package is it somehow configured to only use hal?
05:51 thowe I just did pkg_add -r xorg after install.
05:52 Tene thowe: do you mean to be asking this in #freebsd or similar?
05:52 thowe ah crud....
05:52 thowe yes :(
05:52 Tene :) not the first time
05:52 thowe how the hell did I end up all the way over in this tab?
05:53 thowe sorry..
05:53 Tene Not a problem.
05:55 envi^home joined #perl6
06:00 gfx joined #perl6
06:03 * thowe is still embarrassed and sorry...
06:03 Tene I've done it plenty of times myself.
06:03 Tene And it's not like you were interrupting anything.
06:03 thowe There was some pretty interesting stuff in here in the morning...  I must not be in the cool time zone.
06:14 hanekomu_ joined #perl6
06:16 cotto joined #perl6
07:01 hejki joined #perl6
07:30 c9s joined #perl6
07:31 c9s joined #perl6
07:44 hanekom__ joined #perl6
07:59 Intensity joined #perl6
08:14 c9s joined #perl6
08:29 iblechbot joined #perl6
08:34 vorner joined #perl6
08:36 drbean joined #perl6
08:40 lmc joined #perl6
08:42 vorner joined #perl6
08:46 vorner joined #perl6
08:46 viklund joined #perl6
08:47 mberends viklund: o/
09:08 jaldhar joined #perl6
09:29 Baggio_ joined #perl6
09:29 Su-Shee joined #perl6
09:30 moritz_ good morning
09:30 Su-Shee good morning to you too. :)
09:49 sjohnson hi moritz_
09:49 sjohnson and sushee
10:00 jan_ joined #perl6
10:23 c9s joined #perl6
10:26 moritz_ hugme: tweet rakudoperl Perl 6 advent calendar day 12: Modules and Exporting http://perl6advent.wordpress.com/2009​/12/12/day-12-modules-and-exporting/
10:26 * hugme hugs moritz_; tweet delivered
10:38 moritz_ I've submitted two patches for dev.perl.org/perl6/, and Leo (who has been involved with the perl.org redesign) has already applied one
10:39 moritz_ now we're discussing if it's worth to keep dev.perl.org/perl6/ updated, and I asked what he thinks about redirecting it to perl6.org instead
10:39 moritz_ let's see where this leads... :-)
10:50 pjcj joined #perl6
10:53 ejs joined #perl6
11:11 xomas_ joined #perl6
11:16 mathw arguably there are too many websites for perl 6 things at the moment. It makes it hard to ensure people get the latest information
11:17 moritz_ the problem is not "too many", but "too many out of date"
11:17 moritz_ though of course there's a relation between these two
11:19 Alias joined #perl6
11:19 Alias FYI, I think I worked out how to do recursive regex matching using a non-recursive 5.004 regex engine
11:23 moritz_ does it involve (?{ ... }) groups?
11:29 hanekomu_ joined #perl6
11:29 Alias Nope
11:30 Alias After the match for the open tag, you put a negative lookahead assertion for any other open tag, followed by a close tag
11:30 Alias Now, it means you match from deepest to shallowest, and bottom to top :)
11:31 moritz_ kinda scary :-)
11:31 Alias Just a teensy bit
11:31 Alias Also, it's vulnerable to infinite loops if you replace with another TT expression
11:31 Alias Oh dear
11:32 Alias I just realised that more or less kills it :(
11:32 Alias Darn
11:32 moritz_ so if I got that right, the number of passes over the string is proportional to the nesting level?
11:32 jferrero joined #perl6
11:33 Alias I think so
11:33 jferrero joined #perl6
11:35 Alias I guess all I can do it make the improvement, put it out in the wild and wait for it to blow up
11:44 mberends Alias: I'm thinking of porting the nqp-rx regex engine to C.  I'm interested in how your one runs (or blows up).
11:44 Alias http://svn.ali.as/cpan/trunk/Tem​plate-Tiny/lib/Template/Tiny.pm
11:45 Alias It's an interesting case only really because of the ::Tiny limitations
11:45 Alias The rules make you do some odd things
11:46 mberends it really is Tiny.  sweet!
11:46 Alias That's the idea
11:47 Alias 90% less memory, no dependencies, no C, 5.005 compatible at minimum
11:47 Alias One file, one class
11:47 mberends ah, so very satisfying :)
11:47 Alias And fully compatible with the larger alternative
11:48 moritz_ it's a bit ironic that you need far more files to put it on CPAN
11:48 mberends heh
11:48 moritz_ a Makefile.PL, MANIFEST, META.yml...
11:48 Alias moritz_: Having 10 or 20 times the size in test code is an advantage :)
11:48 Alias It means when the time comes, you don't need to actually run the tests
11:48 Alias Because there's no platform, perl version, or host variation in the code
11:48 Alias So you can just trust it works
11:49 mberends ;-)
11:49 Alias Check out the (insane) size of the t directory for YAML
11:50 Alias YAML::Tiny rather
11:50 Alias hrm
11:50 mberends I'd rather not look - almost finished a 1200 line YAML loader in C
11:50 Alias I may need to go with (?{...})
11:50 Alias 1200... that seems like very little
11:50 Alias Why not just use libxs
11:52 mberends the API didn't suit the host program. tried Syck and others too before succumbing to NIH.
11:52 Alias ah
11:59 xinming joined #perl6
12:21 elmex joined #perl6
12:32 Baggio_ joined #perl6
12:43 c9s joined #perl6
13:05 riffraff joined #perl6
13:13 payload joined #perl6
13:19 xinming joined #perl6
13:22 pugs_svn r29331 | carlin++ | [S04-control] Fixed a typo
13:24 carlin (I wrote a script that parsed http://en.wikipedia.org/wiki/Wikipedia:L​ists_of_common_misspellings/For_machines and ran it over the specs, that's what it turned up)
13:29 orafu joined #perl6
14:06 Astoria` joined #perl6
14:09 pmurias joined #perl6
14:18 xinming_ joined #perl6
14:35 pmurias mberends: did you try building mildew-js?
14:38 colomon joined #perl6
14:39 colomon anyone out there know if the parameter name should be grid or graph for chr?
14:40 colomon looks like S29 says grid, and S29-conversions/ord_and_chr says graph
14:41 Baggio_ joined #perl6
14:41 pmurias colomon: grid seems a typo
14:41 colomon okay, I will make it so.  :)
14:42 colomon (That agrees with my thinking that graph makes more sense.)
14:43 pmichaud I'd almost prefer to see "code" or "codepoint" or something like that
14:43 pmichaud "grid" is probably "grapheme id"
14:43 mberends pmurias: not yet, unfortunately, tied up for a few more hours with $other-project.
14:44 pmurias np
14:46 colomon Is it possible to have more than one proto for a sub?
14:47 pmurias mberends: if you find some dependency particulary annoying mention it and i'll see if it's possible to get rid of it/make it optional
14:48 mberends pmurias: great, thanks. what would help most of all initially is a README ;)
14:50 hejki mm.. how to use a variable in a regex? :)
14:53 hejki (apart from m:P5/$var/ :))
14:55 gerunderer joined #perl6
14:55 mberends pmurias: actually, I expect to be writing quite a lot of comments and README items as I get to know the software, as I did with Sprixel in September :)
14:57 pmurias mberends: that's good as i don't fully remember all the dependencies and they only get noticed when installing on a new machine
14:58 Baggio__ joined #perl6
15:02 carlin hejki: afaik using variables in regexes is broken atm
15:03 hejki :o
15:03 carlin rakudo: my $x = 'foo'; say 'foo' ~~ /$x/;
15:03 p6eval rakudo 7ef386: Null PMC access in get_string()␤in Main (file <unknown>, line <unknown>)␤
15:03 carlin but
15:03 carlin rakudo: my $x = 'foo'; say 'foo' ~~ eval("/$x/");
15:03 p6eval rakudo 7ef386:  ( no output )
15:03 hejki [ hejki@cornix ~/ohjelmointi/perl6] $ perl6 -e 'my $x = "1224"; say $x.comb(m:P5/2/);'
15:03 hejki 22
15:04 carlin bah, that works locally (using eval as a wrokaround)
15:06 hejki wrong ;<
15:07 hejki pugs doesn't [ hejki@cornix ~/ohjelmointi/perl6] $ pugs -e 'my $x = "1224"; my $y = "2"; say $x.comb(m:P5/$y/);'
15:07 hejki 22
15:07 hejki that's what i was supposed to paste :>
15:07 colomon joined #perl6
15:11 JimmyZ joined #perl6
15:20 meppl joined #perl6
15:21 Baggio_ joined #perl6
15:22 JimmyZ good evning, #perl6
15:22 hejki also, how do i "cast" stuff. (i.e. i want to have Str from @*ARGS)
15:23 carlin rakudo: my $x = "1234"; say $x.Int; say $x.Int.WHAT;
15:23 p6eval rakudo 7ef386: 1234␤Int()␤
15:23 carlin rakudo: my $x = 1234; say $x.Str; say $x.Str.WHAT;
15:23 p6eval rakudo 7ef386: 1234␤Str()␤
15:24 carlin hejki: like that ^
15:25 hejki ty :>
15:31 Baggio_ joined #perl6
15:31 romanhunt joined #perl6
15:41 Psyche^ joined #perl6
15:48 hejki rakudo: my $x = "1234"; my @ar = $x ~~ m:g/(0-9)/; @ar>>.say;
15:48 p6eval rakudo 7ef386: Colons cannot be used as delimiters in quoting constructs at line 2, near ":g/(0-9)/;"␤in Main (file <unknown>, line <unknown>)␤
15:49 hejki wot
15:54 TimToady std: my $x = "1234"; my @ar = $x ~~ m:g/(0-9)/; @ar>>.say;
15:54 p6eval std 29331: [31m===[0mSORRY![31m===[0m␤Unrecognized regex metacharacter (must be quoted to match literally) at /tmp/fumKjp7yVG line 1:␤------> [32mmy $x = "1234"; my @ar = $x ~~ m:g/(0[33m⏏[31m-9)/; @ar>>.say;[0m␤    expecting any of:␤      quantifier␤       regex atom␤       regex_infix␤
15:54 p6eval ..  standard stopper␤ te…
15:54 TimToady that's the real problem
15:54 hejki lol :D
15:55 TimToady std: my $x = "1234"; my @ar = $x ~~ m:g/<[0..9]>/; @ar>>.say;
15:55 p6eval std 29331: ok 00:01 107m␤
15:55 TimToady rakudo: my $x = "1234"; my @ar = $x ~~ m:g/<[0..9]>/; @ar>>.say;
15:55 p6eval rakudo 7ef386: Colons cannot be used as delimiters in quoting constructs at line 2, near ":g/<[0..9]"␤in Main (file <unknown>, line <unknown>)␤
15:56 hejki :o
15:56 TimToady rakudo: my $x = "1234"; my @ar = $x ~~ m:g /<[0..9]>/; @ar>>.say;
15:56 p6eval rakudo 7ef386: Colons cannot be used as delimiters in quoting constructs at line 2, near ":g /<[0..9"␤in Main (file <unknown>, line <unknown>)␤
15:56 hejki :)
15:56 TimToady rakudo: my $x = "1234"; my @ar = $x ~~ m :g /<[0..9]>/; @ar>>.say;
15:56 p6eval rakudo 7ef386: Colons cannot be used as delimiters in quoting constructs at line 2, near ":g /<[0..9"␤in Main (file <unknown>, line <unknown>)␤
15:57 nihiliad joined #perl6
15:57 TimToady rakudo: my $x = "1234"; my @ar = $x ~~ m :g [<[0..9]>]; @ar>>.say;
15:57 p6eval rakudo 7ef386: Colons cannot be used as delimiters in quoting constructs at line 2, near ":g [<[0..9"␤in Main (file <unknown>, line <unknown>)␤
15:58 TimToady that is bizarre
15:58 hejki well i can't get m:i to work either
15:58 hejki time for a BSP ;>
15:59 TimToady at least :i could be put inside the regex
16:01 hejki ye, but i need something to make me a nice list of numbers from a Str
16:02 TimToady rakudo: my $x = "1234"; my @ar = $x.comb(/\d/); @ar>>.say;
16:02 p6eval rakudo 7ef386: 1␤2␤3␤4␤
16:03 TimToady but don't rely on the order of >>.say like that :)
16:03 TimToady hyerpoperators are allowed to run in any order
16:03 TimToady *hyper
16:03 TimToady pugs: my $x = "1234"; my @ar = $x.comb(/\d/); @ar>>.say;
16:03 p6eval pugs: Error eval perl5: "if (!$INC{'Pugs/Runtime/Match/HsBridge.pm'}) {␤    unshift @INC, '/home/p6eval/.cabal/share/Pugs-6​.2.13.14/blib6/pugs/perl5/lib';␤    eval q[require 'Pugs/Runtime/Match/HsBridge.pm'] or die $@;␤}␤'Pugs::Runtime::Match::HsBridge'␤"␤*** '<HANDLE>' trapped by operation mas…
16:04 TimToady pugs: my @ar = <1 2 3 4>; @ar>>.say;
16:04 p6eval pugs: 2␤3␤4␤1␤
16:04 TimToady pugs: my @ar = <1 2 3 4>; @ar>>.say;
16:04 p6eval pugs: 2␤3␤4␤1␤
16:05 TimToady pugs: my @ar = 1..20; @ar>>.say;
16:05 p6eval pugs: 2␤3␤4␤5␤6␤7␤8␤9␤10␤11␤12␤1​3␤14␤15␤16␤17␤18␤19␤20␤1␤
16:05 TimToady heh, I think it does puts the first last just to keep people honest
16:05 TimToady s/does //
16:06 TimToady either that, or Haskell's thread scheduler isn't very equitable on small tasks
16:09 dalek rakudo/ng: 6f25191 | (Solomon Foster)++ | src/core/Any-str.pm:
16:09 dalek rakudo/ng: Allow ord to handle a string with more than one character (in list context, anyway).
16:09 dalek rakudo/ng: review: http://github.com/rakudo/rakudo/commit/6​f251913bf1c87f5a9869f3bfe5ab22919dbec5f
16:09 dalek rakudo/ng: 0307c29 | (Solomon Foster)++ | src/core/IO.pm:
16:09 dalek rakudo/ng: Merge branch 'ng' of git@github.com:rakudo/rakudo into ng
16:09 dalek rakudo/ng: review: http://github.com/rakudo/rakudo/commit/0​307c29d0fc5c84e0bb9295230065b547c45782f
16:10 envi_home2 joined #perl6
16:11 beggars joined #perl6
16:15 pmurias joined #perl6
16:16 viklund joined #perl6
16:16 envi^home joined #perl6
16:16 hicx174 joined #perl6
16:16 tarbo2 joined #perl6
16:16 viklund joined #perl6
16:16 TimToady ng: my $x = "1234"; my @ar = $x ~~ m :g [<[0..9]>]; @ar>>.say;
16:17 p6eval ng 77ed1d: sh: ./perl6: No such file or directory␤
16:19 justatheory joined #perl6
16:24 athomaso1 joined #perl6
16:24 xinming joined #perl6
16:25 drbean joined #perl6
16:29 moritz_ I don't think ng handles attributes yet
16:29 moritz_ ng: my $x = "1234"; my @ar = $x ~~ m :g [<[0..9]>]; @ar>>.say;
16:29 p6eval ng 0307c2: Confused at line 1, near "my @ar = $"␤current instr.: 'perl6;HLL;Grammar;panic' pc 519 (src/stage0/HLL-s0.pir:336)␤
16:40 pugs_svn r29332 | pmurias++ | [mildew] $foo(...) and named arguments
16:41 jlaire joined #perl6
16:41 nihiliad joined #perl6
16:41 jan_ joined #perl6
16:41 ashizawa joined #perl6
16:41 am0c joined #perl6
16:41 slavik joined #perl6
16:42 pugs_svn r29333 | moritz++ | [advent] update schedule and topics
16:48 pugs_svn r29334 | colomon++ | [t/spec] Unfudge the ord('hello') test.
16:49 pmurias std: self
16:49 p6eval std 29331: ok 00:01 106m␤
16:52 pugs_svn r29335 | moritz++ | [t/spec] skip test that passed for the wrong reason
16:53 pmurias TimToady: self raises an undeclared routine error here
16:54 jaldhar joined #perl6
16:57 frew_ joined #perl6
16:58 pugs_svn r29336 | pmurias++ | [mildew] self
16:58 dalek joined #perl6
16:59 TimToady self isn't a routine, it's just a term
17:01 Alias_ joined #perl6
17:07 jimi_hendrix joined #perl6
17:07 abra joined #perl6
17:09 payload joined #perl6
17:12 pmurias TimToady: STD doesn't currently seem to know about that
17:14 moritz_ std: self ~~ 1
17:14 p6eval std 29334: ok 00:01 106m␤
17:14 moritz_ std: sub a { }; a ~~ 1
17:14 p6eval std 29334: [31m===[0mSORRY![31m===[0m␤Preceding context expects a term, but found infix ~~ instead at /tmp/rZyGZFsn6O line 1:␤------> [32msub a { }; a ~~[33m⏏[31m 1[0m␤FAILED 00:01 105m␤
17:15 moritz_ pmurias: if it parsed self as a listop, it would give that same warning as a ~~ 1
17:17 pmurias what does the unicode >> do in grammars?
17:17 moritz_ right word boundary
17:18 zaslon lolmoritzhazblogged! moritz++ 'Defined Behaviour with Undefined Values': http://perlgeek.de/blog-en/perl-6/defin​ed-behaviour-with-undefined-values.html
17:23 pmichaud ....yay, finished the final report for my grant!
17:24 mberends \o/
17:24 moritz_ \o/ indeed
17:25 pmurias moritz_: could you run perl viv -e 'self' and see if you get the error message?
17:26 moritz_ pmurias: just a sec, need to run 'make' first
17:30 moritz_ pmurias: no error message, just some YAML output
17:32 colomon \o/
17:34 snearch joined #perl6
17:42 mathw Argh
17:42 mathw brain failure
17:42 mathw Easy to explain junction coolness other than if $foo == any(3, 4, 5)
17:44 hanekomu_ joined #perl6
17:45 moritz_ rakudo: say ((1|2|3) * 2).perl
17:45 p6eval rakudo 7ef386: any(2, 4, 6)␤
17:45 abra1 joined #perl6
17:45 moritz_ autothreading!
17:45 hanekomu_ joined #perl6
17:45 mathw :)
17:46 moritz_ what I find very convenient is the mixture of autothreading and junctions
17:46 moritz_ example:
17:46 moritz_ in the test suite there's a small module called Test::Util
17:46 moritz_ it executes a piece of Perl 6 code in a separate compiler
17:47 moritz_ and captures output, stderr, and the return status
17:47 moritz_ so you can say things like
17:47 moritz_ is_run 'warn "foo"', $matcher, 'warn() works'
17:47 moritz_ and $macher is just a hash like
17:48 moritz_ { stdout => (/foo/ & /1/), exitcode => 0 }
17:48 moritz_ the implementation just smart-matches the captured STDOUT against $matcher<stdout>
17:49 moritz_ and without any further ado, you can pass junctions, code references etc. to it
17:49 mathw ah of course
17:49 mathw junctions and smart matching
17:49 mathw that's the other thing to write about
17:50 moritz_ I think KyleHa++ wasn't even aware of all the flexibility when he wrote Test::Util
17:51 abra1 joined #perl6
17:52 mathw argh
17:52 mathw the cat's trying to help me write
17:52 abra1 joined #perl6
17:56 Su-Shee if you're a vi user, that leads to interesting findings of new commands you've never heard of. every typo an adventure.
17:56 mberends line noise without the line
17:59 abra1 joined #perl6
18:01 mathw Scheduled the junctions post
18:02 mathw Could somebody please check it over, fix typos or screaming logic errors?
18:02 * moritz_ looks
18:02 mathw thanks
18:02 mathw it's all a bit rushed unfortunately
18:05 pmichaud lost the angles in
18:05 pmichaud $string ~~ // & // & //
18:05 mathw doh
18:05 mathw sloppy
18:05 pmichaud some other cool things one can do with junctions
18:06 pmichaud any(@list) == $value   # are any of the elements of @list == to $value ?
18:06 moritz_ all(@values) > 0
18:06 pmichaud all(@a) == any(@b)   #  do all of the elements of @a appear in @b
18:06 mathw I should mention those
18:07 moritz_ and then there's the famous junction prime test
18:07 mj41 joined #perl6
18:07 nihiliad joined #perl6
18:07 moritz_ sub primetest(Int $n) {
18:07 moritz_ ?(none(2..$n) * any(2..$n) == $n);
18:07 moritz_ };
18:08 Juerd I love junctions in combination with smart match because you can pass conditions as function arguments
18:08 moritz_ actually you can replace $n with $n.sqrt.Int
18:09 mathw I am not putting the prime test in...
18:10 mathw post updated
18:10 colomon btw, if anyone has a suggested better name for day 14... (or improvements to the text...)
18:10 orafu joined #perl6
18:11 moritz_ day 14 looked fine to me
18:12 Juerd url?
18:16 abra joined #perl6
18:19 pmurias moritz_: could you nopaste the YAML?
18:26 rgrau rakudo: my @a= (1,2,3) ; say any(@a) == 3
18:26 p6eval rakudo 7ef386: any(Bool::False, Bool::True)␤
18:28 rgrau how should I read that?
18:31 pugs_svn r29337 | pmurias++ | [mildew] $foo.(...)
18:31 pmurias rakudo: my @a = (1,2,3); say ?(any(@a) == 3)
18:31 p6eval rakudo 7ef386: 1␤
18:31 pmurias rakudo: my @a = (1,2,3); say ?(all(@a) == 3)
18:31 p6eval rakudo 7ef386: 0␤
18:32 hejki am i doing something wrong, i'm getting segfaults on big values http://heikki.mehtanen.fi/beust491.pl
18:33 rgrau thanks pmurias
18:59 lisppaste3 moritz_ pasted "viv -e 'self' AST for pmurias++" at http://paste.lisp.org/display/91990
19:02 KeithW joined #perl6
19:02 KeithW #perl6
19:03 KeithOW #perl6
19:03 moritz_ that's where you are :-)
19:03 mathw Greetings
19:03 KeithOW Hi
19:04 KeithOW New to perl6 (and to IRC) ;)
19:05 moritz_ welcome!
19:05 mberends congrats, you've found the friendliest channel of the lot (if you're nice)
19:05 FarOut joined #perl6
19:06 KeithOW people say I am
19:06 mberends we'll see ;-)
19:07 KeithOW I installed rakudo under a Lunx VM. are there any prebuilt Windows versions?
19:09 mberends KeithOW: no, self compiling is still the norm. You may be able to get a Padre bundle with a slightly out of date Windows version.
19:09 KeithOW I see -- thanks
19:10 KeithOW ttfn
19:12 moritz_ somehow KeithOW's IRC client seemed to prefix his lines with non-printable characters
19:12 moritz_ which resulted in me not seing most of them
19:14 mj41 joined #perl6
19:14 mberends xchat was ok
19:28 dbrock I saw the characters
19:29 dbrock each line started with a ^C
19:32 mj41 joined #perl6
19:34 TimToady they all came out grey here
19:37 mathw I didn't see anything odd
19:37 mathw But maybe it was colour coding characters, which my client's set to strip out
20:02 meppl joined #perl6
20:09 skyheights joined #perl6
20:10 b_jonas joined #perl6
20:16 buubot joined #perl6
20:45 Tene There, now colors are stripped for *everyone*!
20:45 * mathw applauds
20:45 mathw IRC colours are evil
20:46 moritz_ std: say ~~ 1
20:46 p6eval std 29337: [31m===[0mSORRY![31m===[0m␤Preceding context expects a term, but found infix ~~ instead at /tmp/bZDtLafYTE line 1:␤------> [32msay ~~[33m⏏[31m 1[0m␤FAILED 00:01 107m␤
20:46 Tene oh, right, std uses colors.
20:47 mathw o rly
20:47 mathw I didn't know that
20:47 mathw since my client strips them anyway :)
20:47 Tene heh
20:47 moritz_ mathw: see http://irclog.perlgeek.de/​perl6/2009-12-12#i_1828218 for an example
20:48 mathw ahah
20:56 hanekom__ joined #perl6
21:00 diakopter does Perl 6 specify a way to signal the compiler to compile(/optimize) a regex (if, say, the user knows that for the given pattern/inputs, it would be worth it to expend the time to compile the regex further)?
21:02 * moritz_ is not aware of any such way
21:03 mberends you mean like study in p5? possibly regex { ... } could mean that
21:03 diakopter I would like such a way to be specified... :)
21:05 Tene maybe :study ?
21:05 diakopter my regex impl has an interpreter mode and a compiler mode (compiler mode will add .1s or so to compile the first pattern in the input..)
21:05 diakopter it's actually input-wide that only makes a difference; any compiles of additional patterns are infinitesimally incrementally slower)
21:06 diakopter (
21:06 meteorjay joined #perl6
21:07 mberends diakopter: what is the downside of always compiling? just 0.1s delay per regex?
21:07 diakopter no
21:07 diakopter .1s additional per run of the interpreter/compiler
21:08 diakopter per run of the executable
21:08 diakopter sigh. sorry if that's unclear.
21:08 diakopter replace interpreter/compiler with executable
21:09 mberends understood
21:10 diakopter otoh, I suspect the same stuff that adds the one-time .1s will be needed every run anyway...
21:10 mathw I think it would be implementation-specific whether such a thing was meaningful or not
21:10 mberends the most time consuming use cases are matches in loops, so compiling is a win per run on average.
21:12 diakopter that brings up a larger question
21:13 diakopter I suspect there should be a way to specify how much to optimize every compilation unit...
21:13 mathw implementation-specific
21:13 diakopter mathw: ?
21:14 diakopter mathw: how would that work?
21:14 mathw how would it be meaningful for all implementations?
21:14 mathw it's not something that belongs in the spec
21:14 diakopter mathw: I mean, how would one specify something in the source code that would make sense to just 1 implementation?
21:14 mathw I have no idea
21:15 mberends pragmas, hints such as register in C
21:15 diakopter mathw: it wouldn't need to be "meaningful" to all implementations, if by meaningful you mean "implemented"
21:15 mathw and what would you gain from having it, anyway?
21:16 diakopter more control to the user
21:16 diakopter the author of the code
21:16 diakopter more control over the evaluation/execution of the code.
21:17 mathw is it control anybody actually needs?
21:17 diakopter what kind of a question is that
21:17 mathw one with a question mark at the end
21:17 * mberends sees a tiny word "premature" drift slowly across the screen...
21:18 mathw you're asking for something, I'm not sure it has any benefit to it, why shouldn't I ask if it's useful?
21:18 diakopter 'anyone' from the set of whom?  and 'needs' for what purpose?
21:19 mathw anyone from the set of all perl 6 programmers and users
21:19 diakopter erm
21:20 diakopter I don't understand how my previous to that question in insufficient
21:22 diakopter you can't imagine how "more control over the evaluation/execution of the code" would be useful?
21:22 mathw well, it would be useful if the optimiser was full of bugs I suppose
21:22 mathw otherwise... no, not particularly
21:23 diakopter that's absurd
21:23 mathw certainly not at the point where you say in the source code how much to optimise something
21:24 mberends diakopter: most users would simply want the fastest overall execution time, except where the memory tradeoff becomes unacceptable (and yes, that varies per installation).
21:24 diakopter there are plenty of cases where an interpreter would start/execute/complete a compilation unit faster than it would take a compiler to compile/execute, as well as (of course) the converse.
21:25 mathw if you've got a compiler, and that's a problem, then you precompile it
21:26 diakopter mberends: I don't understand your point.  I understand what you're saying, but I don't see why you said it right then.
21:26 diakopter mathw: and that's exactly what I'm asking for
21:26 diakopter a way to specify that some compilation units should be precompiled, and some shouldn't
21:26 Tene diakopter: his point is "where would you want to ask the compiler to avoid optimizing something?"
21:27 mathw and again, that's nothing you need to do in the language itself
21:27 mathw Rakudo can already do this
21:27 diakopter why wouldn't you need that in the language?
21:27 mathw because the code shouldn't need to care how it's being compiled?
21:28 diakopter why not?
21:30 mberends diakopter: my suggestion was hoping to point a possible way out of your dilemma of how to decide whether to compile a regex or not. But I think you know a lot more about it than I do :)
21:30 diakopter Tene: if that's what he asked, my answer is a restatement of what I wrote above: when the user knows (or learns through experience) that a different evaluation model is much more efficient than a full optimized compilation.
21:30 diakopter it's undecidable based on the pattern alone
21:30 mathw and your execution environment has both things available at the same time?
21:31 diakopter you have to know things about the inputs
21:31 diakopter mathw: yes
21:32 diakopter it could be an ultra-complex pattern that takes a long time just to analyze
21:33 mberends it may be worth asking TimToady++ for suggestions
21:34 diakopter for instance, in the CLR (and Mono), there are actually 3 modes of operation for RegularExpressions
21:35 diakopter two of them similar to the qr// and non-qr// in perl
21:36 diakopter the other one adds an ultra-optimized precompile phase
21:37 mathw Okay, it occurs to me that you might want to specify optimisation behaviour when you're actually compiling something in the middle of your execution phase, so with eval or if you're building regexes out of strings or something like that
21:37 diakopter (that compiles a static pattern directly to IL and then machine code)
21:38 diakopter exactly, and generalize that thought to every lazy evaluation
21:38 mathw lazy evaluation is not the same as compilation
21:38 diakopter every time a compilation unit is nested
21:38 diakopter I don't mean lazy-vs-strict for arguments
21:38 diakopter I mean JIT
21:41 diakopter it's so odd, every time I want to suggest a feature or bring up a wish on this channel, it's as if I step into an alternative universe where I'm some demanding/clueless noob that hasn't hung around here for years.
21:42 diakopter mathw: I'm sorry I used the phrase 'lazy evaluation' in a slightly imprecise way.  did you really not understand what I meant?
21:43 mathw 'lazy evaluation' means something else in Perl 6, so that did confuse me significantly
21:44 diakopter what does 'lazy evaluation' mean in Perl 6, from your understanding
21:45 mathw it means the lazy behaviour specced for list operations
21:45 mathw like iterating over 1..Inf without having to evaluate the infinite list first
21:46 diakopter ok. FYI, 'lazy evaluation' in that usage is not a technical term that refers to solely that.
21:46 mathw I didn't say that was a complete definition
21:47 pmurias diakopter: you generally would want to turn expensive optimalisations on while developing the app and on for production
21:47 diakopter pmurias: on and on?
21:48 pmurias s/on/off
21:48 diakopter but either way (on and off, or off and on), I think you're wrong
21:48 diakopter no, because many patterns/code are dynamic
21:50 diakopter mathw: if it's not a complete definition, and you were "confused significantly" by what I said, I feel it was a rude response to jump down my throat with "you're using that phrase wrongly"
21:50 diakopter "lazy evaluation is not the same as compilation"
21:51 mathw Well it's not
21:51 diakopter if you were *sure* I was using it wrongly, and didn't know what I was talking about, then I understand
21:51 mathw And it sounded like you were equating the two
21:55 diakopter I already admitted that I used (and apologized for using) the phrase imprecisely. My point was that your response was rude, if you suspected there was any possibility I meant "deferred" when I said "lazy".
21:56 diakopter I find it very hard to believe you were 100% certain I was equating the two
21:56 diakopter unless you tend to presume such things a lot about people
21:56 diakopter I mean, what other numbskull errors have I made previously in your presence?
21:57 mathw I'm not going to say anything else
21:57 mathw left #perl6
22:04 diakopter anyone, please feel welcome to msg me to let me know what went wrong there..
22:36 jimi_hendrix joined #perl6
22:51 TwhK joined #perl6
23:14 mberends ok, msgd
23:42 arthur-_ joined #perl6
23:50 markmont joined #perl6

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

Perl 6 | Reference Documentation | Rakudo