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.
spinclad ?eval my $str = "abracadabra"; if $str ~~ m:exhaustive/ a (.*) a / { say "{@()}"; } 00:08
evalbot_10587 Error: unexpected "(" expecting "::"
spinclad ?eval my $str = "abracadabra"; if $str ~~ m:exhaustive/ a (.*) a / { @(); } 00:09
evalbot_10587 Error: unexpected "(" expecting "::" 00:10
00:10 pfenwick joined 00:15 trym left
spinclad ?eval my $str = "abracadabra"; if $str ~~ m:exhaustive/ a (.*) a / { @$/; } 00:18
evalbot_10587 [Match.new( ok => Bool::True, from => 1, to => 10, str => "bracadabr", sub_pos => (), sub_named => {} ),]
spinclad no @(...) yet, i guess 00:21
nor :exhaustive
00:22 miyagawa joined
spinclad ?eval my $str = "abracadabra"; if $str ~~ m:exhaustive/ a (.*) a / { say "@$/"; } 00:22
evalbot_10587 OUTPUT[@abracadabra ] Bool::True
spinclad nor @ interpolation 00:23
?eval my $str = "abracadabra"; if $str ~~ m:exhaustive/ a (.*) a / { say "{@$/}"; } 00:24
evalbot_10587 OUTPUT[bracadabr ] Bool::True
spinclad ?eval my $str = "abracadabra"; if $str ~~ m:exhaustive/ a (.*) a / { say "{**@$/}"; }
evalbot_10587 OUTPUT[bracadabr ] Bool::True
00:25 Entonian joined 00:27 kanru joined 00:58 hikozaemon joined 01:06 GoldenGoblin joined 01:12 lambdabot joined 01:19 penk joined 01:20 lambdabot joined
QtPlatypus ?eval my $str = "abracadabra"; if $str ~~ m:exhaustive/ a (.*) a / { say join " ",@$/} 01:25
evalbot_10587 OUTPUT[bracadabr ] Bool::True
svnbot6 r10588 | fglock++ | Pugs-Compiler-Precedence - added 'fixity' info to the ast; fixed ast templates; fixed t/*; more TODO items
r10589 | spinclad++ | - JudyHS: another test program: test/HashSortAsitwere.c 01:31
01:43 f0rth joined 01:56 f0rth joined 01:58 lambdabot joined 02:00 lambdabot joined 02:17 qmole_ joined, ko1_away is now known as ko1 02:18 buu_ joined, notsri joined 02:19 buu_ is now known as buu 02:21 ko1 is now known as ko1_away 02:22 theorbtwo joined 02:27 weinig joined 02:33 cognominal_ joined 02:38 qwackqwack joined 02:40 aufrank joined 02:48 buubot joined 02:49 jabbot joined 02:52 Limbic_Region joined 03:06 qu1j0t3 joined 03:56 lambdabot joined 04:17 Alias_ joined 04:19 bjoern_ joined, Ymmv joined 04:30 weinig is now known as weinig|sleep 05:03 penk joined 05:22 SamB joined 05:43 pfenwick joined 05:44 chris2 joined 06:26 lambdabot joined 07:06 drbean_ joined 07:08 ludan joined
ludan ciao 07:09
07:14 Aankhen`` joined 07:15 marmic joined 07:38 yhsuan joined 07:53 iblechbot joined, tifo joined
tifo q 07:53
quit
08:06 mugwump joined 08:25 mugwump joined 08:28 lisppaste3 joined 08:31 kanru joined 08:47 SM_ax joined 08:51 kanru joined 08:54 gosel joined 09:18 macroron joined 10:07 mugwump joined 10:22 mugwump joined 10:29 mugwump joined 10:50 Ymmv joined
Juerd Do we have infix:<~~=>? 11:15
i.e. for untainting
$foo ~~= /(...)/;
11:18 gosel joined, elmex joined 11:20 garclak joined 11:24 garclak left 11:25 marcel__ joined 11:29 neoesque joined 11:37 kane_ joined 11:41 marcel__ joined 12:05 bjoern_ joined 12:16 mugwump joined 12:23 iblechbot joined 12:26 Limbic_Region joined 13:14 turrepurre joined 13:21 diotalevi left 13:34 drbean_ is now known as drbean, orafu joined 13:43 elmex joined 13:56 lambdabot joined 14:09 b00t joined 14:10 vel joined, justatheory joined 14:50 sahadev joined 14:51 FurnaceBoy joined 14:55 scw joined
Limbic_Region is there going to be a nice safe way to refer to a very::long::module::name with a short and descriptive lexical alias or similar? 15:15
cognominal_ ::= or something similar allows to make an alias 15:20
particle_ := is runtime, ::= is compiletime, iirc 15:21
Limbic_Region and that works with namespaces in general or just to things inside that namespace
?
particle_ well, :: is a sigil 15:23
so i *imagine* '::foo := very::long::module::name' might work
Limbic_Region okie dokie - p6 question in the PerlMonks CB that I didn't have knowledge to answer 15:24
15:25 b_jonas joined
Limbic_Region salutations b_jonas 15:32
szbalint fellow hungarian. :)
b_jonas hello 15:33
right, I'll ask a question I've just asked on perlmonks 15:34
szbalint oh you're that ambrus. Cool. :)
b_jonas I'd like to know if there'll be a standard way of using a module and giving it a lexical alias name
so that you can refer to it with a shorter handle 15:35
Limbic_Region from about 13 minutes ago
[11:23] <particle_> so i *imagine* '::foo := very::long::module::name' might work
b_jonas I'd like if that became a standard thing to do (that is, supported by the docs and community and possibly a simple syntax) 15:38
so that we can have descriptive module names but use such modules easily
particle_ i'm sure it'll be idiomatic perl 6 15:40
Limbic_Region which S covers namespaces anyway?
b_jonas S10 to S12
particle_ yep 15:41
S02 covers sigils, that's where i started looking
however, it's unclear from S02 what the syntax would be
b_jonas I looked at S11 first but didn't see anything like 'Foo := use Bar::Foo;' or 'use Bar::Foo as Foo;'
this of course wouldn't be a problem in a language which only has one kind of variable AND that includes packages too, 15:43
but the only such language I know is lua
15:43 bjoern_ is now known as DEpwnsCR
b_jonas and there you can indeed assign packages. 15:43
only, packages are mostly just tables
particle_ you might enjoy playing with lua on parrot 15:44
b_jonas in c++, you can alias a namespace by creating a new one and importing the first namespace in it; and alias a class by typedef or inheriting; 15:48
but in perl these operations aren't transparent
b_jonas looks at cltl to see how common lisp packages work 15:50
anyway, there's a strange way I imagine this could be done: 15:51
in this, the module file would contain like 'module { ... }' or 'class { ... }' 15:52
the use statement would return an anon/package which you had to assign to a (lexical) name
like 'Foo := use Foo'
or better 'Foo ::= use Foo' 15:53
and for convenience a use in void context would be equivalent to this with a sensible default name
naturally, it would still run the file once only, and would just return the same module if use is called again 15:54
this idea however disregards imports
particle_ well, i hope the syntax exists (and i think it does) 16:01
but i can't find the magic incantation
b_jonas I hope too
particle_ i can't find tests for it in the pugs repo, either 16:03
16:04 mj41_ joined
Limbic_Region if b_jonas doesn't have a comitt bit I could certainly hand one out 16:07
that way there would be no excuse for not sending a msg to the list confirming speculation and submitting a test case too
b_jonas uh 16:08
Limbic_Region so what's your email again?
szbalint oh yeah 16:09
:)
b_jonas I don't need a commit bit just to write a test 16:10
but anyway, my email is (msg)
Limbic_Region there - commit bit sent 16:13
b_jonas oh no, but I didn't want...
Limbic_Region too late 16:14
we all expect a test case to be comitted now
particle_ expects the AUTHORS file to be modified soon 16:15
b_jonas I don't even have perl6 installed or anything. I don't know what exact syntax I should use and all that. 16:16
szbalint The commit bit is free here and its handed out liberally. :)
particle_ i had mine for almost a year before i used it
16:17 iblechbot joined
Limbic_Region b_jonas - there are plenty of examples svn.perl.org/perl6/pugs/trunk/examples/ 16:17
b_jonas I mean what syntax for assigning a module 16:18
Limbic_Region there are also plenty of tests svn.perl.org/perl6/pugs/trunk/t/
b_jonas - perhaps you missed the part where I said send a message to the list confirming speculation (and then commit a test)
make something up that seems reasonable - send it to the list - let @larry chew on it and spit something back out - commit the masticated cud 16:19
particle_ you make it sound so romantic :) 16:21
16:22 fglock joined
Limbic_Region really is trying to hoodwink b_jonas into joining the funny farm 16:22
Limbic_Region is not a smart man....but he recognizes smart people 16:23
fglock Limbic_Region: were you looking for a precedence parser?
16:23 nothingmuch_ joined
Limbic_Region fglock - it would be way OT for me to describe what I am really doing here 16:24
fglock - but in short, I am looking for general purpose parsers - so yes
16:25 weinig joined
Limbic_Region found Parse::Yapp to be amazingly better than Parse::RecDescent despite not having nearly the documentation and having to write your own lexer 16:25
fglock I'm working on misc/pX/Common/Pugs-Compiler-Precedence - it wraps Parse::Yapp into something more usable by the p6 compiler 16:26
I'm planning to integrate it into the PCR distro - it will return a Match object
and accept rules as the lexer 16:27
16:27 xern joined
Limbic_Region ok - so this will all be useable for us mortals still in p5 land? 16:27
fglock sure
Limbic_Region well - any ETA on usability? 16:28
I have finished rolling my own, a half dozen P::RD implementations, a Parse::Yapp implementation, and moving on to HOP::Parser next and have about 4 others beyond that to try
I am going on vacation for the next week and a half so there will likely be about a month or more before I am ready to publish a series of meditations 16:29
fglock it is already in use by Pugs-Grammar-Perl6 - but PGP6 is currently broken, possibly because of the token/regex/rule implementation in PCR - I plan to fix it later on
Limbic_Region I would absolutely love to be able to include a "and here is what p6 has to say on the matter that you can use today in p5"
ok - will touch base with you when I am closer to finishing up with the other parsers I know about to date 16:30
fglock I plan to change PC-Precedence API to make it interact with rules more easily 16:31
16:32 lisppaste3 joined
fglock you can try Pugs::Compiler::Token if you don't need backtracking - it's the fastest parser I could implement so far 16:33
there is a benchmark in misc/pX/Common/Pugs-Compiler-Rule/benchmark.pl - it would be nice to have P::RD in that benchmark 16:35
Limbic_Region fglock - I don't <i>need</i> anything - this is an experiment in breaking the rules
fglock breaking the rules, tokens, and regexes 16:36
Limbic_Region more specifically - in what lessons one learns (both good and bad) by breaking the rules
fglock oh, that's what misc/pX/ is about 16:37
Limbic_Region well, so far I have learned quite a bit 16:38
I was expecting most of the lessons to reinforce the rule(s) but so far, that hasn't been the case
fglock I look forward for reading your meditations 16:39
Limbic_Region oh, btw, it's getting contagious - see perlmonks.org/index.pl?node_id=554516 # bart posted his own operator precedence parser
fglock I'm going to class - back in 2hr & 16:44
17:23 shachaf joined 17:38 particle_ joined 17:44 cognominal joined 17:54 penk joined 17:59 ludan joined 18:02 elmex joined 18:08 integral joined
Kattana TimToady: ping 18:16
18:20 sockstat joined 18:31 nothingmuch_ is now known as nothingmuch 18:39 DEpwnsCR is now known as bjoern_ 18:40 cognominal joined 18:47 Bleadof joined 18:57 bpederse joined 19:19 larsen_ joined 19:29 weinig_ joined 19:56 Khisanth joined 20:03 cognominal joined 20:10 cognominal joined 20:19 DaGo joined 20:41 loumz joined 20:51 cmarcelo joined 20:53 knewt_ joined 20:56 knewt_ is now known as knewt
cmarcelo audreyt && spinclad: i'm going to be (almost-)off next few days (probably until wednesday 14th) because of school works and tests. next small steps: cabal, test hsiter, changing Pugs.Prim to use BitSet... audreyt, I'll try my chances (and NOT commiting) with Pugs.Prim =) 21:00
21:00 cmarcelo left 21:02 FurnaceBoy joined 21:11 FurnaceBoy_ joined 21:20 froh-doh joined 21:25 fglock left 21:46 jsiracusa joined 22:09 marcel__ joined 22:10 cognominal joined 22:35 macroron joined 22:42 weinig_ is now known as weinig 22:43 shachaf joined 23:12 DaGo joined 23:29 shachaf joined 23:32 shachaf_ joined 23:39 penk joined