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