6.2.11 released! | pugs.blogs.com | pugscode.org | pugs.kwiki.org | paste: sial.org/pbot/perl6 | < audreyt> my fingers juxpatosed Set by nothingmuch on 24 February 2006. |
|||
gaal | rehi | 00:01 | |
hermatize | how do i make my own rss feed | 00:04 | |
audreyt | |||
audreyt | hermatize: study 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
|
|||
jisom keeps getting warnocked often | 00:08 | ||
00:08
penk joined
|
|||
huhlig | Can't use string ("0") as an ARRAY ref while "strict refs" in use at StarMUD/Network.pm line 52. | 00:13 | |
mrr? | |||
my $ready_sockets = IO::Select->select( # Select which handles have data | |||
$server->{'connections'}, | |||
undef, undef, 0); | |||
foreach my $socket (@$ready_sockets) { | |||
what did I miss | |||
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 | ||
audreyt | huhlig: I'm quite sure ->select isn't to be used as that | 00:15 | |
you maybe want ->can_read | |||
jisom: oh. the first then. | |||
huhlig | audreyt: | 00:16 | |
jisom | ok, so that's 100% for, 0% against :) | ||
huhlig | audreyt: can_read? | ||
mrr | |||
hmm ok | 00:17 | ||
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 | |
( jisom: ^ ) | |||
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:21 | |
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. | ||
jisom | well perl6'll run on parrot so it's somewhat relevant :) | 00:23 | |
huhlig | oook | ||
interesting issue | |||
audreyt | whew. finally finished journal entry #0 | ||
still ~4 to go | |||
but I'll sleep now :) | |||
audreyt waves | |||
huhlig | the select runs... and it almost seems to freeze | ||
TimToady | sweet dreams | ||
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? | ||
TimToady | no, still bling. | ||
stevan_ lets TimToady have some of his bling :P | |||
audreyt imagines TimToady going "bling bling" | |||
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) | ||
TimToady | It's already known that disabling peep() causes a non-functional perl, alas... | ||
audreyt | oh? *surprised* | ||
TimToady | peep doesn't just, er, peep... | 00:26 | |
audreyt | totally nonfunctional, or just not bug-for-bug compatible? | ||
gaal: btw, _lotsa_ kudos for lending me the Wittgenstein Biography book | 00:27 | ||
it enabled me to have a much firmer grasp of this perl6 thing :) | |||
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. | ||
audreyt | (it's amazon.com/gp/product/0140159959/ for curious folks.) | 00:28 | |
00:29
wilx joined
|
|||
audreyt | TimToady: ahh. because mad kicks in before that | 00:29 | |
so we can (presumably) denull the nulls using mad info alone? | 00:30 | ||
(reconstruct the nulled nodes, i.e.) | |||
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 | ||
cool. in other news, Nicholas and I both built the nomad tree just fine :) | |||
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. | ||
audreyt | the one you worked on after I received the snapshot | ||
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. | ||
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 :) | ||
awwww | 00:33 | ||
TimToady | and Lewis decided to skip class for 4 days in a row without telling us... | ||
so I've been a bit preoccupied... | |||
audreyt | (mm that sounds familiar) | ||
TimToady | shall I just diff with the .tgz I sent before? | 00:34 | |
audreyt | hmm, I thought it's just the single nomad program? | ||
(you can also tar up the entire thing and put it to feathre) | |||
TimToady | i'll have to check to see if I tweaked anything else. | ||
stevan_ | audreyt: why are we not using p5->p5 to serialize the MM to YAML? | ||
audreyt | I've put a tree up for Nicholas and others at perlcabal.org/~autrijus/tmp/p55.tbz | ||
stevan_: err what does p5's opcode tree have to do with the MM? | 00:35 | ||
stevan_ | true | ||
sorry,.. got excited while reading the journal :P | |||
audreyt | TimToady: so maybe diff against that? :) | ||
TimToady | ok | ||
audreyt | but in any case, it's 1:35 now and I'll crash -- see you tomorrow :) | 00:36 | |
TimToady | tata | ||
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. | ||
jisom | you know, Jonathan's .NET to PIR could help with getting perl5 on parrot... | ||
audreyt | TimToady++ # p55 is truly exciting, the more I look at it | ||
*waves* | |||
FurnaceBoy | n8 | ||
00:36
penk joined
|
|||
Daveman | :p | 00:37 | |
stevan_ | putter, fglock: does pXie run macros? | 00:38 | |
putter | yes :) | 00:39 | |
stevan_ | cool | ||
putter | Regexp-ReplaceEngine... it's *alive*. ;) first light. | 00:40 | |
stevan_ | putter: any examples of macro usage? | ||
putter | ?? - you just accessed the full depth of my knowledge on the topic. | 00:41 | |
stevan_ | cool, I will dig then | 00:42 | |
putter tries to resist spiking to perl -w -MRegexp::WithRules -e 'sub foo{qr/bar/} "foobar"=~/foo<foo>/'... | 00:44 | ||
00:45
justatheory joined
|
|||
stevan_ | putter: where is the pXie stuff in the tree? | 00:48 | |
putter | stevan_: good question, let's see... | ||
misc/pX/Common/iterator_engine ? | 00:49 | ||
stevan_ | ah,,.. thanks | ||
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:53 | |
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:56 | ||
I've hit ENOMOREHOURS on this process. Sorry. | 00:57 | ||
01:00
mako132_ joined
|
|||
pasteling | "stevan" at 67.186.136.119 pasted "p6 class -> p6 MOP calls macro sketch" (82 lines, 1.8K) at sial.org/pbot/16191 | 01:08 | |
stevan_ | putter: if you have a sec,... please sanity check that paste | ||
putter | back. looking... | 01:22 | |
stevan_ | putter: I think my syntax is likely wrong | 01:23 | |
stevan_ wonders if putter got lost? | 01:27 | ||
01:28
lampus joined
|
|||
putter | always. let's see... $.bar? note that module names can be quite rich, so this is only a subset. (pause) | 01:30 | |
probably need to (err, is santity check a typo check?) | 01:31 | ||
looks broadly sane. | |||
stevan_ | putter: I think twigils are slowly falling out of style | ||
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 | ||
putter: you mean actually running the code? | |||
putter | yes | ||
stevan_ | oh,.. I didnt even try that yet :) | ||
putter | are accessors o.a($val) or o.a = $val ? | 01:33 | |
ie, lvalue subs | |||
stevan_ | I dont know actually | ||
stevan_ checks S12 | |||
01:33
stevan_ is now known as stevan
|
|||
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)... | ||
stevan | putter: well Class.isa(Package), so its just assigning a subpackage off the main one | 01:36 | |
putter | yeah, but class isa type too, which package isnt... | 01:37 | |
stevan | hmm... that is an issue | ||
well I think maybe we will need both | |||
namespace binding and then some kind of type binding | 01:38 | ||
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 | |
makes sense | |||
stevan | I am just fiddling here,.. either technique is fine with me,.. | 01:40 | |
but does the overall expansion idea make sense? | |||
putter | can has $.x = initialization code; ? | ||
yes | |||
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. | ||
stevan is having trouble expanding the putter macros | |||
its been a long day | |||
putter | s/handling/argument handling/ | 01:42 | |
sorry, can has() declarations take an initializer? | |||
01:43
justatheory joined
|
|||
putter | ie, re handling, might need to do macro class is parsed (/:w class mumble \{ <statements>+ \}/) {...} | 01:43 | |
01:44
bill_n1vux joined
|
|||
stevan has to run, later all & | 01:44 | ||
putter | none of my macro interpolation attempts | 01:45 | |
ah ok, bye | |||
are working, eg | |||
./pugs -e 'macro m($b){ q:code {my $x=3; {{{$b}}} } } my $x=2; m {say $x}' | |||
to see how binding works out | |||
sorry if i was impenetrable. long day indeed. | 01:47 | ||
TimToady | putter: re has taking initializer, do you mean P6 or pugs? P6 specs initializers that are applied at BUILD time... | 01:51 | |
don't know if pugs supports it yet... | |||
putter | thanks. just helping stevan explore the sanity of his strawman. (hmm, there's an image) | 01:54 | |
TimToady | k | 01:55 | |
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:56 | |
TimToady | Er, have the appropriate amount of fun. | 01:57 | |
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. | 01:59 | |
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. | ||
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 / | |||
/ foo (??{ qr_returning_bar(32) }) / | |||
jisom | oh yeah, that's evaled, not compiled... | 02:02 | |
too many complications | 02:04 | ||
putter | that sort of characterizes this whole area - too many complications. | 02:05 | |
hmm, that sort of characterizes software engineering. | |||
FurnaceBoy | life? | ||
putter | civilization? | ||
jisom | sounds like technology in general | ||
quantum physics? | 02:06 | ||
putter | lol | ||
FurnaceBoy 's brain hurts | |||
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"? | ||
or teleportation, which Einstein called "that spooky thing quarks do" | 02:08 | ||
FurnaceBoy | that's a good explanation! | ||
:-) | |||
putter | I'm thinking more along the lines of "how much of an atomic bond is classical electrostatics". | ||
stevan | putter: yes the "is parsed()" bit would need to be there | ||
FurnaceBoy hums, 'how much is that doggy in the window' | |||
stevan only skimmed the macro spec | 02:09 | ||
02:09
dduncan left
|
|||
jisom awaits comments on p6i about his macro expansion proposal | 02:09 | ||
putter | p6l or p6i? | 02:14 | |
jisom | p6i | 02:15 | |
I don't read p6l, just recently got ghc and pugs to compile | |||
internals are more fun :-D | 02:16 | ||
putter | :) | ||
"Regexp::EngineReplace", or some better name? | 02:17 | ||
Regexp::EngineHook | |||
Regexp::Hook | |||
jisom | Regexp::Snafu | 02:18 | |
what's it do? | 02:19 | ||
putter | guess that's a vote for need a new name :) | 02:20 | |
jisom | switch from pge to pcre to perl5? | ||
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... | ||
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). | ||
jisom | needs a new name | ||
putter | ideas? | 02:22 | |
jisom | well simple p5 regex can use pge... | ||
Regexp::Run | |||
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 | |
hmm | |||
jisom | there's a c pge? | 02:24 | |
putter | :) | ||
parrot == C | |||
jisom | pge is in pir | ||
no c for pge | |||
putter | pir == parrot == C | ||
no? | |||
jisom | perl == perl vm == c? | 02:25 | |
same exact concept | |||
putter | Thus most of Regex::ReplaceEngine (or whatever) is written in Inline::C / XS. | 02:26 | |
jisom | scary | ||
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? | ||
putter | search.cpan.org/~ltoetsch/parrot-0.4.2/ | ||
jisom | those are config/build modules | 02:29 | |
once parrot's built, it doesn't use perl | |||
putter notices the modules which looked exciting are listed under "Documentation". :( eg, PGE::Match | 02:30 | ||
an no one has yet gotten parrot to the Inline::Parrot stage? | |||
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 | |
you mean embed PIR in perl5? | |||
putter | search.cpan.org/~fglock/Inline-Parr.../Parrot.pm though it's dated before a lot of calling convention changes. | 02:32 | |
jisom | eh, calling conventions got updated again today ;) | 02:33 | |
but not for pir | |||
only pasm | |||
putter | search.cpan.org/~fglock/Inline-Parr.../parrot.pm | ||
jisom | "The current version does not work with arrays, hashes, references." | ||
I don't think it'd like working with coroutines then | 02:34 | ||
but | |||
if the iteration is done in pir | |||
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? | ||
jisom | this is the first I've heard of Inline::Parrot | ||
putter | :) | ||
jisom | what's the basic thing that the Regexp::EngineSwitcherthing does? with regard to implementation | 02:39 | |
02:40
justatheory joined,
DesreveR joined
|
|||
jisom | eww....it uses parrot's preprocessor | 02:43 | |
eh, sometime I might hack it to get it working.......failing 200% of most tests, and 142.86% of one isn't good | 02:46 | ||
02:51
vborja joined
|
|||
putter | R:ES ;) ... good question... | 02:52 | |
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:56 | ||
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:57 | ||
Very good question. I think I'll package things differently as a result :) | 02:58 | ||
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:00 | |
putter | yes. that seems to be the universal approach. | 03:01 | |
jisom | p6rule_compile = compreg "PGE::P6Rule" | ||
rulesub = p6rule_compile(pattern) | |||
match = rulesub(text) | |||
that's the basic layout... | |||
just to make it easier to be able to add pge into it as well | |||
03:01
dduncan joined
|
|||
putter | ok, new packaging. Regexp::QR , a base class for anything which wishes to be used with =~, split, etc, | 03:02 | |
and Regexp::... i dont know, compile hook... what are // etall called? regexp literals? | 03:03 | ||
jisom | regex delimiters? | 03:04 | |
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 | ||
well, programmer simplicity | |||
I don't know | |||
putter | "Regexp Quote-Like Operators" | 03:06 | |
Regexp::OperatorHook | 03:07 | ||
jisom | oh just call it Regexp::PatternCompile | ||
something | 03:08 | ||
I don't know | |||
jisom never thought about what // were called | |||
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:09 | |
03:10
awwaiid joined
|
|||
jisom | Regexp::PassBuck | 03:11 | |
? | |||
putter | lol | ||
jisom | sounds like what it's doing | ||
:) | 03:12 | ||
robkinyon | www.capitolhillblue.com/blog/2006/0...ibili.html | 03:14 | |
If you're in the US, that's just creepy | |||
If you're not, have a good laugh on us | |||
:-/ | |||
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:17 | |
robkinyon | It's "different" and, as everyone knows, "different" == "bad" and "terrorism" == "bad", therefore "different" == "terrorism" | 03:18 | |
jisom | maybe someday they'll actually define terrorism so they have to stop using it so much | 03:19 | |
robkinyon | why would they do that?! | 03:20 | |
it's *much* more fun this way ... | |||
jisom | they won't | ||
if they did, then all those Iraqi insurgents attacking U.S. soldiers wouldn't be terrorists anymore | |||
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:22 | ||
03:23
samv_home joined
|
|||
diotalevi | Is the //, defined-or operator still named "err" in perl6? | 03:26 | |
03:29
samv_home is now known as samv,
samv is now known as mugwump
|
|||
FurnaceBoy | no,, even if you're not in the US it's creepy. for the same reason '1984' is creepy. | 03:30 | |
jisom | which part of 1984? the fact that it could be true? | 03:32 | |
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 | ||
Steve_p | I thought "Hot For Teacher" was very disturbing | ||
03:33
justatheory joined
|
|||
jisom | I like that song! | 03:33 | |
Steve_p jumps to Panama | 03:34 | ||
I haven't built pugs in so long, I can't remember if its dor or err | 03:35 | ||
...of course you could write a rule to make it the way you want | 03:36 | ||
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 | |
speaking strictly of p5 where 'err', the defined-or operator actually exists which is some custom patched stuff and bleadperl. | |||
jisom | it's in perl for freebsd, the // operator | 03:39 | |
diotalevi means the string "err" to refer to the operator. | |||
Not the operator itself. | |||
jisom | oh | ||
03:41
bill_n1vux left
|
|||
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? | ||
Steve_p | If you mean several keys that have a reference to the same value, yes | 03:45 | |
...and in Perl 5 too. | |||
huhlig | how? | ||
diotalevi knows a straightforwrd p5ish way but if there's a more magical p6 way... dunno. | |||
huhlig | or a document to show how | 03:46 | |
diotalevi | Store the same reference at all the keys. | ||
huhlig | so $hash->{'A'}=$data | 03:50 | |
$hash->{'B'}=$data | |||
TimToady | diotalevi: I think the P5 "err" patch is botched. It should only be recognizing the keyword when an operator is expected. | ||
huhlig | $hash->{'C'}=$data | ||
? | |||
doesnt that still use 3 times the storage? | 03:51 | ||
TimToady | (much like the x operator) | ||
diotalevi hasn't noticed any particular actual breakage, it's the *name* that's the complaint. | |||
Steve_p | Actually, its been un-botched I believe | 03:52 | |
TimToady | Ok, I was only looking at 5.9.2 sources... | ||
diotalevi | That err, erl, error are all words that go together. From a different language but the meaning is obvious. | ||
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 | ||
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. | ||
Steve_p | err...5.9.3.. | ||
03:55
kakos joined
|
|||
TimToady | "err" is currently illegal when an operator is expected. | 03:56 | |
(where currently means 5.8) | 03:57 | ||
Just as you can have sub x even though there's an 'x' operator. | |||
diotalevi | I was referring to more to blead/p6. | ||
diotalevi is resisting but hasn't actually thought of any place he'd use "err"/"dor" that isn't already some exception-alike branch. | 03:59 | ||
TimToady | I would certainly not change from err to dor 'cause I think 'dor' is | 04:00 | |
dorky. | |||
diotalevi | Maybe it's because "X defined or Y" is just a different phrase in my head than "X error Y". | ||
TimToady | If we could come up with something else entirely, maybe. | ||
robkinyon | def | ||
TimToady | Well, in SNOBOL it was "fail" or some such. | ||
robkinyon | def == "define" or "default" | ||
or, just plain old "default" | 04:01 | ||
my $x = $y default 'foo'; | |||
TimToady | 99% of the time it's gonna be used to catch a failure. | ||
robkinyon | 99% of the time, it's gonna be used to set a default | ||
particularly on the args for a subroutine | |||
diotalevi | rob, you'd use the higher precedence form // for that. | ||
04:01
diotalevi is now known as jjore
|
|||
robkinyon | for failures, i'll be using //, not err | 04:01 | |
jjore | For failures you'd use //? | 04:02 | |
TimToady | Yes, // is for defaults | ||
04:02
mk_ joined,
mako132_ joined
|
|||
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 | ||
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 | ||
robkinyon | or maybe i just don't program like you guys | ||
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! | ||
robkinyon | jjore: I just don't write code like that | 04:04 | |
Steve_p | ...or send bug reports to pjcj | ||
jjore | You just said you always type C< open( ... ) || ... > instead of C< open ... or ...>. Didja mean that? | ||
robkinyon | no, i didn't | 04:05 | |
robkinyon needs more ice cream | |||
i use C<open .. or ...> | |||
jjore didn't think you were trying to be that cross-grain with the precedence. | |||
robkinyon | so, that would turn into C<blessed() err ''> | 04:06 | |
hmm ... that was a really odd experience. I just realized I was soft-sold on // and err | 04:08 | ||
04:09
justatheory joined
|
|||
jjore | You musta sold it to yourself then. | 04:11 | |
Good thing you had one in stock. | |||
Steve_p blinks | 04:12 | ||
robkinyon | LOL | ||
No - I mean the whole dor/err/name discussion | |||
04:13
mk_ left
|
|||
robkinyon | if the low-precedence version is 99% for errors, then it makes sense to call it "err" | 04:13 | |
if the one used for defaults will almost always be the operator, then it doesn't matter what the low-precedence name is | |||
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. | ||
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" | ||
robkinyon | Plus, in Perl6, couldn't you just change the parser to read 'dor' as 'err'? | ||
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 | |||
robkinyon | I don't think it's fair to complain about a keyword when ignoring the most powerful feature of Perl 6 | ||
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 | ||
Steve_p | I'm reminded of the orignal Bourne shell code | 04:16 | |
err original | |||
robkinyon | I'm figuring that one of the first big CP6AN modules will be how to alias keywords | ||
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 | ||
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 | ||
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. | ||
huhlig | hmm | ||
is there anyway to stuff a lc in there first? | |||
Steve_p | No, then it would not be XML | 04:21 | |
robkinyon | why do you need case-insensitivity? | ||
jjore | huhlig, the office XML party line is that if you don't follow XML rules strictly, it can't be called XML. | ||
robkinyon | seems like the two parties reading this file should be agreeing on something as simple as case | ||
huhlig | stupid users | ||
jjore | er, s/office/official/ | 04:22 | |
04:24
kakos joined
04:29
FurnaceBoy_ joined
|
|||
huhlig | which is faster for access, hash or array? | 04:37 | |
FurnaceBoy_ | not much between them, when I've measured | 04:38 | |
huhlig | ok cool | ||
FurnaceBoy_ | I measured a 256 element array of consecutive values. for wildly different structures, ymmv. | 04:39 | |
huhlig | hmm ok | 04:40 | |
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 | ||
*hash access | 04:50 | ||
huhlig | I am trying to bundle my data together so it can be passed as a single unit... | ||
jjore | So pass a reference. | ||
huhlig | a reference to what | 04:51 | |
jjore | To whatever is convenient. | ||
huhlig | there are a couple of RedBlack Trees, a hash and a scalar | ||
jjore | So a hash with those things, named, is probably nice. | ||
huhlig | ok | ||
but access time wont be that bad | 04:52 | ||
FurnaceBoy_ | yeah, it really depends on what your keys are. | ||
huhlig | I basically have hash(1)->key(4)->rbtree(300k) | ||
FurnaceBoy_ | in my case they were just integers, so a hash and array were perfectly interchangeable | ||
huhlig | (1) number of keys | ||
ahh | |||
these would be words or numbers | 04:53 | ||
objects, players, and so on | |||
this is instead of using "global variables" or would I be better accessing $main::variable | |||
04:54
avar joined
|
|||
huhlig | ? | 04:54 | |
04:56
amnesiac joined
|
|||
huhlig | FurnaceBoy_, jjore? | 04:56 | |
FurnaceBoy_ | that's not my area. :) | 04:57 | |
FurnaceBoy_ passes the buck | |||
huhlig | oh | ||
jjore? | |||
huhlig nudges jjore | 05:01 | ||
jisom? | 05:03 | ||
jisom | ? | ||
huhlig | this is instead of using "global variables" or would I be better accessing $main::variable | ||
using a hash passed to almost every function | |||
hash ref rather | 05:04 | ||
jisom | passing a hash ref to every function sounds like object oriented code | ||
huhlig | this is mostly linear | ||
05:05
stevan joined
|
|||
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 | ||
so would I be better addressing $main::var | 05:06 | ||
? | |||
jisom | I don't know your design or code | ||
huhlig | I can send it? | ||
which makes more sense? | 05:07 | ||
on a performance scale | |||
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:08 | |
huhlig | ok | 05:09 | |
FurnaceBoy_ | agreed | ||
make it work right first, fast second (within reason) | |||
oh, | |||
and throw away the first prototype ;-)) | 05:10 | ||
(if you have to) | |||
huhlig | heh | 05:12 | |
Im on like the 30th prototype | |||
jisom | then you need to make a good design first | ||
jjore | sounds like you aren't clear on 1st principles. Texts like Code Complete are good for that. | 05:13 | |
jjore went off to prepare stuff in the kitchen. | 05:14 | ||
05:15
Cryptic_K joined
05:17
Khisanth joined
|
|||
huhlig | Code Complete? Onlne book? | 05:22 | |
more like I keep stalling an getting bored | |||
or frustrated | |||
its been the same prototype persay | 05:23 | ||
just rewritten | |||
FurnaceBoy_ | try simplifying it | ||
get something small to work | |||
huhlig | I am | 05:24 | |
I am working on gettin subsystems to work now | |||
FurnaceBoy_ | okay, well keep going :-) | ||
huhlig | and I am building modularity | ||
FurnaceBoy_ | we'll be your cheerleaders | ||
huhlig hugLIG rah RAH RAH | |||
huhlig | *snicker* | 05:25 | |
FurnaceBoy_ | :) | ||
huhlig | so it would be best just to address the vars... do I just address as $main::var = blah | 05:26 | |
huhlig wants to make sure the syntax is right | 05:27 | ||
Steve_p | Grrr...where's klortho when you need him! | 05:28 | |
05:28
drbean_ joined
|
|||
jisom | $main::foo, $::foo, $Package::foo, etc... | 05:29 | |
Steve_p | advice from klortho #11917 applies | ||
huhlig | ok | 05:30 | |
05:30
szabgab left
|
|||
huhlig | whats that | 05:30 | |
Steve_p | groups.google.com/group/comp.lang.p...d6d9c5cef2 | 05:31 | |
huhlig | ahh | ||
ok | |||
FurnaceBoy_ | WOW! | 05:35 | |
That is ... BEAUTIFUL. | |||
omg. | |||
Keywords: afro, chiefdom, rosary, winy | 05:36 | ||
so Mark Jason Dominus == klortho ? | |||
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_ | :-)) | ||
er.... | |||
you can't get a computer to do something you don't know how to do yourself. | |||
except, maybe , by accident. | |||
05:38
justatheory joined
|
|||
jisom | knowledgable guess | 05:38 | |
FurnaceBoy_ | that works. | ||
I suppose one can even learn that way. In some fields it's called experimental technique? | |||
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 | ||
jisom | "Looking for a compiler bug is the strategy of LAST resort. Ā LAST resort." unless you work on an alpha compiler | 05:40 | |
I don't agree with #11915, because I use print statements as my debugger... | 05:41 | ||
Steve_p | "If you have `some weird error', the problem is probably with your frobnitzer." is the one that I love | 05:42 | |
That and "#11948 Perhaps your veeblefitzer is clogged." | |||
jisom | "Never catch a signal except as a last resort." does that include SIGINT? | 05:43 | |
trapping ^C is useful sometimes | |||
like cleanup | |||
:-D | |||
"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:45 | ||
FurnaceBoy_ | actually I've never had any issues with gcc on Alpha... ? | 05:47 | |
do you mean compaq c? | |||
jisom | huh? | ||
FurnaceBoy_ | oh Alpha. | ||
as in before Beta. | |||
jisom | as in before release canidate | ||
FurnaceBoy_ | I thought you meant Alpha as in 64-bit microprocessor. | ||
jisom | no, I mean things like pugs and parrot | 05:48 | |
FurnaceBoy_ | hahahahah | ||
:-)) | |||
jisom | where compiler bugs are expected | ||
well not so much in parrot..... | |||
FurnaceBoy_ | <FurnaceBoy_>so Mark Jason Dominus == klortho ? | 05:49 | |
jisom | #11950 | 05:50 | |
05:52
Alias_ joined
|
|||
Alias_ | audreyt: ping? | 06:37 | |
audreyt: ping me back when you get in. I'll be around for 6-8 hors | |||
and hours, too | |||
06:47
huhlig22 joined
06:49
GeJ joined
06:51
drrho joined
06:58
Draconit_ joined,
Draconit_ left
07:12
fandango joined
|
|||
huhlig22 | ok I am doing something stupid | 07:13 | |
while ( my ($key, $value) = each($main::helpfiles) ) { print "$key => $value\n"; } | 07:14 | ||
$main::helpfiles is a hash | |||
jisom | %::helpfiles | ||
huhlig22 | ok | ||
ayrnieu | huhlig - %::helpfiles.pairs | 07:15 | |
huhlig22 | .pairs? | ||
ayrnieu | oh, is this perl5? | ||
jisom | he's using perl5 | ||
huhlig22 | ok | ||
umm... | 07:16 | ||
while ( my ($key, $value) = each(%::helpfiles.pairs) ) { print "$key => $value\n"; } | |||
Type of arg 1 to each must be hash (not concatenation (.) or string) at database.pm line 43, near "pairs) " | |||
jisom | no .pairs | ||
huhlig22 | ... | ||
ayrnieu | .pairs is perl6 | ||
jisom | not in perl5 | ||
huhlig22 | ahh | ||
$main::helpfiles is a hashref | 07:17 | ||
jisom | %$::helpfiles | ||
huhlig22 | I need to dereference it first dont I | ||
ok | |||
yipiee! | |||
help files work | |||
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
|
|||
evalbot_9314 | OUTPUT[1 => 2 3 => 4 ] undef | 07:17 | |
huhlig22 | that seems... yucky | 07:18 | |
ayrnieu | what does? | ||
huhlig22 | the perl6 format | ||
much less clean | |||
ayrnieu | what about it seems yucky? | ||
huhlig22 | ?eval my %h = <1 2 3 4>; | 07:19 | |
evalbot_9314 | {("1" => "2"), ("3" => "4")} | ||
huhlig22 | ahh ok | ||
ayrnieu | that is analogous to this perl5, huhlig: my %h = qw/1 2 3 4/ | ||
huhlig22 | seems obfuscated | ||
ayrnieu | it's not, really. | ||
07:19
avar joined
|
|||
ayrnieu | and this is just an example, with fake data... | 07:20 | |
jisom | RPN is hard to read if you don't know RPN | ||
huhlig22 | rpn? | ||
ayrnieu | reverse-polish notation. | ||
huhlig22 | reverse perl notation | ||
ahh | |||
ayrnieu | 1 2 3 5 * + + | ||
huhlig22 | rpn I have always found to be redundant | ||
and now unneccessary | |||
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 | ||
shric | and it's easier to write a parser for rpn | ||
huhlig22 | true | 07:22 | |
jisom | infix is older, and "easier", but rpn's more precise | ||
ayrnieu | more efficient in usertime ways, too, as on the HP48G (and on), but nevermind. | ||
jisom | and remember, bc was first implemented on top of dc | 07:23 | |
07:23
nothingmuch joined
|
|||
ayrnieu | RPN was never a simple efficiency hack: FORTRAN predated Forth, after all. | 07:24 | |
nothingmuch | hola | 07:26 | |
nothingmuch didn't know fortran was rpn | |||
gaal | morning! | ||
jisom | well there's a big difference between fortran, forth, and lisp........ | ||
ayrnieu | nothingmuch - it wasn't. | ||
jisom | forth is rpn | ||
nothingmuch | but in forth rpn was chosen because it eliminates all need for look ahead | ||
huhlig22 | I thought RPN was like this | 07:27 | |
4 5 + 5 - 10 + | |||
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. | ||
huhlig - sure. | |||
nothingmuch | yes, that's rpn | ||
jisom | 4 5 + 5 - 10 + is the more human kind, 4 5 10 + - + is the same thing really | ||
well | 07:28 | ||
huhlig22 | ahh | ||
jisom | uhhh | ||
something | |||
ayrnieu | jisom - Stack underflow | ||
nothingmuch | ayrnieu: there is a direct quote from mr. Moore saying that the reason was simplicity | ||
jisom: not the same thing at all | |||
10 5 4 5 + swap - + | |||
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 | ||
Alias_ | rpn? | ||
jisom | my mind's not working great at the moment for rpn | ||
ayrnieu | oh, jisom has *two* errors! | ||
nothingmuch | nuh uh, - is not, errr | ||
what's the word | |||
ayrnieu | (shame) | ||
nothingmuch | not like + and * | ||
it's not the same on either side | |||
ayrnieu | !communicative | ||
nothingmuch | yes | ||
shric | commutative | 07:30 | |
ayrnieu | That's something about Forth, though -- it is a language very quick to punish its users. | ||
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 | ||
ayrnieu | !forth languages will mainly let you write ugly code. | ||
forth will break your brain, first. | |||
nothingmuch | that's why abstraction and code reuse are so important in forth | ||
jisom | if I remember the quote..."you can write bad fortran in any language" | ||
nothingmuch | no word is supposed to be more than 2-3 ops | 07:32 | |
huhlig22 | hmm | ||
jisom | you mean ansi forth? cause you can always write your own | ||
nothingmuch | jisom: "$x programmers will write $x in any language" for qw/forth fortran assempley/; | ||
jisom | pir? :-D | ||
nothingmuch | we don't have any yet ;-) | 07:33 | |
jisom is a pir programmer | |||
Alias_ | Well, you can LITERALLY write it :) | ||
GeJ | morning folks | 07:34 | |
nothingmuch | hola | 07:36 | |
07:43
Aankhen`` joined
|
|||
jisom | en.wikipedia.org/wiki/PL/C a fun language to debug.....if it existed anymore | 07:43 | |
Alias_ | I shudder to think how you debug Haskell | 07:44 | |
nothingmuch | Alias_: you don't ;-) | ||
Alias_ | Then what, you just test it very very carefully? :) | ||
And implement proof-carrying | |||
or something | |||
nothingmuch | i'm not serious | 07:45 | |
Alias_ | Well, specifically, I wonder how you do non-trivial debugging | ||
nothingmuch | but the type system and the non-mutable semantics make most of the code easier to debug | ||
Alias_ | And it wouldn't surprise me to know that haskell is extremely hard to debug at an advanced level | ||
ayrnieu | alias - you don't! :D Feature! :D | ||
nothingmuch | in the sense that if you trace occasionally you can get a pretty good idea of what's going on | ||
Alias_ | fair nuff | ||
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. | ||
Alias_ | I'm a big fan of the Perl debugger as a faster alternative to both unit testing and print statements | ||
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. | ||
Alias_ | jisom: You only have to learn to use the debugger once | ||
ayrnieu | it takes nothing to learn how to use the debugger, really. | ||
nothingmuch doesn't like the perl debugger.... it's been too flakey when I really really needed it | |||
jisom | per language | ||
nothingmuch | and ever since I'm prejudice, i guess | ||
Alias_ | jisom: That value being 1 in the case of "the Perl debugger" | ||
nothingmuch | err, that's not the right word | ||
Alias_ | nothingmuch: Accepting the perl debugger is a little hacky at times is hard | 07:48 | |
nothingmuch: I find it annoying at times too | |||
huhlig22 | gah!!! | ||
Alias_ | nothingmuch: But then I wouldn't know how to write a better alternative, so I shut up :) | ||
huhlig22 thinks the C guys can be a$$holes | |||
nothingmuch is generally happy with:a | |||
a. being careful | 07:49 | ||
b. warn Dumper( $wtf ); | |||
ayrnieu | huhlig - the ##c backlog seems a bit crazy. | ||
huhlig22 | heh | ||
07:49
iblechbot joined
|
|||
huhlig22 | ok, mabey you guys can answer the same question | 07:49 | |
is a data storage methodology question | |||
Alias_ | nothingmuch: Have you tried using Devel::Dumpvar instead of Dumper? | ||
huhlig22 | its a | ||
nothingmuch | nope, i'll give it a look | ||
huhlig22 | ok | 07:50 | |
Alias_ | It's a reimplementation of the debuggers data structure printer | ||
has some bugs still, let me know if you find any, or have any patches to contribute | |||
07:50
justatheory joined
|
|||
huhlig22 | object = struct/hash containing details of a item in virtual space | 07:50 | |
room = struct/hash containing details of defined space in virtual space | |||
how would it be best to store information | |||
keep the location of an object on the object itself... | 07:51 | ||
lending to 100% unique instance of every object | |||
ayrnieu | the #perl6 backlog is now also a bit crazy. | ||
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 | ||
ayrnieu is that a subtle way of saying shut up? | 07:52 | ||
ayrnieu | huhlig - no. | ||
nothingmuch | huhlig22: normalize your DB | ||
use indirection | |||
huhlig22 | nothingmuch: be more specific | ||
how so | |||
ayrnieu | huhlig - it's a overt way of saying "???" :-) | ||
nothingmuch | keep an index of objects in the rooms | ||
huhlig22 | ok | ||
nothingmuch | but don't "contain" the objects in the rooms | ||
ayrnieu | huhlig - ah, designing a MUD? | ||
nothingmuch | en.wikipedia.org/wiki/Database_normalization | ||
huhlig22 | ayrnieu, basically a rewrite of rom in perl | 07:53 | |
with alot more code unity and clarity | |||
and more features | |||
nothingmuch | huhlig22: ovid had a bit of fun implementing this stuff | ||
search.cpan.org/~ovid/ | |||
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? | ||
nothingmuch | hmm | ||
maybe not | 07:54 | ||
Alias_ | because that limits you to n-1 relationships? | ||
nothingmuch | i think just in his journal | ||
Alias_ | (if that's ok though, sure!) | ||
huhlig22 | ayrnieu: coord system | ||
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. | ||
huhlig22 | this mud not only has vnum based rooms for description | ||
it uses 3 coord systems to emulate space | |||
nothingmuch | huhlig22: ayrnieu's approach also works... the idea is the same though | ||
basically, make sure your organization makes it so that duplication is not a natural thing | 07:55 | ||
because it's simpler to model uniqueness than duplication in that model | |||
ayrnieu | why do you want coordinate systems? Space is already defined by 'exits'... | ||
huhlig22 | ayrnieu Im talking coordinates for somewhere in excess of 100k^2^2 coordinates | 07:56 | |
err wait | |||
no 100k^3^3 | |||
so 100k^9 coordinates | |||
nothingmuch | 1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 | ||
jisom | so 100k^9? | ||
huhlig22 | yea | ||
nothingmuch | ? | ||
ayrnieu | lots of space and not a lot of designers to make it interesting, but OK. Making an outer-space mud ? :-) | ||
nothingmuch | i hope this is sparse ;-) | 07:57 | |
huhlig22 | ayrnieu SciFantasy | ||
think spelljammer/eberron/Dragonstar | |||
ayrnieu | ?eval 100**9 | ||
evalbot_9314 | 1000000000000000000/1 | ||
huhlig22 | planets are still vnumed | ||
jisom | ?eval (100 * 1024) ** 9 | ||
evalbot_9314 | 1237940039285380274899124224000000000000000000/1 | 07:58 | |
huhlig22 | but space itself contains planet objects, systems, and ships | ||
nothingmuch | huhlig22: use.perl.org/~Ovid/journal/27481 | ||
jisom | that's a lot of bytes | ||
huhlig22 | well its stored as 6 -100,000 - 100,000 numbers | ||
ayrnieu | ?eval 10 ~ 0x10 | ||
evalbot_9314 | "1016" | ||
huhlig22 | sector x y z::x y z | ||
ayrnieu | ?eval 10 ~ (0x10) # ?? | ||
evalbot_9314 | "1016" | ||
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? | ||
ayrnieu | PoppaVic doesn't speak that way, nothingmuch. | ||
nothingmuch is only venting some of his own steam ;-) | 08:00 | ||
huhlig22 | nothingmuch: in ##c | ||
jisom | ?eval 10.ashex | ||
jisom wonders | |||
evalbot_9314 | Error: No such method in class Int: "&ashex" | ||
jisom | ok | ||
huhlig22 | ? | ||
nothingmuch | ?eval :16 10 | ||
evalbot_9314 | Error: unexpected "1" expecting term postfix, operator, postfix conditional, postfix loop, postfix iteration, ";" or end of input | ||
nothingmuch | aaah | 08:01 | |
i'm guessing S29 is not fully implemented ;-) | |||
huhlig22 | so I can store objects in a room enviroment | 08:02 | |
how do I store the objects that exist in space? | |||
08:02
jisom_ joined
|
|||
nothingmuch | ayrnieu: for the record, every time i had a question to ask instead of shutting up PoppaVic would schold me | 08:03 | |
and I think the problem is not with me, because i never got crap from anyone else in the world for my questions | |||
ayrnieu | that's OK, I just mean that he doesn't speak that way. Or hasn't when I've noticed. | 08:04 | |
as for him conveying a similar point... | 08:05 | ||
nothingmuch | one sec, gotta send a fax | ||
huhlig22 | ok guys and gals | 08:08 | |
tell me if Im insane | |||
two reference lists... | |||
one for rooms | |||
vrooms | |||
one for objects | 08:09 | ||
a 3rd list for locations of all objects | |||
in the rooms | |||
make it two lists, one for repop, one for perm(no repop) | |||
would this be plausable? | |||
nothingmuch | so | 08:11 | |
08:11
beppu_ joined
|
|||
nothingmuch | huhlig22: you're optimizing for a search that says "given room X, these are the objects therein?" | 08:11 | |
huhlig22 | yes | ||
using a Redblack tree | |||
nothingmuch | this is not all in memory, right? | 08:12 | |
huhlig22 | or something better if you know of it | ||
yes all in memory | |||
nothingmuch | aaaaaaaaaaaaaaaaaaaah | ||
huhlig22 | memory hefty program I know | ||
nothingmuch | just FYI, postgres has spatial indices | ||
08:12
ghenry joined
|
|||
huhlig22 | interface is too slow | 08:12 | |
nothingmuch | you could prefetch one level of indirection, and cache in memory | ||
huhlig22 | I tried that in both postgres and mysql for another project | ||
nothingmuch | ah | ||
that's very odd | 08:13 | ||
huhlig22 | had to make a 300x52 spreadsheet | ||
each cell was an individual search | |||
takes it about an hour | |||
and its searching on like 2 pieces of info | 08:14 | ||
a number and a date | |||
08:14
KingDiamond joined
|
|||
huhlig22 | the rest of the perl just prints html so I know its not that | 08:14 | |
08:14
huhlig22 is now known as huhlig
|
|||
nothingmuch | well | 08:17 | |
that was a throughput thing | |||
this is a latency thing | |||
with larger chunks of prefetching you could have probably optimized the spreadsheet | |||
and with pre-resolving of adjacent rooms you can probably optimize the MUD thing | 08:18 | ||
but nevermind | |||
huhlig | hmm | ||
nothingmuch | make sure that you have a constant way to get form the room to an object | ||
huhlig | nothingmuch: only other drawback... tell me if im wrong | ||
nothingmuch | if you are going to use a coordinate system then you'll need to be able to index that | ||
huhlig | it requires extra software I may not be able to install on a shell system | ||
nothingmuch | e.g. with 3 trees | ||
yes, that's a problem | |||
huhlig | 3 trees? | 08:19 | |
how would I set that up | |||
nothingmuch | well, it's just 3 trees | ||
huhlig | x->y->z? | ||
nothingmuch | pointing to shared leaves | ||
oh, no | |||
orthogonally | |||
x tree, y tree, z tree | |||
huhlig 's eyes are crossing | |||
nothingmuch | you search all three | ||
and intersect | |||
huhlig | ok | ||
nothingmuch | it's difficult stuff | ||
huhlig | oh | ||
nothingmuch | annoying to pull off | ||
huhlig | this part is easier in C | 08:20 | |
nothingmuch | but it's the only way to not force you to scan everything | ||
Set::Object might help here | |||
huhlig | ok | ||
nothingmuch | you could also use sparse arrays to actually use your coordinate system as indexes | ||
look into judy arrays | |||
on sourceforge, i think | 08:21 | ||
huhlig | 100k^9 in size though? | ||
nothingmuch | then you can store a sparse matrix | ||
well, no | |||
you pay very little overhead for the empty slots | |||
judy.sourceforge.net/ | 08:22 | ||
huhlig | is there a perl version | 08:23 | |
or am writing my own | |||
nothingmuch | not likely ;-) | ||
if i were you i'd make an XS interface or something | |||
Array::Judy | |||
there are other interfaces to arrays with a C backend | |||
you can learn from them | |||
huhlig | ?eval sqrt(100000^9) | 08:24 | |
evalbot_9314 | 3.0 | ||
huhlig | eh? | ||
3^2 = 100000^9? | |||
jisom_ | ?eval e**(pi * i) + 1 | ||
evalbot_9314 | Error: No such method in class Num: "&e" | ||
jisom_ | ?eval exp(1)**(pi * i) + 1 | 08:25 | |
evalbot_9314 | Error: No such sub: "&i" | ||
huhlig | didi I do something wrong? | ||
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 ^ | ||
?eval sqrt(100000 ** 9) | |||
evalbot_9314 | 3.1622776601683792e22 | ||
huhlig | ahh | 08:27 | |
so its 2^3.1622e22 | |||
jisom_ | ^ is exclusive bitwise or | ||
huhlig | even if its 1 bit per cell | 08:28 | |
I still ate up all my memory | |||
a few times over | |||
nothingmuch | sorry, back | ||
err, no | |||
huhlig | ?eval sqrt(100000 ** 9)/8 | ||
nothingmuch | i don't know of a document | ||
evalbot_9314 | 3.952847075210474e21 | ||
huhlig | heh | ||
nothingmuch | basically there are two approaches you can take though | ||
index on orthogonal dimensions and then intersect | 08:29 | ||
and always start the search from the smallest dimension for efficiency | |||
if the result set is small enough iterate it and filter instead | |||
huhlig | 3,952,800,000,000 GB memory | ||
I dont have that much | |||
nothingmuch | why do you need that much memory? | ||
oh | |||
they are not 1 bit per cell | |||
huhlig | Array::Judy | 08:30 | |
nothingmuch | they are sparse | ||
as in | |||
with holes | |||
huhlig | hmm | 08:32 | |
ok, so I need to feed something x,y,z,a,b,c and it will feed me everything around it | 08:35 | ||
actually | 08:36 | ||
its not 10^9 | |||
its only 10^3 | |||
the mud can track everything in a sector | |||
nothingmuch | what's abc? | 08:37 | |
how far? | |||
like, the cube of the room? | |||
i'd just like to note that this is exactly what spatial indexing is already doing and that we're reinventing right now | |||
and that mysql/postgresql are not the only ways to do it =) | |||
but... | |||
yes | |||
what it does is try to determine which dimensions is the best to try and search engine | |||
s/engine/in/; | |||
freudian slip ;-) | |||
and then either intersects all the possible values from this slice | |||
err, filters, not intersects | |||
or intersects with the results of the next best dimensions | |||
huhlig | I killed nothingmuch | 08:38 | |
hmmm | 08:44 | ||
how to do this | |||
I wonder | 08:49 | ||
could I just do this | |||
08:49
elmex joined
|
|||
huhlig | hash->{x}->{y}->{z} | 08:50 | |
ayrnieu | $hash{"$x:$y:$z"} | 08:57 | |
Alias_ | hmm.... I wonder if spatial indexing is in geopostgres | 08:58 | |
huhlig | $spawn->{'HR'}->{$x}->{$y}->{$z} = $reference | ||
<huhlig> $spawn->{'rnum'}->{$rnum} = $reference | |||
will this work | |||
effectively? | 08:59 | ||
08:59
Alias_ left
|
|||
huhlig | which is faster ayrnieu?> | 08:59 | |
$hash{"$loc:$x:$y:$z"} | |||
or what I was proposing | |||
ayrnieu | um, why do you have $loc in there? | 09:02 | |
huhlig | to differentiate the multiple types | 09:03 | |
ayrnieu | types of what? | ||
huhlig | HS, RS, and NS are x y z | ||
ayrnieu | what types do you have? | ||
huhlig | VR is $snum | ||
err vnum | |||
ayrnieu | what do those mean? | ||
huhlig | well game terms, Hyperspace, Realspace an Netspace | ||
VR is Virtual room | |||
the three space methods are done by x y z coords | 09:04 | ||
vnum rooms are connected via mapping | |||
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. | ||
so, $space{hyper}{"$x:$y:$z"} | |||
huhlig | why | ||
buu already tried that on another app | 09:06 | ||
too damned slow | |||
ayrnieu | 'guessing at the kind of access you want'. | ||
buu | huhlig: I seriously doubt that. | ||
huhlig | well it takes an hour to fetch a 300x52 spreadsheet | ||
ayrnieu | You do much talking about how you'd like to structure your data, but little about how you intend to access it. | ||
buu | No it doesn't. | ||
eval: 300 * 52 | |||
p5evalbot | buu: Return: 15600 | ||
huhlig | ayrnieu: it is accessed at two points | ||
ayrnieu | why would you want to 'fetch a 300x52 spreadsheet', anyway? | ||
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. | ||
buu | 4000 more won't take that long. | ||
huhlig | 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. | ||
huhlig | no | 09:10 | |
it will be directed | |||
only objects that exist on the coord plane will need to be used | |||
at one of 3 times | |||
object update | |||
object respawn | 09:11 | ||
and a user command | |||
09:15
typonaise joined
09:20
typonaise joined
09:24
typonaise joined
09:27
typonaise joined
09:32
nothingmuch joined
|
|||
rgs | who's the contact for the pluggable regexp engine for P5 somebody was hacking on ? | 09:45 | |
rgs pings audreyt who might know. | 09:46 | ||
09:46
hb_ joined
09:56
blm_ joined
10:09
awwaiid joined
10:10
nnunley joined
10:20
nothingmuch joined
10:36
avar joined
10:52
ghenry joined
10:54
kanru joined
11:03
chris2 joined
11:22
blm_ is now known as blm
11:26
ghenry joined
11:52
rep is now known as Dott_Rep
11:53
Dott_Rep is now known as rep
11:58
nivrrex joined
11:59
nivrrex left
12:06
penk joined
12:07
uszr` joined
12:29
blm is now known as two_bob,
two_bob is now known as two_bobhelp,
two_bobhelp is now known as two_bob
12:30
two_bob left
12:43
nivrrex joined
12:44
nivrrex left
12:57
Limbic_Region joined
|
|||
Limbic_Region | audreyt ping | 13:01 | |
Juerd | Heh, hurrah for identd | 13:03 | |
www-data@feather :) | |||
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:04 | ||
I still don't have a good monitoring system set up, so I depend on users for reports :) | 13:05 | ||
13:05
kisu joined
|
|||
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 | ||
Juerd | Limbic_Region: Great, thanks in advance :) | 13:07 | |
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 ;) | |||
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:08 | |
when the feather one stopped working, I assumed something had changed and that at was b0rk | 13:09 | ||
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:10 | ||
13:12
fglock joined
|
|||
fglock | Parser metacircularity today! | 13:14 | |
unless bugs|meetings | |||
lypanov | ummmmmetacurcularity....ummm | 13:15 | |
nothingmuch | fglock: which level of metacircularity? | 13:16 | |
fglock | nothingmuch: all grammar written in p6 | 13:19 | |
13:20
kolibrie joined
13:24
nivrrex joined
|
|||
nothingmuch | fglock: parse rule syntax with rule syntax? | 13:25 | |
fglock | nothingmuch: yes, the grammar includes the whole rule syntax | ||
nothingmuch | yay | 13:26 | |
what does the rule AST look like? | |||
fglock | for some value of "the whole" - only the parts that I've implemented :) | ||
nothingmuch | does it parse + etc as higher order rules accepting subrules as parameters? | 13:27 | |
fglock | nothingmuch: can you give an example? | ||
Juerd | Limbic_Region: I see. The saying something didn't reach me, unfortunately | 13:28 | |
nothingmuch | (foo)+ | ||
Juerd | Limbic_Region: Thanks for trying | ||
nothingmuch | this is matching the + rule | ||
13:28
iblechbot joined
|
|||
nothingmuch | with the foo rule as a parameter | 13:28 | |
13:28
nivrrex left
|
|||
fglock | nothingmuch: yes - <foo>+ for subrules, (foo)+ for constant | 13:29 | |
13:29
mako132_ joined
|
|||
nothingmuch | ofcourse | 13:29 | |
13:29
gaal joined
|
|||
nothingmuch | the constant is a subrule | 13:29 | |
i'll take a look later, i'm very interested | 13:30 | ||
fglock | nothingmuch: a link - svn.openfoundry.org/pugs/misc/pX/Co...prelude.p6 | ||
nothingmuch | fglock: okay | ||
fglock | nothingmuch: this is the grammar - right now I'm working on joining this with the rule syntax | ||
nothingmuch | yummy | ||
fglock++ # works with my grand master plan | 13:31 | ||
please document this in accordance Hierarchy.pod | |||
fglock | nothingmuch: Hierarchy.pod? | ||
nothingmuch | fglock: please have a quick look =) | 13:32 | |
it's a doc tree brain dump | |||
sorts out p5 doc in the new tree | |||
fglock | nothingmuch: ok | ||
nothingmuch | and also details missing docs for p6 internals | ||
... like the rules domain specific language ;-) | |||
13:33
bsb joined
|
|||
gaal | bsb: hi | 13:35 | |
fglock | pmurias: please run tests before commits :) | 13:37 | |
nothingmuch | hola bsb | ||
svnbot6 | r9315 | fglock++ | iterator_engine.p6 - added tests; 1 failure (Pugs bug? - it looks like variables in a closure are a copy?) | ||
fglock | re r915: 'pugs iterator_engine.p6t' | 13:40 | |
svnbot6 | r9316 | fglock++ | iterator_engine/p5hacks.pl - added '1;' | ||
bsb | hi gaal, nothingmuch | 13:47 | |
13:48
Qiang joined
|
|||
svnbot6 | r9317 | fglock++ | iterator_engine/p6primitives.p6 - 'if', '+', '*' | 13:48 | |
rafl | Hello | 13:52 | |
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? | ||
in any case, I was tracking down why zlib was still b0rk on Win32 and gaal pointed me to you | 13:54 | ||
I found the problem and audreyt thinks she might have fixed it (I am in the process of verifying ATM) | 13:55 | ||
and in case the humor was missed - I was only joking about the life part ;-) | |||
bsb | hmm, thanks gaal... | ||
It's ok, I was being rejuvenated at the Dead Sea | 13:56 | ||
gaal | irc over voice technology | ||
bsb | What was the problem? | ||
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:57 | |
bsb | Ah, I didn't write those probes but know roughly what's going on | 13:58 | |
Don't have win32 myself though | |||
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 | |
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 | |||
I found the Makefile.PL probe that compiled a small haskell program with zlib linked | 14:00 | ||
verified that it worked by hand and went huh? | |||
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
|
|||
svnbot6 | r9319 | fglock++ | iterator_engine/p6compiler-non_circular.pl - keep the old compiler | 14:02 | |
r9319 | fglock++ | around, for historical reasons | |||
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 | ||
bsb | weird | ||
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 | |
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 | |||
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 | ||
because they won't | |||
bsb | She's always going with solution 3. Maybe we should renumber our suggestions | 14:05 | |
Limbic_Region | heh | ||
14:05
hexmode joined
|
|||
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:05 | |
so who knows when it will finish | 14:06 | ||
robkinyon | LR: When you get a chance, are you going to write up how to compile Pugs on Cygwin? | 14:07 | |
Limbic_Region | robkinyon - um, no as I don't know how to do that | 14:08 | |
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
|
|||
svnbot6 | r9320 | fglock++ | iterator_engine/p6compiler.pl - Metacircular Grammar !!! | 14:20 | |
fglock | metacircular Rules coming soon... | ||
14:21
FurnaceBoy joined
14:22
mako132_ joined
|
|||
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 :) | ||
FurnaceBoy | lucky you! | 14:26 | |
fglock | Yesterday I was planning a quick hack - this one is the real thing | ||
FurnaceBoy | I couldn't sleep, so I wrote a 14-line B-tree | ||
(C) | |||
jjore | What is misc/pX? | ||
fglock | FurnaceBoy :) | ||
FurnaceBoy wishes he were joking | |||
worked first time though. | |||
integral | 14 lines? neat | ||
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? | ||
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 | ||
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) | ||
FurnaceBoy | LOL | ||
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
|
|||
Limbic_Region | sure - which email address do you want me to send it to? | 14:29 | |
jjore | twists@gmail | ||
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
|
|||
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. | |||
fglock | jjore: nice! | ||
nothingmuch | Limbic_Region: i can add it quick if you still haven't found it | ||
jjore | Cuz this stuff isn't documented near well enough where a clueful person can make sense of it. | ||
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 | ||
jjore | Cuz the checkout is really opaque. | ||
Limbic_Region | nothingmuch - no, let me - this will help me ingrain it | ||
nothingmuch | oops, too late | 14:33 | |
put this in your bookmarks though: rt.openfoundry.org/Foundry/Project/...?Queue=270 | |||
jjore | fglock, oh I found that much deeper README but it didn't have a "What is this?" description in it. | ||
nothingmuch | it's a direect link to the members admin page | ||
jjore | Wait... which README did I find? | ||
The one I first found didn't have one, now I've one that does. | 14:34 | ||
Ah! | |||
Limbic_Region | jjore - the commit bit is on its way | ||
jjore | misc/pX/Common/README vs misc/pX/Common/iterator_engine_README | ||
I don't even know how I accidentally opened the second because I would have looked for anything matching ^RE... | 14:35 | ||
nothingmuch | & home | ||
jjore is a dork. | |||
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 | ||
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 | ||
jjore: if you have old files around, it may be better to delete everithing and do a new checkout | 14:37 | ||
jjore | My checkout is frum... yesterday? Sunday? | 14:38 | |
Limbic_Region | jjore - "old" | ||
err | |||
"old" is an extremely relative term around here | |||
fglock | jjore: we do ~20 commits a day | 14:39 | |
jjore gasps and falls over. | |||
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:40 | |
fglock adds rules rules to the grammar - very carefully | 14:41 | ||
jjore | Just a plain-old Linux box, LR. | ||
My NetBSD-Sparc was because p5 runs on it and it's SMP. | 14:42 | ||
I don't like the machine much. It's very noisy. | |||
14:42
mako132_ joined
|
|||
Limbic_Region | jjore - if you want, you could always get an acct on Feather | 14:42 | |
jjore | Feather? | 14:43 | |
Limbic_Region | yep | 14:44 | |
let me get you a link to explain all about it | |||
in a nutshell, a server hosted by Juerd's compafor the sole purpose of p6 development | 14:45 | ||
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 ;) | ||
jjore | ah, 1 see. | 14:47 | |
Limbic_Region | groups.google.com/group/perl.perl6....4d5049487b | 14:49 | |
sorry it took a while to get the link, my machine is S-L-O-W ATM | |||
14:49
chris2 joined
|
|||
TimToady | LR: compiling pugs are we? :-) | 14:49 | |
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 | |
but that would be equivalent to volunteering | |||
TimToady | heaven forfend. | ||
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! | ||
TimToady | LR: er, congrats! Have the appropriate amount of fun... | ||
lypanov | hehe | ||
Limbic_Region: congratz again :D | |||
Limbic_Region | thanks | 14:52 | |
TimToady | fglock: also congrats. Saw your rules rules in the BL. | ||
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. | ||
Limbic_Region | TimToady - what's the skinny on p5 -> p5 if you have a second or two? | ||
more specifically, how close is it to becoming ready for collaboration? | 14:54 | ||
TimToady | Er, in .il it took about 4800 seconds to explain... | ||
Ah. | |||
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... | ||
Limbic_Region | k - thanks TimToady | ||
TimToady | Yes, but it would be nice if you and Patrick ended up with the same set of rules. :-) | ||
Limbic_Region | not only the same set of rules as an end result - working together you might both get there faster | 14:56 | |
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:57 | |
TimToady | How are you going to handle new operators of new precedence, frinstance. Patrick has put a lot of work into that. | 14:58 | |
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. | 14:59 | ||
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:00 | |
TimToady: the plan is a work in progress | 15:01 | ||
TimToady | fglock: that's fine. As if P6 design isn't also a WIP. :-) | ||
fglock | WIP? | ||
TimToady | Work In Progress. | ||
fglock | :) | 15:02 | |
TimToady | s/isn't/is/ | ||
Anyway, I understand. Keep up the good work! | |||
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; | ||
fglock | anyway - right now, there is a working compiler, which you can extend using whatever Perl 6 it already knows to handle | ||
TimToady | Oh, you mean Perl::Critic with real semantic information instead of just a document? | 15:03 | |
Limbic_Region | yes | ||
TimToady | Sure, don't see why not. | ||
Limbic_Region | and thanks for remembering the module name - I couldn't | ||
lypanov | umm | ||
any info on p5 -> p5 online? | |||
TimToady | Can also be incestuous with p5-to-p6 to instruct on which things | ||
will be difficult to translate. | |||
Limbic_Region | lypanov - I think audreyt's last blog entry linked to TimToady's presentation | 15:04 | |
15:04
iblechbot joined
|
|||
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... | ||
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? | ||
lypanov is interested | |||
jjore | Perl::Critic recently got C<my ... if/unless/while/until/for ...> detection, Limbic_Region. fwiw. | ||
p5 of course. | 15:06 | ||
Limbic_Region | jjore - yes, I believe as a result of feedback at the Monastery | ||
jjore | No, I filed a bug on it. | ||
TimToady | The blog doesn't link to my slides, see wall.org/~larry/p55.xul for that. | ||
Limbic_Region | even better jjore | ||
jjore | I'm on the P'C list. | ||
15:07
hb__ joined
|
|||
TimToady | also, the snapshot audrey mentions needs to be updated with 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. | ||
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. | ||
Just read it as a text file for now. | 15:09 | ||
lypanov | TimToady: really just looking for single sentence overview :) | ||
Limbic_Region | jjore - see also perlmonks.org/index.pl?node_id=526474 | ||
15:10
hoowa joined
|
|||
fglock | I wonder if Patrick reused the my bootstrapping algorithm, he could have a working compiler quickly | 15:10 | |
svnbot6 | r9321 | fglock++ | iterator_engine/p6rule.pl - '<@var>' and '$var := (<rule)' moved to | 15:11 | |
r9321 | fglock++ | prelude.p6 | |||
TimToady | fglock: could well be. | ||
lypanov | umm | 15:12 | |
fglock: bootstrapping algm? | |||
jjore | Oh. Limbic_Region, probably what reminded me. | ||
fglock | lypanov: implement a dynamic grammar, and reuse it to extend itself | ||
lypanov | fglock: *nod* | ||
fglock: this is the method you use? | 15:13 | ||
you're compiling to parrot? | |||
lypanov perks up slightly :P | |||
fglock | lypanov: I'm compiling to Perl 5, but it can be easily ported - yesterday I started working a Pugs version | 15:14 | |
s/working/working on/ | |||
but it hit some bugs :( | |||
15:15
Ymmv joined,
bynari joined,
mako132_ joined
|
|||
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 | ||
bynari - colabti.de/irclogger/irclogger_log/perl6 | |||
lypanov | fglock: how long is it? | 15:17 | |
hoowa | audreyt do u still here? | ||
bynari | Awesome, thanks, fglock | ||
lypanov | fglock: i was writing a ruby in ruby a while back | ||
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 | ||
(damn #perl6 :P) | |||
fglock: nice nice | |||
lypanov shall have to take a look eventually | |||
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 :) | ||
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 | ||
s/program/method/ | 15:20 | ||
lypanov nods | 15:21 | ||
thusly my interest :) | |||
Limbic_Region | audreyt ping again | ||
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 | ||
fglock | recompiling the circular prelude is scary - if you mess with it, you ruin the source code | 15:25 | |
because it is circular | |||
fglock makes extra backups | |||
lypanov | hehe | ||
jjore | backup should be part of the build then. | 15:26 | |
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? | ||
lypanov | could the compiler compile itself before saving state? | ||
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 | ||
lypanov: and I'm commiting the state to svn, each time | |||
lypanov nods | 15:30 | ||
chris2 | hi lypanov | 15:34 | |
15:34
jjore is now known as jjore-home
15:35
justatheory joined
|
|||
lypanov | yoyo chris2 | 15:38 | |
chris2 digs into haskell | |||
Supaplex chews through some maillogs | 15:42 | ||
15:45
penk joined
|
|||
FurnaceBoy chews through some high voltage cables | 15:48 | ||
chris2 | FurnaceBoy: one-by-one it's only bad for the teeth ;) | ||
svnbot6 | r9322 | gaal++ | * precompilation_cache.pod design notes. Please review. | 15:49 | |
FurnaceBoy spits chewed PVC... | 15:50 | ||
Supaplex deflects | |||
FurnaceBoy goes to find a nicer tasting breakfast | |||
gaal | nothingmuch: ping | 15:51 | |
16:03
bd_ joined
16:13
pawel joined
|
|||
FurnaceBoy | au contraire, chris2: I am well grounded. | 16:16 | |
chris2 | =) | ||
FurnaceBoy | but croissants sure are tastier. | ||
pawel | fglock: I'll remember the run the test next time :) a script is in place.. | 16:22 | |
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 | ||
i get Undefined subroutine &@grammar1::statements called at iterator_engine.pl line 184 | 16:25 | ||
when i run the non-circular version | |||
FurnaceBoy | lol@Limbic, why? | ||
Limbic_Region | well, cause policy states that no browser will connect to the net except via the corp porxy | ||
same policy is followed by a dozen other things that won't connect except via the corp proxy | 16:26 | ||
one of those things is a secure client | |||
pawel | fglock++ for the metagrammar | ||
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 | ||
FurnaceBoy | are you irc'ing via cgiirc or such? | 16:27 | |
16:27
foobarbazblarg joined
|
|||
Limbic_Region | cgiirc | 16:27 | |
FurnaceBoy | k | ||
gaal | anatoly_: ping | 16:31 | |
16:32
uszr` joined
|
|||
fglock | pawel: the non-circular version is now obsolete. p6rules.t is not expected to suceed, either | 16:32 | |
s/suceed/succeed/ | 16:33 | ||
because it doesn't use the p6 lib | |||
16:33
justatheory joined
|
|||
fglock | I'll fix that later | 16:33 | |
fglock deleted the local version and restart | 16:34 | ||
pawel: re primitives - my mistake - I'll commit the missing file | 16:37 | ||
16:38
pawel is now known as pmurias
|
|||
svnbot6 | r9323 | fglock++ | p6primitives-cached.pl - compiled primitives | 16:38 | |
fglock | pawel: would you check it again? | ||
pmurias | it works!! thanks | 16:39 | |
fglock | pmurias: I moved the whole compiler to p6; now I'm moving the rule subsystem | 16:40 | |
pmurias | explain more please... | ||
fglock | see p6compiler.pl - there is no grammar in it - it's just a loader | ||
pmurias | thats great | 16:42 | |
I think useing Perl::Tidy, would help simplify code,emiting | 16:45 | ||
I'll try to add it as an optional dependency this evening | |||
16:45
justatheory joined
|
|||
pmurias | code generation routines should care how the *resault* looks,and Perl::Tidy does a greatly better job | 16:47 | |
fglock | pmurias: you mean, pass the compiled code through Perl::Tidy? | 16:48 | |
pmurias | yes | ||
fglock | pmurias: see the $tab thing in the rule emitter - it does a good job | 16:49 | |
pmurias | seen it | ||
I wanted to remove it to unifie code & rule nodes interfaces | |||
fglock | pmurias: I'd rather add it to the code nodes | 16:50 | |
pmurias: the reason to keep dependencies low is to be able to port code to other languages (Parrot, Pugs) | 16:51 | ||
16:52
justatheory joined,
marmic joined
|
|||
fglock | what's the p5 syntax to pre-declare a sub? | 16:56 | |
pmurias | I could code it as an optional switch (for higher code quality) | 16:57 | |
sub name; | |||
fglock | pmurias: as long as it don't fail if it is not installed, it's ok | ||
s/don't/doesn't/ | 16:58 | ||
pmurias | i never meant for it to be mandatory | ||
fglock | pmurias: ok | ||
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) | 16:59 | |
fglock | pmurias: you can get the code formatted later (with external perltidy) | 17:00 | |
pmurias | i'll experiment with it before making a choice(got to do the homework now :( | 17:02 | |
fglock | pmurias: ok! | 17:04 | |
svnbot6 | r9324 | fglock++ | iterator_engine/p6rule.pl - less rules in p5 land | 17:08 | |
17:14
Cryptic_K joined
|
|||
svnbot6 | r9325 | fglock++ | iterator_engine - "there is no <rule> in perl5" | 17:29 | |
17:41
justatheory joined
17:55
nothingmuch joined
|
|||
FurnaceBoy | 0m | 18:03 | |
18:14
ruz joined
18:18
vborja joined
|
|||
szbalint | Hello. | 18:21 | |
18:22
mako132_ joined
|
|||
svnbot6 | r9326 | fglock++ | iterator_engine - less perl5 code | 18:22 | |
Limbic_Region | szbalint - I have given up on Project Euler for a while - I think I have picked all the low hanging fruit | 18:25 | |
18:29
dduncan joined
|
|||
fglock picks the high hanging fruits and falls from tree | 18:33 | ||
TimToady | but is it an upward tree or a downward tree? | 18:35 | |
Limbic_Region | tion) | 18:36 | |
TimToady | I am not in the habit of tioning ) | 18:38 | |
Limbic_Region | wow | 18:40 | |
that should have read "It is a btree (he can fall in either direction)" | |||
Limbic_Region is compiling Pugs again (from scratch) and his machine can't keep up with him | |||
fglock | :) | 18:41 | |
Your machine can't keep up with you? | 18:42 | ||
TimToady | off to $job... | 18:44 | |
fglock | TimToady: have a nice day | ||
18:47
mako132_ joined
18:51
FurnaceBoy joined
|
|||
svnbot6 | r9327 | fglock++ | iterator_engine - tests cleanup (rules must now be tested in p6 land); | 18:55 | |
r9327 | fglock++ | updated README, p6sample.p6 | |||
szbalint | Limbic_Region: I don't really have too much time for Euler atm :\ | 18:58 | |
and it got a bit repetitive after 60+ problems | |||
:P | |||
fglock | bbiab | 18:59 | |
svnbot6 | r9328 | fglock++ | iterator_engine - updated TASKS | 19:01 | |
19:02
justatheory joined
19:07
rindolf joined
19:08
Cryptic_K joined
|
|||
rindolf | Hi all! | 19:09 | |
kane_: here? | |||
I emailed kane_. He did not reply. | 19:12 | ||
integral | rindolf: maybe your email comes under more pressing priorities. | 19:13 | |
rindolf | integral: possibly. | ||
It reminds me of something I heard in the perlcast about the time management. | 19:14 | ||
integral | "Don't use IRC" | ||
rgs | heh. | ||
rindolf | integral: no. | ||
19:15
putter joined
|
|||
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:15 | |
integral | maybe he's not working on it. | 19:17 | |
rindolf | integral: then you got to let them know that you're not. | ||
integral: either way, you need to give a fast initial feedback. | |||
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
19:19
dduncan left
|
|||
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:20 | |
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:22 | ||
s/is not unusual/is not an unusual/isolated case/ | 19:23 | ||
19:24
justatheory joined
19:27
bsb joined
|
|||
gaal | putter: looking, trying to understand. | 19:34 | |
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 | ||
19:37
buu is now known as buu_
|
|||
gaal | what _is_ the pil2js breakage? url to log summary works if you have one | 19:37 | |
fglock | putter: did you backlog? Parser metacircularity! | 19:41 | |
whatever this means | 19:42 | ||
putter | fglock! :) | ||
(that's what I'm unclear on - think i get it:) | |||
hope to looks at TASKS soonish | 19:43 | ||
fglock | fglock: you don't change the syntax by using p5 - it's all p6 code | ||
? I'm talking to myself | |||
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:44 | |
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:45 | ||
gaal | putter: that actually sounds like correct behavior | 19:46 | |
oh wait | |||
even if Prelude defines it? | |||
fglock | putter: the TASKS list is scary | ||
19:46
justatheory joined
|
|||
putter | gaal: a Prim trumphs a Prelude def. | 19:46 | |
gaal | ok, sure; that's to be expected and doesn't look like a problem | 19:47 | |
if Prim.hs does NOT define something, but that something IS in Prelude, what's the problem? | |||
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. | ||
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. | ||
./pugs -e 'foo Bar;' *** No such method in class Any: "&foo" | 19:49 | ||
Courtesy of Parser, -C -e 'use Bar;' gets as far as knowing Bar is a Str, so the failure is | 19:51 | ||
./pugs -CPIL1 -e 'use Foo;' pugs: *** No such method in class Str: "&use" | |||
gaal | now I'm beginning to see | ||
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:54 | |
Long-term, my understanding is the right thing is for -C to include the Prelude, but be smart enough not to output it. | 19:56 | ||
For an immediate fix, either a "mini-Prelude for -C", or tweaking so Prelude defs trump Prims, would fix the problem. | 19:58 | ||
19:58
p5evalbot joined
|
|||
gaal | hmmm | 19:58 | |
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. | ||
rafl | Juerd: ping | ||
Juerd | rafl: pong | 20:00 | |
20:00
amnesiac joined
|
|||
rafl | Juerd: How about the perl6 @ froscon idea? | 20:00 | |
putter | fglock: :) | ||
Juerd | rafl: I think we should ask Audrey, who knows everyone :) | ||
rafl | Juerd: So, go ahead :-) | 20:01 | |
Juerd | Hm? | ||
Why me? :) | |||
rafl | 'cause it was your idea to ask her :-) | 20:02 | |
20:02
penk joined
|
|||
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 | |
I'll ask her, but not for this reason. | |||
:) | |||
rafl | Juerd: And because I'm not capable of thinking very well right now. | 20:03 | |
Juerd | Neither am I. | ||
I'm listening to a PPI talk atm | |||
gaal | putter: there is a COMPILING_PRELUDE thing, I don't understand what it does though. | ||
sorry, network problems | |||
rafl | But I'm sure I've a better reason. | ||
Juerd | Heh | ||
rafl | Juerd: Oh, Amsterdam.PM? Sounds interesting.. | ||
Juerd: Take your time. You can ask afterwards ;-) | |||
Juerd | Yes, of course, amsterdam.pm | ||
webmind | rafl, it kinda is actually | 20:04 | |
Juerd | The world still turns even if you're not there :) | ||
webmind | h/win 37 | ||
oops | |||
rafl | Juerd: The world turns quite much for me right now. | 20:05 | |
Juerd | rafl: use less 'drugs'? :) | ||
rafl | That's unimplemented right now. | 20:06 | |
gaal | Juerd: can you /msg? | 20:10 | |
Juerd | gaal: Apparently not | ||
svnbot6 | r9330 | fglock++ | iterator_engine - grammar changed to use #comments - putter++ | 20:11 | |
20:11
justatheory joined
|
|||
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:15 | |
fglock | what is the syntax to use perl5 regex inside a rule? like 'rule xxx { (?#some-regex) }' | 20:18 | |
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 | |
But I punted at that point. | |||
fglock: [:perl5(1)...] (and the usual, or :perl5::, or...) | 20:22 | ||
[:perl5 should be fine] | |||
20:23
penk joined
|
|||
PerlJam | Isn't it :P5 too (or did I imagine that?) | 20:23 | |
putter | (as long as its a /x p5 regexp :) | ||
PerlJam | ? | ||
putter | yes | ||
20:23
penk left
|
|||
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
|
|||
putter | no, | 20:24 | |
PerlJam | fglock: rule xxx { :perl5 .* } | ||
fglock: in yours, .* would be a parameter to the :perl5 attribute. | |||
putter | :perl5 , like :i :mumble, is a modifier. | ||
block scoped | |||
[:i(1) This CoDe Is CaSe insensiteive ] | |||
20:25
FurnaceBoy joined,
meppl joined
|
|||
fglock | putter: got it - thanks | 20:25 | |
putter | sensitive [:i insensitive] sensitive | ||
ah | |||
20:25
chris2 joined
|
|||
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 :/ | ||
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. | ||
gaal: :) | |||
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:29 | ||
PerlJam: rx:w/:i()foo/ ? | 20:30 | ||
oh, no. um, | |||
no, yes, that's right. though may confuse one when counting parens. :) | |||
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
|
|||
putter pauses, ponders, | 20:31 | ||
lol :) | |||
PerlJam: last I heard, :modifiers can only appear at the beginning of blocks. so "::" _can_ be used everywhere to terminate modifiers. ;) | 20:32 | ||
20:33
penk joined
|
|||
putter | fglock: that's very neat. that's a T-shirt. | 20:33 | |
PerlJam | oh, maybe I need to update my mental model then. | ||
fglock | :) | ||
20:35
nothingmuch joined
|
|||
FurnaceBoy | wb | 20:36 | |
fglock | putter: after you compile that statement, you can change it to: ' rule perl5_regex { \: perl5 [ :perl5 .*? ] } ' | ||
s/[]/()/ | |||
putter: that's the plan, actually | 20:37 | ||
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 | |||
fglock compiles and see what happens | |||
putter | shouldnt that be | ||
PerlJam | Kattana: by that time, they'll be off to something else ;) | 20:40 | |
putter | ' rule perl5 { \: perl5 [ :perl5 .*? ] } ' | ||
fglock | putter: it needs to capture the regex (source code), in order to compile it | 20:41 | |
putter | and ' rule perl5_regex { :perl5 .*? } ' | ||
Kattana | mhmm, cant you just redefine it later on using itself? i did something like that recently. | ||
fglock | Kattana: yes - but it is later on in 'time', not in 'later in the same text' | 20:42 | |
Kattana: circular programs 'evolve' | |||
putter | it wasnt the captures which I found strange, but the change in tokens (\:perl5 moving from rule perl5 to rule perl5_regex) | ||
fglock | putter: yes - I changed the code while I was talking to you | 20:43 | |
putter: do I have to code the second form as (using a block): rule perl5_regex { \: perl5 [ :perl5 (.*?) ] } | 20:44 | ||
putter: is the [] block needed? | 20:45 | ||
putter: or, I could code it in pure perl5 | |||
putter | you need a block, [] or (), to provide a beginning of block place to use the :perl5 modifier. oh wait, | 20:53 | |
here you could just say | |||
oh, I'm getting that distinctive meta-circularity headache... | 20:54 | ||
rule perl5_regex :perl5 {:perl5\s*\[:perl5(.*?)\]} | 20:56 | ||
or | |||
oops, that should have been | 20:57 | ||
rule perl5_regex :perl5 {:perl5\s+(.*?)} | |||
or | |||
20:57
putter left
|
|||
avar | how do I do sub new { shift; my $self = { foo => 'bar', bar => 'zar', @_ }; bless $self; } in p6? | 20:57 | |
@_ being the little magic;) | 20:58 | ||
20:58
putter joined
|
|||
putter | "windows #%$!@$#$@#$ ^W *$#!!" | 20:58 | |
fglock | avar: ask putter :) | 20:59 | |
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 | ||
;) | |||
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:02 | |
21:03
kanru2 joined
|
|||
putter | so, /:perl5(1)thisisnowp5/ hmm. not sure if the 1 is needed. i think it's the default. so /:perl5()foo/ | 21:03 | |
your choice of brackets. /:perl5<>foo/ | |||
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 | ||
putter | yes, works. | ||
or 'rule xxx rx{:perl5<>foo}' | 21:06 | ||
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
|
|||
azuroth wants honey chicken | 21:07 | ||
putter | azuroth just made putter very hungry. | ||
re better, | 21:08 | ||
azuroth | bwaha, it's like an infectious disease. | ||
putter | ... | ||
azuroth | the honey-chicken wanting is, I mean... | ||
FurnaceBoy | Dal Makhani! | ||
...heating | |||
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, | ||
FurnaceBoy loves Indian vegetarian bachelor-meals | |||
21:10
buu_ joined
|
|||
putter | I kind of prefer rules to have their semantic bits internal. rule x {:words ...} rather than rule x :words {...}. | 21:10 | |
so, no immediately accessible preference. ;) | |||
fglock | putter: ok - I'm implementing the first one :) | 21:11 | |
putter | :) | ||
sounds good | |||
Supaplex | as long as it doesnt exasperate any hemorids, it's ok | ||
;o) | 21:12 | ||
21:12
buu_ is now known as buu
|
|||
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 | ||
fglock | putter: that's not really XS specific | 21:15 | |
FurnaceBoy | :) | ||
Supaplex | take buu's love life for example | 21:16 | |
</tease> | |||
azuroth | I like that analogy | 21:17 | |
Supaplex | I had a hard time resisting :) hehe | ||
FurnaceBoy | LOL!! | ||
avar | XS? | ||
azuroth | cross language? | 21:18 | |
"external sub" | |||
avar | oh yes | ||
because using E an an acronym is punishable by death or something | |||
azuroth | capital E, R and Ls aren't allowed | 21:20 | |
Supaplex | P! | 21:21 | |
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". | ||
FurnaceBoy | haha | ||
as one does | 21:24 | ||
avar | FurnaceBoy: ? | ||
FurnaceBoy | Xlate -> translate, etc. and other prefixes | 21:25 | |
X -> Extensible | 21:26 | ||
X -> Cross | |||
putter | avar: XS is perl5's C extension api. | 21:27 | |
nothingmuch | has anyone seen audreyt recently? | 21:28 | |
FurnaceBoy | yesterday | ||
21:28
SamB joined
|
|||
nothingmuch | recently == in the last few hrs | 21:28 | |
putter | nothingmuch: audreyt was last seen ~21 hours ago | 21:29 | |
nothingmuch | grazie | ||
azuroth | wow, C++ from perl seems surprisingly simple - much better than I imagined | ||
putter | perhaps having fun touristing | ||
nothingmuch | GPW is over right? is she going back to .tw? | 21:30 | |
azuroth: using C++ inside Perl? | |||
are you using Inline? | |||
azuroth | no, XS. I'm just looking at how it's done | ||
avar | somebody take away damian conway's keyboard, his code is horrible | ||
nothingmuch | avar: i agree =/ | 21:31 | |
very hard to subclass | |||
putter | re audreyt's travel plans... no idea. land, urban. net. :) | ||
avar | nothingmuch: just generally a nightmare to read | ||
nothingmuch | putter: when you see her.. | ||
;-) | |||
avar trying to debug Text::Balanced | |||
nothingmuch | avar: yeah, that too | ||
NEXT especially | |||
never tried that one | |||
21:32
nnunley joined
|
|||
azuroth | I'd better head to TAFE | 21:33 | |
avar | nothingmuch: AND THE ONLY COMMENTS HE WRITES ARE IN ALL CAPS | 21:34 | |
nothingmuch | avar: never noticed that ;-) | ||
avar: you should look at some Catalyst code | |||
every now and then you see something like | |||
21:35
justatheory joined
|
|||
azuroth | heheheh. that's so weird. | 21:35 | |
nothingmuch | local $NEXT::ffoooooo; # NEXT doesn't allow recursive redelegation | ||
21:35
dduncan joined
|
|||
avar | nothingmuch: it's true of Text::Balanced at least | 21:35 | |
nothingmuch probably found the comments not helpful enough and just blocked them out | 21:36 | ||
comments rarely help me | |||
not even my own | |||
pasteling | "avar" at 85.197.228.236 pasted "fleh" (44 lines, 865B) at sial.org/pbot/16205 | ||
avar | trying to debug this | 21:37 | |
it takes a regex which I escaped but it doesn't like question marks | 21:38 | ||
nothingmuch | avar: try the Regexp::Common hack | 21:41 | |
avar | I'd rather use something std | 21:42 | |
although I could just copy the regex;) | |||
svnbot6 | r9331 | pmurias++ | handling of command line option using Getopt::Long(if installed) | 21:44 | |
r9331 | pmurias++ | --print-program and --print-ast work now if no ... is used | |||
nothingmuch | avar: look in ??{ } for perlre | 21:46 | |
21:50
FurnaceBoy_ joined
|
|||
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:50 | |
avar | I mainly just scream very loudly and kill something | 21:52 | |
I used to rip out my hair too, but now I don't have any | |||
putter | different approaches to learning exist... | ||
21:55
mauke_ joined
22:02
justatheory joined
|
|||
pmurias | fglock: is it ok to temporarly make ... warn? | 22:02 | |
fglock | pmurias: temporarily = ok :) | 22:03 | |
pmurias | thanks | 22:04 | |
i'll commit the match printing option, and go to sleep | 22:05 | ||
expect some kewl options tommorow :), good night | 22:08 | ||
svnbot6 | r9332 | pmurias++ | ... now warns instead of dies | ||
r9332 | pmurias++ | --print-match | |||
22:09
mauke_ is now known as mauke
22:12
vborja joined
22:18
bd__ joined
|
|||
spinclad | re where audreyt next, there's a hackathon at leo's coming up | 22:30 | |
22:36
justatheory joined
|
|||
svnbot6 | r9333 | fglock++ | iterator_engine - the grammar can be extended using perl5 regexes | 23:05 | |
r9333 | fglock++ | like 'rule word rx:perl5{^([_[:alnum:]]+)}' - not much tested yet | |||
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
|
|||
fglock | pmurias: cool! you can include Perl6Grammar::header() - and then the compiled source code should be runnable! | 23:07 | |
s/source code/code/ | 23:08 | ||
putter | hey fglock. this is fun :) | 23:09 | |
fglock | putter: you may write p6 modules that run in perl5, or run perl 6 in plain mod_perl (some day) | 23:10 | |
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:14 | |
fglock | putter: will you try to run PGE on it? (you've got some days until apr 1st) | 23:16 | |
putter: with the new rs:perl5 and a few tweaks, the parser can get quite usable (in speed) | 23:17 | ||
s/rs/rx/ | |||
putter | no. oh, I may clone the pge operator parser in p5. but otherwise it its pure perl (well, plus XS;). | 23:18 | |
23:18
Shachaf left
|
|||
putter | re speed, yes. we may end up with two nice ways to do it. | 23:18 | |
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 :) | ||
putter | yes | ||
it's the going back and forth to parrot/C-or-pir land which seems currently painful to the point of implausible. | 23:20 | ||
so ie (*shudder* at the name;) on p5 would be great. :) | |||
fglock | you can use Inline::Parrot :) | ||
putter | fglock: 2004. we cant even use 2 month old versions. | 23:21 | |
fglock | putter: I'm ok with renaming - feel free :) | ||
putter | :) | ||
23:21
rantanplan_ joined
|
|||
fglock | putter: re 2004: my fault - I got involved in Pugs | 23:21 | |
putter | lol | ||
sooo np | 23:22 | ||
23:22
srcmaster joined
|
|||
fglock | it might even work | 23:22 | |
putter | which? | ||
fglock | (Inline::Parrot) | ||
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...?!? | ||
ah, fixable, no doubt. | |||
fglock | It's very simple, I think it could have few problems | ||
23:24
beppu joined
|
|||
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...;) | ||
fglock | putter: tomorrow I'll have to review my milestones - they get outdated too fast | 23:25 | |
putter | :) | 23:26 | |
is there anything you wish you had from p5 regexps which you dont? that would make ie easier? | |||
fglock | putter: would review a problem in iterator_engine.p6 ? (something on using code references in closures) | 23:27 | |
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" | ||
see the last "not ok" in iterator_engine.p6t | 23:29 | ||
putter | looking... | ||
fglock | look for '$alt' in iterator_engine.p6 - this variable doesn't seem to be working properly | 23:30 | |
'pugs iterator_engine.p6t' | |||
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 | ||
putter: the error happens both in old and new pugs (for some value of new) | 23:32 | ||
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? | ||
fglock | that's the line 'require 'iterator_engine.p6';' - but it works for me | 23:34 | |
is it wrnog? | |||
putter | ok. (I symlinked the file.) so... | ||
not ok - /[a|c]+ab/ with backtracking | |||
this one? | |||
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:36 | |
I'm trying to do something like 'my $alt; $alt = sub { $alt() };' | 23:37 | ||
but I think the $alt inside the sub is not set | 23:38 | ||
sorry, need to go now | 23:41 | ||
23:41
FurnaceBoy_ is now known as FurnaceBoy
|
|||
fglock | I'll backtrack, err, backlog | 23:41 | |
putter | np. | 23:42 | |
23:42
fglock left
23:55
justatheory joined
|