pugs.blogs.com | pugscode.org | pugs.kwiki.org | paste: sial.org/pbot/perl6 | <stevan> Moose... it's the new Camel ":P | .pmc == PPI source filters!
Set by Alias_ on 16 March 2006.
mugwump wow, ghc6 still building 00:08
00:13 ayrnieu joined 00:14 ayrnieu_ joined
svnbot6 r9796 | mugwump++ | docs/Perl6/Spec/Documentation.pod: respond to first discussion point 00:17
mugwump TimToady: you around? You have a lot of questions on the S26 draft... 00:18
TimToady: much of the early design on Perldoc came from a few principles; 00:24
1. incorporating information from Code into the Documentation (a la OODoc) should happen through a plug-in
2. the PDOM tree can have arbitrary weird stuff, but it should know how to transform itself to a standard tree, so that people postprocessing it can just deal with a set of standard node types 00:26
00:29 ayrnieu_ is now known as ayrnieu
mugwump 3. the structure should be able to be "flattened" in a sane way without losing information, for instance output to XML, both in the unprocessed (where special nodes may exist) and processed (where they may not exist) stages 00:29
As for the 'containment' stuff... 00:33
I really wanted to make sure that you didn't need to parse POD to tell where it starts and ends, you see
So that the actual conversion from source to a $?DOC style object can be lazy and not hold up parsing of a source file 00:34
I'll put that in the document as annotations... 00:41
00:46 Khisanth joined 00:47 rashakil left 00:50 rashakil joined 01:04 f0rth_ is now known as f0rth
svnbot6 r9797 | mugwump++ | docs/Perl6/Spec/Documentation.pod: continue to feed back on discussion points 01:18
tewk quick perl5 question How do I pass a reference to an anonymous sub as and argument 01:34
myfunc( \&sub { print "Hello World\n"; } ??
svnbot6 r9798 | mugwump++ | docs/Perl6/Spec/Documentation.pod: correct incorrect comment
mugwump tewk: myfunc( { say "Hello World" } ) 01:35
zgh in perl5 it's "myfunc( sub { print 'stuff' } )" I think 01:36
mugwump oh, whoops :) 01:37
tewk zgh: thanks I was putting a ; after 'stuff' 01:38
zgh tewk: glad to help
tewk myfunc( { print 'stuff' } ) seems to work.
zgh a ; after 'stuff' should work tho... as long as it's inside the }
tewk: unadorned {} would create a hashref not a subref.... you'd need sub {} to create a subref. 01:40
01:40 Leandro- joined
zgh in perl5 that is 01:40
tewk ok 01:41
Leandro- pastebin.com/631886
anybody can see why dont return anything?
audreyt $x = &y 01:42
this now means
$x = \&y # in p5
to call it you need to
$x = y();
$x = y; # should also work
mugwump audreyt: do you have a working draft for your EuroOSCON talk? I'll be presenting findings in this field to an interested local .pm group 01:45
once I get up to speed ;)
or maybe some hints about getting `use v6-pugs' working? 01:47
01:48 weinig joined
audreyt mugwump: no, I do not have a working draft 01:52
mugwump: v6.pm should work the way any Module::Compile subclass works, namely calling lrep.p6 (or a modular API of it thereof) and generate p5 code, then return the compiled code (probably bundling the runtime reqs if needed) 01:53
mugwump: I'm not sure if I'll be in euroscon (havn't heard anything yet, submitted past deadline) 01:54
avar since automatic list/array flattening is gone, does (@a,@b) equal (\@a,\@b) in p5 or does p6 support arrays inside arrays?
audreyt avar: automatic flattening is alive and well in list context
mugwump: but the same talkis accepted in YAPC::NA
avar was under the impression that it wasn't 01:55
TimToady avar: you can't prejudge which arguments of (A,B,C,D) are in scalar vs list context.
zgh how very unperlish that would be...! I'm glad autoflattening is sticking around. 01:56
TimToady In general the flattening has to be done at parameter binding time.
Fortunately @foo and %bar don't need to know context beforehand.
Unfortunately, baz() does, so must sometimes guess list context. 01:57
merlyn Having wrestled with a few people about the "/ means divide and regex" issue over the past few weeks again, I'm curious about how perl6 is finally resolving that. Does / no longer mean both divide and regex, or do prototypes go away?
TimToady Unless baz() is also evaluated lazily, which has its own problems, esp if you want to do MMD.
merlyn or will you need to execute code to compile code?
s/compile/lex/
cuz you can't have all three at once. :) 01:58
TimToady We still resolve lots of syntax by expecting op vs term. Is that what you're asking?
merlyn so is there still the equivalent of prototypes?
user defined code that can provide syntax nudges?
theorbtwo merlyn: Yes, you will, but we're hoping to provide better tools to allow perl to do the parsing perl for you. 01:59
mugwump Hmm, YAPC::Eu and EuroOSCON seem close enough together in space and time to go to both with a hackathon in between...
avar TimToady: I think he means will we have something like:
theorbtwo Both of those features become more powerful, in fact.
svnbot6 r9799 | fglock++ | PCR - implemented <before ...>
TimToady hopefully we've tamed the syntax nudges to not have P5's problems.
avar BEGIN { eval (time % 2) ? 'sub x ($) {}' : 'sub x (@) {}' }
x / ....
merlyn so the idea of the "simple pipeline" from lexer to compiler to intermediate code to execution engine is still messy because you have be executing during even the lex
I think the people of this channel understand the problem 02:00
avar ;)
merlyn just wondering the current state of thinking about the solution
TimToady well, we still have that particular problem.
merlyn it means you have to execute *some* code to lex *other* parts.
so there's no such thing as a standalone P6 -> PIR for example
it's gotta have an execution engine in it
theorbtwo merlyn: I think the solution is mostly in providing hilighters and the like to simply ask perl to do their dirty work, instead of having to reimplement perl. 02:01
merlyn I keep seeing allison talk about this wonderful abstraction. I'm wondering how long before the bunny in the hat dies. :)
theorbtwo Also, we're providing more mechnisims to write macros without warping the lexer stage, unless you really want to warp it. 02:02
merlyn theorbtwo - +1 for "missing the point".
Maybe I should have described it better for you.
theorbtwo merlyn: Perhaps you should have, yes.
merlyn Larry and I have talked about this offline. Maybe I'm presuming that this is a continuation of that discussion, rather than starting from scratch.
theorbtwo Is your issue with security/trust, or simply with writing tools that work correctly for the interesting cases?
merlyn my issue is knowing how Perl can interpret "/" without executing code. It must. 02:03
therefore, there can't be a "compile" step that doesn't have an execution engine too.
TimToady that is correct.
theorbtwo Correct.
merlyn OK, so allison's models are somewhat handwaving then.
audreyt merlyn: interleaved execution is neccessary 02:04
theorbtwo Most models are. Otherwise, they wouldn't be called models.
audreyt the TGE model can emulate it via saving all object space
merlyn since they seem to imply that text becomes AST becomes PIR then gets executed
audreyt and resume the compile cycle recursively as needed
merlyn how does pugs deal with that? can the execution affect the lexer?
TimToady the hope is that by making all the "desugaring" via explicit mechanism rather than deep magic, we can keep better track of the current language. 02:05
audreyt merlyn: yes, the way we do it is to use /...{...}.../
merlyn: same as p5's /...(?{...}).../
mugwump Generating precompiled Prelude... pugs: internal error: scavenge_one: strange object 68
TimToady only better. :)
mugwump ^^ grr, I assume that's the mysterious amd64 error that means you need ghc6.4.1
merlyn OK, I'm happy. I just wanted to get resynced. :)
audreyt TimToady: actually, well, after dave's work this week 02:06
I'd say it's similar :)
merlyn because allison's handwaving was blowing me away. :)
TimToady dave++
theorbtwo Oh, I didn't realize that pugs had gotten that far -- I thought that was only lrep doing that.
Colour me impressed.
merlyn what's the state of the p6 rules engine running native on p5?
audreyt theorbtwo: pugs had been doing that (via parsec) since 11 months ago :)
merlyn is that cpan'ed, useable?
or perhaps even in the p6 svn?
audreyt theorbtwo: but parsec<>rule transofmration is the next step and needs work 02:07
merlyn: it's cpaneed and usable
merlyn named ?
audreyt search.cpan.org/~fglock/Pugs-Compiler-Rule-0.02/
merlyn Cool. I'm doing a column on that then. 02:08
audreyt merlyn: I think the Perl6::* namespace is somewhat cursed
at least for code
so I'm trying to push implementation into Pugs::* or Module::* or other regular cpan spaces
merlyn I want to rewrite my "spew" away from Parse::RecDescent to a different system.
TimToady Perl6:: is really Perl6Acme::
audreyt TimToady++
merlyn yeah... anything scrottie wrote about is a bit scary.
The Book That Shouldn't Have Been 02:09
audreyt with regard to CPAN, I think the "p6 is a language and we currently call implementations by other names (lrep, pugs, etc)" explanation works better
theorbtwo Oh, the perl6 today book.
TimToady "this book fills a much-needed gap."
audreyt than explaining the relationship between Perl6:: and Perl 6
TimToady: that quote is so "inteesting" on so many levels :) 02:10
"interesting" even
TimToady "What is the name of this book?"
theorbtwo thinks the interesting bit is mostly how much people want perl 6 to be here already. 02:11
merlyn "he's typing as fast as he can!"
audreyt theorbtwo: aye.
theorbtwo I see encouraging signs that it might happen this decade. ;)
02:12 fglock_ joined
TimToady I think it'd be cool if we had something by Perl's 20th birthday. 02:12
which is when you come of age in Japan.
audreyt (also .cn and .tw)
TimToady they even have a special word for it: "hatachi"
audreyt TimToady: you are going to declassify the info?
the birthday of perl 02:13
audreyt gets ready to submit a perlhist.pod patch
miyagawa TimToady: and we have "Seijinshiki", the ceremony for Hatachi
TimToady the birthday doesn't need to be declassified. The conception is another matter.
theorbtwo wonders if hata-, perchance, means 20.
merlyn I was just commenting to someone today about perl being 19 this year.
and realizing how old that makes me. :) 02:14
SamB is 19
fglock_ merlyn: are you going to write on Pugs::Compiler::Rule?
merlyn fglock - I might
if I can get my "spew" thing working
TimToady written äŗŒåę­³
merlyn it's not that hard. In fact, I thought about handwriting a rec-decent parser already using normal regex.
but if I could write it as P6Rules... even better. 02:15
theorbtwo learned how to use a computer, but not how to program, before perl was born... I think.
merlyn had already written a shelf-full of books before Perl came along
fglock_ please let me know if you have problems - I'd be glad to fix bugs in PCR
merlyn And now the Perl books to which I've contributed fill an entire shelf!
In fact, I'm running out of room now.
audreyt merlyn: you are aware of my work on Template::{Extract,Generate} right? 02:16
merlyn I had to wedge "Intermediate Perl" in the last free space along the top of a bunch of other books.
audreyt - of course.
Oh wait, recent work?
audreyt ok. you may find svn.openfoundry.org/pugs/misc/pX/au...-templates amusing then
no, previous work
merlyn OK, yes, I had looked at those at one point to do interesting things. 02:17
audreyt right. now the bad idea of the day is using p6 ules
theorbtwo I think an article on PCR would be very interesting -- but would probably be too long.
audreyt as a templating system
theorbtwo ...also, you might want to hold off until the CAVEATS section no longer says "It is currently unsuitable for just about any use other than Pugs development.:
merlyn Oh, slick.
"spew" is pretty lightweight 02:18
the grammar is only about ten lines
... www.stonehenge.com/merlyn/LinuxMag/col04.html 02:19
lines 31 to 65 - a new definition of "ten". :)
fglock_ merlyn: you can already compile p6 grammars to p5 - but this part is not published yet. PCR grammar is written in p6
merlyn wait - I thought I coudl use the CPAN'ed module with Perl5? no? 02:20
fglock_ theorbtwo: that will be removed in apr 1st :)
theorbtwo Ah, yeah, p6 rules are no more complicated here then PRD.
Cool, fglock.
merlyn darn it... I talk to someone from south america and my word order becomes spanish. :)
I even speak in my head with a crazy accent. :) 02:21
theorbtwo Oh, that reminds me, I'd better write my PM april fools joke for the year.
fglock_ merlyn: the p6 grammar (.pm) is compiled to p5 (.pmc) - see audreyt work on 'use p6-pugs'
Makefile.PL will recompile the grammar if necessary - but you need the pugs svn version - the CPAN version doesn't have the compiler bundled 02:23
merlyn well - what I'm looking for is how to compile my rules, and then run them against an input to get an AST back 02:25
less than an AST, actually. just a nice data structure
theorbtwo "Match object" is the term you're looking for.
TimToady fglock: s/use p6-pugs/use v6-pugs/ I think 02:26
02:26 colares joined
merlyn well - not the match object directly 02:28
a table of items and their expansions in a nice hash
fglock_ you can use a return block: my $dot = Pugs::Compiler::Rule->compile( q( \. { return { 'dot' => 1 ,} } ) ); 02:29
$match = $dot->match( '.' ); print Dumper $match->(); 02:31
with the p6->p5 compiler this gets much cleaner 02:33
meppl gute nacht 02:35
TimToady
.oO(someone just spat on my shoes)
meppl: oyasuminasai! 02:36
02:36 fridim joined
fglock_ merlyn: there aren't many examples or docs - I'm still focusing on the implementation. The test files may help - see the last tests in svn.openfoundry.org/pugs/misc/pX/Co.../04-rule.t 02:39
meppl what?
fridim hi all 02:40
audreyt naps some more. bbiab... & 02:42
02:47 r0nny joined
fglock_ wonders if implementing a standalone 'Grammar' compiler would be a good idea 02:49
s/standalone/Pugs::Compiler::Grammar module/ 02:53
TimToady meppl: s/oyasuminasai/gute nacht/ 02:54
fglock_ midnight here &
TimToady ę—„ęœ¬čŖžć€€--> Deutsch 02:55
02:55 fglock_ left
theorbtwo wants to be able to s:e/(<german>)/english($1)/ 02:56
mugwump theorbtwo: use Lingua::Translate! :)
theorbtwo mugwump: I have, from time to time. 02:57
02:57 ko1_away is now known as ko1_
meppl ;) 02:57
theorbtwo Sadly, p6 already has plenty of problems without adding hard AI to the list.
fridim I am not sure to understand : will pugs be the futur compiler of perl6 ? 02:59
(for parrot)
theorbtwo My, perlmonks becomes slow to load, and I get all cynical.
fridim: Pugs will be able to compile perl6 to pugs. If it will be "the future compiler", as in the one and only, is a much harder question. 03:00
fridim ok, so can i say that we are far away perl running in parrot ? 03:01
theorbtwo If I recall correctly, compiling perl6 to pugs is working now, at least for some code. 03:02
mugwump fridim: I'd say it's fairly safe to say we are far from a complete implementation of perl6 capable of compiling to parrot, yes 03:03
fridim you mean : pugs test.pl6 works i guess
mugwump sorry, I meant "capable of compiling itself to parrot" 03:04
just how far is a matter of debate. Perhaps if the work being done to convert the Haskell source code to a pugs language starts working, it will surprise everyone by arriving soon. 03:05
03:30 xinming_ is now known as xinming 03:34 Shabble joined 03:43 pdcawley_ joined 03:47 sky__ joined 04:23 Quell joined 04:33 mako132_ joined 04:39 FurnaceBoy_ joined 05:10 nothingmuch joined
mugwump ok, I've got pugs going with ghc6.4.1, and I try a simple test case: use v6-pugs;\nsay "Hello, world\n" - then run that with perl, and it doesn't work... 05:12
there's just a process 'pugs -e my$Z= =$*IN;while 1{$_=perl eval eval=$*IN;print$Z;say$!//$_;print$Z;flush$*OUT}' waiting for input
that's happening at BEGIN time 05:13
nothingmuch morning 05:14
mugwump hey nm
ok, so my test script, if I run it with perl -d, and wait for the CPU to finish, then press Ctrl+C, my program runs :) 05:15
er, wait for the CPU activity to settle
the example on the `v6' perldoc page also does very weird things 05:18
any ideas? 05:19
05:25 amnesiac joined 05:28 Quell joined
mugwump ok, I now have Module::Compile et al installed :) but no change 05:33
hmm, same thing with Inline::Pugs 05:35
audreyt right
v6 is just using Inline::pugs for now
it needs to switch to M::C
mugwump the Module::Compile on CPAN or the one in the pugs tree? 05:38
05:38 tennin joined
audreyt well, they are synced regularly, but use the perl5/ 05:38
tennin wow, that XUL Haskell introduction is impressive 05:39
mugwump they look wildly different to me, esp. in t/
05:45 nirgle joined
spinclad .oO { and so... one day remains } 05:51
05:59 bernhard joined
gaal morning 06:01
nirgle hi
gaal ho 06:02
audreyt gaal: yo 06:11
svn.openfoundry.org/perlsyck/
ou are metacommitter now 06:12
gaal whee :) 06:14
did you look at the problem?
audreyt looking now, just want you to check out the repo
gaal sure, am
audreyt: btw: your ideas for Template::Patch very, very, welcome. Especially on how to exploit Template::Generate for a metadiff tool }:) 06:15
06:15 nirgle left
audreyt gaal: I want to redo it as a fronend to Harmony 06:16
gaal link error: undefined symbol: Harmony 06:17
06:18 GeJ joined
gaal can someone explain the cpantesters errors here? - 06:19
1. www.nntp.perl.org/group/perl.cpan.testers/302149 - looks like it gets the dependency, but gives up on building it 06:20
2. www.nntp.perl.org/group/perl.cpan.testers/301664 - it doesn't trust my signature? okay, how do i get it to be trusted?
3. www.nntp.perl.org/group/perl.cpan.testers/301587 - why does it not attempt to follow the dependency?
also, shouldn't I be getting these failure reports by email? 06:21
mugwump hmm, lrep-compiler uses Inline::Pugs ? 06:25
oh, via v6-pugs 06:26
which is not working for me. blast.
audreyt mugwump: the other way around more likely
mugwump: they are not hooked with each other yet
mugwump It's including Pugs::Grammar::Rule 06:27
which is `use v6-pugs'
I'm looking for the right thing to do in v6.pm
but I don't see the magic entry point in this lrep stuff :)
Maybe if I could get Inline::Pugs working I could bootstrap myself 06:28
audreyt gaal: is your structure self recursive?
gaal no 06:29
audreyt mugwump: huh
P::G::R doesn't use v6-pugs
oh, you mean P::G::R::R
mugwump right, yes
gaal audreyt: the only weird thing about it is that it's a Class::Accessor::Ref object
audreyt mugwump: the glue is mostly in Makefile.PL in perl5/Pugs-Compiler-Rule/MAkefile.PL 06:30
gaal a blessed-hashref thing in which some fields were tweaked by ref
GeJ localtime() moosefolks 06:31
mugwump so, in misc/pX/Common/lrep-compiler, there is a p5 `lrep', presumably the perl 5 compilation of `lrep.p6'
If I run `pugs lrep.p6' I get:
06:31 fordinal joined
mugwump pugs: *** Can't locate warnings.pm in @*INC (...) 06:31
audreyt mugwump: lrep.p6 isn't to be compiled by pugs 06:32
it's to be compiled by itself
pugs-haskell has nothing to do with the lrep tree
mugwump ok
audreyt (please see README - if it's unclear please fix README)
mugwump ah, Common/README 06:33
no, nothing there 06:34
audreyt k... please fix - I meant ~/work/pugs/misc/pX/Common/lrep/README
mugwump oh yay 06:35
svnbot6 r9800 | mugwump++ | Add pointer to best README of the bunch :) 06:37
audreyt anyone got a 5.6.x? 06:38
mugwump sure 06:39
5.6.1
audreyt mugwump: try perlcabal.org/~autrijus/tmp/YAML-Sy....40.tar.gz 06:40
mugwump All tests successful, 1 test skipped.
t/json-basic....skipped all skipped: No Unicode support
audreyt miyagawa: authors/id/S/ST/STENNIE/camelpack/perl-camelpack-5.6.1.exe 06:41
mugwump: good, thanks!
gaal audreyt: do you see the problematic behavior? 06:45
audreyt gaal: yes
but very hard to reduce
I'd like a Storable image and a test vs Data::Dumper 06:46
gaal yeah :/
audreyt I'll switch to another context for the moment
gaal sure. (it's not just any C:A:R object that exhibits this behavior... I'll try reducing this but am switched to Class::Rebless context myself now) 06:47
audreyt k 06:50
06:51 iblechbot joined
mugwump boggles that p6compiler can compile lrep.p6 but not Ā«say "Hello, world"Ā» 06:53
wow, cool to see the proof of concept working though. 06:56
but for now, off for a weekend! :) 06:57
07:17 KingDiamond joined 07:25 ghenry joined
gaal sure. (it's not just any C:A:R object that exhibits this behavior... I'll try reducing this but am switched to Class::Rebless context myself now) 07:30
(oops)
07:36 rgs joined 07:38 KingDiamond joined 07:42 vel joined 07:53 KingDiamond joined 08:06 xinming1983 joined 08:15 kane_ joined 08:20 xinming1983 joined 08:26 xinming1983 joined 08:28 xinming1983 joined 08:33 xinming joined 08:40 tomyan joined 08:41 nothingmuch joined 08:58 nnunley joined
wolverian heh, headexplode: ARGV->[0] 09:06
09:07 tennin left
wolverian heh, pseudoboolean context.. 09:11
today is obviously a headache day
09:12 xinming joined
gaal wolverian: that's a desugaring trick 09:17
wolverian gaal, yeah, it's neat. 09:18
gaal $arrayref->[0] === $$arrayref[0]
x-> === $x
where's pseudoboolean context? 09:19
svnbot6 r9801 | gaal++ | r9834@sike: roo | 2006-03-31 12:13:17 +0300
r9801 | gaal++ | * Update Class::Rebless to 0.05
wolverian gaal, lhs of || and rhs of &&
gaal do you have a particular case in mind? 09:20
audreyt isn't it just boolean context?
wolverian audreyt, you can return meaningful values. I'm not sure if that counts as special in perl5 (everything is special here), but it strikes me as a bit odd. 09:21
audreyt well, it's everywhere in p6
if f() -> $x { ... }
f() could return 3
under boolean context
wolverian found it in the Context::Handle docs
audreyt the if() gets the rvalue first 09:22
and then cast it as boolean for testing
if it's true then it goes binding the original rvalue into $x
but want() inside f() would say Bool
wolverian hmm. yeah. that's the other way around compared to if (my $x = f) { ... }
interesting. :)
audreyt but in p6 that my would scope over the outer scope 09:23
not limited in the ...
wolverian yeah, I just meant the order of .. context ..
(and it was perl5 code) 09:24
audreyt k
wolverian never mind me, I'm just confused and interested :) 09:25
kallianka question: shouldn't ~@k.say do the same as (~@k).say? 09:26
audreyt I think it parses as ~(@k.say) 09:32
so, no
wolverian prior art: !$foo->bar; 09:33
kallianka ahh
I just expected the latter behavior...
wolverian why? would you have expected it with another method, not .say?
audreyt I like the fact that .method() binds tightest 09:34
kallianka I don't know, I guess I think that a . look separating 09:35
I'm going to think about this a bit I think... ;) (just learning p6 now) 09:36
no, it was probably only with .say... 09:39
09:39 rindolf joined
rindolf Hi all! 09:39
audreyt: here?
wolverian afternoon
rindolf wolverian: it's morning here.
wolverian heresy :) 09:40
09:40 KingDiamond joined
rindolf I'm also looking for nothingmuch 09:40
KingDiamond: are you the Premshree that gave some presentations about Ruby in OSDC::Israel::2006? 09:45
09:47 renormalist joined 09:50 ruz joined
rindolf audreyt: here? 09:50
pasteling "renormalist" at 195.30.114.50 pasted "how to do in place sorting" (40 lines, 927B) at sial.org/pbot/16545 09:52
09:52 elmex joined
integral @rray .= sort; ? 09:52
renormalist pls see the example, I want to sort on %Hash.values
integral renormalist: why are you initialising your hash with a hash reference? 09:53
.oO( that works in p6?! )
09:54 xinming joined
wolverian integral, no. 09:54
or rather, yes, but it doesn't flatten.
integral then what on earth is renormalist meaning when he says one version of his code works?
renormalist uncomment the second variant to try the first one 09:55
wolverian oh, wow. strange
my %ok = { a => "b" }; # %ok is ({a => "b"}), %ok.keys is ("a")
it's as if %ok was really $ok. :) 09:56
renormalist integral: right, hashref is stupid. changed to %SomeHash = = (...), but it wasn'tnot the problem 09:57
10:00 marmic joined
renormalist is the some kind of data dumper in pugs? I don't know how to pretty print nested structures 10:03
audreyt .perl 10:04
or .yaml 10:05
10:06 premshree_ joined
rindolf audreyt: hi. 10:12
audreyt: I converted my Perl QOTW #8 (Graham Number) script to Perl 6. Problem is that it may not be too perl6y. What should I do with it? 10:13
audreyt commit it to examples/qotw 10:15
rindolf audreyt: OK. 10:16
renormalist my example seems to be rubbish, I'm still too unfamiliar with p6 syntax, I want to do the following Perl5 snippet in Pugs: 10:25
pasteling "renormalist" at 195.30.114.50 pasted "perl5: in place sorting of a nested structure --> ho to do in pugs?" (43 lines, 903B) at sial.org/pbot/16546
svnbot6 r9802 | shlomif++ | Added the QOTW 8 Expert solution in Perl 6. 10:28
audreyt %SomeHash .= sort({ $^a<vtrnr> <=> $^b<vtrnr> }); 10:29
oh wait, no 10:30
10:31 nothingmuch joined
audreyt %SomeHash = zip(%SomeHash.keys; %SomeHash.values.sort({ $^a<vtrnr> <=> $^b<vtrnr> })); 10:31
er, wait, no
nothingmuch morning 10:32
audreyt %SomeHash{$_} .= sort({ $^a<vtrnr> <=> $^b<vtrnr> }) for %SomeHash.keys
nothingmuch goes to learn some mochikit 10:33
renormalist audreyt: thanks, it works. I tried to work directly on .values to avoid the %SomeHash{$_}, should this be possible? 10:35
audreyt it should. it's a bug... look around for a test and if it's not write a t/pugsbugs/? 10:36
look around, as in grep for .values in t/
renormalist m'kay
LeTo audreyt: I'm looking for some pugs doc with a list of all value types 10:37
audreyt LeTo: I'm committing into synopsis at this moment 10:38
rindolf nothingmuch: what's mochikit?
audreyt LeTo: though user can define their own value types
LeTo: also, I confirmed with TimToady 10:39
rindolf nothingmuch: I'd like to ask you some questions about rt.cpan.org/Ticket/Display.html?id=7172
audreyt the way allison put it... namely the way parrot works now
LeTo k - a list of core values?
audreyt is broken. what should work is
my Int $x = MAXINT();
$x.class # Int
$x++;
$x.class # Int
LeTo audreyt: I know
audreyt that's the semantic. it can't become BigInt from an "int"
also another news: ::Int is to support +Inf -Inf and NaN 10:41
nothingmuch mochikit is $google->im_feeling_lucky("mochikit")
LeTo what is a Int NaN?
audreyt LeTo: persumably the bigint encoding has special bitfields just like Num
nothingmuch rindolf: i needed custom logging of exceptions 10:42
audreyt i.e. the native encoding still uses native-bit-sized ints
nothingmuch to preserve full error history in the DB for certain subclasses
err
certain error classes
audreyt but if it has the bigint tag on, the bigint part needs to represent the out of bound errors
LeTo k 10:43
rindolf nothingmuch: I see. 10:45
nothingmuch: but the record() method is not implemented in the patch.
nothingmuch: nor is there documentation for it.
nothingmuch bummer 10:46
;-)
the author warnocked it and I don't need it anymore
i didn't even get questions
so as far as I'm concerned it can be closed as abandoned 10:47
rindolf I have a maintenance branch of Error.pm now, so I'm trying to close the bugs in RT.
nothingmuch iirc it's not much more than slight refactoring
rindolf nothingmuch: what's "warnocked"? 10:48
nothingmuch ignored
rindolf nothingmuch: I see.
nothingmuch: is it hackers' slang? (It's not in m-w.com) 10:49
nothingmuch: the author hasn't been responsive since 2002 or 2003.
nothingmuch en.wikipedia.org/wiki/Warnock 10:50
rindolf nothingmuch: I see. 10:59
nothingmuch rindolf: did you get pause maint access? 11:02
rindolf nothingmuch: not yet. 11:03
nothingmuch: use.perl.org/~Shlomi+Fish/journal/29151 11:04
nothingmuch btw, do you know of the leak problem? 11:05
rindolf nothingmuch: no. 11:06
11:07 chris2 joined
nothingmuch closures in Perl are not destroyed 11:07
and additionally they used to (for a very long while) not destroy captured stuff IIRC
and also leak stuff on each capture
at least two of these statements are true ;-) 11:08
anyway, this has given Error a very bad rep, since it's interface causes accidental capturing of values quite commonly
*its
rindolf nothingmuch: is there any solution for this? 11:09
nothingmuch Dave Mitchell recently fixed all the leaks
wait, i'll demonstrate
rindolf nothingmuch: in perl5? 11:10
nothingmuch yes 11:11
perl -e 'sub DESTROY { warn "destroy" }; my $y = do { my $x = bless {}; sub { $x } }; warn "capture"; undef $y; warn "global"'
this demonstrates captured data destruction
traditionally Error's biggest problem
in perl 5.8 it's fixed
this demonstrates that code refs never get destroyed: perl -e 'sub DESTROY { warn "destroy" }; my $y = do { my $x = bless sub {}; sub { $x } }; warn "capture"; undef $y; warn "global"' 11:12
(they may be cleaned up in a timely fashion but DESTROY is never triggerred)
as for leaks: you need to monitor the size of the process 11:13
which is not very portable 11:14
use the Gtop module in linux
something like { for (1 .. 10000 ) { my $x = sub { } }
and also { for (1 .. 10000 ) { my $y = do { my $x = 1; sub { $x } } } 11:15
audreyt LeTo: committed! 11:16
LeTo S-which one?
nm 11:17
11:17 damn_I_am_good joined, TimToady joined
LeTo audreyt: mutable (container) types ... +C<Code> ? 11:19
audreyt upon further discussion 11:20
it's now +C<Routine>
committing 11:22
rindolf nothingmuch: OK. 11:26
11:35 pmurias joined
pmurias hi all 11:36
audreyt hi 11:42
11:56 kisu joined
LeTo audreyt: ping 12:07
audreyt LeTo: please see the new S06
LeTo k
12:07 elmex joined
pmurias a perl5/perlmonks question: is the source to the chatter-box avaliable and what is it's license? 12:07
LeTo audreyt: please check: lt@feather:~$ ls dev-doc/Var_Value.pod 12:08
audreyt looking 12:09
LeTo: S06.pod now has a more comprehensive list 12:10
12:10 xinming joined
LeTo reading ... 12:11
Juerd spo0nman: You have mail 12:14
12:15 Aankhen`` joined
Juerd There was someone else who requested an account. I accidentally deleted the mail, thinking it was spam. Please resend, if you requested an account and haven't received it yet. 12:15
premshree_ I think it was spo0nman 12:27
pmurias Juerd: i sent a request recently 12:28
i resent it just now 12:29
audreyt LeTo: 29bits for pointers?
LeTo were are the 29? 12:30
audreyt Any other PMC | pointer |00|
?eval 32-2
sorry, 30bits
12:30 evalbot_9777 is now known as evalbot_9802
evalbot_9802 30 12:30
LeTo well, the lo 0 bits are of course part of the pointer 12:31
audreyt sure
30 effective bits
LeTo yep
audreyt looks sane. 12:34
LeTo thx
audreyt YARV is reusing the VALUE structure
so what you proposed works in ko1_'s tree as well
Juerd pmurias: tak 12:35
12:41 xinming1983 joined
Juerd pmurias: Haven't received anything. Where did you send it? 12:41
pmurias: Got it now 12:43
pmurias jurd at convolution.org (typo) i resent it once again to [email@hidden.address] 12:44
Juerd: beware that both "tak" and "no" mean yes in polish
azuroth heyy, psycho killer 12:46
Juerd pmurias: "tak" is Danish for "thanks" 12:47
12:47 fglock joined
pmurias hi fglock 12:47
Juerd pmurias: You've got mail. 12:48
pmurias: Isn't it incredibly confusing to learn English, where "no" doesn't quite mean "yes"? 12:49
svnbot6 r9803 | fglock++ | PCR - <after ..> insfrastructure (not in API yet) 12:50
fglock pmurias: hi! 12:53
12:53 premshree_ is now known as KingDiamond 12:58 gabor529 joined 13:00 mako132_ joined
fglock it would be nice to have a specification for the 'base' p6 language - the thing that gets loaded before the 'prelude' - mainly, what are the syntax categories - this has been implementation specific so far (just like the AST) 13:02
pmurias Juerd: just amusing; loged into my new bright and shinny feather account and changed my password 13:06
nothingmuch fglock: i asked for that 13:10
chromatic complained that I should stop asking for javascript core compiling to the "scheme" subset of Perl 65
Perl 6
if you agree please reraise the issue on p6l in your own words
basically i'd like to know:
a. what are we allowed to implement the prelude with 13:11
b. what is the system api every runtime must provide (IO stuff, for example)
c. what is the optional system api every runtime can provide (e.g fork() where it makes sense)
fglock pmichaud: how about a 'higher level' version of svn.perl.org/parrot/trunk/languages.../grammar.g - one that doesn't assume implementation limitations - each implementation can derive it's own version-specific grammar - even if it must be hand-modified initially
nothingmuch d. what are the "core" types, e.g. the ones that have no reference implementation
(e.g. most of the Num role consumers, the Char class, etc) 13:12
fglock nothingmuch: I mean very basic things - like "you need a statement_control table" - the contents of this table can be defined elsewhere, but the table must be defined in the core 13:17
this spec would be rather small, but it needs to be well thought 13:18
svnbot6 r9804 | pmurias++ | %hash was merged in recently; cleaning the old implementation
pmurias fglock: any thoughts why 08-hash failes, before i begin to fix it? 13:19
nothingmuch fglock: right
fglock pmurias: all tests pass here 13:20
nothingmuch since if is an expr, is it really a function?
is x a macro or a builtin?
etc etc
what I said was basically what it should be finished as
and i think you said you wanted the same thing, except you wanted it to start first =)
fglock nothingmuch: I need a 'skeleton' - what are the things that lrep (for example) must implement, that make it qualify as 'p6' (incomplete or not) 13:22
nothingmuch =) 13:23
exactly what I wanted
and the reason i wanted it is to help people who are writing things like lrep make the right decisions 13:24
so that they don't have to throw away lots of effort if someone from the design team later clarifies something that was misinterpreted
what I want is not implementation details
but the requirements for it
i think it sounded like i wanted implementation details because i confusingly added a draft for a plan that deals with that too 13:25
but that was conjectural
and was trying to rationalize my request, not ammend to it
either way, Good Luckā„¢
pasteling "pmurias" at 81.168.228.98 pasted "the failing test" (6 lines, 238B) at sial.org/pbot/16548 13:26
fglock nothingmuch: do you have something written already? I'd be glad to filter it (ie - remove things that sound like implementation)
nothingmuch i'll link you to the thread
makybe you can learn from it
about what not to do ;-)
groups.google.com/group/perl.perl6....fb7b4f9d9e 13:27
13:28 meppl joined
fglock pmurias: I got a fresh svn up, and still no error 13:29
nothingmuch i think the problem is that everyone replied to the subject of my post except stevan ;-) 13:30
svnbot6 r9805 | fglock++ | PCR - removed CPAN'ed prototype
pmurias fglock: did the same with PCR and it still fails 13:32
fglock nothingmuch: there is too much in that post - all I need is a base grammar, that strictly matches the synopsis 13:33
nothingmuch yes, i know there is too much in that post
you want the paragraph that says "Perl 6 Core"
;-)
the minimal bootstrap required to: 13:34
load the prelude
load grammar extensions
create macros
since that's the implementation strategy
fglock pmurias: 'perl -w -Ilib t/08-hash.t' fails?
svnbot6 r9806 | pmurias++ | obsoleted by lrep-compiler a long time ago 13:36
fglock nothingmuch: not 'minimal', but 'standard' - even if it is not well specified yet, so it is 'the current standard'
nothingmuch ah
well
i think that's too big for a start 13:37
hell, when I have more free time i'll try to write up some ideas
fglock nothingmuch: it's not too big - lrep's grammar and pmichaud PGE grammar almost got there - all it needs is a few corrections (and a blessing) 13:38
nothingmuch >= grammar
it's also behavior
and semantics 13:39
pmurias fglock: yes, it failes
fglock nothingmuch: I see - but you have to start somewhere
nothingmuch fglock: of course 13:40
fglock pmurias: sorry, I don't know. It passes here both in ubuntu and windows XP 13:41
pmurias fglock: I'll try it on feather 13:43
fglock pmurias: it fails in feather 13:48
13:48 chris2 joined 13:49 GeJ joined 13:50 Qiang joined 13:52 xinming joined
svnbot6 r9807 | fglock++ | PCR - fixed 'undefined' capture stringification in Match.pm 13:54
fglock pmurias: fixed
13:55 kolibrie joined
pmurias fglock: thanks 13:57
nothingmuch denny linked to this in #catalyst: www.theregister.co.uk/2006/03/31/ebay_box_sale/
++
fglock nothingmuch: I don't think your "Perl 6 Extended" definition should be implemented as a second step - if you have extensible grammar from the start, the core gets much smaller 13:59
which is why lrep worked 14:00
nothingmuch in my head a viewed them as a single step 14:02
for some reason I chose to separate them on paper
i don't remember hwy now
ciao 14:07
14:14 hexmode joined 14:20 vel joined 14:29 vel joined 14:36 KingDiamond joined
audreyt www.dan.co.jp/~dankogai/yapcasia200...daorz3.mov 14:38
14:43 vel joined
audreyt perlcabal.org/~autrijus/larry-bugs.mov 14:45
# same movie
14:46 vel joined 14:48 vel joined 14:50 vel joined 14:54 vel joined, hexmode joined 14:56 Phiend joined, vel joined
Juerd There goes our bandwidth ;) 14:59
There comes l~r 15:00
15:01 Limbic_Region joined
Juerd was just tailing the access log, and I saw you login, Limbic_Region 15:01
In a strange way, that was funny.
15:04 vel joined 15:07 stennie joined
spo0nman Juerd: thanks. 15:07
Juerd audreyt: For some reason, ~autrijus/~public_html/index.html was the homepage of one of our upstream providers. I deleted it. 15:10
audreyt sure
Juerd audreyt: I don't know how it got there (could be my mistake), but I also dno't know if you used to have another index
If so, it's gone
audreyt no, I think it's a typo in wget 15:11
Juerd Aha
audreyt and fallbacks to index.html
Juerd You have no idea how horrible my thoughts were when I saw it ;)
If I were a little more impulsive, I'd have accused them of transproxying ;) 15:12
audreyt heh :)
Juerd audreyt: And, erm... How to put this... Is it okay with you if I remove the firefly stuff after I download it? :P 15:13
(And please don't use feather for that)
audreyt okay, and oay. :) 15:14
s/oay/okay/
15:14 autark joined 15:15 vel joined
fordinal hi all :) 15:18
Juerd vel: Please try to fix your connection. 15:19
vel Juerd: Sorry. I am. Should be ok now...
15:25 marmic joined 15:33 xinming joined
Limbic_Region salutations Juerd - I am glad I can be use as a bit of humor 15:36
geoffb Can someone point me to the timestamp for the discussion of the end of Ref? 15:41
The commit note left me with more questions than answers .... 15:42
?eval 1+1 15:51
Juerd I wonder how the universe is shaped, without a ref type.
15:51 evalbot_9802 is now known as evalbot_9807
evalbot_9807 2 15:51
Juerd It's quite fundamental to my understanding of Perl 5 and 6
geoffb Juerd, nodnod, and that's bothering me ...
Juerd Meaning that it feels like I no longer understand it.
geoffb Hmmm ... it's been too long. Is there a "typeof" equivalent? 15:52
15:53 justatheory joined
geoffb ?eval my @bar=(1,2,3); my $foo=@bar; $foo.ref 15:53
evalbot_9807 ::Array 15:54
geoffb Man, evalbot is SLOW
I assume I'm on crack here, but it seems to me that without Ref, you can never have more than one level of generic indirection. 15:56
?eval my @bar=(1,2,3); my $foo=@bar; my %baz = (a => 1, b => 2); my $quux = %baz; sub test($ref) { $ref.ref } test(rand() > .5 ?? $foo !! $quux) 15:58
evalbot_9807 ::Hash 15:59
geoffb ?eval my @bar=(1,2,3); my $foo=@bar; my %baz = (a => 1, b => 2); my $quux = %baz; sub test($ref) { $ref.ref } test(rand() > .5 ?? $foo !! $quux)
evalbot_9807 ::Hash
geoffb ?eval my @bar=(1,2,3); my $foo=@bar; my %baz = (a => 1, b => 2); my $quux = %baz; sub test($ref) { $ref.ref } test(rand() > .5 ?? $foo !! $quux)
evalbot_9807 ::Hash 16:00
geoffb Clearly I'm using rand() from another language ... sigh
?eval my @bar=(1,2,3); my $foo=@bar; my %baz = (a => 1, b => 2); my $quux = %baz; sub test($ref) { $ref.ref } &test.sig 16:01
evalbot_9807 Error: No such method in class Sub: "&sig"
geoffb ?eval my @bar=(1,2,3); my $foo=@bar; my %baz = (a => 1, b => 2); my $quux = %baz; sub test($ref) { $ref.ref } &test.signature
evalbot_9807 Error: No such method in class Sub: "&signature"
geoffb Anyone remember the right method name to get the signature back from a Routine? 16:02
hmmmm.
?eval my @bar=(1,2,3); my $foo=@bar; my %baz = (a => 1, b => 2); my $quux = %baz; sub test($ref) { $ref.ref } &test.ref
evalbot_9807 ::Sub
16:05 siosiosios joined 16:17 nnunley joined
audreyt geoffb: \3 is now \(3) 16:18
Arguments.new(positional=>[3])
and doing a ${} on Arguments with one positional gives you back that thing 16:19
geoffb: &code.signature should return a Signature object 16:21
still working on drafting its API (as part of perl5/Variable-Bind)
will implement it to the hs runcore this weekend
obra good shower, audrey? 16:23
"I didn't know the laptop was waterproof"
rgs heh
Juerd Ahhh, waterproof laptop 16:26
ingy hola
Juerd THAT's what the world needs.
rgs that, and BUGS 16:27
16:27 clkao joined
theorbtwo toughbook++ 16:27
Not that I've ever owned one, but the concept is cool. 16:28
obra mm. love my toughbook 16:29
clkao good morning
16:29 saorge joined
Juerd audreyt: Ehm, and why? 16:30
audreyt: Isn't a Ref in terms of implementation much and much and much lighter of weight?
svnbot6 r9808 | clkao++ | r12975@ab: clkao | 2006-03-31 10:10:36 +0100 16:31
r9808 | clkao++ | Bind named args.
r9807 | fglock++ | PCR - fixed 'undefined' capture stringification in Match.pm
r9809 | clkao++ | r12976@ab: clkao | 2006-03-31 10:57:49 +0100 16:34
r9809 | clkao++ | * Data::Bind->sig as helper to create signature.
r9809 | clkao++ | * Drop Data::Bind::Arg.
r9810 | clkao++ | r12977@ab: clkao | 2006-03-31 11:11:10 +0100
r9810 | clkao++ | Check named parameter requirement as well.
r9811 | clkao++ | r12978@ab: clkao | 2006-03-31 11:15:21 +0100
r9811 | clkao++ | adjust tests.
r9812 | clkao++ | r12979@ab: clkao | 2006-03-31 11:51:06 +0100
r9812 | clkao++ | high level declaration of subsigs.
r9813 | clkao++ | r12980@ab: clkao | 2006-03-31 13:27:52 +0100
r9813 | clkao++ | array subscription support!
clkao grins 16:35
Limbic_Region karma whore
Juerd karma clkao
Not worth the trouble :)
Limbic_Region perlbot karma clkao 16:36
perlbot Karma for clkao: 17
Juerd Hm, these weren't the first commits, were they?
Limbic_Region thinks perlbot has been configured to ignore karma from svnbot6
and the other bot isn't around apparently 16:37
which sucks cause
seen Juerd
doesn't work
16:38 Phiend left
clkao i just noticed today @a = <a b c> actually works in perl5 16:40
Limbic_Region I asked the other day but no one answered so I will ask again
is IO::Select and/or IO::Socket::INET currently ported and if not, is Pugs currently up to the task? 16:41
at least in 5.8.8 clkao 16:42
PerlJam clkao: for varying definitions of "work" :-) 16:43
Limbic_Region perl -Mwarnings -Mstrict -e "my $foo = 'foo';my @bar = <a b $foo>; print $_, $/ for @bar" 16:47
gaal hahaha
# blog.livedoor.jp/dankogai/mov/lamdaorz.mov
Limbic_Region PerlJam - what definition of work doesn't it meet?
PerlJam Limbic_Region: when a b or c is really a sequence that contains * or ? or an appropriate {...} or [...] 16:48
Hmm. actually, I'm not sure if glob understands {...} 16:49
rgs it does
perl -le 'print for <a{b,c}>'
(I have abused this.)
PerlJam rgs: oh that's right ... that's how you get permutations
16:50 marmic joined
Limbic_Region doesn't like that <> is used both for glob and for readline synonyms 16:55
PerlJam Limbic_Region: yep. It's a good thing perl6 fixes that. 16:56
Limbic_Region so no ideas on if IO::Select and IO::Socket::INET are currently doable in Pugs? 16:57
Limbic_Region would consider re-writing hundreds lines of code (p5 -> p6) if they were 16:58
16:59 FurnaceBoy joined
PerlJam Dunno, but it seems to me than te perl6 implementations would be much smaller :) 16:59
s/te/the/ 17:00
17:02 justatheory joined
pmurias perlbot karma pmurias 17:09
perlbot Karma for pmurias: 4
geoffb audreyt, I guess I was just trying to understand how we can say that $foo = @bar makes $foo contain a reference to the Array, but not have a Ref type, especially as that leaves me wondering about the signature of a routine that can take references of multiple types ... 17:18
If we punt and say $foo is a Scalar, that breaks my mental model that Scalar is a junction of other types 17:20
17:24 kisu joined 17:28 renormalist joined 17:45 pdcawley joined 17:55 KingDiamond joined 18:02 pmichaud joined 18:06 notivan joined 18:09 zgh joined 18:13 ruoso joined
PerlJam www.perlmonks.org/index.pl?node_id=540390 TPF needs more grant proposals 18:21
pmichaud hello, perljam
PerlJam hey pm. How goes?
pmichaud goes well 18:22
PerlJam Have you applied for a TPF grant lately? :-)
pmichaud was just thinking about that :-)
18:23 GeJ_ joined
pmichaud but I think I'll decline for now, unless there's a specific project someone thinks I ought to be working on :-) 18:24
I think I'd be happy to mentor a grant for someone else who wants to work on the p6 compiler, however :-) 18:25
I've got a list of short tasks I'm putting together now, and maybe someone could pick a worthy task from the list and get a small grant for it
PerlJam you could get grant money to work on things you're already working on (though there will be the extra added benefit of a deadline and a progress report or an end-of-project report) 18:26
pmichaud well, I'll take a look at my list a bit later and see if anything is worth a proposal :-) 18:27
18:27 ko1_ is now known as ko1_away
pmichaud well, I need to go grab some lunch -- be back in an hour 18:28
18:29 weinig_ joined 19:28 Grrrr joined 19:34 kral joined 19:35 kvakke joined 19:41 GeJ_ is now known as GeJ 19:54 kral left 19:56 Limbic_Region joined
fglock back 19:57
Limbic_Region front
side-to-side
19:58 pmurias joined
fglock looks around and see L~R everywhere 20:01
PerlJam fglock: are you saying Limbic_Region is fat? 20:15
;-)
Limbic_Region is
too fat in fact - being married will due that to you
wolverian okay, I just came home to find the most bizarre video ever in my inbox... 20:16
Limbic_Region "Success goes to your head, happiness to your hips" - Tye McQueen
fglock :) 20:17
Odin- Limbic_Region: Too bad it doesn't work the other way around, too. :D 20:22
FurnaceBoy lol@Limbic_Region 20:26
20:37 FurnaceBoy is now known as FB|afk 20:53 hlen joined 21:00 larsen joined, SamB joined 21:05 kanru joined 21:12 mj41_ joined 21:18 vel joined
fglock wonders if porting lrep do parrot would do any good 21:19
pmichaud Could be -- what would lrep need to do there?
fglock pmichaud: I'm just wondering. lrep has it's own grammar engine, but it could use PGE instead. I'm just thinking aloud. 21:21
pmichaud thinking aloud is good :-)
ruoso fglock, I think lrep can be a way to self-host it in parrot 21:22
as soon as lrep is self-hosted in perl5
it can be ported to parrot
fglock pmichaud: is there a chance to get a TPF grant for lrepish work?
pmichaud I'm not on the TPF grants committee, nor do I have experience with such things, so I'm not the person to ask :-)
sorry
however, I would strongly encourage an application :-) 21:23
PerlJam fglock: IMHO, I would say "yes, there's a chance"
ruoso still think using perl5 runtime is the easiest way to self-host Perl 6
fglock pmichaud: how about writing a 'high level' grammar - not committed to PGE/Pugs/PCR compatibility - I think it would provide a view of what the grammar engines should targe 21:24
target
pmichaud fglock -- well, the grammar for PGE is supposed to be at high-level grammar of sorts, or at least that's the way I've been thinking of it
I guess the exception would be the operator precedence parser, which could theoretically be done purely with rules 21:25
fglock pmichaud: like, the 'if' statement is supposed to be a macro
pmichaud is it?
ruoso don't see like this too
pmichaud yes, S04 has it that way 21:26
fglock s04 - macro statement_control:<if> ($expr, &ifblock) {...}
PerlJam coming up with a testing framework for the perl6 parser sounds like TPF grant fodder ;)
pmichaud well, pj, there's two ways to go about that
fglock it is implemented (poorly) as a macro in lrep
pmichaud first, we could come up with a framework to test the parser
but another way to test is to just get a runtime environment, and then we test the result of the thing being parsed :-) 21:27
21:27 FurnaceBoy_ joined
PerlJam pm: I prefer the latter. :) 21:27
pmichaud perljam: so do I, which is why I haven't been jumping to the former :-)
ruoso pmichaud, isn't perl 5 is the nearest candidate to a runtime environment?
pmichaud ruoso: Parrot's not that far off
PerlJam Though a generalized testing framework that works on all of the various tree-structures would be useful across many sub-projects 21:28
pmichaud perljam: oh, I agree with that, but I suspect it'll come out of TGE
fglock the reason for defining 'if' as a macro is extensibility - and you don't need to define statements and functions into the base language 21:29
s/statements/all statements/
PerlJam ruoso: how do you figure that perl5 is the nearest candidate? 21:30
pmichaud fglock: well, I can do some of that without necessarily having to be a macro: rule statement { %statement_control }
ruoso PerlJam, well, almost all Perl 6 concepts are implemented in Perl 5 in some way... we just need to translate it...
Perl6::* modules 21:31
and PCR...
pmichaud ruoso: I'm not saying that you're wrong about perl 5 as the best runtime environment. however, I know that many programmers who I consider to be much better than I attempted to do it in Perl 5, and decided it wouldn't work and that a new approach (i.e., PGE) was needed
ruoso pmichaud, hmmm...
pmichaud that's the point at which I joined the perl 6 project, and that's the advice I was given by the design team :-) 21:32
PerlJam ruoso: From my perspective, there's too large of an impedence mismatch between perl5 and perl6 for many concepts. (though PCR is moving right along so I could be way off base)
pmichaud on the other hand, perl 6 has evolved a lot since 2004, especially in the area of S05 and the way rules are implemented, so that what was attempted prior to 2004 may not be relevant 21:33
i.e., implementing a P6 rules engine in P5 might change that dynamic a fair bit.
ruoso I think PCR could be the missing part...
pmichaud ruoso: Indeed, it could be.
PerlJam ruoso: perhaps. 21:34
fglock pmichaud: the original PCR (iterator_engine.pl) was designed for portability - I was thinking about porting it to javascript :)
pmichaud ruoso: I'm highly appreciative (and hope to encourage) other efforts like lrep and PCR, even if I'm not contributing directly. But for the moment my perception is that the design team wants to continue on the path we've defined, so that's where I've continued to work 21:35
PerlJam fglock: well .... why couldn't you have invented it 2 years ago?!? ;-)
pmichaud perljam: because S05 wasn't fully speced 2 years ago :-)
ruoso maybe I just doesn't have a clue of what I'm saying... but I can't see anything that really stops Perl 6 from being translated to Perl 5
PerlJam pm: pshaw! a mere technicality! ;)
pmichaud perljam: not so much a technicality. My first 6-8 months of working on things was spent exploring the unexplored corners of the S05 that existed then 21:36
and finding that the whole capture structure was totally underspeced
PerlJam ruoso: Well, nothing *stops* it, though there are things that could offer large amounts of resistance.
ruoso: Turing equivalences and all.
ruoso PerlJam, ok... I'm not talking in this level... 21:37
pmichaud ruoso: I don't think you're clueless in this respect; part of me thinks that with what I know now from PGE that I could probably build something in Perl 5 as well
ruoso: but Perl 6 encompasses more than just getting a running version of Perl 6 -- we're also after language interoperability, and runtime performance improvements, and for that our best target is the Parrot runtime engine 21:38
ruoso pmichaud, sure...
but that's a dillema
PerlJam pm: heh, you'd better watch where you sling that "best target" around here :-)
the lambda camels have increased the options available to us 21:39
ruoso OTOH, if we self-host something small we can port to almost anything
pmichaud pj: good point. However, I'm not the one making that particular decision; I'm just repeating what I'm told there :-)
ruoso: I think that parrot was intended to be the "something small" that could be ported to almost anything :-). 21:40
ruoso the question is (and Pugs confirm that): having something to mature the language itself is as important as having a good vm
PerlJam pm even with that big rock of ICU tied around its neck? 21:41
pmichaud PerlJam: I believe the plan was to come up with a lighter-weight version of ICU at some point -- parrot's just using ICU because it's readily available
but I'm not the parrot designer -- see #parrot for that :)
ruoso so, if it's easier to implement Perl 6 in perl 5 and then port it to parrot... good... even if we don't have the inter-operability in the first moment... 21:42
pmichaud ruoso: I have no problem with having multiple interpreters/compilers for Perl 6 -- that's part of the point
ruoso: at the moment I'm not sure that it'll be easier to do p6 on p5 than it will to do p6 on parrot. (I'm not sure that parrot will be easier either.) 21:43
ruoso: either way, it's good to progress on two or more fronts
zgh heh that's why p6 is a language and p5 is merely a tool
zgh ducks.
PerlJam As far as perl6 goes, I think it's kind of a race. Whoever gets the full-circle bootstrapping that includes a rules engine of some sort done first, gets us a real, honest to goodness perl6.
pmichaud I don't see it as a race, just as complementary efforts with different targets 21:44
PerlJam whether it's through parrot, or perl5, or haskell or javascript or COBOL doesn't matter.
pmichaud: well, it's like a cooperative race where everyone is helping everyone else make it to the finish line.
fglock PerlJam: that sounds better 21:45
pmichaud fglock: back to the notion of "higher level" grammar -- that's what I hope to be producing w/PGE in the long run 21:46
ruoso I don't know much of parrot state... how far is it to be able to self-host a rule-parser with at set of rules in Perl 6 and a script that matches a string with these rules and emit parrot bytecode?
pmichaud ruoso: not far at all. PGE does it for PGE
Allison is doing it with punie, and Coke is doing it with APL 21:47
PerlJam pmichaud: Yeah, PGE has gotten us through the first 90% ... now we just need to make it through the next 90% ;)
pmichaud and, we're doing it while hamstringing ourselves with the notion that we don't just want to get working implementations of these languages, we want to develop the intermediate tools for implementing other languages at the same time 21:51
fglock pmichaud: the idea would be to define subs in p6, with 'eval( ..., lang<parrot> )' where necessary, for example
pmichaud fglock: based on the conversation yesterday with audreyt, I thought we were going to use a small set of p6 primitives in rule closures and limit ourselves to that 21:52
(besides, it's already possible for PGE to call subs from within rules :-) 21:53
PerlJam pm: you know how the cabal are always asking each other if they're blocking on anything? In my lurking, it seems like it's usually short-term blockages that are addressed. Has anyone looked at the "big picture" for long-term blockage? For instance, I know that parrot still needs threads. How does not having them hurt us in the long run?
fglock pmichaud: yes, for the grammar - this is for the library
pmichaud which library? You mean the perl 6 library?
PerlJam If anyone has thought these things through, it would be good to add projects to the TPF idea pool for grants that alleviate the blockage 21:54
LeTo PerlJam: not having threads now and in a near future doesn't harm at all, we'll have them, when needed
pmichaud PerlJam: I don't think it hurts us much at all -- I think that parrot is just trying to avoid committing to a bad model, and all we have so far are models that have at least one undesirable feature
when we need it, we can pick the model then and go 21:55
pasteling "fglock" at 200.17.89.80 pasted "snippet from svn.openfoundry.org/pugs/misc/pX/Co...tegory.pm" (13 lines, 309B) at sial.org/pbot/16555
fglock pmichaud: that's the interface between the grammar and the p6 library
pmichaud s/the/an/, perhaps :-) 21:57
fglock as being proposed/implemented by PCR
LeTo fglock: please update docs/{notes,quickref} ;)
fglock it would be nice to have a 'standard' way to do this (Sxx) 21:58
pmichaud I'm not sure that closures like this are the best way to go for the grammar
fglock LeTo: this is a snippet from the pod
pmichaud in general
LeTo it's not really obvious in which of the src files a current relevant interface spec is hidden
pmichaud for one, I'm not sure what happens when we get to a compiled form 21:59
LeTo fglock: no it is misc/pX/Common/Pugs-Compiler-Rule/lib/Pugs/Grammar/Category.pm ;)
ruoso is convinced to try to port lrep to parrot...
pmichaud i.e., if we compile something down to bytecode, but we depend on manipulating <category> as part of the parse, then we lose that information if/when we're no longer doing a parse
LeTo why should anybody search there ;) 22:00
pmichaud of course we can work around it, but by definition "work around" may mean that this isn't the best approach. (Again, not saying it is/isn't, just that there may be other constraints to consider)
fglock <category> would be saved to bytecode - we need it for runtime extensibility, at least
pmichaud but category already has lots of entries in it 22:01
fglock but it is not used after the parse
pmichaud what about eval?
fglock unless you need to parse at runtime - yes (eval)
pmichaud we can't just dump <category> to bytecode, because ther ecould be multiple bytecode modules manipulating it 22:02
fglock category is lexical (as the grammar itself)
pmichaud hmmmm 22:03
I'll think about it some more. But I'm not convinced that having these sorts of manipulationed defined directly in the "high-level" grammar is the way to go here 22:04
s/tioned/tions/ 22:05
I'd prefer a generic dispatch mechanism that just passes the match to be handled by the underlying system
that doesn't depend on having a working p6 procedure call interface underlying it :-) 22:06
s/procedure/method/
fglock this is working at the parser level - it does not depend on a working p6 22:08
it uses the 'simple p6' return block
pmichaud $<category>.add_op( name => $<name>, fixity => ..., precedence => ... );
isn't 'simple
PerlJam If you ask me, it's some form of greek or latin 22:09
And what are <options> exactly, and how do they fit in? 22:10
pmichaud pj: it's a snippet -- <options> is defined by another rule somewhere :-)
fglock PerlJam: see the link
LeTo pmichaud: then it's a Klingon dialect 22:11
pmichaud LeTo: I'll get Damian on it right away :-)
LeTo yup
PerlJam Then I guess I'm having trouble distinguishing {}-as-closure from {}-as-definition or something
pmichaud perljam: rule prototype { ... } 22:12
everything within the outer { ... } is part of the rule definition
22:12 nnunley joined
pmichaud it's matching "proto", <category>, <name>, and <options>, and if it matches the inner curlies are a closure to be executed 22:12
PerlJam right, I get it. I'm just distracted. 22:13
fglock it's not much different from the PGE precedence parser 22:16
pmichaud another reason I'm not too fond of putting the closure directly in the grammar is that parsing a statement automatically modifies the grammar, and there might be times I don't want to do that 22:17
fglock at the API level
pmichaud parsing a statement should be separate from evaluating it
fglock pmichaud: you should discuss that with audreyt - or audreyt should discuss with allison :) 22:18
pmichaud I will, if it comes up :-)
but just because I'm interesting in parsing something that is <Perl6::prototype> should imply that I'm automatically evaluating it 22:19
s/should/shouldn't
22:19 viewer joined
pmichaud it may be that I want to immediately evaluate it after the parse, but that shouldn't be required 22:19
that's why I think audreyt chose the perl 6 primitives that she did -- the operations are all just bindings of a sort, none of them "modify" anything 22:20
i.e., no assignments
22:23 ruoso left
fglock it would modify the category that is associated to the match - this doesn't look much wrong either - but I wish audreyt were here because it was mostly influenced by her ideas 22:23
I just found a way to implement it 22:24
pmichaud I'm of the opinion that such modification should happen at a slightly later stage, not as part of the parse
fglock but then you would not have the precedence info for parsing the next statement 22:25
unless you delayed it
pmichaud or have some other mechanism for immediately executing it :-)
which doesn't have to be a perl6 closure :-) 22:26
fglock you could pipe the parser to the evaluator using coroutines...
pmichaud You can overload <commit>. 22:27
rule prototype { proto <category>:name <options> <commit> }
(although more likely the commit occurs after rule statement
for now I'm just saying that there are other ways of getting what we need besides putting perl 6 closures in the middle of the grammar rules 22:30
or at least I think there are other ways -- time may disprove me
fglock yes - discussing implementation details means we are agreeing
pmichaud for example, yesterday on #parrot audrey and I were talking about how to parse integers 22:31
audrey had rule integer { <sign> <natural> }
22:31 Chris_ joined
pmichaud rule natural { 0 : [ <hex_natural> | <octal_natural> | <decimal_natural> | {return 0;} ] } 22:32
(or something like that)
where each of the subrules had its own closure
Chris_ hello
pmichaud I preferred rule integer { <sign> <natural> { return +$(); } }
which left the conversion up to the numification of strings
instead of having a separate one for hex, decimal, octal, etc. 22:33
that to me is a "simple" closure -- easy to implement, assumes that there's a numification operator on strings (which we need anyway)
it also doesn't interfere with parsing 22:34
i.e., we can still get the separate <sign>, <natural>, etc. components for some language that just wants to parse a perl 6 construct but doesn't necessarily want to immediately evaluate it 22:35
fglock it could { return proto($/) } and lazy-evaluate the prototype when needed - there is no need to use a complicated API 22:38
pmichaud oooh, that's not too bad
we didn't have sub-calls in the p6primitives, but we may want them
fglock is there a spec for p6primitives?
pmichaud not beyond what audreyt said yesterday 22:39
(at least, I'm not aware of any other spec)
and I think the idea is that we as grammar authors will collectively decide what we need and what we can forego
but I really prefer to keep closures in the grammar to a minimum, from a parsing perspective at least 22:40
fglock subs are nice because you can implement in any language
pmichaud yes, this is the approach that I've been taking with the parrot-based stuff -- anything that was too difficult to do in a top-down or bottom-up parse could be relegated to a special-purpose sub if needed 22:41
to be used sparingly, if at all, but available for bootstrapping or things that are just a pain 22:42
(string parsing comes to mind)
fglock oh, I need to go 22:43
thanks!
pmichaud thank you!
22:43 fglock left 22:46 FurnaceBoy_ is now known as FurnaceBoy 22:55 nnunley joined 23:10 hlen joined 23:11 autark joined 23:18 chovy joined
chovy hello 23:30
23:33 drrho joined
TimToady audreyt: %hash .= sort maybe oughta transmute %hash to an autosorting hash that remembers the sort criterion sufficiently well to keep new entries sorted as well, or at least resorts on traversal. 23:46
23:49 damn_I_am_good joined
Juerd TimToady: I think the abstraction that turned references into argumentlists makes thinks harder to understand, and smells like inefficiency (regardless of actual performance) 23:56
TimToady I don't. 23:57
.oO(at least I think I think don't...)
23:58
In a way, this is actually closer to how Perl 5 works. Perl 5 has no official Ref type. 23:59
It's just part of the infrastructure.