pugscode.org/ | nopaste: sial.org/pbot/perl6 | ?eval [~] <m oo se> | We do Haskell, too | > reverse . show $ foldl1 (*) [1..4] | irclog: irc.pugscode.org/
Set by diakopter on 11 July 2007.
00:24 fridim left 00:27 Limbic_Region left 00:31 fglock left 00:36 nekokak joined 00:41 devogon left 00:59 nipotaway is now known as nipotan 01:03 ezraburgh left 01:09 torz joined, torz left 01:19 zamboni9 joined, zamboni9 left 01:20 dduncan joined 01:22 cls_bsd joined 01:29 rintaro_ left 01:54 hakobe is now known as hkb_aw 02:58 bonesss left, apeiron left 03:31 Southen left 03:39 maskd left 03:56 Teratogen joined
Daenyth` does have syntax files for p6? 03:56
does vim^
03:59 demq joined 04:00 weinig left 04:16 dmq left 04:17 BooK left 04:20 Daenyth` left 04:40 weinig joined 04:57 kanru joined 05:08 cognominal__ left 05:12 devogon joined 05:19 weinig left 05:24 vel joined 05:34 weinig joined 05:43 hcchien left
moritz_ @tell Daenyth` yes, see svn.pugscode.org/pugs/util/perl6.vim 05:47
lambdabot Consider it noted.
05:52 hcchien joined 06:11 BooK joined 06:22 szbalint_ joined, szbalint left, vel left 06:23 cognominal_ joined
Tene was hacking on a mud in p6/pugs today. 06:24
Very nice and simple.
06:25 BooK left 06:28 cognominal_ left 06:36 Aankhen`` joined, kanru left 06:41 sunnavy_ joined 06:48 dduncan left 06:49 sunnavy left, sunnavy_ is now known as sunnavy 06:59 buetow joined 07:01 buetow left 07:12 Daenyth` joined, szbalint_ left, szbalint joined 07:14 hermann_348 joined
hermann_348 www.pennergame.de/ref.php?uid=348 klick plx 07:15
lambdabot Title: Pennergame
07:15 hermann_348 left 07:24 Aankh|Clone joined 07:31 kane__ joined 07:42 Aankhen`` left 07:44 Aankh|Clone left 07:47 Aankhen`` joined 07:48 SS joined 07:49 knewt left 07:50 weinig left 08:07 DarkWolf84 left 08:13 pnu joined 08:21 franck___ joined 08:24 knewt joined
Daenyth` using pugs, how would I make say append \r\n rather than \n? 08:30
lambdabot Daenyth`: You have 1 new message. '/msg lambdabot @messages' to read it.
08:33 Blwood joined 08:36 SS left 08:38 flokuehn joined
Daenyth` Is there any clean way to do that or would I just say "foo\r"? 08:38
08:40 rfordinal_ is now known as rfordinal
szbalint according to the spec there isn't a specific variable you can set to do it, but I guess there are different, other ways to accomplish it 08:40
Daenyth` alright
thanks
still a step up from print "foo\r\n" :P
rhr it should probably be set per-filehandle (certainly not a global var like p5). sockets should probably use \r\n by default... 08:42
Daenyth` that would be a smart way to do it
rhr something like $fh.newline("\r\n") 08:43
Gothmog_ Hm, and \r\n might not be correct, you have to use \015\012 to be sure. 08:44
08:46 dwave left
pasteling "Daenyth" at 24.91.13.73 pasted "Is this right?" (11 lines, 166B) at sial.org/pbot/26684 08:47
Tene I'm getting segfaults when trying to match a rule. 08:49
The segfault goes away if I bring it out of a thread.
The segfault also goes away if I use m:Perl5// instead of m//
08:50 daxim_ left 08:51 Blwood left
Gothmog_ Tene: File a test. I think that's the established way to report a bug. 08:54
08:54 Blwood joined
Tene Yeah, it is. 08:54
Don't quite have time to reduce to a test case tonight, though, so leaving a note for myself. 08:55
Daenyth` What is $! called now? 09:02
09:08 cognominal_ joined
Blwood perlcabal.org/syn/S04.html#Exception_handlers 09:08
lambdabot Title: S04 09:09
Daenyth` thanks
09:09 araujo left
Daenyth` Did "use warnings;" change? I don't seem to have warnings.pm 09:13
with pugs
or am I missing something 09:14
Blwood I am very new to perl6 but I think there's no warnings module 09:15
Daenyth` hm
alright
On some of the docs it says I can "use Perl5:foo', but when I try it fails saying it can't find the module in @*INC.. What's the best way to handle that? I didn't see any of the scripts listed modifying @*INC 09:21
Tene pugs -I/path/to/libs
is one way
Daenyth` alright, lemme try that...
pasteling "Daenyth" at 24.91.13.73 pasted "It still says that it can't find it; "use Perl5:IO::Socket"" (11 lines, 742B) at sial.org/pbot/26686 09:24
Daenyth` ohh 09:25
hmm
I think I may know why..
yup 09:26
nevermind, ignore that paste
Blwood what was the problem ?
Daenyth` there's no Socket.pm; you have to specify IO::Socket::INET
at least with my install
Blwood oh right :) 09:27
Gothmog_ And what is /usr/lib/perl5/current/i686-linux-thread-multi/IO/Socket.pm, then? :P
Blwood by the way if you want to work with sockets perl6 has some built-in functions
Daenyth` hmm 09:28
I'll look into those too then
Gothmog_: err.. >.>
Blwood you have some examples in pugs/examples/network/
Daenyth` except now it's using perl5's strict.pm
hmm
fun stuff
Gothmog_ Pugs does not parse and run Perl5 by itself, but uses perl5... 09:29
Blwood another think but not sure I think than perl6 uses strict pragma
Gothmog_ afaik
strict is on by default in Perl6. 09:30
Blwood :)
Gothmog_ Except in the command line, that is.
Daenyth` yes
Blwood Gothmog_, any idea about my Class { } problem :o ?
Daenyth` wow, the built in socket functions look nice :3 09:31
Blwood: thanks
Blwood have a look at perlcabal.org/syn/S16.html and the examples in the directory :)
lambdabot Title: S16
Daenyth` Is it ok to have a method connect in my class? 09:32
Blwood I think no
Gothmog_ Why not?
Blwood cause there's already a connect() function
Daenyth` Gothmog_: because there is a connect() builtin
Gothmog_ So, don't define a sub, but a method. 09:33
So you call $yourobject.connect()
Daenyth` oh ok
that's what I intended to do in the first place
lol
Gothmog_ And it is not ambigous.
+u
Daenyth` I think I'll just name it newconn() for better human-readability
09:34 bsb joined
Gothmog_ I would prefer connect. 09:34
Daenyth` Do I need to "connect() or die", or will the exception system handle that for me, assuming I don't provide any CATCH blocks? 09:37
Gothmog_ Blwood: What's the problem? self.drink() should work fine, afaik.
Blwood when I try self.drink in my class I have a bif error " *** Undeclared variable: ("$__SELF__",MkPad (p ..." :( 09:38
big* 09:39
Gothmog_ Daenyth`: If an exception is thrown and you don't catch it, I suppose that your program will die. But that may depend on the type of exception... read the synopsis, I don't know exactly.
Daenyth` alright
I'm also using fatal;, so that will probably force it
pasteling "Blwood" at 81.247.186.228 pasted "Error with self.drink" (17 lines, 3K) at sial.org/pbot/26689 09:42
"Daenyth" at 24.91.13.73 pasted "Ambiguous error message" (69 lines, 1.4K) at sial.org/pbot/26691 09:47
Daenyth` Is it breaking because of the way I'm setting $.socket? 09:49
09:51 ruoso joined, cognominal_ left
Gothmog_ I'm not sure about that, but you're using hashes the wrong way. It's %hash<foo>, not %hash{foo}. 09:51
gtg 09:52
Daenyth` ah
Gothmog_ Bye!
Daenyth` that could be it
thanks for the help
Gothmog_ np
Blwood both are correct I think
< > is just a qw like 09:53
Daenyth` hmm
nope, same error
hrm
Blwood try True instead of true ?
Daenyth` ahh 09:54
that made the error go away
now to the next one :)
09:54 chris2 joined
Blwood btw why quote $.socket = connect( "$.server", $.port ); ? :o 09:55
connect($.server, $.port) works fine
Daenyth` err
don't I want a filehandle for it?
Blwood yeah but you don't have to quote $.server 09:56
Daenyth` or something
I'm not sure
oh
habit
passing a string as a parameter I always quote it
09:57 dwave joined
Daenyth` it also occurs to me that the $bot.readline wouldn't work, because $bot itself isn't a filehandle 09:57
What's the right way to refer to $.socket? 09:58
Blwood $bot is an object not a filehandle
Daenyth` yes 09:59
but $bot's $.socket is 10:00
What's the right way to refer to it
Blwood while my $line = readline($.socket)
Daenyth` how would that work with multiple instances of the class? 10:01
that while loop will eventually be put inside the class {}, but for right now I just want to try and get what I have working
well, connected at any rate 10:02
lol
Blwood Well I am not sure, but when you do $bot.readline it is supposed that readline is a method of your object. Maybe you can write a method that return de filehandle and then readline it : / ?
the*
Daenyth` yeah.. 10:03
I'm sure there's another way to do it... oh well. My first implementation doesn't have to be stylistically perfect :P
Blwood yeah I think there's another way to do it too :(. 10:04
I have also some problems with class in perl6 (self.method ...) so I am not the best person that can help you :s. 10:05
Daenyth` method readline ($sock = $.socket) {
return readline( $sock );
}
that should do it
Blwood yeah
but why not :
method readline {
return readline( $.socket );
}
Daenyth` in case I want to specify a filehandle other than $.socket 10:06
Blwood ah okay
Daenyth` eventually it will have more than one
I'm trying to plan for it now
;)
print $sock "$message\d015\d012"; keeps making it barf 10:10
I can't figure out why
10:10 Linux\2 joined
wolverian print $sock: ...; # if this is perl 6 :) 10:11
Daenyth` ahh
thanks :)
10:11 IllvilJa joined
Daenyth` that was it 10:12
very non-useful error messages on it
10:12 bsb left
pasteling "Daenyth" at 24.91.13.73 pasted "*** Missing invocant parameters in '&Crapbot::connect': 0 received, 1 missing" (65 lines, 1.3K) at sial.org/pbot/26692 10:15
Daenyth` I'm sure it's something silly again 10:16
Blwood yeah connect() is a built-in function.
rename it and it'll work 10:17
Daenyth` you think..?
I'll try it
wolverian huh. it should work anyway.
Daenyth` hmm
I changed the name and now I get a differant error\
Gothmog_ Missing invocant is a useful error message, isn't it? 10:18
Daenyth` *** getHostByName: does not exist (no such host entry)
wolverian but, yes, it's apparently resolving connect() to the method, which is wrong
Daenyth` maybe If I did &Main::connect?
or somesuch
wolverian or something like that, yeah
Daenyth` is that the correct syntax?
wolverian it's a pugsbug, feel free to add a test for it
Daenyth` I don't know how 10:19
wolverian do you have commitbit?
Daenyth` no
I'm new to perl6
I also wouldn't know how to write a test for it 10:20
Blwood bbl (lunch :o)
Daenyth` *** getHostByName: does not exist (no such host entry) <<-- now what does this mean..? I know the address is valid 10:22
!ping 10:25
devbot6 pong
Daenyth` it also fails when I specify the ip address 10:30
10:31 Teratogen left 10:38 didie_p6 joined
Daenyth` hi 10:38
didie_p6 Hello Daenyth` from a perl 6 irc bot
Daenyth` hrm
10:38 didie_p6 left
Blwood Daenyth`, so you resolved the problem ? 10:41
Daenyth` nope 10:42
that was differant code, from examples/
I'm trying to figure out where my glitch is
Blwood mm 10:43
when you dump $.server you can see that it's empty
try my $bot = Crapbot.new( nick => Crapbot, server=>%botconfig<server> ... 10:44
Daenyth` I was about to say, yeah
Blwood it should work now
Daenyth` but it should be setting it by default if I don't specify...
unless I misunderstand?
Blwood mm 10:46
you have to declare your hash in the class maybe ?
Daenyth` ok, well now it "runs"
hmm
could be scope..
I wish we had warnings.pm :/
Blwood yeah 10:47
I think if you declare your hash in the class it should work
Daenyth` well..
hmm
yeah
I'll fiddle with it I suppose 10:48
well, here's one wierd thing
oh..
hmm
hang on
10:48 agentzh_ joined
Daenyth` yeah, that's it 10:49
10:49 agentzh_ left
Daenyth` ok 10:51
it's not setting them even with the hash inside
I think it's another bug maybe
hmm
inside the class it just doesn't see any of those 10:52
Blwood :s
Daenyth` as far as I can tell anyway 10:53
well, for now I can specify things...
Blwood yeah I see that too
weird
Daenyth` has $.umodes is rw = %botconfig{'umodes'}; is the right syntax? 10:54
I mean.. should be
wolverian %botconfig<umodes> would work too, but yes, I think that should work. 10:56
Gothmog_ I don't think that {'umodes'} is a valid hash subscript, but <umodes> is.
Blwood yeah %botconfig{'umodes'} is ok, but <umodes> is better
how the eval bot work :s ? 10:57
works*
Daenyth` pretty simple really
Blwood ?eval
Daenyth` oh, you mean how do you use it
lol
Blwood yeah I know now :p
Daenyth` ?eval: foo
eval: foo
buubot Daenyth`: foo
pugsbot_r17185 Error: ā¤Unexpected ": foo"ā¤expecting "::"
Gothmog_ ?eval say "Hello, world" 10:59
Daenyth` is the perl6.vim file wrong?
pugsbot_r17185 OUTPUT[Hello, worldā¤] Bool::True
Daenyth` it highlights "wait" and not "sleep"
but pugs tells me wait isn't a command
Blwood ?eval my %hash = (a => "bla", b => "bli"); say %hash{'b'};
pugsbot_r17185 OUTPUT[bliā¤] Bool::True
Daenyth` ?eval my %hash = (foo => 'bar'); class baz { $.quoz = %foo<bar>; method quux { say $.quoz; } } baz.new; baz.quux 11:02
pugsbot_r17185 Error: ā¤Unexpected "<bar"ā¤expecting "::"ā¤Variable "%foo" requires predeclaration or explicit package name
Daenyth` ok, why does this give me an error when my pugs was silent 11:03
oh wait
?eval my %hash = (foo => 'bar'); class baz { $.quoz = %hash<foo>; method quux { say $.quoz; } } baz.new; baz.quux
pugsbot_r17185 Error: No such method in class Scalar: "&quoz"
Daenyth` ?eval my %hash = (foo => 'bar'); class baz { has $.quoz = %hash<foo>; method quux { say $.quoz; } } baz.new; baz.quux 11:04
pugsbot_r17185 Error: Class prototype occured where its instance object expected: baz
Daenyth` ?eval my %hash = (foo => 'bar'); class baz { has $.quoz = %hash<foo>; method quux { say $.quoz; } } my $quuux = baz.new; $quuux.quux
pugsbot_r17185 OUTPUT[ā¤] Bool::True
Daenyth` but null string
>.< took me long enough...
Blwood no clue :( 11:05
Daenyth` It's one of two things
it's either an unintended bug in pugs, or it's intentionally out of scope at assignment time
I think it's a bug 11:06
ok well 11:09
I'm done for tonight
11:09 Aankhen`` left
Blwood tonight ? 11:09
it's 1:08pm in my country :) 11:10
Daenyth` 7 am here
>.>
bedtime
gnight
Blwood lol
good night
11:16 Aankhen`` joined 11:28 lambdabot joined 11:30 nipotan is now known as nipotaway 11:50 Aankhen`` left 11:56 devogon left 12:07 Azure-BOT joined 12:24 daxim_ joined, daxim_ is now known as daxim 12:34 HiTech69 joined 12:38 ron__ joined 12:46 DarkWolf84 joined 12:49 iblechbot joined 12:52 ron__ left 13:01 cognominal_ joined 13:02 cognominal_ left, cognominal_ joined 13:03 stevan_ joined 13:09 Shillo joined
Shillo Hi all 13:09
diakopter Shillo: hi 13:20
Shillo Nice. Someone's awake. :) 13:22
13:27 jhorwitz joined
Blwood hi :) 13:27
13:29 cognominal_ left
DarkWolf84 hi 13:32
13:37 TJCRI joined
Shillo Hey 13:38
13:46 nperez joined 13:49 Southen joined 13:51 cognominal_ joined
DarkWolf84 :) 13:51
13:56 tlb joined 14:07 kanru joined 14:08 drupek12 left 14:11 hkb_aw is now known as hakobe 14:17 thepler joined 14:18 drupek12 joined, drupek12 left 14:21 drupek12 joined 14:29 fridim joined
fridim hi 14:29
14:37 devogon joined
[particle1 hello 14:39
14:39 [particle1 is now known as [particle], fglock joined 14:40 drupek12 left 14:46 Shillo left 15:05 buetow joined 15:20 tlb left
moritz_ hi 15:25
diakopter moritz: I committed those evalbot changes 15:30
moritz_ diakopter: thanks, I saw it...
diakopter: sadly they don't fix the problem for me :(
15:31 vel joined, lumi left
moritz_ still the same error message about Invalid username [n=<SubBloc] 15:31
diakopter which irc network are you connecting to 15:34
moritz_ freenode
TimToady ?eval constant %hash = (foo => 'bar'); class baz { has $.quoz = %hash<foo>; method quux { say $.quoz; } } my $quuux = baz.new; $quuux.quux
pugsbot_r17185 OUTPUT[barā¤] Bool::True
moritz_ now I try irc.perl.org 15:35
same error 15:36
TimToady @tell Daenyth` the problem is that the assignment to the hash happens after the class is parsed and so when the class is being parsed %hash<foo> isn't found. Changing "my" to "constant" fixes it because it makes the initialization of the hash happen at compile time. 15:37
lambdabot Consider it noted.
Linux\2 hi 15:38
moritz_ hi Linux\2 15:39
TimToady @tell Daenyth` but arguably it's a bug because the pseudoassignment to the has is supposed to capture a closure. that's not really pugs's fault though, because the spec used to be wrong there.
lambdabot Consider it noted.
Linux\2 ah, moritz_ :D 15:40
15:40 smash left
diakopter moritz: what command line are you trying 15:41
moritz_ diakopter: pugs evalbot.pl pugseval irc.perl.org:6667
diakopter moritz_: try pugs evalbot.pl pugseval irc.freenode.net 900 15:45
Blwood Does someone know how to call a method inside a class :( ? sial.org/pbot/26689
lambdabot Title: Paste #26689 from "Blwood" at 81.247.186.228
moritz_ Blwood: the problem is that self points to an instance if you are inside a method... 15:46
Blwood: but you haven't created an instance yet
Blwood moritz_, what do you mean with instance ? 15:47
moritz_ ?eval class Drinker { has $.name; method drink {say "$.name drinks"}}; my $d = Drinker.new; $d.name="Simon"; $d.drink()
pugsbot_r17185 OUTPUT[Simon drinksā¤] Bool::True
Blwood ah yes
but it's not possible to use a method in the class itself ? 15:48
moritz_ there is, but it can't use self (afaict), and no member variables
Blwood and how can I do that :) ? 15:49
moritz_ ?class foo { our $count = 1; our sub s { say $count++ }} foo.s()
lambdabot Unknown command, try @list
diakopter moritz_: try pugs evalbot.pl pugseval irc.freenode.net 900 '#perl6'
moritz_ ?eval class foo { our $count = 1; our sub s { say $count++ }} foo.s()
pugsbot_r17185 OUTPUT[0ā¤] Bool::True
moritz_ diakopter: trying...
Blwood: if you call them 'has' and 'method', they are tied to an instance (= object) 15:50
Blwood: there's more (and more accurate) information in S12
diakopter: same result :(
Blwood moritz_, okay thanks for help. I'll try 15:51
diakopter moritz_: can you nopaste it again?
pasteling "moritz_" at 84.148.46.253 pasted "evalbot won't connect" (15 lines, 1K) at sial.org/pbot/26693 15:52
moritz_ Blwood: if the synopsis is too heavy stuff for the start, you could look into t/oo/ for examples 15:53
Blwood moritz_, good idea, I'll have a look, thank you :) 15:54
moritz_ today I had nothing to do at $work (for one, two hours or so), so I started to translate S05 15:55
I got as far as the first 8% or something
TimToady ?eval class foo { my $count = 1; method s { say $count++ } }; foo.s; foo.s
pugsbot_r17185 OUTPUT[0ā¤1ā¤] Bool::True
TimToady no problem 15:56
15:56 vel left
moritz_ what was my problem? using our instead of my? 15:56
[particle] why is $count zero?
diakopter moritz: are you sure evalbot.pl is identical to what's in the pugs repo?
15:57 vel joined
moritz_ diakopter: I changed the default hostname I think 15:57
TimToady not using "method" when you mean method
diakopter svn diff?
moritz_ diakopter: I reverted it, now trying again
Blwood TimToady, yeah but I want to call the method s inside the class 15:58
TimToady a method that doesn't look at instance attributes is semantically a class method
Blwood: $.s should work for that 15:59
or self.s
oh way, not instance
then foo.s
or $?CLASS.s maybe
moritz_ diakopter: svn revert doesn't change anything
TimToady hmm, maybe ::?Class.s 16:00
moritz_ diakopter: I mean regarding the output/behaviour
TimToady not sure what pugs implements there
diakopter moritz: what r is your pugs?
Linux\2 runs after TimToady to get a signed book :P
moritz_ diakopter: r17098
spinclad 'wot r ur pugs?'
moritz_ diakopter: should I compile a newer one? 16:01
TimToady ?eval class foo { my $count = 1; method s { say $count++ }; ::?CLASS.s }
pugsbot_r17185 OUTPUT[0ā¤] Bool::True
TimToady ?eval class foo { my $count = 1; method s { say $count++ }; ::?CLASS.s; ::?CLASS.s }
pugsbot_r17185 OUTPUT[0ā¤1ā¤] Bool::True
TimToady ?eval class foo { my $count = 1; method s { say $count++ }; $.s; $.s }
pugsbot_r17185 OUTPUT[0ā¤1ā¤] \Bool::True
diakopter moritz: yeah, I'd try that... but I didn't think this workaround introduced any regressions... 16:02
[particle] a reference to Bool::True?
spinclad odd that it starts at 0. is {1} evaled too late here too?
moritz_ spinclad: probably
TimToady ?eval class foo { my $count = 1; method s { say $count++ }; say self }
pugsbot_r17185 OUTPUT[ā¤] Bool::True
TimToady hmm, should start at 1 16:03
spinclad ?eval class foo { my $count = 1; method s { say $count++ }; say self.s }
pugsbot_r17185 OUTPUT[0ā¤1ā¤] Bool::True
spinclad huh. 0 _and_ 1 ? 16:04
TimToady o_O
spinclad ?eval class foo { my $count = 1; method s { say $count++ }; say self.s; say self.s }
pugsbot_r17185 OUTPUT[0ā¤1ā¤1ā¤1ā¤] Bool::True
moritz_ spinclad: s returns and says $count(++)
spinclad ROFL
TimToady say inside the method 16:05
spinclad silly me
moritz_ spinclad: if you say s, and s say's again...
diakopter ?eval my $count; class foo { $count = 1; method s { say ++$count }; say self.s }
pugsbot_r17185 OUTPUT[2ā¤1ā¤] Bool::True
TimToady something's screwy with the class scope, I guess 16:06
spinclad say returns 1 always...
TimToady well, that's venturing on MO-land, so maybe it will fix automatically at some point
spinclad so the 2 is right this time
TimToady yes, I think
diakopter ?eval my $count; class foo { $count = 1; method s { ++$count and $count.say }; say self.s } 16:07
pugsbot_r17185 OUTPUT[2ā¤1ā¤] Bool::True
TimToady pseuod-assignment to my should happen pretty much identically to a real assignment 16:08
so maybe something's up with scoping
spinclad ?eval my $count; say $count++ 16:09
pugsbot_r17185 OUTPUT[0ā¤] Bool::True
TimToady ?eval my $count = 1; say $count++
16:09 drupek12 joined
pugsbot_r17185 OUTPUT[1ā¤] Bool::True 16:09
16:10 demq left
spinclad at any rate that's wherefrom the 0 16:10
TimToady maybe pugs used to treat "my" as a class attribute declaration, and puts it in the "wrong" place.
spinclad: except there's "= 1' in there that is getting ignored 16:11
diakopter ?eval my $count; class foo { $count = 1; method s { $count = 5 and "hu$count".say }; say "hi"~self.s ; say "ho$count"; }
TimToady possibly assigning it to the wrong place because of old spec damange
pugsbot_r17185 OUTPUT[hu5ā¤hi1ā¤ho5ā¤] Bool::True
TimToady *damage
spinclad right, i just meant that once it's ignored, the ++ gives 0. 16:12
TimToady *nod*
?eval class foo { say self.HOW } 16:16
diakopter post/pre ++ really is always returning '1'
pugsbot_r17185 OUTPUT[<obj:Class>ā¤] Bool::True
moritz_ ?eval my $a=5; $a++
pugsbot_r17185 5
moritz_ ?eval my $a=5; ++$a
pugsbot_r17185 6
TimToady ?eval class foo { say self.WHAT }
pugsbot_r17185 OUTPUT[Scalarā¤] Bool::True
TimToady that's bogus
diakopter ?eval class foo { my $count = 2; method s { $count = 5; "hu $count ".say }; say "hi "~self.s~" "; say "ho $count "; } 16:18
pugsbot_r17185 OUTPUT[hu 5 ā¤hi 1 ā¤ho 2 ā¤] Bool::True
diakopter weird
Gothmog_ "hi" is followed by the return value of say, diakopter
diakopter right, oh
spinclad why did $count revert to 2? 16:19
(difference from last time: placement of 'my') 16:20
TimToady looks like the $count inside the method is a different $count maybe 16:21
spinclad ah: because the ' = 2' got evaled late?
TimToady ?eval class foo { my $count = 2; method s { say $count }; self.s }
pugsbot_r17185 OUTPUT[ā¤] Bool::True
TimToady spinclad: that could also be the case 16:22
?eval class foo { my $count = 2; method s { say $count }; self.s }; self.s
pugsbot_r17185 OUTPUT[ā¤] Error: No such method in class Scalar: "&s"
spinclad ?eval class foo { method s { say $count }; self.s }
pugsbot_r17185 Error: ā¤Unexpected " };"ā¤expecting "::"ā¤Variable "$count" requires predeclaration or explicit package name
TimToady ?eval class foo { my $count = 2; method s { say $count }; self.s }; foo.s
16:22 daxim left
pugsbot_r17185 OUTPUT[ā¤ā¤] Bool::True 16:23
TimToady no, not just late; must be the wrong $count
spinclad but without the 'my ...' it complains... 16:24
?eval class foo { my $count = 2; method s { say $count }; self.s }
pugsbot_r17185 OUTPUT[ā¤] Bool::True
spinclad ?eval class foo { method s { say $count }; self.s }
16:24 daxim joined
pugsbot_r17185 Error: ā¤Unexpected " };"ā¤expecting "::"ā¤Variable "$count" requires predeclaration or explicit package name 16:24
TimToady ?eval class foo { our $count = 2; method s { say $count }; self.s }; foo.s 16:25
pugsbot_r17185 OUTPUT[ā¤ā¤] Bool::True
spinclad the method's view of $count is early... 16:26
TimToady ?eval class foo { our $count; $count = 2; method s { say $count }; self.s }; foo.s
pugsbot_r17185 OUTPUT[ā¤ā¤] Bool::True
TimToady ?eval class foo { my $count; $count = 2; method s { say $count }; self.s }; foo.s
pugsbot_r17185 OUTPUT[ā¤ā¤] Bool::True
16:27 daxim left
TimToady ?eval class foo { my $count; $count = 2; say $count.WHICH; method s { say $count.WHICH }; self.s }; foo.s 16:27
pugsbot_r17185 OUTPUT[2ā¤ā¤ā¤] Bool::True
TimToady ?eval class foo { my $count; $count = 2; say $count.WHERE; method s { say $count.WHERE }; self.s }; foo.s 16:28
pugsbot_r17185 Error: No such method in class Int: "&WHERE"
spinclad ?eval my $count; say $count.WHICH
pugsbot_r17185 OUTPUT[ā¤] Bool::True
spinclad ?eval my $count = undef; say $count.WHICH 16:29
pugsbot_r17185 OUTPUT[ā¤] Bool::True
spinclad ?eval class foo { my $count; $count = 2; say $count.WHAT; method s { say $count.WHAT }; self.s }; foo.s
pugsbot_r17185 OUTPUT[Intā¤Scalarā¤Scalarā¤] Bool::True
spinclad ?eval my $count = undef; say $count.WHAT 16:30
pugsbot_r17185 OUTPUT[Scalarā¤] Bool::True
spinclad bogon
well, not here, maybe; but the source of the bogon's identity
time for a source dive to catch a pugs bug 16:33
bloonix good evening 16:37
Linux\2 shoots a paper ball at bloonixle
spinclad 'afternoon, bloonix
16:39 justatheory joined
bloonix :) 16:39
I have a problem
and cannot find a answer 16:40
16:40 Aankhen`` joined
bloonix I read different /proc files to collect statistics and I can read all files except some of /proc/sys/fs/... 16:40
pasteling "bloonix" at 87.78.223.119 pasted "system("cat /proc/sys/fs/file-" (12 lines, 186B) at sial.org/pbot/26700 16:41
moritz_ what's the semantics of file-nr? 16:44
btw the p6ish way to read files is 'for =$fh -> $line { say $line }'
bloonix while my $line = $fh.readline works as well. is that bad? 16:45
moritz_ readline autochomps, so the loop will exit at empty lines 16:46
moritz_ once fell into that trap
bloonix moritz_: the same result with your example
moritz_ pugs -e 'my $f="/proc/sys/fs/file-nr"; for =$f -> $a { say $a }'
2249 0 50119
bloonix it read just the first number
moritz_ funny
bloonix but I need all 3 columns 16:47
if I read /proc/uptime, /proc/stat or other files I have no problem
moritz_ if I just iterate over the file name, I get the desired result 16:48
opening it as a file doesn't work :(
bloonix moritz_: how do you do it? 16:49
moritz_ 18:46 < moritz_> pugs -e 'my $f="/proc/sys/fs/file-nr"; for =$f -> $a { say $a }'
18:46 < moritz_> 2249 0 50119
bloonix maybe its a workaround for me until it works
I test this and it doesnt work
ah 16:50
without open() ?
moritz_ aye 16:51
16:51 weinig joined
[particle] hrmm, would `cat` be something like =(@?ARGS>>.glob).say ? 16:53
bloonix I just use cat to show how file-nr looks 16:54
[particle] yes, i'm thinking about a platform-independent cat written in perl 6. it's not directly related to your question.
spinclad well, it's the shell doing the globbing
[particle] NOT ALL SHELLS GLOB :P
moritz_ [particle]: all good shells do ;) 16:55
spinclad true. does your cat do the globbing then?
[particle] yes, but we have perl because not all shells are good.
moritz_ [particle]: but on unix it's wrong to do "manual" globbing
[particle] why is it wrong? will it double-glob?
moritz_ at least if you have files containt *, ? etc.
[particle] ick.
okay, so a unix way to do cat would be =(@?ARGS).say ?? 16:56
spinclad think so
[particle] er, make that >>.
moritz_ or just .say for =<>; 16:57
[particle] how might you conditionally call a method?
moritz_ [particle]: with 'if'?
[particle] oh, nicer. i wonder if the fish will glob for you on windows
moritz_ we should assume that, yes ;) 16:58
s/assume/spec/ ;-)
[particle] the equivalent doesn't on perl 5
moritz_ hrm
[particle] i mean, you still need to test the os
moritz_ I don't do any coding under windows... do you usually filter @ARGV through glob? 17:00
[particle] it's like if (@ARGV) { @what = ($^O eq 'MSWin32') ? <@ARGV> : @ARGV; ... }
is there a noop method i can call? 17:01
spinclad i might consult POSIX on what a shell should do, and follow that, and infuriate users of toy OS's like $MS 17:02
diakopter ?eval my $c = 5; class foo { method c { $c } method s { $.c++; return $.c } $.s; } say foo.new.s; 17:03
pugsbot_r17185 OUTPUT[7ā¤] Bool::True
[particle] =(@?ARGS>>.{$?OS eq 'MSWin32' ? glob : noop)>>.say
=(@?ARGS>>.{$?OS eq 'MSWin32' ? glob : noop})>>.say #oops
spinclad can't you use different shells under the same $?OS ? 17:04
[particle] yes, on unix.
or cygwin, etc. 17:05
diakopter check this out:
?eval class foo { my $c = 5; method c { $c } method s { $.c++; return $.c } $.s; } say foo.new.s; say foo.new.c; say foo.new.s; say foo.new.c;
pugsbot_r17185 OUTPUT[2ā¤2ā¤3ā¤3ā¤] Bool::True
[particle] i don't know of a globbing shell on mswin32
PerlJam pasteling: bash :-)
17:05 flokuehn left
diakopter either foo.new gets reused, or $c escapes foo...? 17:06
spinclad [particle]: bash
[particle] bash on windows native? never heard of it.
Gothmog_ I don't think that cat should glob, independent of the OS.
diakopter or 'class' does not get its own scope.
Gothmog_ cygwin is native, isn't it? 17:07
spinclad (bash): would need a few shims...
17:07 weinig_ joined, fridim left
[particle] no, cygwin reports $^O eq 'cygwin' 17:07
it's a different platform
Gothmog_ Hrm.
moritz_ what about that "new" windows power shell?
iirc that's a .net thingy
17:07 weinig left
[particle] i don't know about 'monad' 17:07
moritz_ does this glob? 17:08
diakopter TimToady: any ideas on the ?eval above?
spinclad ?eval class foo { my $c = 5; method c { $c } method s { $.c++; return $.c } $.s; } say foo.new.s; say foo.new.c; say foo.new.s; say foo.new.c; 17:09
pugsbot_r17185 OUTPUT[2ā¤2ā¤3ā¤3ā¤] Bool::True
diakopter spinclad: see, the 5 is not used at all...
or... 17:10
spinclad ?eval class foo { has $.c = 5; method d { $.c } method s { $.d++; return $.d } $.s; } say foo.new.s; say foo.new.d; say foo.new.s; say foo.new.d;
pugsbot_r17185 OUTPUT[6ā¤5ā¤6ā¤5ā¤] Bool::True
moritz_ ?eval class foo {my $c = 3; say $c }
pugsbot_r17185 OUTPUT[3ā¤] Bool::True
moritz_ that's correct, I think
spinclad diakopter: right, we found out earlier that, inside method, it doesn't see the '= 5' part of the my 17:11
diakopter a class's block gets executed both at declaration and at .new() ?
spinclad it looks to me like the my gets half-cloned or something at the method boundary 17:12
pugsbug
moritz_ ?eval class foo { my $c; say $c; }; foo.new
pugsbot_r17185 OUTPUT[ā¤] foo.new()
moritz_ ?eval class foo { my $c = 3; say $c; }; foo.new
pugsbot_r17185 OUTPUT[3ā¤] foo.new() 17:13
moritz_ diakopter: only at declaration time
diakopter: which is the instatantiation time of the metaclass
spinclad ?eval class foo { my $c = 3; method d { say $c } }; foo.new.d
pugsbot_r17185 OUTPUT[ā¤] Bool::True
spinclad same as
?eval class foo { my $c = undef; method d { say $c } }; foo.new.d
pugsbot_r17185 OUTPUT[ā¤] Bool::True
spinclad ?eval class foo { has $.c = 5; method d { $.c } method s { $.c++; return $.c } $.s; } say foo.new.s; say foo.new.d; say foo.new.s; say foo.new.d; 17:16
pugsbot_r17185 OUTPUT[6ā¤5ā¤6ā¤5ā¤] Bool::True
diakopter (which seems right)
spinclad right
bug for my or our, not has
?eval class foo { our $c = 5; method d { $.c } method s { $.c++; return $.c } $.s; } say foo.new.s; say foo.new.d; say foo.new.s; say foo.new.d; 17:17
pugsbot_r17185 Error: No such method in class Scalar: "&c"
spinclad ?eval class foo { our $c = 5; method d { $c } method s { $.d++; return $.d } $.s; } say foo.new.s; say foo.new.d; say foo.new.s; say foo.new.d;
pugsbot_r17185 OUTPUT[2ā¤2ā¤3ā¤3ā¤] Bool::True
17:17 [particle] left 17:18 [particle] joined
diakopter ?eval class foo { my $c; $c = 3; say $c; method s { $c = $c + 1; say "hi $c " } $.s } foo.new.s; 17:18
pugsbot_r17185 OUTPUT[3ā¤hi 1 ā¤hi 2 ā¤] Bool::True
diakopter ?eval my $c; class foo { $c = 3; say $c; method s { $c = $c + 1; say "hi $c " } $.s } foo.new.s;
pugsbot_r17185 OUTPUT[3ā¤hi 4 ā¤hi 5 ā¤] Bool::True
17:19 weinig joined, weinig_ left
spinclad ?eval my $c = 3; class foo { say $c; method s { $c = $c + 1; say "hi $c " } $.s } foo.new.s; 17:20
pugsbot_r17185 OUTPUT[3ā¤hi 4 ā¤hi 5 ā¤] Bool::True
spinclad with $c coming from an outer scope, it's ok 17:21
17:21 sunnavy left
diakopter spinclad: same for my last eval above... $c = 3 inside foo 17:21
3,4,5
spinclad yes, the $c is still from an outer scope. 17:22
17:22 aman_ joined 17:26 aman_ left
bloonix hmmm 17:27
how could I do: 17:28
17:28 vel left
bloonix for (split /\s+/, <$fh>) in p6 ? 17:28
avar for split /\s+/, *$fh { ... } ? 17:29
Gothmog_ for =$fh>>.split(/\s+/) { ... } ? 17:30
bloonix for $fh.readline.split(rx/\s+/)
Gothmog_ Dunno, just guessing. :)
bloonix that runs
TimToady if you're splitting on whitespace you probably want .comb instead
bloonix $string.split.comb ? 17:31
or $string.comb?
TimToady $string.comb
bloonix *arg*
[particle] let's not split hairs
TimToady when you comb you comb *for* something rather than telling it what *not* to match 17:32
?eval " foo bar baz ".comb
pugsbot_r17185 (Match.new(ā¤ ok => Bool::True, ā¤ from => 2, ā¤ to => 5, ā¤ str => "foo", ā¤ sub_pos => (), ā¤ sub_named => {}ā¤), Match.new(ā¤ ok => Bool::True, ā¤ from => 1, ā¤ to => 4, ā¤ str => "bar", ā¤ sub_pos => (), ā¤ sub_named => {}ā¤), Match.new(ā¤ ok => Bool::True, ā¤ from => 1, ā¤ to => 4, ā¤ str => "baz", ā¤ sub_pos => (), ā¤ sub_named => {}ā¤))
spinclad .comb(<hair>) ?
.comb(/<hair>/) ? 17:33
bloonix what is equivalent with ${var} in p6 ?
TimToady @hair.comb(/<nits>/), more like
lambdabot Unknown command, try @list
spinclad that's one fine-toothed comb
[particle] well, usually when you're combing hair, you want the hair to remain
Gothmog_ ?eval " foo bar baz ".comb.perl.say
pugsbot_r17185 OUTPUT[(Match.new(ā¤ ok => Bool::True, ā¤ from => 2, ā¤ to => 5, ā¤ str => "foo", ā¤ sub_pos => (), ā¤ sub_named => {}ā¤), Match.new(ā¤ ok => Bool::True, ā¤ from => 1, ā¤ to => 4, ā¤ str => "bar", ā¤ sub_pos => (), ā¤ sub_named => {}ā¤), Match.new(ā¤ ok => Bool::True, ā¤ from => 1, ā¤ to => 4, ā¤ str => "baz", ā¤ sub_pos => (), ā¤ sub_named => {}ā¤))ā¤] Bool::True
TimToady bloonix: how do you want to use it?
Gothmog_ Hrm. 17:34
TimToady do you mean "var" literally as an identifier?
bloonix p5: print "Hello ${var}iable"
$var is the variable
TimToady print "Hello {$var}iable
closures interpolate 17:35
diakopter [particle]: depends if you're using the comb to untangle or delouse....? 17:37
TimToady well, in Perl comb defaults to combing the words out of your hair. :)
that is, default of .comb is .comb(/\S+/) 17:38
and it's really not terribly different from m:g/S+/
Gothmog_ ?eval my @a = <Hello world>; ">>{@a.join(", ")}<<".say
pugsbot_r17185 OUTPUT[>>Hello, world<<ā¤] Bool::True
[particle] .comb(/<ws>/)
grr, forgot the ! 17:39
Gothmog_ ?eval .say for "foo bar baz".comb
pugsbot_r17185 OUTPUT[fooā¤barā¤bazā¤] undef
TimToady ?eval .say for "foo bar baz".comb(/\S/) 17:40
pugsbot_r17185 Error in perl5 regex: << [^\s] >> ā¤'require' trapped by operation mask at (eval 26) line 1.ā¤ā¤Error in perl5 regex: << [^\s] >> ā¤'require' trapped by operation mask at (eval 29) line 1.ā¤ā¤Error in perl5 regex: << [^\s] >> ā¤'require' trapped by operation mask at (eval 32) line 1.ā¤ā¤Error in perl5 regex: << [^\s] >> ā¤'require' trapped by operation mask at (eval 35) line 1.ā¤ā¤Error in perl5 regex: << [^\s] >> ā¤'require' trapped 17:41
TimToady oh yeah, evalbot mislikes character classes still
problem is apparently that the P5 implementation needs to require files for Unicode support, and require is not considered a safe operation 17:42
?eval .say for "foo bar baz".comb(/<!ws>/) 17:43
pugsbot_r17185 OUTPUT[ā¤ā¤ā¤ā¤ā¤ā¤] undef
bloonix sprintf('%i', 4 / 3) says: 17:44
TimToady ?eval .say for "foo bar baz".comb(/<!before <ws>>./)
bloonix pugs: Printf.printf: bad formatting char i
pugsbot_r17185 OUTPUT[fā¤oā¤oā¤ ā¤bā¤aā¤rā¤ ā¤bā¤aā¤zā¤] undef
TimToady apparently Haskell doesn't support the %i synonym for %d 17:46
Gothmog_ ?eval .say for "foo bar baz".comb(/<alpha>/)
pugsbot_r17185 *** Cannot parse regex: <alpha>ā¤*** Error: ā¤undef
TimToady or maybe it's a pugsbug
bloonix okay, it shouldnt be a problem to use %d 17:47
TimToady ?eval .say for "foo bar baz".comb(rx:P5/[a-zA-Z]/)
17:47 Psyche^ joined
pugsbot_r17185 OUTPUT[fā¤oā¤oā¤bā¤aā¤rā¤bā¤aā¤zā¤] undef 17:47
TimToady ?eval .say for "foo bar baz".comb(rx:P5/[a-zA-Z]+/)
Gothmog_ Hum.
pugsbot_r17185 OUTPUT[fooā¤barā¤bazā¤] undef
Gothmog_ :) 17:48
TimToady ?eval .say for "foo bar baz".comb(rx:P5/[[:alpha:]]+/)
pugsbot_r17185 OUTPUT[fooā¤barā¤bazā¤] undef
TimToady ?eval .say for "foo bar baz".comb(rx:P5/\w+/) 17:49
pugsbot_r17185 OUTPUT[fooā¤barā¤bazā¤] undef
TimToady ?eval .say for "foo bar baz".comb(/\w+/)
pugsbot_r17185 Out of memory!
bloonix it seems that the modulo operator doesnt work :/
TimToady woot
bloonix ?eval 5 % 2
pugsbot_r17185 1
Gothmog_ Seems to work correctly. :)
bloonix ?eval my $x = 5; $x % 2 17:50
pugsbot_r17185 1
bloonix wtf
okay, my false
*** Can't modify constant item: VRef ...
I used ($s) instead of ($s is copy) 17:51
17:58 IllvilJa left 17:59 Patterner left, Psyche^ is now known as Patterner 18:02 dduncan joined 18:11 chris2 left 18:13 hakobe is now known as hkb_zz 18:16 IllvilJa joined, iblechbot left 18:19 rindolf joined 18:25 cauchy joined 18:26 fglock left
Tene I'm working on trimming down this segfault to an isolated test case... 18:54
allalone.org/test.pl
Before I go any more, can someone try running that and connecting to it to confirm that it segfaults on other systems? 18:55
Oh, I could try on feather. 18:56
Yeah, it segfaults when run on feather. 18:57
Blwood my $port = @ARGS[0] // 1370; ? 19:00
@ARGS[0] works :o ?
lambdabot Unknown command, try @list
Blwood I thought it was @*ARGS[0] 19:01
Tene Actually, looks like it still segfaults withotu all that socket stuff.
updated version up
19:03 Aankhen`` left 19:04 Aankhen`` joined
Tene ?eval my $thr = async { my $m = 'hello' ~~ m/h/; }; 19:05
pugsbot_r17185 (no output)
Tene ?eval my $thr = async { my $m = 'hello' ~~ m/h/; say $m.perl }; 19:06
pugsbot_r17185 (no output)
Tene Looks like that's all it is. 19:07
PerlJam Blwood: @ARGS is a short-hand for $*ARGS; (The * is only there to signify that you really and truly do mean the global variable rather than some local variant) 19:09
er, s/$*ARGS/@*ARGS/
TimToady Tene: you're probably getting interaction between threads and Perl 5 19:13
Tene TimToady: where does Perl 5 come into that example? 19:14
TimToady PerlJam: @ARGS should not work under strict, since failover from the current package to GLOBAL is not the default
pattern matching is done with PCR 19:15
Tene Ahh.
TimToady same reason evalbot gets upset about character classes
PerlJam TimToady: good to know. These are the details I don't remember since I don't have a language compiler to remind me of them :) 19:16
TimToady: btw, are stricture and warnings both on by default?
TimToady supposed to be 19:17
Tene So, no pattern matching with threads?
PerlJam oh good.
19:17 drrho joined
TimToady Tene: you might get away with :P5 matches if it uses pcre (not sure) 19:18
Tene :/
TimToady that's why I keep asking for someone to write a real regex engine in Haskell, but no takers so far... 19:19
[particle] anybody wanna convert pir to haskell?
TimToady would help greatly with the STD bootstrap as well... 19:20
just port parrot to haskell and you're done. :)
[particle] you'll get pge for free :)
TimToady or haskell to parrot :)
moritz_ just do C in haskell ;) 19:21
diakopter TimToady: www.nondot.org/sabre/Projects/HaskellLexer/
lambdabot Title: The Haskell Dynamic Lexer Engine
diakopter by the creator of llvm, no less
19:26 Aankhen`` left
diakopter that dynamic lexer might be helpful... obviously its Regex module is not complete enough to be 'real', but it could be a good start... 19:29
bloonix what happends on "for =$file" if $file is not IO ?
I dont understand it
my $file = '/foo/bar'; for =$file ... works, but why? 19:30
19:31 stevan_ left
PerlJam bloonix: because that's what unary = is defined to do ? :) 19:31
bloonix read from a handle? 19:32
TimToady = iterates an iterator. the iterator for Str treats it as a filename, I think
bloonix but $file isnt a handle
19:32 daxim joined
PerlJam bloonix: I think you're getting hung up on one particular world view. 19:33
bloonix: think MMD.
bloonix MMD? :)
moritz_ multi method dispatch 19:34
TimToady prefix:<=>($io) doesn't have to call the same function as prefix:<=>($string)
PerlJam heh ... it would be "interesting" to type variables based on their name. 19:35
hungarian notation in the flesh!
bloonix the thing is that Im not able to readline from /proc/sys/fs/file-nr - as example - but Im not able to execute die() if "for =$file" doesnt works
I would like to work with "open() or ..." 19:36
moritz_ PerlJam: we do it all the time... if the name starts with a '@', it's an array ;)
bloonix is that a current bug?
19:36 weinig left
PerlJam moritz_: heh. 19:36
TimToady open or should work fine, as long as you use the p6 syntax and not the p5 syntax 19:37
PerlJam moritz_: yeah, I was thinking more fortranish though.
TimToady open in p6 returns the handle rather than taking it as the first arg
(doesn't have all the options of p5's open yet, either)
bloonix TimToady: but Im not able to read the file from the handle with "for =fh" because I get only the first sign
PerlJam my $io_thingy === my IO $thingy # would be "interesting" :)
TimToady =$fh 19:38
there are no bareword handles anymore
bloonix sial.org/pbot/26700 19:39
lambdabot Title: Paste #26700 from "bloonix" at 87.78.223.119
moritz_ TimToady: try pugs -e 'my $f = open("/proc/sys/fs/file-nr"); say =$f' on your platform
TimToady: doesn't work for me as well
bloonix it reads only "6"
moritz_ it prints only the first char that head -n1 /proc/sys/fs/file-nr prints 19:40
bloonix some files works, some not 19:41
Daenyth` What is the correct way to refer to a class variable? If class foo { has $.bar; }, how would I refer to it?
lambdabot Daenyth`: You have 2 new messages. '/msg lambdabot @messages' to read them.
Daenyth` TimToady: thanks for clearing up my bug
moritz_ Daenyth`: I think it's foo.bar 19:42
Daenyth` I didn't know about the constant keyword :)
TimToady bloonix: looks like a bug
19:43 rindolf left
TimToady well, at least this works: pugs -e 'say "/proc/sys/fs/file-nr".slurp' 19:43
Daenyth` ?eval: class foo { has $.bar = 'baz'; } my $quoz = foo.new; say $quoz.bar 19:44
pugsbot_r17185 Error: ā¤Unexpected ": class"ā¤expecting "::"
TimToady ?eval class foo { has $.bar = 'baz'; } my $quoz = foo.new; say $quoz.bar 19:45
pugsbot_r17185 OUTPUT[bazā¤] Bool::True
Daenyth` oh
haha
TimToady Daenyth`: I wouldn't call that a class variable. "has" declares instance attributes
moritz_ Daenyth`: if you want a _class_ variable, it's class foo { my $bar }
Daenyth` I'm not very good at OO.. I'm just starting to play with it now 19:46
Can you point me at something that would help clarify the difference?
moritz_ Daenyth`: read "Objekt Orient Software Construction" by Bertrand Meyer ;)
TimToady in general, I'd avoid class variables for now; you usually don't want them 19:47
Daenyth` so use has for now?
TimToady use objects as objects, not classes
Daenyth` I don't follow
TimToady a class describes a set of objects, not an object 19:48
Daenyth` I'm pretty sure that's what I want
TimToady without a new, there is no object
and, in fact, in Perl 6 there's no type "Class" per se
Daenyth` Oh by the way, last night I found what looks like a bug. I have no clue how to write a test for it though 19:49
if you define a class method with the same name as a builtin method, it won't work 19:50
Tene Daenyth`: explain more.
Daenyth` hang on and I'll pastebin my code
actually
you know what
TimToady I thought I sent messages about that through lambdabot...
Daenyth` let me try one thing, I may be wrong.. I had a bug that I didn't know about before when I got that error
TimToady: not that one 19:51
and thank you for the help on that
TimToady what, *another* bug!!!?!??!
how can that be? :)
Daenyth` hmm strange
TimToady btw, easiest way to learn to write tests is to look at some that are already like the one you want
Daenyth` I tried using the constant thing you told me about, and it said undeclared variable 19:52
so it's still trying to figure out the class before the %botconfig
TimToady what version of pugs are you using?
Daenyth` sec
6.2.13
TimToady which revision (the rXXXXX number)?
Daenyth` where do I find that
pugs --version doesn't say 19:53
TimToady then it's probably about 9 months out of date
Daenyth` aha
I think I might have done it through cpan.. not sure
lemme check 19:54
TimToady recommend you use the latest and greatest by checking out directly from svn.pugscode.org/pugs
Daenyth` I'll uninstall this version
TimToady we were going to turn a 6.28 release several months ago but audreyt got very sick and is still recovering 19:55
and you'll want a commit bit eventually
Daenyth` how would I remove something installed via cpan 19:56
TimToady you're the daenyth of that name at gmail?
Daenyth` yes
The one and only :P
Where have you seen me before?
TimToady google 19:57
Daenyth` ?
19:58 weinig joined
TimToady I googled for daenyth, and as you say, you're the one and only, so it was easy 19:58
Daenyth` aha
yeah
most the one and only...
mostly^
TimToady I'd mention you live in MA, but you'll think I'm a stalker...
Daenyth` It's information I've made no effort to hide
if it wasn't linked to my name you'd see it in my hostmask 19:59
TimToady do you prefer Daenyth or daenyth for your project handle?
Daenyth` Daenyth I suppose
I'm dissapointed about the uniqueness of my name though.. someone took it and used it on WoW 20:00
I suppose I can take that as flattery, but what's worse is someone also used my name in some slash-fic :/
that one is.. not cool
20:01 Casan joined
TimToady mail sent. it's customary to add your name to AUTHORS as first checkin to make sure it all works right 20:01
welcome aboard
20:01 Schwern left
Daenyth` thanks 20:01
20:04 pjcj_ joined 20:05 drrho left, jisom left 20:06 Blwood left, szbalint left, agentzh left, avar left, r0bby left, diakopter left, idiotmax left, awwaiid left, JarJarBi1ks left, mr_ank left, lidden_ left, integral left, spinclad left, zamolxes left, pugsbot_r17185 left, TimToady left 20:07 rgs left
Daenyth` so if I added pugs through cpan Perl6::pugs, how would I remove it? 20:08
20:08 rgs joined, devogon_ joined
DarkWolf84 !eval < a b c > 20:09
devbot6 DarkWolf84: Error: "eval" is not a valid command.
20:09 SCalimlim left
DarkWolf84 ! < a b c > 20:09
devbot6 DarkWolf84: Error: "<" is not a valid command.
DarkWolf84 ! < a b c >.say
devbot6 DarkWolf84: Error: "<" is not a valid command.
[particle] ?eval < this way >
DarkWolf84 hah
20:09 toly left, toly_ joined, SCalimlim joined
DarkWolf84 o yeah i forgot 20:09
20:10 integral joined, lidden joined
DarkWolf84 ?eval < a b c > 20:10
20:10 TimToady joined, JarJarBinks joined, awwaiid joined
DarkWolf84 ?eval < a b c >. say 20:10
?eval < a b c >.say
not work 20:11
Daenyth` the bot got netsplit
TimToady I guess I'm back 20:12
DarkWolf84 will It be safe to innstall cvs version of pugs?
install* 20:13
TimToady where are you finding a cvs version of pugs?
pugs is natively svn
DarkWolf84 i mean svn
Daenyth` TimToady: if I installed pugs with cpan Perl6::pugs, how would I remove it? 20:14
TimToady we tend not to install currently
what kind of OS are you on?
Daenyth` archlinux
20:14 rgs left
DarkWolf84 i'm on gentoo linux 20:14
20:14 rgs joined
TimToady I just make a symlink of pugs from /usr/bin into my build directory instead of installing 20:15
otherwise you're always running the wrong pugs...
Daenyth` mmm
20:16 REPLeffect joined
TimToady if you have the source directory, a "make uninstall" might work 20:16
Daenyth` alright..
lemme see if I do
where would cpan put that? I haven't had to remove anything from it before
TimToady otherwise go out and remove the bin/pugs lib/Pugs-6.2.13 (or rename) 20:17
probably in /usr/local
Daenyth` ok
TimToady but maybe in /usr
the locate or slocate might find them
20:18 Blwood joined
Daenyth` /root/.cpan it seems 20:18
alright
TimToady some CPAN packages are notably unsuccessful in uninstalling themselves...
don't know about this one 20:19
Daenyth` this one is also :|
so remove /usr/bin/pugs and /usr/lib/pugs-etc?
TimToady or Pugs-etc
Daenyth` yeah 20:20
TimToady then just compile a new one and run it from your build directory (or symlink it, as I said)
20:20 broquaint left, broquaint joined
Daenyth` yeah 20:21
alright
so remove /usr/lib/perl6?
DarkWolf84 no evalbot :( 20:22
Blwood Is it possible to declare a method protected/public/private ?
TimToady don't know about that; mine only contains metamorph.pl
there is no protected 20:23
20:23 ruoso left
TimToady the syntax for private methods hides them from the outside world completely, so they're completely independent of public methods 20:23
bcmb Daenyth`: you can safely remove /usr/lib/perl6 20:24
Blwood and we declare them like this : method somethin is private ?
Daenyth` yeah
installing svn
be there soon
Blwood Daenyth`, do you use debian ? 20:25
there are unofficial pugs .deb files
20:25 Casan_ left
TimToady Blwood: you can, but since it's called with $obj!foo you can just declare it as method !foo 20:26
Daenyth` arch
doesn't really help me much :P
[particle] my method i_am_a_private_method ()
TimToady not sure whether pugs implements private methods yet 20:27
since they're really just subs in disguise
Daenyth` there's no warnings.pm or anything like that, right?
TimToady warnings are supposed to be on by default
Daenyth` hmm 20:28
TimToady but pugs doesn't do everything p5 does in that regard yet
Daenyth` wierd
yeah
TimToady and warnings, unlike in p5, are really just resumable exceptions, so to suppress them in a dynamic scope you just use an exception handler
we don't have a framework for lexical warnings yet 20:29
but presumably it'll resemble p5
s
p5's
Daenyth` ugh
my ghc version is .1 version short
sigh
took forever to compile
DarkWolf84 mine to 20:30
I'm waiting now
Daenyth` is 6.6.1 svn?
or is my package out of date
DarkWolf84 i get the source from www.haskell.org/ghc/download_ghc_661.html 20:31
lambdabot Title: GHC: Download version 6.6.1
Daenyth` ah, it's out of date
checked the arch website, ghc is flagged as old
here we go again... 20:32
Blwood TimToady, how we can know what's implemented in pugs and what's not ? Is there a file ? (apart from the changelog file)
20:32 diakopter joined
[particle] spec.pugscode.org 20:32
20:32 ChanServ sets mode: +o diakopter
[particle] the synopses have links to the tests associated with the text 20:33
20:33 diakopter sets mode: +o TimToady, diakopter sets mode: -o diakopter
TimToady Blwood: and the test matrix: m19s28.vlinux.de/iblech/stuff/pugs-...dda81.html 20:33
[particle] note, this is not done for all tests
lambdabot Title: TAP Matrix - Sun Aug 5 22:56:05 2007 GMT, tinyurl.com/29telr
Blwood oh cool thank you :) 20:34
TimToady that's just one of them, look in m19s28.vlinux.de/cgi-bin/pugs-smokeserv.pl for the rest 20:35
lambdabot Title: Pugs Smoke Reports
20:35 pugs_svnbot left, lisppaste3 left 20:36 pugs_svnbot joined, devbot6 left 20:37 pugs_svnbot left
Blwood So if I understand this page : ttp://tinyurl.com/29telr countains all the test ? 20:37
tests*
and pugs will work 100% when all these tests are 100% ?
TimToady that's what a "make smoke" produces
20:37 franck___ left
TimToady well, more like 200%, since we only have 18,000 tests so far, and probably need about twice that... 20:37
:) 20:38
Blwood ah so we need to write tests ?
pasteling "pugsbot_r17185" at 193.200.132.135 pasted "Pugs build failure" (6 lines, 278B) at sial.org/pbot/26708
Blwood when we find a bug or something ?
20:38 devogon left, pugsbot_r17185 joined
TimToady that's what we do instead of all the heavy-handed bug reports that some projects use :) 20:39
diakopter ?eval 'hi'
pugsbot_r17185 "hi"
TimToady yay
diakopter ?eval "what's a character class?" 20:40
pugsbot_r17185 "what\'s a character class?"
Blwood TimToady, yeah it's a nice idea
DarkWolf84 ?"hello".say
lambdabot Unknown command, try @list
TimToady I blame audreyt
DarkWolf84 ?"hello"
20:40 lisppaste3 joined
lambdabot Unknown command, try @list 20:40
diakopter ?eval "hello".say
pugsbot_r17185 OUTPUT[helloā¤] Bool::True
DarkWolf84 ?eval "hello".say 20:41
pugsbot_r17185 OUTPUT[helloā¤] Bool::True
DarkWolf84 right
?eval < 1 2 3 >.say
pugsbot_r17185 OUTPUT[123ā¤] Bool::True
Blwood ?eval ("hey" xx 2).join(" ! ").say; 20:42
pugsbot_r17185 OUTPUT[hey ! heyā¤] Bool::True
DarkWolf84 ?eval < 1 2 3 > xx2
pugsbot_r17185 Error: ā¤Unexpected "xx2"ā¤expecting operator
DarkWolf84 ?eval < 1 2 3 > xx 2
pugsbot_r17185 ("1", "2", "3", "1", "2", "3")
DarkWolf84 work
20:42 SCalimlim left, szbalint joined, Southen left, SCalimlim joined
Blwood I like perl6 synthax :) 20:43
Daenyth` It feels a lot cleaner than perl5
TimToady me too, but I'm known to be prejudiced in the matter
Daenyth` or maybe it's just the fact that I have barely any code and my coding style has improved...
DarkWolf84 for me too it's much easier
Blwood mm don't know if it's much easier
much easier becomes python :( 20:44
DarkWolf84 for classes it's easier
no bless
:)
Blwood yeah classes are really cleaner
Daenyth` perl5 was the reason I never learned OO >.>
Blwood haha
TimToady me too :)
Daenyth` I must say, I'm very impressed 20:45
anxiously awaiting the final release
Blwood everything is object in perl6. isn't it ?
[particle] parrot finally made me learn oo
TimToady if you scratch it hard enough
[particle] ?eval 4.say
pugsbot_r17185 OUTPUT[4ā¤] Bool::True
TimToady ?eval 4.WHAT
pugsbot_r17185 ::Int 20:46
20:46 Southen joined
DarkWolf84 I read somewere that some functions like err are already in perl5.9 20:47
[particle] yep, and smartmatch aka given/when, and more 20:48
Blwood err ?
[particle] defined-or
TimToady though undoubtedly their smartmatch semantics will turn out to diverge from P6's... :(
Daenyth` I'm probably abandoning perl5 the day perl6 comes out 20:49
TimToady which will make it interesting to translate 5.10 to 6
[particle] luckily that's not my job :)
TimToady you can still make a good living programming COBOL, I hear...
Daenyth` What would happen if you coerce a string into an array? 20:50
[particle] i heard lawyers write cease and desist letters in cobol
20:51 TJCRI left
TimToady ?eval Array("string") 20:51
pugsbot_r17185 Error: No such subroutine: "&Array"
TimToady ?eval "string" as Array
pugsbot_r17185 Error: ā¤Unexpected "as"ā¤expecting operator
Blwood is there a forum around perl6 on the web ? 20:52
Daenyth` yay.. Now I get to wait for ghc 6.6.1 to compile 20:54
sigh
longest ./configure I've ever seen...
[particle] once you have 6.6.1 compiled, it'll compile 6.8 much faster ;) 20:55
Daenyth` heh
20:59 ozo joined, jhorwitz_ joined 21:12 BillyMac joined 21:13 stevan_ joined
BillyMac Hello 21:13
21:16 jhorwitz left
BillyMac I am interested in helping out... 21:16
bcmb BillyMac: you may want to look at www.perlfoundation.org/perl6/index....g_involved 21:17
lambdabot Title: Getting Involved / Perl 6
Daenyth` I wish ghc would hurry up and compile 21:18
boo@out-of-date-package
BillyMac Thanks; I got here from: svn.pugscode.org/pugs/docs/01Overview.html 21:20
lambdabot Title: Pugs Apocryphon 1
BillyMac it simply says: ask :) 21:21
diakopter BillyMac: how would you like to help?
Daenyth` (1) Donate soul
>.>
21:21 jjore-w joined
BillyMac nope, already sold that... 21:21
other thoughts?
Daenyth` hmm 21:22
firstborn child...?
You could also try to find bits perl6 code that should run but don't
BillyMac neither first nor second before my life; sorry
now we're getting somewhere...
21:23 weinig left
diakopter BillyMac: do you have subversion commit credentials? 21:23
BillyMac I have started to get the bits and pieces for Pugs to build on my system; no 21:24
diakopter (if you don't, PM me your email address and preferred svn username)
BillyMac OK 21:25
diakopter BillyMac: invitation sent! 21:26
21:27 cognominal_ left, Southen left, cognominal_ joined, buetow left, weinig joined
BillyMac Thanks, I'll check for it now 21:28
21:30 HiTech69 left
Daenyth` ARG 21:30
ghc compile failed 21:31
after waiting half an hour
diakopter BillyMac: as Daenyth said, finding untested specs and use cases and writing tests for them is very needed. Especially for the portions of the specs that TimToady hasn't finished yet. :) (That should help motivate him to write them up) ;)
21:31 Southen joined
Daenyth` collect2: ld returned 1 exit status 21:31
<<ghc: 175706608 bytes, 37 GCs, 1050836/2002448 avg/max bytes residency (2 samples), 19M in use, 0.02 INIT (0.00 elapsed), 0.94 MUT (5.62 elapsed), 0.09 GC (0.12 elapsed) :ghc>>
make[2]: *** [GHC/Base.o] Error 1
;_;
TimToady you can't use a precompile one? 21:32
Daenyth` my package is out of date
BillyMac OK, those the items so noted in make test?
Daenyth` ok 21:33
wow
I did not see the "binary packages" link on the ghc site 21:34
I win :(
BillyMac Would you be able to suggest one to get me pointed in the right direction, please? Then I can go off and investigate in order to speak more intelligently the next time around :) 21:37
TimToady BillyMac: see earlier discussion at moritz.faui2k3.org/irclog/out.pl?ch...l6#i_76825 21:38
lambdabot Title: IRC log for #perl6, 2007-08-06
BillyMac Will do. Thanks!
TimToady particularly the links to the test matrix
21:39 nnunley_ joined
BillyMac OK; back when I have been through that information... 21:40
21:40 spinclad joined, nnunley left
Daenyth` so for ghc if I do "make in-place" it would just put the binary whereever I exploded the package 21:41
?
21:46 BillyMac left
TimToady presumably 21:47
Daenyth` alrighty
21:53 weinig_ joined 21:57 pugs_svnbot joined 21:59 Yaakov joined 22:09 weinig left 22:10 Limbic_Region joined
Daenyth` hmm 22:18
22:19 stevan_ left, nekokak_ joined
Daenyth` If the maintainer updates ghc to 6.6.1, I might be able to make a pugs-svn package for archlinux's AUR repository 22:20
Not sure; I've never made an arch package before, but it seems pretty simple
How far am I in the compile if I'm at: [ 57 of 109] Compiling Pugs.AST.Internals.Instances ( src/Pugs/AST/Internals/Instances.hs, dist/build/Pugs/AST/Internals/Instances.o ) 22:21
is that 109 the total make's, counting everything? 22:22
TimToady 109 is end of building pugs object files. does a bit of stuff in subdirs after that
and builds precompiled Prelude and Test 22:23
but those don't take a long time
Daenyth` alright
22:25 Schwern joined
Blwood if I declare an attribute rw in a Class, can I change its value in the programm ? 22:29
pugs_svnbot r17221 | bloonix++ | some code fixes
diff: dev.pugscode.org/changeset/17221
Daenyth` pretty sure that's the point of declaring it rw
lambdabot Title: Changeset 17221 - Pugs - Trac
Daenyth` @source
lambdabot not available
22:30 aindilis left
pugs_svnbot r17222 | bloonix++ | new modules 22:30
diff: dev.pugscode.org/changeset/17222
lambdabot Title: Changeset 17222 - Pugs - Trac
bloonix oops
svn++
Daenyth` @help
lambdabot help <command>. Ask for help for <command>. Try 'list' for all commands
Daenyth` @list
Blwood Daenyth`, yeah I thought the same but : pastebin.com/d3f20227 doesn't work :(
lambdabot www.cse.unsw.edu.au/~dons/lambdabot/COMMANDS
Daenyth` $.pseudo = "otherguy"; 22:31
pugs_svnbot r17223 | bloonix++ | test files for Sys::Statistics::Linux::*
diff: dev.pugscode.org/changeset/17223
lambdabot Title: Changeset 17223 - Pugs - Trac
Daenyth` shouldn't that be $drinker.pseudo?
22:32 jhorwitz_ left
Blwood Daenyth`, doesn't work :( 22:32
22:33 araujo joined
Daenyth` error message? 22:33
Blwood "*** No such method in class Bool: "&pseudo" 22:34
Daenyth` hrm
DarkWolf84 strange 22:36
pugs_svnbot r17224 | bloonix++ | kicked shebang from 13FileStats.t
diff: dev.pugscode.org/changeset/17224
lambdabot Title: Changeset 17224 - Pugs - Trac
22:37 nekokak left
DarkWolf84 is there something like perldoc in pugs 22:47
?
bloonix perlcabal.org/syn/ 22:48
lambdabot Title: Official Perl 6 Documentation
TimToady Blwood: that's because you have a spurious .drink after the .new
Daenyth` is ghc needed to run pugs or only to compile it?
TimToady so $drinker is the result of the say
only to compile, I think, though not sure what libs it might link 22:49
Daenyth` ok
hmm 22:50
I'm reading up on how to make a package
I won't be able to make a working one until the ghc package is updated though
pugs_svnbot r17225 | lwall++ | better handling of statement- and arglist-ending curlies as EXPR terminators 23:00
diff: dev.pugscode.org/changeset/17225
lambdabot Title: Changeset 17225 - Pugs - Trac
pasteling "Daenyth" at 24.91.13.73 pasted "Unexpected "\\" expecting operator or "}" at crapbot.p6 line 43, column 29" (71 lines, 1.4K) at sial.org/pbot/26717 23:04
23:06 vel joined
dduncan to whom it concerns, Pugs doesn't parse this yet: grammar MuldisD:ver<0.3.0>:auth<cpan:DUNCAND>; 23:06
but it does parse the form: grammar MuldisD-0.3.0-cpan:DUNCAND; 23:07
I prefer the named form 23:08
bloonix how can I test if a routine exists in another namespace? I search the equivalent for UNIVERSAL::can($package, $sub); 23:09
dduncan one moment ...
TimToady Daenyth`: you need .print: rather than just .print (or use parens around the arg)
Daenyth` aha, thanks
hmm 23:10
dduncan bloonix, look up .meta in Synopsis 12
or ... 23:11
TimToady the metaclass would be .HOW these days
Daenyth` TimToady: by the way, making my %hash constant didn't work. I'll just pass it as parameters to new() for now I suppose 23:12
TimToady but if it's in a package you can just use defined &FOO::bar
23:12 nperez left
TimToady you don't want "my constant", but just "constant" 23:12
Daenyth` ok, alright.. 23:13
let me try that then
TimToady constant isn't a type, it's a scope (compiler scope)
dduncan bloonix, I was going to look up how I was doing that already, but now I'm not sure that I try that anymore
Daenyth` Is there any comprehensive guide for perl5 users switching to 6? Similar to perl5's "pitfalls for perl4 users", etc
dduncan but probably .HOW is the way to go, whenever that works
not sure implemented yet 23:14
TimToady depends on MO upgrade
dduncan yes
bloonix dduncan: I hope so. until it works I use a workaround
TimToady Daenyth`: nothing comprehensive, probably several out-of-date starts
by one reckoning, the synopses are precisely that comprehensive guide 23:15
Daenyth` it's just a little difficult having it spread all over
?eval constant $foo = 'foo'; constant %bar = ( bar => "$foo" ); say %bar<bar>; 23:16
pugsbot_r17185 OUTPUT[ā¤] Bool::True 23:17
Daenyth` hrm
strange, on mine it barfs...
rhizo for %h.kv -> $k, $v { # hm, wonder why not %h.each ?
it's more in English, and goes well with .keys and .values 23:18
TimToady it's hard to have something comprehensive that is not also big
Daenyth`: that's a known bug with constant 23:19
Daenyth` alright
I'll just hardcode the string for now I suppose
TimToady in fact, I wrote the test in the test suite for that bug. :)
Daenyth` Is there any guide on how to write tests? 23:20
for a socket filehandle, I would want to declare my $sock is IO = connect(foor, bar)? 23:23
23:23 vel left
TimToady see pod in pugs/blib6/lib/Test.pm 23:23
Daenyth` thank you
TimToady probably don't want "is IO" there 23:25
"is" on a variable declaration is like a P5 tie
Daenyth` ok
TimToady if you just want to say what $sock holds, say "my IO $sock"
Daenyth` so rather I would do: has $.socket; $.socket is IO = connect()?
TimToady you don't want that "is IO" either. "has IO $.socket;" 23:26
Daenyth` ah, ok
TimToady "is" is really only for declarations of container types and ISA relationships 23:27
(pugs mostly ignores the type declarations at this point) 23:28
Daenyth` for an array that will contain only strings, would I do has Str @array;?
TimToady yes, it's the type of each element
Daenyth` alright
:)
dduncan fyi, my first cut at a complete, and successfully compiling, but otherwise untested, Perl 6 grammar can be seen at utsl.gen.nz/gitweb/?p=Language-Muld...rammar.pod 23:31
lambdabot tinyurl.com/33hvb5
23:32 lumi joined
Daenyth` TimToady: if you define a method with the same name as a builtin, it breaks 23:34
TimToady dduncan: your use of parentheses around literals seems odd
Daenyth` is that a known bug?
dduncan the parenthesis indicate a capture, afaik 23:35
TimToady paste?
Daenyth` sec
dduncan TimToady, am I not supposed to indicate captures in a grammar?
eg, what the resulting tree has in it? 23:36
diakopter Daenyth`: 'make soon' produces a ./pugs that's more than sufficiently fast... and finishes building far earlier.
TimToady I guess it's okay.
dduncan or if you mean my having some nested parens in one place, that may be due to my being unsure how many are needed
Daenyth` diakopter: what's the cost of doing that?
TimToady just most grammars end up returning typed objects so you don't need string discriminators in $0, is all... 23:37
Daenyth`: runs a little slower. I always just do the normal make myself because my machine's not too slow 23:38
pasteling "Daenyth" at 24.91.13.73 pasted "Cannot name a class method the same as a builtin" (97 lines, 2K) at sial.org/pbot/26718
dduncan with my grammar, I'm assuming that all returned object payloads will be Str, which I further process to derive an actual type
Daenyth` TimToady: that code has a lot of junk in it irrelevant to the problem
dduncan is that abnormal?
Daenyth` I can produce a cleaner example if you'd like
TimToady that's very odd 23:44
try it with "method connect () {" instead? 23:45
Daenyth` k
dduncan also keep in mind that, while I used a Perl 6 grammar there, that file is more meant to be representative ... it could very well be a grammar for Muldis D under Perl 6, but I may have to define the grammar in some other way for Muldis D hosted over Parrot, or Perl 5, or whatever ... 23:46
Daenyth` *** No compatible multi variant found: "&connect" 23:47
dduncan also, the grammar is kept simple on purpose, expecting some post-processing of the parse tree, partly so it is easy to write a parser without using any non-core modules
Daenyth` maybe declare it as multi method connect () {
?
TimToady no, yours is an ordinary method
dduncan eg, I'd want to be able to parse that Muldis D under Perl 5 using just Perl 5 regexes 23:48
TimToady it's complaining about not finding the builtins because the types don't match
Daenyth` types of what?
dduncan hence, eg, escaped quotes in strings are spelled \q rather than \', so any literal ' actually are string delimiters
anyway, what I showed you should be going on CPAN later today 23:49
TimToady type of args to the builtin connect 23:50
Daenyth` hmm
TimToady so something about server,port isn't matching up
Daenyth` is connect expecting connect( string, int )?
TimToady should be 23:51
Limbic_Region I saw a Haskell book in Borders the other day - it was on sale for $55
Limbic_Region did not buy it
Daenyth` heh
Limbic_Region besides the price, it focused on hugs not ghc
not that there should be a huge difference 23:52
TimToady print out the values of $.server and $.port before? 23:53
Daenyth` they were correct
I cut them out of the paste but I did $bot.dump right before $bot.connect
I renamed the function for now 23:54
TimToady well, try renaming your method and see if it's interfering somehow, I guess
Daenyth` it works when I rename it 23:55
on to the next bug...
99 bugs in the code, 99 bugs in the code, fix one bug, compile it again, 100 bugs in the code....
TimToady okay, something's screwed up in the MMD dispatcher then
connect() should not be calling .connect() 23:56
Daenyth` I now get *** Undeclared variable: ("$__SELF__", 15~ lines of barf) at crapbot.p6 line 61, column 32-40
line 61 is method readln
$bot.newconn; works, it's when I call $bot.readln that it dies 23:57
diakopter yes, the MMD has been broken for (50..300).any revisions