Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2006-03-07

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:01 gaal rehi
00:04 hermatize how do i make my own rss feed
00:04 hermatize audreyt
00:05 audreyt hermatize: study http://search.cpan.org/dist/XML-RSS/lib/RSS.pm
00:05 jisom quick poll of people here, which seems better.....'try {open FOO, "<file"; print FOO "bar\n"; close FOO} catch {die $!}' or 'open FOO, "<file" or die $!;print FOO "bar\n" or die $!;close FOO or die $!"?
00:07 coumbes joined perl6
00:08 * jisom keeps getting warnocked often
00:08 penk joined perl6
00:13 huhlig Can't use string ("0") as an ARRAY ref while "strict refs" in use at StarMUD/Network.pm line 52.
00:13 huhlig mrr?
00:13 huhlig my $ready_sockets = IO::Select->select(         # Select which handles have data
00:13 huhlig                      $server->{'connections'},
00:13 huhlig                      undef, undef, 0);            
00:13 huhlig  foreach my $socket (@$ready_sockets) {
00:13 huhlig what did I miss
00:14 audreyt jisom: use Fatal, maybe ;) but I usually only check for open
00:14 jisom the concept's come up for the proposal for putting a specification on parrot's io subsystem
00:15 audreyt huhlig: I'm quite sure ->select isn't to be used as that
00:15 audreyt you maybe want ->can_read
00:15 audreyt jisom: oh. the first then.
00:16 huhlig audreyt:
00:16 jisom ok, so that's 100% for, 0% against :)
00:16 huhlig audreyt: can_read?
00:16 huhlig mrr
00:17 huhlig hmm ok
00:20 spinclad as long as I have nothing better to do on generic error than die $!, then might as well wrap the whole program like #1.  any hot spots I want to handle differently, I can locally.
00:20 spinclad ( jisom: ^ )
00:21 jisom it does have better simplicity.....the drawback, which's come up, that not all languages can do that.......some need the return value...and parrot's intended to be language agnostic, sort of
00:22 jisom so there's the subsystem interface, and then how compilers would work with that, etc...
00:22 spinclad ah.  was just speaking as another perl hacker, there.
00:23 jisom well perl6'll run on parrot so it's somewhat relevant :)
00:23 huhlig oook
00:23 huhlig interesting issue
00:23 audreyt whew. finally finished journal entry #0
00:23 audreyt still ~4 to go
00:23 audreyt but I'll sleep now :)
00:23 * audreyt waves
00:23 huhlig the select runs... and it almost seems to freeze
00:23 TimToady sweet dreams
00:24 huhlig then it suddenly kicks in with 50 or so iterations
00:24 audreyt TimToady: oh hey. :) saw my question re: disabling perl_peep() in MAD?
00:24 TimToady no, still bling.
00:24 * stevan_ lets TimToady have some of his bling :P
00:24 * audreyt imagines TimToady going "bling bling"
00:25 * stevan_ imagines TimToady wearing a big diamond encrusted Camel on a gold rope chain
00:25 audreyt TimToady: in a nutshell, I wonder if MAD is turning off the peephole optimizer so as to preserve more info; if it is not, maybe that's a fruitful direction ("no optimizer;" does wonders to kill constant folding etc)
00:25 TimToady It's already known that disabling peep() causes a non-functional perl, alas...
00:25 audreyt oh? *surprised*
00:26 TimToady peep doesn't just, er, peep...
00:26 audreyt totally  nonfunctional, or just not bug-for-bug compatible?
00:27 audreyt gaal: btw, _lotsa_ kudos for lending me the Wittgenstein Biography book
00:27 audreyt it enabled me to have a much firmer grasp of this perl6 thing :)
00:27 TimToady It's pretty ugly.  On the other hand, by the time you get to peep() it's not really freeing nodes any more, just nulling them out, so the original stuff is still there for nomad.
00:28 audreyt (it's http://amazon.com/gp/product/0140159959/ for curious folks.)
00:29 wilx joined perl6
00:29 audreyt TimToady: ahh. because mad kicks in before that
00:30 audreyt so we can (presumably) denull the nulls using mad info alone?
00:30 audreyt (reconstruct the nulled nodes, i.e.)
00:31 TimToady That's what nomad does, and those nodes are reconstructed by the astnull methods.
00:31 audreyt okay, so ast are the (conceptual) opnodes, and madprops its textual annotations
00:31 audreyt cool. in other news, Nicholas and I both built the nomad tree just fine :)
00:32 audreyt but we don't have the copy-mad-again-into-nomad patch
00:32 TimToady not just textual, but anything that perl5 was inclined to forget.
00:32 audreyt the one you worked on after I received the snapshot
00:32 TimToady right, I'll have to send that, but I've been busy recovering from two weeks away from home.  Washing machine blew a hose and flooded the whole garage.
00:32 audreyt can you put it somewhere (your ~/public_html/ on feather.perl6.nl, for example)? also, your takahashi slides explaining how it works, if possible :)
00:33 audreyt awwww
00:33 TimToady and Lewis decided to skip class for 4 days in a row without telling us...
00:33 TimToady so I've been a bit preoccupied...
00:33 audreyt (mm that sounds familiar)
00:34 TimToady shall I just diff with the .tgz I sent before?
00:34 audreyt hmm, I thought it's just the single nomad program?
00:34 audreyt (you can also tar up the entire thing and put it to feathre)
00:34 TimToady i'll have to check to see if I tweaked anything else.
00:34 stevan_ audreyt: why are we not using p5->p5 to serialize the MM to YAML?
00:34 audreyt I've put a tree up for Nicholas and others at http://perlcabal.org/~autrijus/tmp/p55.tbz
00:35 audreyt stevan_: err what does p5's opcode tree have to do with the MM?
00:35 stevan_ true
00:35 stevan_ sorry,.. got excited while reading the journal :P
00:35 audreyt TimToady: so maybe diff against that? :)
00:35 TimToady ok
00:36 audreyt but in any case, it's 1:35 now and I'll crash -- see you tomorrow :)
00:36 TimToady tata
00:36 svnbot6 r9314 | putter++ | Regexp-ReplaceEngine.pm - $&,$1,$-[0],etc are now all set.  At least for non-utf8 strings.  Next step, making the the hooks non-global.
00:36 jisom you know, Jonathan's .NET to PIR could help with getting perl5 on parrot...
00:36 audreyt TimToady++ # p55 is truly exciting, the more I look at it
00:36 audreyt *waves*
00:36 FurnaceBoy n8
00:36 penk joined perl6
00:37 Daveman :p
00:38 stevan_ putter, fglock: does pXie run macros?
00:39 putter yes :)
00:39 stevan_ cool
00:40 putter Regexp-ReplaceEngine... it's *alive*. ;)  first light.
00:40 stevan_ putter: any examples of macro usage?
00:41 putter ?? - you just accessed the full depth of my knowledge on the topic.
00:42 stevan_ cool, I will dig then
00:44 * putter tries to resist spiking to perl -w -MRegexp::WithRules -e 'sub foo{qr/bar/} "foobar"=~/foo<foo>/'...
00:45 justatheory joined perl6
00:48 stevan_ putter: where is the pXie stuff in the tree?
00:48 putter stevan_: good question, let's see...
00:49 putter misc/pX/Common/iterator_engine ?
00:49 stevan_ ah,,.. thanks
00:53 putter Ok, I'm officially punting on trying to unbreak -C parsing of use(), and thus pil2js.  The problem is -C doesn't use the Prelude, and that's the only place where use() is defined at present.  A parse without it interprets  use Foo  as a method Str::use call.  A Prim.hs op1 "use" cannot continue to exist, because Parser.hs gives it precedence over the Prelude macro.  
00:56 putter Options are to get some version of the Prelude included even in -C (the code  macro use($m){"use_('$m')"}  may be suffient, but I'm really not sure).  Or perhaps change the Parser.hs's handling of use() to be more like require().  Or leave it broken until compilation gets smarter.  Or...???
00:57 putter I've hit ENOMOREHOURS on this process.  Sorry.
01:00 mako132_ joined perl6
01:08 pasteling "stevan" at 67.186.136.119 pasted "p6 class -> p6 MOP calls macro sketch" (82 lines, 1.8K) at http://sial.org/pbot/16191
01:08 stevan_ putter: if you have a sec,... please sanity check that paste
01:22 putter back.  looking...
01:23 stevan_ putter: I think my syntax is likely wrong
01:27 * stevan_ wonders if putter got lost?
01:28 lampus joined perl6
01:30 putter always.  let's see...  $.bar? note that module names can be quite rich, so this is only a subset.  (pause)
01:31 putter probably need to (err, is santity check a typo check?)
01:31 putter looks broadly sane.
01:31 stevan_ putter: I think twigils are slowly falling out of style
01:32 putter I find the q:code { {{{$x}}} } construct isnt working for me (at least on -e lines)
01:32 stevan_ and the module name bit,.. you are correct,.. that is simplified for sure
01:32 stevan_ putter: you mean actually running the code?
01:32 putter yes
01:32 stevan_ oh,.. I didnt even try that yet :)
01:33 putter are accessors  o.a($val)  or o.a = $val ?
01:33 putter ie, lvalue subs
01:33 stevan_ I dont know actually
01:33 * stevan_ checks S12
01:33 stevan_ is now known as stevan
01:35 stevan I think "is rw" implies a lvalue-ish accessor
01:35 putter the global namespace binding might be...  $*::($name) :=  if it were a scalar, I dont remember the sigil for types.  at least, that was once the form of dynamic... oh, wait, this is a macro... but a code macro... (hmm, it might be easier to start with string macros perhaps?)...  for of dynamic name is ::(blah)...  
01:36 stevan putter: well Class.isa(Package), so its just assigning a subpackage off the main one
01:37 putter yeah, but class isa type too, which package isnt...
01:37 stevan hmm... that is an issue
01:37 stevan well I think maybe we will need both
01:38 stevan namespace binding and then some kind of type binding
01:39 putter one nice thing about source macros is when they dont work, you can dump them out and fiddle with the source, trying to find out what exactly is making pugs unhappy.  otoh, perhaps pugs will give better error messages for code macros.
01:39 putter makes sense
01:40 stevan I am just fiddling here,.. either technique is fine with me,..
01:40 stevan but does the overall expansion idea make sense?
01:40 putter can has $.x = initialization code; ?
01:40 putter yes
01:41 stevan should that be parsed: ("has $.x" == initialzation code)?
01:41 putter might have to use 'is parsed' if pugs's default handling isnt quite what you need.  ie, if it sets up scoping before handing you the block.
01:41 * stevan is having trouble expanding the putter macros
01:41 stevan its been a long day
01:42 putter s/handling/argument handling/
01:42 putter sorry, can has() declarations take an initializer?
01:43 justatheory joined perl6
01:43 putter ie, re handling, might need to do   macro class is parsed (/:w class mumble \{ <statements>+ \}/) {...}
01:44 bill_n1vux joined perl6
01:44 * stevan has to run, later all &
01:45 putter none of my macro interpolation attempts
01:45 putter ah ok, bye
01:45 putter are working, eg
01:45 putter ./pugs -e 'macro m($b){ q:code {my $x=3; {{{$b}}} } } my $x=2; m {say $x}'
01:45 putter to see how binding works out
01:47 putter sorry if i was impenetrable.  long day indeed.
01:51 TimToady putter: re has taking initializer, do you mean P6 or pugs?  P6 specs initializers that are applied at BUILD time...
01:51 TimToady don't know if pugs supports it yet...
01:54 putter thanks.  just helping stevan explore the sanity of his strawman.  (hmm, there's an image)
01:55 TimToady k
01:56 putter TimToady: oh, Regexp::EngineReplace, is, well, replacing.  ignoring utf8 for now.  and no doubt buggy.  but am tempted to hook something up to it.  :)
01:57 TimToady Er, have the appropriate amount of fun.
01:59 putter audreyt: re just plug PCRE in - PCRE would be a rather harder nut that the regexp-spike engine.  in the spike, we go back to p5, and only use the real engine for the leaves.  in PCRE we would have to deal with callbacks etc.
02:00 jisom could work on improving PGE's p5 regex rules....and just use parrot for p6 rules and p5 regex
02:00 putter still need to call out to embedded p5 code.
02:01 jisom p5's not on parrot yet...Jonathan's .NET to PIR project for his thesis(I think) would help put compiled p5 on parrot....
02:01 * putter retypes example, making sure not to start line with /
02:01 putter / foo (??{ qr_returning_bar(32) }) /
02:02 jisom oh yeah, that's evaled, not compiled...
02:04 jisom too many complications
02:05 putter that sort of characterizes this whole area - too many complications.
02:05 putter hmm, that sort of characterizes software engineering.
02:05 FurnaceBoy life?
02:05 putter civilization?
02:05 jisom sounds like technology in general
02:06 jisom quantum physics?
02:06 putter lol
02:06 * FurnaceBoy 's brain hurts
02:07 putter though QM has a bit of a bad rap.  because it also has the dual characteristics of being somewhat non-intuitive, and of almost universally being explained really really really badly.
02:07 jisom like "this photon is both going through the mirror and being bounced off the mirror at the same time"?
02:08 jisom or teleportation, which Einstein called "that spooky thing quarks do"
02:08 FurnaceBoy that's a good explanation!
02:08 FurnaceBoy :-)
02:08 putter I'm thinking more along the lines of "how much of an atomic bond is classical electrostatics".
02:08 stevan putter: yes the "is parsed()" bit would need to be there
02:08 * FurnaceBoy hums, 'how much is that doggy in the window'
02:09 * stevan only skimmed the macro spec
02:09 dduncan left perl6
02:09 * jisom awaits comments on p6i about his macro expansion proposal
02:14 putter p6l or p6i?
02:15 jisom p6i
02:15 jisom I don't read p6l, just recently got ghc and pugs to compile
02:16 jisom internals are more fun :-D
02:16 putter :)
02:17 putter "Regexp::EngineReplace", or some better name?
02:17 putter Regexp::EngineHook
02:17 putter Regexp::Hook
02:18 jisom Regexp::Snafu
02:19 jisom what's it do?
02:20 putter guess that's a vote for need a new name :)
02:20 jisom switch from pge to pcre to perl5?
02:21 putter regexp compilation  /foo/  and execution  "a" =~ ...   are callbacked to p5 subs, rather than being handled by the usual p5 engine.
02:21 jisom ok...
02:21 putter one could use a similar mechanism to do pge or pcre.  but there you wouldnt particularly want to go back to p5 (hmm, unless... well anyway).
02:21 jisom needs a new name
02:22 putter ideas?
02:22 jisom well simple p5 regex can use pge...
02:22 jisom Regexp::Run
02:23 putter yes, one could certainly use the same hook this module uses (and the documentation on the hook scavanged on it:), to get a pure c pge or pcre replacement built.  but...
02:23 putter hmm
02:24 jisom there's a c pge?
02:24 putter :)
02:24 putter parrot == C
02:24 jisom pge is in pir
02:24 jisom no c for pge
02:24 putter pir == parrot == C
02:24 putter no?
02:25 jisom perl == perl vm == c?
02:25 jisom same exact concept
02:26 putter Thus most of Regex::ReplaceEngine (or whatever) is written in Inline::C / XS.
02:26 jisom scary
02:28 putter there seem to be lots of parrot p5 modules...  can one easily use parrot/pge from within p5?
02:28 jisom parrot p5 modules?
02:28 putter http://search.cpan.org/~ltoetsch/parrot-0.4.2/
02:29 jisom those are config/build modules
02:29 jisom once parrot's built, it doesn't use perl
02:30 * putter notices the modules which looked exciting are listed under "Documentation". :(  eg, PGE::Match
02:30 putter an no one has yet gotten parrot to the Inline::Parrot stage?
02:31 jisom well, you could freeze the object, print it out, and parse it in pugs, or use Data::Dumper on it in parrot and parse that in pugs
02:31 jisom you mean embed PIR in perl5?
02:32 putter http://search.cpan.org/~fglock/Inline-Parrot-0.16/lib/Inline/Parrot.pm  though it's dated before a lot of calling convention changes.
02:33 jisom eh, calling conventions got updated again today ;)
02:33 jisom but not for pir
02:33 jisom only pasm
02:33 putter http://search.cpan.org/~fglock/Inline-Parrot-0.16/lib/Inline/Parrot/parrot.pm
02:33 jisom "The current version does not work with arrays, hashes, references."
02:34 jisom I don't think it'd like working with coroutines then
02:34 jisom but
02:34 jisom if the iteration is done in pir
02:35 jisom inlining pir and using pge shouldn't be so impossible
02:35 putter so it sounds like noone has made a parrot module thing by which one can easily dynamically embed a parrot in p5.  yes?
02:35 jisom this is the first I've heard of Inline::Parrot
02:35 putter :)
02:39 jisom what's the basic thing that the Regexp::EngineSwitcherthing does? with regard to implementation
02:40 justatheory joined perl6
02:40 DesreveR joined perl6
02:43 jisom eww....it uses parrot's preprocessor
02:46 jisom eh, sometime I might hack it to get it working.......failing 200% of most tests, and 142.86% of one isn't good
02:51 vborja joined perl6
02:52 putter R:ES ;) ... good question...
02:56 putter it looks like how things are about to turn out is, R:ES hooks up the p5 internals which consume regexps, with p5 callback subs.  one which "compiles" a regular expression, returning the number of parens, and p5 a comparison sub.  when the re is used, the comparison sub is called, and returns success/failure, and capture offsets.
02:57 putter The second part allows you to fake a qr// object with p5 code for the first time.  The first part allows /foo/ to create them instead of normal ones.
02:58 putter Very good question.  I think I'll package things differently as a result :)
03:00 jisom well for pge, you load the pge compiler for what you want, p6 rules, p5 regex, shell glob, etc, compile the regex(exception thrown on error, so catchable), and the compiler returns an invokeable subroutine,  pass the text into that subroutine and you get a match object
03:01 putter yes.  that seems to be the universal approach.
03:01 jisom    p6rule_compile = compreg "PGE::P6Rule"
03:01 jisom    rulesub = p6rule_compile(pattern)
03:01 jisom    match = rulesub(text)
03:01 jisom that's the basic layout...
03:01 jisom just to make it easier to be able to add pge into it as well
03:01 dduncan joined perl6
03:02 putter ok, new packaging.  Regexp::QR , a base class for anything which wishes to be used with =~, split, etc,
03:03 putter and  Regexp::... i dont know, compile hook... what are // etall called?  regexp literals?
03:04 jisom regex delimiters?
03:05 putter i mean the whole concept of having /foo/ and m/foo/ and qr/foo/ and s/foo// in your code, rather than calling some_sub('foo').
03:05 jisom simplicity? I think php uses the sub('foo') method
03:05 jisom well, programmer simplicity
03:05 jisom I don't know
03:06 putter "Regexp Quote-Like Operators"
03:07 putter Regexp::OperatorHook
03:07 jisom oh just call it Regexp::PatternCompile
03:08 jisom something
03:08 jisom I don't know
03:08 * jisom never thought about what // were called
03:09 putter yeah, but compiling is what some regexp engine will do.  this just gives you a callback which is called when an operator is defined/compiled.
03:10 awwaiid joined perl6
03:11 jisom Regexp::PassBuck
03:11 jisom ?
03:11 putter lol
03:11 jisom sounds like what it's doing
03:12 jisom :)
03:14 robkinyon http://www.capitolhillblue.com/blog/2006/03/warning_financial_responsibili.html
03:14 robkinyon If you're in the US, that's just creepy
03:14 robkinyon If you're not, have a good laugh on us
03:14 robkinyon :-/
03:17 jisom so if you owe money to the government, and one payment is a lot more than the normal monthly, does the government think you're supporting terrorism?
03:18 robkinyon It's "different" and, as everyone knows, "different" == "bad" and "terrorism" == "bad", therefore "different" == "terrorism"
03:19 jisom maybe someday they'll actually define terrorism so they have to stop using it so much
03:20 robkinyon why would they do that?!
03:20 robkinyon it's *much* more fun this way ...
03:20 jisom they won't
03:20 jisom if they did, then all those Iraqi insurgents attacking U.S. soldiers wouldn't be terrorists anymore
03:22 jisom if they attack coalition forces, they're "freedom fighters", if they attack Iraqi forces, they're rebels, if they attack civilians, they're terrorists....collateral damage is just that.....intent matters
03:23 samv_home joined perl6
03:26 diotalevi Is the //, defined-or operator still named "err" in perl6?
03:29 samv_home is now known as samv
03:29 samv is now known as mugwump
03:30 FurnaceBoy no,, even if you're not in the US it's creepy. for the same reason '1984' is creepy.
03:32 jisom which part of 1984? the fact that it could be true?
03:33 * diotalevi has a slightly different translation from that "different" -> ... -> "terrorism" thing. That it's an anomaly and it's easier to spy on exceptions than unremarkable events. So if you decide to just spy indiscriminantly, this is a selection method you might use.
03:33 jisom or the ominous ending
03:33 Steve_p I thought "Hot For Teacher" was very disturbing
03:33 justatheory joined perl6
03:33 jisom I like that song!
03:34 * Steve_p jumps to Panama
03:35 Steve_p I haven't built pugs in so long, I can't remember if its dor or err
03:36 Steve_p ...of course you could write a rule to make it the way you want
03:38 diotalevi I was mostly just asking because 'err' is such a disaster in p5. I wanted to know if p6 had learned from it.
03:38 diotalevi speaking strictly of p5 where 'err', the defined-or operator actually exists which is some custom patched stuff and bleadperl.
03:39 jisom it's in perl for freebsd, the // operator
03:39 * diotalevi means the string "err" to refer to the operator.
03:39 diotalevi Not the operator itself.
03:39 jisom oh
03:41 bill_n1vux left perl6
03:44 Steve_p Tux writes creates all the dor patches for Perl 5.8
03:44 huhlig question... is there anyway to have multiple hash keys point to one value?
03:45 Steve_p If you mean several keys that have a reference to the same value, yes
03:45 Steve_p ...and in Perl 5 too.
03:45 huhlig how?
03:45 * diotalevi knows a straightforwrd p5ish way but if there's a more magical p6 way... dunno.
03:46 huhlig or a document to show how
03:46 diotalevi Store the same reference at all the keys.
03:50 huhlig so $hash->{'A'}=$data
03:50 huhlig $hash->{'B'}=$data
03:50 TimToady diotalevi: I think the P5 "err" patch is botched.  It should only be recognizing the keyword when an operator is expected.
03:50 huhlig $hash->{'C'}=$data
03:50 huhlig ?
03:51 huhlig doesnt that still use 3 times the storage?
03:51 TimToady (much like the x operator)
03:51 * diotalevi hasn't noticed any particular actual breakage, it's the *name* that's the complaint.
03:52 Steve_p Actually, its been un-botched I believe
03:52 TimToady Ok, I was only looking at 5.9.2 sources...
03:52 diotalevi That err, erl, error are all words that go together. From a different language but the meaning is obvious.
03:53 TimToady Using an undefined value is an error.
03:53 diotalevi huhlig, $hash_ref->{'A'} = \ $data; $hash_ref->{'B'} = \ $data; $hash_ref->{'C'} = \ $data
03:54 diotalevi ...
03:55 Steve_p It was changed in Perl 5 to allow the "err" keyword only when requested
03:55 diotalevi No... it's a kind of error, maybe. Except when it isn't.
03:55 Steve_p err...5.9.3..
03:55 kakos joined perl6
03:56 TimToady "err" is currently illegal when an operator is expected.
03:57 TimToady (where currently means 5.8)
03:57 TimToady Just as you can have sub x even though there's an 'x' operator.
03:57 diotalevi I was referring to more to blead/p6.
03:59 * diotalevi is resisting but hasn't actually thought of any place he'd use "err"/"dor" that isn't already some exception-alike branch.
04:00 TimToady I would certainly not change from err to dor 'cause I think 'dor' is
04:00 TimToady dorky.
04:00 diotalevi Maybe it's because "X defined or Y" is just a different phrase in my head than "X error Y".
04:00 TimToady If we could come up with something else entirely, maybe.
04:00 robkinyon def
04:00 TimToady Well, in SNOBOL it was "fail" or some such.
04:00 robkinyon def == "define" or "default"
04:01 robkinyon or, just plain old "default"
04:01 robkinyon my $x = $y default 'foo';
04:01 TimToady 99% of the time it's gonna be used to catch a failure.
04:01 robkinyon 99% of the time, it's gonna be used to set a default
04:01 robkinyon particularly on the args for a subroutine
04:01 diotalevi rob, you'd use the higher precedence form // for that.
04:01 diotalevi is now known as jjore
04:01 robkinyon for failures, i'll be using //, not err
04:02 jjore For failures you'd use //?
04:02 TimToady Yes, // is for defaults
04:02 mk_ joined perl6
04:02 mako132_ joined perl6
04:02 jisom I prefer using "or" over ||, but I don't think err reads well.....may make sense, but doesn't read easily....broken english
04:02 robkinyon actually, for defaults, i use "my $x = $y; $x = 'foo' unless defined $y" because Devel::Cover misreports the || (or //) as only testing two cases
04:03 robkinyon maybe i'm flipping the precedence bit re: defaults vs. errors
04:03 Steve_p Devel::Cover isn't fully set up to handle dor code
04:03 robkinyon or maybe i just don't program like you guys
04:03 jjore You'd have to write stuff like LHS = ( RHS err ...) and FUNC( ... ) // stuff then. You'd make all the parens mandatory to get the parsing right!
04:04 robkinyon jjore: I just don't write code like that
04:04 Steve_p ...or send bug reports to pjcj
04:04 jjore You just said you always type C< open( ... ) || ... > instead of C< open ... or ...>. Didja mean that?
04:05 robkinyon no, i didn't
04:05 * robkinyon needs more ice cream
04:05 robkinyon i use C<open .. or ...>
04:05 * jjore didn't think you were trying to be that cross-grain with the precedence.
04:06 robkinyon so, that would turn into C<blessed() err ''>
04:08 robkinyon hmm ... that was a really odd experience. I just realized I was soft-sold on // and err
04:09 justatheory joined perl6
04:11 jjore You musta sold it to yourself then.
04:11 jjore Good thing you had one in stock.
04:12 * Steve_p blinks
04:12 robkinyon LOL
04:12 robkinyon No - I mean the whole dor/err/name discussion
04:13 mk_ left perl6
04:13 robkinyon if the low-precedence version is 99% for errors, then it makes sense to call it "err"
04:13 robkinyon if the one used for defaults will almost always be the operator, then it doesn't matter what the low-precedence name is
04:13 jjore "error" is how I imagine I'd use "err" but it isn't how I read it. I still expect to read it "defined or." Not that I'm wrong in how I want to read it.
04:14 robkinyon i guess i'd just consider them unrelated operators that coincedentally happen to use the same mechanism under the covers
04:14 Steve_p I expect to read it "err...I forgot about that"
04:14 robkinyon Plus, in Perl6, couldn't you just change the parser to read 'dor' as 'err'?
04:15 * jjore is ignoring that the parser can be folded, spindled, and multilated at whim.
04:15 * Steve_p folds up Perl 6 and puts in his back pocket
04:15 robkinyon I don't think it's fair to complain about a keyword when ignoring the most powerful feature of Perl 6
04:15 jisom it could be possible to have a "japanese perl6" version that just uses a different grammar parser, hypothetically, depending on how that compiler's written
04:16 Steve_p I'm reminded of the orignal Bourne shell code
04:16 Steve_p err original
04:16 robkinyon I'm figuring that one of the first big CP6AN modules will be how to alias keywords
04:17 * jjore had a great set of instructions from 3M once on how to repair a 5.25/3.5 floppy disk. It involved using scissors to cut the media out of the bad sleeve, open a good sleeve, wash it with dish soap, put it back together with masking tape.
04:17 Steve_p IIRC, Bourne wrote macros to make C look like Pascal
04:18 huhlig is there a way to make XML::TreeBuilder Ignore case in tags?
04:18 jisom I thought ada....it was some language other than c, I think I have it too
04:20 Steve_p huhlig, case in tags is significant in XML
04:20 jjore huhlig, that'd be improper XML. XML is *all*about* being proper. I kind of doubt anything will let you do that. Maybe you could convince Twig to do that.
04:20 huhlig hmm
04:20 huhlig is there anyway to stuff a lc in there first?
04:21 Steve_p No, then it would not be XML
04:21 robkinyon why do you need case-insensitivity?
04:21 jjore huhlig, the office XML party line is that if you don't follow XML rules strictly, it can't be called XML.
04:21 robkinyon seems like the two parties reading this file should be agreeing on something as simple as case
04:21 huhlig stupid users
04:22 jjore er, s/office/official/
04:24 kakos joined perl6
04:29 FurnaceBoy_ joined perl6
04:37 huhlig which is faster for access, hash or array?
04:38 FurnaceBoy_ not much between them, when I've measured
04:38 huhlig ok cool
04:39 FurnaceBoy_ I measured a 256 element array of consecutive values. for wildly different structures, ymmv.
04:40 huhlig hmm ok
04:49 jjore Hash access *is* more complicated than array access but usually you never care about that.
04:49 jisom generally if you're using has access, you either need it, or want it for readability and maintainability
04:50 jisom *hash access
04:50 huhlig I am trying to bundle my data together so it can be passed as a single unit...
04:50 jjore So pass a reference.
04:51 huhlig a reference to what
04:51 jjore To whatever is convenient.
04:51 huhlig there are a couple of RedBlack Trees, a hash and a scalar
04:51 jjore So a hash with those things, named, is probably nice.
04:51 huhlig ok
04:52 huhlig but access time wont be that bad
04:52 FurnaceBoy_ yeah, it really depends on what your keys are.
04:52 huhlig I basically have hash(1)->key(4)->rbtree(300k)
04:52 FurnaceBoy_ in my case they were just integers, so a hash and array were perfectly interchangeable
04:52 huhlig (1) number of keys
04:52 huhlig ahh
04:53 huhlig these would be words or numbers
04:53 huhlig objects, players, and so on
04:53 huhlig this is instead of using "global variables" or would I be better accessing $main::variable
04:54 avar joined perl6
04:54 huhlig ?
04:56 amnesiac joined perl6
04:56 huhlig FurnaceBoy_, jjore?
04:57 FurnaceBoy_ that's not my area. :)
04:57 * FurnaceBoy_ passes the buck
04:57 huhlig oh
04:57 huhlig jjore?
05:01 * huhlig nudges jjore
05:03 huhlig jisom?
05:03 jisom ?
05:03 huhlig this is instead of using "global variables" or would I be better accessing $main::variable
05:03 huhlig using a hash passed to almost every function
05:04 huhlig hash ref rather
05:04 jisom passing a hash ref to every function sounds like object oriented code
05:04 huhlig this is mostly linear
05:05 stevan joined perl6
05:05 jisom but if you're passing a hash ref to almost every function, it sounds a lot like object oriented code
05:05 huhlig ok
05:06 huhlig so would I be better addressing $main::var
05:06 huhlig ?
05:06 jisom I don't know your design or code
05:06 huhlig I can send it?
05:07 huhlig which makes more sense?
05:07 huhlig on a performance scale
05:08 jisom you're seeming overly concerned with performance....for something the size of which you're planning, I suggest going with what's the most readable and maintainable
05:09 huhlig ok
05:09 FurnaceBoy_ agreed
05:09 FurnaceBoy_ make it work right first, fast second (within reason)
05:09 FurnaceBoy_ oh,
05:10 FurnaceBoy_ and throw away the first prototype ;-))
05:10 FurnaceBoy_ (if you have to)
05:12 huhlig heh
05:12 huhlig Im on like the 30th prototype
05:12 jisom then you need to make a good design first
05:13 jjore sounds like you aren't clear on 1st principles. Texts like Code Complete are good for that.
05:14 * jjore went off to prepare stuff in the kitchen.
05:15 Cryptic_K joined perl6
05:17 Khisanth joined perl6
05:22 huhlig Code Complete? Onlne book?
05:22 huhlig more like I keep stalling an getting bored
05:22 huhlig or frustrated
05:23 huhlig its been the same prototype persay
05:23 huhlig just rewritten
05:23 FurnaceBoy_ try simplifying it
05:23 FurnaceBoy_ get something small to work
05:24 huhlig I am
05:24 huhlig I am working on gettin subsystems to work now
05:24 FurnaceBoy_ okay, well keep going :-)
05:24 huhlig and I am building modularity
05:24 FurnaceBoy_ we'll be your cheerleaders
05:24 FurnaceBoy_ huhlig hugLIG rah RAH RAH
05:25 huhlig *snicker*
05:25 FurnaceBoy_ :)
05:26 huhlig so it would be best just to address the vars... do I just address as $main::var = blah
05:27 * huhlig wants to make sure the syntax is right
05:28 Steve_p Grrr...where's klortho when you need him!
05:28 drbean_ joined perl6
05:29 jisom $main::foo, $::foo, $Package::foo, etc...
05:29 Steve_p advice from klortho #11917 applies
05:30 huhlig ok
05:30 szabgab left perl6
05:30 huhlig whats that
05:31 Steve_p http://groups.google.com/group/comp.lang.perl.misc/msg/b2f911d6d9c5cef2
05:31 huhlig ahh
05:31 huhlig ok
05:35 FurnaceBoy_ WOW!
05:35 FurnaceBoy_ That is ... BEAUTIFUL.
05:35 FurnaceBoy_ omg.
05:36 FurnaceBoy_ Keywords: afro, chiefdom, rosary, winy
05:36 FurnaceBoy_ so Mark Jason Dominus == klortho ?
05:37 jisom "You can't just make shit up and expect the computer to know what you mean, Retardo!" but sometimes it works!!!
05:37 FurnaceBoy_ :-))
05:37 FurnaceBoy_ er....
05:37 FurnaceBoy_ you can't get a computer to do something you don't know how to do yourself.
05:37 FurnaceBoy_ except, maybe , by accident.
05:38 justatheory joined perl6
05:38 jisom knowledgable guess
05:38 FurnaceBoy_ that works.
05:38 FurnaceBoy_ I suppose one can even learn that way. In some fields it's called experimental technique?
05:39 jisom yeah, like when they detonated the first atom bomb, they made a knowledgeable guess that it wouldn't burn up the atmosphere of the earth, which was a valid possibility they believed had a chance of occuring
05:39 Steve_p ...but you can't expect it to work
05:40 jisom "Looking for a compiler bug is the strategy of LAST resort.  LAST resort." unless you work on an alpha compiler
05:41 jisom I don't agree with #11915, because I use print statements as my debugger...
05:42 Steve_p "If you have `some weird error', the problem is probably with your frobnitzer." is the one that I love
05:42 Steve_p That and "#11948 Perhaps your veeblefitzer is clogged."
05:43 jisom "Never catch a signal except as a last resort." does that include SIGINT?
05:43 jisom trapping ^C is useful sometimes
05:43 jisom like cleanup
05:43 jisom :-D
05:45 jisom "Ah yes, and you are the first person to have noticed this bug since 1987.  Sure." - actually, I think openbsd discovered a bug in X that had been in there for like 8 years
05:47 FurnaceBoy_ actually I've never had any issues with gcc on Alpha... ?
05:47 FurnaceBoy_ do you mean compaq c?
05:47 jisom huh?
05:47 FurnaceBoy_ oh Alpha.
05:47 FurnaceBoy_ as in before Beta.
05:47 jisom as in before release canidate
05:47 FurnaceBoy_ I thought you meant Alpha as in 64-bit microprocessor.
05:48 jisom no, I mean things like pugs and parrot
05:48 FurnaceBoy_ hahahahah
05:48 FurnaceBoy_ :-))
05:48 jisom where compiler bugs are expected
05:48 jisom well not so much in parrot.....
05:49 FurnaceBoy_ <FurnaceBoy_>so Mark Jason Dominus == klortho ?
05:50 jisom #11950
05:52 Alias_ joined perl6
06:37 Alias_ audreyt: ping?
06:37 Alias_ audreyt: ping me back when you get in. I'll be around for 6-8 hors
06:37 Alias_ and hours, too
06:47 huhlig22 joined perl6
06:49 GeJ joined perl6
06:51 drrho joined perl6
06:58 Draconit_ joined perl6
06:58 Draconit_ left perl6
07:12 fandango joined perl6
07:13 huhlig22 ok I am doing something stupid
07:14 huhlig22 while ( my ($key, $value) = each($main::helpfiles) ) { print "$key => $value\n"; }
07:14 huhlig22 $main::helpfiles is a hash
07:14 jisom %::helpfiles
07:14 huhlig22 ok
07:15 ayrnieu huhlig - %::helpfiles.pairs
07:15 huhlig22 .pairs?
07:15 ayrnieu oh, is this perl5?
07:15 jisom he's using perl5
07:15 huhlig22 ok
07:16 huhlig22 umm...
07:16 huhlig22 while ( my ($key, $value) = each(%::helpfiles.pairs) ) { print "$key => $value\n"; }
07:16 huhlig22 Type of arg 1 to each must be hash (not concatenation (.) or string) at database.pm line 43, near "pairs) "
07:16 jisom no .pairs
07:16 huhlig22 ...
07:16 ayrnieu .pairs is perl6
07:16 jisom not in perl5
07:16 huhlig22 ahh
07:17 huhlig22 $main::helpfiles is a hashref
07:17 jisom %$::helpfiles
07:17 huhlig22 I need to dereference it first dont I
07:17 huhlig22 ok
07:17 huhlig22 yipiee!
07:17 huhlig22 help files work
07:17 ayrnieu ?eval my %h = <1 2 3 4>; say "$_[0] => $_[1]" for %h.pairs # in perl6, anyway :-)
07:17 evalbot_9278 is now known as evalbot_9314
07:17 evalbot_9314 OUTPUT[1 => 2 3 => 4 ] undef
07:18 huhlig22 that seems... yucky
07:18 ayrnieu what does?
07:18 huhlig22 the perl6 format
07:18 huhlig22 much less clean
07:18 ayrnieu what about it seems yucky?
07:19 huhlig22 ?eval my %h = <1 2 3 4>;
07:19 evalbot_9314 {("1" => "2"), ("3" => "4")}
07:19 huhlig22 ahh ok
07:19 ayrnieu that is analogous to this perl5, huhlig:  my %h = qw/1 2 3 4/
07:19 huhlig22 seems obfuscated
07:19 ayrnieu it's not, really.
07:19 avar joined perl6
07:20 ayrnieu and this is just an example, with fake data...
07:20 jisom RPN is hard to read if  you don't know RPN
07:20 huhlig22 rpn?
07:20 ayrnieu reverse-polish notation.
07:20 huhlig22 reverse perl notation
07:20 huhlig22 ahh
07:20 ayrnieu 1 2 3 5 * + +
07:20 huhlig22 rpn I have always found to be redundant
07:20 huhlig22 and now unneccessary
07:21 ayrnieu funny, I always kept my HP49G in RPN mode.
07:21 jisom no....efficient, no worries of precedent....etc.....and similar to assembly programming in some regards
07:21 shric and it's easier to write a parser for rpn
07:22 huhlig22 true
07:22 jisom infix is older, and "easier", but rpn's more precise
07:22 ayrnieu more efficient in usertime ways, too, as on the HP48G (and on), but nevermind.
07:23 jisom and remember, bc was first implemented on top of dc
07:23 nothingmuch joined perl6
07:24 ayrnieu RPN was never a simple efficiency hack: FORTRAN predated Forth, after all.
07:26 nothingmuch hola
07:26 * nothingmuch didn't know fortran was rpn
07:26 gaal morning!
07:26 jisom well there's a big difference between fortran, forth, and lisp........
07:26 ayrnieu nothingmuch - it wasn't.
07:26 jisom forth is rpn
07:26 nothingmuch but in forth rpn was chosen because it eliminates all need for look ahead
07:27 huhlig22 I thought RPN was like this
07:27 huhlig22 4 5 + 5 - 10 +
07:27 ayrnieu I'm sure that there were many factors that went into and came out of Forth's syntax, as with any language design effort.
07:27 ayrnieu huhlig - sure.
07:27 nothingmuch yes, that's rpn
07:27 jisom 4 5 + 5 - 10 + is the more human kind, 4 5 10 + - + is the same thing really
07:28 jisom well
07:28 huhlig22 ahh
07:28 jisom uhhh
07:28 jisom something
07:28 ayrnieu jisom - Stack underflow
07:28 nothingmuch ayrnieu: there is a direct quote from mr. Moore saying that the reason was simplicity
07:28 nothingmuch jisom: not the same thing at all
07:28 nothingmuch 10 5 4 5 + swap - +
07:29 ayrnieu except for the underflow, the only difference is that jisom's example uses more of the stack.
07:29 nothingmuch that works, but not the other way around
07:29 Alias_ rpn?
07:29 jisom my mind's not working great at the moment for rpn
07:29 ayrnieu oh, jisom has *two* errors!
07:29 nothingmuch nuh uh, - is not, errr
07:29 nothingmuch what's the word
07:29 ayrnieu (shame)
07:29 nothingmuch not like + and *
07:29 nothingmuch it's not the same on either side
07:29 ayrnieu !communicative
07:29 nothingmuch yes
07:30 shric commutative
07:30 ayrnieu That's something about Forth, though -- it is a language very quick to punish its users.
07:31 ayrnieu If someone wants to write a huge, poorly factored function with lots of bizarre stack frobnication... well, it's their grave.
07:31 jisom many languages are
07:31 ayrnieu !forth languages will mainly let you write ugly code.
07:31 ayrnieu forth will break your brain, first.
07:31 nothingmuch that's why abstraction and code reuse are so important in forth
07:31 jisom if I remember the quote..."you can write bad fortran in any language"
07:32 nothingmuch no word is supposed to be more than 2-3 ops
07:32 huhlig22 hmm
07:32 jisom you mean ansi forth? cause you can always write your own
07:32 nothingmuch jisom: "$x programmers will write $x in any language" for qw/forth fortran assempley/;
07:32 jisom pir? :-D
07:33 nothingmuch we don't have any yet ;-)
07:33 * jisom is a pir programmer
07:33 Alias_ Well, you can LITERALLY write it :)
07:34 GeJ morning folks
07:36 nothingmuch hola
07:43 Aankhen`` joined perl6
07:43 jisom http://en.wikipedia.org/wiki/PL/C a fun language to debug.....if it existed anymore
07:44 Alias_ I shudder to think how you debug Haskell
07:44 nothingmuch Alias_: you don't ;-)
07:44 Alias_ Then what, you just test it very very carefully? :)
07:44 Alias_ And implement proof-carrying
07:44 Alias_ or something
07:45 nothingmuch i'm not serious
07:45 Alias_ Well, specifically, I wonder how you do non-trivial debugging
07:45 nothingmuch but the type system and the non-mutable semantics make most of the code easier to debug
07:45 Alias_ And it wouldn't surprise me to know that haskell is extremely hard to debug at an advanced level
07:45 ayrnieu alias - you don't! :D  Feature! :D
07:45 nothingmuch in the sense that if you trace occasionally you can get a pretty good idea of what's going on
07:45 Alias_ fair nuff
07:46 nothingmuch but reading is much more useful than "debugging" in that sense
07:46 ayrnieu aside, q-lang.sf.net -- a language very similar in appeareance to Haskell, although dynamic and actually based on term-rewriting, has an excellent debugger.
07:46 Alias_ I'm a big fan of the Perl debugger as a faster alternative to both unit testing and print statements
07:47 jisom eh, you have to learn to use a debugger, print statements are easier
07:47 ayrnieu after hearing the perlcast about the Perl debugger, I've come to use it more frequently.  Its handling of forked programs is pretty cool.
07:47 Alias_ jisom: You only have to learn to use the debugger once
07:47 ayrnieu it takes nothing to learn how to use the debugger, really.
07:47 * nothingmuch doesn't like the perl debugger.... it's been too flakey when I really really needed it
07:47 jisom per language
07:47 nothingmuch and ever since I'm prejudice, i guess
07:47 Alias_ jisom: That value being 1 in the case of "the Perl debugger"
07:47 nothingmuch err, that's not the right word
07:48 Alias_ nothingmuch: Accepting the perl debugger is a little hacky at times is hard
07:48 Alias_ nothingmuch: I find it annoying at times too
07:48 huhlig22 gah!!!
07:48 Alias_ nothingmuch: But then I wouldn't know how to write a better alternative, so I shut up :)
07:48 * huhlig22 thinks the C guys can be a$$holes
07:48 * nothingmuch is generally happy with:a
07:49 nothingmuch a. being careful
07:49 nothingmuch b. warn Dumper( $wtf );
07:49 ayrnieu huhlig - the ##c backlog seems a bit crazy.
07:49 huhlig22 heh
07:49 iblechbot joined perl6
07:49 huhlig22 ok, mabey you guys can answer the same question
07:49 huhlig22 is a data storage methodology question
07:49 Alias_ nothingmuch: Have you tried using Devel::Dumpvar instead of Dumper?
07:49 huhlig22 its a
07:49 nothingmuch nope, i'll give it a look
07:50 huhlig22 ok
07:50 Alias_ It's a reimplementation of the debuggers data structure printer
07:50 Alias_ has some bugs still, let me know if you find any, or have any patches to contribute
07:50 justatheory joined perl6
07:50 huhlig22 object = struct/hash containing details of a item in virtual space
07:50 huhlig22 room = struct/hash containing details of defined space in virtual space
07:50 huhlig22 how would it be best to store information
07:51 huhlig22 keep the location of an object on the object itself...
07:51 huhlig22 lending to 100% unique instance of every object
07:51 ayrnieu the #perl6 backlog is now also a bit crazy.
07:51 huhlig22 or keep the objects locations in the room so that not every object is instanced and therefor save resources and not end up with infinite items
07:52 huhlig22 ayrnieu is that a subtle way of saying shut up?
07:52 ayrnieu huhlig - no.
07:52 nothingmuch huhlig22: normalize your DB
07:52 nothingmuch use indirection
07:52 huhlig22 nothingmuch: be more specific
07:52 huhlig22 how so
07:52 ayrnieu huhlig - it's a overt way of saying "???" :-)
07:52 nothingmuch keep an index of objects in the rooms
07:52 huhlig22 ok
07:52 nothingmuch but don't "contain" the objects in the rooms
07:52 ayrnieu huhlig - ah, designing a MUD?
07:52 nothingmuch http://en.wikipedia.org/wiki/Database_normalization
07:53 huhlig22 ayrnieu, basically a rewrite of rom in perl
07:53 huhlig22 with alot more code unity and clarity
07:53 huhlig22 and more features
07:53 nothingmuch huhlig22: ovid had a bit of fun implementing this stuff
07:53 nothingmuch http://search.cpan.org/~ovid/
07:53 ayrnieu huhlig - why index your objects at all?  Why not just have your universe be a tree starting with a 'universe room' with all of the rooms as its children, and then objects in those rooms as their children?
07:53 nothingmuch hmm
07:54 nothingmuch maybe not
07:54 Alias_ because that limits you to n-1 relationships?
07:54 nothingmuch i think just in his journal
07:54 Alias_ (if that's ok though, sure!)
07:54 huhlig22 ayrnieu: coord system
07:54 ayrnieu you could even shove designed objects in the universe room, and clone them out to the universe -- so that special effects and enchantments and whatnot can just be added to the clones.
07:54 huhlig22 this mud not only has vnum based rooms for description
07:54 huhlig22 it uses 3 coord systems to emulate space
07:54 nothingmuch huhlig22: ayrnieu's approach also works... the idea is the same though
07:55 nothingmuch basically, make sure your organization makes it so that duplication is not a natural thing
07:55 nothingmuch because it's simpler to model uniqueness than duplication in that model
07:55 ayrnieu why do you want coordinate systems?  Space is already defined by 'exits'...
07:56 huhlig22 ayrnieu Im talking coordinates for somewhere in excess of 100k^2^2 coordinates
07:56 huhlig22 err wait
07:56 huhlig22 no 100k^3^3
07:56 huhlig22 so 100k^9 coordinates
07:56 nothingmuch 1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
07:56 jisom so 100k^9?
07:56 huhlig22 yea
07:56 nothingmuch ?
07:56 ayrnieu lots of space and not a lot of designers to make it interesting, but OK.  Making an outer-space mud ? :-)
07:57 nothingmuch i hope this is sparse ;-)
07:57 huhlig22 ayrnieu SciFantasy
07:57 huhlig22 think spelljammer/eberron/Dragonstar
07:57 ayrnieu ?eval 100**9
07:57 evalbot_9314 1000000000000000000/1
07:57 huhlig22 planets are still vnumed
07:57 jisom ?eval (100 * 1024) ** 9
07:58 evalbot_9314 1237940039285380274899124224000000000000000000/1
07:58 huhlig22 but space itself contains planet objects, systems, and ships
07:58 nothingmuch huhlig22: http://use.perl.org/~Ovid/journal/27481
07:58 jisom that's a lot of bytes
07:58 huhlig22 well its stored as 6 -100,000 - 100,000 numbers
07:58 ayrnieu ?eval 10 ~ 0x10
07:58 evalbot_9314 "1016"
07:58 huhlig22 sector x y z::x y z
07:58 ayrnieu ?eval 10 ~ (0x10)  # ??
07:58 evalbot_9314 "1016"
07:59 ayrnieu oh, hah.  Whitespace significant.
07:59 nothingmuch huhlig22: did Poppa_Vic tell you that you're a stupid beatnik and that he won't answer your question because he had to learn it on his own?
07:59 ayrnieu PoppaVic doesn't speak that way, nothingmuch.
08:00 * nothingmuch is only venting some of his own steam ;-)
08:00 huhlig22 nothingmuch: in ##c
08:00 jisom ?eval 10.ashex
08:00 * jisom wonders
08:00 evalbot_9314 Error: No such method in class Int: "&ashex"
08:00 jisom ok
08:00 huhlig22 ?
08:00 nothingmuch ?eval :16 10
08:00 evalbot_9314 Error:  unexpected "1" expecting term postfix, operator, postfix conditional, postfix loop, postfix iteration, ";" or end of input
08:01 nothingmuch aaah
08:01 nothingmuch i'm guessing S29 is not fully implemented ;-)
08:02 huhlig22 so I can store objects in a room enviroment
08:02 huhlig22 how do I store the objects that exist in space?
08:02 jisom_ joined perl6
08:03 nothingmuch ayrnieu: for the record, every time i had a question to ask instead of shutting up PoppaVic would schold me
08:03 nothingmuch and I think the problem is not with me, because i never got crap from anyone else in the world for my questions
08:04 ayrnieu that's OK, I just mean that he doesn't speak that way.  Or hasn't when I've noticed.
08:05 ayrnieu as for him conveying a similar point...
08:05 nothingmuch one sec, gotta send a fax
08:08 huhlig22 ok guys and gals
08:08 huhlig22 tell me if Im insane
08:08 huhlig22 two reference lists...
08:08 huhlig22 one for rooms
08:08 huhlig22 vrooms
08:09 huhlig22 one for objects
08:09 huhlig22 a 3rd list for locations of all objects
08:09 huhlig22 in the rooms
08:09 huhlig22 make it two lists, one for repop, one for perm(no repop)
08:09 huhlig22 would this be plausable?
08:11 nothingmuch so
08:11 beppu_ joined perl6
08:11 nothingmuch huhlig22: you're optimizing for a search that says "given room X, these are the objects therein?"
08:11 huhlig22 yes
08:11 huhlig22 using a Redblack tree
08:12 nothingmuch this is not all in memory, right?
08:12 huhlig22 or something better if you know of it
08:12 huhlig22 yes all in memory
08:12 nothingmuch aaaaaaaaaaaaaaaaaaaah
08:12 huhlig22 memory hefty program I know
08:12 nothingmuch just FYI, postgres has spatial indices
08:12 ghenry joined perl6
08:12 huhlig22 interface is too slow
08:12 nothingmuch you could prefetch one level of indirection, and cache in memory
08:12 huhlig22 I tried that in both postgres and mysql for another project
08:12 nothingmuch ah
08:13 nothingmuch that's very odd
08:13 huhlig22 had to make a 300x52 spreadsheet
08:13 huhlig22 each cell was an individual search
08:13 huhlig22 takes it about an hour
08:14 huhlig22 and its searching on like 2 pieces of info
08:14 huhlig22 a number and a date
08:14 KingDiamond joined perl6
08:14 huhlig22 the rest of the perl just prints html so I know its not that
08:14 huhlig22 is now known as huhlig
08:17 nothingmuch well
08:17 nothingmuch that was a throughput thing
08:17 nothingmuch this is a latency thing
08:17 nothingmuch with larger chunks of prefetching you could have probably optimized the spreadsheet
08:18 nothingmuch and with pre-resolving of adjacent rooms you can probably optimize the MUD thing
08:18 nothingmuch but nevermind
08:18 huhlig hmm
08:18 nothingmuch make sure that you have a constant way to get form the room to an object
08:18 huhlig nothingmuch: only other drawback... tell me if im wrong
08:18 nothingmuch if you are going to use a coordinate system then you'll need to be able to index that
08:18 huhlig it requires extra software I may not be able to install on a shell system
08:18 nothingmuch e.g. with 3 trees
08:18 nothingmuch yes, that's a problem
08:19 huhlig 3 trees?
08:19 huhlig how would I set that up
08:19 nothingmuch well, it's just 3 trees
08:19 huhlig x->y->z?
08:19 nothingmuch pointing to shared leaves
08:19 nothingmuch oh, no
08:19 nothingmuch orthogonally
08:19 nothingmuch x tree, y tree, z tree
08:19 * huhlig 's eyes are crossing
08:19 nothingmuch you search all three
08:19 nothingmuch and intersect
08:19 huhlig ok
08:19 nothingmuch it's difficult stuff
08:19 huhlig oh
08:19 nothingmuch annoying to pull off
08:20 huhlig this part is easier in C
08:20 nothingmuch but it's the only way to not force you to scan everything
08:20 nothingmuch Set::Object might help here
08:20 huhlig ok
08:20 nothingmuch you could also use sparse arrays to actually use your coordinate system as indexes
08:20 nothingmuch look into judy arrays
08:21 nothingmuch on sourceforge, i think
08:21 huhlig 100k^9 in size though?
08:21 nothingmuch then you can store a sparse matrix
08:21 nothingmuch well, no
08:21 nothingmuch you pay very little overhead for the empty slots
08:22 nothingmuch http://judy.sourceforge.net/
08:23 huhlig is there a perl version
08:23 huhlig or am writing my own
08:23 nothingmuch not likely ;-)
08:23 nothingmuch if i were you i'd make an XS interface or something
08:23 nothingmuch Array::Judy
08:23 nothingmuch there are other interfaces to arrays with a C backend
08:23 nothingmuch you can learn from them
08:24 huhlig ?eval sqrt(100000^9)
08:24 evalbot_9314 3.0
08:24 huhlig eh?
08:24 huhlig 3^2 = 100000^9?
08:24 jisom_ ?eval e**(pi * i) + 1
08:24 evalbot_9314 Error: No such method in class Num: "&e"
08:25 jisom_ ?eval exp(1)**(pi * i) + 1
08:25 evalbot_9314 Error: No such sub: "&i"
08:25 huhlig didi I do something wrong?
08:26 huhlig nothingmuch, for the 3 trees, do you know a document I could look at that would give me a good idea
08:26 jisom_ you meant ** instead of ^
08:26 jisom_ ?eval sqrt(100000 ** 9)
08:26 evalbot_9314 3.1622776601683792e22
08:27 huhlig ahh
08:27 huhlig so its 2^3.1622e22
08:27 jisom_ ^ is exclusive bitwise or
08:28 huhlig even if its 1 bit per cell
08:28 huhlig I still ate up all my memory
08:28 huhlig a few times over
08:28 nothingmuch sorry, back
08:28 nothingmuch err, no
08:28 huhlig ?eval sqrt(100000 ** 9)/8
08:28 nothingmuch i don't know of a document
08:28 evalbot_9314 3.952847075210474e21
08:28 huhlig heh
08:28 nothingmuch basically there are two approaches you can take though
08:29 nothingmuch index on orthogonal dimensions and then intersect
08:29 nothingmuch and always start the search from the smallest dimension for efficiency
08:29 nothingmuch if the result set is small enough iterate it and filter instead
08:29 huhlig 3,952,800,000,000 GB memory
08:29 huhlig I dont have that much
08:29 nothingmuch why do you need that much memory?
08:29 nothingmuch oh
08:29 nothingmuch they are not 1 bit per cell
08:30 huhlig Array::Judy
08:30 nothingmuch they are sparse
08:30 nothingmuch as in
08:30 nothingmuch with holes
08:32 huhlig hmm
08:35 huhlig ok, so I need to feed something x,y,z,a,b,c and it will feed me everything around it
08:36 huhlig actually
08:36 huhlig its not 10^9
08:36 huhlig its only 10^3
08:36 huhlig the mud can track everything in a sector
08:37 nothingmuch what's abc?
08:37 nothingmuch how far?
08:37 nothingmuch like, the cube of the room?
08:37 nothingmuch i'd just like to note that this is exactly what spatial indexing is already doing and that we're reinventing right now
08:37 nothingmuch and that mysql/postgresql are not the only ways to do it =)
08:37 nothingmuch but...
08:37 nothingmuch yes
08:37 nothingmuch what it does is try to determine which dimensions is the best to try and search engine
08:37 nothingmuch s/engine/in/;
08:37 nothingmuch freudian slip ;-)
08:37 nothingmuch and then either intersects all the possible values from this slice
08:37 nothingmuch err, filters, not intersects
08:37 nothingmuch or intersects with the results of the next best dimensions
08:38 huhlig I killed nothingmuch
08:44 huhlig hmmm
08:44 huhlig how to do this
08:49 huhlig I wonder
08:49 huhlig could I just do this
08:49 elmex joined perl6
08:50 huhlig hash->{x}->{y}->{z}
08:57 ayrnieu $hash{"$x:$y:$z"}
08:58 Alias_ hmm.... I wonder if spatial indexing is in geopostgres
08:58 huhlig $spawn->{'HR'}->{$x}->{$y}->{$z} = $reference
08:58 huhlig <huhlig> $spawn->{'rnum'}->{$rnum} = $reference
08:58 huhlig will this work
08:59 huhlig effectively?
08:59 Alias_ left perl6
08:59 huhlig which is faster ayrnieu?>
08:59 huhlig $hash{"$loc:$x:$y:$z"}
08:59 huhlig or what I was proposing
09:02 ayrnieu um, why do you have $loc in there?
09:03 huhlig to differentiate the multiple types
09:03 ayrnieu types of what?
09:03 huhlig HS, RS, and  NS are x y z
09:03 ayrnieu what types do you have?
09:03 huhlig VR is $snum
09:03 huhlig err vnum
09:03 ayrnieu what do those mean?
09:03 huhlig well game terms, Hyperspace, Realspace an Netspace
09:03 huhlig VR is Virtual room
09:04 huhlig the three space methods are done by x y z coords
09:04 huhlig vnum rooms are connected via mapping
09:05 buu You still want a database!
09:05 ayrnieu Guessing at the kind of access you'll want, seperate spaces for each *space may be best.
09:05 ayrnieu so, $space{hyper}{"$x:$y:$z"}
09:05 huhlig why
09:06 huhlig buu already tried that on another app
09:06 huhlig too damned slow
09:06 ayrnieu 'guessing at the kind of access you want'.
09:06 buu huhlig: I seriously doubt that.
09:06 huhlig well it takes an hour to fetch a 300x52 spreadsheet
09:06 ayrnieu You do much talking about how you'd like to structure your data, but little about how you intend to access it.
09:06 buu No it doesn't.
09:06 buu eval: 300 * 52
09:06 p5evalbot buu:  Return: 15600  
09:06 huhlig ayrnieu: it is accessed at two points
09:06 ayrnieu why would you want to 'fetch a 300x52 spreadsheet', anyway?
09:07 buu I can select 11k rows from mysql in under a second
09:07 ayrnieu huhlig - I don't think what you say is accurate.
09:07 buu 4000 more won't take that long.
09:08 huhlig http://pastebin.com/588512
09:08 ayrnieu If you think that you will often grep all of hyperspace to deliver a message to a randomly placed object, this affects how you should organize your data.  If you think that you'll mostly just be moving from point A to point B in hypersace, this affects how you'll organize your data.  If everything will have a seperate, primary reality and the 'space' is just to manage area effects, this also makes a difference.
09:10 huhlig no
09:10 huhlig it will be directed
09:10 huhlig only objects that exist on the coord plane will need to be used
09:10 huhlig at one of 3 times
09:10 huhlig object update
09:11 huhlig object respawn
09:11 huhlig and a user command
09:15 typonaise joined perl6
09:20 typonaise joined perl6
09:24 typonaise joined perl6
09:27 typonaise joined perl6
09:32 nothingmuch joined perl6
09:45 rgs who's the contact for the pluggable regexp engine for P5 somebody was hacking on ?
09:46 * rgs pings audreyt who might know.
09:46 hb_ joined perl6
09:56 blm_ joined perl6
10:09 awwaiid joined perl6
10:10 nnunley joined perl6
10:20 nothingmuch joined perl6
10:36 avar joined perl6
10:52 ghenry joined perl6
10:54 kanru joined perl6
11:03 chris2 joined perl6
11:22 blm_ is now known as blm
11:26 ghenry joined perl6
11:52 rep is now known as Dott_Rep
11:53 Dott_Rep is now known as rep
11:58 nivrrex joined perl6
11:59 nivrrex left perl6
12:06 penk joined perl6
12:07 uszr` joined perl6
12:29 blm is now known as two_bob
12:29 two_bob is now known as two_bobhelp
12:29 two_bobhelp is now known as two_bob
12:30 two_bob left perl6
12:43 nivrrex joined perl6
12:44 nivrrex left perl6
12:57 Limbic_Region joined perl6
13:01 Limbic_Region audreyt ping
13:03 Juerd Heh, hurrah for identd
13:03 Juerd www-data@feather :)
13:04 Juerd Limbic_Region: https had been broken for quite a while. Should this happen again and you notice it, then could you send me a short message by mail about it?
13:05 Juerd I still don't have a good monitoring system set up, so I depend on users for reports :)
13:05 kisu joined perl6
13:06 Limbic_Region Juerd - sure - provided I don't have more important things on my mind (like my new daughter)
13:06 szbalint nice ident :P
13:07 Juerd Limbic_Region: Great, thanks in advance :)
13:07 Juerd Limbic_Region: Though if you notice that anything's wrong, that means you're using feather mail or irc, which I think would be an indication of not having more important things on your mind at that moment ;)
13:08 Limbic_Region Juerd - actually I have an automated script that logs on to my 2 primary email accounts, the monastery, and IRC when I log in in the morning
13:09 Limbic_Region when the feather one stopped working, I assumed something had changed and that at was b0rk
13:10 Limbic_Region When I got around to figuring out what it was I realized I couldn't connect manually either so that's when I said something
13:12 fglock joined perl6
13:14 fglock Parser metacircularity today!
13:14 fglock unless bugs|meetings
13:15 lypanov ummmmmetacurcularity....ummm
13:16 nothingmuch fglock: which level of metacircularity?
13:19 fglock nothingmuch: all grammar written in p6
13:20 kolibrie joined perl6
13:24 nivrrex joined perl6
13:25 nothingmuch fglock: parse rule syntax with rule syntax?
13:25 fglock nothingmuch: yes, the grammar includes the whole rule syntax
13:26 nothingmuch yay
13:26 nothingmuch what does the rule AST look like?
13:26 fglock for some value of "the whole" - only the parts that I've implemented :)
13:27 nothingmuch does it parse + etc as higher order rules accepting subrules as parameters?
13:27 fglock nothingmuch: can you give an example?
13:28 Juerd Limbic_Region: I see. The saying something didn't reach me, unfortunately
13:28 nothingmuch (foo)+
13:28 Juerd Limbic_Region: Thanks for trying
13:28 nothingmuch this is matching the + rule
13:28 iblechbot joined perl6
13:28 nothingmuch with the foo rule as a parameter
13:28 nivrrex left perl6
13:29 fglock nothingmuch: yes - <foo>+ for subrules, (foo)+ for constant
13:29 mako132_ joined perl6
13:29 nothingmuch ofcourse
13:29 gaal joined perl6
13:29 nothingmuch the constant is a subrule
13:30 nothingmuch i'll take a look later, i'm very interested
13:30 fglock nothingmuch: a link - http://svn.openfoundry.org/pugs/misc/pX/Common/iterator_engine/p6prelude.p6
13:30 nothingmuch fglock: okay
13:30 fglock nothingmuch: this is the grammar - right now I'm working on joining this with the rule syntax
13:30 nothingmuch yummy
13:31 nothingmuch fglock++ # works with my grand master plan
13:31 nothingmuch please document this in accordance Hierarchy.pod
13:31 fglock nothingmuch: Hierarchy.pod?
13:32 nothingmuch fglock: please have a quick look =)
13:32 nothingmuch it's a doc tree brain dump
13:32 nothingmuch sorts out p5 doc in the new tree
13:32 fglock nothingmuch: ok
13:32 nothingmuch and also details missing docs for p6 internals
13:32 nothingmuch ... like the rules domain specific language ;-)
13:33 bsb joined perl6
13:35 gaal bsb: hi
13:37 fglock pmurias: please run tests before commits :)
13:37 nothingmuch hola bsb
13:37 svnbot6 r9315 | fglock++ | iterator_engine.p6 - added tests; 1 failure (Pugs bug? - it looks like variables in a closure are a copy?)
13:40 fglock re r915: 'pugs iterator_engine.p6t'
13:40 svnbot6 r9316 | fglock++ | iterator_engine/p5hacks.pl - added '1;'
13:47 bsb hi gaal, nothingmuch
13:48 Qiang joined perl6
13:48 svnbot6 r9317 | fglock++ | iterator_engine/p6primitives.p6 - 'if', '+', '*'
13:52 rafl Hello
13:53 rafl Juerd: What did my real flatmate say, btw?
13:53 Limbic_Region hey bsb, I tried to /msg you yesterday but you weren't logged on - what, you think you are entitled to a life or something?
13:54 Limbic_Region in any case, I was tracking down why zlib was still b0rk on Win32 and gaal pointed me to you
13:55 Limbic_Region I found the problem and audreyt thinks she might have fixed it (I am in the process of verifying ATM)
13:55 Limbic_Region and in case the humor was missed - I was only joking about the life part ;-)
13:55 bsb hmm, thanks gaal...
13:56 bsb It's ok, I was being rejuvenated at the Dead Sea
13:56 gaal irc over voice technology
13:56 bsb What was the problem?
13:57 Limbic_Region testing to see if ghc can link with zlib is not the same as verifying that the zlib header file is about
13:58 bsb Ah, I didn't write those probes but know roughly what's going on
13:58 bsb Don't have win32 myself though
13:59 Limbic_Region well - the really strange thing is that my Win32 at home had been working just fine but my Win32 at home was b0rk
13:59 Limbic_Region so I backed into it - gaal told me that USE_ZLIB was getting set when it shouldn't be - so I checked to see why it was getting set
14:00 Limbic_Region I found the Makefile.PL probe that compiled a small haskell program with zlib linked
14:00 Limbic_Region verified that it worked by hand and went huh?
14:01 svnbot6 r9318 | fglock++ | iterator_engine/p6prelude-cached.pl - precompiled prelude file
14:01 Limbic_Region Next looked at the pugs compile error - fastpackedstring was complaining about missing zlib.h - checked ghc_root\gcc-lib\include and sure enough it wasn't there
14:02 mako132_ joined perl6
14:02 svnbot6 r9319 | fglock++ | iterator_engine/p6compiler-non_circular.pl - keep the old compiler
14:02 svnbot6 r9319 | fglock++ | around, for historical reasons
14:02 Limbic_Region looked in ghc_root\gcc-lib and saw that there was a library though (which is why linking was possible) - just no header files
14:02 bsb weird
14:03 Limbic_Region unfortunately though - I incorrectly guessed that I could use the Cygwin header files (zlib.h and zconf.h) - it compiles everything just fine but when pugs tries to run it looks for a cygwin dll
14:03 Limbic_Region so I suggested 1 of 2 things to audreyt - either do a better job of confirming header files are present or see if the necessary functions can be extracted directly from the library
14:04 Limbic_Region she opted to go with solution 3 - include zlib.h and zconf.h (but hopefully she didn't use the cygwin ones based on the fact I told her they would work)
14:04 Limbic_Region because they won't
14:05 bsb She's always going with solution 3.  Maybe we should renumber our suggestions
14:05 Limbic_Region heh
14:05 hexmode joined perl6
14:05 Limbic_Region in any case, I am trying to verify her solution now but this box only has 256 MB of ram and ends up swapping like mad when I have to compile certain parts of Pugs
14:06 Limbic_Region so who knows when it will finish
14:07 robkinyon LR: When you get a chance, are you going to write up how to compile Pugs on Cygwin?
14:08 Limbic_Region robkinyon - um, no as I don't know how to do that
14:08 Limbic_Region I just happen to have Cygwin and Pugs and GHC on the same box - sorry if I gave the impression I was doing this under Cygwin
14:13 rantanplan_ joined perl6
14:20 svnbot6 r9320 | fglock++ | iterator_engine/p6compiler.pl - Metacircular Grammar !!!
14:20 fglock metacircular Rules coming soon...
14:21 FurnaceBoy joined perl6
14:22 mako132_ joined perl6
14:25 Limbic_Region fglock - is this a result of your conversation with TimToady yesterday or the direction you were going anyway?
14:25 fglock it's the result of a well-slept night :)
14:26 FurnaceBoy lucky you!
14:26 fglock Yesterday I was planning a quick hack - this one is the real thing
14:26 FurnaceBoy I couldn't sleep, so I wrote a 14-line B-tree
14:26 FurnaceBoy (C)
14:26 jjore What is misc/pX?
14:26 fglock FurnaceBoy :)
14:26 * FurnaceBoy wishes he were joking
14:26 FurnaceBoy worked first time though.
14:26 integral 14 lines?  neat
14:27 Limbic_Region jjore - you mean what is the project in that directory or why is it called misc/pX ?
14:27 jjore What is the stuff in that directory?
14:28 Limbic_Region jjore - that's fglock's p6 compiler in p5 project
14:28 fglock jjore: pX is an experiment with a new form of collaboration - my subproject just happens to be inside it
14:28 Limbic_Region FurnaceBoy - you are familiary with the lwall quote that goes something along the lines "you want that in 1 line - does it have to be 80 columns)
14:28 FurnaceBoy LOL
14:29 jjore Can I have a commit bit so I can write this stuff down in misc/pX/README, etc?
14:29 FurnaceBoy these are nicely formatted lines.
14:29 Steve_p joined perl6
14:29 Limbic_Region sure - which email address do you want me to send it to?
14:29 jjore twists@gmail
14:30 Limbic_Region k - might take me a few minutes, I always have to re-remember how to hand em out
14:30 fglock Limbic_Region: if you touch p6prelude.p6, it will be recompiled... using the previous version!
14:30 vel joined perl6
14:31 fglock Limbic_Region: same thing with p6primitives.p6
14:31 * jjore 's primary way of being helpful is just being clueless in public and adding any info gleaned to READMEs.
14:31 fglock jjore: nice!
14:31 nothingmuch Limbic_Region: i can add it quick if you still haven't found it
14:31 jjore Cuz this stuff isn't documented near well enough where a clueful person can make sense of it.
14:32 jjore I think I have to have been involved in pugs for the last year to actually be able to know what anything does.
14:32 fglock jjore: the iterator_engine subdir has another more specific README
14:32 jjore Cuz the checkout is really opaque.
14:32 Limbic_Region nothingmuch - no, let me - this will help me ingrain it
14:33 nothingmuch oops, too late
14:33 nothingmuch put this in your bookmarks though: http://rt.openfoundry.org/Foundry/Project/Admin/Members/?Queue=270
14:33 jjore fglock, oh I found that much deeper README but it didn't have a "What is this?" description in it.
14:33 nothingmuch it's a direect link to the members admin page
14:33 jjore Wait... which README did I find?
14:34 jjore The one I first found didn't have one, now I've one that does.
14:34 jjore Ah!
14:34 Limbic_Region jjore - the commit bit is on its way
14:34 jjore misc/pX/Common/README vs misc/pX/Common/iterator_engine_README
14:35 jjore I don't even know how I accidentally opened the second because I would have looked for anything matching ^RE...
14:35 nothingmuch & home
14:35 * jjore is a dork.
14:35 Limbic_Region jjore - I also /msg'd you at the Monastery a link to audreyt's blog whose most recent entry links to several presentations that may be of interest
14:35 fglock jjore: it's misc/pX/Common/iterator_engine/README - if you have iterator_engine_README then it's an old file - let me check
14:37 fglock jjore: if you have old files around, it may be better to delete everithing and do a new checkout
14:38 jjore My checkout is frum... yesterday? Sunday?
14:38 Limbic_Region jjore - "old"
14:38 Limbic_Region err
14:38 Limbic_Region "old" is an extremely relative term around here
14:39 fglock jjore: we do ~20 commits a day
14:39 * jjore gasps and falls over.
14:40 Limbic_Region jjore - out of curiosity, what box do you have Pugs running on ATM?  I know you have had problems getting it working on your platform of choice
14:41 * fglock adds rules rules to the grammar - very carefully
14:41 jjore Just a plain-old Linux box, LR.
14:42 jjore My NetBSD-Sparc was because p5 runs on it and it's SMP.
14:42 jjore I don't like the machine much. It's very noisy.
14:42 mako132_ joined perl6
14:42 Limbic_Region jjore - if you want, you could always get an acct on Feather
14:43 jjore Feather?
14:44 Limbic_Region yep
14:44 Limbic_Region let me get you a link to explain all about it
14:45 Limbic_Region in a nutshell, a server hosted by Juerd's compafor the sole purpose of p6 development
14:46 Limbic_Region it is what is enabling me to chat here today fwiw (since I ess IRC from work)
14:46 lypanov fglock: hehe. i do 20 commits on a good day alone on my local repos ;)
14:47 jjore ah, 1 see.
14:49 Limbic_Region http://groups.google.com/group/perl.perl6.language/browse_thread/thread/e337e7feb5be6eb6/3b1d204d5049487b?q=Perl+development+Server&amp;rnum=1#3b1d204d5049487b
14:49 Limbic_Region sorry it took a while to get the link, my machine is S-L-O-W ATM
14:49 chris2 joined perl6
14:49 TimToady LR: compiling pugs are we?  :-)
14:50 Limbic_Region yes TimToady - I would recommend splitting some of the more memory intensive pieces up so as to work on machines with 256MB of memory without swapping
14:50 Limbic_Region but that would be equivalent to volunteering
14:50 TimToady heaven forfend.
14:51 Limbic_Region and since you likely don't know - I have a 4 week old at home (our first)
14:51 fglock TimToady: iterator_engine's syntax is now compiled by itself - no dirty hacks!
14:51 TimToady LR: er, congrats!  Have the appropriate amount of fun...
14:51 lypanov hehe
14:51 lypanov Limbic_Region: congratz again :D
14:52 Limbic_Region thanks
14:52 TimToady fglock: also congrats.  Saw your rules rules in the BL.
14:53 fglock TimToady: there still is a p6compiler.pl - but it just loads the the file it precompiled
14:53 TimToady fglock: do you see any potential relationships between what you're doing and what PGE is doing?  It's just Patrick is also working on bootstrapping p6compiler from the PGE end, and you could probably collaborate usefully.
14:53 Limbic_Region TimToady - what's the skinny on p5 -> p5 if you have a second or two?
14:54 Limbic_Region more specifically, how close is it to becoming ready for collaboration?
14:54 TimToady Er, in .il it took about 4800 seconds to explain...
14:54 TimToady Ah.
14:55 TimToady It's currently being merged into mainline 5.9 by Nick.
14:55 fglock TimToady: I'm writing the rules in Perl 6 - so PGE is not necessary...
14:55 Limbic_Region k - thanks TimToady
14:55 TimToady Yes, but it would be nice if you and Patrick ended up with the same set of rules.  :-)
14:56 Limbic_Region not only the same set of rules as an end result - working together you might both get there faster
14:57 fglock TimToady: yes - I hope the test suite will assure it will be the same (otoh, working with Patrick would be nice, of course)
14:58 TimToady How are you going to handle new operators of new precedence, frinstance.  Patrick has put a lot of work into that.
14:59 TimToady Limbic_Region: if you want to play with p5->p5 before the merge is published, that can also be arranged.  Audrey has a copy of it, for instance.
15:00 fglock TimToady: the plan (today) is to bootstrap the compiler, which is mostly done. When it works, it could emit Parrot, which would use PGE. The Parrot version would be a working compiler with a PGE backend. The Perl5 version is "pure Perl"
15:01 fglock TimToady: the plan is a work in progress
15:01 TimToady fglock: that's fine.  As if P6 design isn't also a WIP. :-)
15:01 fglock WIP?
15:01 TimToady Work In Progress.
15:02 fglock :)
15:02 TimToady s/isn't/is/
15:02 TimToady Anyway, I understand.  Keep up the good work!
15:02 Limbic_Region TimToady - I am mostly interested in seeing how easy it would be to hook in to detect bad coding style - for instance my $foo = 'bar' if $blah;
15:02 fglock anyway - right now, there is a working compiler, which you can extend using whatever Perl 6 it already knows to handle
15:03 TimToady Oh, you mean Perl::Critic with real semantic information instead of just a document?
15:03 Limbic_Region yes
15:03 TimToady Sure, don't see why not.
15:03 Limbic_Region and thanks for remembering the module name - I couldn't
15:03 lypanov umm
15:03 lypanov any info on p5 -> p5 online?
15:03 TimToady Can also be incestuous with p5-to-p6 to instruct on which things
15:03 TimToady will be difficult to translate.
15:04 Limbic_Region lypanov - I think audreyt's last blog entry linked to TimToady's presentation
15:04 iblechbot joined perl6
15:04 Limbic_Region TimToady - yeah, I thought of that too but as I understand it - too early
15:04 TimToady Just the Takahashi slides, which are singularly uninformative about the important bits...
15:05 * Limbic_Region has to break the bad news to audreyt that her fix didn't work and that it is likey his fault
15:05 lypanov TimToady: any posts to ml's i should have read to get context?
15:05 * lypanov is interested
15:05 jjore Perl::Critic recently got C<my ... if/unless/while/until/for ...> detection, Limbic_Region. fwiw.
15:06 jjore p5 of course.
15:06 Limbic_Region jjore - yes, I believe as a result of feedback at the Monastery
15:06 jjore No, I filed a bug on it.
15:06 TimToady The blog doesn't link to my slides, see http://wall.org/~larry/p55.xul for that.
15:06 Limbic_Region even better jjore
15:06 jjore I'm on the P'C list.
15:07 hb__ joined perl6
15:07 TimToady also, the snapshot audrey mentions needs to be updated with http://wall.org/~larry/nomad or it loses too much information.
15:07 jjore See... being interested in lint makes a person pay attention to perlcritic too.
15:08 lypanov umm... my ffx sure dislikes that .xul
15:08 TimToady But admittedly p5-to-p5 is still very raw and underdocumented, and doubtless the whole toolchain needs a few more refactorings.  The testing has been very ad hoc.
15:09 TimToady Just read it as a text file for now.
15:09 lypanov TimToady: really just looking for single sentence overview :)
15:09 Limbic_Region jjore - see also http://perlmonks.org/index.pl?node_id=526474
15:10 hoowa joined perl6
15:10 fglock I wonder if Patrick reused the my bootstrapping algorithm, he could have a working compiler quickly
15:11 svnbot6 r9321 | fglock++ | iterator_engine/p6rule.pl - '<@var>' and '$var := (<rule)' moved to
15:11 svnbot6 r9321 | fglock++ | prelude.p6
15:11 TimToady fglock: could well be.
15:12 lypanov umm
15:12 lypanov fglock: bootstrapping algm?
15:12 jjore Oh. Limbic_Region, probably what reminded me.
15:12 fglock lypanov: implement a dynamic grammar, and reuse it to extend itself
15:12 lypanov fglock: *nod*
15:13 lypanov fglock: this is the method you use?
15:13 lypanov you're compiling to parrot?
15:13 * lypanov perks up slightly :P
15:14 fglock lypanov: I'm compiling to Perl 5, but it can be easily ported - yesterday I started working a Pugs version
15:14 fglock s/working/working on/
15:14 fglock but it hit some bugs :(
15:15 Ymmv joined perl6
15:15 bynari joined perl6
15:15 mako132_ joined perl6
15:16 bynari A little birdie told me there were publicly available #perl6 logs. Is this true?
15:16 fglock lypanov: when the grammar hits "circularity", it no longer needs to be progressive - then you can rewrite it the normal way, which is easier
15:16 fglock bynari - http://colabti.de/irclogger/irclogger_log/perl6
15:17 lypanov fglock: how long is it?
15:17 hoowa audreyt do u still here?
15:17 bynari Awesome, thanks, fglock
15:17 lypanov fglock: i was writing a ruby in ruby a while back
15:18 fglock lypanov: bytes? the prelude is 3382 bytes, right now
15:18 lypanov fglock: and just kind of let it to waste.. got into it again
15:18 lypanov (damn #perl6 :P)
15:18 lypanov fglock: nice nice
15:18 * lypanov shall have to take a look eventually
15:19 fglock lypanov: 20526 bytes compiled
15:19 lypanov fglock: i've not really got into the grammar area, putting that off for a while, maybe your work will provide inspiration :)
15:19 fglock lypanov: you can use the exactly same program to write compilers for any language - just change the grammar and write the appropriate emitter nodes
15:20 fglock s/program/method/
15:21 * lypanov nods
15:21 lypanov thusly my interest :)
15:21 Limbic_Region audreyt ping again
15:22 * lypanov wonders what her ping stack is at now :P
15:22 Limbic_Region no idea but I need someone on Win32 to without zlib installed to verify something for me
15:25 fglock recompiling the circular prelude is scary - if you mess with it, you ruin the source code
15:25 fglock because it is circular
15:25 * fglock makes extra backups
15:25 lypanov hehe
15:26 jjore backup should be part of the build then.
15:27 fglock jjore: the build dies if there is a syntax problem, but if there is a logical problem then the compiler is ruined
15:27 jjore yay. So...backup shoud be part of the build?
15:27 lypanov could the compiler compile itself before saving state?
15:29 jjore Oh well. I'm off to work. Then caucous night. :-p. I should poke my eyes out with a spork.
15:29 fglock lypanov: no - I made a backup of the non-bootstrapped compiler, just in case
15:29 fglock lypanov: and I'm commiting the state to svn, each time
15:30 * lypanov nods
15:34 chris2 hi lypanov
15:34 jjore is now known as jjore-home
15:35 justatheory joined perl6
15:38 lypanov yoyo chris2
15:38 * chris2 digs into haskell
15:42 * Supaplex chews through some maillogs
15:45 penk joined perl6
15:48 * FurnaceBoy chews through some high voltage cables
15:48 chris2 FurnaceBoy: one-by-one it's only bad for the teeth ;)
15:49 svnbot6 r9322 | gaal++ | * precompilation_cache.pod design notes. Please review.
15:50 * FurnaceBoy spits chewed PVC...
15:50 * Supaplex deflects
15:50 * FurnaceBoy goes to find a nicer tasting breakfast
15:51 gaal nothingmuch: ping
16:03 bd_ joined perl6
16:13 pawel joined perl6
16:16 FurnaceBoy au contraire, chris2: I am well grounded.
16:16 chris2 =)
16:16 FurnaceBoy but croissants sure are tastier.
16:22 pawel fglock: I'll remember the run the test next time :) a script is in place..
16:23 Limbic_Region anyone have an ssh server running on port 443 ?
16:23 pawel I would be nice to have precompiled p6primitives in the repo
16:25 pawel i get Undefined subroutine &@grammar1::statements called at iterator_engine.pl line 184
16:25 pawel when i run the non-circular version
16:25 FurnaceBoy lol@Limbic, why?
16:25 Limbic_Region well, cause policy states that no browser will connect to the net except via the corp porxy
16:26 Limbic_Region same policy is followed by a dozen other things that won't connect except via the corp proxy
16:26 Limbic_Region one of those things is a secure client
16:26 pawel fglock++ for the metagrammar
16:26 Limbic_Region well - said proxy only forwards http and ssl requests so for a secure client to work - it would have to be accepting connections on one of those ports
16:27 FurnaceBoy are you irc'ing via cgiirc or such?
16:27 foobarbazblarg joined perl6
16:27 Limbic_Region cgiirc
16:27 FurnaceBoy k
16:31 gaal anatoly_: ping
16:32 uszr` joined perl6
16:32 fglock pawel: the non-circular version is now obsolete. p6rules.t is not expected to suceed, either
16:33 fglock s/suceed/succeed/
16:33 fglock because it doesn't use the p6 lib
16:33 justatheory joined perl6
16:33 fglock I'll fix that later
16:34 * fglock deleted the local version and restart
16:37 fglock pawel: re primitives - my mistake - I'll commit the missing file
16:38 pawel is now known as pmurias
16:38 svnbot6 r9323 | fglock++ | p6primitives-cached.pl - compiled primitives
16:38 fglock pawel: would you check it again?
16:39 pmurias it works!! thanks
16:40 fglock pmurias: I moved the whole compiler to p6; now I'm moving the rule subsystem
16:40 pmurias explain more please...
16:40 fglock see p6compiler.pl - there is no grammar in it - it's just a loader
16:42 pmurias thats great
16:45 pmurias I think useing Perl::Tidy, would help simplify code,emiting
16:45 pmurias I'll try to add it as an optional dependency this evening
16:45 justatheory joined perl6
16:47 pmurias code generation routines should care how the *resault* looks,and Perl::Tidy does a greatly better job
16:48 fglock pmurias: you mean, pass the compiled code through Perl::Tidy?
16:48 pmurias yes
16:49 fglock pmurias: see the $tab thing in the rule emitter - it does a good job
16:49 pmurias seen it
16:49 pmurias I wanted to remove it to unifie code & rule nodes interfaces
16:50 fglock pmurias: I'd rather add it to the code nodes
16:51 fglock pmurias: the reason to keep dependencies low is to be able to port code to other languages (Parrot, Pugs)
16:52 justatheory joined perl6
16:52 marmic joined perl6
16:56 fglock what's the p5 syntax to pre-declare a sub?
16:57 pmurias I could code it as an optional switch (for higher code quality)
16:57 pmurias sub name;
16:57 fglock pmurias: as long as it don't fail if it is not installed, it's ok
16:58 fglock s/don't/doesn't/
16:58 pmurias i never meant for it to be mandatory
16:58 fglock pmurias: ok
16:59 pmurias like all things its a trade of if you go for speed don't format the generated code (as a matter of fact Perl::Tidy is quite slow from the initial observations)
17:00 fglock pmurias: you can get the code formatted later (with external perltidy)
17:02 pmurias i'll experiment with it before making a choice(got to do the homework now :(
17:04 fglock pmurias: ok!
17:08 svnbot6 r9324 | fglock++ | iterator_engine/p6rule.pl - less rules in p5 land
17:14 Cryptic_K joined perl6
17:29 svnbot6 r9325 | fglock++ | iterator_engine - "there is no <rule> in perl5"
17:41 justatheory joined perl6
17:55 nothingmuch joined perl6
18:03 FurnaceBoy 0m
18:14 ruz joined perl6
18:18 vborja joined perl6
18:21 szbalint Hello.
18:22 mako132_ joined perl6
18:22 svnbot6 r9326 | fglock++ | iterator_engine - less perl5 code
18:25 Limbic_Region szbalint - I have given up on Project Euler for a while - I think I have picked all the low hanging fruit
18:29 dduncan joined perl6
18:33 * fglock picks the high hanging fruits and falls from tree
18:35 TimToady but is it an upward tree or a downward tree?
18:36 Limbic_Region tion)
18:38 TimToady I am not in the habit of tioning )
18:40 Limbic_Region wow
18:40 Limbic_Region that should have read "It is a btree (he can fall in either direction)"
18:40 * Limbic_Region is compiling Pugs again (from scratch) and his machine can't keep up with him
18:41 fglock :)
18:42 fglock Your machine can't keep up with you?
18:44 TimToady off to $job...
18:44 fglock TimToady: have a nice day
18:47 mako132_ joined perl6
18:51 FurnaceBoy joined perl6
18:55 svnbot6 r9327 | fglock++ | iterator_engine - tests cleanup (rules must now be tested in p6 land);
18:55 svnbot6 r9327 | fglock++ | updated README, p6sample.p6
18:58 szbalint Limbic_Region: I don't really have too much time for Euler atm :\
18:58 szbalint and it got a bit repetitive after 60+ problems
18:58 szbalint :P
18:59 fglock bbiab
19:01 svnbot6 r9328 | fglock++ | iterator_engine - updated TASKS
19:02 justatheory joined perl6
19:07 rindolf joined perl6
19:08 Cryptic_K joined perl6
19:09 rindolf Hi all!
19:09 rindolf kane_: here?
19:12 rindolf I emailed kane_. He did not reply.
19:13 integral rindolf: maybe your email comes under more pressing priorities.
19:13 rindolf integral: possibly.
19:14 rindolf It reminds me of something I heard in the perlcast about the time management.
19:14 integral "Don't use IRC"
19:14 rgs heh.
19:14 rindolf integral: no.
19:15 putter joined perl6
19:15 rindolf integral: he just says that once you've received a ticket you need to acknowledge it so people will know you're working on it.
19:17 integral maybe he's not working on it.
19:17 rindolf integral: then you got to let them know that you're not.
19:17 rindolf integral: either way, you need to give a fast initial feedback.
19:18 rindolf Albeit he did apply my patch to CPANPLUS beforehand, so he's still alive.
19:18 putter gaal, audreyt, etal: an additional observation on pil2js/Prelude breakage.  ./pugs actually works if use/require in Prelude.pm are _sub_s  rather than macros.  Because Parser.hs is serving as the "macro is parsed(...)".  Unfortunately, this doesnt help with pil2js, because to -C properly, pugs needs to know use/require exist, and
19:18 usr-src joined perl6
19:19 dduncan left perl6
19:20 putter and it's ignoring the Prelude, and op1s from Prim.hs _override Prelude.pm subs_.  That last is critical.  Because it means use/require and macroness is not unusual.  It seems everything moved from Prim to Prelude with break pil2js if it causes any parse ambiguity.  which means most everything, yes?
19:22 putter If so, then this is a "full stop" block on migrating stuff from Prim to Prelude.  Until it can be worked around in some way (second, abbriviated copy of the Prelude for -C, or what ever).  sound right?
19:23 putter s/is not unusual/is not an unusual/isolated case/
19:24 justatheory joined perl6
19:27 bsb joined perl6
19:34 gaal putter: looking, trying to understand.
19:37 gaal putter: but I don't see what's blocking what? there aren't any prims with the same names in Prelude and Prim, are there?
19:37 buu is now known as buu_
19:37 gaal what _is_ the pil2js breakage? url to log summary works if you have one
19:41 fglock putter: did you backlog? Parser metacircularity!
19:42 fglock whatever this means
19:42 putter fglock! :)
19:42 putter (that's what I'm unclear on - think i get it:)
19:43 putter hope to looks at TASKS soonish
19:43 fglock fglock: you don't change the syntax by using p5 - it's all p6 code
19:43 fglock ? I'm talking to myself
19:44 putter gaal: use/require Prim's formerly existed.  now just Pugs::Internals::use/require.  One can have both.  But if plain use/require are defined, a Prelude.pm use/require, sub or macro, doesnt get run.
19:45 putter In the absence of a use/require Prim, -C attempts to interpret  use Foo;  as a method "use" call on class Str, and fails.
19:46 gaal putter: that actually sounds like correct behavior
19:46 gaal oh wait
19:46 gaal even if Prelude defines it?
19:46 fglock putter: the TASKS list is scary
19:46 justatheory joined perl6
19:46 putter gaal: a Prim trumphs a Prelude def.
19:47 gaal ok, sure; that's to be expected and doesn't look like a problem
19:47 gaal if Prim.hs does NOT define something, but that something IS in Prelude, what's the problem?
19:47 putter I have an unjustified suspicion it's because ruleApply is rather low in parseTerm.  But I haven't looked at the parser output to confirm that's what's happening.
19:48 gaal putter: compare Prim nodes in data Exp with Pad entires
19:48 putter gaal: -C ignores Prelude.  p6 doesnt like undefined subs being used.
19:49 putter ./pugs -e 'foo Bar;'  *** No such method in class Any: "&foo"
19:51 putter Courtesy of Parser, -C -e 'use Bar;' gets as far as knowing Bar is a Str, so the failure is
19:51 putter ./pugs -CPIL1 -e 'use Foo;'  pugs: *** No such method in class Str: "&use"
19:51 gaal now I'm beginning to see
19:54 putter to recap,  -e 'use Foo' doesnt -C without a "use" Prim, and if there is one, any Prelude use() sub-or-macro doesnt get called by ./pugs.
19:56 putter Long-term, my understanding is the right thing is for -C to include the Prelude, but be smart enough not to output it.
19:58 putter For an immediate fix, either a "mini-Prelude for -C", or tweaking so Prelude defs trump Prims, would fix the problem.
19:58 p5evalbot joined perl6
19:58 gaal hmmm
19:59 svnbot6 r9329 | fglock++ | iterator_engine/TASKS update
19:59 putter A mini-Prelude has the slight advantage that one could place brand new things in the Prelude (that aren't current Prim's), and have -C work with them.
19:59 rafl Juerd: ping
20:00 Juerd rafl: pong
20:00 amnesiac joined perl6
20:00 rafl Juerd: How about the perl6 @ froscon idea?
20:00 putter fglock: :)
20:00 Juerd rafl: I think we should ask Audrey, who knows everyone :)
20:01 rafl Juerd: So, go ahead :-)
20:01 Juerd Hm?
20:01 Juerd Why me? :)
20:02 rafl 'cause it was your idea to ask her :-)
20:02 penk joined perl6
20:02 Juerd It was TimToady's idea to write Perl, but it couldn't have become the same thing if other people hadn't contributed.
20:02 Juerd I'll ask her, but not for this reason.
20:02 Juerd :)
20:03 rafl Juerd: And because I'm not capable of thinking very well right now.
20:03 Juerd Neither am I.
20:03 Juerd I'm listening to a PPI talk atm
20:03 gaal putter: there is a COMPILING_PRELUDE thing, I don't understand what it does though.
20:03 gaal sorry, network problems
20:03 rafl But I'm sure I've a better reason.
20:03 Juerd Heh
20:03 rafl Juerd: Oh, Amsterdam.PM? Sounds interesting..
20:03 rafl Juerd: Take your time. You can ask afterwards ;-)
20:03 Juerd Yes, of course, amsterdam.pm
20:04 webmind rafl, it kinda is actually
20:04 Juerd The world still turns even if you're not there :)
20:04 webmind h/win 37
20:04 webmind oops
20:05 rafl Juerd: The world turns quite much for me right now.
20:05 Juerd rafl: use less 'drugs'? :)
20:06 rafl That's unimplemented right now.
20:10 gaal Juerd: can you /msg?
20:10 Juerd gaal: Apparently not
20:11 svnbot6 r9330 | fglock++ | iterator_engine - grammar changed to use #comments - putter++
20:11 justatheory joined perl6
20:15 putter gaal: COMPILING_PRELUDE is set by util/gen_prelude, read in Pugs.hs, setting a haskell "global variable";), which is read in Run.hs's initMumble.  which does the prelude loading, or not, depending on if it is set, or not.
20:18 fglock what is the syntax to use perl5 regex inside a rule?  like 'rule xxx { (?#some-regex) }'
20:20 putter For a while I wandered down a path of using a big Prelude.pm ifdef.  Have pugs _always_ include Prelude, and have Prelude itself do the COMPILING_PRELUDE check and return either the full prelude, or a mini-one for -C.  But when precompiling Prelude.pm... you are in a third case.  you dont want to play it twice, as prelude, and as code file.  several options.
20:20 putter But I punted at that point.
20:22 putter fglock: [:perl5(1)...]   (and the usual, or :perl5::, or...)
20:22 putter [:perl5 should be fine]
20:23 penk joined perl6
20:23 PerlJam Isn't it :P5 too (or did I imagine that?)
20:23 putter (as long as its a /x p5 regexp :)
20:23 PerlJam ?
20:23 putter yes
20:23 penk left perl6
20:23 fglock putter: like ' rule xxx { :perl5(.*) } ' - so :perl5 is sort of a rule node?
20:23 putter though since the set of inside and outside :foo's is distinct, perhaps :P5 is available outside rx:P5// but not inside.
20:24 gaalx joined perl6
20:24 putter no,
20:24 PerlJam fglock: rule xxx { :perl5 .* }
20:24 PerlJam fglock: in yours, .* would be a parameter to the :perl5 attribute.
20:24 putter :perl5 , like :i :mumble, is a modifier.
20:24 putter block scoped
20:24 putter [:i(1) This CoDe Is CaSe insensiteive ]
20:25 FurnaceBoy joined perl6
20:25 meppl joined perl6
20:25 fglock putter: got it - thanks
20:25 putter sensitive [:i insensitive] sensitive
20:25 putter ah
20:25 chris2 joined perl6
20:27 putter the "lots of different ways to end the modifier" are just because, when whitespace is significant, you may want to smash your text against the modifier.  without breaking the modifier.  rx:w/foo/  rx:w/:i foo/ (oops, space), so rx:w/:i::foo/ or rx:w/:i(1)foo/
20:27 gaal putter: sorry, I just don't know. need audrey :/
20:28 PerlJam rx:w/:i::foo/ still bothers me though
20:28 putter maybe you can use ":" instead of "::" too.  "::" works because its a block cut, so if your starting your block with the modifiers, well, having a block cut at the beginning of the block is a noop.
20:28 putter gaal: :)
20:29 putter There are several paths which could be pursued, which look like they will at least do a workaround.  I just reached my "enough hours of my life spend on this" threshold.
20:30 putter PerlJam: rx:w/:i()foo/ ?
20:30 putter oh, no.  um,
20:30 putter no, yes, that's right.  though may confuse one when counting parens. :)
20:31 fglock putter: re circularity: ' rule perl5 { \: perl5 <perl5_regex> } '
20:31 PerlJam putter: :: works in only a limited number of cases.  Somehow  I think people will get the impression that it'll work anywhere.
20:31 penk joined perl6
20:31 * putter pauses, ponders,
20:31 putter lol :)
20:32 putter PerlJam: last I heard, :modifiers can only appear at the beginning of blocks.  so "::" _can_ be used everywhere to terminate modifiers. ;)
20:33 penk joined perl6
20:33 putter fglock: that's very neat.  that's a T-shirt.
20:33 PerlJam oh, maybe I need to update my mental model then.
20:33 fglock :)
20:35 nothingmuch joined perl6
20:36 FurnaceBoy wb
20:36 fglock putter: after you compile that statement, you can change it to: ' rule perl5_regex { \: perl5 [ :perl5 .*? ] } '
20:36 fglock s/[]/()/
20:37 fglock putter: that's the plan, actually
20:39 * putter pauses to ponder again...
20:39 * Kattana really needs to take some time to take a good look at what you two are up to
20:39 * fglock compiles and see what happens
20:39 putter shouldnt that be
20:40 PerlJam Kattana: by that time, they'll be off to something else  ;)
20:40 putter ' rule perl5 { \: perl5 [ :perl5 .*? ] } '
20:41 fglock putter: it needs to capture the regex (source code), in order to compile it
20:41 putter and ' rule perl5_regex { :perl5 .*? } '
20:41 Kattana mhmm, cant you just redefine it later on using itself? i did something like that recently.
20:42 fglock Kattana: yes - but it is later on in 'time', not in 'later in the same text'
20:42 fglock Kattana: circular programs 'evolve'
20:42 putter it wasnt the captures which I found strange, but the change in tokens (\:perl5 moving from rule perl5 to rule perl5_regex)
20:43 fglock putter: yes - I changed the code while I was talking to you
20:44 fglock putter: do I have to code the second form as (using a block): rule perl5_regex { \: perl5 [ :perl5 (.*?) ] }
20:45 fglock putter: is the [] block needed?
20:45 fglock putter: or, I could code it in pure perl5
20:53 putter you need a block, [] or (), to provide a beginning of block place to use the :perl5 modifier.  oh wait,
20:53 putter here you could just say
20:54 putter oh, I'm getting that distinctive meta-circularity headache...
20:56 putter rule perl5_regex :perl5 {:perl5\s*\[:perl5(.*?)\]}
20:56 putter or
20:57 putter oops, that should have been
20:57 putter rule perl5_regex :perl5 {:perl5\s+(.*?)}
20:57 putter or
20:57 putter left perl6
20:57 avar how do I do sub new { shift; my $self = { foo => 'bar', bar => 'zar', @_ }; bless $self; } in p6?
20:58 avar @_ being the little magic;)
20:58 putter joined perl6
20:58 putter "windows #%$!@$#$@#$ ^W *$#!!"
20:59 fglock avar: ask putter :)
21:00 putter ok, couple of issues.  :perl5 is kind of an odd modifier, because once it's passed, you're in another language (p5 re).  so /:perl5::/  would mean rx:perl5/::/  which is not quite what's desired
21:00 avar putter: !!!_?1231?_!"312u57123495
21:00 avar ;)
21:02 putter same thing with /:perl5 foo/.  that's  rx:perl5/ foo/.   so...  I think :perl5 when used internal, needs its brackets, rather than being able to abreviate with a p6 re modifier "those cant be brackets!" parse fail.
21:03 kanru2 joined perl6
21:03 putter so, /:perl5(1)thisisnowp5/   hmm.  not sure if the 1 is needed.  i think it's the default.  so  /:perl5()foo/
21:03 putter your choice of brackets.  /:perl5<>foo/
21:05 putter soo, back to the question, modifiers can only begin at the start of the rule, or start of a group (capturing or non-capturing).  (i should have been saying "group" rather than "block")
21:05 fglock putter: does 'rule xxx rx:perl5{foo}' works? that's good enough for me - I don't need to mix rule/regex yet
21:05 putter yes, works.
21:06 putter or 'rule xxx rx{:perl5<>foo}'
21:07 fglock putter: which you find better?
21:07 putter oh, well, that second one, mine, would have to be  'rule xxx rx{:perl5<>[foo]}'  if you want arbitrary foo. just so you didnt get  /:perl5<>iamperl5| but i am p6/
21:07 p5evalbot joined perl6
21:07 * azuroth wants honey chicken
21:07 putter azuroth just made putter very hungry.
21:08 putter re better,
21:08 azuroth bwaha, it's like an infectious disease.
21:08 putter ...
21:08 azuroth the honey-chicken wanting is, I mean...
21:08 FurnaceBoy Dal Makhani!
21:08 FurnaceBoy ...heating
21:09 azuroth dal makhani? butter chicken? :'(
21:09 putter ... I'm torn.  there is something nice about a rx:perl5/pat/  having the pat entirely in p5.  but then again,
21:09 * FurnaceBoy loves Indian vegetarian bachelor-meals
21:10 buu_ joined perl6
21:10 putter I kind of prefer rules to have their semantic bits internal.  rule x {:words ...}  rather than rule x :words {...}.
21:10 putter so, no immediately accessible preference. ;)
21:11 fglock putter: ok - I'm implementing the first one :)
21:11 putter :)
21:11 putter sounds good
21:11 Supaplex as long as it doesnt exasperate any hemorids, it's ok
21:12 Supaplex ;o)
21:12 buu_ is now known as buu
21:14 putter The thing I love about XS programing, is you can have a mistake, present for a long time, with everything working.  Then you make some trivial change, which has no-local effects sufficient to alter the conditions which were keeping the mistake symptomless, and suddenly boom, code which has been "working" forever suddenly isnt.  weeeeeee.
21:14 FurnaceBoy c'est la guerre
21:15 fglock putter: that's not really XS specific
21:15 FurnaceBoy :)
21:16 Supaplex take buu's love life for example
21:16 Supaplex </tease>
21:17 azuroth I like that analogy
21:17 Supaplex I had a hard time resisting :) hehe
21:17 FurnaceBoy LOL!!
21:17 avar XS?
21:18 azuroth cross language?
21:18 azuroth "external sub"
21:18 avar oh yes
21:18 avar because using E an an acronym is punishable by death or something
21:20 azuroth capital E, R and Ls aren't allowed
21:21 Supaplex P!
21:23 FurnaceBoy I guess you wouldn't hold with X -> trans either then avar?
21:23 putter fglock: true.  I've just gotten unused to the complex-C-program approach of using "Segfault!" to say "typo/thinko somewhere/anywhere".
21:23 FurnaceBoy haha
21:24 FurnaceBoy as one does
21:24 avar FurnaceBoy: ?
21:25 FurnaceBoy Xlate -> translate, etc. and other prefixes
21:26 FurnaceBoy X -> Extensible
21:26 FurnaceBoy X -> Cross
21:27 putter avar: XS is perl5's C extension api.
21:28 nothingmuch has anyone seen audreyt recently?
21:28 FurnaceBoy yesterday
21:28 SamB joined perl6
21:28 nothingmuch recently == in the last few hrs
21:29 putter nothingmuch: audreyt was last seen ~21 hours ago
21:29 nothingmuch grazie
21:29 azuroth wow, C++ from perl seems surprisingly simple - much better than I imagined
21:29 putter perhaps having fun touristing
21:30 nothingmuch GPW is over right? is she going back to .tw?
21:30 nothingmuch azuroth: using C++ inside Perl?
21:30 nothingmuch are you using Inline?
21:30 azuroth no, XS. I'm just looking at how it's done
21:30 avar somebody take away damian conway's keyboard, his code is horrible
21:31 nothingmuch avar: i agree =/
21:31 nothingmuch very hard to subclass
21:31 putter re audreyt's travel plans... no idea.  land, urban.  net. :)
21:31 avar nothingmuch: just generally a nightmare to read
21:31 nothingmuch putter: when you see her..
21:31 nothingmuch ;-)
21:31 * avar trying to debug Text::Balanced
21:31 nothingmuch avar: yeah, that too
21:31 nothingmuch NEXT especially
21:31 nothingmuch never tried that one
21:32 nnunley joined perl6
21:33 azuroth I'd better head to TAFE
21:34 avar nothingmuch: AND THE ONLY COMMENTS HE WRITES ARE IN ALL CAPS
21:34 nothingmuch avar: never noticed that ;-)
21:34 nothingmuch avar: you should look at some Catalyst code
21:34 nothingmuch every now and then you see something like
21:35 justatheory joined perl6
21:35 azuroth heheheh. that's so weird.
21:35 nothingmuch local $NEXT::ffoooooo; # NEXT doesn't allow recursive redelegation
21:35 dduncan joined perl6
21:35 avar nothingmuch: it's true of Text::Balanced at least
21:36 * nothingmuch probably found the comments not helpful enough and just blocked them out
21:36 nothingmuch comments rarely help me
21:36 nothingmuch not even my own
21:36 pasteling "avar" at 85.197.228.236 pasted "fleh" (44 lines, 865B) at http://sial.org/pbot/16205
21:37 avar trying to debug this
21:38 avar it takes a regex which I escaped but it doesn't like question marks
21:41 nothingmuch avar: try the Regexp::Common hack
21:42 avar I'd rather use something std
21:42 avar although I could just copy the regex;)
21:44 svnbot6 r9331 | pmurias++ | handling of command line option using Getopt::Long(if installed)
21:44 svnbot6 r9331 | pmurias++ | --print-program and --print-ast work now if no ... is used
21:46 nothingmuch avar: look in ??{ } for perlre
21:50 FurnaceBoy_ joined perl6
21:50 putter one thing one can do when looking at painful code is to ask "what is wrong here?  do I ever do it?  what can I do to avoid it?  can I generalize the problem?  do I ever do the generalized wrongness?  can I think of a pithy maxim for describing/avoiding this problem?"... ;)
21:52 avar I mainly just scream very loudly and kill something
21:52 avar I used to rip out my hair too, but now I don't have any
21:52 putter different approaches to learning exist...
21:55 mauke_ joined perl6
22:02 justatheory joined perl6
22:02 pmurias fglock: is it ok to temporarly make ... warn?
22:03 fglock pmurias: temporarily = ok :)
22:04 pmurias thanks
22:05 pmurias i'll commit the match printing option, and go to sleep
22:08 pmurias expect some kewl options tommorow :), good night
22:08 svnbot6 r9332 | pmurias++ | ... now warns instead of dies
22:08 svnbot6 r9332 | pmurias++ | --print-match
22:09 mauke_ is now known as mauke
22:12 vborja joined perl6
22:18 bd__ joined perl6
22:30 spinclad re where audreyt next, there's a hackathon at leo's coming up
22:36 justatheory joined perl6
23:05 svnbot6 r9333 | fglock++ | iterator_engine - the grammar can be extended using perl5 regexes
23:05 svnbot6 r9333 | fglock++ | like 'rule word rx:perl5{^([_[:alnum:]]+)}' - not much tested yet
23:05 svnbot6 r9334 | putter++ | Regexp-ReplaceEngine.pm - Can create qr//'s whose results are managed by a perl sub{} callback.  And regexp creation /foo/ can be intercepted, in a scoped way (ie, a sub "regexp_compile" will be used, if one is visible).  Next step is cleanup and stress testing, using a version of the regexp-spike.  Should be able to run the whole p5 regexp test suite.
23:06 larsen joined perl6
23:07 fglock pmurias: cool! you can include Perl6Grammar::header() - and then the compiled source code should be runnable!
23:08 fglock s/source code/code/
23:09 putter hey fglock.  this is fun :)
23:10 fglock putter: you may write p6 modules that run in perl5, or run perl 6 in plain mod_perl (some day)
23:14 putter could be.  at the moment, I'm just trying to fast-forward history-which-never-was.   ie, if p5 regexps had been reentrant, or one could have easily swapped engines, then folks could have long ago done rules in p5 syntax. and operator parsers.  and p6 rules.  and...
23:16 fglock putter: will you try to run PGE on it? (you've got some days until apr 1st)
23:17 fglock putter: with the new rs:perl5 and a few tweaks, the parser can get quite usable (in speed)
23:17 fglock s/rs/rx/
23:18 putter no.  oh, I may clone the pge operator parser in p5.  but otherwise it its pure perl (well, plus XS;).
23:18 Shachaf left perl6
23:18 putter re speed, yes.  we may end up with two nice ways to do it.
23:19 putter which beats the heck out of zero.  which has long been our state.,
23:19 fglock putter: instead of PGE, you can use the iterator_engine rule parser :)
23:19 putter yes
23:20 putter it's the going back and forth to parrot/C-or-pir land which seems currently painful to the point of implausible.
23:20 putter so ie (*shudder* at the name;)  on p5 would be great. :)
23:20 fglock you can use Inline::Parrot :)
23:21 putter fglock: 2004.  we cant even use 2 month old versions.
23:21 fglock putter: I'm ok with renaming - feel free :)
23:21 putter :)
23:21 rantanplan_ joined perl6
23:21 fglock putter: re 2004: my fault - I got involved in Pugs
23:21 putter lol
23:22 putter sooo np
23:22 srcmaster joined perl6
23:22 fglock it might even work
23:22 putter which?
23:22 fglock (Inline::Parrot)
23:23 fglock it is a small-ish program, should be easy to fix by someone up-to-date on Parrot
23:23 putter you think something written against a two year-old version of parrot is going to work...?!?
23:23 putter ah, fixable, no doubt.
23:23 fglock It's very simple, I think it could have few problems
23:24 beppu joined perl6
23:24 fglock but it's not very fast - it is not linked, it uses IPC
23:24 putter few... like the calling conventions changing n times since...;)
23:25 fglock putter: tomorrow I'll have to review my milestones - they get outdated too fast
23:26 putter :)
23:26 putter is there anything you wish you had from p5 regexps which you dont?  that would make ie easier?
23:27 fglock putter: would review a problem in iterator_engine.p6 ? (something on using code references in closures)
23:28 putter sure
23:28 fglock putter: it doesn't work in pugs - a variable is not updated, I think - it might be being copied instead of "shared"
23:29 fglock see the last "not ok" in iterator_engine.p6t
23:29 putter looking...
23:30 fglock look for '$alt' in iterator_engine.p6 - this variable doesn't seem to be working properly
23:30 fglock 'pugs iterator_engine.p6t'
23:31 * putter tries to find a copy of pugs not too broken to use... (no use() pun intended)
23:31 fglock the idea is, you define an anon sub, and then call itself recursively
23:32 fglock putter: the error happens both in old and new pugs (for some value of new)
23:33 fglock if it works for you, it may be a problem in my pugs :)
23:33 putter I'm getting Can't find iterator_engine.p6.pm in @*INC?
23:34 fglock that's the line 'require 'iterator_engine.p6';' - but it works for me
23:34 fglock is it wrnog?
23:34 putter ok.  (I symlinked the file.)  so...
23:34 putter not ok - /[a|c]+ab/ with backtracking
23:34 putter this one?
23:36 fglock yes - there are many comments because I was trying to trace the problem - it seems to be in the sub 'ruleop::greedy_plus'
23:37 fglock I'm trying to do something like 'my $alt; $alt = sub { $alt() };'
23:38 fglock but I think the $alt inside the sub is not set
23:41 fglock sorry, need to go now
23:41 FurnaceBoy_ is now known as FurnaceBoy
23:41 fglock I'll backtrack, err, backlog
23:42 putter np.
23:42 fglock left perl6
23:55 justatheory joined perl6

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

Perl 6 | Reference Documentation | Rakudo