-Ofun: xrl.us/hxhk | pugscode.org | pugs.kwiki.org | paste: paste.lisp.org/new/perl6 or sial.org/pbot/perl6
Set by apple-gunkies on 11 November 2005.
fridim_ hi 01:12
christopher How do I disambiguate between class and instance attributes within a method definition? 07:26
gaal christopher: you mean if they have the same name? not sure, but probably $foo means instance and $ThisClass::foo means class. $.foo and $!foo certainly mean instance vars. 07:31
(when I say "certainly" about language matters I usually mean "I would be quite surprised unless") 07:32
christopher yeah, if they have the same name. So I say: our $.x; to declare the class attribute, but $Foo.x inside one of the instance methods? (where $.x would shadow with 07:33
the instance attribute)
where Foo is the class name 07:34
gaal I don't think you say our $.x 07:35
say either our $x or my $x for public/private class data.
hopefully I'll be corrected if I'm wrong about this. 07:36
christopher 'our $.x' is in S12, if you search for the string 'class attr'
gaal hmm 07:37
well, I don't know then. :-/ 07:38
christopher I haven't actually seen $Foo.bar written anywhere. 07:40
Foo.bar appears in t/oo/attributes/class.t, but that's for
the accessor by the same name, of course...
I suppose $::?CLASS.bar would be safe? 07:42
gaal that would work if accessors had been created, that is if you declared it with a twigil. 07:43
christopher I want to access the variable, not the accessor (which may not be an lvalue sub) 07:44
gaal If not, $ThisClass::bar, for our vars at least.
Better ask Luke when he pops in. 07:47
christopher You mean the . has to be replaced with :: to get past the accessor?
(since it doesn't work that way for instance attributes, I'm surprised.)
(I thought it was the leading sigil that determined whether you were
using an accessor.)
anyway, thanks! 07:48
Ah, it's illegal: 08:06
groups.google.com/group/perl.perl6....50cd740395
(for there to be a conflict between instance and class attributes)
r0nny yo 09:59
yo 11:18
does pugs support meta pbjects now ?
ping? 11:19
broquaint ?eval Object.new().meta.perl 11:34
11:34 evalbot_7961 is now known as evalbot_7968
evalbot_7968 Error: No compatible subroutine found: "&meta" 11:34
broquaint I guess not.
raptorXXX is there perldoc equivalent in haskell ? 12:41
rafl haddock
raptorXXX wiki.perlchina.org/main/show/haskel...kshop+2005
this can be interesting...
thanx
where is this haddock? 12:42
i cant seem there is such command .. ghc
aaa i see
theorbtwo 1: I'm not quite sure I'd call them equivelent.
raptorXXX it is in a package
theorbtwo 2: It comes sepperately. 12:43
raptorXXX yep, thanx
gaal raptorXXX: see also haskell.org/hoogle/ 12:45
raptorXXX :) thanx
one more questions...is there any equivalent of a Hash and HoH,AoA..etc.. structures in haskel 12:48
FiniteMap?!
SamB raptorXXX: we usually use Data.Map since GHC 6.4 12:49
raptorXXX aha..i see
FiniteMap is depricated
SamB raptorXXX: what is an AoA?
raptorXXX Array of arrays, HoA, AoH ..etc 12:50
SamB raptorXXX: just nest the types...
raptorXXX ok.. i will try ,tnx 12:51
SamB so, like, Map String (Map String Int) or something like that 12:52
there are a bunch of array types, though
raptorXXX this haskell seem very cool, perl6 will stole alot of things isnt it :)) 12:54
GeJ erm, I guess the word you're looking for is "borrow"... sounds better :) 12:55
raptorXXX :)
theorbtwo Or "steal", which has the correct tense.
SamB prefers "steal" 12:58
raptorXXX i've read abit about Types in Haskell... do we have something like it in perl6 12:59
roles ? may be ? 13:00
theorbtwo I think haskell types map more or less onto perl6 types. 13:02
Not completely sure about parameterization, though.
xinming ?eval [+] [1..100] 13:10
evalbot_7968 [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100]
xinming ?eval [+] (1..100)
evalbot_7968 5050
xinming hmm, should [1..100] be deferenced? 13:11
theorbtwo I don't think so.
rafl ?eval [+] *[1..100]
evalbot_7968 5050
theorbtwo It should possibly be nummified, but possibly not.
(Since there was only one argument, the operator drops out, in one way of thinking.) 13:12
xinming ?eval [~~] [1..10] 13:24
evalbot_7968 bool::true
xinming ?eval [~~] (1..10)
evalbot_7968 bool::false
xinming hmm
theorbtwo Blink... when did we get a ~~ operator? 13:25
theorbtwo smacks his head. 13:26
Um, like 3 years ago... I'm using a strange font, for me... 13:27
xinming oops 13:30
?eval [~] (1..10]
evalbot_7968 Error: unexpected "(" expecting block construct, ":", digit, "_", fraction, exponent, term postfix, operator, "does", "but", "is", "^..^", "cmp", "<=>", "^..", "..^", "..", ")", postfix conditional, postfix loop, postfix iteration, ";" or end of input
xinming ?eval [~] (1..10)
evalbot_7968 "12345678910"
xinming found perl 6 has many aspects which are the same as haskell 13:31
clkao 6/win14 14:59
Juerd kolibrie++ # dvorak :) 17:27
kolibrie: Spread the word :)
17:44 Aankh|Clone is now known as Aankhen`` 18:23 xandal is now known as orxy
kolibrie Juerd: yes sir! 18:38
Juerd: my wife started your tutorial 18:40
Juerd Good! We certainly need more female dvorak typists, because they tend to be much more succesful in convincing others. 18:41
:)
svnbot6 r7969 | yiyihu++ | Changed the value of lang attribute in <html> to "zh-cn" in file docs/zh-cn/01Overview.html 18:42
sdakota Moo :) 19:08
Hello guys :)
dduncan and hello to you 19:10
Aankhen`` goes to sleep. 19:58
G'night.
raptorXXX how to use perl5 modules in pugs..? 21:50
#!/usr/bin/pugs
use DBI--perl5;
is this correct..
PerlJam raptorXXX: what happens when you try it? :) 21:52
raptorXXX pugs: *** Can't locate DBI.pm in @*INC (@*INC contains: /usr/lib/perl6/i686-linux /usr/lib/perl6 /usr/lib/perl6/site_perl/i686-linux /usr/lib/perl6/site_perl /usr/lib/perl6/auto/pugs/perl6/lib /usr/lib/perl6/site_perl/auto/pugs/perl6/lib .).
at <interactive> line 1, column 1
kolibrie use perl5:DBI; 21:53
raptorXXX But this is ok :--->
use perl5:DBI; my $dbh = DBI.connect('dbi:SQLite:test.db');
i see
so the second way is the correct one
kolibrie :)
integral did you find the "DBI--perl5" in a file in the pugs source? 21:56
hmm, seems not :) 21:58
wolverian integral, that was a suggestion on p6l - to put the perl version in the author field 22:00
gaal it used to work that way when the bridge was first put up.
integral hmm? I know. I was just wondering where raptorXXX found the old syntax. I thought it might have been a presentation that was stored in the pugs tree. If it was I was going to fix it :) 22:01
gaal ahh ok
integral it's in the 6.2.8 changelog :)
raptorXXX no i read it 22:02
wolverian integral, ah, okay.
xgl 'darcs get' seems improbably slow -- is it a known issue?
integral raptorXXX: where?
raptorXXX in haskell-workshop-2005
wiki.perlchina.org/main/show/haskel...kshop+2005
Khisanth better to stick with the pugs docs :) 22:03
integral except where pugs is behind the design :)
Khisanth integral: doesn't matter then, I don't think you can run perl6 anywhere else ... 22:04
integral hmm, that seems to just be a copy of autrijus' proposed paper for hw, which iirc is in pugs svn?
raptorXXX where i can see more info for class-name-definitions 'cause i saw weird syntax .. one moment to find it
Khisanth raptorXXX: docs/quickref should have most of these things covered 22:05
raptorXXX aha.. 22:06
wolverian ?eval 2**2 22:24
22:24 evalbot_7968 is now known as evalbot_7969
evalbot_7969 4/1 22:24
wolverian humm, what's up with the /1?
xgl exit 22:27
geoffb wolverian -- that's a Rat, but I'm not sure why int ** int -> rat, frankly. 22:30
maybe a coersion back and forth from a floating point rep. 22:31
wolverian is it int ** int? 22:32
?eval 2 ** 0.25
evalbot_7969 1.189207115002721
wolverian right, no /1 there
(yeah, I don't know enough haskell. :/) 22:33
SamB well, if you do 0.25, doesn't that make it a float? 22:34
well, in Haskell it just makes it some instance of Fractional...
leo rafl: (inline-threading) the paper describes also a lot of plain code rewriting, which is (as proof of concept) already inside src/pic.c 23:12
leo ponders about renaming .pbc to .pwc (.. word code) 23:14
(but that belongs better to #parrot ...&) 23:15