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.
00:07 lichtkind joined 00:18 oylenshpeegul joined 00:35 drrho joined 00:44 azuroth left 00:55 vel joined 01:14 amnesiac joined 01:18 lichtkind joined
lichtkind ?eval sub 5 {5}; 5(); 01:21
01:21 evalbot_9982 is now known as evalbot_10007
evalbot_10007 Error: unexpected "5" expecting "#", subroutine parameters, trait or block 01:21
lichtkind ?eval sub l5 {5}; l5();
evalbot_10007 5
lichtkind ?eval sub l5 {5}; &l5; 01:22
evalbot_10007 \sub {...}
lichtkind ?eval sub l5 {5}; l5;
evalbot_10007 5
lichtkind thanks evalbot 01:23
01:54 LCamel joined 01:56 LCamel joined 01:58 LCamel joined 02:02 LCamel joined 02:03 stclare joined, ko1_away0 is now known as ko1_away
avar ?eval multi sub postfix:<!> (Int $num) { [*] 1 .. $num } 5! 02:25
?eval multi sub postfix:<!> (Int $num) { [*] 1 .. $num } say 5!
evalbot_10007 120
avar buu: boo!
evalbot_10007 OUTPUT[120 ] bool::true
buu Wierdo 02:26
02:26 oylenshpeegul left
avar arg, it's just slow 02:26
buu Yeah it is
They done unhappiness to it.
avar what kind of unhappiness?
buu No idea
02:29 mjk joined
wolverian it's not niced, at least 02:29
mugwump backtracking gone mad 02:37
02:44 DesreveR joined 02:58 saorge_ joined 03:13 saorge_ joined 03:26 FurnaceBoy_ joined 03:28 LCamel joined 03:29 FurnaceBoy_ joined 03:37 mako132_ joined 03:43 qu1j0t3 joined, LCamel joined
PerlJam listens to Larry's talk from Israel (rindolf++) 04:08
04:08 FurnaceBoy joined 04:13 avar left, avar joined 04:22 KingDiamond joined 04:27 justatheory joined 04:31 justatheory joined 04:36 Khisanth joined
PerlJam How does one ask a class what methods it contains? And does the syntax of the question change if the "class" is a grammar and the "methods" are rules? 04:55
oh, I see that S12 mentions .getmethods() down at the end. 05:00
mugwump titters 05:03
yes, er, slightly underspecced, you might say :)
PerlJam In the slides to Larry's talk he has an example like Float.top("-6.02e+23"); print $/{'sign'}; How would I know that there is a "sign" thingy in Float if I didn't have access to the source? 05:04
This is what prompted the original question.
mugwump $/.meta.getmethods
quite what that *is* or *does* is not yet clear :) 05:05
PerlJam maybe I'll ping TimToady on it tomorrow if he's around :) 05:06
mugwump you might like to ask stevan. Larry'll just end up designing off the cuff. and we know where that leads 05:07
PerlJam yeah, it leads to unexpected places. That's all part of the adventure :) 05:08
05:11 KingDiamond joined
pmichaud hello, pj 05:18
PerlJam greets pm
What's new in the world?
pmichaud just continuing to make progress on a compiler :-) 05:19
PerlJam Any low hanging fruit on that compiler?
pmichaud yes, and people seem to be picking a lot of it :-)
leo improved lexical handling today, and I've fixed up listop parsing and restored "if" 05:20
we can skip pod comments and the long dot
mugwump pmichaud: are you using fglock's grammars ? 05:21
pmichaud mugwump: not really -- working a slightly different one 05:22
so far I can read mine better than fglock's
mugwump right. the interesting thing to me about flavio's work was the circularity of it
do you think that is important? 05:23
pmichaud circularity? as in...?
PerlJam pm: why does line 69 of grammar_rules.pge say print "\n" ?
mugwump pmichaud: in particular, the rules that define the grammar for rules. ie, the "bootstrap"
pmichaud mugwump: oh, I had that early own. But rule expressions really need to be parsed bottom-up and not top-down 05:24
s/own/on/
so I've since switched to doing a bottom-up parse of rule expressions
also, it's circular in the sense that a rule can call the bottom up parser, so we can have a rule to parse perl6 rules. In PGE/Parrot it's just <p6rule> 05:25
mugwump right. very interesting
so, it's not recursive descent, it's continuitive ascent?
pmichaud shift/reduce
shift/reduce with operator precedence 05:26
PerlJam mugwump: it's "try this parsing strategy for a while, then try this other one for a while" with free movement between them :) 05:27
pmichaud pj: what version are you at?
PerlJam pm: 12318
pmichaud except in the PGE grammar case there's very little "try" to it
i.e., it's "okay, now we get this sort of thing -- next we get that sort of thing", etc.
mugwump ok, is that a similar concept to "backtracking" ?
pmichaud hardly any backtracking
PerlJam mugwump: It's more like sidestepping :) 05:28
pmichaud the operator precedence parser and grammar can generally figure out what to do next by looking at the next character
(or very short string)
PerlJam sometimes you want to be on the fast moving conveyor belt, sometimes you want to be on the slow moving one, but they're both moving in the same direction.
pmichaud pj: I see no "print" statement in lib/grammar_rules.pge 05:29
mugwump I'm still having a little difficulty seeing how that differs from the ivory tower parsing indoctrination I am afflicted with (ie, "state machine" parsing for regular languages and "recursive descent with back-tracking" for CFG's) 05:30
is there a good place to start reading about this? 05:31
pmichaud bottom-up is essentially a state machine parse
with a couple of stacks to keep track of operator precedence
recursive-descent with backtracking is essentially perl6 rule syntax
05:31 LCamel joined
PerlJam pm: weeeeirrrrrrd. now it's gone! I won't question my sanity, but maybe I was being fooled by a some leftover junk in a vim buffer 05:32
mugwump OH. now THAT'S cool :)
pmichaud Here's the current grammar I have 05:33
svn.perl.org/parrot/trunk/languages..._rules.pge
PerlJam pm: btw, are you running FC5?
pmichaud pj: I'm running SUSE 10.0 05:34
I have FC5 here and put it on the laptop, but decided I liked SUSE better (it's been on my desktop since jan)
svn.perl.org/parrot/trunk/languages..._optok.pge has the operator definitions 05:35
(as well as the inline code for Parrot/PIR)
PerlJam pm: well, fyi, I've yet to have a single fc5 install go smoothly. On the laptop and desktop (an install and upgrade respectively), it errored out of the install and I had to start over. And on the old meridian, the install *seemed* to go fine, but when it reboots, it boots to a grub prompt. 05:36
pmichaud hmmm
I didn't have any trouble with my fc5 install
boot to dvd, set up partitions, install, done
(had to work a bit to get the wireless card to work, but that's not uncommon)
mugwump pmichaud: that file you linked looks very like early pugs source 05:38
pmichaud really? wow, that's good
mugwump pmichaud: which file in the parrot source is the pge bootstrap?
pmichaud: do you grok Haskell?
pmichaud nope, I looked at Haskell enough to get a few ideas from it, but I can't really read it well yet 05:39
mugwump: the code for parsing perl6 rules is in svn.perl.org/parrot/trunk/compilers...P6Rule.pir
it adds a bunch of operator tokens, and has a few routines for specialized parsing 05:40
(e.g., literals, \x sequences, whitespace handling, etc.)
mugwump ok. is there a corresponding set of rules that can compile to something like that code?
pmichaud there is now 05:41
:-)
the two *.pge files I sent earlier compile down to executable rules
just a sec
PerlJam pm: done any benchmarking yet, btw?
PerlJam would guess not :) 05:42
pmichaud mugwump: the grammar_rules.pge and grammar_optok.pge files I linked earlier compile to this: www.pmichaud.com/sandbox/grammar_gen.pir
pj: no, I'm not far enough along to benchmark things just yet 05:43
working code first, then optimize :-)
PerlJam yeah, I wasn't thinking about optimization as much as "ball parking" 05:44
pmichaud no, I don't know. It's very easy to write slow parsers, though
and it will likely speed up drastically once we have Capture in a .pmc (and when I've migrated Match to use Capture) 05:45
mugwump pmichaud: right. so, presumably, that initial bootstrap PIR file (P6Rule.pir) could be a temporary one - perhaps not even installed - that just builds the rules file to the grammar_gen.pir file, which is the one used by the rest of the system ?
pmichaud mugwump: yes, it could happen that way, but for some time the bootstrap pir file is going to be more efficient than the generated one. And at the parse level, speed is important 05:46
and keep in mind that P6Rule.pir just describes how to parse perl 6 rules, it doesn't actually generate the code
mugwump right, but perhaps it could, if the perl6 rules could have PIR action blocks 05:47
pmichaud oh, they already have that
mugwump so, you could have the rules inline the relevant PIR pieces that generate the code
pmichaud the code generation is a fair bit more complex than just emitting code from each node 05:48
essentially the PGE rules implementation is its own language -- has its own AST, optimization step, etc.
mugwump yes, you would just call those hooks. 05:49
probably just create an AST node, and let whatever is doing the parsing worry about the next steps 05:50
pmichaud right
that's essentially what it does now
but I think the embedded pir code would end up looking a fair bit worse. And we're not at a point where we can totally eliminate the pir
and I'm expecting/hoping we'll be able to translate a good bit of it into C 05:51
so it'll run quicker than it does now with Parrot op dispatch
mugwump by embdedding the code to perform the AST building, there would be a huge chance of convergance between the grammars used by the three Perl6 ports 05:52
pmichaud convergence is a good goal but it's not my primary one at the moment 05:53
PerlJam mugwump: I think there's more to be had with convergence of minds than technology.
mugwump lets that comment fly straight out of left field and past 05:54
PerlJam mugwump: What I mean is that there are several different approaches. Let them feed each other ideas and see where they go rather than coming up with One Holy Grammar. 05:55
pmichaud this is already happening 05:56
PerlJam I mean, we really do have multiple perl6 implementations. :)
mugwump each port will have their own variances of it, it would just be great if the pieces that are agreed upon could be easily tracked with source
05:56 p5evalbot joined
pmichaud that's why I'm specifying the grammar using perl 6 syntax and not PIR :-) 05:57
mugwump s/variances/variants/
pmichaud and leaving the variances to other pieces rather than trying to embed them in the grammar 05:58
mugwump right. This is an interesting fault in the rules system, perhaps - perhaps this is a reason to allow rule bases that augment other rulesets with code blocks?
pmichaud I could probably come up with a similar set of specs for p6rule parsing for some parts of it, but parsing literals and some of the other constructs is a real pain
PGE allows the factoring to take place at the subrule level -- i.e., a rule can call any subroutine using <sub>, not just a rule 05:59
PerlJam still wonders how you introspect grammars
pmichaud pj: essentially a rule is just a method on a grammar 06:00
PerlJam MyGrammar.^getmethods() hardly seems right though.
pmichaud perljam: why not?
PerlJam because it should be "getrules" or something. Just because we've said A is just B doesn't mean it always makes sense to talk about B when you're really talking about A 06:01
pmichaud pj: would you have a problem with $/.getmethods() ? 06:02
(or whatever we're calling the match object this week)
PerlJam It's the same as above, so yes. 06:03
pmichaud well, it works out okay for me
PerlJam It feels like talking about my C variables in terms of machine registers when I should be talking about them in terms of ... well, C variables to me 06:04
mugwump well, there's no reason the meta-object for grammars has to be exactly the same as the one for classes 06:07
PerlJam mugwump: indeed, I expect them to be different 06:08
pmichaud I think tuesday's task will be to parse double-quoted string literals 06:12
PerlJam Apparently allison has something against trailing "e" characters on filenames.
pmichaud ..pj?
example? 06:13
PerlJam pm: just just changed *.tge and *.pge to *.tg and *.pg respectively in the punie source
ayrnieu (why .getmethods and not .methods ?) 06:14
PerlJam s/just/she/
pmichaud oh, that makes sense to me
.tg == tree grammar, .pg == parser grammar
PerlJam pmichaud: me too, it's just an odd thing to change really :)
pmichaud I'll probably do the same in the perl6 tree
PerlJam ayrnieu: Didn't you see the sign when you came in? It says "here be dragons". :-) 06:15
06:18 nnunley_ joined
pmichaud well, time for sleep 06:20
PerlJam good night pm.
mugwump waves
06:22 xern joined, xern_ joined
PerlJam is likely to nod off soon too 06:24
audreyt hm. I have an interesting (and probably useful) idea 06:34
I wonder if someone has cycles to prototype it on perl5
the API is very simple
use pureperl; # prefer pure-perl libraries to xs ones
use pureperl -fallback; # use pureperl ones if xs can't be found or not loaded 06:35
the implementation is likewise simple
pureperl::DBI will be a module that simply aliases the DBI::PurePerl symtable to itself
pureperl::DBD::mysql ditto, for DBD::mysqlpp 06:36
pureperl::Crypt::OpenPGP may actually be a wrapper that uses `gpg`
and so on
and all pureperl.pm does is
1. register the caller and the order of preference
2. hack @INC so that the pureperl/ subtree becomes part of it 06:37
3. turn itself off when "no pureperl" is registered in the nearer caller frame
and the repository of XS->pureperl mappings will be maintained as part of pureperl.pm distro -- or each XS module can ship its own designated fallback in lib/Module/Name 06:38
I mean lib/pureperl/Module/Name
this could solve the infinitely complex Foo vs Foo_PP vs FooPP vs Foo::PurePerl problem
06:39 bsb joined
PerlJam audreyt: it would also solve the module-version-author problem with a few modifications. 06:39
audreyt and enable applications and modules that want to depend on something that can be XS for performance and for PP if it can't be installed (eg relying on shared library)
PerlJam: why, yes indeed. the idea is to not use coderef-in-@INC
arcady that last one seems quite useful
audreyt but instead use a link forest, the way kane intended in the 6PAN spec draft 06:40
use pureperl-fallback; use A_lot_of_XS_modules 06:41
PerlJam audreyt: aye, push down on the code and up sprouts some data.
audreyt preferably Module::Install would also use the same data
to suggest alternate installation for people without C compiler
basically a Module::CoreList-esque data module that contains the currently known mappings 06:42
maintained in a potentially decentralized fashion
except the mappings are themselves .pm files
this is like, the Apache2.pm idea done right :)
(because pureperl::* are strictly emulation layers that depends on other modules, and not functional code themselves) 06:43
anyway, I probably wouldn't have cycles to code up a prototype soon, so takers welcome :) 06:44
PerlJam sleep & 06:45
06:47 KingDiamond joined 07:15 iblechbot joined 07:24 marmic joined 07:31 KingDiamond joined 07:33 Aankhen`` joined 07:40 Soga joined 07:42 p5evalbot joined 07:43 _fordinal joined
svnbot6 r10008 | yiyihu++ | change `our Num multi Num::sign (Num $x)` to `our int multi Num::sign (Num $x)`. 07:54
08:12 pmurias joined
pmurias hi 08:12
xinming hi
08:14 elmex joined
pmurias OT: can one move already opened programs to screen 08:14
s/opend/runing/ 08:15
xinming pmichaud: I don't think so.
pmurias s/pmurias/pmichaud/
xinming pmurias: I don't think so. :-)
08:16 pmurias joined
xinming screen -S irssi -c irc.freenode.net :-) 08:16
screen -S irssi irssi -c irc.freenode.net :-/ 08:17
pmurias forgot to turn screen on :( 08:18
08:19 pmurias joined
xinming pmurias: what does OT mean? 08:21
miyagawa Off Topic? 08:22
xinming because pmurias every said... `pmurias OT: can one move already opened programs to screen` 08:23
miyagawa: maybe
08:34 gringott joined 08:35 f0rth joined 08:49 iblechbot_ joined
svnbot6 r10009 | audreyt++ | * Beginning of librules, a C implementation of Perl 6 Rules 08:57
r10009 | audreyt++ | (really just the operator precedence parser for now.)
r10009 | audreyt++ | (Why am I doing this? Mostly I want to understand how the
r10009 | audreyt++ | new OPTable.pir and Parse::YAPP works. :))
audreyt (also I imagine a shared operator precedence parser among Hs/P5/PIR may not be a bad idea.) 08:58
miyagawa hi audreyt 09:01
audreyt miyagawa: hi
miyagawa happy birthday 09:02
audreyt thanks! :))
miyagawa I am planning to go to Taiwan again
April 27th to May 1st
LeTo audreyt: what are the p6 shift ops arithmetic vs. logic right? 09:03
audreyt in ~1hr I'm going to one of the best - as in creative taiwanese cuisine - restaurant, and I have no idea what will be on table tonight :)
miyagawa: oooh
miyagawa: for some event or? 09:04
miyagawa for just hacking, again
audreyt LeTo: say what?
miyagawa I'll be staying in gugod's
audreyt LeTo: you mean +< &< ~< 09:05
er +> &> ~>
or somthing else?
LeTo audreyt: is +> logic shr or arithmetic?
i.e. does it shift the sign?
audreyt ?eval 123 +< 2
09:06 evalbot_10007 is now known as evalbot_10009
evalbot_10009 492 09:06
audreyt ?eval -123 +< 2
evalbot_10009 -492
09:06 pjcj joined
audreyt I think it preserves the sign. 09:06
same as perl5 >>, no?
LeTo ?eval -2 +> 1
evalbot_10009 -1
LeTo arithmetic
audreyt oh, _not_ same as perl5 >> in that regard 09:07
but yes, + should indicate arithmetic semantics.
(consistently)
LeTo ?eval -2 ?> 1
evalbot_10009 Error: unexpected "?" expecting "#", operator, postfix conditional, postfix loop, postfix iteration, ";" or end of input 09:08
audreyt there is no ?> in the spec iirc
LeTo nope
audreyt miyagawa: cool, I'll visit you probably 09:09
miyagawa nice
LeTo ?eval my $a=2; $a +<=3; say $a;
evalbot_10009 Error: Can't use readline() or getc() in safemode. 09:10
LeTo ?eval my $a=2; $a +<= 3; say $a;
evalbot_10009 Error: Can't use readline() or getc() in safemode.
LeTo a bug?
xinming no
I think It's not a bug. :-)
hmm, I don't think it's a bug 09:11
audreyt it is a bug.
and fixed in r10010.
LeTo audreyt++
svnbot6 r10010 | audreyt++ | * missing assignment ops, reported by Leo: 09:12
r10010 | audreyt++ | +<= +>= ~<= ~>=
LeTo ?eval my $a=2; $a +<=3; say $a; 09:13
evalbot_10009 Error: Can't use readline() or getc() in safemode.
LeTo p6> my $a=2; $a +<=3; say $a;
16
*g* 09:14
audreyt well, evalbot is in sleep :)
svnbot6 r10011 | audreyt++ | * also fix the same assignment ops in the lexer 09:15
LeTo audreyt: are these stringwise shifts ~<= ~>= ... really sane? 09:16
audreyt LeTo: well if you think they operate on 21-bit words... 09:17
well, maybe they are insane ;)
but ~| is useful.
LeTo yep, at least if the result string is marked being binary ;) 09:18
audreyt I'm not sure 09:20
I mean, "\x[E0000]" >>~|<< <M o o s e> 09:22
can conceivably give you those Unicode Tagging Characters
but they are insane themselves...
LeTo ?eval my $x = 'A'; $x ~|=3; say $x 09:27
09:27 evalbot_10009 is now known as evalbot_10011
evalbot_10011 *** unexpected "$" expecting "#" or identifier at -e line 2, column 8 09:27
audreyt weird, it worksforme. 09:29
?eval $_ = 'A'; $_ ~|= 3; $_
evalbot_10011 *** unexpected "$" expecting "#" or identifier at -e line 2, column 8
audreyt wonders what's wrong with evalbot 09:30
oh well... I need to run for dinner now.
09:33 kanru joined
gaal audreyt: forgot to svk add src/rules/* ? 09:34
svnbot6 r10012 | pmurias++ | PG-P6 know can dump structures in p5,yaml and xml 09:37
bsb miyagawa: I leave taiwan the day before you arrive 09:38
svnbot6 r10013 | audreyt++ | * add src/rules/* for real.
miyagawa bsb: ah :/
I'll stay in gugod's place, in Chupei
not Taipei
bsb I have zero Taiwan clues so far, will read a guide when I get to HK 09:40
audreyt gaal: committed 09:42
feel free to pick up :)
audreyt waves & bbl 09:43
09:47 elmex joined
Soga quit 09:53
svnbot6 r10014 | gaal++ | r10071@sike: roo | 2006-04-18 13:06:25 +0300 10:10
r10014 | gaal++ | * optable.c - logic fix and minor golfage
gringott ?eval $_ = 'A'; $_ ~|= 3; $_ 10:15
10:16 evalbot_10011 is now known as evalbot_10013
evalbot_10013 *** unexpected "$" expecting "#" or identifier at -e line 2, column 8 10:16
10:38 izut_ is now known as izut 11:21 drrho joined 11:23 nnunley joined 11:42 frederico joined 12:07 iblechbot joined 12:20 frederico joined 12:25 Limbic_Region joined 12:37 kolibrie joined
svnbot6 r10015 | ruz++ | * make base dir for target before copy 12:44
12:50 Blicero_ left
Limbic_Region gives up trying to figure out what "NMAKE : fatal error U1077: 'cd' : return code '0x1'" means and decides that getting Pugs running on his work machine is a lost cause 13:00
theorbtwo snaps his fingers. 13:01
You're trying to run lines like cd foo; do something; cd .. ?
Does your nmake || shell understand the semicolon?
theorbtwo hasn't used nmake in a while, and doesn't remember.
13:02 pmurias joined
Limbic_Region theorbtwo - this just mysteriously stopped working 13:02
but only on my work machine - works fine at home
theorbtwo :(
Limbic_Region about the only thing that could have conceivably changed is the addition of MinGW - but I hand crafted %PATH to ensure no funny business 13:03
I wiped out the repo and did a fresh check out - yadda yadda yadda 13:04
bah - it will give me a chance to read The Prgamattic Programmer
pmurias looked at FAQ/FUD.pod 13:07
The "Programming Perl 6 will be multivolum" question IMHO seem quite realistic 13:08
s/question/fear/ 13:09
13:09 Qiang joined
pmurias what will be the answer to " 13:14
Every module requires 42 "use" statements to improve syntax!" 13:15
bundles?
the syntax is good already?
gaal pmurias: I don't understand that fear very well, but facades will be possible because reexport is possible. 13:16
bundles are a packaging issue
theorbtwo The fear goes like this, I think... Right now, every non-trivial bit of code ends up beginning with "use warnings;\nuse strict;", at least if you're of the perlmonks school. (Which I certianly am.) 13:18
In perl6, it'll begin "use terse_math; use reasonable_call_syntax; use this; use that; use the_other;", because there's so many silly decisions being made that you'll have to fix. 13:19
pmurias there a need for such thing in perl5 too 13:20
theorbtwo There seem to be two reasonable responses: "Larry's really bad decisions tend to get fixed later in the design process, we hope", and "If you keep using the same modules over and over, you can make a module that uses all of those modules, and still end up with the things getting exported to teh right place".
s/teh/the/
pmurias A third one could be that "You should be happy to be able to fix bad desision, in languages with static grammar you would be screwed" 13:23
maybe in more diplomatic words 13:24
13:25 lichtkind joined
theorbtwo The only sane response I can think of to "Programming Perl will be several volumes" is "yeah, but you'll only need to read the first one", which is awful weak. 13:25
13:25 sahadev joined
lichtkind ?eval 2:3; 13:27
13:27 evalbot_10013 is now known as evalbot_10015
evalbot_10015 *** unexpected "$" expecting "#" or identifier at -e line 2, column 8 13:27
13:27 mako132 joined
pmurias "with the advances in book bindings technology we will be able to have twice as many pages in a single book" :) 13:28
lichtkind yes :)
?eval :2(3);
evalbot_10015 *** unexpected "$" expecting "#" or identifier at -e line 2, column 8
lichtkind ?eval (3):2; 13:30
gaal ?eval "I am well"
evalbot_10015 *** unexpected "$" expecting "#" or identifier at -e line 2, column 8
gaal guess evalbot isn't very well.
lichtkind ok but this fancy bace notation was right?
:2(3) is boolean 13:31
gaal theorbtwo: is there a particular reason to believe that there are more things wrong in the p6 defaults than in p5?
lichtkind: the syntax is right but of course 3 isn't a valid digit in binary
pmurias i think p6 has generaly saner defaults 13:32
theorbtwo gaal: I'm not sure yet.
lichtkind gaal i mean to convert a dec 3 to bin , i still wander how to pronounce things at the base like 43
13:32 Arathorn joined
gaal lichtkind: :n() is from base n 13:33
theorbtwo lichtkind: That's not how you do that.
gaal I forget how to to to base n
theorbtwo What you said is "This is the number 3, in base 2." That's like saying "what colour is scent".
gaal probably with .as
pmurias theorbtwo: have many wrong/controversive defaults does p6 has now? 13:34
gaal s/to to to/to do to/
of course if you have a lotta knobs, people will want to set them at different places
theorbtwo There's a fair number of them, I think, but they mostly seem to have their reasons, and I'm not sure how many of them will really be bad, as opposed to just be feared...
...and many of those aren't really syntax. 13:35
print (1, 2) for example.
And 1<2.
gaal as opposed to not having knobs, and people wanting to set them not being able to :)
lichtkind ok gaal but how to express base over 16 :42(dDg5a) ?
theorbtwo lichtkind: Base 17 is 0,1,2,3,4,5,6,7,8,9,a,b,c,d,e,f,g. 13:36
pmurias any way use theorbtwo:Style or use pbp:Style should be enough
gaal lichtkind: not sure it's specced yet, but presumably up to 64 it's straightforward
theorbtwo Exactly. That's the second answer to the fear that I just gave. 13:37
gaal after that, maybe accept a list of numbers strictly lower than the base?
i dunno; what does the spec say? 13:38
pmurias should i check in the answers to the fear?
gaal pmurias: why not
theorbtwo pmurias: Good with me.
lichtkind theorbtwo thanks and jow to convert dec to a base and how will be performed real number?
gaal re fears, it's not like any of these have an authoratative answer, anyway 13:39
theorbtwo gaal: I think the syntax is that you seperate each "digit" with colons, and write them in base 10.
gaal makes sense.
theorbtwo You're free to use that with any (supported) base, of course.
That's what we specced back when perl6-documentation was active, anyway.
pmurias i'll add a new fear of mine "Perl 6 will split into incompatible dialects"
gaal :16( :16(a) :24(a) ) :-) 13:40
:16( :16(a); :24(a) ) that is
theorbtwo gaal: I hope that isn't legal...
gaal which is surprising perhaps but has a clear meaning
well actually no 13:41
:25( :16(a); :24(a) ) does.
lichtkind pmurias but something like perl6 would have prevented the split into php
theorbtwo No, it wouldn't have. 13:42
lichtkind why?
theorbtwo You could easily make perl6 into PHP, but you'd have to work at it, and you could still get perl6 out of it then.
I think the php writers wanted something simpiler then perl, which perl6 certianly isn't.
lichtkind but perl6 has very simple subsets 13:43
you cant everything use as referenz like in php which where you have only one sigil
theorbtwo lichtkind: That sentence didn't make much sense, try again. 13:44
lichtkind i said that perl6 is very simpel like php in many areas for instance in unifying sigils you can in perl6 even use arrays and hashes wit $ as references 13:46
svnbot6 r10016 | pmurias++ | + 42 modules answered 13:48
r10016 | pmurias++ | + incompatible dialect
theorbtwo "Perl6 is very simple, like php, in many areas, for instance in unifying sigils. In perl6, you can even use arrays and hashes using only $s." 13:49
lichtkind: If you just put in a little effort to use capitals and puncuation, you'd be a lot more understandable.
pmurias custom grammars could be used to enfore very stict coding rigour 13:50
lichtkind so i have to do :10(:2(0101));? 13:52
theorbtwo lichtkind: No. 13:53
:base(number) is a way of writing literals.
How would you do what you want to do in perl 5?
13:55 vel joined
lichtkind my mistake i meant to convert dec 3 in 011 like printf "%b", 03; 13:58
13:58 dakkar joined
theorbtwo say 3.as("%b") 14:04
14:05 hexmode joined
xinming ?eval say :2(3) 14:07
14:07 evalbot_10015 is now known as evalbot_10016
evalbot_10016 *** unexpected "$" expecting "#" or identifier at -e line 2, column 8 14:07
14:12 fglock joined, cm_ joined
lichtkind thanks orb 14:13
14:13 justatheory joined
svnbot6 r10017 | fglock++ | PG-P6 - code cleanup; updated TODO; added test.pl 14:18
pmurias hi fglock
lichtkind theorbtwo your nick has nothing todo with music? 14:22
theorbtwo Correct. 14:24
I named myself theorb before I'd ever heard of the band.
Limbic_Region named himself long before there was a bad movie by the same title 14:26
fglock audreyt: re implementing the precedence parser in C - you should maybe reuse bison ?
audreyt bison allows runtime extension of tokens?
or removal of 14:27
gaal hey audreyt, are there any tests for the opparser? 14:28
fglock I haven't looked - but it is already there... 14:29
dakkar bison generates LALR(1) parsers in the form of C source code... no run-time modifications are (sensibly) possible
gaal or any way at all to tell hackage is in the right direction?
audreyt dakkar: that's what I think. 14:30
fglock audreyt: what is the top-level recdescent-parser needed for? so far PG-P6 didn't need it 14:31
audreyt fglock: toplevel recdescent? no, I just want to do the OPTable part 14:32
fglock: as a learning project purely, but pmichaud also mentioned that he'd like to port that to C to avoid parrot's overhead
gaal wonders if modern c compilers optimize strlen("string literal") 14:33
audreyt gaal: they should, prolly
rgs bison isn't very good at operator precedence parsers
audreyt gaal: re tests, I don't really know
fglock I mean, as in "perl6 will have a three-level parser" - why does it need 3 levels?
nothingmuch audreyt: Do you seek to enter the United States to engage in export control violations, subversive or terrorist activities, or any other unlawful purpose? Are you a member or representative of a terrorist organization as currently designated by the U.S. Secretary of State? Have you ever participated in persecutions directed by the Nazi government of Germany; or have you ever participated in genocide? 14:36
... "I am Codename Tea, member of the secret terrorist organization IGNY!"
"I will take over your counly with my mad programming skillz!" 14:37
"Evolve or die, capitalist pigs!"
gaal subversive activities? heavens no, audreyt uses svk
pmichaud actually, the part I'm most interested in seeing ported to C is the Match object PMCs 14:38
but having the op-precedence parser in C (or the top-down one, for that matter) will be excellent also
audreyt pmichaud: I've started some structs in optable.h 14:39
pugs/src/rules/optable*
pmichaud yes, I saw the checkin notices and briefly scanned the diffs
audreyt does the structs make sense? 14:40
pmichaud very much so
audreyt cool. the idea is that the "extras" thing will hold the arbitrary traits each token want to carry
such as the raw "pir" generation code etc 14:41
pmichaud good idea. I just added that myself this past week (i.e., exposing the token's hash to the caller to let them hang extra properties on them)
clkao audreyt: should i rename data::bind to data::capture? 14:42
audreyt clkao: Perl6::Capture XD
clkao: Pugs::Runtime::Capture probably?
clkao i thought perl6:: is for syntax stuff
audreyt yup
clkao pugs::runtime? but it's really usable for normal perl5 as well ;) 14:43
pmichaud audreyt: also, if it helps, I took a lot of clues from www.cs.rpi.edu/~gregod/Sugar/doc/design.html
clkao i mean the underlying binding logic only here
audreyt so Data::Bind is fine
with Capture and Signature as concrete objs
clkao *nod*
audreyt pmichaud: woot, thanks 14:45
fglock the only reference I found is "Perl 6 "sandwiches" an operator-precedence parser in between two Recursive descent parsers in order to achieve a balance of speed and dynamism." en.wikipedia.org/wiki/Operator-precedence_parser
audreyt pmichaud: btw, you have some kind of tests or optable?
fglock: I have no idea what that means... I've always thought that there are just two levels 14:46
what's the bottom level recdescent?
fglock I use it for the tokenizer/lexer
pmichaud audreyt: at the moment I don't have any real tests for the optable, other than the fact that PGE can't compile/run without it. :-) 14:47
audreyt: terms and other constructs below expressions can be recdescent (at least they are in PGE's grammar) 14:48
so we have recdescent for statements and block-level constructs, bottom-up for expressions, and then recdescent for terms
(plus any operators that need something more sophisticated than what we can do with simple tokens) 14:49
fglock I'm using bottom-up for statements and blocks
I was thinking about a way to translate some class of rules to bottom-up - this would allow to add a <precedence $var> to rules, and make left recursion easier 14:52
pmichaud yeah, there have been some speculative discussions in the past among the design team about having a way to translate rules into bottom-up forms 14:53
fglock as used in svn.openfoundry.org/pugs/misc/pX/Co...perator.pm - but with rule-ish syntax 14:54
14:55 lisppaste3 joined
fglock non-backtracking rules are a good target 15:04
audreyt fglock: how is "header" used? 15:05
fglock: oh btw, pmichaud and I discussed a possible way to do "statements" in a uniform fashion
fglock it is compiled together with the precedence table
audreyt fglock: consider 15:06
if -e { 3 }
versus
say 1; 2; 3;
clkao 'Testing: `sub foo($n, *%h, *@a){ }; foo 1, n => 20, y => 300, 4000`';
how should this die?
audreyt fglock: it turns out if the "if" can tell the expression parser that it should terminate parsing upon seeing " {"
clkao the order of positional and named matters?
audreyt fglock: and if the statements parser can tell the expression parser that it should terminate parsing upon seeing ";" 15:07
fglock: then both can be done efficiently
fglock audreyt: that's easy to add - just need some flags - do you have a link? 15:08
pmichaud audreyt: yes, I'm working on that part today. I'm thinking I'll either pass the expression parser the token to stop parsing on, or pass it a regex that tells it when to stop
audreyt fglock: grep S04 for "old times" 15:09
fglock ok
audreyt pmichaud: I think the expr parser knows about the token already
pmichaud: so it's safe to address it byname
pmichaud audreyt: that's what I'm thinking also
so, we'd have / if <expression: postcircumfix:{ }> <block> / and (statement level) / <expression: infix;> / 15:10
oops, / <expression: infix:;> /
oh, wait
if <expression: circumfix:{ } > <block> /
audreyt aye.
pmichaud has far too many "post" thingies floating around at the moment 15:11
audreyt but in fact, it needs _both_ postcircum and circum.
if 1 + { } # circum
if 1 { } # postcircum
(the 1+ should become a parse error) 15:12
pmichaud okay, so it'll have to be a list of tokens to stop on
fglock isn't bottom-up more efficient?
pmichaud actually, no,
if 1 { } isn't postcircumfix, it's two terms
audreyt right
so you think term:{ fixes both? 15:13
pmichaud so just circum
audreyt circum, sorry
pmichaud if 1 { } is already handled -- the expression terminates at the 1 already
audreyt cool.
pmichaud so yes, it's just <op> { ... } that we have to deal with, and that's circumfix:{ } :-) 15:14
I can always extend later to have the opparse look for a rule to stop on as well as specific tokens 15:15
audreyt fglock: yes, but bottom-up for infix:<;> has something like
1 if 4; 2 if 5;
pmichaud fglock: bottom-up is more efficient as long as you don't have backtracking
audreyt fglock: the "if" can only happen once per statement
fglock: and it's rather hard to model that way using bottom-up alone
(I tried, and failed, many months ago)
so the end-parse-on idea is much better 15:16
fglock I'll try - one sec...
pmichaud afk -- bbiab
fglock how about specifying it as infix:<if> at the syntax level 15:17
oh you mean it will not detect syntax errors
PerlJam fglock: that makes me wonder what [if] does :-)
audreyt fglock: and it would allow 15:18
my $a = (1 if 2);
which should be fine if user has infix:<if> 15:19
but this is statement_modifier:<if>
and totally not the same thing.
PerlJam yeah, things like that need do {...} to keep the humans straight.
audreyt actually, "do" is another case where we need to switch parser mode ;) 15:20
lichtkind theorbtwo orb is cool, orbital too, currently i like also very much the band of one "the orb" cofounder: KLF which made vary inspiring music
audreyt (in Perl6, "do" doesn't need the bracket.)
my $x = do 1 if 2;
PerlJam oh, that's right, I forgot about that.
fglock ok - I'm adding these to my tests 15:23
PerlJam Is there an inverse of escher's water fall? If so, it would make a good logo for perl6 where it's perpetually rising 15:24
fglock it may actually work - if 'do' is looser than 'if' - retrying... 15:25
PerlJam fglock: do and if are operators in your grammar? 15:26
fglock PerlJam: I'm just experimenting with the idea 15:27
PerlJam experimentation++
audreyt mm perpetual motion 15:30
15:31 autark joined
Juerd Argh--for the very first time I'm hating that there's little good professional Linux support available 15:32
I need to revive a broken amd64 system, and for that need a non-broken 64bit livecd, which practically doesn't exist. 15:33
And I'm desperate enough to want to pay for a solution.
Oh, and I'm remembered by this why I hated grub. Grub's way too complex, and requires too much from a system to even get installed. A broken grub sucks. 15:34
fglock audreyt: it seems to work - "1 if 4; 2 if 5;my $x = do 1 if 2;" parsed ok
Juerd I wouldn't have had this problem *at all* if it were lilo, which tries much less to be smart.
audreyt fglock: excellent! (committed?) 15:35
fglock I made 'if' and 'do' equal precedence, and tighter than ';'
audreyt what about 15:36
1 if 2 if 3
?
fglock committing - see test.pl
trying...
audreyt and what about
say(3 if 4)
?
then need to be rejected 15:37
(brb)
fglock the say() is likely to work
both fail 15:38
svnbot6 r10018 | fglock++ | PG-P6 - experimental implementation of do/if using operators
xinming fglock++ 15:40
fglock bbiab - lunch & 15:41
audreyt fglock: but it allows 15:43
(4 if 5) + (6 if 7)
which is prolly wrong...
Limbic_Region so how does it feel to be a quarter of a century old audreyt? 15:44
15:46 aufrank joined
audreyt Limbic_Region: I feel unixy 15:46
pmichaud has felt a quarter of a century old for about 10 years. :-)
aufrank hey all
pmichaud but when I was a quarter of a century old, I didn't feel a quarter of a century old :-)
pmichaud lunch, errands & 15:48
Juerd audreyt: Is it your birthday?
PerlJam pmichaud: I doubt it very seriously that you've felt .25 century for the last 10 years.
pmichaud pj: why's that?
theorbtwo audreyt: Happy brithday, BTW.
PerlJam pm: because I've seen you change. there are times when you've clearly suffered from "old-man" syndrome :)
pmichaud pj: eh? speak up a bit... I can't hear you! 15:49
15:49 FurnaceBoy joined
pmichaud lunch, errands, for real this time & 15:49
Limbic_Region wonders how many people don't read her journal
15:49 cdpruden joined
Limbic_Region she made the 10K commit 3 hours in to her 25th bday 15:50
theorbtwo was around at the time.
Limbic_Region pulled a merlyn for his 25th bday
theorbtwo wonders if it's 25 lunar years or 25 solar years.
PerlJam Limbic_Region: My imagination is running wild with ideas for what you mean by "pulled a merlyn", so what do you mean? :) 15:52
Juerd audreyt: Happy birthday :)
audreyt: And happy 10kth
audreyt thanks :) 15:53
theorbtwo: 25 solar years.
xinming audreyt: do you drink? hmm, I mean beers.. :-)
audreyt xinming: well, a bit... not really 15:54
Limbic_Region PerlJam - having written that, I think it be best not to answer publicly where it is logged so I will /msg you 15:55
PerlJam heh
audreyt you can avoid logging by say
or sometihng like that
xinming audreyt: You really should drink much today. :-P 15:56
svnbot6 r10019 | clkao++ | Make it 17 times slower than normal unpack binding, rather than 25 times. 15:57
audreyt xinming: I got excellent food instead, so no alchohol required really
xinming hmm, I don't suggest that either... as I wish to see pugs "finished" as fast as It can be. :-)
PerlJam audreyt: forget drinking, but you should take a vacation or something (at least for the day)
audreyt PerlJam: oh but I did
clkao she is always on vacation
and having fun ;)
PerlJam clkao: yeah, I was thinking just that
xinming audreyt: did you ever come to Kunming?
audreyt had arguably the best meal I had in .tw ever 15:58
clkao what's the point about kunming during spring? it only has a point when it's not spring elsewhere ;)
audreyt xinming: not sure... if YAPC::China happen sometime this year then maybe
mm, kunming the cospring
xinming clkao: It's all spring...
clkao that's what i meant.
Juerd It's naive to assume there's only one logbot here.
audreyt I stand corrected. 15:59
Juerd And there are probably many lurker clients that log
audreyt *nod*
aufrank audreyt: my girlfriend still goes on about the food in .tw from when she studied there
xinming which means, the temperature in Kunming almost everyday is about 10 - 23 centigrade...
kolibrie audreyt: happy birthday (just in time)
Limbic_Region wonders if audreyt meant to say "I sit corrected" or if she really isn't standing - in the shower, on a hike in the mountains, fast asleep - she hacks everywhere 16:00
audreyt indeed, now it's past... :)
PerlJam audreyt: What's your localtime?
xinming audreyt: Not passed here. :-P
audreyt PerlJam: 00:01
kolibrie audreyt: you are now at midnight 19 april?
audreyt yup
(shower, bbiab)
xinming wonders where is she now....
fglock back 16:01
audreyt Limbic_Region: I was actually walking around
xinming s/where is/where she is/
audreyt xinming: taipei
PerlJam Limbic_Region: she could be like rumsfeld and stand as her desk/whatever to hack.
PerlJam imagines audreyt walking around with a monicle and one of those one-hand chording keyboards. 16:02
Juerd That'd be scary 16:04
xinming images there is a water-proof computer in bathroom.... :-) 16:05
Juerd You don't need your computer to be water proof
A laptop and a water proof keyboard suffice.
svnbot6 r10020 | aufrank++ | rounding methods as requested in TASKS
r10020 | aufrank++ | no tests yet
Juerd Just put something over the laptop when you get out of the bath 16:06
xinming aufrank++
aufrank I've had those sitting around for months
and decided I'd better just check them in since I wasn't working on them :)
thanks xinming
xinming audreyt: did round suite passed your test? 16:07
fglock audreyt: re (6 if 7) - how about "postcircumfix:<if ;>" :)
xinming Juerd: I mean using computer while we are sitting in bath 16:08
Juerd xinming: The computer itself doesn't need to be in the water, I think?
PerlJam fglock: heh.
Juerd xinming: You only need a screen, which can stand next to the bath, and a keyboard, which are available in water proof form for around $15
xinming wonders why the round suite of mine are all erased... :-/ 16:10
Juerd: how about the screen leak the electricity.... 16:11
aufrank: I've implemented... :-/
aufrank my mistake xinming
very sorry
Juerd xinming: The screen doesn't need to be in the water either. 16:12
xinming: Most human heads can rotate by means of a neck.
xinming Juerd: well, but the problem is in bathroom... it's wet... how about it went 'short circut' ? 16:13
aufrank: hmm, I think you can rename mine... :-)
first revert, and revert mine...
oops.
rename...
kolibrie fglock: when I try to run the MyGrammar example in Pugs/Compiler/Rule.pm, I get:
perl MyGrammar.pm Can't locate object method "any" via package "MyGrammar" at (eval 5) line 9.
xinming first revert mine, and rename it... 16:14
kolibrie fglock: is there a 'use' I should add
xinming aufrank: and let others who needs this to use that...
aufrank xinming, check /msg 16:17
xinming aufrank: yes, I've seen your mess...
fglock kolibrie: did you try - use base 'Pugs::Grammar::Base'
xinming hmm, I don't like to type /msg in each line... :-)
Juerd xinming: Has never happened to my laptop. 16:18
xinming: But it could happen, and a permanent installation should probably be designed to not shock people.
xinming: My point was that to use a computer while bathing, you don't need much 16:19
xinming hmm, In my opinion, and water-proff pda is enough... :-)
svnbot6 r10021 | fglock++ | PCR - fixed POD example 16:21
xinming aufrank: It's ok, I've reverted mine, and renamed mine with another name... :-)
aufrank ok, sorry about that 16:22
svnbot6 r10022 | yiyihu++ | Because aufrandk also implemented rounding suite... And It overrite mine...
r10022 | yiyihu++ | So I renamed mine, and commit... :-)
aufrank had better get more comfortable with svk :[
xinming uses svn... because xinming thinks that svn is easier... 16:23
aufrank goes to look at xinming's version
kolibrie fglock: hmm, no 'base' in my use Pugs::Grammar::Base line 16:24
PerlJam svk is more powerful
fglock kolibrie: I fixed the docs
xinming will switch to svk after PerlJam's words
kolibrie fglock: thank you
xinming In fact, I believe that svk is more powerful than svn, as It can work offline... But there my internet connection is always on here. And my laptop almost online everyday... So this reason made me not to switch to svk. :-) maybe a excuse... 16:27
FurnaceBoy sure, you only need svk if you need the extra layer
audreyt no, that's entirely fine :)
if you have fast disk and always-on net
svn and svk is quite indistinguishable 16:28
PerlJam audreyt: sometimes that's a problem :)
svn sync # oops
xinming In China, an Adsl connection will cost around 12 ~ 18 US dollars...
audreyt: In fact, I think that I should learn svk too. :-) 16:29
obra audreyt: that's not true. with svn, merging still sucks 16:30
xinming the speed is about 64K byte upload, and about 200K download...
PerlJam indeed. merge tracking is a *really* good reason to use svk
xinming obra: But I believe svk will be the future. :-)
PerlJam merge tracking + offline work + mirroring are all *really* good reasons to use svk. More so if you combine them :) 16:31
obra xinming: so do I
xinming obra: oops... I misunderstand your post... :-/
Juerd audreyt: Shouldn't quickref be removed entirely, to avoid double maintenance?
PerlJam want svk features folded into svn.
xinming obra: I ever thought you said that svk sucks...
Juerd (and worse: desyncs)
obra xinming: no worries. I was reminding audrey of one of svk's killer features.
audreyt Juerd: maybe... leave a README there that redirects to Perl6::Overview? 16:32
Juerd: see the README in docs/AES/
Juerd: also I didn't import the Namespace one
quite tricky to update
clkao i should move to slovakia 16:33
Juerd audreyt: People don't read readmes :)
clkao svk is the future!
FurnaceBoy me too
Juerd audreyt: Maybe delete only the documents that were migrated?
obra grins at cl
audreyt Juerd: sure... that's all 'cept Namespace I believe 16:34
Juerd: would you do that?
Juerd audreyt: Sure, but later. 16:35
pmurias clkao: why do you wish to move to slovakia?
clkao because their country code is svk which is the future!
pmurias i see 16:36
xinming audreyt: IMO, svk lacks tutorial... I ever tried to switch to svk, but failed... Your 30 seconds(maybe) tutorial doesn't give much info about svk... :-)
svnbot6 r10023 | audreyt++ | * quickref - rm the ones that were migrated to Perl6::Overview.
audreyt Juerd: s/later/now then :) 16:37
svnbot6 r10024 | audreyt++ | * add a redirection README. 16:38
PerlJam xinming: svk is just like svn except you need to learn about sync, mirror, push, pull, and probably something else I'm forgetting.
FurnaceBoy clkao, I thought it was for the girls :) 16:39
16:39 SamB joined
PerlJam btw, speaking of svk, are there any rpms for FC5? 16:39
xinming PerlJam: But the problem is, why we switch svk is all about it's offline working, and svk doesn't gives much... hmm, maybe It's all because of I didn't try much... :-)
FurnaceBoy xinming, see www.bieberlabs.com/wordpress/svk-tutorials/
xinming FurnaceBoy: thanks 16:40
FurnaceBoy yw
audreyt xinming: if you don't do "svn merge" at all, svk is not very useful (mostly just convenience things like "svk desc") -- but if you do any merges, svk is also very nice, as obra said 16:41
clkao you can use svk for connected environment... no .svn, faster checkout operations
PerlJam audreyt: who *doesn't* do any merging? 16:43
svnbot6 r10025 | fglock++ | PG-P6 - the AST nodes are more regular
audreyt PerlJam: people who only work with a single dir and never conflicts? 16:44
FurnaceBoy well, one-person teams do less merging :)
audreyt unless you have multiple workspaces
theorbtwo I just use svn ci.
audreyt (or you are schizophrenic)
theorbtwo Sometimes I conflict, in which case it tells me, I co, resolve any conflicts, and ci again.
PerlJam heck, even when I was the only one using svn, I'd make branches that needed merging back into mainline development
audreyt I guess that counts toward multiple workspaces 16:45
FurnaceBoy sure PerlJam, it all depends on the project... I rarely branch mine
in a team, it would be hard to avoid from time to time 16:46
usually when I branch I regret it later for the extra bureaucracy and mental housekeeping :-) 16:47
obra see, svk makes that suck less
PerlJam FurnaceBoy: if you'd use svk, that wouldn't be a problem :) 16:50
FurnaceBoy I guess so PerlJam, but even so, branching is rarely required 16:53
(one man team)
I'm about to set up svk for another group,
so I'll end up learning a bit about it
maybe I'll start using it myself :-))
PerlJam The only problem I have with svk is that it's always a bit of a pain to install. 17:00
fglock the parenthesis after 'sub name ...' make a 'Signature'? 17:04
17:05 ruz joined
PerlJam fglock: aye. 17:06
audreyt fglock: "sub name (...)" it's just sugar for 17:08
BEGIN { our &name := sub is signature (...) {...} } 17:09
er
sub is signature(:(...))
where :(...) is a Signature constructor special form
and "sub" is a Sub constructor special form
LeTo $ /usr/bin/perl util/gen_prelude.pl -v -i src/perl6/Prelude.pm -p ./pugs --output blib6/lib/Prelude.pm.yml 17:10
Generating precompiled Prelude... pugs: user error (*** unexpected ":" expecting word character, "#" or "=>" at <prelude> line 32, column 13)
I'm getting this during 'make'
fglock and 'Capture' is the bound arg list, right? 17:11
audreyt fglock: right
LeTo: looking
fglock docs/notes/laziness.txt may need some updating 17:13
PerlJam :() <- \() is weird 17:15
It's one of those things where I think I'd want more correspondence between a Signature and a Capture. 17:16
(syntax -wise)
pmurias fglock: we could use a DSL instead of a series of calls to add_rule at Infix.pm 17:18
fglock pmurias: it will be implemented with 'proto name is tighter name;' when it gets translated to p6 17:20
Juerd :() is someone with fat lips 17:21
fglock actually, it is the other way out - add_rule is what 'proto' compiles to
svnbot6 r10026 | audreyt++ | * Preparing for a default-commit parser.
r10026 | audreyt++ | (also fix the Lexer overeager commit reported by Leo.)
Juerd I can't imagine what \() should be :|
audreyt or just parse svn.perl.org/parrot/trunk/languages..._optok.pge :)
fglock audreyt: sure
Juerd audreyt: Do you have preliminary performance improvement figures for the s/try// hacks? 17:22
audreyt Juerd: it parsefails very fast.
;)
which is an improvement alright
but those used to be parseok and should continue to be
so all figures are purely empty at this point
Juerd audreyt: :) 17:23
audreyt: Okay; thanks
17:23 geoffb joined
pmurias fglock: how far is PG-P6 from parsing grammar_optok.pgr? 17:24
fglock pmurias: I'll check - I've been targetting Test.pm so far
pmurias: it looks reasonably regular - I think it takes some 5 or so new keywords 17:28
pmichaud fglock: the rules for parsing optok.pge are in compilers/pge/pgc.pir (in the parrot svn) 17:29
fglock: line 258 17:30
svnbot6 r10027 | audreyt++ | * undo another lexer tweak - not the time yet
LeTo audreyt: should r10026 have fixed my build bug?
audreyt LeTo: r10027, yes 17:31
LeTo up'ing ...
fglock pmichaud: I'm trying to parse statements using bottom-up - I wonder if this is plain wrong, of just not standard
pmichaud fglock: I really don't know the answer to that 17:32
fglock otherwise I'll change back to rules
pmichaud I think the grammar will be easier to manage if statements and above are top-down
fglock what's above statements?
pmichaud blocks, subs
(okay, subs are also expressions, but parsing a sub is probably easier top-down) 17:33
LeTo audreyt: thanks, that worked
17:34 DaGo joined
fglock the statement grammar is about 40 lines so far - it may get to about twice that when it is complete 17:35
17:42 vanjuggler left
fglock but this is still just a test... and I could translate the rules to bottom-up just to see if it works 17:43
audreyt waves g'nite & 17:45
lichtkind good night 17:47
?eval do{;}
17:48 evalbot_10016 is now known as evalbot_10025
evalbot_10025 *** unexpected "$" expecting "#" or identifier at -e line 2, column 8 17:48
xinming ?eval do {;};
evalbot_10025 *** unexpected "$" expecting "#" or identifier at -e line 2, column 8
lichtkind still broken i think
xinming a bug... :-)
audreyt wait a while
r10027 fixes that :)
lichtkind but it was valid perl6? 17:50
xinming lichtkind: IMO, It' valid
lichtkind thanks (writing chapter5 : control flow)
17:57 evalbot_10027 joined
audreyt ?eval do {;}; 17:58
evalbot_10027 undef
17:58 larsen joined 18:00 zgh joined
aufrank lichtkind: writing what for what? 18:03
lichtkind aufrank perl6 tutorial for our german perl community 18:04
aufrank neat :)
lichtkind aufrank the plan is if there is nothing better there to translate it too back
aufrank excellent
lichtkind yes but still a plan im working on this a since 7,8 days maybe 18:05
18:07 KingDiamond joined
lichtkind aufrank wanne see ? 18:09
aufrank my german's not so good :[
lichtkind your name sounded german to me :) 18:10
aufrank yeah, it's in my background but I don't speak any 18:11
svnbot6 r10028 | fglock++ | PG-P6 - parses Test.pm until line 282; half implemented Signature
aufrank I'm austin frank in the real world, aufrank is just a shortening 18:12
fglock PG-P6 is parsing about 40 lines/second 18:22
aufrank fglock: what is the PG in PG-P6? 18:23
fglock the Pugs::Grammar::Perl6 p5 module
aufrank gotcha 18:24
PerlJam fglock: and can it parse iteself? 18:25
pmurias it can't parse p5
fglock hey, that's just about 15 lines to go :)
PerlJam: it's written in p5 (so far)
the rest of the file is pod 18:26
PerlJam fglock: can it generate pir ?
fglock PerlJam - it is just the parser - but you can plug a pir emitter 18:27
it generates a syntax tree
PerlJam so, it's conceivable that the TGE tools can work on it? 18:28
fglock PerlJam: I hope so
pmurias it can generate the syntax tree in yaml,p5 or xml 18:29
so if you can import any of those into parrot TGE can do the dirty work 18:30
xinming then... perl 6 will be self hosting. :-)
PerlJam I don't think TGE yet groks any of those syntaxes. 18:31
TimToady fglock: the problem with doing bottom-up everywhere is that you'll end up inventing a stack to do what top-down does naturally in terms of nested scopes that have different terminators.
pmurias parrot had a yaml parser, but i think it's broken now
TimToady or other scoped policies.
PerlJam TimToady: everyone has their own path to enlightenment :) 18:32
TimToady plus bottom-up almost never produces as good an error message.
pmurias PerlJam: i have a module to embed parrot on my hd, if you invent a way to pass data to it you can use TGE 18:33
fglock TimToady: the only problem I found so far is (1 if 1) - do you have other possible examples? re error messages - right
TimToady so mostly we introduced bottom up to handle all the precedence levels efficiently, not because we though bottom up was an end of its own.
fglock ok
TimToady An term that has arbitrary bracketed terminators is going to be better top-down. 18:34
*Any
qq/ foo { bar } baz / for instance, has to terminate the inside on } but the outside on /
That's the sort of place you *want* to use recursion. 18:35
18:35 ra015599 joined
TimToady plunging through 22+ levels of precedence is where you don't want to use recursion... 18:36
PerlJam 22+? are they multiplying? Or are you just including the potential user-levels?
Juerd We have 22+? 18:37
lichtkind 22
fglock 'qq' is actually a term in PG-P6 (it's a 'mini language')
TimToady users yes
A term is an entry to a top-down parser.
Entry to any mini-language is a top-down parser.
fglock qq is parsed by a rule
TimToady Anything that's parsed by a subrule is top-down. 18:38
Juerd wishes that with all the activity here, and in things he understands (rather than Haskell ;)), he had more time to spend on Perl 6
TimToady don't we all...
PerlJam TimToady: What do you do for a day-job these days?
fglock qq is parsed by a rule, and the result is term... ?
Juerd I can barely keep up with what's going on; I'd need much more time to actually understand all of it and even more to help hacking :(
TimToady I'm working with an outfit called Netlogic Microsystems.
PerlJam TimToady: let me guess ... doing stuff that in no way relates to language design? 18:39
TimToady A term is just something that looks single to the bottom-up parser. It can be arbitrarily complicated inside.
has to do with pattern matching. They seem to think I know a little about regex... :) 18:40
Can't say much more than that...
If there is top-down at the top of the grammar, it's probably a rather thin layer.
fglock yes - the idea is that complicated things won't bother the bottom-up parser - so far it seems to work 18:41
TimToady Probably mostly just to give the grammar a named rule at the top so you could, say use .wrap on it.
fglock I think we are in agreement
TimToady but I think everything down to the expression level could easily be top down without affecting performance.
fglock yes - the bottom-up parser is wrapped into a rule API 18:42
fglock should learn to make cool drawings 18:43
TimToady so, for instance, statement_modifier:<if> could be handled top down rather than bottom up in order to enforce the no-nested modifiers rule.
I made some cool drawings once...but I think everyone's tired of them by now... 18:44
fglock :)
pmichaud TimToady: maybe some new cool drawings for yapc or oscon? ;-) 18:45
fglock modifying the parser once it is working is rather easy anyway :) 18:46
PerlJam pmichaud: Are you going to bring a rendition of perl6? That would be the coolest drawing ever :)
pmichaud PerlJam: I shall do my best :-)
personally, I think that grammar_parse.pge and grammar_optok.pge are quite nice looking :-) 18:47
theorbtwo wonders if a call-tree of grammar rules would be...
...(a) hard
...(b) pretty
...(c) useful 18:48
PerlJam ...(d) pretty hard
.....(e) hardly useful
.....(f) pretty useful
pmichaud I was already thinking of putting some counters into PGE that would let us keep track of, say, the number of backtracks that occur 18:49
pmurias pmichaud: grammar_parse.pge looks good..
PerlJam pmichaud: you think the line between top-down and bottom-up might need to move?
theorbtwo U+2665's dot. 18:50
pmichaud PerlJam: I have it exactly where timtoady suggests -- that seems like exactly the place to go
fglock pmichaud: would grammar_rules.pge work without '<after...>'? It is not yet implemented in PCR :(
pmichaud fglock: I'm thinking I'll be able to eliminate the <after ...> 18:51
I didn't like having it in there in the first place
PerlJam fglock: sounds like an incentive to implement <after:> though :)
fglock pmichaud: re counters - that's a good idea
pmichaud especially with audreyt's observation about infix:;
18:52 ra015599 is now known as cmarcelo
fglock PerlJam: I started implementing it, but then I started PG-P6... 18:52
lichtkind ?eval do {;}
18:52 evalbot_10027 is now known as evalbot_10028
evalbot_10028 undef 18:52
lichtkind ?eval do {}
evalbot_10028 undef 18:53
Juerd www.reghardware.co.uk/2006/04/18/am...verse_smt/ # "It's the very antithesis of the push for greater levels of parallelism", "the software industry will have had several years focusing on multi-threaded apps, and it may not want to go back." 18:54
18:54 cmarcelo left
Juerd also ā™„ dot, but actually has the unicode character at his disposal ;) 18:54
theorbtwo I'm in the console at the moment. 18:56
I'm expermenting with avoiding X and it's visual distractions.
So far, it's not going too well.
pmurias use ratpoison
theorbtwo pmurias: I don't mean the window manager.
I mean firefox.
ayrnieu theorbtwo - ratpoison or treewm can both make it easy for you to shove firefox out of the way for a time. 18:57
theorbtwo Turns out that firefox isn't as huge a problem as I thought.
Irssi is.
ayrnieu theorbtwo - how many channels do you have? 18:58
theorbtwo 9.
PerlJam theorbtwo: cut back to just the essentials. #perl, #perl6, #parrot. :-) 18:59
theorbtwo I'm not on #perl or #parrot.
PerlJam well, for you then just stick to #perl6 and cut the rest! :)
pmurias i was on perl.org #perl for a while, but some of the people were sick so i left
theorbtwo gets rid of #london.pm, #catalyst, and #dbix-class 19:00
pmurias what do you have left?
aufrank is curious what the other five are ;)
Juerd is on 24 channels... 19:02
theorbtwo #axkit-dahut, #qemu, #foobarbaz, #perl6, #chat, #perlmonks
Juerd But I don't feel any need to look at them regularly.
They don't get in the way of getting things done.
ayrnieu cutting out channels /does/ help, though. It also helps to switch from something like irssi to something like rcirc, where you can scatter visible channels across your workspaces and not spend time switching between channels in one window. 19:03
theorbtwo closes #qemu too.
pmurias theorbtwo: you are an emacs user? 19:04
theorbtwo Yes.
I use mostly emacs the text editor, not emacs the operating system, though. 19:05
PerlJam yeah, but rcirc seems to require emacs and that's just a tad beyond the pale :-)
ayrnieu PerlJam - IRC is already dead easy to write a client for. Knowing Emacs just lets you target that platform and save on UI the way you'd normally save by targetting a terminal in unix. 19:06
Juerd 21:07 < ayrnieu> PerlJam - IRC is already dead easy to write a client for. 19:07
ayrnieu Juerd - it's true :-)
Juerd Writing a good one, suited for people who spend a lot of time on irc, is HARD.
buu ayrnieu: I seem to be recoding emacs as an irc client =[ 19:08
Juerd Getting the right user interface is the hard part. The protocol is the easy part.
I'm a very demanding user when it comes to IRC.
Irssi is far from perfect, but the best solution I'm aware of.
buu Juerd: So, just curiously, what features are you missing? 19:09
Juerd buu: A usable splitscreen layout, or better: tiled windows
i.e. horizontally AND vertically split
buu Juerd: Irssi doesn't do that?! 19:10
Juerd: Damn, even mine does that.
Juerd Not in a way I can use in a nice way.
ayrnieu Juerd - I prefer rcirc to irssi, and only technical problems have prevented me from sticking with that. Eventualy I'll have a pretty client in Erlang instead of this debugging: paste.lisp.org/display/19114
buu What is a nice way?
ayrnieu: A pretty client.. FULL OF ANGST.
Juerd Typing commands to switch windows sucks, having the input line removed far from the window you're looking at sucks.
buu Ah
Juerd buu: A nice way duplicates the entire interface, rather than only the scrolling part. 19:11
buu I'm pretty sure you can bind a key to switch windows..
ayrnieu I also dislike input windows that are smaller than my input.
Juerd buu: And a nice way lets one switch tiles with easy commands.
PerlJam uses Alt-N to switch windows (where N is digit from 0-9)
Juerd buu: Given tiled windows, the nicest way to switch would be some meta key combined with cursor keys.
theorbtwo uses alt-a to switch windows. It automatically switches to the next window with input.
buu Juerd: I ask because I'm entertaining my self by bolting irc on to the back of my scary CUI
pmurias CUI? 19:12
Juerd PerlJam: I mean visual windows, not the windows as irssi has them. I switched to calling them "tiles" to differentiate.
buu Juerd: You can't bind "alt-left" to "/window next" ?
PerlJam Juerd: oh, I see
buu Juerd: Ratpoison =]
Juerd buu: I want alt-left to select the tile that's visually left of the currently focussed one
buu Screen irssi, open up X screens that view it..
theorbtwo Other then that, I use esc, N to switch channels -- alt-N switches virtual terminals.
Juerd buu: I do not want multiple X windows for irssi; I want to keep it within one screen(1) window.
buu Juerd: But multiple X windows are cool.
ayrnieu (with rcirc and emacs I've had pretty crazy channel layouts.) 19:13
PerlJam buu: not really. I'm with Juerd on this one.
Juerd No, they suck, until there's a nice way to combine it with screen.
ayrnieu Juerd - why not in multiple windows under screen(1) ?
buu PerlJam: Only in a crappy window manager.
PerlJam buu: name a non-crappy window manager
buu Anyway, I'm soliciting feature requests
ayrnieu PerlJam - treewm.
buu PerlJam: Ratpoison =]
pmurias ratpoison++
buu Although stump is starting to look cool.
PerlJam cd 19:14
oops
pmurias wmii is looking promising
buu Really?
ayrnieu buu - if stump doesn't look as cool, hack it. I easily added windowgroups.
pmurias buu: have you seen the latest snapshot?
Juerd wmii sucks. It doesn't do visual intuitive navigation, and they're going to remove tiled mode.
buu ayrnieu: I dislike hacking in lisp. And RP does everything I need so I have no real incentive to switch
pmurias: Negative.
Juerd ayrnieu: Because screen can also not split vertically, also has weird focussing key combinations. 19:15
ayrnieu: And because you can't move irssi windows from one irssi process to another.
buu Juerd: At the moment I have the code to create multiple windows on the screen, each one with its own typing buffer and contents and so forth.
I'm bolting IRC to it, but I'm unsure how to do it generically
Also I need a data query language.. 19:16
I think regexen would be too limited but SQL seems too verbose 19:18
Not to mention requiring some sort of SQL interpreter
theorbtwo sqlite?
pmurias buu: what is a cui interface? 19:19
command user interface?
ayrnieu curses.
buu pmurias: Console, curses, etc
theorbtwo Like a CLI, but rhymes better with GUI.
buu pmurias: Like screen.
theorbtwo: Not really...
ayrnieu theorbtwo - also, different.
buu I may be in the minority here but I think there is a distinct difference between CLI and CUI
theorbtwo Oh! 19:20
buu CUI is a GUI in every respect except implemented with characters instead of pixels
theorbtwo You mean "give all the functions hotkeys".
19:20 aufrank joined
buu You get windows and buttons and such like 19:20
theorbtwo Oh.
PerlJam buu: I've always called that a TUI (Text)
buu CLI programs only operate directly from a command line.
theorbtwo How is this like screen?
buu PerlJam: Well, yeah.
pmurias theoreticly CLI could display graphics
buu theorbtwo: Screen is a [CTX]UI that displays CLI applications =] 19:21
theorbtwo: Better example is IRSSI, VIM, EMACS, CAPITAL LETTERS.
aufrank just started up rcirc for the first time
pmurias and what is ratpoison?
ayrnieu anyway, "I want to print things to multiple windows which should act mostly like terminals and accept control codes and such, and I also want to get mostly line- but also with hotkeys input from the user." is a common and generic enough problem that you should be able to write an IRC client with a CUI and then switch over to a GUI with as much trouble as loading a differently-named library.
buu pmurias: Er. What? 19:22
ayrnieu: This is true.
pmurias is ratpoison a CUI?
buu pmurias: Er. No.
theorbtwo Most of those examples, except possibly vim, have two distinct ways of interacting with them, which you blend.
19:22 lichtkind joined
buu Ratpoison is a window manager =] 19:22
theorbtwo One is typing commands into a command-line within the application.
The other is to press hotkeys.
lichtkind ?eval do 1 if 2;
buu theorbtwo: The distinction isn't how you input commands, it is how you see results.
evalbot_10028 1
ayrnieu theorbtwo - buu's 'CUI' differs in that it controls the interface with terminal control codes; 'CLIs' are just normal unix programs.
theorbtwo Ah. 19:23
buu For example, 'display foo.png' is a CLI command, but the window it creates is a GUI
More or less. I'll admit it can be a tad fuzzy
I mean, what is bash?
pmurias a shell
buu =]
ayrnieu buu - a CLI, even with GNU readline. 19:24
buu Yeah, I think so
pmurias vim can be a pure CLI if it want to 19:28
just run :ex
*wants
ayrnieu vim++ not supporting vi's Q 19:30
pmurias use gQ, Q dosn't work dispite the manual 19:35
theorbtwo Hmmpf, why does $stack[@stack] = $game->object($global_vars[195])->parent; 19:36
call FETCHSIZE on tied(@global_vars) ?
PerlJam theorbtwo: that doesn't look like perl6 ;-)
theorbtwo Hm, perhaps I should join a actual perl channel.
pmurias he used "use regresive <arrow>;" at the top 19:37
*regressive 19:38
PerlJam theorbtwo: $stack[@stack] is odd btw. Why not just use push?
theorbtwo PerlJam: Becuase I want to be able to say $a = ... (store), and $stack[@stack] = ... 19:39
That's generated code.
svnbot6 r10029 | fglock++ | PG-P6 - Test.pm parsing succeeds - except that it is trying to parse the
r10029 | fglock++ | examples in the pod...
aufrank fglock++
pmurias shower&
fglock it's not usable yet
ayrnieu pmurias - vim admits to not supporting Q, last I saw; which is good for me because when I use !vim vi I am somehow always hitting that key. 19:44
19:44 Arathorn is now known as Aragone 19:53 b_jonas joined 19:56 coumbes joined 19:57 coumbes joined 19:58 hcarty joined 20:00 hcarty left
pmurias ayrnieu: it's describe in :help Q, anyway i don't need it so i don' care what disables it 20:04
*described 20:07
fglock: can't locate Pugs/Grammar/Ternary.pm 20:26
fglock adding...
svnbot6 r10030 | fglock++ | PG-P6 - Ternary.pm 20:27
fglock pmurias: I think now it is possible to work in the AST in parallel with the parser - most of the remaining things are just refactorings 20:28
do you think we need an AST class for creating nodes?
pmurias depends on the for of the AST, but if we have references why not bless them? 20:30
*form
what oo module should we use Moose,Spiffy or default bare-bones 20:33
? 20:34
mugwump Moose!
buu pmurias: Flee in terror.
mugwump As the author of a different oo accessors module :)
fglock I'd rather use bare bones for speed... 20:35
bbiab &
pmurias buu: do you think a herd of angry moose is comming to punish me for mentioning Spiffy?
20:36 PolettiX joined
buu Yes. 20:36
pmurias resistance against the moose if futile 20:37
buu I have a timber wolf who begs to differ. 20:38
cognominal but what about a pack of lambda-meese? 20:43
buu Flame throwers. 20:44
cognominal they will invoke a continuation an reappear elsewhere :)
s/an/and/ 20:45
buu Probably. Bastards.
fglock Meese = Moose.All 20:46
buu EXACTLY.
20:53 PolettiX is now known as froh-doh
pmurias fglock: if you care about speed much, subroutine would would be faster 20:54
we could use only those feathers of Moose wich don't use to much speed 20:55
will the generated code use Moose if not it would be an aditional dependency 20:59
svnbot6 r10031 | fglock++ | PG-P6 - TODO - more detailed bugs and workarounds
pmurias good night
sleep&
21:08 ruoso joined
ruoso pmichaud++ 21:11
ruoso just saw parrot/languages/perl6 21:12
pmichaud it's coming along very nicely, yes :-)
I still need to craft up an announcement. Maybe I'll do that while waiting at my kids' swim lessons
ruoso will take a better look @ home 21:15
ruoso wishes he could have more free time :|
21:17 particle_ joined
particle_ hi-o 21:17
what do infix:~< and ~> do to a string? 21:18
theorbtwo Stringy bit-shift. 21:19
particle_ is that per-char?
theorbtwo Da.
particle_ thx # implementing in parrot's languages/perl6
TimToady not intended to be per-char, actually. 21:20
particle_ please tell me more
TimToady really only intended for buffer types that are of fixed width chars
As in, treat the entire string as a single n-bit number.
particle_ say, ucs-2
TimToady As soon as you start shifting bits, characters are meaningless.
I'd be comfy limiting it to byte buffers. 21:21
particle_ okay, so it's actually bit shifting. that should be fun
(to use) 21:22
TimToady If you want to do a bunch of them in parallel you should probably be using an array and a hyperop anyway.
so I think it can just blow up on anything that looks like characters, or at least characters that might be bigger than 255
b_jonas couldn't we just have a bit vector type, and some conversion functions to/from integer and byte string? 21:23
TimToady but probably it should be explicitly limited to strings that we know are restricted that way already.
LeTo TimToady: that should be a method on BitArray then, but not a char opcode, I think
fglock TimToady: [op] is only meant for infix ops, right?
TimToady right
b_jonas I mean, in ruby, you can use & | ^ << >> on bignums, and [] too to get a bit, but not []= because numbers are immutable, so you don't have a real bit vector 21:24
TimToady With Int being arbitrary precision, the need for a larger shiftable type becomes less.
LeTo and given the proposed 'chained strings' (a mix of various encodings for one string) - what would/should ~< do? 21:25
b_jonas which just shows why I think Int isn't a good type for bit vectors
TimToady I don't mind most of this ending up in a bit array type.
as long as we can set/get as as buffer 21:26
theorbtwo I wouldn't either, if the bit vectors are easily convertable to/from a... exactly.
b_jonas what operators would you use with a bit array type btw? I mean like ~&, +&, ?&, or something else?
theorbtwo Even better if they're tied together.
mugwump pmichaud: I'm going to write about our little interview yesterday on use.perl.org...
LeTo ~< as now could work on any charsets/encodings, which doesn't make sense to me
b_jonas yep, easy conversion is important 21:27
TimToady ~< is free to blow up on any data type that doesn't make sense.
pmichaud mugwump: okay, excellent
LeTo ok - but what does make sens - shifting (7,8,16,21,32,utf8, ...) whatever bits/encodings around? 21:28
this needs more specs, also with ~| et al 21:29
the implementation can of course just bitwise_foo what is there ;)
TimToady I think we maybe have some types that can be viewed either through the $ or @ interfaces. The $ interface can treat the whole thing as a huge integer for bit ops, but really only if the individual bits of it are consistent. Doing parallel bitops to dissimilar values should always use @ interface, i think. 21:30
but yes, it needs to be specced better.
LeTo is the $ interface really needed then?
TimToady the entire spec is quite weak on the buffer vs string distinction right now 21:31
b_jonas if we'd have long bitshifts, it would make a fast implementation of game of life possible
TimToady The intent of ~< is to do long bitshifts in something like a byte buffer. 21:32
LeTo a Int is a nice bit buffer, and supports shift anyway as well as an Array of int1 ;)
TimToady depends on the implementation
some BigInt implementations are, like, base 100,000, not some binary base. 21:33
harder to pull the bits out of.
b_jonas LeTo: let me repeat, you can do bitwise ops on an Int and shift it, but there's no easy syntax for setting a single bit, and possibly not for reading a single bit either
theorbtwo So why not spec one?
TimToady The stringwise bitops in Perl 5 are very handy for some things, but of course they have nothing to do with Unicode.
why not spec one what? 21:34
b_jonas TimToady: that's true (bc is base 10, and iirc Math::BigInt::Calc is base 10_000), but GMP which is a great and _very_ _fast_ bignum implementation is base 2^n
mugwump TimToady: is there a way with rules to specify which language the block at the end is in, or to give alternate language versions, or to augment rules in a grammar with code blocks?
b_jonas (though sign-magnitude, but that's a detail)
LeTo b_jonas: +|= +& ...
theorbtwo Way to get some bits out of a bit-buffer.
TimToady fine, but we can't really use GMP if it's pure GPL. 21:35
pmichaud mugwump: rx :lang('Ruby') / \d+ \s+ {{ ruby code here }} /
b_jonas hmm. licencing. that's a point.
ruby's bigints are slow and are base 2^n too.
I think base 2^n is usually the way to go in today's computers
TimToady it really depends on what you're going to do with them. 21:36
LeTo if the implementation is using bits or base 10_000 doesn't matter, if the result is correct (it'll be just slower maybe)
TimToady If you're mostly going to be converting base 10 numbers and just doing a few calculations, a power of 10 rep can beat a power of 2 rep.
b_jonas yes, that's true, but it's rarely needed in reality 21:37
LeTo yes, but then ~> doesn't help either
b_jonas I think the bignum library could also easily be pluggable
TimToady I'm just saying it's really easy to to bitops on a bit/byte/constantwidth buffer. 21:38
LeTo ... with layed out semantics ;)
TimToady well, then it becomes "easy to do it right", rather than just "easy", but yes. 21:39
There are lots of times you just want to play with a block of memory.
We just haven't really nailed down the relationship of that to strings yet. 21:40
b_jonas GPG is under the LGPL (at least the official variant). does that make it possible to use it?
TimToady GMP?
b_jonas uh, yes, GMP 21:41
LeTo: I don't really understant that
TimToady makes it possible
b_jonas do you mean +|= 1 +< $n and +&=+^ 1 +< $n ?
particle_ that's what i'd use, b_jonas 21:43
b_jonas and, you know, what makes GMP fast is that a derivative of it is used in GPG which has to do lots of bignum calculations
LeTo the mathematical shifts should work on any Int implementation (the Int isn't 32/64 bit anymore)
TimToady That's all fine for +< and such, but we'll still have ~< et al.
particle_ well, i'm gonna wait on implementing ~> just now 21:44
b_jonas particle_: and two of them with an if when you have to assign to a bit?
mugwump wishes SVN's web interface didn't suck 21:45
TimToady I think what I'd like to say is that any compact array of native integer type can be used as if it were a string
b_jonas GnuPG itself is under the GPL, not LGPL btw
TimToady my uint8 @array; substr(@array,0,8) being the canonical byte buffer.
so @array ~< $bits would just naturally fall out of that. 21:46
Maybe better to alias it to $array though. 21:47
Alternately, a byte string $buffer can be used as an array @$buffer. 21:48
particle_ i have a clear picture of that 21:49
TimToady (same holds for bit strings, nybble strings, etc.)
particle_ (which is nice :)
theorbtwo Only for bit-buffer strings, right?
TimToady If I say bit string, I'm not thinking Unicode... 21:50
I'm using "string" in a very old fashioned sense that predates even "byte strings" 21:51
particle_ encoding is binary
theorbtwo OK.
TimToady A string is just a sequence of similar things. Just how similar is a negotiation with the compiler.
theorbtwo I'm just making sure we aren't going to make 'asdf'[3] magically do the wrong thing.
TimToady In the case of bit string, the things are of necessity very similar. 21:52
to some people that would be "the right thing". 21:53
theorbtwo Yes.
TimToady but in Perl think it should probably be modulated through an @ somewhere.
theorbtwo They can use a pragmata, or give their strings the right type.
TimToady right
at most, I thing .[] can happen naturally on fixed width things (that is, explicitly declared fixed width, not accidentally fixed width like an ASCII Unicode string...) 21:54
*think 21:55
so my ByteStr $foo = 'asdf'; $foo[3]; is okay, but
my Str $foo = 'asdf'; $foo[3] is not. 21:56
LeTo ?eval "asdf" ~< 8
21:56 evalbot_10028 is now known as evalbot_10031
evalbot_10031 "\d[0]\d[0]\d[0]\d[0]" 21:57
TimToady that would depend on how you've told the current lexical scope to compile stringish literals.
default is Unicode, so it would fail.
As unicode that is accidentally ASCII.
there has to be some explicit representation somewhere that you intended "asdf" to represent a string whose maximum abstraction level is, say, bytes 21:58
particle_ is there a way to cast it anonymously? 22:00
TimToady to what?
particle_ 'asdf'(is ByteStr) ~< 8 or such
theorbtwo ('asdf' as ByteStr) ~< 8
I think... 22:01
TimToady I'm sure if there isn't a way someone will write a macro very quickly...
b_jonas what about "asdf".encode(current_source_encoding) ~< 8
particle_ thinks that should die 22:02
TimToady thinks it's bogus too.
the current source encoding disappears by the time you parse
everything is Unicode to the parser.
b_jonas oh. then you need something like q8"asdf" 22:03
TimToady It's vaguely possible that it could remember the source encoding
and if so, it's possible to encode it explicitly
b_jonas oh, you mean it's lost even at that phase
TimToady but it's kind of a nutty thing to do
You shouldn't be driving the data encoding from the source encoding 22:04
particle_ that's in the spirit of perl :)
22:04 equinox5 joined
TimToady Undoubtedly it's possible, but we don't have to go out of our way to make it trivially easy. 22:04
equinox5 hi
people 22:05
How is perl 6 going
?
TimToady And, of course, in Perl 6 anything that's possible can also be made trivially easy. :)
It's not going, it's coming.
particle_ let's hope the trivially easy things are possible, too :)
equinox5 When is it coming?
TimToady Christmas
theorbtwo Perl6 seems to be good at the hard things possible. 22:06
TimToady Actualy, it's coming right now.
equinox5 Are you sure?
theorbtwo I'm less sure about the easy things easy.
?eval "Yes"
TimToady Am I sure of what?
evalbot_10031 "Yes"
equinox5 about CHristmast?
TimToady you'll not we didn't say which Christmas...
*note
theorbtwo equinox5: Around some christmas, plus or minus six months.
equinox5 that is insidious. 22:07
b_jonas Christmas? thought perl6 was timtowtdi for religions too
TimToady that is by design. It's done when it's done.
theorbtwo It's also within +/- 6 months of Passover.
b_jonas maybe april 1?
TimToady Now, if we'd said Feb 29, we'd have more of a problem.
theorbtwo Indeed.
b_jonas orb++ ah yes, that way it's good for everyone
pmichaud we still didn't say which Feb 29 :-) 22:08
although I had a contract once that said "Sep 31"
TimToady that's why it's just more of a problem.
particle_ it's within +/- 2 years of feb 29th
TimToady now Sep 31 is a problem
equinox5 Do you still have a contract ?\
TimToady for someone or other
b_jonas and there's a slight chance that it's not within \pm6 month around Easter too
pmichaud equinox5: it was a friendly contract, and we noticed the mistake a little later but decided to leave it
TimToady It'll be within a month or so of summer, I can say for sure. 22:09
equinox5 what is the problem?
because parrot is not finished?
or perl 6 is not finished? 22:10
theorbtwo b_jonas: I think there isn't if you define "month" correctly.
equinox5 is parrot good enough? 22:11
TimToady good enough for what?
equinox5 for running commercial software on it?
b_jonas theorbtwo: I'm not sure. Easter date can change more than a month.
TimToady That would be up to the commerce to decide. Most would not choose to use it yet. 22:12
But a forward looking company that wants to bet on where Parrot might be in a year might well decide the other way.
equinox5 What other way? 22:13
TimToady The other way from most. 22:14
theorbtwo Oh, right. Easter's date is kind of screwy. You'll note that I said Passover, not Easter.
mugwump use.perl.org/~mugwumpjism/journal/29365
particle_ equinox5: parrot is still under development wrt io, exceptions, threads, events, and more
theorbtwo A forward-looking company that wants to bet on where Parrot would be in a year would do well to cheat on the bet.
particle_ true 22:15
22:15 kanru joined
TimToady You mean like Perl 6 is cheating on the bet? :) 22:16
b_jonas by cheating, do you mean they'd develop it or sabotage its development?
TimToady Maybe Leo needs a bodyguard... 22:17
theorbtwo Well, I'd personally prefer the first.
SamB developing isn't cheating
particle_ leo has a cat for a bodyguard
TimToady how big?
equinox5 You mean the company would be developing Perl6 to survive? 22:18
particle_ big enough that he can type while sitting on leo's shoulder :)
LeTo 2 cats, 2 dogs
err 3 dogs
fglock pmichaud: grammar_rules.pge doesn't use a "stop" parameter for communicating with the bottom-up parser yet?
particle_ my god, those dogs multiply like rabbits! 22:19
b_jonas LeTo: www.perlmonks.com/?node_id=322329
particle_: the same 22:22
equinox5 ok bye 22:23
LeTo lhs substr should die,die,die
equinox5 I liked ti
b_jonas it shouldn't. even BASIC has it. 22:24
22:25 equinox5 left
theorbtwo I only don't like it because of the strange fragility. 22:25
$foo = substr(...); $foo = 'bar'; doesn't act like substr(...)='bar'
b_jonas yes, because there it's copied, not referenced. 22:26
theorbtwo Fortunately, in perl6, we have = and :=.
fglock TimToady: is specifying an 'end token' parameter the way to go in interfacing the rule-based statement parser to the bottom-up parser?
TimToady $foo = $x; $foo = 'bar'; doesn't act like $x='bar' either.
theorbtwo True enough, I suppose. 22:27
b_jonas $foo = \substr(...); $$foo = 'bar'; acts like it
TimToady "an" end token is probably limiting it unnecessarily. A set of end tokens is more like it.
But a match can match a set of tokens, so passing in an end match is probably sufficient. 22:28
$foo = \$x; $$foo = 'bar' too.
The real problem with lvalue substr is that Perl 5 fakes it without a real COW engine underneath. 22:29
fglock are the things inside brackets parsed using subrules? like in (@a;@b); - so that the 'end' is not matched in the wrong place 22:30
TimToady As a basic rule of thumb, if you have brackets, you probably want a subrule 22:31
22:31 Limbic_Region joined
TimToady though it's possible to do with op prec if you fiddle with infinities in the relative precedence inside and outside. 22:32
but it's difficult to detect the (@a;@b] error without knowing the "right" terminator.
fglock thanks - things are starting to fit together :) 22:33
22:34 KingDiamond joined
fglock is sub 'circumfix:( ]' a valid spec? 22:34
TimToady It's sort of like the difference between which things you need to use recursive regex on vs which things you can match with a flat regex (in P5 terms).
syntactically, yes, that's valid. You're nuts if you do it though. 22:35
And you'll likely get a warning anyway if you define two circumfixes with the same left side.
22:35 frederico joined
TimToady s/two/a second/ 22:35
but there's nothing says a circumfix can't be <fred barney> 22:37
Any pair of fixed strings is syntactically legal. Just can't be anything fancier than a string. 22:39
b_jonas that reminds me to the new string literal syntax in lua 5. Now not only [[this is a string]] but [=[this is too]=] and [==[this too]==] and [===[up to infinity]===] 22:41
Juerd What happens if you'd declare a set of {'<fred', 'barney>'}? Will it warn about the clash with {'<', '>'}?
fglock imagines code written using embedded objects and data structures - "Matching against non-strings" in s05 22:42
Juerd (Or just die, which may make more sense)
fglock Juerd: yes - there is the longest-token rule
Juerd Your "yes" doesn't agree in boolean sense with the explanation "there is the longest-token rule"... 22:43
fglock it's not a clash 22:44
so it will not warn
but '<','barney>' is a clash
likewise with this more concrete example: '<<','>>' 22:45
FurnaceBoy *mugwump wishes SVN's web interface didn't suck 22:46
have you tried ViewVC (formerly known as ViewCVS), or WebSVN?
I don't think I'd want more than the current functionality (browse HEAD) built into mod_(dav_)svn itself 22:47
fglock is "sub '++' {}" declaring "prefix:++" by default, or it a separate sub? 22:51
which just happens to clash with prefix:++ in some context? 22:53
svnbot6 r10034 | fglock++ | p6ast_draft - added some notes about keeping the operator fixity information 22:57
fglock later & - YAPC::Brasil social meeting :) 22:58
another question for when I backlog: 22:59
how to declare a global '++'? is it " sub *'++' {} "?
23:00 fglock left
TimToady fglock: sub '++' {} is not legal syntax. 23:00
any name that is not an identifier has to be in the foo:<++> form. 23:01
or foo{'++'}, equivalently.
or foo:{'++'}, rather
prefix:++ is also illegal. Has to be prefix:<++> 23:04
23:16 weinig joined 23:22 b_jonas joined 23:25 ruoso left
particle_ is the latest flip-flop name 'till' or 'ff' 23:26
TimToady ff 23:27
particle_ is there an ^ff^
TimToady yes.
particle_ thx 23:28
is there a definitive list of ops i should look at? i think S03 is incomplete
so is pugs's src/Pugs/Parser/Operator.hs 23:29
meppl gute ancht 23:31
TimToady S03 is supposed to be complete. Where it's not, we should fix it.
(that is, complete in the sense of documenting the all the differences from Perl 5.) 23:32
particle_ okay. i've been using the precedence section to implement the op tokens, i'll send a list to p6l of ops that don't appear there
TimToady thanks 23:33
particle_ s/list/patch/
TimToady though some of the precedence levels are necessarily incomplete
such as list operators
particle_ understood
23:35 FurnaceBoy_ joined
particle_ the same fff variants exist as ff, correct? 23:37
TimToady particle_: yes, that was part of the motivation for s/till/ff/ 23:44
though arguably the sed semantics of , are broken
particle_ first catch of missing op is =~ 23:45
b_jonas why, til and till is just like .. and ... or fil and fill in TeX
particle_ should be parsed, and throw error
TimToady there is no =~ operator. :)
it's just in there explicitly to catch that error. 23:46
particle_ i'm reading S03... the parser will define infix:<=~>...
so, i have it defined as is pir<" 'die'('brain-o. use ~~ or ~= instead.')">
TimToady that's fine.
doesn't even matter what precedence level it is... 23:47
b_jonas why, what's ~= then?
TimToady P5's .=
b_jonas oh.
particle_ because perl6's .= is totally different
i don't grok 'modifies the object inplace'
replaces the instance with another? 23:48
TimToady @foo.sort returns a sorted list.
@foo.=sort sorts @foo in place.
particle_ ah. thx
TimToady @foo .= sort is the binary op form of it.
b_jonas now that's a good idea, removing =~ completely
TimToady curtsies. er, bows. 23:49
b_jonas will that mean that ~~ will have the same operand order as =~, that is, the opposite as ruby's === ?
particle_ ??? and !!! are missing, too 23:50
TimToady those are terms, not operators.
unless of course we turn them into prefix operators
b_jonas S3 doesn't mention ~~
particle_ sure it does
5th bullet in 'New operators' 23:51
TimToady Are you looking at a recent S03?
b_jonas probably not then
particle_ also listed in 'chaining binary' under precedence
dev.perl.org/perl6/doc/design/syn/S03.html
TimToady should theoretically be up-to-date as of yesterday.
unless the nightly copy has died. 23:52
but you probably want svn.perl.org's copy for the most recent.
particle_ i see a 7 Apr 2006 date, version 18 at that url
TimToady but then you have to read pod.
version 18 is the most recent.
Maybe the html formatter is screwing up? 23:53
particle_ i mentioned this to pm when writing pge tests... the synopses are very well written -- quite easy to code tests against
TimToady My copy of the html seems fine.
maybe you're getting the copy from perl.com? 23:54
that would be ancient
particle_ is there an index of synopses? 23:55
i expected that to be S01, but no
TimToady the index of synopses is the Camel book. :)
Anyway ~~ is intended to be a fairly symmetrical operator, to the extent possible. 23:56
b_jonas symmetrical? wierd.
TimToady Ruby has a lot of unnecessary assymmetry builtin because of it's SMD model.
b_jonas why would it have to be symmetrical? 23:57
SMD model?
particle_ hrmm, <> and <<>> seem to be missing, too
b_jonas SMD?
TimToady single method dispatch.
b_jonas no, that's not the only reason
TimToady you mean postfix:{'<','>'} ?
b_jonas look,
particle_ i mean like qw
circumfix
TimToady that's a term, not an operator.
particle_ ah, also a term. 23:58
TimToady though the distinction is somewhat artificial.
mugwump TimToady: wouldn't that be post_circumfix:<<{ }>> ?
b_jonas suppose Foo is a class and you say 'when Foo', which tests '$_ ~~ Foo'
TimToady postcircumfix, yes
particle_ postcir...
yes
b_jonas now you want this to match iff $_ is an instance of Foo or one of its descendants
TimToady You can also say Foo ~~ $_
b_jonas but then, would Class ~~ Foo match? Class is not a Foo but Foo is a Class 23:59
TimToady There is not Class class in Perl 6.
b_jonas yes, but does that really ruin my point?
it's still not symmetrical I think