Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2010-01-05

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00:13 rgrau joined #perl6
00:16 _jaldhar_ joined #perl6
00:17 dpuu joined #perl6
00:17 _jaldhar_ joined #perl6
00:17 dpuu rakudo: (0,1).grep: 0==(*%2)
00:18 p6eval rakudo db84bc:  ( no output )
00:18 dpuu rakudo: say (0,1).grep: 0==(*%2)
00:18 p6eval rakudo db84bc: 0␤
00:18 dpuu rakudo: say (0,1).grep: !(*%2)
00:18 p6eval rakudo db84bc: ␤
00:19 dpuu rakudo: say (0,1).grep: not(*%2)
00:20 p6eval rakudo db84bc: ␤
00:20 dpuu rakudo: say (0,1).grep: 1==(*%2)
00:20 p6eval rakudo db84bc: 1␤
00:22 dpuu rakudo: say (0,1).grep: {!($^x%2)}
00:22 p6eval rakudo db84bc: 0␤
00:26 dpuu rakudo: say (!(*%2)).perl
00:26 p6eval rakudo db84bc: Bool::False␤
00:26 dpuu rakudo: say (0==(*%2)).perl
00:26 p6eval rakudo db84bc: { ... }␤
00:27 IllvilJa joined #perl6
00:28 colomon Wacky.
00:28 colomon rakudo: say (*%2).WHAT
00:28 p6eval rakudo db84bc: !whatever_closure␤
00:28 colomon rakudo: say (!(*%2)).WHAT
00:28 p6eval rakudo db84bc: Bool()␤
00:29 colomon So ! applied to a closure / code block returns false?!
00:29 dpuu I think that the problem is that a closure is a true value for prefix:<!> operator
00:29 colomon ah, okay, I can see that.
00:29 IllvilJa Hello and happy new year! If I want to use modules in rakudo perl6, the current recommended way to do that is to ensure that I have PERL6LIB set to include those module's directories.  Anyone knows of the 'best' way to set that variable for a CGI perl6 script on an Apache server?
00:30 dpuu rakudo: say (0==(*%2)).WHAT
00:30 p6eval rakudo db84bc: !whatever_closure␤
00:31 IllvilJa Should I edit poor @*INC directly in my script (nooo!), tweak my apache config to let that env variable take effect or is there some other hackery recommended to get PERL6LIB being known by the .cgi script?
00:31 IllvilJa (This is basic stuff, I know...)
00:34 mberends IllvilJa: there is no hackery, the choices you describe are about all you can do. Proto edits directly using unshift, for example. Pick whatever suits you.
00:36 IllvilJa mberends: Thanks.  I think I'll resort to editing the web server config file then, mostly because I'm familiar with that approach ;-).
00:36 mberends IllvilJa: right on!
01:02 cotto_working joined #perl6
01:05 sbp joined #perl6
01:06 gabiruh_ joined #perl6
01:06 d4l3k_ joined #perl6
01:08 xenoterracide joined #perl6
01:09 RichiH joined #perl6
01:09 rjh joined #perl6
01:10 r0bby joined #perl6
01:10 kolibrie joined #perl6
01:10 nsh joined #perl6
01:13 simcop2387 joined #perl6
01:14 colomon joined #perl6
01:14 lumi joined #perl6
01:16 zamolxes joined #perl6
01:16 buubot joined #perl6
01:16 slavik joined #perl6
01:16 literal joined #perl6
01:16 avar joined #perl6
01:16 BinGOs joined #perl6
01:16 presh_ joined #perl6
01:16 jnthn joined #perl6
01:16 krunen joined #perl6
01:16 rjbs joined #perl6
01:16 athomaso1 joined #perl6
01:16 nsh joined #perl6
01:16 dbrock joined #perl6
01:16 cotto_w0rk joined #perl6
01:16 eternaleye joined #perl6
01:16 _Jedai_ joined #perl6
01:16 s1n joined #perl6
01:16 lisppaste3 joined #perl6
01:16 bigpresh_ joined #perl6
01:16 Gothmog_ joined #perl6
01:16 ilogger2 joined #perl6
01:16 gabiruh joined #perl6
01:17 |Jedai| joined #perl6
01:17 nsh_ joined #perl6
01:17 ewilhelm joined #perl6
01:17 krunen joined #perl6
01:17 nothingmuch joined #perl6
01:17 cotto_working joined #perl6
01:17 IllvilJa joined #perl6
01:17 orafu joined #perl6
01:17 Chillance joined #perl6
01:17 stephenlb joined #perl6
01:17 lest_away joined #perl6
01:17 Maddingue joined #perl6
01:17 kst joined #perl6
01:17 nbrown joined #perl6
01:17 araujo joined #perl6
01:17 revdiablo joined #perl6
01:17 constant joined #perl6
01:17 tomaw_ joined #perl6
01:17 jql joined #perl6
01:17 meteorjay joined #perl6
01:17 jan___ joined #perl6
01:17 yahooooo joined #perl6
01:17 perigrin joined #perl6
01:17 drbean joined #perl6
01:17 arthur-_ joined #perl6
01:17 xalbo joined #perl6
01:17 pjcj joined #perl6
01:17 ascent joined #perl6
01:17 pnate joined #perl6
01:17 gfldex joined #perl6
01:17 c9s joined #perl6
01:17 arnsholt joined #perl6
01:18 Gothmog_ joined #perl6
01:26 lisppaste3 joined #perl6
01:29 diakopter quite the netsplit.
01:31 cognominal TimToady:   it is a hassle for a rule composed of  alternatives to write an  #= somealternative for each alternative,  a final {**}. for example  should be the equivalent of writing them explictely.
01:31 cognominal somehow another HyperWhatever :)
01:33 cognominal I guess I should propose a patch now that I dig grammars
01:35 agentzh joined #perl6
01:55 wolf2k_ubuntu joined #perl6
01:58 eternaleye joined #perl6
02:00 cotto_work joined #perl6
02:13 lumi joined #perl6
02:17 diakopter std: use v7; # sweet!
02:17 p6eval std 29460: ok 00:01 103m␤
02:18 sjohnson std: use v5;
02:18 p6eval std 29460: ok 00:01 103m␤
02:18 sjohnson oh neet
02:18 sjohnson .ff
02:18 sjohnson oops
02:18 diakopter rakudo: use v6.0.0; say 'alive';
02:18 p6eval rakudo db84bc: Confused at line 2, near ".0; say 'a"␤in Main (file <unknown>, line <unknown>)␤
02:18 diakopter rakudo: use v6; say 'alive';
02:18 p6eval rakudo db84bc: alive␤
02:19 Tene std: us v777;
02:19 p6eval std 29460: Undeclared routine:␤  'us' used at line 1␤ok 00:01 105m␤
02:19 Tene std: use v777;
02:19 p6eval std 29460: ok 00:01 103m␤
02:25 douglashunter_ joined #perl6
02:29 diakopter std: use v999999999999999999999999999999999999999999999999999999999999999999999999999999999;
02:29 p6eval std 29460: ok 00:01 103m␤
02:30 aindilis joined #perl6
02:31 diakopter std: no v6;
02:31 p6eval std 29460: ok 00:01 103m␤
02:32 arnsholt Are the semantics of that defined?
02:32 japhb joined #perl6
02:34 diakopter arnsholt: I don't know.
02:36 arnsholt Doesn't look like S11 says anything about no at all
02:43 * colomon is compiling C++ for $work, spectesting Rakudo master, and compiling Rakduo ng.
02:44 arnsholt Hooray for multicore?
02:45 colomon more like hooray for patience, though I guess the MBP does have two cores.
02:45 arnsholt Heh. Time for coffee in that case, sounds like =)
02:46 colomon Actually ng builds pretty quickly.
02:51 kst joined #perl6
02:57 cognominal joined #perl6
03:07 pugs_svn r29461 | colomon++ | [t/spec] Refudged after log($base) patch.
03:09 dalek rakudo/ng: 93fa57e | (Solomon Foster)++ | src/core/ (3 files):
03:09 dalek rakudo/ng: Add log with $base functions.
03:09 dalek rakudo/ng: Kodi++ for providing initial implementation.
03:09 dalek rakudo/ng: review: http://github.com/rakudo/rakudo/commit/93fa57e911a955f7ba23361b59840d71b9820694
03:12 colomon If someone is ambitious, we could certainly use more tests in log.t.
03:13 colomon For instance, log with base has three tests -- but there are more different versions of the function than that.  (Complex with base, method forms, etc.)
03:31 colomon So that's patch RT #70105 applied to both master and ng.  I'm not sure how to clean that up in RT...
03:32 dalek rakudo/master: 3867ffd | (Solomon Foster)++ | src/setting/ (3 files):
03:32 dalek rakudo/master: Add log with $base functions.
03:32 dalek rakudo/master: Kodi++ for providing initial implementation.
03:32 dalek rakudo/master: review: http://github.com/rakudo/rakudo/commit/3867ffd5b624437a565fa6a30d89f6fc18866797
03:41 synth joined #perl6
03:42 felipe joined #perl6
03:48 patspam joined #perl6
03:51 xinming joined #perl6
03:53 cls_bsd joined #perl6
03:54 cognominal joined #perl6
04:08 TimToady cognominal: #= is going away entirely, I suspect; STD doesn't use it at all
04:10 diakopter TimToady: do the Syn define 'no module_name;'?
04:12 TimToady it's discussed at S01:27  :)
04:13 diakopter o_-
04:14 diakopter +_+
04:15 TimToady just so it's not x_x
04:15 diakopter o_x  arrrrr
04:34 thowe joined #perl6
04:34 soupdragon joined #perl6
05:07 cognominal joined #perl6
05:09 am0c joined #perl6
05:26 pugs_svn r29462 | diakopter++ | [sprixel] gbothlrs seems to be done, but buggy.
05:26 diakopter o wait, it does work :)
05:27 youwin joined #perl6
05:33 xinming_ joined #perl6
05:33 lumi joined #perl6
05:38 diakopter std: no CORE; say 3;
05:38 p6eval std 29461: ok 00:01 105m␤
05:49 gfx joined #perl6
05:53 pugs_svn r29463 | diakopter++ | [sprixel] added geitherlrs
05:57 meteorjay joined #perl6
05:59 pugs_svn r29464 | diakopter++ | [sprixel] added gbeg[inning anchor]
06:03 diakopter since it compiles parsers that use utf32 codepoints, the unicode categories will be straightforward to implement.
06:04 * diakopter (said to no one in particular)
06:05 lumi joined #perl6
06:07 pugs_svn r29465 | lwall++ | [STD] emit better message when an intended reduce is interpreted as composer
06:14 diakopter re Sinai lap, "this glittery water isn't too tasty" and "oh noes, his face, it glows" and "the new stone tablets; they're sturdier than the first ones"
06:29 kaare joined #perl6
06:40 meppl joined #perl6
06:40 cognominal joined #perl6
06:43 cognominal TimToady, how are actions called in STD?
06:44 diakopter which actions
06:45 cognominal This is related to "<TimToady> cognominal: #= is going away entirely, I suspect; STD doesn't use it at all"
06:46 diakopter there are actions in viv and 'actions' inline the patterns.
06:46 diakopter oh.  what did #= mean
06:48 cognominal I wonder if the expliciting calling of actions methods within grammars is better than the current (*} #= scheme
06:49 cognominal *explicit
06:52 pugs_svn r29466 | lwall++ | [STD] improve detection of attempt to use postfix after whitespace
07:07 pugs_svn r29467 | lwall++ | [t/spec] catch bogus uses of \b
07:08 buu joined #perl6
07:09 Su-Shee joined #perl6
07:28 pugs_svn r29468 | lwall++ | [STD] parse old embedded comment as line-end comment now
07:41 agentzh joined #perl6
07:44 patspam joined #perl6
07:52 lumi joined #perl6
08:08 patspam joined #perl6
08:18 wjw joined #perl6
08:19 wjw left #perl6
08:24 lumi joined #perl6
08:31 pugs_svn r29469 | diakopter++ | [sprixel] gplus (plus of a deterministic pattern) working.  now for gpluss.
08:44 rgrau joined #perl6
08:50 iblechbot joined #perl6
09:02 lumi joined #perl6
09:20 goksie joined #perl6
09:31 zloyrusskiy joined #perl6
09:33 john joined #perl6
09:40 bryan[c1] joined #perl6
09:42 ejs joined #perl6
09:45 zloyrusskiy joined #perl6
09:51 lumi joined #perl6
10:00 payload joined #perl6
10:10 pdcawley joined #perl6
10:11 stepnem joined #perl6
10:14 meneldor joined #perl6
11:01 ruoso joined #perl6
11:05 eternaleye joined #perl6
11:15 broquaint joined #perl6
11:16 dakkar joined #perl6
11:20 patspam joined #perl6
11:22 xinming joined #perl6
11:36 Baggio_ joined #perl6
11:38 szabgab joined #perl6
11:45 mathw o/
11:45 mberends \o
11:46 Su-Shee YOU'RE ALL ALIVE!
11:46 Su-Shee I was starting to think about bus accidents.
11:47 mberends yes, we've got to do stuff to improve bus numbers
11:48 colomon o/
11:49 Su-Shee all parties hard yesterday? ;)
11:49 Su-Shee partied
11:51 mberends I tried to contribute to wiki.perlito.org, and kept getting "Sorry! We could not process your edit due to a loss of session data". Finally succeeded with edit, copy, logout, login, paste, save :/
11:52 Su-Shee I feel with you. I'm hated by movable type and I don't know why.
11:55 szabgab_ joined #perl6
11:56 mathw Yesterday was my first day back in the office
11:56 mathw There was no partying
11:57 frettled Party?  But palindrome day was three days ago!
11:58 mberends in Soviet Russia, every day is a Party day - Communist Party Day ;)
11:58 Su-Shee (god, I love the threadless shirt.. :)
12:01 frettled Su-Shee: so it's all flat and Outlook-ish?
12:01 Su-Shee frettled: the shirt or MT? ;)
12:03 payload joined #perl6
12:03 frettled hee-hee :)
12:05 Su-Shee I'm thinking about some firefox bug, because I can't log into _any_ MT properly. neither my own nor on blogs.perl.org
12:08 cognominal joined #perl6
12:09 ejs joined #perl6
12:19 rodi joined #perl6
12:23 SmokeMachine joined #perl6
12:38 colomon I cant  decide whether to write my next bit of $work in Perl 5 or Perl 6.
12:38 szbalint I'm going to dogfood P6 at $work, the only way I can learn.
12:39 soupdragon joined #perl6
12:40 colomon my biggest worry doing that is that it would mean I'd need Rakudo installed on every machine I do work on.
12:40 * colomon is kind of scared of the 64-bit vista machine....
12:41 szbalint I'm writing quite a few one-shot scripts, that can be self-contained in ~, that makes it easier.
12:41 ruoso joined #perl6
12:41 frettled colomon: with good reason!
12:42 colomon I've been doing one-shot p6 scripts for $work for about eight months now....
12:43 colomon frettled: that machine is actually the reason I have a MacBook Pro now.
12:43 frettled colomon: heh :)
12:44 frettled Hmm, that reminds me: today is blogging day again.
12:44 frettled I'll have to find something that's really quick and easy to blog about, since I don't really have time.  Hmm!
12:47 bluescreen joined #perl6
12:50 bluescreen joined #perl6
12:57 takadonet morning all
13:00 hejki is there a notation for: (1..10) X (1..10) X (1..10) X ... X (1..10) ?
13:01 hejki syntactic sugar and to make stuff more.. dynamic :>
13:02 hejki rakudo: my @ar = (^3), (^4); for [X] @ar { .say }
13:02 p6eval rakudo 3867ff: 0␤3␤2␤3␤1␤3␤2␤3␤0␤3␤2␤3␤1␤3␤2␤3␤2␤3␤2␤3␤1␤3␤2␤3␤0␤3␤2␤3␤1␤3␤2␤3␤1␤3␤2␤3␤1␤3␤2␤3␤0␤3␤2␤3␤1␤3␤2␤3␤2␤3␤2␤3␤1␤3␤2␤3␤0␤3␤2␤3␤1␤3␤2␤3␤
13:03 mberends hejki: not built in, but a user defined operator looks distinctly possible
13:03 hejki hmm
13:03 hejki that ALMOST works :P
13:05 Su-Shee after I wrote this @{ $in_cc{$group->oid} } = grep { $_ == $group->oid; } @assigned;
13:05 hejki hmm..
13:05 Su-Shee today, I'd like the next project in perl 6 as well.
13:07 hejki mm..
13:08 hejki X has weird precedence
13:08 hejki rakudo: my @ar = (1..2) X (3..4) X (5..6); my @ar2 = (1..2) X (3..4); @ar2 = @ar2 X (5..6); if @ar eqv @ar2 { say "im rick james bit*h" }
13:08 p6eval rakudo 3867ff:  ( no output )
13:08 hejki rakudo: my @ar = ((1..2) X (3..4)) X (5..6); my @ar2 = (1..2) X (3..4); @ar2 = @ar2 X (5..6); if @ar eqv @ar2 { say "im rick james bit*h" }
13:08 p6eval rakudo 3867ff: im rick james bit*h␤
13:10 hejki i'm making "random number" generator which is supposed to lazily make every possible combination of a digit with given size and return one random
13:12 colomon errr... you're lazily building the list of possibilities and then randomly choosing one of them?
13:14 hejki you sense problems?
13:16 colomon Well, I admit I don't understand laziness (in the context of programming, anyway) quite enough yet, but I don't see how you can easily choose one of a lazy list without actually generating much or all of it.
13:17 hejki my @ar = gather { for ^Inf -> $i { take $i if $i % 2; } }; say "fifth even number: " ~ @ar[4];
13:17 hejki also is there some oddities required for a list of lists?
13:17 colomon hejki: but it has to calculate the first four even numbers to get the fifth one.
13:18 hejki rakudo: my @ar1 = (1..2); my @ar2 = (3..4); my @ar3 = @ar1, @ar2; say @ar3.elems
13:18 p6eval rakudo 3867ff: 4␤
13:20 hejki colomon: ye but that's better than generating all the possible choices and then selecting one of them? :)
13:20 SmokeMachine joined #perl6
13:20 colomon hejki: and if you asked it to, say, "pick" from your lazy list, then the first thing it does internally is call .elems on the list, which will generate all the elements on the list.
13:21 hejki ofc
13:21 hejki that's why i'm asking for a single value directly
13:25 hejki rakudo: my @ar = [1..2], [3..4]; say @ar.elems; @ar>>.say
13:25 p6eval rakudo 3867ff: 2␤1 2␤3 4␤
13:25 hejki i need to enclose them all in brackets? :<
13:31 colomon Brackets make an array reference, not a list.
13:31 hejki seeminglt
13:31 hejki y
13:31 colomon I don't know how to make a list of lists like that.
13:34 go|dfish joined #perl6
13:36 * colomon is trying to build Rakudo from source on 32-bit XP...
13:38 * colomon and failing.
13:38 hejki rakudo: say (48..57,65..90,97..122).pick(12, :replace)>>.fmt("%c")
13:38 p6eval rakudo 3867ff: cgk6mAKf0NDj␤
13:38 hejki ahh the ease
13:38 hejki hmm.. i recall there being character ranges too?
13:39 colomon rakudo: say ('a' .. 'g').pick
13:39 p6eval rakudo 3867ff: e␤
13:40 am0c joined #perl6
13:40 frettled hejki: On average, generating like you suggest will, on average, result in saving 50% in time spent generating.
13:40 colomon rakudo: say ('0' .. '9', 'a' .. 'z', 'A' .. 'Z').pick(12, :replace)
13:40 p6eval rakudo 3867ff: mFMs0l9iCV5s␤
13:40 hejki rakudo: say (1..10,'a'..'z','A'..'Z').pick(12, :replace)
13:40 p6eval rakudo 3867ff: YMZRY1D10fNN8␤
13:40 frettled hejki: unless you manage to add some really nifty tricks
13:41 hejki yeh
13:41 ruoso joined #perl6
13:41 hejki heh..
13:41 hejki 1..10 :)
13:41 hejki and it chose 10 \o/
13:43 plainhao joined #perl6
13:46 payload1 joined #perl6
13:48 soupdragon joined #perl6
13:54 Baggiokwok joined #perl6
14:05 pmurias joined #perl6
14:11 moritz_ good localtime, gentle{men,women}
14:11 PerlJam greetings moritz_
14:13 mathw $emotion localtime()
14:16 colomon \o
14:16 * colomon is very sad to be programming in Perl 5 at the moment.
14:17 takadonet colomon: why?
14:17 colomon takadonet: Because Perl 6 programming is coming more naturally to me these days.
14:19 * mberends does not mind working bilingually for a few years
14:19 cognominal modulo implementation current shortcomings, I agree with colomon
14:19 takadonet colomon: I been re writing some bioperl modules in Perl 6 and man.... it's so much cleaner!
14:19 cognominal say "ok"    if 'a' eq any< a b>
14:19 cognominal rakudo: say "ok"    if 'a' eq any< a b>
14:19 p6eval rakudo 3867ff:  ( no output )
14:19 cognominal ng: say "ok"    if 'a' eq any< a b>
14:19 p6eval ng 93fa57: get_pmc_keyed() not implemented in class 'Junction'␤current instr.: '_block14' pc 29 (EVAL_1:0)␤
14:20 Su-Shee mberends: I'm already at CSS, HTML, Perl 5 and JavaScript and SQL within one day, if I add Perl 6, I'll need a triple dose chocolate.
14:20 colomon I'd be all over writing this code in Perl 6, despite current implementation shortcomings, but trying to build Rakudo on Windows gives me hives.
14:20 cognominal any anytime now...
14:20 colomon and I need this code working ASAP.
14:20 mathw mmm chocolate
14:20 * mathw has written no code at all today
14:21 Su-Shee but I have to admit, exactly today I would have had good use for many perl 6 features.
14:21 mberends Su-Shee: if that's the excuse you need to have chocolate, help yourself!
14:21 PerlJam Why does anyone need an excuse for chocolate?  :)
14:21 Su-Shee I was talking triple dose.. ;)
14:22 mberends :) serious chocolate, Lindt 88%
14:25 Su-Shee bah, cheap stuff. ;)
14:26 Su-Shee (did I mention that I make chocolate truffles? :)
14:26 mathw I need to learn how to do that
14:26 mberends hmm, creamy truffles!
14:27 mathw A friend made some over Christmas and they were utterly superb
14:27 Su-Shee mathw: it's a winter thing, but it's rather easy and absolutely _no_ comparison to the bought stuff.
14:28 mathw absolutely
14:28 mathw Jen's were amazing
14:28 mathw They got eaten in quite short order
14:28 Su-Shee and I recommend "cluizel" cuverture.
14:29 Su-Shee which reminds me, I need to buy forms.
14:31 Woody2143 joined #perl6
14:33 diakopter I've gotten twitter fail whale several times in the past few minutes. over-capacity? at 9:30 EST?
14:34 mathw it's been having a few problems recently
14:34 PerlJam diakopter: same thing happened to me yesterday.
14:34 PerlJam it's all those people tweeting about the holidays  :)
14:35 diakopter PerlJam: I suppose you're not /perljam on twitter
14:36 PerlJam I'm generally perlpilot or duff on anywhere but IRC
14:36 diakopter oh :)
14:36 diakopter in that case I'm already following you, I think
14:37 diakopter nope, not yet.
14:40 diakopter I've been able to find neither the 2008 nor the 2009 State of the Onion talks (video, slides, transcript, audio, nothing) anywhere online..... does anyone know [with certainty] whether recordings of any form exist *anywhere*?
14:42 somebody_ joined #perl6
14:43 soupdragon joined #perl6
14:44 PerlJam diakopter: they aren't linked at http://www.perlfoundation.org/perl6/index.cgi?state_of_the_onion  ?
14:44 jho Is it intended behavior that (1,2,3)».say works, but (1,2,3) » .say, (1,2,3)» .say, and (1,2,3) ».say don't?
14:45 moritz_ yes
14:45 PerlJam jho:  they all mean different things  :)
14:45 moritz_ method calls don't allow spaces
14:45 moritz_ and adding a » or >> to a method call doesn't change that
14:45 moritz_ foo .bar would be parsed as foo($_.bar)
14:45 PerlJam (1,2,3) » .say  would be an infix:<»>
14:45 diakopter PerlJam: no..
14:46 diakopter did you click it?
14:46 jho Oh, cool. I thought » as some kind of an infix operator like + and - instead of like that. Thanks.
14:47 PerlJam diakopter: No, but that's usually where they end up.
14:48 * colomon has given up altogether on automatically generating this code for $work...
14:52 ejs1 joined #perl6
15:05 Su-Shee colomon: I have fixed my stuff, jippi!
15:05 colomon \o/
15:06 Su-Shee (this code has to go.)
15:10 spokebug_perl6 joined #perl6
15:11 diakopter spokebug_perl6: camelia? is that you?
15:11 ive joined #perl6
15:15 mikehh joined #perl6
15:15 mberends it would have been wonderful if the spokesbug had spoken. a visitation.
15:16 PerlJam indeed.
15:16 PerlJam for a spokesbug, it sure was oddly quiet
15:17 Su-Shee wrong frequency for us humans to hear.
15:18 ash_ joined #perl6
15:19 PerlJam must be
15:26 kst joined #perl6
15:31 fridim_ joined #perl6
15:38 pmichaud good morning, #perl6
15:38 takadonet pmichaud: morning, how are you?
15:38 PerlJam greetings pm
15:38 pmichaud doing well, after extended absence
15:38 takadonet great to hear!
15:39 colomon \o/
15:40 moritz_ looking for jobs and writing applications is a daunting task, somehow
15:41 * moritz_ a bit depressed
15:41 colomon moritz_: it truly is.
15:41 slavik moritz_: what area?
15:42 Su-Shee moritz_: just list what you've done, mail what you know and what you done (but what you have to offer instead) and you'll be fine.
15:42 mathw yeah it's a horrible task
15:42 pmichaud "Please describe your dream job."    "I work on Perl 6, travel to conferences, and collect big paychecks."
15:42 pmichaud (direct deposit, of course)
15:42 slavik haha
15:42 mathw mmm that'd be nice
15:42 Su-Shee pmichaud: "travel to conferences in interesting places.." :)
15:42 moritz_ pmichaud: agreed :-)
15:42 slavik pmichaud: if only all of us could do that ...
15:42 mathw Su-Shee: travel to enough and they're bound to be in interesting places occasionally
15:43 aindilis joined #perl6
15:43 pmichaud conferences don't typically get held in uninteresting places :)
15:43 slavik and somewhere, someone will go on a rant and smash coffee cups ...
15:43 pmichaud at least, not the ones I'm interested in :)
15:43 diakopter there was Houston
15:43 moritz_ slavik: physics/engineering or programming (or obth)
15:43 pmichaud Houston is interesting if you know where to go :)
15:43 slavik hmm, no luck here then :(
15:44 diakopter :( I was there 18 years and only learned where not to go
15:44 pmichaud (and if you have transportation to take you there)
15:45 ash_ i lived in Houston from 0..9 so i don't remember much of it that would be useful now
15:45 ash_ moritz_: good luck on the job hunt, i am banking on grad school so i don't have to look for a job yet
15:46 Su-Shee moritz_: aren't you in the south anyway?
15:47 Tene Morning, pmichaud!
15:48 mathw I had a very interesting invitation to Houston once
15:48 mathw i was never able to accept it though
15:48 Tene ng: sub foo { fail "wtf" }; my $x = foo(); say "alive";
15:48 p6eval ng 93fa57: sh: ./perl6: No such file or directory␤
15:48 Tene bah!
15:48 mathw So it would've been more interesting then than now
15:48 mathw It's all very subjective
15:48 Tene ng: sub foo { fail "wtf" }; my $x = foo(); say "alive";
15:48 p6eval ng 93fa57: alive␤
15:48 Psyche^ joined #perl6
15:48 Tene ng: use fatal; sub foo { fail "wtf" }; my $x = foo(); say "alive";
15:48 p6eval ng 93fa57: wtf␤current instr.: '&fail' pc 14327 (src/builtins/Junction.pir:188)␤
15:48 slavik ng is the new rakudo?
15:48 Tene Yes.
15:49 moritz_ Su-Shee: yes. Erlangen/Nürnberg
15:49 slavik k, how far is it along implementing things that rakudo had?
15:49 slavik fail == die?
15:49 Tene slavik: ng is the new development branch of rakudo.
15:49 slavik I see
15:49 Tene fail == "soft die", kinda.
15:50 Tene fail == return Failure.new();
15:50 Tene failure objects throw exceptions if not handled properly, but don't necessarily die right away.
15:51 Tene pmichaud: How okay are you with me adding a "check $! for unhandled exceptions, and throw them if so" tail to every block?
15:52 Su-Shee moritz_: apply at suse.
15:53 moritz_ Su-Shee: :-)
15:53 pmichaud Tene: I'd like to see us map out all of the things that need to happen at the end of blocks
15:53 pmichaud instead of just adding them in piecemeal
15:53 * Tene nods.
15:53 Su-Shee moritz_: I would if I would live there.
15:53 pmichaud we need something to check return types, something to catch return exceptions, something to check $! for unhandled exceptions... etc.
15:54 pmichaud we also need LEAVE blocks
15:54 pmichaud as well as some way of handling NEXT/REDO/LAST
15:54 PerlJam there's also POST IIRc
15:54 pmichaud seems like we ought to figure out the generic mechanism for handling all of these
15:55 * pmichaud waits impatiently for the gphone announcement
15:56 Tene pmichaud: So, how's the lists API refactor coming? :)
15:57 pmichaud it's #2 on my todo list (have an $otherjob task atm)
15:58 Tene I've got an $otherjob task all day.  Just found out I was teaching this week right at the last minute late Sunday night.  Again.
15:59 takadonet Tene: what do you teach?
15:59 Tene takadonet: linux sysadmin classes
16:00 takadonet Tene: cool
16:00 PerlJam Tene: Last spring I found out I was teaching an all-day course on my in to work the day I was supposed to be teaching it (a scheduling snafu had me teaching about 2 days sooner than I expected, so I was fairly unprepared)
16:00 slavik what I want in a phone: hardware layout similar to sidekick with touchscreen, 480p resolution native, Linux and Blackberry connect. and hardware for OpenGL ES. :D
16:00 slavik Tene: do you do network security type stuff like ARP poisoning?
16:00 Tene pmichaud: I'm fairly comfortable with the Failure implementation so far.  Let me know if there's anywhere else you'd like me to work on.
16:01 Tene slavik: Occasionally, but we get very few of those classes.
16:01 Tene I've only taught one of them.
16:01 slavik :(
16:01 mberends slavik: and enough CPU and memory to run Rakudo
16:01 Tene They're my favorite, of course.
16:01 Tene AFK; teaching.
16:02 nihiliad joined #perl6
16:03 zamolxes joined #perl6
16:03 rachelBROWN joined #perl6
16:03 cognominal joined #perl6
16:06 justatheory joined #perl6
16:12 justatheory_ joined #perl6
16:15 pmurias joined #perl6
16:23 szbalint slavik: I just ordered a nokia n900, that should be able to do that :)
16:24 slavik almost but no :P
16:24 szbalint what is it missing?
16:25 slavik decent keyboard
16:25 * slavik has e90
16:25 KyleHa joined #perl6
16:26 szbalint well I guess if it would have a larger keyboard it'd be a tablet/netbook
16:27 arthur-_ joined #perl6
16:29 rodi joined #perl6
16:33 eric256 joined #perl6
16:36 eric256 is there an idiom to replace while (<>) { } ?
16:37 PerlJam eric256: for <>.lines { }  # IIRC
16:38 eric256 would $_ then be the current line? and does it need chomped or is it auto chomped?
16:38 TimToady for lines() { } is suposed to work
16:38 TimToady *supposed
16:38 JohnDoe365 joined #perl6
16:38 TimToady chomping is auto in p6
16:38 PerlJam TimToady: should the empty string work though?
16:38 TimToady <> is not an empty string, and it doesn't work anyway
16:39 TimToady oh, you mean in the line
16:39 TimToady a for doesn't care if the values are true or false
16:40 TimToady rakudo: for $*IN.lines { .say }
16:40 p6eval rakudo 3867ff: Land der Berge, Land am Strome,␤Land der Äcker, Land der Dome,␤Land der Hämmer, zukunftsreich!␤Heimat bist du großer Söhne,␤Volk, begnadet für das Schöne,␤vielgerühmtes Österreich,␤vielgerühmtes Österreich!␤␤Heiß umfehdet, wild umstritten␤liegst dem Erdteil du inmitten,␤einem starken
16:40 p6eval ..Herz…
16:40 TimToady for now, that at least works
16:40 eric256 yea that appears to be working for me....code is just slow...mmmm
16:41 diakopter how big is the input
16:41 eric256 its keyboard input, playing with converting my perlmonks conways game of life script over to perl6, not working yet and slow ;( lol
16:41 eric256 any way to get rakudo perl6 to tell me which revision it is running?
16:42 PerlJam I don't think speed is a strong point of any Perl 6 implementation.
16:42 moritz_ eric256: nope
16:42 TimToady (yet)
16:42 PerlJam yes, yet
16:42 eric256 well...that makes it hard to tell if i'm even running the version i think i am...
16:43 diakopter isn't there a *RAKUDO_VERSION or something
16:43 * PerlJam thinks he needs to have his vision checked.
16:43 PerlJam I keep seeing something via my left eye that isn't there.
16:44 diakopter detached retina? large floater?
16:44 TimToady does that help? :)
16:44 diakopter could be a parasite clod
16:44 Tene HORRIBLE DEMON?
16:44 TimToady idiosyncratic migraine
16:44 PerlJam fuzzy verticalish line that moves when I move my head
16:45 PerlJam perhaps there's something on my contact
16:45 Su-Shee PerlJam: plainly "age"? ;)
16:45 rodi Or ague, as the case may be.
16:46 JohnDoe365 left #perl6
16:46 PerlJam Su-Shee: heh, I was complaining about feeling old just a few minutes ago on another channel.
16:47 Su-Shee PerlJam: see? ;)
16:47 PerlJam A girl I graduated from high school with is about to become a grandmother.  Granted her daughter is only 18 or so, but still when your peers have grandchildren ...
16:48 eric256 for $*IN.lines() { } waits until all the lines are loaded then loops over them
16:48 TimToady PerlJam: if there's any chance it's a detached retina, you should get to an eye doc now
16:48 TimToady any active sports or head bashes lately?
16:48 PerlJam eric256: lists aren't lazy yet
16:49 PerlJam TimToady: nah, I've been fairly inactive.
16:50 eric256 LHS substr working?
16:50 PerlJam It was just weird that suddenly there was this thing in my vision that seemed to appear out of no where.
16:50 TimToady when it track your eye position exactly, or wander around?
16:51 TimToady s/when/does/ #gah
16:51 eric256 my $x = "hello world";$x.say; substr($x,5,1) = "A"; $x.say;
16:51 eric256 rakudo: my $x = "hello world";$x.say; substr($x,5,1) = "A"; $x.say;
16:51 p6eval rakudo 3867ff: hello world␤hello world␤
16:52 PerlJam whatever it was, it's gone now  (I just rubbed my eye a bit and it disappeared just as weirdly as it arrived)
16:52 Alias joined #perl6
16:53 TimToady well, that probably means you're not having a stroke, unless you're now developing left neglect
16:54 eric256 anyway to do that substr with rakudo?  guess i could split the string with two substrs and insert what i need in the middle....
16:54 Su-Shee "it's not lupus!" (House, M.D.)
16:55 PerlJam TimToady: I think  you've just inadvertently made me feel not so old.  (I just realized that I don't have the hard experience that would make me be so cautious.  I still think things like "nah, whatever it was is gone, so I'm good"  :)
16:56 TimToady well, hey, being ancient has to be good for somethin'...
16:56 diakopter u iz who u iz?
16:56 TimToady but yeah, eyes are a particular hot button of mine
16:57 PerlJam Actually, I'll know I'm old when I'm like my grandfather just before he died (at age 89).   All of his friends were dead and the people he tended to have conversations with were the sons or daughters of the people he knew)
16:58 Su-Shee PerlJam: we will all end up drooling on our keyboards "look, pa, those old guys still use keyboards!"
16:58 ash_ eric256: substr isn't fully functional yet
16:58 TimToady "a keyboard--how quaint"
16:59 PerlJam Su-Shee: I'm looking forward to some other form of input device that's better  than a keyboard.  I can't imagine what that will be, but whatever it is, it'll be awesome!  :)
16:59 soupdragon eye ooze speech two text four eye are see
16:59 ash_ rakudo: my $a = "hi"; $a = substr($a, 0, 1) ~  'b'; say $a;
16:59 p6eval rakudo 3867ff: hb␤
16:59 ash_ substr can't do a replacement in rakudo at the moment, but it can return a part of a string
16:59 diakopter soupdragon: :)
17:00 Su-Shee PerlJam: well it won't be trying to write something on a tablet pc, that's for sure.
17:00 PerlJam Su-Shee: you never can tell.
17:00 cdarroch joined #perl6
17:00 ash_ eric256 that should be more like: substr($a, 1, 1, 'b') or substr($a, 1, 1) = 'b' but those aren't working yet
17:01 Su-Shee PerlJam: think palm pilot scribbling a little more convenient. but not much more. or poking single letters on a displayed keyboard. ;)
17:02 PerlJam Lately I've seen some pretty cool things with using thoughts to control devices.   That technology may be mature in 20 years or so.
17:04 Su-Shee PerlJam: ah. the time, when the word "alzheimer perl/code" shows up.
17:05 eric256 ash i don't see the four argument form defined in S32...should it be?
17:05 PerlJam eric256: heh, I was just looking at S32 and thinking the same thing.
17:05 lisppaste3 eric256 pasted "4 arg substr" at http://paste.lisp.org/display/93030
17:06 * eric256 thinks "Hello"[5] = "A" should work too. lol ;P
17:07 ash_ eric256: i agree, the [ ] postfix does make sense
17:07 PerlJam ash, eric256: and what units are the numbers within the [] ?
17:07 ash_ eric256: loop at t/spec/S32-str/substr.t it has the 4 argument version of substr in the tests
17:09 eric256 yea ash i saw the tests, just not the documentation
17:09 ash_ PerlJam: i'd do it based off index's results, if i did my $a = "abc"; $a[$a.index('b')] = 'f';
17:09 ash_ i'd expect that to work, personally
17:10 eric256 ash...chars?
17:10 ash_ i know with unicode you can't say 5 and expect it to be the exact same in every encoding
17:10 eric256 or PerlJam i mean.
17:10 * eric256 has no experience with unicode though...so dunno
17:10 eric256 same units that substr uses?
17:11 eric256 i can't even seem to find where substr is defined in the src....
17:12 PerlJam eric256: are you on the ng branch?
17:12 eric256 could i put the four arg version in settings/Str.pm
17:12 eric256 no...should i use that instead?
17:12 PerlJam that's where I'd make any changes given that ng will become master soon
17:13 eric256 are there any directions on how to get it?
17:13 PerlJam (pick your own units of time for "soon" :)
17:13 * eric256 is still a git newb after years
17:13 PerlJam eric256: git co ng
17:13 ash_ eric256: src/gen/core.pm (if your in master)
17:13 ash_ line 757
17:13 PerlJam oh sorry, I'm too used to the shortcuts ... git checkout ng
17:14 PerlJam src/core/Any-str.pm (in ng)
17:14 eric256 even that fails.... did not mach any files known to git
17:16 * eric256 surfs github
17:16 rodi PerlJam: is that all?
17:16 rodi PerlJam: meaning, once I git checkout ng, I'm on the other branch?
17:16 PerlJam rodi: if you already have a clone of rakudo, yes.
17:16 PerlJam (though git may complain if you have some unsaved changes in your working copy)
17:17 PerlJam oh, wait sorry again,  I'm having a monday today,  you need to make a local copy of the remote branch
17:18 PerlJam git checkout -b ng -t origin/ng
17:18 PerlJam that creates a new local branch called "ng" that tracks the remote branch "origin/ng"
17:18 rodi ah, okay, that makes sense, kind of ;)
17:18 ash_ PerlJam: the -b isn't really needed, you can do git checkout -t origin/ng
17:18 ash_ and it makes a local branch called ng automattically
17:19 ash_ or if you want to give it a specific name you can do -b and specify, but its not always required :P
17:19 PerlJam ash_: I did it the verbose way because it depends on which version of git you have as to whether it works properly
17:19 PerlJam ash_: in modern git, you can just say  "git checkout -t ng"
17:19 ash_ ah, i didn't realize that only worked with newer git versions
17:20 eric256 git and forks and branches....arrrgg . lol
17:20 rodi so once I'm switched to the branch, do I need to git pull or anything to synch up with the remote repo?
17:21 PerlJam rodi: you could, but if you've fetched recently, you shouldn't need to.
17:21 ash_ it should be in sync already, when you do git pull it will automattically merge changes from origin/ng into your local ng and merge changes from origin/master into your local master
17:21 iblechbot joined #perl6
17:21 rodi ah, interesting.
17:24 PerlJam anyway, once you have a local branch, you can switch between  them with "git checkout master" and "git checkout ng"
17:33 PZt joined #perl6
17:36 pugs_svn r29470 | diakopter++ | [sprixel] gplusb mostly done..
17:45 colomon__ joined #perl6
17:50 eric256 okay...got the branch, added the method, made it...now is there a  way to run just that test?
17:51 mberends eric256: 'make testable', then ./perl6 t/spec/whatever/test.t
17:52 eric256 thanks
17:52 eric256 i thought that directions for that used to be on rakudo.org but i'm not finding them...
17:53 mberends that means even if they are on the site, they're not where they should be..
17:54 mberends patches welcome ;)
17:54 eric256 yea ironicaly i think i'm the one who wrote them last time cause i couldn't figure it out. lmao
17:54 eric256 mmmm this test has a block that doesn't parse and it has #?rakudo skip but its not skipping
17:55 astrojp left #perl6
17:55 eric256 ./perl6 t/spec/S32-str/substr.t
17:56 mberends that's because 'make spectest' does the fudging to create t/spec/S32-str/substr.rakudo which you should run
17:57 eric256 ahhhh
17:57 eric256 leavin steps out on me!
17:57 eric256 lol
18:05 ShaneC joined #perl6
18:05 ash_ eric256: i just realized there is also subst for doing string replacements
18:05 ash_ ng: my $a = 'hi'; $a.=subst('i', 'b'); say $a;
18:05 p6eval ng 93fa57: hb␤
18:09 eric256 yea but i'm doing positional replacements
18:09 colomon joined #perl6
18:09 astrojp joined #perl6
18:10 colomon eric256: I think what you really want is "make t/spec/S32-str/substr.t" -- at least, that's what I use to run a single test...
18:15 TimToady that doesn't make sense; a make target is a destination, not a source
18:15 TimToady maybe you want some kind of "prove"
18:16 KyleHa I do:  perl t/harness --fudge --verbosity=1 t/spec/S32-str/substr.t
18:16 KyleHa (That way I can specify my modified file off in ../pugs/t/spec... when I'm in the process of changing something.)
18:17 pmichaud 'prove' doesn't yet work reliably
18:17 pmichaud schwern++ created a make target where the name of the test runs the test
18:18 mberends rakudo: "aaaaa".subst(/<?after .**2> (.)/,"b").say # for eric256, but replacing the 2 with a variable causes Null PMC Access
18:18 p6eval rakudo 3867ff: aabaa␤
18:19 * pmichaud watches tweets of the nexus announcement :-|
18:20 takadonet hehe
18:20 TimToady I would consider that an abuse of make...
18:20 pmichaud yes, it's an abuse of make
18:22 TimToady I'd rather see something like make t/spec/S32-str/substr.ok where it just forgets to create substr.ok
18:23 pmichaud or even just leave off the .ok
18:24 TimToady my tab reflex would probably take over inappropriately...
18:25 pmichaud ...which I suspect is part of the reason we allow the .t :)
18:25 TimToady make ought just stick out its tongue and tell you it already exists
18:25 TimToady *oughta
18:26 TimToady either that, or we should rename it dwim
18:26 FCO joined #perl6
18:26 pmichaud eventually 'prove' should be able to handle it
18:27 TimToady the problem is 'prove' is too long; we should write 'ok' instead
18:28 TimToady and 'prove' is nowhere close to a real theorem prover...
18:28 * PerlJam wonders if David Huffman twitches in his grave
18:29 TimToady I think most of the time it would be a very small twitch
18:29 diakopter microexpression
18:30 soupdragon I hadn't heard of prove yet
18:32 payload joined #perl6
18:32 mberends soupdragon: perldoc prove # it's in Perl 5
18:34 pmichaud afk for a while # lunch
18:40 alester joined #perl6
18:45 tkr joined #perl6
18:50 eric256 that whole substr.t file doens't like me
18:50 eric256 lol
18:52 eric256 even after make spectest it still has sections that i have to hand comment out
18:52 arnsholt eric256: If there are fudged tests, the file you're looking for is called substr.rakudo
18:53 eric256 yea its not fudging them all for some reason...
18:53 eric256 lunch time, then i'll see if i can't fix that file
18:54 kst joined #perl6
19:11 justvisiting joined #perl6
19:33 ash_ joined #perl6
19:35 ash_ pmichaud: http://www.google.com/phone (i am sure you already found that link though)
19:36 * PerlJam wonders how many people will pay $529 for that phoen.
19:36 PerlJam I can't wait until smart phones become more commodotized and thus cheaper
19:39 Su-Shee PerlJam: an iPhone was going for 600 euros over the table when it came out. and you know how many people got one.. :)
19:40 Su-Shee counter is this thing called.
19:40 ash_ i know someone that hack's their iphone, they bought it for $700 when the iPhone 3GS came out on ebay (a steal compared to most that were going at the time)
19:41 PerlJam Yeah, but I'm not sure the apple hype machine and the google hype machine are the same size.  (I think apple's might be bigger for this market)
19:41 * Su-Shee doesn't own a fancy phone and no apple lifestyle products.
19:42 Su-Shee PerlJam: I don't know how extremely well done the UI and how incredibly super open source a phone would have to be until I pay those prices...
19:42 ash_ i love my iPhone, i wouldn't bother with a fancy phone if it didn't do all the stuff my iphone does, (namely how it integrates with music itunes and can act as a gps and i can tether anywhere i have a cellphone signal)
19:42 mikehh joined #perl6
19:44 clintongormley joined #perl6
19:45 ash_ i think iTunes is the only thing preventing me from using linux full time honestly...
19:45 Su-Shee no, no apple products in this household :)
19:45 nihiliad joined #perl6
19:45 ash_ which either says a lot about how much i listen to music, or how hard i am willing to try to find a replacement
19:45 Su-Shee well I'm very much into graphics and I still don't own anything mac. :)
19:46 * ash_ shrug
19:47 ash_ i have 3 operating systems on all of my computers and use the one i need when i need it, although windows is 90% a gaming thing and 10% stupid comp-sci homework that i have to do in some program on windows only
19:47 Su-Shee well open source is important to me so since 1995 I'm open source only at home and at work.
19:50 ash_ i wish i could only use open source stuff but its hard for me, plus school almost requires it, but at least they give us student developer accounts to microsoft and apple so we don't have to pay for it
19:54 TimToady std: 1 i
19:54 p6eval std 29470: [31m===[0mSORRY![31m===[0m␤Postfix found where infix expected at /tmp/ne0ggwAJkz line 1:␤------> [32m1 [33m⏏[31mi[0m␤    expecting any of:␤  bracketed infix␤  dotty␤  infix or meta-infix␤        infix stopper␤    postfix␤        standard stopper␤  terminator␤FAILED 00:01 107m␤
19:56 TimToady std: [say] 1,2,3
19:56 p6eval std 29470: [31m===[0mSORRY![31m===[0m␤Two terms in a row (preceding is not a valid reduce operator) at /tmp/k9gA3LQZVF line 1:␤------> [32m[say] [33m⏏[31m1,2,3[0m␤    expecting any of:␤       bracketed infix␤  dotty␤  infix or meta-infix␤        infix stopper␤    postfix␤        standard
19:56 p6eval ..stopper␤  statement modifier …
19:57 TimToady std: (1,2,3) ».say
19:57 p6eval std 29470: [31m===[0mSORRY![31m===[0m␤Method call found where infix expected at /tmp/B2eh4qB92I line 1:␤------> [32m(1,2,3) ».say[33m⏏[31m<EOL>[0m␤    expecting method arguments␤FAILED 00:01 107m␤
19:58 TimToady those message probably save the world about a billion hours of debugging time over the next 100 years...   :)
19:58 TimToady *messages
20:01 douglashunter STD++  I like its messages so much I had to write about it: http://blogs.perl.org/users/douglas_hunter/2010/01/running-perl-6-code-through-stdpm.html
20:02 pugs_svn r29471 | lwall++ | [STD] suggest omitting whitespace to get a postfix
20:02 douglashunter Time to go upgrade STD [grin]
20:03 TimToady douglashunter++
20:22 sjohnson rakudo: say "mountain jeff".subst('jeff', 'geoff');
20:22 p6eval rakudo 3867ff: mountain geoff␤
20:23 eric256 for substr, the code handling too long or too short of start and length doesn't loop, so if its more than 1 times the length off it doesn't work...
20:24 KyleHa joined #perl6
20:24 eric256 if $len < 0 then $len -= $start;...i'm not sure i understand the why behind that
20:25 ash_ substr("hello world", -4, -3); ?
20:25 ash_ rakudo: substr("hello world", -4, -3).say;
20:25 p6eval rakudo 3867ff: o␤
20:26 eric256 rakudo: substr("abcdefg",-4,-3).say;
20:26 p6eval rakudo 3867ff: d␤
20:27 sjohnson TimToady: hi.  is there a special $ENGLISH_VAR type thing to set the substitution params in a scope?  for instance, if i could do something like $SUB_PARAM = "gi" so i didnt have to write if statements to be insensitive or not and have 2 substition statements
20:27 sjohnson or something that accomplishes the same thing.  only other trick i know is doing s/moo/cow/$args;
20:28 ash_ eric256: its specifying the range from -4 to -3, which is 1
20:30 eric256 so its start and end...instead of length
20:31 ash_ in the negative case yeah
20:33 eric256 okay thats annoying. lol
20:33 kst joined #perl6
20:35 ash_ if your doing positional offsets you can always just convert your string to a list of chars and work that way
20:35 ash_ rakudo: say ("hello world".split(*))[3..6];
20:35 p6eval rakudo 3867ff: lo w␤
20:36 ash_ or you can always augment Str if you want to add your own str methods
20:38 Chillance joined #perl6
20:39 IllvilJa joined #perl6
20:45 eric256 so if the second argument is negative then we are assuming it is positional and if positive then it is length? and this isn't scary to anyone but me?
20:45 eric256 lol
20:48 slavik joined #perl6
20:48 KyleHa joined #perl6
20:49 TimToady negative cases should be done with *-$n now
20:50 eric256 *-$n....i have no idea what that means
20:50 TimToady *-1 really means { $_ - 1 }
20:51 TimToady so you recognize a closure (actually, type WhateverCode), and call it with whatever the base number is, like the length
20:51 TimToady same as @foo[*-1] gets the last element now
20:52 TimToady then there are no accidental discontinuities
20:52 TimToady and you just fail on a negative offset or length
20:53 frettled There should be a unicode character for *-1 :D
20:53 TimToady but it probably needs some speccing
20:53 TimToady but in general p6 shouldn't be using magical negatives like p5 does
20:54 mberends for consistency, is *+1 meaning { $_ + 1 } also valid ?
20:54 TimToady certainly
20:54 mberends :) nice
20:54 TimToady rakudo: say (*+1)(2)
20:54 p6eval rakudo 3867ff: 3␤
20:54 cognominal joined #perl6
20:55 TimToady the point is to avoid discontinuities in the semantics of a continuous number line
20:56 TimToady whatevers are just a means to that end
20:56 ash_ rakudo: class Str is also { method postcircumfix:<[ ]> (*@slice) { say 't'; self.split(*)[1]; } }; my $str = "Hello"; say $str[1];
20:56 p6eval rakudo 3867ff: t␤t␤t␤t␤t␤t␤t␤t␤t␤
20:57 ash_ why does that turn into a recursive call?
20:57 frettled @foo[*-1] could be @foo[Ω] :D
20:57 TimToady you defined [] in terms of []
20:57 lichtkind joined #perl6
20:58 ash_ but self.split(*) returns a list
20:58 ash_ so shouldn't it resolve to the list poscircumfix:<[ ]> ?
20:59 TimToady what the heck does .split(*) do?
20:59 ash_ splits the string into a list of it characters
20:59 ash_ "hi" = ('h', 'i')
20:59 TimToady first I've heard of that
20:59 TimToady you should use .comb
21:00 frettled hmm.
21:00 ash_ well more properly "hi".split(*) ~~ ('h', 'i')
21:00 ash_ hmm
21:00 ash_ k, i'll try comb
21:00 frettled rakudo: my Ω = *-1; # *twitch*
21:00 p6eval rakudo 3867ff: Malformed declaration at line 2, near "\u03a9 = *-1; #"␤in Main (file <unknown>, line <unknown>)␤
21:00 frettled phew
21:01 arnsholt rakudo: my $Ω = *-1;
21:01 p6eval rakudo 3867ff:  ( no output )
21:01 frettled Oh, I managed to drop the sigil?  Yay.
21:01 TimToady the first arg to split is the pattern to split on, anyway, and * is not a regex pattern
21:01 frettled arnsholt: that does it, no blogging for me tonight :D
21:02 TimToady std: my Ω = *-1; # *twitch*
21:02 p6eval std 29471: [31m===[0mSORRY![31m===[0m␤Malformed my at /tmp/eljmYE4GqU line 1:␤------> [32mmy [33m⏏[31mΩ = *-1; # *twitch*[0m␤    expecting any of:␤      scoped declarator␤        typename␤FAILED 00:01 107m␤
21:02 TimToady std: constant Ω = *-1; # *twitch*
21:02 p6eval std 29471: ok 00:01 105m␤
21:03 sjohnson TimToady: plz2comment on my question?
21:03 bryan[c1] joined #perl6
21:04 TimToady s:g($global):i($insenstive)///
21:05 sjohnson thank you!
21:06 bluescreen joined #perl6
21:07 frettled TimToady: ah!
21:07 frettled I'll pretend to be a genious somewhere else, then.
21:07 frettled rakudo: constant Ω = *-1;
21:07 p6eval rakudo 3867ff:  ( no output )
21:07 frettled woot.
21:08 frettled rakudo: constant Ω = *-1; my @l = <a b c d>; say @l[Ω];
21:08 p6eval rakudo 3867ff: d␤
21:08 frettled \o/
21:08 TimToady frettled++
21:09 TimToady rakudo: constant Ω = *-1; my @l = <a b c d>; say @l[-Ω];
21:09 p6eval rakudo 3867ff: Use of uninitialized value␤␤
21:10 TimToady rakudo: constant Ω = *-1; my @l = <a b c d>; say @l[Ω-1];
21:10 p6eval rakudo 3867ff: c␤
21:11 frettled -Ω shouldn't really make any sense
21:12 sjohnson cute symbol tho
21:12 TimToady it's a horseshoe whose luck has run out
21:13 ash_ rakudo: class Str is also { method postcircumfix:<[ ]> (*@slice) { say 't'; self.comb."postcircumfix:[ ]"(@slice).join; } } my $str = "hello world"; say $str[2..8];
21:13 p6eval rakudo 3867ff: Confused at line 2, near "my $str = "␤in Main (file <unknown>, line <unknown>)␤
21:14 ash_ rakudo: class Str is also { method postcircumfix:<[ ]> (*@slice) { say 't'; self.comb."postcircumfix:[ ]"(@slice).join; } }; my $str = "hello world"; say $str[2..8];
21:14 sjohnson rakudo: my $点 = "tank";  say $点
21:14 p6eval rakudo 3867ff: t␤llo wor␤
21:14 p6eval rakudo 3867ff: tank␤
21:16 slavik sjohnson: rakudo handles kanji ... do we win?
21:16 TimToady rakudo: constant 点 = "tank"; say 点;
21:16 p6eval rakudo 3867ff: tank␤
21:16 sjohnson i was gonna use the constant, but was afraid to try the "use" part like in p5
21:17 sjohnson looks like it doesnt use the , / => either
21:17 sjohnson std: use v5;  use constant MILK => 1;
21:17 p6eval std 29471: Potential difficulties:␤  Can't locate module constant at /tmp/OD5mbtNyaD line 1:␤------> [32muse v5;  use constant MILK => 1[33m⏏[31m;[0m␤ok 00:01 105m␤
21:17 TimToady it's completely unrelated
21:17 frettled slavik: it's even better, it handles _unicode_ rather well. :D
21:17 sjohnson much like the other p5 p6 differences :)
21:18 slavik hmm
21:18 * sjohnson is hoping for the "use cute;" pragma someday
21:18 frettled rakudo: constant ⏏ = '⏏;␤'; say ⏏;
21:18 p6eval rakudo 3867ff: Malformed declaration at line 2, near "\u23cf = '\u23cf;\n';"␤in Main (file <unknown>, line <unknown>)␤
21:18 frettled oops, single quote-FU
21:19 frettled rakudo: constant ⏏ = "⏏;␤"; say ⏏;
21:19 p6eval rakudo 3867ff: Malformed declaration at line 2, near "\u23cf = \"\u23cf;\n\";"␤in Main (file <unknown>, line <unknown>)␤
21:19 TimToady has to be alphanumeric
21:19 frettled or was there another FU?  Don't code while over-tired, folks, but only when over-tiered.
21:19 frettled TimToady: aha.
21:19 frettled TimToady: I forgot about that.
21:19 sjohnson std: use cute;
21:19 p6eval std 29471: Potential difficulties:␤  Can't locate module cute at /tmp/4QoOLaT4mD line 1:␤------> [32muse cute[33m⏏[31m;[0m␤ok 00:01 103m␤
21:20 TimToady probably has to start alpha (including ideographs)
21:20 TimToady rakudo: constant 42 = 43; say 42
21:20 p6eval rakudo 3867ff: Malformed declaration at line 2, near "42 = 43; s"␤in Main (file <unknown>, line <unknown>)␤
21:21 frettled rakudo: constant Ѡ = *-1;
21:21 p6eval rakudo 3867ff:  ( no output )
21:22 douglashunter frettled:  I didn't know that you could say "bootie" in unicode.
21:22 frettled :D
21:22 frettled douglashunter: only in Cyrillic!
21:22 sjohnson wow, bending the rules of math with the 42 thing
21:22 sjohnson opens the door for some cool obfuscated code probably
21:23 frettled rakudo: constant æ = "œ"; say æ;
21:23 p6eval rakudo 3867ff: œ␤
21:23 TimToady std: constant א₀ = Inf;
21:23 p6eval std 29471: ok 00:01 107m␤
21:24 frettled I think that ∞ should be a constant, too.
21:24 slavik rakudo: constant пиздец = "блять"; say пиздец;
21:24 p6eval rakudo 3867ff: блять␤
21:25 slavik hmm, it works
21:25 TimToady rakudo: sub term:<∞> () { return Inf }; say ∞
21:25 p6eval rakudo 3867ff: say requires an argument at line 2, near " \u221e"␤in Main (file src/gen_setting.pm, line 2593)␤
21:25 dduncan joined #perl6
21:25 TimToady std: sub term:<∞> () { return Inf }; say ∞
21:25 p6eval std 29471: ok 00:01 110m␤
21:25 sjohnson rakudo: say π
21:25 p6eval rakudo 3867ff: Could not find non-existent sub π␤in Main (file src/gen_setting.pm, line 324)␤
21:26 frettled perhaps it wants ∏
21:26 frettled ;)
21:26 slavik П?
21:26 sjohnson rakudo:  say ∏
21:26 p6eval rakudo 3867ff: say requires an argument at line 2, near " \u220f"␤in Main (file src/gen_setting.pm, line 2593)␤
21:26 frettled rakudo: constant Ѡ = *-1; my @letters = 'a'..'z'; say @letters[Ѡ];
21:26 sjohnson should they just work? or must i declare them first
21:26 p6eval rakudo 3867ff: z␤
21:27 Tene ng: constant Ѡ = *-1; my @letters = 'a'..'z'; say @letters[Ѡ];
21:27 p6eval ng 93fa57: Could not find non-existent sub &Ѡ␤current instr.: '_block14' pc 29 (EVAL_1:0)␤
21:29 sjohnson rakudo: say <pig COW mooSe>.lc
21:29 p6eval rakudo 3867ff: pig cow moose␤
21:29 frettled rakudo: say pi;
21:29 p6eval rakudo 3867ff: 3.14159265358979␤
21:29 frettled rakudo: constant π = pi; say π;
21:29 TimToady rakudo: say pi.WHAT
21:29 p6eval rakudo 3867ff: 3.14159265358979␤
21:29 p6eval rakudo 3867ff: Num()␤
21:30 sjohnson ahh thats a good way to get it
21:30 sjohnson doing that increases the cuteness factor of simple circle code
21:31 TimToady perl6: say pi
21:31 p6eval pugs: 3.141592653589793␤
21:31 p6eval ..rakudo 3867ff: 3.14159265358979␤
21:31 p6eval ..elf 29471: Undefined subroutine &GLOBAL::pi called at (eval 123) line 3.␤ at ./elf_h line 5881␤
21:32 TimToady pugs: say pi.WHAT
21:32 p6eval pugs: Rat␤
21:32 TimToady pugs++
21:33 frettled But that's just wrong!  Pi is irrational!  :D
21:34 TimToady but pugs is telling the truth, unlike rakudo, which is lying :)
21:35 frettled pugs is telling a false truth, while Rakudo is telling a true lie.
21:35 frettled Is pi represented as a Num in Rakudo, or is it _really_ lying about itself?
21:36 frettled ng: say pi.WHAT
21:36 TimToady I'm sure it's represented as a Num, but the name "Num" is kinda lying
21:36 p6eval ng 93fa57: Could not find non-existent sub &pi␤current instr.: '_block14' pc 29 (EVAL_1:0)␤
21:36 frettled aha
21:36 TimToady in CORE.setting we have: constant pi is export = 3.14159_26535_89793_238;   # 46_26433_83279_50288;
21:36 sjohnson TimToady: you ever watch those guys like daniel temmett recipe Pi to a few thousand digits?
21:36 TimToady because that's what fits into a Rat64
21:36 sjohnson it's pretty amazing
21:36 sjohnson recite*
21:37 frettled sjohnson: there's a recipe for that ;)
21:37 sjohnson oops Tammet
21:37 sjohnson :)
21:37 TimToady hey, no swearing
21:37 sjohnson ... 22,514 digits in five hours and nine minutes
21:37 sjohnson i could probably recite it to about 9 digits after 5 hours of memorization
21:39 TimToady bbl &
21:39 frettled There, blogified.
21:39 sjohnson & remembering pi digits :)
21:40 frettled TimToady++ for (once again) providing a solution to my blogging problem.
21:40 nihiliad joined #perl6
21:40 frettled Hmm, 42 Iron Man blog entries in 2009.  Coincidence?  I think not!  :D
21:42 arnsholt There was talk of some kind of workshop in Copenhagen a while back. Anything more come out of that?
21:42 sjohnson frettled: :)
21:44 kst joined #perl6
21:56 orafu joined #perl6
22:05 sjohnson frettled: is there a way to do a Super of $_ vars?
22:05 sjohnson like, from the parent block?
22:08 ash_ $OUTER::_ or OUTER::<$_>
22:08 sjohnson is this doable in p5? or new to p6
22:09 ash_ thats how its speced in perl6, see S04, i don't know about perl 5
22:10 sjohnson ash_: how did you become so accustomed to the specs?
22:10 sjohnson did you just read em one by one?  or do you kinda know the cool features and which ones they're from by picking it up along the way
22:11 ash_ i have read them a few times and have to keep looking stuff up in them
22:11 ash_ mostly i try stuff, and when i find something that doesn't work, i find 'the right way' to do it by reading the specs or asking here
22:11 sjohnson cool
22:11 sjohnson i also like knowing the right way
22:12 sjohnson in case i do something drastic a few years down the road from a bad assumption
22:13 ash_ most of the time i try to do something, can't figure it out myself, then check the specs and learn something new, then someone asks about it later
22:17 vorner joined #perl6
22:21 kst joined #perl6
22:26 slavik joined #perl6
22:30 slavik joined #perl6
22:32 sjohnson rakudo:  my $num; for (1..10) { $num += 0.1; }; if ($num == 1) { say "true"; } else { say "$num != 1"; }
22:32 p6eval rakudo 3867ff: 1 != 1␤
22:37 ash_ thats odd sjohnson i am guessing its a number rounding problem
22:38 astrojp left #perl6
22:39 frettled rakudo: my $num; for (1..10) { $num += 0.1; }; if ($num ==  1) { say "true"; } else { say "$num != 1"; }
22:39 p6eval rakudo 3867ff: 1 != 1␤
22:39 frettled arghle, copy+paste-FU
22:39 frettled rakudo: my $num; for (1..10) { $num += 0.1; }; if ($num ==  1) { say "true"; } else { say "$num != 1"; say $num.WHAT }
22:39 p6eval rakudo 3867ff: 1 != 1␤Num()␤
22:39 astrojp joined #perl6
22:39 frettled rakudo: my $num; for (1..10) { $num += 0.1; }; if ($num ==  1) { say "true"; } else { say "$num != 1"; say $num.WHAT; say 1.WHAT; }
22:39 p6eval rakudo 3867ff: 1 != 1␤Num()␤Int()␤
22:39 ash_ rakudo: my $num; for (1..10) { $num += 1; }; if ($num/10 ==  1) { say "true"; } else { say "$num != 1"; say $num.WHAT }
22:39 p6eval rakudo 3867ff: true␤
22:40 ash_ its a rounding issue
22:40 ash_ .1 + .1 ... is .99999999999 internally, which isn't == 1
22:40 ash_ i thought they made rakudo keep all Num's as rationals internally though, which should avoid this problem
22:41 frettled rakudo: my $num; for (1..10) { $num += 1; }; if ($num/10 ==  1) { say "true"; say ($num/10).WHAT; } else { say "$num != 1"; say $num.WHAT; say 1.WHAT; }
22:41 p6eval rakudo 3867ff: true␤Rat()␤
22:41 frettled rakudo: my $num; for (1..10) { $num += 1; }; if ($num/10.0 ==  1) { say "true"; say ($num/10).WHAT; } else { say "$num != 1"; say $num.WHAT; say 1.WHAT; }
22:41 p6eval rakudo 3867ff: true␤Rat()␤
22:42 frettled rakudo: my $num; for (1..10) { $num += 1/10; }; if ($num ==  1) { say "true"; } else { say "$num != 1"; say $num.WHAT }
22:42 p6eval rakudo 3867ff: true␤
22:43 bryan[c1] joined #perl6
22:43 frettled IOW: mind how you do decimal math
22:43 slavik1 joined #perl6
22:44 frettled This is (perhaps) easier to grok for those of us who have had to work with float vs. int in other settings.  :)
22:48 frettled rakudo: my $num; for (1..10) { $num += 0.1; }; if (round($num) == 1) { say "true"; } else { say "$num != 1" }
22:48 p6eval rakudo 3867ff: true␤
22:50 ash_ this is a bad thing but:
22:51 ash_ rakudo: my $num; for (1..10) { $num += 0.1; }; if $num eq 1 { say "true"; } else { say "$num != 1" }
22:51 p6eval rakudo 3867ff: true␤
22:51 ash_ yea... that stringifies the values
22:51 ash_ and compares them
22:54 racetam joined #perl6
22:54 ash_ rakudo: my $num; for (1..10) { $num += 0.1; }; if $num cmp 1 { say "true"; } else { say "$num != 1" }
22:54 p6eval rakudo 3867ff: true␤
22:54 ash_ cmp also seems to get this one right
22:55 ash_ although i am not really that familiar with cmp
23:01 sjohnson ash_: it's a classic binary problem
23:02 sjohnson ahh i see u have figured it out :)
23:02 sjohnson best way is to use a rat obj imo
23:02 sjohnson 1/10
23:02 BcaT joined #perl6
23:04 rgrau` joined #perl6
23:05 cognominal joined #perl6
23:11 eric256 left #perl6
23:17 colomon rakudo: say (10 cmp 1)
23:17 p6eval rakudo 3867ff: 1␤
23:17 colomon rakudo: say (1 cmp 10)
23:17 p6eval rakudo 3867ff: -1␤
23:17 ash_ ah, its a -1, 0, 1 comparision
23:18 ash_ rakudo: say 10 leg 1;
23:18 p6eval rakudo 3867ff: 1␤
23:18 ash_ rakudo: say 1 leg 10;
23:18 p6eval rakudo 3867ff: -1␤
23:18 ash_ whats the difference between leg and cmp ?
23:18 dduncan leg is string-specific, I think
23:18 dduncan cmp is generic
23:19 dduncan leg will cast its arguments as strings
23:19 ash_ ah, how can you tell if a string is 'greater than' another string?
23:19 dduncan eg, "$foo leg $bar" means "~$foo cmp ~$bar" I think
23:20 dduncan ash_, how does one normally sort strings?  its done that way
23:20 dduncan if you mean that you want it to be affected by a collation then I don't know
23:21 dduncan if $foo and $bar are already strings, then cmp and leg should have the same semantics
23:21 dduncan but if say $foo and $bar are numbers, then cmp will do a num sort while leg will do a sort of their stringifications
23:26 slavik joined #perl6
23:29 sjohnson ash_: gt
23:29 sjohnson == greater than for strings
23:29 sjohnson > is for numeric
23:31 jan_ joined #perl6
23:42 sjohnson gt and lt
23:42 rachelBROWN joined #perl6
23:48 ash_ i gotta head home, cya
23:55 dduncan oh, gt, that's what you were asking about
23:55 dduncan my bad
23:58 Khisanth joined #perl6

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

Perl 6 | Reference Documentation | Rakudo