»ö« | perl6-projects.org/ | nopaste: sial.org/pbot/perl6 | evalbot: 'perl6: say 3;' | irclog: irc.pugscode.org/ | UTF-8 is your friend! Set by Tene on 14 May 2009. |
|||
00:10
DemoFreak left
00:15
snarkyboojum left
00:23
kate21de1 left
|
|||
pmichaud | japhb: it would need to be "use OpenGL:from<parrot>;" (no space before :from) | 00:25 | |
still it may not quite work yet. | |||
japhb | pastebin? | 00:27 | |
sial.org dead? | |||
or rather, the pastebot ... | |||
pmichaud: Can you explain why 'use()' gets called twice here? gist.github.com/128344 | 00:29 | ||
pmichaud | probably once at compile time, and then again when Parrot compiles the PIR. | 00:33 | |
00:34
lichtkind left
|
|||
pmichaud | We don't have the BEGIN semantics completely worked out yet in the implementation (although I know how to do it -- just haven't had a chance to implement it) | 00:34 | |
japhb | Ah, OK | ||
pmichaud | Parrot doesn't give me a way to "compile this batch of PIR but don't load or execute it" | ||
japhb | nodnod | 00:35 | |
DanielC | Speaking of Parrot PIR... | 00:37 | |
pmichaud: Did you see that Q:PIR doesn't like sprintf? | |||
pmichaud | sprintf is fine -- the Q:PIR gets confused by the % | 00:38 | |
It sees the %0 and tries to do an argument substitution. | |||
DanielC | Ok. | 00:39 | |
pmichaud | try "\x2502x instead | ||
or actually | |||
DanielC | Well, I already solved the particular problem by doing the conversion in Perl 6, but I thought I'd mention the problem. | ||
pmichaud | Q:PIR {{ ... $S0 = sprintf "\x{25}02x", $P0 | ||
yes, it's a known issue. | 00:40 | ||
DanielC | ok | ||
pmichaud | it's not one I'm likely to do much about, since sprintf is a little uncommon and we have a workaround. | ||
DanielC | Not the top priority I'm sure. | ||
Meldrake_ | rakudo: say +<1 2 3 4> | 01:12 | |
p6eval | rakudo 86aeaf: OUTPUT«4» | ||
Meldrake_ | rakudo: say +<1 2 3 4>.WHAT | ||
p6eval | rakudo 86aeaf: OUTPUT«Use of type object as value0» | ||
Meldrake_ | Is this a bug? | 01:13 | |
01:13
donaldh left,
donaldh joined
|
|||
DanielC | It is parsing it as +(<1 2 3 4>.WHAT) | 01:13 | |
Meldrake_ | Oh, ok. | ||
New here, just trying stuff out. | |||
Thanks | |||
DanielC | rakudo: say (+<1 2 3 4>).WHAT | ||
p6eval | rakudo 86aeaf: OUTPUT«Num()» | 01:14 | |
DanielC | trying is great | ||
I only started playing with Perl 6 just over two weeks ago. | |||
Meldrake_ | So how come it's a Num(), not an Int()? | ||
DanielC | dunno | ||
Meldrake_ | OK :-) | 01:15 | |
DanielC | It does seem odd. Obviously the list length will not be an decimal. | ||
Meldrake_ | Yeah, that's what I thought | ||
DanielC | rakudo: say <1 2 3>.elems.WHAT | ||
p6eval | rakudo 86aeaf: OUTPUT«Int()» | ||
DanielC | The + simply means "numerical context". | 01:16 | |
Whereas .elems is a method, so it gives a more sensible answer. | |||
But still... I'd expect an array in list context to be an Int. | |||
rakudo: my $a = <1 2 3>; say $a.WHAT | 01:17 | ||
p6eval | rakudo 86aeaf: OUTPUT«Array()» | ||
Meldrake_ | Me too. I guess I need to learn PIR | ||
DanielC | rakudo: my $a = +<1 2 3>; say $a.WHAT | ||
p6eval | rakudo 86aeaf: OUTPUT«Num()» | ||
DanielC | rakudo: my Int $a = +<1 2 3>; say $a.WHAT | ||
p6eval | rakudo 86aeaf: OUTPUT«Type mismatch in assignment; expected something matching type Int but got something of type Num()in Main (/tmp/8cgdQ3938W:2)» | ||
DanielC | Interesting. | ||
pmichaud | currently rakudo treats + as always returning Num | 01:25 | |
DanielC | What does the spec say? | 01:26 | |
01:26
agentzh left
|
|||
pmichaud | well, clearly + $foo numfies | 01:26 | |
numifies | |||
but it's not always an Int | |||
01:26
agentzh joined
|
|||
Meldrake_ | rakudo: say +<1 2 3>.perl | 01:26 | |
01:26
wayland76 joined
|
|||
p6eval | rakudo 86aeaf: OUTPUT«0» | 01:26 | |
pmichaud | in this particular case, the spec isn't explicit. But it's likely that +<1 2 3 4> will return an Int -- rakudo just doesn't have that in place yet. | ||
for example... | 01:27 | ||
rakudo: say +<3.4>; | |||
p6eval | rakudo 86aeaf: OUTPUT«3.4» | ||
pmichaud | Rakudo gets that one right. :-) | ||
DanielC | <3.4> is not a list of one element? | 01:28 | |
pmichaud | it is not. | ||
DanielC | k | ||
pmichaud | <3.4> is the same as ('3.4') which is the same as '3.4' | ||
01:31
wayland joined,
silug left,
wayland76 left,
wayland is now known as wayland76
|
|||
wayland76 | pmichaud: just asking; has that makefile change happened yet? | 01:32 | |
Tene | japhb: it's still "use OpenGL:lang<parrot>;" in rakudo ATM. I haven't fixed it to be spec-compliant yet. | 01:34 | |
01:34
frobnitz left
|
|||
pmichaud | wayland76: it's in a branch, I'm still awaiting testers. | 01:34 | |
We know that it currently fails on win32 but I don't have a system to be able to test/update. | |||
japhb | Tene: I fixed that before dinner, but I've got a few more bugs to clear out this evening before it's all working. | ||
wayland76 | pmichaud: ok, thanks :) | ||
Tene | japhb: I'm mostly settled down for now... I'll have a little spare time this evening. | 01:37 | |
japhb | k | ||
Tene | So, lemme know. I'm glad to do whatever needs done. | 01:38 | |
japhb | YEAH! OpenGL in Perl 6 BAYBEEE! | 01:40 | |
OK, now to rip out hacks, and clean up messes ... | |||
01:41
frew|work joined
01:42
clkao left
|
|||
pmichaud | WTF?!? | 01:49 | |
sorry, wrong chan. | |||
01:49
wayland76 left
01:51
hcchien joined
|
|||
sjohnson1 | heh | 01:53 | |
01:54
donaldh left,
donaldh joined
|
|||
frew|work | pmichaud: hey, I'm getting a (I think) apache error when I try to go to dallas.p6m.org | 01:59 | |
pmichaud | that's gotta be coming from some other system than mine | 02:01 | |
02:01
frew|work is now known as frew
|
|||
frew | if I go to p6m.afoolishmanifesto.com it works | 02:02 | |
02:04
eternaleye joined
|
|||
pmichaud | your system may be doing hostname-based virtual hosting | 02:08 | |
so when it sees a hostname of dallas.p6m.org, it doesn't know where to forward | |||
frew | hmm. Ok, let me try something | 02:09 | |
indeed. If I type in the ip it doesn't work. | 02:11 | ||
02:16
clkao joined
02:20
Whiteknight left
02:22
eternaleye left
02:23
eternaleye joined
02:24
DanielC left
02:28
sjohnson1 is now known as sjohnson
02:54
cookys left
03:01
FurnaceBoy_ joined
03:05
pmichaud left
03:13
FurnaceBoy left
03:20
donaldh left,
donaldh joined
03:29
Meldrake` joined,
Meldrake_ left
03:30
silug joined
03:34
Molaf left,
Molaf joined
|
|||
dalek | kudo: a2b8ceb | pmichaud++ | src/parser/actions.pm: Bare parens should return Nil. TimToady++ |
03:38 | |
03:40
xinming joined
03:50
Meldrake` left
03:54
meppuru joined
04:10
meppl left
04:11
buubot left,
buubot joined
04:15
meppuru left
04:20
buubot left,
mberends left,
buubot joined
04:41
FurnaceBoy_ left
05:06
synthEEEE joined
05:14
Molinari joined,
Molinari left
05:22
synth left
05:29
Sunbeam is now known as H1N1,
H1N1 is now known as Sunbeam
05:31
Sunbeam is now known as Roxas
05:38
justatheory left
05:39
cognominal left
05:40
sri_kraih joined
05:46
sri_kraih_ joined
05:49
frew left
05:52
ihrd joined
05:54
ihrd left
06:04
sri_kraih left
06:09
cognominal joined
06:13
cognominal left
06:33
finanalyst joined
06:39
kate21de joined
06:41
kate21de left
07:03
DemoFreak joined
07:13
dakkar joined
|
|||
japhb | Anyone with Rakudo commit rights around? | 07:14 | |
Tene | I am. | 07:19 | |
07:20
donaldh left
|
|||
Tene | japhb: ping | 07:20 | |
japhb | here | ||
07:21
donaldh joined
|
|||
japhb | hold on ... | 07:21 | |
Tene: can you apply and commit gist.github.com/128494 please? | |||
the old code didn't work at all, but wasn't on a path that got used. | 07:22 | ||
(yet, that is) | |||
Tene | japhb: why did you change 'load-language' to load_language? | ||
07:22
xinming_ joined
|
|||
japhb | Tene: because that's the op you taught me to use: gist.github.com/124453 (and, since it works, apparently the correct one :-) | 07:23 | |
Like I said, the existing code plain didn't work ... it just had never been tested. | 07:24 | ||
Tene | japhb: 'load-language' is defined in src/parrot/misc.pir and just runs the load_language op, but from the 'parrot' HLL, to work around a parrot bug. | ||
japhb shrugs | 07:25 | ||
Tene | I'll make the first change. That's according to spec, and I just hadn't gotten around to it. | ||
japhb | Well, when my parrot stuff goes in, we'll see if it was needed or not. It could have been a conflation of bugs, I suppose. | ||
Tene | But using the load_language op has a side-effect of any dynpmcs ending up define din the HLL that it was run from. | ||
so it needs to be executed from the 'parrot' HLL to work with any language that uses dynpmcs, like tcl | 07:26 | ||
dalek | kudo: d2b24d8 | tene++ | src/builtins/eval.pir: Fix the keyword for loading a foreign library (japhb++) |
07:27 | |
07:28
masak joined
|
|||
masak | saluton, actioncamels. | 07:28 | |
viklund_ | o/ | ||
japhb | masak: o/ | ||
Tene | Hmm... problems... | 07:29 | |
hi masak | |||
masak | \o/ | ||
07:29
viklund joined
|
|||
viklund | o/ | 07:29 | |
masak: as you might have seen, November now accepts utf8 ;) | 07:30 | ||
masak | viklund: I'm looking at it now. | 07:31 | |
viklund++ | |||
japhb | Tene: FYI, I'm in the process of dotting i's and crossing t's for Parrot side of fixes. | ||
masak | viklund: I will look at the commits, and then I will be back for questions. :) | ||
viklund | it was a bit tricky | ||
without pmichaud_++, may light forever shine on his path, it would have been very hard for me to do | 07:32 | ||
he has patience | |||
Tene | japhb: I can confirm that rakudo's use ...:from<>; does work. | 07:33 | |
japhb | Tene: fair enough; I'm willing to believe that I made two changes at a time and thought it was only one while debugging. :-) | 07:34 | |
Tene | And with one more update, classes will work too. | 07:35 | |
viklund | rakudo: say chr(229), chr(9787) | 07:37 | |
rakudo: say chr(229)~ chr(9787) | |||
p6eval | rakudo a2b8ce: OUTPUT«å☻» | ||
rakudo a2b8ce: OUTPUT«\xE5☻» | |||
finanalyst | @seen jnthn | 07:38 | |
lambdabot | jnthn is in #perl6. I don't know when jnthn last spoke. | ||
finanalyst | jnthn: ping | ||
Tene | japhb: gist.github.com/128499 | ||
viklund | finanalyst: jnthn is on vacation | 07:39 | |
dalek | kudo: e61569f | tene++ | src/parser/actions.pm: Oops... fix the keyword in one more place too. |
||
finanalyst | viklund: thanx | ||
just read jnthn's blog on .wrap & .unwrap | |||
japhb | Tene: nice! | ||
viklund | yes, that's cool, the first thing I tried was wrapping a multi, it didn't work :( | 07:40 | |
finanalyst | looked at the spec, which gives .restore not .unwrap for rewinding | ||
masak | buubot: ack unwrap | ||
buubot | Couldn't match input. | ||
masak | buubot: spack unwrap | ||
buubot | Couldn't match input. | ||
finanalyst | buubot: ack restore | 07:41 | |
buubot | Couldn't match input. | ||
07:41
xinming left,
xinming_ is now known as xinming
|
|||
finanalyst | .restort S06:2309 | 07:42 | |
s/restort/restore/ | |||
would there be a way to .wrap all the subs in the current package? Suppose I want to debug by tracing when subs are called and their signatures? | 07:44 | ||
Tene | iterate over $?PACKAGE | 07:45 | |
iirc | |||
07:45
rfordinal joined
07:47
jferrero joined
|
|||
finanalyst | what about current scope? | 07:48 | |
masak | rakudo: <a b d d>.grep({$^a ~~ $^b}).perl.say | 07:50 | |
p6eval | rakudo e61569: OUTPUT«too few arguments passed (1) - 2 params expectedin method Any::grep (/tmp/y69Yw73kJe:1)called from Main (/tmp/y69Yw73kJe:2)» | 07:51 | |
masak | should the above worK? | ||
Tene | Huh. | ||
ENOCLUE | |||
viklund | masak: if it worked, what would you expect the return to be? <d d>, <d> or <d>? | 07:54 | |
I would say <d d>... | |||
masak | aye. | ||
I'd expect it to proceed pairwise, like a for-loop would. | |||
viklund | yup | 07:55 | |
masak | and return all the matching pairs. | ||
viklund | where pairs in this case aren't :pairs... | ||
masak | not unless you ask for it, no. | 07:57 | |
the default is still flat lists. | |||
Matt-W | Good morning | 07:58 | |
masak | good morning, Matt-W. | 07:59 | |
08:01
barney joined
|
|||
Matt-W | masak: so what does infix:< | 08:03 | |
infix:<~~> do | |||
(~ is too close to enter) | |||
masak | Matt-W: um. it smartmatches, I guess... | ||
Matt-W | oh | 08:04 | |
doh | |||
I know that | |||
Matt-W needs caffeine, clearly | 08:05 | ||
so you're expecting grep with a two-arg block to proceed pairwise? That would be nice. | 08:06 | ||
although personally I don't like these $^ placeholder things | |||
I'm a big convert to pointy blocks | |||
mmm... pointy | 08:07 | ||
08:07
riffraff joined
|
|||
viklund | mm... pointfree | 08:17 | |
Matt-W | hah | 08:18 | |
Matt-W ponders the use of pointfree style in Perl 6 | |||
hmm | 08:20 | ||
you can't | |||
well, not with the same elegance as in something like Haskell | |||
since we have to call .assuming to produce curried forms | |||
Tene | You could define a sub trait that would create additional multis for insufficient args that return a curried sub. | 08:21 | |
sub foo($a, $b, $c) is pointfree { ... } | |||
you could also potentially try it with exceptions | 08:22 | ||
Matt-W | mmm | ||
that could be interesting | |||
I think it's a style that's particularly suited to Haskell's syntax | 08:23 | ||
but actually it might be possible to write a useful function composition operator | |||
use introspection to wire up the parameters behind the scenes | |||
08:35
bacek left
08:38
DanielC joined
|
|||
viklund | o/ | 08:39 | |
DanielC | hi | ||
moin | |||
@karma | 08:41 | ||
lambdabot | You have a karma of 14 | ||
masak | moin, DanielC. | 08:45 | |
DanielC | moin masak | 08:48 | |
masak | hm, I need to pull the ethernet cable for a while, because I just restarted my Firefox session, and it crashes if it tries to load all the tabs. | 08:53 | |
08:53
masak left
|
|||
Matt-W | lo DanielC | 08:53 | |
DanielC | o/ | 08:54 | |
08:54
araujo left
08:56
clintongormley joined
|
|||
japhb | pmichaud_: Would you mind bumping PARROT_REVISION to 39521 ? | 09:03 | |
japhb really gone now ... | |||
09:04
masak joined
|
|||
viklund | @seen moritz | 09:15 | |
lambdabot | I saw moritz leaving #perl6 6m 20d 15h 31m 1s ago, and . | ||
viklund | @seen moritz_ | ||
lambdabot | moritz_ is in #perl6. I last heard moritz_ speak 1d 16h 14m 16s ago. | ||
masak | moritz_ was on vacation until a few days ago. maybe he's only partly back still. | 09:17 | |
viklund | I'm looking at his json thingy | ||
DanielC | masak: How do you tell git to remove a file from the repository? Can you just delete the file? | 09:23 | |
masak | DanielC: git rm. | ||
DanielC | error: 'checksum.pir' has local modifications | 09:24 | |
:-( How do I restore checksum.pir so I can delete it? | |||
viklund | git co checksum.pir | ||
DanielC | git: 'co' is not a git-command | 09:25 | |
DanielC reads git --help | |||
viklund | git checkout checksum.pir | ||
masak | DanielC: take heart! these initial pains will pass, and then git will become your best friend. | ||
viklund has command aliases, need to remember that when helping others | |||
masak | viklund: skurk. giving examples with aliases in them. :) | ||
DanielC | viklund: thanks! | ||
viklund blushes | |||
DanielC | masak: I already have a best friend. His name is Darcs :-) | ||
masak | that's another nice friend, I've come to understand. | 09:26 | |
DanielC | Darcs and git actually feel very very similar. | ||
Branching is easier in Darcs, and merging is more flexible, but they are generally similar. | 09:27 | ||
09:28
synthEEEE left
|
|||
masak | I need to play around a bit more with Darcs. | 09:29 | |
DanielC | It has less features, but is much easier to use. | 09:30 | |
That has to do with the fact that the Darcs model is that every copy of the repository is a branch. | 09:31 | ||
masak | phenny: tell pmichaud_ I'm mystified by [perl #66546]. It would be nice if you could take a look at it and determine if it's inherently easy or inherently difficult to fix. | ||
phenny | masak: I'll pass that on when pmichaud_ is around. | ||
DanielC | That makes many things a lot simpler, but it prevents a few obscure features that I couldn't name right now but I know they exist. | ||
masak | DanielC: the git model is not that different. every commit is a potential branch. branches are just names for particular sequences of commits. | 09:32 | |
DanielC | Git and Darcs do feel generally similar. | ||
They even share the "push" and "pull" notation. | 09:33 | ||
masak: Could you do a "git pull" on the parrot-module-lib and confirm that t/03-checksum.t is gone and instead we have t/03-module_data.t ? | 09:34 | ||
masak | DanielC: you have both. | 09:35 | |
DanielC | stupid git | ||
I said "git mv". Or at least I thought I did. | |||
masak | seems you didn't. :) | 09:36 | |
DanielC | ah, no I didn't. | ||
masak | git++ :) | ||
Tene | danielc++ | ||
09:36
ssm left
|
|||
DanielC | I'm used to Darcs, which detects a whole bunch of things for you, so you don't make this sort of mistake. | 09:36 | |
Tene | in darcs, if you copy a file, it's an error? | 09:37 | |
DanielC | define copy? | ||
cp foo bar | |||
? | |||
Darcs looks for changes to every file that it knows about in the repository and asks you which changes you want. | 09:38 | ||
Tene | I understood that you implied that you ran 'git cp' instead of 'git mv' | ||
DanielC | ah, no, I used plain "mv" | ||
Darcs would have said "this file is gone, do you want to record that?" | |||
and then I say "oops" | |||
Tene | yes, git will do that | ||
DanielC | It didn't for me. | 09:39 | |
Tene | git add --patch | ||
you need to ask for it | |||
DanielC | Darcs is more friendly :-) | ||
Tene | if you just say "add this one file, and then make a commit", that's all it does. | ||
DanielC | Darcs shows you the individual changes to the file. | ||
Tene | eh, I'd be quite annoyed by being asked about all of my changes every time I try to commit. | ||
Yes, that's what add --patch does | |||
DanielC | If you change two lines in a fie, you can tell Darcs to record one but not the other. | ||
09:39
ssm joined
|
|||
Tene | exactly | 09:40 | |
DanielC | In Darcs you can specify the individual files, if that's what you want, and the -a ("all") flag says "take all changes". | ||
It works really well, trust me. | |||
Tene | that's exactly what 'git add' does. :) | ||
DanielC | No, it doesnt. | 09:41 | |
Tene | Yes, it does work well. | ||
DanielC | I have used git and darcs, you have only used git. | ||
Can you please trust me that I can't explain Darcs in IRC when I'm trying to do work? | |||
masak | hey, calm down! :) | ||
viklund | this parrot has ceased to be... | ||
Tene | 'kay | ||
masak | please defer your 'my SCM is more usable than yours' contests to #git or #darcs, where people are better equipped to argue against you. :P | 09:43 | |
DanielC | I didn't even say that Darcs is better. I said that it is better at some things. | ||
09:43
Yoi joined
|
|||
DanielC | It is undoubtedly worse at others. It has fewer features. | 09:44 | |
I got a bit stressed because I was trying to work too. | |||
Discussing the merits of SCMs requires more depth than I can afford right now. | |||
I got frustrated when someone basically says "I don't know the other scm but my one is just as good". | 09:45 | ||
So we had a bad convergence of events, resulting in an unhappy Daniel. | 09:46 | ||
masak | DanielC: I'm sure Darcs is a very good SCM, despite being more minimal than git. | ||
Tene | DanielC: I see what you meant now. | ||
masak | but don't dismiss the way git does thing offhand. I agree with Tene that what git does makes sense too. | ||
s/thing/things/ | 09:47 | ||
Tene | "darcs record" without arguments asks you about each change | ||
DanielC | I Git is a fabulous program. | ||
I know it can do things git can't do. I can't remember what they are. | |||
oops | 09:48 | ||
I know it [git] can do things Darcs can't do. I can't remember what they are. | |||
Matt-W | The thing that always confuses me in git is how to take a file that's been changed locally and change it back to the version before those changes | ||
like svn revert | |||
DanielC | darcs unrecord | ||
masak | Matt-W: git checkout. | ||
Matt-W | masak: last time I tried that, it was a no-op | 09:49 | |
as in, it didn't change the file at all | |||
masak | Matt-W: I know, it confused me in the beginning also. | ||
Tene | DanielC: darcs' patch theory stuff is what you're thinking of. darcs is rather better at pulling down only some changes from some remote. | ||
masak | Matt-W: it's like, git misbehaves subtly the first half-year you use it. then it suddenly starts to make sense. | ||
DanielC | Tene: I know patch theory :-) | ||
09:49
DemoPhreak joined
|
|||
Tene | DanielC: oh, nm, i misread. | 09:50 | |
DanielC | Tene: It is more than just cherrypicking. | ||
Matt-W | masak: but when people say 'git checkout' to do like svn revert, and then it doesn't do anything when you say 'git checkout that-file', what are you supposed to do? | ||
viklund | the json grammar/action pair produces strange results... | ||
Matt-W | masak: it's tempting to think the person who told you to do it is wrong | ||
Tene | DanielC: i read "Darcs can do things that git can't, but I don't remember what they are." | ||
masak | Matt-W: no, that's the way you do it. | ||
Matt-W: but you have to know what you're doing. :P | |||
Matt-W | masak: well it didn't work | ||
what's to know? | |||
if you say it's 'git checkout that-file' | |||
and it doesn't work | |||
then are you wrong? | 09:51 | ||
or is git broken? | |||
masak | Matt-W: could you nopaste a reproduced case where it doesn't work? | ||
Matt-W | possibly | ||
masak | would be interesting to see. | ||
09:51
explorer__ joined
|
|||
Matt-W | I ended up giving up and just stashing it | 09:51 | |
DanielC | Tene: I wrote wrong the first time. I know someone on the Darcs list once gave me an example of something a bit obscure that git could do and was not possible with Darc's simpler model. | ||
Matt-W | although now I'm going to have to figure out how to delete the stash | ||
I'd found websites which said 'git checkout' as well | |||
DanielC | Tene: But it was not something I understood. It was definitely an "advanced" feature. | ||
09:51
agentzh left
|
|||
Matt-W | but I assumed they'd missed something out when it didn't work | 09:51 | |
09:51
explorer__ left
|
|||
Matt-W | because they weren't well-written in the first place | 09:51 | |
overly brief | 09:52 | ||
09:52
agentzh joined
|
|||
Tene | Matt-W: nopaste.snit.ch/16880 | 09:53 | |
Matt-W: like that? | |||
viklund | Matt-W: were you trying to git checkout the file you git mv'd? | ||
Matt-W | Tene: that is not what happened | ||
viklund: no | |||
viklund | hmm' | ||
viklund trying to figure out why it didn't work | |||
did you have anything in the index? | 09:54 | ||
Matt-W | git pull -> make local edits to file -> git pull later on -> wanted to revert edits to file -> git checkout file -> file unchanged | ||
Tene | Matt-W: did you commit the edits? | ||
viklund | aha | ||
masak | Matt-W: maybe you ended up in the no-man's-land between branches. | ||
09:55
tomaw- joined,
Yoi left
|
|||
Matt-W | Tene: no | 09:57 | |
Tene: I didn't want them anymore | |||
10:03
DemoFreak left
10:14
lichtkind joined,
lichtkind left
10:16
payload left
10:52
payload joined
10:55
Muixirt joined
|
|||
Muixirt | hi | 10:55 | |
10:58
kane_ joined
|
|||
Roxas | !UP | 11:05 | |
ew amsg sucks in xchat | 11:08 | ||
sorry | |||
11:08
hanekomu joined
|
|||
DanielC | I should convert my PHP code to LOLCODE. That would be fun. | 11:09 | |
Muixirt | the code snippet while 1 { }; leaks a lot of memory, is that a problem of rakudo too? | ||
DanielC | dunno | 11:10 | |
There are two people who know Rakudo really really well. One of them went on vacation yesterday and the other is in Texas and is not around here yet. | |||
11:14
payload left
|
|||
masak | Muixirt: fwiw, I'm running Rakudo now, and it does seem to leak memory on that one-liner. | 11:17 | |
350Mb and rising... | |||
Muixirt | it was mentioned some days ago | 11:18 | |
but i'm really puzzled, i even created a blog to write on this ;-) | 11:19 | ||
masak | a whole blog, just for this? :) | ||
what's it called, 'The while 1 { } blog'? | |||
11:20
donaldh left
|
|||
viklund_ | that would be a good blogname actually | 11:20 | |
"while 1 { ... }" | |||
DanielC | @seen mberends | ||
lambdabot | I saw mberends leaving #perl6 7h 24s ago, and . | ||
masak | viklund_: I was thinking the same thing. :) | 11:21 | |
11:21
donaldh joined
|
|||
masak | viklund_: or you could name it "Leaking memory in an infinite loop" ;) | 11:21 | |
viklund_ | ehm | 11:23 | |
for @*THOUGHTS { .blog } | |||
masak | :) | ||
Muixirt | masak, done ... muixirt.wordpress.com/ | ||
masak | Muixirt: :D | ||
Muixirt: extra kudos if you actually fix the problem. :) | 11:24 | ||
Muixirt: (fwiw, I'd go with viklund_++'s suggestion, it's really nice) | 11:25 | ||
maybe even 'for self.thoughts { .blog }'... | 11:26 | ||
Muixirt | you might have a look at nopaste.snit.ch/16881 the generated pir output of that not so infinite loop | 11:28 | |
i wonder why one have to do new $P20, "Int" endlessly | 11:29 | ||
near loop27_test: | |||
masak | one doesn't have to do that, I bet. | ||
it's just that this kind of optimisation hasn't been highly prioritized, between implementing new features and fixing bugs. | 11:30 | ||
patches welcome! :) | |||
11:36
mberends joined
|
|||
mberends | howdy #perl6 | 11:37 | |
DanielC | o/ | ||
masak | greetings, mberends. | ||
mberends | masak: good day! just having a nice break from furniture shifting ;) | 11:38 | |
DanielC, your latest refactoring all works here now. | |||
masak | my $nice-break = @furniture.shift; | ||
DanielC | mberends: Great. | ||
mberends: Is there a reason why we should do everything in PIR? The YAML part would be much easier in Perl. I wonder if here is a way to mix Perl and PIR to do what we want. | 11:40 | ||
mberends | yesterday's Class 'MD5' not found error was caused by debian having libssl0.9.8 installed but not libssl-dev. | ||
DanielC | ah | ||
Ubuntu++ | 11:41 | ||
mberends | DanielC, there may some corner cases where is does not apply, but in general we are trying to make something to fit into the chassis of Rakudo. Dependencies on anything Perl might lead to Catch-22, chicken-or-egg, and suchlike. I'd rather not risk it. | 11:42 | |
masak | DanielC, mberends: if you do a YAML parser/emitter, please (1) make it a separate module, or at least a separate unit of code somehow, so others can re-use it, and (2) consider getting in touch with ingy -- he hangs out on #yaml on irc.perl.org -- because he and I have been discussing writing a YAML parser in p6 before. | ||
oh, ingy 's even here on the channel. :) | 11:43 | ||
DanielC | masak: I was thinking of just writing a parser for a *very* limited subset of YAML. Not something usable in the general case. | ||
masak | DanielC: been there, done that. | 11:44 | |
DanielC | masak: I wouldn't ind writing something usable in the general case, but then it would have to be written in Perl. | ||
masak | it works, but it feels risky. | ||
DanielC | s/ind/mind/ | ||
11:44
finanalyst left
|
|||
masak | DanielC: proto does quite a lot of limited YAML parsing. | 11:44 | |
mberends | masak, as discussed at the Mausoleum, a full blown YAML toolset is often overkill, and a quick and dirty little bastard yaml parser will often suffice. DanielC: +1 | ||
DanielC | masak: Yeah. But can you imagine trying to write a general parser for anything interesting in an assembly language. | 11:45 | |
masak | DanielC: PIR is actually not so bad. ask pmichaud_ :) | ||
DanielC: (he wrote PGE in PIR) | |||
mberends: I don't disagree. I'm just pointing you to the knowledgeable people, should you decide to go general. | 11:46 | ||
DanielC | masak: PGE is a perl-like grammar, like? Or is it the full Perl 6 grammar? | ||
mberends | masak, I'm rather enjoying PIR programming :) re: yaml, indeed yes | ||
masak | no-one would be happier than I if we could standardize on a quick and dirty little bastard YAML parser. | ||
DanielC: it's a full P5/P6 regex/grammar engine. the Perl 6 grammar is meant to run on top of it. | 11:47 | ||
DanielC | masak: I wonder if PGE can (in principle) be used to make a YAML parser usable from PIR. | 11:48 | |
masak | DanielC: sure. | ||
DanielC | It may be an interesting project. | 11:49 | |
On the other hand, a YAML parser that only uses Perl 6 would be usable to other implementations. | |||
masak | DanielC: I'm browsing around in months-old code from when I last attempted this. found this comment: # <rjbs> the best advice to someone about to write a yaml parser is "don't" | ||
DanielC | If I wanted to write a general YAML parser, I think I' pick Perl 6. | ||
masak: What does that advice mean? | 11:50 | ||
masak | DanielC: that writing a YAML parser is harder than it first appears. | ||
DanielC | ok | ||
It looks hard enough as it is. | |||
masak | that's why I advise you to befriend the #yaml people. | ||
DanielC | Not many people there. | 11:51 | |
ingy is there. | |||
mberends | for parrot-module-lib a subset of yaml is desirable but not even required. "What's the simplest thing that could possibly work?" Some domain specific data structure. The yaml is for hacking FTW. | ||
masak | mberends: ack. | ||
DanielC | A restricted YAML is pretty close to what I would pick for a domain-specific markup language. | 11:52 | |
masak | DanielC: .perl and eval(slurp $file) goes a long way, though. | 11:53 | |
DanielC | I would make a few non-YAML alterations, but that's all. | ||
masak | DanielC: it works out of the box. | ||
11:53
szabgab left
|
|||
DanielC | masak: Yes, but only if you are using Perl :-( (remember.. PIR) | 11:53 | |
masak | oh. right. | 11:54 | |
DanielC | But PIR has arrays and hashes. | ||
Maybe we can use that. | |||
masak | DanielC: you could copy the Array.perl and Hash.perl source code from Rakudo. :) | ||
it's open source. | |||
DanielC | :-) | 11:55 | |
Hey, Ingy is one of the YAML designers. | |||
masak | yes. | ||
DanielC | cool | 11:56 | |
mberends hears the "back to work" signal | |||
masak | I almost, but not quite, sat down with him after NPW and ported YAML to Perl 6. | ||
DanielC | JSON is easier to parse than YAML. Maybe we should use that. | 11:57 | |
11:58
Molaf left
|
|||
DanielC | Then again, even a JSON parser would be hard in PIR, so I would just end up restricting it anyways. | 11:58 | |
masak | DanielC: using PGE grammars and actions for this kind of parsing would help a lot, I think. | ||
DanielC | y | 11:59 | |
11:59
mberends left
|
|||
DanielC | I don't suppose there is a tutorial for PGE anywhere. | 11:59 | |
masak | DanielC: www.pmichaud.com/2006/pres/yapc-par...start.html | 12:02 | |
might be a bit outdated, but should get you started. | |||
DanielC | *click* | ||
masak | the Wikipedia article was quite nice, too. | 12:05 | |
DanielC | Wikipedia article on PGE? | ||
masak | it's probably a bit dated as well, because it makes it sound as if Pugs is still in active development... | ||
en.wikipedia.org/wiki/Parser_Grammar_Engine | |||
DanielC | *click* | ||
Maybe we can make a parser and use JSON. | 12:06 | ||
JSON is much simpler than YAML. | |||
Matt-W | a lot of the wikipedia stuff on Perl 6-related tech is outdated | ||
DanielC hacks together a sample file in JSON | |||
Matt-W | we should make an effort to update it | ||
masak | yes, we should. | ||
12:10
elmex joined
|
|||
DanielC | masak: What is "proto" in the context of PGE? | 12:16 | |
proto infix:+ is looser('term:') {...} | |||
masak | DanielC: S05:1048. | ||
DanielC | k | ||
masak | 'if you predeclare a proto regex, you can write multiple regexes for the same category, differentiated only by the symbol they match. The symbol is specified as part of the "long name".' | 12:17 | |
DanielC | I have read that paragraph a few ties, an seen the example, and I'm still confused. | 12:18 | |
For starters, what is a category? | |||
masak | DanielC: in the context of the example, the token 'sigil'. | 12:19 | |
DanielC | k... | ||
masak | DanielC: heard of multisubs? | ||
DanielC | yeah, I'm going to post a blog about mulltisubs today :-) | ||
coincidentally... | |||
masak | DanielC: this seems to be the corresponding thing for regexes/tokens/rules. | ||
DanielC | token sigil:sym<$> { <sym> } | 12:20 | |
The first problem I have with that is that it looks recursive. | |||
masak | yeah. | ||
no. | |||
DanielC | Second, the :sym<$> throws me off. | ||
12:21
kane_ left,
bejuryu joined
|
|||
masak | I'll let the people who have more of a clue explain the details. fwiw, I read that as 'token sigil, where <sym> is "$"' | 12:21 | |
DanielC | based on longest-token matching <--- | 12:22 | |
Ok, that explains the multi part better. | |||
"The advantage of writing it this way is that it's easy to add additional rules to the same category in a derived grammar" <-- ok | 12:23 | ||
masak | I wish more of STD.pm worked like that. | 12:25 | |
I looked into adding a new statement postfix keyword the other week, and it doesn't look very easy at present. | |||
people will want to do such things. | |||
DanielC | masak: Could you help me with something? pastebin.com/m51c438d <-- What's wrong on line 25? | 12:29 | |
"Statement not terminated properly at line 25," | 12:30 | ||
masak | DanielC: try adding a semicolon on the line above. | ||
DanielC | I did, no change. | ||
masak | DanielC: oh! infix:over should be infix:<over>. | ||
those <> are not optional. | |||
DanielC | ah! | ||
oops | 12:31 | ||
thanks | |||
masak | np. | ||
oh, and cool! Rats. | |||
DanielC | I assumed it was just if you wanted "funny" characters like + or ! | ||
masak | DanielC: no, they're part of the sub name. | ||
I'm a bit surprised infix:over parses, actually. | 12:32 | ||
rakudo: sub infix:over() { say "OH HAI" } | |||
p6eval | rakudo e61569: ( no output ) | ||
masak | rakudo: sub infix:over() { say "OH HAI" }; infix:over(); | ||
p6eval | rakudo e61569: OUTPUT«Statement not terminated properly at line 2, near ":over();"in Main (src/gen_setting.pm:0)» | ||
DanielC | Now it complains about the gcd function: Null PMC access in find_method() in in sub gcd called from sub infix:over. | 12:33 | |
But I tested gcd individually and it worked. | |||
masak | DanielC: try and reduce it to a minimal test case. | 12:34 | |
might be a bug. | |||
DanielC starts reducing | |||
Matt-W | go on! make masak happy! | ||
masak | :) | ||
DanielC | WTF? The problem goes away when I remove the == functions. | 12:36 | |
It is definitely the == functions. If I comment them out, the program stops complaining. | 12:37 | ||
Is == a multi-function? | 12:38 | ||
Any one of the infix:<==> functions is enough to make the program barf. | 12:39 | ||
Matt-W | can you get it down to barfing on having just an infix:<==>? | ||
DanielC reduces more | |||
Hmm... I *have* to call the "over" function to reproduce the error. | 12:40 | ||
DanielC keeps reducing | 12:41 | ||
masak | rakudo: sub gcd() {}; sub infix:<over>($a, $b) { gcd }; 4 over 5 | ||
p6eval | rakudo e61569: ( no output ) | ||
masak | rakudo: sub gcd() {}; sub infix:<over>($a, $b) { gcd }; 4 over 5; multi sub infix:<==> (Int $a, Int $b) {} | 12:42 | |
p6eval | rakudo e61569: ( no output ) | ||
masak | hm, not as simple as that, it seems... | ||
DanielC | Indeed, it isn't. | ||
masak | keep reducing; I've gotta go soon. | ||
I hereby bequeath to you the holy power of rakudobug reporting. | |||
Infinoid | Don't spend it all in one place. | 12:43 | |
DanielC | This is bewildering. If I remove the gcd line it stops complaining. | ||
masak | not so surprising, given that that line caused the error. | 12:44 | |
DanielC | gcd uses == | ||
Maybe that's where the problem is. | |||
yeah | |||
now I can reduce a lot more. | 12:45 | ||
masak | rakudo: role A {}; multi sub infix:<==>(A $a, A $b) {}; 42 == 42 | ||
p6eval | rakudo e61569: OUTPUT«Null PMC access in find_method()in Main (/tmp/5dgviLoPNU:2)» | ||
masak | there you go. :) | ||
masak submits rakudobug | |||
DanielC | ? | 12:46 | |
ah | |||
rakudo: role A {}; multi sub infix:<==>(A $a, A $b) {}; "42" eq "42" | 12:47 | ||
p6eval | rakudo e61569: ( no output ) | ||
DanielC | This is annoying though. How am I going to make my blog post now without an == operator? | ||
masak | :) | 12:48 | |
you'll find a way. | |||
DanielC | :-P | ||
masak | gotta go. see y'all. | ||
12:48
masak left
|
|||
DanielC | bye | 12:48 | |
12:50
jonathanturner left
12:51
Whiteknight joined
|
|||
Matt-W | you'll have to wait until the bug is fixed I suppose | 12:51 | |
time to start nagging people | |||
12:54
szabgab joined
13:07
kane___ joined
13:13
kane___ left
13:14
jferrero left,
FurnaceBoy joined
13:17
alanhaggai joined
13:19
mizioumt joined
13:20
skids_ joined
13:21
frew joined,
beggars joined
13:23
frew_ left
13:24
alanhaggai_ joined
13:26
alanhaggai left,
alanhaggai_ is now known as alanhaggai
13:29
lichtkind joined
13:35
Muixirt left,
jantore left,
felipe left,
dmpk2k left,
DQuest left,
Gothmog_ left
13:37
kane___ joined,
dmpk2k joined
13:38
DQuest joined,
mattp joined,
ruoso joined
13:43
jantore joined
13:45
decasm joined
|
|||
ruoso | Hello! | 13:45 | |
13:48
[particle] left,
[particle] joined,
Muixirt joined
13:51
ihrd joined,
ihrd left
13:54
kane__ left
14:01
araujo joined
|
|||
Matt-W | $self->{'stats'} = @_; | 14:12 | |
^ too much Perl 6! | |||
(I'm sure you all spot the bug) | |||
DanielC | actually... | ||
? | 14:13 | ||
viklund | scalar context for @_ => returns length | ||
Matt-W | yes | ||
DanielC | ugh! | ||
Matt-W | this was not the intent | ||
later on I had a rather surprising message noting that I can't use '2' as an array reference | |||
DanielC | $self->{'stats'} = \@_; <--- is this what you wanted? | ||
Matt-W | yes indeed | ||
DanielC | Perl 5 is painful compared to Perl 6. | 14:14 | |
Matt-W | It's amazing how quickly it gets into your head | ||
oh nice | |||
now I have | |||
Can't locate object method "year" via package "Fri Jun 12 15:12:57 2009" | 14:15 | ||
Matt-W sighs and goes to fix that too | |||
14:17
beggars left
|
|||
viklund | there's an error somewhere in moritz_ json perl6 thingy, it's hard to pindown... | 14:18 | |
14:18
pmurias joined
|
|||
pmurias | ruoso: hi | 14:18 | |
Matt-W | viklund: it's good for your brain :) | 14:19 | |
viklund | yes, well, but it's strange | ||
'\n\t' becomes '\\\\\"' | 14:20 | ||
Matt-W | umm | 14:21 | |
that is | |||
err | |||
Matt-W scratches his head | |||
pmurias | ruoso: is the list of roles in ^!does flattened? | ||
viklund | indeed | 14:23 | |
clintongormley | how complete is the regex engine? | 14:27 | |
is it supposed to work as spec'ed? | |||
ruoso | pmurias, they are just the direct applied roles | ||
pmurias, they don't include parent's compositions | 14:28 | ||
viklund scratches his beard | 14:31 | ||
Matt-W | clintongormley: no, it doesn't quite work as specced. Some things are missing, and the most noteable omission is that it doesn't do longest-token matching yet | 14:32 | |
clintongormley | ahh still not? | ||
pmurias | ruoso: should every punned class instance have an ACCEPTS method? | ||
or only the one instance which is directly punned? | |||
clintongormley | i remember reading about TimToady's frustrations at getting that working, but i thought he'd conquered it | 14:33 | |
ruoso | pmurias, hmmm.. good question... I guess the punned class... | 14:36 | |
14:38
rfordinal left
|
|||
pmichaud_ | good morning, #perl6 | 14:38 | |
phenny | pmichaud_: 09:31Z <masak> tell pmichaud_ I'm mystified by [perl #66546]. It would be nice if you could take a look at it and determine if it's inherently easy or inherently difficult to fix. | ||
pmurias | ACCEPTS method is ovewritten by a lot of things, that would mean we would need something different from Signature.ACCEPTS to check if something is a signature | ||
ruoso | pmurias, I guess it could simply delegate it to the meta | 14:39 | |
14:41
payload joined
|
|||
ruoso | pmurias, I guess ACCEPTS is a multi method | 14:42 | |
viklund | good morning pmichaud | ||
ruoso | rakudo: my $a = :($a, $b); say $a ~~ Signature | 14:43 | |
p6eval | rakudo e61569: OUTPUT«too few arguments passed (0) - 2 params expectedin Main (/tmp/SfvHXBxtNs:0)» | ||
viklund | thanks for the help yesterday with that utf8 <-> latin1 thing | ||
ruoso | hah! | ||
pmurias | ruoso: ? | 14:44 | |
pmichaud_ | viklund: you're welcome. We troubleshooted that bug a bit more in Parrot and found a few more issues to deal with. :-| | ||
ruoso | rakudo didn't solve that question as well | ||
pmichaud_ | rakudo: say Signature; | ||
p6eval | rakudo e61569: OUTPUT«Signature()» | ||
viklund | yes, I followed that with interest... | ||
ruoso | that's actually a good question... | 14:45 | |
pmichaud_ | rakudo: sub foo() { }; say &foo.signature ~~ Signature; | ||
p6eval | rakudo e61569: OUTPUT«1» | ||
ruoso | I can't really think of anything smart to solve it | ||
rakudo: sub foo($,$,$) { }; say &foo.signature ~~ Signature | |||
p6eval | rakudo e61569: OUTPUT«1» | ||
14:45
moritz_ sets mode: +o pmichaud_
|
|||
viklund | anyway, we have utf8 working in November now... | 14:45 | |
pmurias | ruoso: do we want to assume type checking and smart matching is the same thing? | 14:46 | |
if so an ACCEPT method on an undefined Signature could only check if the argument does the Signature role | |||
* ACCEPTS | |||
ruoso | that's kinda of an general assumption in Perl 6 | ||
I mean... | |||
rakudo: my $a = :($a, $b, $c); say $a.defined | 14:48 | ||
14:48
justatheory joined
|
|||
p6eval | rakudo e61569: OUTPUT«too few arguments passed (0) - 3 params expectedin Main (/tmp/PMfD6mf7T5:0)» | 14:48 | |
pmichaud_ | I don't think rakudo handles the :(...) syntax yet. | ||
ruoso | ah... | ||
that explains it | |||
pmichaud_ | rakudo: sub foo($a, $b, $c) { }; say &foo.signature.defined; | 14:49 | |
p6eval | rakudo e61569: OUTPUT«1» | ||
ruoso | rakudo: sub foo($a, $b, $c) {}; say &foo.signature ~~ (1,2,3) | ||
p6eval | rakudo e61569: OUTPUT«0» | ||
ruoso | ok... I guess it should have been a 1 there | ||
pmichaud_ | actually it would need to go the other way | 14:50 | |
14:50
hexmode joined
|
|||
pmichaud_ | (1,2,3) ~~ &foo.signature | 14:50 | |
but Rakudo doesn't really do captures yet | |||
ruoso | oh righht... | ||
but it is supposed to be done with ACCEPTS, rigth? | 14:51 | ||
pmichaud_ | it still thinks that (1,2,3) is a List (and doesn't grok the new relationship between List and capture) | ||
I'm not sure if rakudo is using ACCEPTS for signature binding yet | |||
I'm sure it _can_ | 14:52 | ||
ruoso | not binding, but checking | ||
pmichaud_ | oops, you're correct -- &foo.signature ~~ (1,2,3) also works (I needed to look a little farther down the smart match table) | 14:53 | |
clintongormley | damn, the JS on the synopses makes the pages all but unusable, at least in firefox | ||
ruoso | binding is SMOP goes with .BIND | ||
pmichaud_ | clintongormley: try svn.pugscode.org/pugs/docs/Perl6/Spec (no js) | ||
clintongormley | ta | ||
Matt-W | I've never had any trouble with them on firefo | 14:54 | |
clintongormley | pmichaud_: Muuuuch better | ||
Matt-W: my firefox hangs for 30 seconds at a time | 14:55 | ||
Matt-W | hmm | ||
not seen that | |||
how odd | |||
viklund | noscript ftw | ||
14:55
exodist joined
|
|||
clintongormley | are heredocs not implemented yet? | 14:56 | |
moritz_ | not in rakudo | 14:57 | |
pmurias | ruoso: there is a Any Type type membership $_.does(X) | ||
moritz_ | STD.pm parses them | ||
clintongormley | ta | ||
moritz_: welcome back! long time | |||
pmurias | ruoso: row in the smartmatch table | ||
ruoso | pmurias, but it seems that isn't syntatical | 14:58 | |
pmurias | how is the Type role defined | ||
? | |||
moritz_: i disabled the evalbot runtime limits for mildew | 14:59 | ||
ruoso | pmurias, it isn't | ||
pmichaud_ | rakudo: say 'a'..'z' | ||
p6eval | rakudo e61569: OUTPUT«abcdefghijklmnopqrstuvwxyz» | ||
ruoso | for now, it's just "undefined values" | ||
moritz_ | pmurias: please don't disable them entirely, in case it loops. Rather bump them up for mildew | ||
ruoso | pmichaud_, one thing i just realized... can that be locale-specific? | 15:00 | |
pmichaud_ | ruoso: I don't think so... I think it's defined in terms of the unicode codepoints | ||
pmurias | locale specific? argh! :) | ||
viklund | Huzzah! | 15:01 | |
ruoso | rakudo: say '𐌰'..'𐍊' | 15:02 | |
p6eval | rakudo e61569: ( no output ) | ||
pmichaud_ | at the moment rakudo only does the uppercase, lowercase, and ascii digit ranges | ||
(it can be extended to do more, but we just did those to start with) | |||
pmurias | moritz_: i'm not sure which limits get violated | ||
viklund | moritz_: I'm working with you json parser | 15:03 | |
15:03
riffraff left
|
|||
viklund | I've managed to get it to pass one more test ;) | 15:03 | |
ruoso | rakudo: say 'α'..'ω' | 15:04 | |
p6eval | rakudo e61569: ( no output ) | ||
moritz_ | pmurias: just do somthing that violates a limit, and I'll tell you which one | 15:06 | |
viklund: cool. Want a commit bit? | |||
viklund | moritz_: sure ;) | ||
but I think it needs more structure tests | |||
moritz_ | sure, I was just getting started with them | 15:07 | |
viklund: done | 15:11 | ||
15:11
mizioumt1 joined
|
|||
viklund | moritz_: thx | 15:11 | |
moritz_ | viklund: please test it, I never did that before ;-) | 15:12 | |
pmurias | moritz_: anything violates the limit | 15:13 | |
ruoso | moritz_, the problem is that mildew runs after running STD | ||
viklund | I was thinking of actually trying it for real ;) | ||
moritz_ | ruoso: ... and? | 15:14 | |
ruoso | pmurias, one thing that would ease things in mildew would be to build the mold in perl directly and simply run it, instead of generating the m0ld to then generate the C, than compile it than run | ||
moritz_, it runs gcc from inside that same process | 15:15 | ||
after using all the memory STD uses | |||
and without releasing it | |||
moritz_ | ruoso: I still don't see the problem in figuring out a sensible resource limit for mildew, and setting it | ||
ruoso | ah... sure... | ||
moritz_ | but not having any resource limit is just suicide. | ||
ruoso | I was just explaining why it's so high | ||
moritz_ | ok | 15:16 | |
ruoso lunch & | |||
15:16
exodist left
15:20
donaldh left,
donaldh joined
15:24
mizioumt left
|
|||
viklund | ohh, speedup after compile 36s -> 32s... | 15:24 | |
clintongormley | i realise this is a bad regex, but in perl5 it succeeds, in perl6 it just hangs: | 15:29 | |
say ' ' ~~ /\s*+/ | |||
moritz_ | in perl 5 it's optimized out | 15:30 | |
clintongormley | ah ok | ||
15:31
masak joined
|
|||
pmichaud_ | rakudo/pge doesn't know how to handle quantified zero-length patterns | 15:31 | |
15:32
nihiliad joined
|
|||
pmichaud_ | it tends to get stuck in infinite loops | 15:32 | |
clintongormley | it was actually a typo, and i couldn't figure out why rakudo was hanging on a simple white space match :) | 15:33 | |
masak | pmichaud_: thank you for your answer to #66546. getting a data structure representing a Perl 6 AST has become something of a holy grail for me. now it again seems like I'll need to reconsider my strategy. | ||
a shellout call to STD.pm and then parsing the YAML might be the more long-term solution anyway. | 15:34 | ||
DanielC | Since I can't post my blog about Rational numbers yet, today I'm making a different post: daniel.carrera.bz/2009/06/perl-6-an...s-problem/ | 15:37 | |
It's also nice, but not "cool" like the Rational numbers one. | |||
masak | DanielC: why can't you post your piece about Rational numbers? | 15:39 | |
DanielC | masak: Because == won't work. | ||
masak | DanielC: did you try a workaround? | ||
DanielC | == is one of the parts that makes the post interesting. | ||
masak: I could... but the workaround would not look as interesting. It would look like a workaround. | 15:40 | ||
So it wouldn't be a great advertisement for Rakudo. | |||
masak | DanielC: for example, try defining infix:<==> for two Ints, even though in real Perl 6, that wouldn't be needed. | ||
it could work, and it would only be one extra line. | |||
pmichaud_ | masak: you can always get Rakudo's AST format | ||
masak perks up | |||
pmichaud_: how? | |||
DanielC | masak: I could try that. | 15:41 | |
pmichaud_ | rakudo: say Perl6::Compiler.compile('say <hello>', :target('past')).perl; | ||
p6eval | rakudo e61569: OUTPUT«Method 'perl' not found for invocant of class 'PAST;Block'» | ||
pmichaud_ | rakudo: say Perl6::Compiler.compile('say <hello>', :target('past')).WHAT; | ||
p6eval | rakudo e61569: OUTPUT«PAST::Block()» | ||
masak | DanielC: over the last year, I've repeatedly lost and re-gained that enterprising spirit that makes me go after workarounds. I much prefer when I have it; it makes for more interesting solutions. :) | ||
15:42
scrottie joined
|
|||
DanielC | masak: But the blog about the Josephus is not bad. It shows that Perl 6 now has really nice OOP syntax. It slightly beats both Python and Ruby. | 15:42 | |
pmichaud_ | we could see about adding a .perl to PAST nodes | ||
masak | DanielC: sorry -- when you say 'blog' you mean, like, a blog post. right? | ||
DanielC | yeah, sorry | ||
post | |||
masak | just checking. | ||
DanielC: 'beats'? in length, you mean? | 15:43 | ||
DanielC | yeah | ||
both by line count and character count. | |||
I was surprised that Perl 6 was shorter than Python, but it is. | |||
TimToady | seems like there would be a much shorter FP solution... | 15:44 | |
masak | it actually took me a while to get used to some aspects of Perl 6 OO. | ||
some parts of the journey hurt. | |||
but now I really like it. | |||
DanielC | And I made every effort to implement the code the same way in all languages so no one can say that I was biased. | ||
pmichaud_ | I think that actually shows a bit of a bias in a different direction | 15:45 | |
DanielC | I made no real effort to make Perl 6 compact. It came out compact and easy to read all on its own. | ||
pmichaud_ | or, at least, it *can* | ||
(not sure it does in this case) | |||
the blog post is really cool, btw | |||
masak | it is. DanielC++ | ||
DanielC | pmichaud_: Well, I can't avoid being biased (Perl rulez!). All I can do is try to control it. | ||
thanks :-) | |||
masak | DanielC: typo in a comment in all the code snippets: s/Kill ever/Kill every/ | 15:46 | |
DanielC | thanks | 15:47 | |
15:47
hanekomu left
|
|||
DanielC goes fix it | 15:47 | ||
pmichaud_ | I mean, how does one write the equivalent of my @a = @b >>*<< @c >>+<< @d; in Perl 5? ;-) | ||
DanielC | masak: fixed, thanks | 15:48 | |
TimToady | in fact, there's probably a one line solution using [^$n] ... {} | ||
masak | pmichaud_: what's the precedence of that one? same as with * and +? | ||
pmichaud_ | masak: yes, I believe so. | ||
the hypers maintain their precedence | |||
masak | ah, makes sense. | ||
TimToady | yes, hypes are transparent, while X force list infix | 15:49 | |
*forces | |||
masak | [] makes infix into prefix, but still doesn't change precedence? | ||
pmichaud_ | makes it a listop | ||
DanielC | rakudo: my @a=<1 1>; my @b = @a; my @c =<4 4>; (@a >>*<< @b >>+<< @c).perl.say | ||
15:49
pmichaud_ is now known as pmichaud
|
|||
p6eval | rakudo e61569: OUTPUT«[5, 5]» | 15:49 | |
masak | oh, right. listop. | ||
DanielC | rakudo: my @a=<2 2>; my @b = @a; my @c =<4 4>; (@a >>*<< @b >>+<< @c).perl.say | 15:50 | |
p6eval | rakudo e61569: OUTPUT«[8, 8]» | ||
DanielC | Well, it behaves rationally. | ||
15:54
alanhaggai left
|
|||
masak | going on a long cross-country bus trip tonight. expect to get some Perl 6 hacking done on the way. | 15:56 | |
barney | Shouldn't line 1932 of action.pm simply say; $past<itype> := 'Perl6Scalar'; instead of $past<itype> := container_itype('Perl6Scalar'); | ||
'Perl6Scalar' is no Sigil | |||
15:56
szabgab left
|
|||
pmichaud | looking | 15:56 | |
15:57
meppl joined,
Gothmog_ joined
|
|||
pmichaud | I'm guessing it should actually use the sigil | 15:57 | |
masak | pmichaud: I'm not sure I understood what you meant by "you can always get Rakudo's AST format" -- it sounds intriguing, though. | ||
pmichaud | masak: Rakudo compiles first to PAST (its AST format) before going on to anything else | ||
from the command line we do this via --target=past | |||
masak | ooh. | 15:58 | |
yes, I'll try that. | |||
15:58
mkfort_ joined
|
|||
masak | thanks. | 15:58 | |
pmichaud | but it can be done from code by calling the compiler directly, and passing :target('past') | ||
masak | even better. | ||
pmichaud | unfortunately the PAST nodes don't know how to .perl themselves, but we could come up with something there | 15:59 | |
masak | yes, this looks like what I want, and not --target=parse. | ||
pmichaud: I'll make a try at making PAST nodes .perl themselves. | 16:00 | ||
16:00
payload left
|
|||
pmichaud | ultimately they're just Captures (like Match objects | 16:00 | |
but they can/do have cycles in them | |||
pmichaud decides to bring back '_dumper' for now. | 16:01 | ||
16:01
synth joined
|
|||
TimToady | sub josephus ($n) { [^$n] ... { .push(.shift); .push(.shift); return .[0] if @$_ == 1; .shift; $_ } } | 16:01 | |
or some such | |||
16:02
dakkar left
|
|||
TimToady | well, using ... is probably overkill, since it's just looping over the same array | 16:04 | |
16:04
mkfort left
|
|||
masak | that infix:<...> operator is scary. | 16:05 | |
anyway, going home to make food. | 16:06 | ||
have a good weekend, everyone! | |||
16:06
masak left
|
|||
pmichaud | japhb: I can't bump PARROT_REVISION to 39521 yet -- something in Parrot at that revision is causing t/spec/integration/99problems-11-to-20.t to fail in the spectests. | 16:06 | |
barney | Is there a way to follow the references in the dumped PAST? e.g. [0] => \past | ||
pmichaud | barney: the \past occurs whenever it refers to a node that was already displayed | 16:07 | |
it's something about the dumper code that is causing it to not display the full reference properly. | |||
(I've not quite figured out what) | |||
probably need to look at dumper.pbc and/or the 'dump' method | |||
TimToady | rakudo: my @p = ^10; say gather while @p { take splice(@p, 2 % @p, 1) } | 16:09 | |
p6eval | rakudo e61569: OUTPUT«Could not find non-existent sub splice» | ||
TimToady | aww | ||
pmichaud | @p.splice | ||
lambdabot | Unknown command, try @list | ||
pmichaud | rakudo: my @p = ^10; say gather while @p { take @p.splice(2 % @p, 1) } | 16:10 | |
p6eval | rakudo e61569: OUTPUT«No applicable candidates found to dispatch to for 'splice'in Main (/tmp/Fr7ClbT5Kr:2)» | ||
pmichaud | o_O | ||
rakudo: my @p = ^10; say @p.splice(2 % @p, 1); | |||
p6eval | rakudo e61569: OUTPUT«No applicable candidates found to dispatch to for 'splice'in Main (/tmp/wC2lIwPTR1:2)» | ||
pmichaud | rakudo: my @p = ^10; say @p.splice(2 % +@p, 1); | ||
p6eval | rakudo e61569: OUTPUT«No applicable candidates found to dispatch to for 'splice'in Main (/tmp/YnBL8QJRZO:2)» | ||
pmichaud | bah. | 16:11 | |
rakudo: my @p = ^10; say @p.splice(2, 1); | |||
p6eval | rakudo e61569: OUTPUT«2» | ||
pmichaud | rakudo: my @p = ^10; say 2 % @p; | ||
p6eval | rakudo e61569: OUTPUT«2» | ||
TimToady | rakudo: my @p = ^10; say gather while @p { take @p.splice(int(2 % @p), 1) } | ||
p6eval | rakudo e61569: OUTPUT«2345678901» | ||
pmichaud | rakudo: my @p = ^10; say (2 % @p).WHAT; | ||
p6eval | rakudo e61569: OUTPUT«Num()» | ||
pmichaud | I bet someone constrained it to Int | ||
TimToady | oh, that's not right | ||
Bad Algorithm Go Home!!! | 16:12 | ||
pmichaud | (agreed, 2 % @p should be Int) | ||
(not easily done just yet.) | |||
TimToady | I mean my josephus is wrong | ||
sbp | try psellus | 16:13 | |
TimToady | rakudo: my @p = ^10; say gather while @p { @p.push(@p.splice(0,2); take @p.shift } | 16:14 | |
p6eval | rakudo e61569: OUTPUT«Statement not terminated properly at line 2, near "(@p.splice"in Main (src/gen_setting.pm:0)» | ||
TimToady | rakudo: my @p = ^10; say gather while @p { @p.push(@p.splice(0,2)); take @p.shift } | ||
p6eval | rakudo e61569: OUTPUT«2581607493» | ||
TimToady | there you go | 16:15 | |
DanielC: see ^^^ for a more idiomatic josephus | |||
ruoso | DanielC++ # nice post | 16:16 | |
DanielC | TimToady: I'm blind. Where? | 16:17 | |
TimToady | my last rakudo command | ||
DanielC | rakudo: my @p = ^10; say gather while @p { @p.push(@p.splice(0,2)); take @p.shift } | ||
p6eval | rakudo e61569: OUTPUT«2581607493» | ||
TimToady | it was 50, right? | 16:18 | |
rakudo: my @p = ^50; say gather while @p { @p.push(@p.splice(0,2)); take @p.shift } | |||
DanielC | Should be 28... | ||
p6eval | rakudo e61569: OUTPUT«25» | ||
DanielC | I think | ||
TimToady | rakudo: my @p = ^50; say gather while @p { @p.push(@p.splice(0,2)); take @p.shift } | ||
DanielC | I hope it's 28! Otherwise all my versions are wrong! | ||
p6eval | rakudo e61569: OUTPUT«25811» | ||
pmichaud | TimToady: rakudo resource limits | ||
DanielC | rakudo: my @p = ^40; say gather while @p { @p.push(@p.splice(0,2)); take @p.shift } | ||
p6eval | rakudo e61569: OUTPUT«258» | 16:19 | |
pmichaud | moritz_: see "resource limits" | ||
p6eval is aborting the process early | |||
16:19
pmurias left
|
|||
DanielC | I don't understand the output though. What is 258 supposed to mean? | 16:19 | |
pmichaud | kill 2, then kill 5, then kill 8 | ||
DanielC | ruoso: thanks | ||
ah | |||
pmichaud | rakudo: my @p = ^40; say (gather while @p { @p.push(@p.splice(0,2)); take @p.shift }).join(',') | 16:20 | |
p6eval | rakudo e61569: OUTPUT«2,5,8,11,14,17,20,23,26,29,32,35,38,1,6,10,15,19,24,28,33,37,3,9,16,22,30,36,4,13,25,34,7,21,39,18,0,31,12,27» | ||
TimToady | yes, it's 28 | ||
allowing for 0-based | |||
DanielC | my @p = ^40; say (gather while @p { @p.push(@p.splice(0,2)); take @p.shift }).join(','); say @p | 16:21 | |
TimToady | you want while @p > 1 | 16:22 | |
DanielC | rakudo: my @p = ^40; say (gather while @p { @p.push(@p.splice(0,2)); take @p.shift }).join(','); say @p | ||
p6eval | rakudo e61569: OUTPUT«2,5,8,11,14,17,20,23,26,29,32,35,38,1,6,10,15,19,24,28,33,37,3,9,16,22,30,36,4,13,25,34,7,21,39,18,0,31,12,27» | ||
DanielC is trying to get Rakudo to say "the winner is 28" | |||
TimToady | if you want the last one in @p | ||
pmichaud | rakudo: my @p = ^40; say (gather while @p { @p.push(@p.splice(0,2)); take @p.shift })[*-1] | ||
p6eval | rakudo e61569: OUTPUT«27» | ||
DanielC | rakudo: my @p = ^40; say (gather while @p > 1 { @p.push(@p.splice(0,2)); take @p.shift }).join(','); say @p | 16:23 | |
p6eval | rakudo e61569: OUTPUT«2,5,8,11,14,17,20,23,26,29,32,35,38,1,6,10,15,19,24,28,33,37,3,9,16,22,30,36,4,13,25,34,7,21,39,18,0,31,1227» | ||
ruoso working in another OO implementation of it... although it is certainly not a classical OOP problem, more of a functional problem instead | |||
DanielC | rakudo: my @p = ^40; (gather while @p > 1 { @p.push(@p.splice(0,2)); take @p.shift }).join(','); say @p | ||
p6eval | rakudo e61569: OUTPUT«27» | ||
DanielC | yay | ||
Can you remove the "gather"? | 16:24 | ||
rakudo: my @p = ^40; (while @p > 1 { @p.push(@p.splice(0,2)); take @p.shift }).join(','); say @p | |||
p6eval | rakudo e61569: OUTPUT«Diedin Main (/tmp/HiA1rvTOnN:2)» | ||
TimToady | rakudo: my @p = 1..40; while @p > 1 { @p.push(@p.splice(0,2)); take @p.shift }; say @p | ||
DanielC | oops | ||
p6eval | rakudo e61569: OUTPUT«Diedin Main (/tmp/kUtcUyHHAw:2)» | ||
TimToady | rakudo: my @p = 1..40; while @p > 1 { @p.push(@p.splice(0,2)); @p.shift }; say @p | ||
p6eval | rakudo e61569: OUTPUT«28» | ||
DanielC | Beautiful. | 16:25 | |
TimToady | seems like the push/splice is wrong | ||
16:25
Psyche^ joined
|
|||
pmichaud | rakudo has a push problem I think. | 16:25 | |
it tends to push references instead of values | |||
TimToady | but maybe it doesn't matter once it gets down to one element | ||
hmm, if push returned the array, we could say @p.push(@p.splice(0,2)).shift while @p > 1 | 16:27 | ||
DanielC | TimToady: I just added the compact solution as a comment to the blog post. | ||
TimToady | if we had rotate we could do @p.rotate.rotate.shift | 16:28 | |
16:28
M_o_C joined
|
|||
TimToady | or @p.rotate(2).shift | 16:28 | |
pugs_svn | r27060 | pmichaud++ | [spec]: Correct buglet in example -- | 16:30 | |
r27060 | pmichaud++ | squaring elements of array is @a »**» 2, not @a [**] 2. | |||
r27061 | pmichaud++ | [spec]: Correct typo: "fullwith" --> "fullwidth" | |||
r27062 | lwall++ | [Containers] add @array.rotate, define push and unshift to return array | 16:33 | ||
r27063 | lwall++ | [Containers] default rotation is 1 | 16:34 | ||
TimToady | okay, the solution is now officially @p.rotate(2).shift while @p > 1 | 16:35 | |
16:37
pmurias joined
|
|||
Roxas | Drink the pineapple juice before you make the apple juice. | 16:39 | |
DanielC | @p.rotate(2).shift would be really cool. | 16:41 | |
16:41
Chillance joined
|
|||
DanielC | my @p = 1..40; @p.rotate(2).shift while @p > 1; say @p | 16:41 | |
16:42
Patterner left,
Psyche^ is now known as Patterner
|
|||
ruoso | is rotate in-place modifier? or does it return a new list? | 16:43 | |
viklund | One more test passed | ||
DanielC | In place would be cooler. | ||
ruoso | DanielC, nah... that would break functional mind-set | 16:44 | |
DanielC | shift, pop, splice, push and unshift are all in-place. | ||
@p.rotate($n) is just @p.push(@p.splice(0,$n)) | |||
lambdabot | Unknown command, try @list | ||
DanielC | But it's easier to read. | 16:45 | |
I wonder if TimToady will add @p.rotate($n). | 16:46 | ||
my @p = 1..40; @p.rotate(2).shift while @p > 1; say @p | |||
I'd love to do that... | |||
ruoso | if it weren't in-place... it would be even prettier... | ||
or not... | |||
ah... forget it, misfire... | 16:47 | ||
DanielC | :) | ||
pmichaud | looks like it's inplace from the description | ||
pugs_svn | r27064 | lwall++ | [Containers] more clarifications | ||
DanielC | pmichaud: Description? You mean it exists? | ||
TimToady | thought about requiring .=rotate | ||
pmichaud | DanielC: TimToady just added them. | 16:48 | |
svn.pugscode.org/pugs/docs/Perl6/Sp...ainers.pod | |||
on channel, that's what the following means | |||
DanielC | *click* | ||
pmichaud | 16:33 <pugs_svn> r27062 | lwall++ | [Containers] add @array.rotate, define push and unshift to return array | ||
16:34 <pugs_svn> r27063 | lwall++ | [Containers] default rotation is 1 | |||
i.e., @array.rotate was added to the spec in r27062. | 16:49 | ||
in r27063 it was clarified to have a default rotation of 1. | |||
DanielC | COOL | ||
pmichaud | I might even get around to adding them to Rakudo today :-P | ||
DanielC | I just showed my fiancee. She loved it :-) | ||
I had just finished explaining to her how TimToady's code worked. | 16:50 | ||
ruoso | you're certainly a romantic guy | 16:51 | |
pmichaud | shift, splice, and push can be really .... ummm, never mind. | ||
DanielC | She is geeky enough to appreciate a nice algorithm. | ||
moritz_ | boo, with latestet parrot t/spec/S10-packages/basic.t assertion-aborts on exit | ||
pmichaud | moritz_: yes. | ||
moritz_: the parrot folks have been working on cleaning up context gc so it doesn't leak, and there are a few issues yet. | 16:52 | ||
16:52
rfordinal joined
|
|||
moritz_ | and we have two passing TODOs, which I might clean up later | 16:52 | |
viklund | ahh, now json passes all tests | 16:56 | |
lets see if I can add a few more | |||
moritz_ pulls | |||
pugs_svn | r27065 | moritz++ | [t/spec] unfudge two passing tests for rakudo | ||
moritz_ | viklund: if you happen to have written a makefile, feel free to add it | 16:58 | |
(or a build script, or whatever) | |||
dalek | kudo: 9aa210f | pmichaud++ | src/setting/Array.pm: Remove incorrect constraints on splice() arguments. |
||
kudo: 31443c0 | pmichaud++ | src/classes/Str.pir: Add some more ranges to Str.succ . |
|||
viklund | moritz_: ok | 16:59 | |
i made one actually | |||
but first: supper | |||
pmichaud | rakudo: say "updated?"; | 17:02 | |
p6eval | rakudo e61569: OUTPUT«updated?» | ||
pmichaud | not yet. :-| | ||
moritz_ triggers a pull/rebuild manually | |||
TimToady | DanielC: pge's proto is not the same as p6's proto | 17:03 | |
pge's proto is functioning at the macro level, not the grammar level | 17:04 | ||
17:06
barney left
17:07
M_o_C left
|
|||
pmichaud | rakudo: say ('⚀⚀'..'⚅⚅').join(' '); | 17:08 | |
p6eval | rakudo 31443c: OUTPUT«⚀⚀ ⚀⚁ ⚀⚂ ⚀⚃ ⚀⚄ ⚀⚅ ⚁⚀ ⚁⚁ ⚁⚂ ⚁⚃ ⚁⚄ ⚁⚅ ⚂⚀ ⚂⚁ ⚂⚂ ⚂⚃ ⚂⚄ ⚂⚅ ⚃⚀ ⚃⚁ ⚃⚂ ⚃⚃ ⚃⚄ ⚃⚅ ⚄⚀ ⚄⚁ ⚄⚂ ⚄⚃ ⚄⚄ ⚄⚅ ⚅⚀ ⚅⚁ ⚅⚂ ⚅⚃ ⚅⚄ ⚅⚅» | ||
pmichaud | rakudo: say ('Α'..'Ω').join(' '); | 17:09 | |
p6eval | rakudo 31443c: OUTPUT«Α Β Γ Δ Ε Ζ Η Θ Ι Κ Λ Μ Ν Ξ Ο Π Ρ Σ Τ Υ Φ Χ Ψ Ω» | ||
ruoso | Cool! | ||
[particle] | :) | ||
TimToady | rakudo: say <⚀⚀ ⚀⚁ > ... * | ||
p6eval | rakudo 31443c: OUTPUT«Statement not terminated properly at line 2, near "... *"in Main (src/gen_setting.pm:0)» | ||
ruoso | rakudo: say '𐌰'..'𐍊' | ||
p6eval | rakudo 31443c: ( no output ) | ||
ruoso | isn't there some generic way of detecting that sequences? | 17:10 | |
pmichaud | what sequence is that? | ||
(short answer: doesn't appear to be a generic way) | |||
ruoso | that is the gothic alphabet | ||
viklund | rakudo: say ('⚀⚀'..'⚅⚅').pick | 17:12 | |
p6eval | rakudo 31443c: OUTPUT«⚅⚄» | ||
pmichaud | viklund: looks like you win! | ||
viklund | 11! yay | ||
ruoso | how can I get the description of the character? | 17:13 | |
[particle] needs a font with better unicode support | |||
pmichaud | I don't think we have a way to do that (in Rakudo, perhaps not defined in Perl 6) | ||
ruoso | I saw that here some time ago | 17:14 | |
as an output of rakudo in the evalbot | |||
TimToady | hmm, the spec is contradictory in saying increment only does \w chars and then mentioning dice, i think | ||
ruoso | the thing that returns "GOTHIC LETTER AHSA" for "𐌰" | 17:15 | |
17:15
DemoPhreak left
|
|||
TimToady | rakudo: say '⚀' ~~ /\w/ | 17:15 | |
p6eval | rakudo 31443c: OUTPUT«» | ||
pmichaud | does the spec say that increment only does \w chars? | ||
TimToady | S03:431 seems to think so | 17:16 | |
pmichaud | rakudo: my %dice = ( '⚀⚀'..'⚅⚅' Z ( 1..6 X+ 1..6 ) ); say %dice.perl; | ||
p6eval | rakudo 31443c: OUTPUT«{"⚀⚀" => 2, "⚀⚁" => 3, "⚀⚂" => 4, "⚀⚃" => 5, "⚀⚄" => 6, "⚀⚅" => 7, "⚁⚀" => 3, "⚁⚁" => 4, "⚁⚂" => 5, "⚁⚃" => 6, "⚁⚄" => 7, "⚁⚅" => 8, "⚂⚀" => 4, "⚂⚁" => 5, "⚂⚂" => 6, "⚂⚃" => 7, "⚂⚄" => 8, "⚂⚅" => 9, "⚃⚀" => 5, "⚃⚁" => 6, "⚃⚂" => 7, "⚃⚃" => 8, "⚃⚄" => 9, "⚃⚅" => 10, "⚄⚀" => 6, | ||
.."⚄⚁" … | |||
TimToady | but it's probably wrong | ||
ruoso | depending on how standard the definition of "GOTHIC LETTER AHSA" is, you could probably get the "GOTHIC LETTER" part, and follow to the next one until you get a different "group" | 17:17 | |
that would be a generic way of doing it | |||
pmichaud | ruoso: there are a couple of places where we need to skip codepoints (in the greeks, for example) | 17:18 | |
ruoso | hmm... that's a shame | 17:19 | |
pugs_svn | r27066 | lwall++ | [S03] tweak rangechars not to be limited to \w | ||
japhb | pmichaud: sorry to hear about PARROT_REVISION to 39521 specfail. Ah well, here's hoping we can bump it to a higher number soon, as this allows Rakudo to 'use Foo:from<parrot>;' . Speaking of which, did you want to do the deprecation honors? | ||
pmichaud | japhb: what gets deprecated? | ||
ruoso | pmichaud, is there an easy way to get all characters from the "GOTHIC LETTER" group? | ||
pmichaud | japhb: and we'll have to bump it to a higher revision on Tuesday | ||
ruoso: I don't think ICU gives me an easy way to do that, no. | |||
japhb | pmichaud: you said you wanted to immediately deprecate the import/export system, so that it was effectively marked "experimental" -- there being no direct way to do the latter. | 17:20 | |
pmichaud | oh, that. Just add notes to DEPRECATED.pod | ||
japhb: also, we'll have to bump the revision on Tuesday at the latest, so it should be addressed by then | 17:21 | ||
TimToady | basically Perl 6 defines it own rangechar class to be all codepoints with a known cyclical successor | ||
pmichaud | does the successor have to be at "codepoint plus 1" ? | ||
TimToady | nope | ||
pmichaud | right. | ||
TimToady | spec says to skip trailing sigma, for instance | ||
pmichaud | (which Rakudo does :-) | 17:22 | |
japhb | pmichaud: My understanding of DEPRECATED.pod is that you need a TT for each entry. Do you want me to create a basic TT referencing your 'experimental' wishes? | ||
pmichaud | sure. | ||
TimToady | a TimToady? a TemplateToolkit? :P | ||
pmichaud | japhb: also, I'm currently bisecting parrot revisions to find the one that is causing the breakage, so we can report that. | ||
I *think* it's likely a gc issue. | 17:23 | ||
japhb | excellent. | ||
pmichaud | TimToady: TT in parrot speak is "Trac Ticket" | ||
TimToady | yes, I know | ||
pmichaud | okay. | ||
off to pick up daughter from Mandarin class | |||
TimToady | but till now that usage as primarily been in #parrot, not #perl6... | ||
*has | |||
17:26
mizioumt1 left
|
|||
japhb | TimToady: my apologies; sometimes I forget to switch to the other tab while talking to someone who is in both channels -- and we're talking about something that applies at the border between them. :-/ | 17:28 | |
TimToady | np | 17:31 | |
just giving pm a hard time | |||
well, and you | |||
:) | |||
japhb | :-) | 17:38 | |
viklund | moritz_: now it has a build system as well | ||
pmichaud | the fact that TimToady gives me a hard time is how I know he still cares :-) | 17:44 | |
17:44
rindolf joined
|
|||
pmichaud | my $dice = '⚅'; say ++$dice; | 17:45 | |
17:45
molaf joined
|
|||
pmichaud | rakudo: my $dice = '⚅'; say ++$dice; | 17:45 | |
p6eval | rakudo 31443c: OUTPUT«⚀⚀» | ||
17:46
mizioumt joined,
Meldrake joined
17:52
DanielC left
17:56
bejuryu left
18:19
felipe joined
|
|||
pmurias | ruoso: so undefined object functioning as types is the way i should implement types in mildew? | 18:21 | |
ruoso | pmurias, that's the way it is in Perl 6 at the moment | 18:22 | |
18:24
frew_ joined
18:29
M_o_C joined
|
|||
moritz_ | viklund++ | 18:29 | |
viklund | moritz_: I think I fixed the \uXXXX parsing as well | 18:34 | |
;) | |||
18:36
DanielC joined
|
|||
moritz_ | viklund: parsing or transforming? | 18:40 | |
viklund | transforming | ||
I've added two small tests | 18:41 | ||
moritz_ | viklund++ again | ||
I think we need a #perl6-all channel with reporting bots of the various Perl 6 projects | 18:42 | ||
it might get a bit croweded if we did that here | |||
viklund | yes, I've been thinking of writing one in p6 | ||
but then I need a json parser for github ;) | |||
IO::Socket::INET should be enough for the rest I think | 18:43 | ||
need to implement the IRC protocol though | |||
moritz_ | json parser... ;-) | 18:44 | |
ruoso | TimToady, considering "my @a = 1,[2,[3,4]];" is @a[1;1;1] a valid access? | ||
or does that only applies to captures? | |||
18:44
frew_ left
|
|||
DanielC | my @a = (1, 2, 3; 4, 5, 6; 7, 8, 9); @a.perl.say | 18:44 | |
ruoso | std: my @a = 1,[2,[3,4]]; say @a[1;1;1] | 18:45 | |
japhb | #perl6-bot-party | ||
p6eval | std 27066: OUTPUT«ok 00:03 38m» | ||
DanielC | rakudo: my @a = (1, 2, 3; 4, 5, 6; 7, 8, 9); @a.perl.say | ||
p6eval | rakudo 31443c: OUTPUT«[7, 8, 9]» | ||
DanielC | What does ; do? | ||
ruoso | DanielC, it says there is one other level of captures | 18:46 | |
but rakudo is not implementing it correctly now | |||
japhb | It's the interdimensional rift operator | ||
:-) | |||
DanielC | one other level of capture == ? | ||
japhb | DanielC: Capture containing captures. | ||
viklund | moritz_: the fix for the \uXXXX was changing the grammar slightly | ||
moritz_ | it's supposed to be the same as @a = \(1, 2, 3), \(4, 5, 6), \(7, 8, 9) # not entirely sure though | 18:47 | |
DanielC | So, it's like (1,2,3,(4,5,6,(7,8,9))) ? | ||
moritz_ | DanielC: but if you assign it to an array, it's flattened anyway | ||
DanielC | ah, no, thanks | ||
moritz_ | DanielC: so it's the same as @a = 1..9; really | ||
DanielC | Yeah, but you could do something interesting with it, no? | 18:48 | |
ruoso | moritz_, looks like ((1,2,3),(4,5,6),(7,8,9)) as well... which looks easier | ||
DanielC | Something more interesting than giving it to an array. | ||
moritz_ | yes, like assigning it to @@a or a scalar | ||
DanielC | ok | ||
ruoso | which remembers me of the ¢a idea | ||
18:50
molaf left
|
|||
viklund delving deep into RFC-land | 18:55 | ||
pmurias | ruoso: does the default ACCEPTS method disappear in defined punned class instances? | ||
ruoso | the common understanding is that it will behave like a multi | ||
with a constraint in the invocant | |||
so you can simply do a if self.defined { ... } else { ... } for bootstrapping purposed | 18:56 | ||
*purposes | |||
pmurias | ruoso: and the else ... should contain what? | 19:09 | |
ruoso | the code to make $signature ~~ Signature to work | 19:10 | |
since $signature ~~ Signature actually means Signature.ACCEPTS($signature) | |||
19:11
hanekomu joined
|
|||
pugs_svn | r27067 | moritz++ | [t/spec] RT #61988, $.foo form did not accept arguments | 19:13 | |
19:13
masak joined
|
|||
masak | greetings, fellow hacktivists. | 19:13 | |
masak is moving about 100 km/h | 19:14 | ||
19:14
masak left
|
|||
moritz_ | oh hai masak | 19:14 | |
19:14
masak joined
|
|||
ruoso | masak, it looks like your connection gets a bit flacky at 100km/h | 19:15 | |
;) | |||
19:15
jantore left
|
|||
masak | ruoso: yes. guess you can't have everything. | 19:16 | |
I'm also a constant three meters above ground. | |||
moritz_ | masak: is it a train? | 19:18 | |
masak | no, a bus. | ||
DanielC | @seen pmichaud | ||
lambdabot | pmichaud is in #perl6. I last heard pmichaud speak 1h 33m 25s ago. | ||
ruoso | a flying bus? | ||
masak | pmichaud: a closer look at PAST reveals that it's already too digested for my aims. | ||
pmichaud | lambdabot: shhhh! I'm not really here! | ||
masak: possibly, yes. | |||
DanielC | :-) | 19:19 | |
pmichaud | however, the PAST tree does contain the parse tree as well :-) | ||
masak | ruoso: yes, we have flying buses in Sweden. | ||
DanielC | pmichaud: I can't find pgc.pir in the Rakudo distribution. | ||
pmichaud | ...pgc.pir ? | ||
DanielC | pmichaud: PGE | ||
pmichaud | PGE is part of parrot | ||
DanielC | Parrot Grammar Engine? | ||
masak | pmichaud: I guess. :) I'm not interested in the parse tree as such, but the structure of the program. | ||
19:20
donaldh left
|
|||
masak | DanielC: Parser Grammar Engine. | 19:20 | |
DanielC | pmichaud: Yeah, but Rakudo includes parrot, no? | ||
masak | (I learned that from Wikipedia today) | ||
DanielC | in the rakudo/parrot directory. | ||
pmichaud | DanielC: sure, Rakudo is built from parrot. It'd be in the parrot/ subdirectory | ||
more to the point, PGE is parrot/compilers/pge/ | |||
19:20
donaldh joined
|
|||
pmichaud | I think there might have been a pgc.pir at one time, but it's long gone | 19:20 | |
DanielC | pmichaud: I must have done something wrong. I could not find it with 'find' | 19:21 | |
PGE.pir ? | |||
[particle] | wikis are always wrong. | ||
DanielC | [particle]: And slide presentations too :) I got pgc.pir from one of pmichaud's presentations. | 19:22 | |
pmichaud | DanielC: what in particular are you looking for with PGE? | ||
DanielC: from how long ago?!? ;-) | |||
DanielC | parrot pgc.pir simple.pg >simple.pir | ||
^^^ that's what I'm looking for. | |||
pmichaud | it's now Perl6Grammar.pbc | ||
in runtime/parrot/library/PGE | |||
masak | pmichaud: 2007, methinks. :/ | ||
sorry, I gave him that link. | |||
viklund | bah, it will take too long to read the RFC, I'll go read Net::IRC instead | ||
DanielC | thanks | ||
pmichaud | we still had pgc in 2007? wow. | 19:23 | |
moritz_ | viklund: it might be even easier to read a dumb of the protocoll ;-) | ||
masak | pmichaud: no, 2006 :/ www.pmichaud.com/2006/pres/yapc-par...start.html | ||
DanielC | pmichaud: Wait... "runtime"? That's not in Rakudo, is it? | ||
ah... parrot/runtime | |||
not runtime/parrot :) | 19:24 | ||
pmichaud | parrot/runtime/parrot/library/PGE | ||
DanielC | ah, there it is. | ||
thanks | |||
[particle] | anyone here good at setting up terminal, irssi, and %ENV set up for unicode? | 19:25 | |
DanielC | pmichaud: Can I copy that file to a different directory? Or does it depend on other files in that directory? | ||
pmichaud | I think it can be copied around. | ||
viklund | moritz_: aaahh, a dump... | ||
DanielC | pmichaud: Seems to work. :-) | 19:26 | |
moritz_ | viklund: right ;-) | ||
19:26
szabgab joined
|
|||
viklund | yes, that might be better | 19:26 | |
19:27
masak left,
masak joined
|
|||
viklund | masak: 3g? | 19:27 | |
masak | (oops.) | ||
pugs_svn | r27068 | pmurias++ | [re-smop] start of implementing .ACCEPTS for punned classes | ||
masak | viklund: no, bus. | ||
viklund | bus wifi? | 19:28 | |
masak | viklund: for the win. | ||
viklund | cool | ||
masak | swebusexpress++ | ||
japhb | bus wifi is getting fairly common, it seems. | ||
Of course, when the bus is out of cell tower range (so it can't provide the next hop), you tend to experience fail. | |||
Muixirt | pmichaud, please look at nopaste.snit.ch/16881 | ||
why is new $P20, "Int" inside the loop? | 19:29 | ||
TimToady | ruoso: see my latest multi-dim speculation in p6l | 19:30 | |
ruoso | TimToady, you sent it just now? | 19:31 | |
or is something older? | |||
19:32
estrabd left
|
|||
viklund | wireshark requires... gnome-keyring?? | 19:32 | |
TimToady | oh wait, hasn't left my mqueue yet... | ||
ruoso | ah... | ||
pmichaud | Muixirt: we don't do any loop constant factoring yet | ||
japhb | viklund: that's odd. Perhaps so it can show you decrypted traffic? | ||
masak | Muixirt: told you. :) | 19:33 | |
ruoso was pressing 'refresh the imap folder' constantly | |||
TimToady | stupid isp doesn't like me forwarding spam for some reason... | 19:34 | |
anyway, proposing @a[] to replace @@a | |||
ruoso | uh? | ||
you mean @a[] = ? | 19:35 | ||
TimToady | if @@ is a capture sigil, it's a no-op | ||
but we want a coercion | |||
ruoso | we do? | ||
Muixirt | pmichaud, the assignment of the constant integer isn't a problem | ||
masak | "On #perl6, we're so up-to-date that we get confused by p6l emails that haven't even been sent yet." | 19:36 | |
pmichaud | Muixirt: what "problem" are you referring to, then? | ||
ruoso | TimToady is a marketing wizard... he can even make a teaser about a mailing list post... | 19:37 | |
:P | |||
masak | "Coming soon to an inbox near you!" | ||
Muixirt | pmichaud, that while 1 { }; leaks mem | ||
19:37
estrabd joined
|
|||
pmichaud | Muixirt: the problem is very likely not rakudo. | 19:37 | |
it's very likely an issue in parrot. | |||
ruoso | TimToady, btw... I really thought the capture sigil was precisely there to mean "no coercion" | 19:38 | |
pmichaud | Muixirt: here, I'll give a test program that is pure parrot as a demo | ||
ruoso | actually... it wasn't still there, but it would be there... | ||
pmichaud | (building a parrot demo... one moment) | 19:39 | |
ruoso still hitting "refresh" in his IMAP folder | |||
Muixirt | pmichaud, nopaste.snit.ch/16885 | ||
pmichaud | Muixirt: ...? | ||
Muixirt | that example leaks mem and is derived from the rakudo example | 19:41 | |
pmichaud | right | ||
TimToady | okay, reset the network, and email went | ||
pmichaud | Muixirt: that tells me it's a parrot bug | 19:42 | |
Muixirt: as parrot shouldn't be leaking memory there | |||
Muixirt: how are you measuring "leaked memory", ooc? | |||
Muixirt | pmichaud, via top and strace -c | 19:43 | |
pmichaud | Muixirt: anyway, it's a parrot bug, not a rakudo one. | ||
dalek | kudo: de1e9f0 | moritz++ | docs/ChangeLog: [docs] initial changelog for 2009-06 release |
||
Muixirt | pmichaud, i think there are two bugs | ||
one of parrot for not collecting $P0 | |||
and rakudo for placing the $P0 allocation inside the loop | 19:44 | ||
pmichaud | Muixirt: I already said we don't do loop constant factoring | ||
ruoso | TimToady, there is one thing that gets lost in that behavior | ||
my ¢a = (1,2,3;4,5,6;7,8,9); my @b = ¢a.rotate(1;1); | 19:45 | ||
Muixirt | pmichaud, so the $P0 allocation and the assignment to it cannot be split? | ||
pmichaud | Muixirt: suppose the loop was instead | ||
while foo() { } | |||
the call to foo() would have to be inside the loop, yes? | |||
ruoso | TimToady, unless you meant that only "in addition" to the behavior described in the above code | ||
so the above would also work | |||
TimToady | use @b[] = | 19:46 | |
ruoso | no... I really meant to flatten at that point | ||
my point was precisely to have an unflattened structure, manipulate it, and only later flatten it | |||
TimToady | @b = flattens | 19:47 | |
lambdabot | Maybe you meant: b52s babel bf bid botsnack brain bug . ? @ v | ||
19:47
payload joined
|
|||
TimToady | maybe you have a brain bug, lambdabot | 19:47 | |
ruoso | right.. so your email only describes new behavio | ||
masak | @botsnack | ||
lambdabot | :) | ||
ruoso | not replacing behavior ;) | ||
TimToady | correct | ||
pmichaud | Muixirt: from rakudo's perspective, a constant 1 currently results in $P0 = new 'Int'; assign $P0, 1; | 19:48 | |
19:48
Helios left
|
|||
pmichaud | it does not attempt to factor out all of the constant 1's that might exist into a single PMC | 19:48 | |
ruoso | TimToady, I think that's cool, and solves a lot of semantic issues as well... | ||
19:49
Helios joined
|
|||
pmichaud | it does not attempt to pre-allocate the PMCs before the assignment (as that could also be wrong) | 19:49 | |
what you're describing is properly an optimization, not a bug. | |||
ruoso | TimToady, and I do think that means '@@' should die... leaving room for '@%' and '¢' in its place | ||
Muixirt | pmichaud, ok thanks for the explanation | 19:50 | |
19:50
M_o_C left
19:51
masak left
|
|||
ruoso | TimToady, one thing that should be noted, otoh, is that @a[] = (1,2,3;4,5,6;7,8,9) would create 4 new arrays.... | 19:52 | |
pmichaud | Muixirt: it could indeed make a lot of sense to move all of the constant initializations to the beginning of the sub. | 19:53 | |
ruoso | in contrast to "¢a = (1,2,3;4,5,6;7,8,9)" which would simply store that capture in '¢a' | ||
TimToady | sure, but that's how you say you want mutable subarrays | ||
pmichaud | I may see about doing that in PCT. We would get a speed and memory benefit. | ||
ruoso | TimToady, right... makes sense... | 19:54 | |
pmichaud | (we would get a penalty by constructing constants that might not get used, though) | ||
TimToady | a penalty that Perl 5 pays continually, with not that much ill effect :) | 19:55 | |
pmichaud | TimToady: constructing constants at the beginning? | 19:56 | |
or on each reference? | |||
TimToady | pmichaud: I don't follow | 19:57 | |
pmichaud | right now we construct PMCs for each constant that appears in the program | ||
currently the PMC gets constructed at the point where the constant is actually used | |||
so, if we have a loop: while foo() { say 1; } | 19:58 | ||
then the "1" constant ends up creating a PMC on each loop iteration | |||
TimToady | why? | ||
ruoso | pmichaud, but that certainly can be optimize | ||
pmichaud | that's just the way the code generates at the moment | ||
ruoso | *optimized | ||
pmichaud | ruoso: yes, that's what I'm talking about. | ||
TimToady | seems like a waste for value semantics | ||
pmichaud | which part of "waste" are you referring to? ;-) | 19:59 | |
Muixirt | and the problem is that parrots GC doesn't catch that | ||
ruoso has a feeling that we're not talking about the same thing | 20:00 | ||
TimToady | you should only ever have to create a single 1 pmc, and just reuse it, meseemeth | ||
pmichaud | Muixirt: I'm after a different issue. | ||
TimToady | as long as it's sufficiently readonly | ||
pmichaud | TimToady: right. So the question is, when does that 1 PMC get created? | ||
at the beginning of the program? | |||
ruoso | my guess is BEGIN | ||
TimToady | sometime between the time it's compiled and the time it's used | ||
pmichaud | so my question is, does Perl 5 currently construct all such constants at the beginning? | 20:01 | |
ruoso | but that's one of the issues of code compilation that I don't see really solved yet | ||
pmichaud | or does it do something more lazily? | ||
ruoso | pmichaud, it stores in the optree as constant, iirc | ||
which means that it's done in the "compiling" | |||
pmichaud | I don't presently have a way to store the already-compiled-PMC in the compiled parrot code. I have to construct it at "runtime". | 20:02 | |
I can construct it at the beginning, though, and refer to it thereafter. | |||
(then the questions become: (1) where do I store them for easy lookup, and (2) is it more expensive to look them up than to create new ones?) | 20:03 | ||
TimToady | the compiler has to be able to set up data and pass it preconstructed to the run time | ||
20:03
amoc is now known as amoc^sleep
|
|||
ruoso | pmichaud, that's why I think you need to be able to serialize things into the bytecode | 20:03 | |
pmichaud | ruoso: I don't disagree. I'm working with what I have available. | ||
ruoso | in fact... the result of the compilation is supposed to be a serialized state of the runtime | ||
pmichaud | Right now what we do is generate the code that sets up the data as preconstructed to the run time | 20:04 | |
ruoso | and I'm kinda reaching the conclusion that "use" means "static link" | ||
pmichaud | (and yes, this is part of why rakudo's startup is a bit slow) | ||
ruoso | that's what mildew is doing now too | ||
TimToady | note that the whole YOU_ARE_HERE setting thing is assuming a similar ability to dump the snapshot, just in a different spot than for normal compilation | 20:05 | |
pmichaud | agreed. | ||
I do expect most of these problems to be solved in Parrot, I just don't expect them in the near future. | |||
Unless, of course, we can convince jnthn++ do to them. :-) | 20:06 | ||
ruoso | my vision for this goes like | ||
if you "use", the "compiled" thing will contain all the "use"d modules | 20:07 | ||
if you don't want that, you need to "require" | |||
pmichaud | (and yes, Parrot does have a serialization mechanism for bytecode in its design, I've just (1) had trouble getting it to work reliably and (2) have questions about how it's supposed to work when there are tons of references lying about) | ||
ruoso | so.. "use" is "static link" and "require" is "dynamic link" | ||
TimToady | it's really more of a Smalltalkian save-the-current-workspace kind of thinking | ||
ruoso | pmichaud, just make sure everything is serialized | ||
and make sure BEGIN don't do anything bad | 20:08 | ||
pmichaud | right now "everything" includes the entire compile environment, I fear. | ||
TimToady | well, it has to, for eval to work right | 20:09 | |
ruoso | but we already know you need that | ||
TimToady | hopefully that part doesn't get paged in unless you need it :) | ||
pmichaud | you mean also serializing copies of the builtin library subs and the like? | ||
ruoso | yes... you probably want to mmap the bytecode instead of reading it | ||
pmichaud, yes... *everything* | 20:10 | ||
TimToady | except | ||
ruoso | otherwise you won't really be able to have all the semantics | ||
TimToady | again it comes down to a question of identity | ||
pmichaud | ruoso: that is likely to be huge. The bytecode image is already 3MB. | ||
TimToady | you can cheat as long as you can nail down the identity of everything so it doesn't change | ||
ruoso | right... except if your bytecode reader can assume the identity of built-in types | 20:11 | |
pmichaud | right, that's what I'm saying. Parrot doesn't have support for those kinds of cheats yet. | ||
ruoso | but that's not quite easy | ||
TimToady | if it's going to grow back to that big anyway, better to have it pregrown | ||
ruoso | agreed... | ||
pmichaud | it doesn't grow back to that big | ||
ruoso | that simply means you don't need to load the setting before running the file | 20:12 | |
pmichaud | the subs themselves are precompiled | ||
ruoso | since the setting is part of the file | ||
pmichaud | so we don't have to rebuild them. | ||
we just rebuild the signature and other attributes that we don't have a way of compile-time attaching to the subs. | |||
20:13
mberends joined
|
|||
TimToady | seems like a bogus dichotomy to me | 20:13 | |
ruoso | the problem is that you're trying too hard to split compile-time from run-time | ||
pmichaud | TimToady: I don't entirely disagree; again, I'm kinda constrained by "what actually works in parrot" | ||
pugs_svn | r27069 | moritz++ | [t/spec] RT #65674, multi subs in classes | 20:14 | |
ruoso | having the code compiled down in Perl 6 simply means: hibernate the process before INIT | ||
TimToady | well, but pmichaud++'s point is sure to apply to other VMs as well | 20:15 | |
maybe what we have is a model more like... | |||
pmichaud | ruoso: Let me give a more concrete example. | ||
TimToady | there's snapshot that has everything, and | ||
pmichaud | let's say I'm compiling the following | ||
sub foo(Int $x) { ... } | |||
TimToady | a snapshot that has the initial load for a particular VM | ||
and that intial load knows how to fetch anything else from the complete image as necessary | 20:16 | ||
pmichaud | after compilation, there's an entry '&foo' in my current namespace, that points to a Sub object, that Sub object has a $!signature attribute, that $!signature attribute references the 'Int' type object | ||
if I attempt to serialize &foo, I'm going to get a copy of 'Int' and everything that it references in my serialization | |||
TimToady | no, not a copy, if you serialize everything | 20:18 | |
you only get one Int, and everyone refs it | |||
pmichaud | okay, so I have to serialize the entire compile-time enviornment | ||
ruoso | exactly | ||
pmichaud | my point is that a serialization of &foo includes everything that it references. | ||
TimToady | that's what I'm saying goes into the complete snapshot | ||
the intial loader doesn't have to pull in everything though | |||
*initial | 20:19 | ||
it can be lazy | |||
20:19
decasm left
|
|||
pmichaud | I'm still missing a piece here | 20:19 | |
TimToady | espically about loading in the compiler, if there's no eval | ||
sjohnson | when is the next State of the Onion? | ||
TimToady | the Onion has a new state continually :) | 20:20 | |
pmichaud | let's suppose I create Foo.pm, and compile it to bytecode. That bytecode compilation has a copy of the entire compiler? | ||
then I create Bar.pm, and compile it to bytecode. It also gets a copy of the entire compile-time environment? | |||
pmurias | why not? | ||
TimToady | again, you can factor out immutables as long as the identity is fixed | 20:21 | |
pmichaud | right. | ||
which is the piece I'm claiming is missing from Parrot. | |||
ruoso | but... | ||
TimToady | which is why I keep insisting that officially installed modules change version when modified | ||
ruoso | you can have a compilation that targets "shared library" | 20:22 | |
and in that "compilation mode" you produce a specialized bytecode | |||
20:22
Whiteknight left
|
|||
ruoso | but that's different from the "runnable" bytecode | 20:22 | |
pmichaud | so the correct way of phrasing what Rakudo currently does is that it does the equivalent of a dynamic link when a bytecode module is loaded | ||
ruoso | yes... but "use" is "static link" | ||
pmichaud | ruoso: I'm sorry, but I really don't envision that we want every pre-compiled bytecode to have a complete copy of the Perl 6 library in it. | 20:23 | |
TimToady | in the abstract, yes | ||
ruoso | that's why the Perl 6 library should be small | ||
but it's the same with C or C++ | 20:24 | ||
pmichaud | the Perl 6 library is anything but small. | ||
300+ operators pretty much guarantees that | |||
(not to mention all of their multi variants) | |||
ruoso | you always get the entire libc or libstdc++ | ||
pugs_svn | r27070 | moritz++ | [t/spec] RT #66552, Null PMC Access on user defined infix:<==> | ||
TimToady | you'll note those are dynamically linked these days... | ||
ruoso | pmichaud, one thing you're missing | ||
pmichaud | What TimToady++ just said -- you get them, but normally through dynamic linking. | ||
Try compiling a program with static linking that uses all of the library and see how big your .o and executable gets :-) | 20:25 | ||
moritz_ | rakudo: say Nil ~~ undef | ||
p6eval | rakudo de1e9f: OUTPUT«1» | ||
ruoso | pmichaud, that might mean we need to rethink the way we're building the Perl 6 CORE | 20:26 | |
moritz_ | rakudo: say Nil ~~ () | ||
p6eval | rakudo de1e9f: OUTPUT«1» | ||
moritz_ | rakudo: say Nil.new ~~ () | ||
p6eval | rakudo de1e9f: OUTPUT«1» | ||
moritz_ | rakudo: say Nil.new ~~ undef | ||
p6eval | rakudo de1e9f: OUTPUT«1» | ||
ruoso | pmichaud, btw... the thing you're missing is that you're going to load the setting anyway... that being statically linked or dinamically linked... | 20:27 | |
TimToady | any compiled module that starts with the standard setting does not need to serialize anything in the standard setting, as long as it can dynamically link back to the standard setting | ||
pmichaud | ruoso: that's not at all what I'm missing. | ||
ruoso | and unless we make it use the OS shared library mechanism, it will make little difference to be statically or dinamically linked | ||
pmichaud | ruoso: I understand that we're going to load the setting anyway. Your statement "serialize the entire compile-time environment" sounds like I'm having to serialize the setting as well. | 20:28 | |
moritz_ | rakudo: say (42 if 0) ~~ undef | ||
p6eval | rakudo de1e9f: OUTPUT«0» | ||
moritz_ | rakudo: say (42 if 0) ~~ () | ||
p6eval | rakudo de1e9f: OUTPUT«0» | ||
pmichaud | and when I do "use Foo;" I've already got a copy of the setting in memory. I don't want to load Foo's copy in on top of that. | ||
ruoso | pmichaud, that's what I was talking about a specialized "compiling target" for "shared libraries" | 20:29 | |
pmichaud | ruoso: which libraries aren't shared? | ||
in a perl 6 sense? | |||
ruoso | the ones that were statically linked into your program | ||
pugs_svn | r27071 | moritz++ | RT | 20:30 | |
pmichaud | anyway, the things TimToady is saying I can agree with, and it sounds similar to what we're doing now. | ||
ruoso | I mean... a runnable file is usually not a "shared library" | ||
moritz_ | dammit, that shouldn't be the whole commit message | 20:31 | |
ruoso | can we guarantee that serialization of an old version can initialize a newer version of something in the setting? | ||
[particle] | ...that makes it easy to agree with... | ||
pmichaud | the notion of serializing the entire compile-time environment doesn't fit in my worldview, though. serializing everything up to the parts that we know are "fixed" makes sense to me, and providing a way to link back to them upon load. | 20:32 | |
sjohnson | question: I haven't learned OOP Perl 5 yet. I have the Camel book. Should I just learn Perl 6 OOP instead? | ||
TimToady | the point is that there are boundaries through which reference happens in only one direction, and so while your program can have references into the used modules or into the setting, they cannot have references back into your code | ||
moritz_ | sjohnson: that depends on what you want to do | ||
TimToady | pmichaud: yes, I think we're in violent agreement on that | ||
moritz_ | sjohnson: if you want to program in perl 5, read the camel book. | ||
ruoso | my point is: the compilation of a "shared library" generates the bytecode that by being run will define the library... | ||
moritz_ | sjohnson: if you want to program Perl 6, learn the Perl 6 OO | 20:33 | |
ruoso | the compilation of a "runnable object" is the serialization of the vm | ||
ruoso fu**ng lag | |||
pmichaud | TimToady: I agree. AFAIK, Parrot doesn't give me a "serialize up to the fixed parts" option yet. It's pretty much "serialize everything". | ||
sjohnson | moritz_: ok cool. i have decided that i might as well learn what's "up and coming" | ||
as I will easily like Perl 6 | |||
pmichaud | regardless, we need the "link to the fixed portions" step in the initialization code, and that's part of what we generate | 20:34 | |
we also have to dynamically generate our constants, because they include hooks into the setting that have to be established | |||
ruoso | pmichaud, yeah... one thing that got lost here is that I do think we might need to rethink how we define the CORE | ||
pmichaud | ruoso: I'm fine with rethinking that. | ||
sjohnson | TimToady: have you done your own "Just Another Perl Hacker" program? | 20:35 | |
ruoso | pmichaud, so it is more "shared library"-like | ||
pmichaud | sjohnson: learning the Perl 5 OO will probably be more of a distraction than help if you're wanting to mainly do Perl 6 | ||
sjohnson: if you're wanting to do Perl 5 stuff, then I'd recommend looking at Moose | |||
TimToady | sjohnson: yes, it went out and looked up all of merlyn's JAPHs on the net, and ran one of them at randome | ||
*random | |||
ruoso | pmichaud, we might need a 'header file' kind of thing | ||
one thing this brings up is the need of two different versions of the same module loaded by the run time | 20:36 | ||
pmichaud | anyway, to get back to the issue that started this all -- Rakudo's idea of constants aren't quite read-only enough yet to be able to move them around cleanly, but they'll soon be that way when I've done my rw refactor. | 20:37 | |
TimToady | we need something yamlish that can not only detect duplicate copies and &1 them, but do the same for things already externally immutable and just put the external ref | ||
so, for instance, the ::OUTER link from ::UNIT to ::SETTING is broken and stored as an identity, not as a tree | 20:38 | ||
pmichaud | Exactly. | ||
TimToady | so from the standpoint of the compiler, it *thinks* it's serializing the whole magilla | ||
ruoso | TimToady, even if the setting changes version? | ||
TimToady | but it isn't | 20:39 | |
THE IDENTITY INCLUDES VERSION AND AUTH!!! | |||
20:39
alester joined
|
|||
TimToady | sorry | 20:39 | |
ruoso | so what happens if that specific version is not in the runtime? | 20:40 | |
TimToady | in my parlance, if I say "identity", I mean the name of something immutable | ||
you don't throw away old versions of things that are still in use in P6 | |||
pugs_svn | r27072 | moritz++ | [t/spec] RT #66404 | ||
20:41
kate21de joined
|
|||
TimToady | it's just a library GC problem | 20:41 | |
ruoso | TimToady, but what if you take something compiled a while ago into a machine and sent to another machine with only the newer versions? | ||
ruoso thinking about distributors... | |||
moritz_ | rakudo: (my @s)[0] //= 0; say @s.perl | ||
p6eval | rakudo de1e9f: OUTPUT«[0]» | ||
moritz_ | rakudo: (my @s)[0] //= 3; say @s.perl | ||
p6eval | rakudo de1e9f: OUTPUT«[3]» | ||
TimToady | then you make sure they know how to get the old version | ||
which you can unambiguously name, because it has an identity | |||
ruoso | alright... | ||
TimToady | reconstituting some programs requires more work than other programs | 20:42 | |
japhb | ... sorta like reconstituting old versions out of version control. | ||
TimToady | and, in fact, you could probably do pretty good compression from one version to another :) | 20:43 | |
DanielC | I'm having trouble with 'token' vs 'rule': pastebin.com/m1e6c0850 <-- This should parse '(name Daniel)' as a list, but it doesn't. :-( | ||
rule List { \( <Word>+ \) } <--- "rule" means that it won't care about spaces, yes? | 20:44 | ||
pmichaud | there's nothing there to match the space between "name" and "Daniel" | ||
StephenPollei | so you won't have have a require foo>=3.2 version .. or symbol versioning in the libraries | 20:45 | |
DanielC | pmichaud: I thought that "rule" meant that I didn't need anything to match the space. | ||
StephenPollei | it's always exact match? | ||
pmichaud | DanielC: "rule" means that spaces in the rule definition correspond to spaces in the target | ||
<Word>+ doesn't have any spaces | |||
20:46
molaf joined
|
|||
pmichaud | rule List { \( <Word> <Word> \) } would match in this instance | 20:46 | |
because there's a space between the two <Word>'s | |||
you probably want | |||
rule List { \( [ <Word> ]+ \) } | |||
DanielC | pmichaud: But that doesn't require a space after ( an before ) ? | ||
TimToady | bbl & | 20:47 | |
pmichaud | DanielC: depends on where you want to allow spaces and where they are forbidden | ||
DanielC | Why is the space between <Word> and <Word> significant while the space between \( an <Word> is not? | ||
pmichaud | the space between \( and <Word> is significant in a rule | ||
it means that spaces can occur between the paren and the first word | |||
DanielC | Oh... so in a rule a space means \s* ? | 20:48 | |
pmichaud | actually it means <.ws> | ||
DanielC | ok | ||
I think I finally understand. | |||
pmichaud | which by default means "not in the middle of a word" | ||
DanielC | I had been really confused about token vs rule, but I think I finally get it: In a rule a space means <.ws> | 20:49 | |
pmichaud | rule List { \(<Word>\) } matches "(Daniel)" but not "( Daniel )" or "(Daniel )" or "( Daniel)" | ||
rule List { \( <Word> \) } would match all three | |||
DanielC | Thanks. | ||
Thank you very much. This has been nagging me for ages. | 20:50 | ||
DanielC tries | |||
weird | 20:51 | ||
rule List { \( [ <Word> ]+ \) } <-- should work, right? | |||
token List { \( [ <.ws> <Word> <.ws> ]+ \) } <-- Even this fails, so I must be missing something more fundamental. | 20:53 | ||
It's the parens. | 20:54 | ||
Something is wrong with \( and \) | |||
StephenPollei | also if they old library has a bug like a security flaw is there anyway to fix it and have it automaticly be used | 20:55 | |
DanielC | Maybe ( are considered a "word" because they match \S | ||
20:56
icwiener joined
|
|||
DanielC | rakudo: if "(" ~~ / <-[(]> / { say "y" } else { say "n" } | 20:56 | |
p6eval | rakudo de1e9f: OUTPUT«n» | ||
DanielC | rakudo: if "(" ~~ / <\S -[()]> / { say "y" } else { say "n" } | 20:57 | |
p6eval | rakudo de1e9f: OUTPUT«Statement not terminated properly at line 2, near "\\S -[()]> "in Main (src/gen_setting.pm:0)» | ||
DanielC | hm | ||
DanielC is trying to make a regex that matches non-space characters except for ( and ) | 20:58 | ||
rakudo: if "(" ~~ / <-[()] -ws> / { say "y" } else { say "n" } | 21:00 | ||
p6eval | rakudo de1e9f: ( no output ) | ||
DanielC | rakudo: if "daniel" ~~ / <-[()] -ws> / { say "y" } else { say "n" } | ||
p6eval | rakudo de1e9f: OUTPUT«y» | ||
DanielC | rakudo: if "( )" ~~ / <-[()] -ws> / { say "y" } else { say "n" } | ||
p6eval | rakudo de1e9f: OUTPUT«n» | ||
DanielC | rakudo: if "()" ~~ / <-[()] -ws> / { say "y" } else { say "n" } | 21:01 | |
p6eval | rakudo de1e9f: OUTPUT«n» | 21:02 | |
DanielC | rakudo: if "(" ~~ / <-[()] -ws> / { say "y" } else { say "n" } | ||
p6eval | rakudo de1e9f: OUTPUT«n» | ||
DanielC | I wonder why it was "no output" before. | ||
japhb | rakudo: my @code = {"Hello, $^a"}, {"Goodbye, $^a"}; @code[0]("World").say | 21:03 | |
p6eval | rakudo de1e9f: OUTPUT«Hello, World» | ||
japhb | rakudo: my @code = {"Hello, $^a"}, {"Goodbye, $^a"}; @code>>.("World").say | ||
p6eval | rakudo de1e9f: OUTPUT«_block50_block61» | ||
japhb | How do I make that second one work? | ||
21:05
ruoso left
21:06
molaf left
21:12
payload left
|
|||
DanielC | rakudo: if "(name" ~~ /<-ws>/ { $/.perl.say } else { say "no match" } | 21:12 | |
p6eval | rakudo de1e9f: OUTPUT«Match.new( # WARNING: this is not working perl code # and for debugging purposes only ast => "a", Str => "a", from => 2, to => 3,)» | ||
DanielC | This can't be right. | 21:13 | |
It is matching the "a", not the "n" | |||
or the "(" actually | |||
<ws> means whitespace, so the first non-whitespace character is "(" | |||
no? | |||
rakudo: if "(name" ~~ /^ <-ws>/ { $/.perl.say } else { say "no match" } | 21:14 | ||
p6eval | rakudo de1e9f: OUTPUT«no match» | ||
DanielC | :-P | ||
StephenPollei | rakudo: if "(name" ~~ /^<-ws>/ { $/.perl.say } else { say "no match" } | ||
p6eval | rakudo de1e9f: OUTPUT«no match» | ||
StephenPollei | rakudo: if "(name" ~~ /^<[\(a..z]>/ { $/.perl.say } else { say "no match" } | 21:15 | |
p6eval | rakudo de1e9f: OUTPUT«Match.new( # WARNING: this is not working perl code # and for debugging purposes only ast => "(", Str => "(", from => 0, to => 1,)» | ||
pmichaud | I'm not sure what you would expect <-ws> to match. | 21:16 | |
DanielC | Same as \S | ||
pmichaud | but <ws> isn't the same as \s | 21:17 | |
DanielC | Ultimately I want to match characters that are not parens or spaces. | ||
<-[()] -???> | |||
I nee to figure out what to put in ??? | 21:18 | ||
StephenPollei | rakudo: if "(name" ~~ /^<a..z]>/ { $/.perl.say } else { say "no match" } | ||
pmichaud | rakudo: say "( name" ~~ /<-[()] -space>/ | ||
DanielC | ah, thanks. | ||
p6eval | rakudo de1e9f: OUTPUT«Statement not terminated properly at line 2, near "a..z]>/ { "in Main (src/gen_setting.pm:0)» | ||
rakudo de1e9f: OUTPUT«n» | |||
pmichaud | I think <space> might be deprecated, though. | ||
DanielC | :( | 21:19 | |
What's the replacement? | |||
pmichaud | no, it's not deprecated. | ||
DanielC | I hope it doesn't go away because it works | ||
pmichaud | <space> is the same as \s | ||
DanielC | ah! | ||
good | |||
Ah... wonderful. I'm finally making progress with my grammar. | 21:20 | ||
DanielC is making a LISP grammar. | |||
StephenPollei | rakudo: if "(name" ~~ /^[<a..z]>/ { $/.perl.say } else { say "no match" } | ||
p6eval | rakudo de1e9f: OUTPUT«Syntax error at line 2, near "]>/ { $/.p"in Main (src/gen_setting.pm:0)» | ||
pmichaud | transpose [ and < | 21:21 | |
StephenPollei | rakudo: if "(name" ~~ /^<[<a..z]>/ { $/.perl.say } else { say "no match" } | ||
p6eval | rakudo de1e9f: OUTPUT«no match» | ||
StephenPollei | rakudo: if "(name" ~~ /<[<a..z]>/ { $/.perl.say } else { say "no match" } | ||
p6eval | rakudo de1e9f: OUTPUT«Match.new( # WARNING: this is not working perl code # and for debugging purposes only ast => "n", Str => "n", from => 1, to => 2,)» | ||
DanielC | Yay! \o/ I have a LISP grammar. | 21:23 | |
StephenPollei | www.dwheeler.com/readable/ | ||
DanielC | *click* | 21:24 | |
21:25
rosch joined
|
|||
DanielC | Honestly, I don't care. Lisp is readable enough for what I need, and much easier to parse. | 21:25 | |
StephenPollei | sure it's just something that some like, I didn't know if you wanted something more to test your perl6 grammar stuff on | 21:26 | |
DanielC | ah, thanks | ||
21:27
rosch left
|
|||
DanielC | Is it a rule that a lisp expression has to start with a token? Is this valid?: ((foo bar)) ? | 21:29 | |
The outer list does not start with a token. It just contains a list. | 21:30 | ||
justatheory | StephenPollei: Us David Wheelers are insane. Pay no mind! | 21:37 | |
See also xkcd.com/224/ | 21:38 | ||
21:51
Whiteknight joined
|
|||
StephenPollei | justatheory, you are a wheeler as well? I don't know many here well | 21:52 | |
justatheory | I'm a *David* Wheeler, in fact. :-) | ||
Just not the dwheeler.com David Wheeler. | |||
StephenPollei | paulgraham.com/avg.html read this about lisp just the other day.. but don't want to get into language flame wars | 21:54 | |
justatheory | What else is there to do on the Internet? | ||
21:56
rewt left
|
|||
StephenPollei | tons of stuff but to enumerate would surely be OT besides if I get some other stuff done I might write a few more things for t/spec | 21:57 | |
justatheory | :-) | ||
22:01
rewt joined
22:04
pmurias left
22:25
nihiliad left
22:29
alester left
22:35
hanekomu left,
clintongormley left
22:36
sri_kraih_ left,
sri_kraih joined
22:56
rindolf left
23:01
Sunbeam joined
23:13
Roxas left
23:15
M_o_C joined
23:19
amoc^sleep is now known as amoc
23:20
donaldh left,
donaldh joined
23:22
sri_kraih left
|
|||
sjohnson | can anyone explain to me in plain english, how the &function(); syntax differs from function; ? | 23:23 | |
i have looked everywhere, read the camel book 5 times, and still cannot understand this in simple terms that my peanut brain can understand | |||
DanielC | It doesn't. | 23:25 | |
AFAIK | |||
rakudo: sub foo { say "hi" }; &foo(); foo(); | 23:26 | ||
p6eval | rakudo de1e9f: OUTPUT«hihi» | ||
sjohnson | i use it cause it looks nicer in my VIM perl syntax colouring | ||
rakudo: sub foo { say "hi" }; &foo(); foo; | |||
p6eval | rakudo de1e9f: OUTPUT«hihi» | ||
japhb | sjohnson: Are you talking about the Perl 5 difference? | ||
sjohnson | yes | ||
DanielC | rakudo: sub foo { say "hi" }; &foo(); foo(); foo | ||
p6eval | rakudo de1e9f: OUTPUT«hihihi» | ||
sjohnson | i am wondering if i keep programming like the above rakudo example... if it will bite me in the ass | 23:27 | |
if i'm doing something really complicated | |||
japhb | Ah. &foo carries caller's @_ along, as I recall. Been a while. | ||
23:27
frew left
|
|||
sjohnson | will the real TimToady please stand up? :) | 23:27 | |
japhb | And goto &foo is a tail call of sorts. | ||
sjohnson | japhb: thanks.. i will have to "read up" | ||
DanielC | rakudo: sub foo { say "hi" }; &foo(); foo(); &foo; foo; | 23:28 | |
p6eval | rakudo de1e9f: OUTPUT«hihihi» | ||
DanielC | hm | ||
rakudo: sub foo { say "hi" }; &foo; | 23:29 | ||
p6eval | rakudo de1e9f: ( no output ) | ||
DanielC | I wonder if that's correct. | ||
japhb | DanielC: remember, in Perl 6, &foo by itself just returns the coderef | ||
sjohnson | well, i know Mr. Wall said that perl 6 is different | ||
DanielC | japhb: So () means "run me" ? | ||
japhb | Code or Routine or whatever the heck the base type is now. | ||
sjohnson | i shuold be asking on a perl5 chan, but you guys are just so goshdarn helpful, too | 23:30 | |
japhb | DanielC: yup. | ||
"invoke" | |||
sjohnson: we try. | |||
DanielC | japhb: But plain foo works... | ||
Then again, foo is the real function and not a reference, based on what you said. | 23:31 | ||
japhb | &foo is (in my mind) special cased. STD may say that the other forms are the real special cases. But that's the one I think of as different. | ||
DanielC | But I didn't think that &foo was a reference. I thought it was the real thing. | ||
japhb | DanielC: it *is* the real thing. | ||
23:31
LCamel joined,
icwiener left
|
|||
japhb | But by including the sigil, you're telling it you want the Code object back, not to *call* the Code. | 23:31 | |
DanielC | yeah but &foo() | 23:32 | |
A slight ambiguity there, by your description. | |||
japhb | &foo is the real code. &foo() says "call the real code", which is the same as "foo()". "&foo" is simply the name of the real code, and doesn't say to do anything with it. | 23:33 | |
rakudo: foo { say "Hello" }; bar($code) { $code() }; bar(&foo); | |||
p6eval | rakudo de1e9f: OUTPUT«Statement not terminated properly at line 2, near "{ $code() "in Main (src/gen_setting.pm:0)» | 23:34 | |
japhb | rakudo: foo { say "Hello"; }; bar ($code) { $code(); }; bar(&foo); | ||
DanielC | I still think that there is some inconsistency. Either "&foo" should run or "foo" should not (pick one). | ||
p6eval | rakudo de1e9f: OUTPUT«Statement not terminated properly at line 2, near "{ $code();"in Main (src/gen_setting.pm:0)» | ||
japhb | oh heh. | ||
rakudo: sub foo { say "Hello"; }; sub bar ($code) { $code(); }; bar(&foo); | |||
p6eval | rakudo de1e9f: OUTPUT«Hello» | ||
japhb | there | ||
DanielC | rakudo: sub foo { say "Hello"; }; sub bar (&code) { code(); }; bar(&foo) | ||
p6eval | rakudo de1e9f: OUTPUT«Hello» | 23:35 | |
japhb | DanielC: "foo" is using it as a listop or so. | ||
DanielC | even better :-) | ||
rakudo: sub foo { say "Hello"; }; sub bar (code) { code(); }; bar(&foo) | |||
p6eval | rakudo de1e9f: OUTPUT«Malformed routine definition at line 2, near "bar (code)"in Main (src/gen_setting.pm:0)» | ||
DanielC | I guess that was too much to hope for. | ||
japhb | DanielC: I was simply pointing out that the change of sigil from call point to signature didn't matter. Only the fact that at the call you asked to hand it the real object | ||
DanielC | ok | 23:36 | |
japhb | Although, technically my example was ambiguous | ||
rakudo: sub foo { "Hello"; }; sub bar ($code) { say $code(); }; bar(&foo); | |||
p6eval | rakudo de1e9f: OUTPUT«Hello» | ||
japhb | dammit. | 23:37 | |
DanielC | I just think that if "&foo()" and "foo()" do the same thing then "&foo" and "foo" should do the same thing too (whatever that might be). | ||
japhb | oh | ||
DanielC | You see what I mean? | ||
japhb | rakudo: sub foo($who) { "Hello, $who"; }; sub bar ($code) { say $code("World"); }; bar(&foo); | ||
p6eval | rakudo de1e9f: OUTPUT«Hello, World» | ||
japhb | There! | ||
That disambiguates the call order. | 23:38 | ||
23:38
LCamel left
|
|||
japhb | I understand what you mean. I happen to disagree -- I think that's mistaken orthogonality. Perl dimensions often go off at odd angles. :-) | 23:39 | |
DanielC | :-) | ||
I think orthogonality is a good property. It makes the language more predictable. | 23:40 | ||
One of the things I love about Perl 6 is its increased orthogonality and predictability. There are a lot fewer special cases. | |||
japhb | Fair enough. | 23:41 | |
I've just accepted this particular waterbed lump, I guess. :-) | |||
DanielC | Yeah. This is the sort of thing one just has to accept. | 23:42 | |
23:45
justatheory left
|
|||
pugs_svn | r27073 | lwall++ | [Containers] define .rotate more like a PDL slice, rely on other ops for exact semantics | 23:47 | |
TimToady | verb phrases work differently from noun phrases in most languages | 23:52 | |
leaving off the noun marker puts you into verb-phrase land | 23:53 | ||
and makes listops possible | |||
otherwise you can't know whether to expect a term or an operator after "foo" | |||
and that's fundamental to everything Perl does | 23:54 | ||
japhb | Man, I really need to start remembering to explain things linguistically .... | ||
TimToady | Perl knows that &foo has no arguments, and that foo might | ||
(syntactic arguments) | 23:55 | ||
the &foo object responds to .() of course | |||
23:56
Muixirt left
|
|||
japhb | Which brings me back to my question from earlier: | 23:56 | |
rakudo: my @code = {"Hello, $^a"}, {"Goodbye, $^a"}; @code[0]("World").say | |||
p6eval | rakudo de1e9f: OUTPUT«Hello, World» | ||
japhb | rakudo: my @code = {"Hello, $^a"}, {"Goodbye, $^a"}; @code>>.("World").say | ||
p6eval | rakudo de1e9f: OUTPUT«_block50_block61» | ||
viklund | if foo is a multi, then I should be able to get a Perl6MultiSub object with &foo, right? | ||
japhb | What am I saying wrong in the second example above? | 23:57 | |
TimToady | that's the intent, but rakudo doesn't implement it yet | ||
viklund | Is there (or will there be) anyway of declaring an anonymous multi? | ||
TimToady | &foo is the abstraction for "what would happen if I called foo() right here" | ||
viklund | yes, I know I won't get it in rakudo yes... | ||
*yet | |||
TimToady | japhb: nothing, looks like a bug to me | 23:58 | |
japhb | AH! OK. I was going insane trying to wave chickens over that gumbo. | 23:59 | |
TimToady | oh, wait | ||
you need >>.say to | |||
*too | |||
rakudo: my @code = {"Hello, $^a"}, {"Goodbye, $^a"}; @code>>.("World")>>.say | |||
p6eval | rakudo de1e9f: OUTPUT«_block50_block61» | ||
TimToady | but still buggy | ||
japhb | TimToady: only if I want them on separate lines. | ||
TimToady | right | ||
japhb | but yes, that was a thinko. | ||
TimToady | should work without |