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