pugscode.org <Overview Journal Logs> | smoke/win2k (occasional): xrl.us/fqum (4537/8, r2343), Mac OS X (62/4506, r2362), Linux (60/4482, 2267) | pugs.kwiki.org
Set by integral on 26 April 2005.
SamB continues to wait for darcs to finish applying patches 00:01
gaal how do i discard the return value of a function? 11:23
Couldn't match `GenParser Char st' against `(->) a' 11:24
Expected type: GenParser Char st
Inferred type: (->) a
i want to call it for it's (gasp!) side effect :)
castaway makes an [off] alias.. 11:25
Corion Hmmm. Seems like I'm running against a POD parser bug. I'll leave my documentation for the tests as comments then. 11:26
Hmmm. No, no POD parsing bug, but something triggered by something in my comments. Overeager gobbling, I guess 11:27
broquaint You can't, gaal, it's against the law.
autrijus gaal: const
gaal 's always been the outlaw.
Corion ... as soon as I use C<%> somewhere in my comment. I guess it's the quote operator being overeager again ... 11:28
11:30 chady is now known as chady_
Corion Ah. Likely it is because less-than ("<") gets parsed as the beginning of a quoted list. Ugh. 11:31
Whitespace has now officially entered Perl. 11:32
:)
broquaint laments the loss of his Haskell book
Corion $error<e1-9 # is not parsed as what you think.
$error < e1-9 # is what you think 11:33
broquaint If anyone sees "Haskell: The Craft of Functional Programming, Second Edition" in an second-hand shop in London - it's mine.
castaway ,) 11:35
gaal parsechelp wanted 11:56
how do i return from my #line-processing rule?
i want to return something like "nothing further to parse here" (right?) 11:57
jabbot pugs - 2393 - Modulus and division by zero now have te 11:58
autrijus gaal: no... 12:04
you just return a Exp
gaal that won't compile
autrijus are you doing it in the same level as ruleBlockDeclaration ? 12:05
er
I mean
ruleDocBlock
if so, you need to say
option emptyExp ruleStatementList
gaal i added a choice to ruleStatement
autrijus as your final statement
broquaint Sorry if this is a dippy question, but where is "App" defined?
autrijus gaal: you need to add it to ruleStatementList
right below ruleDocBlock
broquaint: it's defined in AST.hs
data Exp = Noop | App !String ![Exp] ![Exp] 12:06
gaal k; what should i then return?
autrijus gaal: that's all you need to do
broquaint Marvellous! Thanksm autrijus.
autrijus option emptyExp ruleStatementList
will handle the rest for you
no need to say return
again, look at how DocBlock does it
broquaint: np :)
gaal looking.
broquaint Aah, AST.hs makes everything much clearer. 12:07
jabbot pugs - 2394 - Added more encompassing VRef handling to 12:08
Corion autrijus: Is $error<1e-9 valid Perl6 ? Or should there be whitespace after $error ? 12:11
autrijus Corion: there needs to be a whitespace. 12:13
Corion OK, then it's not a pugsbugs candidate, but a syntax error in tests :)
... because Pugs seems to accept $error<1 as long as there never is a matching ">" sign anywhere :)
gaal oops, the existing $?POSITION is wrong. put this in a file and run it: 12:14
use v6;
say $?POSITION;
Corion gaal: It's off by one token I think - see the failing test in t/magicals/caller* 12:15
gaal the second two reports are identical.
this is regardless of my change 12:16
Corion gaal: Oh. That's really weird then ;)
Limbic_Region was thinking he could do what he wanted without regexen using junctions but now isn't so sure 12:17
gaal also, i *think* die always reports line 1 as location of error.
Limbic_Region Without researching junctions, I guessed that all( any(1,2,3) == any(7,3,8) ) would do what he wanted
but it doesn't
Corion gaal: I've seen that, yes.
Limbic_Region is there a way to find out the values of a junction equality match? 12:18
Corion Limbic_Region: What's that surrounding all() for ?
Limbic_Region: .values
jabbot pugs - 2395 - Fixed small (undetected) syntax error in
Limbic_Region Corion - doesn't work
Corion ... but that only goes one level deep.
Limbic_Region at least not in my test cases
Corion "doesn't work" ?
gaal position is completely broken, i'm afraid :(
Corion Limbic_Region: I did some expansion in t/pugsrun/09-* 12:19
Limbic_Region ok - will take a look
thanks
autrijus gaal: ?POSITION is completely broken because the last statement did not carry pos info
that is a known issue that will be fixed soon
gaal "last statement" where? 12:20
Corion gaal: Last statement in the source code :)
gaal: Add a fourth $?POSITION
gaal ah, i see what you mean. 12:21
Limbic_Region Corion - still greek to me 12:22
gaal but die is broken regardless: say $?POSITION / die / say $?POSITION; still gives line 1.
Corion Limbic_Region: my @foo = map { $_.values } any(<foo bar baz>); for @foo -> $x { say $x } 12:23
Limbic_Region basically what I want is not a bool response from any() == any() but rather a match (don't care if it is first, last, all)
Corion Ah. Don't know if that works.
Limbic_Region that's why I thought the all( any() == any() ) would be enough context hint to DWIM, but apparently not 12:24
gaal what part of the parser is responsible for comments? i can't see much treatment for them, and my #line patch doesn't work so i'm conjecturing that the directive gets stripped in the lexer or something?
ah yes: P.commentLine in Lexer.hs 12:25
seems like Rule/Token.hs needs hacking? this is getting a little hairy 12:29
autrijus gaal: I think you can just kill the comment processing 12:33
gaal: and handle it by yourself
gaal ah, so if the line doesn't match a #line directive, just ignore it? that does make sense, yes :) 12:34
autrijus yeah :)
so in Perl6Def: 12:35
, P.commentLine = "#"
gaal are there other #directives we might want?
autrijus becomes
""
no idea. prolly not
gaal all right, can always refactor later. 12:36
Corion r2395 - datenzoo.de/pugs/win2k.html 12:41
pugscode.org <Overview Journal Logs> | smoke/win2k (occasional): xrl.us/fqum (25/4542, r2381), Mac OS X (62/4506, r2362), Linux (38/4508, 2381) | pugs.kwiki.org 12:41
Corion pugscode.org <Overview Journal Logs> | smoke/win2k (occasional): xrl.us/fqum (25/4542, r2395), Mac OS X (62/4506, r2362), Linux (38/4508, 2381) | pugs.kwiki.org
nothingmuch ooh how fun! 12:41
i'm getting an oppertunity to learn how to write ms devstudio add-ins! 12:42
castaway woo :)
nothingmuch wonders if he starts walking to work what the chances of being hit by a truck are going to be
castaway wonders if they're anything like excel add-ins
Corion nothingmuch: At least you won't be fat when the truck hits you :)
nothingmuch Corion: =) 12:43
maybe i can squirm out of it
i need to be able to arbitrary recolor and highlight (bg) of code
s/of//; 12:44
Corion nothingmuch: Develop on Zaphod maybe :) Colouring is "easy". The "editor" part is what doesn't work though ;)
nothingmuch what is zaphod? 12:45
Corion nothingmuch: zaphod.datenzoo.de - my text editor in JavaScript :) 12:46
castaway ,)
nothingmuch oh you poor baby
who made you write an editor in js?!
Corion Text colouring can be done via CSS.
nothingmuch: I did this to myself, for fun :)
Limbic_Region Corion - sent my junction question to p6.l 12:47
nothingmuch can't edit though
Corion nothingmuch: You should be able to ...
Limbic_Region seen stevan
jabbot Limbic_Region: stevan was seen 19 hours 54 minutes 31 seconds ago
nothingmuch safari
that doesn't make sense, I was talking to him later than that
maybe he shutup in chat
Corion the bot was offline for 8 hours or so 12:48
nothingmuch ah
nothingmuch wonders whether you can do dynamically decided syntax highlighting 12:49
Corion nothingmuch: Not without implementing it in JS
(or any other programming language)
nothingmuch Corion: i'm not touching JS, thankyouverymuch
=) 12:50
Corion nothingmuch: Ah, but JS is a cool language
broquaint want() has been implemented, right?
nothingmuch i mean in the ds api
broquaint: yeah, it returns a string
Corion broquaint: As a string, yes.
nothingmuch anyway, /me represses that stuff
broquaint Groovy, thanks guys.
nothingmuch i have a bit of time for .wrap
broquaint Am looking at implementing caller() atm, but the Pugs code is teh scary. 12:51
Corion broquaint: caller() is partly there, as $?POSITION. Broken tho'
(and $?CALLER::POSITION , and $?CALLER::CALLER::POSITION)
qmole :)
Corion ... maybe you can steal from there?
broquaint Am going to try for the function first then work on the magical vars. 12:52
nothingmuch knows how it's done
i can explain the code if you like
broquaint Well, I wouldn't be adverse to some stealing ;)
nothingmuch (For CALLER::)
broquaint Where's CALLER:: implemented atm?
nothingmuch Evalh.hs
broquaint Currently I'm poking around Eval.hs to see how other code works/is implemented. 12:53
Ah, there it is.
autrijus $?CALLER::SUBNAME
nothingmuch broquaint: basically while it does is sort of like: 12:54
while(my ($sigil, $fqn) = split(/CALLER::/, $fqn)){ my $context = $context->caller->context };
and then once you're out of CALLER:: it looks for "$sigil$fqn" inside the "current" context 12:55
context being pad, not eval context
except that it's not really pad it's more than that
broquaint teh 'splode 12:56
castaway ,)
nothingmuch while(($sigil, $fqn) = split(/CALLER::/, $fqn)){ <pop context>; $fqn = "$sigil:$fqn" };
castaway pins up a "Beware: Scary stuff" sign
broquaint What's $fqn? 12:57
nothingmuch fully qualified name
castaway fully qualified..
nothingmuch like '$?CALLER::POSITION'
broquaint Aha, right.
castaway (too slow)
nothingmuch after the loop it's '$?POSITION'
but with a change of lookup origin, ofcourse
and, ofcourse, it's not a loop in haskell =) 12:58
broquaint It's recursion, right?
nothingmuch yes
broquaint Is this happening around lines 207 - 222?
nothingmuch in p5: 12:59
i'm translating right now
broquaint Cool, thanks. 13:00
jabbot pugs - 2396 - * compiler repaired. 13:08
pugs - 2397 - * fix minor display glitch
pugs - 2398 - * return type matching disabled for now
nothingmuch perlbot nopaste
perlbot Paste your code here and #<channel> will be able to view it: sial.org/pbot/<channel>
pasteling "nothingmuch" at 212.143.92.226 pasted "findVarRef in p5" (19 lines, 841B) at sial.org/pbot/9687 13:09
autrijus Corion: 09-dash-uppercase-c fixed
nothingmuch enable syntax highlighting, lots of it is comments
Corion autrijus: Just saw it - smoke already running ;)))
nothingmuch oh, and i threw in a p6 proto for fun ;-)
autrijus Corion: r2398? cool 13:10
nothingmuch autrijus: this needs some slight clarification on toGlobal
autrijus Corion: r2396 was b0rken
Corion Yep - 2398 just started
autrijus toGlobal is just
nothingmuch autrijus: btw, my smoke loop is running stably now
if you need this stuff and corion is asleep or something, svn up runs every 5 minutes 13:11
and if something is new, a smoke is rerun
autrijus s/^(\W+)(?<!\*)/$1*/
cool.
nothingmuch: where is the url again?
nothingmuch so there is about 20-25 minutes of latency, worst case scenario
nothingmuch.woobling.org/pugs_test_status/ 13:12
autrijus danke
mind if I put it to pugscode.org?
nothingmuch prego
it should be there
broquaint Cool stuff, thanks, nothingmuch.
nothingmuch or maybe in the wiki
autrijus I'll put it to the frontpage
nothingmuch put the link to the wiki page on the frontpage
that way people can edit it
broquaint So implementing caller() wouldn't be unlike implementing a symbol table crawler in p5?
nothingmuch because there are more platforms than just OSX 13:13
broquaint: exactly, except it's still safe, and somewhat elegant =)
autrijus jhowitz is not here hmm.
broquaint Now when I implement I can say things like "Just do" and "Maybe foo" ;) 13:14
nothingmuch autrijus: i will whip up a kwiki page
autrijus nothingmuch: cool
nothingmuch anybody want to mine a list of URLs from the backlogs?
jhorwitz: what's the URL of your smoke? 13:17
autrijus hey jhorwitz!
nothingmuch pugs.kwiki.org/?SmokedPugs
jhorwitz mornin'
jabbot pugs - 2399 - Tests: lvalue subroutines and operator o 13:18
jhorwitz nothingmuch: i have yet to start smoking. :)
nothingmuch ah
autrijus jhorwitz: so I repaired the compiler backends 13:19
jhorwitz but i can smoke it on solaris
nothingmuch did you collect some links?
autrijus jhorwitz: I seem to recall you want subs in parrot backend?
jhorwitz it would make my day. :)
nothingmuch oh right, that was Jonathan 13:20
sorry!
jhorwitz np 13:21
nothingmuch what are gaal's URLs? 13:22
Coke_ ~~
nothingmuch nevermind, found them 13:23
autrijus hey Coke_
jhorwitz: now the problem is I have ~zero idea of how to do that
jhorwitz autrijus: in parrot? 13:24
autrijus yeah
nothingmuch autrijus: did you add smoke results to the frontpage?
autrijus nothingmuch: I did
nothingmuch the wiki or pugscode.org?
autrijus sub factorial ($x) { $x ?? $x * factorial($x-1) :: 1 }
nothingmuch oh i see 13:25
autrijus print factorial(10);
what should this be in IMC?
nothingmuch point to pugs.kwiki.org/?SmokedPugs instead
Coke_ do what in parrot?
Corion r2398 - datenzoo.de/pugs/win2k.html - isa.t broke, not.t broke, some other distributed failures
autrijus Corion: that two lines
sub factorial ($x) { $x ?? $x * factorial($x-1) :: 1 } 13:26
print factorial(10);
Coke_ you mean Coke? =-)
jhorwitz autrijus: here's a start: www.parrotcode.org/docs/compiler_faq.html
Coke_ eh, the compiler faq sucks. hang on, I can get you some untested code...
jhorwitz it does suck, but is there anything else? 13:27
autrijus I mean Coke :)
Coke_ no. And by all means, read it, yes. patches (and even complaints) welcome.
nothingmuch mumbles somehting about autrijus and add
Coke_ autrijus - are you assuming that the x is an integer, or a PMC? do you care for the purposes of the example? 13:28
autrijus Coke_: all PMCs
pugs has no unboxed types
nothingmuch autrijus: about STM & perl 13:29
autrijus nothingmuch: heh, it's only been 3 minutes
and it's up now
autrijus mumbles something about nothingmuch and add
nothingmuch in perl5 when I code defensively i use local, and destructors, and whatever extensively (my talk will discuss this) 13:30
Coke_ nopaste?
(where's a nopaste url for this disc?)
autrijus perlbot: nopaste 13:31
perlbot Paste your code here and #<channel> will be able to view it: sial.org/pbot/<channel>
autrijus "How do I create nested subroutines?
PIR doesn't support nested subroutines. You have to emit subroutines one by one. If lexicals of the outer subroutine are visible inside the nested sub, you have to include the outer pad depth in new_pad opcodes."
yow!
castaway PIR?
jhorwitz PIR == IMC 13:32
nothingmuch brb
autrijus so suddently all my envDepth work paid off.
pasteling "Coke" at 170.3.8.253 pasted "Sample factorial" (23 lines, 319B) at sial.org/pbot/9688 13:33
Coke_ I don't have a copy of parrot handy, but that will hopefully work.
autrijus Coke++
trying to run it
Coke_ if you give me any errors from parrot, I can debug it remotely. =-)
autrijus Null PMC access in get_bool()
Coke_ oh, whoops.
autrijus bwahaha
autrijus is reminded of the same error in Pugs long, long ago 13:34
vCast: Cannot cast Val to VBool
pasteling "Coke" at 170.3.8.253 pasted "# sub factorial ($x) { $x ?? $" (23 lines, 349B) at sial.org/pbot/9689
jhorwitz dislikes that error very much
Coke_ (I was passing in an "int", not an "Integer". so there was no pmc arg for factorial to grab.
autrijus Null PMC access in set_integer_native()
Coke_ *sigh* 13:35
line?
autrijus in its infinite wisdom, there is no line number
Coke_ grumble.
castaway grins.
Coke_ if I had access to a parrot, I could fix this in short order.
autrijus $P1 = x
$P1 = $P1 - 1
that worked.
Coke_ ah.
jhorwitz castaway: witness test-driven programming. ;-) 13:36
Coke_ Yah, I never remember quite how much sugar IMC provides. =-)
castaway *g* jhorwitz
autrijus now it says factorial 10 is 1.
fancy that!
castaway funky
slightly off there
Coke_ could be my logic. ^_^
autrijus Coke_: no.
the x pmc is shared apparently
Coke_ ah.
autrijus Very Bad.
Coke_ well, we probably shouldn't be mucking directly with the arg passed into us, eh? 13:37
if you add a $P10 = clone x at the beginning of factorial, and then s/x/$P10/ from that point down in the sub, does that work?
jabbot pugs - 2400 - * some minor work on the Haskell compile 13:38
autrijus still bad.
I have this sinking feeling that registers are reused.
I'll use local PMCs.
Coke_ calling the sub should save the register off, I think. 13:39
(IMC is supposed to handle all that for you.) (unlike PASM)
autrijus maximum recursion depth exceeded in file 'x' near line 14
hrmph 13:40
my fault
but fixing that yields 1 again
I give up :-/
Coke_ can you post what you've got at the moment?
noooooo
autrijus alright. give me a min
I'll make pugs generate it 13:41
instead of by our mortal hands
Coke_ realizes that he can grab a snapshot of parrot and build it, even if svn isn't working on this box. 13:42
jhorwitz fixes IMC 13:45
Coke_ ?
jhorwitz in factorial:
$P1 = new Integer 13:46
$P2 = new Integer
autrijus jhorwitz: nopaste!
jhorwitz doh
pasteling "jhorwitz" at 216.52.77.2 pasted "factorial IMC" (23 lines, 329B) at sial.org/pbot/9690
autrijus works! 13:47
jhorwitz++
nothingmuch back
anyway, to continue (add my ass):
Coke_ ah. yah, that'd work in place of cloning. Giving a new target PMC for the value to live in.
nothingmuch stm's usefulness in try { } catch {}
try : sterile {
}
if any exception is raised *everything* is as it was before 13:48
it's basically atomic { } with a roll back on error
and a retry on atomic fail
how easy is that in pugs?
if we can demo it i think there can be no way to deny it's usefulness
but sometimes it's hard to force that on people 13:49
(and btw, if you care, as I said: my talk is going to touch this crap in the recipe book part)
theorbtwo Wow, looks like Big Things are happening in the chan.
autrijus nothingmuch: it is trivial in pugs 13:52
nothingmuch GHC has builtin STM?
autrijus nothingmuch: sure.
castaway yeah, damned if I know which, all gobbeldegook to me :)
nothingmuch goodness
autrijus see Control.Concurrent.STM
I suggest writing some same STM in ghc just to play with it 13:53
theorbtwo Autrijus, is there any chance of making Eval's fail throw a pugs-level exception?
autrijus use unsafeIOtoSTM happily
theorbtwo: retError does that
nothingmuch autrijus: i am asking to buy a feature with my paypal subscription:
when you have free time please add atomic
autrijus theorbtwo: maybe we need to make Eval a newtype
theorbtwo: so that we can redefine its fail
nothingmuch: sure 13:54
Coke_ oh, does autrijus do paypal? what's his address? =-)
autrijus Coke_: pugscode.org
nothingmuch and allow try { atomic { } } to DWIM
spec or not
because i think this stuff is looked down upon too much
autrijus try { atomic {} }?
it's just
nothingmuch it's these situations where language features (like timely destruction!) *really* save your ass
autrijus atomic { ... } orElse { #noop }
nothingmuch autrijus: in perl6 syntax? 13:55
autrijus nothingmuch: in GHC syntax
nothingmuch i mean add some p6 goodness
autrijus I'm saying that try{atomic{}} is ambiguous
because atomic rollback is not an error
nothingmuch a try { } catch that will roll back on failure
no need to temp
that's what i want
i want to run some code, and undo all it's effects if it dies 13:56
theorbtwo autrijus, I know retError does that, but I was thinking that instead of manually checking for things that will cause GHC to error, we can let GHC error, ad simply do the right thing when it does.
autrijus got it.
theorbtwo: yes, and you do that by redefining "fail"
nothingmuch lets you be very loose by doing things like
autrijus as well as MonadError instance
nothingmuch $account->add($money);
autrijus theorbtwo: because ContT doesn't do that for is
us
theorbtwo: we need to switch Eval from a type to a newtype 13:57
nothingmuch $account->recalculate_overdraft(); # error
castaway transactions, nm?
theorbtwo OK, think I grok.
nothingmuch exactly
autrijus theorbtwo: and add those instances ourselves
nothingmuch but in p6, with no special features in $account.ref
castaway sounds fun
nothingmuch or $account.isa, or whatever
Coke_ what version is pugs at?
nothingmuch i know i would kill for it right now, in the stuff i've been doing for the past 6 months or so
castaway 6.2.1.plussome
theorbtwo 6.2.1, r2400 even. 13:58
castaway nm, use db transactions ?
nothingmuch castaway: it's not the same
and i do
again, this is what my talk is about
castaway figured
autrijus nothingmuch: Java and C# both have STM libraries now ;)
nothingmuch how to try to leverage these tools and behaviors, apply KISS, shift complexity
autrijus it's something that can be retrofitted
castaway sounds like "everything should be magic" .) 13:59
Coke_ wonders if autrijus can buy a cup of coffee with coke's donation.
castaway we'll be lucky to turn up to YAPC at all, atm..
nothingmuch so that you can make things break correctly when they do
autrijus: so again, my request is to retrofit it into the design, today
theorbtwo Magic can be a goodness.
nothingmuch castaway: magically there's not much magic going on
theorbtwo Of course, when you know the secrets, it doesn't seem quite so... magical.
nothingmuch the point is reliability
autrijus: i'm buying a feature, if you will =) 14:00
is that OK with you?
castaway hidden magic is good, until something fails, and you try to get a sensible error message from the user ,)
nothingmuch castaway: exactly
castaway is currently having such problems with a QA personage. 14:01
autrijus nothingmuch: I don't really like to do that when the threading model is 5005threads, honestly.
nothingmuch: and I have no idea how ithread perl6's model is gonna be.
nothingmuch heck, i don't care about threads ATM
autrijus oh!
nothingmuch i would like to be able to get hypotheticals without declaring them 14:02
autrijus I see what you mean
yes.
mj r2399 - 939/4573 subtests failed, 79.47% okay. test.wikidev.net/Pugs_tests?action=history
see 2311 vs. 2399 - test.wikidev.net/Pugs_tests?title=P...;oldid=774
nothingmuch hypothesize on object attributes in code i called
autrijus single thread transactions
nothingmuch hypothesize globlas i don't know i'm touching
etc etc
autrijus hmm
nothingmuch i don't think 'let $var' is good enough for reliability
it's a nice feature, but it only goes so far
autrijus so we roll back _everything_ 14:03
nothingmuch everything to the point before the try
autrijus except of course bytes already printed
nothingmuch but copy the reference
autrijus copy what reference?
nothingmuch sorry
not reference
exception
i think we should think about a lexical pragma 14:04
nothingmuch is slipping on freud
whether IO is allowed
as for bytes printed: we can't control that
to allow users to arrange for perl to throw a fatal error before any really side-effectful op is performed
but this is not very important now 14:05
IMHO
theorbtwo nm, wouldn't that have to be a dynamic pragma to be useful?
nothingmuch theorbtwo: yes, dynamic
theorbtwo++ 14:06
autrijus thinks some more 14:07
nothingmuch ofcourse, these things should be nestable too 14:08
but we already have that, right?
autrijus yup 14:09
there are an easy way and a hard way
the easy but slow way is to save the full continuation
up to the nearest delimiter
and if things fail 14:10
we just resume that outer continuation
with all the IORefs in the old value
nothingmuch how is the exception copied?
autrijus when you resume some continuation you can add whatever symbol to it
nothingmuch okay
autrijus basically you dump the Env
(as we already do when you do pugscc) 14:11
nothingmuch what's the hard way?
autrijus the hard way is to use journaling
just like in the STM paper
it will be massively faster.
but then that will not be portable to parrot ;) 14:12
Coke_ note that $P2 = new Integer in that new sample is apparently unnecessary
nothingmuch do we reimplement journalling for the pugs data types?
(btw, i think as a prototype it's OK that it's not parrotable for now)
(i just want to be able to show that this stuff really works. I think p6l is not yet appreciative enough of what haskell has to offer)
autrijus nothingmuch: well, for a starter, switch all our IORef to TVar 14:13
nothingmuch: you can do that.
want to help? :)
just change all IORef to TVar
nothingmuch yes
autrijus all newIORef to newTVar
read, write too
and when you do
liftIO $ readIORef ... 14:14
pasteling "Limbic_Region" at 129.33.119.12 pasted "Can someone tell me if this works - I forgot to burn a CD again today :-(" (22 lines, 549B) at sial.org/pbot/9692
autrijus define a liftSTM
that does the same thing
liftSTM is just
liftIO . atomically
nothingmuch let me read up on STM details first
autrijus nothingmuch: sure, Control.Concurrent.STM and GHC.Conc
nothingmuch what is IORef, really? a monadic container?
Limbic_Region anyone ? 14:15
nothingmuch autrijus: i'm writing this down
so please continue
okay, i grokked IORef 14:17
autrijus cool. 14:18
Limbic_Region no one has time to tell me if that code snippet worked? :-( I promise to burn a CD tomorrow - I promise 14:19
nothingmuch Limbic_Region: one sec
autrijus Limbic_Region: ??::
Limbic_Region thanks 14:20
theorbtwo IORef is a reference to a mutable variable.
nothingmuch theorbtwo: yah
pasteling "Limbic_Region" at 129.33.119.12 pasted "Can someone tell me if this works - I forgot to burn a CD again today :-(" (22 lines, 551B) at sial.org/pbot/9693
nothingmuch Limbic_Region: too trigger happy?
Limbic_Region ternary fix per autrijus - thanks
autrijus @list not @$list
nothingmuch ah
Limbic_Region needs another one too
autrijus you don't need to write ->{} 14:21
{} is enough
pasteling "Limbic_Region" at 129.33.119.12 pasted "Can someone tell me if this works - I forgot to burn a CD again today :-(" (22 lines, 549B) at sial.org/pbot/9694
Limbic_Region autrijus - following examples from tests/examples
but that shouldn't prevent it from running though
nothingmuch really wants 'is pure' 14:22
subcalls that can remain thunk
Limbic_Region nothingmuch - did the latest incarnation work?
theorbtwo nm: is cached is closest.
nothingmuch still SSHing through things
theorbtwo: it's not the same, and i don't like 'is cached'
is pure is a description
is cached is a request, that implies is pure
theorbtwo I know. Thus "closest". 14:23
autrijus is cached is just cached.
it doesn't mean it's pure.
nothingmuch autrijus: well, to sane readers it should
autrijus still not really. 14:24
nothingmuch &infix:+ is pure
that's what I meant
what do you mean then?
sadly, i don't see what's so hard to "get" about these, that it's such an issue... we can make this distinction internally
&infix:= is io_free
autrijus unsafePerformIO has two guarantees
nothingmuch &say is not pure
autrijus 1. it doesn't matter _when_ it gets run
2. it doesn't matter _how many times_ it gets run
"is pure" means both
"is cached" only means 2. 14:25
nothingmuch true
but i know i'll never say is cached on an impure sub without commenting that that's the desired effect
also: this distinction is useful for combining data 14:26
junctions should not realy interact with most of the non pure builtins directly
it rarely makes sense
pure ops can create new junctions, even lazily
io_frees shouldd behave like that too, but strict evaluation is guaranteed 14:27
autothreading is an exception to this rule, IMHO
theorbtwo + isn't neccessarly io-free, though, on two random arguments.
It is for most arguments, certianly, but not neccessarly all.
nothingmuch + with MMD in place a more specific + might not be pure
but the + which takes two numbers is pure 14:28
the coercion of some arbitrary object into a number might be impure
but that is done before evaluating the actual code which + does: it's in the parameter binding 14:29
theorbtwo That seems like splitting hairs; it's impossible to call a function without doing parameter binding first. 14:30
nothingmuch right, but if parameter building requires no action
1 + 1 bind two ints, pure types, into +
+ can stay pure 14:31
it can be optimized at compile time
since it's pure, and we know the values
theorbtwo Ah, I see.
nothingmuch it can be delayed till it's used
the former policy is already in place in perl5
if we do sub CONSTANT { 10 * 10 } at compile time 14:32
why not sub FACT_OF_FIVE { 5! }
where the user defines &infix:! is pure ?
theorbtwo So infix:+(Int a, Int b) is math_pure, but coerce(COM a) returns Int is not.
nothingmuch it's actually much simpler once you think about how to implement
right 14:33
if $obj does Int the methods of that role might or might not be pure
theorbtwo (However the hell you spell the operation that does implicit coercions.)
nothingmuch thinks the p6 design team is too far from the implementation detailas 14:34
most of it is "perl6 will be powerful enough to be the internals of perl 6"
and if we are doing such ad-hoc lazy list semantics, why not this stuff too? 14:35
i don't see any room for performance benefits or flexibility if lazy lists will interact with impure constructs very early on in their lives 14:36
it's probably going to be more of a bug source than a performance/simplification oriented feature
why not gather -> is pure { take { } }? 14:37
what if i want to do RCP in a gather block?
it will time out unless i force flatten the list
RCP - RPC
theorbtwo (remote copy is a form of remote procedure call.)
nothingmuch yeah, it is but i meant something more simple ;-) 14:38
s/simple/generic/
poll: who else thinks the current lazy list semantics are not very good? 14:39
i would like to know if it's worth bringing up in chat at all
or whether i'm an uneducated minority 14:40
theorbtwo I suspect you are an educated minority.
I'm not horribly clear on what the exact semantics are with lazy lists and when their lazyness is colappsed.
nothingmuch what about autothreading? same opinions? 14:41
appearantly they are flattenned when stuff happens
theorbtwo Autothreading as it currently exists strikes me as too much of a good thing.
nothingmuch stuff being anything IOish that could have touched the lazy list
what about Any|Junction?
theorbtwo Any|Junction means "please don't autothread, just pass me the whole junction as one object"? 14:42
nothingmuch yup 14:43
i think it should be the default in any case
and <<$maybe_a_junction_param>> should be a request for autothreading
and call some_naive_sub(<<$junction>>); 14:44
should also autothread, but from the caller perspective
basically it's like hyper ops, except that the hyper is oriented around the data, and not the operation
nothingmuch suspects that all these 'use junctions' pragma ideas will lead freepan to be 4-5 separate repos
Class::DBI
Class::DBI::Junctive
etc etc 14:45
meaning:
we will have some styles of writing
those who are chickenshit and don't want implicit autothreading of possibly impure code
Limbic_Region out of curiosity - is there a way to get pugs to spit out the line number of an error to troubleshoot better? 14:46
nothingmuch (and main($junction) means that we will have a lot of this)
those who only use junctions in if($val == 1|2)
and will use 'no junctions' in their scripts
and thus give up on much of freepan
someone? anyone? say i'm an idiot, or that i'm right 14:48
autrijus?
nothingmuch *sight* and gives into uncertainty 14:50
s/sight/sighs/
theorbtwo NM: I suspect most people will avoid junctions like the strange quantum beasties that they are.
nothingmuch i think they can be very useful when used naively, with these semantics:
theorbtwo is($foo, 1|2) both succeeding and failing when $foo is 1 gives me the heebie-jeebies.
nothingmuch builtins that can't eat them die
anything else gets passed down 14:51
theorbtwo: me too
shouldn't it mean 'if $foo is eq 1 or $foo is eq 2 then ok'?
for anything else junctions are composed by default
maclean can I ask a question about building pugs on osx?
nothingmuch maclean: sure
theorbtwo
.oO(We might even be able to answer it, but we certianly can't if it remains unasked.)
14:52
maclean I get the 'old' "Unknown pseudo-op: .subsections_via_symbols" problem
I understand that it's due to gcc version conflicts...
nothingmuch anyway
if i have sub avg (@list) { for @list -> $item { $sum += $item }; $item / @list } 14:53
masak question: what's the easiest way today to generate html from kwid? 14:54
by hand?
nothingmuch masak: i think there's some kwid goodness
if we pass in avg(1, 5, 2|3) we should get back a junction
avg(1, 5, 2), avg(1, 5, 3)
look in svn.kwiki.org and freepan
lots of unreleased stuff
but i don't know any details
masak nothingmuch: ok
nothingmuch anyway, back to junction semantics:
if the user can parallelize avg, they can request to autothread
it can be done automatically if avg is pure 14:55
the return value is always a junction
except where:
my @blown_up = <<avg(1, 2, $junction)>>;
in which case expansion is after avg returns, semantically 14:56
maclean hohum, back to ramachandran plots...
nothingmuch i see no use in usefulness here
it takes 4 chars to get cool semantics on SMP, where you know it's safe
it takes 4 chars to do something unexpected but useful
theorbtwo: opinion? 14:57
theorbtwo You had me until this last discussion. I'd expect under normal semantics (IE with no syntatic markers) for avg(1, 5, 2|3) to return 8/3 | 9/3. 14:58
nothingmuch exactly
when you want that to autothread:
avg(1, 5, <<2|3>>)
you still get back a junction, except that execution order is undefined, and possibly parallel
theorbtwo ...not because avg gets run twice, with different @lists, but becuase it gets run once with three arguments, one of which is 2|3. 14:59
nothingmuch if avg knows it can do that, it can put that in it's prototype:
sub avg (<<$param>>) {
eventually it's the += that junctions it up
theorbtwo: exactly
when it finds a junction
it doesn't care, actually
theorbtwo Exactly.
nothingmuch only the lowest level builtin primitives actually junction up
theorbtwo So what's with the syntatic markings of things we don't care about?
nothingmuch explain please 15:00
(also, this has a huge performance benefit, and makes exceptions consistent
sub_that_might_die($junction).
if it's body does verification of state, and then does stuff with it's data
Limbic_Region Is there something obvious I am missing in how to debug the following error: unexpected "s", expecting ";" or end of input, NonTerm SourcePos "foo.p6" 4 1 15:01
nothingmuch with autothreading semantics it will have to verify and die for each element of the explosion of the junction
Limbic_Region what is the 4 1 at the end?
theorbtwo line four, column one, I think.
nothingmuch show us foo.p6
Limbic_Region sial.org/pbot/9699
nothingmuch it's the s of the sub lazy_merge 15:02
Limbic_Region still trying to get that piece of code working - hardburn has been running it giving me the errors and I have been tracking them down and fixing them
nothingmuch why it happens is hard for me to say
Limbic_Region: what OS are you using? 15:03
we could arrange for a pugs build
Limbic_Region nothingmuch - my problem is that I didn't burn a copy of ghc/pugs to bring into work
I can't install but I can certainly unzip
nothingmuch theorbtwo: what did you mean by 'syntatic markings'? 15:04
too big a download?
so download one of jonathan's builds
www.jwcs.net/~jonathan/perl6/
theorbtwo nm: <<foo>>
nothingmuch ah
that is like flatten
except it means to explode across threads 15:05
theorbtwo Why not sub foo ($bar is threaded) ?
Limbic_Region thanks nothingmuch
nothingmuch could be
it's just symmetric with >>op<<
and it looks pretty obvious that it's going out
autrijus sorry, back. 15:06
factorial.p6 now compiles to parrot just fine.
nothingmuch and texas/french quotes are associated heavily with parallelization/aggregation
nothingmuch would like to write about this to p6l 15:07
i am ashamed to admit i have no context though
what I see as wrong seems to have been defined as right before i dabbled with p65
gah, can't type today
also, theorbtwo: what's more readable? 15:08
for (<<@list>>) { }
or for (all(@list) is threaded) {} ?
i think both are ok
theorbtwo for (all(@list) is threaded) {...}
nothingmuch but that the second is less natural
theorbtwo 1: The second syntax tells me the combinator that is being applied, the first does not. 15:09
nothingmuch for (<<all(@list)>>) { # same thing
why are we constructing a junction at all in there, btw?
nothingmuch is puzzled
theorbtwo 2: The first syntax looks like I should pay lots of attention to the <<...>> and is distracting.
nothingmuch what's a combinator got to do with it in this example?
theorbtwo Nothing.
nothingmuch you should pay a lot of attention =)
theorbtwo Which brings me to 3: What does that have to do with anything?
nothingmuch i don't know why junctions imply parrallelization in this context 15:10
theorbtwo Aren't we talking about the behavior of a junction as a paremter to a function?
Where's the function?
nothingmuch for (all(@list)) { }
according to s6 or something that's autothreaded
go explain that to a newbie, eh?
theorbtwo Huh?
nothingmuch to me it reads like 'foreach (@list) { }' just with slight rephrasing
it executes the for block asynchroneously
theorbtwo I know what it means.
But why does it do that? 15:11
nothingmuch okay, why should it mean that?
because it's a junction
theorbtwo It looks like a for loop over a single value to me.
nothingmuch and it's being passed to a block-isa-closure
that also looks like a for loop over a single value to me
but it's not, it's an iteration of all the items of the array
in an undefined order
theorbtwo But it's the block that's magical.
nothingmuch it's not magical
it's a plain block
theorbtwo for (@list) async{} looks cleaner to me.
nothingmuch for (all(@list)) -> Any|Junction $var { }; # i think this does what we want 15:12
theorbtwo It's a block with a parameter that is bound strangely.
nothingmuch theorbtwo: why a new thing? i don't see how it's consistent
theorbtwo I might need an extra pair of curlies there, if async doesn't construct a block, but mearly calls one. 15:13
nothingmuch otoh all(@foo) is threaded is just as clear
ah, that's explicit threading
theorbtwo Yes.
nothingmuch i think it's something entirely different
it's not 'maybe thread this up'
autrijus this now compiles: nopaste.snit.ch:8001/2449 15:15
(to parrot, that is) 15:16
jhorwitz autrijus++
autrijus :)
theorbtwo Impressive. 15:17
autrijus committing.
jhorwitz is now one giant step closer to mod_pugs..
castaway oooh
jabbot pugs - 2401 - * compile subroutines to Parrot. 15:18
autrijus fact.imc: nopaste.snit.ch:8001/2450 15:19
jhorwitz woohoo!
ingy hola 15:23
Limbic_Region is for @foo -> $_ is rw { $_ = 2 }; # supposed to work?
broquaint is = no-op IIRC
Limbic_Region nevermind - I just saw it was a todo test
broquaint Unless ...
ingy does anyone here know when the hackathon ends and the hotel stay begins? 15:24
Limbic_Region so that means I can't trade a test for a feature?
Limbic_Region adds for @foo -> $_ is rw ( ... } to his wishlist and tries to find another piece of p5 code he can translate to p6 15:26
Corion Limbic_Region: I think that "is rw" already works. Or maybe at least parses. 15:27
Limbic_Region not in for blocks Corion 15:29
It works for subs though (at least it looks like it does)
Corion Aaah - yes - I was thinking of subroutines, not for blocks
Limbic_Region and the point of my exercises isn't to work around limitations in Pugs by doing @foo[ $_] = @foo[ $_ ] 2 for 0 .. @foo.end 15:30
I am trying to show how easy the transition from p5 to p6 is going to be for the benefit of others - so I will wait 15:31
grr - this like always eats plus symbols
@foo[ $_ ] plus 2;
Corion Limbic_Region: Maybe URL-encode your "plus" signs? This sounds like a badly written CGI parser to me ;) 15:32
%20 15:33
D'oh - my irc client is not CGI :)
Limbic_Region hmmm \
theorbtwo BTW, %20 is a non-shortest-form URL encoding of a space, and not a URL encoding of a +. 15:34
Limbic_Region knew that
theorbtwo Yeah, I was pointing that out to Corion.
Corion theorbtwo: I know too. I assume that Limbic~Region can't type plus, because he's chatting through a CGI en-/decoder 15:35
Limbic_Region in any case, there is already a todo test for the feature I want so I will look for more code for now that is already doable with Pugs in its current state
Corion Limbic_Region: You could port my JavaScript homenode button :)
theorbtwo Corion: You have a pugs embedded in your browser to be able to execute inline p6? 15:36
Cool!
Corion theorbtwo: Your hovercraft is full of eels!
theorbtwo Mein Luftkissenfahrzeug ist voll auf aale? 15:39
s/aale/Aale/, of course. 15:40
Corion "full of" == "voller" :) 15:41
elmex hmm 15:42
Corion Oh. .isa now looks interesting: (mkType "Array") instead of Array
... unfortunately that's not Haskell code but the output of say() :)
Limbic_Region use.perl.org/~Limbic%20Region/journal/24401 # Fun with Pugs (my journal) 15:46
autrijus Corion: please change the show to showType
thanks :)
Corion :))
... I even found out myself which file to change (Prim.hs)! Yay me ;) 15:50
Corion starts a fresh smoke 15:51
Corion away
jabbot pugs - 2402 - Changed type display again, so isa() is 15:58
nothingmuch evening 16:04
theorbtwo It's evening already?
nothingmuch i think 16:05
i'm going to be an asshole
Corion The sun is still shining here :)
nothingmuch you guys are more up north
here the sun is just starting to go disappear 16:06
anyway: asshole behavior:
i'll post some quick polls to p6l:
Corion r2402 - datenzoo.de/pugs/win2k.html
pasteling "jhorwitz" at 216.52.77.2 pasted "Why does this not compile using the parrot backend?" (10 lines, 120B) at sial.org/pbot/9700
nothingmuch "are you happy with autothreading semantics?"
"are you happy with lazy list semantics"
etc
jhorwitz autrijus: check out the paste
nothingmuch with concise answers
and i'll try to draft out my ideas, and see which sematics please more people 16:07
and then try to argue
what do you guys think?
Corion Ooooo. And a new exmple program now compiles for Parrot. Yay :) 16:08
nothingmuch: Language design is not about pleasing people :)
nothingmuch why not?
i find it unpleasing to have to write defensively around language misfefatures
Corion There was an article on how to design gaming worlds, and that what newbies want makes not for good/long lived gaming worlds
autrijus jhorwitz: fixing that
nothingmuch it's not about fun
it's about hard issues 16:09
Corion nothingmuch: You can do it to (re)raise discussion, but don't put any meaning to the numbers.
nothingmuch it's not really about numbers
of people
it's about the number of issues
Corion ... for example, I suspect that many Perl6 people haven't seen many non-C-like languages.
nothingmuch: Aaah - these questions are [x] <- check here # style questions
nothingmuch not really 16:10
and i think that there are good resolutions for these things
i have big issues with some behavior
trying to foresee how i will suffer
is it clearer now, what my purpose is? 16:11
theorbtwo "I think these semantics are bad, because they make this easy thing hard, and this hard thing impossible. Aren't these other semantics better?" 16:12
jhorwitz autrijus: string interpolation isn't working either -- try running with parrot once you fix the sub call. 16:14
jhorwitz wishes he could help more with the haskell side of things...
nothingmuch theorbtwo: good premise 16:16
jhorwitz: don't underestimate the importance of QA
jhorwitz++
mj mj votes for "for @a -> $val is rw {}" too
autrijus jhorwitz: fixing 16:17
Limbic_Region mj - there is already a todo test for it
Corion can somebody please look at t/subroutines/lvalue_subroutines.t test number 3 ? It's an eval_ok test, but I think it should be a fails_ok test.
Limbic_Region IIRC, all todo test at least get looked at before each release
Corion Limbic_Region: There is no established process, but I comb through them from time to time.
jhorwitz nothingmuch: i just hate problems i can't fix myself. ;-) 16:18
Corion ... and m*666 does a thorugh(sp?) test on them by s!todo_!!g (resp s!:todo(1)!!g)
nothingmuch jhorwitz: haskell is not as scary as it looks
jhorwitz i know -- just haven't had the time to dedicate to it
Corion jhorwitz: You can get along pretty well with cargo-culting in Haskell
jhorwitz goes to lunch 16:19
nothingmuch no! no eat!
haskell! learn
Limbic_Region well, I just started learning p6 jhorwitz - Haskell is next on the list
nothingmuch calories are for weenies
Limbic_Region of course, I will likely start learning Haskell long before I have any proficiency in p6
theorbtwo sighs. 16:20
I should eat more.
However, I also want to figure out how to make newtype do my bidding.
Limbic_Region offer it lots of $$$ ? 16:21
theorbtwo wishes he had lots of $$$ handy.
ā‚¬ā‚¬ā‚¬ would come in handy as well. 16:22
Limbic_Region heh - I go sign the papers to put me in debt up the wazoo in less than 4 hrs - I know what you mean theorbtwo
theorbtwo We actually just restructured some of ours. Not a hugely lower payment, but every little bit helps. 16:23
Corion At least in .de, interest rates are pretty low at the moment. 16:24
Limbic_Region I am amazed at how many bank type folks (even those that work in the mortgage department) don't understand amortization
You could sense the glazed eyes when I said "making the minimum payment spread over 2 payments a month instead of 1 would reduce the 30 year loan by 6 years" 16:25
mj for '*.t' in 't' :recursive, :skip_dirs('.svn') $line =~ s{,\s*\:todo\(1\)}{}g; $line =~ s{force_todo[^;]+;}{}g; 16:26
Tests results history ... test.wikidev.net/Pugs_tests?action=history
Limbic_Region as if to say "if you are only making the minimum payment, how is it going to take less time to pay off the loan"
Corion Limbic_Region: The bank makes more money if you never amortize and only pay the interest. 16:27
So the employees aren't educated to that fact.
... and mathematics is something most people eschew
(although there are instructive tables) 16:28
jabbot pugs - 2403 - Promoted succeeding todo tests to real t
Corion Limbic_Region: But are you sure your bank calculates your interest/amortization per day? I imagine they calculate it per month and then it doesn't matter when you actually pay it as long as it's the same amount. 16:29
Limbic_Region [Corion] - yes, it is compounded daily 16:30
Corion Limbic_Region: Then every day counts, indeed.
Limbic_Region [Corion] - when interest is only calculated monthly, it is still calculated on the average daily balance - so it would still help 16:31
otherwise you could pay it 1 day early and not get charged for any interest
Corion Limbic_Region: Not if they don't use the average daily balance but a fixed date.
mj URL can be usefull for backward compatibility check before release. And for "who broke Pugs" :-)
Limbic_Region needs to stop thinking this is the chatterbox
mj plus plus
Corion Limbic_Region: Heh - no, you're thinking of the wrong end of the fence. You have to pay for 30 days accumulated interest on the 1st. If you pay earlier, nobody cares. :) 16:32
Limbic_Region hasn't ever been involved with a loan like that Corion, but he will take your word for it 16:33
Corion Limbic_Region: I don't know what the lending customs in .us are. Here, you get a fixed mortgage with monthly interest payments due a certain day. 16:34
Limbic_Region oh - there is every type of loan under the sun here
for instance - there is an "interest only" loan - who in their right mind would ever take that?
Corion Limbic_Region: If you plan on winning the lottery ? :) 16:35
Limbic_Region is going to win the lottery but he doesn't know when
Corion ... or a business that can deduct the interest but not the payments for the building, and wants to "rent" the building from the bank. 16:36
pugscode.org <Overview Journal Logs> | smoke/win2k (occasional): xrl.us/fqum (25/4554, r2403), Mac OS X (62/4506, r2362), Linux (38/4508, 2381) | pugs.kwiki.org 16:36
Limbic_Region I guess one might be looking at a short term investment and hoping that the appreciation in value exceeds that of the interest of the loan of the period of occupency 16:37
Corion Limbic_Region: True - if you plan on reselling quickly, you could take up such a mortgage... 16:38
autrijus er.
jhorwitz: how do you concat two PMCs anyway 16:39
Limbic_Region autrijus - give them plenty of alchohol - they will find a way to come together
autrijus heh.
Corion In t/data_types/hash_ref.t, a cast error is untrappable by Pugs currently. That is bad, isn't it ? :) 16:41
(there should be no cast error there anyway, but that's beside the matter :) ) 16:42
anyway - I need to gather some groceries outside ...
&
Limbic_Region do all hash keys need to be quoted now? so %hash{foo} isn't acceptable? 16:44
theorbtwo %hash{foo} is not.
Limbic_Region k 16:45
theorbtwo %hash<foo> is, with the <>s doing double duty, both quoting and hash-dereferencing.
Limbic_Region right
PerlJam theorbtwo: %hash{foo} is fine ... it just means something different ;-) 16:47
Limbic_Region right - foo is expected to be a function right?
PerlJam I believe so 16:49
It might be more like "foo is expected to be a name that we've seen before" though
nothingmuch what is the name for 'all', 'any' etc? combinators?
mj IMO, nmake clean doesn't remove src/*.o and src/*.hi
Limbic_Region is going to have a hard time transitioning between p5 and p6 thinking though the code itself is easy so far
nothingmuch - junctions? 16:50
nothingmuch no, junctions are the result
i think
or maybe they are junctions, and junctive values are the result?
Limbic_Region i see where you are going
well, using Q::S - the values are the eigenstates - so I would say junction/value
nothingmuch okay 16:52
i have a first draft
pugs.kwiki.org/?NothingMuchIsaAsshole
deals with autothreading
next i willl handle fp vs oo vs imperative balance 16:53
then lazyness/io
and then i will poll P6L, and try to see which semantics seem more problematic, mine or the current ones
Limbic_Region meeting & 16:57
theorbtwo Nice name. 16:58
nothingmuch is constantly editing
theorbtwo I think the example we had before is better -- avg(3, 4, 5|6) # I'm not quite sure what score I got on the last assignment... 17:02
nothingmuch could you edit it? i'm not sure how to distill that
jabbot pugs - 2404 - Use "given" (patch by misc) 17:08
nothingmuch theorbtwo: are you doing avg? or should i just change it? 17:13
theorbtwo You should do it.
I don't like changing other people's words. 17:14
nothingmuch what do you think should be different? just the line?
i usually need help with words =P
ingy gugod: ping 17:18
gugod ingy: pong
nothingmuch gugod: ping2
did you look at that spork/s5 stuff?
ingy gugod: where is the mail forwarding on freepan
I thought [email@hidden.address] forwarded to ttul 17:19
gugod ingy: freepan.org mail is handled by 0 mail3.zoneedit.com.
ingy grr 17:20
we can maybe triage freepan when you are here
nothingmuch goes to make tea
castaway tea! 17:22
gugod nothingmuch: yes I did, that looks quite ok
nothingmuch: except 17:23
nothingmuch: except the -showconf ... I wonder if it's necessary
autrijus jhorwitz: all fixed! 17:29
nothingmuch -showconf is something else
i needed it to be sure of somet stuff
i think it's helpful to someone just starting to dabble with spork 17:30
to see what parameters are available
autrijus jhorwitz: factorial, your "hello, world", mandelbrot etc
jhorwitz autrijus: and i just got back from lunch
autrijus++
nothingmuch autrijus: if you have (time & patience) > threshold (not autothreaded!): pugs.kwiki.org/?NothingMuchIsaAsshole - covers one part of three
i'd like to have some feedback from someone whose seen the insides of these messes 17:31
autrijus what insides? :)
nothingmuch pugs, silly
autrijus <- not cabal
oh. you mean implementation.
nothingmuch yep
i don't care about the insides of desing 17:32
they are very talented people
very smart
but with all due respect to genius, this is all in theory
and that isn't enough
theorbtwo Not only that, but some of them, I think, don't code much.
nothingmuch at least not daytime job style code 17:33
where you have factors like idiot predecessors
other people's modules which don't always play nice, despite usefulness
ingy gugod: ping
nothingmuch workarounds in old code for problems that were fixed in more recent versions of (perlsome_module)
ingy gugod: where is FreePAN::SVNAdmin??
nothingmuch .... the list goes on.
gugod ingy: tpe.freepan.org/repos/gugod/FreePAN-SVNAdmin/ 17:34
autrijus woot. hangman.p6 is very close to working.
(targetting parrot)
need file ops
gugod ingy: oh but we didn't finish the pre-commit-hook hack stuff
ingy gugod: ok, sorry, I'm being dumb
I just want it to make some new accounts 17:35
autrijus jhorwitz: hacking on src/Pugs/Compile/Parrot.hs should be very straightforward 17:37
jhorwitz: so if you found a failure, try if you can fix it :) 17:38
jhorwitz: you want committer bit?
jabbot pugs - 2405 - * rewritten monadic Parrot compiler. mos
nothingmuch ilogger->admin++ 17:49
jhorwitz autrijus: should have commit already (just haven't comitted anything yet) 17:51
autrijus so 17:55
I think I'll change all :todo(1) to :todo 17:56
because it's vastly clearer
objections?
nothingmuch yeah, that's nicer
autrijus: any prelimenary comments about me being an asshole?
cognominal I thought the default value of trait/property was trait/property dependant 17:57
autrijus cognominal: here it is but simple pair. 17:58
and simple pair assumes (1)
nothingmuch www.abridgegame.org/pipermail/darcs...02161.html <-- makes you smile
autrijus :)
nothingmuch: so, you know, larry agrees with you 17:59
nothingmuch really?
autrijus and he thinks that autothreading should only be activated when there is a lexical pragma
nothingmuch how come it's this way then?
autrijus "use junctions", "use autothread"
nothingmuch i think autothreading should have nothing to do with lexical pragmas
autrijus i.e. when the user explicitly use it.
nothingmuch i think there are means of combination more suitable 18:00
autrijus at the caller's site
nothingmuch that is better than nothing
but remember the 1st and 2nd rule of perl cgi programming:
use strict;
use CGI;
do we want the 1st and 2nd rule of p6 sanity to be 'no autothread'?
PerlJam nothingmuch: no junctions 18:01
cognominal the third is: use less; # :)
nothingmuch why no junctions? they are useful at the end of the day
but i must admit it does make things look a little rosier
PerlJam (I'm beginning to think that junctions will cause more confusion than problems solved) 18:02
autrijus ok. so to answer your question
integral Why do you need to disable autothreading? Can the compiler make a mistake?
autrijus 01:59 < nothingmuch> how come it's this way then?
nothingmuch PerlJam: i would love to be able to do computations or predicate checking on N values at a time
autrijus the answer is that, well, damian argues very strongly for the current way
nothingmuch I just don't want to risk confusing myself in the process
PerlJam nothingmuch: me too, but you and I are "advanced" users :-)
autrijus and has fielded off all oppositions ;)
nothingmuch autrijus: i'll google for a good excuse.. thanks!
autrijus check p6l for at least ten times of "disable autothreading" thrads. 18:03
threads
theorbtwo s/times/tons/
nothingmuch autrijus: the last 5 times or so since i was subscribed i was not so convinced, but then again i didn't have the patience to really look into it
PerlJam After all the p6l discussion on it, I've decided that autothreading is one of those things that will need to be enabled by default and used before we know if it should really be disabled by default. 18:05
nothingmuch isn't the overload::StrVal lesson enough of an argument against such behavior? 18:07
autrijus PerlJam++ # wise
nothingmuch and this is much much more fatal
Corion Oooo - more Parrot compiling fixes in r2405 ! 18:08
Limbic_Region 8 unexpectedly succeeded? 18:10
autrijus cognominal: yeah, and with this change, we are very close (three days or so of work) at actually being able to run the test suite with --runparrot
Corion Heh: # Got: pugs.exe: fnord
Limbic_Region I thought mj marked all passing todo tests as real tests
nothingmuch Limbic_Region: they keep changing =) 18:11
Corion Limbic_Region: Only for his private testing, not in the real branch
Corion is fixing the unexpected compilation successes
Maybe I'll add more examples to the test suite.
nothingmuch oh
autrijus Corion: you surely can, but I don't think that work in the long run 18:12
the idea is once Test.pm works for parrot
we have a "make smoke BACKEND=Parrot"
or something like that
that tests parrot regularly
Corion autrijus: Ah, that's a good idea too
nothingmuch autrijus++
beh 18:13
ingy autrijus: have you seen Test::Chunks yet?
Corion Whoa. Somebody touched many/all tests?
(in r2406)
nothingmuch is reading and reading and reading and still can't find a solid argument as to "why" damian wants it this way, not only how and what.
autrijus ingy: yes. good idea! 18:14
Corion I want (implicit) autothreading, so the language gets parallel without me worrying about it.
autrijus Corion: me. all :todo(1) is now :todo
Corion Aaaah.
nothingmuch Corion: if you're not going to worry about it, who will when it breaks?
ingy autrijus: I want to port to Perl6 as soon as we get classes
Corion nothingmuch: I expect me to write parallelizable code. :)
autrijus ingy: I'll let you know what 6.28.0 comes out :) 18:15
nothingmuch Corion: so you don't want to use any useful modules that didn't program defensively enough?
Corion ... at least for the cases where I use any() and all() (and sort() and map() and grep() )
nothingmuch: Those modules then obviously aren't useful :)
nothingmuch or would you rather just say "this is OK to parallelize'
autrijus but probably around 6.2.5 will have usable classes already
ingy autrijus: it is my cleanest Spiffy code, so I'll be interested in how much Spiffier Perl6 version is
nothingmuch Corion: i'm thinking of a witty retort 18:16
autrijus wow. memory game is super fast now
Corion nothingmuch: No, I want the language/library to have less guarantees about the execution order. If anybody knows that map/grep/any/all will parallelize, nobody will rely on not being parallel.
autrijus each flip takes less than a second
nothingmuch they just push it down
btw- my semantics don't do away with autothreading
Corion: so how can we convert p5 to p6?
autrijus the performance has really came a long way 18:17
Corion nothingmuch: By manually converting.
... or by using Ponie
PerlJam nothingmuch: that's Larry's job.
nothingmuch Corion: i sort of agree with that, but i doubt it will happen
autrijus ... or PPD
nothingmuch PerlJam: larry is not a god
ingy gugod: I'm having a bad freebsd day. where is the http config again?
PerlJam nothingmuch: no, but it's is a problem he is actively working on. 18:18
autrijus /usr/local/etc/apache2/httpd.con
f
Limbic_Region nothingmuch - I believe PerlJam was referring to the fact that he was working on...nevermind
PerlJam beat me to the punch
ingy autrijus: thx
PerlJam Limbic_Region: type faster! ;)
jabbot pugs - 2406 - * change `:todo(1)` to `:todo` for great
gugod ingy: ever newly installed software config goes onder /usr/local/etc
Limbic_Region I likely do type faster, I was looking for the thread where Larry talked about it
gugod s/onder/under/
ingy gugod: gotcha 18:19
18:19 sbkhh is now known as Odin-
Limbic_Region PPD has last remaining memory leak plugged, perhaps someone wants to consider using it to do the p5 -> p6 conversion when Larry mentioned his project to change the parser 18:19
ingy gugod: now we will also be hacking MacKwiki when you arrive
gugod FreeBSD -- A /usr/local OS
ingy: of course
ingy I need Tiger
gugod ingy: I have some secret module for you already
ingy :p 18:20
gugod ingy: which I can't release yet
ingy: not after Tiger (shhhh...)
ingy does it contain the Tiger dmg? :p
gugod haha
PerlJam "I've discovered a lovely proof of this theorem but it's too big to write in the margin here"
decay hm, there's a warez copy out, isn't it?
PerlJam gugod == Fermat? 18:21
gugod There is no enough disk space so I can't make the tarball for releasing it
autrijus Limbic_Region: where is PPD?
nothingmuch wonders whether this time it's a good idea to wait 2-3 weeks before installing a new OS
Corion nothingmuch: Wait for Tiger service release 1 :) 18:22
nothingmuch decay: prolly gold masters or the first dev dvd
Limbic_Region autrijus - PPD from AS?
nothingmuch Corion: i won't mind version 0 if it's stable
autrijus Limbic_Region: PPD from Larry :) 18:23
PerlJam FWIW, here's an email about what Larry is doing regarding converting perl5 to perl6: groups-beta.google.com/group/perl.p...786ee32357
Limbic_Region where is it status wise you mean?
sorry - I am confused 18:24
I really should be heading home preparing to sign my life away as they say
Limbic_Region closes in an hour and a half
autrijus :) 18:25
good luck!
jabbot pugs - 2407 - Promoted unexpected -CParrot compilation 18:28
Corion r2407 - datenzoo.de/pugs/win2k.html 18:31
I'm adding tests for things that already work but don't seem to have tests. Like that my $ref = { foo => 'bar' }; say $ref[0] # dies 18:44
18:46 Aankh|Clone is now known as Aankhen``
ninereasons autrijus, the interactive shell is misbehaving. 18:51
it requires subs to be declared with 'my'
sub hello($x){"hello $x"}
say hello 'world'
*** Error: No compatible subroutine found: &hello
my sub hello($x){"hello $x"}
sub {...}
say hello 'world'
hello world
r2405 18:55
jabbot pugs - 2408 - New test to check that Arrayrefs used as 18:58
Shadow_ Hallo Guys 19:04
Guys, i has test1.pl, that declare 'my $a = "Hello World"', and after that call 'require "test2.pl". In test2.pl exist next string 'print $a'. But undefined error raised. How i can export all variables to test2.pl from test1.pl ?
theorbtwo Hello, shadow.
Are you sure you're using perl 6? 19:05
mauke hahaha
Shadow_ yeah
mauke where did you get it? 19:06
PerlJam Shadow_: then the short answer is: you can't.
Shadow_ mauke: it is my code
mauke Shadow_: no, perl6
Shadow_ PerlJam: why? I need split my big file to several little
mauke: no matter
mauke Shadow_: idiot 19:07
theorbtwo Don't do that in perl 6. You shouldn't do that in perl 5 either, but that's a question for another channel. 19:08
Shadow_ theorbtwo: hehe, all does in one big file? :)))
theorbtwo No. 19:09
Export subs, not variables, generally, and do it with "is exported".
What error message does that get?
mauke hmm, can you say 'my $lexical is exported;'? 19:10
Shadow_ theorbtwo: ok, thanks
theorbtwo: but if i need create one header file, that contain big collection of constant, and need to use these constant in several files? 19:11
theorbtwo: is there better way to do it?
castaway sounds C-ish 19:12
autrijus ninereasons: fixed.
Shadow_ castaway: yeah, you right
autrijus committing
theorbtwo Create an abstraction that doesn't use magic numbers, and do that.
autrijus you can use "our" :)
castaway ick
autrijus and that would work.
castaway constants are subs in p5, what are they in p6 ? 19:13
autrijus they are variables in perl 6.
but subs are really only variables.
theorbtwo our $foo := 10 is exported 19:14
?
autrijus that works
castaway so one can export them?
theorbtwo Er, ::= 10.
PerlJam perl6 will have enumerated "constants" too
autrijus sure can.
castaway ok then.
autrijus oh. ::=.
we can actually implement that now.
autrijus goes
theorbtwo You can export variables in perl 5 as well, it's just generally considered poor form.
autrijus someone write a test?
Shadow_ YES!
autrijus my $x; say $x; $x ::= 9; 19:15
should print 9
Shadow_ I forget about 'our' prefix!!
autrijus: thanks!
autrijus np
mauke hahaha
ninereasons that was fast, autrijus; thank you.
autrijus np :)
Shadow_ last year not perl programming, only C :) 19:16
PerlJam Shadow_: and now perl6?
Shadow_ PerlJam: yeah, perl6 and perl5 19:17
Shadow_ write linux drivers
mauke Shadow_: you might want to read perl.plover.com/FAQs/Namespaces.html
Shadow_ mauke: 10x 19:18
mauke no, once or twice should be sufficient
PerlJam heh 19:19
donate.perlfoundation.org/
Something sent there should be sufficient
jabbot pugs - 2409 - * repair interactive shell. 19:28
Shadow_ wrote perl script on 4000 lines and wanna split it to several parts :) 19:36
autrijus my $j; $j = 9; $j := 10; my $x ::= $j; $x;
this prints "9". nice.
someone please add a test? :)
jabbot pugs - 2410 - * `my $var ::= expr` works. 19:38
nothingmuch summons stevan 19:43
masak how does this summoning thing work, anyway? :) 19:47
nothingmuch i don't know 19:48
it worked once for me
i just tried it, and 2-3 minutes later stevan was here,
masak maybe he reads the html logs
theorbtwo Perhaps it was just luck.
nothingmuch in that case he reads them through a crystal ball =)
masak it could be possible to drop a bot in here which notifies you of someone mentioning your name 19:50
Corion Summoning depends on the phase of the moon, the right location, and of course, the right sacrifices!
For some entities it is enough to say their name three times. 19:51
masak sounds scary :) what if i changed my name to stevanstevanstevan? :) 19:52
Corion masak: I'm not sure if it works for stevan :)
masak lol
Corion Chat!Zilla has the habit of playing a sound file whenever my name gets mentioned here. 19:55
nothingmuch Corion: Corion Corion! 19:56
nothingmuch makes music
Corion nothingmuch: Only one beep per line :)
... consider nopasting it :)
nothingmuch =/
mauke that means we should append "Corion" to all our lines 19:57
using black on black text
jabbot pugs - 2411 - * It's not PIR, it's IMC 19:58
Corion Heh. examples.t dives into an infinite loop/heap exhaustion :) 20:02
... and nested_pairs.t finds no compatible subroutine &skip anymore ... Weird
ninereasons you might need to make install, to get a new Test.pm, Corion ? 20:05
(guessing)
Corion ninereasons: Hmmm - usually my script does Just that, but I'll retry. skip() was there before, so I wonder why it should not work anymore now ...
... and I never make install - I only do make(). 20:06
autrijus Corion: it worksforme
nested_pairs too
Corion I'll nuke it from space and recompile then... I get various failures anyway ...
jabbot pugs - 2412 - * tweak some CGI installation instructio 20:08
ninereasons Corion, t/examples/examples.t (examples/functional/fp.p6) is hanging now for me, also. 20:10
Corion ninereasons: It hangs because a subprocess hangs - kill pugs and it should continue.
ninereasons exactly right, Corion
Corion ... It'll output a message that the heap is exhausted soonish otherwise (256MB here)
autrijus got that too 20:12
fixing 20:13
theorbtwo wonders why AUTHORS sometimes ends up with extra \cM 20:14
autrijus because DOS editors ;)
fixed, sorry. 20:15
theorbtwo Shouldn't svn magic take care of it?
autrijus r2413
theorbtwo: prolly not
Corion Maybe we should set up guard scripts, like cvs can have
... automagically kick off a smoke test on checkin for example :) 20:16
(and automagically add a newline at the end of the file, especially for me ;) )
theorbtwo The other users of the box might not like that suggestion.
Corion theorbtwo: Bah. :)
jabbot pugs - 2413 - * oops, multi sym has to be in order. 20:18
theorbtwo autrijus: I finally figured out the secret syntax of newtype, I think, but now I see some very strange-looking type errors. 20:19
src/Pugs/AST.hs:1309:24:
Couldn't match `Eval Val' against `Eval Val'
Expected type: Eval Val
Inferred type: Eval Val
In the definition of `force': force (MkThunk c) = c
In the definition for method `Pugs.Types.Thunk.force'
Corion theorbtwo: That's a mighty strange error indeed :)
theorbtwo (They aren't all quite that silly, but many of them look quite odd.)
BTW: The secret syntax is that the stuff after the constructor name is not the argument to the constructor. 20:21
autrijus theorbtwo: whoa. you sure you changed AST.hs-boot as well?
theorbtwo Oh. Whoops, that might have something to do with it.
Ah, that's much better. 20:22
autrijus now to actually add instances :) 20:23
(most should be really straightforward)
let the typechecker be thy guide
theorbtwo Right -- "No instance for (Monad Eval) arising from...".
autrijus and mostly it should be just unpack the type and delegate downwards
return a = MkEval (return a) 20:24
nothingmuch gaal++
autrijus etc.
theorbtwo Cool. 20:25
Hm, I named my constructor Eval, not MkEval, so the existing code doesn't need to change.
Is this a problem?
autrijus call it MkEval :) 20:27
it doesn't matter either way.
the existing code won't need to change.
Corion Give it a different name and then introduce Eval = MkEval 20:31
:-)))
(I prefer (and use) evil = eval; so I can then have evil($string)) 20:32
autrijus newtype (Eval a) = MkEval ...
theorbtwo uses x as the type variable just cauze.
autrijus that's fine. 20:33
theorbtwo newtype (Eval x) = MkEval (ContT Val (ReaderT Env IO) x)
autrijus yup.
theorbtwo instance Monad Eval where {a >>= b = MkEval (a) >>= MkEval (b)}
autrijus I think you can derive Typeable too.
deriving (Typeable)
theorbtwo In any case, I now get an error in Pugs.Types.Hash No instance for (Monad Eval). 20:34
It hasn't yet compiled AST.hs, only the -boot, and the docs (section 4.6.9) explictly say /not/ to put instances in the -boot file. 20:35
autrijus hm. 20:38
I think we lose.
so: probably introduce a 20:39
retEval :: a -> Eval a
export that in AST.hs-boot
implement it in AST.hs as
Corion Heh. pugs.exe -e "" -ne say # doesn't anymore.
autrijus retEval = return
and use retEval in Types.
theorbtwo: makes sense?
Corion: oh right.
the $_ defaulting is borken
Corion autrijus: Ah 20:40
autrijus would work if you say 'say $_'
add / untodo tests
Corion Hmmm. Maybe I should make the "-n" code more defensive :)
r2413 - datenzoo.de/pugs/win2k.html # some breakage, due to not defaulting to $_ at the moment 20:41
theorbtwo That feels like a big breaker in the way you use Eval vs the way you use all other monads... though if you only have to use it in the things compiled between AST-boot and AST, it might be OK. 20:42
autrijus theorbtwo: that is the idea.
I think that's okay.
Corion: it's repaired
Corion resmoking ;) 20:43
autrijus sorry ;) 20:44
theorbtwo That didn't help -- same error.
autrijus huh?
theorbtwo I'd assume it has a problem with >>= missing as well as return.
autrijus oh. argh! 20:45
try putting instance declarations in .hs-boot :-/
theorbtwo Donno why it would complaign about the last thing in the file first, though.
Same thing.
Can we move the definition of Eval to a file that's compiled earlier?
autrijus yes.
Internals would be it. 20:46
and define Monad there
instance Monad, that is
ninereasons is it a bad idea of maintain a MANIFEST ? 20:48
s/of/to/
jabbot pugs - 2414 - * repair $_ defaulting... I hope
Juerd Why would it be a bad idea?
ninereasons I don't know; we just don't have one
theorbtwo Except the defintion of Eval needs Val and Env, which are in AST.hs-boot, and getting that presumably puts us back where we started.
ninereasons I wondered why
theorbtwo Because then you have to keep it up to date all the time, rather then just correcting it just before releases. 20:49
autrijus ninereasons: because it costs extra commits with no gain
Juerd ninereasons: Hm, there used to be one, so the reason why can probably be found in version control logs.
Or that.
autrijus theorbtwo: actually. Internals can use .hs-boot.
# SOURCE #
which would provide Val and Env.
problem solved
ninereasons autrijus, if we had one, it would make 'make distclean' a valid target; # small gain. 20:50
autrijus however, you would have to rewire .hs-boot to not use Internals
prolly happy.
ninereasons: you can always copy an old MANIFEST over
Juerd afk # 24s04e19
autrijus or "make manifest"
theorbtwo: I need to sleep now... best luck wrestling with the dependency monster 20:53
please refactor away as you see fit :)
journal up; g'nite folks
autrijus waves &
ninereasons night && thanks.
theorbtwo G'night, autrijus. 20:54
Thanks for getting me started.
theorbtwo sighs -- I should ask questions earlier.
Corion Heh. Now the type of abs() broke :) 20:55
r2414 - datenzoo.de/pugs/win2k.html
... but that's about all breakage that happens 20:56
autrijus Scala is fun
but as fun as it is, I still must sleep. :)
theorbtwo: rock on! :) I think #haskell may also be of help 20:57
ninereasons "scala" as in scala.epfl.ch/ , I guess ?
autrijus *nod* 20:58
autrijus waves again &
Corion Hmmm. Weird - I don't see at all where op1Numeric defaults to $_ if nothing is given... 20:59
Ah. In the signature. Except that it doesn't completely work. Weird. 21:00
Corion & 21:01
gaal yay! #line works :) 21:04
nothingmuch gaal++ 21:05
gaal but this needs plenty of testing. do you have that patch to the harness, that drops the timestamps? makes regresstesting locally easier. 21:06
of course i can grep -v it :)
yaml++
nothingmuch sorry 21:17
you can darcs pull the repo
and darcs unpull the patch
and just run that
thank you cherry picking
gaal for now i'll stick with the grep-v'ing, thanks
if i get distracted now, i won't finish this 21:18
nothingmuch gaal++
although darcs keeps you undistracted
did i send you that link?
gaal what link?
nothingmuch www.abridgegame.org/pipermail/darcs...02161.html
gaal :) 21:19
TDD++; # found some bugs for me, free! 21:42
nothingmuch =D
indeed
gaal and incidentally, 21:44
I love The Koeln Concert
so beautiful.
nothingmuch dunno it 21:47
gaal Keith Jarrett 21:48
22:18 nothingmuch_ is now known as nothingmuch
Limbic_Region stevan ping 22:34
nothingmuch not here
Limbic_Region thanks
mugwump autrijus: darcs pugs sync daemon needs prodding 23:42
Shillo Finally. Done bootstrapping ghc. Pugs works. Wooot! 23:53
mauke did it take more than 50 hours? 23:57
Shillo Took 3. With a 22 hours break in the middle.
mauke nice. my computer is still trying to create libHSbase.s 23:58
Shillo And one compiler crash due to flaky CPU.
mauke er, .a
Shillo Oif.
Gig of RAM really, really helps.
mauke huhu, 64 megs here 23:59