Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2007-03-22

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00:05 nelhage joined perl6
00:05 svnbot6 r15773 | nelhage++ | Typo fix loose -> lose.
00:07 buetow joined perl6
00:40 obra woot. nelhage subverted
00:44 svnbot6 r15774 | nelhage++ | Adding myself to AUTHORS
00:48 geoffb joined perl6
00:53 TimToady welcome!
01:11 H0LE joined perl6
01:18 b00t joined perl6
01:18 offby1 joined perl6
01:30 Randal joined perl6
01:35 alexe joined perl6
01:40 rlb3 joined perl6
01:41 abc joined perl6
01:41 abc left perl6
01:46 Schwern joined perl6
02:14 clkao svn.pugscode.org no longer resolve?
02:14 lambdabot clkao: You have 1 new message. '/msg lambdabot @messages' to read it.
02:14 tene clkao: apparently not.
02:14 tene not for me, at least
02:15 polettix joined perl6
02:25 esstone joined perl6
02:41 mako132_ joined perl6
03:11 meppl good night
03:15 mr_ank joined perl6
03:24 audreyt pugscode.org, perlcabal.org, audreyt.org, audreyt.net etc are all down at the moment (awaiting transfer away from RegisterFly); please write to [email@hidden.address] for the time being. :-(
03:31 dolmans joined perl6
03:37 amnesiac joined perl6
03:52 mako132_ joined perl6
04:41 Schwern joined perl6
04:42 drbean joined perl6
05:00 offby1 I bet there's a story in that transfer
05:02 tene offby1: the story is apparently "Registerfly is incompetent, evil and fradulent, or both, and IANA revoked their license or whatever to be a registrar."
05:05 offby1 wow, IANA did something right?
05:08 mugwump joined perl6
05:08 tene At least I think it was them.  It was some acronym with a lot of vowels that has authority to do stuff like that.
05:08 TimToady ICANN, it were.
05:08 TimToady http://slashdot.org/articl​e.pl?sid=07/03/17/1235224
05:08 lambdabot Title: Slashdot | Registerfly's Accreditation Terminated by ICANN
05:09 tene Well, I was only off by two vowels...
05:09 tene That's not bad, right?
05:09 * tene goes to bed.
05:12 * offby1 tends to be off by less than two
05:12 tene *snrk*
05:13 penk joined perl6
05:26 kei5tnk joined perl6
05:27 dirving joined perl6
05:41 luqui joined perl6
06:09 elmex joined perl6
06:14 BooK joined perl6
06:20 rfordinal joined perl6
06:22 peshalto joined perl6
06:24 Maddingue joined perl6
06:27 IllvilJa joined perl6
07:20 cnhackTNT joined perl6
07:20 amnesiac_ joined perl6
07:27 jisom joined perl6
07:29 amnesiac_ is now known as amnesiac
07:40 xinming joined perl6
07:59 iblechbot joined perl6
08:08 rgs is now known as args
08:09 miyagawa joined perl6
08:35 integral joined perl6
08:46 Yappo_ joined perl6
08:56 the_dormant joined perl6
09:06 devogon joined perl6
09:10 devogon left perl6
09:20 penk joined perl6
09:31 rfordinal joined perl6
09:41 fridim joined perl6
09:55 the_dormant Hi, I keep getting this while running make: Could not find module `Data.FiniteMap', I'm on ghc 6.6
10:13 gaal where do you get it on? we don't use FiniteMap anywhere...
10:13 gaal perlbot nopaste
10:13 perlbot Paste your code at http://sial.org/pbot/perl and #perl will be able to view it
10:13 lambdabot Title: sial.org Pastebot - pasteling
10:13 gaal uh, please append "6" to that url :)
10:21 Debolaz Hmm, the quality of Audrey's wikipedia entry got a good boost after it was nominated for deletion.
10:24 wolverian heh
10:24 avar that frequently happnens
10:24 gaal now we just need to nominate all the world for deletion
10:26 avar gaal++
10:27 * gaal proposes a new category for "self-referential wp articles"
10:44 * lumi proposes a new category for "non-self-referential wp articles"
10:44 lambdabot lumi: You have 1 new message. '/msg lambdabot @messages' to read it.
10:45 lumi I guess it would prove that Wikipedia is either inconsistent or incomplete
10:48 lichtkind joined perl6
10:56 ajs_home joined perl6
10:59 ajs_home The ita1reports1 alert is a direct consequence of having backed out CR 108111 last week. I'm cleaning up some disk ad-hoc to deal with it now, but when we do this CR, the issue will be resolved.
11:00 ajs_home The alert should clear in a few seconds.
11:00 ajs_home I've deleted logs from last year's May and June
11:15 lichtkind audreyt: got mail?
11:25 chris2 joined perl6
11:43 pnu joined perl6
11:44 mako132_ joined perl6
11:46 fglock joined perl6
11:56 buetow joined perl6
11:58 avar joined perl6
12:06 svnbot6 r15775 | audreyt++ | * Remove third-party/fps/ as we now depend on GHC 6.6, and fps is core in GHC 6.6.
12:10 BooK joined perl6
12:17 ruoso joined perl6
12:18 dolmans joined perl6
12:22 zev_ joined perl6
12:23 ruz joined perl6
12:32 devogon joined perl6
12:49 rofl joined perl6
12:50 rofl is now known as mathlord
12:53 ajs_home Pardon the random mistken comments
12:53 ajs_home I thought I was typing in another channel :-/
12:55 lisppaste3 joined perl6
13:01 moritz though shalt find foregiveness ;-)
13:01 yuteh joined perl6
13:02 yuteh left perl6
13:08 wilx joined perl6
13:19 wilx joined perl6
13:25 iblechbot joined perl6
13:31 perlmonkey2 joined perl6
13:32 fglock joined perl6
13:44 Limbic_Region joined perl6
13:45 eric__ joined perl6
13:46 mtve joined perl6
13:46 eric__ joined perl6
13:47 eric__ joined perl6
13:48 weinig|bbl is now known as weinig
13:58 perlmonkey2 Can someone elaborate on ticket #18?
14:03 dmq joined perl6
14:04 Limbic_Region good localtime() dmq
14:04 gaal perlmonkey2: beef out http://dev.pugscode.org/wiki/Overview
14:04 lambdabot Title: Overview - Pugs - Trac
14:05 ofer1 joined perl6
14:05 perlmonkey2 gaal: Cool, that is simple enough instructions :)
14:05 Limbic_Region @moosages
14:05 lambdabot You don't have any new messages.
14:06 Limbic_Region that's not true, I read in the log gaal left me a message
14:06 Limbic_Region that's not true, I read in the log gaal left me a message
14:07 dmq hi LR
14:07 dmq dont suppose anybody knows where i can find the Module::Build folks online?
14:08 * Limbic_Region doesn't
14:29 rashakil joined perl6
14:29 fglock joined perl6
14:29 mr_ank joined perl6
14:30 fglock dmq: ping
14:30 the_dormant joined perl6
14:35 lanny joined perl6
14:35 dmq yo
14:36 lanny Is there a way to reset my commit-access password for pugscode.org or do I need a new commitbit?  I carelessly didn't put a yellow sticky of it on my monitor.
14:37 fglock dmq: is it possible to know where a named capture started/ended?  (perl 5.10)
14:38 dmq named buffers are implemented as labels for the numbered buffers.
14:38 dmq so yes.
14:38 dmq although there isnt an interface to get the mapping back. youd need to do that in XS>
14:39 [particle] lanny, i'm checking
14:39 fglock I was afraid you'd say that :)
14:39 dmq or id need to add a utility function to re.pm
14:39 lanny Thank you, [particle].
14:39 fglock dmq: that would be nice!
14:39 dmq its fairly straight forward. the regexp engine stores a hash that contains a dualvar that holds an array of u32.
14:40 fglock I need to know from/to in order to package the result into a p6 match
14:40 vel joined perl6
14:40 dmq you mean into the nested structure?
14:40 dmq how are you planning to represent that?
14:40 [particle] lanny: resent invite, i *think*, but the interface is a bit unclear
14:41 lanny Well I appreciate the effort and I'm sure it will get worked out eventually.
14:41 dmq about the only way that occurs to me is to have an AV that holds a dualvar array of nested indexes.
14:42 dmq btw, if you intend to hack the p5 engine, getting familair with packed dual var arrays is a good idea.
14:42 dmq :-)
14:43 dmq fglock: dont forget that in p5, a named buffer can be associated with >1 numeric buffer.
14:43 dmq so the mapping may be 1:N
14:43 lanny [particle]: hmm.  Got the invite but it seems to remember me so doesn't offer the page to set up my password.
14:43 fglock dmq: hmm - can you take a look at the PCR source code, it's easier to explain there
14:43 [particle] lanny: that's a shame :(
14:44 lanny I certainly agree.
14:44 dmq Where do i find it?
14:44 fglock http://svn.pugscode.org/pugs/perl5/Pugs-Com​piler-Rule/lib/Pugs/Compiler/RegexPerl5.pm
14:44 lambdabot http://tinyurl.com/2d3mqm
14:44 fglock this module calls a p5 regex and packs the result back into a Match
14:44 lanny Any idea who wrote commitbit?  I'll drop them a request.
14:44 fglock each capture is itself a Match
14:45 lanny ah.  Never mind.  Mouth going off with questions before eyes do their work.
14:45 [particle] there you go :)
14:46 fglock dmq: there is a 'push @match, ...' for each capture, and then the main Match is created
14:47 fglock named captures would collect into a hash, which would then be used by the main Match
14:47 dmq afair we dont have a buffer to name mapping except under re 'debug'.
14:48 dmq so exactly what information do you want?
14:48 lanny Spoke too soon.  Doesn't actually offer up anyone to ask.  I'll log in later and catch AudreyT.  Thanks for trying, [particle].
14:49 fglock dmq: a buffer-to-name mapping (array of names) would be good enough, I can build the Match from it
14:50 [particle] obra: ping
14:50 Southen_ joined perl6
14:51 [particle] lanny: you can always ask the project manager for help, too (who happens to be the author of CommitBit): http://search.cpan.org/dist/CommitBit/
14:51 lambdabot Title: Jesse Vincent / CommitBit - search.cpan.org
14:51 obra yes?
14:51 obra I'm on site with a client. what's up?
14:51 [particle] lanny's forgotten his pugs password
14:52 obra delete and readd him
14:52 [particle] i tried to reinvite him, but it doesn't seem to provide a way to reset password
14:52 obra it should send him a new password.
14:52 dmq ok, assuming that that is not going to be easy, would it be ok if i gave you back a copy of the internal hash that the regexp engine uses and you can decode it as necessary?
14:52 [particle] i didn't delete
14:52 dmq as i said we dont store this information currently.
14:52 obra we know we need "Resend"
14:52 obra (we've done most, but not all of the work to fix it.)
14:52 [particle] actually, i can't delete
14:52 obra most of that work was done in the past week
14:53 dmq or alternatively you could design PCR to use a custom variant of the regexp engine that DOES track this type of stuff internally.
14:53 [particle] i can only delete pending invites :(
14:53 obra [particle]: we need a site admin. aka audrey
14:53 dmq which would be /fairly/ straightforward to do.
14:53 [particle] obra: thanks!
14:53 dmq since the debug version already does what you want.
14:54 [particle] well, lanny, there you go. changes are coming, but not in time for you. so your plan of contacting audrey stands
14:54 dmq incidentally, if i figure out a decent way to represent perl6's numbering ill put native support into perl for it.
14:54 fglock dmq: looks like a good idea, and probably the start of a p6regex-in-XS... :)
14:55 dmq i just dont want to burden every regexp structure with data that will be used only by one module.
14:55 dmq but if it meant providing perl6 buffer numbering semantics then id do it.
14:56 dmq as i said, i was thinking of an array of packed array of u32's.
14:56 tavolinx joined perl6
14:56 fglock got it - I'll take a look at 'debug'  first
14:56 diotalevi joined perl6
14:56 dmq not the nicest way to store it, but cest le vie.
14:56 tavolinx joined perl6
14:56 dmq if anybody has come up with an elegant way to store the p6 buffer numbering they should let me know.
14:56 dmq :-)
14:56 fglock ideally, p6regex would create a Match, just like re::engine currently does
14:57 tavolinx hola
14:57 tavolinx spanis
14:57 dmq er....
14:57 fglock dmq: did you see re::engine::PCR?
14:57 dmq yes, ostesibly i paid to have it written
14:57 dmq :-)
14:58 fglock ah, yes :)
14:58 tavolinx hi
14:59 fglock Pugs::Compiler::RegexPerl5 needs to do exactly the reverse of re::engine::PCR - it runs p5 regexes from under p6
14:59 dmq except i dont really remember what it does in this context.
15:00 fglock tavolinx: hola
15:00 dmq er, except that PCR and P5 regexes are syntax compatible.
15:00 tavolinx hola
15:01 dmq actually id guess that there are a lot more differences involved.
15:02 tavolinx quiero hacer un programa en perl con la base de datos berkey
15:02 amnesiac joined perl6
15:02 dmq probably the best thing i can do is just make p5 support the p6 buffer numbering.
15:02 dmq or would that not be correct?
15:02 fglock tavolinx: que tal el canal perl5
15:02 tavolinx ok
15:02 tavolinx voy para alla
15:02 fglock tavolinx: #perl
15:03 tavolinx ok
15:03 tavolinx perl5 no esta
15:03 tavolinx mejor perl
15:03 fglock dmq: perl6 regexes return a Match tree, which is a bit hard to represent with low-level structures
15:04 dmq well it would be tied.
15:04 dmq hrmm, maybe i see your point.
15:04 fglock re tieing - I guess PCR is slow enough as it is :)
15:04 dmq all regexp results variables are ties.
15:05 fglock ah
15:05 dmq can you imagine how much copying would have to happen otherwise?
15:05 dmq i cant imagine p6 would do it any different actually, not if it wants to be fast.
15:06 fglock PCR currently only stores from/to, and a pointer to the original string
15:06 dmq i guess Larry must have worked this out already and has a way to support nested ties.
15:06 fglock each capture is a p5 object
15:07 dmq the problem with that approach is that it only pays off if the regex executor is interested in all the results.
15:07 dmq and even then there is a problem as you dont want to have to create and rollback the results tree as you match for efficiency reasons.
15:08 fglock the object can be created lazily, which works more or less like ties; but create and rollback is currently a big problem
15:08 dmq so presumably internally it wont generate match structures, and either construct the full match object at the end, OR, implement match objects as what i would call a tie. Specifically lazy resolution of capture buffers.
15:10 fglock agreed - PCR started like that, but it was a premature optimization, and the code was pretty difficult to maintain :(
15:10 weinig is now known as weinig|away
15:10 fglock it would be nice to have that back
15:11 fglock sorry, meeting &
15:13 dmq its a tough aspect of the p6 design. something that i personally consider an open issue until a clearly efficient implementation can be developed.
15:15 bonesss joined perl6
15:18 PerlJam dmq: The beauty of being the language designer is that he doesn't have to concern himself too much with actual implementation issues  ;-)
15:22 xinming joined perl6
15:34 bonesss is now known as bones`comendo
15:36 devogon left perl6
15:41 avar @tell audreyt avar here, I have some minor fixes for re::engine::PCRE, co-maint?:)
15:41 lambdabot Consider it noted.
15:41 lichtkind joined perl6
15:42 dmq perljam: sure.
15:44 [particle] perljam: in perl 5, it's the implementors who didn't concern themselves much with the design issues ;-)
15:44 Southen joined perl6
15:49 dmq heh
15:49 dmq more like they didnt concern themselves with redesign when implementing new features.
15:59 PerlJam no, I think they concerned themselves with redesign, it's just that they were a tad myopic about it and constrained maintaining the beast as it has been.
15:59 [particle] docs and code mismatch? change the docs!
16:00 dmq well im very sure that in some cases they very much didnt concern themselves with redesign.
16:00 dmq otherwise i wouldnt have to be doing the redesign myself now.
16:00 [particle] dmq: can i interest you in working on a trie pmc for parrot?
16:00 dmq sure/maybe
16:00 dmq :-)
16:01 [particle] seems an excellent storage mechanism we should support natively
16:01 dmq as long as perl6 doesnt have perl5 broken ascii/utf8 behaviour then yes. otherwise no, as its depressing enough dealing with perl5 on that level.
16:01 dmq oh you dont mean for the regex engine?
16:02 [particle] (phone)
16:02 PerlJam anything to make the working parts of parrot work faster gets a ++ in my book.
16:02 dmq perl6 could make its life so much easier if it mandates that \x{DF}=~/ss/i regardless of character set.
16:02 dmq er, regardless if its latin_1 or unicode.
16:03 dmq \x{DF} is proverbial spanner in the works on perl5.
16:05 dmq damn germanic languages messing up the program (literally)
16:06 [particle] latin for everyone!
16:06 dmq its just that there arent any other characters in the 0..255 codepoint range that do multibyte case-folding.
16:07 dmq just the pesky GERMAN-SHARP-ESS.
16:07 VanilleBert joined perl6
16:08 dmq and dealing with GERMAN-SHARP-ESS properly in ascii (doesnt match 'ss') and in unicode (does match 'ss') using the same data structures is a barrier to efficiently implementing other things.
16:08 dmq the easiest method to deal with it that ive come up with is to simply state that in ascii (latin_1 really) it DOES match 'ss' and then the barriers come down.
16:09 dmq but i cant do that in perl5. hopefully perl6 doesnt make the same mistake.
16:10 PerlJam If Parrot doesn't make that mistake, then neither will PErl 6
16:11 dmq its a design issue, and a sort of open issue, since latin_1 to the best of my knowledge doesnt concern itself with defining case folding rules.
16:11 dmq anyway, knowing Larry he probably headed this one off at the pass somewhere far outside of my P6 knowledge, and things will Just Work.
16:11 kanru joined perl6
16:12 dmq But i bring it up because its annoying, and on the off chance that Larry hadnt thought about this particular annoyance.
16:20 fglock joined perl6
16:21 koye joined perl6
16:24 kattana_ joined perl6
16:37 VanilleBert left perl6
16:38 TimToady dmq: it really depends on how Unicode defines language-independent grapheme semantics.
16:38 TimToady from S02: In the abstract, Perl is written in Unicode, and has consistent Unicode
16:38 TimToady semantics regardless of the underlying text representations.
16:39 TimToady however, it should certainly work germanically if you change the level from language-independent to "use Char 'Deutsch'" or some such.
16:42 TimToady an interesting question is what happens if you request language dependent Chars for more than one language at the same time.
16:42 avar ?eval [~]  <m oo se>
16:42 TimToady and how you resolve contradictions between different languages.
16:42 evalbot_r15771 is now known as evalbot_r15775
16:42 evalbot_r15775 "moose"
16:43 dmq well, unicode defines case folding rules for all characters, and apparently on a language basis for the character.
16:43 dmq so it specifically mandates that \x{DF} match 'ss' case insensitively.
16:43 dmq at least at the higher levels of compliance.
16:44 dmq so if you have said "we follow unicode rules regardless of encoding" then you have basically done what i want.
16:44 dmq except i only care about the 128..255 byte range.
16:44 TimToady only caring about 128..255 is not Unicode. :)
16:44 dmq i only care about that range because its the only part where there is a difference.
16:45 dmq above 255 its pure unicode semantics since latin_1 doesnt go that high.
16:45 dmq below 128 its pure unicode semantics because unicode is defined to be equivelent to ascii.
16:45 dmq its only the 128 chars in the latin_1 range, and perls historical behaviour that cause a problem.
16:46 TimToady as far as I'm concerned, p6 doesn't know what latin-1 is except for an external encoding.
16:47 TimToady and possibly a user-invisible optimization for internal storage.
16:48 dmq theres lots of interesting questions with this subject actually.  
16:48 Randal left perl6
16:48 dmq looking at it from the POV of implementing a regex engine.
16:48 TimToady certainly, and I'm quite confident that p6's unicode levels don't map exactly to the thinking of the Unicode Consortium.
16:49 TimToady but basically 'use Codes' is stupid old-fashioned Unicode compliance
16:49 TimToady 'use Graphs' is full language-independent compliance
16:49 dmq id say if you stick to unicode's case folding rules for character regardless as to underlying encoding then youd make things a lot easier.
16:50 TimToady and use CharFrench is whatever the French want whether the Unicode Consortium likes it or not.
16:50 dmq i dont really like that idea..
16:50 TimToady language dependent means language dependent
16:51 TimToady that's why we have a language indendent layer.
16:51 dmq well i think it would come at a huge price in performance.
16:51 TimToady *independent
16:51 TimToady "correct" usually trumps "performant"
16:51 dmq yeah, but correct is subjective.
16:52 dmq or rather, you just said correct will be subjective.
16:52 TimToady certainly, and that's why CharFrench is the subjective layer.
16:52 dmq wheras if there is just one correct, then life is simpler.
16:52 TimToady that's the Graphs version of correct
16:52 dmq im not sure maybe we arent on about the same things here.
16:52 TimToady the Graphs version of correct will never be correct to all languages simultaneously.
16:52 dmq im just thinking of things like case folding rules.
16:53 dmq unicode defines a farily sensible set of behaviour as far as i understand it.
16:53 TimToady languages are likely to contradict each other on case folding
16:53 dmq and if you want to overide the behaviour you can do explicit normalization.
16:53 TimToady joined perl6
16:53 wolverian that was quick
16:53 TimToady consider 'use CharFrench' to be a request for implicit normalization.
16:54 * dmq repeats incase timtoady didnt see:
16:54 dmq [17:53] <dmq> and if you want to overide the behaviour you can do explicit normalization.
16:54 dmq hmm.
16:54 TimToady Perl is not about forcing people into one way of thinking.
16:54 TimToady if they want to think French, we'll let 'em.
16:54 [particle] so, transcoding is not your problem?
16:55 TimToady if people want Graphs, they know where to find it.
16:55 dmq yes thats fine, and if you have an implementation guideline that makes it work out efficiently then all is good, im just relating some of my problems with the perl5 stuff.
16:55 [particle] whaddayaknow, that's what parrot's shooting for, too
16:56 dmq i guess im saying, if you just say "the end result should be like this" you might end up with an implementation that pushes the problem into the corner where it is least well (efficiently) handled.
16:57 lichtkind hello dmq good to see you, did you recognize that chromatic did eval juerds idea with the Apocrupys und synopse
16:57 lichtkind s
16:57 dmq like if they create a string with a piece of text in one language and then pass it into a regex in a module with a different language, what is supposed to happen?
16:57 TimToady well, efficiency is all well and good, but when push comes to shove, the human is the master, and the computer is the slave.
16:58 offby1 no!
16:58 dmq whose case folding rules win?
16:58 offby1 really?
16:58 dmq well thats a philisophical debate i think. lets just stick to measurable stuff :-)
16:58 TimToady every language will have to have a story for what it does with other languages.
16:59 TimToady most will just choose language-independent grapheme rules for the backstop.
16:59 Jedai joined perl6
16:59 dmq so for instance, lets say i want to do the trie patch i did for p5 for a p6 engine. How would id deal with case folding there in such a mismatched case?
17:00 dmq lichtkind: no, i cant say that i did.
17:00 TimToady it would depend on what language you think it is, if any.
17:00 TimToady you have to normalize it some way or other in any case.
17:01 TimToady even if you're just working in the "Codes" language.
17:01 dmq i mean procedurally really. It shouldnt matter which is which. Pick some X and Y and then explain the process on a high level.
17:02 TimToady all p6 cmp, eqv, sort, etc operators are explained in terms of canonicalized forms, where that is negotiable.
17:03 dmq doesnt that mean that you need a single encoding that handles them all? aka unicode?
17:03 TimToady that is already a given
17:03 TimToady I don't know what you're arguing.
17:04 dmq im not arguing.
17:04 dmq im trying to understand what you have planned.
17:06 dmq I said "unicode defines a farily sensible set of behaviour as far as i understand it." and you said "languages are likely to contradict each other on case folding" which left me wondering how you planned things to work.
17:06 TimToady Lexical scopes can declare differing sets of defaults, but they all map to the underlying representation.
17:08 ozo_ joined perl6
17:08 dmq ok, so it would be a matter of normalizing the strings outside of the regex engine and then using unicode semantics inside?
17:09 TimToady well, it's either that or defining enough API hooks that such normalization can be emulated on the fly.
17:09 dmq eek
17:10 dmq much prefer the former
17:11 TimToady well, I don't doubt that, but suppose you have a string that contains multiple languages.
17:12 TimToady also, suppose you have a canonicalization framework that already can do things lazily based on demand.
17:12 justatheory joined perl6
17:12 TimToady then you just pass that canonicalizer in as a parameter to the character comparator.
17:13 dmq its not a matter of just character comparator tho is it really?
17:13 TimToady depending on the the problem and the text, that may or may not be more efficient than doing all the work ahead of time.
17:13 dmq if you want dfa type semantics in matching, or to be able to do stuff like the trie optimisation.
17:14 TimToady sure, a given data structure may need to enforce some consistency if it wants to depend on a particular encoding.
17:15 TimToady (using the term encoding loosely for "predictable memory layout")
17:15 dmq hmm.
17:15 dmq its not just that tho is it? its also a set of semantics for manipulating the data.
17:16 Leibsle joined perl6
17:16 Leibsle hi
17:16 dmq like for instance \x{DF} matching 'ss'. Or 'A' matching 'a'.
17:16 fglock joined perl6
17:17 TimToady those fall into the simple canonicalization part
17:17 TimToady not denying that there are other complications, though
17:17 TimToady especially if people start insisting on treating string positions as integers.
17:18 fglock dmq: is it ok if I use the re::Match namespace?
17:18 * dmq nods
17:18 dmq fglock: i dont see why not, although, i wonder why.
17:19 fglock I mean to create '$re::Match', which is an p6-OO view of the last p5 match
17:19 dmq theres evilness with that in perl5 right now.
17:19 fglock using a tied interface
17:19 fglock hmm - how evil?
17:20 dmq the evilness comment was in relation to timtoadys comment on string positions
17:20 fglock heh
17:20 dmq fglock: i guess.
17:20 TimToady p5 really only got up to the Codes view of the world, not up to Graphs.
17:20 dmq but my thought was to use the same var as perl6.
17:21 avar fglock: How are you going to implement that?
17:21 dmq @/ wasnt it?
17:21 lambdabot Maybe you meant: . v
17:23 dmq er, $/
17:23 fglock avar: the first prototype would just use a tie interface; it can be optimized later
17:23 dmq but i guess it would be doable with %/ and $;
17:24 dmq $/{1,2,3} :-)
17:24 fglock dmq: I'm thinking of simply using '$re::Match', '@re::Match', '%re::Match', ...
17:24 fglock v6.pm and pugs can do the translation
17:24 TimToady biab &
17:24 avar inhentely unthreadsafe?:)
17:25 avar binding it to the regex sounds better:)
17:25 avar my $re = qr/boobs/; if ("str" =~ $re) { $re->matchymoose->{ eek } }
17:25 dmq fglock: maybe Perl6::Match ?
17:25 fglock avar: that's a cool idea
17:26 avar fglock: it's implementable with an additional callback in the regex engine and some XS
17:26 avar well, that or my $re = bless qr/boobs/ => "Perl6::Match"; ...
17:26 avar blessed be the bewbs!
17:26 fglock dmq: we already have Pugs::Runtime::Match, but the idea is to have something more p5ish
17:27 fglock avar: would you be interested in implementing it?
17:27 avar I'm interested in finishing my outstanding re::engine:: stuff too:)
17:28 fglock avar: it's immediately usable in PCR :)
17:28 avar but there's no reason for why a re::engine can't provide different matching semantics
17:28 avar like I do with the PCR wrapper, you could do the same thing only with the p5 engine
17:29 avar if ("str" =~ /(.(.))./) { say $1->[0] # t }
17:29 avar lots of potential hackery though:)
17:30 wolverian hm, Perl 6 Micropants.
17:30 lichtkind haha
17:31 fglock I'd actually prefer to go the other way, and use as little hackery as possible
17:31 fglock in order to gt somethin stable soon
17:31 fglock something
17:31 avar Yeah, I just don't know what you're trying to do yet:)
17:31 diotalevi Hey Avar, why are you using two different namespace roots? re:: and Regexp::?
17:31 avar I don't have anything in Regexp::
17:32 dmq actually, thats a good point for fglock. not avar.
17:32 diotalevi blessed( qr// )
17:32 fglock avar: I want to replace this code: http://svn.pugscode.org/pugs/perl5/Pugs-Com​piler-Rule/lib/Pugs/Compiler/RegexPerl5.pm
17:32 dmq avar, is doing engine work.
17:32 lambdabot http://tinyurl.com/2d3mqm
17:32 avar things that begin with lower case are pragmas, like re:: stuff is
17:32 penk joined perl6
17:33 avar "Unable to determine IP address from host name for svn.pugscode.org"
17:33 avar eek
17:33 avar might be my stupid internets:)
17:33 * diotalevi is suspicious of the reasons for two roots.
17:33 geoffb avar: Due to death of DNS registrar that many of Audrey's domains were registered under
17:33 moritz avar: host svn.pugscode.org
17:33 moritz svn.pugscode.org is an alias for perlcabal.org.
17:33 moritz perlcabal.org has address 194.145.200.126
17:33 avar Regexp::* isn't magical enough to warrant something that swaps out engines:)
17:34 geoffb I have not heard that it's resolved yet
17:34 moritz avar: but this into your /etc/hosts and you are done
17:34 ofer0 joined perl6
17:34 avar I have a RegexPerl5.pm on my / anyway:)
17:34 * diotalevi chokes.
17:37 * Leibsle slaps lichtkind
17:39 diotalevi joined perl6
17:42 dmpk2k joined perl6
17:43 fglock both re::Match and Perl6::Match are too generic; I guess I'll just keep it in the PCR namespace
17:43 ajs_ Hey all, who maintains the various bots and such for #perl6 these days?
17:46 bernhard joined perl6
17:46 bloonix joined perl6
17:49 bloonix hello together
17:56 jcrigby joined perl6
17:56 sili is now known as sili-
17:57 sili- is now known as sili
18:19 fglock joined perl6
18:26 jisom joined perl6
18:26 BooK joined perl6
18:47 koye left perl6
18:57 marmic joined perl6
19:06 bonesss joined perl6
19:13 lichtkind hello bloonix *g*
19:13 xerox joined perl6
19:26 larsen_ joined perl6
19:32 svnbot6 r15776 | audreyt++ | * Data.Yaml.Syck: Correctly handle self-recursive lookups, by way of the
19:32 svnbot6 r15776 | audreyt++ |   scary mdo notation and unsafeInterleaveIO.
19:32 integral scary :-)
19:33 nwc10 joined perl6
19:34 nwc10 audreyt: did Pugs come up with a crafty way of making pluggable regexps lexically scoped?
19:40 pasteling "evalbot_r15775" at 194.145.200.126 pasted "Pugs build failure" (406 lines, 23K) at http://sial.org/pbot/23691
19:44 jrockway ah, libsyck at it again
19:54 the_dormant joined perl6
19:59 svnbot6 r15777 | audreyt++ | * Gain another ~10% on startup speed (Prelude+Test) by simply
19:59 svnbot6 r15777 | audreyt++ |   changing all "atomically . newTVar" to "newTVarIO" when
19:59 svnbot6 r15777 | audreyt++ |   atomicity is irrelevant.
20:00 Aankhen`` joined perl6
20:03 Lorn joined perl6
20:13 amnesiac joined perl6
20:23 weinig|away is now known as weinig
20:28 prly joined perl6
20:39 Schwern joined perl6
20:49 perlmonkey2 Is anyone writing a book on Pugs?
20:51 stevan_ it would be outdated even faster than the other Perl 6/Parrot books
20:52 fglock yes - but that's an interesting idea
21:01 pmurias joined perl6
21:01 pmurias hi
21:05 fglock hi
21:11 nelhage In t/var/constant.t, the ``my constant
21:12 nelhage In t/var/constant.t, the ``my constant'' test (http://paste.husk.org/7944), is the final ``wack == 23'' in fact correct behavior (I realize it's a TODO test. I can't find anything in docs/Perl6/Spec/ about my constant)
21:12 Psyche^ joined perl6
21:13 fglock nelhage: it looks wrong to me
21:14 nelhage It certainly *feels* wrong to me, but I'm not up to speed on the specs yet.
21:14 the_dormant_ joined perl6
21:14 fglock left perl6
21:18 TimToady nelhage: yes, it should just be "constant"; constant is a declarator like my, not a type.
21:19 TimToady what you see there is a fossil of older pugs implementation.
21:24 ludan joined perl6
21:25 ludan ola
21:25 Psyche^ is now known as Patterner
21:30 the_dormant_ joined perl6
21:41 forsaken joined perl6
21:44 reZo joined perl6
21:46 the_dormant joined perl6
21:49 mathlord joined perl6
21:56 zekvent joined perl6
22:02 ajs_ S12 says "my Dog $spot .= new(:tail<LONG> :legs<SHORT>);"
22:02 ajs_ 1: is that correct (no comma in arg list)?
22:02 ajs_ 2: Is that expected usage?
22:03 tene ?eval (:foo<f> :bar<b>)
22:03 evalbot_r15775 is now known as evalbot_r15777
22:03 evalbot_r15777 Error: ␤Unexpected ":bar"␤expecting operator or ")"
22:03 tene ?eval (:foo<f>, :bar<b>)
22:03 evalbot_r15777 (("foo" => "f"), ("bar" => "b"))
22:03 ajs_ So, does that mean pugs or S12 is wrong? ;)
22:04 [particle] pugs is wrong there
22:05 ajs_ So, we would expect to see (when combining positional and named parameters): "foo(1, 2, 3, :a<4> :b<5> :c<6>)" ?
22:06 TimToady see S02:1950
22:06 TimToady where a term is expected, that is equivalent to the form with commas
22:07 TimToady so good form would probably use the commas anyway
22:08 TimToady the run-on form is mostly for adverbs applied to operators.
22:08 TimToady where a comma would change the meaning
22:09 ajs_ Ok, so S12 is correct, but not expected usage in this case.
22:09 TimToady yes
22:11 ajs_ Thanks
22:19 minder6146 joined perl6
22:19 minder6146 left perl6
22:49 __Ace__ joined perl6
22:51 miyagawa joined perl6
22:52 __Ace__ Im trying to embedd perl here in my C code and was wondering what is the best way to actually execute several perl code/scripts within this C code?
22:53 explorer joined perl6
22:56 buetow joined perl6
22:56 geoffb __Ace__: Perl5?
22:57 __Ace__ yea
22:58 geoffb perldoc perlembed
22:58 geoffb if you need it all to be in the same process
22:58 geoffb if you can have the perl be an external process, than just spawn it.
22:59 __Ace__ well
22:59 __Ace__ #define SAY_HELLO "-e", "print qq(Hi, I'm $^X $0\n); hello(); sub hello { print qq(Hello\n); }"
22:59 __Ace__ char *one_args[] = { "perl_code", SAY_HELLO };
22:59 __Ace__ and then:
23:00 __Ace__ perl_parse(my_perl, NULL, 3, one_args, (char **)NULL); and perl_run(my_perl);
23:00 __Ace__ but doing a char[] like that seems too much... ?
23:00 __Ace__ maybe I should go with reading a file..
23:02 geoffb Well, two things:
23:02 geoffb 1. You should be asking on #perl, not #perl6.
23:03 geoffb 2. It's been a decade since the last time I did Perl embedding ... I just remembered the manpage to look at.  ;-)
23:03 geoffb Sorry.  :-)
23:04 __Ace__ ok, np
23:05 __Ace__ lovely stuff though
23:05 __Ace__ quite easy to embeddd
23:05 TimToady can any lambdacamel tell me why Haskell's const has a second argument that is ignored?  seems like it would foul up by currying a no-op arg when you didn't want it to...
23:06 allbery_b haskell's const = the K combinator
23:07 dduncan joined perl6
23:08 dduncan fyi, after being without my own computer for 2 weeks, I have it back, and so I should soon be able to get back up to speed with whatever
23:08 Aankhen`` WB. =)
23:14 ProperNoun joined perl6
23:18 mj41 joined perl6
23:20 mr_ank joined perl6
23:23 Limbic_Region joined perl6
23:37 m0dY joined perl6
23:40 Limbic_Region ?seen putter
23:40 lambdabot I saw putter leaving #perl6 8d 18h 5m 18s ago, and .
23:40 Limbic_Region hrm
23:41 Limbic_Region Saturday will be here soon enough
23:41 Limbic_Region stevan_ ping
23:41 Limbic_Region ?seen stevan_
23:41 lambdabot stevan_ is in #perl6. I last heard stevan_ speak 2h 49m 50s ago.
23:41 tene ?seen tene
23:41 lambdabot You are in #haskell and #perl6. I last heard you speak just now.
23:43 stevan_ Limbic_Region: pong
23:43 * moritz wonders if lambdabot is a synesthete if he "hears" us "speak" ;-)
23:45 Limbic_Region stevan_ - thinking about using Moose - have a few questions
23:46 Limbic_Region first question - can Moose handle parameter validation for custom methods (IOW - not constructor or accessor)
23:46 Limbic_Region second question - how would I implement an abstract method
23:47 nwc10 left perl6
23:50 stevan_ Limbic_Region: first_question: no, we do not handle non-Moose generated param validation
23:51 stevan_ I have thought about it several times,.. but in the end I didn't want to enforce any one style
23:51 stevan_ there is a side project in the works (by phaylon) which would provide an easier to use interface to the moose types in order to do things like param validation
23:52 stevan_ and then there are the usual CPAN suspects
23:52 stevan_ re: question 2 .. it all depends
23:52 stevan_ you can use the normal perl 5 way:
23:52 stevan_ sub foo;
23:52 stevan_ or you can use roles,.. in which case you would make the method "required"
23:53 stevan_ so that classes which do the role, must implement it
23:53 Limbic_Region oooh, the roles is the way I think I would want to go
23:53 stevan_ yeah,.. they are nice :)
23:53 Limbic_Region unfortunately, the parameter validation is a deal breaker
23:53 Limbic_Region lets say that
23:54 Limbic_Region I want my parameter passing and validation to be like perl 6
23:54 Limbic_Region which CPAN module would you recommend that plays nice with Moose?
23:54 Limbic_Region oh, and to specify the return type of the method too
23:55 stevan_ Limbic_Region: perl 5 really doesn't do that very well
23:55 stevan_ cause you end up having to wrap the method and that can get really expensive
23:55 stevan_ implementing strong typing at runtime is almost never a good thing :)
23:56 Limbic_Region *shrug*
23:56 Limbic_Region my situation is a double edged sword
23:57 Limbic_Region I am writing code at work (I'm not a developer) which is greatly appreciated since I can whip working code out faster than you can sneeze
23:57 offby1` joined perl6
23:57 Limbic_Region the trouble is that I am not going to be maintaining it - Java developers are
23:57 Limbic_Region so I am trying to placate them as much as possible
23:57 stevan_ ah
23:58 Limbic_Region so I have my class structure all worked out and everything is working
23:58 Limbic_Region the trouble is that I have used p5 conventions to avoid all the issues typically associated with OO in p5
23:59 stevan_ hmm, well the whole dynamic typing/static typing paradigm switch might be an issue for Java guys
23:59 Limbic_Region I'm not so worried about that
23:59 Limbic_Region I'm worried about them not bothering to learn how you avoid collisions with a blessed hash
23:59 stevan_ ah,.. Moose will take care of that for you

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

Perl 6 | Reference Documentation | Rakudo