Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2007-09-01

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 pugs_svnbot r17557 | sunnavy++ | supplemented the tests of the first position reserved pseudo-package names
00:02 pugs_svnbot diff: http://dev.pugscode.org/changeset/17557
00:02 lambdabot Title: Changeset 17557 - Pugs - Trac
00:15 finchely joined #perl6
00:37 TimToady_ joined #perl6
00:37 ubajas joined #perl6
01:15 tcubp joined #perl6
01:15 RetroJ joined #perl6
01:17 justatheory joined #perl6
01:20 RetroJ left #perl6
01:22 ubajas3 joined #perl6
01:23 tcubp joined #perl6
01:29 weinig joined #perl6
01:43 mncharity Fyi, http://www.perl.com/download.csp currently says "The developer's release of Perl is currently at version 5.9.4."  Which hasn't been true for almost 2 months now.  A symptom of O'Reilly switching to ruby?
01:43 lambdabot Title: Downloading the Latest Version of Perl
01:43 mncharity Rather interferes with testing for 5.10..
01:59 bjoern_ joined #perl6
02:00 bjoern_ Hi, I just built pugs on Win32; towards the end of the process, I got:
02:00 bjoern_ [[[
02:00 bjoern_ Linking pugs.exe.new ...
02:00 bjoern_ gcc: unrecognized option `-nologo'
02:00 bjoern_ gcc: unrecognized option `-GF'
02:00 bjoern_ gcc: unrecognized option `-Zi'
02:00 bjoern_ ]]]
02:00 bjoern_ it's trying to use MSVC++ options when calling GCC. I don't know why it would call gcc there, seems a bug to me.
02:01 bjoern_ (building from svn with the latest ghc installed, fwiw)
02:05 ubajas joined #perl6
02:48 ubajas3 joined #perl6
03:11 TimToady joined #perl6
03:15 jesjkl joined #perl6
03:15 jesjkl left #perl6
03:18 jesjkl joined #perl6
03:18 jesjkl left #perl6
03:34 ubajas joined #perl6
03:48 TimToady_ joined #perl6
04:04 weinig joined #perl6
04:11 kanru joined #perl6
04:14 justatheory joined #perl6
04:18 TimToady joined #perl6
04:19 ubajas3 joined #perl6
04:33 TimToady1 joined #perl6
04:33 agentzh joined #perl6
04:34 spinclad joined #perl6
04:44 TimToady_ joined #perl6
04:47 ZenMasterJG joined #perl6
04:53 ZenMasterJG left #perl6
05:08 TimToady joined #perl6
05:09 sunnavy seems TimToady doesn't have a stable line :-)
05:11 ubajas joined #perl6
05:15 Casan joined #perl6
05:18 agentzh joined #perl6
05:26 wolverian mncharity, better to report to them than to us here, probably.
05:35 TimToady_ joined #perl6
05:46 ubajas3 joined #perl6
05:48 jisom joined #perl6
05:49 rgs joined #perl6
05:52 devogon joined #perl6
05:52 lisppaste3 joined #perl6
06:18 ubajas joined #perl6
06:46 TimToady_ joined #perl6
07:02 ubajas3 joined #perl6
07:10 rgs joined #perl6
07:11 rgs joined #perl6
07:15 TimToady joined #perl6
07:16 meppl good morning
07:24 TimToady1 joined #perl6
07:38 fridim joined #perl6
07:41 Aankhen`` joined #perl6
07:45 ubajas joined #perl6
07:53 TimToady joined #perl6
07:53 nwc10 joined #perl6
08:18 ubajas3 joined #perl6
08:26 agentzh morning, meppl
08:29 TimToady_ joined #perl6
08:31 barney joined #perl6
08:59 masak joined #perl6
09:02 ubajas joined #perl6
09:06 masak good morning
09:06 iblechbot joined #perl6
09:12 masak I thought today I would do another excursion into pugs
09:12 masak see if I can satisfy a t/ test and maybe gain some more insight
09:13 masak of course, I won't be able to touch the big-picture stuff
09:14 masak but I imagine there are some small things which have succumbed to bit rot but which are easy to fix
09:18 Blwood_ joined #perl6
09:20 moritz_ probably there are ;)
09:20 TimToady joined #perl6
09:24 pugs_svnbot r17558 | moritz++ | t/var/var.t: one more smartlink, more needed
09:24 pugs_svnbot diff: http://dev.pugscode.org/changeset/17558
09:24 lambdabot Title: Changeset 17558 - Pugs - Trac
09:25 moritz_ sunnavy++ recently added a test in t/var/var.t about forbidden module names, that might be easy to whack into pugs
09:26 masak moritz_: thx for the tip
09:26 masak I'll look into it
09:26 * masak looks into it
09:31 charsbar_ joined #perl6
09:36 pugs_svnbot r17559 | moritz++ | t/statements/gather.t: added smartlink
09:36 pugs_svnbot diff: http://dev.pugscode.org/changeset/17559
09:37 lambdabot Title: Changeset 17559 - Pugs - Trac
09:37 ubajas3 joined #perl6
09:38 nwc10 left #perl6
09:39 pmurias joined #perl6
09:39 pmurias morning
09:39 masak pmurias: mornin'
09:40 masak moritz_: do you know what sunnavy++ meant by "out of scope name"?
09:40 masak I understand that they are taken
09:40 masak but what exactly does "out of scope" connote here?
09:51 moritz_ I don't know either
09:51 masak ok. I'll just treat them as forbidden
09:51 masak but I was a bit confused by the choice of words
09:53 moritz_ ?eval 'if {'; say $!
09:53 pugsbot_r17185 OUTPUT[␤] Bool::True
09:53 moritz_ #pugs ?eval 'if {'; say $@
09:53 exp_evalbot OUTPUT[*** ␤    Unexpected "@"␤    expecting "::"␤    at /tmp/VJzctjqJlR line 1, column 20␤]
09:54 moritz_ which variable holds eval() errors in p6?
09:55 explorer joined #perl6
10:01 pugs_svnbot r17560 | moritz++ | t/statements/unless.t: no else and elsif allowed in unless
10:01 pugs_svnbot diff: http://dev.pugscode.org/changeset/17560
10:01 lambdabot Title: Changeset 17560 - Pugs - Trac
10:14 ruoso joined #perl6
10:16 pugs_svnbot r17561 | ruoso++ | [kp6] (a flight delay never been so productive) new tests and several steps towards kp6 bootstrap
10:16 pugs_svnbot diff: http://dev.pugscode.org/changeset/17561
10:16 lambdabot Title: Changeset 17561 - Pugs - Trac
10:20 riffraff joined #perl6
10:20 ubajas joined #perl6
10:20 pmurias ruoso: hi
10:22 pugs_svnbot r17562 | masak++ | [src/Pugs/Eval.hs]
10:22 pugs_svnbot r17562 | masak++ | * forbade a few more namespaces
10:22 pugs_svnbot diff: http://dev.pugscode.org/changeset/17562
10:22 lambdabot Title: Changeset 17562 - Pugs - Trac
10:23 masak moritz_: you were right, it wasn't overly difficult
10:23 masak I had to battle the Haskell layout a little, that's all
10:25 ruoso pmurias, hi
10:27 ruoso pmurias, did you see the last changeset in the commit I made?
10:28 ruoso we (me and flavio) had a productive flight delay
10:28 ruoso the problem we were working on the hackathon is now solved
10:28 ruoso and some other nasty bugs too
10:30 pmurias yes, i have seen the changeset
10:32 chris2 joined #perl6
10:39 timbunce joined #perl6
10:40 pmurias haircut&
10:49 masak heh, writing Haskell is still a bit scary
10:49 masak I don't feel like an equal to GHC, as I do to perl or javac
10:50 moritz_ I don't even feel equal to perl
10:50 masak moritz_: why not?
10:50 moritz_ I don't understand most of typeglob magic for example
10:50 moritz_ but I know enough Perl to achieve what I want most of the time
10:50 masak not sure I do either
10:50 masak exactly
10:50 masak with ghc, my ignorance is more in my face
10:51 masak all the time
10:51 masak my main question is "will the type checker like this?"
10:51 moritz_ aye
10:51 moritz_ btw pugs still allows 'else' and 'elsif' blocks to 'unless'
10:52 masak I'm already on it :)
10:52 moritz_ that might be another thing that is not too hard to fix
10:52 moritz_ ok ;)
10:52 timbunce Hi. I'm trying to build pugs for the first time in ages and need a little help.
10:52 timbunce Does it work with ghc-6.6.1? (I had problems with it: Module `Control.Monad.RWS' does not export `MonadIO(..)')
10:52 timbunce Which others have encountered http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=427315
10:52 timbunce So now I'm trying ghc-6.6. But that's giving me a different problem (related to hsc2hs)
10:52 timbunce Which ghc would be best for me to work with?
10:52 lambdabot Title: #427315 - pugs: FTBFS: Module `Control.Monad.RWS' does not export `MonadIO(. ...
10:52 moritz_ ghc-6.6.1 is minimal requirement
10:52 masak timbunce: I'm using 6.6.1
10:53 timbunce So what's the cause/fix for that Control.Monad.RWS' does not export `MonadIO problem?
10:53 moritz_ I haven't encountered it yet
10:54 moritz_ I patched debian/* a bit and I usually build debian packages without problems
10:54 moritz_ on etch+self-backported ghc 6.6.1
10:55 ubajas3 joined #perl6
10:55 timbunce Perhaps it's because I'm using pugs rev 14410, which was the last I fetched. Is the current head reasonably stable?
10:55 moritz_ good question
10:56 moritz_ depends on your notion of "reasonable" ;)
10:57 timbunce :)
10:57 timbunce Reasonable relative to the last release? Reasonable to work with the pugs->perl5 interface?
10:57 pasteling "masak" at 130.238.204.78 pasted "I've made this patch to src/Pugs/Parser, but it was ineffective. any lambdacamel care to review it for me?" (20 lines, 1K) at http://sial.org/pbot/27230
10:58 timbunce Or perhaps just reasonable as in not broken.
10:58 moritz_ timbunce: I don't use the pugs->perl5 bridge very much, so I can't tell - sorry
10:59 timbunce I just need some sense of whether an 'svn update' right now will cause me more pain than gain.
10:59 timbunce I've not been following along
10:59 timbunce I've no sense of current actvity
11:00 moritz_ if you have ghc 6.6.1 it should't cause more pain
11:00 timbunce Thanks!
11:05 masak ok, thinking out loud here
11:05 masak Parser.hs seems to be the file I should change
11:06 devogon_ joined #perl6
11:06 masak it contains grammar stuff
11:06 masak if and unless are treated very similarly
11:06 masak which makes it a bit harder to distinguish them
11:07 masak I guess I could reshape the whole grammar to distinguish them
11:07 masak but I'm not sure I want that right now
11:08 masak instead, I want to detect the combination of an "unless" symbol and an "else" symbol" and fail on that
11:08 masak (oh, and "elsif" too)
11:16 masak seems that right now I'm not succeeding because I don't know enought about the parser and about matching in Haskell
11:17 moritz_ lunch etc. &
11:17 moritz_ masak: good luck ;)
11:19 masak moritz_: danke :)
11:22 pugs_svnbot r17563 | ruoso++ | [kp6/t/kp6/grammar/03] new failing test. token compilation.
11:22 pugs_svnbot diff: http://dev.pugscode.org/changeset/17563
11:22 lambdabot Title: Changeset 17563 - Pugs - Trac
11:28 pugs_svnbot r17564 | ruoso++ | [kp6] a new test, now isolated what is broken.
11:28 pugs_svnbot diff: http://dev.pugscode.org/changeset/17564
11:28 lambdabot Title: Changeset 17564 - Pugs - Trac
11:30 masak src/Pugs/Parser.hs is a great read, btw
11:30 masak no worse than EBNF
11:30 timbunce r16464 built fine with ghc 6.6.1. Thanks.
11:31 masak timbunce: great
11:32 timbunce make -n install shows it wants to install into my perl installation, but the INSTALL file said "Do not set PREFIX to your Perl 5 installation dir, as that would overwrite some of the files there with their Pugs counterparts", so I'm puzzled.
11:32 timbunce I'm happy not to install if pugs is happy to work from the build dir.
11:33 masak it usually is
11:34 timbunce ok, thanks
11:34 masak and I agree that you should not set PREFIX to your Perl 5 installation
11:34 masak that sounds very dangerous for your Perl 5 installation
11:34 timbunce I didn't set PREFIX at all. Maybe that's the problem.
11:35 masak perhaps
11:35 masak usually I just go "make install"
11:35 masak but it's been a while, since I don't use pugs for production work right now
11:35 renormalist joined #perl6
11:35 timbunce Do you usually set PREFIX?
11:35 ubajas joined #perl6
11:41 pugs_svnbot r17565 | ruoso++ | [kp6] fixed a bug in Token. t/kp6/grammar/04 now passes. 03 still fails
11:41 pugs_svnbot diff: http://dev.pugscode.org/changeset/17565
11:41 lambdabot Title: Changeset 17565 - Pugs - Trac
11:48 masak timbunce: no, I've never done that
11:48 timbunce ok
11:50 Aankhen`` joined #perl6
11:51 pugs_svnbot r17566 | ruoso++ | [kp6] going a little further... now testing backtracking.
11:51 pugs_svnbot diff: http://dev.pugscode.org/changeset/17566
11:51 lambdabot Title: Changeset 17566 - Pugs - Trac
11:53 iblechbot joined #perl6
11:53 timbunce Should the pugs perl5:DBI example on wikipedia (http://en.wikipedia.org/wiki/Pugs#Perl_5_compatibility) still work?
11:53 timbunce I get an error:
11:53 timbunce *** Odd number of elements found where hash expected: VV 0x020933a4
11:53 timbunce at dbi.pl line 16, column 5-48
11:57 masak hm
11:57 masak timbunce: would you care to verify the error?
11:58 masak i.e. look at that place in the source code to see if it looks wrong
11:58 * masak is doing other coding right now
11:58 timbunce I copy-n-pasted it. The line is trivial: say "Just another $res<Audrey><Project> hacker";
11:59 timbunce how can I pretty-print $res?
11:59 masak all of it?
12:00 masak maybe `$res.perl.say`
12:00 timbunce Says: 0x02093398
12:00 timbunce not good
12:00 * masak raises eyebrows
12:00 masak that's strange
12:01 pmurias renormalist: hi
12:02 timbunce Can you point me to some tools that would help me dig deeper?
12:02 timbunce Like tracing pugs execution.
12:03 timbunce and where in the source code the perl5 glue is implemented
12:03 pmurias ruoso: it's not really backtracking
12:05 pmurias renormalist: did you get by messages?
12:06 ruoso pmurias, take a look at tests 03 and 04 inside grammar
12:09 pugs_svnbot r17567 | ruoso++ | trying to catch <before asdf> and <!before asdf>
12:09 pugs_svnbot diff: http://dev.pugscode.org/changeset/17567
12:09 lambdabot Title: Changeset 17567 - Pugs - Trac
12:09 fglock joined #perl6
12:09 fglock hi
12:09 lambdabot fglock: You have 1 new message. '/msg lambdabot @messages' to read it.
12:10 fglock renormalist: Num looks fine :)
12:10 ruoso fglock, hi
12:11 pmurias fglock: hi
12:11 ruoso fglock, take a look at teste 03 and 04 from grammar
12:12 fglock ok
12:12 ruoso I'm trying to catch the <before \d>
12:12 ruoso which doesn't seems to be implemented...
12:12 ruoso oops
12:12 ruoso just saw it
12:13 ruoso but it isn't working...
12:15 ruoso wait
12:15 ruoso it works ;)
12:15 ruoso it was mistyping
12:16 ruoso all tests pass again
12:16 ruoso :)
12:16 pugs_svnbot r17568 | ruoso++ | [kp6] "before" assertion tests now pass
12:16 pugs_svnbot diff: http://dev.pugscode.org/changeset/17568
12:16 lambdabot Title: Changeset 17568 - Pugs - Trac
12:18 Schwern joined #perl6
12:18 pugs_svnbot r17569 | fglock++ | [kp6] added 'make test_grammar' option
12:18 pugs_svnbot diff: http://dev.pugscode.org/changeset/17569
12:18 lambdabot Title: Changeset 17569 - Pugs - Trac
12:18 DarkWolf84 :continue modifer don't work :( in pugs
12:18 fglock run_tests.pl needs some fixing - it doesn't work with the 'section' option
12:19 fglock i'm trying to understand it
12:20 ruoso fglock, hmm
12:20 ruoso probably my fault
12:20 ruoso in the commit I made
12:20 polettix joined #perl6
12:20 ubajas3 joined #perl6
12:20 ruoso i had a conflict in that file
12:22 ruoso fglock, fixed
12:22 pugs_svnbot r17570 | ruoso++ | [kp6] fixing bad conflict resolution
12:22 pugs_svnbot diff: http://dev.pugscode.org/changeset/17570
12:22 lambdabot Title: Changeset 17570 - Pugs - Trac
12:23 ruoso fglock, better now
12:23 pugs_svnbot r17571 | ruoso++ | [kp6] $section works again in run_tests
12:23 pugs_svnbot diff: http://dev.pugscode.org/changeset/17571
12:23 lambdabot Title: Changeset 17571 - Pugs - Trac
12:25 pmurias all test pass here ;)
12:25 pmurias * tests
12:27 fglock ruoso: thanks
12:27 ruoso pmurias, not anymore... ;)
12:27 pugs_svnbot r17572 | ruoso++ | [kp6] new failing test... code inside rule
12:27 pugs_svnbot diff: http://dev.pugscode.org/changeset/17572
12:27 lambdabot Title: Changeset 17572 - Pugs - Trac
12:30 renormalist re
12:30 lambdabot renormalist: You have 3 new messages. '/msg lambdabot @messages' to read them.
12:30 pugs_svnbot r17573 | pmurias++ | [kp6] run_tests --section=foo dosn't run TESTS
12:30 pugs_svnbot diff: http://dev.pugscode.org/changeset/17573
12:30 lambdabot Title: Changeset 17573 - Pugs - Trac
12:31 ruoso hmmm... somebody forgot to add something :)
12:31 pmurias fixing
12:32 pmurias i forgot i had that modification in my working copy ;)
12:32 pugs_svnbot r17574 | pmurias++ | kp6: added files i didn't commit last time
12:32 pugs_svnbot diff: http://dev.pugscode.org/changeset/17574
12:32 lambdabot Title: Changeset 17574 - Pugs - Trac
12:34 renormalist pmurias: ok, I got your msgs.
12:35 fglock brb & buy food &
12:35 renormalist pmurias: The build problems seemed like as the the generated runtime under lib5 seems to be used also during compile time.
12:35 renormalist pmurias: can this be possible?
12:36 pmurias it is it the sad reality
12:36 renormalist pmurias: and is this wanted?
12:37 renormalist pmurias: or is it a bug?
12:37 pmurias it's a feature but i'm thinking how to make it work differently
12:38 renormalist pmurias: I didn't find the spot where it is included. Can you say me a file/line or where an accorind -Ilib5 appears. Then I might understand that better.
12:38 fglock mp6 allowed you to build to another place, test it and then copy to lib5
12:39 pmurias renormalist: looking
12:39 fglock renormalist: kp6-perl5.pl has a 'use lib' that makes the -Ilib5 thing
12:41 pmurias renormalist: kp6 has to load the compiled p6 files to have them accesible in BEGIN blocks
12:41 pmurias it's done from MOP.pm included in term from Runtime.pm
12:42 ruoso lunch &
12:43 renormalist fglock: ah, I now see the use lib lib5
12:44 renormalist pmurias: Ok, so I think what I did in MOP to dynamicall require the available runtime classes only fixes the immediate problem of not beeing able to load MOP to compile again.
12:45 renormalist pmurias: maybe it would be better to have some kind of a "make revert_to_ok_state" to re-initialize once things went wrong
12:46 renormalist pmurias: I sometimes used svn revert of the lib5 subdir, but it didn't work for my newly created classes. and was annoying anyway.
12:47 timbunce Does kp6 support "use perl5:DBI;", or something similar?
12:47 pmurias renormalist: you think rightly
12:47 pmurias timbunce: it does
12:47 pmurias use DBI:from<perl5>
12:47 pmurias see examples/sdl
12:47 timbunce how does it compare with pugs?
12:48 timbunce (for the perl5 interface, I mean)
12:49 penk joined #perl6
12:49 pmurias the kp6 version only handles oo oriented modules right know
12:51 timbunce I want to access the perl5 JDBC module and extend java2perl6 to automatically create the glue between the two, so the perl6 will have a working (albeit slow) JDBC API.
12:51 pmurias i see
12:52 pmurias i haven't used the pugs api at all, and only tested the kp6 one with SDL after writing, so i don't know how to compare them
12:52 pmurias *writing it
12:52 timbunce I need to choose to work with pugs or kp6.
12:52 timbunce Since pugs is failing to run even the demo code on the wikipedia page I guess I'll give kp6 a whirl...
12:53 pmurias the API should be enough if you can get past kp6 limitations
12:54 pmurias s/API/p5 interface/
12:54 pmurias i can extend it if you need anything in particular
12:54 timbunce Thanks. is there some handy doc or presentation to get me started with kp6?
12:55 masak timbunce: if you ask me, it's fairly serious that the wikipedia demo code doesn't run. I thank you for bringing this to our attention, and I hope to be able to look into it shortly
12:56 timbunce May just be a local problem. Can you reproduce it?
12:56 fglock_ joined #perl6
12:56 pasteling "lumi" at 84.108.246.80 pasted "masak: Try this?" (15 lines, 720B) at http://sial.org/pbot/27232
12:56 masak timbunce: could you nopaste the code?
12:56 lumi Untested, uncompiled, I don't have head here
12:56 pmurias timbunce: the t show whats working in kp6
12:57 pmurias look at examples/sdl for how the p5 bridge works
12:57 timbunce masak: what's nopaste
12:57 masak @nopaste
12:57 lambdabot Haskell pastebin: http://hpaste.org/new
12:57 masak oops, not that
12:57 masak http://sial.org/pbot/perl6
12:57 lambdabot Title: sial.org Pastebot - pasteling
12:57 lumi masak: I don't see why it wouldn't work, your one...
12:57 masak that's the one
12:57 masak lumi: it did
12:58 masak but thanks for you clarification
12:58 lumi It did work? I must've missed it then
12:58 masak I arrived at a very similar one just a few moments ago
12:58 masak lumi: well, moritz_++'s tests were written wrong
12:58 lumi Oh, right
12:58 masak I'm about to commit a correction
12:58 pmurias timbunce: run kp6 code with ./kp6
12:59 masak I've had an hour of interesting frustration followed by insight
12:59 pasteling "timbunce" at 86.43.91.11 pasted "perl6 code from http://en.wikipedia.org/wiki/Pugs#Perl_5_compatibility" (17 lines, 492B) at http://sial.org/pbot/27233
12:59 pugs_svnbot r17575 | renormalist++ | - [kp6] fixed wrong "defined" in srand implementation
12:59 pugs_svnbot diff: http://dev.pugscode.org/changeset/17575
12:59 lambdabot Title: Changeset 17575 - Pugs - Trac
12:59 timbunce that code fails for me. It reports:
12:59 timbunce 0x02093398
12:59 timbunce *** Odd number of elements found where hash expected: VV 0x020934c4
12:59 timbunce at dbi.pl line 18, column 5-48
12:59 buetow joined #perl6
13:02 pugs_svnbot r17576 | masak++ | [t/statements/unless.t]
13:02 pugs_svnbot r17576 | masak++ | * replaced dies_ok( sub { eval q[ ...] } ) by eval_dies_ok( q [ ... ] )
13:02 pugs_svnbot r17576 | masak++ | * removed :todo<pugs> in expectation of next commit
13:02 pugs_svnbot r17576 | masak++ |   which fulfills the tests
13:02 pugs_svnbot diff: http://dev.pugscode.org/changeset/17576
13:02 lambdabot Title: Changeset 17576 - Pugs - Trac
13:03 * masak compiles Parser.hs with lumi++'s suggestion incorporated
13:05 timbunce A pugs make test has just finished. Are these results reasonable:
13:05 timbunce (78 subtests UNEXPECTEDLY SUCCEEDED) (1915 subtests TODO), 540 subtests skipped.
13:05 timbunce Failed 114/685 test scripts, 83.36% okay. 710/16448 subtests failed, 95.68% okay.
13:07 pmurias they are resonable
13:07 pugs_svnbot r17577 | masak++ | [src/Pugs/Parser.hs]
13:07 pugs_svnbot r17577 | masak++ | * disallowed "else" and "elsif" after "unless"
13:07 pugs_svnbot diff: http://dev.pugscode.org/changeset/17577
13:07 lambdabot Title: Changeset 17577 - Pugs - Trac
13:07 pmurias pugs generaly has failing test
13:08 masak now it has two less :)
13:08 timbunce pmurias: thanks. I'll look into the failing t/perl5/* tests when I get some time.
13:09 renormalist moritz_: which command does the kp6 eval bot call? also kp6-perl5.pl?
13:10 renormalist #kp6 say 23;
13:10 exp_evalbot r17577: OUTPUT[23␤]
13:10 renormalist #pugs say 23;
13:10 exp_evalbot OUTPUT[23␤]
13:10 snearch joined #perl6
13:11 pmurias #eval say 23
13:11 exp_evalbot kp6: OUTPUT[23␤]
13:11 exp_evalbot ..pugs: OUTPUT[23␤]
13:11 exp_evalbot ..p6: OUTPUT[23␤]
13:11 exp_evalbot ..nqp: OUTPUT[Statement not terminated properly at line 1, near "23"␤current instr.: 'parrot;PGE::Util;die' pc 123 (runtime/parrot/library/PGE/Util.pir:83)␤called from Sub 'parrot;NQP::Grammar;statement_list' pc 3535 (src/Grammar_gen.pir:1272)␤called from Sub 'parrot;NQP::Grammar;TOP' pc 498
13:11 exp_evalbot ..(src/Grammar_gen.pir:100)␤called from Sub 'parrot;PCT::HLLCompiler;p...]
13:12 pmurias wow, nqp the eval bot
13:12 pmurias s/the//
13:21 timbunce This fails for me: echo 'class X { use DBI:from<perl5>; }' | perl kp6-perl5.pl
13:21 timbunce Can't call method "emit" without a package or object reference at kp6-perl5.pl line 254, <> line 1.
13:21 timbunce what am I doing wrong?
13:22 renormalist timbunce: did you "make" before that?
13:23 timbunce renormalist: make where? I did a make in the pugs tree. Do I need to do another somewhere else?
13:23 pugs_svnbot r17578 | dakkar++ | restructured the layout, now it's a proper module (still lacks documentation, and the semantics have to be changed)
13:23 pugs_svnbot diff: http://dev.pugscode.org/changeset/17578
13:23 lambdabot Title: Changeset 17578 - Pugs - Trac
13:24 renormalist timbunce: cd v6/v6-KindaPerl6 ; make      # it's an autonomous subproject
13:24 timbunce renormalist: I don't see any makefile there
13:24 timbunce make: *** No targets specified and no makefile found.  Stop.
13:24 rindolf joined #perl6
13:26 renormalist you are in pugs project trunk? It should be there: http://svn.pugscode.org/pugs/v6/v6-KindaPerl6/
13:26 timbunce $ svn info
13:26 timbunce Path: .
13:26 timbunce URL: https://svn.openfoundry.org/pugs/v6/v6-KindaPerl6
13:26 timbunce Repository Root: https://svn.openfoundry.org/pugs
13:26 timbunce Repository UUID: 12242aa7-dc21-0410-817b-c41c31cd50c7
13:26 timbunce Revision: 16464
13:26 jhorwitz joined #perl6
13:26 timbunce svn mirror problem?
13:27 renormalist yes, we are on 17578
13:27 fglock joined #perl6
13:27 timbunce I'll bin this tree and fetch from pugscode.org. Thanks.
13:27 renormalist k, np
13:35 Blwood joined #perl6
13:36 pugs_svnbot r17579 | renormalist++ | - [kp6] sourced out the security stuff into an own class
13:36 pugs_svnbot r17579 | renormalist++ |   (but still with env variable)
13:36 pugs_svnbot diff: http://dev.pugscode.org/changeset/17579
13:36 lambdabot Title: Changeset 17579 - Pugs - Trac
13:43 barney joined #perl6
13:51 b_jonas joined #perl6
13:51 TimToady_ joined #perl6
13:51 |Jedai| joined #perl6
13:54 pugs_svnbot r17580 | renormalist++ | [kp6] dedicated tests for map
13:54 pugs_svnbot diff: http://dev.pugscode.org/changeset/17580
13:54 lambdabot Title: Changeset 17580 - Pugs - Trac
13:55 hcchien joined #perl6
13:57 pmurias looked into Rule::Block, not sure what to do
13:59 pmurias p6 -> ast -> p6 -> ast -> p5 seems stupid to me
14:03 masak is the opposite of '~~', the match operator, '!~~'?
14:04 renormalist masak: I think so
14:04 masak pugs seems to, too
14:05 masak I'm currently sifting through the tests, looking for modules that use unless { ... } else { ... }
14:05 renormalist pmurias: do we have some kind of eval or similar to catch a die? I would like to use that in a test, but don't know how.
14:06 pmurias looking
14:06 pmurias renormalist: don't think so
14:07 renormalist mkay
14:07 silug left #perl6
14:07 bsb joined #perl6
14:07 pmurias you could add the semantics easily
14:08 pmurias with a p5 land sub which uses 'eval {}' and passing p6 subroutines to it
14:11 renormalist pmurias: hmm, not sure I understand, with p5 land  you mean in Runtime/Perl5/...?
14:11 pmurias yes
14:11 renormalist pmurias: k, will experient with that, have to go now
14:12 pmurias k
14:13 rindolf joined #perl6
14:15 renormalist pmurias: one more question: is it possible to pass arguments to the emitters?
14:15 TimToady_ joined #perl6
14:15 pmurias hmm
14:16 pmurias from the command line?
14:16 renormalist I would like to pass them infos from params given to kp6-perl5.pl
14:17 renormalist in order to implement a secure option, setting a constant
14:17 renormalist (for instance)
14:17 renormalist it's for securing kp6 for the kp6 irc bot
14:18 pmurias you would have to add the passing yourself
14:21 renormalist pmurias: ok
14:21 pmurias cycling&
14:21 renormalist social stuff &
14:21 pugs_svnbot r17581 | renormalist++ | - [kp6] fixed map test, new compiler option for (not yet implemented) secure environment
14:21 pugs_svnbot diff: http://dev.pugscode.org/changeset/17581
14:21 lambdabot Title: Changeset 17581 - Pugs - Trac
14:23 rindolf joined #perl6
14:23 pasteling "masak" at 130.238.204.78 pasted "This is an interesting bug in File::Spec::Win32. Anyone know why it behaves that way?" (54 lines, 1.8K) at http://sial.org/pbot/27237
14:29 masak hm... 'my' array variables in subs are broken
14:30 masak the above bug goes away if I replace `my @new_path;` by `my @new_path = ();`
14:30 masak it's just that I shouldn't have to
14:34 pugs_svnbot r17582 | masak++ | [File::Find]
14:34 pugs_svnbot r17582 | masak++ | * changed illegal unless/else to if/else
14:34 pugs_svnbot diff: http://dev.pugscode.org/changeset/17582
14:34 lambdabot Title: Changeset 17582 - Pugs - Trac
14:39 moritz_ @tell renormalist exp_evalbot uses kp6-perl5.pl
14:39 lambdabot Consider it noted.
14:39 moritz_ masak: apologies for your trouble due to my wrong tests
14:40 masak it's ok, I learned a lot along the way :)
14:40 bsb left #perl6
14:41 masak moritz_: by the way, I'm right in assuming that local array variables should begin as empty, right?
14:43 pugs_svnbot r17583 | dakkar++ | cleanup of exported globals, added in-place editing capabilities as requested by ruoso
14:43 pugs_svnbot diff: http://dev.pugscode.org/changeset/17583
14:43 lambdabot Title: Changeset 17583 - Pugs - Trac
14:43 DarkWolf84 joined #perl6
14:44 TimToady stupid DSL line...
14:45 TimToady masak: are you asking how local behaves in Perl 5?  yes, local clears the array in p5.  (but temp doesn't in p6)
14:45 masak TimToady: right
14:45 masak what I have here (see nopaste above) is a local that behaves as a temp
14:45 moritz_ masak: yes, I think so
14:45 masak I'm trying to reproduce the behaviour right now in a test
14:45 masak with slight success
14:47 TimToady are you using "local" to describe a "my"?  that's...confusing...
14:47 masak hm, true
14:47 masak s/local/my/
14:48 TimToady I agree that my should start () in either p5 or p6
14:48 masak I really mean lexical variables
14:48 masak right?
14:49 TimToady that's what they're called technically, though of course that's a bit wrong too...
14:49 masak :)
14:49 TimToady if they were really and truly lexical then recursion wouldn't work
14:49 TimToady and they'd act more like state vars
14:49 moritz_ in 'my Str $s' is $s undef? or ''?
14:49 TimToady actually, more like our vars
14:50 TimToady it's Str
14:50 TimToady which is a kind of undef
14:50 TimToady which makes $s .= new works
14:51 TimToady *work
14:51 moritz_ so why is an array initialized empty and a string undef?
14:51 moritz_ ok
14:51 moritz_ so it's really "kinda undef"?
14:52 TimToady well, it's a problem of distribution: if you have my Str @array, then each individual element is notionally Str/undef by default, but the array as a whole is just empty
14:54 TimToady but for more on bare typenames grep for "protoobject" in S02 and S12
14:55 moritz_ actually I plan to read all of them some day ;-)
14:56 bloonix moritz_: and translate it? ;)
14:57 moritz_ bloonix: I translated the first 20% of S05 already
14:57 TimToady speaking of which, Damian and I are planning to break <?foo>
14:57 moritz_ why that?
14:57 TimToady and make <?foo> symmetric with <!foo>
14:57 TimToady so that neither eats positions
14:57 TimToady current <?foo> needs to change to something else
14:58 TimToady so <?ws> might end up <=ws> or <.ws>
14:58 TimToady or possibly even <ws> if we flip the capture default
14:58 moritz_ <#ws>
14:59 TimToady that could work too, but it needs to interact well with whatever the naming syntax ends up
14:59 TimToady I'm thinking $<foo> := is too heavy
15:00 TimToady so we might end up with <foo=bar> with <=bar> as a degenerate case
15:00 TimToady meaning <bar=bar>
15:01 TimToady but it's not entirely thought through yet
15:01 moritz_ why switch from binding $<foo>:=<bar> to assignment in <foo=bar>?
15:01 TimToady all I know is that <?ws> must get fixed
15:01 TimToady it's not assignment
15:02 TimToady could just as easily use <foo/bar> and </bar>
15:02 moritz_ that looks too xml like ;)
15:02 TimToady but the = is a bit more suggestive
15:02 moritz_ and it confuses syntax hilighter easily
15:02 moritz_ yes, I agree
15:04 TimToady but if foo= is a prefix like ! or ? then maybe even <1=(...)> falls out of it
15:04 TimToady_ joined #perl6
15:05 TimToady_ grr...
15:06 TimToady_ I think the telco unilaterally upped the speed on my dsl modem and made it flakey...
15:07 pugs_svnbot r17584 | dakkar++ | added $_OUTER (and @_OUTER)
15:07 pugs_svnbot r17585 | moritz++ | [evalbot]: use --secure for kp6
15:07 pugs_svnbot diff: http://dev.pugscode.org/changeset/17585
15:07 lambdabot Title: Changeset 17585 - Pugs - Trac
15:07 exp_evalbot joined #perl6
15:08 pasteling "masak" at 130.238.204.78 pasted "This bug refuses to show up outside of File::Spec::Win32" (102 lines, 3.3K) at http://sial.org/pbot/27238
15:09 Blwood joined #perl6
15:09 TimToady_ but anyway, then you could say <foo=bar=?!!?ws> if you wanted to
15:09 moritz_ wtf?
15:09 TimToady_ currently only ? and ! are recursively defined on assertions
15:10 TimToady_ I'm just saying foo= could be too for naming
15:11 TimToady_ I suppose in a sense <+alpha+digit+[_]> is also recursively defined
15:12 TimToady_ where +alpha is defining the base set and subsequent terms refine that
15:13 TimToady_ though I'm not sure recursing back to ? or ! makes much sense within such a thing, so it's a different recursion
15:13 TimToady_ sorry, just thinking out loud here...
15:16 nwc10 joined #perl6
15:16 pugs_svnbot r17586 | dakkar++ | better test for $_OUTER
15:16 pugs_svnbot diff: http://dev.pugscode.org/changeset/17586
15:16 lambdabot Title: Changeset 17586 - Pugs - Trac
15:16 TimToady_ by the way, I've pretty much figured out how to partition metholated rules into the longest token part and the "action" part.  at least, I have a hand-coded example.  so I should in theory be able to model the longest token matching pretty soon.
15:16 nwc10 when did the fortissimo and fff operators appear? recently?
15:16 TimToady_ albeit by exhaustive calls rather than DFA matching
15:17 TimToady_ and fortississimo?  they've been there all along, pretty much
15:17 nwc10 oh. I must be slow. :-(
15:17 TimToady_ had to have some story for p5's scalar ..
15:17 TimToady_ I just lowered their prec lately
15:18 TimToady_ so you can write $line == 42 ff $line == 45 without parens
15:18 nwc10 ah
15:19 TimToady_ I don't think ff will be smart enough to match 42 implicitly against $. since there is no such variable in p6
15:19 TimToady_ but maybe we could have a $*LAST_INPUT_HANDLE...hmm...
15:20 TimToady_ in which case ff could match an Int against $*LAST_INPUT_HANDLE.line
15:20 nwc10 the name clashes with private attributes (IIRC) but I was thinking that even the concept of "last input handle" isn't perl 6 in that it's a dyamic scope, isn't it?
15:20 finchely joined #perl6
15:20 TimToady_ yeah, I think p5 dynscopes it, but I could be misremembering
15:21 TimToady_ well, it plays other games with local($.) anyway
15:21 TimToady_ maybe that's what I'm thinking of
15:21 TimToady_ basically local($.) does dynscoping of last input handle
15:22 TimToady_ another way of looking at it is that $. in fact *is* last_input_handle but just happens to numerify to the line number
15:23 TimToady_ anyway, if input just binds $*LAST_INPUT_HANDLE to the current handle it's probably sufficient for emulation
15:24 TimToady_ or we could go as far as to have a $. which is lexically scoped, I suppose.  don't want to make closures any heavier though
15:24 pbuetow joined #perl6
15:24 nwc10 how many people still use it?
15:24 nwc10 was it mostly there for s2p ?
15:25 TimToady_ not that many people ever used it
15:25 TimToady_ well ff was for a2p, fff for s2p
15:25 TimToady_ to mix p's
15:26 TimToady_ but some number of people figured out what flipflops do and use them productively
15:26 nwc10 ah, I was meaning $.
15:27 nwc10 it happens that I'm not in the small number of smart people who figured out flipflops sufficient to find them useful
15:27 nwc10 'small number of people smart enough' I think I meant.
15:28 nwc10 I wouldn't cry if the concept of $. went away. As is, it's another thing to remember in a language that is already large and featureful.
15:28 b_jonas $. is so useful because die prints it
15:28 TimToady_ that's more or less what I'm proposing, since $. is really $handle.line, for the right handle
15:29 nwc10 mmm. die. yes.
15:29 TimToady_ so I'm just thinking input should set $*LAST_INPUT_HANDLE and leave it at that
15:29 TimToady_ anything that wants $.-like functionality just looks at that global
15:29 flokuehn joined #perl6
15:35 b_jonas that reminds me, I wrote an interpreter that attempted to follow which source line it's interpretting in the opcode tree
15:35 b_jonas so errors would report the right line number
15:35 TimToady_ yeah, I did one of those too.  :)
15:35 moritz_ that's kinda hard I guess ;)
15:35 b_jonas runtime errors I mean, not compile-time ones of course
15:35 b_jonas it's hard, yes
15:35 moritz_ TimToady_: are you refering to perl? ;-)
15:35 b_jonas and mine didn't do it completely right
15:36 TimToady_ it's hard
15:36 b_jonas so it gave the right line number for typical code but not always
15:36 TimToady_ I think p5 still gets a bit confused with if/else
15:36 moritz_ do Perl 6 rules automatically track line number when matching against a stream?
15:37 TimToady_ esp if the line transitions get optimized away
15:37 TimToady_ they track positions in the string, which can be translated to line numbers as long as you keep the string around
15:38 pugs_svnbot r17587 | moritz++ | [irclog] link to search in repo logs
15:38 pugs_svnbot diff: http://dev.pugscode.org/changeset/17587
15:38 lambdabot Title: Changeset 17587 - Pugs - Trac
15:38 TimToady_ or a table of line-number offsets
15:39 b_jonas actually, gcc is getting better in this kinds of things these days
15:39 b_jonas that is, producing debugging info (not only line numbers but local variable locations and stuff) in optimized codes
15:39 TimToady_ speaking of things that are too complicated to understand...
15:40 TimToady_ but yes, we need to be careful not to throw away useful information
15:40 TimToady_ p5 was very good at throwing away useful information :/
15:40 b_jonas I even made the bytecode dumper print line directives as a newline and line number, but I've apparently changed that since
15:41 b_jonas that helped produce a more readable bytecode dump
15:41 b_jonas s/bytecode/tree/
15:41 b_jonas opcode tree
15:41 b_jonas no byte code
15:41 cerridwen joined #perl6
15:42 TimToady_ anyway, p5 knows at run-time the line number of the statement you're executing (and all its callers)
15:42 flokuehn joined #perl6
15:43 rhr so the proposed S05 change is <foo> -> <=foo>; <?foo> -> <foo>; $<bar> := <foo> -> <bar=foo>; <before foo> -> <?foo>; <!foo> -> <!foo> ?  That looks nice, I'd wondered about the ?/! thing before.
15:43 nwc10 left #perl6
15:44 * b_jonas runs that interpreter in compile-only mode and looks at the dump:
15:45 b_jonas prog( line( 6 ) line( 13 ) line( 14 ) line( 18 ) line( 21 ) line( 25 ) input( n ) line( 29 ) for( i 1 var( n ) input( adatok x var( i ) ) input( adatok y var( i ) ) ) line( 30 ) qprint( 'Adatokat beolvastam.' ) line( 32 ) for( i 1 var( n ) line( 33 ) let( xsor var( i ) var( i ) ) line( 34 ) let( ysor var( i ) var( i ) ...
15:45 TimToady_ <before foo> isn't quite the same as <?foo>
15:45 TimToady_ <?foo> would be the same as <before <foo>>
15:45 b_jonas for several pages
15:46 TimToady_ so before isn't entirely redundant
15:46 rhr oh, right
15:46 TimToady_ but other than that, eys
15:46 TimToady_ *yes
15:48 TimToady_ hmm, pity that <[...]> is taken, or <0=[...]> would naturally do a numbered capture (under the recursive def theory)
15:49 amnesiac joined #perl6
15:50 TimToady_ hmm, maybe character classes could dehuffmanize to [[ a..f ]]
15:51 b_jonas no way. do you really want [[[:alnum:]]]
15:51 TimToady_ cool!  :)
15:51 b_jonas if it's a capture, why [ anyway
15:51 TimToady_ to avoid people miscounting () maybe?
15:51 TimToady_ 'course, already have that problem with <( )>
15:52 TimToady_ but right now <( and )> aren't required to be symmetrical
15:52 rhr b_jonas: that's just <alnum> now, afaik
15:52 TimToady_ and if we defined foo= recursively, <foo=(...)> would have to be symmetrical, implying that <(...)> are too
15:52 b_jonas rhr: ok, then [[[:alnum:]\-]]
15:53 TimToady_ well, <+alnum+[[\-]]> maybe
15:53 rhr <+alnum +[[-]]>, that's not too bad
15:53 TimToady_ heh, great minds... :)
15:54 rhr :)
15:54 rhr do you still need a \ there?
15:55 TimToady_ esp if we teach people to use more whitespace <+alpha +[[ \- ]]>
15:55 TimToady_ the idea was to require \ to catch thinkos like a-z
15:55 rhr ok
15:56 TimToady_ though just catching a-z and a-f and 0-9 would get most of them
15:56 Juerd Do we get '' in charclasses to compensate for \!\@\#\$\%\^'s ugliness?
15:56 TimToady_ I find I usually just use < $ % @ & :: > instead of a char class
15:57 Juerd TimToady_: Is there a specific reason to keep charclasses around?
15:57 TimToady_ they understand a..z is the main thing
15:57 Juerd Though << { 'a' .. 'z' } >> is a bit verbose to write
15:57 TimToady_ which is, of course, usually wrong. :)
15:58 Juerd Actually, that wouldn't need qw-ish <<>>, right? <{ 'a'..'z' }> would do if my brain is wired correctly.
15:59 TimToady_ yes, that would theoretically work, I think
15:59 Juerd All we need to make <{a..z}> work is unquoted strings ;)
15:59 Juerd Let's call them "barewords" ;)
15:59 TimToady_ assuming anything listy (including Range) does | matching
15:59 TimToady_ okay, I'll call the juerdwords  :)
15:59 TimToady_ *them
15:59 * Juerd hides
16:00 rhr can you not do [[!@#$%^]] ?  wouldn't only - and ] need \?
16:01 TimToady_ if ]] were the terminator then not even ] would need \
16:01 Juerd rhr: If - gets \, all \W should get \, for forward compatibility and the reduction of things to remember.
16:01 b_jonas but \ would
16:01 * Juerd doesn't like [[...]] because he generates regexes with nested (?:(?:...)) a lot already.
16:01 TimToady_ whitespace is your friend
16:02 Juerd Whitespace disambiguation is not nice
16:02 b_jonas the problem with [[ is that you need [ [ a lot
16:02 b_jonas also ] ]
16:02 b_jonas so that would make you need spaces
16:02 Juerd It should IMO be an ultimate solution, for when the entire \S unicode charset is exhausted :)
16:02 b_jonas which sucks
16:02 b_jonas oh, Juerd said the same
16:02 b_jonas sorry
16:03 Juerd And there still are some *ASCII* characters that weren't used yet, even
16:03 Juerd Does it have to bracket?
16:03 b_jonas note that you need a regex delimiter too
16:04 b_jonas though [] is good for that usually
16:04 Juerd "abc12345" ~~ /~a..z ** 3 ~0..9 ** 5/;  # yes, brackets are nicer.
16:04 b_jonas or ()
16:05 Juerd b_jonas: // delimit regexes. Not sufficient?
16:05 b_jonas sometimes it is. sometimes not.
16:05 Juerd / '</script>' / is now a valid regex
16:05 Juerd There's less need for using alternative delimiters
16:06 Juerd Hmm, s[[[a..z]]]g = "x" is really confusing
16:07 Juerd Too bad '.' is taken
16:07 TimToady_ s:g you mean
16:07 TimToady_ yeah, so is ..  :)
16:07 Juerd Err...
16:07 Juerd I guess so :)
16:07 b_jonas dunno.
16:08 Juerd TimToady_: Yes, I was thinking /0..9|a..f/, but . is taken, and precedence would become too complex
16:09 TimToady_ and you'd have people leaving the | out of [0..9 a..f] accidentally
16:09 Juerd I don't see that as a problem, because the bug caused by it will be obvious.
16:09 TimToady_ apart from the .. means . . problem
16:10 TimToady_ I'd be more inclined to special case .. within < $ @ a..z >
16:10 TimToady_ or maybe <<..>>
16:10 Juerd Just .. or also ^.., ..^, ^..^?
16:10 moritz_ ^_^
16:10 b_jonas lol
16:10 Juerd And if ^..^ and friends aren't included, then why .. instead of -?
16:11 TimToady_ a-z is 'a' with the 'z' removed
16:11 Juerd <...> makes it a bit hard to negate ranges, I think
16:11 TimToady_ and ranges are everywhere else .. in P6
16:12 Juerd Except if you have the XML A - B construct
16:12 Juerd s/XML/EBNF/
16:14 TimToady_ that's spelled !~~ in p6
16:15 TimToady_ kinda
16:15 Juerd Speaking of tildes... I guess you don't like /[0~9|a~f]/ either?
16:15 TimToady_ I like .. for ranges
16:15 Juerd TimToady_: [^_] is what I meant. !~~ isn't used within charclasses, is it?
16:16 TimToady_ I was talk about the EBNF -
16:16 TimToady_ *talking
16:16 TimToady_ which if I recall works for more than character classes
16:17 Juerd Yes, it does two incompatible things in EBNF
16:17 Juerd Which is the primary reason you can't ever automatically convert EBNF to Perl 6
16:17 Juerd It does charclass - charclass to compose a new class
16:18 Juerd And it does pattern - pattern, where the second part must not much on whatever the first part matched.
16:18 TimToady_ well, the whole charclass idea is breaking down anyway with some chars being prefixes of other chars...
16:18 Juerd I guess that would be /(A) { fail if $0 ~~ /B/ }/
16:19 TimToady_ currently /(A) $0 !~~ B/
16:20 TimToady_ and maybe /(A) !~~ B/
16:20 TimToady_ except that's inconsistent
16:21 Juerd Hm... I like those.
16:21 TimToady_ so probably the first, assuming that the left term of ~~ doesn't rematch
16:21 TimToady_ otherwise I'm not sure how you'd write the first in terms of the second
16:22 TimToady_ and it's nice to be able to match against a $0 that was captured some time ago
16:23 TimToady joined #perl6
16:24 TimToady or maybe ~~ just distinguishes $0 ~~ from [$0] ~~
16:25 TimToady in which case both forms could be made to work
16:25 TimToady though it's a bit of a discontinuity
16:26 rhr could you do something like /A & <!m B>/ (where <m ...> is just ...)?
16:27 TimToady well, that's essentially A !~~ B, which I think read better
16:27 TimToady and the & again forces you to put the things contiguously that have to match the same
16:27 TimToady it also implies that the left and right side of & come out to the same length
16:28 rhr right, I guess that doesn't work
16:28 TimToady which means <m...> would magically scan to any length outside of itself
16:28 TimToady which is odd
16:29 TimToady and all of this because I don't like <?ws>  :)
16:33 TimToady hmm, if we can teach peopel to put whitespace consistently after quantifiers, +[ a..z ] and -[ a..z ] could be made to work
16:33 Juerd Well, you can still turn everything inside out and end up with bnf ;)
16:34 Juerd Where /ws/ matches the ws rule, and only /'ws'/ matches the string "ws" literally
16:34 Juerd :P
16:34 * moritz_ thinks every string in a regex should be quoted, and barewords call subrules/subroutines
16:35 moritz_ that would be acceptable for grammars, but not for quick-n-dirty regexes
16:35 TimToady I think we'd have massive rebellion if we tried that...
16:36 moritz_ I know :)
16:36 Limbic_Region joined #perl6
16:36 Juerd Starting tomorrow
16:36 TimToady but if +[ a..z ] works inside <...>, maybe it should work outside too
16:37 Juerd A bare + is a bit weird though
16:37 TimToady well, +[ would be the token
16:37 Juerd Hm. [+a..z], [-a..z]
16:37 moritz_ what about <class +[ a..z]>, just like <before ...> and <after ...>?
16:37 Juerd + can't occur after [ normally anyway.
16:37 moritz_ or is that too bad a huffman coding?
16:38 Juerd moritz_: Depends if you ask the Unix sysadmin, or the Unicode aware enterprise programmer.
16:38 rhr you'd still need <...> for <?...>, <=...>, etc.
16:38 TimToady I'd think I'd want to reserve [+ ... ] as a synonym for [ ... ]+
16:39 rhr but I like +[...]
16:39 TimToady in case people want their quantifiers up front on brackets
16:39 Juerd My initial reaction to that is that it should have been +[...] anyway ;)
16:39 Juerd (quantifiers in front, that is)
16:40 Juerd In English you also say "any amount of whitespace", and typically not "whitespace, any amount"
16:40 Juerd But there's the rebellion argument again :D
16:40 moritz_ rebellions are totally overrated ;)
16:41 TimToady I was thinking it would just be a pragma to allow prefix quantifiers
16:41 Juerd OTOH /g was moved to the front too, and nobody really minded that apparently
16:41 TimToady but that does work against +[] for cclasses
16:41 TimToady sigh
16:41 Juerd TimToady_: Not against [+...] for cc :)
16:41 moritz_ second sigil trick again? ;-)
16:41 Juerd And [+a-z -aeiou] looks nice, even.
16:42 moritz_ s/sigil/character/
16:42 Juerd Oops, sorry
16:42 Juerd And [+a..z -aeiou] looks nice, even.
16:42 Juerd (I see now why .. is so important)
16:42 TimToady *nod*
16:43 moritz_ Juerd: I like [+...] and [-...]
16:43 TimToady not sure how well it composes though
16:43 Juerd It would perhaps imply that $foo ~~ /+a..z/ also matches a single a..z character.
16:43 moritz_ and [+<alpha>-aeio] ?
16:44 Juerd moritz_: Different problem domain.
16:44 Juerd a..z is still important when dealing with data that looks like text, but isn't words.
16:44 Juerd Like unix usernames
16:45 TimToady not arguing that, question is how it composes
16:45 Juerd What does compose mean here?
16:45 TimToady what moritz_ said
16:45 TimToady how do you combind char classes?
16:45 TimToady and do set ops?
16:46 Juerd Presumably the [] is irrelevant
16:46 Juerd And + and - work to the first non-escaped whitespace
16:46 TimToady currently we have <+alpha-[aeiou]>
16:47 Juerd Then you'd even have +<alpha>-aoeui without further delimiters
16:47 Juerd I don't know if that'd work
16:48 Juerd Using <foo> for named charclasses, and arbitrary patterns bothers me a bit.
16:48 moritz_ Juerd: that's not very readable... I think some kind of braces are a requirement
16:48 TimToady <alpha>+beta wouldn't work at all
16:48 Juerd moritz_: That can be a best practive :)
16:48 Juerd practice
16:48 Juerd practise
16:48 Juerd TimToady: The initial + or - would be required for composition
16:49 rhr hmm, I'd be more comfortable if everything inside the [] was part of the cclass
16:49 Juerd rhr: Perl 5's [^foo] is not like that either...
16:50 TimToady and that's kind of a wart
16:50 Juerd Going from [^foo] to [-foo], and [foo] to [+foo] is a small step.
16:50 rhr yeah, I never really liked that...
16:50 TimToady double the warts  :)
16:50 Juerd Which part would be the wart?
16:50 TimToady < rhr> hmm, I'd be more comfortable if everything inside the [] was part  of the cclass
16:51 rhr the ^/+/- not being part of the cclass
16:51 TimToady it's like saying the first char inside "..." changes its meaning
16:51 rhr right
16:51 Juerd Yes
16:51 TimToady you wouldn't like that
16:52 Juerd Oh, I thought /:i foo/ meant we didn't think like that anymore.
16:52 Juerd Modifiers inside delimiters are useful, but it does take some getting used to.
16:52 Juerd See also class Foo { is Bar; }
16:53 TimToady yeah, well, it's kinda hard to put a class modifier outside the class when it's the whole file...
16:53 Juerd class Foo is Bar;
16:53 Juerd The class body itself starts after that
16:54 TimToady so the "is" is outside the delimiters
16:54 TimToady in class Foo is Bar {...} too
16:54 Juerd I think modifiers inside delimiters are okay if it's syntactically unambiguous. : is special in a regex, and so is +. It would have been weird for - before, but now all \W characters are reserved, meaning we can even get away with that
16:54 TimToady but the insides of a character class are much more like a string than a program
16:55 Juerd I don't see a problem with something similar for strings either
16:55 Juerd "\q ..." where \q changes the semantics for the rest of the string, I wouldn't mind it.
16:56 TimToady I much prefer the current "\q[...]" for that
16:57 Juerd Then there's [+[...]], but I'm not so fond of double delimiters
16:57 TimToady and these are all escape hatches for when the outer declarative style is insufficient
16:57 TimToady s:i/.../ is preferred over s/:i.../
16:58 Juerd I think that prefererence is a bit unfortunate
16:58 TimToady and class is Bar {...} is definitely preferred over class { is Bar; }
16:59 TimToady and q// is preferred over "\q[]"
16:59 Juerd I know you prefer that - but I really love /:i .../ and class Foo { is Bar; }
16:59 TimToady but [+...] forces them to use the inside form
16:59 Juerd The point is clear
16:59 rhr imo, /:i/ is only useful in cases like / Foo [ :i bar ]/
17:00 Juerd rhr: Which is exactly why I'd choose to *always* use that form.
17:00 Juerd (And, to me, modifiers within delimiters are not weird at all.)
17:00 rhr then what are the delimiters for?
17:01 Psyche^ joined #perl6
17:01 Juerd Delimiting the entire construct
17:02 Juerd I also often use "(sqrt 16) + 3" instead of "sqrt(16) + 3". I find the former more clear.
17:02 wolverian and in haskell, you don't even need the parens!
17:03 Juerd In soviet Russia, the parens don't need you
17:03 Juerd That's a bit off topic though :)
17:03 * Juerd goes afk
17:03 wolverian a bit :)
17:05 exp_evalbot joined #perl6
17:06 drupek12 joined #perl6
17:06 TimToady hmm, since we restricted adverb args to parens in regexen, maybe :i[ pattern ] would work now
17:07 moritz_ that looks like pattern is an arg to :i
17:07 moritz_ aka weird
17:07 TimToady in a sense it is
17:07 moritz_ I'd say it's the other way round
17:07 TimToady but it's just interpreted as a pattern rather than as an array subscript
17:08 pugs_svnbot r17588 | dakkar++ | better exporting of globals, and simplest 'use'
17:08 pugs_svnbot diff: http://dev.pugscode.org/changeset/17588
17:08 lambdabot Title: Changeset 17588 - Pugs - Trac
17:08 TimToady anyway, :[ a..z ] would be a possibility then
17:16 avar $ echo 'my Num $n = 5; say $n + 1' | perl5.9.5 -Ilib5 kp6-perl5.pl | perl5.9.5 -Ilib5
17:16 avar 6
17:16 * avar plays with kp6 again
17:20 moritz_ #kp6 my Num $n = 5; say $n + 1
17:20 exp_evalbot r17588: OUTPUT[6␤]
17:20 moritz_ avar: less typing ;)
17:22 moritz_ TimToady: S05:907: I think you should explitly allow a StrPos (or StrLen if such a thing exists) here as well
17:25 TimToady I'm not entirely sure the whole hash thing isn't going away, at least for 6.0.0
17:25 TimToady we put it in for STD, and then didn't use it.
17:26 moritz_ it sounds a bit complicated ;)
17:26 TimToady yeah :/
17:27 rhr what is the "false match" thing supposed to be used for?
17:27 moritz_ especially the thing with the number as hash value sound s a bit arbitrary ;)
17:27 rhr that paragraph has always confused me
17:27 TimToady it's for saying "this isn't really a longest token, even if it looks like one"
17:28 TimToady but the whole "use the key as the longest token" thing broke down
17:28 TimToady because we wanted longest token to include anything DFAable
17:28 TimToady and the hash mechanism didn't do inheritance correctly anyway
17:29 TimToady so the user couldn't define new entries without duplicating the hash
17:29 TimToady that's why STD now uses infix:sym<+> and such
17:29 TimToady those can interleave user-defined and standard operators
17:29 moritz_ does any implementation really uses DFAs for DFAable parts?
17:29 TimToady working on it. :)
17:29 moritz_ for metholate?
17:30 TimToady yes
17:30 TimToady my first step is simply to separate the token from the action
17:30 moritz_ is that intented as a complete rule translator, or just as a STD.pm translator?
17:31 pasteling "TimToady" at 71.139.42.152 pasted "hand-coded separate pattern/action" (53 lines, 1.2K) at http://sial.org/pbot/27240
17:31 TimToady only an STD translator for the moment, but a proto of something more general
17:31 wolverian take gather, hm ...
17:31 TimToady well, that's assuming nothing is ratcheting currently
17:32 TimToady I also have a ratchet version hand-coded
17:32 wolverian are you using for loops for side effects? just wondering
17:32 weinig joined #perl6
17:33 pasteling "TimToady" at 71.139.42.152 pasted "non-ratchet version" (57 lines, 1.1K) at http://sial.org/pbot/27241
17:34 TimToady wolverian: no, the for loops are to generate all the possible matches
17:34 TimToady but everything is (mostly) single-assignment or better
17:34 TimToady the ratchet version currently rebinds $_ as a shorthand for nested closures
17:34 wolverian hm, yeah.
17:35 TimToady but the whole thing with the gathers and takes is assuming pure functional programming so that many matches can be "in flight" simultaneously
17:36 TimToady relying on laziness not to generate extra paths through the pattern when they aren't needed
17:36 weinig joined #perl6
17:36 TimToady anyway, it seems to work on the metholated STD, at least up to parsing 42+1
17:38 TimToady in the gather/take version, failure is indicated generally by returning a null list
17:39 TimToady in the ratchet version, I'm currently assuming a boolean status, but it should probably be using definedness as the definition of success if we're to generalize it to logic programming
17:41 wolverian hm.. need a monadzero
17:41 TimToady optimizing non-ratchet to ratchet will be an interesting exercise in determining which rules are 1-1 (or 1-0) vs 1-many, with transitive success taken into account
17:41 moritz_ it's quite impressive how many matches are performed to parse something as simple as 42+1 ;-)
17:42 TimToady because the scope of the gather has to be determined
17:42 TimToady most of those are unnecessary, assuming a longest-token autogenerated lexer
17:42 TimToady I only weed out some of the constant string matches currently
17:42 TimToady could extend it into <?before <sym>> matches, but that's a hack anyway
17:43 TimToady really needs to walk the tree to make the token/action separation
17:43 TimToady but I wasn't in a hurry to do that optimization because I wanted to exercise a lot of STD code anyway
17:44 TimToady most of the time is still pugs reparsing anyway...
17:44 buetow joined #perl6
17:44 TimToady when the thing stabilizes it'll definitely be a candidate for precompilation
17:44 thoughtpolice joined #perl6
17:45 TimToady still don't quite have binding working right yet either
17:45 rindolf joined #perl6
17:45 TimToady I can attach names to matchstates, but .matchify isn't quite succeeding in pulling them all in to the new Match object, or maybe it's losing track of them after
17:46 TimToady since these states are continually cloning themselves
17:46 wolverian O
17:46 wolverian er
17:46 wolverian I'm a couple of compiler courses behind
17:47 TimToady well, I've only ever had one compiler course, and didn't grok most of the theory...
17:47 TimToady for many years I relied on yacc to tell me what it thinks.
17:48 drupek12 joined #perl6
17:48 TimToady but yacc isn't up to doing Perl 6
17:48 wolverian well, I'm a couple of years of practical use behind too :)
17:49 TimToady well, to the first approximation the Perl 6 compiler is simply recursive descent, with a bit of operator precedence thrown in for good measure
17:49 TimToady that's all
17:49 TimToady most of this recent fanciness is just from attempting to autogenerate a lexer from the grammar
17:50 TimToady well, and all the extensibility stuff is also basically research
17:52 TimToady most everything else is just sugar :)
17:52 pugs_svnbot r17589 | dakkar++ | documentation!
17:52 pugs_svnbot diff: http://dev.pugscode.org/changeset/17589
17:52 lambdabot Title: Changeset 17589 - Pugs - Trac
17:58 moritz_ STD.pm seems to parse 42+1*2 as well
17:58 moritz_ though I have now idea if the output is correct
18:00 TimToady actually, that's not the ratchet version that works, since captures are problematic
18:00 pugs_svnbot r17590 | dakkar++ | updated the example
18:00 pugs_svnbot diff: http://dev.pugscode.org/changeset/17590
18:00 lambdabot Title: Changeset 17590 - Pugs - Trac
18:01 pasteling "TimToady" at 71.139.42.152 pasted "ratchet version that actually works" (56 lines, 1.1K) at http://sial.org/pbot/27242
18:02 pmurias fglock: is it possible to make kp6 report the line where the syntax error occured
18:02 pmurias ?
18:03 pugs_svnbot r17591 | lwall++ | [Cursor] work around a pugs limitation
18:03 pugs_svnbot diff: http://dev.pugscode.org/changeset/17591
18:03 lambdabot Title: Changeset 17591 - Pugs - Trac
18:04 Psyche^ joined #perl6
18:08 pmurias #kp6 return("ok")
18:08 exp_evalbot r17591: OUTPUT[Can't return outside a subroutine at - line 15.␤]
18:08 pmurias #kp6 return ("ok")
18:08 exp_evalbot r17591: OUTPUT[Can't return outside a subroutine at - line 15.␤]
18:08 pmurias #kp6 do{return ("ok")}
18:08 exp_evalbot r17591: OUTPUT[Can't return outside a subroutine at - line 15.␤]
18:08 pmurias #kp6 do{return("ok")}
18:08 exp_evalbot r17591: OUTPUT[Syntax Error␤DISPATCH: calling APPLY on invalid object:$VAR1 = {};␤␤ at lib5/KindaPerl6/Runtime/Perl5/MOP.pm line 32␤  main::DISPATCH('undef', 'APPLY') called at - line 15␤]
18:24 pugs_svnbot r17592 | pmurias++ | work on Rule::Block but with little succes
18:24 pugs_svnbot diff: http://dev.pugscode.org/changeset/17592
18:24 lambdabot Title: Changeset 17592 - Pugs - Trac
18:26 moritz_ #kp6 sub foo { return 'bar'; }; say(foo());
18:26 exp_evalbot r17591: OUTPUT[bar␤]
18:26 moritz_ #kp6 sub foo { for 1..10 { return 'bar';}; }; say(foo());
18:26 exp_evalbot r17591: OUTPUT[error in Block at lib5/KindaPerl6/Grammar.pm line 6, <> line 1.␤Illegal declaration of subroutine main:: at - line 1.␤]
18:34 devogon joined #perl6
18:42 buetow joined #perl6
18:42 pbuetow joined #perl6
18:44 buetow__ joined #perl6
18:47 ofer joined #perl6
18:50 buetow__ joined #perl6
19:00 AzureBOT joined #perl6
19:01 pbuetow joined #perl6
19:01 szbalint joined #perl6
19:09 AzureBOT joined #perl6
19:15 jisom joined #perl6
19:19 buetow joined #perl6
19:30 TimToady_ joined #perl6
19:46 Aankhen`` joined #perl6
19:58 weinig joined #perl6
20:15 DarkWolf84 joined #perl6
20:15 renormalist joined #perl6
20:37 explorer joined #perl6
21:14 pugs_svnbot r17593 | lwall++ | 1st whack at splitting rules into token/action subparts
21:14 pugs_svnbot diff: http://dev.pugscode.org/changeset/17593
21:14 lambdabot Title: Changeset 17593 - Pugs - Trac
21:47 zamolxes joined #perl6
23:29 pugs_svnbot r17594 | lwall++ | Mustn't use return from a rule closure
23:29 pugs_svnbot diff: http://dev.pugscode.org/changeset/17594
23:29 lambdabot Title: Changeset 17594 - Pugs - Trac
23:34 amnesiac joined #perl6
23:47 araujo joined #perl6
23:54 ozo left #perl6

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

Perl 6 | Reference Documentation | Rakudo