Camelia, the Perl 6 bug

IRC log for #parrot, 2010-08-08

Parrot | source cross referenced

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

All times shown according to UTC.

Time Nick Message
00:00 Austin PTG, That's essentially a language on top of a language. It's possible, but presently awkward to do that in a single program.
00:01 plobsing in that case it should be relatively simple - stick a macro step before the parse step. HLLCompiler has support for configuring compilation steps.
00:03 Paul_the_Greek Each step is performed at what granularity?
00:04 Austin A pass over the current input text, or tree, or whatever.
00:04 plobsing right now, I'm pretty sure it's whole-file. I think there was some talk about changing that.
00:05 Paul_the_Greek So the lexing step is performed on the entire file before a macro step could look at it?
00:05 Austin Right
00:06 Austin Hence, "presently awkward"
00:06 Paul_the_Greek In particular, the lexer's behavior cannot be altered by anything in the source, such as a pragma.
00:07 Austin False.
00:07 Paul_the_Greek Ah, please explain.
00:07 Austin There is no lexer. There is a parse step which does both.
00:07 Paul_the_Greek Ah. But then what does it mean to put a macro step before the parser step?
00:08 Austin There is no reason a pragma could not modify the behavior.
00:08 Paul_the_Greek Yes, the pragmas are fine. But I don't get the macro step.
00:09 Austin Imagine something like #define f(x)   g(h(x))
00:10 Paul_the_Greek Okay.
00:10 Austin For most parsers, if you encounter f(x) you're going to convert that to a tree, like (call name='f' args=[ (var name='x') ] )
00:11 Austin But suddenly, that's wrong.
00:11 Austin You want to either (1) perform a textual replacement (c preprocessor) or (2) perform a tree replacement (lisp)
00:12 Austin And of course, x could be arbitrarily complex.
00:12 Austin There's lots of things that make this awkward. If you have some kind of error, what's the line #?
00:13 Austin How do you do scope resolution?
00:13 Austin Things like that.
00:13 purl things like that are unusual
00:14 Paul_the_Greek So how does the macro step work before the parse step?
00:14 Austin Right now, the "simplest" answer - in the sense of "I can describe this to you simply" is to parse as much as you possibly can, then stop (different step) and perform the edits indicated by your macros, then start again (new step)
00:15 Austin For a preprocessor, that would be pretty much exactly like the old-style description of a preprocessor - a separate program that rewrites the text before the "real" compiler sees it.
00:15 Paul_the_Greek Right, but let's say I have something much more complex, which includes, for example, the ability to evaluate arbitrary expressions.
00:16 mikehh rakudo (fca2d32) builds on parrot r48342 - make test PASS, make stresstest (pugs r31921) FAIL - Ubuntu 10.04 amd64 (g++ with --optimize)
00:16 mikehh t/spec/S03-smartmatch/any-bool.t - No subtests run
00:16 mikehh t/spec/S05-mass/rx.rakudo - Failed tests:  91, 206-210
00:16 Paul_the_Greek It makes sense to put that between the lexer and the parser.
00:17 Paul_the_Greek I guess I could do it all as a preprocessing step.
00:17 Paul_the_Greek But it would need its own lexer.
00:17 Austin Well, then, you've already assumed an extra step - lexer vs. parser.
00:17 Austin Then you've got a third - macro - between them.
00:18 mikehh oh forgot to report: All tests PASS (pre/post-config, make corevm/make coretest, test, fulltest) at r48342 - Ubuntu 10.04 amd64 (g++ with --optimize)
00:18 Austin So you write a "parser" that does lexing. And then a macro whatever. And then a parser.
00:18 Paul_the_Greek Right, that's how I've organized it.
00:18 Paul_the_Greek An interface between the lexer and the parser.
00:19 Paul_the_Greek The lexer needs only a little more capability and the parser needs nothing.
00:20 Paul_the_Greek But it certainly does make them two things instead of one.
00:26 mikehh partcl-nqp(ae8abf9) builds on parrot r48342 - make test PASS - Ubuntu 10.04 amd64 (g++ with --optimize)
00:26 mikehh t/cmd_expr.t - TODO passed:   287
00:28 Austin purl?
00:28 purl yes, Austin?
00:28 Austin purl, purl?
00:28 purl rumour has it i am an endearing annoyance. or like the MST of bots
00:29 Austin purl is also lonely (see http://xkcd.org/175)
00:29 purl okay, Austin.
00:29 Austin purl, purl?
00:29 purl rumour has it i am an endearing annoyance. or like the MST of bots. or lonely (see http://xkcd.org/175)
00:33 Paul_the_Greek bite me purl
00:33 Paul_the_Greek Oh, there's an opportunity lost.
00:36 plobsing bite me?
00:36 Austin purl, bite me is <reply> suck it, $who.
00:36 purl OK, Austin.
00:55 Paul_the_Greek Take care, folks.
00:58 Andy joined #parrot
00:59 somebody__ joined #parrot
01:37 rurban_ joined #parrot
02:11 bacek joined #parrot
02:12 dalek tree-optimization: 2cc3e32 | tcurtis++ | src/Tree/Optimizer.nqp:
02:12 dalek tree-optimization: Add Tree::Optimizer.pass-class method.
02:12 dalek tree-optimization: review: http://github.com/ekiru/tree-optimization/com​mit/2cc3e32c73199dfa9adaaccd261a256ec8836691
02:12 dalek tree-optimization: 34eb267 | tcurtis++ | src/Tree/Optimizer/Pass.nqp:
02:12 dalek tree-optimization: Add Tree::Optimizer::Pass.transformer-class method to simplify subclassing.
02:12 dalek tree-optimization: review: http://github.com/ekiru/tree-optimization/com​mit/34eb2678348c7e6bf154c31b698c3af83db3517b
02:19 aloha joined #parrot
02:22 bacek joined #parrot
02:42 janus joined #parrot
02:43 dalek tree-optimization: 91e9a41 | tcurtis++ | src/Tree/Optimizer/CombinedPass.nqp:
02:43 dalek tree-optimization: Give Tree::Optimizer::CombinedPass the transformer-class treatment.
02:43 dalek tree-optimization: review: http://github.com/ekiru/tree-optimization/com​mit/91e9a41ed009904cc432a483d46d245fd1345127
02:49 Austin seen Coke?
02:49 purl Coke was last seen on #parrot 3 hours, 6 minutes and 29 seconds ago, saying: that sort of information is much more important on tickets that are not currently being worked on.
02:50 Austin msg Coke I notice that config_lib.pir has a ["perl"] variable, but also the ["cat"] entry references $(PERL) - uppercase. Should these two things be consistent?
02:50 purl Message for coke stored.
02:51 somebody__ joined #parrot
03:00 theory joined #parrot
03:23 Andy joined #parrot
03:42 somebody_ joined #parrot
04:56 cotto ~~
05:07 Coke Austin: ISTR we went through and updated all those to avoid the makefile references.
05:19 Austin Coke: Apparently not. This is on windows w/ strawberry perl gcc utils, in trunk as of y-day
06:12 jsut_ joined #parrot
06:32 robin-gvx joined #parrot
06:58 robin-gvx joined #parrot
07:02 Casan joined #parrot
07:28 fperrad joined #parrot
07:40 Coke joined #parrot
07:46 aloha joined #parrot
07:47 jjore joined #parrot
07:51 cotto joined #parrot
07:57 bacek joined #parrot
09:37 rurban_ joined #parrot
11:21 desertm4x joined #parrot
11:31 dalek rakudo: 7d4a624 | moritz++ | build/PARROT_REVISION:
11:31 dalek rakudo: bump PARROT_REVISION to get Digest::MD5 fix, cosimo++
11:31 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/7​d4a62427ea16d6f2c4b864cf9dcaf89c51a7487
11:31 dalek rakudo: 53ee804 | moritz++ | docs/compiler_overview.pod:
11:31 dalek rakudo: [docs] update NQP description in compiler_overview.pod
11:31 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/5​3ee804b675f51c02d952ae1639bc2231c2fb96c
12:20 whiteknight joined #parrot
13:20 kid51 joined #parrot
13:23 clinton joined #parrot
13:27 mak joined #parrot
13:27 kid51 mikehh ping
13:27 mak hi
13:27 purl hi, mak.
13:28 mak is awk implemented on parrot?
13:28 kid51 mak:  I don't think so.  Somewhere (wiki?) there is a list of languages which people have attempted at one point or another to implement.
13:29 mak http://parrot.org/languages here?
13:29 kid51 That would be useful.
13:29 mak awk is not there on that list
13:29 kid51 Then no one has attempted it.
13:30 kid51 I believe there is a TT open stating that that page is very much out-of-date
13:31 kid51 msg mikehh Could you comment on my last post in http://trac.parrot.org/parrot/ticket/1726 ? Thanks.
13:31 purl Message for mikehh stored.
13:31 mak I started with trying to understand rakudo, figured that can't learn it without nqp-rx... theres not much documentation on that...
13:33 TiMBuS personally i found learning PIR was more useful to understand rakudo
13:34 mak TimBus, yes ultimately it comes down to that ... :)
13:34 mak especially if the documentation is scanty
13:35 TiMBuS there was an old tutorial on using NQP in actions.pm which is still sort of relevant
13:36 mak in the rakudo repo?
13:36 TiMBuS nope, it was something many languages used
13:36 TiMBuS the squaak tutorial is what you want
13:36 mak ok
13:36 TiMBuS but ignor the grammars and stuff. you just want to know about making an AST
13:37 mak http://docs.parrot.org/parrot/​latest/html/PCT_Tutorial.html this one?
13:38 TiMBuS that's it
13:38 mak Actually contributing rakudo will require a good touch over nqp and pir
13:39 mak *contributing to rakudo
13:41 TiMBuS not always! sometimes if you just skim the RT there's loads of things that just need implementing or fixing in just perl6 code
13:41 TiMBuS so if you like to learn by doing, that helps a lot
13:42 TiMBuS src/core is where you'll find perl6 code for a lot of builtins and objects
13:42 mikehh kid51: pong
13:42 dalek TT #1715 closed by jkeenan++: pprof2cg.pl not installed
13:42 dalek TT #1715: http://trac.parrot.org/parrot/ticket/1715
13:43 mikehh kid51: kid51: saw your message = was dion' some testring - sorry for the delay
13:55 kid51 mikehh If you can post a thought or 2 in that ticket ...
13:55 kid51 have to go afk in a minute
13:55 mikehh kid51: done
14:14 ambs joined #parrot
14:42 jan joined #parrot
14:56 brianwisti joined #parrot
15:44 theory joined #parrot
15:50 desertm4x joined #parrot
16:15 macroron joined #parrot
16:24 PacoLinux joined #parrot
16:29 dalek parrot: r48343 | jkeenan++ | branches/tt1726_pmc_pod:
16:29 dalek parrot: Creating tt1726_pmc_pod in �https://svn.parrot.org/parrot/branches
16:29 dalek parrot: review: http://trac.parrot.org/parrot/changeset/48343/
16:29 dalek parrot: r48344 | jkeenan++ | tags/tt1726_pmc_pod-48342:
16:29 dalek parrot: Tagging trunk at r48342 so that the tt1726_pmc_pod can later be synched to it.
16:29 dalek parrot: review: http://trac.parrot.org/parrot/changeset/48344/
16:34 * Coke wonders why we add more tests to enforce boilerplate docs.
16:34 Coke time better spent /writing docs/
16:35 Coke (yes, yes, time not fungible.)
16:45 brianwisti joined #parrot
16:45 dalek parrot: r48345 | khairul++ | branches/gsoc_instrument/runt​ime/parrot/library/Instrument (4 files):
16:46 dalek parrot: Updated Instrument runtime libraries.
16:46 dalek parrot: review: http://trac.parrot.org/parrot/changeset/48345/
16:46 dalek parrot: r48346 | khairul++ | branches/gsoc_instrument/src/dynpmc (6 files):
16:46 dalek parrot: Please codetest (mostly)
16:46 dalek parrot: review: http://trac.parrot.org/parrot/changeset/48346/
16:46 dalek parrot: r48347 | khairul++ | branches/gsoc_instrument (5 files):
16:46 dalek parrot: Updated tests.
16:46 purl updated tests are at the same url, 01_request.t and 02_keepalive.t
16:46 dalek parrot: review: http://trac.parrot.org/parrot/changeset/48347/
16:46 dalek parrot: r48348 | khairul++ | branches/gsoc_instrument (4 files):
16:46 dalek parrot: Updated stub generators and regenerated stubs.
16:46 dalek parrot: review: http://trac.parrot.org/parrot/changeset/48348/
16:46 dalek parrot: r48349 | khairul++ | branches/gsoc_instrument (7 files):
16:46 dalek parrot: deleted instrumentvtable.pmc (merged into instrumentclass.pmc)
16:46 dalek parrot: review: http://trac.parrot.org/parrot/changeset/48349/
17:03 dalek parrot: r48350 | jkeenan++ | branches/tt1726_pmc_pod (1 files):
17:03 dalek parrot: First draft of a codingstd file testing for the presence of POD in .pmc files.   This first draft follows approach taken in c_function_docs.t.  Detects 3 files lacking POD not detected by tools/build/headerizer.pl.
17:03 dalek parrot: review: http://trac.parrot.org/parrot/changeset/48350/
17:37 rurban_ joined #parrot
18:18 desertm4x joined #parrot
18:20 desertm4x joined #parrot
18:42 lucian joined #parrot
19:02 AzureStone joined #parrot
20:07 smash joined #parrot
20:07 smash hello everyone
20:08 Austin Hello, smash
20:10 moritz o/
20:12 smash joined #parrot
20:16 lucian joined #parrot
20:23 perlite joined #parrot
20:26 cotto ~~
20:33 Austin Under what circumstances can a call to pir::get_hll_namespace with a key of 'ResizableStringArray' return a namespace first, and then return null?
20:52 Tene Austin: if you changed HLLs?
20:55 Austin Better'n any idea I've got, tene. Thanks
20:56 Austin But no, get_root_namespace [parrot::ResizableStringArray] returns null, too.
20:57 Tene Just to confirm, you *do* mean ['parrot';'ResizableStringArray'], yes?
20:57 whiteknight joined #parrot
20:57 Austin Yeah, just lazy
20:57 Tene I figured, just checking.
20:57 Austin %r = get_root_namespace ['parrot';'ResizableStringArray']
20:59 Austin So "obviously" I'm storing / destroying something into the RSA slot in the root namespace.
20:59 Tene That sounds reasonable.
20:59 Tene Doesn't sound obviously wrong, at least.
20:59 Austin And I am calling P6metaclass.register twice...
20:59 dalek partcl-nqp: f0c25ae | Coke++ |  (2 files):
20:59 dalek partcl-nqp: make [fileevent] actually check its channel arg.
20:59 dalek partcl-nqp: Fix logic bug in event type.
20:59 dalek partcl-nqp: review: http://github.com/partcl/partcl-nqp/commit​/f0c25aed266b21d4c66663be92d9a1fb8de07baf
20:59 dalek partcl-nqp: 7548f1a | Coke++ |  (37 files):
20:59 dalek partcl-nqp: Merge branch 'master' of github.com:partcl/partcl-nqp
20:59 dalek partcl-nqp: review: http://github.com/partcl/partcl-nqp/commit​/7548f1ab4f1fe292e8c3996466e32559ab9fe6e4
21:02 Austin We have a winner
21:02 purl you have your choice of the first, second, or third door. Or.. the box.
21:02 Austin the box?
21:02 purl the box is down, really down
21:02 Austin no, the box is <reply> okay, the box ... but first: chichi!
21:02 purl okay, Austin.
21:02 Austin the box?
21:02 purl the box is probably down, really down
21:03 Austin rats.
21:03 Austin That trick never works.
21:03 purl nothin' up my sleeve
21:03 Austin botsnack
21:03 purl thanks Austin :)
21:03 Austin Calling P6metaclass.register twice on the same name ('ReziableStringArray') destroys the namespace.
21:04 Austin Seems obvious to me, in retrospect.
21:04 Austin *ResizableStringArray
21:12 nopaste "Austin" at 192.168.1.3 pasted "This sucks" (40 lines) at http://nopaste.snit.ch/22627
21:13 Austin Of course, it turns out I already knew that:  TT#1481
21:14 Tene That's... unfortunate.
21:15 Tene That doesn't sound too difficult to fix, either.
21:16 Austin Presuming you can locate the problem, I guess not.
21:44 Chandon joined #parrot
21:47 Coke hurm. if I want to use P6Regexen in my NQP code, do I have to load anything?
21:58 Coke Regex::P6Regex::Compiler.compiler('stuff'); gives me a NPE.
21:59 Austin P6regex as different from nqp regex?
22:00 Coke Those would be fine.
22:00 Austin Then I don't think you need to load anything.
22:01 Coke haz you a sample?
22:01 Austin But outside a grammar, I haven't done it.
22:01 Austin Check the plumage source. I think they have a pattern replace sub
22:01 Austin that uses rexen
22:03 Austin http://gitorious.org/parrot-plumage/parrot-plumage​/blobs/master/src/lib/Plumage/NQPUtil.nqp#line353
22:03 Austin Here's a call: http://gitorious.org/parrot-plumage/parrot-pluma​ge/blobs/master/src/lib/Plumage/Util.nqp#line55
22:04 Coke plumage?
22:04 purl somebody said plumage was the future Parrot module ecosystem.  It will include tools to search metadata, handle dependencies, install modules, and so forth. The repository is at http://gitorious.org/parrot-plumage/parrot-plumage and the design docs are at https://trac.parrot.org/pa​rrot/wiki/ModuleEcosystem
22:04 Austin So inline regex looks like /foo/
22:04 Austin And match looks like $text ~~ $regex
22:09 Coke if you match with ~~, where's the match object?
22:10 Coke $/ ?
22:10 purl $/ is just one of those things that if you have to ask about it you probably shouldn't use it or if i am still doing join('',<STDIN>)
22:10 Austin my $match := $text ~~ $regex;
22:11 Austin while $match { @matches.push: $match;  $match := $match.CURSOR.parse($text, :rule($regex), :c($match.to)); }
22:11 Austin See the "all_matches" sub in my first link, above.
22:11 dafrito cotto ping
22:11 Austin (Please note: I don't really grok this stuff.)
22:13 Coke is the regex there a regex object or just a string containing a regexz?
22:14 Coke in my code, using my own regex subclass, I have to do a .compile() first.
22:14 Austin It's a regex
22:15 Coke e.g. http://github.com/partcl/partcl-nqp/blob/​master/src/Partcl/commands/string.pm#L372
22:16 Coke Austin: that is my question. how do I get that regex. =-) just a literal /foo/ ?
22:16 Austin If you do literal /foo/ you get a regex.
22:16 Austin Run parrot-nqp --target=pir on the nopaste, above.
22:17 nopaste "Austin" at 192.168.1.3 pasted "Regex resultant" (8 lines) at http://nopaste.snit.ch/22628
22:17 Austin You'll see something like this ^^ in the output. That sub $P16 is the compiled regex.
22:18 Coke Austin: ... I'm writing this in NQP, not pir.
22:18 Austin Right. And the pir I just nopasted was the compiled output of the nqp I nopasted above.
22:18 Austin My point is that the nqp statement ::   my $regex := /foo/;
22:18 Austin Stores a sub reference in $regex
22:18 Austin Not a string.
22:19 Austin Actually, it's a regex wrapping a sub reference.
22:19 pjcj joined #parrot
22:20 Austin So if you want to "compile a string to a regex" you'll want a Compiler.compile call.
22:20 Austin If you want to code a regex in line, you want /foo/
22:20 Coke Austin: ahhhh, thank you.
22:20 Coke I think I missed a nopaste in there somewhere. Thank you.
22:21 nopaste "Austin" at 192.168.1.3 pasted "Coke: have a look at this" (7 lines) at http://nopaste.snit.ch/22629
22:21 Austin My bad, the nopaste failed but I didn't see it.
22:23 Coke
22:23 Coke +1. familytime, but Austin++
22:36 kthakore Coke: hi
22:36 kthakore Coke: you left me a message?
22:56 whiteknight holyshit, did anybody else see that proposed proof that P != NP?
22:58 sorear I've lost count
22:58 sorear proposed proofs of P != NP are like patents for perpetual motion machines, every marginal mathematician-crank needs to write one
22:59 sorear O
22:59 sorear I'll pay attention *after* Clay doex
23:42 brianwisti joined #parrot
23:59 Psyche^ joined #parrot

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

Parrot | source cross referenced