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.
Blwood when I use a regex inside a given/when : when m:P5/:(\w+)\s+/, I know the (\w+) refers to $0 but how can I do something like : my($var) = $string =~ m/:(\w+)/ in perl5 : O ? 00:00
diakopter from what I can tell, it always picks the first declared method of a given name
bloonix puh 00:01
*** No compatible multi variant found: "&set"
I dont know why it comes
I have only one method called set
and if I try to call it with self.set(%p) this error occurs 00:02
TimToady how is set declared? 00:03
bloonix method set (*%p) {
TimToady you might need self.set(|%p) if you want to pull the pairs out as named args 00:05
alternately drop the * on the sig
bloonix thx
TimToady as it is you're passing a positional hash argument, and *%p isn't seeing anything
diakopter Daenyth`: nopaste your crapbot.p6 ?
Daenyth` sec 00:06
I had it above but I tweaked it a bit
the relevent line is: method readln ($sock = $.socket) {
TimToady Blwood: not sure quite what you're wanting. you can still assign the result of a match as a list
Blwood TimToady, I have a given/when. given $string { when m:P5/:(\w+)/ { print "$0 blabla"; } } 00:07
instead of $0 I'd like to use something lik $var 00:08
Daenyth` diakopter: sial.org/pbot/26718, line 67 in there is the line I mean.
lambdabot Title: Paste #26718 from "Daenyth" at 24.91.13.73
Blwood it's possible to dot my ($var) = $string ~~ regex in perl6, but I don't know how to do it in a givent/when
Daenyth` ignore the bit at the top
TimToady Blwood: why not just say "if my $var = m:P5/.../ {...}" instead? given just sets $_, and // looks at that by default 00:13
and you can intermix when with other statements
there's also a spec'ed when COND -> $x {...} syntax, but I doubt puts does it yet 00:14
Blwood TimToady, be cause I have other conditions in my given statement :s
TimToady you should also (eventually) be able to say "when / $var := () /" and bind to a predeclared $var from outside, but that also might not work yet 00:15
00:15 bsb joined
Blwood COND -> $x { ... } would be perfect :) 00:16
thank you for the informations
bloonix my $class = 'test'; $class.new doent works :/ 00:17
s
jjore-w Recently in Perl 5 I wanted to import some functions, mixin-like but let them be closures over some of my lexicals. Is there any Perl 6 accomodation for this sort of thing?
TimToady that's because classes aren't strings in P6
bloonix what can I do now? 00:18
jjore-w the real problem was that I had oodles and oddles of parsing and validation methods which shared some common data and the source was too large to navigate.
TimToady ?eval my $class = 'test'; $::($class).new
pugsbot_r17185 Scalar.new()
TimToady ?eval my $class = 'test'; ::($class).new.WHAT 00:19
pugsbot_r17185 ::test
jjore-w oh shoot. guess I'm running. darn.
bloonix if I try that I got a lot of errors
the begin is: *** Undeclared variable: ("$test",MkPad (padTo... 00:20
pasteling "bloonix" at 87.78.208.180 pasted "#!/usr/bin/pugs class test; us" (24 lines, 2.9K) at sial.org/pbot/26719 00:21
00:23 Limbic_Region left
TimToady lose the $ before the :: 00:23
bloonix fine 00:24
00:28 justatheory left 00:29 justatheory joined 00:30 hkb_zz is now known as hakobe 00:34 weinig_ left
Daenyth` ?eval return %hash<foo> = True; 00:36
pugsbot_r17185 Error: ā¤Unexpected "<foo"ā¤expecting "::"ā¤Variable "%hash" requires predeclaration or explicit package name
Daenyth` ?eval return my %hash<foo> = True;
pugsbot_r17185 (no output)
TimToady return from what? 00:38
Daenyth` yeah
good point
>.>
TimToady hakobe: is your name spelled ē®±č¾ŗ or é‹ć¹ or something else? 00:40
00:40 jettero left, jettero joined, ozo left
Daenyth` "state" seems to be broken 00:42
TimToady how so?
Daenyth` ?eval sub foo { state $bar = 0; say ++$bar; } for (1..4) { foo() } 00:43
pugsbot_r17185 OUTPUT[1ā¤1ā¤1ā¤1ā¤] undef
TimToady yeah, that seems broken 00:44
?eval sub foo { state $bar; say ++$bar; } for 1..4 { foo() } 00:45
pugs_svnbot r17226 | bloonix++ | Makefile.PL and Linux.pm for Sys::Statistics::Linux...
diff: dev.pugscode.org/changeset/17226
pugsbot_r17185 OUTPUT[1ā¤2ā¤3ā¤4ā¤] undef
lambdabot Title: Changeset 17226 - Pugs - Trac
TimToady the assignment is not being a pseudo assigment
?eval sub foo { state $bar; START { $bar = 0 }; say ++$bar; } for 1..4 { foo() } 00:46
pugsbot_r17185 OUTPUT[1ā¤1ā¤1ā¤1ā¤] undef
TimToady ?eval sub foo { state $bar; FIRST { $bar = 0 }; say ++$bar; } for 1..4 { foo() } 00:47
pugsbot_r17185 OUTPUT[1ā¤2ā¤3ā¤4ā¤] undef
TimToady hmm
looks like the transition from FIRST to START was not complete 00:48
bloonix enough for today
good night people
Daenyth` night
TimToady night!
bloonix bed & 00:49
00:49 devogon_ left, justatheory left 00:58 nipotaway is now known as nipotan, [particle1 joined
Blwood I am not quiet sur but, err() function doesn't work always, does it ? 01:14
sure*
TimToady what err() function? do you mean the err infix? 01:15
Blwood for example @*ARGS.shift err die "Usage: $?FILE <arg>\n"; will works if there's no argument but, when I do a connect("somethi,",50) err die " ... $!\n" that won't work
01:16 [particle] left
Blwood will work* 01:16
I mean I can't fix a personnel error message
TimToady I wonder what connect returns on failure... 01:17
Blwood "*** getHostByName: does not exist (no such host entry)
"
TimToady looks like it throws an exception when it should just fail 01:18
that's not a problem with err
Blwood I have to manage it with try{ } ? 01:19
TimToady unless someone fixes connect...
Blwood I have the same with open()
my $data = open("file",:r) err die "file doesn't exist : $!\n"; 01:20
TimToady we'll probably have a lot of modules initially where people say "or die" when they should say "or fail"
Blwood -> *** file: openFile: does not exist (No such file or directory)
01:20 luqui joined 01:21 r0bby joined
Blwood so it's a bug or do I have to handle this error/exception with a try { CATCH { }} : s ? 01:21
TimToady my $data = try { open("file",:r) } err die "file doesn't exist : $!\n"; 01:22
Blwood oh nice :)
TimToady again, open shouldn't die, but rather fail
Blwood and what's the mean of CATCH ?
TimToady failing to open a file is not all that exceptional 01:23
Blwood yeah you are right
TimToady CATCH turns the surrounding block into a try, and supplies the exception handling
Blwood so I cad do a try { open("file",:r) CATCH { say "something" }} ? 01:24
can do*
diakopter pugs make: Makefile out-of-date with respect to /opt/local/lib/perl5/5.8.8/darwin-2level/Config.pm /opt/local/lib/perl5/5.8.8/darwin-2level/CORE/config.h 01:26
why would those two paths matter....?
<sigh> I guess I shouldn't have so many perls in my PATH :( 01:29
01:30 weinig joined
TimToady Blwood: yes, but CATCH is subimplemented 01:30
01:30 REPLeffect left
TimToady also, you'd need a semicolon after the open call 01:30
Blwood what do you mean with "subimplemented" :s ? 01:31
diakopter preimplemented? 01:33
Blwood oh right so it's better not to use catch ? 01:34
01:44 danga joined
Daenyth` foeach is replaced entirely by for, correct? 01:55
TimToady yes 01:56
for (;;) turns into loop (;;) 01:57
Daenyth` and where I'd do foreach my $foo (@bar), I'd now do for my $foo @bar? 01:58
TimToady no 01:59
for @bar -> $foo {...}
Daenyth` ahh
right
TimToady -> $foo {...} is an anonymous block with arguments 02:00
Daenyth` What's the best way to remove an item from an array if the item matches $foo? 02:08
for {} and test?
TimToady usually it's best not to put that element into the array in the first place. :) 02:09
Daenyth` Well 02:10
I have an arrayref in %.state<channels>, and I add a channel to the array when I join it. I need to be able to remove the channel from the array if the state changes, for example if I get kicked, etc
TimToady why are you using an array rather than a hash? 02:11
Daenyth` because it's a list? >.> 02:12
oh oh 02:15
hmm
nevermind.. thought for a moment that any() might help
I'll just loop through the list
02:17 stevan_ joined
TimToady decommuting & 02:17
diakopter !!!!!!!!!!!!!! finally! figured out my makemaker/PERL5LIB/FindBin/Makefile.PL problems...... :D
(not that anyone cares) :) 02:18
Daenyth` I care <3
good for you!
diakopter Daenyth`: thanks :)
ah, the joys of living with Apple's perl5.8.6, MacPorts' perl, and Fink's perl lib dirs.... 02:20
Daenyth` heh
02:39 kanru left
rhr STD allows twigils in sig params, does that ever make sense? sub foo($*bar) {...} etc. Should all twigils be disallowed in sigs? 02:54
PerlJam rhr: I believe that they're specced in on purpose. For instance, I think that constructors given parameters like $.foo will automatically set the corresponding data members for the object. 02:58
rhr: perhaps not all of them make sense though :)
rhr PerlJam: good point, I'd forgotten that. I think of $.foo as a sort of fake twigil since it's really a method call, but S02 says it's a twigil. 03:04
I can't see how any of the "real" twigils would ever make sense, though. 03:06
TimToady $!foo is a real twigil that makes sense there 03:08
PerlJam $!foo and $.foo both make perfect sense to me. $^foo is harmless I think. The only questions (to my mind) are ... would $*foo automatically set the corresponding global? and $+foo the corresponding contextual var? and $=foo the corresponding pod var? etc. 03:09
$?foo doesn't seem to make much sense though
TimToady most of 'em don't make much sense, but it's a semantic constraint rather than a syntactic constraint, and STD is mostly about syntax 03:10
PerlJam But I guess it could be used to hide compiler "hints" for the duration of the sub or to set them or something
rhr ok, that makes sense 03:11
PerlJam TimToady: Well some people (hi rhr!) are going to want to make semantic sense of it too. Could the spec say something about that? (even if it's to defer the semantic sensibility until later :) 03:12
TimToady perhaps it just doesn't work under strict :) 03:15
PerlJam Now I'm wondering what, if anything, sub foo ($.bar) { .. } means ..
rhr or method foo($!bar) without a has $.bar or $!bar 03:16
TimToady we have thought about allowing methods to be defined inside subs
03:28 weinig_ joined, weinig left 03:35 hakobe left, hakobe joined
diakopter whines at all context-free grammars G. 04:18
04:21 vel joined 04:23 vel left 04:24 justatheory joined 04:38 deq` joined 04:49 kanru joined 05:16 deq` left 05:19 devogon joined 05:25 stevan_ left 05:44 luqui_ joined, luqui_ left 05:50 jisom joined 06:14 masak joined 06:17 luqui left
masak @quote lament 06:28
lambdabot lament says: don't call me lambdabot!
masak :)
06:29 weinig_ is now known as weinig 06:31 Aankhen`` joined 06:35 DarkWolf84 left 06:38 elmex joined 06:46 franck___ joined 06:49 justatheory left 06:54 luqui joined 07:04 dduncan left 07:06 luqui left 07:07 kanru left 07:16 drrho joined 07:17 ozo joined 07:22 mncharity left 07:38 franck____ joined 07:39 weinig left 07:53 franck___ left
Daenyth` can I define what type of variable a specific key in a hash holds? 07:55
masak Daenyth`: you mean a different type from the other keys? 07:56
Daenyth` for example, you can do my Str $foo = 'bar'
is there any way to define that sort of thing on a per-key basis?
or only for the entire hash?
masak Daenyth`: the latter, by my reckoning 07:57
Daenyth` that's what I figured
masak but I'm not the final authority, the synopses are :)
Daenyth` oh well
Gothmog_ per-key? That way you were unable to use a single hashing function for the entire hash... would be possible, but pretty ugly.
masak true
07:58 flokuehn joined
Daenyth` Gothmog_: good point.. hadn't thought of that 07:58
ah well, I'll just let it be dynamic
no harm in that :)
pre-optimization root of all evil, etc
If I have a HoH, I would access it by %foo<bar><baz>? 08:01
or %foo<bar>.<baz>?
masak Daenyth`: the former, I think 08:03
though both probably work, since postcircumfix <> is really just a method call .<>
or something
Daenyth` or something 08:04
masak Daenyth`: yes, I had the urge to add "or something", because all I know in the matter I've gleaned from synopses and emails during the years 08:05
it's not like I'm part of the design team or anything
Daenyth` I'm sure pugs will barf at me if I do something wrong
masak Daenyth`: at times, it barfs at me when I do stuff right 08:06
pugs is very much a work-in-progress
Daenyth` hehe
I like it though
especially the REPL
masak yes, it's the best p6 interpreter on the market :)
08:08 buetow joined 08:09 TimToady_ joined 08:12 Aankhen`` left 08:15 weinig joined 08:20 TimToady left 08:26 weinig left 08:35 daxim_ joined 08:45 dwave left 08:51 jisom_ joined, daxim left 08:58 silug joined 09:08 jisom left 09:17 drrho left 09:25 toly_ is now known as toly 09:28 Patterner left 09:38 jisom_ left 09:43 Psyche^ joined, Psyche^ is now known as Patterner 09:48 DarkWolf84 joined, DarkWolf84 left 09:49 ruoso joined 10:05 ozo left 10:11 chris2 joined 10:26 dwave joined 10:45 sunnavy joined 10:46 cognominal_ left 10:47 cognominal_ joined 10:55 elmex left 11:09 kanru joined 11:16 pmurias joined
pmurias masak: it's the only p6 interpreter on the market, the other implementations are compilers :) 11:17
it's the most complete one, nonetheless 11:20
11:25 kanru left 11:28 kanru joined 11:31 cognominal_ left 11:32 cognominal_ joined
bloonix good morning 11:32
11:33 cognominal_ left, cognominal_ joined
masak bloonix: good day 11:35
12:04 devogon left, devogon joined 12:07 cognominal_ left
diakopter pmurias: parrot's perl6 does REPL 12:12
masak oh. I didn't know that -- I guess pugs is still a bit ahead, though 12:14
diakopter hence one item on my todo list being making an evalbot wrapper for it... parrbot_r44020 or whatever 12:16
masak good idea
evalparrot :) 12:17
diakopter along with kmp6bot_rxxxx
?parr 'eval me'
lambdabot Maybe you meant: arr part yarr
diakopter ?pugs 'eval me'
lambdabot hackage.haskell.org/trac/ghc/newticket?type=bug
diakopter ?kmp6 'eval me' 12:18
lambdabot Unknown command, try @list
12:24 devogon left 12:34 pmurias left 12:42 nipotan is now known as nipotaway 12:54 daxim_ left 12:56 Aankhen`` joined 12:59 Aankh|Clone joined 13:04 stevan_ joined 13:06 buetow left 13:09 jettero left 13:10 jettero joined
jettero join irssi 13:10
masak jettero: you need a slash in front, and an octothorp before 'irssi', like so: "/join #irssi" 13:12
jettero oh, I know. It was an ordinary typo... I neglected to say: mistell or something similar
masak oki
jettero thanks though
masak :)
13:13 Limbic_Region joined 13:17 Aankhen`` left 13:25 TJCRI joined, cognominal_ joined 13:26 franck___ joined, cognominal_ left, cognominal_ joined 13:29 Shillo joined 13:30 DarkWolf84 joined
diakopter Shillo: howdy 13:30
Shillo Hi! 13:31
13:34 franck____ left 13:39 Aankhen`` joined
DarkWolf84 hi 13:46
Shillo Hey
DarkWolf84 ??? 13:47
13:56 Aankh|Clone left
masak DarkWolf84: ĀæĀæĀæ 13:59
DarkWolf84 not understand 14:00
masak ok. can I help you in any way? 14:01
Linux\2 heh
14:04 kanru left
DarkWolf84 I just greet 14:05
btw ler vars don't work with last version of pugs 14:06
masak DarkWolf84: yes. by my understandinģ Shillo just greet too, so you needn't feel confused
DarkWolf84 let*
masak DarkWolf84: maybe they haven't been implemented yet 14:07
did they once work?
DarkWolf84 my english is bad
masak not to worry
DarkWolf84 no not really
masak the world population seems to have more or less rejected esperanto, so english is what we're stuck with
sorry... 14:08
14:08 jhorwitz joined
DarkWolf84 I tied last versions and the one in gentoo portage and let and temp vars not work 14:08
tried*
masak well, some things in pugs work, and some don't
Shillo Yeah, no problem. That 'hey' was a greeting from me. :) 14:09
masak Shillo: yes
DarkWolf84 I understood 14:10
masak DarkWolf84: if they don't work, it's either because they recently broke or because they're just not implemented
re pugs features, that is 14:12
I'm not sure I recall let vars ever working 14:13
DarkWolf84 probably they broke something
masak but maybe check the tests
DarkWolf84 ok
masak t/var/let.t
DarkWolf84 i'll try
masak hm, looks to me they were once implemented, or close to implemented 14:14
DarkWolf84 yes
masak no :todo params hint otherwise, anyway 14:15
DarkWolf84: are you experiencing a specific problem not covered by one of the tests?
DarkWolf84 thats why in the programmers heaven they wrote about this
masak they did?
where?
14:15 kanru joined
DarkWolf84 w8 14:15
masak mm
DarkWolf84 www.programmersheaven.com/2/Perl6-F...les#sigils 14:16
masak ah 14:17
well, pugs is sort of a moving target 14:18
DarkWolf84 I know
perl 6 is in development
masak right now when I run the test, pugs thinks `let` is a subroutine
so yes, it's broken :) 14:19
DarkWolf84 mine too
masak DarkWolf84: would you like to fix the test file?
DarkWolf84 why not
masak (that is, at least make it skip the tests or something)
DarkWolf84 but i know perl5
masak do you already have a commit bit?
DarkWolf84 and little perl6 14:20
yes
I have
masak great
then you know the drill :)
DarkWolf84 well I'll try
masak :) don't worry, we're running rcs 14:21
14:24 charsba__ joined 14:28 avar joined, jiing left
DarkWolf84 what is rcs? 14:28
masak I meant "revision control system" 14:34
svn, svk, darcs etc
they keep a history of changes, and you can recover old revisions easily 14:35
it's a time machine for data
DarkWolf84 subversion
i got it
masak yes
good, then your commit bit is useful :) 14:36
14:44 elmex joined 14:51 TimToady_ is now known as TimToady
Shillo Hiya! 14:52
14:52 ChanServ sets mode: +o diakopter 14:53 diakopter sets mode: +o TimToady, diakopter sets mode: -o diakopter, Blwood left 14:57 Blwood joined
masak ?eval map :{ .chr } <71 75 69 74> 14:57
pugsbot_r17185 ("G", "K", "E", "J")
DarkWolf84 nice
:)
I didn't know this method 14:58
masak yes, p6 is pretty
DarkWolf84: oh, you meant pugsbot?
DarkWolf84 no
I mean .chr
TimToady it's just p5's chr() function, really
by the way, that syntax is unlike to work in real p6 14:59
*unlikely
better to say
?eval map { .chr }, <71 75 69 74> 15:00
pugsbot_r17185 ("G", "K", "E", "J")
masak TimToady: ah, ok
just as well, I never liked the colon in that place
Shillo Oh, Larry... have you read my question on perl6-internals? About junctions?
TimToady yes 15:01
not sure I understand the question though
Shillo Not sure I asked it right, either. ;)
TimToady Junctions are a type that is outside the Any type
and the default argument type is Any, so doesn't match Junction
Shillo Yes, that's part of what I asked. 15:02
What about assignments, though?
?eval my $x = 1|2
pugsbot_r17185 \(1 | 2)
Shillo $x is Any, in this case.
?
TimToady $x is just a scalar container, untyped
[particle1 ?eval my $x = (1|2); say $x.WHAT 15:03
TimToady contents
pugsbot_r17185 OUTPUT[Junctionā¤] Bool::True
15:03 [particle1 is now known as [particle]
TimToady yes, you can assign anything to a scalar variable 15:03
Shillo Umm... How about function returns? 15:04
Any or untyped?
[particle] ?eval my $x; say $x.WHAT
pugsbot_r17185 OUTPUT[Scalarā¤] Bool::True
TimToady a function can also return anything it likes, but generally you shouldn't return junctions where they're not expected
Shillo So that's my question: at the implementation level, when can a compiler assume that it is -not- dealing with a junction? 15:05
[particle] if the compiler assumes it's dealing with Scalar by default, it can always deal with Junction or Any
TimToady when the variable/parameter's contents are declared as Any or narrower 15:06
diakopter ?eval '/op diakopter'
pugsbot_r17185 "/op diakopter"
diakopter ?eval try { '/op diakopter' }
pugsbot_r17185 "/op diakopter" 15:07
Shillo This makes your function calling convention something like: check each argument for junction-ness, and paralelise, then call
TimToady no, it just falls out of MMD
Shillo Which sounds... expensive. At least in the current parrot.
Well... That's true.
TimToady you only have to look at autothreading if the normal MMD dispatch runs out of candidates that don't do junctions 15:08
Shillo OK, got it. :) Although, current parrot doesn't yet support enough MMD for this to work (right?)
[particle] current parrot mmd impl is a prototype 15:09
note that the mmd design document is in the draft directory.
i'm not sure if parrot mmd can handle this yet... i haven't thought about it enough. if we implement junctions in perl6, i bet this issue will come up sooner rather than later. patches welcome :) 15:11
DarkWolf84 ?eval map {.int},<A B C>
pugsbot_r17185 (0, 0, 0)
DarkWolf84 not work
how to get the ascii numbers? 15:12
Shillo Once I locate MMD draft. :)
not in docs/pdd/drafts 15:13
Er, docs/pdd/draft
TimToady that mmd design document was written before much of S12:857
so just refer to S12:857
Shillo I was looking at pdds, actually
masak ?eval map { .ord }, <A B C>
pugsbot_r17185 (65, 66, 67)
masak DarkWolf84: that way 15:14
('A' is not a number, so '.int' won't convert it right. same in p5) 15:15
Shillo OK, thanks for help. :)
TimToady ?eval <A B C>\ >>.ord
pugsbot_r17185 Error: ā¤Unexpected ">>."ā¤expecting "."
15:15 drupek12 left
TimToady wish my compose key worked, sigh... 15:16
Shillo ?eval (<A B C>)>>.ord
pugsbot_r17185 (65, 66, 67)
masak nice
TimToady ?eval <A B C>>>.ord
Shillo uses bigger hammer.
pugsbot_r17185 (65, 66, 67)
TimToady ?eval <A B C>.>>.ord
pugsbot_r17185 (65, 66, 67)
Shillo Ooo, nice.
15:17 pmurias joined
pmurias diakopter: kmp6? did you mean kp6? 15:17
15:18 cognominal_ left
Shillo [particle]: Found t/pdd15oo/mmd.t, looks like a good ref. 15:19
15:19 cognominal_ joined, drupek12 joined 15:21 flokuehn left 15:24 nferraz joined
DarkWolf84 masak, I just marked all let vars with # 15:30
Is it fine?
masak um 15:31
not really
the tests themselves are fine
it's pugs that's not in synch
DarkWolf84 what to do then? 15:32
masak you might need to do something with eval_ok
because right now the problem is that the tests don't even fail because they don't run properly 15:33
your goal is to make them run properly and fail :)
I got to go fairly soon
DarkWolf84 when I marked them they failed
:)
masak DarkWolf84: yes, well
we want them to succeed when pugs does the Right Thing, too 15:34
DarkWolf84 ok
maybe I have to read doc more carefully 15:35
masak emulate the behavior of some test file that uses eval_ok
15:35 yahooooo left
masak I'll find one for you 15:35
DarkWolf84 ok
15:36 Aankhen`` left, Aankhen`` joined
masak ah 15:36
not eval_ok, but lives_ok
you'll find some at t/var/my.t 15:37
line 28
DarkWolf84 ok
masak good luck
masak shuffles off 15:38
diakopter pmurias - no I meant mp6/kp6 together
15:40 masak left
moritz_ re 15:40
crashmatrix Juerd, aaaargh, you are so right in using perl for scripts I would use bash for 15:43
Shillo My favorite first line: /usr/bin/zsh :) 15:47
Er, with #!
crashmatrix and a !
it's hash-bang
oh, read over it -_-'
I would use zsh, if it was as widespread as the bourne shell 15:48
moritz_ my favorite first line is 'use v6;'
wolverian uses posix sh for scripts
crashmatrix and my favorite first line is #include <stdio.h>
wolverian I know, I'm insane.
moritz_ crashmatrix: then you could help the parrot folks ;) 15:49
pugs_svnbot r17227 | fglock++ | [kp6] Makefile - ignore '.pm~' files
diff: dev.pugscode.org/changeset/17227
lambdabot Title: Changeset 17227 - Pugs - Trac
crashmatrix moritz_, I didn't quite follow that
[particle] crashmatrix: parrotcode.org needs you! 15:54
lambdabot Title: Parrot Virtual Machine - parrotcode
15:54 Aankhen`` left, melissa joined
jettero 4 15:55
(mistell)
crashmatrix eh, looks interesting
moritz_ it's coded in C, and the intended target for "the" "final" p6 compiler 15:56
15:57 Aankhen`` joined
Shillo Got to go. Laters, folks! 15:59
moritz_ see you
pmurias moritz_: the intended "platform of choice" 16:00
diakopter: if all goes well, mp6 should die 16:01
16:02 Shillo left
diakopter pmurias: oh 16:04
moritz_ pmurias: so kp6 will be able to compile itself? any predictions on how long that might take? 16:05
to get there, I mean 16:06
16:10 b2gills joined 16:11 Jamtech joined 16:14 nferraz left 16:16 chris2 left
pmurias i'm not sure, once the captures/signatures/arguments to subroutines & methods work it shouldn't take much 16:17
16:17 chris2 joined, Pat__ joined 16:24 buetow joined 16:25 cognominal_ left 16:31 sunnavy left 16:34 stevan__ joined
moritz_ @seen dmq 16:35
lambdabot I haven't seen dmq.
moritz_ @seen demq
lambdabot I saw demq leaving #perl6 1d 25m 2s ago, and .
16:38 cognominal_ joined 16:41 mst joined 16:43 mst left, mst joined
mst wondering if anybody's had a go at writing p6 rules for p5 syntax 16:47
for the fun of trying to use v6-alpha to parse p5 using p6-in-p5
[particle] brr
bloonix hi mst
mst [particle]: I said fun. I never said "sane idea" :)
bloonix mst: so much sarcasm at tuesday? :) 16:48
16:49 justatheory joined 16:51 penk joined 16:55 stevan_ left 16:56 justatheory left
DarkWolf84 I've got the idea 17:00
DarkWolf84 loves hakin'
:)
17:03 justatheory joined 17:07 Pat__ left 17:15 rindolf joined
spinclad ?eval my Any $x = (1|2); say $x.WHAT 17:17
pugsbot_r17185 OUTPUT[Junctionā¤] Bool::True
spinclad as pugs doesn't implement type checking yet, this makes sense.
?eval my $x; say \$x.WHAT 17:18
pugsbot_r17185 OUTPUT[Scalarā¤] Bool::True
17:18 mst left
spinclad ?eval my $x; say \$x 17:19
pugsbot_r17185 OUTPUT[ā¤] Bool::True
spinclad (unsure if \$x should return the container instead of the contents, if that makes sense) 17:20
17:25 devogon joined
DarkWolf84 I think that let.t works now 17:25
I'll repair temp.t too 17:26
and ready to update
17:29 hakobe is now known as hkb_zz 17:30 dduncan joined 17:41 Psyche^ joined 17:43 daxim joined 17:45 daxim left 17:47 lumi left 17:53 franck____ joined
DarkWolf84 what is the diference between 'ok' and 'is' 17:55
[particle] ok(expr) vs is(actual_value, expected_value)
DarkWolf84 temp.t is broken too 17:56
17:57 Patterner left, Psyche^ is now known as Patterner 18:02 IllvilJa left 18:10 franck___ left 18:11 franck___ joined 18:22 IllvilJa joined 18:23 jisom joined 18:24 franck____ left, franck____ joined 18:26 weinig joined 18:31 jisom left, jisom joined 18:32 yahooooo joined 18:34 franck___ left 18:37 lumi joined
DarkWolf84 I'm dine with repairing temp.t and let.t but I'm not sure wheter they r fine 18:45
[particle] commit them, and mention in the commit log that you'd like somebody to review them.
DarkWolf84 ok
[particle] (descriptive commit messages)++ 18:46
Aankhen`` svn ci -m 'it is time. mwahaahahahahahahaa.' 18:47
18:47 Limbic_Region left 18:52 feb left 19:01 breinbaa1 joined
DarkWolf84 ok 19:03
i make last check 19:04
make realclean don't cear all files 19:14
like some made from make smoke 19:15
pugs_svnbot r17228 | lwall++ | Must check for terminators before assuming "if" etc. are modifiers, pmichaud++ 19:17
diff: dev.pugscode.org/changeset/17228
lambdabot Title: Changeset 17228 - Pugs - Trac
19:19 weinig left 19:21 rindolf left
pugs_svnbot r17229 | lwall++ | require statement-ending ; after non-line-final } consistently 19:26
diff: dev.pugscode.org/changeset/17229
lambdabot Title: Changeset 17229 - Pugs - Trac
pugs_svnbot r17230 | darkwolf++ | little canges in t/var/let.t & t/var/temp, need to check 19:32
diff: dev.pugscode.org/changeset/17230
lambdabot Title: Changeset 17230 - Pugs - Trac
DarkWolf84 I'm ready
T need someone really to check this 19:33
I need someone really to check this
I'm not sure whether theese files r fine 19:37
coz that is my first change in test files 19:38
19:38 q{-oo-}p joined, jisom left 19:39 q{-oo-}p left 19:40 ruoso left
moritz_ DarkWolf84: looking... 19:43
let.t looks fine
there are two unnecessary whitespaces changes, but apart from that it looks clean 19:45
DarkWolf84++
DarkWolf84 :) 19:46
allright
second commitment and one step close to perl6 :) 19:47
moritz_ DarkWolf84: did you add yourself yet to AUTHORS? 19:48
19:48 yahooooo left
DarkWolf84 yeah 19:48
moritz_ good ;)
DarkWolf84 last commitment
Blwood how can we help in the pugs project ?
DarkWolf84 Imade simple tcp server then 19:49
moritz_ Blwood: what languages do you "speak"?
Blwood: programming languages, that is
Blwood moritz_, C, perl , js, php and some base of asm 19:50
moritz_ Blwood: you can mostly help with perl and C 19:51
Blwood: if you want to do some C stuff you could help with parrot, the virtual maschine designed for perl
Blwood: see www.parrotcode.org/
lambdabot Title: Parrot Virtual Machine - parrotcode
Blwood and with perl stuff ? 19:52
moritz_ Blwood: if you want to do some perl coding, you can help with v6.pm, Pugs::Compiler::Rule, mp6 and kp6
or support our infrastructure, like modularizing the test suite 19:53
Blwood and how can I do that, I mean is there a plan, a group ... ? 19:54
moritz_ first of all read here for different possibilities to help: www.perlmonks.org/?node_id=628746 19:55
lambdabot Title: Getting Involved with Perl 6
Blwood okay 19:56
moritz_ the refacturing of the test suite is not really good planned, you can read old discussions on that topic (for example on p6c and in the IRC logs), and contribute your own ideas
the basic problem is that other implementations can't parse as much syntax as pugs can, so they can't run a good deal of the test suite 19:57
19:58 weinig joined
moritz_ if you are into perl5 programming, you could help diakopter++ with his project to create evalbots for the different implematations 19:59
Blwood "Port p5 modules to p6." that sounds good for me 20:00
20:01 weinig_ joined
Blwood to help in test suite, basically it's to write test when we find a bug ? 20:02
moritz_ and it's a good start to learn p6 more thoroughly
Blwood: not only that... split it into more files, some with more advanced features, so that ones with simpler features can be run by kp6 and p6-on-parrot
Blwood well I think first I'll learn p6 more thoroughly and how the community works on #perl6. 20:04
20:04 jettero left
moritz_ the last part is easy - we talk when we feel like, and what we want to ;) 20:05
Blwood yeah :)
20:07 jettero joined
moritz_ I'd also recommend to subscribe p6c and p6l, they're fairly low traffic 20:11
except when TheDamian and Mark Overmeer start to discuss POD ;)
20:14 justatheory left
[particle] ?eval "you must join parrot" 20:14
pugsbot_r17185 "you must join parrot"
moritz_ [particle]: I always try to send you coders as soon as somebody mentions C, but it doesn't work all the time ;) 20:15
[particle] thanks :) 20:16
i figure i need to use subliminal messages from time to time, and pugsbot is as good as it gets here :)
moritz_ but it's good if you promote parrot here as well (I think we are in quite different time zones, and $job takes consumes most of my time)
20:17 weinig left
moritz_ send parrotbot here! ?parrot .print "You MUST join parrot" 20:17
[particle] hee
moritz_ or perhaps ?pir 20:18
20:18 Aankhen`` left
[particle] someday soon maybe we'll have ?perl6 20:19
moritz_ for p6-on-parrot?
[particle] yep.
or ?nqp
moritz_ ars.userfriendly.org/cartoons/?id=1...de=classic ;) 20:20
lambdabot Title: UserFriendly Strip Comments
moritz_ anyway, bed & 20:28
20:33 Blwood_ joined 20:36 melissa left 20:37 flokuehn joined 20:39 flokuehn left
DarkWolf84 why pugscc not work 20:40
It gives me some wierd message
and do not compile
pugs: XXX 20:41
20:46 yahooooo joined 20:48 Blwood left 20:50 TJCRI left 20:51 buetow left, buetow joined 20:55 ron_ joined 20:58 araujo left 21:02 Blwood_ left, Blwood joined, ron_ left
Daenyth` Is there a block I can put inside a given{} which will be run in every case where the default{} block is NOT run? 21:03
21:05 hcchien left 21:08 justatheory joined 21:12 Jamtech left 21:18 buetow left, buetow joined 21:21 elmex left 21:24 chris2 left 21:28 devogon left
rhr Daenyth`: I think if you put the default block at the top, anything after that but before any when will be run whenever the default isn't run 21:30
Daenyth` ahh
tricksy
the way I had it set up before, I was prepending a little bit to the output if my bot didn't know how to handle a server line... except that printing the line from the server AFTER the whens meant that it printed the response before printing its input! 21:31
21:36 melissa joined
PerlJam Daenyth`: $flag = 0; given $blah { ... default { $flag = 1; } } if $flag == 0 { say "The default wasn't run" } 21:41
Daenyth` right, but I would also need that to run before it runs any blocks from a when 21:42
PerlJam oh, you need some premonition then? "Run the following code if the default won't be selected" ?
Daenyth` yes
is that possible?
hmm, interesting note: it seems as though if you put a default block before when blocks in a given, pugs dies silently 21:43
diakopter sure, a subroutine that's called from each non-default case :P
Daenyth` that's ugly :(
PerlJam Daenyth`: you're asking for something ugly.
Daenyth` suppose so
PerlJam Daenyth`: you could reproduce the given block 21:44
Daenyth` ?eval given 1 { default { say 'default' } when 1 { say 1 } } 21:45
pugsbot_r17185 OUTPUT[defaultā¤] Bool::True
Daenyth` hrm
odd...
?eval given 1 { default { say 'default' } say 'foo'; when 1 { say 1 } }
PerlJam OR you could make all of your whens call the same subroutine which outputs whatever (and then does its own version of given)
pugsbot_r17185 OUTPUT[defaultā¤] Bool::True
PerlJam or you could rely on MMD to handle the proper calling.
Daenyth` strange.. my pugs just dies
rhr ah, yes default can't predict the future :(
PerlJam Daenyth`: how many whens do you have and what do they look like? 21:47
Daenyth` several
and more to come
mostly regexs
pastebinning
implementing a crappy IRC bot
PerlJam Daenyth`: or, since the problem seems to be that your when block are outputting something, just have them set a variable to be output later. 21:48
s/block/blocks/
Daenyth` I'll most likely just have them all call a function 21:49
since I'll most likely be doing that anyway
ie, when /:\S+ PRIVMSG (\S+) :(.*)/ { handle_privmsg( $0, $1 ) }
pasteling "Daenyth" at 24.91.13.73 pasted "When I run the following code, pugs closes itself with no output at all. Version: 6.2.13 (r17219)" (131 lines, 2.9K) at sial.org/pbot/26729
PerlJam Daenyth`: I'd just stick a sub call in the appropriate places. 21:52
Daenyth` another interesting note: when I sent lines to the server with "\d015\d012", it failed, but it works when I send lines with "\r\n"
21:53 pmurias left
rhr contrary to what I said previously, default at the top never makes sense. default depends on previous whens breaking out to do its thing (it's really a no-op) 21:55
Daenyth` ohh... I know why it's not printint output 21:56
printing^
$debug is false so my default {} block printed nothing, and then it never got to the WHEN to handle server PING and the connection timed out
forgot to set debug true
lol 21:57
21:58 ozo joined 21:59 stevan__ left
DarkWolf84 ?eval say b0111 22:00
pugsbot_r17185 Error: No such subroutine: "&b0111"
DarkWolf84 ?eval say "\b0111"
pugsbot_r17185 OUTPUT[0111ā¤] Bool::True
Daenyth` <Daenyth`> another interesting note: when I sent lines to the server with "\d015\d012", it failed, but it works when I send lines with "\r\n"
Does anyone know about that?
They *should* be the same thing 22:01
is \d not properly implemented yet?
?eval say 'true' if "\d015" eq "\r"
pugsbot_r17185 undef
DarkWolf84 ?eval say 0xffffff 22:02
Daenyth` ?eval say 'true' if "\d012" eq "\n"
pugsbot_r17185 OUTPUT[16777215ā¤] Bool::True
undef
Daenyth` hrm :|
DarkWolf84 sry
?eval 0o755 22:03
pugsbot_r17185 493
DarkWolf84 works
Daenyth` ?eval say "\d015"
pugsbot_r17185 OUTPUT[ā¤] Bool::True
Daenyth` ?eval print "\d015"
pugsbot_r17185 OUTPUT[] Bool::True 22:04
Daenyth` ?eval print "\d012"
pugsbot_r17185 OUTPUT[] Bool::True
DarkWolf84 is there any way to print numbers in binary or hex context
Daenyth` I don't know
?eval print asc("\d012")
pugsbot_r17185 Error: No such subroutine: "&asc"
Daenyth` err
hrm
DarkWolf84 ?eval 24.bin 22:05
pugsbot_r17185 Error: No such method in class Int: "&bin"
DarkWolf84 yeah
it's not it
I have to check the synposises 22:06
Daenyth` ohh 22:07
it's not decimal 015, 012
it's octal
?eval say 'true' if "\o015" eq "\r"
pugsbot_r17185 OUTPUT[trueā¤] Bool::True
Daenyth` does the Eureka dance
I should have checked my ascii table sooner :( 22:08
DarkWolf84 ?eval 42.WHAT 22:12
pugsbot_r17185 ::Int
DarkWolf84 It's beter to make unicode table
:)
22:12 jhorwitz left
DarkWolf84 perl6 uses unicode 22:13
Daenyth` yeah yeah
DarkWolf84 J
Daenyth` how do I input unicode in vim?
DarkWolf84 I think i has native unocode support
unicode* 22:14
like nano
or emacs
Daenyth` right but
how do I input it
my keymap isn't set up for it
DarkWolf84 the only way is from char table
Daenyth` What's a good keymap if I'm used to us qwerty? 22:15
DarkWolf84 my keyboard uses latin and cyrilic characters
22:15 weinig_ left
Daenyth` actually 22:16
do you know of any gui program that's like a combined showkeys and xmodmap?
rhr with vim you can do the control-k thing, :help digraphs 22:17
DarkWolf84 for characters that can't type with keyboard I use Gucharmap 22:18
Daenyth` rhr: thanks
I should hack my keymap to use AltGr, but I'm too lazy
I'll go look for a gui keymap control program
22:19 cognominal_ left
DarkWolf84 a keymap changing program 22:20
heh
I use that is in gentoo by default
Daenyth` xmodmap is painful to use
I mean.. I can
but it's annoying
especially if I want to fiddle on a large scale 22:21
DarkWolf84: what do you use?
22:21 dduncan left
DarkWolf84 for gui only X libs for keyboard 22:21
Daenyth` ?
What's the name of the program? 22:22
DarkWolf84 or gnome keyboard program
w8
at the moment I use that thing from gnome 22:23
22:23 cognominal_ joined 22:25 thoughtpolice joined
DarkWolf84 It's called just keybard preferencies 22:26
maybe gnome keyboard preferencies
Daenyth` if it's a menu entry, right click and do properties, see where the .desktop file is, and see what it launches?
DarkWolf84 ok 22:27
it's on my panel
gnome-keyboard-properties
that's it
Daenyth` thanks 22:28
DarkWolf84 kde has it's own
and xorg has its own too
22:29 weinig joined
DarkWolf84 but for me is dificult to use it 22:29
or maybe I'm lazy
I mean that in xorg 22:30
?eval :2<111> 22:41
pugsbot_r17185 7
DarkWolf84 ?eval say 5.:2 22:42
pugsbot_r17185 Error: ā¤Unexpected ":2"ā¤expecting ".", "\187", ">>", "=", "^", operator name, qualified identifier, variable name, "...", "--", "++", "i", array subscript, hash subscript or code subscript
DarkWolf84 oops
22:44 Limbic_Region joined
DarkWolf84 maybe there is no num2hex or num2bin in the spec 22:50
Juerd crashmatrix: Perl is the ultimate versatile sysadmin automation tool. 22:56
Some languages are nicer for application programming, but nothing beats it for sysadmin stuff.
In unix, that is ;)
22:57 melissa left 23:01 melissa joined
jjore-w unless Python does. 23:01
it's interesting to see linux distros replacing their stuff that used to be shell or perl or whatever with piles of python programs. 23:02
DarkWolf84 I like perl amd make programs for my needs 23:03
Blwood Python is a tab killer : | 23:04
DarkWolf84 tab killer?
Blwood yeah in Python you have to indent your code 23:05
crashmatrix Juerd, as I figured out today, bash script just grow incredibly complex syntax wise, for relatively simple tasks
so yes, I should probably start learning Perl asap :)
DarkWolf84 perl golfing is good 23:06
:)
23:11 melissa left 23:12 melissa joined 23:31 justatheory left 23:42 melissa left, melissa joined
pugs_svnbot r17231 | lwall++ | line-final curlies are now forgiving of rules that eat whitespace (pmichaud++) 23:46
r17231 | lwall++ | current whitespace from/to positions now kept in current match status object
r17231 | lwall++ | the ws token now automatically returns success if recalled at $.ws_to position
diff: dev.pugscode.org/changeset/17231
lambdabot Title: Changeset 17231 - Pugs - Trac
pugs_svnbot r17232 | lwall++ | context args typed to StrPos, and arglist's arg now positional 23:55
diff: dev.pugscode.org/changeset/17232
lambdabot Title: Changeset 17232 - Pugs - Trac
23:56 buetow left