Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2005-09-24

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00:03 larsen has quit IRC ("later")
00:27 xinming_Beijing has quit IRC (Client Quit)
00:28 xinming_Beijing has joined #perl6
01:29 scook0 has joined #perl6
02:17 elmex ]a
02:17 elmex and when speed doesn't matter, types get in your way
02:37 rantanplan_ elmex, yeah, and you have to write more code while using typeing. ;).
02:54 elmex has quit IRC ("leaving")
03:24 Khisanth rantanplan_: haskell seems to be a nice compromise
03:28 rantanplan_ Khisanth, yeah, i had to do some Haskell like 3 years ago. But i never got very deep into it.
03:30 Khisanth landover: http://search.cpan.org/~rcapu​to/POE-0.3202/lib/POE/NFA.pm seems pretty close to what you were describing
03:36 khisanth_ has joined #perl6
03:52 rantanplan has joined #perl6
03:53 Khisanth has quit IRC (Read error: 110 (Connection timed out))
03:54 obra autrijus: how was the talk?
03:59 Amnesiac has quit IRC ("Leaving")
04:00 SamB has quit IRC (Read error: 104 (Connection reset by peer))
04:02 khisanth_ is now known as Khisant
04:02 Khisant is now known as Khisanth
04:09 buu ?eval "A" ~~ "b"
04:09 buu er
04:09 buu Evalbot went away =[
04:31 rantanplan_ has quit IRC (Remote closed the connection)
04:31 SamB has joined #perl6
04:42 fraxtal buu
04:50 knewt has quit IRC (Connection timed out)
04:54 rantanplan has quit IRC (Remote closed the connection)
05:01 buu What?
05:01 fraxtal hi
05:02 knewt has joined #perl6
05:04 buu HAI FRAXTAL
05:08 dduncan hai yu
05:18 * QtPlatypus asks "Default value for an attribute? C<has $.server = "localhost"> "
05:32 * QtPlatypus shakes his head "No thats wrong.  (searches for perl6 initlizor examples (I feel so much like a cargo cult programer))
05:40 * QtPlatypus looks confused "I guess pugs doens't implement that, though its the correct code"
05:42 landover has quit IRC (Read error: 110 (Connection timed out))
05:49 justatheory has quit IRC ()
06:04 autrijus greetings live from CUFP!
06:04 autrijus http://perlcabal.org/~autrijus/cufp2005.pdf
06:04 autrijus a "very informal" gathering; just started
06:05 geoffb hi!
06:06 autrijus yo geoffb
06:07 mauke has joined #perl6
06:08 dduncan and greetings from where I am
06:10 joepurl_ has joined #perl6
06:10 geoffb Ah, the trek officially begins 2006-02-01.  I wonder what we can get done before then?
06:11 geoffb Must sleep.  Best of luck at CUFP, autrijus
06:22 joepurl has quit IRC (Read error: 110 (Connection timed out))
06:49 autrijus whew done
06:49 autrijus lots of laughters despite me being nervous
07:00 autrijus I'm sold on Takahashi
07:00 autrijus it takes 3x time to prepare but is worth it
07:00 tophcyll has quit IRC ("Leaving")
07:07 bd_ has joined #perl6
07:08 fraxtal has quit IRC ("Leaving")
07:17 gaal morning!
07:17 gaal glad it went well :)
07:17 autrijus :D
07:20 gaal oh wait, *went* well or is still going on well? (hi! cufp!)
07:32 pdcawley has quit IRC ()
07:36 iblechbot has joined #perl6
07:39 Aankhen`` has joined #perl6
07:45 pdcawley has joined #perl6
08:02 autrijus it's still going on
08:02 autrijus david roundy is going to talk about darcs now
08:03 autrijus the mldonkey talk was cool
08:03 autrijus lamenting that OCaml doesn't have a CPAN (this is a recurring theme)
08:04 svnbot6 r7120 | gaal++ | add ignore property to /src/System/FilePath.hi
08:05 gaal they just need to interface pugs then.
08:07 gaal ah btw i don't know if you backlogged, but it turns out putter++ fixed the win32 wrapper, which is quite nice because he didn't afaik actually have a win32 box to hack on. :)
08:07 autrijus oooh good
08:07 gaal regardless, pugs-the-binary also understands -B now :)
08:08 larsen has joined #perl6
08:08 autrijus that's wonderful...
08:08 autrijus so why are we keeping the .bat around?
08:09 gaal timidity :)
08:09 autrijus I see :)
08:09 gaal is there a "proper" way to revert something that took several svn checkins?
08:09 autrijus svk reverse merge
08:10 svnbot6 r7121 | gaal++ | add tags to svn:ignore on /
08:10 autrijus but svn merge works too
08:10 gaal but i want a little more than merge -rX:Y
08:10 gaal because there were further changes other than X
08:11 gaal should i just perform a few svn merge -rX:X-1, for all Xs I want to revert?
08:11 autrijus nod, that's the best you can do for svn
08:11 autrijus but you can ignore that and just commit a change that reverts them
08:11 autrijus we don't really need the properness :)
08:12 gaal okay, i'll go for that then :)
08:47 gaal works; waiting for smoke to run.
08:50 autrijus mm "FP stands for finger-pointing" (talking about scheme48 for financial engineering)
08:51 autrijus (as in, concise enough to be reasoned with and accountable)
08:51 autrijus avoidance of "unsound methods"
08:58 gaal autrijus: hee. (but did you mean to say that on #haskell?)
08:58 gaal Base64 is still hanging. i'm committing anyway.
08:59 ruz has joined #perl6
09:00 penk has quit IRC ("Download Gaim: http://gaim.sourceforge.net/")
09:01 autrijus no, I'm just typing randomly
09:03 dduncan good night folks
09:03 svnbot6 r7122 | gaal++ | revert the wrapping `pugs` script; pugs now spawns backends
09:03 svnbot6 r7122 | gaal++ | itself from haskell.
09:03 autrijus night
09:04 dduncan fyi, I've been doing a whole variety of code reformatting in my modules, following Best Practices suggestions
09:04 autrijus woot!
09:05 dduncan the latest ones involved using postfix-if for flow control, such as "return if condition" or "next if condition" vs if-then or cond-and or cond-or etc that I used before
09:05 dduncan hopefully this process will wind down and be on CPAN this weekend
09:06 dduncan actually, might as well commit the corresponding perl 6 updates ...
09:07 autrijus cool
09:08 dduncan I hope that Pugs currently supports q{} and qq{} etc, as well as labels, since I added use for those, but haven't done a test compile yet
09:09 dduncan once I've put the perl 5 on cpan, I'll try to compile the perl 6 updates and see if perl 6 does the same things in different ways
09:09 svnbot6 r7123 | Darren_Duncan++ | /ext/Locale-KeyedText : resync with perl 5 version in progress
09:27 gaal d'oh! the hangs in the test suite seem to be caused by parrot
09:30 gaal QtPlatypus: you may be interested in that fact too. haven't looked at the code for Base64, but don't use rules unless you must.
09:32 xern has quit IRC ("leaving")
09:33 xern has joined #perl6
09:42 QtPlatypus The only time I use rules is in the tests.
09:43 * QtPlatypus is wondering if he can rewrite them so that the tests down't use rules.
09:43 * QtPlatypus will have to check that in base64 though.
09:43 xern has quit IRC ("leaving")
09:43 wolverian Juerd, right.
09:44 xern has joined #perl6
09:46 pjcj has quit IRC (Read error: 110 (Connection timed out))
10:23 dduncan has quit IRC ()
10:27 svnbot6 r7124 | gaal++ | don't install an empty lexical pragma set (this also broke all BEGIN{}
10:27 svnbot6 r7124 | gaal++ | blocks, oops)
10:28 gaal mswin32 r7121 smoke up on the smoke server, linux coming up soon too.
10:45 xinming_Beijing has quit IRC (Read error: 113 (No route to host))
10:46 xinming_Beijing has joined #perl6
10:46 xinming_Beijing has quit IRC (Read error: 104 (Connection reset by peer))
10:49 gaal so, parrot simply hangs when called from pugs on win32. anyone know how to fix it?
10:49 gaal if parrot.exe is killed, pugs stops blocking and continues to work.
10:51 svnbot6 r7125 | gaal++ | more precise failure message for unimplemented variants of executeFile
10:53 rafl Hello
10:53 gaal hey rafl
11:03 wolverian damn, I've confused myself with fetchmail/postfix/procmail
11:03 wolverian this happens too often. :/
11:16 Aankhen`` o_O
11:16 Aankhen`` Identity crisis? :-S
11:17 wolverian heh.
11:17 wolverian just trying to make things too hard on myself.
11:17 Aankhen`` Ah, I see.
11:18 Aankhen`` BBL, stuff to do.
11:27 iblechbot has quit IRC (Read error: 110 (Connection timed out))
11:30 autrijus has quit IRC (Read error: 104 (Connection reset by peer))
11:30 autrijus has joined #perl6
11:39 larsen has quit IRC ("later")
11:49 rep has joined #perl6
11:51 dudley_ has joined #perl6
11:52 iblechbot has joined #perl6
12:12 elmex has joined #perl6
12:27 xinming_Beijing has joined #perl6
12:39 rscman76 has joined #perl6
12:41 integral there's a bug with run-smoke.pl when smoking perl5: run-smoke.pl uses chdir to move to the root directory of the "pugs sandbox", and when it is calling pugs itself it uses ./pugs; but when crude_repl.pl is calling pugs it uses just pugs.  But I do not have . in my %ENV<<PATH>>, so it cannot find pugs.
12:42 autrijus nod. so have it remember Cwd first?
12:43 integral maybe.  I thought of just getting run-smoke.pl to change $PATH to include . at the front, but does this work on windows?  Do I need to use File::Spec?
12:44 gaal integral: . is always first in PATH on windows, implicitly.
12:44 autrijus nod
12:44 gaal it's a security feature!
12:44 integral gaal: ah, so just test on $^O ne "win32"?
12:45 gaal no need -- it would just work there, except that it doesn't since perl5 doesn't work there anyway :)
12:45 integral windows uses : as a PATH separator?
12:46 gaal no, ;
12:46 gaal you have that in getConfig...
12:46 gaal path_sep i think, let me maek sure
12:46 integral ah
12:46 gaal yes, path_sep.
12:47 gaal but we have a use lib, no?
12:47 gaal oh, that's irellevant
12:47 gaal silly me
12:48 gaal maybe crude_repl shouldn't just call pugs out of the path?
12:48 integral hmm, the actual call to pugs must be buried in a module
12:50 gaal there's also a literal 'pugs' in the getopt block.
12:50 integral yeah.
12:51 integral oh well, the smoke's working now at least
12:56 gaal well, EvalX needs to be made configurable, either by some class method or by peeking at the environment.
12:57 gaal no problem because it doesn't do anything with $pugs at compile time.
12:57 gaal shall i fix?
12:57 gaal or did you hackaround already?
12:58 integral I've done the adding . to $PATH hack, but not committed it.  so go ahead if you've got something better
13:02 gaal the idea is to add a --pugs=./pugs to util/run-smoke.pl, and have crude_repl honor that. looks a bit cleaner, no?
13:03 wolverian hmm. is p6l dead, or is my mail setup fuxored?
13:04 wolverian (haven't released anything in a while, and I have changed things so I have reason to suspect my end is broken)
13:04 gaal beh, except that run-smoke doesn't want to know file_sep and exe_ext
13:04 gaal integral: your hack it is :)
13:04 rscman76 has quit IRC (Connection reset by peer)
13:05 gaal wolverian: last mail was from you, 13:45:00 +0300
13:11 wolverian gaal, ah, came now. thanks :)
13:11 Juerd Not anymore, gaal
13:11 Juerd I sent 2 since
13:11 khisanth_ has joined #perl6
13:12 ajs has quit IRC (Nick collision from services.)
13:12 wolverian Juerd, you replied directly to me, so I got duplicates :)
13:12 Juerd To you and the list.
13:12 Juerd That's what mutt does by default, what many clients do by default, and the way I prefer it.
13:12 ajs_ has joined #perl6
13:12 Juerd It's reply to all.
13:13 wolverian Juerd, I prefer L (reply to list) for mailing lists
13:13 Juerd Ah, it has a key for that?
13:13 wolverian yes.
13:13 Juerd Thanks! :)
13:13 wolverian you're welcome :)
13:13 Juerd The reason I preferred (until a few seconds ago) group reply was that I didn't have to type the mailing list address myself
13:14 Juerd From now on, unless I forget, I'll use L
13:14 Juerd Hm, %hash.keys really only buys one character over texas %hash>>.key, and 0 charactors over the real thing :)
13:15 Juerd Still, typability wins for %hash.keys
13:15 wolverian what is .keys specced to do currently?
13:16 Juerd Same as in Perl 5
13:16 wolverian that is really asymmetric with .elems
13:16 Juerd (That is: it is not specced, and thus by default what it always was)
13:16 Juerd .elems is assymmetric with everything, as specced.
13:16 Juerd .chars and .keys are symmetric
13:16 Juerd list in list context, number in item context
13:17 Juerd Or, well, .chars I think still officially is specced a number :(
13:17 Juerd Not entirely sure.
13:17 wolverian right, that's why I mailed
13:17 wolverian I didn't find it in the AES though
13:17 wolverian so I depended on pugs
13:17 Juerd !eval "foo".chars
13:17 Juerd ?eval "foo".chars
13:17 wolverian ENOEVALBOT
13:17 Juerd Hm
13:17 Juerd Oh
13:17 Juerd Who maintains it?
13:18 wolverian dunno
13:18 wolverian pugs> list "foo".chars
13:18 wolverian 3
13:18 wolverian same without list
13:18 Juerd I think that's annoyingly context insensitive.
13:18 Juerd Especially since splitting to characters is a very, very, very common task.
13:19 Juerd Also, I expect .chars to return a list of lvalues tied to the string, but that may be too much to ask for at this point
13:19 Juerd $foo = "foo"; $foo[1] = "bar"; say $foo;  # >>> fbaro
13:20 Juerd ehm
13:20 Juerd $foo = "foo"; $foo.chars[1] = "bar"; say $foo;  # >>> fbaro
13:20 wolverian right, I was going to add that to the mail but forgot
13:20 wolverian same for .words
13:20 wolverian etc.
13:20 Juerd I was skipping one step, although I do think Str should does Array, and then pick .chars
13:20 wolverian (that was actually discussed, I think, on p6l. maybe could dig it up)
13:20 Juerd It was.
13:20 wolverian I disagree with .k and .v, by the way
13:21 Juerd Do you also disagree with .kv?
13:21 Juerd I personally really dislike inconsistent abbreviation.
13:21 wolverian I'd rather it be .each or so
13:21 xinming_Beijing has quit IRC (Client Quit)
13:21 Juerd It returns a list of keys and values, not pairs.
13:22 Juerd Likewise, now that we abbreviate 'string' as 'str', it must be so EVERYWHERE
13:22 wolverian do pairs flatten? for *@foo.each -> $index, $value { ... }
13:22 Juerd There must not be any 'string' or 'String' left in the language, if we choose to use 'str' and 'Str'
13:22 svnbot6 r7126 | bsmith++ | Modified run-smoke.pl to prepend . to PATH so that crude_repl can find
13:22 svnbot6 r7126 | bsmith++ | pugs via PATH.
13:22 Juerd No, they do not.
13:23 Juerd Pairs are objects: scalars, more specifically: references.
13:23 wolverian then rename %foo.each to %foo.pairs
13:23 wolverian and .kv to .each
13:23 Juerd I think .each doesn't specify that you get a zipped list in any way and is because of that a bad name for this feature.
13:23 Juerd %foo.pairs isn't needed, for the same reason that @foo.elems isn't needed: list %foo does the trick already.
13:24 Juerd for %foo { my ($k, $v) := (.k, .v); ... }
13:24 Juerd Although of course those are still .key and .value
13:24 ods15 karma bsmith
13:25 ods15 how does that work
13:26 Juerd wolverian: I think @Larry deliberately has not published any decision re .chars in list context yet
13:27 Juerd wolverian: It was discussed in detail before, and Larry did not rule. Later, a ruling was explicitly requested, and again, there was none.
13:28 xinming_Beijing has joined #perl6
13:29 Khisanth has quit IRC (Read error: 110 (Connection timed out))
13:33 wolverian Juerd, oh, right. okay.
13:33 svnbot6 r7127 | iblech++ | * Usual svn props.
13:33 svnbot6 r7127 | iblech++ | * PIL2JS: runjs.pl: Added --compile-only option, needed for new -CJS.
13:33 svnbot6 r7127 | iblech++ | * Main: Added support for -CJS and unbroke -CPIR.
13:33 svnbot6 r7127 | iblech++ | * Pugs.CodeGen: Better normalization so -h looks prettier (it's "PIL", not
13:33 svnbot6 r7127 | iblech++ |   "Pil", for example).
13:33 svnbot6 r7127 | iblech++ | * Pugs.Help: Add JS to the list of backends supported.
13:33 wolverian Juerd, I seem to have missed it. :)
13:33 svnbot6 r7127 | iblech++ | * pugs::hack: Accomodate for the above changes.
13:34 wolverian (it being the discussions before9
13:34 wolverian s,9,),
13:38 nothingmuch has joined #perl6
13:39 scook0 has quit IRC ("Leaving")
13:48 rantanplan_ has joined #perl6
13:57 autrijus someone in CUFP is advocating using MDA (http://www.cotsjournalonline.c​om/home/article.php?id=100276) as a vehicale of marketing code-generation, code templating, macro etc inside one's orgainzation
14:02 nothingmuch is that a good thing or a bad thing?
14:02 nothingmuch ;-)
14:02 autrijus it's a buzzword thing that I think is genuinely helpful.
14:02 autrijus this is for pointyhairs: http://www.omg.org/news/whitepapers/OMG_Arti​cle_December-2004-MDA-and-Sarbanes-Oxley.pdf
14:14 xinming_Beijing has quit IRC (Client Quit)
14:30 brentp has joined #perl6
14:44 nothingmuch does anybody here know XML::XPath?
14:46 * rafl does, of course.
14:48 nothingmuch i'm having trouble with $node->find(...relative_path...)
14:48 nothingmuch i have <page><title>foo</title><content><items​><item><title>bar</title><...></item><i​tem>...</item></items></content></page>
14:49 nothingmuch given $xp->findnodes("/page/content/items/item") i want to extract the title for each $_ in a mao { }
14:59 nothingmuch rafl: ping?
14:59 rafl nothingmuch: Oh, forget about you. Hold on..
15:06 integral has quit IRC (Read error: 110 (Connection timed out))
15:14 rafl Hm.. curious. It only returns the first item to me. Does the same happen to you?
15:15 integral has joined #perl6
15:15 Amnesiac has joined #perl6
15:16 nothingmuch i get a big tree
15:17 nothingmuch i suspect it's the complete set of "title" elements
15:17 nothingmuch the problem is that the text is in hebrew, so Data::DUmper doesn't help a lot (it prints \x{decaf} everywhere)
15:19 rafl Hm. What works for me us using findnodes('/page/content/items/item/title'), taking the title child node and doing getData.
15:20 nothingmuch right, that's cool
15:21 nothingmuch but not as nice as I wanted
15:21 nothingmuch can you do relative xpath queries from a certain node?
15:21 nothingmuch ($xp->findnodes('/page/cont​ent/items/item'))[0]->find
15:21 nothingmuch ('title/text()')
15:21 nothingmuch s/\n//l
15:21 nothingmuch tr/l/;/
15:22 rafl $xp->find('/foo', $context);
15:22 khisanth__ has joined #perl6
15:22 rafl findnodes also takes an optional context.
15:23 nothingmuch oh, i see
15:23 nothingmuch thanks =)
15:24 khisanth__ is now known as Khisanth
15:25 rafl Some Gimp artists in here? I'd like to have only the circle from the "Peoples Republic Of Perl" picture from the state of the onion 9. :-)
15:39 khisanth_ has quit IRC (Connection timed out)
15:39 hexmode has joined #perl6
15:55 wilx has quit IRC (Remote closed the connection)
15:57 khisanth_ has joined #perl6
15:59 khisanth_ has quit IRC (Client Quit)
16:00 Amnesiac has quit IRC ("Leaving")
16:03 TheMaaaa has joined #perl6
16:20 elmex has quit IRC ("leaving")
16:26 nothingmuch rafl: you'll have your circle in about 2 mins
16:36 nothingmuch http://nothingmuch.woobling.org/7peoples.png
16:36 nothingmuch should wokr on a transparent background well
16:36 nothingmuch err, dark background
16:36 wilx has joined #perl6
16:37 nothingmuch i can take away the white
16:38 nothingmuch slightly tweaked
16:38 gaal how do i trace from inside the parser? the following:
16:38 nothingmuch rafl: ping
16:38 gaal unsafePerformIO $ liftIO $ print (show ne)
16:38 gaal yields:
16:39 gaal Couldn't match `GenParser Char RuleState t' against `()'
16:39 nothingmuch i think liftIO is unnecessary
16:39 integral you could just use trace...
16:39 nothingmuch but you have to put the result somewhere
16:39 nothingmuch ghci :t trace
16:39 nothingmuch i forgot where
16:39 gaal integral: trace doesn't work either
16:39 nothingmuch it wraps unsafeperform io
16:39 integral it doesn't?!
16:39 integral trace (show ne) (return ()) -- normally works in any monad
16:39 gaal well, not the way i tried it
16:39 gaal oh, w/o the lift and stuff? let's see
16:40 nothingmuch yes, you don't need the lift, since trace does not let the data interact
16:41 gaal wow, trace just like that did work. i thought though that print foo was equivalent to trace foo (return())?
16:41 * nothingmuch goes to B.S.
16:41 nothingmuch has quit IRC ("leaving")
16:42 gaal anyway thanks ;-)
16:42 integral ah, I think you might have needed a return on the front of yours
16:42 * integral &
16:43 TheMaaaa has quit IRC (Read error: 104 (Connection reset by peer))
16:47 gaal okay, i obviously don't understand something about Env. integral, are you still there?
16:49 justatheory has joined #perl6
16:50 gaal in Parser, ruleClosureTrait, i basically do
16:51 gaal env <- getRuleEnv ; putRuleEnv env{ some modifications }
16:51 gaal but a print after that shows the modifications aren't in. what gives?
16:54 gaal oh wait! i was overwriting the current env with the caller. yikes!
16:56 gaal only question is, is it kosher to try to modify my envCaller via putRuleEnv env{ envCaller = ...} ?
16:59 gaal is my intuition correct, that this won't work and i have to modifyRuleEnv on the caller myself, and even that might not work? :)
16:59 pjcj has joined #perl6
16:59 Amnesiac has joined #perl6
17:15 nothingmuch has joined #perl6
17:21 Amnesiac has quit IRC ("Leaving")
17:26 gaal bah! my approach of writing the TVar in ruleClosureTrait is completely wrong; i have to think of some other way to communicate pragma requests.
17:28 nothingmuch why is it wrong?
17:29 gaal because it only gets called once
17:29 nothingmuch as opposed to?
17:31 gaal every 'use' or 'no' on a lexical pragma
17:31 nothingmuch oh, i see
17:32 nothingmuch i think
17:32 gaal i should be in ruleUsePerlPackage or thereabouts
17:40 gaal getting warmer...
17:42 gaal getting warmer...
17:45 hexmode has quit IRC (Remote closed the connection)
17:48 elmex has joined #perl6
17:55 gaal arr, this barfs:
17:55 gaal unsafePerformIO $ liftSTM $ writeTVar (envInitDat env) (idat { initPragmas = [] }
17:56 gaal (with an extra ')' at the end...)
17:56 gaal Couldn't match `GenParser Char RuleState t' against `()'
17:56 gaal why?
17:56 integral gaal: Are you sure you don't need a return in front?
17:57 gaal i don't want to return just yet...
17:57 nothingmuch don't STM and IO not like each other
17:57 nothingmuch ?
17:57 gaal just do the write
17:57 gaal well, this did work:
17:57 integral gaal: umm, unsafePerformIO has type IO a -> a
17:57 integral gaal: so if you're doing that inside another monad, you'd need a return
17:57 gaal let idat = unsafePerformIO $ liftSTM $ readTVar $ envInitDat env
17:58 integral unsafePerformIO turns a *monadic* thing, into a normal pure value, that can be assigned with a let.
17:58 nothingmuch not any monadic... an IO
17:58 gaal hmm. i don't care abot the return value actually
17:58 nothingmuch the reason it's unsafe, btw, is that it ruins referential transparency
17:58 nothingmuch if let is applied, you don't know if it checks again or doesn't
17:58 integral gaal: you still need "return".  return doesn't exit from anything, it just wraps a monad around something
17:59 * gaal tries
17:59 gaal enlightentment will come, one day.
18:01 gaal nothingmuch: i will guard against the unsaefness with NOINLINE; i hope that should be enough?
18:01 nothingmuch the unsafeness is probably not relevant to parsing because it isn't likely to happen more than once, right?
18:01 gaal whoo! look what i got
18:01 gaal pugs.exe: <<loop>>
18:02 gaal that must be the haskell runtime telling me something ;-)
18:03 tewk has quit IRC ("leaving")
18:04 nothingmuch =)
18:07 pasteling "gaal" at 192.115.25.249 pasted "what's loopin'?" (36 lines, 1.5K) at http://sial.org/pbot/13305
18:10 nothingmuch arrf
18:10 gaal hmmm?
18:11 * nothingmuch is having a hard time with a box he doesn't own, and the software that isn't installed on it
18:11 elmex %hash.k cool, it's huffmanized
18:11 * nothingmuch likes it
18:12 nothingmuch but doesn't want it to replace .keys
18:12 nothingmuch aliasing++
18:12 nothingmuch in fact, we should standarzie on the scheme of abbreviation
18:12 gaal urig's arguments are solid, imo
18:12 nothingmuch for example, i would like .characters method on a string, but also .chars
18:13 elmex %hash.k is ridiculous.... why not abbrev every method by 1 char? why not encode a complete perl-program in spaces and runlenght encode it ???
18:14 nothingmuch because .k is universally known
18:14 nothingmuch $str.c is not as obvious
18:14 nothingmuch though i wouldn't use .k on a hash - it doesn't sound plural... on a pair i would
18:15 gaal orthography isn't as interesting as semantics. help me find the loop please :)
18:15 elmex will there be also 'keys %hash' ?
18:16 nothingmuch elmex: ofcourse
18:16 nothingmuch i expect as a multisub
18:16 elmex ah
18:16 elmex k
18:22 gaal trace prints show the loop is happenning on the second readTVar
18:22 gaal so that does have something to do with the unsafety :)
18:23 nothingmuch gaal: do you think you could help port the mysql utf8 patch to sqlite?
18:24 Limbic_Region has joined #perl6
18:25 gaal nothingmuch: sqlite is okay with utf8 last i checked
18:25 nothingmuch it's saving data, but not inflating it
18:25 nothingmuch DBD::SQLite, that is
18:26 nothingmuch sqlite itself does utf8 happily
18:26 nothingmuch http://perlmonks.org/?node_id=491787
18:26 * gaal seems to remember a utf8 app he wrote with DBD::SQLite....
18:28 gaal sec, raiding the shallow vaults of my memory
18:33 gaal another sec, they're shallow, but twisty
18:33 nothingmuch =)
18:36 gaal darn, i just can't find this.
18:37 gaal okay, can you send me something i can 'make test' and see it fail?
18:38 gaal funny, someone sent me a query recently about a utf8 patch updated for DBD::mysql 3
18:39 Aankh|Clone has joined #perl6
18:39 nothingmuch $c->add_trigger("select", sub {
18:39 nothingmuch _utf8_on($_[0]);
18:39 nothingmuch });
18:39 gaal har, please send me a .t :)
18:39 nothingmuch Data::Structure::Util
18:39 nothingmuch no, that's not a test
18:40 nothingmuch that's a solution =)
18:40 nothingmuch s/(solution)/"$1"/
18:40 gaal ?eval <har> xx 3
18:41 nothingmuch no evalbot =(
18:42 gaal what's $c btw, the dbh?
18:42 nothingmuch the name of a class
18:42 nothingmuch cdbi class
18:44 gaal oh, right.
18:46 gaal heh, NPOV violation in latest Encode.pm docs (`UTF-8 vs. utf8`)
18:46 gaal so now that you have your solution
18:46 gaal s/(solution)/"$1"/; # :-)
18:46 gaal help me find mine :)
18:47 nothingmuch kay, fill me in
18:48 gaal http://sial.org/pbot/13305
18:48 * nothingmuch 's hair stands
18:48 gaal traces show the loop is at the second readTVar
18:48 gaal as you said, there's some ref transparency violated.
18:48 gaal what?
18:48 nothingmuch it's long ;-)
18:49 gaal oh, ignore the parts that are too indented
18:49 gaal the skinny on this is:
18:49 gaal when the parser sees 'use foo'
18:49 gaal it looks for foo::import and calls it
18:50 gaal (there's also handling for the case where &import doesn't exist; and for the symmetric &no, but those are immaterial now.)
18:50 gaal what i added was just this:
18:50 gaal before calling import, we initialize a TVar
18:50 gaal &import possibly writes to it
18:51 gaal and i just want to pick up the value it wrote to.
18:51 gaal s/to\././
18:51 gaal okay?
18:51 gaal the writing side of this, btw, is in Pugs::Internals::install_pragma_value
18:52 nothingmuch hmm
18:52 nothingmuch so idat is read correctly
18:52 nothingmuch then the import happpens
18:52 nothingmuch then idat' is read
18:52 nothingmuch and that's where it loops?.
18:52 gaal yes.
18:52 nothingmuch sounds hairy
18:52 gaal brb
18:53 nothingmuch what is getRuleEnv?
18:53 nothingmuch current lexical scope?
18:53 gaal current Env
18:54 gaal i may have gotten some details wrong: for example maybe install_pragma_value needs to write to envCaller, not env, but that's again immaterial.
18:54 nothingmuch what if the value was an IORef?
18:54 gaal well, it's very material, only not to the looping problem :)
18:54 nothingmuch remember that STM will undo and redo if there was a violation
18:54 gaal rather than STM? no idea
18:55 nothingmuch do you know exactly how STM works?
18:55 gaal i don't actually understand that bit
18:55 gaal heh
18:55 gaal nope.
18:55 nothingmuch okay, i'll explain in a sec
18:55 nothingmuch phone
18:55 gaal ok
18:55 gaal type ahead when you can; i'll raid the kitchen.
18:56 nothingmuch okay
18:56 nothingmuch STM works like this:
18:57 nothingmuch every read and write to/from STM is recorded in a journal
18:57 nothingmuch when an atomic { } finishes, the journal is checked
18:57 nothingmuch and if it's invalid, it's rolled back, and the block of code runs all over again
18:57 nothingmuch since IO is not permitted, it's sane
18:57 nothingmuch since haskell is pure, and most data structures don't need journalling it's fast
18:58 nothingmuch anyway, when two threads use a single TVar
18:58 nothingmuch and they conflict
18:58 Aankhen`` has quit IRC (Connection timed out)
18:58 nothingmuch then they will be rerun
18:58 nothingmuch until there is no conflict
18:59 nothingmuch conditions which are known to have not changed since the last fail cause a thread to block till the condition is changed, and the thread should be tried again
18:59 nothingmuch effectively what you get is semantics which are sometimes inefficient but usually good enough, without the need to lock anything
18:59 nothingmuch that's why it could loop
19:00 nothingmuch try an IORef - they have a similar interface
19:00 nothingmuch also, i think liftSTM in unsafePerformIO is silly
19:00 nothingmuch there should be an unsafePerformSTM
19:00 nothingmuch unsafePerformSTM $ readTVar $ envInitDat env
19:01 nothingmuch now, WRT the writeTVar what's up with the return?
19:02 nothingmuch and i think that maybe the readTVar and writeTVar, due to unsafe/lift are somehow not being finished synchronously, and are thus looping
19:02 nothingmuch but i don't really know
19:02 gaal that was just to get it to compile, per integral's suggestion
19:02 gaal okay, i'll try an IORef.
19:02 nothingmuch try unsafePerformSTM
19:02 nothingmuch then try IORefs
19:04 gaal k
19:07 gaal with unsafePerformSTM it still loops. trying the other one.
19:07 nothingmuch okay
19:12 gaal it wants a Show instance now...
19:12 gaal looking for examples of how to do that...
19:13 nothingmuch a show for IORef?
19:13 nothingmuch or for whatever you put in it?
19:13 gaal for (IORef InitDat), which is in Env
19:13 nothingmuch hmm
19:13 nothingmuch that'll be hard
19:14 nothingmuch read the IORef, and make 'data InitDat' have a 'deriving Show' in it
19:14 gaal data InitDat already derives Show (and Ord, which was also a problem)
19:15 gaal how do I do the "read the IORef" bit?
19:15 nothingmuch hmm
19:15 nothingmuch readIORef
19:15 nothingmuch i should thin
19:15 nothingmuch k
19:15 gaal src/Pugs/AST/Internals.hs:1038
19:15 nothingmuch nopaste your current code
19:16 gaal the problem is not in my new code, it's in the old code where i just s/TVar/IORef/ - src/Pugs/AST/Internals.hs:1038
19:16 nothingmuch svk pulling
19:16 nothingmuch haven't done so in 2-3 days
19:16 gaal it isn't new
19:21 dduncan has joined #perl6
19:26 Jahandar has joined #perl6
19:34 Khisanth has quit IRC ("Leaving")
19:34 Khisanth has joined #perl6
19:38 gaal well, i'm off for tonight. see 'ya!
19:38 gaal zzzZZZ &
19:40 Juerd good night
19:42 * Aankh|Clone goes to sleep.
19:42 Aankh|Clone G'night.
19:42 Aankh|Clone has quit IRC ("MacIntosh: computers with training wheels you can't remove [Time wasted online: 1hr 3mins 56secs]")
20:16 elmex has quit IRC ("leaving")
20:20 elmex has joined #perl6
20:21 Limbic_Region has quit IRC (Read error: 110 (Connection timed out))
20:22 nothingmuch has quit IRC (Read error: 113 (No route to host))
20:34 Khisanth has quit IRC ("Leaving")
20:34 Khisanth has joined #perl6
20:41 dudley_ has quit IRC ()
20:47 khisanth_ has joined #perl6
21:04 Khisanth has quit IRC (Read error: 110 (Connection timed out))
21:36 Jahandar has left
21:49 pdcawley_ has quit IRC (Remote closed the connection)
21:50 pdcawley_ has joined #perl6
22:03 iblechbot has quit IRC (No route to host)
22:25 nothingmuch has joined #perl6
22:27 nothingmuch morning
22:27 nothingmuch or evenning
22:27 khisanth_ is now known as Khisanth
22:28 Khisanth has quit IRC ("Leaving")
22:32 * nothingmuch wonders whether he should work on anything in his present condition
22:33 Khisanth has joined #perl6
22:54 dduncan its about 1600h here
22:54 nothingmuch 2 here.. 0200
22:54 * nothingmuch is headed to bed
22:55 dduncan then good night to you
22:55 nothingmuch you too =)
22:55 dduncan later
22:55 nothingmuch all i have to do is get up from my current seating accomodation ;-)
23:47 mark_lar has joined #perl6

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

Perl 6 | Reference Documentation | Rakudo