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
Set by Corion on 27 April 2005.
Shillo Is the disk drive scratching all the time while you compile? 00:01
Shillo is scared of low-RAM machines. Get-more-RAM was the first upgrade I ever did. 00:02
mauke yes, of course. the swap daemon uses like 70% cpu :-) 00:03
Shillo :) 00:04
Shillo buh-links?! multi sub works? 00:13
Neat. :) 00:14
mugwump I found you can't really compile pugs on less than 256MB RAM 00:17
Shillo Failed 14/229 test scripts, 93.89% okay. 38/3512 subtests failed, 98.92% okay. 00:19
Last checkout.
dvtoo has anyone built ghc 6.4 on any version of solaris? 00:20
Shillo heads to sleep. Later, all! 00:23
mugwump points dvtoo at #haskell 00:25
dvtoo yeah, shillo mentioning bootstrapping just reminded me 00:31
pasteling "revdiablo" at 66.218.36.163 pasted "anonymous subs as closures" (30 lines, 574B) at sial.org/pbot/9717 01:33
revdiablo hey guys, I'm too lazy/unknowledgable to figure out for myself. is that a known problem?
mugwump revdiablo: do you have pugs commit access? 02:43
machack666 anyone particularly familiar with pugs' internals? 02:57
TreyHarris it is so odd to be writing Haskell again after 15 years. Haskell was the language they taught in freshman CS 100
machack666 (that can answer a question)
obra heh. 02:58
machack666 I'm trying to add closure traits to blocks, and I'm trying to find out how to associate arbitrary state with a particular block 02:59
We need to know if a FIRST {...} closure has executed already, for instance
because FIRST {...} and other closure traits are set at the block level, there must be some sort of storage per block which we can refer to 03:00
anyone care to point me in a direction?
TreyHarris points towards the Netherlands 03:01
machack666 north north east, then?
mugwump I take it you've found the closure trait stuff in Parser.hs
machack666 yup, I'm trying to modify it to recognize all of the closure traits 03:02
instead of just BEGIN/END
I've got stubs which are supposed to fail with an error message upon parsing, and I'm trying to fill in the gaps
TreyHarris machack666: from Seattle, I think Amsterdam is due northeast. don't know where you are :-) 03:03
machack666 TreyHarris: Lawrence, KS
are exceptions working at the block level? 03:04
if so, I can use that as a basis.
mugwump machack666: I'm guessing that the `data VCode' declaration in AST.hs is close 03:05
machack666 I'll take a look. It doesn't help that I don't really know haskell... :) But, what better way to learn?
mugwump A tutorial would be a good start 03:06
machack666 I've read some...up on the basics, it just isn't flowing as fluidly as most languages I know
mugwump yeah, me too. must be a functional vs imperative thing 03:07
I liked "two dozen short lessons", very interactive
machack666 so is subName only set for named blocks?
me too...it way easy to follow along
after I finished that, yaht was a little more comprehensible, up until about chapter 9... 03:08
figured it was time to jump in and get my feet wet
:)
mugwump cool. My plan is twoDozen -> TAPL :) 03:09
TreyHarris www.haskell.org/tutorial is pretty good. well, it was good as a refresher for me... i guess i'm slightly an odd case :-)
mugwump it's been on hold for a bit though, been busy with chansmartialarts.com and Perldoc
and abit of work
machack666 work is good when you can get it. 03:10
or, more precisely when you don't need to...
mugwump o/~ and you can get it, if you submit... o/~
machack666 do you know enough about the data structure types? 03:11
is a null string (), [], or something else? 03:12
mugwump er, "" I think. Which should be the same as []
However, the former implies the type
machack666 I guess I shouldn't care if a sub is named or not -- it shouldn't affect the traits which are applied 03:13
mugwump I think the name defaults to "&?"
at least, that's how I read that bit
machack666 however, it looks like LAST {} and NEXT{} apply only to loops
is that a special perlvar?
mugwump I doubt it :) 03:14
machack666 I see, a local sub with no name
mugwump it's probably just to name the debug output work
s/name/make/
machack666 isn't the trigil "?" a runtime flag?
compared to "*" for compiletime
mugwump I'd have to consult the bible
machack666 the Book of Larry, Synopsis 02, Verse 12: Variables 03:15
or something
...:)
mugwump S28 actually, but yeah :)
machack666 show why going off of memory is a bad idea for me... 03:16
mugwump $* must be run time
machack666 yes
mugwump $? being compile time makes sense, too
S28 is still only in pugs as a draft
machack666 well, one's one and one's the other. I forget which
do you know what the definition of successful vs unsuccessful block exit is? Seems like it would be whether we died() or not... 03:18
mugwump not sure. sounds like a reasonable assumption it's nothing to do with the return value, though 03:19
TreyHarris would last be successful or unsuccessful?
mugwump successful
imho
machack666 i agree 03:20
we would also run the LAST {} block, as well as LEAVE {}
mugwump should be just like jumping to the end of the loop and the condition being false
sure
so, FIRST, NEXT, LAST only apply to loops, but LEAVE applies to all blocks? 03:21
machack666 I'm going to see if there is a strict block execution order
mugwump what about loops that never run once? Do any of their subs get run?
machack666 s04: LEAVE at every block exit time
mugwump: like lazily evaluated subs that are never called? 03:22
or do you mean a while () where the while condition evaluates to false?
TreyHarris LEAVE should only happen if you entered the block... so if the loop never runs, you shouldn't run LEAVE. i think. :-) 03:23
mugwump LEAVE is actually an 80186+ instruction :)
I think for a loop, LEAVE and NEXT would be very similar, if that analogy holds
the way I see it, LEAVE is called when the current pad is destructed. 03:24
machack666 I see LEAVE as being the total exit from the block
crysflame when execution transfers to that which is beyond the scope of the block, LEAVE will have been called directly prior?
machack666 i.e., ENTER ( NEXT, NEXT, NEXT) LEAVE
is there a strict ordering defintion in S04 or A04?
because if there isn't, that would be a useful thing to get information about 03:25
mugwump crysflame: yes, but each time you run the closure of the loop you're entering a block
especially noticable when you write it like: for @foo -> $bar { }
crysflame beyond the scope of the loop block
machack666 can closure traits have closure traits?
crysflame so my imagination has a full block surrounding for {}
implement LEAVE as { for @foo -> $bar { } LAST {} } 03:26
crysflame shrugs
mugwump this is why we have LAST :)
machack666 i.e. sub myfunc { foo() or die ; UNDO { FIRST{"myfunc died. Don't do it again."}} }
mugwump sure, why not. 03:27
machack666 let's see... VCode's subPad --- is this purely the snapshot of the lexicals at this point? 03:28
if I'm wanting to store some data about the block, it seems like this is (unfortunately) not the place to stick it 03:29
TreyHarris machack666: Larry at one point said on p6-l that the ordering is FIFO on entrance, LIFO on exit. whether he later retracted, i have no idea :-)
mugwump machack666: I'm wondering whether they would actually be properties of the loop AST node 03:30
machack666 TreyHarris: I'm wondering as much about the order of the various different traits
mugwump: that works for the loop-scoped traits, but what about ENTER or any other closure-scoped traits? 03:31
is a simple block just a loop node without the loop?
revdiablo mugwump: no I don't have commit access 03:32
revdiablo responds an hour later 03:33
mugwump yes, correct, machack666 - they're traits/properties of the things they hang off
heh, revdiablo, I've added your test to the pugs test suite
you'll need to ask an admin for commit access - see the openfoundry page for the list 03:34
revdiablo ok, thanks
stevan revdiablo: whats is your email, I will give you access
revdiablo is that something known to be not working?
mugwump there's one now
revdiablo stevan: [email@hidden.address]
mugwump revdiablo: it is now ;)
stevan :)
revdiablo mugwump: :)
smilefest
mugwump I suspect probably, in an indirect way. but your test is perfect for inclusion. 03:35
stevan revdiablo: your invite is on the way 03:36
revdiablo stevan: excellent
stevan please remember to add you name to the AUTHORS list as well
welcome aboard
revdiablo thanks
machack666 I'm not seeing loop in AST.hs
looks like enterLoop is defined in Monads.hs 03:37
stevan mugwump: did I read you are working on Perldoc?
mugwump yes, I am ... svn.kwiki.org/ingy/Perldoc/ 03:38
machack666 hmm...ruleBlockLiteral looks like it is just a block constructor
mugwump There's several constructors for loop-like things 03:39
which doubtless need to be refactored into a single loop class for this
machack666 stevan: do you know much about the internals?
stevan mugwump: does this include kwid?
mugwump yes, of course
stevan machack666: sorry no 03:40
machack666: my Haskell book is in the mail :)
mugwump I'm doing the infrastructure and ingy's doing the parser ... I think he's a bit behind on committing his changes though, he sounds like he's been busy
stevan mugwump: ahhh, ok
machack666: I actually was going to start documenting some of the internals to help learn them 03:41
mugwump: so do you have any thoughts on when we will have a functioning kwid parser/converter? or should I just ask/bug ingy?
machack666 I'm trying to figure out how to attach closure traits to the blocks, but I don't know if I need to modify the VCode structure to add some sort of state-tracking 03:42
mugwump yeah, I'm working on trying to compress "XML in a nutshell" into the system :)
machack666 i.e., these are the blocks to run upon entry, this one has run already, etc...
stevan machack666: you should ask nothingmuch about this 03:43
machack666 is nm about?
stevan he implemented .assuming
nothingmuch: ping!
machack666 darn world-oriented time zones... 03:44
stevan machack666: he is in israel, I am not sure what time it is there
machack666 substantially later
stevan his AIM has been idle for 4 hours 03:45
but that doesnt mean much
machack666 I've run into him before, so we share some hours
stevan and I sometimes question if nothingmuch ever sleeps :)
machack666: where are you?
machack666 Lawrence, KS
USA
stevan William S Boroughs home town :) 03:46
machack666 yes, indeed
some lady who
stevan machack666: look for nothingmuch around mid-day to early evening tomorrow
machack666 'd been a "good friend" of his was just auctioning off a lot of his stuff. Like napkins he'd signed and other miscellenous things 03:47
stevan and actually autrijus might be up soon too
machack666 thanks for the info
stevan weird, I am not sure I want an old Burroughs napkin :P
machack666 looks like retVerbatimBlock is where I probably want to start some modifications
stevan machack666: no harm in trying, there is always svn revert :) 03:48
machack666 heh...:)
I've been reading Env as environment variables... is this actually execution environment? 03:54
in which case, envStash may be what I'm looking for
mugwump that's probably a pointer to the current package's stash
(was that too obvious to point out)?
mugwump & # work :) 03:55
chromatic Anyone awake? I have a question about inc::Module::Install. 05:05
stevan hey chromatic
chromatic hey stevan
stevan what can I help you with :) 05:06
chromatic I just checked out a fresh copy of Pugs from svn and ran Perl Makefile.PL.
Looks like load_extensions() loaded some .pm files under the .svn directory.
I added a line to skip such directories in find_extensions() and things built properly.
stevan odd 05:07
which directory?
chromatic Is there something weird with the repository or was there a recent checkin that made this work?
I had errors like:
Uh, hold on. That window disappeared.
mugwump well, most of the core devs use svk which doesn't litter your working copy with crap ;)
chromatic That's nice, but luddites like me should be able to use it too! 05:08
stevan mugwump: I really need to start using svk too, I was craving it today since I was on the raod and away from net access
I have noticed some weirdness with builds myself 05:09
chromatic syntax error at inc/Module/Install/.svn/props/Base.pm line 1, at EOF
Compilation failed in require at inc/Module/Install.pm line 137.
stevan I have to always make clean (which I usually do anyway) or the buidl fails
mugwump going from svn to svk is dead simple 05:10
stevan mugwump: I know, its a matter of taking the time to set things up
mugwump 1. apt-get install svk (or local equivalent ;))
chromatic Sure, but the recursing is wrong in the code.
mugwump 2. svk depotmap --init
3. svk mkdir -m "my mirrors" //mirror
4. svk mirror svn.openfoundry.org/pugs //mirror/pugs 05:11
stevan chromatic: is there really a Base.pm in you .svn/props dir? that is odd, it should be Base.pm.svn-work
mugwump 5. svk cp -p -m "my local branch" //mirror/pugs //local/pugs
6. svk co //local/pugs
then, to `update' working copy; 05:12
svk pull
to push changes back;
svk push
stevan chromatic: when was the last time you pulled from svn? or is this a completely fresh copy
mugwump (er, after a svk commit)
chromatic This is a completely fresh copy.
stevan chromatic: what SVN version/OS? 05:13
chromatic Hm, an old version of svn. That's odd.
Let me upgrade and see if that's still wrong. 05:14
stevan chromatic: working on Test::Builder? 05:15
chromatic That's right.
SM_ax has a problem with Hyper OP 05:28
(1,3,4,5) >>+<< 1; is fine while 05:29
my @a = (1,3,4,5); @a >>+<<1; reports an error...
is this ok? 05:30
revdiablo SM_ax: *@array >>+<< 1 # works 05:39
I dunno if it's supposed to work only with lists though 05:40
SM_ax so in this case context must be specified explicitly.. 05:43
Khisanth how about @array >>+ 1 ? 05:44
SM_ax this is not supposed to work 05:45
chromatic Hm, works okay with a newer Subversion. Bug closed. :) 05:58
autrijus ;) 06:02
hey chromatic.
rehi lambdacamels!
obra hey autrijus
mugwump evening!
autrijus mugwump: thanks, sync.pl restarted
ooh T::Builder 06:04
chromatic: you going to write it in a procedural way, or are you spelling out the minimal support for class/roles we need?
chromatic: also, is it okay if I just assume that the perl6 trait system, in the internals is the same with the Fortress trait system? :) 06:05
chromatic I'll use minimal class/role support.
I haven't looked at Fortress in much detail.
mugwump ouch, using "minimal", "class" *and* "roles" in the same sentence
chromatic T::B isn't very complicated.
autrijus chromatic: cool. care to audit t/oo/ 06:06
mugwump oh, you mean using as little of them as possible :)
autrijus and pick the ones you think are immediately useful?
chromatic Only as much as necessary.
autrijus if you can do that, just remove the :todo status to them.
that will make them fail, and make it more attractive to implement :)
chromatic I'll look at them. 06:07
autrijus chromatic++
chromatic Right now I want to sleep though, so I'll see you all later.
nothingmuch what? who? where? 06:08
autrijus machack666: you can (and should) extend VCode to include a set of traits. I think.
nothingmuch colloquy was bouncing in the dock
what did you need, machack666?
autrijus nothingmuch: machack666 wants to hack in closure traits like NEXT 06:09
LEAVE
etc.
I think the way to go is extending VCode 06:10
to add named closures
subTraits :: Pad 06:11
something like that.
or as explicitly spelled fields
mugwump will that work for loops, though?
autrijus subNext :: [VCode]
mugwump: sure, loops are just VCode
all loops are just closures
but I gotta run for work 06:12
mugwump work? it's like 2pm, no? :)
06:13 chady_ is now known as chady
nothingmuch okay 06:16
gaal the yaml harness doesn't explicitly sort tests before it runs them. i'm fixing that
but it might break some test analysers
Aankhen`` NOooooooooooOOOOOOoooooooooooOOOOO
Aankhen`` coughs.
nothingmuch gaal: why do that?
Aankhen`` Sorry.
gaal it might also fix some :)
eg. the wiki make test thing someone has 06:17
nothinmuch: so that i can diff two yaml runs
Aankhen`` finally gives in and updates Firefox to 1.0.3.
gaal one from a pristine tree, and one from my hack tree
obra sorting will make life easier long term, no?
gaal and see what i broke.
nothingmuch can't youu diff them now?
i mean, FS sort order should work in theory
gaal obra: imho yes; and there's always --shuffle if you wnat it explicitly.
sure i can diff now, but the diff sucks :) 06:18
i don't know why, but on my system two runs of a basically identical tree don't run in the same order.
nothingmuch oh well
gaal i'm sorting the names anyway.
nothingmuch i reckon mj could just sort the YAML files and rediff 06:19
gaal ie it is "FS sort order"
nothingmuch or whatever the files he was diffing were
they were just plaintexts, right?
gaal mj is the wiki guy, yes?
nothingmuch yep
gaal i think he's just diffing make test
so this doesn't matter to him really
btw there's a funny bug in the harness 06:27
somehow get_smoker gets called twice
did you notice that?
i suppose that means _init is called twice.
jabbot pugs - 2415 - Add test for function that returns a fun 06:31
pugs - 2416 - adding some basic last and next tests, t
pugs - 2417 - added myself as requested
pugs - 2418 - adding single quotes around the got and
pugs - 2419 - adding the Pod-Stream-Parser back into e
pugs - 2420 - adding mkirank and dragonchild to the AU
pugs - 2421 - indent contents of block 06:32
pugs - 2422 - * yaml harness sorts tests when we not i 06:41
bsb Does "make ghci" work for others? I get duplicate symbol for blkcmp 06:49
gaal bsb: ok on msys
bsb src/UnicodeC.o
I'm using debian's ghc-cvs/unstable. 6.5 06:50
gaal i'll start a linux smoke, will take a bit though.
06:50 castaway_ is now known as castaway
bsb this has been since I first tried it, a few days ago 06:51
gaal s/smoke/build/
bsb not a new problem
gaal oh
bsb ok
gaal make ghci worked for me on linux 06:52
i was using ghc 6.4 from experimental
bsb Not linking UnicodeC.o starts ok but dies in eval "1"
<interactive>: src/Unicode.o: unknown symbol `u_iswdigit'
gaal does make clean etc. not help?
no, i think you kinda need that obj file :) 06:53
bsb yep, though I might sneak past 06:54
gaal nothingmuch: ping 06:56
the yaml dump is about twice as big as it needs to be :(
we have dupes of everything in "events" and "deails" 06:57
nothingmuch arrives at work 06:58
castaway mornin nothingmuch 06:59
nothingmuch morning
gaal just in time :)
bsb: make ghci worksforme (ghc 6.4/debian ) 07:05
bsb Thanks gaal
I might back up to ghc6.4
gaal try to clean up the tree with some tough love?
like co it from scratch? :) 07:06
also, fwiw, i preceded 'make ghci' with 'make optimized'.
bsb I'll rebuild when I'm not doing anything, later tonight 07:08
nothingmuch gaal: ping 07:12
gaal bonk
nothingmuch darcs pull Test::TAP::Model 07:13
gaal some make targets fail for me on msys with: tests.out:LD_RUN_PATH="" ld2 -s Pugs.o -o /c/wks/pugs/blib/arch/auto/Perl6/Pugs/Pugs.dll
i don't have ld2!
ok
(that ok was to nm
)
darcs failed: (scp) failed to fetch: Test::TAP::Model/_darcs/inventory 07:14
Aankhen`` 4/34 skipped: various reasons
Very informative. =)
nothingmuch mui grazie
gaal updates EU::MM 07:15
nothingmuch Aankhen``: view the verbose output
eh
cd to your darcs copy of Test::Tap::Model
and then 'darcs pull'
Aankhen`` ōæ½xABnothingmuchōæ½xBB: It's okay, I'm not really interested. I was just amused by the message.
gaal duh!
nothingmuch Aankhen``: Test::Harness goodness, eh?
Aankhen`` Oh, and I couldn't submit a patch for example.html because apparently it needs the module to be installed, which is not possible since one of the prerequisites refuses to install for me. 07:16
nothingmuch which prereq?
gaal nm, any chance of an svn mirror to T:*? i don't have darcs on the windows box.
nothingmuch gaal: get a binary, it's trivial 07:17
i really don't want to maintain an svn repo
Aankhen`` I think it was Test::TAP::Something.
nothingmuch darcs is just normal HTTP
Aankhen`` Petal installed fine.
nothingmuch Test::TAP::Model was released on the same day
it's also mine
gaal trivial is not instantaneous, nm.
nothingmuch gaal: an SVN repo requires:
1) learning
2) installing
3) configuring
4) getting a mirror script
...
gaal fine, be that way.
:p 07:18
nothingmuch is puzzled
you can just wget -r it
gaal i prefer not to do any p5 work on this windows box, because, for example, it can't compile xs. 07:19
bsb Any haskelleiros about?
nothingmuch bsb: sometimes i pretend to be one
gaal: so why would you want it there at all?
i don't see how an SVN repo would solve that
bsb Could you cast an eye at a patch of mine (on the way..)
nothingmuch sure
pasteling "bsb" at 203.214.67.82 pasted "pick op patch in pugs prim" (19 lines, 857B) at sial.org/pbot/9719 07:20
bsb fix for: /usr/bin/pugs -e 'say one(1,1).pick'
nothingmuch is Set unordered?
bsb: looks good afaict
gaal nm, if i'm just puling fixes from you, i'd rather do it with an scm i already have. but okay; i'm installing darcs 07:21
bsb yes, at least in the interface
nothingmuch gaal: no need to install darcs
you can just download the dir recursively
bsb Also, Set.cardinality is decprecated in favour of Set.size according to my docs
Should I change that too?
nothingmuch i think so
gaal that's convenient. but i don't have wget (that works) on this machine. never mind, it' 07:22
bsb Ok, thanks nm
gaal i'll copy from the linux box.
nothingmuch bsb: what about jall's non size=1
gaal and yes, i don't like msys. :)
nothingmuch what's the behavior there?
and shouldn't any pick a random one? 07:23
bsb Like all(1,2) ?
nothingmuch all(1,2).pick -> ?
any(1, 2).pick -> 1 or 2
i think
bsb Maybe, I was more trying to stop the bad head in one(1,1).pick
The rest should be as it was 07:24
Not sure what the official behaviour should be
nothingmuch okay, so i think you should commit that fix
all returns undef right now
any picks a random one
oh i see 07:25
there are more op1Picks above your patch ontext
I say go ahead, bsb
bsb I'll just finish some tests, then ci 07:26
nothingmuch has a go at wrap 07:30
gaal is disgusted at the slowness of msys's scp, pipes a tar to netcat 07:31
jabbot pugs - 2423 - one(1,1).pick bug fix&test
Juerd nothingmuch: I think pick makes sense only on any() 07:38
Or perhaps only on one() :) 07:39
nothingmuch Juerd: true 07:40
bsb I agree
nothingmuch my plan for .wrap:
Juerd oooh
nothingmuch VSub will also be a dually linked list member
with an ID
Juerd Chicken wrap with some pesto!
nothingmuch sub names will have the top level wrapping in place 07:41
no, that doesn't work
subnames will have the original sub in place
Juerd Why not just use a simple closure?
nothingmuch but invokation of a sub who knows it's being wrapped will look upwards
it is implemented with closures
but it modifies the sub
Juerd Add the original sub as a local variable and call that...
jabbot pugs - 2424 - j(...) to convert junc -> string
nothingmuch it doesn't return a wrapped version
Juerd Oh.
nothingmuch the problem is that references to the sub must be wrapped too 07:42
i think
Juerd nothingmuch: Then isn't changing the rules a better plan?
nothingmuch Juerd: maybe, maybe not
Juerd nothingmuch: Make it return a wrapped version, and use .= if you want modification
This should IMnsHO be done consistently
nothingmuch that sort of makes sense
what happens here:
my $subref = \&sub;
&sub.wrap { blah }; 07:43
$subref.()
sorry:
&sub.=wrap { blah }
Juerd Well, if you mutate the invocant, then it blahs
nothingmuch okay
so we have to change the semantics of entering a sub
Juerd Don't make it too hard, and check the logic with simple scalars:
my $scalarref = \$scalar;
$scalar.=sqrt 07:44
say $scalarref; # square root of old $scalar
eh
$$scalarref there
nothingmuch i think that makes sense
but it doesn't really matter
the question is what exactly is wrapping
is it destructive or not
Juerd It helps if you consider subs like normal variables: name, container and value are separate 07:45
nothingmuch right
Juerd Where the value is the body of the code plus the pad etc
nothingmuch but if we do that ii think we are losing a bit with wrapping
wait
before i make a fool out of myself
Juerd And mutation only applies to the value, not the container, as the container is the real invocant and you can't possibly exchange that without losing any more sanity. 07:46
nothingmuch .=wrap <-- implications on value, or variable?
Juerd value
nothingmuch so it's not like &sub = sub { }
right?
Juerd "variable" is confusing because it can mean almost anything - I avoid its use when discussing semantics
nothingmuch s/variable/container/ 07:47
Juerd Well, the problem with sub { } is that it has always returned a reference in Perl 5
And that &sub was unassignable
nothingmuch okay
$i = $i + 5;
Juerd This makes that &sub = subref has to dereference in order to make sense
nothingmuch $i += 5;
this is obviously different
Juerd And the '=' always only copies value.
nothingmuch \$i taken before would leave the first as it is, but change the second 07:48
Juerd If it "copied" the container (which is impossible), it would be aliasing, which is done with ':='
nothingmuch okay
so how do .= semantics change the value of the invocant?
(For a method that doesn't really know how to do that?)
by being slightly more magical?
Juerd Which would mean that (assuming a SANE '=:=', not like what Larry thinks he wants), !(&sub =:= whatever that sub { } was)
nothingmuch: Why wouldn't it know how to do that? 07:49
nothingmuch Juerd: my $obj = ...;
$obj.clone_with_new_value($x);
$obj.=clone_with_new_value($x);
is that magically correct?
Juerd I expect so 07:50
nothingmuch okay
and if i take a ref to sub
Juerd Although.
nothingmuch sub wrap_it_for_me ($subref) {
Juerd I wouldn't know how it could be. 07:51
nothingmuch sorry... is rw
gaal nothingmuch, thanks for the Model fix, it helps
nothingmuch $subref.=wrap { };
}
Juerd Or, well, it is magically correct assuming that you don't mind that $obj.id doesn't change.
nothingmuch gaal: thanks for being flexible with darcs =)
gaal i just used a proxy :/
nothingmuch pulled to another box and then rsync'd or something? 07:52
gaal yeah
nothingmuch Juerd: okay, so assuming .wrap returns a closure, what happens here:
my $sub = $original.wrap { foo };
my $shiney = $sub.wrap { bar };
# now i want to unwrap the { foo } from $shiney
Juerd Why do you make things harder by using references? :)
1: $sub gets a reference to { foo }, which calls &$original 07:53
nothingmuch Juerd: give me a counter example without them please
Juerd 2: $shiny gets a reference to { bar }, which calls &$sub
nothingmuch: my &sub = &original.wrap:{foo};
nothingmuch: my &shiney = &sub.wrap :{ bar }; 07:54
nothingmuch okay, same thing to me
Juerd The colon is needed if you want to pass a block without using parens
nothingmuch likes the consistency of this
Juerd nothingmuch: Same thing perhaps, but it saves 4 implicit (de)references, making discussing it easier :)
nothingmuch suddenly i realized the subnames can also be lexical =) 07:55
Juerd++; # enlightening
okay
i liked this property: $id = $sub.wrap :{ foo };
sorry
$id = &sub.wrap :{foo};
$id2 = &sub.wrap { bar };
Juerd The id thing is hard to use...
nothingmuch &sub.unwrap($id);
Juerd Yes, unwrap($id) 07:56
nothingmuch but it's very flexible
Juerd What happens if the $id passed is not the top level?
It just splices one out there?
nothingmuch then it just gets yanked out the middle
Juerd I see
nothingmuch i think so
since we use a 'call' in there
Juerd You can of course use:
nothingmuch we don't really care who we are wrapping
this is useful because it lets you do tracing wraps and then remove them without damage 07:57
even in the context of other wraps
Juerd &sub.=wrap(my &wrapthingy = sub { foo })
&sub.=unwrap(&wrapthingy);
nothingmuch ooh, nice
Juerd Which also means that you can nicely use
&sub.=wrap(&generic_subwrapper);
&sub.=unwrap(&generic_subwrapper);
nothingmuch and a wrapped sub could unwrap itself with &?SUB 07:58
Juerd Where &generic_subwrapper can, for example, memoize!
nothingmuch Juerd++
it's much more consistent than ID
Juerd And no less efficient, I think
nothingmuch the only thing it doesn't let you do is wrap the same sub twice with the same wrapper
Juerd PLEASE NOTE THAT my first example was wrong!
Has to be: 07:59
&sub.=wrap(my &wrapthingy := sub { foo })
nothingmuch why does it matter?
Juerd Otherwise you're copying the value, which should have no identity of its own
AFAIK
nothingmuch isn't &wrapthingy just a copy in both places?
Juerd But Thomas Sandlass has been arguing that values have identity
nothingmuch iin which case it's the same thing?
Juerd I can't logically place that in a Perl perspective.
nothingmuch: Assignment copies value, not container 08:00
nothingmuch in perl5 values have identity: refaddr($ref); # id of thingy
thingy in this context is referant
Juerd nothingmuch: That's the container, not value!
nothingmuch ah
SCALAR(o123i7u3108951) is a container
Juerd refaddr(\$scalar) does not change if you assign something new to $scalar!
nothingmuch and \1 is a reference to an anonymous container
i see 08:01
Juerd Which means that the value's identity, if it has any, is certainly not visible in this way.
nothingmuch but in your example &wrapthingy is a container
doesn't the assignment return that?
Juerd nothingmuch: Which has its own identity
nothingmuch right
Juerd Consider
SUB = SUBREF
SUBREF is dereferenced first 08:02
nothingmuch so arguably your first example is correct, but it doesn't give sub { foo }, rather the container of a copy of it
Juerd Because SUB cannot hold a reference, because it is not scalar
Then, you have
SUB = SUB
autrijus that should be :=, btw.
Juerd Which, in pseudo code, means
autrijus not sure that assigning to &sub makes sense.
Juerd SUB.value = SUB.value
or indeed
s/or indeed/
s/$/\//
autrijus: Indeed, that's what I'm arguing right now :)
nothingmuch Juerd: before we get carried away: 08:03
&sub.=wrap(&generic);
&sub.=wrap(&generic); # again
&sub.=unwrap(&generic); # ambiguous? last?
Juerd nothingmuch: :nth(-1)
autrijus you can't .= wrap
that is not legal anywhere in synopses
Juerd autrijus: I suggested changing wrap to un-mutating.
autrijus at best you can
&sub := &sub.wrap(...) 08:04
Juerd autrijus: To be consistent throughout the language, and force use of .= for mutation
autrijus Juerd: I think you are confusing levels.
nothingmuch autrijus: we're changing the semantics =)
autrijus: think of it this way:
autrijus Juerd: "=" applies to the IScalar IType
nothingmuch .wrap returns a closure
wrapping is done in a special place in the pad it gets
autrijus or IArray, or IHash
Juerd As $foo.sqrt returns the sqrt without changing $foo's value, and $foo.=sqrt replaces $foo's value with the old $foo's sqrt.
nothingmuch when you enter a wrapped sub, semantics change
.wrap and .unwrap return closures 08:05
Juerd autrijus: I am at language level *only*. That is my strength in finding logic.
autrijus the .wrap is not destructive.
who says it is destructive?
it is never destructive.
nothingmuch then what does it do?
autrijus it returns the wrapped sub.
Juerd autrijus: And at language level, all one has to deal with are names, containers and values
autrijus s06 makes it quite clear
the original sub is untouched
Juerd autrijus: Not according to specs I read. It changes the invocant and returns an id. 08:06
nothingmuch as I recall it treats every VSub as a sort of stack
Juerd goes to read s06
nothingmuch agrees with Juerd here
autrijus oh. wow.
I misread. my bad.
and that is bad, bad, bad semantics.
nothingmuch indeed
Juerd autrijus: You read it the right way, it just wasn't written to be right :P
mugwump agrees on that
autrijus that makes no sense.
Juerd autrijus: Hence my suggestion to change things
autrijus whomever written that is on the bad crack that is Hook::LexWrap. 08:07
nothingmuch okay
Juerd The madness with IDs leaves a very nasty taste with me.
autrijus ok. let's revolt ;)
nothingmuch how does unwrapping look like?
if i take a heavily wrapped sub
autrijus nothingmuch: easy; you can call &newsub.unwrap to retrive the unwrapped sub
nothingmuch wait no, i'm making no sense
autrijus: no, you get a closure with wrapping removed 08:08
Juerd It makes me think of mirc scripting, irssi timers, TCl, filedescriptors and other low level crap we camelboys like wrapping in dwimmy objects.
nothingmuch IMHO that works in all dimentions
you can add and remove wrappings
arbitrarily, in all directions
and never reach an inconsistent state
autrijus ok. when you see wrap, think taking a reference
when you see unwrap, think dereference
neither operation is destructive
and there's no ID needed
unwrap a sub that was never unwrapped returns itself. 08:09
that's just that.
nothingmuch no, because unwrrap is not a stack
you can wrap a, wrap that with b, and then unwrap a, and get onnly b
okay
what about &sub.=wrap(&a);
autrijus er. what
nothingmuch &sub.=wrap(&b);
&sub.unwrap(&a);
autrijus &sub := &sub.wrap(&a)
&sub := &sub.wrap(&b) 08:10
nothingmuch # is &sub wrapped now?
autrijus &sub := &sub.unwrap
that's what I'm getting at.
nothingmuch i don't like a stack
it makes wrapping less ninja
autrijus did I hear ninja?
Juerd nothingmuch: How about it can be a searchable stack?
nothingmuch you can't unwrap in a lexical scope where you wrapped without maybe stepping on someone else's feet
autrijus &sub := &sub.wrap(&a, :key<a>); 08:11
&sub := &sub.wrap(&b, :key<b>);
nothingmuch sub add_trace ($sub) { $sub.=wrap :{ say "entering"; call } };
autrijus &sub := &sub.unwrap(:key<a>);
happy?
Juerd nothingmuch: unwrap(SUBREF) unwraps until it has unwrapped SUB, and then wraps all the other layers again. Same effect, only less efficient when doing weird ninja things noone normally does anyway.
nothingmuch Juerd: okay
that's the same as what I mean
Juerd (Warning: guessing usage statistics)
autrijus Juerd: I worry about identity.
nothingmuch autrijus: i like that 08:12
but i think you should be able to use either
wrappings have an optional arbitrary key
Juerd autrijus: &subref.id
nothingmuch they can be unwrapped based on &sub being passed
or the key that was choses at wrap time
Juerd 0+$subref in Perl 5
nothingmuch or with no arguments to pop one off
Juerd (Assuming a .id method!)
urgh, &sub.id of course 08:13
Not *ref*.
nothingmuch guys?
Juerd I don't like a method called .id for all objects
nothingmuch neither
Juerd Because that means you can no longer use that for your own schemes
autrijus_ hm, autrijus.org just went offline 08:14
nothingmuch (key is optional)
Juerd afk
nothingmuch autrijus_: i think unwrapping semantics with a key don't conflict:
err, idiot
&sub.wrap(&sub);
&sub should be two different things there
&sub.wrap(&sub :key<a>);
&sub.unwrap(&other); # finds first
&sub.unwrap(:key<a>);
autrijus_ so.
nothingmuch &sub.unwrap; # pops last
autrijus_ &sub.wrap({ ... anon closure ...}) 08:15
there is no way to unwrap by that again, right?
since identities differ for all anon closures
nothingmuch &sub.wrap({a anon } :key<closure>);
autrijus_ so you can't call it with a good key
nothingmuch the code creating a wrap can do book keeping to make it sane
or it could say:
08:16 autrijus_ is now known as autrijus
nothingmuch &sub.wrap(my &container := { anon }); 08:16
and anon is given an ID, right?
i mean, we allow both ways
autrijus for some reason I don't like this idea :)
I think if you don't pass :key
then you can't unwrap by name
if you pass :key 08:17
then you can always unwrap by name
nothingmuch why should i make up a key if i know who the wrapper is?
&sub.wrap(&generic_wrapper);
autrijus because you really don't...
nothingmuch &sub.unwrap(&generic_wrapper);
autrijus the &generic_wrapper may itself change identity
&generic_wrapper := ...something else...
nothingmuch then other copies of it must be used to fetch it
autrijus ok.
nothingmuch but it's the user's problem
autrijus let's agre that 08:18
nothingmuch if someone destroys the wrapper they used as a key, why should the language be responsible?
autrijus method wrap (Code &wrapper, +$key = &wrapper) { ... }
happy?
nothingmuch yes
that's exactly what I wanted =)
autrijus go ahead and make it so :)
(and send S06 patch to p6l) 08:19
viva la revolution, etc
nothingmuch okay
(btw, is the pad an first-class object?)
so i plan to do it by adding the wrapper list into a place in the lexical pad
autrijus nothingmuch: anything can be made a first-class object
nothingmuch autrijus: first i'd like to know why you don't like &sub.=wrap(&foo);
autrijus nothingmuch: do you want to access pad as a hash?
nothingmuch i don't want it 08:20
autrijus like %OUTER::<foo>
nothingmuch not yet
autrijus nothingmuch: ok.
nothingmuch well, i do =)
autrijus &sub .= wrap(&foo)
stands for
nothingmuch i was just wondering if it exists
autrijus &sub = &sub.wrap(&foo)
but
pugs> &print = 123
*** Error: Can't modify constant item
nothingmuch Juerd: just spent 10 minutes explaining to me that .= is magical in that it doesn't do that
autrijus and for good reason
I don't see a reference to that magic.
nothingmuch that it changes the value, not the container
by example: 08:21
@list = ....
my $ref = @list;
@list.sort;
autrijus sort is not inplace
nothingmuch @$ref <-- sorted?
sorry
@list.=sort;
autrijus pugs> my @list = (3,2,1); my $ref = @list; @list .= sort; $ref
(1, 2, 3)
nothingmuch i remember that being used as an example where in place sort could optimize
okay, so i think that's consistent with &sub.= wrap in the same way 08:22
autrijus it is not :)
$sub .= wrap()
is sane
&sub .= wrap()
is less so
nothingmuch i don't see the connection
@ is akin to & here, no?
autrijus no, because array supports STORE
Juerd autrijus: A sub could too!
autrijus Juerd: I don't see anywhere that it could 08:23
Juerd: I'd much rather it could not
it could not in p5
Juerd But I agree that it might be much better to not allow this.
nothingmuch &sub = sub { foo } ; # what does this do?
autrijus nothingmuch: error -- assign to constant
you'd have to use := throughout.
the synopses are consistent on that manner
and for once I agree :)
nothingmuch so what about &sub.:=wrap ? 08:24
that looks like one of those cheesy HTML <title>s in a hacker site
autrijus I'm fine with that.
but I still think &sub := &sub.wrap() makes most sense, fwiw. 08:25
nothingmuch where is this stuff written?
i would like to read thoroughly
autrijus you mean distinction between := and = ?
nothingmuch yep
especially with IDs, copying, laziness, constants 08:26
distinction between container and value
autrijus s06 has something like that
nothingmuch destructiveness of .= onto value
btw, i think ~:= should also work
autrijus oh, nothingmuch
nothingmuch *pause*
my $str = "foo"; 08:27
autrijus &textfrom := &substr.assuming(str=>$text, len=>Inf);
nothingmuch $str .= "foo"; # value?
autrijus I like the equiv of .assuming vs .wrap
nothingmuch $str = "${str}foo"; # same thing?
$str := "${str}foo"; # value not modified?
i think in the last two examples the value is not modified
because it's copied
autrijus uh, .= "foo" doesn't do what you think it does
nothingmuch heh
i meant ~= 08:28
autrijus $str ~= "foo"
nothingmuch but it's not modified in a different way
p6 habit
grr
p5
autrijus $str ~= "foo" ## means $str = $str ~ "foo"
pugs> my $str = 123; $str := $str~"foo"; $str = 9
*** Error: Can't modify constant item
nothingmuch but $obj .= method does not always mean $obj = $obj.method;
autrijus why? I maintain it always mean that
nothingmuch array container 08:29
okay
is @list.=sort working on the list container?
and in this case it's complicated because the container is an interesting kind of value in itself?
my $one = @list; my $two = list; 08:30
@list.=sort;
@list = @list.sort
what is @$one and @$two in either example?
nothingmuch coughs loudly 08:31
bsb autrijus: what investigation does "if (has_ghc_package('readline'))" need in Makefile.PL? 08:32
nothingmuch my god! pugs is fast! 08:33
bsb Adding it back locally seemed to settle my skittish repl loop
nothingmuch autrijus? 08:35
Juerd?
lunch
unlunc 08:38
h
delay
okay:
castaway that was quick
nothingmuch in a wrapper: &?SUB means the wrapped
autrijus bsb: has_ghc_package always succeeded
bsb: you need a compile_ok
nothingmuch &?WRAP means next in line
autrijus to ensure it really has the libreadline
not only the readline package (which is always there)
nothingmuch @?WRAP means all below 08:39
no, it means all
beh, i dunno
at the lowest level i'd like a sub to have @?WRAP and be able to access it all
VSub becomes a linked list (optionally) 08:40
wrap prepends an element, and returns a new closure
unwrap splices an element, and returns a new closure
okay, i think @?WRAP always refers to the top most wrap list
is this making any sense?
jabbot pugs - 2425 - * opaque value type, the first attempt a 08:41
nothingmuch a wrapper should be able to search @?WRAP for &?SUB to get an idea of where it is in the wrap list 08:42
and it should be able to say @?WRAP[0].unwrap(&?SUB) to remove itself
someone please comment
autrijus: i'd like a quick primer on the structure of data Env 08:44
bsb if (has_ghc_package('readline') and try_compile("main = return ()", "-lreadline")) ??
nothingmuch especially with dynamic/lexical scope differences
autrijus bsb: better actually exercise the readline 08:45
import System.Console.Readline
main = readline "" >> return ()
that will do
bsb: in that case you can also add ' -DPUGS_HAVE_READLINE=1' to ghc_flags 08:46
and disable the redundant check in util/config_h.pl
nothingmuch: ok. the lexical pad is in envLexical
nothingmuch: the global pad is in envGlobal
the dynamic caller's env is at envCaller 08:47
nothingmuch okayi see
when entering a sub do you make a new env with envCaller out of it's lexical env?
autrijus when entering a sub, we save the current env and use it as the new env's envCallse^WenvCaller; 08:50
nothingmuch is that done by enterLex? 08:51
no
that looks like the second part of it
autrijus enterLex is just appending envLexical 08:52
nothingmuch enterSub is a bit of a beast for me 08:53
but not envCaller 08:54
i see it preparing interesting things
basically preparing dynamic scope behavior
autrijus yeah 08:56
it's done in Eval line 771
nothingmuch oh i see
after fixEnv a new lexical scope is made? 08:57
or rather entered?
autrijus yeah
nothingmuch okay 08:58
i think that the semantics of entering a wrapped sub are very very simple:
that stays the same
but:
call
right now it sets ($&SUB, @?WRAP_REMAINING) = @?WRAP_REMAINING
and then &?SUB.goto 08:59
@?WRAP_REMAINING = @?WRAP if it's not defined
@?WRAP is a closure var of only the root of the wrap list
that's it
(pop (@?WRAP_REMAINING = @?WRAP_REMAINING)).goto; 09:00
what remains is magical context carry over in void context
but that shouldn't bee too difficult 09:01
autrijus hm 09:03
I wonder if subFun should be called subBody ;)
will you be terribly mad if I change it to subBody?
nothingmuch no
=)
take the sub you are wrapping 09:04
make a closure without @?WRAP in it
@?WRAP carryover looks like this:
make a closure of your new wrapper
put the old @?WRAP with itself prepended in it's lexical scope
blammo 09:05
autrijus looks sane.
nothingmuch unwrap makes a closure of @?WRAP[1] with a new @?WRAP inside it
with no arguments
or finds the argument in @?WRAP
and creates a closure of @?WRAP[0] with the filtered @?WRAP
i like the simplicity of this behavior 09:07
autrijus I'll brb. 09:09
nothingmuch ciao
jabbot pugs - 2426 - * Internal: rename subFun to subBody 09:11
pugs - 2427 - readline probing
bsb haskell.org/ghc/docs/latest/html/li...ardinality 09:13
should I s/Set.cardinality/Set.size/ in Prim.hs? 09:14
cardinality - Obsolete equivalent of size.cardinality :: Set a -> Int
autrijus bsb: go ahead 09:15
theorbtwo: I added VOpaque 09:16
theorbtwo: so you can eval into anything now as long as you declare an instance of Value for it 09:17
theorbtwo Hold on a bit for my eyes to go unblurry and my mind to finish waking up. 09:20
autrijus sure :) 09:21
jabbot pugs - 2428 - s/Set.cardinality/Set.size/
castaway
.oO( wouldnt it be cool if one could just select a chunk of code in ones editor, and choose some option which meant "output debugging info for this bit" ?)
09:29
bsb src/UnicodeC.o and src/UTF8.o survive make realclean, was that intended? 09:31
theorbtwo
.oO(We have a realclean?)
autrijus bsb: probably not. 09:32
bsb Could that explain my "make ghci" trouble?
theorbtwo Oh! Of course, for holding the opaque that is what (most?) objects are built of.
autrijus right. 09:33
theorbtwo Hm, does instance Typeable VOaque where typeOf (MkOpaque x) = typeOf x really say what you want it to? 09:34
Is the type of MkOpaque "asdf" supposed to be the same as the type of "asdf". (IE String.) 09:35
castaway Opaque means see through, so it would make logical sense.. 09:36
theorbtwo No, transparent means see-through; opaque is the oppisite. 09:37
autrijus right.
castaway checks dict again, and slaps self
autrijus theorbtwo: I don't know and I don't know whether there's a better way
bsb I'm off for tonight. Bye 09:40
theorbtwo G'night, bsb. 09:41
09:41 chady is now known as chady_
jabbot pugs - 2429 - add "src" to @srcdirs 09:41
pugs - 2430 - Uncommented the 'BEGIN {...}'s of contro 09:51
pugs - 2431 - * Added the usual SVN properties to t/.
theorbtwo OK, caught up on the last 12 hours of IRC backlog. 10:00
Oh! 10:02
theorbtwo just realized that the --version r\d+ thing won't work for people using svk instead of svn.
autrijus indeed :) 10:08
theorbtwo Hm, we ought to start haddocking. 10:15
castaway haddocking
?
theorbtwo haddock is the haskell documentation framework. 10:16
Vaugely like javadoc.
castaway ah, cute
sounds like a good idea
theorbtwo Really I don't want documentation so much as an index of types, but haddoc is the best way I know of to get it.
castaway ,) 10:17
didnt you do a script that listed those already, or was that something else? 10:18
theorbtwo No, that just shows dependencies.
The graph was already plenty crowded just showing that much.
castaway not that one, a while back
a grep of Prim.hs combined with something ? 10:19
theorbtwo Oh, that shows perl-visible primitives.
gaal i think i'm missing something basic about parsec: i have a trace at the beginning of a rule, then one later on in the same rule. as a file is being parsed, i see the secong trace emittted several times.. are parsec rules not regular functions? eg is a failure really just a yield?
theorbtwo Not haskell types.
castaway ah, Ok
castaway reists asking "whats parsec?" 10:20
theorbtwo Funky haskell parser library. 10:21
gaal theorbtwo: check out my exuberant ctags hack
it doesn't do everything you want yet
but it's a start.
castaway for parsing haskell, or other things?
gaal because exctags knows what kind of identifier it's tagging 10:22
theorbtwo (Funky because it's just a library, it doesn't create a new language with embedded haskell like, for example, P::RD.)
gaal castaway, for parsing whatever.
theorbtwo (Well, funky for other reasons as well, but that's a big one.)
But it parses the haskell itself?
mauke writing something like parsec (i.e. a parser monad) yourself isn't all that hard
gaal theorbtwo: the exctags haskell mode? not really, right now it just uses regexps :) 10:23
theorbtwo Right.
gaal a copout really, but as i said, it's a start.
theorbtwo I'd rather get haddock to do the heavy lifting, and possibly munge it's /output/ into ctags format if I wanted them that way.
(Which I don't know if I do.) 10:24
gaal well, why not.
autrijus bbiab
castaway ctags ?
theorbtwo Haddock seems to produce quite nice HTML.
gaal castaway: exctags also produces etags output :)
autrijus svn.openfoundry.org/openafp/Makefile has a "make docs", btw. 10:25
feel free to add it to our makefile.pl
theorbtwo I don't want to start tackling it until I'm finished gutting AST.hs into Types.hs.
autrijus k. :)
&
castaway has a feeling some of this is emacs related ,) 10:26
theorbtwo Very good.
nothingmuch ok, back from lunch 10:32
anyone know how where a lexical scope is snapshoted into a closure?
castaway ooh, an answer to my compiling-par-on hp question.. wow 10:48
jabbot pugs - 2432 - Updated mandel.p5 to output the fractal 11:01
Juerd nothingmuch? 11:06
nothingmuch Juerd? 11:14
mj test.wikidev.net/Pugs_tests?action=history r2431 added 11:16
Juerd 10:37 < nothingmuch> Juerd? 11:20
13:09 < Juerd> nothingmuch?
13:17 < nothingmuch> Juerd?
I guess it's my turn again
nothingmuch?
nothingmuch yes!
Juerd I don't like this game. I'm going to the office now. 11:21
nothingmuch i was wondering about the semantics of wrapping as closures
but then autrijus helped me figure it out
have fun at the office
mj please, my tutorial_gen is still waiting for "for @a -> $v is rw { $v = 10; }" ... statements/for.t 23 11:29
nothingmuch mj you want that implemented? 11:30
autrijus: when you're back I need some help 11:33
mj yes, please ... or reimplemented ... when i have written it, "is rw" was ok
nothingmuch =/ 11:34
hmm 11:35
mj for %conf<index>.values -> $val is rw { ... wiki.kn.vutbr.cz/mj/attach/pugs/fool/ctest.p6
castaway is "is rw" compulsory there? (seems like overkill) 11:36
nothingmuch castaway: afaik it is
castaway why?
nothingmuch uhhh
like in subs
castaway Oh.. thats to ensure you really want to change the actual element? (its aliased I assume, like in p5?) 11:37
"like in subs" tells me nothing btw, I havent been paying that much attention :)
broquaint thinks it odd one needs to declare aliases as rw ...
nothingmuch well, yes
ah 11:38
you have to declare it to really want that to be this way
or you can say 'is constant'
hmm
nothingmuch doesn't know where for is defined
castaway bro, why odd?
nothingmuch ah 11:39
here it is
castaway It seems to be as a deterrent for people that (in p5) generally change their vars in a for-loop, and get all confused when the original array changes
nothingmuch hmm
castaway (change contents of the loop var, that is) 11:40
nothingmuch it seems like it applies values normally
s/values/subs/
castaway ?
nothingmuch it makes a sub out of the loop body
broquaint & phone
nothingmuch then it just splits the parameters into chunks as big as the sub's arity 11:41
theorbtwo All blocks are closures.
broquaint Surely one wnats is copy rather than is rw?
nothingmuch and does doApply on the sub with the chunk of the params
broquaint: the default is 'is constant'
it's the most common
castaway bro, I would assume copy is the default?
theorbtwo If you want %conf<index>.values to change as a result of your for loop, you want "is rw".
Copy is not the default, is ro is. 11:42
castaway nm, can you say that in english and not perl6/haskellese? :)
s/copy/value/
nothingmuch sorry, it's haskellese
theorbtwo for @array -> $var {$var=1} will die.
nothingmuch basically since every block is a closure
it also accepts subs
theorbtwo for @array -> $var is copy {$var=1} is a null-op.
broquaint is constant is the default? That sounds odd too :/
nothingmuch so the for loop is basically a loop that splitces for (@array) the @array into the number of pieces that the body wants 11:43
theorbtwo for @array -> $var is rw {$var=1} is makes @array full of ones.
castaway why odd, bro?
(although, maybe it is.. you should get either a writeable var (is rw), or a copy.. a non-writeable alias seems to make little sense) 11:44
nothingmuch and calls $loop_body.(@some_params);
think of an alias as a copy of the container
with some restrictions
and you can think of 'is constant' as 'is constant copy' 11:45
if aliases that aren't writable don't make sense ;-)
so anyway, do we have 'is rw' on subs?
castaway umm, but is constant implies that I cant do, for example, s/// on the loop variable 11:46
nothingmuch right, you can't
theorbtwo That's correct.
nothingmuch you want is rw, or in a map is copy
castaway ah, but I dont want rw, because that would change the value in the original array, yes? 11:47
nothingmuch btw, can we do map -> $var, $var2 (@list) ?
sorry... corrected: map -> $var, $var2 {... } (@list) ?
so you want is copy
castaway which for doesnt have, you just claimed :)
nothingmuch I DID NO SUCH THING
oops
castaway ,)
nothingmuch tee hee
castaway sorry, theorbtwo said: 11:48
nothingmuch caps lock snuck in, didn't mean to sound like an arse
castaway for @array -> $var is copy {$var=1} is a null-op
no worries
nothingmuch meaning that it doesn't change the array
not that it does nothing at all... =)
castaway oh, cos $var isnt used otherwise, ok, sorry, misread
nothingmuch appearently we have is rw in subs
theorbtwo Well, it's in void context there, so it really does nothing.
castaway bro is correct tho, defaulting to constant seems odd
one would hope so
nothingmuch see t/var/is_rw.t 11:49
i wonder if you can do it to anonymous subs
castaway ponders how she usually uses for loops
nothingmuch castaway: many times i do '
for (@list) { my $var = $_; }
and then put a big fat comment saying "this is a copy! don't change this behavior" 11:50
not many times
well, not many times
most of the time if i'm mutating the value it's because i want is rw
castaway I'm not sure I ever have :)
nothingmuch maybe this is good reasoning: is constant is harder to remember to ask for
theorbtwo Right; "is copy" makes that behavior more clear -- it lets you change your index var(s) in the scope of the body without making the changes leak. 11:51
castaway umm, what I dont get, is what use is "is constant" there at all?
theorbtwo It's both fast and safe.
castaway safe from?
I dont see its point.
nothingmuch many people assume that for loops give you is copy and not is rw in p5
that causes some problems 11:52
theorbtwo Fast, because it does not imply a copy is being made, and safe, because you cannot change your loop var and have it leak.
nothingmuch but is rw is much more useful
since it's both dangerous and useful, it should be easy to get,
but perhaps not the default
theorbtwo I prefer to mutate my lists with @list = map {} @list;
It reads much clearer for me.
castaway right, so default to whats normally assumed?
theorbtwo "is constant" 11:53
Er, misread.
"Yes."
nothingmuch castaway: but the default that is normally assumed is silly
'is copy' is normally useless
and slow
castaway I dunno, maybe Im odd, but I never use for-loops to change things, I'd use map/grep there
nothingmuch i use for loops to change in place
$_++ for (@list);
@list = map { $_ + 1 } @list;
theorbtwo @list .= map {++$_} 11:54
nothingmuch i think the first conveys my meaning better
wolverian map $_++, @list; :)
castaway how would that translate to p6? (since it seemed the braces for the anon-sub are required)
nothingmuch @list>>++;
theorbtwo Oh, right, nm.
mj for @a {} is same as for @a -> $_ is rw {}
wolverian castaway: which?
castaway nothingmuch, whether its silly or not.. surely its better to go with expectations..
$_++ for (@list); == in p6 ? 11:55
wolverian yes.
nothingmuch castaway: i dunno. I prefer is constant because it gives me safety but doesn't take away much
anyway, the reason i preferred the first is that i feel i'm changing the elements, not the list
but that's just me
that's p5 actually, to me,
autrijus theorbtwo: can you hold AST.hs refactor a bit?
wolverian the 'for' there is in the statemenet modifier category, so the parser knows how to do it.
nothingmuch in p6 i would do '@list>>++'
wolverian statement, rather.
nothingmuch autrijus: help help help!
theorbtwo autrijus: gladly.
autrijus theorbtwo: there may be large conflict going your way
nothingmuch i am getting nowhere
castaway Well, in IMhO, people assuming bad defaults in p5, are going to continue to be confused in p6, just for another reason 11:56
autrijus nothingmuch: sorry, tied to $work right now
nothingmuch: but I did move all our variables into STM.
;)
will commit soon
nothingmuch autrijus++
castaway wolv, eh? yes what?
nothingmuch can you really quickly point me to where closures are created?
wolverian castaway: yes, that is in p6.
autrijus no idea if it make things really slow or not
nothingmuch: they are created by the "sub" Syn
wolverian castaway: (the statement-form for loop. the particular usage there is a bit p5-esque.)
castaway you mean its the same?
wolverian yes.
castaway ah
nothingmuch thanks
castaway with no "is rw" ?? 11:57
nothingmuch when does unionPads happen?
wolverian if you don't have an explicit signature, $_ is rw is the default
castaway argh!
autrijus nothingmuch: unionPads is only done to introduce some extra &?SUB etc
castaway Its all a plot against readable code!
nothingmuch so how are pads walked?
is it a union of maps? 11:58
wolverian castaway: @fooĀ».++; # this is more p6-esque, anyway
castaway cant even read that :)
theorbtwo wolverian: Are you sure is rw is the defualt?
wolverian hmm, the . there is wrong, I guess.
autrijus nothingmuch: a pad is just a map
that's all
nothingmuch does it contain all the variables?
theorbtwo Right, no dot.
wolverian theorbtwo: when there is no signature. yes, I think I read so, and mj says as much.
nothingmuch { my $foo { my $bar } } ; # inner pad has foo and bar? 11:59
autrijus yes.
nothingmuch okay thanks
autrijus np
nothingmuch autrijus++
mj: anon subs can also use is rw
so i will try to find out why the for syn is not respecting that
autrijus huge change is checked in as r2433 12:00
I'm interested to learn if it makes smoke time significantly slower
(because STM carries extra journaling)
nothingmuch autrijus: i'll benchmark
autrijus if it is much slower, I will contemplate rollback.
nothingmuch shouldn't they only journal if atomic is in effect somewhere? 12:01
castaway wonders how printable the Synopses and Apoc-whatsits are
jabbot pugs - 2433 - * STMification: All our IORefs are now T
pugs - 2434 - check that anon subs can do 'is rw'
nothingmuch castaway: don't bother with the apocalypses
gaal at one point i had #line "almost working" but at 100% slowdown
nothingmuch the syns are printable 12:02
castaway nm, but afaik, one should look there if something is not found in a synopsis ?
nothingmuch not really, they are more like manic brainstorms
i have not yet needed to look deeply in any of them
castaway I didnt find them all that unreadable ,)
nothingmuch they're pretty readable,
but i've always searched 12:03
before STM: 152.630u 8.770s 2:59.23 90.0% 0+0k 0+0io 556825pf+0w
nothingmuch wonders if perhaps 'map Val these' in for's doApply is making them non is rw 12:08
after STM: 156.800u 8.210s 3:02.52 90.4% 0+0k 0+0io 560511pf+0w 12:12
2 seconds of real time lost
4 seconds of user time
theorbtwo Sounds pretty negligable.
nothingmuch probably the fact that i'm on NFS is more of an issue
,
castaway what're you timing, all the tests?
nothingmuch yep
'make test'
castaway ah, ok then
nothingmuch page faults also seem fine 12:13
autrijus: timing results back
nothingmuch is very happy
castaway busys the printer 12:32
theorbtwo Printing the syns? 12:33
castaway just a couple
nothingmuch it's either a string or a number 12:41
nothingmuch contemplates a 'uuid' builtin
and it's different each time around
would save many people a lot of trouble
it could also be optimized 12:42
for hash lookups or whatever
since assumptions about the key space and the data can be made
theorbtwo I don't see any purticular reason to make it a builtin. 12:43
nothingmuch i see only one valid reason: so that it's not redone 12:44
Juerd Is it redtwo? 12:45
autrijus greetings.
Juerd Hello
nothingmuch autrijus: no diff with STM
autrijus nothingmuch: Data.Unique has this thing.
envID uses that
nothingmuch: good. I've changed Hash to be STM.
(it as IO)
(it was IO)
theorbtwo IO, or IORef? 12:46
autrijus IO
Data.HashTable
nothingmuch autrijus: comitted?
i'll have to test it when I'm home
autrijus nothingmuch: yes, committed as r2438
now the next logical thing to do is 12:47
-type Eval x = ContT Val (ReaderT Env IO) x
+type Eval x = ContT Val (ReaderT Env STM) x
after that we can have our atomically{} builtin.
nothingmuch "atomic" expr = atomic { block <- subFoo expr; doApply block } ?
theorbtwo autrijus: Don't worry about blocking me; I'm switching to haddocking. 12:48
autrijus theorbtwo: ok.
nothingmuch has to go home... ciao!
autrijus nothingmuch: actually, if we are in STM monad, everything is atomic by default
nothingmuch everything?
oh!
oh wow
autrijus "I'm atomic... by default!"
swiss army nuke
nothingmuch so haskell errors will undo automatically? 12:49
autrijus we can do that, yes
by using a newtype Eval
nothingmuch what implications does that have on async { } ?
theorbtwo (Which requires some changes to the build system so we can get ghc to render the post-cpp haskell files.)
nothingmuch crap, i have to go
ciao!
autrijus ciao
nothingmuch i think i can hack in wrap later tonight
broquaint STM? 12:50
theorbtwo somthing Transactional Memory 12:51
jabbot pugs - 2435 - Memory game v0.2
pugs - 2436 - first part of wrapping test
pugs - 2437 - * remove unused DynamicLoader
pugs - 2438 - * Replace Data.HashTable into STM Map
autrijus software transactional memory 12:52
broquaint Cool, thanks. Sounds leet.
autrijus broquaint: read this:
homepages.inf.ed.ac.uk/wadler/links...-jones.ppt 12:53
it's very very leet.
broquaint Ooh, Peyton-Jones - it's gotta be good!
Does anything implement it? 12:54
Apart from Pugs.
autrijus broquaint: C#, Java, GHC, Sun Fortress
castaway Its haskell thats implemented it, not Pugs
autrijus apparently catching on rapidly 12:55
boogie checked in memory game v0.2: perl6.hu/cgi-bin/index.cgi
autrijus but perl5 doesn't have it. sucks
boogie: ooh
broquaint Sounds like all the rage.
boogie autrijus: just small improvements
broquaint If only some could right a module to implement it (where's TheDamian when you need his mad scientist skillz?) ...
autrijus broquaint: it's, uhm, a bit more involved than that :) 12:56
broquaint s/some could right/someone could write/
autrijus maybe sky or liz can do that
broquaint I don't want excuses, I want results!
autrijus ithreads /= my forte
broquaint Threads in perl = mad, bad and dangerous to know
autrijus and very slow to boot. 12:57
but, amazingly, is usabl
e
broquaint Maybe if we re-implement Perl 5 in Haskell ...
... we'll have wasted and good chunk of our lives. 12:58
Jonathan_ Or target it at Parrot, which should do threading much better. I hope. :)
broquaint s/and/a/ # decaf tea--
It will! It must! Or it's Davy Jones' locker for us all! 12:59
Limbic_Region seen stevan
jabbot Limbic_Region: stevan was seen 7 hours 44 minutes 40 seconds ago
broquaint Ooh, transactional memory, me likee ... 13:01
broquaint decides to finish "The Awkward Squad" before STM 13:03
13:06 irc.freenode.net sets mode: +n
castaway has made fire! 13:12
(well, ok, made this stupid perl4ish perl5 program "work" again)
broquaint Now convert it to perl6. 13:14
castaway falls over dead
theorbtwo gives castaway mouth-to-mouth. 13:16
castaway :) 13:17
I was about to give you a list of the files concerned and their sizes.. but damned if I can make "ls" do "just" that 13:18
whatever, in long format:
-rw-r--r-- 1 jer osa 1636 Apr 27 15:45 Configuration.pm
-rw-r--r-- 1 jer osa 32963 Apr 27 15:45 checkComponentsMisSpoc.pm
-rw-r--r-- 1 jer osa 33196 Apr 27 15:45 checkComponentsShell.pm
-rw-r--r-- 1 jer osa 42925 Apr 27 15:45 checkMisEnv.pm
-rw-r--r-- 1 jer osa 11825 Apr 27 15:45 defineMessages.pm
-rw-r--r-- 1 jer osa 35574 Apr 27 15:45 defineMisc.pm
-rw-r--r-- 1 jer osa 18862 Apr 27 15:45 defineResultMisSpoc.pm
-rw-r--r-- 1 jer osa 17576 Apr 27 15:45 defineResultShell.pm
broquaint ls -S ? I think recent fancy linuces support it.
castaway -rw-r--r-- 1 jer osa 22013 Apr 27 15:45 mis_checkall.pm
-rw-r--r-- 1 jer osa 16581 Apr 27 15:45 mis_spoc.pm
-r--r--r-- 1 jer osa 179902 Apr 28 15:14 utilSubs.pm
(so I'd probably be here until christmas)
broquaint Time to refactor! 13:19
wolverian broquaint: that just sorts by size
broquaint Ah, thanks, wolverian. Don't have linux at hand :/
castaway nope, -S is sort.. and -s is block size
broquaint & # food
castaway anyway, that was on AIX 4.3 ,)
broquaint ls -hs (-h for human?) # now eating ... really
wolverian yes 13:20
castaway total 616K
4.0K Configuration.pm
36K checkComponentsMisSpoc.pm
36K checkComponentsShell.pm
44K checkMisEnv.pm
12K defineMessages.pm
36K defineMisc.pm
20K defineResultMisSpoc.pm
20K defineResultShell.pm
24K mis_checkall.pm
20K mis_spoc.pm
wolverian spam!
castaway 180K utilSubs.pm
184K utilSubs.pm~
mounted-home-dirs++
ok I'm done now :) 13:21
jabbot pugs - 2439 - See thread "is rw basically a null-op on
Juerd Does anyone have logs of this channel? If so, can I get a (gzipped) copy? 13:29
machack666 Juerd: colabti.de/irclogger//irclogger_log/perl6
Limbic_Region Juerd - can't you just download from the logger?
Juerd Thanks 13:30
Limbic_Region: That requires knowing there is such a thing :)
Limbic_Region FWIW - the link is on the pugs home page pugscode.org
along with a few other useful links too
machack666 anyone there who knows about the pugs internals? 13:31
Limbic_Region there or here? 13:32
machack666 never mind...found what I needed in the logs
theorbtwo grrrs at make 13:38
.hs.hpp : $ghc $threaded $ghc_flags -E \$< -o \$@
Why does that rule not trigger on make src/Pugs/Help.hpp
nothingmuch returns with a dramatic effect 13:41
hola jhorwitz
jhorwitz hola!
Limbic_Region nothingmuch - did you see stevan WRT last tests?
nothingmuch Limbic_Region: haven't talked to him since 13:42
Limbic_Region k
stevan Limbic_Region: morning 13:44
hey all
nothingmuch hola
stevan theorbtwo: are you starting to document the haskell source? 13:46
theorbtwo Well, I'm starting by trying to get haddock to run from our source. 13:49
Then possibly start documenting.
stevan theorbtwo: I was thinking that I would like to do that to help get my head around Haskell 13:50
I actually hacked it a little already by putting some POD into multi-line Haskell comments 13:51
but Haddock sonds like a much better idea
theorbtwo The problem I'm having at the moment is that haddock can't natively deal with ifdefs. 13:52
Arathorn has anyone got a recent smoke url handy?
(the topic is b0rked)
theorbtwo It needs it post-preprocessed.
nothingmuch Arathorn: pugs.kwiki.org/?SmokedPugs 13:53
stevan ahhh,.. no more make optimized?
Arathorn nothingmuch: thankee 13:55
nothingmuch =)
boogie Anybody can tell me if is it the right behaviour that the following code not changes $variable? 14:05
given $variable { s:perl5/what/to/; }
theorbtwo I think it shouldn't change it, but should error, but from an earlier discussion today, perhaps it should modify $variable. 14:07
It depends on if $variable is copy, is rw, or is constant in that scope. 14:08
Rather, if $_ is.
boogie I mean: my $variable='what'; given $variable { s:perl5/what/to/; }
Jonathan_ stevan: I can switch my smoke to do "make optimized" if that'd help. 14:09
stevan Jonathan_: I just tried make optimized and it didnt work (no target for optimized)
Jonathan_ Oh, sorry; I thought you meant it was there and no tinders were doing it. 14:10
stevan just realized he misspelled optimized
Jonathan_ Ah. :)
stevan takes another gulp of coffee and tries to wake up
Jonathan_: I think make optimized is implied by make smoke
theorbtwo: a question about embedding haskell if you have a moment 14:12
theorbtwo Shoot.
Sorry, gaim segfaulted on me. 14:15
stevan theorbtwo: I was wondering if it would be possible to move the File::Spec::cwd code into ext/File-Spec by embedding the haskell? 14:16
or am I viewing it all wrong
theorbtwo It should be possible (but means that File::Spec won't work without hs-plugins).
stevan ok
so in theory I might be able to use it like Inline? 14:17
theorbtwo In essence, yes.
stevan sub perl6_function (Int $x) { eval_haskell("some crazy haskell code to do something to the int") }
theorbtwo Having one in the core would be nice too, so it gets at least some testing.
stevan would it work like that? 14:18
is there tests?
theorbtwo Well, eval_haskell("some crazy haskell code to do something to the int $x") -- you have to interoperlate in any arguments.
stevan ok
theorbtwo For eval_haskell, yes.
t/unspecced/eval_haskell.
Better tests are very welcome.
stevan contemplates a Term::Readline which wraps System.Readline (or whatever the haskell lib is called)
theorbtwo Right now I'd be very interested in any problems that I can actually solve. 14:19
It's been that sort of week.
Arathorn has anyone thought about the ==> and <== ops?
stevan theorbtwo: if you are itching for something to do, maybe try moving the File::Spec::cwd code? 14:20
it might help me get the idea :)
theorbtwo Hm, I'm not sure I like the idea of breaking Test.pm in the non-hs-plugins case.
Oh, it wouldn't. 14:21
stevan no it wouldnt 14:22
only a few things use File::Spec
hangman, and a few other examples
theorbtwo Sounds like a good idea then. 14:26
stevan theorbtwo++ 14:31
castaway allo! 14:35
theorbtwo Hmm, only problem is the monadic nature of the op.
stevan which op? File::Spec::cwd? or eval_haskell? 14:36
theorbtwo File::Spec::cwd
getCurrentDirectory :: IO String, so it needs to be run inside a monad, and it rather breaks the rules for using unsafePerformIO safely. 14:37
castaway wants to go "ha!"
remember earlier we were discussing for @list -> $fred is rw {} ? 14:38
stevan nods as if he understands what theorbtwo is talking about
theorbtwo Right, love.
castaway -> means pointy sub, and "is rw" means trait, yes? 14:39
theorbtwo stevan: getCurrentDirectory doesn't always return the same output for the same input.
Correct.
stevan ah
theorbtwo (That is, it takes no input, and returns something that isn't always the same.)
castaway then let me point you to S06, "Pointy subs" : ".. and a pointy sub may not be given traits"
stevan very un-Haskell-ish
theorbtwo: and that is why you wrap it in a monad?? 14:40
theorbtwo Exactly.
stevan and eval_haskell does not like monads??
castaway sniffs 14:41
theorbtwo Well, eval_haskell requires that the thingy being run inside return a String. 14:42
stevan and not IO String
theorbtwo Exactly. 14:43
stevan can we cast it?
theorbtwo That's what unsafePerformIO does, but it's not... well... safe. 14:44
stevan bah! life is dangerous!
whats a little unsafeIO between langauges :)
castaway s/safe/pure/ 14:45
stevan so is it possible, just not advised? or is it not possible
theorbtwo It is possible, it just might end up returning the same thing before and after you cd around.
stevan how so? 14:46
clog in the monad?
stevan has limited understanding of monads, so please be gentle ;)
theorbtwo Anything not in a monad is fair game to do pretty much any optimization you can think of on, including caching results. 14:47
stevan so once we take it out of the monad, we are potentially in trouble ?
theorbtwo Exactly.
The correct solution is to do what File::Spec::cwd currently does -- always keep it in a monad, either Eval or IO. 14:48
stevan is there anyway to force things? eval 'eval_haskell(...)'?
and we cannot keep it in the monad if we move it becuase? 14:49
theorbtwo In any case, what I'm wondering now is a lot more down-to-earth then that -- both unsafePerformIO and getCurrentDirectory aren't imported, and I haven't left any way to specify that they should be.
stevan hmmm 14:50
castaway moo!
Limbic_Region stevan I am about to head off to a marathon meeting but was wondering if you had done any of the last tests we had talked about - if so where? 14:52
stevan t/statements/last|next.t
Limbic_Region: very primative, I have been sitting on them for a few days hoping to get the time
Limbic_Region: then i finally decided it was better to submit them to the group in hopes someone else might find the time :) 14:53
Limbic_Region ok - will take a look when/if I get some time
stevan Limbic_Region: sounds good
Limbic_Region: how'd the house closing go? 14:54
Limbic_Region is rather perturbed at recent corporate FW changes
great - less than 1 hr start to finish
stevan dontcha hate signing over that much $$ :)
Limbic_Region well, considering the first house I bought (for my mother) total cost was about 10% of this one - YEP
been thinking about junctions a bit lately - I really think scalar context shouldn't preclude saving away values for future retrieval as would a boolean context 14:56
or rather, I think junctions should make finding all the characters one string has in common with another string possible and easy 14:57
stevan Limbic_Region: that is a cool idea
I always saw them more from the boolean point of view myself 14:58
Limbic_Region right - until you start saying things like I want all the items from this list that match any of the items from that list
you can see all the other way they would be of value
anyways
Limbic_Region meeting & 14:59
stevan enjoy :)
autrijus rehi. 15:11
jabbot pugs - 2440 - * move the readline probing to Makefile.
autrijus tried to make Eval a data type and failed miserably 15:12
theorbtwo A newtype, you mean? 15:13
autrijus a data type. 15:14
data Eval x = EvalIO (ContT Val (ReaderT Env IO) x) | EvalSTM (ContT Val (ReaderT Env STM) x) deriving (Typeable)
it's essential to happen to get atomic{} working
theorbtwo Ah.
autrijus if you say
atomic { say "Hello" } 15:15
then pugs will throw out a catchable exception.
which is, I maintain, the Right Thing.
theorbtwo Makes sense.
autrijus we do that b
by
instance MonadIO Eval where
liftIO io = EvalIO (liftIO io) 15:16
and by disallowing EvalSTM >>= EvalIO
er
I mean disallowing EvalIO >>= EvalSTM
the other way is fine
so whenever we see EvalIO >>= EvalSTM
we trigger fail"" 15:17
which is shiftT $ return (VError ...)
which i sthen catchable.
theorbtwo Sounds like a cool plan.
autrijus =)
theorbtwo Get tangled up in dependencies?
autrijus yeah.
the only way out I think is to remove all the default code 15:18
in Class.*
I'm doing just that
theorbtwo I wonder if I should put up my dependency grapher somewhere.
autrijus that'd help
theorbtwo It's highly unpolished, but working -- to produce dot files. 15:19
The dot files are then impossible to actually get something useful out of.
autrijus heh. 15:20
theorbtwo It's all very tangled. 15:21
perlbot: nopaste? 15:23
perlbot Paste your code here and #<channel> will be able to view it: sial.org/pbot/<channel>
pasteling "theorbtwo" at 84.245.186.105 pasted "higraph" (52 lines, 1.5K) at sial.org/pbot/9733 15:24
castaway hey autrijus 15:29
autrijus yo 15:34
castaway did you read my claim about for -> $var is rw, just now? 15:35
ie that pointy subs arent supposed to have traits ?
James is arguing that the trait then applies to the $var, which makes no sense to me..
stevan nothingmuch: ping 15:38
hey autrijus :)
nothingmuch hola
sorry stevan, my network died
castaway oh damn.. I think I get it.. (badly written docs)-- 15:44
theorbtwo castaway: www.nntp.perl.org/group/perl.perl6....uage/20674 15:45
elmex is timely destruction really not used much? 15:58
autrijus yay. 16:02
I finall won against the dependency monster
I had to use this super ugly ninjatsu weapon that is #include ;) 16:03
elmex hm 16:04
autrijus: what do you think, is timely destruction really that rare used?
obra autrijus: I've had two people in the past 24 hours ask me how to pronounce autrijus
autrijus obra: autrijus.org/autrijus.mp3
obra perhaps autrijus.org/autrijus.mp3 should be in the pugs faq?
autrijus eh.
obra grins
autrijus feel free to add it to my wikipedia page ;) 16:05
obra *snerk*
ninereasons I love that it sounds almost like "outrageous"
stevan auh-tree-jus
obra They decided not to delete it? neat 16:06
autrijus yeah. apparently a week or so ago MJD went thru the same VfD
16:09 [1]metaperl_ is now known as _metaperl
elmex warnocked? 16:10
autrijus hm? 16:12
Arathorn did matt fowles silently devolve responsibility for p6*-summarizing back to piers cawley? 16:14
stevan autrijus: i have some questions about src/Pugs/Types/* if you have some time
Arathorn: they are splitting it
peirs, then matt, then peirs, then matt 16:15
Arathorn ah, interleaving - gotcha
funky :)
stevan zip(@piers, @matt)
Arathorn or ōæ½xA5 or whatever :)
stevan gather { for zip(@piers, @matt) -> $summary { take $summary; sleep 604800; }} 16:18
(i think)
autrijus stevan: I'm annihilating them
so whatever questions you have, will no longer apply :) 16:19
stevan autrijus: LOL
ok
why?
autrijus difficult to answer.
stevan autrijus: ok, nevermind then
autrijus "due to limitations of GHC's mutual module recursion" 16:20
stevan autrijus: I wanted to start documenting some haskell to help me learn it
autrijus: any good place to start?
autrijus stevan: sure! start with Eval.hs? 16:21
stevan autrijus: ok 16:22
should I try doing Haddock ? or POD within multi-line comments?
autrijus try haddock
stevan ok
Limbic_Region hopes he didn't sound like he was complaining about junctions on p6.l 16:29
revdiablo Limbic_Region: it didn't seem that way when I read it. 16:30
Limbic_Region autrijus - should functions like defined() work on $_ if no $var is specified?
for instance my @matches = grep { defined } @list; 16:31
gaal L~R, many do: see the bottom of Prim.hs and look for Str=$_
?Str=$_, rather. 16:32
Limbic_Region ok, so the next question is that if it doesn't - is that by design or oversight 16:33
cause I really expected my @matches = grep { defined } @list; # to work 16:34
autrijus Limbic_Region: feel free to fix. 16:35
gaal i don't know. s29 is the spec for most of these. if it's not there, you could try asking rod adams
autrijus defined() is not there.
please send patch to rod
gaal i wonder why defined doesn't take $_ in p5 16:36
(i think it doesn't?)
oh, it does
autrijus O the glorious typechecker
nothingmuch hoi!
autrijus Be thou my guardian and my guide
Be thou my vision
Bind the variables together, O lord 16:37
autrijus finally eliminated AST.hs-boot!
Limbic_Region yeah autrijus
autrijus theorbtwo: we are now free to do whatever type refactoring!
as a bonus, I expecte performance to increase even more.
nothingmuch autrijus: does hash/stm hinder performance?
autrijus nothingmuch: I don't know, hadn't tested 16:38
gaal O dark mysterious parsec
autrijus nothingmuch: run a smoke after I checkin?
nothingmuch my ssh tunnel is not reincarnating
autrijus to time it that is
aw.
nothingmuch so i can't compare
autrijus k.
gaal Art thy named for thy unfathomable lengths
nothingmuch but i can do it on eris
i'll time now
and time later
good enough?
gaal thy imponderable distances
thy silences? 16:39
autrijus nothingmuch: sure. I will do that same :)
it's in as r2441.
nothingmuch okay, compiling and testing 2440 and then 2441 16:40
autrijus cool.
gaal autrijus, got some time to look at my #line attempts? it works except for where it breaks :) 16:41
autrijus gaal: sure. url?
pasteling "gaal" at 192.115.25.249 pasted "#line attempts" (31 lines, 1.2K) at sial.org/pbot/9738
jabbot pugs - 2441 - * AST.hs-boot elimianted!
gaal that's the code. following is a sample file for which this works: 16:42
pasteling "gaal" at 192.115.25.249 pasted "works here" (10 lines, 217B) at sial.org/pbot/9739
gaal notes: 1. i know i'm doing something wrong aroung "ld <- try $ do" because fail "" from there leaves the function; 16:43
autrijus duration went from 196 to 171 here. 16:44
gaal 2. this breaks with e.g. t/statements/last.t - with very weird debug prints, e.g. reported line numbers that go up to line 72 - much more than the length of that file.
nothingmuch it got faster? 16:45
mine is still compiling
autrijus (before and after the STM+AST.hs-boot) change
yeah, it got much faster.
nothingmuch =)
autrijus gaal: ok, will look.
nothingmuch in that case we can say that it's because STM and not because of AST.hs-boot
and thus claim that atomicity improves performance ;-)
autrijus that'd be lying ;)
gaal so, first, i realize my "try" there is incorrect, but what i'm trying to do there is clean up after lines that *look* like they're going to be #line directives, but turn out not to parse as such 16:46
nothingmuch don't tell anyone =)
autrijus you do realized we are on a public logged channel :) 16:47
Limbic_Region gaal - I was just about to start working on last.t and I noticed your note - something I should be concerned about?
gaal by clean up i mean just treat them as comments, skip to the end of the line. i have to do this inside ruleLineDirective because my parsing there consumes input, so the regular comment rule in ruleComment won't be tried.
nothingmuch sorry 16:48
there, now that wasn't logged.
autrijus ...
gaal L~R, no, i think this is all in my code :)
I was just picking on that test as an example.
nothingmuch compile.... sooooo.... sloooooowwww
can ghc compile two modules in parallel somehow? 16:49
Limbic_Region oh - so last <label> isn't currently defined/implemented right - what is the proper way to mark a test as skip/todo/foo ?
nothingmuch Limbic_Region: is(1, 2, "one is two", :todo); 16:50
gaal L~R, try to wrap the whole test in eval, so it only passes when it deserves to
if you have a hard parsefail, comment out the lines and add a note. see t/README
nothingmuch you could also do: 16:51
eval_is("perl code", $expected, "foo", :todo);
that will report the error too, for added goodness
there is lots of example code
gaal but remember, L~R, that if you do that you can't $expect 0. :) 16:52
Limbic_Region ok, and eval_is() is fine to add as a planned test right?
gaal sure!
except for the 0 caveat, and for hard parsefails, it does most of the work. 16:53
nothingmuch Limbic_Region: sure
why can't you expect 0? 16:54
gaal because is(undef, 0) passes
and thus so will is_eval("die", 0)
nothingmuch if the eval dies then it dies
otoh: is(eval '0', 0, "caveat")?
eval_is('die', 0, "shouldn't pass");
eval_is checks that there was an error
gaal walla?
nothingmuch i wrote it, i should know 16:55
gaal cool, good job then.
nothingmuch that's actually why i wrote it =)
gaal so it's like p5's lives_and
nothingmuch++; # apis of least surprise 16:56
though when we first talked about this, i think i asked you to document it. :-P
nothingmuch crap
something changed 16:57
gaal you don't love me anymore!
nothingmuch there
$! began being false 16:58
so i made it check for def
perlbot: nopaste 16:59
perlbot Paste your code here and #<channel> will be able to view it: sial.org/pbot/<channel>
pasteling "nothingmuch" at 212.143.91.217 pasted "eval_is" (33 lines, 856B) at sial.org/pbot/9740
16:59 Aankh|Clone is now known as Aankhen``
Limbic_Region nothingmuch - I need some help with the eval_is() test 17:00
nothingmuch okay
Limbic_Region basically what I want to do is define a variable, define a label, write a for loop, first statement is to last <lable>, second should assign to variable though should never be reached - the test should verify that it is not set 17:01
jabbot pugs - 2442 - fix eval_is and eval_ok
nothingmuch right 17:02
gaal makes some yerba mate & # brb
nothingmuch eval_is('my $var = 0; for (1..2){ last; $var++ }; $var', 0, "var was not incremeted because loop exited"); 17:03
orr if your loop is going to be longer than you want to fit in a string:
my $var = 0;
Limbic_Region wait - that's good enough
nothingmuch eval 'for (....) { ...ijalktjlaktj }';
is($var, 0, "blah");
otoh if it actually parses you may want to say
Limbic_Region I didn't understand the last $var part being the returned value from the eval
nothingmuch try { for (...) { ... } }; 17:04
that's just like in p5
the whole eval is an rvalue
Limbic_Region so eval_is('my $var=0; DONE: for (1..2) { last DONE; $var ;} $var', 0, "var is 0 because last before increment"); 17:06
nothingmuch yep 17:07
although if you're testing that
nest two loops
in another test 17:08
(it's good to see some tests starting to pass if you develop, helps you assess which way you are progressing)
Limbic_Region nothingmuch - was already augmenting stevan's tests with multiple loops, plain jane last, and last label - just didn't know how to do the last one 17:09
nothingmuch so there's a test for 'OUTER: for (1..2) { INNER: for (1..2) { last OUTER } }' ? 17:10
Limbic_Region s/there's/there's going to be/ 17:11
I haven't finished yet
nothingmuch ah, ok
that's what I meant
Limbic_Region yep yep
nothingmuch see also a test i wrote on block level closures
gaal forum2.org/gaal/pugs/smoke-msys.html r2441
nothingmuch err, whatever they're called
t/statements/control_blocks.t t/statements/control_blocks.t 17:12
revdiablo I have some simple recursion tests I wrote. I assume they should go into t/subroutines/recurse.t? the subs are named horribly right now, should I just check them in and perhaps someone else can think of better names? 17:20
nothingmuch revdiablo: you can do that
and commit if they don't come within 2-3 minutes
you can also nopaste
wait for comments
gaal yes :) if you like, you can leave a comment describing what kinda thing you have in mind
nothingmuch whichever you prefer
bass is tempting 17:21
revdiablo I guess I'll nopaste first 17:22
pasteling "Limbic_Region" at 129.33.119.12 pasted "Do these look reasonable" (84 lines, 1.5K) at sial.org/pbot/9742 17:23
Limbic_Region well, other than there should be 7 tests instead of 6
Limbic_Region is unable to test them ATM 17:24
pasteling "revdiablo" at 24.75.156.86 pasted "a few recursion tests. could shorter/easier sub names. any suggestions?" (62 lines, 1.9K) at sial.org/pbot/9744
gaal L~R, looks good to me 17:25
usually tests say "kwid" and not "pod" though.
Limbic_Region gaal - blame stevan 17:26
I am only augmenting his first 3 tests
ok - should :todo work - or is that only for the harness? 17:27
gaal revidiablo - you can, if you like, use one function only, and move the behavioral params to sub args.
not sure that makes things better though.
Limbic_Region btw - the test found a bug so that's a good thing right? 17:28
gaal :todo works - how it is interpreted depends on who is running it.
it's a TAP thing; appends # TODO to the test.
to the test description that is.
Limbic_Region well, I ran it as Pugs last.t 17:29
and it bombed out saying that :todo was undefined
gaal it used to be spelled :todo(1) recently - maybe you're using an old verison of Test.pm?
set your PERL6LIB explicitly to avoid that 17:30
Limbic_Region I just copied/pasted from svn
since I am using a binary version of Pugs by Johnathan
Limbic_Region has limited capabilities from work
gaal what is your Test.pm?
Limbic_Region from 2442 17:31
gaal and you're sure you'e running that one and not one form a previosu make install?
Limbic_Region 0.0.5
Limbic_Region didn't make Pugs
I am using a binary distribution 17:32
I went to svn, copied/pasted Test.pm directly from svn
gaal okay.. what happens when you try to run, eg, t/syntax/symbol_table.t ?
Limbic_Region just a sec 17:33
gaal that's just a random other test that uses :todo
Limbic_Region btw - the binary distro doesn't come with the tests so I have to copy/paste each one
changing :todo to :todo(1) appears to be working 17:36
gaal hmmm, maybe the fix was in fact in pugs itself, not Test.pm; and your build is a little old? 17:37
r2406 fixed that.
no, sorry. r2406 just s///ed the tests. 17:38
i don't know where :todo started working.
pasteling "Limbic_Region" at 129.33.119.12 pasted "Can someone check this in as t/statements/last.t" (84 lines, 1.5K) at sial.org/pbot/9745 17:39
mj r2403 vs. r2440 ... test.wikidev.net/Pugs_tests_full?ti...;oldid=782
Limbic_Region gaal - I can't checkin from work - could you be so kind? 17:40
gaal sure, one sec.
Limbic_Region btw - it exposes a bug
last in nested loops doesn't work 17:41
s/work/work correctly/
gaal cool :)
Limbic_Region it jumps out of all loops not just the current one
going to go work on the next tests next 17:42
machack666 is there a tags module that works with haskell?
Limbic_Region oh yeah, all of next is todo
machack666 n/m...just googled for hasktags 17:43
gaal machack666: there's also a exctags patch if hasktags don't wokr for you. 17:45
r2443, thanks L~R!
machack666 hmm...hasktags doesn't like living on HFS+ 17:46
gaal machak666, can you compile exctags? i'll give you the patch, sec.
machack666 I'll have to d/l it ... etags is what came with my system 17:47
gaal www.livejournal.com/users/gaal/161104.html # against exuberant ctags 5.5.4
Limbic_Region notes that he hasn't eaten yet and will tackle the next tests when he returns 17:48
Limbic_Region food &
gaal oh, and you'll have to fudge the newlines in the mac makefile, sorry :) i just noticed i'd copied the visual representation of a mac newline.
machack666 is it just a perl module, or am I looking for a source tree for a binary?
gaal it's a c project 17:49
if you were on linux i'd just send you my binary.
hey, i can send you my tags if you like! :) 17:50
machack666 OS X, (un-)fortunately. :D
gaal vim or emacs style?
machack666 emacs
gaal sec
jabbot pugs - 2443 - add tests, expose bug (Limbig~Region) 17:51
gaal machack666: forum2.org/gaal/pugs/TAGS.gz 17:53
gunzip it and drop it in your source root.
machack666 thanks
gaal sure
machack666 how would you get a handle on the active closure? I'm trying to add closure traits and I believe that they are all contained within the declaring block. In order to add those traits though, I need to know which VCode block I'm adding to. 17:59
also, is the global scope just a VCode as well?
That would mean that we wouldn't need special case code for BEGIN {} and END {} blocks at the package level 18:00
they could just be handled in the same way as ordinary blocks
Limbic_Region stevan ping 18:18
hmmm - I am wondering if I should convert the next.t tests to is_eval() like I did in last.t since next isn't implemented at all yet? 18:19
jabbot pugs - 2444 - msg for require failed (not same as not 18:22
pugs - 2445 - tests to check the return values for som
theorbtwo wonders if there is a good way to make a eval_haskell('code' :imports<IO>) work. 18:25
Limbic_Region does 2 < $foo < 4 work yet? 18:28
machack666 pugs -e 'say "yes" if 2<3<4'
yes
pugs -e 'say "yes" if 2<6<4' 18:29
<nothing>
Limbic_Region yeah, I did the TIAS approach right after asking
machack666 TIAS?
revdiablo try it and see 18:30
machack666 ah
Corion How long does a Linux fsck disk scan of a 40GB disk usually take? I just had to reboot a box, and it doesn't respond to pings yet ... 18:35
(let's assume a standard, cheapo IDE disk)
obra was it dirty? 18:36
has it been more than 15 minutes?
Corion obra: Not yet - I started the reboot about ten minutes ago. The box didn't respond (except to pings) and all ports were closed. 18:38
So yes, it likely is dirty, as I rebooted the box from the rescue console and not from within the box :)
obra nothing's wrong yet ;)
Corion obra: But I'm nervous :) 18:39
obra sure
autrijus rod says he will be dismayed if autothreading actually use threads. 18:40
I wonder why not ;)
autrijus ponders dismaying rod just for the fun of it
Arathorn what would it use instead? coroutine-style concurrency? 18:41
autrijus STM.
(and lightweight threads)
i.e. not ithreads.
pasteling "Limbic_Region" at 129.33.119.12 pasted "Can someone check this in as t/statements/next.t" (84 lines, 1.6K) at sial.org/pbot/9748 18:42
Limbic_Region autrijus - one of my tests for last exposed a bug :-)
autrijus Limbic_Region: ooh
machack666 autrijus: I'm working on the closure traits and it looks like some of the changes I need to make are in Monads.hs -- enterBlock and some others
autrijus please someone check it in then
autrijus is journaling
machack666: that sounds correct.
Limbic_Region already done btw
autrijus machack666: please hack away.
Limbic_Region last in nested loops jumps out of all of them, not just inner 18:43
machack666 how do I pull my subTraits from the VCode object
machack666 does not know haskell, but is doing his best to fake it
Limbic_Region I modified the next.t to include all the same tests as last.t and put them in eval_is because next in for loops is still todo
autrijus machack666: subTraits vsub
machack666: when you see
data Foo = MkFoo { field :: Type } 18:44
the "field" thing is of type
field :: Foo -> Type
i.e. built in accessor
and you can use it as builtin updater too
foo { field = newFieldValue }
and even as pattern matcher
Limbic_Region would appreciate someone checking in sial.org/pbot/9748 for him even though he will be home in a couple hours
autrijus func foo@MkFoo{ field = varName } = ... varName ... 18:45
machack666 I've got that set up with traits as a Pad
i.e., subTraits = !Pad
I'm not sure how to write/read from the pad, or to retrieve the pad to do so in the block execution context
autrijus Limbic_Region: done
you can just say
subTraits vsub
to get a Pad
where vsub is a VCode 18:46
Limbic_Region thanks - though I think there is a mistake
autrijus Limbic_Region: oh?
Limbic_Region copy/paste error is() should be eval_is() 18:47
let me fix
nothingmuch anybody got a list of int'l registrars? 18:48
machack666 so my idea is to just use the array functions internal to perl to store the various trait blocks 18:49
i.e. the equivalent of unshift @traits[ENTER], {};
I also need to store some sort of state for traits which are conditionaly executed -- FIRST
ok, I think I see
Limbic_Region grrrr 18:51
jabbot pugs - 2446 - * next.t, from Limbic_Region
pasteling "Limbic_Region" at 129.33.119.12 pasted "I can't figure out what is wrong with this (if anything)" (83 lines, 1.6K) at sial.org/pbot/9749 18:53
Limbic_Region the next.t that got checked in is definately wrong, but I am not sure the latest paste is right either - this eval_is stuff for todo items make me wonder
ok - I think it must be right but it is a failed parse - which is to be expected because labels aren't implemented yet 18:57
so, at someone's convenience (I will tonight if no one else can now) check in sial.org/pbot/9749 as t/statements/next.t 18:58
jabbot pugs - 2447 - delete a garbage file 19:01
pugs - 2448 - ** update from L~R on next.t
Limbic_Region ok - so now I just need to figure out how to make defined() look at $_ if $var isn't specified 19:03
well, I have a lot to figure out but that's next on the list ;-) 19:04
autrijus Limbic_Region: just fix the PRim.hs 19:05
and fix its prototype to be ?=$_
Limbic_Region that seemed too easy 19:06
Limbic_Region was thinking there had to be more to it
ok - so there are only two lines in Prim.hs that I think may be applicable "op1 "defined" = op1Cast (VBool . defined)" and "\\n Bool pre defined (Any)\" of those two, I think only the second one needs to be modified - to "\\n Bool pre defined (?Any=$_)\" 19:12
does that sound right?
machack666 I don't know for sure, but would you make an op0 defined which calls the op1 variant with the $_ as the topic? </out of ass> 19:15
Limbic_Region well, I will stick to what I know for now 19:16
plenty of time to learn
and it isn't a big deal since my @matches = grep { defined $_ } @list; is only 2 strokes (3 if you count the space)
machack666 does the implicit block form of grep work? i.e., "grep &defined, @list" 19:17
Limbic_Region doesn't think so 19:18
or rather, I don't think it is supposed to work
machack666 deprecated in p6?
Limbic_Region hasn't comitted the bible to memory yet
no - not supported 19:19
but I could be wrong - either way it isn't deprecated - either it is supported or it isn't
PerlJam surely it must be supported in some way.
{ ... } is a coderef just as &foo would be. 19:20
Limbic_Region I REALLY wish I had been paying attention to p6.l as long as I paid attention to p6.i 19:21
machack666 in enterBlock, is action a VCode ? 19:23
autrijus grep &defined, @line; # is just fine
grep defined, @line; # bad
machack666: no, it's a "Eval Val" 19:24
Limbic_Region what about grep defined(), @line;
autrijus machack666: feel free to add types to it
you can do it by
make ghci
:m Pugs.Monads
:t enterBlock
that will tell you its type
which you can then add to the line before enterBlock
Limbic_Region: still bad
machack666 autrijus: so I'm declaring an explicit type signature? 19:25
autrijus machack666: yeah
just to enhance readability
I should do that more
machack666 so, how would I get the VCode for the block being executed?
(sorry for all the stupid questions...) 19:26
Limbic_Region ok - &defined is only 1 stroke over - though I will see try and understand enough to not just guess WRT Prim.hs
autrijus machack666: no, please ask them
machack666: you can get it by readling &?BLOCK perhaps
but I really need to sleep 19:27
machack666 and is there an exitBlock or some equivalent to trigger the traits on leaving?
autrijus see you in 9 hours or so :)
machack666: no, it's all done monadically
Limbic_Region good sleep
machack666 ok autrijus -- thanks for your help
autrijus machack666: so there's no explicit calls
atomically powered journal up
g'nite!
&
Limbic_Region autochomp is default behavior in p6 right? 19:34
misc Limbic_Region: no, according to doc
Limbic_Region hmmm - I must be drinking punch instead of koolaid 19:35
machack666 you can specify it as an attribute for handles, though
Limbic_Region machack666 - got an example?
machack666 I think it's just $STDIN is autochomp ... or something 19:36
or is chomped
Limbic_Region will look around for it
machack666 $ARGS is chomped; 19:37
from our very own motd example; 19:38
# my @list = =$fh is chomped;
(not currently working, though)
Limbic_Region ok - here is what I am looking to do, for simple questions at the Monastery - add both a p5 and a p6 solution 19:39
much like what Randal did way back when
here was the first one I was going to take a stab at www.perlmonks.org/index.pl?node_id=449639 19:40
machack666 is it supposed to be working p6, or just soon-to-be-working p6?
Limbic_Region so anyone that has the current know-how, I welcome you to add a p6 solution. For now, I better eat my wheaties (RTFM more) 19:41
machack666 - my intention is to be "if the language were already finished" solutions
machack666 I take it this is the p5 soultion?
Limbic_Region it would be nice if also worked today - but not a requirement
right - I posted that a short while back
machack666 perlbot, paste? 19:47
perlbot Paste your code and #perl will be able to view it: sial.org/pbot/perl dragon.cbi.tamucc.edu:8080 erxz.com/pb
machack666 Limbic_Region: here's a first attempt 19:48
Limbic_Region ? 19:49
machack666 I made up the open semantics because I'm too lazy to lok them up
sial.org/pbot/9752
(I thought the paste bot submitted the link to the channel)
theorbtwo It does, if you tell it to. 19:50
machack666 ah
Limbic_Region it does, but you have to select the channel from the drop down
machack666 someone in #perl is very confused
perlbot pointed me to the wrong channel :) 19:51
Limbic_Region heh
machack666 who admins perlbot
Limbic_Region chris62vw
machack666 we should change it so it thinks it's on #perl6
Limbic_Region it is a multi-channel bot
wouldn't work
perlbot nopaste
perlbot Paste your code here and #<channel> will be able to view it: sial.org/pbot/<channel>
Limbic_Region if you had asked for the right thing, you wouldn't have gone astray machack666 19:52
machack666 picky picky computers...
always doing what I say, not what I mean
Limbic_Region do you have an acct at the Monastery machack666 ?
machack666 not under this nick, if at all 19:53
Limbic_Region I will likely revisit this tonight or tomorrow - once I have a chance to verify stuff
Limbic_Region just wants to give credit where credit is due
machack666 I should have one shortly 19:54
it autofilled in my email addy for perlmonks, so I must have signed up before...
Limbic_Region machack666 - a great way to improve your p6 skills as well as p6 advocacy would be answering simple questions there with both p5 and p6 answers
I intend to do so from now on (when I can anyway) 19:55
Corion Limbic_Region: You're luring folks into the hivethink of PM! :-))
Limbic_Region Corion - hey, I was just trying to get hardburn to spend more time here
it works both ways you know
Corion Limbic_Region: :))
machack666 ok, I've shaved my head and I'm now wearing robes. 19:57
Limbic_Region welcome machack666 19:58
machack666 thanks 19:59
Limbic_Region is going to need to send a patch for Perl6::Bible 20:00
machack666 hey, which twigil is compile-time and which one is runtime? 20:01
Corion $* is compile time and $? is runtime. Or so I think ($?CALLER)
Hmmm. No, $* is global I think (%*ENV)
I'm confused
machack666 surely there's a mnenomic 20:02
compiling is done once, so it's '?', while the runtime value could have many options over time '*' 20:03
Limbic_Region Perl6::Bible is ingy's deal right?
seen ingy?
jabbot Limbic_Region: ingy was seen 1 days 1 hours 42 minutes 52 seconds ago
ingy_ hola
machack666 S02 to the rescue...
ingy_ Limbic_Region: are there updates to release?
ingy_ checks 20:04
Limbic_Region no, just wanted to run something by you before sending a patch
machack666 $? is compile-time, while $* is runtime
ingy_ ok
Limbic_Region Perl6::Bible invokes perldoc but it doesn't allow you to pass display options - such as -t
which makes it look wonky for me 20:05
ingy_ ok
Limbic_Region so the question is, how would you like the interface to be and I will code the interface to work
ingy_ oh thanks 20:06
Limbic_Region p6bible -o "perldoc display options" ?
where they get passed in raw and let perldoc blow up if appropriate?
ingy_ sounds really good actually 20:07
Limbic_Region ok - will send you a patch tonight or tomorrow
ingy_ great
Limbic_Region too close to hometime for me to do it now - I have a tendency to forget the time and make my wife unhappy because I am not home on time 20:08
Jonathan_ - are you the same Jonathan as www.jwcs.net/~jonathan/perl6/ ? 20:17
Jonathan_ Yes.
Limbic_Region ok - can I offer a suggestion? 20:18
Jonathan_ And I think we talked once or twice on Parrot related stuff a while back too...before the RSI invaded and I had to drop doing stuff.
Yeah, for sure.
Limbic_Region in your binary builds, you have @INC pointing to your F drive
Jonathan_ Hmmm... 20:19
Limbic_Region but you don't actually include the libraries
Jonathan_ That sucks.
Limbic_Region I was going to use subst F: to get around it
Jonathan_ Where is the default @INC stashed?
Limbic_Region but since the modules aren't part of the build it didn't matter
dunno - my suggestion was going to be a workaround 20:20
I am not all that familiar with building Pugs (I have about 2 days under my belt) 20:21
Jonathan_ OK, I have made it so the "ext" folder containing the modules will be put into the build.
I should chase down this @INC issue too.
Limbic_Region I was going to suggest including the lib directories in the tar ball with a readme.txt on how to use subst to simulate an F drive
in particular - I couldn't use Test.pm which was a bad thing since I was writing tests today 20:23
but kudos for nightly binary builds - I wouldn't be able to do Pugs at work sanely without them
Jonathan_ You're welcome, happy they're useful. 20:25
I'll do a re-build in just a moment so you can download one with the modules...let me have a quick scout around to see if I can get @INC to do something more sane first. 20:26
Limbic_Region ok - that way I can give you the subst command if modifying @INC is going to be a PITA
is it ready for download yet? 20:28
Jonathan_ No, still looking for this @INC thing...can you give me the contents of @INC that you're seeing please? 20:29
I'll do the new build now, in case this @INC thing takes a while. Will take a few mins to build and upload. 20:30
Limbic_Region sure
F:\Perl6\lib; F:\Perl6\lib; F:\Perl6\site\lib; F:\Perl6\site\lib; . 20:31
yes, the first two are repeated
luckily . is in the path, which made copy/pasting Test.pm fix my immediate problem
Jonathan_ It'd be a lot nicer if it said C:\ instead... 20:32
Jonathan_ ponders extreme hackage to make that so.
Limbic_Region guesses someone groking subst is too much to ask for 20:33
well - I need to go RSN so unless it is close I will talk to you about it tomorrow?
Jonathan_ The build is almost there.
Limbic_Region and by "someone" - I mean target audience
Corion_ Meh. No smoke tests because the webserver is down :( 20:34
(my webserver that is)
Limbic_Region saw that too Corion_
20:34 Corion_ is now known as Corion
Jonathan_ Limbic_Region: It's there. 20:36
Limbic_Region downloading now
Jonathan_ Ah, it's doing a fresh smoke too. :) 20:37
Limbic_Region Jonathan_ - I still don't see a Test.pm in the zip file???
and I really do have to go now 20:38
Jonathan_ Somewhere in ext/Test.
gaal L~R, what's not working with subst?
Limbic_Region gaal - nothing - the problem is the libraries themselves aren't part of the zip file 20:39
Jonathan_ - they aren't there
gaal ext/Test/lib/Test.pm
Jonathan_ Yeah, I see it in the ZIP file.
Limbic_Region hrrrmm
Jonathan_ Do you not?
Limbic_Region no 20:40
downloaded as www.jwcs.net/~jonathan/perl6/pugs-win32.zip right?
Jonathan_ Yeah. 20:41
I just downloaded it now to confirm.
Do you have the ext folder in there?
Limbic_Region is downloading again
nope 20:42
Limbic_Region will try from home and let you know
Limbic_Region is really late now
Jonathan_ looks bewildered, trying to fathom why ext is visible to him and not LR. :S 20:47
PerlJam idly wonders when the pge rewrite will make it to the pugs people 20:55
mugwump pge? 20:56
PerlJam Perl Grammar Engine
The guts that makes the rule syntax work.
mugwump is that a new Perl6::Rules? 20:57
PerlJam not exactly.
You can think of it that way I guess. PGE will parse perl6 rules. 20:58
obra mugwump: this is patrick's work 20:59
mugwump it was just the term "re"-write, implying there was a more mature implementation than I thought. Does PGE plug into/called from parrot? 21:01
PerlJam oh, there is (well, almost is) Pm is rewriting PGE in parrot and it will include the latest semantics from the cabal 21:02
(the big thing is hashing out captures)
He said earlier today that he was almost finished, but then I saw a couple of messages that implied the implementation was giving him headaches so it may be a few more days 21:03
mugwump famous last words 21:04
obra PerlJam: where'd today's update coming from? 21:06
PerlJam obra: Oh, I've been talking to him on another channel
Odin- PerlJam: I think they formally renamed it Parrot Grammar Engine.
PerlJam Odin-: perhaps. I haven't kept up.
Limbic_Region Jonathan_ - from home ext/ is in the zip file 21:15
my guess is that the new web proxy installed last weekend is also caching
and dumb
you there Jonathan_ ?? 21:16
Jonathan_ I'm here, just in and out a bit. 21:18
Limbic_Region ok - so it is a tad bit more complicated then I thought 21:19
one I am not sure we should work around
perhaps we should bring it up as a discussion point
for instance - with my built-from-scratch version of Pugs 21:20
C:\GHC\pugs>pugs t\statements\for.t
Can't locate Test.pm in @INC (@INC contains: C:\Perl6\lib C:\Perl6\lib .........
autrijus you want to either install pugs
or say pugs -Iext/Test/lib 21:21
or add things to PERL6LIB
Limbic_Region autrijus - we are trying to fix the binary build Jonathan_ does nightly 21:22
and aren't you supposed to be sleeping?
IOW - fix pugs so it "just works" for people not wanting/willing/able to build it themselves
s/pugs/binary build of pugs/
autrijus but I woke up and conquered the Eval monad
Shillo edges away from Autrijus :) 21:23
Limbic_Region hates/loves when that happens
autrijus now we have much better error reporting
and soon STM/IO mixing, and atomic{}
and many more.
Jonathan_ Limbic_Region: Yup, something that just works is my aim.
Limbic_Region so it might be as simple as customizing the Makefile before compiling 21:25
but I haven't investigated
Jonathan_ I think I shouldn't be including ext, but rather doing an nmake install and putting lib in place instead.
Limbic_Region or that too
ok - so I have done my job and pointed out the problem
if you need/want me to help/test - let me know
I am going to work on the patch to Perl6::Bible for ingy 21:26
Jonathan_ Thanks for the report, I'm working on it. 21:27
ingy_ Limbic_Region: thanks
If you get it done in next 3 hours, I'll release it instantly 21:28
autrijus I want `p6bible -f`
ingy_ I now have IRT
Instant Release Technology
Limbic_Region ingy - shouldn't take that long
and what do you want -f to do autrijus
I can do it at the same time if not too difficult 21:29
autrijus Limbic_Region: what perldoc -f does.
Limbic_Region k
autrijus i.e. save me a grep
ingy_ hrm, that seems involved
autrijus i.e. display the paragraph and synopsis name that contains that substring
ingy_ what is your grep?
isn't that -q
-f function
autrijus -q searches for faq only 21:30
but sure, I can use -q
and -f only searches in s29
Shillo Hmm, I get 13 fails in t/builtins/math/abs.t... is this expected?
ingy_ --madprops option extolls the wonders of Autrijus Tang 21:31
autrijus Shillo: no, it's broken by Corion a while ago iirc
Limbic_Region by "ok" - I didn't mean I would include it, was just confirming I understood what you wanted 21:32
Shillo t/data_types/hash_ref DIED. FAILED tests 23-26 <-- how about this? 21:33
Limbic_Region though my perldoc --help doesn't have a -f option (only -F)?
oh wait 21:34
nevermind
perldoc [options] -f BuiltinFunction
that is more involved so doubtful in the next 3 hrs for the instant release
Corion_ autrijus: No, I don't think I broke abs.t, but I'll investigate :) 21:40
autrijus Corion_: oh, ok. maybe it was not you :) 21:41
Corion_ I think what broke it was some weird defaulting change
autrijus ah. ok.
Corion_ (but I don't see where it happened, as the defaulting seems to take place via the parsing declaration at the end of Prim.hs)
autrijus yeah. I'd like to investigate 21:46
but sleeping sounds better now
Corion_ autrijus: Yes! :)
autrijus r2449 is in -- huge, huge internal change
Corion_ It is even time for me to sleep, so you should really!
autrijus we are now five stories high on the monadic lego
(with EvalT) 21:47
Corion_ I look forward to STM stuff! STM is something that BrowserUK on Perlmonks really will like
clkao autrijus-ska! when can i rewrite svk in perl6? 21:49
autrijus I think async { atomic { $x = $y * 10; $y = $x * 10 } }; is really killer feature
Jonathan_ Limbic_Region: Check out the latest build when you get chance, it seems if you extract that to a folder it will "just work". :)
Corion_ clkao: I would wait until objects are in, but much of the building blocks (except db_file) are there already ;)
autrijus: Sleep!
clkao io layers?
autrijus clkao: sure, just eval_haskell("import Darcs")
autrijus waves & 21:50
clkao kills autrijus
Corion_ clkao: I don't know about IO layers - sockets and file IO are there, but not even binary file IO I fear ;)
clkao layered IO i meant
Corion_ clkao: No, I guess not ... 21:51
jabbot pugs - 2449 - * Eval monad is now a EvalT transformer
Shillo runs tests again. Just for the heck of it. :) 21:53
Corion_ Heh. somebody broke the build. I won't name any names :)
Shillo src/Pugs/AST.hs:767:20:... yep. 21:54
Just found it out. :)
Corion_ Shillo: Shhhhh. No names. Let him sleep :)
Corion_ goes to bed as well 21:57
Shillo My lips are sealed. :)
Limbic_Region Jonathan_ - will do 21:58
almost finished with the Perl6::Bible mods
Jonathan_ has just discovered he is out of chocolate! This calls for a late night adventure to the vending machine...brb 21:59
autrijus er. sorry. 22:04
autrijus unbreaks the build
& 22:05
Shillo: build is unbreaken :) 22:07
run the test again?
Limbic_Region ingy_ - it was quick/dirty so you might want to review it before applying
perlbot nopaste
perlbot Paste your code here and #<channel> will be able to view it: sial.org/pbot/<channel>
autrijus really really &
Shillo autrijus: Checking svn-diffs...
Limbic_Region hmmm - probably should email instead 22:08
ingy_ Limbic_Region: nopaste is fine
Shillo Built... running tests... 22:10
Hmm, is there anything I should've passed to make or to perl Makefile.PL to make this run faster?
(I built with all defaults)
pasteling "Limbic_Region" at 69.250.48.119 pasted "-t -u -m -T perldoc display support for Perl6::Bible (minimally tested)" (25 lines, 818B) at sial.org/pbot/9754
Limbic_Region ingy_ I still have to clear my screen to get it to look write in Cygwin 22:11
22:11 ingy_ is now known as ingy
jabbot pugs - 2450 - * unbreak the build. 22:11
ingy Limbic_Region: I don't follow you. 22:12
Limbic_Region: fyi, my mail server is down at the moment 22:13
22:13 broquaint__ is now known as broquaint
Limbic_Region Jonathan_ ping 22:15
ingy - I mean that cygwin is fubar 22:16
but it is less fubar with the patch
Limbic_Region isn't make much sense is he ingy 22:18
well - I think the patch is good I think it is my environment/pager that is fubar 22:19
ok - need to go spend some time with Jean 22:22
TTFN all
mugwump ingy: have you had change to review/comment the tests/code in svn.kwiki.org Perldoc project?
s/comment/comment on/ ;) 22:23
Shillo Failed 19/232 test scripts, 91.81% okay. 62/4631 subtests failed, 98.66% okay.
Now I wish I noted the earlier results. Ah well. 22:24
Going to sleep, as well. G'night! 22:28
ingy mugwump: no. probably this weekend 22:30
mugwump great, I'll try to be around on my Sunday 22:31
pasteling "revdiablo" at 24.75.156.86 pasted "another few tests. thinking about adding them to builtins/my.t ... any objections?" (28 lines, 787B) at sial.org/pbot/9757 22:38
revdiablo or should I just be committing things like this as I find them? 22:41
mugwump nice test. that belongs with the loop tests I think. 22:42
revdiablo statements/loop.t? 22:44
wait, that's all for the 'loop' construct
mugwump well, your test specifically tests that loop closures are localised properly between iterations 22:47
revdiablo isn't 'my' responsible for doing that? 22:50
mugwump it's a matter of scope 22:53
the other test (which I added to t/subroutines/sub_ref.t for you just before you were given the account) tested that `my' works with anonymous closures 22:54
both great tests, but subtly test the rules differently. 22:55
revdiablo yeah, true. I wonder if these are related.
well I'm just not sure where to put this latest one... I don't know how the tests are organized, I'm just looking for placess I think might be appropriate :) 22:56
mugwump tests organized? this is anarchy! :)
revdiablo haha
some organization appears to be emerging from the chaos
mugwump perhaps t/subroutines/loopscope.p6 for that one? 22:57
s/p6/t
revdiablo that makes sense to me
jabbot pugs - 2451 - * |= ^= &= for junctions now works 23:01
pugs - 2452 - * make tic-tac-toe even more perl6ish.
pugs - 2453 - tests to check the scoping of variables 23:11
TreyHarris general haskell q: if i wanted to implement an analogue to List::Util::reduce, I'd have to write two functions, one that returned a list of xs (and would be called recursively), and one that returned an x (that would be called once), right? 23:30
_metaperl TreyHarris, that sounds right, but ask on #haskell 23:57