Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2007-05-16

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:05 guinex joined #perl6
00:17 weinig_ joined #perl6
00:18 justatheory joined #perl6
00:30 ggoebel joined #perl6
00:43 justatheory joined #perl6
00:52 Psyche^ joined #perl6
00:59 [particle] joined #perl6
01:01 nipotan changed the nick to nipotaway
01:07 Patterner changed the nick to Psyche^
01:16 ggoebel joined #perl6
01:23 weinig_ joined #perl6
01:30 nipotan joined #perl6
01:35 edenc_ joined #perl6
01:41 drupek12 joined #perl6
01:54 araujo joined #perl6
02:04 Aankhen`` Yay, done with Perl6::Perldoc::To::Html
02:04 Aankhen`` TheDamian++
02:04 mncharity :)
02:10 Psyche^ joined #perl6
02:12 SubStack joined #perl6
02:13 PerlJam Now all we need are some Perl 6 implementations
02:13 PerlJam :-)
02:13 Tene Aankhen``: what's the advantage of using that instead of xhtml?
02:13 PerlJam Tene wins the Wrong Question award tonight!  :)
02:15 Tene PerlJam: should I instead ask "What's the advantage of using the xhtml one instead of that?"?
02:16 PerlJam Tene: No, the output format is largely irrelevant as long as it's something useful.
02:17 Tene PerlJam: I was asking for the situations where html is more useful than xhtml
02:19 Patterner changed the nick to Psyche^
02:26 Aankhen`` Heh.
02:27 Aankhen`` Tene: Actually, you do win the Wrong Question Award, but not for the reasons PerlJam thinks. ;-)
02:27 Aankhen`` The question is "what's the advantage of using XHTML instead of HTML?".
02:28 Tene Well that was the other question I proposed. ;)
02:28 Aankhen`` Whoops, sorry, I missed that.
02:29 Aankhen`` (I've been missing a lot of things lately.  No, not my sanity; that's just normal.)
02:29 Aankhen`` In a nutshell, at present, there are no advantages to using XHTML.
02:29 Tene Are there disadvantages?
02:29 Aankhen`` Yup.
02:30 Aankhen`` Stricter = more effort required to create XHTML documents, higher likelihood of broken documents due to small mistakes… greater verbosity in general for no good reason.
02:30 Aankhen`` And the best part is that unless you're sending the XHTML as application/xhtml+xml (which you're probably not, using text/html instead), it's treated as tag soup anyway by the browser.
02:37 zperl joined #perl6
02:37 zperl hi
02:37 zperl can anyone tell me how to get an account on feather dev server?
02:38 PerlJam zperl: ask Juerd.  There's even a perlmonks node that tells you how too
02:40 zperl perljam: thx
02:58 obvio171 joined #perl6
03:15 rashakil joined #perl6
03:16 buu '
03:16 Tene `
03:16 Aankhen``
03:17 Tene ´
03:25 stevan_ joined #perl6
03:28 Aankhen``
03:29 Tene ¨
03:32 casey_v joined #perl6
03:33 amnesiac joined #perl6
03:38 Aankhen``
03:48 drupek12 joined #perl6
03:49 veritos joined #perl6
03:57 weinig joined #perl6
04:10 perlDreamer joined #perl6
04:14 gaal ingy: moose. no matter, I thought I had a golf suggestion to the tiny crc checker but it was wrong
04:15 gaal ingy: re: object keys in hashes (in your blog post), Java has 'em, but arguably at the library level so it doesn't count. Perl 6 has 'em too but not by default.
04:16 perlDreamer @tell agentzh I think that the closure work is done in t/TASKS, but I'd like to double check with you since you added it.  What specific things were you thinking of?
04:16 lambdabot Consider it noted.
04:38 TimToady should be as easy as declaring "my %hash{Object}" though
04:39 zzzzz joined #perl6
04:40 cybercobra joined #perl6
04:42 Aankhen`` Oh, for a moment I thought "not by default" meant you had to use a pragma or module to get that.
04:42 TimToady that's why I said what I said.  :)
04:42 Aankhen`` I am forever in your debt for alleviating my fears. ;-)
04:53 REPLeffect joined #perl6
04:54 justatheory joined #perl6
04:57 cybercobra so...roles look awesome
05:03 weinig joined #perl6
05:08 BooK joined #perl6
05:26 navigator joined #perl6
05:26 navigator ######333333333
05:27 navigator left #perl6
05:31 zperl joined #perl6
05:48 Jedai joined #perl6
05:53 Aankhen`` From S05… token rule_assertion:<*> { ... }     # define your own <*stuff>
05:53 Aankhen`` What does `<*stuff>` mean?
06:10 TimToady hmm, well, it's regex_assertion:sym<*> in STD, so the syn is a bit out of date there
06:10 TimToady but the point is to give extensible rules based on the first character within a /<...>/
06:11 TimToady but basically the regex can do anything it likes with "stuff"
06:12 TimToady so <+...> treats ... as a set of character classes
06:13 TimToady but <!...> treats ... as a nested negated assertion
06:14 buetow joined #perl6
06:24 cv joined #perl6
06:24 pbuetow joined #perl6
06:25 cv left #perl6
06:25 Averell joined #perl6
06:26 riffraff joined #perl6
06:39 Aankhen`` TimToady: Oh, I see. Thanks.
06:46 rfordinal changed the nick to rfordinal_
06:49 iblechbot joined #perl6
07:07 franck__ joined #perl6
07:25 jisom joined #perl6
07:40 rfordinal joined #perl6
07:44 rfordinal joined #perl6
07:47 rfordinal joined #perl6
07:54 mauke joined #perl6
08:08 IllvilJa joined #perl6
08:13 the_dormant joined #perl6
08:16 avar joined #perl6
08:21 buetow joined #perl6
08:21 svnbot6 r16306 | tene++ | Fix adventure.pl to compile and run.
08:21 svnbot6 r16306 | tene++ | Add a couple of commands.
08:27 svnbot6 r16307 | tene++ | Stringify directions in adventure.pl correctly.
08:52 lichtkind joined #perl6
08:58 rfordinal joined #perl6
09:07 dduncan I liked that part about the translators adding lots of words to the slides that the presenter doesn't understand
09:08 dduncan hm, I forgot my irc client was scrolled back ... the reply is for something posted 12 hours ago
09:09 drupek12 joined #perl6
09:10 dduncan left #perl6
09:27 elmex joined #perl6
09:46 BooK_ joined #perl6
10:07 brx joined #perl6
10:07 brx left #perl6
10:23 buetow joined #perl6
10:36 ruoso joined #perl6
11:05 chris2 joined #perl6
11:05 zzzz joined #perl6
11:07 zzzz hi
11:07 zzzz how do i port a cpan package from p5 to p6?
11:08 moritz hi
11:09 zzzz moritz: hi
11:09 moritz zzzz: you learn perl 6 and then rewrite them ;)
11:09 moritz lunch, bbiab&
11:09 avar One issue I ran into when I tried to do that is that there's nothing like M::I
11:09 zzzz moritz: lol
11:09 avar I hacked something together which used the pugs build stuff, but that didn't test things properly so I ended up making my own makefile
11:10 zzzz is there a naming convention for ported p5->p6 packages?
11:17 diakopter zzzz: I dunno.  how about 6::Previous::Name
11:17 diakopter or v6::Previous::Name
11:21 nferraz joined #perl6
11:22 sreeram joined #perl6
11:26 zzzz diakopter: thx
11:34 ofer joined #perl6
11:47 ofer joined #perl6
11:50 IllvilJa Has Parroy 0.4.11 been released?
11:50 IllvilJa s/Parroy/Parrot/
11:51 IllvilJa Sorry, too much distraction around here... I wondered if parrot 0.4.12 had been released.
11:51 drupek12 joined #perl6
11:55 nipotaway changed the nick to nipotan
11:56 moritz IllvilJa: yes, it has
11:57 moritz "
11:57 moritz On behalf of the Parrot team, I'm proud to announce Parrot 0.4.12 "Of the
11:57 moritz Caribbean." Parrot (http://parrotcode.org/) is a virtual machine aimed at
11:57 lambdabot Title: Parrot Virtual Machine - parrotcode
11:57 moritz running all dynamic languages."
12:01 theorb joined #perl6
12:03 kanru joined #perl6
12:08 sreeram left #perl6
12:10 kunwon1 joined #perl6
12:33 lichtkind joined #perl6
12:34 lichtkind moritz:  i hope i dont disturb you yesterday
12:36 moritz lichtkind: no, you didn't ;)
12:37 baest joined #perl6
12:37 the_dormant joined #perl6
12:39 baest joined #perl6
12:41 ruz joined #perl6
12:43 lichtkind moritz: good :)
12:45 IllvilJa moritz: Thanks a bunch for the reply.  Sorry for geting back this late, but I got distracted.
12:46 BooK joined #perl6
12:52 IllvilJa morits and Co: when I visit http://parrotcode.org, I get to a page that stage that Parrot 0.4.11 "Tax Bird" has been released.  Sort of puzzling.  Am I the only one seeing that?
12:52 lambdabot Title: Parrot Virtual Machine - parrotcode
12:53 moritz IllvilJa: it seems it's not updated... I'll go to #parrot and tell them
12:53 IllvilJa Where is #parrot... is it on freenode or some other IRC service?
12:54 moritz IllvilJa: on irc.perl.org
12:54 IllvilJa Aha.  Thx.  When I joined #parrot here I was the only attendant ;-).
12:54 moritz ok ;)
13:01 Jedai joined #perl6
13:19 xinming joined #perl6
13:20 fglock joined #perl6
13:23 drupek12 joined #perl6
13:32 gaal ot, but does anyone remember if there's a perlvar that means ($1, $2, $3 .. ${lastmatch})?
13:33 gaal Perl 5
13:35 devogon joined #perl6
13:36 mauke no, but you can use @-, @+ and substr
13:37 gaal okay, thanks!
13:37 * gaal wants ($moose, $elk) = first { /moose: (.*), elk: (.*)/ } @applicants
13:39 mauke heh, that's a foldr
13:39 mauke ($moose, $elk) = map /moose: (.*), elk: (.*)/, @applicants;
13:39 mauke that should work for horrible reasons
13:41 gaal yeah
13:42 gaal but I'd rather not spell it that way :)
13:42 mauke you could write this in a sane way if perl had lazy lists
13:43 moritz well, perl has lazy lists
13:43 moritz perl 6, that is ;)
13:44 lichtkind moritz the maon obstacle of all that tuts is to sort all knoledge in a sane way
13:45 moritz lichtkind: yes
13:45 mauke let ([moose, elk] : _) = map (=~ "moose: (.*), elk: (.*)") applicants
13:45 moritz what's that? caml? haskell?
13:46 mauke haskell
13:47 franck___ joined #perl6
13:47 mauke OCaml would look like this: let ([moose, elk] :: _) = map (fun x -> x =~ "moose: (.*), elk: (.*)") applicants
13:47 mauke and you couldn't write =~
13:48 moritz ok ;)
13:49 moritz mauke: how do ocaml and haskell compare? which is easier to learn, which is more powerfull? or is it hard to say?
13:50 mauke I like Haskell better
13:50 mauke OCaml is probably easier to learn
13:51 moritz is wanted to learn ocaml, but I found the type declaration syntax very ugly ;)
13:51 Juerd There was an ocaml user here a while ago, who said that because he knew ocaml, haskell wasn't hard to learn.
13:51 moritz s/is/I/
13:51 mauke OCaml is more like a traditional imperative language; it's also parsed top-down, like C
13:51 mauke yeah, you're not supposed to use type declarations in OCaml
13:51 Juerd moritz: You're a Perl guy, right? How can ugliness scare you :)
13:51 mauke and yes, it is ugly in general
13:52 mauke OCaml also lacks type classes and other cool Haskell stuff
13:53 mauke by using OCaml you'll learn about strong typing, type inference, pattern matching/destructuring, thinking in recursion
13:55 moritz Juerd: there are different kinds of uglyness ;)
13:55 moritz perhaps some time later I'll try again
14:05 awwaiid joined #perl6
14:14 gaal a lot of the basic functional stuff is easy for O'Caml, uh lambdamoose to see in Haskell
14:15 gaal type inference, polymorphism, folds and other morphisms
14:15 gaal hmm, didn't stevan say he knew some O'Caml?
14:16 moritz I learned a bit scheme in school, so recursion is not entirely new for me
14:16 rhandom joined #perl6
14:22 jerrylee joined #perl6
14:35 thepler joined #perl6
14:52 stevan__ joined #perl6
15:04 weinig joined #perl6
15:10 franck__ joined #perl6
15:14 rho joined #perl6
15:18 rindolf joined #perl6
15:34 [particle1 joined #perl6
15:34 buetow joined #perl6
15:40 [particle2 joined #perl6
15:40 polettix joined #perl6
15:44 svnbot6 r16308 | rhr++ | [examples/unitsdat-grammar.pl] Add a rough draft of a parser for units(1) units.dat
15:44 svnbot6 r16308 | rhr++ | May eventually be useful for implementing units in Perl 6
15:52 drupek12 joined #perl6
15:56 turrepurre joined #perl6
16:01 kanru joined #perl6
16:07 baest_ joined #perl6
16:09 bonesss joined #perl6
16:17 fglock joined #perl6
16:18 nothingmuch i need some gettext advice
16:18 nothingmuch i have .pot files
16:18 nothingmuch for pootle to work with
16:18 nothingmuch they are just the english .pos really
16:18 nothingmuch i want to strip the msgstrs
16:18 nothingmuch i don't see it as an option to msginit
16:19 nothingmuch gaal: got an idea?
16:19 veritos joined #perl6
16:20 bernhard joined #perl6
16:26 jerrylee hi pugs can compile to standalone executable ?
16:27 veritos jerrylee: not directly, it can somewhat compile to haskell code which you can compile.
16:27 jerrylee veritos: so it's compile to .hs, then we compile?
16:27 veritos jerrylee: yeah basically
16:28 jerrylee thanks veritos :)
16:28 veritos i dunno how to do that tho
16:28 veritos by default it just runs it like perl 5 does
16:28 veritos except slower!
16:30 jerrylee pugs -Cbackend file.pl
16:30 jerrylee but what backend is available?
16:30 veritos try haskell, hs, perl5, c, etc.
16:30 jerrylee ok
16:31 jerrylee veritos: not working ..
16:32 veritos jerrylee: i was just giving suggestions. i dunno for sure.
16:32 jerrylee veritos: ok ;)
16:32 SubStack joined #perl6
16:36 nothingmuch msgfilter
16:37 gaal nothingmuch: moose. is that the answer to your question?
16:38 gaal it's been a while since i did PO stuff
16:38 nothingmuch yes
16:38 gaal cool
16:38 perlDreamer joined #perl6
16:39 nothingmuch new laptop faaaaast
16:39 nothingmuch mmm
16:41 weinig_ joined #perl6
16:42 weinigLap changed the nick to weinig_
16:43 zperl joined #perl6
16:43 zperl ?eval say "Hi people"
16:44 evalbot_r16308 changed the nick to evalbot_r16305
16:44 evalbot_r16308 OUTPUT[Hi people␤] Bool::True
16:51 justatheory joined #perl6
16:52 fglock_ joined #perl6
16:52 TimToady ?eval say "Hi bots, too"
16:52 evalbot_r16308 OUTPUT[Hi bots, too␤] Bool::True
16:58 franck__ joined #perl6
17:03 Aankhen`` joined #perl6
17:03 trippeh So what happens if I do ?eval open something? :-)
17:04 trippeh To the evalbot, that is.
17:04 [particle2 evalbot won't let you run unsafe ops
17:04 particl1 changed the nick to [particle2
17:04 amnesiac joined #perl6
17:04 [particle] changed the nick to particl1
17:05 trippeh Aww, good :)
17:05 [particle] ?eval fork while fork
17:05 evalbot_r16308 Error: Unsafe function 'fork' called under safe mode
17:06 gnuvince How does evalbot recognize something as unsafe?  Are those subs tagged or just a list of "do not run!" subs?
17:07 [particle] i think there's a list... i forget the details, but it shouldn't be hard to find
17:08 hirschnase joined #perl6
17:08 [particle] eg. docs/Pugs/Doc/Run.pod
17:08 hirschnase left #perl6
17:08 hirschnase joined #perl6
17:09 Aankhen`` Aren't they marked as unsafe in the Prelude?
17:09 * [particle] doesn't know
17:09 * gnuvince is grepping around
17:09 Aankhen`` gnuvince: Search for "is unsafe".
17:09 Aankhen`` I'm pretty sure I saw them marked as such in the Prelude.
17:10 Aankhen`` Or maybe those were other functions in the Prelude, and I saw `open` &c. in S29.  Hmm.
17:12 gnuvince Aankhen``++
17:13 Aankhen`` Glad to be of service. :-)
17:21 rhandom Is there a synopsis that talks about Safe Mode/Privilege dropping/Memory Limiting/Process Limiting/CPU Limiting ?
17:22 [particle] not afaik
17:22 gnuvince rhandom: without looking or being sure, maybe the subroutine one?
17:23 gnuvince nope...
17:23 rhandom i don't remember seeing it in that one
17:23 rhandom I don't remember seeing anything mentioned about these yet.  I'm hoping for wonderful abilities in Perl 6.
17:24 gnuvince rhandom: my biggest hope is great multi-programming support
17:24 rhandom multi-programming ? http://en.wikipedia.org/wiki/Special:Se​arch?search=multi+programming&amp;go=Go
17:24 lambdabot http://tinyurl.com/ywwc4b
17:33 Psyche^ joined #perl6
17:49 Patterner changed the nick to Psyche^
18:16 electrogeek joined #perl6
18:17 Aankhen`` What are the other cases similar to `s[pattern] = "replacement"` where the RHS is treated as if it has an implicit closure around it?
18:22 Aankhen`` Are there any practical examples of @arr ~~ /pat/?
18:29 Gothmog_ It's like grep /pat/, @arr in p5, I think.
18:29 moritz Gothmog_: not exactly
18:29 moritz if the pattern looks like m/foo$$^^bar/ it matches two successive elements
18:29 moritz one ending in foo, the next one starting in bar
18:30 moritz (iirc)
18:30 moritz you can't do that with grep
18:31 Gothmog_ Hm, lots of magic.
18:32 Gothmog_ Smart Match table in S03 says "    Array     Regex     array "boolean grep"    .any.match(X)"
18:34 moritz Gothmog_: read S05, "Matching against non-strings"
18:35 moritz the seperator is <,>, not $$^^
18:36 [particle] how about un-hyphenating text?
18:36 [particle] /-^^<alpha>/
18:36 moritz good idea
18:37 moritz or @lines =~ /-<,>/
18:45 japhb joined #perl6
18:48 mauke_ joined #perl6
18:58 mauke changed the nick to mauke_
19:07 jisom joined #perl6
19:10 TimToady Aankhen``: all of the other pseudoassignment happens on declarations currently, so 'has $.foo = bar()' is closurely on the right, for instance
19:13 TimToady it looks like S03 and S05 are contradictory on the subject of Array ~~ Regex.  I believe S03 is correct, and you have to use Array.cat ~~ Regex to match the array as a pseudostring
19:15 * PerlJam still half-expects there to be a .dog method
19:15 PerlJam ;)
19:15 moritz PerlJam: you can still define one ;)
19:17 fglock joined #perl6
19:21 jisom joined #perl6
19:23 wolverian wow, it's hard to sell the distributed scm approach to a group of artists
19:30 TimToady Sacred Cow Maneuver?
19:30 SamB source control machine
19:31 ludan joined #perl6
19:32 wolverian sacred cow manure? :)
19:33 ludan hoi
19:37 TimToady polloi
19:38 _bernhard joined #perl6
19:39 TimToady scanning chunneling microscope?
19:39 obra wolverian: what medium do they work in?
19:39 obra (unless it's code, SCM isn't what they need ;)
19:40 wolverian right. binary files.
19:40 TimToady Software Chaotic Memory
19:40 moritz it's no fun to watch binary diffs ;)
19:41 obra merging binaries hurts a lot. though I suppose you could merge and diff bitmapped images ;)
19:43 dduncan joined #perl6
19:44 wolverian obra, so what do they need?
19:44 obra they may well need version control. What are they actaully doing?
19:44 wolverian games
19:44 wolverian they're using perforce now
19:44 wolverian the locking is really important :)
19:49 obra Distributed + locking is hard ;)
19:49 wolverian quite
19:51 sapir joined #perl6
19:55 prism joined #perl6
19:55 the_dormant joined #perl6
19:57 meppl good night
19:57 TimToady n8
20:00 meppl ;)
20:01 ruoso joined #perl6
20:09 Aankhen`` Okay, more questions, if anyone has the time and the answers... multi token sigil:sym<$>  { <sym> } # how does the name for this rule break down? (from S05)
20:10 Aankhen`` Actually, that's all I've got for now.  That, and "why am I not a billionaire yet?".
20:11 fglock joined #perl6
20:14 offby1 ``Because the Universe hates you™''
20:16 Aankhen`` u lie
20:16 Aankhen`` i have lots of frnds on teh internets more than u i bet
20:16 DrSlump joined #perl6
20:16 DrSlump hello
20:16 Aankhen`` Hiya.
20:17 DrSlump hi Aankhen
20:18 Aankhen`` What's shakin'?
20:19 Aankhen`` ?eval [<=] (1, 5, 5, 8)
20:19 evalbot_r16308 Bool::True
20:19 Aankhen`` ?eval [<=] (1, 5, 9, 8)
20:19 evalbot_r16308 Bool::False
20:21 DrSlump I was wondering if there's a planned feature in p6 rules to search for two words in a string, like /fred|joe/ matches lines containing fred or joe or both, /fred&joe/ would match on "joe harry fred"...?
20:23 moritz DrSlump: m/ [.*fred.*] & [.*joe.*] / (but that's a bad hack
20:23 TimToady you'd have to write it /.*fred.* & .*joe.*/
20:23 Aankhen`` There *is* an & operator (and an && operator), but it serves a different purpose: "The new & metacharacter separates conjunctive terms. The patterns on either side must match with the same beginning and end point. Note: if you don't want your two terms to end at the same point, then you really want to use a lookahead instead."
20:24 DrSlump oh, that's very nice :)
20:25 avar Yes Perl will finally have regular expressions in p6:)
20:28 avar 'c' = character, 'ca' = series of chars, 'c' | 'a' = or of chars
20:28 avar and * takes care of the rest:)
20:29 TimToady Aankhen``: basically, the longname of the rule includes the adverb
20:29 TimToady we do much the same with module names now, where the identifier is your name for the module, and everything else in the name is advers
20:29 TimToady *adverbs
20:30 the_dormant joined #perl6
20:31 DrSlump in fact, i was trying to make that in perl 5 and ended up with two regexes (/fred/ and /joe/) and wondered why there wasn't an easy way to do that. I've seen a way to do it with lookahead, but i'm not very good with regular expressions and it seems a little cryptic to me. I'm happy to see there's good stuff in the oven for p6 :-)
20:32 TimToady in p6, / ^ <before .*fred> <before .*joe> / would suffice
20:33 weinigLap joined #perl6
20:34 Aankhen`` Hmm, not sure I follow.  I suppose "sigil" is the adverb, "sym" the category (?), but what is the <$> doing in the name?  Is that where the multi dispatch comes in?  And then the body is just <sym>...
20:35 TimToady :sym<*> is the adverbial pair
20:35 Aankhen`` D'oh.
20:35 TimToady as in all the rest of p6
20:35 Aankhen`` Ahhh.
20:35 Aankhen`` Heh.
20:36 Aankhen`` The light of understanding finally dawns. =)
20:36 TimToady and sym => '*' provides the default string for <sym> to match
20:36 DrSlump TimToady: /.*fred.* & .*joe.*/ speaks more to me, what does <before xxx> do?
20:36 Aankhen`` Right.
20:36 TimToady and the default symbol name for the eventual infix:<*> operator
20:37 TimToady but by setting $<sym> the rule can use something matched for the eventual symbol name insteaqd
20:38 Aankhen`` So will an adverbial :X<Y> on any rule mean that <X> matches Y within the rule?
20:38 Aankhen`` (That light of understanding is still in the process of dawning.)
20:38 TimToady I would want to see a use case for generalizing it that far
20:39 Aankhen`` Okay, I was just wondering.
20:39 TimToady right now we accept :X as a shorthand for :sym<X>
20:39 TimToady that might interfere
20:39 Aankhen`` That it might.
20:40 TimToady DrSlump: <before xxx> check to see if xxx would match right here without advancing the "pointer"; it's p6's syntax for lookahead
20:40 Aankhen`` DrSlump: In "ab" ~~ /. <before b>/, the rule matches "a" because it precedes a "b", without actually including "b" in the match.
20:42 DrSlump ah thanks :-)
20:42 svnbot6 r16309 | rhr++ | [examples/unitsdat-grammar.pl] Support for unit prefixes, plurals.  Random cleanups.
20:45 DrSlump i'm reading the Synopsis 5, you're all doing a great work on the next version of perl, let me tell you: thanks and congratulations :-)
20:46 moritz TimToady++ Damian++ glob("*")++ ;-)
20:46 DrSlump yeah! ;-)
20:47 nwc10 joined #perl6
20:47 nwc10 if I have the syntax correct:
20:47 nwc10 state $foo = bar();
20:47 nwc10 what's the type of block that bar() effectively lives in? FIRST?
20:48 TimToady used to be called FIRST, is now called START
20:49 TimToady equiv to state $foo; START { $foo = bar() }
20:49 zzzz joined #perl6
20:49 svnbot6 r16310 | rhr++ | [examples/unitsdat-grammar.pl] correct prefix thinko
20:49 nwc10 ah right.
20:50 TimToady (FIRST now represents the first time through a loop)
20:50 nwc10 OK. Right now in blead I see:
20:50 nwc10 $ ./perl -Ilib -wlE 'sub foo {state $a = shift; print $a} foo(3); foo(4)'
20:50 nwc10 3
20:50 nwc10 4
20:50 nwc10 This isn't good. Particularly the lack of warnings
20:51 TimToady yes, that is incorrect by p6's lights
20:51 nwc10 state does work - this is correct, I believe:
20:51 nwc10 $ ./perl -Ilib -wlE 'sub foo {state $a; $a //= shift; print $a} foo(3); foo(4)'
20:51 nwc10 3
20:51 nwc10 3
20:52 TimToady well, we already knew the stately mechanism was implicit in the pad from "my $foo if 0"
20:52 TimToady but its the START bit that is hard, as you mentioned
20:52 TimToady *it's
20:52 svnbot6 r16311 | rhr++ | [examples/unitsdat-grammar.pl] more prefix thinkos, argh
20:52 nwc10 I don't think that it's impossible
20:53 nwc10 it's "just" detecting  C<state $foo = bar()>
20:53 nwc10 and turning it into
20:53 nwc10 state $foo; unless (initialised $foo) {$foo = bar()};
20:53 TimToady state $foo; state $foo_INIT; { $foo = bar() unless $foo_INIT++ } or some such
20:53 TimToady yeah, what you said
20:54 electrogeek joined #perl6
20:54 nwc10 where C<initialised $foo> is a special op
20:54 TimToady don't know why I put a {...} around; imminent death of the neural net predicted
20:54 nwc10 there is a flag bit on the pad that was already spare for it
20:54 nwc10 you've been programming in too much C and Perl, and so it's always now if (foo) {bar;}
20:55 TimToady love to nibble dey tiny bits...
20:55 nwc10 gah. I want Perl 6. Because I can't nest foreaches in perl with the same $_
20:56 nwc10 actually, it's more map {} that needs it
20:56 Tene nwc10: so use it
20:56 nwc10 OK. I think that this is correct behaviour, isn't it, for closures?
20:56 nwc10 $ ./perl -Ilib -wlE 'sub foo {state $a; $a //= shift; return sub {state $b; $b //= shift; "$a,$b"}} my $s1 = foo(3); my $s2 = foo(4); print foreach $s1->(5), $s1->(6), $s2->(7), $s2->(8)'
20:56 nwc10 3,5
20:56 nwc10 3,5
20:56 nwc10 3,7
20:57 nwc10 3,7
21:00 TimToady looks pretty good, modulo the // hack
21:00 nwc10 good.
21:01 nwc10 One of raphael's concerns was what to do when presented with something like:
21:01 nwc10 (my $foo, state $bar) = ...;
21:01 nwc10 my view was, if it's not a compile time error, it's at least a mandatory warning
21:01 TimToady that's not a pseudoassignment, that's a real assignment
21:01 TimToady so it always reassigns
21:01 nwc10 ah right.
21:01 nwc10 OK
21:01 nwc10 I'm confusing it with state ($foo, $bar) = ...;   ?
21:02 TimToady it's a "Doctor, it hurts when I do this."  :)
21:02 nwc10 LOL
21:02 justatheory joined #perl6
21:04 TimToady it's a DIHWIDT :)
21:05 TimToady I'll have to drop that one on the PMeys at some point...
21:18 svnbot6 r16312 | rhr++ | [examples/unitsdat-grammar.pl] add support for numerical builtins log sin etc.
21:24 SamB joined #perl6
21:30 SamB joined #perl6
21:39 svnbot6 r16313 | rhr++ | [examples/unitsdat-grammar.pl] self-recursive rules don't need repitition
21:40 prism joined #perl6
21:42 larsen_ joined #perl6
21:48 perlDreamer Should ENTER be called when entering another closure block?
21:51 svnbot6 r16314 | rhr++ | [examples/unitsdat-grammar.pl] more prefix fixes
21:57 TimToady ENTER is called only when the immediately surrounding block is entered.
21:59 spinclad joined #perl6
21:59 perlDreamer is the main program considered a block?
22:00 TimToady sure, why not?
22:02 perlDreamer I'm reading through some of the existing tests to get a leg up on the language, and it looks like ENTER is not called that way.
22:02 perlDreamer t/closure_traits/ascending_order.t
22:02 perlDreamer I'm just having a hard time figuring out what's a bug and what's other things going on.
22:03 larsen__ joined #perl6
22:04 diakopter "get a leg up on": Perl6.mount and ( Perl6.ride or Perl6.buck )
22:05 perlDreamer Perl6.HangOnForDear('life')
22:12 cernd left #perl6
22:39 [particle] left #perl6
22:46 [particle1 joined #perl6
22:57 zombie-crash changed the nick to crashmatrix
22:57 hatsuseno changed the nick to zombie-crash
23:12 ggoebel joined #perl6
23:20 moritz does Perl 6 offer a possibility to mark a variable as non-modifiable until falls out of scope?
23:23 QtPlatypus moritz: Yes
23:24 Psyche^ joined #perl6
23:24 moritz QtPlatypus: how?
23:25 theorbtwo joined #perl6
23:28 * QtPlatypus doesn't know "I expect the easyest way would be to use a little sub"
23:29 QtPlatypus Or even a block
23:31 Tene moritz: look at 'temp' and 'let'
23:31 moritz Tene: thanks, I will
23:31 edenc joined #perl6
23:31 Tene moritz: perhaps 'temp $foo is ro;' ocelot
23:31 lambdabot joined #perl6
23:39 Patterner changed the nick to Psyche^
23:40 weinigLap joined #perl6
23:53 mauke left #perl6
23:59 weinigLap_ joined #perl6

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

Perl 6 | Reference Documentation | Rakudo