Camelia, the Perl 6 bug

IRC log for #perl6, 2005-05-14

Perl 6 | Reference Documentation | Rakudo | Niecza | Specs

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

All times shown according to UTC.

Time Nick Message
00:13 cjn has quit IRC (Remote closed the connection)
00:15 sproingie has joined #perl6
00:21 DapperDan has quit IRC ()
00:33 svnbot6 r3198, autrijus++ | * Use typed attributes in wizards.p6
00:45 sproingie karma autrijus
00:45 jabbot sproingie: autrijus  has neutral karma
00:45 sproingie huh.  space
00:45 sproingie karma autrijus
00:45 jabbot sproingie: autrijus has karma of 152
00:53 elmex has quit IRC ("leaving")
00:56 Khisanth has quit IRC ("Leaving")
00:56 dvtoo has joined #perl6
01:15 castaway_ has joined #perl6
01:15 Khisanth has joined #perl6
01:28 castaway has quit IRC (Read error: 110 (Connection timed out))
01:28 theorbtwo has quit IRC (Read error: 110 (Connection timed out))
01:29 autrijus journal up.
01:29 autrijus sadly, my laptop completely died and can't draw any power from adapter :-/
01:29 * autrijus brings it to repair again... wish me luck (i.e. not a new computer again)
01:31 Forth hmm...my laptop is 4 years old
01:31 stevan autrijus: good luck
01:31 stevan autrijus: quick question before you go to sleep
01:31 autrijus k
01:31 stevan something for your dreams :
01:32 stevan can objects be stringifed uniquely?
01:32 stevan like in p5
01:32 stevan would that be difficult
01:32 autrijus that is an excellent question that I have no answer of. :)
01:32 stevan LOL
01:32 stevan ok
01:32 autrijus however.
01:32 autrijus if we have Eq
01:32 autrijus as in =:=
01:32 autrijus then we must be comparing on _something_ internally
01:32 stevan it is mostly for Set.pm
01:33 autrijus whether that something can be stringified is another matter.
01:33 stevan because mugwump is using a hash
01:33 autrijus ok... let's just say an object numify to something unique first?
01:33 autrijus it's easier (and less ambiguous) than a string
01:33 stevan ok
01:33 stevan either way is fine with me :)
01:34 stevan if you want, you can just point me to the Haskell and I will try and hack it while you sleep :)
01:36 autrijus oh.
01:36 autrijus sadly I implemented it already
01:36 autrijus committing
01:36 stevan LOL
01:36 stevan just too fast for me
01:36 autrijus you can look at the changelog to see what happened though :)
01:36 stevan oh well, my haskell book will gather dust, but my metaclass book is getting a lot of reading
01:36 autrijus (and maybe throw some haddock at it)
01:36 stevan cool
01:36 autrijus or tests. :)
01:36 autrijus metaclass++
01:37 autrijus your summary is really nice
01:37 stevan thanks
01:37 autrijus hm. maybe ask on p6l?
01:38 autrijus (about the obj-numify-by-default-to-unique-value semantic)
01:38 stevan ok
01:38 autrijus danke
01:38 autrijus it's useful, no doubt
01:39 autrijus done as r3199
01:40 stevan muchas gracias
01:40 autrijus de nada
01:45 cjn has joined #perl6
01:45 svnbot6 r3199, autrijus++ | * per Stevan's request, let Objects numify to unique values.
01:49 stevan ok, p6l question sent
01:50 stevan time to watch some TV while Pugs recompiles
01:50 stevan :)
02:05 Juerd nn
02:20 cjn newbie problem--when I load hangman.p6 in pugs 6.2.3 nothing happens, not even an error
02:30 jroc has joined #perl6
02:32 autark-jp cjn: are you patient enough?
02:35 Qiang_ has joined #perl6
02:35 cjn autark-jp: i get a new prompt after it loads, is that what you mean?
02:35 autark-jp cjn: on my machine it takes about 30 seconds before the hangman starts.
02:35 autark-jp though, it is not 6.2.3, but a later rev.
02:36 cjn there is about a 3 second pause for me, and then i get a new prompt after no output
02:36 cjn there must be some error...is there a verbosity setting perhaps?
02:37 autark-jp not that I know of.
02:38 cjn maybe i will try svn, thanks
02:38 stevan cjn: I suggest trying svn too
02:39 cjn stevan: ok, if it does not work i will be back :-)
02:39 stevan sometimes newly implemented features will break old workarounds in older code
02:40 stevan cjn: what platform are you on BTW?
02:40 Qiang has quit IRC (Read error: 145 (Connection timed out))
02:41 cjn stevan: gentoo 2.6.11
02:43 scook0 has joined #perl6
02:44 stevan hmm, should work
02:48 autark-jp hm, even 6.2.3 works fine here (Gentoo)
02:48 zuulvin_ has quit IRC (Read error: 60 (Operation timed out))
02:48 cjn some things work (e.g. mandel.p6), but not hangman
02:49 stevan cjn: what version of GHC?
02:49 cjn stevan: 6.4
02:49 stevan ok
02:50 stevan thats good
02:50 cjn don't worry about it, i've been meaning to try out subversion anyway :-)
02:52 autark-jp hm, a bug: Sorry, the committer was ' '
02:59 zuulvin_ has joined #perl6
02:59 svnbot6 r3200, autrijus++ | * Per larry, implement $obj.id instead of +$obj for unique id.
02:59 stevan autrijus++ indeed :)
02:59 sproingie oh goody, more magic methods that collide with mine
02:59 sproingie i give all kinds of objects 'id' methods
02:59 autark-jp *grin*
03:00 sproingie this is the same sort of thing i knock ruby for
03:00 sproingie is there still a UNIVERSAL to disambiguate?
03:00 stevan sproingie: take it up with @Larry
03:00 stevan I am sure there is still room to move on it
03:01 stevan sproingie: I doubt we will have UNIVERSAL
03:01 sproingie how many larrys are in @Larry?
03:01 stevan sproingie: to be honest, I dont know
03:01 sproingie stevan: so if i have an 'id' method, i'm basically SOL?
03:01 stevan sproingie: not if you convince larry to change it :)
03:03 sproingie well there's got to be some kind of scope resolution
03:03 sproingie otherwise many other things would be impossible
03:03 stevan scope resolution?
03:05 stevan do you mean method resolution?
03:06 sproingie my C++isms show
03:06 stevan sproingie: I never did any C++ sorry :)
03:06 sproingie like foo->SUPER::bar ... come to think of it, i guess that's the only one that really works
03:07 sproingie i know of foo->NEXT::bar, but i think that's an AUTOLOAD trick
03:07 stevan you should be able to do foo.SUPER::id()
03:07 sproingie yah, what i need is foo.Perl6::id()
03:07 stevan sproingie: SUPER:: should still be in perl6 IIRC
03:08 sproingie SUPER was an example.  it's not sufficient to get at the "built-in" method
03:08 sproingie as opposed to any overridden version
03:08 stevan I agree
03:08 sproingie we have UNIVERSAL for 'isa' and 'can', need an equivalent for everything now
03:09 stevan sproingie: UNIVERSAL was a so-so idea IMHO
03:10 sproingie stevan: it was a hack, but not much other way to do it, barring a true builtin namespace
03:10 stevan with Classes Roles, etc. I doubt that we can have a single base class like UNIVERSAL
03:10 stevan sproingie: metaclasses :)
03:11 stevan people were always tempted (I know I was) to add to UNIVERSAL
03:11 stevan perl6 will have metaclasses,... which means you no longer have to hack UNIVERSAL
03:11 stevan you can subclass Class instead :)
03:11 sproingie long as it's relatively painless to get at the builtin versions
03:12 stevan I cannot speak for the level of pain involved
03:12 stevan the only thing right now is S12/Introspection
03:12 stevan which touches on a basic metaobject protocol
03:12 sproingie a serializer can't rely on $obj.id no matter how elegant that looks.  gotta use some moral equivalent to UNIVERSAL::id($obj) the
03:12 sproingie s/the//
03:13 stevan $obj.meta.class.id($obj)
03:14 stevan .can() and .isa() will actually be stored in $obj.meta
03:14 stevan and aliased in the $obj
03:14 sproingie kinda wordy, but i guess it's less to type than UNIVERSAL
03:14 sproingie i think i'm going to be creating a lot of emacs abbrevs for perl6
03:14 stevan sproingie: it can always be aliased lower in the call chain
03:15 stevan s/call/method call/
03:15 sproingie true.  and perl6 has macros
03:15 stevan yes it does :)
03:16 * sproingie hasn't read through all the apocalypses/synopses yet
03:16 sproingie let alone the voluminous exigeses
03:16 sproingie exigesises?
03:17 stevan I stick with the synopsis
03:17 stevan or ask Juerd :)
03:17 revdiablo or, more and more, read the pugs tests :)
03:17 sproingie yay pugs
03:17 sproingie pugs++
03:19 autrijus hm, surely you can use $obj.Object::id()
03:20 autrijus or its equivalent
03:20 autrijus Object::id($obj:)
03:22 autrijus hm, the colon is optional
03:23 Alias_ has joined #perl6
03:23 Alias_ ".method changed to mean $_.method; to call method on the current invocant, use ^method instead."
03:23 Alias_ WTF?
03:23 Alias_ I thought we had this big long conversation on why .method == $_.method sucked?
03:24 autrijus Alias_: aye, and the ^method faction won out
03:24 autrijus for the record, I find it suboptimal.
03:24 Alias_ That is even more horrible
03:24 sproingie ^method?  ew
03:24 Alias_ It's terribly uncomfortable
03:24 sproingie talk about gratuitous extra syntax
03:25 autrijus I don't dispute that. ;)
03:25 Alias_ Who is this faction, and where do they live
03:25 autrijus you'd prefer o.method? :)
03:25 autrijus $..method? _.method?
03:25 Alias_ I prefer what I though we had agreed on
03:25 Alias_ That optimising away $_ in that case was pretty poor huffman encoding
03:26 autrijus and make "given $foo { .method } " illegal -- you need to write $_.method instead
03:26 autrijus guess what, I agree with you. ;)
03:26 autrijus but I'm this implementation monkey, you know? :)
03:26 Alias_ I say we strike
03:26 Alias_ Just leave it as .method for the invocant :)
03:26 autrijus strike is... not an option :)
03:27 stevan Alias_: there are always macros
03:27 Alias_ So now I'm going to have to make up a tinderbox script to prove how many more times $self->method is called, compared to function($_)
03:27 svnbot6 r3201, Stevan++ | adding tests for $obj.id()
03:27 svnbot6 r3202, autrijus++ | * foo($obj) must mean foo($obj:), not foo(:$obj) -- pugs had it wrong.
03:29 Alias_ autrijus: Do you have a thread for this?
03:31 Alias_ And why for god sake HAT of all things
03:32 Alias_ "So to call a normal method I do 'to the power of method'? "
03:32 Alias_ I can see it now
03:33 rafl has quit IRC (Read error: 54 (Connection reset by peer))
03:33 rafl has joined #perl6
03:33 Alias_ Not to mention that the only key combination harder to hit might be ctrl-F5
03:36 autrijus hm I can't find it anymore.
03:36 autrijus maybe it's all been an illusion.
03:37 cjn stevan, et al: hangman.p6 still prints nothing after compiling svn
03:38 autrijus cjn: weird. which path did you run it from?
03:38 cjn pugs> :l examples/games/hangman.p6
03:38 autrijus Juerd: I'll bring up the topic _again_ on p6l. gawd.
03:38 autrijus oh. don't do that :)
03:38 autrijus ./pugs examples/games/hangman.p6
03:39 autrijus on the command line
03:39 autrijus hangman uses $*PROGRAM_NAME
03:39 autrijus which is not set when you do :l
03:39 autrijus not sure if it should, though
03:39 cjn autrijus: ah oh, that works fine; i was thrown off by some (most?) of the other scripts working
03:41 autrijus Alias_: sent to p6l. fire at will
03:42 autrijus cjn: glad to hear it. :)
03:43 * autrijus needs to sleep... *wave*
03:44 Alias_ autrijus: I found the thread
03:44 autrijus Alias_: oh! url?
03:45 Alias_ I have a URL, but it points to the wrong thing
03:45 autrijus huh?
03:45 Alias_ oh... wrong url, it's below
03:45 Alias_ http://xrl.us/fyp3
03:47 autrijus hm, I don't see the magical ^foo there
03:48 autrijus I swear I saw luqui and/or larry mentioning it :-/
03:48 Alias_ even &.method might not be _so_ bad
03:48 Alias_ albeit even worse from huffman
03:48 autrijus yeah. don't do that :p
03:48 Alias_ someone else seems to have suggested it
03:49 Alias_ We surely _have_ to keep .something consistent though
03:50 autrijus as an implementation monkey, I just want this specced down :)
03:50 autrijus (currently the spec says .method means $_.method but say nothing about $self.method)
03:50 Alias_ I just want to not be a laughing stock
03:50 stevan implementation monkeys++
03:50 Alias_ .method is just _so_ darned obvious
03:51 Alias_ even python coders would like it
03:51 autrijus map { .foo } @bar;   given $baz { .destroy; }
03:51 Alias_ sigh
03:52 Alias_ as opposed to map { $_.foo } @bar and $baz.destroy
03:52 Alias_ Selling our souls for another half dozen keywords
03:52 autrijus <wolverian>  : The .foo syntax is very special, after all, so you can't really be
03:52 autrijus : consistent with it. I prefer it be the topic, in any case
03:52 autrijus I happen to agree that you can't be consistent with it :)
03:52 Alias_ And what's this "when"?
03:52 autrijus Alias_: I'd like to see numbers of $_->foo vs $self->foo.
03:53 Alias_ yeah
03:53 autrijus Alias_: "when" is like "case".
03:53 autrijus given $foo { when 3 { ... } }
03:53 Alias_ If the implicit invocant is so ugly, people revert to explicit invocants, you lose
03:53 Alias_ He's sacrificing clean OO for an imperative control structure?
03:53 * autrijus notes that $self-> is 7 characters
03:54 autrijus (and we type it all the time)
03:54 * Alias_ notes his RSI
03:54 Alias_ except now it's ($self: $something)
03:55 autrijus that's still 4 chars less than
03:55 stevan autrijus: weren't you going to sleep?
03:55 autrijus $self = shift;
03:55 autrijus Alias_: but I agree with all your points :)
03:57 autrijus (except the 'strike' part. not gonna do that)
03:57 Alias_ heh
03:57 autrijus stevan: ah. yes. I forgot
03:57 Alias_ auttrijus: Rumblings of discontent can be useful
03:58 Alias_ autrijus: I managed to push Apache->Apache2 over the line (although admitedly my part was as one of a dozen)
03:58 autrijus Alias_: yeah, I understand. let's just say we have different styles :)
03:58 Alias_ heh
03:59 Alias_ I'm more than happy to stay in the background, except when I see people making stupid mistakes we can't fix later :)
03:59 Alias_ Then I guess I feel the urgency a bit
04:01 autrijus :) really &
04:03 Alias_ $x = [»+^=«] @foo;
04:03 Alias_ joy...
04:04 Alias_ So now that's $x = [>>+^=<<] @foo;
04:16 arcady what's that even supposed to mean?
04:17 svnbot6 r3203, Stevan++ | Set - various hacks to make this work with objects.... my apologies, but I needed it for the MetaModel
04:17 svnbot6 r3204, Stevan++ | Perl::MetaModel - Moving towards fully OO implementation; removed Hack::Instances; added pure OO Perl::Meta::MetaClass with tests; removed other un-needed modules; some other general house cleaning, as always there is more work to be done
04:19 meppl has quit IRC (Read error: 110 (Connection timed out))
04:20 meppl has joined #perl6
04:35 Alias_ is huffman dead?
04:35 svnbot6 r3205, Stevan++ | meta-meta-classes - some typos and corrections
04:36 * Alias_ wants to use "huffman would be turning in his grave" to make a point
04:39 autark-jp according to wikipedia he is.
04:41 ihb Alias_: really, what does "$x = [>>+^=<<] @foo;" mean?
04:43 Alias_ I'm sure 2 of the 3 best programmers in the world know
04:46 crysflame wow
04:46 crysflame lesse
04:46 crysflame >><< is a hyperoperator
04:46 crysflame unsure about +^=
04:46 crysflame i'd say it's the infinite sum of @foo
04:46 stevan ihb: [] is the reduce/folding operator (i forget which)
04:46 crysflame er
04:46 crysflame finite sum
04:47 ihb what's the = doing in reduce?
04:47 stevan i think it can be read as ... $x = @foo[0] >>+^=<< @foo[1] >>+^=<< @foo[n] ...
04:47 stevan but I am guessing and it is late, so I will stop
04:48 ihb >><< is hyper for binops?
04:48 stevan Alias_: where did you get this code from?
04:48 ihb so what's ^ ?
04:49 stevan ihb: ^ is a Junction related operator
04:49 Khisanth well +^ is the bitwise xor?
04:49 stevan but not sure in this context
04:49 Khisanth oops I guess that changed :)
04:50 sproingie has quit IRC ("Konversation terminated!")
04:50 ihb and + is for Num context?
04:50 Alias_ steven: Larry
04:51 Alias_ ihb: >><< is the only sane bit in there
04:51 Alias_ ihb: It means "explicitly parallel"
04:51 stevan Alias_: can you give more context?
04:51 ihb and what does "explicitly parallel" mean?
04:52 Alias_ As in, "feel free to split it into threads if you want" I guess
04:52 Alias_ ^ is the operator
04:52 stevan from S03: >> and << are used to denote "list operations", which operate on each element of two lists (or arrays) and return a list (or array) of the results
04:52 Alias_ + means, "and numerically xor it"
04:53 Alias_ = means "and assign it"
04:53 Alias_ >><< "in parrelel"
04:53 Alias_ [ ] "and reduce"
04:53 Alias_ ok, so it does "WAHT?"
04:53 stevan Alias_: see, now that wasn't so hard
04:53 Alias_ stevan: OK, now what does it do
04:53 Alias_ in english
04:53 stevan it numerically xors and assigns a list in parrallel while reducing it
04:54 stevan AND makes julian fries
04:54 Alias_ which means what exactly?
04:54 Alias_ in real world terms?
04:54 stevan Alias_: honestly, it is too late for me to even begin to fathom that
04:55 stevan I am sure there is some use for it in some domain
04:55 Alias_ hell, I don't even know what reduce means, and I've written over 100,000 lines of perl
04:55 stevan but certainly not in any I work in
04:55 Alias_ I think I've pulled out List::Utils::reduce ONCE
04:55 ihb so does @foo contain arrays, or does it work on one-elements lists?
04:55 Alias_ and I can't really remember what it did
04:55 Alias_ ihb: Who the hell knows
04:55 stevan Alias_: reduce is a very FP tool
04:55 Alias_ FP?
04:55 stevan Functional Programming
04:55 ihb Alias_: many lines in Perl isn't necessarily something to brag about ;-)
04:56 stevan :D
04:56 Alias_ ihb: I get shit done. Better than most
04:56 revdiablo you must eat a lot of fiber
04:56 Alias_ shitloads
04:56 ihb hah
04:56 Alias_ speaking of which
04:56 Alias_ lunch
04:56 stevan Alias_: reduce() basically reduces a list to a scalar using a function
04:57 stevan $foo = reduce { $a + $b } 1 .. 10  # sum of 1 -> 10
04:57 Alias_ "reduces"?
04:57 revdiablo $ pugs -e 'say [+] (1,2,3,4,5)'
04:57 revdiablo 15
04:58 Alias_ I've found one use for it, walking a tree
04:58 ihb personally i think that foldl1 is easier to first understand than reduce.
04:58 Alias_ Personally, I'm quite happy with reduce being in List::Util
04:59 Alias_ It's a specialist tool one can bring out when needed
04:59 stevan Alias_: that is probably true of the kind of work you do
04:59 ihb it wasn't obvious to me that reduce was foldl1 when i first saw it and skimmed the description, but then i looked at the example :-)
04:59 Alias_ stevan: And a large percentage of normal coders
04:59 stevan but for some it is a basic tool
04:59 Alias_ stevan: That's what things like C< use physics; > was meant to be for
04:59 Alias_ use functional;
05:00 stevan Alias_: I am not sure that I would use "normal" coders as a baseline
05:00 stevan well, I do mostly web apps (database reporting) and most of my system is OO based
05:00 stevan but there is much in there which could be called functional
05:00 Alias_ stevan: If normal coders can't use Perl... then we just have Paskell
05:00 Alias_ Smart people already HAVE their own languages :)
05:00 stevan actually functional programming techniques compliment OO very nicely
05:01 stevan :D
05:01 revdiablo heh, everyone I talk to has a different idea of what Perl should be for.
05:02 Alias_ I like the idea that the the primary current userbase ( admin, web, dbi, lego ) are catered for, and specialist groups get their own language modifiers
05:02 Alias_ It's a brilliant idea
05:02 Alias_ Why limit yourself what few features you can sneak in the core
05:02 Alias_ Go all out and stack unicode operators in your native notation!
05:02 Alias_ Write perl using algebra!
05:02 stevan Alias_: but APL made so much sense :P
05:02 Khisanth revdiablo: and they are all correct
05:03 stevan Alias_: I agree some of the new operators can get nasty, but I just wont use them
05:03 revdiablo Khisanth: but they are often contradictory
05:03 Alias_ stevan: If most people arn't using stuff, why is it in core when it's so easy to plug them in?
05:03 stevan revdiablo: but they can still be correct :)
05:03 ihb stevan: APL?`
05:03 stevan hence the beauty of TIMTOWTDI
05:03 Khisanth revdiablo: so is religion and look at how many religious types there are :P
05:04 Alias_ Perl 5 achieved TIMTOWTDI largely by being simple
05:04 Alias_ especially in OO
05:04 Khisanth A Programming Lanuage?
05:04 revdiablo stevan: how can one person who says, "this should not be in the core" be correct at the same time as someone who says, "this should be in the core"?
05:04 stevan ihb: it was a programming language back in the 60/70s
05:04 stevan full of strange operators
05:04 Khisanth revdiablo: junction! :P
05:04 revdiablo heh
05:05 Alias_ junctions are great too
05:05 revdiablo that's it, we need full parallel universes
05:05 ihb revdiablo: if they're both correct, then any statement is correct, which is pretty sweet :-)
05:05 Alias_ And at least THEY arn't operators
05:05 revdiablo the junction operators aren't operators?
05:05 Khisanth as oppose to "a programming language back in the 80s full of strange operators"
05:05 stevan ihb: http://www.thocp.net/software/languages/apl.htm
05:06 stevan Alias_: there are junction operators
05:06 stevan (a | b), etc.
05:07 ihb so, will it be possible to write formal logic in Perl 6?
05:07 stevan ihb: not really, but closer then perl5
05:07 * ihb is disappointed.
05:08 stevan ihb: you probably need a functional language for something like that
05:08 ihb can i forget about Prolog when i know Perl 6?
05:09 stevan doubt it
05:09 ihb well. can't have it all.
05:09 ihb but i would've been impressed.
05:09 stevan but then again, you could always write a WAM in perl6 :)
05:10 stevan after all prolog has to be implemented in something
05:10 ihb i can do that in Perl 5 too :-)
05:10 stevan ihb: it would be more "fun" in perl 6 :)
05:10 ihb the point would be to not have to implement the WAM...
05:10 ihb but of course, thanks to Ovid there's AI::Prolog.
05:10 stevan somebody has to implement the WAM (or something similar)
05:10 ihb so we don't have to do that :-)
05:11 stevan ihb: write formal logic in perl6/pugs using eval_perl5() and AI::Prolog
05:11 ihb bah
05:11 ihb now you're really reaching. :-)
05:11 stevan ponie?
05:11 stevan :P
05:12 revdiablo is ponie even being worked on anymore?
05:12 stevan someone was talking about it in here the other day, but other than that I have no idea
05:12 stevan ok I really really need to sleep
05:13 ihb i really want v (||) the upside-down v (&&), implication, ->, etc. that can be done, can't it?
05:13 stevan adios all
05:13 revdiablo I hope it is, because it seems like a really neat idea.
05:13 ihb isn't ponie the piece of the puzzle that'll make all Perl5 modules work in Perl6?
05:14 revdiablo ponie is perl5 ported to parrot
05:14 ihb does (1, 2, 3) >>+<< (1, 3, 5) evaluate to (1, 5, 8)?
05:14 revdiablo so, yeah
05:14 revdiablo should be 2, 5, 8
05:15 ihb err, right.
05:15 revdiablo $ pugs -e 'say ((1,2,3) >>+<< (1,3,5)).join(",")'
05:15 revdiablo 2,5,8
05:15 ihb i did react that the diff was 4 and then 3 in the last list, but ignored that a split-second later :-)
05:16 ihb so then @foo is an array of arrays in the above example.
05:16 revdiablo I'm not even going to try to figure out the above example
05:16 revdiablo =)
05:18 revdiablo I'm not comfortable enough with either >><< or [] to see clearly how they interact
05:19 ihb if it would've been just [>>+<<] @foo it would've been the column sum of @foo.
05:20 ihb but now there's = and ^ in there too, and i have no clue as to what they do, or what + really means there.
05:21 gaal_ has joined #perl6
05:21 Khisanth there should be ~^ +^ and ?^
05:23 ihb yeah. what does ^ do?
05:25 ihb same as one()?
05:25 nothingmuch has quit IRC (Remote closed the connection)
05:25 eric256_ has joined #perl6
05:27 * eric256_ thinks that half the examples have been updated since this morning..someone has been busy
05:28 ihb according so S03 +^ is ~ (bitwise negation)
05:28 eric256_ btw the example link on pugscode.org links to revision 3005
05:29 ihb so how does that combine with "=" ?
05:29 eric256_ anyone else find perl5 boring after playing with perl6 ;)
05:29 ihb (numerical) bitwise negation is unary, so it doesn't like the good old op= shortcut.
05:30 ihb s/like/seem like/
05:30 simcop2387 has quit IRC (Read error: 110 (Connection timed out))
05:31 nothingmuch has joined #perl6
05:31 ihb i'll probably hate some aspects of Perl 5 even more after i've learned somer Perl 6, if that's what you mean. it probably isn't, but that's an answer anyway :-)
05:31 eric256_ lol
05:32 eric256_ i would think that $x +^= 1; is what you are looking for. dunno why not
05:32 eric256_ looks kinda funky is all. but my 2 cents aint worth a dime in this case. ;)
05:33 ihb oooooooh. +^ is always the "old" bitwise xor.
05:33 ihb err, s/always/also/
05:33 ihb i should follow stevan's example and get some sleep.
05:33 eric256_ lol
05:37 ihb alright then. $foo = [ >>+^<< ] @foo is the column xor. why was = in there?
05:37 ihb eric256_, i'm talking about "<Alias_> So now that's $x = [>>+^=<<] @foo;"
05:38 eric256_ i honestly have no idea what you just said. lol
05:38 ihb eric256_: do you have pugs installed?
05:38 eric256_ yep
05:38 gaal has quit IRC (Read error: 110 (Connection timed out))
05:39 eric256_ just building newest version
05:39 eric256_ forgot that some features i was playing with where only put in today...get home and the example was borked. lol
05:41 eric256_ is now known as eric256__
05:41 eric256__ arg
05:42 ihb what does "([>>+<<] ([1,2,3,4],[2,4,6,8],[3,6,9,12])).join(', ').say;" output?
05:42 ihb 6, 12, 18, 24?
05:44 eric256__ nope i get an error. hang on a sec
05:44 ihb that's the first piece of Perl 6 i've written, so i wouldn't be surprised :-)
05:50 eric256__ your trying to make the hyper loop thing right?
05:53 ihb what error did you get?
05:53 eric256__ it was mad about jsut about everything. lol
05:53 ihb how do you create anonymous arrays nowadays btw?
05:53 eric256__ i'm starting with simpler things and building up.. () = array [] = array ref
05:53 eric256__ no changes i know of there
05:54 eric256__ i understand now you are trying to use reduce & hyper looping.
05:54 ihb () is array?!
05:54 eric256__ lol you don't like small challenge?  (or list.../me never can tell the difference)
05:54 ihb so is (1,(2,3),4) not  (1,2,3,4)?
05:55 eric256__ my @x = [+] (1,2,3); @x.join(",").say; works as expected by me ;)
05:56 eric256__ i would guess that it flattens so that those ARE the same
05:56 ihb what does that output?
05:56 Shachaf has quit IRC (Remote closed the connection)
05:56 ihb just 6, right?
05:56 eric256__ 6
05:57 eric256__ yep. i'm not sure that you can do what you want...hyper loops go over both at the same time.
05:58 ihb (1,2,3,4) >>+<< (2,4,6,8) is (3,6,9,12), right?
05:59 eric256__ yep
05:59 ihb isn't ((1,2,3,4) >>+<< (2,4,6,8)) >>+<< (3,6,9,12) the same as (3,6,9,12) >>+<< (3,6,9,12)?
06:01 ihb and isn't ((1,2,3,4) >>+<< (2,4,6,8)) >>+<< (3,6,9,12) the same as [>>+<<] ([1,2,3,4],[2,4,6,8],[3,6,9,12])?
06:01 eric256__ ([1..3],[4..6], [7..10]).map:{ [+] $_ }.join(",").say;
06:02 rgs has left "Pining for the Fjords"
06:03 eric256__ since those are array-refs in the middle you are getting there lengths added together. at least thats the way i'm reading it. ;)
06:03 ihb hmm. yeah. i was hoping it wouldn't do that :-)
06:03 ihb btw, what does the output?
06:04 eric256__ say
06:04 eric256__ ??
06:04 ihb err, yeah. sleep. remember?
06:04 eric256__ lol
06:05 ihb so it output "3,3,4"?
06:05 ihb *outputs
06:05 ihb dammit. i give up.
06:06 eric256__ i can't get it to output anything now.. i had to tweak it before
06:06 eric256__ however
06:06 eric256__ my @x = [1,2,3,4] >>+<< [2,4,6,8] >>+<< [3,6,9,12]; @x.join(",").say;
06:06 eric256__ works like you are expecting.
06:06 eric256__ so it would seem you are on the right track. but something weird is going on
06:06 ihb interesting.
06:07 ihb so [] and () acts the same in there. that's... interesting. will prolly cause a head-scratch or two.
06:07 eric256__ this could all be changed by morning
06:07 eric256__ you never know. some of this behavoir is almost certainly bugs. lol
06:08 ihb there must be tests for >> and <<
06:09 eric256__ it appears that the reducing part doesn't work at all for they hyper loops
06:10 eric256__ i would not assume there are tests for these particular cases already
06:11 ihb i'd write some if i had a clue how it's supposed to work :-)
06:13 eric256__ as far as i can tell there are no reduce tests at all
06:14 gaal_ stevan: ping
06:16 SM_ax has joined #perl6
06:22 Aankhen`` has joined #perl6
06:22 eric256__ actualy i can't fine the [] infix operator anywhere in the apacolypsys and there seem to be no tests for it
06:22 eric256__ lol
06:23 eric256__ has left
06:24 gaal_ eric, it's a relatively new proposal. grep p6-l for 'reduce metaoperator'.
06:24 gaal_ oops, too late.
06:36 Aankhen`` Tsk, tsk.
06:57 chady_ is now known as chady
07:16 bsb Hi, could someone please try: prove -v t/pugsrun/08-script-from-stdin.t  t/pugsrun/09-dash-uppercase-c.t
07:22 ihb gaal_: does it add anything over "reduce { ... } ..."?
07:27 gaal_ sorry, was away.
07:27 gaal_ ihb: there was a discussion about it -- larry wanted it.
07:28 gaal_ others said it's getting to be too many ops
07:28 gaal_ but it was decided it's in (i think, finally).
07:29 gaal_ bsb, i get 20/65 failed. no idea what par is.
07:31 bsb thanks gaal_, I got 24/63 failed
07:31 Aankhen`` Hey gaal, you got a minute?  I'm trying to figure out how to get Parrot linked into Pugs, but I can't seem to find the directory that I ought to be setting PARROT_PATH to.
07:32 gaal_ what platform are you on?
07:32 Aankhen`` Win32.
07:32 gaal_ try the source dir (workdforme on linux)
07:32 gaal_ i had no luck building parrot on windows though.
07:32 Aankhen`` I get error messages about a bunch of .lib files.
07:33 Aankhen`` Parrot didn't give me any trouble, Pugs did.
07:33 gaal_ otherwise maybe just where your parrot.exe is installed.
07:33 Aankhen`` OK.
07:33 Aankhen`` Thanks.
07:33 gaal_ did you make install parrot?
07:33 Aankhen`` Yes, it installs into \usr\local\parrot-0.2.0-devel\.
07:33 Aankhen`` Come to think of it, I had tried that as well.
07:33 gaal_ wait, when did you get those errors, building pugs or using pugscc?
07:34 Aankhen`` Um... I ran `nmake` and it aborted after a while.
07:34 rafl has quit IRC (Remote closed the connection)
07:34 rafl has joined #perl6
07:34 iblechbot has joined #perl6
07:34 gaal_ not sure i can help, but nopaste the error?
07:35 Aankhen`` OK, in a few minutes.
07:35 Aankhen`` I'm rebuilding Parrot.
07:35 gaal_ i take it you're using MSVC?
07:36 Aankhen`` Yes.
07:36 gaal_ It seems to require that :(
07:37 gaal_ At least, I haven't heard of someone who used the free MS command line tools recently.
07:37 Alias_ larry has wanted reduce for a while, but mentioned there was some other specific $thing it solved that gave him enough impetus to finally add it
07:38 Aankhen`` Heh... Microsoft's free version of nmake is at 1.50.
07:38 Aankhen`` The version I'm using is at 7.10.
07:38 gaal_ oi.
07:39 Alias_ In the bit I read he didn't mention exactly _what_ that thing was
07:39 Aankhen`` I gotta go for a bit.
07:39 gaal_ well, an internal-use library i'd been hacking on for $work is at version 0.73. i started working on it what, two years ago. :)
07:39 Aankhen`` has quit IRC ("BBIAB [Time wasted online: 1hr 17mins 20secs]")
07:42 Alias_ heh
07:42 Alias_ I have a library I had to stop versioning when it finally rewrote itself
07:42 Alias_ It's now just "species A"
07:46 gaal_ Alias_, you remind me of this. http://www.gamespy.com/article​s/595/595975p1.html?fromint=1
07:46 svnbot6 r3206, iblech++ | * Usual svn properties added to ext/Perl-MetaModel and t/oo.
07:46 svnbot6 r3206, iblech++ | * EOL at EOF added to meta_meta_classes.pod (Stevan++!), and fixed a typo in it.
07:47 gaal_ is now known as gaal
07:48 Alias_ gaal: I'm also a huge procedural/evolutionary/emergent behaviour fan
07:49 Alias_ Not very experienced, but having great fun with my experiments in it so far
07:50 Alias_ It's sort of like hacking people :)
07:51 gaal no, you mixed that up with organized crime.
07:51 Alias_ hmmm?
07:51 svnbot6 r3207, bsb++ | haddock for canonicalArgs
07:52 gaal never mind, whacky humor :)
07:52 Alias_ ah
07:52 Alias_ This Spore game looks neat
07:52 Alias_ Can you get it?
07:53 gaal it's very much still in development, i think.
07:53 Alias_ It will probably have all the fun worked out of it by the time it's realeased
07:53 Alias_ Microsoft Spore, the new action first person shooter! Evolve to Microsoft!
07:53 gaal the release date isn't even announced.
07:54 gaal embrace and evolve, heh.
07:59 gaal afk
07:59 Alias_ yep, release date TBA
08:25 crysflame has quit IRC ("Changing server")
08:37 vitaminmoo has quit IRC (Read error: 110 (Connection timed out))
08:49 gaal can someone please prove t/operators/quoting.t ? it's looping aroung test 30 for me.
08:49 vitaminmoo has joined #perl6
08:50 scook0 gaal: I'm seeing the same
08:50 scook0 t/operators/quoting....ok 29/47
08:50 scook0 chewing up 100% cpu
08:51 gaal this is what's causing it:
08:51 gaal @q2 = «$foo gorch $bar»;
08:51 gaal when $foo and $bar are simple strings.
08:51 bsb Hi scook0, sorry I missed you the other day.
08:52 gaal seems not to matter what the strings contain.
08:52 scook0 bsb: looks like you might miss me again--I probably have to go soon :(
08:53 bsb No worries, I haddocked Pugs.Run.Args just to warm up
08:53 gaal minimal borkage: my $s = <a>; my @a = <<$s>>;
08:53 bsb Nothing exciting
08:57 Alias_ "haddocked"?
08:58 gaal Alias_, think {perl,java}doc
08:58 gaal make haddock
08:59 bsb http://www.haskell.org/haddock/
08:59 scook0 has quit IRC ("Bye all...")
09:00 Alias_ ah
09:01 Alias_ I keep meaning to get around to doing one of those
09:01 Alias_ ... for Perl modules
09:01 Alias_ Looks like Perl 6 will beat me to it
09:08 wolverian oh my god, 31 new mails on p6l
09:10 Alias_ wolverian: Would this be .method again?
09:10 Alias_ :)
09:14 ingy hola
09:14 wolverian heh. some of it, yes.
09:14 * Alias_ is getting is hackles up about basically chucking away OO in P6
09:15 Alias_ That's for the wonderful sexy parameter stuff, pity the codes unreadable line noise
09:15 Alias_ s/That's/Thanks/
09:25 castaway_ is now known as castaway
09:27 iblech has joined #perl6
09:31 bsb hi ingy
09:31 svnbot6 r3208, autrijus++ | * No consensus on ^method -- rescinded that syntax
09:31 bsb Can I  add some haddock to util/PugsConfig.pm?
09:36 Forth has quit IRC (Nick collision from services.)
09:37 Forth has joined #perl6
09:38 Forth has quit IRC (Nick collision from services.)
09:40 gaal has quit IRC ("goodbye")
09:41 gaal has joined #perl6
09:42 Forth_ has joined #perl6
09:47 ingy hi bsb
09:58 revdiablo has quit IRC (Remote closed the connection)
09:58 svnbot6 r3209, autrijus++ | * $obj.method($arg) should not list $arg as an invocant; however, function($arg) should.
09:59 DapperDan has joined #perl6
10:06 DapperDan has quit IRC ()
10:14 Aankhen`` has joined #perl6
10:16 Aankhen`` gaal, you still around?
10:16 gaal yup
10:16 Aankhen`` Sorry I left so quick.
10:16 Aankhen`` New router had to be installed.
10:17 gaal np
10:17 Aankhen`` Right.
10:17 * Aankhen`` gets into gear.
10:20 larsen has joined #perl6
10:23 theorbtwo has joined #perl6
10:30 Aankh|Clone has joined #perl6
10:38 Aankh|Clone perlbot nopaste
10:38 perlbot Paste your code here and #<channel> will be able to view it: http://sial.org/pbot/<channel>
10:38 svnbot6 r3210, autrijus++ | * fix regression reported by gaal:  my $s = <a>; my @a = <<$s>>;
10:39 pasteling "Aankhen``" at 203.101.17.129 pasted "Compiling Pugs with PUGS_EMBED=parrot fails" (32 lines, 1.1K) at http://sial.org/pbot/10121
10:40 gaal Aamkhen``, doesn't MSVC require you to run that batch file to set up the environment? VCVARS or something like that
10:41 Aankh|Clone That's all been set up.
10:42 gaal vcvars32.bat
10:42 Aankh|Clone I set the environment variables using vcvars32.bat for reference.
10:42 Aankh|Clone Everything works except compiling Pugs with Parrot linked in.
10:42 gaal hmm, it's ghc's bundled gcc that doesn't find the libs
10:43 gaal i wonder, is there an env variable for gcc that adds lib locations?
10:43 Aankhen`` has quit IRC (Read error: 110 (Connection timed out))
10:44 Aankh|Clone is now known as Aankhen``
10:44 Aankhen`` Perhaps...
10:44 Aankhen`` Sadly, I can't stick around to find out.  I have to go again. :-\
10:44 Aankhen`` I'm idling here, though, so you could leave a message. :-D
10:44 gaal bye! :)
10:45 Aankhen`` See you later.
10:48 bsb autrijus: ping
10:49 chady is now known as chady_
10:52 gaal Aankhen``: try simply setting LIBRARY_PATH to where those win32 libs of yours are. (If it's more than one path, use a colon as a separator.)
10:53 bsb tomorrow then... bye
10:54 iblech I've just added documentation to Set, but because I'm currently not at my main development computer (== no Pugs installed), I was unable to check if Set still works (I had to change POD =for into =begin). I'd be grateful if somebody runs make test in ext/Set.
10:54 svnbot6 r3211, iblech++ | Added documentation to mugwump++'s Set.
10:55 masak ping stevan
10:57 masak i think there were a few commas missing in stevan's metametaclass pod, so i added them
10:58 Southen[a] has joined #perl6
10:58 masak (that is, if i'm right in assuming that pairs within a hash should be comma-separated like in perl5)
10:58 gaal => is a pair constructor
10:59 masak gaal: yes, but is { a => b c => d } without a comma correct?
10:59 gaal no :)
11:00 gaal iblech, i get errors about &id being missing.
11:00 svnbot6 r3212, masak++ | Fixed a few spelling errors and missing commas.
11:00 masak wohoo, karma!
11:00 clkao karma masak
11:00 jabbot clkao: masak  has neutral karma
11:00 clkao karma masak
11:00 jabbot clkao: masak has karma of 5
11:00 masak :)
11:00 masak karma clkao
11:00 jabbot masak: clkao has karma of 26
11:00 masak wow
11:02 gaal iblech: the offending line is "my $set = set(0, 1, 2, 3, $bob);"
11:03 wilx karma wilx
11:03 jabbot wilx: wilx has neutral karma
11:03 wilx Tee hee hee.
11:05 masak karma autrijus
11:05 jabbot masak: autrijus has karma of 159
11:05 svnbot6 r3213, iblech++ | Added some more documentation to Net::IRC.
11:08 iblech gaal: re, thanks. Luckily, this wasn't because of me adding documentation, but because .id works only on "real" objects in Pugs currently.
11:08 gaal ;)
11:08 iblech gaal: I.e. 3.id should work as Foo.new.id does
11:09 * theorbtwo wonders how we're going to manage to make every real number have a unique integer id.
11:09 theorbtwo (Since card(real) > card(int).)
11:11 gaal ah, and then maybe perl will tell us if card(aleph_1) == card(c).
11:11 * theorbtwo wonders off to do some shopping.
11:11 iblech Hm.... maybe a program consisting only of "say 1.id; say 2.id" outputs 10001, 10002, but "say 2.id" outputs 10001. I.e. .id will only create integer values on demand
11:12 gaal ipc will suffer greatly :)
11:12 iblech true...
11:12 theorbtwo Anybody who does IPC and expects the .ids on one end to not conflict with the .ids on the other end deserves what they get?
11:13 theorbtwo We've only got so many integer IDs to go around.
11:13 theorbtwo It's all a matter of documenting the assumptions.
11:13 gaal does id have to be an integer? why can't 1.id's be '1.id' ?
11:13 gaal ...since id is opaque anyway.
11:13 theorbtwo ...and is 1.id == (1 but false).id ?
11:15 gaal i would think not; but i'm not even sure (1 but false).id == (1 but false).id
11:15 Southen has quit IRC (Connection timed out)
11:15 iblech ah! so .id does not return an Int, but an ID object, which can numify to an Int if needed. /me likes that
11:15 theorbtwo I'm not sure if I do.
11:16 theorbtwo I'm not sure why I don't, though.
11:16 iblech ;)
11:17 gaal does id guarantee identity? if so, it simply can't be put in any native int type.
11:17 gaal or is it more like java hash codes?
11:17 gaal what's the envisioned application for ids?
11:17 gaal oh, duh, sets ... and hashes :)
11:18 iblech gaal: Yes, it does guarantee identity. So if you have my $a = Foo.new, then no object besides $a has the same .id
11:19 gaal then it can't be an int, because there are maxint ints that need ids too.
11:22 gaal i wonder if i have any yeast left.
11:22 * gaal runs off to make bread
11:38 Southen[a] has quit IRC (Client Quit)
11:46 Corion has joined #perl6
11:49 elmex has joined #perl6
11:50 elmex has quit IRC (Client Quit)
11:50 elmex has joined #perl6
11:50 elmex has quit IRC (Client Quit)
12:02 Juerd How does the "pair" context operator work?
12:03 HipHob has joined #perl6
12:05 jez has joined #perl6
12:05 jez is the syntax "sub $arg;" still allowed in Perl 6?
12:05 Juerd    $foo ! $bar ! $baz   # none($foo, $bar, $baz)
12:05 Juerd Recent p6l messages have confirmed that there is no infix chained operator for none()
12:07 meppl has quit IRC (Remote closed the connection)
12:12 svnbot6 r3214, Juerd++ | quickref/data -- needs lots and lots of more information. Who has lists of
12:12 svnbot6 r3214, Juerd++ | methods? Who will summarize shapes?
12:17 svnbot6 r3215, iblech++ | Usual svn properties added to Juerd++'s docs/quickref/data.
12:18 Juerd What are those properties?
12:19 iblech svn:eol-style => "native" and svn:mime-type => "text/plain; charset=UTF-8"
12:20 iblech They make sure that, for example, win32 users see win32 line endings and Linux users see Linux line endings
12:20 meppl has joined #perl6
12:22 Juerd Bleh
12:22 Juerd I want the files to be unix/us-ascii
12:22 Juerd :)
12:23 Juerd (And I actually do think the latter is important. Let's not get close to the temptation of using unicode line drawing characters instead of simple minuses)
12:24 Juerd And I don't yet really grok «» and ¥
12:24 Juerd To me, they're <<>> and Y.
12:25 Aankhen`` has quit IRC ("Reboot [Time wasted online: 1hr 55mins 44secs]")
12:28 iblech Just that the encoding is utf-8, that doesn't mean we *have* to use unicode line drawing chars
12:28 Juerd Correct, but irrelevant
12:32 gaal currently all fancy builtin chars have ascii fallbacks, right?
12:32 iblech Didn't you write some month ago (on a post to p6l, IIRC), that you had switched most of your boxes to utf-8? :)
12:32 iblech gaal: Yep
12:33 iblech (And I hope other, new "fancy chars" builtins get ascii fallbacks, too.)
12:33 gaal i'm liking «», even though i still can't use it properly in win32.
12:34 gaal if the pain continues, i may have to move to the ascii fallbacks... or get back to using linux only ;-)
12:36 Aankhen`` has joined #perl6
12:37 ajs_home has joined #perl6
12:37 Aankhen`` has quit IRC (Read error: 54 (Connection reset by peer))
12:37 pasteling "Corion" at 84.176.29.16 pasted "How to eliminate this GHC warning?" (12 lines, 241B) at http://sial.org/pbot/10123
12:38 Aankhen`` has joined #perl6
12:40 Odin- has quit IRC (Read error: 104 (Connection reset by peer))
12:40 Odin- has joined #perl6
12:40 Odin-LAP has quit IRC (Read error: 104 (Connection reset by peer))
12:42 iblech Corion: I know almost nothing of Haskell, but try '_@(...)'?
12:43 Corion iblech: Tried and didn't work. Leaving out the h@ is what #haskell recommends
12:44 ajs_home I tried to debug the Parrot codegen the other day. I re-learned how hard it is to debug a language you don't know ;-)
12:44 elmex has joined #perl6
12:55 Odin-LAP has joined #perl6
13:06 meppl guten morgen
13:11 wolverian wow, bizarre mail on p6l about python's id().
13:11 wolverian yet another reason to hate python. :)
13:16 SM_ax who hates python?
13:16 wolverian I do. I like it too.
13:17 Southen has joined #perl6
13:17 Corion Python was cool, once.
13:18 SM_ax I can find no python releated articles...
13:18 theorbtwo I've never been convinced that python was worth trying.
13:18 theorbtwo That is, that it could possibly be better enough then perl to make up for the fact that it's not perl.
13:18 wolverian Leopod Tötch's (written Toetch) Re: Object Numify/Stringify-ing to Unique values
13:18 Corion I've learned it for work. And it has much nicer data handling capabilities
13:22 theorbtwo Perhaps I should learn at least enough of it to put it on my CV.
13:23 wolverian it's extremely simple and easy to learn.
13:23 Corion It's not hard (obviously)
13:23 SM_ax It has beautiful OO implementation
13:24 wolverian I dislike properties that aren't methods :)
13:25 SM_ax and I like its  "tie"
13:25 SM_ax I mean those __getitem__-like stuff
13:25 SM_ax __call__ is very cool idea too
13:26 mauke is __call__ like overloading &{} in perl5?
13:27 wolverian ugh. :)
13:27 wolverian sub postcircumfix:<( )> ( ... ) { ... }
13:28 SM_ax mauke, not sure :) because never tried it in perl5 :)
13:30 SM_ax mauke, it is like overloading "()" in C++
13:30 mauke yep, &{} then
13:30 mauke lets you do $obj->() and stuff
13:33 gaal wow, nice post by damian about reduce.
13:33 gaal $is_monotonic = [<] @numbers; # beautiful
13:33 gaal plus other goodies :)
13:34 * autark-jp ponders how is nr.3 supposed to work ...
13:34 SM_ax but I didn't mean that it can't be done in other languages. I meant that making a function a usual object  with __call__ method is cool idea
13:34 mauke SM_ax: the inverse is even cooler
13:34 mauke bless a function
13:34 Corion gaal: BTW, I wonder why hIsTerminalDevice is not working, and I also wonder why GetFileType (in the Win32 API) isn't working either ...
13:35 gaal could be simply a bug in ghc...
13:35 gaal well - duh :)
13:35 gaal i mean it sin't necessarily our fault.
13:35 Corion gaal: Yeah - I haven't found an implementation of hIsTerminalDevice that didn't rely on POSIX stuff I couldn't trace.
13:37 adamc00 has joined #perl6
13:37 SM_ax mauke, yep, thats cool too :)
13:40 Juerd iblech: No
13:42 adehohum has joined #perl6
13:49 SM_ax has quit IRC ("ChatZilla 0.9.61 [Mozilla rv:1.7.7/20050420]")
13:54 ihb gaal: after reading http://groups-beta.google.com/group/perl.pe​rl6.language/browse_thread/thread/1ed77c281​581466c/bd9eb275d5da2eda#bd9eb275d5da2eda i see why it could be nice to have reduce as an operator like that.
13:56 ihb can +<< ever be a binop?
13:56 gaal ihb, see damian's last post to p6-l, it has wonderful examples too.
13:57 gaal [email@hidden.address]
13:58 gaal http://www.nntp.perl.org/gro​up/perl.perl6.language/21173 here it is.
14:00 ihb how can reduce return a list?
14:00 gaal where does it?
14:01 ihb i don't get "@sumrows := [+<<] @rows"
14:01 ihb where [] is the reduce op.
14:01 gaal hmmm yes. dunno
14:01 ihb that looks like it should be just @sumrows := @rows.map{+<<} or however you write that in P6
14:02 ihb it's in Larry's post i gave you the url to.
14:03 gaal yes, saw it now. puzzling.
14:04 ihb it's very puzzling given "I propose that reduce become a metaoperator that can be applied to
14:04 ihb any binary operator
14:04 ihb "
14:04 ihb sorry for the unintented newline.
14:10 adamc00 has quit IRC ("Chatzilla 0.9.68a [Firefox 1.0.4/20050511]")
14:12 ihb is (!0) < 3 true?
14:14 Juerd Yes
14:15 ihb what about 3 < (!0)?
14:15 ihb or more straight to the point, how does < et al interact with bools?
14:16 Juerd < is for numbers
14:16 iblech I think they get converted to numbers
14:16 Juerd So both sides are evaluated as numbers.
14:17 Juerd This is no different than in Perl 5
14:20 ihb i'm thinking about (1 < 2) < 3 vs 1 < (2 < 3) vs 1 < 2 < 3
14:21 ihb they're different, since the last is just one operator, but do magic play tricks on the first two?
14:30 integral shouldn't do, surely?
14:35 ihb it's interesting that [<] (1,2,3) really will become 1 < 2 < 3
14:46 Juerd It's just join() on syntax level
14:48 ihb doesn't join iterate, like List::Util::reduce does now?
14:49 integral perl5 doesn't have the idea of chaining operators though...
14:49 ihb i mean that [<] (1,2,3,4) won't be ((1 < 2) < 3) < 4, but 4-ary <.
14:49 ihb integral: that's why i find it interesting :-)
14:50 Juerd Note by the way that no parens are needed with [<]
14:50 Juerd It's a list op, just like print and reverse
14:52 ihb Juerd: I get the feeling stuff like that change every week :-)
14:53 svnbot6 r3216, corion++ | Instance methods now seem to work
14:53 svnbot6 r3217, corion++ | Merged pugsbugs/next.t with statements/next.t
14:53 svnbot6 r3218, corion++ | Multi dispatch seems to work for numeric types now
14:55 ihb in Perl 6, can I write a "something" that would make Perl warn if i do "for @foo -> $foo { print $_ }", i.e. warn if i use $_ which comes from a topic outside a construct that by default uses $_ at topic?
14:56 ihb does that make sense to you?
14:56 wolverian I thought $_ is always aliased.
14:56 ihb oh, i didn't know that. so $foo and $_ is the same there?
14:56 wolverian I _think_ so. :)
14:56 Juerd Yes.
14:56 ihb ah. nevermind then.
14:57 eric256__ has joined #perl6
14:57 wolverian I guess 'but' can be a list op too.
14:57 ihb i find that interesting too, considering people have wanted to have an index variable inside foreach loops for a long time, but that has been rejected with "unnecessary to use an extra variable" :-)
14:58 ihb (i'm talking P5 now)
14:59 eric256__ hey ihb...did you ever figure out the [>>+<<] ?  i never did find it in any docs or anything (the reducing [ ] that is)
15:00 ihb eric256__: no.
15:01 eric256__ my daughter is crying in her crib, and when i go in there she throws herself down and pretends to sleep, i think she is hoping mom will come get her. funniest thing though
15:07 wolverian hmm. why are people saying \%hash in the metaoperator thread? does %hash flatten now? I thought that was a perl5ism.
15:08 svnbot6 r3219, corion++ | More tests moved around to put them in the 'right' directories
15:10 jez eris: wow.. you need to bond with her more??
15:11 eric256__ she is just at a phase where she wants her mom. the third time she let me pick her up.
15:11 eric256__ any ideas why it cant find the Test module now?
15:14 gaal eric, set PERL6LIB ext/Test/lib
15:14 eric256__ did that just change?
15:14 gaal nope
15:14 gaal did you start a new shell?
15:15 eric256__ nope.  it worked fine yestarday. and it worked fine on another computer...odd
15:15 adehohum eric, I never used to have to do that either (I think...) but I do now too
15:21 ihb wolverian: that depends on the context, doesn't it?
15:22 ihb wolverian: the metaop is [] LIST so there %hash would flatten. (perhaps?)
15:24 * Juerd taped an external harddrive to his laptop screen
15:24 Juerd Finally, RAID 1.
15:25 gaal juerd, your last message is trimmed.
15:25 gaal * to p6-l
15:25 Juerd Which is that, I just sent one a second before saying something here
15:25 Juerd And trimmed how?
15:25 gaal re:reduce. "so imagine that you have" - and then it ends.
15:26 Juerd Oh, hm
15:26 Juerd How did that happen
15:26 gaal obviously, it was reduced. :)
15:26 eric256__ whats the URL for the mailing list archive?
15:26 gaal it doesn't really end - there's the sig afterwards.  otherwise i'd suspect a lone dot.
15:27 svnbot6 r3220, corion++ | Instance methods now seem to work
15:27 gaal http://dev.perl.org/perl6/lists/
15:27 Juerd gaal: lone dots are usually handled correctly.
15:27 eric256__ gracias
15:27 gaal and click on 'archive' from there
15:27 Juerd gaal: By escaping them as >.
15:27 gaal Juerd, sure. except when they aren't.
15:27 Juerd gaal: And that as >>., until RFC 822 message length limit is reached
15:27 gaal mutt up to maybe 1.20 may still have sucked that way.
15:27 Juerd I'm using mutt 1.5.6
15:28 gaal it isn't the problem here, obiously
15:28 gaal but who knows, maybe the problem's still there regardless.
15:28 Juerd 1.5.9 in a few seconds
15:28 Juerd Just to be sure :)
15:28 Juerd debian++
15:28 gaal indeed
15:28 Juerd Now my hands really hurt and I must quit
15:28 Juerd Bye.
15:29 gaal bye.
15:29 lightstep has joined #perl6
15:32 madhouse has joined #perl6
15:39 elmex has quit IRC ("leaving")
15:56 adehohum my @list = 1..5; my @result = map { my $fullpath = "fish/$_"; $fullpath; } @list; print @result.perl;
15:56 adehohum  prints ['fish/', 'fish/', 'fish/', 'fish/', 'fish/']. The $_ doesn't get used. Any ideas why?
15:56 Shachaf has joined #perl6
15:59 wolverian ihb: I thought %hash stays a hash in list context, as @array stays an array.
16:00 wolverian or do arrays flatten in plural context?
16:01 simcop2387 has joined #perl6
16:04 wolverian oh, wait, the [] op explicitly flattens its arguments, to make [+] @foo work. right.
16:04 wolverian sorry. :)
16:15 Juerd It's not [] that flattens
16:15 Juerd It's just that its RHS is in list context, which flattens
16:17 eric256__ juerd: is [] documented somwhere or just on the mailing list?
16:19 Juerd If it's not in S03, then it's probably not specced out yet
16:21 wolverian Juerd: you mean like in perl5? I thought perl6 had changed that.
16:24 Juerd Please, let me know what you're referring to
16:24 Juerd I'm in too many places and talking to too many people to keep track of all that
16:24 Juerd Oh
16:25 Juerd Nevermind that - I thought you said "what do you mean, 'like in perl5'?"
16:25 Juerd But you were referring to the flattening
16:26 Juerd wolverian: Yes, arrays and hashes in list context, evaluate to their arguments, and lists still flatten: there still are no lists of lists.
16:26 Juerd s/arguments/elements/
16:26 Juerd The most important difference is that hashes now listify as a list of pairs, rather than zip(.keys, .values)
16:27 Juerd wolverian: The change from 5 to 6 is that scalar(%foo) is now \%foo, and scalar(@bar) is now \@bar
16:27 wolverian Juerd: hmm. okay.
16:27 Juerd wolverian: And that you can use $foo instead of @$foo wherever only an array is valid (scalar Array context)
16:28 Juerd And of course, that you can use $foo instead of %$bar in the scalar Hash context
16:28 wolverian use singular and plural, or something. scalar array context is just confusing. :)
16:28 Juerd Or, perhaps, it's better explained as: %foo is automatically referenced in Hash context
16:28 Juerd And automatically dereferenced again if the signature contains a % sigil
16:28 Juerd wolverian: singular array context then
16:29 Juerd wolverian: scalar --> reference --> Array
16:31 wolverian sure. thanks for explaining.
16:32 Juerd      Scalar(singular, item)       List(plural, slurpy)         Void
16:32 Juerd        |                            |
16:32 Juerd +----+----+-----+                Same tree
16:32 Juerd |    |    |     |           (for each element)
16:32 Juerd Str  Num  Bool  Ref
16:32 Juerd                |||
16:32 Juerd                ||+- Hash
16:32 Juerd                |+-- Array
16:32 Juerd                +--- Junction
16:32 Juerd                Or any other type (HTML::Parser, Bool)
16:32 Juerd Hope that's clear enough.
16:33 Juerd (Under Num, there are Int and such)
16:41 adehohum How do I get pugs to generate IMC? % pugs -CParrot crashes.pl
16:41 adehohum pugs: cannot cast from VError "fnord" (NonTerm (MkPos "crashes.pl" 1 1 1 1)) to [Char]
16:41 Juerd -BParrot
16:41 Juerd But many things are not yet implemented for parrot
16:41 Juerd Like, eh, hashes.
16:43 adehohum says the same. Right ho. I'm getting a null pointer dereference somewhere in the parrot source code, I was hoping to compile my Perl6 into PIR before sending it to perl6-internals
16:45 * integral ponders Larry's reply to his thread
16:54 eric256__ has left
16:59 wolverian Juerd: thanks!
16:59 wolverian Juerd: have you put that down in the quickref or some other doc?
17:02 wilx has quit IRC (Remote closed the connection)
17:06 Corion has quit IRC ("Chatzilla 0.9.68a [Firefox 1.0.4/20050511]")
17:07 iblech has quit IRC ("going home &")
17:09 crysflame has joined #perl6
17:15 jez hmm
17:15 jez does $abc = @bar give you a reference to bar, or its cardinality?
17:16 wolverian reference.
17:16 wolverian cardinality?
17:16 jez count of elements
17:16 elmex has joined #perl6
17:16 wolverian right. no, perl6 doesn't do that. use numeric context (+@bar) or @bar.elems for that.
17:16 jez .elems, heh
17:17 jez that's a ...property?
17:17 wolverian yes. which is accessed via a method call.
17:17 jez not sure i like a regular variable having properties.  that's starting to look ugly like Java.
17:17 wolverian regular variable? everything is an object.
17:17 jez i'd way prefer elems(@bar)
17:18 jez in Perl 6, maybe.  shame.  i don't like everything being an object.
17:18 wolverian you can pretend they aren't. elems(@bar) works. the dispatcher falls back to finding a method with the appropriate name as a last resort.
17:18 adehohum elems(@bar) works fine
17:19 jez it is still procedural though :-)
17:20 jez wouldnt want it to start needing theProgram = new myProgram; or anything :-)
17:20 adehohum Is it OK to submit rules tests into pugs, or should they go into the Disabled folder like all the Perl6::Rules tests?
17:21 wolverian jez: that happens implicitly. :)
17:22 jez also i wouldn't want
17:22 jez myClass $foo; $foo = new myClass;
17:22 jez always hated that redundancy
17:22 jez :-\
17:23 wolverian my Foo $bar .= new;
17:23 wolverian (my Foo $bar = Foo.new;)
17:23 jez um
17:23 jez you have to define the type of a variable explicitly?
17:23 wolverian no, but you can.
17:23 jez becausr that's hideous, and Perl really ought to try and avoid that, i thought it was about ease of use
17:24 wolverian didn't you read the apocalypses or the exegeses, at least, on dev.perl.org/perl6? it works better than trolling here.
17:24 jez im gonna
17:24 wolverian good. :)
17:24 jez when ive finished my perl5 program
17:24 jez :-)
17:31 autrijus adehohum: the "my $fullpath" inside the block somehow killed the $_ in pad.
17:31 autrijus adehohum: that's a bug. commit a test?
17:31 autrijus (it works fine if you declare $fullpath outside the block)
17:32 lightstep has quit IRC ("too high a resolution")
17:32 autrijus adehohum: and feel free to commit rules tests as long as you can figure out a way to let it skip when parrot's not there
17:33 autrijus probably by first trying to match 1 ~~ /1/ under eval.
17:33 autrijus that'd be delightful -- then we can move the rest of Disabled/ out.
17:34 autrijus hm. we probably want Pugs.Embed.Parrot to, under external parrot mode, reuse the same parrot process for lots of rules
17:34 autrijus otherwise testing 1000 rules means spawning 1000 processes
17:34 autrijus not fun
17:34 autrijus but please go ahead and commit rule tests under a skip() regime
17:34 adehohum hi autrijus, just commited a test for the bug anyway, and put the rules test into Disabled. I'll think about a way to disable rules tests, but the other prob is that pugs (specifically parrot) segfaults a lot when rules are around... is it acceptable for tests to segfault?
17:36 autrijus hm. maybe what I'll do is just test for syntax-level rules supoprt
17:36 autrijus i.e. the availability of $/ $0 .from etc
17:36 autrijus and move all real rules tests to PGE
17:36 autrijus somehow I think that's a better idea.
17:36 autrijus that way we don't segfault when we don't need to.
17:37 gaal heh, i wonder if this qualifies as a rule 2 invocation. http://perlmonks.org/?node_id=456990
17:37 autrijus but please commit ahead -- I'll move en masse to parrot tree
17:37 svnbot6 r3221, adehohum++ | Tests: rules on non-strings, map with several operations
17:37 autrijus gaal: yes, that is. congrats!
17:37 autrijus pugs is trigerring a continuous flow of rule 2s.
17:38 autrijus larry++ # [] is the NoCat metaoperator
17:38 PerlJam has joined #perl6
17:38 gaal heh :) i think jsd's suggestion for fixage makes sense, if indeed the compiler can offer a helpful message.
17:38 eric256__ has joined #perl6
17:39 autrijus but sometimes, you don't know it's a junction until runtime
17:39 gaal oi
17:39 autrijus my $f = eval '1|2'; if (3 !~ $f) {}
17:40 gaal true.
17:40 autrijus so the burden is on the !~
17:40 autrijus but this problem is less acute for me
17:40 autrijus <- not a native english speaker :)
17:40 gaal but in that case there's no good thing to do
17:40 gaal if, that is, at compile time we rejected such things
17:41 autrijus then on runtime it can still be the same fatal exception etc.
17:41 gaal TBH it wasn't such a problem for me either, since *logic* isn't my native language.
17:41 autrijus we'll see.
17:41 autrijus heh. point
17:42 gaal with a little effort you can find many things that look like english and do something else in Perl
17:42 gaal it's just that this example is, well, more surprising i guess.
17:44 PerlJam gaal: The difference is in if you put more weight on dwimmery or perl6's regularity.  Having ($a != $junc) mean not($a == $junc) is more dwimmery but breaks a little regularity.
17:45 PerlJam I tend to prefer regularity in this case.
17:45 autrijus er, PerlJam.
17:45 autrijus $a != all(3,4,5)
17:45 autrijus should prolly not be lifted to not($a == all(3,4,5))
17:46 PerlJam heh, another good point!
17:47 autrijus so we're in vehement agreement
17:47 PerlJam yep.
17:47 wilx has joined #perl6
17:48 gaal autrijus, what cat is it that [] is devoid of?
17:50 autrijus On Sat, May 14, 2005 at 10:53:38PM +0800, Autrijus Tang wrote:
17:50 autrijus : Hey.  Does this mean that the [] metaoperator folds with the
17:50 autrijus : associativity of the operator inside it?
17:50 autrijus Yes.  It's as if there is a long cat, only without the cat.
17:51 autrijus # http://www.nntp.perl.org/gro​up/perl.perl6.language/21186
17:51 gaal yes, i read the mail... but i think i missed the reference.
17:51 gaal unix cat?
17:51 autrijus "You see, wire telegraph is a kind of a very, very long cat. You pull his tail in New York and his head is meowing in Los Angeles. Do you understand this? And radio operates exactly the same way: you send signals here, they receive them there. The only difference is that there is no cat.
17:51 autrijus --Albert Einstein, when asked to describe radio"
17:51 autrijus larry was punning with the unix cat, yes.
17:51 gaal ah ah ah ah!
17:52 autrijus very punny.
17:52 svnbot6 r3222, Stevan++ | Set - checking this works for iblech, adding my name to the AUTHORS and taking responsibility for the ugly hacks :)
17:52 eric256__ i think they mean that [+] 1,2,3 - literaly becomes 1 + 2 + 3 and then the operator behaves as if writtenn that way...or is it (1 + 2) + 3
17:52 * eric256__ thinks he answered the wrong question...lol
17:53 autrijus eric256__: the former.
17:53 autrijus [<] 1,2,3; # means 1<2<3
17:53 autrijus not (1<2)<3, not 1<(2<3), but 1<2<3.
17:54 eric256__ then [>>+<<] ([1..3],[1..3],[1..3]) shoulw become [1..3] >>+<< [1..3] >>+<< [1..3]   right?
17:54 PerlJam (long invisible massless cats)++
17:54 autrijus eric256__: right.
17:54 gaal i rather like my long massive cat
17:54 autrijus [Y] @a,@b,@c; # becomes @a Y @b Y @c
17:54 autrijus and so on and so forth.
17:54 eric256__ just checking because we were playing with that last night and it wasn't working in pugs
17:55 PerlJam I wonder if perl will get composers next.
17:55 eric256__ but i didn't want to right tests for the wrong behaviour ;)
17:55 autrijus eric256__: because I wasn't even sure how to implement that :)
17:55 autrijus eric256__: right! so you can write test now. go forth and test :)
17:56 autrijus PerlJam: you are certainly free to define one.
17:56 eric256__ i was going to start a reduce.t .. that is what the [] is being called right?
17:56 autrijus eric256__: yes
17:56 autrijus for the record, I think the infix . can still work :)
17:56 gaal what, everyboty wants the Bach?
17:56 autrijus (&x . &y)(@args);
17:56 larsen has quit IRC ("later")
17:57 eric256__ infix . can work as what?
17:57 autrijus but maybe it's too confusing. in that case the unicode composition operator, with ascii fallback as "o", maybe
17:57 autrijus eric256__: function composition
17:57 autrijus (&x o &y)(@args); # equivalent to &x(&y(@args))
17:57 gaal are there any features left in haskell that aren't there in perl6? :)
17:58 autrijus gaal: lots and lots of :)
17:58 autrijus gaal: roll-your-own infix
17:58 gaal `f` you mean?
17:58 autrijus prefect with []
17:58 autrijus aye
17:58 autrijus &block `map` @list;
17:59 autrijus I don't think it makes sense in perl6 though. :)
17:59 gaal we have @list:map{block} though :)
17:59 autrijus @list.map:{}
17:59 autrijus but yes.
18:00 autrijus perl 6 syntax is actually much more regular than perl5
18:00 autrijus but that is really not saying much :)
18:07 elmex autrijus: do you know why the there has to be a special syntax to call a method on the current invocant? i mean, in C++ you just call it with method () ...
18:07 stevan elmex: C++ is a much more static language than perl6
18:08 elmex stevan: that is not a reason why it's not possible in perl6
18:08 PerlJam elmex: As larry says, it's better to know whether you're calling a method or an ordinary subroutine by just looking at the call
18:08 wolverian elmex: larry wants one to be able to see what is a method call and what is a function call
18:08 gaal stevan! hi
18:08 wolverian as PerlJam said. :)
18:08 stevan gaal: hullo
18:09 elmex well.. then... okay... go on, find a nice syntax for it :) i would like method() :-)
18:09 * PerlJam is perfectly happy with .method() always operating on the current topic
18:10 * elmex would like: %$#CURRENT_OBJECT->{{{method-name}}}->with_args ([ ... ])
18:10 autrijus PerlJam: I have this sinking feeling that $?SELF will appear a lot.
18:10 autrijus which, to think about it, may not be a bad thing.
18:11 PerlJam autrijus: surely people will opt to make the invocant the topic first (or use a short invocant name like $o)
18:11 eric256__ you can always do given ($?SELF) { .method; } if you have a bunch
18:11 elmex $?SELF would suck quite much. it's like the language screams into your face "I DO NOW SOMETHING WITH SELF"
18:11 autrijus PerlJam: yeah. the current cultural name is $self
18:11 * PerlJam uses $o rather than $self
18:11 autrijus in p5 code?
18:12 PerlJam yep
18:12 autrijus cool. that's a good case for timtowtdi.
18:12 svnbot6 r3223, eric256++ | Starting tests for reduce...many more probably needed.
18:12 eric256__ and you can always do method test ($self: ) if you know you will need it alot. after reading larry's email i think . on $_ makes alot of sense.
18:12 Aankhen`` What about -> $?SELF { .method; }?
18:12 autrijus eric256__: it will make even more sense, if the attributes are not $.attr.
18:12 Aankhen`` Er.
18:12 autrijus the dot in $.attr is unfortunate
18:12 Aankhen`` $_ -> $?SELF { .method; }.
18:12 PerlJam autrijus: indeed
18:13 eric256__ yea i'm not sure i like $. being so much different than .
18:13 PerlJam Aankhen``: if you're going through that much trouble, why not just name the invocant $_  ?
18:13 autrijus personally I'd much rather all attributes are $:attr
18:13 Aankhen`` I was actually curious about whether that would work...
18:13 Aankhen`` (the way I mentioned)
18:13 autrijus and accessor generations are controlled by traits.
18:14 wolverian autrijus: you could always propose it on p6l.
18:14 PerlJam autrijus: public/private is a useful thing to encode in hungarian
18:14 eric256__ well there is my part for the day....some tests for [].....now if we only had documentation on it... ;0
18:14 Boogie has joined #perl6
18:15 eric256__ has $:var is pubic rw;
18:15 autrijus PerlJam: in that case... $:foo $|foo maybe ;)
18:15 Aankhen`` Hrm...
18:15 Aankhen`` gaal's suggestion didn't work...
18:15 autrijus the point being it's really the false consistency caused by $.foo syntax that is giving us (at least me) headaches.
18:15 Aankhen`` http://sial.org/pbot/10121
18:16 Aankhen`` Anyone got any ideas?
18:16 autrijus Aankhen``: have you run vcvars32?
18:16 autrijus oh wait.
18:16 eric256__ me to autrijus...someone last night was saying to to let it through me off. but if it looks the same, people are going to think it is the same, if it is this different it will be the source of lots of issues
18:16 autrijus ghc uses mingw
18:17 autrijus and you built parrot with vc++
18:17 Aankhen`` I have the environment variables set up correctly for MSVC.
18:17 autrijus there is no compat
18:17 Aankhen`` Yeah.
18:17 Aankhen`` Ahh...
18:17 autrijus so you either need to install msys and build parrot with it
18:17 autrijus or somehow convince ghc to build with msvc
18:17 Aankhen`` OK.
18:17 autrijus sorry for the trouble :)
18:17 Aankhen`` Nah.
18:17 Aankhen`` My development environment is sorta messed up.
18:18 Aankhen`` I first installed DJGPP a long time back.
18:18 Aankhen`` Then I installed MingW after a while.
18:18 Aankhen`` And (relatively) recently installed MSVC.
18:19 autrijus but, anyway. as interesting as punctuations are, I don't think it's wise to dwell on them too long... I got my answer and that is $?SELF or explicit inv for now.
18:19 revdiablo has joined #perl6
18:19 autrijus I'd much rather leaving @Larry more time to figure out the missing Tier-1 synopses.
18:19 PerlJam autrijus++ yep. you have the wisdom of it.  :)
18:19 autrijus # http://svn.perl.org/perl6/doc​/trunk/plans/design_docs.pod
18:21 wolverian dammit. can't I pipe docs into perldoc?
18:21 wolverian (GET ... | perldoc)
18:21 wolverian wrong channel to ask this, I guess. :)
18:21 autrijus | to pod2man or something?
18:21 wolverian hmm. yeah.
18:21 autrijus to pod2html and to w3m
18:21 autrijus (that's how I prefer it) :)
18:23 wolverian I need to create an alias for that.
18:23 wolverian s,alias,function,
18:23 autrijus or write a simple ~/bin/podview using #!/usr/bin/pugs
18:24 stevan ext/Pod-Event-Parser/scripts/pod2html.p6 works :)
18:27 wolverian autrijus: is io() implemented yet?
18:28 gaal heh
18:28 svnbot6 r3224, autrijus++ | * add caveats for GCC 4.0 users
18:28 svnbot6 r3225, autrijus++ | * add PerlJam's nick to AUTHORS
18:28 gaal that's probably the densest character-to-spec builtin.
18:28 wolverian yes :)
18:29 gaal wolverian: good luck getting open specced first :(
18:29 * eric256__ is sad to see his name isn't included in AUTHORs ;)
18:29 chady has joined #perl6
18:29 gaal eric256__, please add yourself
18:31 gaal go ahead don't be shy, most people do it :)
18:32 eric256__ hmmm....or i had an old version.
18:35 wolverian is the spec still mandating named params to come after mandatory arguments?
18:35 svnbot6 r3226, eric256++ | Added myself....nope i'm not shy
18:35 gaal i believe so, because otherwise how do you pass args by order?
18:36 wolverian hmm. I don't know. I just want to write 'open :rw "foo.txt"' instead of 'open "foo.txt", :rw'
18:37 eric256__ is open even available? ;)
18:37 gaal larry sugested a version of open that had @args in the end
18:38 gaal eric256__, there's an open we know we doin't like in pugs
18:38 gaal there's also an pipeOpen for a while
18:39 gaal but it's hidden with an ugly name because it's open3+pid, and openn (n>1) is dangerous
18:39 gaal also it isn't specced...
18:40 gaal wolverian: one nice thing about larry's suggestion was that in shell open / pipes etc, you can pass the args explicitly as a list
18:40 gaal but it wasn't a final word kind of thing.
18:41 gaal look for "Open and pipe" in p6-l
18:41 gaal i have to go.
18:41 wolverian thanks.
18:41 autrijus wolverian: zoning is currently not enforced iirc
18:41 gaal bye&
18:41 autrijus in pugs, that is
18:41 autrijus feel free to test
18:42 adehohum has quit IRC ("The computer fell asleep")
18:43 wolverian autrijus: seems to work, except 'foo :mode<rw> "bar"' dies horribly
18:43 autrijus k.
18:44 wolverian ah, it works with a ,
18:44 wolverian I'm not sure if you actually can omit the , there. probably not. ;)
18:44 autrijus ;)
18:44 autrijus ok, so pugs is currently zoneless. I guess zoning can be construed as todo.
18:45 autrijus but not going to worry about it without some demand :)
18:45 * eric256__ wonders if demanding class inheritance will get it done soon! ;)  j/k
18:46 chady has quit IRC (Read error: 60 (Operation timed out))
18:46 autrijus eric256__: which test is that?
18:46 autrijus also note I'm without my laptop... hopefully it will get repaired tomorrow
18:46 eric256__ :(
18:46 eric256__ lol
18:46 autrijus <- using a G3 ibook
18:47 eric256__ i thought about beefing up the oo tests but right now i'm playing with the life.p6 which looks like c code right now
18:47 autrijus right. please go ahead p6izing it
18:48 eric256__ does the ; list of lists ....thingy.....work?
18:49 autrijus don't think so. grep for a test and add one if it's not there?
18:51 eric256__ hmm i need to go look up multidiminsional arrays anyway
18:51 svnbot6 r3227, iblech++ | * EOLs at EOFs.
18:51 svnbot6 r3227, iblech++ | * Usual svn properties added to t/.
18:51 svnbot6 r3228, iblech++ | * Merged t/operators/reduce.t into t/builtins/lists/reduce.t.
18:51 svnbot6 r3228, iblech++ | * Added some more tests, mainly from Damian's mail on p6l, to reduce.t.
18:51 svnbot6 r3229, iblech++ | Oops, forget to remove old t/operators/reduce.t.
18:52 eric256__ there was a reduce test!  why in builtins instead of operators?
18:52 autrijus please boldly use "svn mv".
18:52 autrijus (I don't know. ask iblech?)
18:53 autrijus maybe it's testing the "reduce" primitive
18:53 iblech has joined #perl6
18:53 autrijus not the [] metaoperator
18:53 autrijus in that case it's fitting as builtins/
18:53 autrijus hey iblech from the ipv6 land.
18:53 iblech hi :) When I started reduce.t, there was no [...] metaoperator, so builtins/list
18:54 eric256__ ahh cool. i just didn't look there. ;)
18:54 eric256__ off to lunch
18:54 eric256__ later
18:54 iblech grep -wr "..." t/ is very useful :)
18:55 eric256__ yea i'lll have to install cgywin or something to get grep cause windows find sucks
18:58 Aankhen`` Argh.
18:59 Aankhen`` I'm at 98% of the MingW download and now it's not downloading. :-\
19:03 Aankhen`` Why do all the SourceForge servers redirect to prdownloads.sourceforge.net? :-S
19:10 Khisanth why not? :)
19:12 Boogie_ has joined #perl6
19:12 Boogie has quit IRC (Connection timed out)
19:12 Boogie_ is now known as Boogie
19:16 svnbot6 r3230, iblech++ | Net::IRC now uses the excellent Set module.
19:16 svnbot6 r3231, iblech++ | Moved debugging messages around (to work around the "$/ (and thus $0, etc.) is
19:16 svnbot6 r3231, iblech++ | not lexical" bug).
19:29 svnbot6 r3232, autrijus++ | * more nickification
19:29 crysflame heh
19:29 crysflame the bot karmas people
19:29 crysflame that's hilarious
19:29 crysflame Aankhen``: there's a firefox greasemonkey extension to fix that
19:36 Aankhen`` I'm using GetRight, and every single server seems to redirect to mesh.dl.sourceforge.net.
19:36 * Aankhen`` sighs.
19:36 Aankhen`` In all this time I could have downloaded it atleast three or four times.
19:38 Aankhen`` Net::IRC seems to be dead.
19:39 Aankhen`` Atleast, the SF project is dead.
19:39 iblech Yeah, many people use (in Perl 5) POE::Component::IRC instead.
19:39 integral no one's ported POE yet?
19:40 iblech As far as I know, no.
19:40 Aankhen`` Would using POE::Component::IRC have learning to use the entire POE framework as a prerequisite?
19:42 integral there's not that much to learn,  just the idea of sessions, and event passing
19:42 Aankhen`` Hrm.
19:42 Aankhen`` OK.
19:42 Aankhen`` I guess I might as well go with that.
19:51 Aankhen`` Arrgh... now MingW is stuck at 10.48 of 14.51 MB.
19:52 crysflame Aank: there's useful POE IRC bot examples that are very simple to read, at least
19:53 dngor has joined #perl6
19:55 dngor has left
20:05 wilx has quit IRC (Read error: 131 (Connection reset by peer))
20:05 * integral wishes Larry had answered the sub foo{my$a;BEGIN{$a=123}} issue properly
20:14 PerlJam Isn't Larry's answer by definition proper?  ;)
20:16 integral true ;-)
20:17 integral but answering the question would be nice :-)
20:18 PerlJam Larry never answers questions he doesn't have the answer to.  He likes to leave wiggle room when he has a 95% answer in case he decides to change his mind.
20:18 integral ughh :-)   It's the kind of question that would really help tidy up pugs internals though
20:19 autrijus integral: it's safe to assume Perl 5 semantic for now :)
20:19 integral yeah, but they're not nice! :-P
20:19 autrijus they are not static.
20:19 autrijus Perl has this weird tradition of the program negotiating with the compiler :)
20:20 autrijus it's going to be very interesting, when separatre compilation is norm, whether people will learn to use INIT {} instead of accidentally killed by BEGIN {}.
20:20 PerlJam programming is all about various forms of negotiation
20:20 autrijus PerlJam: right, but not many language put negotiation to the compile time. :)
20:20 * autrijus mumbles the taboo words of Source Filters
20:21 autrijus the fact you can do
20:22 PerlJam compile time is just another run time that happens earlier than programmers typically expect ;)
20:22 autrijus BEGIN { eval " BEGIN { eval ' BEGIN { ... } ' " }
20:22 autrijus }
20:22 autrijus is quite something :)
20:22 autrijus it's like lisp, only without the elegance...
20:23 autrijus ...or the syntax checks
20:23 crysflame wow
20:23 crysflame three layer BEGIN
20:24 Aankhen`` has quit IRC ("2400 Baud makes you want to get out and push [Time wasted online: 7hrs 45mins 34secs]")
20:25 PerlJam #3 in Damian's uses-for-reduces is sure getting a lot of play today.
20:28 justatheory has joined #perl6
20:32 autrijus g'night folks :)
20:33 * autrijus going to read some more HOP and sleep
20:33 crysflame HOP++
20:35 justatheory has quit IRC ()
20:36 justatheory has joined #perl6
20:37 justatheory has quit IRC (Client Quit)
20:38 pjcj ah, so autrijus studies while he sleeps
20:38 svnbot6 r3233, iblech++ | Fixed version_h.pl (when using SVN).
20:38 pjcj osmosis++
20:39 justatheory has joined #perl6
20:45 justatheory has quit IRC ()
20:50 svnbot6 r3234, iblech++ | Parrot is now include in the Pugs Live CD, too. :)
20:50 svnbot6 r3234, iblech++ | Note that this is still a bit kludgy.
20:58 iblech has quit IRC ("sleep rocks &")
21:03 amahabal has quit IRC ("Leaving")
21:03 amahabal has joined #perl6
21:05 Juerd wolverian: No. If you want to put it there, be my guest.
21:05 Juerd wolverian: I just drew it to put it on irc.
21:05 Juerd wolverian: (re context diagram)
21:08 BChrisB has joined #perl6
21:12 justatheory has joined #perl6
21:12 justatheory has quit IRC (Client Quit)
21:14 madhouse has quit IRC ()
21:17 verbatim has joined #perl6
21:18 Juerd eric256__: In response to what you said that was quoted in autrijus's journal: .foo is defaulting to something, $.foo is not.
21:18 Juerd eric256__: $.foo is, syntactically, just a declared variable
21:19 Juerd eric256__: It doesn't default to the current invocant, it is bound to it, in such a way that it is impossible even to use the same or even similar syntax to access another objects $.foo
21:20 Juerd eric256__: In my opinion, the secondary sigil does more harm than good.
21:21 Juerd eric256__: Also, every time you consider $.foo, consider $:foo as well. If you would want .method to work on $?SELF, then you have a problem with :method, which is actually written as something.:method instead
21:21 Juerd (Another inconsistency that I do not like)
21:21 Juerd And to make matters worse, we now have a very un-perlish indicator of scope in variable names.
21:22 eric256__ loops are for (-1...1) -> $x_off {
21:22 Juerd Where scope in this case refers to where something can be accessed from
21:24 eric256__ i don't want . to be $?SELF ... i just think that having .method be $_.method and $.attribute be $?SELF.attribute is confusing.  i have been convinced thought that we don't realy need a shortcut to $?SELF...but if we do then the method and attribute shortcuts (or binding) to be similar and not different
21:24 Juerd eric256__: Again, a method call and a variable are not the same thing :)
21:25 Juerd eric256__: They don't have to be similar. I hate the . in $.foo.
21:25 eric256__ no they aren't i'm not saying they are. but if both forms access the current $?SELF then it would make more sense if they used similar forms....so that they do what you think they will intuitivly
21:26 Juerd One thing that does mislead almost everyone who isn't paying attention, is that "has $.foo" also declares the method "foo".
21:26 eric256__ personaly i think that $.foo should probably be changed to match whatever $?SELF shortcut/binding
21:26 Juerd (Another reason for not using that dot!)
21:26 Juerd eric256__: The thing is, you can call a method from anywhere
21:26 Juerd eric256__: You can't access a $.foo variable from anywhere
21:26 eric256__ has $foo is public is rw;  #something along those lines, though more verbose, would probably make it clearer
21:26 Juerd eric256__: $?SELF.foo outside a method makes no sense at all, while methods are called from outside methods all the time.
21:27 Juerd eric256__: Oh, public and rw are good defaults.
21:27 eric256__ wihtout prior knowledge thought $.attribute inside a method looksl ike you are are calling the accessor method, not directly accessing the attribute
21:27 Juerd eric256__: "has $foo" versus "has $foo is private" and "has $foo is public but ro" would work for me
21:28 Juerd eric256__: Then you managed to entirely miss the entire point of prefixed sigils.
21:28 wolverian isn't that "is public is ro"?
21:28 Juerd eric256__: If $anything doesn't immediately, from the very first character on, says "this is variable" to you, then for all you ought to care, it could be written as "foo$" or just "foo"
21:28 eric256__ trust me. i missed alot. but most people are going to because there is plenty to miss
21:29 Juerd A secondary sigil should not change the significance of the primary. And it never does.
21:29 eric256__ hmm. maybe that is the peice of the puzzle i missed. that does make everything make more sense...
21:29 eric256__ i was thinking allong the
21:29 eric256__ arg
21:29 eric256__   .method
21:29 eric256__  $.attribute line
21:30 Juerd eric256__: Yes, people miss things. But making things inconsistent isn't the way to make sure they don't. That's what PHP does: you have to learn every part of the language from scratch. In Perl, if you know some parts, you can often safely guess others. Sigils are important for that, as is defaulting to $_, which is a universal feature throughout the language, and has been since version 1.
21:30 Juerd eric256__: Parse from left to right, always :)
21:30 eric256__ arg. i'll get this to line up yet
21:30 eric256__ i was thinking:  .method
21:30 eric256__                $.attribute
21:30 eric256__ while realy it should be
21:30 eric256__    .method
21:30 eric256__    $.attribute....
21:31 Juerd It was lined up the first time you tried :)
21:31 Juerd And yes, that is the basic fundamental difference
21:31 eric256__ lol. on my screen it still isn't lined up...does that explain where i got lost. ;)
21:31 Juerd /^\./ versus /^\$/
21:31 Juerd /^\./ versus /^\$/
21:31 eric256__ exactly
21:32 Juerd If there were a secondary sigil, minus
21:32 Juerd Thus introducing variables of the form $-foo
21:32 Juerd Then would you expect -foo and $-foo to be similar in any way?
21:32 Juerd I think not
21:32 Juerd I wish I could explain why people do expect different things when it comes to the dot.
21:33 eric256__ nope. definitly not. i think the . secondary sigil is very confusing then.
21:33 Juerd But I have no idea. It's a fact that many people do indeed have different expectations for dots and colons (which is just two dots...)
21:33 PerlJam eric256__: What do you think about the : twigil?  Is it confusing too?
21:34 Juerd Likewise ?FOO and $?FOO are unrelated
21:34 PerlJam <?FOO> too
21:34 PerlJam :)
21:34 Juerd Perhaps what's so misleading (apparently) about the dot is that it has to do with object orientation in both the method call syntax and the attribute variable twigil.
21:35 eric256__ honestly it is all very confusing right now...but for the moment i have to go play prince of persia... back later ;)
21:35 Juerd eric256__: megahit.
21:35 eric256__ that is exactly what is confusing juerd
21:35 Juerd eric256__: This strengthens my belief that we shouldn't have a secondary sigil for attributes.
21:35 Juerd my $foo;
21:35 Juerd our $tfoo;
21:35 Juerd has $foo;  # consistency...
21:35 Juerd s/tfoo/foo/
21:35 Odin-LAP has $afoo;
21:36 Odin-LAP :D
21:36 Odin-LAP Oh, and don't forget state ... although that doesn't arise in the same context, of course.
21:36 eric256__ attribute access should be through $?SELF not something else.  my 2 cents. afk
21:37 Juerd eric256__: $.foo doesn't work through $?SELF.anything
21:37 Odin-LAP Attribute access should be through public methods, of course... ;)
21:37 Juerd eric256__: It's direct access, it's an alias to the actual variable inside the invocant
21:38 Juerd Odin-LAP: That's part of the OO ideology that does not apply well to Perl.
21:38 Juerd Odin-LAP: We can call subroutines when variables are accessed, and we can access what is returned by subroutines as variables
21:38 Odin-LAP Juerd: Not in the sense that it should be forced, of course...
21:39 Odin-LAP I mean, how would you write the accessors if you need to do something unusual otherwise?
21:39 Juerd Doing something unusual is wrong anyway
21:39 Juerd Keep it pure.
21:40 amahabal Juerd: I am missing the point about why autrijus and you do not like $.foo: does it boil down to "it is inconsistent", or is there more?
21:40 Juerd And if you have to do some maintenance, then just attach a sub to the variable's store method.
21:41 Odin-LAP Juerd: Hmmm. Good point.
21:41 PerlJam knowing the difference between instance attributes and non-instance attributes at a glance is a good thing.  We need twigils there.
21:41 Juerd amahabal: The twigil is not necessary, $.foo and $:foo are inconsistent with $obj.method and $obj.:method, and the dot makes people expect unreasonable things.
21:41 Juerd PerlJam: Why is knowing the difference between that important, but knowing the difference between globals and lexicals not?
21:42 Juerd PerlJam: Class attributes and instance attributes are OO's variants of global and lexical variables respectively.
21:42 PerlJam Juerd: oh, I think that's important too.  I'm just not sure convention is the right way to go with attributes.
21:42 wilx has joined #perl6
21:43 Juerd Perl doesn't have special sigils for scope.
21:43 Juerd Ruby does
21:43 Juerd And I hate it.
21:43 Juerd Scope or duration, that is.
21:43 amahabal juerd: But what about the visual distinctness of "my $foo" and "has $.bar". I love that I can tell a mere variable from an attribute so easily, as also a private vs public variable. O/w I'll have to keep track of these things.
21:43 Juerd I think the : for privates is acceptable. It's good documentation, and can map to the old _.
21:43 Juerd But the . should definitely go, for the reasons mentioned above.
21:44 Juerd amahabal: Private vs public is fine with me. But duration and scope shouldn't be reflected in the sigils
21:44 PerlJam I forget why we didn't just adopt the convention of leading underscore for privates to make _ a twigil.
21:44 Juerd amahabal: Or, alternatively, it should ALWAYS be reflected in the sigils, and we get something special for globals and lexicals too.
21:44 Juerd PerlJam: Because _ is \w and a valid first character for user defined identifiers
21:45 PerlJam Juerd: we do.  $*foo is global :-)
21:45 Juerd PerlJam: Sigh - $*foo is *special*, not just global.
21:45 Juerd The * doesn't indicate globality in our-sense.
21:45 integral hmm, a plain $foo also looks up $*foo and $?foo at the moment,  so does it also look for $.foo and $:foo ?
21:45 PerlJam Juerd: even if _ is \w, why can't we steal a leading _ from users?
21:46 Juerd PerlJam: Because history taught us that users have a hundred and one other handy uses for a non-alpha first character
21:46 Juerd PerlJam: And we have only one, and we can't really get more than that, because that'd severely limit possibilities elsewhere in the language.
21:46 integral hmm, shouldn't users also get $\d+ ?
21:47 Juerd integral: No, rule match variables.
21:47 * PerlJam occasionally wants - to be a valid identifier char
21:47 Juerd PerlJam: Can't be done without requiring whitespace for minus
21:47 wolverian I've always liked how lisp uses - :)
21:47 integral but \d is a valid \w char, so shouldn't users get \d for the same reason as _ ?
21:47 Juerd Which would make $foo+bar addition, but $foo-bar a single variable
21:47 PerlJam Juerd: look at all the whitespace disambiguation we have now!
21:48 Juerd (This is also the reason ^ isn't good)
21:48 Juerd PerlJam: Yes, but it's to disambiguate between different *operators.
21:48 Juerd PerlJam: There are only 3 operators that because they clash with identifiers need separation: x, xx and Y
21:48 Juerd s/\*operators/*operators*/
21:49 integral doesn't or count too?
21:49 Juerd integral: It makes parsing very hard if \d is allowed as the first character
21:49 integral only if somethings don't have sigils in front...]
21:49 Juerd integral: Because 15 is a number, and 0x123 is a number, and we don't want to look ahead here.
21:49 Juerd integral: And because of the match variables.
21:50 Juerd integral: This is a universal rule, and there are many good reasons for it. Some languages don't agree, but they tend to be rather inefficiently parsed :)
21:50 integral but we have sigils on variables,  you always know that after a sigil you ain't going to get a number
21:51 Juerd integral: Identifiers are a consistent thing throughout the language
21:51 * PerlJam wanders off to get some chinese food
21:51 integral maybe all identifiers should have sigils :-P
21:51 Juerd integral: And the same rules apply everywhere (except that things that can go in packages accept ::, naturally)
21:51 Juerd integral: That's another extreme.
21:52 Juerd integral: It's at all possible, if you don't mind going back to &foo()
21:52 * integral would have chosen . now
21:53 Juerd You meanie.
21:53 integral that'd make for fun corner cases :-)
21:54 Odin-LAP Heck, can't we use # for a sigil? THAT would be fun! :)
21:54 Odin-LAP (Oh, wait. It was used as a secondary one in Perl5, wasn't it?)
21:55 Juerd Odin-LAP: Yes.
21:55 integral scope based sigiling would be interesting, with $ for lexical, :: for package, * for global, . for instance, : for class
21:55 Juerd integral: global is duration, not scope.
21:55 Juerd integral: instance too
21:55 integral hmm, what's the difference?
21:56 Juerd Scope is always lexical, except for subs, they can be global.
21:56 integral *blink* eh?   dynamic scope isn't scope?
21:56 Juerd integral: Scope is where something can be accessed using the declared name.
21:56 Juerd integral: Duration is when the variable can actually exist.
21:56 Juerd integral: No, it's not :)
21:56 integral I was thinking more 'scope' === which symbol table you look it up in in the above
21:57 integral ah, so scope what's you use during compilation
21:57 Juerd Yes, scope really only exists at syntax level.
21:57 Juerd Everything else is duration.
21:57 Juerd In the simplest of cases, lexical scope is equal to its duration:
21:57 Juerd { my $foo; }  # $foo no longer exists now
21:57 wolverian hmm. is there a specced way to ensure type safety between an inner and outer function? that is, ensure that &f's signature matches &g's return type.
21:57 Juerd But... { my $foo; $bar = \$foo }  # no longer $foo, but the variable remains.
21:58 Juerd And, a single declaration can make for several *separate* variables
21:58 integral but the binding doesn't remain.  So scope is about the binding,  and duration the box?
21:58 Juerd for 1..5 { push @foo, \my $foo }  # 5 different $foo's
21:58 Juerd has $.foo;  # each invocant has its own.
21:58 Juerd integral: scope is about binding, yes.
21:59 Juerd integral: And only that. It's about the *name* of a variable.
21:59 integral yes, bindings just name things.
21:59 Juerd (And a variable's name is no more than an implicit reference)
21:59 integral and the evil of alpha-reduction
22:00 Juerd integral: See the diagrams I drew in reply to sandlass, in p6l
22:00 Juerd (Drawn for another reason, but relevant in this discussion too)
22:00 integral sandlass?
22:00 integral ah
22:00 * integral kicks his email client for not showing ß
22:00 Juerd Programming languages become so much simpler when you understand these things
22:01 Juerd A lot of the magic disappears.
22:01 integral and perl5 is a really bad way to learn about them
22:01 Juerd Not really
22:01 Juerd It's very explicit about many of these things.
22:02 integral hmm, it takes names rather far though, like Sub::Identify
22:02 Odin-LAP Perl is actually more explicit about some of them than most languages...
22:04 HipHob has quit IRC (Read error: 145 (Connection timed out))
22:04 Juerd Yes
22:05 Juerd The only thing that could endanger the clarity is implicit (de)referencing of scalars or implicit flattening of references. In general: don't touch the scalars, and take them for what they are.
22:06 Juerd (Note that specific context makes something explict)
22:07 kelan has joined #perl6
22:07 HobNob has joined #perl6
22:08 wolverian I guess what I want is a Signature class and a easy syntax in sub signature declarations to take advantage of it
22:09 ajs_home wolverian: why?
22:09 wolverian ajs_home: I want to ensure type safety between an inner and outer function. think function composition.
22:11 ajs_home I'm not sure you ever want to do that... what happens when the function signature changes at run-time?
22:12 wolverian you burn in hell. :)
22:12 Juerd Wrong answer.
22:13 Juerd Things like this need to be addressed, and make language design hard :)
22:13 wolverian so, can I say 'my :(Foo, Bar) @baz;' or so?
22:13 wolverian (or is that with two :s?)
22:13 wolverian I think I read something like that on p6l. :)
22:14 Juerd What does that mean?
22:16 wolverian @baz[0] would be typed Foo, @baz[1] Bar, and @baz[2...] either Any or an error :)
22:17 Juerd Ew :)
22:17 wolverian I guess one could do: &f.signature = &Code::signature.assuming(&g); to ensure they are type safe ;)
22:17 Juerd I think ordered collections of different types are bad.
22:17 wolverian (I still want a syntax to take references to bound methods :/)
22:18 Juerd I can think of no good reason to want them. Point one out for me?
22:18 wolverian Juerd: I'm just interested in the type safety between a functin's return value and another's signature.
22:18 wolverian s,functin,function,
22:18 Juerd Safety how?
22:18 Juerd It's a context issue, and context is a runtime issue
22:19 theorbtwo $methref = {$foo.method(@_)}
22:19 Juerd And context can trigger conversion rather than type errors sometimes.
22:19 Juerd theorbtwo: That will often not work.
22:19 wolverian hmm. that's a good point.
22:19 Juerd theorbtwo: You can do something about that with *@_, but still, that won't always work.
22:19 wolverian I guess I am worrying too much, given that this is perl. :)
22:19 theorbtwo Hm.
22:20 Juerd theorbtwo: The interface of $methref can be radically different from method's
22:20 Juerd wolverian: Well, it may be possible, but not I don't think it's easy or predictable.
22:21 theorbtwo How, Juerd.
22:21 theorbtwo s/\./?/
22:22 Juerd theorbtwo: $methref = { method (@foo) { ... } . (*@_) }; $methref($aref); $methref(@array);
22:22 Juerd Realise that the default signature is (*@_)
22:23 Juerd theorbtwo: $methref = { method (*@foo) { ... } . (@_) }; $methref($aref); $methref(@array);
22:23 Juerd theorbtwo: $methref = { method (*@foo) { ... } . (*@_) }; $methref($aref); $methref(@array);
22:23 wolverian is 'sub returns Foo { ... }' legal?
22:23 Juerd theorbtwo: $methref = { method (@foo) { ... } . (@_) }; $methref($aref); $methref(@array);
22:23 Juerd Sure breaks my mind.
22:24 Juerd wolverian: Why would it not?
22:24 wolverian I'm not sure. it looks funny. :)
22:24 Juerd wolverian: Then write sub { returns Foo; ... }
22:24 wolverian oh, that works?
22:24 Juerd It should. I don't know if it's specced if anyone has even thought about it.
22:25 wolverian sounds like p6l time.
22:25 Juerd But if class Foo is Bar { ... } can be written as class Foo { is Bar; ... } and class Quux does Xyzzy { ... } can be written as class Quux { does Xyzzy; ... }, I do expect it.
22:25 wolverian I guess my problem with 'sub returns' is that 'returns' looks like a sub name
22:25 Juerd Besides that, it would solve my hunt for a way to indent nicely instantly.
22:26 Juerd wolverian: Very good punt!
22:26 Juerd point even.
22:26 wolverian thankyou. :)
22:26 wolverian then again, it's somewhat of a non-issue if larry's -> @args ==> ReturnType { ... } is allowed.
22:27 Juerd Perhaps it's time for the "I am leaving something out" operator
22:27 wolverian haha, there is one? :)
22:27 wolverian (besides ...)
22:28 wolverian that sounds like loglan.
22:28 Juerd No
22:28 wolverian er, lojban.
22:28 Juerd Or maybe just the "anonymous" operator
22:28 Odin-LAP ... !!! ???
22:29 wolverian hmm. -> ==> Foo { ... }
22:29 Odin-LAP What was the state of those, again? :>
22:29 wolverian that doesn't look very nice.
22:29 Juerd anon sub { ... }  # disambiguate.
22:29 Juerd Odin-LAP: See quickref
22:29 Juerd wolverian: -> { returns Foo; ... } does
22:31 wolverian oh. 'sub returns Foo' is in S06
22:31 Odin-LAP Juerd: *blank, level gaze*
22:31 Juerd Odin-LAP: ?
22:31 Juerd (returning the favour)
22:31 Juerd Odin-LAP: What and why?
22:32 Odin-LAP Juerd: Which can be found ... ooh, in the repository?
22:32 wolverian is @_ ever passed implicitly?
22:32 * Odin-LAP recalls some talk about that.
22:32 Juerd Odin-LAP: Yes. I strongly urge you to daily read autrijus's journal :)
22:32 Juerd Odin-LAP: Without that, it's impossible to keep up.
22:32 Odin-LAP Juerd: Heh. :p
22:33 Juerd wolverian: No
22:33 Juerd wolverian: @_ is a normal variable now
22:33 Odin-LAP Juerd: I'm just kind of tagging along, peering in every now and then to see the cool things going on... :/
22:33 Juerd wolverian: There is "call", in wrap, that calls the real sub. But there's no @_ involved.
22:33 Juerd Odin-LAP: The more useful the journals are :)
22:33 Juerd Odin-LAP: Make it your start page
22:34 Odin-LAP :p
22:34 iblechbot has quit IRC (Read error: 104 (Connection reset by peer))
22:34 wolverian Juerd: wrap? did I forget something? :)
22:35 Odin-LAP Would you believe me if I told you the first public showing of the new Star Wars will be in a small town (about 1000 people) in the middle of nowhere?
22:35 Odin-LAP Bah. In Europe.
22:35 * Odin-LAP meant to include that there. >:|
22:35 Juerd wolverian: Apparently.
22:37 Shillo has joined #perl6
22:39 wolverian hmm. should function composition copy the subs or reference the originals? the former might allow stricter type checking.
22:39 wolverian (would that be perlish?)
22:40 Juerd Are you asking if stricter type checking would be perlish?
22:40 Juerd I recommend you never ask that question ;)
22:42 wolverian I'm wondering if there's any sense in: my &composed = &foo o &bar; &bar = { say "hi" }; # the second statement reflects into &composed
22:42 wolverian (using infix:<o> as the composition sub.)
22:42 PerlJam Type checking would be perlish if that's how you've asked perl to behave either explicitly through some sort of "use strict" like pragma or implicitly (bu
22:42 PerlJam by using types everywhere
22:43 wolverian I think it is reasonable that it should be possible to compare function signatures in, um, function signatures...
22:43 Juerd Does anyone here have experience with ext2resize?
22:43 wolverian if it should be possible to be strictly typing.
22:43 wolverian Juerd: yes. I wiped my music collection with it.
22:44 Juerd That answers my second question too then
22:44 wolverian heh.
22:44 Juerd I bought an external hard drive for my laptop
22:44 PerlJam wolverian: how would you determine which signatures are compatible?
22:44 Juerd Taped it to the screen
22:44 Juerd Now I want a RAID 1 for /home
22:44 wolverian PerlJam: by using 'no coercion;' or so. :)
22:45 Juerd But I first need room on the internal hard drive
22:46 wolverian which I wouldn't want to use, and even if it could can if one can coerce a type into another at compile time, I can see adding coercions at runtime as something people would do..
22:46 wolverian s,could can if one can,can check if one can,
22:47 wolverian I think that's my signal to go sleep. good night. :)
22:48 Juerd Bye
22:54 larsen has joined #perl6
22:55 verbatim has left
22:55 svnbot6 r3235, chromatic++ | Specify explicit invocant on all method calls.
22:57 Juerd Why all, I wonder.
22:57 Juerd Those on $_ don't need it.
23:05 jez has quit IRC (Read error: 110 (Connection timed out))
23:13 HobNob has quit IRC (Read error: 110 (Connection timed out))
23:36 broquaint has joined #perl6
23:36 svnbot6 r3236, autrijus++ | * external parrot for Rules is now kept in a single process, instead of spawning one parrot for each rules invocation
23:46 metaperl has joined #perl6
23:54 BChrisB has left
23:54 Shillo has quit IRC ("Leaving")
23:55 eric256__ has left

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

Perl 6 | Reference Documentation | Rakudo | Niecza | Specs