Darren_Duncan regarding SQL::Routine perl6ification ... 00:32
the commit of a minute ago is the first of a series where I look at methods in detail and make sure each is completely transformed 00:33
by contrast, the previous commits were mainly widespread search-n-replaces
I hope to do that whole series today
that is all 00:34
shapr cheers
crysflame :)
theorbtwo Sounds cool, DD.
crysflame you rule
Darren_Duncan multi-methods are quite useful
shapr yeah
Darren_Duncan using them is more elegant than single methods that return different types of things depending on what their args were
see the last commit, information functions, as an example ... 00:35
shapr and you don't need the visitor pattern anymore
Darren_Duncan depending on their args, they either returned a list or a single value
have to look up meaning of 'visitor pattern'
crysflame www.ambrosiasw.com/games/darwinia/
er, ww
Darren_Duncan I know its a 'design pattern' 00:36
brb
shapr If you needed multi-methods, and you only had single-dispatch OO, you'd write the visitor pattern.
Darren_Duncan I see 00:37
Ambrosia sw rox 00:38
they had the first visually attractive games back in 1993 00:39
such as 'Maelstrom'
crysflame :)
the author of Solarian II re-released it for OS X 00:40
Darren_Duncan I heard ... would be nice if all the classics were made X native
parts of Escape Velocity were done
theorbtwo Interesting... I'm now seeing the problem Corion was earlier, with tests not giving the position data. 00:41
jabbot pugs - 1382 - SQL::Routine - completed perl6ification
crysflame mm, yes
Darren_Duncan it occurs to me, though, that with said SRT information functions, they could become ordinary methods if I simply changed their names, such as differing with the suffix 's' or not ... then I could back-port this to Perl 5 00:42
one fewer difference 00:43
that rename may also make them more descriptive
that said, I will hold off on any such change for another time 00:46
shapr I guess it's a bit early for pugs debs. 00:53
Khisanth what the heck is the priority ghc is using when compiling pugs? 01:14
Darren_Duncan quick question ... the proper way to count the number of elements in an array or hash? 01:22
stevan Darren_Duncan: +@array 01:43
that forces the array into numeric context
Darren_Duncan thanks
which synopsis is that?
stevan for a hash I would expect either: +%hash.keys or something like that
Darren_Duncan: not sure if it is the synopsis
Darren_Duncan: check the one about data-types (4 I think) and if not, try the operators one, but I think i read this in the Perl6 & Parrot book 01:45
Darren_Duncan gotit
jabbot pugs - 1385 - * test failed. 01:51
pugs - 1384 - * set up a symlink... purely experiment
pugs - 1383 - * move testgraph.css to util/
02:02 theorb_ is now known as theorbtwo
theorbtwo Oh: Can we set up the SVN to keep an up-to-date copy of A* S* E* in the docs dir? 02:07
stevan theorbtwo: where are the up-to-date copies stored? 02:08
theorbtwo dev.perl.org/perl6/apocalypse/A<nn>.pod, and such. 02:10
But I've heard rumor of them being under some sort of VC somewhere.
svn.perl.org/perl6/doc/trunk/design/ 02:16
stevan theorbtwo: sounds like a job for SVK maybe? 02:19
theorbtwo I think the pugs repo really uses SVK, not SVN, but that's a guess, mostly based on the fact that Autrijus is invloved. 02:20
Khisanth there is no SVK server is there?
jabbot pugs - 1386 - SRT perl6ification - changed subtype Nod 02:21
mugwump svk isn't a server yet, it's like a glorified client that keeps its own repository 02:23
theorbtwo Ah.
In any case, it seems like a job for Autrijus. 02:24
...or at least someone who is much more comfortable doing strangeish things with SV[NK] then I am.
mugwump are you familiar with cvs?
theorbtwo Not very.
mugwump well, if you can get svk installedf (apt-get install svk ;)) then all you need to do is `svk co svn.perl.org/perl6', say. It will set up a mirror, pull out all the versions to date and put them in your local repository, then give you a working copy. 02:28
As a word of warning though, the docs don't make it all that clear that you shouldn't use the --skipto feature on full project roots... if you only want to mirror the head N releases, only mirror from trunk/ and below 02:30
otherwise the magic svn lazy copies aren't lazy :)
Once you've got it, you can use `syk pull' from within the working directory to update, and that's pretty much all you need to know to use it read-only 02:31
s/syk/svk/
theorbtwo Hm, that seems reasonable enough. I wonder if I can insert a file with full history into the pugs repo, though. 02:32
mugwump which file would you want to do that wiuth?
theorbtwo The [ASE]* files. 02:33
mugwump the Synopses are already there FWIW
theorbtwo I know.
mugwump great
theorbtwo I'm not sure they're up-to-date, though -- one of them seems to be short a paragraph. 02:35
mugwump easy way to solve this. putting them there was a stopgap measure in the first place, so now they can go :) 02:38
theorbtwo They shouldn't go, but they should move, and become complete.
mugwump I just spoke to autrijus about it 02:39
the util/testgraph.pl program downloads them automatically 02:40
theorbtwo Oh? What did he say? (I kind of wondered why he was so quiet...)
Should, you mean?
mugwump whatever
shapr I've added an op1 "chr", where do I add that as the "chr()" call?
shapr digs around
stevan shapr: I think all you need to do is add it to the list at the bottom of Prim.hs
all the way at the bottom 02:41
shapr ah, I see.
stevan shapr: pugs.kwiki.org/?CreatingANewOp 02:42
shapr that's helpful. 02:43
what does chr get for left/right ? 02:45
theorbtwo pre 02:47
shapr thanks
theorbtwo That's the associativity/syntatic category; it's a prefix op.
(left and right are infix ops)
shapr Yeah, makes sense. 02:48
Alias_ heh 03:47
hattmoward ouch
Alias_ Idiots, April Fools is over
Khisanth it's still march!
Alias_ Pay no attention to the man behaind the lilo messages | pugscode.org <<Overview Journal>> | pugs.kwiki.org | logged: xrl.us/e98m | Auto-smoke: kungfuftr.com/pugs-smoke.html | win2k:r1378(224/3842) Linux:r1302(193/3383) MacOSX:r1342(189/3478) 03:47
hattmoward puts lilo back on ignore. bad monkey 03:51
theorbtwo wonders: why android itch, of all things? 03:53
hattmoward ? 03:54
theorbtwo The URL he gave redirects to a google search for android itch. 03:55
Or at least it does for me.
hattmoward paste it in again
a few times
well, it just got switched again 03:56
theorbtwo Ah.
Mmpf.
Not very funny. 03:57
Very very obvious.
theorbtwo remembers when /. and several other sites had as an april fool's joke that they had gotten bought out.
Then a few months later, they were all bought out.
hattmoward I didn't remember that some of the planet is well into April 1 when the first message went 03:58
heh
theorbtwo 6 hours. For some people, it's over.
Alias_ It's over for me
jdv79 still an hour away from 4/1 here 03:59
hattmoward I've got 61 minutes
related subject: 4/1 is my birthday 04:00
theorbtwo Sobored.
jdv79 happy Bday!
theorbtwo Happy birthday, hatt!
hattmoward thankee
metaperl what do I supply to Makefile.PL to have it install in ~/install/bin 04:08
instead /usr/...
PREFIX= ... did not work
is it not possible to build pugs for non-root install? 04:13
Khisanth scratches his head 04:16
I thought pugs -e 'say "blah"' works? 04:17
metaperl it does but perl -V shows @INC set to non-local places 04:19
Khisanth well doing it interactively works ... 04:21
metaperl but it is failing to parse use Config::Tiny 04:22
theorbtwo metaperl, that'd be because 'use' is not yet parsed.
Require it instead. 04:23
metaperl oh do I need a begin block?
BEGIN { require COnfig::Tiny } ; 04:24
?
Khisanth BEGIN is probably not implemented either?
metaperl here's my error: www.hcoop.net/~terry/haskell/pugs/p...tmp/ct.err 04:26
the require is not finding the module
theorbtwo That's not a pugs error message; that's a perl (5) error message. 04:28
metaperl hmm
theorbtwo Wait... no, it's not, it's just very similar, and somewhat inaccurate.
metaperl look at the loadpath
theorbtwo Yeah.
It should say @*INC, though. 04:29
metaperl the * means what?
mugwump global
kind of :
metaperl global package... I see
mugwump :)
theorbtwo That it's magical.
mugwump It's called a twigil
theorbtwo secondary sigil is the technical term... 04:30
mugwump I saw larry use the term twigil so there :P
Khisanth but larry is always saying strange things... 04:31
lucs I had supposed that 'twigil' referred to the two characters functioning as a sigil unit does. 04:35
s/unit //
lucs & # ZZ 04:51
Khisanth isn't ucfirst.t missing a test? 05:14
crysflame sig and twig 05:20
Alias_ Does Config::Tiny actually work?
crysflame thrig, fig, vig, sig, seg, eig, nig (eep!), teg
crysflame mutters to himself in the corner
Khisanth crysflame: you sound drunk :) 05:27
crysflame i'm always like this
when i'm drunk, it's worse. DE BUGGEE GOT LOSS is one quote.
someday i'll figure out how to focus it through coding. then the world shall pay. muahahaha *koff*
autrijus greetings. 05:28
crysflame until then, the least i can do is cheer autrijus's efforts. he makes things that make stuff go.
speaking of.
jabbot pugs - 1387 - cleanup refactoring 05:31
theorbtw1 Greetings, autrijus!
autrijus :) how goes? 05:33
crysflame: your cheer means a lot :)
you know I'm motivated by cheers
crysflame i didn't, actually, but i don't usually ask first 05:34
glad to hear it helps
soon i will have a place to sit and type 05:35
then.. yay
theorbtw1 cheers autrijus some more. 05:36
crysflame hands out pom-poms and short skirts
theorbtw1 You make things so fast that I can watch you go.
crysflame the commitbot is awesome
theorbtw1 hopes he doesn't have to shave his legs. 05:37
crysflame au naturel
q[acme] does a double flip pyramid with a twist
crysflame acme: hi!
it's the 1st where you're at
q[acme] i'd better do an april fool's joke, then 05:38
crysflame inverts the pyramid, ending up inside a small space-time defect.
theorbtw1 has been disappointed that there haven't been any pugsy april fool's jokes.
Alias_ crysflame: The infamouse inverted 5-dimensional hyperdildo? 05:39
05:39 [1]metaperl_ is now known as metaperl_, theorbtw1 is now known as theorbtwo
crysflame Alias: i've got a wormhole in my pocket! 05:39
theorbtwo Ha, was fast enough this time.
crysflame blinks at theorb
theorbtwo The laptop in the other room auto-reconnects... rather quickly. 05:40
Oh, autrijus, what's the reasoning on not wanting to include the perl design docs in the SVN? 05:42
I thought it was going to go in the Perl6:: namespace, so man Perl6::A12 could do the right thing. 05:43
mugwump no point in duplicating it, it just gets out of date as you discovered
theorbtwo Should be fixable decently easily. 05:44
There are a number of points in duplicating it, and it can be kept up-to-date with not too much effort. 05:45
mugwump the plan is
14:40 < mugwump> the util/testgraph.pl program downloads them automatically
If you want to maintain them as seperate modules, go ahead and build them by all means, but please don't duplicate their content in the pugs tree. TIA 05:46
theorbtwo TIA?
mugwump thanks in advance 05:47
theorbtwo Mugwump: That's a repeat of what you already said, not a reason. Also, I very purposefully asked Autrijus, not you. 05:51
Oh, and testgraph is the wrong place to do it.
Darren_Duncan question on the identity operator, '=:=' ... 06:46
according to S03, if you said '$x := $y', then later '$x =:= $y' would return true ...
mugwump sounds reasonable :) 06:47
Darren_Duncan my question is, if two references point to the same thing, will =:= tell you if they point to the same thing?
if not, what is the correct operator to use to compare two references?
mugwump I remember encountering this in perl5 eith the 0+ 'operator' I later converted to refaddr 06:48
theorbtwo == will tell you if two references point to the same place.
=:= will tell you if two things are really different names for the same thing.
Darren_Duncan in Perl 5, a simple string compare worked because the stringified versions of a ref were distinct for the target
castaway thwaps freenode
Darren_Duncan so, are you saying that I should use == then to compare references? 06:49
mugwump A numeric compare worked, too, because objects and hashes numified to their memory address
theorbtwo Yes, DD.
mugwump maybe not hashese
theorbtwo Hashes aren't supposed to nummify to their address, AFAIK. 06:50
Darren_Duncan at this point, all I care about is objects
eg, I want to remove a reference to a given object from a list, so I need the right test to know which list element is pointing to it 06:51
theorbtwo AFAIK, == is the right operator to see if two references point to the same place, just like in p5 06:52
Darren_Duncan where does it say that?
mugwump Darren_Duncan, are you after sets perchance? 06:53
Darren_Duncan objects
I'll be more specific
mugwump what I mean is, are you using a list like a set/
Darren_Duncan I have a tree of Nodes, where each Node points to both its parent and its children
mugwump ah
Darren_Duncan when I delete a node, I need to remove all references to it
from other nodes
in this case, the curren't Node's parent has refs to its children in an array 06:54
so I have to know which array element to delete
mugwump yeah. so what you want is an ordered list with an object key index.
mugwump hmms
Darren_Duncan what I have is an array of object refs 06:55
in Perl 5, an object ref stringified into something distinct per object, so I did an 'eq' in Perl 5 ... but in Perl 6 I want something better
I shouldn't have to convert a ref to anything else in order to compare it 06:56
mugwump nods
I agree, but I also see why you'd want to be able to overload ==
Darren_Duncan I like how Perl has different comp operators depending on the data type, ... 06:57
for example, it makes things a lot easier to see when you're doing a string vs a num compare
theorbtwo Hm, I'd expect taking a reference to the same thing two different times would make them ==, but not =:=
Darren_Duncan so if =:= did what I wanted, it would go further in that direction, making code more self documenting
also consider that, in Perl 6, the line between refs and what they point to is blurred 06:58
doing an ordinary 'eq' or '==' may end up comparing what the refs point to
mugwump yes, precisely - overloadable 06:59
Darren_Duncan conceptually, I don't see how refs and identity are any different from each other
theorbtwo But if I do $x=42; $a=\$x but true; $b=\x but false; $a =:= $b, I should get false, because $a and $b are not the same thing.
Darren_Duncan as far as I'm concerned, '=:=' is the RIGHT answer
castaway (wtf is that, the wing operator?) 07:00
theorbtwo But it means that if you pass =:= two refs, it behaves very differently then if you passed it two of anything else.
"Are bound to the same thing".
mugwump the 2-in-1 operator I think, castaway
Darren_Duncan =:= is an 'identity test' - see 'Binding' in S03
mugwump you are both correct
but focusing on a different aspect, I think anyway 07:01
Darren_Duncan unless I can find a definitive answer, I will use =:= in my perl6ification for now because I see it as the most self-documenting of my intent
theorbtwo You might want to ask on p6l. 07:02
Darren_Duncan good idea
I'll do it right now ...
actually, first I'll review S12 again, in case it's in there ... 07:05
mugwump so, == is value comparison, =:= is variable comparison, === is object comparison (where === is some ficticious operator)
castaway and if you dont care what the things are you're checking? (hmm, what happened to no types.. ) 07:06
mugwump no types? what? 07:07
Darren_Duncan in this case, the environment is controlled such that I already know if both items are both objects of the right class before I compare them
theorbtwo eq asks "do these things have the same string value", == asks "do these things have the same numeric value", =:= asks "are these just different names for the same thing" 07:08
Darren_Duncan so I thought, and 2 refs to something are sort of like two names for it
mugwump wait, object references aren't references anymore, are they. they're just objects. 07:09
:-/
theorbtwo No, they're two references to the same thing, but not the same thing twice.
castaway mugwump, no types, in p5
theorbtwo Different references to the same thing can have different properties attached to them.
Undeffing one doesn't undef the other. 07:10
Darren_Duncan Perl 6 has a capital-r Ref and a low-r ref types
theorbtwo castaway: Perl6 has typing, but it's optional.
mugwump S09 details lots of Perl 6 types, what do you mean, castaway ?
Darren_Duncan away for a few minutes ...
castaway mugwump: I actually dont give much of a damn about p6, ta anyway
optional meaning, it should 'just work' without? 07:11
theorbtwo Then why are you in #perl6?
Yes.
castaway looking for you, mostly
and chatting about keyboards ,)
mugwump ok, so Perl6 has "ref" and "Ref" types
but, that doesn't mean that a variable $foo is a scalar which is a ref to an Object like in P5 07:12
theorbtwo Right. 07:13
But 1: Pugs doesn't have ref and Ref, just Ref.
2: This isn't related to anything being discussed.
3: The question was specificly about references, not scalars holding objects. 07:14
mugwump I think Darren's referring to the refs under the hood, to compare object identity 07:16
castaway .oO( ok, I should probably read up if I wanna make sense of you guys ,) 07:19
mugwump castaway: got pugs? 07:20
castaway well, theorbtwo does, and his computer sits next to mine, so in theory, yes
why do you ask? 07:22
theorbtwo Because pugs is how you experince p6. 07:28
Darren_Duncan back again 07:30
castaway Well, yes, but reading docs is how you find out about all trhe ref/Ref and operator stuff, no? 07:31
mugwump sure, but playing with code is more fun than listening to conversations like this ;)
OK, so the question is, does =:= compare lexical identity or object identity? 07:32
theorbtwo Lexical, that's what it's for.
mugwump And, if it did compare object identity (and, by extension, lexical identity), is the difference sufficiently obscure that you can use the 'other' means to get at it? 07:33
castaway is currently playing with elisp, and since p6 seems to be a whole other language, just playing probably isnt useful without reading some. 07:34
mugwump castaway: play with haskell! :-D
it's functional too!
castaway yeah, but its not integrated into emacs (yet) :) 07:35
mugwump true
Darren_Duncan I didn't find anything definitive, so resuming a writ to p6l ... 07:37
mugwump yes, do you agree with the question as I stated it, theorbtwo & Darren_Duncan ?
Darren_Duncan let me reread it ... 07:38
mugwump (obviously there is no clear answer)
Darren_Duncan I would say that object identity and lexical identity are different
theorbtwo I'm not sure what you mean by object identity vs lexical identity.
I certianly agree that the definition of =:= is rather vauge. 07:39
castaway jaboot: synopsis ?
oops, 07:40
theorbtwo lilith:/usr/src/pugs/docs/A12.pod
castaway jabbot: synopsis ?
jabbot castaway: Tell me more about that.
castaway thanks
(hmm, that URI should 'just work' ,)
theorbtwo No, it shouldn't; it's not a well-formed URI.
mugwump Different? What's a ? between fiends? 07:41
castaway hmm.. ssh://lilith:/usr/src/pugs/docs/A12.pod ? :)
theorbtwo file://lilith/usr/src/pugs/docs/A12.pod , OTOH...
mugwump *friends
castaway oops, minus the second :
ah, yes
mugwump bah, that should have been a lambda 07:42
kungfuftr mugwump: naked lunch?
mugwump I'll take, "what's the novel that mugwump takes his nick from", for 50 points 07:43
kungfuftr heh 07:44
castaway should know that one, but cant place it atm
kungfuftr david lynch movie too, iirc 07:45
mugwump yes, although the movie mugwump was quite different from the description in the book :)
rgs not lynch, cronenberg I think 07:46
Darren_Duncan I just sent the p6l messag
kungfuftr rightio... off to work, then off to edinburgh!
Darren_Duncan it also occurs to me that what I want to do is indeed different than what =:= does
the difference being one level of indirection 07:47
a Ref is a container that points to another container, while a scalar et al is the container; identity and binding works with the latter case 07:48
I thought I heard once that '===' is what I want, but I couldn't find it later
hopefully p6l will know
mugwump That's the Perl 5 model, but bear in mind you don't need the scalar to be a ref, it can be an "object"
Darren_Duncan yes, objects and refs are technically different 07:49
mugwump ie, a variable holds a ref which points to a blessed thingy in Perl5
what I'm saying is that the ref can be completely under the hood, but it doesn't change the lexical vs value thing
theorbtwo But =:= shouldn't return true if the two things are different in any discernable way. 07:50
Darren_Duncan I'm going to move on to other matters and wait for what is said on p6l
mugwump good call
shapr castaway: there's a cute interactive haskell plugin for the famous lambdabot 08:50
castaway famours where? :) 08:52
shapr famous on #haskell at least
castaway heh
lightstep i just beat it
shapr with a stick
I could invite the bot over here and show you, if you want. 08:54
castaway sure
shapr it does make a lot of traffic though, so it might irritate some people.
theorbtwo lambdabot, hello
shapr @plugs map (+1) [1..5]
lambdabot [2,3,4,5,6]
lightstep jabbot, @plugs map (+1) [1..5] 08:55
jabbot lightstep: Please go on.
shapr Of course, it can't deal with algebraic definitions, but it can do interactive stuff.
theorbtwo @plugs :t map (+1)
lambdabot <Plugins.Eval>:1: parse error on input `:'
shapr @plugs sequence [[1,2],[3,4]]
castaway hmm,m most useful one I've seen so far is #emacs' fsbot
lambdabot [[1,3],[1,4],[2,3],[2,4]]
castaway (does elisp :)
shapr lambdabot and fsbot are from the same generation. 08:56
delYsid was on #haskell and I was on #emacs a lot when they were both very small bits of code. 08:57
castaway heh :)
shapr though deego was the first author of fsbot
and fsbot really started as a tiny extension to ERC