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