Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2007-01-19

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00:02 nothingmuch putter: if pugs adopts MO then the OO AST can be implemented as a very simple procedural thing, as long as the MO::Run::* stuff is implemented OK in it
00:02 nothingmuch that's the simplest thing that could work
00:02 nothingmuch in which case the answer is "nearly there", i suppose
00:04 putter any ast can be implemented as a simple procedural thing, no?
00:04 nothingmuch making the AST better is a matter of balancing out what the compiler knows from the compile time meta model, what the emitter's target knows about the runtime, and what the intermediate language wants to represent as the best bridge between the two, but this is all designed to be extensible
00:04 nothingmuch well, yes, but i meant implemented soon as a very simple procedural thing
00:04 nothingmuch short answer: the AST doesn't need to know much about OO and OOness till we become interested in early binding, etc
00:05 nothingmuch does that make more sense?
00:06 putter hmm, check me on the following strawman explanation...
00:07 putter ok, starting with a strawman question - why is noone writing a p6 implementation in p6?
00:08 nothingmuch fglock is
00:08 nothingmuch good progress, too
00:09 putter for a long time an answer (mine, may have been wrong) was p6 objects aren't working well engough in pugs to do it, and attempting a non-oo impl was silly.
00:10 putter re fglock, yes.  by starting over from scratch.  redsix, p6 on ruby, could have been used similarly.  perhaps the strawman question should have been "noone... on pugs".
00:10 nothingmuch ah
00:10 nothingmuch okay
00:10 nothingmuch so the answer to *that* is that audrey has been absent a lot lately
00:10 nothingmuch since cmarcelo ported MO to .hs and audrey finished it off
00:11 putter I don't have a good understanding of how much p6 is/isnt implemented in mp6/kp6.
00:11 nothingmuch there is not that much left to have "good" support for objects
00:11 nothingmuch at which point pugs itself could start moving more of it's own guts into p6
00:12 putter "good" in the previous sentence meant useably non-buggy, rather than compliant with some spec.
00:13 Ziggy6 so continuing pugs would be a waste of time?
00:13 ekelund __Ace__: dont you have birthday soon?
00:14 putter audreyt has said for some time that pugs object support is current usable for a large oo-ish p6 project.  Before that, I thought it not.  I don't know if anyone has tested it.  Ie, built a biggish project in p6 oo.
00:15 luqui joined perl6
00:16 Ziggy6 left perl6
00:16 Ziggy6 joined perl6
00:16 putter Ziggy6: emphatically not.  pugs is passing most of the test suite.  the only thing which comes close is pil2js, which uses pugs to parse (which in p6, is aka utterly dependent).
00:16 nothingmuch Ziggy6: yes, it's a total waste of time... in fact, you should probably just /quit and ignore us all henceforth
00:17 nothingmuch putter: i think the problem with pugs, that fglock is trying to solve, is that the grammer is not extensible
00:17 nothingmuch in a sense to have a "real" perl 6 it needs to be self hosted in that funky way, or at some point the user will see it's a fake
00:17 nothingmuch i think that pugs is becoming more and more a project to make more tests, and to validate those tests, and to provide a bootstrapping springboard for a "real" perl 6
00:18 Ziggy6 but we already have bootstraped 6-on-6
00:18 nothingmuch (or at least i theorize it is being perceived as such)
00:18 nothingmuch Ziggy6: it's not nearly as complete
00:18 Ziggy6 i don't understand the priorities here
00:18 nothingmuch ... an d hence it lost momentum
00:18 nothingmuch there are no priorities, everybody decides what they care about most and tries to work on that
00:19 nothingmuch given the time that they have
00:19 luqui putter has a nice graph so people can pick what they care about, though
00:19 nothingmuch i mean, there are priorities, but they are private
00:20 Ziggy6 :)
00:20 Ziggy6 it's hard to choose... :)
00:20 Ziggy6 (for me, because i'm totally new
00:20 putter Perhaps one defect of our flooding algorithm approach to project management is that when the thing that people want to work on have unsatisfied dependencies on things they don't or can't, we don't have a positive feedback mechanism.  Only the null one of people wandering away.
00:22 AtomicStack joined perl6
00:22 nothingmuch the bootstrapping issues make it really difficult
00:22 nothingmuch the effort:benefit ratio looks very grim in the long term, unfortunately
00:22 nothingmuch but it's probably necessary
00:22 putter Hmm... it might be interesting to have one-paragraph stories from people on "what they want to work on and what the sticking points have been".
00:22 nothingmuch my 2c on that:
00:23 nothingmuch 1. projects that have been interesting from an ADD perspective - learn about new stuff really fast and feel smarter as a result (various stuff like blondie, the forth stuff, etc that are all side projects related to pugs)
00:23 __Ace__ ekelund: yea soon
00:23 nothingmuch 2. stuff that is actually useful, mainly because it's also useful outside of pugs (Moose, etc)
00:25 putter nothingmuch: and are you at all stuck?  or puttering along happily, modulo available tuits?
00:25 putter Ziggy6: I haven't forgotten your "but what about bootstrapped 6-on-6" questions.  bbiab.
00:27 nothingmuch well
00:27 nothingmuch tuits are hard
00:27 nothingmuch but I also feel that I'm lacking focus recently
00:28 nothingmuch in a sense i no longer feel enthusiastic about pugs itself, because my curiosity faded out and the potential for benenfit is far too low right now
00:28 nothingmuch s/pugs/perl 6 compilers in general/; # for the next few months, at least
00:29 nothingmuch the things that are interesting for me are a bit later on in the toolchain's life
00:29 nothingmuch but I feel that MO has been both interesting and directly useful
00:29 nothingmuch partly because it was explicitly designed to be useful not just for pugs
00:29 nothingmuch so a little of both, i would say
00:29 Ziggy6 things like ... ?
00:30 nothingmuch interesting?
00:30 nothingmuch making it go fast
00:30 nothingmuch early binding
00:30 Ziggy6 i guess you must wait for parrot
00:30 nothingmuch partial evaluation without making an icky evaluator impl
00:31 nothingmuch actually no, i think that part belongs in the perl 6 toolchain
00:31 nothingmuch generic optimizations
00:31 Ziggy6 aa
00:31 Ziggy6 yes, that would be quite interesting for me too :)
00:31 nothingmuch inferring scope reachability of data
00:31 nothingmuch for example to flag a certain data constructions so that it can be allocated on a stack instead of a heap for a potentially interested runtime
00:32 nothingmuch i doubt i'll be able to actually do good because I have no required background
00:32 nothingmuch but I know that's what's puzzling me ;-)
00:32 putter so a "need greater transparency; know where to focus; see how it fits in" concept?  plus a "project progress too slow; later phases distant; can't work on things you want to for the forseeable future" concept?
00:32 Ziggy6 but for now i really want to learn perl6 first, and contribuiting to the project in it's current state gets me the most benefits
00:32 nothingmuch Ziggy6: one word: tests
00:32 nothingmuch read, write, update etc the tests... i think that's basically how we all got started
00:32 nothingmuch then move on to the synopses
00:33 nothingmuch once you found something a vague, or incomplete
00:33 Ziggy6 either that or missing features from pugs
00:33 nothingmuch or if you just want to learn more iteratively
00:33 nothingmuch refactoring is also a good way to learn
00:33 nothingmuch pugs grew organically and could use refactoring
00:34 seano joined perl6
00:34 nothingmuch and that helps with both .hs knowlege and pugs internals knowlege
00:34 nothingmuch helping fglock is probably more interesting though
00:34 Ziggy6 kp6?
00:34 nothingmuch kp6?
00:34 Ziggy6 what's fglock working on?
00:35 nothingmuch i think nowadays it's called PCR?
00:35 Ziggy6 huh?
00:35 nothingmuch miniperl6 is the language
00:35 luqui kp6 = kindaperl6 = miniperl6++
00:35 nothingmuch ah
00:36 nothingmuch i'm out of date
00:36 nothingmuch =)
00:36 putter nothingmuch:  I interviewed fglock on it... two days ago?  three?
00:36 Ziggy6 :)
00:36 nothingmuch that's definitely better than what I have to say then
00:37 nothingmuch ignore whatever I said about it =)
00:37 Ziggy6 can i see the article pls?
00:37 putter looking...
00:37 nothingmuch i need spleeep
00:38 nothingmuch see you guys
00:39 weinig is now known as weinig|bbl
00:39 putter lambdabot: ?tell masak in the diagram, postfix double asterisk marks a node which occurs in two places.  once attached to the parrot box.  dot doesnt have a "draw a straight line, ignoring overlaps".  so actually adding edges to the parrot stuff either unhappily distorts the graph (if the edge is springy), or wanders-all-over clutters it (if not).
00:39 lambdabot Consider it noted.
00:42 putter Ziggy6: http://colabti.de/irclogger/irclogger_log/perl6?date=2007-01-15,Mon&sel=294#l480  through http://colabti.de/irclogger/irclogger_log/perl6?date=2007-01-15,Mon&sel=527#l810
00:42 lambdabot Title: #perl6 2007-01-15,Mon, http://tinyurl.com/3dc3xh
00:42 Ziggy6 thanks :)
00:43 putter It really needs to be summarized.  That could be a neat/useful thing to do... ;)
00:44 Ziggy6 i'm not good at writing something other than code :D
00:45 diotalevi left perl6
00:45 putter nothingmuch: a thought exercise...
00:46 putter pil2js is a parser-compiler-emitter-runtime written in hs-hs-p5-js.
00:47 putter the emitter is p5 because at the time p5 worked much better than p6.
00:48 Ziggy6 hs writes ast to a file and then starts a p5 interpreter?
00:48 putter the parser-compiler remained hs-hs because no other exists (or does it now?)
00:48 putter the prelude is js because the parser-compiler's ast didn't, and doesn't, support objects.
00:50 putter it might now be possible to migrate the emitter from p5 to p6.
00:51 putter once the oo ast is implemented in pugs, it would be possible to migrate the runtime at least partially to p6.
00:52 rashakil joined perl6
00:53 putter until there is a full parser implementation in p6, one can't do much about bootstrapping pil2js (ie, dropping its pugs dependency).
00:54 putter pil2js's non-oo test passing has been similar in extensiveness to pugs, greater than the old pilrun, and much greater than any other implementation.
00:56 putter that it hasnt moved in 1+ years seems a function of insufficient payoff (migrate p5 emitter to p6), and a lack of a rules engine, let alone parser, written in p6 (or js, or, for much of that year, anywhere at all).
00:56 bonesss joined perl6
00:57 putter if fglock's stuff permit doing a full, ie, covering most of the test suite, parser in p6, perhaps its time to wake up pil2js.
00:58 putter its performace was never outstanding, but... it is more an implementation of p6 than anything else which has existed, except pugs.
00:58 penk joined perl6
00:58 putter nothingmuch: hows that for a strawman argument.  thoughts?
01:03 putter one thing I would find reassuring is if mp6/kp6 were using the test suite.  the test suite is certainly a bear for new implementations.  it would be much more useful for them if tests, rather than files, were the unit of compilation and failure.  but redsix managed to start using the test suite (largely failing of course) in only a couple of weeks existence.  it was a priority.  perhaps kp6 should be nudged in that direction??
01:04 putter hmm.... could the mp6 parser/compiler be run on pil2js?
01:05 putter oh, no.  the current pugs ast won't support it..  :/
01:06 putter but when the oo ast goes into pugs, depending on when that happens, it might be neat to try a kp6 on js using pil2js.
01:07 putter hmm, for those following at home, I clarify that the pugs _internal_ ast supports it, but the exported ast, which pil2js's p5-based emitter uses, does not.
01:07 mako132_ joined perl6
01:12 elianto joined perl6
01:13 putter once there is an oo ast spec.  or it's clear the oo ast is in some way similar to the current ast, someone should start working on a p6-based emitter and p5 runtime.  perhaps this is kp6?  though under pugs, one could use pugs-p6, rather than mp6-p6, which is a much larger subset of p6.
01:14 putter could use the same runtime
01:15 putter the kp6 ast and pugs oo ast should be largely compatible
01:19 putter fglock: how much of the existing Prelude.p6 can be handled by kp6/mp6?
01:20 putter pugs Prelude is said to currently be able to handle anything pugs can.  so pugs Prim to Prelude migration should currently be unstuck.  someone should be trying it.
01:20 putter perhaps creation of a unified prelude could be going on right now?
01:22 putter using pugs and kp6.  and adding pil2js once the oo ast finally goes in.
01:22 putter that would provide the multiple backends needed to motivate the even and io specs.
01:22 putter s/even/event
01:30 Ziggy6 http://pugs.kwiki.org/ got vandalized
01:31 lambdabot Title: HomePage - Pugs - A Perl 6 Implementation
01:31 putter repeatedly.  it should probably become a cname for the new wiki
01:32 putter actually, we need a wiki.pugs.org pointer, and use that.  pointed, for the moment, at the socialtext rather than kwiki site.
01:35 luqui *wiki.pugscode.org ?
01:36 lyokato joined perl6
01:39 mako132_ joined perl6
01:41 putter left perl6
01:41 mako132_ joined perl6
01:42 bonesss joined perl6
02:06 seano_ joined perl6
02:13 vel joined perl6
02:20 Ziggy6 left perl6
02:26 GeJ win 3
02:26 GeJ oops, sorry all
02:27 GeJ Good morning still :)
02:29 Ziggy6 joined perl6
02:43 b00t joined perl6
03:12 weinig|bbl is now known as weinig
03:38 rashakil joined perl6
03:39 spoop joined perl6
03:58 Schwern joined perl6
04:02 weinig is now known as weinig|zZz
04:21 vitaminmoo joined perl6
04:39 nipra joined perl6
04:45 avar joined perl6
04:48 b00t joined perl6
04:53 luqui joined perl6
05:28 leed joined perl6
05:46 nipra joined perl6
06:07 iblechbot joined perl6
06:13 BooK_ joined perl6
06:16 jabbot joined perl6
07:03 _Jack_ joined perl6
07:16 pen1 joined perl6
07:18 pen1 is now known as penk_1
07:28 xinming_ I see there are many use v6-alpha; in our source. Anyone here can tell me where it located? >_<
07:31 marmic joined perl6
07:33 xinming_ Or, We just use pugs to parse the file. and then, dump the AST?
07:37 dduncan the "use v6-alpha;" is special ...
07:37 dduncan as it parses both as valid Perl 6 and valid Perl 5 ...
07:38 dduncan in Perl 6, it has a similar meaning to "use 5.nnn" in Perl 5 ... or specifically, it says use the alpha version of Perl 6, not the final version ... saying just "use v6;" will die unless it is Perl 6.0.0 release version
07:39 xinming_ dduncan: You misunderstood me.
07:39 dduncan in Perl 5, that would include the v6.pm Perl 5 module, which acts as a source filter, treating the rest of the file as Perl 6 code which it converts into Perl 5 code, and so any module with use v6-alpha is also a valid Perl 5 module as well as a valid Perl 6 module
07:39 xinming_ dduncan: I mean, for that line, where is the lib located?
07:40 dduncan on CPAN, it is v6.pm; in the Pugs repository, I have to check ...
07:41 dduncan try perl5/Pugs-Compiler-Perl6/
07:41 xinming_ thanks
07:41 dduncan it contains a lib/v6.pm, and otherwise looks like the CPAN release
07:46 avar use v6-alpha; deparses to use v6 (-'alpha'); in p5
07:48 sili ...
07:51 * yves is back (gone 15:03:21)
07:58 nipra joined perl6
08:17 drrho joined perl6
08:18 elmex joined perl6
08:21 Ziggy6 left perl6
08:25 dduncan left perl6
08:29 rhizo joined perl6
08:54 avarab joined perl6
08:58 autark_ joined perl6
09:04 buetow joined perl6
09:16 avarab is now known as avar
09:23 Ziggy6 joined perl6
09:29 luqui joined perl6
09:53 Salzh joined perl6
09:55 tewk__ joined perl6
09:58 iblechbot joined perl6
09:59 jferrero joined perl6
10:05 Salzh joined perl6
10:06 lambdabot joined perl6
10:16 fglock joined perl6
10:41 theorbtwo joined perl6
10:41 masak putter: I see. thx
10:41 lambdabot masak: You have 1 new message. '/msg lambdabot @messages' to read it.
10:44 fglock putter: re prelude.p6 - the plan is to write containers in the prelude, and mode most of the existing runtime to the prelude too; but pugs prelude is not currently usable for kp6
10:44 fglock s/mode/move/
10:46 fglock re AST - kp6 ast is moving in the direction of src/Pugs/AST/CapInternals.hs
10:48 fglock kp6 already has metaclass support; it can be fit to pil2js with some work - maybe 1 week
10:49 fglock maybe add some days for learning both systems
11:04 theorbtwo joined perl6
11:12 TimToady joined perl6
11:28 xinming joined perl6
11:31 avarab joined perl6
11:36 buetow joined perl6
11:37 ruoso joined perl6
11:37 Odin- joined perl6
11:47 avarab is now known as avar
12:11 foo\ joined perl6
12:12 chris2 joined perl6
12:23 dduncan joined perl6
12:30 rhizo joined perl6
12:38 buetow joined perl6
12:40 thepler joined perl6
12:54 nipra joined perl6
13:10 Limbic_Region joined perl6
13:11 __Ace__ joined perl6
13:33 gnuvince joined perl6
13:47 dduncan left perl6
13:55 foo\ joined perl6
14:25 penk joined perl6
14:31 bonesss joined perl6
14:33 mdiep_ joined perl6
14:49 Limbic_Region has anyone else read luqui's blog entry on the recent change to s5?
14:50 [particle] eric meyer's s5?
14:51 [particle] oh, S05
14:54 wolverian that'd be: http://luqui.org/blog/archives/2007/01/19/perl-6-rules-elementary-compositionality-and-more-contrived-vocabulary/
14:54 lambdabot Title: The dreams that stuff is made of » Perl 6 Rules: Elementary Compositionality an ..., http://tinyurl.com/24ofcn
14:54 Limbic_Region right
14:54 vel joined perl6
14:55 fglock joined perl6
14:56 b_jonas joined perl6
14:58 Limbic_Region well, if anyone has read it and understands both points of view - I would love to ask some dumb questions
15:03 fglock Limbic_Region: not sure about the "understand" part, but I wonder what the questions are
15:05 hexmode joined perl6
15:17 fglock [particle]: re miniperl6 -> PAST, it might be better to work on an emitter for kp6 instead
15:21 [particle] i'll up and look at kp6 now
15:23 thepler joined perl6
15:23 fglock [particle]: nice! the place to look is v6/v6-KindaPerl6/lib/KindaPerl6/Visitor/
15:24 fglock there are AST transforms of all kinds, and an AST dumper, and an AST-to-Perl5 emitter
15:24 [particle] Visitor/EmitPAST.pm i suppose
15:24 fglock yes
15:24 fglock these modules work like plugins - you call them in sequence
15:25 [particle] right-o. glad to see you've gone in that direction
15:25 [particle] makes optimization easier
15:25 fglock sure
15:26 fglock you'd probably transform kp6AST to PAST, and then write the emitter itself
15:28 fglock you'll probably skip the MetaClass transform, but the Hyper transform may be useful
15:31 fglock kp6 modules can be compiled with the mp6.pl script
15:32 fglock until the kp6-OO bootstrap is finished
15:32 Limbic_Region fglock - sorry, was AFK
15:33 Limbic_Region fglock - my understanding is that larry has retained existing functionality and said - but for those of you who would like to walk on the wild side - try this
15:33 fglock [particle]: it's even possible that kp6 be bootstrapped in parrot instead :)
15:34 [particle] that's an interesting thought
15:35 vex_ joined perl6
15:35 Limbic_Region fglock - and luqui is saying, the extra bit is nice but could cause problems for those who do
15:35 Limbic_Region fglock - and luqui is saying, the extra bit is nice but could cause problems for those who do
15:35 Limbic_Region grrr - I apologize if I just flooded the channel
15:38 fglock hmm
15:38 [particle] luqui says the optimization may cause unintended semantic differences
15:39 [particle] just by refactoring
15:39 Limbic_Region particle - but only if you use the feature
15:39 [particle] yes, precisely
15:40 Limbic_Region particle - what I am trying to confirm to myself is that existing functionality exists (albeit less optimized) and whackoness only results if you use the new feature
15:40 [particle] since the feature hasn't been implemented, it's hard for me to judge real-world usage and by extension real-world consequences
15:41 [particle] lr: that's correct
15:42 Limbic_Region ok, well then I don't think it matters much
15:42 fglock Limbic_Region: the existing functionality is with <%terms> - the main difference is that the definition of what's a token is not automatic
15:42 Limbic_Region or rather, I think the weirdness issue can be worked out in a parallel stream
15:43 [particle] we're talking about eg. %foo || %bar vs %foo | %bar
15:43 [particle] the first tries all keys of %foo, and if none match, proceeds to %bar
15:43 fglock in luqui's example, the definition of 'token' changes with the reafactoring
15:44 theorbtwo joined perl6
15:44 fglock refactoring
15:45 fglock but that's specced behaviour - the problem is, is it too unexpected
15:45 [particle] i think luqui's example is one where there is a side effect
15:46 [particle] so it's no longer a "token pattern" as larry defines it
15:46 [particle] so, yes, his refactor did change semantics
15:46 [particle] (due to the closure and fail call)
15:48 [particle] i'm not 100% sure of that, but that's my take
15:50 fglock I don't see a problem with the specification - you can fix that by using ||
15:50 Limbic_Region one of these days I am going to stop hiding under a rock and learn enough of this stuff to understand it for myself
15:50 fglock the problem is, will this create new hard-to-find errors
15:50 Limbic_Region fglock - that's what I understood too
15:51 [particle] fglock: the problem really lies with @a | @b, not with $a | $b which can be trivially fixed with ||
15:52 [particle] since it changes the search order for longest token
15:52 [particle] @a || @b exhausts all members of @a before trying @b
15:52 lambdabot Maybe you meant: activity activity-full admin all-dicts arr ask . v
15:53 [particle] @a | @b combines the two (almost as if it was a junction)
15:54 fglock [particle]: you mean you want: { [|] ( *@a, *@b ) }
15:54 fglock actually, || + sort
15:54 fglock I'll take a while to write that expression :)
15:55 [particle] yes, the optimization is left as an implementation detail for folks like us :)
15:55 [particle] ...taming dragons...
15:57 fglock luqui's example wouldn't fail if all tokens were tried until one suceeded, just like || does
15:59 fglock the problem is, <float> actually succeeds
15:59 [particle] joined perl6
16:01 fglock so what would really fix the problem is backtracking on | - which is disabled by definition - | works on 'token', which is ratcheting
16:03 GabrielVieira joined perl6
16:04 [particle] i'm still not sure... it's not the first match, it's the longest, right?
16:05 [particle] so it exhaustively attempts all regexes in @a | @b and returns the longest
16:06 turrepurre joined perl6
16:09 fglock [particle]: it does a 'longest token' match, rather than a 'longest regex' - it stops if it finds a backtracking/separator spot - that's why <float> ands up being longer than <ip>
16:09 fglock s/ands/ends/
16:10 fglock the {...} in <byte> is one of those spots
16:11 [particle] yeah, that's right.
16:12 [particle] that's due to the side effect in the refactored byte token
16:12 [particle] which larry warns about in the synopsis
16:14 svnbot6 r15094 | audreyt++ | * si.hs: Add type signature and generally make it compile with GHC-trunk.
16:18 fglock audreyt: I'd like to do some brainstorming on kp6/6-on-6 sometime
16:23 svnbot6 r15095 | audreyt++ | * Pugs.Class: Transplant the relevant parts of si.hs into newVal.
16:27 Limbic_Region joined perl6
16:32 * fglock wishes there was an @fglock
16:34 TimToady me too, but at the moment I'm wishing more for coffee...
16:36 fglock mp6-on-VHDL would be nice to play at home
16:42 svnbot6 r15096 | audreyt++ | * Pugs.Val: Make ICoercible a superclass of Boxable, and
16:42 svnbot6 r15096 | audreyt++ |   introduce PureStr (Str in userland) as the first MO'ed class.
16:47 ozo_ joined perl6
17:06 TimToady I think we need to figure out a way of explicitly telling the longest token analyzer that certain kinds of closure can be deferred till the end of DFA matching.  This includes both assertions and all those { say... } things fglock has scattered around the grammar
17:07 DoctorMach joined perl6
17:07 b_jonas joined perl6
17:09 TimToady the trick is to provide the closure with the same context later, which might force a reparse to get that context.
17:10 TimToady then if the delayed closures fail, you back off to the next longest DFA match and see if it needs any delayed testing...
17:11 [particle] it's starting to sound less optimized
17:11 TimToady only if you throw in closures
17:12 TimToady assertion closures, that is
17:12 TimToady result closures would still be "showstoppers"
17:12 DoctorMach left perl6
17:12 [particle] so you'd need to classify which ops are safe
17:13 [particle] (or perhaps the unsafe list is shorter)
17:14 fglock it's kind of parallel-backtracking
17:15 TimToady in particular, the canonical way to write an assertion is not { fail if ... } but rather <?{...}>, so we could make the latter invisible to DFA snarfing
17:16 TimToady and then if you want to insert debugging you can use <?{ say "got here" }>
17:16 TimToady assuming say returns true :)
17:17 TimToady ?eval say "Goodnight, Gracie."
17:17 TimToady assuming it returns at all...
17:17 [particle] :)
17:17 evalbot_r15093 is now known as evalbot_r15095
17:17 evalbot_r15095 OUTPUT[Goodnight, Gracie.␤] Bool::True
17:19 TimToady another candidate for okayness is **{n..m}
17:19 TimToady at least where n and m are known to be constants at compile time
17:20 [particle] will **{*} parse?
17:20 TimToady yes, but don't know if ** will know what to do with Whatever
17:20 TimToady it's looking for a Range
17:21 TimToady but could likely be taught to deal with it.
17:21 TimToady or not
17:21 [particle] i figured it'd become *
17:21 TimToady force people to either write * or **{0..*}
17:21 [particle] i guess **{^*} would work
17:21 TimToady uh, yeah, what he said
17:22 TimToady but that's just *
17:22 [particle] yes. i wasn't aware **{...} was expecting Range
17:22 [particle] so, **{3} isn't valid?
17:22 TimToady however if you wanted **{$x}, then $x could contain ^*
17:22 TimToady yes it is, but
17:22 TimToady it means 3..3
17:22 penk joined perl6
17:22 TimToady what does **{*..*} mean?
17:22 [particle] and * doesn't mean *..*
17:23 [particle] it's just a smiley whatever
17:23 TimToady it's the koala range
17:23 TimToady it matches anything that is Ordered, I think
17:23 [particle] ooh, tricky.
17:28 TimToady of course, matching against Ordered woudl be clearer
17:30 [particle] i want line noise, like perl 5
17:31 [particle] <'{*..*}'>**{*..*}
17:32 [particle] would that match an empty string?
17:33 Juerd I think it would match any number of "{*..*}" sequences
17:34 [particle] meetoo.
17:35 TimToady joined perl6
17:38 b_jonas it could be **{{1}} if the closure {1} matches anything
17:39 b_jonas or does it only accept ranges?
17:40 Juerd IIRC it accepts any code block, in list context.
17:41 TimToady doesn't need list context
17:41 TimToady .. works fine in scalar context
17:41 [particle] S05: The curlies are taken to be a closure returning an Int or a Range object.
17:41 Juerd TimToady: But the closure was in list context, right?
17:41 Juerd Oh, object.
17:41 Juerd Hm. Too bad.
17:41 Juerd a**{@foo}
17:41 TimToady well, it could be generalized to Selector
17:42 Juerd Not that I can think of a good use for **{@foo} right now, but someone will.
17:42 [particle] **{1,3} could be useful
17:42 TimToady a**{any(@foo)} maybe
17:42 TimToady NO!
17:43 TimToady that's a typo!
17:43 [particle] i know it doesn't parse
17:43 Juerd Why wouldn't it parse?
17:43 [particle] but **{1..3:by(2)} # or whatever
17:43 TimToady because we force it to not parser, I hope
17:43 TimToady *parse
17:43 weinig|zZz is now known as weinig
17:43 [particle] It is illegal to return a list, so this easy mistake fails:     / [foo]**{1,3} /
17:43 b_jonas **{1,3} should warn or die because people used to the old syntax could write it
17:44 b_jonas yeah
17:44 TimToady but they could also mean any(1,3), in which case they should write that.
17:44 Juerd TimToady: Even under "no v5; use v6 :all_of_it;"?
17:44 [particle] any() returns Range?
17:44 TimToady I can't be accountable for every dialect of Perl 6...
17:45 buetow joined perl6
17:45 TimToady no, a Junction
17:45 Juerd I think it's great to help beginning migrators, but after a few years those Perl 5-based parse errors will just get annoying
17:45 TimToady but that's a valid Selector
17:45 [particle] ok, you've gone with the abstraction route already
17:45 TimToady for you, but not for the people that waited ten years to switch...
17:46 Juerd TimToady: Hence a pragma
17:46 TimToady I think the error is "Selector 1,3 can never match scalar count"
17:46 TimToady or some such
17:46 b_jonas Juerd: that's true for =~ but {1,3} isn't just perl5 based, it's much older
17:46 Juerd TimToady: Not "Selector expected, got List, at - line -"?
17:47 TimToady List is a valid selector, if you happen to want to match against another list
17:47 Juerd Oh
17:47 TimToady Selector is anything that is a Pattern, plus Junctions
17:47 TimToady Pattern is anything that you can use on the right of ~~
17:48 b_jonas even if it was valid, it could cause a warning that you could avoid with some easy change like **{(1,3)} or something
17:48 Juerd You can put anything on the right of ~~, I thought.
17:48 TimToady but if we can warn that 42 ~~ (1,3) can never match...
17:48 [particle] **{1|3}
17:48 Juerd b_jonas: I'm against such workarounds.
17:48 TimToady 1|3 would be fine under the Selector view
17:49 Juerd TimToady: I guess I should read the new smart match stuff.
17:49 TimToady well, I wrote it for a reason.  :)
17:49 [particle] the problem is that so many prior implementations got it wrong
17:49 b_jonas what? it can never match? you can't write 'when 1, 3' then?
17:49 Juerd I didn't know it'd also be relevant to **{} (which still kills my fingers)
17:49 TimToady sure, if you want to match a list [1,3]
17:50 b_jonas so you have to write 'when 1|3' to match either of two things?
17:50 TimToady no, you get to write that
17:51 Tene joined perl6
17:51 Ziggy6 r15096 doesn't compile for me
17:51 Limbic_Region joined perl6
17:51 Ziggy6 r15095 works fine
17:52 [particle] svn diff -c 15096
17:52 b_jonas well 1|3 isn't so bad in fact
17:53 b_jonas well I'll go back to developping cbstream now instead of thinking about perl6
17:53 TimToady have the appropriate amount of fun
17:53 b_jonas thanks
17:55 [particle] my, my, more comments about lexical redeclaration
17:58 pasteling "evalbot_r15095" at 194.145.200.126 pasted "Pugs build failure" (500 lines, 29.7K) at http://sial.org/pbot/22510
18:13 justatheory joined perl6
18:19 ozo_ joined perl6
18:21 TimToady yeah, looks like audreyt broke the build.  maybe something that works under 6.7 but not 6.6?
18:22 TimToady do we have any MO experts online at the moment?
18:25 Ziggy6 i think it's related to the ghc version
18:26 Ziggy6 the error doesn't seem to connect in any meaningfull way to the code changes
18:27 * allbery_b svn ups and pokes, having both 6.6 and (a couple week old) 6.7 around
18:33 weinig is now known as weinig|bbl
18:34 * allbery_b doesn't think that error should happen, unless something's wonked in a makefile somewhere so MO/Base.hi is in the wrong place
18:34 allbery_b I'm regenning makefiles now so I can try to check
18:35 Ziggy6 ./configure again?
18:36 allbery_b haven't done a build, I'm working off of evalbot's report
18:36 allbery_b just running Makefile.PL now, having svn up-d
18:36 xinming joined perl6
18:36 allbery_b if I do a build it';ll be a while (G4 macmini :> )
18:40 mdiep joined perl6
18:41 ashelyb_ joined perl6
18:50 allbery_b blargh.  not seeing anything, although I'd guess the need for MO/Base.hi dep came from Pugs.Class being added by the patch
18:50 allbery_b running build now, with -v hacked in
18:51 beppu_ joined perl6
18:51 allbery_b (I expect this to take a while...)
18:52 allbery_b if I don't see anything I'll "make clean" andretry with 6.7, still with -v, to see what changes in the build
18:52 allbery_b but that's likely to require a coupel hours on aggregate
18:52 allbery_b would be faster if audreyt were around to do it, of course
18:55 TimToady_ joined perl6
18:55 mdiep joined perl6
19:01 TimToady_ is now known as TimToady
19:05 allbery_b 55/106...
19:06 codermattie joined perl6
19:10 audreyt fixing.
19:10 lambdabot audreyt: You have 9 new messages. '/msg lambdabot @messages' to read them.
19:10 audreyt Pugs.cabal.in needs new entries; sorry.
19:11 allbery_b ah
19:11 * allbery_b aborts sloooow build
19:11 codermattie is there a parrot specific channel ? or is this an appropriate forum for a parrot question ?
19:13 allbery_b there's at least one parrot dev who hangs out here
19:13 svnbot6 r15097 | audreyt++ | * Pugs.cabal.in: Add MO to the build tree to unbreak the build.
19:13 audreyt codermattie: irc.perl.org #parrot
19:13 codermattie thanks
19:14 [particle] codermattie: i can answer parrot questions, but audreyt pointed you to our channel
19:14 [particle] audreyt: happy new year!
19:14 audreyt [particle]: happy new year, and congrats on the progress & release!
19:14 [particle] thanks!
19:15 audreyt [particle]++ # seriously
19:15 [particle] we could really use some c coders. languages are progressing, but without leo & chip lately, parrot core has suffered
19:16 Ziggy6 what does "nick++" mean?
19:16 diakopter Ziggy6++
19:16 [particle] karma [particle]
19:16 jabbot [particle]: [particle] has neutral karma
19:16 codermattie [particle], I was stuck in a dialog to add the irc server, the question is how to run pheme, is there a POD or faq on how to run a language on parrot ?
19:16 diakopter karma Ziggy6
19:16 jabbot diakopter: Ziggy6 has karma of 1
19:17 [particle] codermattie: have you built pheme?
19:17 Ziggy6 nice :)
19:17 [particle] karma particle
19:17 jabbot [particle]: particle has karma of 34
19:17 [particle] hrmm, doesn't like my brackets, i suspect
19:17 * audreyt ponders about reduced particles
19:17 codermattie [particle], I have parrot installed, other than that I know very little
19:18 audreyt bbl, sleep :) &
19:18 svnbot6 r15098 | audreyt++ | * Makefile.PL: Add MO to clean_files
19:18 [particle] codermattie: best to join #parrot if you can, don't wanna chatter off topic too much here
19:18 codermattie [particle], ok , will do
19:19 [particle] but cd languages/pheme && make && make test
19:19 [particle] then ../../parrot pheme.pbc <your_file_here>
19:21 Ziggy6 karma audreyt
19:21 jabbot Ziggy6: audreyt has karma of 2787
19:21 pasteling "evalbot_r15097" at 194.145.200.126 pasted "Pugs build failure" (399 lines, 23.3K) at http://sial.org/pbot/22511
19:24 svnbot6 r15099 | audreyt++ | * Pugs.cabal.in: Add Pugs.Class to build list.
19:35 beppu_ joined perl6
19:35 svnbot6 r15100 | audreyt++ | * Unbreak the build For Real(tm) by adding the missing Pugs.Class.C3
19:35 svnbot6 r15100 | audreyt++ |   to Pugs.cabal.in.
19:37 fglock will p6 classes be 'Show, Eq, Ord, Data, Typeable' like Haskell's?
19:38 fglock ie, follow the same class hierarchy
19:38 audreyt no, Haskell's typeclasses are Perl6 Roles
19:38 [particle] however, a class is autogenerated from a role if requested by name
19:38 fglock what's a good link for role x class differences?
19:39 audreyt for example, Ord in Haskell is more or less equiv to Perl6's Ordered role
19:39 audreyt [particle]: and, if I recall correctly, vice versa
19:39 audreyt fglock: well, S12 obviously...
19:39 [particle] roles are compile time only. they're composition units.
19:39 audreyt the basic difference is that roles don't have an idea of SUPER that you can call into
19:39 audreyt at runtime
19:40 audreyt so they are used compositionally, not with inheritance, and they cause compile-time error when you have two roles with overlapping methods
19:40 audreyt s/have two roles/mix in two roles/
19:40 [particle] we're considering role-based class composition for parrot
19:40 audreyt otherwise they're the same
19:42 fglock ok - so roles can be optimized more easily, and can be tested at compile-time
19:42 PerlJam [particle]: What would that look like?  (Is there some docs/code/whatever in the parrot tree?)
19:42 [particle] role A { method a() {...} }; role B { method a() }; class Foo does A does B { ... } # error
19:42 audreyt correct.
19:43 [particle] pj: it's in idea form only. there's been recorded discussion, but the pdd draft hasn't been written yet (no time)
19:43 PerlJam gotcha
19:43 * PerlJam idly wonders how many perl6 concepts can be pushed down to parrot-land before the parrot bursts  ;-)
19:44 audreyt what does "cat" (or the Cat type) stand for?
19:44 audreyt catenate?
19:44 PerlJam audreyt: that would be my guess.
19:44 audreyt or concatenate? ;)
19:45 allbery_b that was what larry seemed to be up to, yeh.  /bin/cat :)
19:45 audreyt and what would happen to
19:45 audreyt %cats\   .{'fluffy'} = Cat.new;
19:45 audreyt and other Cat in S* examples?
19:45 audreyt shouldn't animated strings be called Snakes?
19:46 audreyt </troll>
19:46 audreyt it's confusing to see two Cat in examples that means different things, though.
19:47 * audreyt ponders if "Stream" would be a better name. but then... coding > ergonomics
19:47 * audreyt goes back sleephacking
19:48 PerlJam The PDL folks have cat and dog operators that are used to join and unjoin piddles.
19:48 fglock starting 2 days offline...
19:48 [particle] fglock: enjoy the silence
19:48 audreyt fglock: have fun offlining
19:48 audreyt I'll backlog kp6 stuff meanwhile
19:49 weinig|bbl is now known as weinig
19:49 audreyt (having done Syn and mailing list backlogging)
19:49 audreyt bbl &
19:49 allbery_b <audreyt> shouldn't animated strings be called Snakes?
19:49 allbery_b only if there's a Planbe class somewhere :)
19:50 allbery_b *Plane
19:50 kolibrie fglock: happy weekend
19:54 fglock thanks :)
19:54 fglock &
19:55 spx2 joined perl6
20:15 autark joined perl6
20:18 luqui joined perl6
20:18 svnbot6 r15101 | audreyt++ | * pick.t and capture.t - unTODO passing tests
20:20 lampus joined perl6
20:22 codermattie left perl6
20:27 spoop joined perl6
20:29 beppu_ joined perl6
20:33 weinig is now known as weinig|bbl
20:39 autark_ joined perl6
20:55 autark__ joined perl6
20:56 beppu_ joined perl6
21:02 autark joined perl6
21:07 autark___ joined perl6
21:18 kolibrie I just ran into a difficulty while trying to refactor a regex into subrules
21:18 pasteling "kolibrie" at 66.239.158.2 pasted "refactoring capturing regexes" (41 lines, 1.2K) at http://sial.org/pbot/22513
21:18 kolibrie fglock is not around, but perhaps someone else can shed some insight
21:23 [particle] try { $/ = $/.name_first_last() }
21:23 [particle] the closure is perl6 code, right?
21:23 kolibrie yes
21:24 [particle] so use p6 syntax, not regex syntax
21:24 [particle] er, method syntax
21:25 [particle] hrmm, i suppose it shouldn't matter
21:25 luqui $/ := <name_first_last> ?
21:27 [particle] $<name_first_last> := <name_first_last> ??
21:28 Aankhen`` joined perl6
21:29 kolibrie [particle]: method syntax did not work, at least under v6.pm
21:29 kolibrie luqui: that seems like it should work, but then my regex didn't match at all
21:29 [particle] http://dev.perl.org/perl6/doc/design/syn/S05.html#Named_scalar_aliasing_to_subrules
21:29 lambdabot Title: Synopsis 5: Regexes and Rules - perl6:, http://tinyurl.com/mqbs8
21:35 kolibrie well, with [particle]++ and luqui++ 's suggestions, I managed to get this to work:
21:35 kolibrie $<name> := <name_first_last>
21:35 kolibrie { $/ = $<name> if $<name>; return ::Name(...) }
21:36 luqui yuck.  I expect some of that is due to bugs :-)
21:36 kolibrie probably
21:36 kolibrie I hope that your initial example is what should work
21:37 beppu_ joined perl6
21:38 GabrielVieira2 joined perl6
21:46 GabrielVieira joined perl6
21:50 weinig|bbl is now known as weinig
21:50 larsen_ joined perl6
22:10 as joined perl6
22:10 as joined perl6
22:15 iblechbot_ joined perl6
22:34 ingy [particle]: ping
23:10 Limbic_Region joined perl6
23:15 jferrero joined perl6
23:16 ashleyb joined perl6
23:18 Limbic_Region are the warnings issued when compiling Pugs.Var.Base known and acceptable or should I nopaste?
23:18 beppu_ joined perl6
23:25 Psyche^ joined perl6
23:40 ashleyb left perl6
23:41 ashleyb joined perl6
23:41 Psyche^ is now known as Patterner
23:42 ashleyb joined perl6
23:59 beppu_ joined perl6

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

Perl 6 | Reference Documentation | Rakudo