Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2010-09-03

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00:00 Italian_Plumber left #perl6
00:01 lue is nqp-rx/src/Regex/P6Regex/Grammar.pm:156 what allows (regexes&tokens&rules) to be assertions, e.g. token xyzzy being later used as <xyzzy> ?
00:08 lue afk # will ask again later
00:10 jimi_hendrix Tene, well is it at the point where i can stop using perl5 for most things?
00:10 PerlJam jimi_hendrix: not yet.
00:11 Tene jimi_hendrix: Not yet.  I still use Perl 5 for some things.  The ratio is changing, but there are still significant limitations with Perl 6.
00:11 kcwu left #perl6
00:11 jimi_hendrix Tene, such as?
00:11 Tene Network access, threading, anything where I want to interoperate with existing Perl 5 libraries.
00:11 Tene Perl 5 interop isn't there yet.
00:12 azert0x left #perl6
00:12 Tene There are some other big limitations listed in that announcement I linked.
00:12 jimi_hendrix ah
00:12 jimi_hendrix ok, thanks
00:12 * jimi_hendrix now idles
00:19 kcwu joined #perl6
00:19 cognominal what is the difference between cheats and builtins in rakudo?
00:21 Tene cognominal: I expect that builtins are specced, and intended to be used by language users directly, while cheats are internal helper stuff.
00:22 Tene That's been my understanding, at least.
00:22 pmichaud cheats are places where we think we're cheating :)
00:22 pmichaud builtins are primitives that probably need to remain primitives
00:23 pmichaud cheats are palces where we kthink it ought to be written in p6, or where we're doing Evil Things (esp w/Parrot)
00:23 cognominal thx
00:24 Quadrescence left #perl6
00:25 Quadrescence joined #perl6
00:30 Packetknife joined #perl6
00:30 Packetknife left #perl6
00:30 Packetknife joined #perl6
00:34 florz left #perl6
00:34 schpey joined #perl6
00:35 florz joined #perl6
00:37 whiteknight left #perl6
00:37 risou_ left #perl6
00:39 alksentrs joined #perl6
00:39 draxil left #perl6
00:41 draxil joined #perl6
00:46 schpey left #perl6
00:48 Italian_Plumber joined #perl6
00:52 draxil left #perl6
00:52 Packetk54 joined #perl6
00:54 kcwu left #perl6
00:54 kcwu joined #perl6
00:55 Packetknife left #perl6
00:56 lichtkind i cant see in syn how a role express its need for an attribute to be present
00:57 Psyche^ joined #perl6
00:57 Psyche^ is now known as Patterner
00:58 dalek book: 15f4a28 | chromatic++ | src/builtins.pod:
00:58 dalek book: Minor edits to builtins section.
00:58 dalek book: review: http://github.com/perl6/book/commit/15​f4a28cb45bc218b7b7d8f5911ce3651a6fd8e7
00:58 dalek book: 96aca52 | chromatic++ | src/regexes.pod:
00:58 dalek book: Edited regex chapter; much better than last time.
00:58 dalek book: review: http://github.com/perl6/book/commit/96​aca52c9dfd800a39431a69cd889c366e90bcc9
00:59 jferrero left #perl6
01:00 draxil joined #perl6
01:01 Packetk54 left #perl6
01:02 Packetknife joined #perl6
01:02 Packetknife left #perl6
01:02 Packetknife joined #perl6
01:03 masak joined #perl6
01:05 Packetknife left #perl6
01:10 svetlins hi guys
01:10 svetlins i have a question about grammars
01:10 masak ok
01:10 svetlins when you have two matching proto regexes with the same length
01:10 svetlins how do i know which one wins
01:10 svetlins ?
01:10 masak I'd guess the textually first one wins.
01:11 svetlins nope
01:11 svetlins :\
01:11 masak 4) Within a given compilation unit, earlier declaration wins
01:11 masak that's from S05.
01:11 svetlins i'll test it again
01:11 svetlins but i'm pretty sure it is not working that way
01:11 masak if you can show us a short example where that isn't so, it would be very helpful to us.
01:12 svetlins ok, i
01:12 svetlins i'll try to extract that part of the code
01:14 justatheory left #perl6
01:15 cls_bsd_ is now known as cls_bsd
01:17 mfollett joined #perl6
01:19 Chillance left #perl6
01:25 svetlins masak: how do I show you the code?
01:26 masak http://gist.github.com/
01:26 svetlins ah ok :)
01:30 svetlins masak: http://gist.github.com/563259​#file_grammar_proto_priority.pl
01:30 * masak looks
01:31 svetlins i you remove the letter regex
01:31 svetlins the digit starts to match
01:31 masak nod
01:31 svetlins but the digit regex should be matchin according to S05, as you said
01:31 pmichaud according to the spec, digit should be preferred, yes.
01:32 pmichaud Rakudo doesn't implement that yet.
01:32 pmichaud As it exists now, it uses the protoregex that has the longer name
01:32 pmichaud (it's a cheating heuristic until we have some way of keeping track of the order of declarations, which we don't have at the moment.)
01:32 svetlins i understand, there has to be SOME rule
01:33 svetlins it can't be just random :)
01:33 svetlins thank you for the quick answer
01:33 pmichaud if you'd like it to prefer digits over letters, either make the first name longer or the second one shorter :)
01:34 svetlins yeah, i got that :)
01:34 pmichaud or if you really want the second one to only match letters, use  regex char:sym<letter> { <alpha> }
01:34 pmichaud er, <.alpha>
01:35 svetlins unfortunately, in my real code i don't need to match letters
01:35 svetlins it was too messed up to show it though
01:36 pmichaud np, I understand :)
01:37 svetlins just to mention
01:38 svetlins today was my first day doing perl and i really liked it :)
01:38 svetlins keep up the good work
01:39 masak http://perlvogue.com/ -- if they mention Perl 6 on the cover, maybe someone should send in some articles? :)
01:42 florz hmm ... I'm somewhat lost as to under what conditions auto-flattening of lists happens
01:43 masak florz: short story: not very often.
01:43 florz my impression is that it's impossible to avoid =:-)
01:43 florz well, let's say I want to have a list of the pairs of a cartesian product ...
01:44 masak rakudo: my @a = 1, 2, 3; my @b = <a b c >; say (@a X @b).perl
01:44 justatheory joined #perl6
01:44 p6eval rakudo 33e94e: OUTPUT«((1, "a"), (1, "b"), (1, "c"), (2, "a"), (2, "b"), (2, "c"), (3, "a"), (3, "b"), (3, "c"))␤»
01:44 florz yeah, right
01:44 masak see the lists being preserved?
01:45 florz but if I assign that to some @x, @x.perl looks rather flat
01:45 pmichaud yes, because array assignment flattens
01:46 florz at least not a bug this time ... ;-)
01:46 pmichaud what you'll eventually want is    (@a X @b).slice, I think
01:46 pmichaud that will turn the list of lists into a list of arrays
01:46 pmichaud and then they won't flatten
01:46 Guest10103 left #perl6
01:46 pmichaud (.slice NYI, alas)
01:47 pmichaud but you migth be able to do:
01:47 pmichaud my @a = 1,2,3; my @b = <a b c>;  say (@a X @b).map( *.item ).perl;
01:47 pmichaud rakudo: my @a = 1,2,3; my @b = <a b c>;  say (@a X @b).map( *.item ).perl;
01:47 p6eval rakudo 33e94e: OUTPUT«(((1, "a")), ((1, "b")), ((1, "c")), ((2, "a")), ((2, "b")), ((2, "c")), ((3, "a")), ((3, "b")), ((3, "c")))␤»
01:48 masak how hard would it be to implement .slice?
01:48 pmichaud rakudo: my @a = 1,2,3; my @b = <a b c>;  my @c = (@a X @b).map( *.item );  say @c.perl;
01:48 p6eval rakudo 33e94e: OUTPUT«[1, "a", 1, "b", 1, "c", 2, "a", 2, "b", 2, "c", 3, "a", 3, "b", 3, "c"]␤»
01:48 pmichaud hmm, that didn't work.
01:48 pmichaud anyway, .slice shouldn't be that hard.
01:48 masak doesn't feel that hard.
01:49 pmichaud I'm trying to decide if .slice returns a Slicel or just a specialized List
01:50 masak instinctively, I'd expect the former.
01:50 pmichaud I'm not sure that Slicels are lazy, though.
01:50 pmichaud i.e., Slicel somewhat corresponds to a Parcel
01:51 masak no idea.
01:51 pmichaud (and by "lazy" I mean the top-level parts are known, but the internals might not be)
01:51 pmichaud it could also be a Seq or Array
01:52 pmichaud the interesting case would be something like  (($a, $b), ($c, $d)).slice
01:52 pmichaud so, obviously whatever comes back has two elements
01:53 pmichaud but what are those elements?
01:54 masak by the way, by the time Rakudo starts doing parallelism, the "three-way unshuffle problem" from GLS's talk is a beautiful algorithmic example to show off.
01:54 masak pmichaud: could they still be List?
01:55 pmichaud masak: well, they aren't List to begin with, in that case
01:55 masak what are they to begin with?
01:55 pmichaud ($a, $b) is a Parcel
01:55 masak oh, right.
01:55 masak then maybe the elements should be Parcels as well.
01:55 pmichaud yes, but .slice needs to return items
01:56 pmichaud and a Parcel in item context becomes a Seq
01:56 pmichaud (currently)
01:58 masak well, then it'd have to return a Seq :)
01:58 masak I think I prefer that to Array, at least.
01:58 pmichaud and in Rakudo at least, Seq de-containerizes its elements
01:58 pmichaud (currently, speculatively)
01:58 masak when is de-containerization an issue?
01:58 pmichaud when you plan to assign to something
01:58 pmichaud so, for example:
01:58 masak right.
01:58 pmichaud well, I don't have a good example
01:58 pmichaud but decontainerization is what handles rw-value-ness versus r-value-ness in many cases
01:58 masak nod.
01:58 masak no container, no mutability.
01:58 pmichaud I could certainly (as a first cut)  have .slice return a Seq of Seqs
02:00 masak might be we need to have the implementation to determine what it actually need return.
02:00 alksentrs left #perl6
02:04 lucs left #perl6
02:05 lucs joined #perl6
02:12 schpey joined #perl6
02:17 lichtkind good night
02:17 lichtkind left #perl6
02:18 tylercurtis joined #perl6
02:20 masak ooh, SPJ is in GLS's talk! :D
02:21 mfollett left #perl6
02:31 crythias joined #perl6
02:32 crythias left #perl6
02:35 masak mfollett++ # http://mfollett.com/perl-6-whatever
02:35 Italian_Plumber left #perl6
02:39 masonkramer joined #perl6
02:42 schpey left #perl6
02:46 masak std: has enum $.meth <foo bar>
02:46 p6eval std 32123: OUTPUT«ok 00:01 116m␤»
02:47 masak what will foo.WHAT.perl give back? is the enumeration object accessible in some other way than foo.WHAT?
02:48 agentzh joined #perl6
02:49 agentzh left #perl6
02:49 agentzh joined #perl6
02:58 s_mosher is it bad form to cause p6eval to consume obscene amounts of memory (in the name of science... ostensibly)?
02:59 masak just use your good judgment.
02:59 masak we trust you.
02:59 masak if you misuse that trust, we'll kick you out. but we'd prefer not to have to do that. :)
03:00 s_mosher oh wait... this isn't the OOM problem I thought it was
03:00 s_mosher rakduo: for ^10**10 {}
03:00 masak recall that p6eval doesn't print anything if you don't print anything.
03:01 s_mosher rakudo: for ^10**10 {}
03:01 masak also recall that it's spelled 'rakudo' :)
03:01 s_mosher yeah :)
03:01 s_mosher I'm only going to do that the once
03:01 p6eval rakudo 33e94e: OUTPUT«(timeout)»
03:02 s_mosher that's the result I'm getting locally...  on account of a segfault
03:02 masak rakudo: for ^10*10 { .say }
03:02 p6eval rakudo 33e94e: OUTPUT«100␤»
03:02 masak er.
03:02 masak rakudo: for ^(10**10) { .say }
03:02 p6eval rakudo 33e94e:
03:02 p6eval ..OUTPUT«(timeout)␤5␤6␤7␤8␤9␤10␤11␤12␤13␤14␤​15␤16␤17␤18␤19␤20␤21␤22␤23␤24␤25␤26␤27␤28␤29​␤30␤31␤32␤33␤34␤35␤36␤37␤38␤39␤40␤41␤42␤43␤4​4␤45␤46␤47␤48␤49␤50␤51␤52␤53␤54␤55␤56␤57␤58␤​59␤60␤61␤62␤63␤64␤65␤66␤67␤68␤69␤70␤71␤72␤73​␤74␤75␤76␤77␤78␤79␤80␤81␤82␤83␤84␤85␤86␤8
03:03 masak the segfault is known, I think.
03:03 masak it was discussed earlier today.
03:03 s_mosher ah
03:04 TiMBuS segfaults because of the gc
03:04 s_mosher btw, for with empty block is allocating quite a lot of memory
03:05 s_mosher although not as much as I'd thought at first
03:06 jimi_hendrix left #perl6
03:07 lue /ohai o/
03:07 masak hi
03:08 tylercurtis s_mosher: are you sure it's not the 10,000,000,000 element list that's allocating a lot?
03:08 s_mosher oh right
03:08 s_mosher sometimes I assume that things will optimize away more than I should
03:17 masak it should be lazy, I think.
03:18 s_mosher I'm still used to thinking that for should behave like a counted loop unless otherwise absolutely necessary
03:18 tylercurtis masak: The resulting list isn't.
03:18 tylercurtis Or, rather, I don't see how it could possibly be.
03:18 s_mosher masak: I think that's why you are seeing output before the segfault
03:18 masak tylercurtis: ranges are lazy because they're implemented internally as iterators.
03:18 s_mosher if it was eager, wouldn't the segfault occur sooner? or is the gc problem actually part of the loop body?
03:18 masak s_mosher: indeed.
03:18 tylercurtis masak: The resulting list of the for statement.
03:19 masak tylercurtis: the for statement is in sink context.
03:19 tylercurtis masak: which works by eagerly evaluating the statement, no?
03:19 masak aye.
03:19 tylercurtis So, the result list would still have to be allocated, wouldn't it?
03:19 masak not sure.
03:20 masak since it's in sink context, not necessarily.
03:30 _ilbot2 joined #perl6
03:30 Topic for #perl6 is now »ö« Welcome to Perl 6! | http://perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg p6eval perl6: ... | irclog: http://irc.pugscode.org/ | UTF-8 is our friend! | Rakudo Star Released!
03:30 masak lue: you could look at how Rakudo's grammar handles similar cases.
03:30 * lue looking
03:33 lue I think I can get <A::B> assertion working if I could find where assertions are handled. The only problem is, I can't find it. [either that or I can't tell when I see it :)]
03:33 tylercurtis Ah, I see how it could be done without the entire list being stored at the same time.
03:33 masak lue: it's not an assertion, it's a subrule call.
03:33 Schwern joined #perl6
03:33 mfollett joined #perl6
03:33 tylercurtis Though it seems like that way would require .sink.
03:33 lue Oh. .oO(Knowing what it's really called would help in finding what I need.)
03:33 masonkramer left #perl6
03:33 masak lue: I see now from the source why you call it an assertion.
03:33 masak lue: seems 'token assertion:sym<name>' is what you'd want to modify.
03:33 masonkramer joined #perl6
03:33 cls_bsd left #perl6
03:33 felipe left #perl6
03:33 kirillm left #perl6
03:33 fda314925 left #perl6
03:33 exodist left #perl6
03:33 constant left #perl6
03:33 Gothmog_ left #perl6
03:33 betterworld left #perl6
03:33 Util left #perl6
03:33 avuserow left #perl6
03:33 jettero left #perl6
03:33 jnthn left #perl6
03:33 nperez left #perl6
03:33 tomaw left #perl6
03:33 ascent_ left #perl6
03:33 spacebat left #perl6
03:33 jjore left #perl6
03:33 shortcircuit left #perl6
03:33 Getty left #perl6
03:33 Patterner left #perl6
03:34 daemon left #perl6
03:34 HarryS left #perl6
03:34 broquaint left #perl6
03:34 elekt left #perl6
03:34 szabgab left #perl6
03:34 s_mosher left #perl6
03:34 draxil left #perl6
03:34 florz left #perl6
03:34 hillu left #perl6
03:34 svetlins left #perl6
03:34 dju_ left #perl6
03:34 jfried left #perl6
03:34 sunnavy left #perl6
03:34 wooden left #perl6
03:34 kcwu left #perl6
03:34 orafu left #perl6
03:34 [Coke] left #perl6
03:34 Eevee left #perl6
03:34 revdiablo left #perl6
03:34 baest left #perl6
03:34 peters_mops left #perl6
03:34 nadim left #perl6
03:34 huf left #perl6
03:34 phenny left #perl6
03:34 renormalist left #perl6
03:34 meppl left #perl6
03:34 aloha left #perl6
03:34 thepler left #perl6
03:34 arnsholt left #perl6
03:34 mdxi left #perl6
03:34 breinbaas left #perl6
03:34 Grrrr left #perl6
03:34 literal left #perl6
03:34 avar left #perl6
03:34 kolibrie left #perl6
03:34 robinsmidsrod left #perl6
03:34 Maddingue left #perl6
03:34 dual left #perl6
03:34 meteorjay left #perl6
03:34 lamstyle left #perl6
03:34 daxim left #perl6
03:34 nine left #perl6
03:34 lue left #perl6
03:34 colomon left #perl6
03:34 simcop2387 left #perl6
03:34 shade\ left #perl6
03:34 m6locks left #perl6
03:34 sorear left #perl6
03:34 xiaolongxia left #perl6
03:34 krunen_ left #perl6
03:34 kst left #perl6
03:34 rbuels left #perl6
03:34 Woody2143 left #perl6
03:34 masonkramer left #perl6
03:34 tylercurtis left #perl6
03:34 masak left #perl6
03:34 Quadrescence left #perl6
03:34 _jaldhar_ left #perl6
03:34 PacoLinux left #perl6
03:34 dalek left #perl6
03:34 _sri left #perl6
03:34 sjohnson left #perl6
03:34 eternaleye left #perl6
03:34 p6eval left #perl6
03:34 rokoteko left #perl6
03:34 yahooooo left #perl6
03:34 PerlJam left #perl6
03:34 cosimo left #perl6
03:34 gabiruh left #perl6
03:34 perigrin left #perl6
03:34 osfameron left #perl6
03:34 x3nU left #perl6
03:34 stepnem left #perl6
03:34 TimToady left #perl6
03:34 araujo left #perl6
03:34 c9s left #perl6
03:34 pnu left #perl6
03:34 LionMadeOfLions left #perl6
03:34 BinGOs left #perl6
03:35 justatheory left #perl6
03:35 TiMBuS left #perl6
03:35 xinming left #perl6
03:35 Trashlord left #perl6
03:35 cognominal left #perl6
03:35 slavik2 left #perl6
03:35 cxreg left #perl6
03:35 PZt left #perl6
03:35 pochi left #perl6
03:35 astinus left #perl6
03:35 timdemkowsky left #perl6
03:35 patch left #perl6
03:35 treed left #perl6
03:35 Cyrus__ left #perl6
03:35 amkrankruleuen left #perl6
03:35 Tene left #perl6
03:35 moritz_ left #perl6
03:35 wolverian left #perl6
03:35 gfldex left #perl6
03:35 cotto left #perl6
03:35 Bucciarati left #perl6
03:35 mathw left #perl6
03:35 frodwith left #perl6
03:35 Schwern left #perl6
03:35 takadonet left #perl6
03:35 flatwhatson left #perl6
03:35 miso2217 left #perl6
03:35 frettled left #perl6
03:35 zostay left #perl6
03:35 estrabd left #perl6
03:35 rcfox left #perl6
03:35 dukeleto left #perl6
03:35 cj left #perl6
03:35 agentzh left #perl6
03:35 EvanCarroll left #perl6
03:35 Juerd left #perl6
03:35 synth left #perl6
03:35 f00li5h left #perl6
03:35 buubot left #perl6
03:35 Util TimToady: Yes, my http://rosettacode.org/wiki/Anagrams#Perl_6 entry uses uri(),
03:35 yves_ left #perl6
03:35 Helios left #perl6
03:35 sjn left #perl6
03:35 szbalint left #perl6
03:35 lucs left #perl6
03:35 jedai_ left #perl6
03:35 [particle] left #perl6
03:35 Sanitoeter left #perl6
03:35 Util which AFAIK is not yet implemented in Rakudo.
03:35 barika left #perl6
03:35 rhr left #perl6
03:35 shelling_lab left #perl6
03:35 grew left #perl6
03:35 ashleydev left #perl6
03:35 Util When testing, I changed uri($url) to slurp($file) on a pre-downloaded file.
03:35 mantovani left #perl6
03:35 silug left #perl6
03:35 zby left #perl6
03:35 buu left #perl6
03:35 \xF0 left #perl6
03:35 Khisanth left #perl6
03:35 cmadsen left #perl6
03:35 spinclad left #perl6
03:35 Util Since the Perl5 solution used LWP, and S32/IO specifies uri(),
03:35 Alias left #perl6
03:35 frooh left #perl6
03:35 Util I submitted the uri() version of the entry,
03:35 pjcj_ left #perl6
03:35 ilogger2 left #perl6
03:35 ingy left #perl6
03:35 jasonmay left #perl6
03:35 snarkyboojum left #perl6
03:35 sbp left #perl6
03:35 Util and omitted any "works with" template.
03:35 jacob_applebaum left #perl6
03:35 saaki left #perl6
03:35 Util Now that I see that most solutions use the file directly,
03:35 lestrrat left #perl6
03:35 tylerni7 left #perl6
03:36 krakan_ left #perl6
03:36 larsen left #perl6
03:36 imarcust1is left #perl6
03:36 pmichaud left #perl6
03:36 chitragupt left #perl6
03:36 allbery_b left #perl6
03:36 Util I will change to slurp(), and add "works with Rakudo".
03:36 mfollett left #perl6
03:36 diakopte1 left #perl6
03:36 hercynium left #perl6
03:36 hugme left #perl6
03:36 hudnix left #perl6
03:36 Lorn left #perl6
03:36 bbkr left #perl6
03:36 itz left #perl6
03:36 BlueT_ left #perl6
03:36 rgrau left #perl6
03:36 s1n left #perl6
03:36 mj41 left #perl6
03:36 cibs left #perl6
03:36 masak 'S32/IO considered slushy'
03:37 _ilbot2 left #perl6
03:37 bacek joined #perl6
03:39 REPLeffect joined #perl6
03:39 meinwald joined #perl6
03:39 mtve joined #perl6
03:41 lue wow, there's almost the exact same `token assertion:sym<name>' token in both nqp-rx/src/Regex/P6Regex/Grammar.pm and rakudo/src/Perl6/Grammar.pm
03:42 masak not too surprising. nqp, after all, is a subset of Perl 6 :)
03:43 meppel joined #perl6
03:45 lue I want to find how rakudo's grammar handles similar situations, I just can't think of a similar situation. I'm almost certain some scope-changing would be involved, however.
03:47 masak std: class A::B::C {}
03:47 p6eval std 32123: OUTPUT«ok 00:01 114m␤»
03:47 masak lue: there's one similar situation.
03:48 Util rakudo: my @a = 1, 2, 3; @a X*= 5; say @a.perl; @a = @a X* 5; say @a.perl;
03:49 p6eval rakudo 33e94e: OUTPUT«[1, 2, 3]␤[5, 10, 15]␤»
03:49 Util Should X*= have worked? If not, how to best scale a vector without repeating the vector's array name?
03:49 masak @b = @a X* 5
03:49 masak :P
03:50 masak and yes, I think X*= should have worked.
03:50 * masak submits rakudobug
03:51 tylercurtis rakudo: my @a = 1, 2, 3; @a [X*]= 5; say @a.perl; @a = @a X* 5; say @a.perl;
03:51 p6eval rakudo 33e94e: OUTPUT«===SORRY!===␤Confused at line 22, near "@a [X*]= 5"␤»
03:51 lue class A    would create a class A, but if you add ::B, then it would be    class A::B     and would create a class B of A, right? [If I got this right, I'll be happy]
03:51 masak lue: 'class A::B' creates a class B in the package A.
03:52 Util S03 discusses X[+=] vs [X+]= in "Nesting of metaoperators", but X[*=] does the same as X*= , and [X*]= fails.
03:52 masak lue: don't really know what you mean by 'class B of A'.
03:52 Util Oh, as tylercurtis just showed.
03:53 lue alright. [I wasn't sure what A was in this case, so I just went with 'of A']
03:54 masak lue: speaking with clarity helps in these cases. :)
03:56 masak bbl &
03:57 Util masak++ for RT#77660
04:05 lue ooh, so close to finding out how the grammar handles class A and class A::B [maybe Actions.pm?]
04:12 lamstyle joined #perl6
04:17 Sanitoeter joined #perl6
04:18 lue aah, I feel out of my depth here. I honestly have no idea how to go about this problem.
04:20 cibs joined #perl6
04:28 molaf joined #perl6
04:33 schpey joined #perl6
04:35 alester joined #perl6
04:40 dalek rakudo: 1e56d20 | pmichaud++ | build/PARROT_REVISION:
04:40 dalek rakudo: Bump PARROT_REVISION to get pir::join opcode fix (TT #1767).
04:40 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/1​e56d206cd7c814336a813a8985e1209c05a0b3b
04:43 molaf left #perl6
04:59 Zapelius joined #perl6
05:38 jhuni joined #perl6
05:42 sorear hello #perl6
05:45 gfx joined #perl6
05:46 sorear pmichaud: Why does Seq exist at all?
05:51 kaare joined #perl6
05:51 kaare is now known as Guest4584
05:55 amkrankruleuen joined #perl6
05:56 sorear wait, nevermind, I already asked you.
06:00 wtw joined #perl6
06:00 gfx left #perl6
06:03 amkrankruleuen left #perl6
06:04 amkrankruleuen joined #perl6
06:05 Guest4584 is now known as kaare_
06:07 Quadrescence joined #perl6
06:10 am0c joined #perl6
06:16 alester left #perl6
06:16 amkrankruleuen left #perl6
06:17 amkrankruleuen joined #perl6
06:20 Zapelius left #perl6
06:25 uniejo joined #perl6
06:25 am0c left #perl6
06:27 azert0x joined #perl6
06:30 amkrankruleuen left #perl6
06:36 amkrankruleuen joined #perl6
06:37 masak joined #perl6
06:41 amkrankruleuen left #perl6
06:41 HarryS joined #perl6
06:43 masak I wonder what Gilad Bracha is referring to: http://twitter.com/Gilad_Bracha/status/22857717803
06:51 sorear How do you know he's even referring to Perl 6?
06:54 amkrankr1leuen joined #perl6
06:56 masak I have no grounds for believing he is. from what I know of Bracha, he's more likely referring to most programming languages out there, except maybe Newspeak, which gets things right.
06:57 masak (not implying anything about the justness of that opinion, by the way. I haven't tried Newspeak, nor read the spec)
07:00 amkrankr1leuen left #perl6
07:01 amkrankruleuen joined #perl6
07:07 buubot joined #perl6
07:13 * moritz_ wonders if newspeak should be parsed as news peak :-)
07:13 buubot left #perl6
07:14 masak GLS complained in his talk that his MapScanZip parsed as MapsCanZip in his brain when he wrote it in all-lowercase. :)
07:14 moritz_ at least that's what my LTM parser gives me
07:14 moritz_ GLS?
07:14 masak Guy L Steele
07:14 moritz_ ah
07:14 masak as in Java and Fortress.
07:14 moritz_ I've seen his awesome "how to grow a language" talk
07:15 masak aye.
07:15 masak he's an old Lisp veteran, too.
07:15 moritz_ it's just that GLS = Gleichungssystem (equation system) is deeply etched into my brain :-)
07:16 masak nothing that a bit of context-sensitivity won't solve.
07:17 * moritz_ thows his IR Clogs over and hides from sight
07:17 masak the 'IR Clogs' pun goes against LTM, fwiw.
07:17 masak maybe that's why it doesn't feel really obvious.
07:17 moritz_ STM then :-)
07:17 masak another overloaded term. :)
07:18 moritz_ at least from now on :-)
07:18 buubot joined #perl6
07:18 moritz_ std: my @a X*= 1, 2, 3
07:18 p6eval std 32123: OUTPUT«ok 00:01 119m␤»
07:18 masak as a Swede, I don't like to see anyone going to extremes. that's why I will always recommend MTM.
07:19 moritz_ where M = Median?
07:19 masak or 'medium', or 'moderate'...
07:19 masak I'd prefer it to have been 'lagom', but L is already taken...
07:19 tylercurtis Well, the relevant rules are named token phrase:sym<hot shoes> and token phrase:sym<irclogs>, so it's probably just due to nqp-rx not doing LTM right.
07:20 masak tylercurtis: 'the hottest footwear!' ;)
07:21 moritz_ tylercurtis: ironically nqp-rx does get the LTM right in case of proto tokens with leading <sym>
07:21 tylercurtis moritz_: ooh. Good to know.
07:24 buubot left #perl6
07:25 masak pmichaud: did you submit http://gist.github.com/563082 ? I don't see it in trac.parrot.org
07:30 buubot joined #perl6
07:36 sorear tylercurtis: I have not really looked for LHF in niecza.  Maybe if you looked you would find some, by trying to port some program?
07:38 tylercurtis sorear: I may try that sometime this weekend.
07:39 masak having large parts of the setting readily available, even if it's only a fraction of what Rakudo does, would help implementations like niecza a lot in terms of popularity.
07:40 masak when I wrote http://use.perl.org/~masak/journal/40141 , I hoped we'd see one of the then implementations suddenly bloom out into something with at least a modest setting. that hasn't happened yet.
07:41 masak actually, it's not the setting that matters, so much as those everyday features. it's just that many of those are defined in the setting.
07:43 pnu joined #perl6
07:43 buubot left #perl6
07:46 buubot joined #perl6
07:54 buubot left #perl6
07:57 masak pmichaud: never mind -- found it in the backlog. didn't see it because bacek++ resolved it already :)
07:57 buubot joined #perl6
07:59 Schwern joined #perl6
08:07 buubot left #perl6
08:10 * moritz_ ponders an additional channel where dalek reports changes from all known Perl 6 projects
08:13 buubot joined #perl6
08:16 sorear moritz_: it's called #commits
08:16 * masak , after skimming http://dyla2007.unibe.ch/?​download=dyla07-Gilad.pdf , now considers the non-mixing of subs and methods in Perl 6 to have been a wise move
08:17 sorear masak: if you came here from #moose like I did, you'd know that Perl 5's method/sub conflation is a daily living hell
08:17 masak I didn't. though I saw Moose come from #perl6 back in 2005 :)
08:18 sorear masak: niecza has a setting already
08:18 masak sorear: in that paper, it is explained how apart from being a daily living hell, method/sub conflation leads to further problems down the road.
08:18 sorear it's less complete than rakudo's, sure
08:18 masak sorear: good. fill it up with nice stuffs.
08:19 masak I think niecza looks very promising.
08:19 moritz_ at least in Perl 5 the lookup is obvious
08:19 sorear the main issue is that development turnaround time is dominated by the time to parse the setting
08:19 sorear right now it takes about 1.5 minutes to see the effect of any change to setting code
08:19 moritz_ ->meth does method lookup, sub() looks in the namespace
08:20 sorear niecza's setting is 1000 lines (and contains a good chunk of Q:CgOp, because I can't put that stuff in separate files like Rakudo does yet)
08:20 wtw left #perl6
08:20 moritz_ sorear: you know that in rakudo it's also slow. Which is why I usually prototype setting code outside the setting
08:20 sorear moritz_: yeah, I do that too
08:20 Mowah joined #perl6
08:20 moritz_ which mostly works pretty well... unless it doesn't :-)
08:21 moritz_ sorear: #commits has too much activity, for my taste
08:21 moritz_ which is why I'd prefer something p6-only
08:22 masak moritz_: Perl 5 doesn't have nested classes, I think.
08:22 moritz_ right
08:24 masak I was looking at the first two code samples in that PDF and thinking "hm, if this is a sub lookup, then the shadowing they spend the rest of the paper avoiding just won't occur in Perl 6".
08:32 wtw joined #perl6
08:33 dakkar joined #perl6
08:35 masak alpha: my @a = 1, 2, 2, 3, 4, 4, 5; my @unique = grep { state %h; !%h{$_}++ }, @a; say @unique.perl
08:35 p6eval alpha 30e0ed: OUTPUT«[1, 2, 3, 4, 5]␤»
08:35 masak alpha: my @a = 1, 2, 2, 3, 4, 4, 5; my @unique = grep { !(state %h){$_}++ }, @a; say @unique.perl
08:35 p6eval alpha 30e0ed: OUTPUT«[1, 2, 3, 4, 5]␤»
08:35 masak \o/
08:36 jacob_applebaum joined #perl6
08:36 moritz_ alpha: my @a = 1, 2, 2, 3, 4, 4, 5; my @unique = grep { !(state %){$_}++ }, @a; say @unique.perl
08:36 p6eval alpha 30e0ed: OUTPUT«Malformed declaration at line 10, near "%){$_}++ }"␤in Main (file <unknown>, line <unknown>)␤»
08:38 masak anonymous state variables, what a concept.
08:38 moritz_ if you use it only once, why give it a name?
08:38 masak fsvo 'once' :)
08:39 moritz_ where once = at one place in the source file
08:39 masak right.
08:39 masak I'm suddenly curious how one'd implement anonymous variables.
08:39 * moritz_ currently reads "Real World Haskell", and is of two minds of the 'where thing = def' post definitions
08:39 masak Yapsi is pretty keen on variables having a unique name.
08:40 moritz_ maybe add positional slots to your pads
08:40 moritz_ and simply give the anonymous vars numbers
08:40 masak my pads have positional slots. that's their primary access mechanism.
08:40 moritz_ oh, great
08:40 moritz_ then you can just reserve one for anon vars
08:41 masak yes...
08:41 bacek left #perl6
08:41 masak I just don't see how.
08:41 moritz_ since they only appear in declarations, they never look at the parent lexpad
08:41 moritz_ just ++$slot_count
08:41 moritz_ :-)
08:42 masak you make it sound so easy :)
08:42 moritz_ and emit an access to $pad[$slot_count] at the place of the variable
08:42 moritz_ that's because you haven't told me what makes it hard
08:42 masak I'm not sure.
08:43 masak the codegen step does variable lookup by getting the name of the variable, doing a fetch or a store, and assigning a register.
08:43 masak but that won't work if there's no name. so anon vars need special treatment somehow.
08:44 BaggioKwok joined #perl6
08:44 moritz_ you have to omit the "getting the name" part
08:44 moritz_ but since all anon variables in the source code are different, that shouldn't be a problem
08:45 masak hm.
08:45 masak clearly something quite different is needed, yes.
08:46 moritz_ I'd imagine you'll have a gimme_new_variable_in_current_pad($type = Any, $name?) function
08:46 moritz_ which is called upon declaration
08:46 moritz_ and which returns an object that knows how to code-gen a lookup to the new variable
08:47 moritz_ and for named variables, you cache that object by name
08:47 moritz_ so every subsequent variable lookup gets the same access code
08:47 moritz_ and for anon vars, you just call it anew for each occurrence
08:49 moritz_ and when you leave a scope, you expire the current cache, or something
08:50 moritz_ does this sound overly simplistic/optimistic?
08:50 masak no, it sounds about right.
08:51 masak it basically introduces a whole new layer of indirection that I hadn't thought about before.
08:54 moritz_ just because it's a compiler doesn't mean it can't use nice OO features :-)
08:55 masak it's quite OO already. you should check it out. :)
08:55 masak I'm really happy about how it traverses the parse tree, too.
08:56 * moritz_ really should
08:56 stepnem joined #perl6
08:57 masak right now there's action methods to check lexical use and build lexpads, and then custom traversal methods with action callbacks do the per-block codegen.
08:57 amkrankruleuen left #perl6
08:57 masak ss/traversal methods/traversal subs/
08:58 amkrankruleuen joined #perl6
09:00 tylercurtis Good night #perl6! Tomorrow I attempt to analyze the backtraces from my running the spectests under valgrind!
09:01 AndreasX joined #perl6
09:01 masak tylercurtis: good night! dream of simple, non-confusing backtraces. :)
09:01 moritz_ :-)
09:03 redicaps joined #perl6
09:08 tylercurtis :) I don't think the complexity of individual backtraces matters much when dealing with 18k lines of them.
09:22 timbunce joined #perl6
09:26 mberends joined #perl6
09:27 AndreasX left #perl6
09:32 colomon hello out there.  have people been getting failures on pid.t on OS X?
09:34 moritz_ good DateTime.new, colomon
09:34 colomon it's definitely not good DateTime here.... should still be in bed.
09:34 masak colomon: yes. for about a week or so.
09:34 Siddy joined #perl6
09:34 redicaps left #perl6
09:35 colomon o/
09:35 colomon masak++
09:36 sorear masak: just use a gensym
09:37 masak I recognize that term from the Lisp world, I think.
09:37 masak right, a unique made-up name.
09:38 * moritz_ wonders how that interacts with introspection
09:38 masak that's the first thing I thought of, too. I'm just afraid some time in the future people are going to introspect my lexp... what moritz_ said.
09:38 moritz_ rakudo: say ~callframe().MY.keys
09:38 p6eval rakudo 1e56d2: OUTPUT«Method 'MY' not found for invocant of class 'CallFrame'␤  in main program body at line 22:/tmp/bBiAtAPrfZ␤»
09:38 sorear if you introspect a frame in niecza you'll see a couple variables with names like !23
09:38 moritz_ rakudo: say ~callframe().my.keys
09:38 p6eval rakudo 1e56d2: OUTPUT«$MAIN $/ $_ __CANDIDATE_LIST__ $!␤»
09:38 masak wow.
09:38 sorear I could just filter them out, it's impossible to declare a real variable matching that
09:39 moritz_ rakudo: say ~callframe().my.keys; my $foobar
09:39 masak didn't know we had that.
09:39 p6eval rakudo 1e56d2: OUTPUT«$/ $_ __CANDIDATE_LIST__ $foobar $! $MAIN␤»
09:39 moritz_ masak: it's a bit hacky, but it seems to mostly work
09:39 masak rakudo: say ~callframe().my.keys; my $
09:39 p6eval rakudo 1e56d2: OUTPUT«$MAIN $/ $_ $ __CANDIDATE_LIST__ $!␤»
09:39 moritz_ rakudo: my $; my $
09:39 masak rakudo: say ~callframe().my.keys; my ($, $, $)
09:39 p6eval rakudo 1e56d2: OUTPUT«===SORRY!===␤Unsupported use of $; variable; in Perl 6 please use real multidimensional hashes at line 22, near " my $"␤»
09:39 p6eval rakudo 1e56d2: OUTPUT«$MAIN $/ $_ __CANDIDATE_LIST__ $!␤»
09:40 sorear anyways, TimToady says that callframe shows you the world as it *is*
09:40 moritz_ std: my $;
09:40 p6eval std 32123: OUTPUT«[31m===[0mSORRY![31m===[0m␤Unsupported use of $; variable; in Perl 6 please use real multidimensional hashes at /tmp/VpMRdZ6bCT line 1:␤------> [32mmy $;[33m⏏[31m<EOL>[0m␤Parse failed␤FAILED 00:01 115m␤»
09:40 moritz_ rakudo: say ~callframe().my.keys; my $ = 1; my $ = 2
09:40 sorear if inlining is not hidden, no reason for genysms to be
09:40 p6eval rakudo 1e56d2: OUTPUT«===SORRY!===␤Redeclaration of symbol $ at line 22, near " = 2"␤»
09:40 masak nod.
09:41 masak I'll use gensyms.
09:41 moritz_ std: my $ = 1; my $ = 2
09:41 p6eval std 32123: OUTPUT«ok 00:01 118m␤»
09:41 * sorear out.
09:41 moritz_ rakudobug!
09:41 moritz_ but it might be reported already
09:44 masak looks familiar.
09:44 * masak searches RT
09:44 masak http://rt.perl.org/rt3/Tic​ket/Display.html?id=76986
09:45 masak bbkr++
09:50 schpey left #perl6
09:52 BaggioKwok left #perl6
09:56 pugssvn r32127 | colomon++ | [t/spec] Add tricky tests (which pass after latest Rakudo patch), unfudge old simple tests which have worked for a while, and switch "plan *" to "plan 42".
09:58 dalek rakudo: 5ae715c | colomon++ | t/spectest.data:
09:58 dalek rakudo: Turn on S03-operators/comparison.t.
09:58 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/5​ae715c7b79ad0dbd983eef0da2f5fc9bc6ce80a
09:58 dalek rakudo: c9eac47 | colomon++ | src/core/operators.pm:
09:58 dalek rakudo: Fix the Any versions of the numeric comparison operators to forward to the Numeric versions.
09:58 dalek rakudo:
09:58 dalek rakudo: If you are doing a numeric comparison of non-Numeric types, this will be slightly slower but handle edge cases correctly.
09:58 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/c​9eac474d0c8bf3349c83762645ae9df1da42fd6
10:01 Italian_Plumber joined #perl6
10:01 foodoo joined #perl6
10:06 masak left #perl6
10:07 frettled joined #perl6
10:08 cotto joined #perl6
10:09 mberends left #perl6
10:11 jferrero joined #perl6
10:13 svetlins joined #perl6
10:21 proller joined #perl6
10:33 kjeldahl joined #perl6
10:37 drbean joined #perl6
10:42 meppel is now known as meppl
10:45 Italian_Plumber left #perl6
10:56 amkrankruleuen left #perl6
10:57 amkrankruleuen joined #perl6
10:59 arnsholt In nqp-rx, doing "PAST::Val.new(:value(1.0))" becomes "$P13."new"(1 :named("value"))" in PIR (with $P13 the PAST::Val object). That's a bug right?
11:04 cognominal in book/subtypes.pod:   wouldn't  @cards.sort: *.rank   be more elegant than   @cards.sort({ .rank })  ?
11:05 Italian_Plumber1 joined #perl6
11:17 moritz_ arnsholt: does value => 1.0 work?
11:17 moritz_ I could imagine that it's parsed as :value, (1.0)
11:17 arnsholt Nope. Same PIR
11:17 moritz_ then I'd think it's a bug
11:18 arnsholt 1.0 as a literal does generate a Float object though
11:21 arnsholt I'll see if I can find the bug
11:27 ilogger2 joined #perl6
11:28 arnsholt Oh, joy. Wanna guess how the value is created in NQP? =)
11:28 arnsholt make PAST::Val.new( :value($value) );
11:28 arnsholt Yaaaaaaay.
11:44 takadonet morning all
11:44 masonkramer joined #perl6
11:58 snearch joined #perl6
12:08 envi^home joined #perl6
12:10 colomon anyone know what the pir::join patch last night did?  (just curious)
12:11 moritz_ the diff is pretty telling
12:11 moritz_ seems the chunks that split builds up were garbage-collected
12:12 tadzik joined #perl6
12:12 ruoso joined #perl6
12:14 colomon s/split/join/, right?
12:14 moritz_ erm, yes
12:15 moritz_ now it just stops the GC before, and resumes it afterwards
12:15 * moritz_ hopes that no exception can be thrown inbetween :-)
12:15 colomon what could go wrong?  ;)
12:16 colomon actually, that seems like it might be a very real problem.  I wonder how to test?
12:16 svetlins left #perl6
12:16 moritz_ the next commit adds a test case :-)
12:16 moritz_ (parrot commit, that is)
12:17 amkrankruleuen left #perl6
12:17 amkrankruleuen joined #perl6
12:20 bbkr std: grammar A { multi token TOP { .* }; multi token TOP {.* } };
12:20 p6eval std 32123: OUTPUT«ok 00:01 117m␤»
12:20 bbkr hmm, how token can be multi if it has no signature ?
12:22 moritz_ why not?
12:22 moritz_ you can still call it as
12:23 moritz_ A.*token()
12:23 moritz_ erm
12:23 moritz_ A.*TOP()
12:23 moritz_ doesn't make much sense in this case, but it does work
12:25 bbkr wow, nice trick. thanks
12:30 amkrankruleuen left #perl6
12:31 amkrankruleuen joined #perl6
12:34 tadzik left #perl6
12:37 Sec joined #perl6
12:37 bluescreen joined #perl6
12:38 bluescreen is now known as Guest49581
12:38 Sec Is there any support for perl6 based GUI apps, yet?
12:38 moritz_ Sec: you can use Perl 5 UI libs like TK or GTK through blizkost
12:38 moritz_ though I admit it's kinda painful
12:39 moritz_ phenny: tell masak that http://netzhansa.blogspot.com/2010/09/qu​icklisp-upcoming-solution-to-common.html might interest him
12:39 phenny moritz_: I'll pass that on when masak is around.
12:40 Sec I have an old perl5/TK thing here, and I need to rewrite it (because its buggy, and perlTK is outdated an unmaintained) and thought I could  use this to learn my way around perl6.
12:40 jhuni left #perl6
12:41 Sec moritz_: but what you say sounds like I better stay with perl5 for that project.
12:41 bbkr rakudo: grammar G { token TOP { ... } }; class A { method TOP ($/) {make $/ } }; G.parse("abc", actions=>A.new).ast.perl.say # bang! a bug? make on $/ object IMO should be perfectly legal
12:42 p6eval rakudo 5ae715: OUTPUT«maximum recursion depth exceeded␤  in 'Mu::item' at line 1174:CORE.setting␤  in 'Mu::item' at line 1176:CORE.setting␤  in '&infix:<=>' at line 1␤  in 'infix:<~>' at line 597:CORE.setting␤  in 'reducewith' at line 325:CORE.setting␤  in 'Match::!_perl' at line 1␤  in
12:42 p6eval ..'Match::perl' at…
12:42 Mowah left #perl6
12:42 moritz_ Sec: in my opinion that's not a good way to learn Perl 6, because it's something not many people have done yet, so it'll be hard to get help when you're stuck
12:42 moritz_ bbkr: the problem is not make(), but .perl
12:42 moritz_ bbkr: since you create a circular structure, and we can't serialize that yet
12:43 moritz_ (known bug)
12:43 bbkr moritz++
12:43 Sec moritz_: i see. Thanks for your advice.
12:44 moritz_ Sec: you're welcome. I can only encourage you to learn perl 6 nonetheless - it's a great language
12:44 smash joined #perl6
12:45 smash hello eveyrone
12:45 Sec moritz_: it sounds like, but without a reason to write code, its probably not going to happen anytime soon.
12:45 moritz_ Sec: I can understand that very well
12:45 moritz_ all of my attempts to learn programming languages without actually coding in them have failed so far :-)
12:46 moritz_ hi smash
12:46 stepnem left #perl6
12:47 stepnem joined #perl6
12:51 tadzik joined #perl6
12:53 bbkr rakudo: q\ \ # parsed as quoting
12:53 p6eval rakudo 5ae715:  ( no output )
12:53 bbkr std: q\ \ # parsed as routine
12:53 p6eval std 32123: OUTPUT«[31m===[0mSORRY![31m===[0m␤Undeclared routine:␤      'q' used at line 1␤Check failed␤FAILED 00:01 114m␤»
12:53 bbkr STD or Rakudo bug?
12:53 bbkr rakudo: (q\ \).WHAT.say
12:53 p6eval rakudo 5ae715: OUTPUT«Str()␤»
12:55 * moritz_ not sure
12:56 kaare_ left #perl6
12:56 * bbkr reports
12:59 uniejo left #perl6
13:01 smash updated http://gil.di.uminho.pt/use​rs/smash/rakudo-bench.html, you can now see % faster/slower for new versions
13:03 sftp joined #perl6
13:07 tadzik oh hai
13:07 phenny tadzik: 02 Sep 01:50Z <colomon> tell tadzik If you switch ABC to git://github.com/colomon/ABC.git, it should pass all tests.  :)
13:07 tadzik anybody got a thinkpad?
13:07 colomon smash: I don't see %  ?
13:08 smash colomon: hover over the table for 2010.08
13:08 mathw tadzik: yes
13:08 colomon oh, crazy
13:08 colomon smash++
13:08 * moritz_ hopes he can think without a pad :-)
13:09 colomon now I need to get you more benchmarks...
13:09 rgrau left #perl6
13:09 moritz_ and please use more iterations in the iteration benchmark
13:09 rgrau joined #perl6
13:10 tadzik mathw: have you ever removed a key from a keyboard?
13:10 mathw tadzik: not on the thinkpad, no
13:10 orafu joined #perl6
13:10 tadzik I've just got mine from a warranty, and not only it whistles which pisses me of, they also broke my shift
13:10 tadzik and now I'm afraid to give it back to them
13:10 smash colomon: just add them in github
13:10 mathw hmmm
13:10 mathw that's not good
13:11 tadzik and I'm afraid they broke clitmouse too, goddamnit
13:12 Sec tadzik: get the "hardware maintenance manual" from the web, it describes how to to such things correctly.
13:12 mathw mmm
13:13 mathw the trackpoint might just have something stuck in it. I have to pull the tip off mine and poke it from time to time
13:13 tadzik Sec: I have a paper one, in the section about cleaning the keyboard they don't say anything about removing keys
13:13 Sec ibm/lenovo documentation on this is usually very good.
13:13 colomon smash: I know, the tricky bit is writing them.  ;)
13:14 Sec tadzik: i once re-fixed a key which came loose on a t61, it was a bit to fiddle but it went well.
13:14 colomon smash: do you have a harness to automatically run them?
13:16 tadzik left #perl6
13:17 smash colomon: a stupid script yes that runs all the tests and stores the required data in a databse
13:17 colomon smash++
13:17 smash then i have another one to get the data from the database and create the HTML page
13:19 PerlJam smash: you should add all of that to the repo.
13:19 * moritz_ agrees
13:19 PerlJam smash: heck, the benchmark scripts and such should be added to the rakudo repo IMHO
13:20 * moritz_ not so sure
13:20 moritz_ we shouldn't clutter the rakudo repo
13:20 moritz_ and we likely want more liberal access policy to the benchmark repo
13:20 smash PerlJam, moritz_: i can add it to the bench repo as soon as i have a cleaner version of the code
13:20 smash (or any other repo)
13:20 PerlJam moritz_: reproducible benchmarking is clutter?
13:21 moritz_ PerlJam: not clutter, but I see no reason why it can't be in a separate repo
13:23 PerlJam okay.  I don't have a strong reason why it should be in the rakudo repo either  :)
13:23 smash as soon as i have a saner version i'll create a new repo, then you can fork it anywhere if you wish
13:25 pnu left #perl6
13:27 moritz_ rakudo: say 'ab' ~~ /a <commit> b/
13:27 p6eval rakudo 5ae715: OUTPUT«Method 'commit' not found for invocant of class 'Cursor'␤  in <anon> at line 22:/tmp/X_2A5CjcCl␤  in 'Cool::match' at line 2421:CORE.setting␤  in 'Regex::ACCEPTS' at line 5841:CORE.setting␤  in main program body at line 22:/tmp/X_2A5CjcCl␤»
13:28 mfollett joined #perl6
13:29 macroron joined #perl6
13:30 mfollett left #perl6
13:31 Holy_Cow joined #perl6
13:32 nexusone joined #perl6
13:32 schpey joined #perl6
13:40 rgrau_ joined #perl6
13:40 jaldhar joined #perl6
13:42 pmichaud good morning, #perl6
13:42 moritz_ good morning pmichaud
13:43 a3r0_ joined #perl6
13:43 a3r0_ /
13:44 a3r0_ left #perl6
13:46 smash pmichaud: mornin'
13:47 pmichaud rakudo: say ~(for 1..200 { $_ })
13:47 p6eval rakudo 5ae715: OUTPUT«1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95
13:47 p6eval ..96 97 …
13:47 pmichaud \o/
13:48 [Coke] phenny: tell masask he's the #1 google hit for yaakov.
13:48 phenny [Coke]: I'll pass that on when masask is around.
13:48 molaf joined #perl6
13:49 azert0x left #perl6
13:54 colomon pmichaud++
14:01 tobi_ joined #perl6
14:01 foodoo left #perl6
14:01 tobi_ left #perl6
14:02 toebu joined #perl6
14:09 schpey left #perl6
14:09 javs joined #perl6
14:13 bluescreen joined #perl6
14:13 bluescreen is now known as Guest78701
14:15 pmichaud .oO( masask? )
14:16 frettled «ask masak», in a different form?
14:18 constant joined #perl6
14:18 constant left #perl6
14:18 constant joined #perl6
14:18 moritz_ it's a mass interrogation, shortend to mass-ask or masask :-)
14:22 risou joined #perl6
14:23 daemon joined #perl6
14:23 bacek joined #perl6
14:26 aloha joined #perl6
14:26 _jaldhar joined #perl6
14:28 tylercurtis joined #perl6
14:28 jaldhar_ joined #perl6
14:30 risou_ joined #perl6
14:30 jaldhar left #perl6
14:31 sahadev joined #perl6
14:32 _jaldhar_ joined #perl6
14:32 mfollett joined #perl6
14:33 _jaldhar left #perl6
14:33 risou left #perl6
14:34 risou_ left #perl6
14:35 jferrero left #perl6
14:35 jaldhar_ left #perl6
14:41 risou joined #perl6
14:43 macroron left #perl6
14:45 amkrankruleuen left #perl6
14:45 amkrankruleuen joined #perl6
14:46 Guest49581 left #perl6
14:53 TimToady Util: when I run http://rosettacode.org/wiki/Anagrams#Perl_6 with the latest rakudo, I get a segfault.
14:55 Siddy left #perl6
14:56 Siddy joined #perl6
14:56 snearch left #perl6
14:59 [Coke] TimToady: how long did it take to segfault?
15:01 Guest49581 joined #perl6
15:03 kst` joined #perl6
15:04 daxim_ joined #perl6
15:04 dual_ joined #perl6
15:05 krunen joined #perl6
15:05 orafu left #perl6
15:05 orafu joined #perl6
15:05 constant left #perl6
15:05 constant joined #perl6
15:05 constant left #perl6
15:05 constant joined #perl6
15:06 alester joined #perl6
15:06 TimToady a long time
15:06 TimToady many minutes
15:13 isBEKaml joined #perl6
15:13 bbkr hmm, { +@($_) } may be replaced by { .elems } to make code more readable without increasing length
15:13 schpey joined #perl6
15:14 schpey left #perl6
15:15 colomon Util: that anagram code is yours?
15:15 bbkr or even "my $max = %anagram.values>>.elems.max"
15:17 molaf left #perl6
15:17 isBEKaml colomon: that last blog post of yours received good responses on reddit.
15:17 colomon really?
15:17 isBEKaml series operator.
15:18 colomon cool!
15:18 colomon I had no idea...
15:18 isBEKaml http://www.reddit.com/r/perl/comments/d6jk2​/perl6_the_serial_operator_and_memoization/
15:19 Ajju joined #perl6
15:19 [Coke] I am the only one that finds reddit useless? ;)
15:19 huf yeah but where's HIB0U? is he sick? maybe he needs a hug
15:19 moritz_ huf: hug HIBOU
15:20 moritz_ [Coke]: sometimes it's useful for marketing
15:20 moritz_ [Coke]: I've got 10k visitors from reddit for a blog post that was partly over Perl 6
15:20 TimToady [Coke]: 10 minutes, 45 seconds, to be slightly more precise
15:20 moritz_ even if only 1% of them noticed the Perl 6 part, hey, that's still 100 :-)
15:21 colomon isBEKaml++
15:21 isBEKaml yeah, the reddit crowd, you know what they are like. Click, (ha, ha, that's funny), click (no, that's not it)  and more clicks... ;)
15:22 [Coke] moritz_: it's probably the sort of site that if I subscribed to it and said "show me everything perl6 related", I might find it vaguely useful.
15:22 [Coke] but I only ever see it when someone sends me a deep link to something that is unfindable from the main page.
15:22 moritz_ [Coke]: well, if you read planetsix, there's not much more that reddit will tell you about p6
15:23 _jaldhar_ left #perl6
15:23 Ajju left #perl6
15:23 [Coke] is there an rss feed for all the comments?
15:24 justatheory joined #perl6
15:25 moritz_ no idea
15:26 isBEKaml [Coke]:  I think this is what you're looking at. I don't know if you can subscribe to specific subreddits. http://www.reddit.com/.rss
15:26 mfollett left #perl6
15:26 isBEKaml s/at/for/
15:26 isBEKaml it says so down at the bottom of the reddit page.
15:27 toebu hi, I am going to present a half day perl6/rakudo turorial at LISA'10 (the USENIX Sysadmin Conference)
15:27 pmichaud toebu: cool!
15:27 moritz_ toebu++
15:27 jaldhar joined #perl6
15:28 [Coke] yah, that's the global rss feed. too much firehose. ah well.
15:28 shortcircuit Is there a full description of PIR anywhere? (Apart from Parrot's source, that is.)
15:28 [Coke] guess I'll rely on RSS Via IRC.
15:28 rgrau_ what about HackerNews or HseTheSource? probably there will be less trolling than reddit
15:28 [Coke] shortcircuit: #parrot on irc.perl.org is probably a better place to ask, but yes:
15:29 toebu The target audience is  people with perl5 experience ... (like myself)
15:29 rgrau_ s/HseTheSource/UseTheSource/
15:29 moritz_ shortcircuit: there's doc.parrot.org
15:29 [Coke] http://docs.parrot.org/parrot/latest/html/
15:29 moritz_ toebu: be sure to talk about the MAIN sub; people love it :-)
15:29 [Coke] http://docs.parrot.org/parrot/lates​t/html/docs/pdds/pdd19_pir.pod.html
15:30 [Coke] (main link has "PIR BOOK") which is probably most useful.
15:31 shortcircuit [Coke]: Thank you.
15:31 * shortcircuit keeps pondering implementations of Forth written with various languages as a backend.
15:33 huf [Coke]: maybe you want this? http://www.reddit.com/search.rss?q=perl+6
15:33 huf fsvo "want"
15:33 toebu left #perl6
15:34 [Coke] huf;looks promising, but greader chokes on it. I'll investigate later. danke.
15:34 huf [Coke]: or maybe reddit search is broken
15:34 huf happens ;)
15:35 toebu joined #perl6
15:36 mfollett joined #perl6
15:36 tylercurtis Parsing my valgrind spectest backtraces segfaults. =(
15:37 colomon shortcircuit: Forth++
15:37 colomon afk
15:39 zulon joined #perl6
15:40 azert0x joined #perl6
15:40 TimToady just revised http://rosettacode.org/wiki/Luhn_t​est_of_credit_card_numbers#Perl_6
15:40 TimToady it would be nicer if subscripts autotrimmed infinite serieses
15:41 TimToady or if ...^ were implemented
15:41 TimToady rakudo: say 0,2 ...^ 10
15:41 p6eval rakudo 5ae715: OUTPUT«0123456789␤»
15:41 TimToady hmm, maybe it is?
15:42 [Coke] TimToady: OH NOES
15:42 TimToady rakudo: say 0,2 [...^] 10
15:42 p6eval rakudo 5ae715: OUTPUT«===SORRY!===␤Unable to parse infixish, couldn't find final ']' at line 22␤»
15:42 Ross joined #perl6
15:42 [Coke] whew.
15:43 TimToady rakudo: say 0,2 [...] 9
15:43 p6eval rakudo 5ae715: OUTPUT«02468␤»
15:43 TimToady er, wait a minnit
15:43 TimToady ...^ can't be working right, should have made on evens
15:44 TimToady *only
15:44 rgrau_ left #perl6
15:44 toebu I am about to start preparing my slides, my goal is to focus on doing 'simple' things with p6 ... most of the p6 material I see these days seems rather far from what I would be using in every day life ...
15:44 TimToady anyway, I'd prefer to use 0,2...* in any case
15:45 TimToady well, the Luhn test is rather practical :)
15:45 toebu Since my audience is sysadmins and not programmers, I am planning to get them interested and not scared ...
15:45 wtw left #perl6
15:46 toebu any pointers you can give me in this direction ?
15:46 TimToady I'd glance through http://rosettacode.org/wiki/Category:Perl_6 to see if anything sounds practical
15:46 tylercurtis MAIN subs, perhaps.
15:47 moritz_ toebu: you probably know it already, but http://perlgeek.de/en/article/5-to-6 might be a source of inspiration
15:47 rgrau_ joined #perl6
15:47 moritz_ tylercurtis: he, I also mentioned that :-)
15:47 TimToady hmm, http://rosettacode.org/wiki/C​ommand-line_arguments#Perl_6 doesn't actually give an example which would be nice
15:49 * shortcircuit wonders if it might not benefit the P6 folks to go through the tasks implemented in P5, and reimplement for P6.
15:49 TimToady http://rosettacode.org/wiki/Take_​notes_on_the_command_line#Perl_6 has an example of MAIN
15:49 tylercurtis moritz_: indeed. But it's worth repeating to make sure it gets mentioned. :)
15:50 TimToady shortcircuit: sure, but some of them depend on functionality that is not yet available in p6
15:50 TimToady especially CPAN modules
15:52 * moritz_ added example to http://rosettacode.org/wiki/C​ommand-line_arguments#Perl_6
15:52 TimToady http://rosettacode.org/wiki/Fin​d_Common_Directory_Path#Perl_6 is rather practical
15:53 dual_ left #perl6
15:54 shortcircuit http://rosettacode.org/wiki/Us​er:Short_Circuit/P5_but_not_P6
15:54 shortcircuit The way the query is written, there may be pages in that list that aren't programming tasks. I'm not sure how to correct that. :-|
15:54 moritz_ shortcircuit++
15:55 toebu thank you for the links ...
15:55 shortcircuit moritz_: Question. Does P6 make a copy of the to-be-incremented object before incrementing?
15:55 toebu will come back when I have an outline ...
15:55 Juerd What's a comp?
15:56 moritz_ shortcircuit: ++$a desugars to $a = $a.succ
15:56 moritz_ shortcircuit: so I guess that's "no"
15:56 TimToady you mean comb?
15:57 Juerd TimToady: No. I'm referring to the array @comps
15:57 shortcircuit moritz_: Ok, then. I was worried you were killing off my clone.
15:57 moritz_ shortcircuit: :-)
15:57 TimToady in which example?
15:57 TimToady oh, common path
15:57 TimToady leading components
15:57 Juerd Ah, components?
15:57 Juerd Or COMmon Path?
15:58 Juerd Hm, no, components makes more sense with that .comb
15:58 TimToady path components?  what else would you call the bits between /.../
15:58 Juerd I'd probably call them parts :)
15:58 TimToady chunks :)
15:58 TimToady tasty-bits
15:59 Juerd But my English isn't very good and that limits my choice of identifiers :)
16:00 dual joined #perl6
16:00 TimToady moritz_: but $a++ is different from ++$a
16:01 moritz_ TimToady: yes, but in general it still doesn't copy the obect, does it?
16:01 TimToady most things that ++ would work on are value types
16:01 TimToady so it doesn't matter if it copies it
16:01 tadzik joined #perl6
16:02 tadzik oh hai again
16:02 draxil joined #perl6
16:02 TimToady but it sounded like shortcircuit++ was worrying about a non-value type
16:02 daxim_ status update - pugs repo git conversion: nuffin's automated tools don't work, and I don't see why, so I either have to debug them or write my own filters
16:02 daxim_ I'm taking a copy home to tinker over the weekend
16:03 moritz_ daxim_: maybe because it doesn't follow the standard layout (e.g. doesn't have branches)?
16:03 shortcircuit I suppose that depends on whether or not I have a value. Hm.
16:03 daxim_ that could be a possible explanation for fix-refs not working, but the thing that removes the svn/svk cruft should always work because it's just a complicated commit message filter
16:04 daxim_ but the commit messages are unchanged, that's what I meant when I said it won't work
16:04 moritz_ shortcircuit: not has-a value, but is-a value is important :-)
16:05 shortcircuit I don't know (nor am I likely to remember) who the Rakudo developers in here are, but I might also suggest using the P6 examples on RC as a post-commit step for testing.
16:06 moritz_ shortcircuit: we should just add them to the "integration test" part of the official test suite
16:07 shortcircuit moritz_: That would make sense, too, I suppose. :)
16:12 Util colomon: Yes, the anagram code is mine.
16:12 colomon Util: do you mind if we add it (possibly in slightly modified form) to the p6 benchmark suite?
16:12 TimToady I have a snazzy version of anagram that does a double classify, but it also segvs on the whole dict
16:14 Util colomon: Feel free to use it in any way you like. Fold, spindle, mutilate; consider it submitted under my Perl CLA.
16:14 TimToady see http://wall.org/~larry/anagram
16:14 zulon left #perl6
16:15 TimToady the second classify classifies the first classifications into number of results
16:15 Util TimToady: nice!
16:15 TimToady works if I feed it the first 1000 words
16:16 * Util must meditate to better grok Whatever.
16:17 Util When testing my version, I made subsets of the dictionary file by word length, and sometimes just by line count (`head -1000`, etc).
16:19 TimToady I have yet to run any variant of anagram on the whole dictionary successfully
16:19 Util I found that its runtime scaled linearly for subsets. 1000 words == 1 minute. 5000 words == 5 minutes. The whole file is 25,000 words, and I confess that I never ran the whole thing.
16:19 * TimToady figgered
16:20 _jaldhar joined #perl6
16:20 molaf joined #perl6
16:22 Mowah joined #perl6
16:23 shortcircuit You might notice that a few of the languages on RC have links to Codepad. (such as: http://codepad.org/?lang=Perl ) ... Is there any similar way visitors to RC could try running P6 code without having a local implementation? (Ideally, I could just link over to the relevant page where they could test P6 code.)
16:23 moritz_ shortcircuit: we're working on try.rakudo.org
16:23 Util shortcircuit: ash_ is working on try.rakudo.org
16:23 shortcircuit Cool. :)
16:23 cdarroch joined #perl6
16:23 cdarroch left #perl6
16:23 cdarroch joined #perl6
16:23 jaldhar left #perl6
16:24 tadzik oh yes it is :)
16:24 tylercurtis rakudo: say 'They can also come to #perl6 and use p6eval, shortcircuit.'
16:24 p6eval rakudo 5ae715: OUTPUT«They can also come to #perl6 and use p6eval, shortcircuit.␤»
16:25 shortcircuit I could make a variation of http://rosettacode.org/wiki/Special:WebChat drop them in here, but I don't know that you want all that traffic.
16:26 shortcircuit p6eval: BTW, mind hanging out in #rosettacode ? :)
16:26 TimToady tylercurtis: that only works for one-liners, really
16:26 moritz_ shortcircuit: is that also on freenode?
16:26 tylercurtis True.
16:26 shortcircuit moritz_: Yes
16:27 * moritz_ can send it there
16:27 p6eval joined #perl6
16:27 moritz_ done
16:28 shortcircuit Cool. :)
16:31 risou_ joined #perl6
16:32 Chillance joined #perl6
16:34 moritz_ shortcircuit: what does RC use for highlighting Perl 6 syntax?
16:34 shortcircuit moritz_: RC uses GeSHi for all syntax highlighting. Let me get you a link real quick.
16:34 risou left #perl6
16:35 moritz_ wow, it claims to hilight perl 6
16:36 shortcircuit moritz_: Possibly of interest: http://rosettacode.org/wiki/Rosett​a_Code:Village_Pump/Syntax_Highlig​hting#GeSHi_extension_self-report
16:36 shortcircuit moritz_: Also: http://rosettacode.org/wik​i/Help:Syntax_Highlighting
16:36 zulon joined #perl6
16:40 TimToady Util: the one liner version
16:40 TimToady rakudo: 'foo ofo foo bar abr rab'.words.classify( *.comb.sort.join ).classify( +*.value ).sort( -*.key )[0].value.values».value».say
16:40 p6eval rakudo 5ae715: OUTPUT«foo ofo foo␤bar abr rab␤»
16:41 lue ohai o/
16:43 TimToady er
16:43 TimToady rakudo: 'foo ofo oof zoo bar abr rab'.words.classify( *.comb.sort.join ).classify( +*.value ).sort( -*.key )[0].value.values».value».say
16:43 p6eval rakudo 5ae715: OUTPUT«foo ofo oof␤bar abr rab␤»
16:44 TimToady ohaio/
16:44 TimToady shower &
16:44 daxim_ left #perl6
16:44 EvanCarroll joined #perl6
16:46 isBEKaml .OO(ohaio/ was take-off from japanese? Ohayo gozaimasta.... )
16:47 TimToady はい。
16:48 lue
16:51 EvanCarroll Why do people use Module::Build
16:51 EvanCarroll jesus.
16:52 moritz_ wrong channel to complain
16:53 EvanCarroll true, I was looking chromatic -- and I'm banned from irc.perl.org
16:54 smash lue: now, how would i translate that ? :-)
16:55 isBEKaml the way I see it, it's some form of a smiley.
16:55 isBEKaml (:
16:56 masonkramer left #perl6
16:57 moritz_ EvanCarroll: that doesn't make it more on-topic here... maybe /msg him on perlmonks, or send an email
16:57 * moritz_ shuts up again
17:00 lue .oO(I feel like I'm soo close to making /<A::B>/ work, if only I knew how to go about it)
17:05 dakkar left #perl6
17:06 Alias_ joined #perl6
17:10 lue just out of curiosity, why is package the only one that can't end in a semicolon, e.g.  package Foo ;  ?
17:11 moritz_ lue: easy distinction from p5 code
17:13 TimToady pretty much every module on CPAN starts with package MyName;
17:14 TimToady 'course, if p5 borrows the "module" declarator, we're hosed...
17:15 tadzik . o O ( or they are )
17:15 TimToady or "class"
17:16 moritz_ then you can invoke rule no. 1 :-)
17:16 moritz_ wow, the Haskell R/B tree code is dense
17:16 TimToady it's no. 2 that they didn't like, when we came up with Perl 6  :)
17:17 TimToady ain't it though
17:17 TimToady but at least it doesn't look like it will run into the bind-lazy-bits problem
17:18 shillo joined #perl6
17:18 TimToady commuting &
17:20 shillo left #perl6
17:22 envi^home left #perl6
17:32 lue what part of nqp-rx/src/Regex/P6Regex/Actions.pm:400-432 actually makes <xyzzy> look for the appropriate rule|token|regex ?
17:32 hercynium joined #perl6
17:33 risou joined #perl6
17:34 risou_ left #perl6
17:39 Mowah left #perl6
17:41 justatheory left #perl6
17:41 lue Either that or can anyone tell me where the handbook that explains all this is?
17:42 pmichaud lue: it's just a method call
17:44 pmichaud the part that creates the node representing the subrule call is lines 603-608
17:45 pmichaud but essentially,   <xyzzy>  ends up translating into   self.xyzzy(), where self is the current Cursor.
17:48 lue so, wouldn't <A::B> end up translating to A.B() ?
17:48 pmichaud no
17:48 pmichaud and that will need to be handled specially
17:48 [particle] self.A::B() ?
17:48 pmichaud in the case of A::B, we have to create a new cursor of type A, and then invoke .B() on that cursor
17:49 Siddy left #perl6
17:51 pmichaud in nqp, that'd be   self!cursor_start(A).B()
17:51 Siddy joined #perl6
17:52 lue and that line of code would magically know what to do with A and B ? [please say yes please say yes]
17:52 pmichaud of course, looking up the symbol 'A' ends up being a bit tricky at that point.
17:56 pmichaud personally, I'm not too eager to try to get <A::B> to work until we also have some idea how we're going to handle lexically-scoped names as well.
17:56 pmichaud (because I think the syntax and or semantics are likely to change)
17:59 lue I'd really like to get it working [because it makes my project easier], I just don't know what I need to know to make it work! :)
18:00 dukeleto 'ello
18:00 pmichaud lue: yes, I understand that.  All I can say is that it's not really a trivial patch at the moment.  :-)
18:01 pmichaud I might be able to cheat something for now.
18:01 pmichaud but it'll likely be a very leaky cheat.
18:03 sinusoid234 joined #perl6
18:04 lue .oO(If there's any PIR involved in this patch, I think my time would be better spent building a TARDIS so I can go into the future and get the step-by-step handbook that explains all the code)
18:04 sinusoid234 left #perl6
18:04 sinusoid234 joined #perl6
18:06 sinusoid234 left #perl6
18:07 pmichaud oh, it will certainly involve PIR.
18:08 pmichaud It likely involves updating the PAST::Regex nodes to create a cursor from a different grammar
18:09 pmichaud afk for a bit
18:09 hercynium left #perl6
18:12 lue I was wondering about that, the fact that <A::B> doesn't work probably means there's no consideration for anything beyond the current Cursor.
18:13 pmichaud let me think about it a day; I might be able to come up with something.
18:13 pmichaud I hadn't really looked at A::B because I haven't needed it for anything yet :-)
18:14 stepnem left #perl6
18:16 pmichaud oh, I suppose A::B could transform into some sort of specialized cursor_start rule.
18:17 pmichaud or we could hijack nqp's  .LANG subrule
18:17 pmichaud hmmmm
18:17 lue [ mberends used it in his [alpha code] Pod parser, and I thought it was better than mucking about with the .parse method of Grammars and having the grammar parse every single line of the document ]
18:18 stepnem joined #perl6
18:20 pmichaud I think I can do it with a cheat.
18:20 pmichaud but it'll be a day before I can really look at it.
18:23 dukeleto what is the best way to compile rakudo with --gen-parrot but with an unoptimized build?
18:23 Util TimToady++ # for anagram one-liner
18:24 zulon left #perl6
18:25 Util perl6: class O           {}; my $o  =  O.new; print  $o.WHAT.perl;
18:25 p6eval rakudo 5ae715: OUTPUT«O»
18:25 p6eval ..pugs: OUTPUT«::O»
18:25 Util perl6: class HO is Hash  {}; my $ho = HO.new; print $ho.WHAT.perl;
18:25 p6eval pugs: OUTPUT«::HO»
18:25 p6eval ..rakudo 5ae715: OUTPUT«HO»
18:25 patspam joined #perl6
18:25 Util perl6: class AO is Array {}; my $ao = AO.new; print $ao.WHAT.perl;
18:25 p6eval rakudo 5ae715: OUTPUT«Array»
18:25 p6eval ..pugs: OUTPUT«::AO»
18:25 Util Shouldn't Rakudo have said 'AO' instead of 'Array'? Is this a known bug in Rakudo?
18:26 moritz_ hugme: tweet hugme_test test
18:26 hugme moritz_: Ooops, there was an error: No such file or directory
18:26 pjcj joined #perl6
18:26 moritz_ Util: bug, I'd say
18:26 pmichaud perl6:  class MyArray is Array { };  say MyArray.new.WHAT.perl;
18:26 p6eval pugs: OUTPUT«::MyArray␤»
18:26 p6eval ..rakudo 5ae715: OUTPUT«Array␤»
18:26 pmichaud perl6:  class MyArray is Array { };  say MyArray.new.WHAT;
18:26 p6eval rakudo 5ae715: OUTPUT«Array()␤»
18:26 p6eval ..pugs: OUTPUT«MyArray␤»
18:26 pmichaud weird.
18:27 pmichaud rakudo:  class MyInt is Int {};  say MyInt.new.WHAT;
18:27 p6eval rakudo 5ae715: OUTPUT«MyInt()␤»
18:27 pmichaud rakudo:  class MyList is List {};  say MyList.new.WHAT;
18:27 p6eval rakudo 5ae715: OUTPUT«MyList()␤»
18:28 pmichaud rakudo:  class MySeq is Seq {};  say MySeq.new.WHAT;
18:28 p6eval rakudo 5ae715: OUTPUT«MySeq()␤»
18:28 pmichaud rakudo:  class MyArray is Array {};   say MyArray;
18:28 p6eval rakudo 5ae715: OUTPUT«MyArray()␤»
18:28 pmichaud o_O
18:28 pmichaud rakudo:  class MyArray is Array {};   say MyArray.WHAT;
18:28 p6eval rakudo 5ae715: OUTPUT«MyArray()␤»
18:28 pmichaud rakudo:  class MyArray is Array {};   say MyArray.new.WHAT;
18:28 p6eval rakudo 5ae715: OUTPUT«Array()␤»
18:28 pmichaud a-ha
18:28 pmichaud yes, bug
18:29 pmichaud in Array.new
18:29 lue afk for noms
18:29 colomon loliblogged: http://justrakudoit.wordpress.com/2010​/09/03/series-memoization-and-limits/
18:29 Util Also, I cannot invoke methods that I define within the class, when the class "is Array".
18:30 pmichaud right, because all of the instances are Array instead of OA
18:30 pmichaud (or AO, or whatever)
18:30 moritz_ is it a custom constructor, I guess
18:30 pmichaud Array.new is incorrectly delegating to   &circumfix:<[ ]>
18:31 pmichaud needs to be the other way around
18:31 moritz_ rakudo: class AO is Array { method new() { self.bless(*) } }; say AO.new.HWAT
18:31 Util moritz_: No, I just populate via push()
18:31 p6eval rakudo 5ae715: OUTPUT«Method 'HWAT' not found for invocant of class 'AO'␤  in main program body at line 22:/tmp/1pWzoJ5jQs␤»
18:31 moritz_ rakudo: class AO is Array { method new() { self.bless(*) } }; say AO.new.WHAT
18:31 mfollett left #perl6
18:31 p6eval rakudo 5ae715: OUTPUT«AO()␤»
18:32 pmichaud I can fix it pretty easily
18:32 moritz_ Util: seems you need to write a custom constructor, since Array.new() isn't polymorphic yet
18:32 Util moritz_: Thanks! I will try that as a work-around.
18:32 risou left #perl6
18:33 risou joined #perl6
18:33 * moritz_ sees the problem now too
18:34 mfollett joined #perl6
18:35 * pmichaud builds + tests a patch
18:35 moritz_ colomon++ # blog post
18:35 pmichaud blog post?
18:36 moritz_ http://justrakudoit.wordpress.com/2010​/09/03/series-memoization-and-limits/
18:36 Util Can someone add me to the list of people who can own a Perl6 RT ticket, and grant rights to change a ticket? My perl.org account is "util" (lowercase)
18:36 pmichaud "But it also lacks the memoization property of the infinite version from the previous post; ..."
18:36 pmichaud I don't agree with this.
18:37 javs_ joined #perl6
18:38 colomon Well, I guess it memoizes, but it only on that finite portion of the series.
18:38 pmichaud right
18:38 pmichaud the difference is simply that the series is no longer infinit
18:38 pmichaud *infinite
18:40 colomon tweaked
18:41 pmichaud my @F-low := @Fibonacci.grep( { last if $_ > 900 } )   # should work
18:41 javs left #perl6
18:41 pmichaud rakudo:  my @Fibonacci := (0, 1, *+* ... *);  my @F-low := @Fibonacci.grep( { last if $_ > 900 } );  say @F-low[10];
18:42 p6eval rakudo 5ae715: OUTPUT«Any()␤»
18:42 pmichaud rakudo:  my @Fibonacci := (0, 1, *+* ... *);  my @F-low := @Fibonacci.grep( { last if $_ > 900; $_ } );  say @F-low[10];
18:42 p6eval rakudo 5ae715: OUTPUT«89␤»
18:42 pmichaud rakudo:  my @Fibonacci := (0, 1, *+* ... *);  my @F-low := @Fibonacci.grep( { last if $_ > 900; $_ } );  say @F-low[12];
18:42 p6eval rakudo 5ae715: OUTPUT«233␤»
18:42 pmichaud rakudo:  my @Fibonacci := (0, 1, *+* ... *);  my @F-low := @Fibonacci.grep( { last if $_ > 900; $_ } );  say @F-low[20];
18:42 p6eval rakudo 5ae715: OUTPUT«Any()␤»
18:43 pmichaud and it can just be .map in that case
18:43 pmichaud rakudo:  my @Fibonacci := (0, 1, *+* ... *);  my @F-low := @Fibonacci.map( { last if $_ > 900; $_ } );  say @F-low[20];
18:43 p6eval rakudo 5ae715: OUTPUT«Any()␤»
18:44 pmichaud rakudo:  my @Fibonacci := (0, 1, *+* ... *);  my @F-low := @Fibonacci.map( { last if $_ > 900; $_ } );  say @F-low[10];
18:44 p6eval rakudo 5ae715: OUTPUT«55␤»
18:45 pmichaud rakudo:  my @Fibonacci := (0, 1, *+* ... *);  my @F-low := @Fibonacci.map( { $_ > 900 ?? last !! $_ } );  say @F-low[10];
18:45 p6eval rakudo 5ae715: OUTPUT«===SORRY!===␤Unable to parse blockoid, couldn't find final '}' at line 22␤»
18:45 pmichaud hmm.
18:45 pmichaud probably a problem with 'last' parsing there.
18:46 pmichaud anyway, 'last' can stop the series.
18:48 pmichaud maybe take-while is really   .grep( * < 900, :while)
18:50 stepnem left #perl6
18:53 pmichaud pmichaud@orange:~/rakudo$ ./perl6
18:53 pmichaud > class AO is Array {};  say AO.new.WHAT.perl;
18:53 pmichaud AO
18:54 pmichaud spectesting.
18:55 stepnem joined #perl6
18:57 mfollett left #perl6
18:59 Holy_Cow left #perl6
19:00 moritz_ http://games.slashdot.org/story/10/09/03/1718204/e​mDuke-Nukem-Foreverem-Back-In-Development?from=rss # OH NOEZ, I was used to replying to those DNF jokes with "but contrary to DNF, Perl 6 is still being developed"
19:01 mfollett joined #perl6
19:01 patrickas joined #perl6
19:02 tylercurtis "There have been a few dozen releases of Perl 6 implementations, unlike DNF."
19:03 Holy_Cow joined #perl6
19:05 patrickas o/
19:08 isBEKaml people still follow ./ ? I thought they were simply trolled over? ;)
19:09 moritz_ isBEKaml: the troll ratio isn't much higher than on reddit
19:09 tadzik it's /. :)
19:09 isBEKaml tadzik: on linux it's ./ :P
19:10 patrickas besides if you set your threshold to comments rated 5 you can just glance at the comments and "sometimes" get somethign usefull.
19:10 xinming_ joined #perl6
19:10 isBEKaml moritz_: that's true. :) # troll forums
19:10 tadzik isBEKaml: /. always seemed wrong to me :)
19:11 tadzik it's our chance to buy dotslash.org
19:12 isBEKaml :) # go ahead and push a redirect to /. if you want.
19:12 patrickas domain typo squatting 13 years later :-)
19:13 TimToady .oO(dashslot)
19:14 isBEKaml that'd nuke everything!
19:14 TimToady what a 100 meter race is run in
19:15 draxil left #perl6
19:15 isBEKaml Oh, I parsed it as "dash lot with the hissing s"
19:15 draxil joined #perl6
19:15 isBEKaml ;)
19:17 * isBEKaml will just shut up and go back to reading.
19:17 patrickas TimToady: about implementing ...^ , I got two different implementations locally I could push for one of them to land if it makes the rosettacode thingy easier
19:19 TimToady it isn't critical; I'd really like to see ...* work in subscript slices more than that
19:19 TimToady 'course, ...^ wants to get implemented eventually
19:20 pmichaud ...*  or ..* ?
19:21 TimToady any range or series that croses the end of the subscript range is supposed to autotruncate the sequence
19:21 pmichaud any list, too?
19:21 pmichaud or do we have to distinguish series from list?
19:22 TimToady well...I guess the question is whether [0,1] on a single entry is an error or just throws away the 1
19:23 pmichaud people will be annoyed if   @a[0,1] = ...   doesn't give two elements
19:23 pmichaud er, doesn't assign two elements
19:23 pmichaud I was prepared to truncate ranges.  Truncating any list is ... not clear to me.
19:24 TimToady just possibly we might just tag subscripts then end with * as special, would be another way
19:24 pmichaud you mean, syntactically?
19:24 TimToady nod
19:24 TimToady just an idea
19:25 TimToady but can you ask a list "do you know if you're infinite?"?
19:25 pmichaud some lists, yes.
19:25 pmichaud others, no.
19:25 pmichaud series lists and things that use gather/take (which is a lot)  have problems knowing about infinity
19:26 pmichaud and it's even possible for an infinite list to always remain inside the range of available subscripts :-)
19:26 pmichaud (not that I'm proposing we make that work :-)
19:27 pmichaud I've been thinking we might want to add a modifier or adverb to gather/take to say "act like you're infinite".  Or some method that can be placed on any List to say "act infinite" .
19:28 pmichaud e.g., when the programmer knows something about the list that can't be easily detected by the compiler.
19:28 TimToady or ,*
19:29 pmichaud that doesn't feel quite right, since ,* really creates a Parcel.
19:29 pmichaud Unless we want to make that syntactically special, too.
19:29 TimToady currently defined as repeat the last element, but could be hijacked for "I know the prior is infinite"
19:29 ingy star: say 'Perl 6 sucks rocks' - 'sucks '
19:29 p6eval star 2010.07: OUTPUT«0␤»
19:29 TimToady and it doesn't matter because you never get to the *
19:29 ingy :(
19:30 pmichaud it might matter if we're returning a list to a caller
19:30 TimToady 1,2,3,func(),*
19:30 pmichaud (and with binding)
19:30 tadzik left #perl6
19:30 TimToady would say func returns an infinite list
19:30 ingy well I guess TimToady would never use '-' for strings if he doesn't use '+"
19:30 pmichaud but in a return statement, that would need/want to be    return 1,2,3,(func(), *)
19:30 pmichaud which I suppose is okay
19:30 pmichaud but it still changes the return value a bit.
19:32 TimToady or marks the parcel
19:33 pmichaud still feels weird, unless it's syntactic.  I can see someone saying "but I wanted to return a Whatever there".
19:33 TimToady well, suppose it actually returns a whatever
19:33 TimToady if you actually evaluate it
19:34 TimToady the only think is it might actually return * xx *
19:34 TimToady it would make the short size of a zip not look short
19:35 TimToady otoh, we don't define * op 42 at run time anymore
19:35 TimToady so who knows what it'd do
19:35 molaf left #perl6
19:35 pmichaud have to run (kid pickup)
19:36 pmichaud truncation of subscripts needs some clarity
19:36 dalek joined #perl6
19:36 pmichaud currently the spec says "any range"  and perhaps implies "any range or series"
19:36 pmichaud but this sounds like we're looking more at infinity more than range-ness
19:36 pmichaud which would mean that   [3..5]  wouldn't truncate
19:37 pmichaud and I do think we want to distinguish in a way such that   [3,4,5]  doesn't truncate
19:37 pmichaud afk for a bit
19:38 moritz_ if subscripts truncate, does my @a = 1, 2; @a[1, 2, 3] = <b c d>; still work?
19:38 M_o_C joined #perl6
19:38 TimToady that's what we want
19:38 TimToady should end up with three values
19:38 TimToady er, four
19:39 TimToady what pm says about inf vs range semantics
19:40 timbunce left #perl6
19:40 sorear good * #perl6
19:40 TimToady we need a way to mark things that are known to the programmer as infinite but would involve halting problems for the computer to figure out
19:41 TimToady afk &
19:41 sorear TimToady: Did you see that package Foo { } is legal Perl5 now?
19:46 timbunce joined #perl6
19:47 risou left #perl6
19:51 justatheory joined #perl6
19:55 nexusone left #perl6
19:58 pjcj left #perl6
19:59 dual left #perl6
20:01 pmichaud after walking a bit, I'm less opposed to having  ,*  indicate "infinite whatever".
20:01 pmichaud i.e., I think that could be made to work relatively cleanly.
20:02 pmichaud We'd still want/need to figure out subscript truncation, if any.
20:03 Italian_Plumber1 left #perl6
20:04 Italian_Plumber joined #perl6
20:04 Italian_Plumber left #perl6
20:05 alex_____ joined #perl6
20:05 dalek rakudo: 52f9ea8 | pmichaud++ | src/builtins/Array.pir:
20:05 dalek rakudo: Refactor Array.new and circumfix:<[ ]> so that subclasses of Array properly instantiate the correct type.  Reported by Util++ on #perl6.
20:05 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/5​2f9ea82798dfbb1201479e38b8a724084f1afe4
20:06 dual joined #perl6
20:09 alex_____ left #perl6
20:10 silug joined #perl6
20:13 patrickas colomon ping
20:13 colomon pong
20:14 patrickas got a minute for series ?
20:15 [Coke] hey, any lurkers here who are interested in being able to call perl6 from tcl or vice versa (so I can grab tuits for partcl. =-)
20:17 patrickas colomono: Do you think it is better if i submit separate small patches fixing various stuff in series code instead of the one big "fix almost everythig" refactor that has lesser chances of landing?
20:17 colomon patrickas: I don't have time at the moment, actually.  I'm off to noms in about 40 minutes, and lots of $work that needs doing in the meantime.
20:18 Italian_Plumber joined #perl6
20:18 pmichaud patrickas: it depends on the patch, really.
20:18 pmichaud if a fix-almost-everything patch is easier to read and review, that's better.
20:18 pmichaud if it's hard to read and review, then a series of patches is easier
20:18 patrickas no prob colomon I might still be here later
20:19 Tene [Coke]: I've already implemented that twice, not feeling up to working on it again yet.
20:19 patrickas pmichaud: it's the refactor I showed you but i kept adding stuff to it fixing various things and passing more and more tests ... so it kind of grew and got a bit harder to review.
20:20 pmichaud I still think that series needs an overall rethink, too.
20:20 pmichaud :-)
20:20 patrickas actually might be a good idea to submit a pull request and test the new github goodies?
20:20 pmichaud (and by "rethink", I mean the spec)
20:21 moritz_ rakudo: enum A <B C>; my B $x = A::B; say $x
20:21 p6eval rakudo 5ae715: OUTPUT«Cannot modify readonly value␤  in '&infix:<=>' at line 1␤  in main program body at line 22:/tmp/pCQtkEtMdF␤»
20:21 M_o_C IIRC you abandoned the development releases in favor of Rakduo Star?
20:21 moritz_ rakudo: enum A <B C>; my B $x := A::B; say $x
20:21 patrickas pmichaud: That's part of what delayed the whole thing ... last tim eI got issues with it we could not come up with a satisfying spec solution (with TimToady)
20:21 p6eval rakudo 5ae715: OUTPUT«0␤»
20:21 pmichaud I think the complexity of the code means we haven't really thought the spec through clearly yet.
20:21 moritz_ M_o_C: which development releases are you talking about?
20:21 moritz_ rakudo: enum A <B C>; my C $x := A::B; say $x
20:22 p6eval rakudo 5ae715: OUTPUT«You cannot bind a variable of type Int() to a variable of type Int().␤  in 'infix:<:=>' at line 685:CORE.setting␤  in main program body at line 22:/tmp/nXNbyHsav7␤»
20:22 patrickas so would it be better for me to drop the whole thing pending a spec rethinking ?
20:22 M_o_C These: "Rakudo Perl 6 compiler development release #*"
20:22 pmichaud M_o_C: we just call them compiler releases now.
20:22 pmichaud We still have them.
20:22 moritz_ M_o_C: no, they continue, and we use them in the Star releases
20:22 Tene [Coke]: Good luck, though!
20:23 moritz_ M_o_C: we just don't announce them as publicly as before, because people confuse compiler and Star releases
20:24 tylercurtis alester: are you around?
20:24 sorear seen pmichaud
20:24 aloha pmichaud was last seen in #perl6 2 mins 1 seconds ago saying "We still have them.".
20:24 alester Yes.
20:24 sorear erm
20:24 sorear seen pmurias
20:24 aloha Sorry, I haven't seen pmurias.
20:24 M_o_C moritz_: Ok, thanks.
20:26 alester tylercurtis: Did you need something or are you just keeping track of me for my mom?
20:26 tylercurtis alester: (this is slightly the wrong channel) you're be listed on http://www.pm.org/groups/19.html as the contact for Chicago.pm, I think. Am I correct in that? And is it correct in listing you as such?
20:27 alester Sure.
20:27 alester Even though we haven't had any meetings in months.
20:27 alester years?
20:28 tylercurtis That's what I was going to ask about. Thanks.
20:29 Tene I hear there's perlmongers in sfbay, but I ran into a few dead ends when looking, iirc.
20:29 [particle] um, yeah, didn't they apply to tpf for a grant?
20:30 alester sf.pm.org
20:30 alester Fred Moyer
20:30 alester shouldn't be too hard to find.
20:30 Guest49581 left #perl6
20:30 \xF0 you'd think those cities would be big enough to have successful meetings
20:31 alester \xF0: Gosh, they must be some kinds of dolts, huh.
20:31 PerlJam I thought the gist of the grant app. was that they're growing too big and needed some funds to keep it up.
20:31 \xF0 alester: Chicago is huge!
20:31 alester You know what makes PM groups work?  It's not city size.  It's having people who are willing to drive things to make them happen and who don't get burnt out on bitching and moaning from everyone.
20:32 alester And comments like "Gee, Chicago should have meetings ALL THE TIME!"
20:32 \xF0 don't I know it
20:32 Tene ALL MEETINGS ALL THE TIME
20:32 \xF0 alester: you sound a little bitter lol
20:33 alester Not sure what's "lol" worthy.
20:33 rgrau_ left #perl6
20:33 alester Chicago's huge size also means that it's really a number of different geographic areas.  Sometimes, people who live in Chicago proper twist their panties because people outside the city limits call it Chicago.pm.
20:34 sahadev hai #perl6
20:34 \xF0 oh, there's also WindyCity.pm
20:34 sahadev http://gist.github.com/564473 # my attempt at http://rosettacode.org/wiki/24_game
20:35 sahadev also my first (and not quite successful) attempt to use grammars.
20:36 sahadev the grammar matches (1+2+3+4) but not the likes of (1+2)+(3+4). what needs changing there?
20:36 [Coke] tene - I was more meaning in the getting tcl to a point where it is worth interopping with.
20:37 pmichaud in DFW we've decided to hold a variety of meetings throughout the metroplex
20:37 [Coke] in albany no one cares.
20:37 [Coke] we all hate perl up in here.
20:38 pmichaud basically, any group that wants to have meetings and call it "DFW.pm" can do so, and we just share a common mailing list
20:38 [Coke] hey! HTML5 gets builtin RUBY support! someone call the w3!
20:38 [particle] we're targetting HTML6, of course.
20:38 alester pmichaud: I wish that we all could have had that attitude in Chicago a few years ago. :-(
20:39 \xF0 pmichaud: you get multiple groups that do so?
20:40 pmichaud well, that's a recent change -- and it came about because there weren't any regular DFW.pm meetings, but there was one group that ended up meeting regularly anyway
20:40 pmichaud \xF0: it still remains to be seen how it will work out
20:40 \xF0 http://www.pm.org/groups/north_america.html weird how Lansing is put under USA, and not Michigan
20:40 pmichaud basically, someone just has to speak up and say "I'd like to meet at XYZ place"  on the list, and whoever shows up can go :-)
20:40 alester It's all completely random.  Some places you get someone who will drive stuff, and otehrs you don't.
20:41 alester Some times you just wnat beer, some places want actual presentations and people who will put them on.
20:42 pmichaud yeah, we decided that "DFW.pm" should be an umbrella that allows all of those to happen, rather than trying to create "one official group"
20:42 pmichaud at least, I think that's what we decided :)
20:42 [Coke] one of the reasons I try to get to one con if possible, as we have no local meetings to fill the gap, really.
20:42 [Coke] plus you jokers online.
20:42 [Coke] hugme: hüg Albany.pm
20:42 [Coke] see, nothing. ;)
20:43 pmichaud sahadev: I'm still looking at your grammar
20:43 sahadev pmichaud: thanks.
20:43 pmichaud sahadev: (1+2)+(3+4) doesn't match because of
20:43 pmichaud ^ [ <parexp> | <parexp> [ <op> <parexp> ]? ] $
20:44 pmichaud rakudo ends up matching the initial <parexp>, then looks for end of string, doesn't find end-of-string, so fails.
20:44 pmichaud rakudo doesn't have a full implementation of longest-token-matching yet, so the above ends up acting like
20:44 pmichaud ^ [ <parexp> || <parexp> [ <op> <parexp> ]? ] $
20:45 sahadev pmichaud: will switching the order help?
20:45 [Coke] isn't that better written as <parexp> ** <op> ??
20:45 pmichaud sahadev: switching the order would help, as would simply writing it as   <parexp> [ <op> <parexp> ] ?
20:45 sahadev [Coke]: it might very well be. i am just dipping my toes into grammars.
20:46 pmichaud i.e., you've already indicated that <op> <parexp>  is optional, so there's no need for the additional alternation
20:46 sahadev pmichaud: yes of course!
20:46 pmichaud and what Coke++ suggests might be even better
20:46 pmichaud as it would then allow things like   (1+2)+(3+4)+5+6
20:46 [Coke] ah, ** implies repeats, yours is a single optional.
20:46 Guest49581 joined #perl6
20:47 * [Coke] looks forward to this weekend when he gets to code in nqp for fun instead of getting paid for cf & js.
20:47 rbuels joined #perl6
20:52 sahadev [Coke]: actually, i am trying to match nested expressions like 2+(1+(6*3)) too. neither <parexp> [ <op> <parexp> ] * nor <parexp> ** <op> seem to do it.
20:52 * sahadev needs to read the synopsis again.
20:53 isBEKaml left #perl6
20:53 [particle] sahadev: so, parexp can contain itself?
20:53 sahadev [particle]: yes.
20:55 [Coke] sahadev: is it the match failing, or your action?
20:55 tylercurtis sahadev: does parexpr correctly match "2" or "(2)"?
20:55 sahadev tylercurtis: yes to both
20:56 sahadev [Coke]: .parse returns false for 2+(1+(6*3))
20:57 tylercurtis Looking at your gist, it looks like parexps can only contain exps.
20:57 sahadev tylercurtis: the gist is slightly out-of-date. let me update with my latest copy.
20:58 pmichaud traditional recdescent would be something more like
20:58 pmichaud token expr { <term> <op> <term> }
20:58 pmichaud token term { '(' <expr> ')' | \d }
20:58 pmichaud token op { '+' | '-' }
20:58 pmichaud which will handle nested expressions just fine
20:59 pmichaud or if you need more
20:59 pmichaud token expr { <term> ** <op> }
20:59 pmichaud note this doesn't handle precedence, but that can be achieved with more rules
20:59 Italian_Plumber left #perl6
20:59 patspam left #perl6
21:00 pmichaud i.e., the trick is to treat a parenthesized expression like a term
21:01 sahadev pmichaud: that makes sense. let me try that.
21:05 arnsholt pmichaud: There seems to be a bug in nqp-rx where floating point literals with zero decimal part sometimes become integers
21:05 sahadev pmichaud: thanks. it actually seems simpler now. http://gist.github.com/564473 updated.
21:05 arnsholt But I can't quite find the root of it
21:05 whiteknight joined #perl6
21:06 timbunce left #perl6
21:07 shortcircuit TimToady, moritz_: For the purpose of testing P6 implementations and syntax, you might also want to run through Project Euler.
21:09 Guest49581 left #perl6
21:13 timbunce joined #perl6
21:13 pmichaud arnsholt: yes, it has to do with the way that PAST::Compiler converts floats into PIR constants.  The .0 gets lost
21:14 sahadev thanks all. I added my solution to http://rosettacode.org/wiki/24_game#Perl_6. Feel free to improve it.
21:16 masak joined #perl6
21:16 masak ahoy, #perl6!
21:16 phenny masak: 12:39Z <moritz_> tell masak that http://netzhansa.blogspot.com/2010/09/qu​icklisp-upcoming-solution-to-common.html might interest him
21:17 pmichaud arnsholt: if you can file a bug ticket for it, I can likely get it fixed.  A test in nqp-rx would be even better.  :-)
21:17 masak moritz_: saw it earlier today and put it in my tab queue. I'll read it now that you recommended it.
21:22 masak interestingly, I was in #perl on irc.perl.org when chip posted that URL.
21:22 masak judging from the article text and the comments, #perl managed to effect a slight redaction of the article text :)
21:23 sahadev left #perl6
21:27 jimi_hendrix joined #perl6
21:35 Mowah joined #perl6
21:36 Holy_Cow left #perl6
21:39 kjeldahl left #perl6
21:41 Schwern left #perl6
21:42 hercynium joined #perl6
21:46 masak [Coke]: no idea what Google you're using to get me as the first hit 'for yaakov'. in my Google, yaakov is the first hit for yaakov. :)
21:47 masak Google++ # making more sense than [Coke] :P
21:47 rgrau_ joined #perl6
21:49 timbunce left #perl6
21:51 arnsholt pmichaud: Right, I've got a test. Which test file do you think it should go in? I'm a bit unsure which one is a good fit
21:52 M_o_C left #perl6
21:53 M_o_C joined #perl6
21:54 mikehh joined #perl6
21:55 * masak replies to the question at http://www.reddit.com/r/perl/comments/d​7ve1/people_of_perl_6_carl_m%C3%A4sak/
21:57 ruoso left #perl6
22:00 cdarroch left #perl6
22:02 masak http://www.reddit.com/r/perl/comments/d8gnc/very_a​mateur_perl_programmerscripter_how_is_perl/c0ygi30 -- offhand, I can't think of a way to do this kind of option handling with a MAIN signature.
22:06 masak someone might want to answer this, as well: http://www.reddit.com/r/perl/comments/d8gnc/very_a​mateur_perl_programmerscripter_how_is_perl/c0ygiif
22:11 alester left #perl6
22:15 Axeman joined #perl6
22:17 arnsholt pmichaud: http://github.com/perl6/nqp-rx/issues/issue/7 includes a test case that works on latest nqp-rx locally
22:17 mfollett left #perl6
22:20 jhuni joined #perl6
22:21 masak "Perl 6: succeeding despite having giants standing on its shoulders"
22:22 masak one of the unfair things about Second Systems is that people expect all the things they expect from the First System, and they have relatively little tolerance/understanding for the "in progress" view of things.
22:23 masak it's like, hurry up, ok?
22:23 masak First System is so much better... you should have based your stuff on it instead. :)
22:23 * masak stops trolling #perl6
22:24 TimToady keep doing it, you need the practice
22:24 masak oh, I was holding back a bit.
22:25 masonkramer joined #perl6
22:26 masak "Why did you remove sigil variance? I liked that part. It was brain damaged, but it was *my* brain damage, darn it!"
22:26 masak "I think Perl 6 is slow because the community designed it. Yeah. That's it. Some individual should have made it instead, like with good programming languages."
22:28 masak "I think 'Perl 6' should really be called 'Ruby' and be done with it. Mostly because I like Ruby very much, and I don't know much about Perl 6."
22:28 masonkramer really?  I don't believe you
22:28 masonkramer :p
22:28 Tene masak: you forgot "LOL PUNCTUATION IS HARD AND SCARY"
22:28 pjcj joined #perl6
22:29 TimToady if he said that he would hurt my feelings
22:29 masak "You can write Pascals triangle in Perl 6 in like two lines of code. I don't like that. Perl 6 shouldn't be such an academic language."
22:29 javs_ left #perl6
22:30 Tene Oh, we could fix that by requiring a mandatory linebreak after every comma.
22:30 masak "Hey guys! I saw that Periodic Table of Perl 6 Operators. Now I know Perl 6 is teh suckz. Nobody needs that many operators."
22:31 Tene back to "PUNCTUATION IS HARD AND SCARY"
22:31 masak that was the closest I could manage.
22:32 M_o_C "<masak> "You can write Pascals triangle in Perl 6 in like two lines of code. I don't like that. Perl 6 shouldn't be such an academic language."" <--- Did someone actually say something along these lines? I mean the connecting-"only two lines"-with-"academic" part.
22:32 Tene M_o_C: Yes.
22:32 daemon is now known as prism
22:32 masak oh, and "I read this scientific article the source of which I cannot find that said that you shouldn't use so many operators in your language, because it's like, bad and stuff. Therefore I think Perl 6 will never succeed."
22:32 M_o_C That's rather interesting.
22:32 prism is now known as daemon
22:33 masak M_o_C: yes, more or less.
22:33 masak M_o_C: http://twitter.com/shadowc​at_mst/status/22112066276
22:34 M_o_C Hrm, ok. I associated "academic" with "used in a research environment" not "developed as research".
22:34 M_o_C Thanks for digging that up, anyway^^
22:35 masak you're welcome.
22:35 masak I think I'm done trolling-in-quotes for the day.
22:40 patrickas masak: what does the {} mean in command line args ? THinking about the MAIN args to ffmpeg example
22:40 masak [backlog] ooh, double classify! haven't seen that before.
22:41 masak patrickas: I think it might mean 'grouping' here. and [] might mean 'optional'. but I'm not sure.
22:42 patrickas ok .. I know about [] but first time I see {}
22:42 masonkramer I think the pascal's triangle is snippet is pretty readable
22:43 masak I think it's good that we're finding all these cases of segfault for long-running loops. maybe we should start making a list of scripts that segfault? or an RT ticket of them, or something.
22:43 masonkramer the code looks exactly like its product
22:43 masonkramer to me, that's intuitive
22:43 masak masonkramer: It's a math problem. the solution looks a lot like math.
22:43 svetlins joined #perl6
22:44 masonkramer it's more a declaration of an infinite pascal's triangle than a recipe for generating a pascal's triangle
22:44 masonkramer shrug...I'm personally excited to use perl6 in a production environment
22:44 masak I like when the series operator is used for non-numbers. the balanced-parens example at the bottom of http://use.perl.org/~masak/journal/40459 is another favourite of mine.
22:45 M_o_C left #perl6
22:46 masonkramer I love your examples!
22:46 masonkramer If I ever learn perl 6, I can truthfully say I learned it from masak
22:47 masonkramer anyway...I'm off to dinner...ttyl
22:48 * masak beams
22:48 Mowah left #perl6
22:49 Italian_Plumber joined #perl6
22:50 Axeman I'm wondering if somebody can help me with proto. Can I change where @*INC looks? (Sorry if this is terribly newbie of me.)
22:51 masak Axeman: you can.
22:51 patrickas maska: i kind of find it a pity that you should know $end in that example
22:51 masak Axeman: export PERL6LIB=...
22:51 patrickas sorry name fail :-(
22:51 masak Axeman: the paths you put on there will end up in @*INC
22:51 Axeman Like Perl 5.
22:52 masak patrickas: there might be ways around that. I haven't thought about it.
22:53 patrickas the easiest that I can think of is to use code for the terminating condition which only works on my fork ATM
22:54 Ross left #perl6
22:55 masak patrickas: I guess the &ext-balanced-paren-string could detect $end and return Nil.
22:55 masak but to me that's equally complex.
22:56 rgrau_ left #perl6
22:58 masak even if we didn't know $end, we would know to stop after a($n) steps, where a is defined at http://www.research.att.co​m/~njas/sequences/A052701
23:01 patrickas or I guess after the series would start producing longer than N chars results
23:02 masak I'm not sure that's what would happen.
23:02 masak but I haven't checked.
23:05 masak rakudo: my @a = 1, 2, 3; my @b = 1, 3, 5; my @c = @a (&) @b; say @c.perl
23:05 p6eval rakudo 52f9ea: OUTPUT«[Set.new(1, 3)]␤»
23:05 masak I'm guessing the Set should evaporate into a list here.
23:05 masak when we have that working, we have a real use case for Set.
23:06 masak what is it that gets called when flattening something for list assignment? .flat?
23:09 patrickas I think so but I am no reference :-)
23:10 patrickas I'm like the yellow rubber ducky you debug with :-)
23:11 masak :)
23:13 masak .eager, it seems from source.
23:14 patrickas Rubber ducky nods
23:14 masak :)
23:15 patrickas when does the match result have a negative .to ?
23:15 masak when the Match failed.
23:15 masak usually -2, but sometimes -1 and -3 too, IIRC.
23:15 Axeman another proto question: where's projects.list supposed to be? It doesn't seem to be saved to my system.
23:15 masak that's PGE though, so things might have changed.
23:16 masak Axeman: it's right there in the proto/ dir.
23:17 patrickas I did see -3 but S05 I could not find the meaning in S05
23:17 Axeman masak: I have a projects.state but no projects.list
23:18 Axeman and projects.state is 0-length
23:18 masak patrickas: here are the meanings: http://github.com/masak/gge/b​lob/master/lib/GGE/Exp.pm#L35
23:18 getpwnam joined #perl6
23:18 getpwnam left #perl6
23:18 masak Axeman: I just updated my proto repository to be sure. projects.list is in there. are you sure you have a clean checkout?
23:19 Axeman A clean checkout of proto? No. I'm running perl proto.pl install proto
23:20 masak right. but you're doing that in a directory that you downloaded... how?
23:20 patrickas masak: Thanks. Actually it's for the condition when next-balanced-paren-string should stop producing items... you can just check when it stops matching
23:20 masak Axeman: through Rakudo Star?
23:21 patrickas rakudo: say ( '()()()' ~~ /^ ( '('+ ) ( ')'+ ) '(' /; )
23:21 p6eval rakudo 52f9ea: OUTPUT«()(␤»
23:21 patrickas rakudo: say ( '((()))' ~~ /^ ( '('+ ) ( ')'+ ) '(' /; )
23:21 p6eval rakudo 52f9ea: OUTPUT«␤»
23:21 Axeman No I downloaded it off of the perl6 modules site.
23:21 masak rakudo: say ( '((()))' ~~ /^ ( '('+ ) ( ')'+ ) '(' /; ); say $/.to; say ?$/
23:21 p6eval rakudo 52f9ea: OUTPUT«␤-3␤0␤»
23:21 masak patrickas: better to check the boolean value, if you ask me.
23:21 patrickas Yes sure
23:22 masak Axeman: http://modules.perl6.org/ ?
23:22 am0c joined #perl6
23:22 Axeman masak: yeah that's the one.
23:22 masak that means you went through github, I guess.
23:22 masak Axeman: do you see 'projects.list' being listed at http://github.com/masak/proto/ ?
23:25 patrickas You are using .to and .from without checking anything ... I just wanted to understand what -3 meant ... if it means the match failed you can just start the sub with : return unless $s ~~ /^ ( '('+ ) ( ')'+ ) '(' /;
23:26 masak according to the URL I linked above, it means CUT_MATCH
23:26 Axeman I just saved the raw copy down to my machine.
23:26 patrickas I say that but I did not understand what CUT_MATCH means :-(
23:27 lue ohai o/
23:27 masak Axeman: of proto.pl?
23:27 am0c left #perl6
23:27 Axeman Sorry that was in the buffer from before.
23:28 masak what was in the buffer from before? I don't follow.
23:28 patrickas s/say/saw/
23:28 masak patrickas: CUT_MATCH means 'abort the match, either because the user told us, or because the match failed'
23:29 masak patrickas: think of it as a 'fail of the third order'.
23:29 patrickas OK :-)
23:29 Axeman That message that I sent was old. I had typed it into the buffer but did not send it--then when I came back I fat fingered the enter key and sent it.
23:30 patrickas masak: I wonder should the series operator automatically stop producing items when the next sub returns Nil ?
23:30 patrickas it kind of makes sense to me but I am not sure if there are arguments against
23:30 masak Axeman: ok, so back to the question I asked. did you download the whole repo, or just proto.pl?
23:31 Axeman Just proto.pl
23:31 masak Axeman: then that's you first clue right there for why you don't have projects.list
23:32 masak actually, it's all your clues.
23:32 masak I don't wish to sound indignant, but if you see a file in the repository, then download just one of them, and then ask why you don't have one of the other files... then you proabbly want to take a step back and think a bit.
23:32 masak :)
23:33 Axeman I don't see a link to download the whole project on the page--and I thought I was following the instructions in the README. Is that out of date?
23:33 PacoLinux joined #perl6
23:33 masak probably, but probably not in that way.
23:33 masak I don't recall it ever saying "download only proto.pl"
23:33 jhuni left #perl6
23:33 masak in fact, I'd guess it kinda assumes you should download the whole repo.
23:34 mikehh left #perl6
23:34 PacoLinux left #perl6
23:34 masak Axeman: at http://github.com/masak/proto , there's a "Download Source" button at the top right.
23:34 masak that's if you don't have git.
23:34 PacoLinux joined #perl6
23:35 svetlins_ joined #perl6
23:35 Axeman Oh, I see it, now.
23:36 masak Axeman++ # seeing it
23:36 masak I think you'll find things working a bit better with all the files, not just the .pl script.
23:36 Axeman Here's what I read from the project reame: To install Proto, get the main script with this command (or a browser) (all on one line without the \ if not in a Unix compatible shell):   perl -MLWP::UserAgent -e"LWP::UserAgent->new->mirror( \     'http://github.com/masak/proto/raw/master/proto', 'proto.pl')"
23:37 masak huh.
23:37 patrickas rakudo: say (Nil,1).pick() for ^10
23:37 p6eval rakudo 52f9ea: OUTPUT«1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤»
23:37 patrickas is that a bug ? ^^
23:37 masak Axeman: my apologies. that's new to me.
23:37 masak patrickas: no, that's list flattening in action.
23:38 patrickas Oh Nils always disapear? even from the middle ?
23:38 patrickas rakudo: say (2,Nil,1).pick() for ^10
23:38 svetlins left #perl6
23:38 p6eval rakudo 52f9ea: OUTPUT«2␤1␤1␤2␤2␤2␤1␤1␤2␤2␤»
23:38 patrickas rakudo: say [2,Nil,1].pick() for ^10
23:38 masak Axeman: this might be case of proto suffering from the Too Many Cooks syndrome.
23:38 p6eval rakudo 52f9ea: OUTPUT«2␤2␤2␤1␤2␤2␤2␤2␤2␤1␤»
23:38 Axeman I appreciate what you guys are doing.
23:38 masak Axeman: I have no idea if those instructions ever worked. I'd recommend downloading the whole repository.
23:39 masak Axeman: also, I feel a little bad now for almost yelling at you, when I should have RTFM myself :)
23:40 Axeman No biggie. Like I said you guys are making the dream come alive.
23:40 masak :)
23:40 masak just so you know: proto is being phased out, slowly but surely. it's still supposed to work, but some remaining bugs might never get fixed.
23:40 masak you might have better luck with tadzik++'s 'neutro'.
23:40 Axeman What's taking its place?
23:41 masak http://github.com/tadzik/neutro
23:41 [particle] joined #perl6
23:41 masak neutro is, as far as I understand, a simplification of proto.
23:42 cotto left #perl6
23:42 masak taking proto's place in the long run, is 'pls' -- you can see it in a branch of the proto repository: http://github.com/masak/proto/tree/pls
23:42 cotto joined #perl6
23:42 [Coke] mst is an excellent example of why I consider him a troll.
23:43 masak that sentence almost coheres.
23:43 patrickas rakudo: sub step($s) {return unless ($s ~~ /^ ( '('+ ) ( ')'+ ) '(' /);   [~] $s.substr(0, $/.from),"()" x ($1.chars - 1),"(" x ($0.chars - $1.chars + 2),")",$s.substr($/.to);}; my $start = "()" x 3;for $start, &step ... * -> $string {say $string;}
23:43 p6eval rakudo 52f9ea: OUTPUT«()()()␤(())()␤()(())␤(()())␤((()))␤»
23:44 patrickas ^^ No need for $end
23:44 masak patrickas++
23:44 masonkramer left #perl6
23:44 patrickas rubber ducky can sleep now :-)
23:44 masonkramer joined #perl6
23:44 masak night, patrickas. dream of big tubs filled to the brim.
23:45 patrickas hehehe I will, 'night
23:45 patrickas left #perl6
23:54 masak rakudo: class AO is Array {}; my $ao = AO.new; print $ao.WHAT.perl;
23:54 p6eval rakudo 52f9ea: OUTPUT«AO»
23:54 masak pmichaud++

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

Perl 6 | Reference Documentation | Rakudo