Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2007-08-04

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00:02 packafk joined #perl6
00:47 r0bby joined #perl6
00:57 franck____ joined #perl6
02:07 Entonian joined #perl6
02:10 pro21ms4 joined #perl6
02:30 daxim_ joined #perl6
03:12 hkb_aw changed the nick to hakobe
03:47 hakobe changed the nick to hkb_aw
03:59 demq joined #perl6
04:16 weinig joined #perl6
04:45 hkb_aw changed the nick to hakobe
05:01 pugs_svnbot r17197 | lwall++ | [STD] Catch various mistaken uses of p5 special variables.
05:01 pugs_svnbot r17197 | lwall++ | [cheat] comment out perlhints that pugs can't parse yet
05:01 pugs_svnbot diff: http://dev.pugscode.org/changeset/17197
05:02 lambdabot Title: Changeset 17197 - Pugs - Trac
05:04 kane__ joined #perl6
05:10 Aankhen`` joined #perl6
05:18 weinig joined #perl6
05:28 jisom joined #perl6
06:10 kanru joined #perl6
06:47 pugs_svnbot r17198 | moritz++ | [irclog] changed footer.tmpl to be more generic, since other
06:47 pugs_svnbot r17198 | moritz++ | users don't put their own name in :(
06:47 pugs_svnbot diff: http://dev.pugscode.org/changeset/17198
06:47 lambdabot Title: Changeset 17198 - Pugs - Trac
06:52 moritz_ diakopter: I seem to recall that you had a workaround for evalbot with current pugs (with b0rked MMD)...
06:53 moritz_ diakopter: could you please commit that? I'd like to run it on another host
06:58 Aankhen`` @type (.)
06:58 lambdabot forall b c a. (b -> c) -> (a -> b) -> a -> c
07:00 agentzh joined #perl6
07:01 agentzh joined #perl6
07:21 rgs joined #perl6
07:26 dduncan left #perl6
07:47 Aankh|Clone joined #perl6
07:49 devogon joined #perl6
07:58 wilx joined #perl6
08:38 daxim joined #perl6
08:43 rindolf joined #perl6
08:49 tyme- joined #perl6
09:06 daxim joined #perl6
09:23 buetow joined #perl6
09:27 cognominal_ joined #perl6
09:29 buetow joined #perl6
09:32 Blwood joined #perl6
09:56 franck___ joined #perl6
09:57 bloonix cool, my first p6 module is ready for use :)
10:05 daxim pix or it didn't happen
10:08 moritz_ bloonix: you should check it into the pugs repository in ext/
10:11 bloonix moritz_: at first I do some debugging and I have to write a test file
10:12 bloonix aber dann gerne :)
10:15 iblechbot joined #perl6
10:23 pasteling "bloonix" at 87.78.219.97 pasted "sub example_4 { say "--- Run e" (14 lines, 269B) at http://sial.org/pbot/26657
10:23 bloonix what is wrong here?
10:28 melissa joined #perl6
10:28 drupek12 joined #perl6
10:34 Gothmog_ bloonix: Probably %hash<foo bar> works like @array, eating up everything; I don't know if that's the intended functionality or not.
10:35 pro21ms4 joined #perl6
10:35 bloonix unfortunately I cant find examples in the synopsis :/
10:39 bloonix ?eval $x=1;$y=undef; $x+$y
10:39 pugsbot_r17185 Error: ␤Unexpected "="␤expecting "::"␤Variable "$x" requires predeclaration or explicit package name
10:39 bloonix ?eval my $x=1;my $y=undef; $x+$y
10:39 pugsbot_r17185 1
10:40 bloonix should that return an error?
10:41 moritz_ I think it should generated a warning, like in p5
10:42 Gothmog_ Grepping for assignment in the synopsis, I couldn't find anything except that list assignment works like in P5. I would expect that (%hash<foo bar>) is similar to (%hash<foo>, %hash<bar>), (like in P5, iirc) but that's just me...
10:43 moritz_ I just know that pugs doesn't implement slice context yet
10:43 bloonix hmmm I could do it (%h<foo>, %h<bar>, $baz) but a slice is nicer :)
10:43 bloonix shorter
10:46 flokuehn joined #perl6
10:52 bloonix ?eval my %h; my %c = %h<foo>;
10:52 pugsbot_r17185 {}
10:52 bloonix ?eval my %h; my %c = %h<foo>; %c
10:52 pugsbot_r17185 {}
10:52 bloonix ?eval my %h; my %c = %h<foo>; say %c;
10:52 pugsbot_r17185 OUTPUT[␤] Bool::True
10:53 bloonix ?eval my %h; my %c := %h<foo>; say %c;
10:53 pugsbot_r17185 OUTPUT[␤] Bool::True
10:54 bloonix %c := %h is identical with $c = \%h ?
10:58 elmex joined #perl6
11:27 Southen joined #perl6
11:38 bloonix how can I concat strings?
11:38 bloonix p5: $x = 'foo' . 'bar' . 'baz'
11:42 bloonix ?eval 'foo' ~ 'bar' ~ 'baz'
11:42 pugsbot_r17185 "foobarbaz"
11:42 bloonix fine
11:45 demq its too bad that header style string joining isnt ok.
11:46 demq 'foo' 'bar' 'baz'
11:46 demq convenient for code generation
11:53 chris2 joined #perl6
11:53 moritz_ @seen diakopter
11:53 lambdabot diakopter is in #perl6. I don't know when diakopter last spoke.
11:54 bloonix yesterday moritz_
11:54 bloonix his last word was "afk" :)
11:54 bloonix 21:46 < diakopter>
11:55 moritz_ my lastlog says his last word was "matchee" ;)
11:55 moritz_ http://moritz.faui2k3.org/irclog/search.pl?​channel=%23perl6&amp;nick=diakopter&amp;q=
11:55 lambdabot Title: IRC logs - Search, http://tinyurl.com/yuqzcf
11:55 bloonix okay "afk" was that what I read at last
12:00 iblechbot joined #perl6
12:03 DarkWolf84 joined #perl6
12:06 kanru joined #perl6
12:15 Blwood joined #perl6
12:35 pro21ms4 joined #perl6
12:43 cognominal_ joined #perl6
14:22 stevan_ joined #perl6
14:44 bloonix how can I execute system commands?
14:44 bloonix p5: open my $h, "$cmd|"
14:45 bloonix how can I do that?
14:56 bloonix *arg*
14:56 bloonix Pipe::open
14:57 bloonix
15:01 Limbic_Region joined #perl6
15:10 aindilis joined #perl6
15:16 cognominal_ joined #perl6
15:25 rindolf joined #perl6
15:27 moritz_ where is svnbot?
15:27 moritz_ bloonix++ # commiting his first p6 module
15:37 avar /U/W 2
15:42 TimToady demq: your code emitter can just emit ~'foo' ~'bar' ~'baz' and it'll do the right thing
15:43 TimToady assuming some higher precedence operator doesn't strip your final arg, of course...
15:43 TimToady in which case you might want parens
15:46 TimToady but I'd say in general a code emitter should have a better sense of the structure of what it's doing than to use tricks like that
15:47 TimToady I've always been kind of insane about making code emitters produce code that resembles what a human would do
15:48 moritz_ I only do that for HTML "code" ;)
15:50 melissa joined #perl6
15:51 TimToady whois pugs_svnbot
15:52 TimToady hmm
15:54 moritz_ could it be that changes through the web interface aren't recorded by the svnbot?
15:57 shachaf joined #perl6
15:59 rindolf Hi shachaf
16:00 shachaf rindolf: Hello.
16:00 rindolf shachaf: what's up?
16:01 shachaf rindolf: I got disconnected from the IRC server sometime yesterday. This is a pretty rare event. :-)
16:01 rindolf shachaf: I see.
16:02 moritz_ if I declare a sub/method 'is rw', how can I acces the rvalue?
16:18 demq timtoady: ive found it useful a number of times, but your point about ~'foo'~'bar' is useful.
16:19 demq s/is useful/resolves the issue i was thinking of/
16:35 cognominal_ joined #perl6
16:41 iblechbot joined #perl6
16:53 DarkWolf84 there is nobody at the parrot channel
17:15 Tene DarkWolf84: irc.perl.org/#parrot
17:16 Tene that one?
17:16 DarkWolf84 no
17:16 DarkWolf84 that in tis server
17:16 DarkWolf84 this*
17:16 hakobe changed the nick to hkb_zz
17:17 DarkWolf84 Are they changed the server?
17:18 Tene That's always been the official parrot channel, as far as I know.
17:19 DarkWolf84 my mistake then
17:32 weinig joined #perl6
17:38 cognominal_ joined #perl6
17:42 justatheory joined #perl6
17:45 Psyche^ joined #perl6
17:58 TJCRI joined #perl6
18:01 Psyche^ changed the nick to Patterner
18:07 chris2 joined #perl6
18:29 TimToady moritz_: um, use it in an rvalue context?
18:55 meissner joined #perl6
19:22 dduncan joined #perl6
19:31 bonesss joined #perl6
19:33 rindolf joined #perl6
19:34 jisom joined #perl6
20:04 moritz_ TimToady: I mean if I have a sub foo is rw, and then call foo() = $bar; how do I get the value of $bar inside foo(){...} ?
20:08 wilx joined #perl6
20:16 TimToady you don't exactly; in fact, there's no guarantee that $bar even exists yet at the time foo is called.  foo must return an object that has a STORE method of some sort.
20:18 TimToady see S06:249
20:19 TimToady we don't follow the getters/setters model because it confuses the identity function of foo() with the operations it supplies
20:20 TimToady you'll note our autogenerated methods don't do getters/setters either, unlike Ruby
20:20 melissa joined #perl6
20:23 TimToady even within a class, if you say $.foo = 42 you can't be sure whether you're setting $!foo directly or calling an lvalue method
20:24 TimToady with getters and setters you always have to keep track of whether you're setting a variable or calling a method, and that is a leaky abstraction.
20:28 mncharity joined #perl6
20:31 Schwern joined #perl6
20:32 dduncan I prefer names like fetch|store over get|set myself
20:32 dduncan that's one thing Perl 5 got right, contrasted with some other languages
20:33 dduncan (thinking of tie interface)
20:45 diakopter eh - what's wrong with pugsbot
20:47 diakopter gtg
20:48 dduncan I have an opinion question concerning numeric literals in Perl 6 ...
20:48 dduncan in synopsis 2, I see examples like :2<...> or :16<...> etc to specify radix 2 and radix 16
20:49 dduncan I'm wondering if there is any room for specifying the radix using a number that is of the same radix as what we want to specify, for consistency ...
20:50 dduncan this could be done in a literal using a radix specifier that is the highest value that a single column of a number in that radix could be
20:50 Eidolos :10<10> == 2|3|4|5|6|7|... :)
20:51 dduncan so for example, to specify base-2, we say :1<...>, base-10 we have :9<...>, base-16 we have :F<...>, base 35 we have :Z<...> or some such
20:51 dduncan that way, the whole thing is in the same base, but it is unambiguous
20:51 dduncan rather than the specifier always being base 10
20:52 dduncan the trade-off is that this only works up to base 36 or so
20:52 dduncan assuming just the use of 1..9,A-Z
20:54 dduncan examples in synopsis 2 would then be :9<42> for 0d42, :F<DEAD_BEEF> for 0xDEADBEEF,
20:55 dduncan :1<1.1> for 0b1.1, :7<177777> for 0o177777
20:55 dduncan I think doing it that way has a certain level of elegance not present in using base-10 for the radix specifier all the time
20:56 dduncan what do you think?
20:56 dduncan or I'll ask p6l
20:57 Eidolos if we do that we may be able to simplify the syntax a little, since there's no need to separate the base from the number
20:57 Eidolos but in all I think it's a little weird
20:58 dduncan sure
20:58 dduncan in fact we could just say, eg, :F:DEAD_BEEF instead
20:58 dduncan or :FDEAD_BEEF
20:59 drupek12 joined #perl6
20:59 dduncan though keeping the <> retains consistency with other parts of the language
20:59 stevan joined #perl6
21:00 melissa joined #perl6
21:00 dduncan TimToady, any thoughts on this ... note that my main suggestion is to use single 1..9A..Z values to specify radix; the other parts of the syntax are orthogonal to my suggestion
21:00 dduncan s/values/characters/
21:03 dduncan as an alteration, if :A-Z might lead to confusion (for some reason) with eg a pair constructor, ...
21:04 dduncan perhaps something akin to 0b 0d etc could be used ...
21:05 dduncan eg, 0rN
21:06 dduncan so then, you could say eg 0r11.1 or 0r7177777 or 0rFDEADBEEF ... perhaps with some spacer character added between the N and the payload
21:07 dduncan the main point here being that users can then indeed specify numbers with a wide range of radixes using only characters that are actually in the same radix
21:09 dduncan regardless, I've decided to adopt such an approach in my Concrete Muldis D language, at least for now ... there eg it would be spelled Int:F:DEADBEEF or Int:9:42 or Int:7:177777 ... or Int:1:10110110 ... so this chat was partly to see if Perl 6 itself might benefit from something similar
21:12 dduncan for context, all literals are of format Type:Literal, such as Bool:true or Blob:F:A7017E or Text:'Hello World'
21:19 ozo joined #perl6
21:36 melissa joined #perl6
21:40 hkb_zz joined #perl6
22:03 avar joined #perl6
22:33 dduncan seen bloonix
22:33 buubot dduncan: Seen at Sat Aug  4 07:57:03 2007: <bloonix>
22:33 dduncan @tell dduncan this is a test
22:33 lambdabot You can tell yourself!
22:34 dduncan @tell bloonix please include some commit message for your pugs updates so its easier for people to know what you did from looking at the commit log
22:34 lambdabot Consider it noted.
22:35 dduncan @tell bloonix I mean, for future commits, give each one a message
22:35 lambdabot Consider it noted.
22:38 ofer joined #perl6
22:44 hkb_zz changed the nick to hakobe
22:44 ofer joined #perl6
22:45 hakobe changed the nick to hkb_aw
22:52 cognominal__ joined #perl6
23:04 dduncan in synopsis 5, is <?ws> supposed to match both \s* and \s+ depending what is next to the <?ws> ... if not, I may be seeing a typo
23:05 dduncan I'm thinking this example: m/ <?ws> next <?ws> cmd <?ws> = <?ws> <condition>/
23:05 dduncan which it says is effectively m/ \s* next \s+ cmd \s* = \s* <condition>/
23:08 ofer joined #perl6
23:40 TimToady dduncan: yes, <?ws> can match either of those.
23:41 dduncan okay
23:41 TimToady and I think the proposed radix notation kinda sucks visually
23:41 dduncan keep in mind that the only important part was the 1-9A-Z part
23:41 dduncan the other things can be made to whatever looks good
23:41 TimToady we certainly can't use :f
23:41 dduncan unless you think '1' for base-2 is what looks bad
23:42 TimToady I think having something that looks like part of the number that isn't is precisely what sucks
23:43 dduncan so how might you spell eg :F<DEAD_BEEF> without using a '16' or the '0x' ?
23:43 TimToady I don't have any problem with the 16
23:44 dduncan admittedly, I considered it a more minor issue, a "wouldn't it be nice if" thing
23:44 TimToady well, sorry, but I think it *wouldn't* be nice...
23:44 dduncan but if you prefer base 10 for the radix specifiers all the time, then so be it
23:44 TimToady from a psychological point of view
23:44 TimToady also, why specify base 16 as f, which is off by one?
23:45 dduncan I use the F because that is the highest character you can have in a column
23:45 TimToady yes I know, but it still means 15
23:45 dduncan its loosely analagous to zero-based array indexes
23:46 TimToady where else in the world do we try to make metadata look like the data it describes?
23:47 dduncan descriptions of english text are written in english
23:47 dduncan but I don't mean to belabour the issue
23:47 dduncan I let this matter drop
23:48 dduncan anyway, right now I'm trying to figure out how to write my first Perl 6 grammar
23:48 dduncan by studying synopsis 5 and Std.pm
23:48 TimToady have the appropriate amount of fun  :)
23:49 dduncan some details confuse me, and may or may not be typos ... for example: rule greet { [Hi|Hey|Yo] $<to>:=(\S+?) , $$} ... do square brackets indicate a list of literal tokens here rather than a character class?
23:50 avar list
23:50 dduncan more importantly, right now I'm trying to figure out where to define tokens vs rules vs regexes
23:50 TimToady yes, I'd suggest reading S05 before trying to understand STD
23:50 dduncan I am focusing on S05
23:51 TimToady square brackets are only for grouping now
23:51 TimToady you use <[...]> for character classes, or better, named classes
23:51 dduncan eg, in some respects, tokens|rules|regexes seem interchangeable sometimes as to which one uses to define something
23:51 TimToady you just use which is more convenient
23:52 TimToady start with a token, and if you find yourself scattering <?ws> all over, then you probably wanted a rule
23:52 avar tokens and rules are just implicit sugar on regexes
23:52 TimToady if you want backtracking, you probably wanted a regex
23:52 dduncan okay
23:53 avar regex { foo : bar } => token { foo bar }
23:53 TimToady there are really only about two places where STD wants backtracking
23:53 avar this is also all in s5 I belive:)
23:53 dduncan fyi, its the Concrete Muldis D grammar I'm writing, and it is supposed to be extremely simple ... no backtracking, no escapes that the parser should know about
23:54 TimToady well, in that case there's no difference, since foo can't backtrack
23:54 dduncan essentially, I'm trying to recode http://search.cpan.org/dist/Language-Mu​ldisD/lib/Language/MuldisD/Grammar.pod , with some simplifications, completions, into a Perl 6 grammar
23:54 lambdabot Title: Language::MuldisD::Grammar - The string representation format of Muldis D - sear ..., http://tinyurl.com/23j49y
23:54 dduncan it's currently a pseudo-ebnf
23:58 dduncan back to Perl 6, one thing I didn't seem to see yet in the synopsis is the means to specify Blob literals
23:58 avar token start { <literal> } token literal { <bool> | ... } regex bool { 'Bool::' : [ 'default' | 'false' | 'true' ] }
23:58 avar and so on
23:59 avar look at some of the grammars in parrot
23:59 TimToady literal words don't need to be quoted
23:59 dduncan thank you
23:59 dduncan one thing I already did was eg: token enum_bool { < false true > }

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

Perl 6 | Reference Documentation | Rakudo