pugscode.org/ | nopaste: sial.org/pbot/perl6 | pugs: [~] <m oo se> (or rakudo:, kp6:, smop: etc.) || We do Haskell, too | > reverse . show $ foldl1 (*) [1..4] | irclog: irc.pugscode.org/ Set by TimToady on 25 January 2008. |
|||
00:18
wknight8111 left,
wknight8111 joined
00:23
icwiener left
00:31
jferrero left
00:38
elmex left
00:42
araujo left
00:44
|jedai| is now known as Jedai
00:57
d4l3k_ joined,
dalek left,
d4l3k_ is now known as dalek
01:33
Limbic_Region left
01:41
meppl left
01:43
meppl joined
|
|||
meppl | good night | 01:45 | |
01:52
meppl left
01:55
kanru joined
02:17
nipotan is now known as nipotaway
02:22
scrottie joined
02:24
alester joined
03:02
araujo joined
03:24
agentzh joined
03:42
pbuetow_ joined
03:53
pbuetow left
04:39
Jedai left
04:58
alester left
05:22
Psyche^ joined
05:25
justatheory left
05:38
Patterner left,
Psyche^ is now known as Patterner
06:15
vadim joined
06:28
lambdabot joined
06:32
ashizawa joined
07:03
bacek left
07:18
bacek joined,
masak joined
07:22
barney joined
07:29
xinming_ joined
07:33
bacek left
07:41
dblick joined
|
|||
dblick | Hi guys. Is there a one liner, somewhat like, `perl -MExtUtils::Embed -e ccopts`, that I can use to get the directory I should install a shared object extension library into? | 07:41 | |
07:46
rindolf joined
07:54
penk joined
08:02
iblechbot joined
08:04
pmurias joined
08:07
tuxdna joined
|
|||
pmurias | ingy: searching the log I accidently found out that you inquired about pixie | 08:21 | |
08:33
bacek joined
08:47
bacek left
08:50
bacek joined
08:56
jferrero joined
08:57
tuxdna left,
tuxdna joined
08:59
bacek left,
elmex joined,
tuxdna left
|
|||
moritz_ | rakudo: sub f(::T $x) { my T $y = 2 * $x; return $y }; say f(2) | 09:07 | |
p6eval | rakudo 29471: OUTPUT[Type check failedcurrent instr.: 'f' pc 224 (EVAL_15:85)] | ||
moritz_ | rakudo: sub f(::T $x) { my T $y = 2 * $x; say $y.WHAT; return $y }; say f(2) | 09:08 | |
p6eval | rakudo 29471: OUTPUT[Type check failedcurrent instr.: 'f' pc 252 (EVAL_15:91)] | ||
moritz_ | meh | ||
pmurias | moritz_: i endend implemention you q:identifier[...] suggestion | 09:12 | |
09:12
Southen_ joined
|
|||
moritz_ | now perhaps we'll find out if it was a good idea ;-) | 09:17 | |
09:17
tuxdna joined
09:18
tuxdna left,
tuxdna joined
09:19
rindolf left
|
|||
pmurias has doubt about smop using a refcounting scheme instead of a gc | 09:29 | ||
s/doubt/doubts/ | |||
moritz_ | I'm sure ruoso would welcome a GC, but isn't motivated to write one himself ;-) | 09:36 | |
I don't know how closely you follow parrot development, but the GC is causing troubles over and over again | 09:37 | ||
it's just not a trivial piece of software | |||
pmurias | reference counting is causing trouble even as we speak | 09:40 | |
tuxdna | Hi | 09:44 | |
moritz_ | hi | ||
tuxdna | What is parrot/runtime/parrot/library/STM.pir meant for? | ||
moritz_ | from the name I'd guess for software transactional memory | 09:45 | |
but I guess the folks in #parrot on irc.perl.org know bettter ;-) | |||
09:46
bacek joined
|
|||
pmurias | moritz_: you are right | 09:46 | |
tuxdna | moritz_: on #parrot there is only me now :-) | 09:47 | |
pmurias | irc.perl.org | ||
moritz_ | tuxdna: on irc.perl.org? | ||
tuxdna | oh i see | 09:48 | |
thanks | |||
pmurias | moritz_: i hope most development on smop will move to perl6 soon, so memory managment will become less of an issue | ||
moritz_ | pmurias: I hope that too. I can try to help with stuff that's written in p6 ;-) | 09:49 | |
09:50
tuxdna left
|
|||
pmurias | don't like c much? | 09:52 | |
moritz_ | I avoid it wherever possible | 09:53 | |
09:53
tuxdna joined
|
|||
moritz_ | it feels so web 1.0 to manage your memory manually, and write beyond array boundaries | 09:53 | |
pmurias | c support gc with the bohem garbadge collectors | 09:54 | |
* garbage | 09:55 | ||
pugs_svn | r21335 | pmurias++ | [smop] | ||
r21335 | pmurias++ | added q:identifier[...] to sm0p | |||
r21335 | pmurias++ | arbitary method names are supported in method calls in s1p | |||
r21335 | pmurias++ | 15_hash moved to perl6 | |||
moritz_ | and the guy is called "boehm" | ||
;-) | |||
pmurias | i think i'll have to revive pixie soon to get decent AST | 09:58 | |
raukdo uses PAST? | 10:00 | ||
moritz_ | yes | 10:02 | |
plus a bit of inline PIR, iirc | |||
../../parrot perl6.pbc --target=parse $file for a parse tree | 10:03 | ||
pmurias | PAST is too parrot specific iirc, and influenced heavily by pir | ||
moritz_ | and ../../parrot perl6.pbc --target=PAST $file for PAST | 10:04 | |
pmurias | s/influcened/poisoned/ | ||
moritz_ | pmurias: PAST is on the "create a lexical var, call a method, create a block" level | ||
pmurias | running all parrot languages has it's appeal | 10:08 | |
ls | 10:09 | ||
moritz_ | no such file or directory | 10:10 | |
pmurias | re parse tree i can get a very good one from STD | 10:13 | |
moritz_ | probably better than rakudo's | 10:15 | |
pmurias | in a greatly better format for sure | 10:18 | |
moritz_: re try to to help, would you be will to help with filling in the {*} blocks in STD to creat elf AST? | 10:29 | ||
moritz_ | pmurias: yes | 10:30 | |
10:30
iblechbot left,
tuxdna left
10:31
tuxdna joined
|
|||
pmurias | just so nobody is alarmed, no STD's are harmed in the process as the actions are extracted to a seperate file after editing (mechanicly) | 10:32 | |
moritz_ | pmurias: maybe write a short HOWTO that describes which tools to run, how the AST should look like and how to test it? | 10:33 | |
pmurias | moritz_: i'll fix the toolchain today/tomorrow, so perl6 is used instead of perl5 in the blocks | ||
10:33
bacek left
|
|||
pmurias | moritz_: ok | 10:33 | |
cycling& | |||
10:33
pmurias left
|
|||
moritz_ | pmurias: ok, no hurry, plenty of other stuff to do for me - just tell me when you're done, and I'll give it a shot | 10:33 | |
11:03
iblechbot joined
11:04
ruoso joined
11:35
kattana_ joined
11:39
chris2 joined
11:50
alanhaggai joined
12:02
meppl joined
12:06
kattana_ left
|
|||
planofish | anyone knows about characters and symbols well | 12:21 | |
ಮಾದೇಶxE0xB3?ವರರಗೆ ಶರಣxE0xB3? ಮಾದೇಶxE0xB3?ವರಾ what is that? | |||
it'; supposed to be lil rectangles | |||
moritz_ doesn't see the connection to Perl 6 | 12:22 | ||
planofish | isnt | ||
moritz_ | then I don't see the connection to #perl6 either | 12:23 | |
planofish | sheesh | 12:24 | |
i just told you it isn't | |||
god you can nag | |||
masak | planofish: hello. be nice to people. | ||
moritz_ | planofish: more polite that straight out telling you that you're off topic, and thus in the wrong place | ||
s/that/than/ | 12:25 | ||
12:25
mj41_ left
12:31
mj41 joined
12:37
iblechbot left
12:56
vadim left,
cggoebel joined
13:06
ggoebel left
13:09
Chillance joined
|
|||
rakudo_svn | r29481 | moritz++ | [rakudo] add Complex log() and re-arranged any-num.pir, bacek++ | 13:17 | |
r29481 | moritz++ | Patch Curtesy of Vasily Chekalkin <back at bacek.com> | |||
pugs_svn | r21336 | moritz++ | [spec] partially unfudged S29-num/log.t. Still some failures with complex log, | 13:18 | |
r21336 | moritz++ | have to investigate more | |||
pmichaud | PAST is not intended to be parrot specific. yes, there are some Parrot items that leak through, but we're slowly removing those as we evolve the AST | 13:20 | |
13:22
alanhaggai left
|
|||
pugs_svn | r21337 | moritz++ | [spec] fixed some Complex.log tests, and unfudged a bit. | 13:27 | |
r21337 | moritz++ | Rakudo fails one test because the result is on a different complex plain that | |||
r21337 | moritz++ | what is expected | |||
13:28
cmarcelo joined
13:29
pbuetow_ left
13:32
pmurias joined
13:35
ashizawa left
13:46
icwiener joined
|
|||
pmurias | pmichaud: do you have PAST::Op.pasttype instead of having subclasses? | 13:52 | |
pmichaud | pmurias: yes. It's easier to change an attribute than to rebless into a different class. | 13:53 | |
pmurias | forgot a why :( | ||
pmichaud: why would you want to do it? | 13:54 | ||
masak | how would I do if I wanted the proceed-to-next-element effect of a `next`, but not the leave-this-block effect? | 13:55 | |
moritz_ | masak: example? | 13:56 | |
ah I think I know what you mean... dunno if there's an easy syntax for that | |||
pmichaud | change an attribute? It makes it easy to parse certain operators to always become PAST::Op nodes, and then change the pasttype | ||
for example, infix:<&&> is implemented as PAST::Op with a pasttype of 'if' | |||
masak | moritz_: let's say I'm parsing a parameter list, and find a flag which takes one argument | ||
moritz_: is there a painstakingly difficult syntax, then? | 13:57 | ||
pmurias | pmichaud: i see | ||
moritz_ | masak: iterated over the indexes, and ++ it? | ||
masak | :/ | 13:58 | |
well, I suppose... | |||
13:58
jferrero left
|
|||
masak | it just seems so primitive to count indices... | 13:58 | |
moritz_ | hehe ;-) | ||
masak | no, really. there are many ways to fail. | ||
moritz_ | well, after ++ing the index you also have to check if you exhausted the list | ||
masak | exactly. | 13:59 | |
moritz_ | the canonical answer the questions like this is "refactor your code, and make it so simple that you don't need $Feature" ;-) | ||
masak | in the parameter list case, I think I'd want to raise an error if I exhausted the list | 14:00 | |
pmurias | masak: you want to do it in a for? | ||
14:00
Alias_ left
|
|||
masak | moritz_: in this case, I'm just imagining use cases, not needing them | 14:00 | |
14:00
Alias__ joined
|
|||
masak | pmurias: yes. | 14:00 | |
or a while, I suppose | |||
14:01
jhorwitz joined
|
|||
pmurias | you have to do error checking in your case | 14:01 | |
pmichaud | parsing argument lists sounds like something where a while makes a bit more sense than a for | 14:02 | |
pmurias | elf does it like while (@params.elems) { my $flag = @params.shift;if $flag eq '-e' {@params.shift // die } else {...} } | 14:03 | |
masak | yes, that's a nice extant way to do it | 14:04 | |
pmichaud | why not just while (@params) { ... } ? | ||
pmurias | elf bugs ;) | ||
pmichaud | yes, I can understand that. :-) | ||
(we find ourselves doing similar things in rakudo :-) | |||
pmurias | it's while ($args.elems) {...} actually | 14:05 | |
masak | there could profitably be a wiki page about that, I guess: "current workarounds in rakudo" | ||
pmurias | pmichaud: do you think it would make sense to use PAST for elf? | 14:06 | |
rakudo_svn | r29482 | pmichaud++ | [rakudo]: spectest-progress.csv update, 95 files, 1695 passing tests | ||
[particle] would like to see ast convergence very much | |||
14:06
Alias_ joined,
Alias__ left
|
|||
pmichaud | pmurias: I don't know. I'd be very happy if we can converge to something like PAST (saves me reimplementation), but I don't have a lot of experience with ASTs | 14:07 | |
so I can't say how well it'd work for other environments. I have tried to keep it as non-Parrot as much as possible | |||
but yes, there are parrotisms that leak through until we get a bit more infrastructure in place | |||
pmurias | pmichaud: is there an easy way to load/dump PAST from/into parrot | 14:11 | |
pmichaud | pmurias: not yet. | ||
pmurias | that closes the issuse for now ;) | 14:12 | |
the gen_ files in perl6/src are autogenerated? | 14:15 | ||
moritz_ | pmurias: yes | 14:17 | |
pmurias | from? | ||
moritz_ | all the others ;-) | 14:18 | |
for example src/gen_builtins.pir is generated from src/{classes,builtins}/*.pir iirc | |||
pmurias | why don't the have a warnings? | ||
* warning | 14:19 | ||
moritz_ | dunno | ||
pmurias | @seen diakopter | 14:24 | |
lambdabot | I haven't seen diakopter. | ||
pmichaud | ....warning? | ||
pmurias | # this file is autogenerated | ||
pmichaud | oh. I suppose I could get PAST and others to add that to the output. | 14:25 | |
I've been thinking that they belong in a separate gen/ subdirectory, but that got frowned upon by others | |||
pmurias | why? | 14:26 | |
pmichaud | I don't know. I think they were hoping that the gen_* files would always be produced by a Makefile rule | ||
(an implicit rule) | 14:27 | ||
pmurias | if you use gnu make extensions the implicit rule could still do it | 14:28 | |
pmichaud | well, we can't rely on gnu make | ||
anyway, adding a note about being a generated file is a good idea, so I'll do that. | 14:29 | ||
14:33
cognominal_ joined
14:34
iblechbot joined,
icwiener left,
icwiener joined,
icwiener left,
icwiener joined
14:43
tuxdna left
|
|||
masak | pmichaud: re your mail "S04-related closure question", I can see no other (sensible) alternative than "a: 1\nb: 1\nc: 1\n" and "1\n2\n3\n". if, however, $a() were to be called before the 'my $x = 1;' line was run, I'm not sure what would happen. | 14:50 | |
pmichaud | masak: so, you're saying that in the first example that $x is the same in all cases? | 14:55 | |
masak | yes. | ||
pmichaud | then why not in the second case? | ||
masak | because $x always has the value 1 when the closures are called. | 14:56 | |
pmichaud | note that the first case doesn't really change if we do for 1..1 -> $x { ... } instead of { my $x = 1; ... } | 14:57 | |
or I could even do if 1 -> $x { ... } instead of { my $x = 1; ... } | |||
masak | sure. | 14:58 | |
I still don't really see the difficulty. | |||
maybe I misunderstood something | |||
pmichaud | in both cases, $x is local to the block | ||
14:58
icwiener_ joined
|
|||
masak | yes. | 14:58 | |
pmichaud | (in both cases in the original message, $x is local to the block) | ||
masak | right | ||
pmichaud | the get_x() sub is the same in both cases | 14:59 | |
masak | but in your second code snippet, $x changes. | ||
pmichaud | it's always a different $x | ||
masak | huh? | ||
pmichaud | -> $x { ... } means that $x is local to the block | 15:00 | |
masak | yes, sure | ||
but the block in the first example is only run once, right? | |||
pmichaud | in for 1..1 -> $x { ... } the block is only run once | ||
masak | $x in the block in the first example only exists in one copy, and is only assigned once | ||
pmichaud | just a sec, I'll give a slightly different example | 15:01 | |
masak | it is not garbage collected, because $b (declared outside) refers to foo which refers to get_x which refers to $x | ||
pmichaud | nopaste? | ||
what's the common nopaste for this chan? | 15:02 | ||
Tene | sial.org/pbot/perl6 | ||
lambdabot | Title: sial.org Pastebot - pasteling | ||
moritz_ | see /topic ;-) | ||
pmichaud | I never see the topic | ||
pasteling | "pmichaud" at 76.183.97.54 pasted "another example" (15 lines, 276B) at sial.org/pbot/31589 | 15:04 | |
masak | yes, _that_ looks problematic :) | ||
how can we even declare a function inside the body of a for loop? | 15:05 | ||
that can't be sane... :) | |||
moritz_ | unless it's a 'my sub' | ||
pmichaud | okay, how about this one? | ||
masak | seems to me there must be either exactly one foo(), in which case it's anyone's guess what it'll return, or exactly three foo(), returning 1, 2 and 3 respectively | 15:06 | |
moritz_ | I thought a bit more about this, and IMHO the only solution that will DTRT is to forbid named closures :/ | ||
15:07
cmarcelo left
|
|||
pasteling | "pmichaud" at 76.183.97.54 pasted "another example" (18 lines, 330B) at sial.org/pbot/31590 | 15:07 | |
pmichaud | there, I got rid of the loop. | ||
masak | pmichaud: so let me get this straight. foo() is defined inside bar($x), but you can still call it from the outside? | 15:08 | |
moritz_ | can't we just say that 'sub foo ...' is the same as '&foo = sub {...}', and then define default scoping rules for &foo? | ||
pmichaud | that would be &foo := sub { ... } | 15:09 | |
Tene | Yeah, why is "sub foo() {...}" available in the outer scope? | ||
pmichaud | sub foo() { ... } is equivalent to "our sub foo() { ... }" | ||
Tene | Hmm. | ||
masak | I gotta go. backlog later. this seems a very vital discussion. | 15:10 | |
15:10
donaldh joined
15:11
icwiener left
|
|||
pmichaud | masak: (for backlog) if we claim that { sub foo() { ... } } defines a foo that is callable from the outside, then the same should hold true for sub bar($x) { sub foo() { ... } } | 15:11 | |
there's no real difference between them. | |||
15:13
cmarcelo joined
15:21
gugod left
15:22
pbuetow_ joined
15:23
smg left,
smg joined
15:30
penk left
15:31
alanhaggai joined
|
|||
Lorn | cmarcelo: hey | 15:34 | |
cmarcelo | Lorn: hello | ||
Lorn | cmarcelo: are you working with pugs/haskell yet? | 15:35 | |
15:36
hercynium joined
|
|||
pugs_svn | r21338 | pmurias++ | STD5_dump_match uses --vertical as default, accepts --horizontal | 15:37 | |
r21338 | pmurias++ | added a hack to DumpMatch to survive self referencial matches | |||
pmurias | Lorn: pugs isn't actively developed now | ||
cmarcelo | not much right now... I was planning to update our svn repo to reflect the package split audreyt did to push packages to Hackage (haskell's cpan).. but didn't have time yet... :-( | ||
15:38
cognominal_ left
|
|||
cmarcelo | Lorn: ^ | 15:38 | |
Lorn | audreyt is missing yet? :P | ||
masak | pmichaud: what about 'if $not_likely { sub foo() { ... } }'? | ||
moritz_ | s/missing/not very active/ | 15:39 | |
cmarcelo | Lorn: hackage.haskell.org/packages/archiv...l#cat:Pugs | 15:41 | |
lambdabot | Title: HackageDB: packages by category, tinyurl.com/yqov7f | ||
pmurias | s/yet/still/ | ||
TimToady: nextsame is used only by ws? | 15:43 | ||
15:43
cognominal_ joined
15:44
Exodist joined
|
|||
pmichaud | masak: (if $notlikely) still no different | 15:45 | |
as I understand it, sub foo() exists regardless of the status of $not_likely | |||
because the binding is made at compile time | 15:46 | ||
masak | ok | 15:49 | |
15:50
Jamtech joined
|
|||
masak | but if the binding is made at compile time, how can 'for 1..3 -> $x { sub get_x() { return $x; } }' refer to the three different values of $x? is that the kernel of the problem? | 15:50 | |
pmichaud | perhaps | 15:52 | |
moritz_ | masak: binding to a sub name doesn't have to happen at the same time as binding to the lexical pad | ||
pmichaud | that's what my question to p6l was essentially about | ||
note that this doesn't only occur in loops -- it also happens with recursion | |||
so if sub bar($x) { sub get_x() { return $x; } } works, then the for loop can use the same principle. | 15:53 | ||
15:53
planofish left
|
|||
masak | this is all very interesting, but very subtle... at least to me, since I haven't really thought about it much | 15:54 | |
pmichaud | right. Unfortunately I need a few more clues so that we can get Parrot's lexical model working right. | 15:57 | |
where "right" means "supporting Perl 6 semantics" | |||
gotta run errands -- bbiaw | |||
masak | seems what we want to do is identify the use cases | 15:59 | |
and then deduce the semantics from there :) | |||
15:59
cggoebel left
|
|||
moritz_ | a current use case is to avoid circular references in closures in p5 | 15:59 | |
but our cool garbage collection should eliminate that | 16:00 | ||
16:01
ggoebel joined
|
|||
masak | moritz_: you mentioned that IYHO named closures had to go. what did you mean? | 16:02 | |
moritz_ | masak: defining a named sub (and thus one that is globally visible) that depends on the lexical pad should be forbidden, because there are no obivous right semantics (like the many examples we dicussed here) | 16:03 | |
masak | right. | 16:04 | |
and a 'lexical pad' is... the environment inside a sub? | |||
moritz_ | inside any block | 16:06 | |
masak | ok | 16:07 | |
moritz_ | other options include (1) making the sub local by default (like 'my sub foo') | ||
(2) making the name only available after the definition was first executed at runtime | |||
and (3) code in C instead ;-) | 16:08 | ||
masak | :) | ||
moritz_ | $ perl -wcle 'sub foo { my $x = shift; sub bar { $x }}' | ||
Variable "$x" will not stay shared at -e line 1. | |||
masak | so, to repeat, according to you a closure should not all of (1) have a name, (2) be global, (3) use the lexical pad | ||
moritz_ | a closure *has* to use the lexical pad to be a closure | 16:09 | |
masak | ah, so Perl 5 is already aware of these problems | ||
ah, ok | |||
moritz_ | it's aware, yes | ||
but I don't know if the "solution" is p6-compatible | |||
masak | so it's really the conflict between a closure having a name and being globally visible | ||
no, that can't be it | 16:10 | ||
TimToady | the basic problem is that you're storing the ref to the closure in a place that is "too global" | ||
masak | _because_ a named closure is globally visible, the resulting access to its lexical pad creates strange problems | ||
moritz_ | actually having a name makes it globally visible *at compile time* | 16:11 | |
masak | ah, yes. | ||
TimToady | we could fix *some* of the problems by reinstalling the global ref whenever the def is "executed" | ||
masak | does that make a difference? we won't bu calling it till runtime anyway | ||
^ to moritz_ | 16:12 | ||
moritz_ | TimToady: what does that mean in the if 0 -> { my $x = 3; sub foo { return $x }}; case? | ||
16:12
armagad joined
|
|||
TimToady | but it might well be the sort of thing where a well-placed prohibition prevents certain types of accidental spaghetti | 16:13 | |
moritz_ | masak: it makes a difference, becase it can be called at run time before its lexical pad is initialized with values | ||
masak | moritz_: exactly. | ||
like $a() | |||
TimToady: what does your reinstalling solution do for $a()? | 16:14 | ||
moritz_ | TimToady: so outright forbid calling foo() in my example unless the surrounding scope has been executed at least once? | ||
TimToady | it's a double bind, first ::= then each subsequent time with := | ||
masak | a double bind :) that's how I feel about this topic | 16:15 | |
TimToady | it's hard to know what the user expects or should expect here | ||
I do know that it hurts my brane, so it must hurt other people's branes too... | |||
moritz_ | TimToady: it certainly hurts mine and pmichaud's ;-) | ||
TimToady | the thing about an anon sub is that it is executed right there, and we know when the clone is supposed to happen | 16:16 | |
I think users will expect the same clone for a named sub, but will also expect the preclone done by the compiler to work | 16:17 | ||
hence both ::= and := | |||
16:17
rlb3 joined
|
|||
TimToady | actually, the ::= clone is likely to be the proto-clone generated by the compiler | 16:18 | |
since it has to do lexical lookups at compile time to figger out what's what anyway | |||
so maybe there's no explicit ::= and we only need to add in the := semantics when the execution point passes the definition | 16:19 | ||
(btw, I think the verbiage about "when taking a reference" is probably bogus) | |||
trying to clone the closure at the point of the ref is madness, probably | 16:20 | ||
and not what users will expect in any case | |||
moritz_ | what do users inspect in such mad cases? | 16:22 | |
16:23
chris2 left
|
|||
TimToady | they expect the computer to guess right :) | 16:23 | |
moritz_ | ;-) | ||
so we should make it a stochastical process | |||
TimToady | generally speaking, computers should be forbidden from guessing unless told to do so explicitly. maybe that's the 4th law of robotics... | 16:24 | |
masak | moritz_: I know you're kidding, but I just have to point out that even the deterministic version of this problem hurts my brain | 16:25 | |
moritz_ | masak: we have to accept that somtimes only a non-deterministic solution exists (at least in quantum mechanics ;-) | 16:26 | |
masak | moritz_: sure. or at least, the projected data available to us empirically looks non-deterministic | 16:27 | |
which is the same thing in a materialistic world view. | |||
gotta go again | |||
TimToady | it seems to me that when audreyt was grilling me about pugs semantics, we ended up moving all the := clonings up to the front of the lexical scope in question so that forward refs would work right | ||
masak | good luck with the closure semantics! | ||
16:28
masak left
|
|||
moritz_ | welcome to #perl-philosphy | 16:28 | |
16:32
ingy left
16:34
alanhaggai_ joined
|
|||
moritz_ | should we allow interpolation of junctions into regexes? | 16:34 | |
I mean junction semantics could be mapped fairly well to regexes | 16:35 | ||
16:36
ggoebel left
|
|||
TimToady | alternatives are already | junctions, basically | 16:38 | |
moritz_ | yes | ||
and there are & delimted lists also | |||
TimToady | on the other hand, $foo is not terribly self documenting | ||
moritz_ | aye | 16:39 | |
16:39
hercynium left
|
|||
TimToady | so I'd probably stuff the alternatives into @foo at least | 16:39 | |
another thing is that | in regex is not really non-deterministic | |||
whereas junctions are supposed to be | 16:40 | ||
(in the sense that you shouldn't rely on the ordering) | |||
regex alternation is required to do LTM and tie-breaking by original order | |||
16:42
cjfields joined
|
|||
TimToady | I wonder if @$junction will work and also provide documentation of plurality... | 16:42 | |
probably can't work for & case, if cast to @ is just pulling out values... | 16:44 | ||
ah well, at some point they just have to name their variables right | |||
moritz_ | well, if you don't think it's useful I won't feel too bad ;) | 16:45 | |
16:45
kanru left
|
|||
TimToady | hmm, and I think it'll probably autothread correctly, given an underlying mech like STD uses | 16:45 | |
since $foo turns into $C->_EXACT($foo) more or less | |||
moritz_ | interpolation autothreads? so my $x = 2 | 3; ("a$x").perl will give me 'a2' | 'a3' ? | 16:46 | |
TimToady | well, maybe not in P5 :) | ||
interpolation is just concatenation | |||
moritz_ | ok, makes sense | 16:47 | |
TimToady | pugs: my $x = 2 | 3; ("a$x").perl | ||
p6eval | pugs: RESULT["(\"a2\" | \"a3\")"] | ||
TimToady | there you have it | ||
moritz_ | wow, it even works ;) | ||
I should check if there are tests for that | |||
16:48
alanhaggai left
|
|||
cjfields | perl6: say / \s+/.WHAT | 16:48 | |
p6eval | elf 21338: OUTPUT[Regexp] | ||
..pugs: OUTPUT[Regex] | |||
..rakudo 29485: OUTPUT[Block] | |||
16:49
alanhaggai_ is now known as alanhaggai
|
|||
moritz_ | rakudo++ for creativity ;) | 16:49 | |
cjfields | elf is off (should be Regex, not Regexp) | 16:50 | |
Auzon | That's because P5's ref uses Regexp, I think. | ||
moritz_ | cjfields: my guess is that elf uses p5 internally and just frobs the output of `ref $obj' | ||
cjfields | I think rakudo's response is b/c regexes haven't been fully implemented yet. | 16:51 | |
Auzon: ok | |||
moritz_ | cjfields: is your current patch for Str.trans in the RT? | ||
cjfields: and should it be applied? | |||
16:52
nipotaway is now known as nipotan
|
|||
cjfields | yes, and yes | 16:52 | |
Though it doesn't fully implement acc. to S05 | |||
moritz_ | most builtins don't work fully according to the specs ;-) | 16:53 | |
cjfields | Need to allow regexes, closures still, but everything else works | ||
16:53
icwiener_ is now known as icwiener-_-
16:54
icwiener-_- is now known as icwiener
|
|||
moritz_ | cjfields: I'll look for obvious insanities, fix trailing spaces, make spectest_regression and then commit | 16:55 | |
cjfields | okay. | ||
cjfields just recently found the magic of svn diff | 16:56 | ||
help to read the docs | |||
moritz_ | which magic do you mean? | 16:57 | |
cjfields | as in not using regular diff as I've always used it, just run 'svn diff -c' | 16:58 | |
'tis nice | |||
BTW, depending on the commit we may need to add S05-transliteration/trans.t to spectest_regression | 16:59 | ||
moritz_ | cjfields: I'll do that in one commit | ||
17:01
hercynium joined
|
|||
rakudo_svn | r29490 | moritz++ | [rakudo] add and test Str.trans, cjfields++ | 17:08 | |
r29490 | moritz++ | Patch courtesy of Chris Fields <cjfields at uiuc.edu> | |||
r29490 | moritz++ | Adds one file to spectest_regression, +37 passing tests | |||
cjfields | thanks | ||
moritz_ | thank *you* | 17:09 | |
cjfields | I'll probably work on that a bit more to get it closer, but I'll add that as a separate patch | ||
moritz_ | I'm going to resolve that ticket | 17:10 | |
cjfields | ok | ||
17:12
rindolf joined
17:17
cjfields_ joined
|
|||
cjfields_ | perl6: say " <>&".trans( [ / \h /, '<', '>', '&' ] => [ { }, { }, '>', '&' ]); | 17:18 | |
p6eval | elf 21338: OUTPUT[Can't call method "trans" without a package or object reference at (eval 117) line 3. at ./elf_f line 3861] | ||
..pugs: OUTPUT[ >&] | |||
..rakudo 29490: OUTPUT[ _block29>&] | |||
cjfields_ | perl6: say " <>&".trans( ([' ', '<', '>', '&' ] => [' ', '<', '>', '&' ])); | 17:19 | |
p6eval | elf 21338: OUTPUT[Can't call method "trans" without a package or object reference at (eval 117) line 3. at ./elf_f line 3861] | ||
..pugs: OUTPUT[ <>&] | |||
..rakudo 29491: RESULT[ <>&1] | |||
moritz_ | can you even .trans on a string literal? | 17:20 | |
I thought they are immutable | |||
cjfields_ | .trans doesn't work in-place | ||
you have to use .=trans to get in-place transliteration (which I would assume fails for immutables) | 17:21 | ||
moritz_ | ok | ||
rakudo: print <>&".trans( ([' ', '<', '>', '&' => [' ', '<', '>', '&' ])); | 17:22 | ||
p6eval | rakudo 29491: OUTPUT[Statement not terminated properly at line 1, near "&\".trans( "current instr.: 'parrot;PGE::Util;die' pc 120 (runtime/parrot/library/PGE/Util.pir:82)] | ||
cjfields_ | I don't think in-place works | ||
moritz_ | rakudo: print <>&".trans( ([' ', '<', '>', '&' => [' ', '<', '>', '&' ]); | ||
p6eval | rakudo 29491: OUTPUT[Statement not terminated properly at line 1, near "&\".trans( "current instr.: 'parrot;PGE::Util;die' pc 120 (runtime/parrot/library/PGE/Util.pir:82)] | ||
moritz_ | cjfields: ok, I was just confused | ||
cjfields_ | rakudo: print "<>&".trans( ([' ', '<', '>', '&' => [' ', '<', '>', '&' ]); | ||
p6eval | rakudo 29491: OUTPUT[Statement not terminated properly at line 1, near "( ([' ', "current instr.: 'parrot;PGE::Util;die' pc 120 (runtime/parrot/library/PGE/Util.pir:82)] | ||
cjfields_ | rakudo: print "<>&".trans( ([' ', '<', '>', '&' => [' ', '<', '>', '&' ])); | 17:23 | |
p6eval | rakudo 29491: OUTPUT[Statement not terminated properly at line 1, near "( ([' ', "current instr.: 'parrot;PGE::Util;die' pc 120 (runtime/parrot/library/PGE/Util.pir:82)] | ||
moritz_ | rakudo: print "<>&".trans( [' ', '<', '>', '&' => [' ', '<', '>', '&' ]); | ||
p6eval | rakudo 29491: OUTPUT[Statement not terminated properly at line 1, near "( [' ', "current instr.: 'parrot;PGE::Util;die' pc 120 (runtime/parrot/library/PGE/Util.pir:82)] | ||
moritz_ | ah, missing ] | ||
rakudo: print "<>&".trans( [' ', '<', '>', '&'] => [' ', '<', '>', '&' ]); | |||
p6eval | rakudo 29491: OUTPUT[<>&] | ||
moritz_ | YaY | ||
cjfields++ | |||
cjfields_ | thanks | 17:24 | |
say 'ABCDEFG'.trans('A..Z' => 'a..z'); | |||
rakudo: say 'ABCDEFG'.trans('A..Z' => 'a..z'); | |||
p6eval | rakudo 29491: OUTPUT[abcdefg] | ||
17:25
justatheory joined
|
|||
cjfields_ | rakudo: say 'ABCDDDDEFG'.trans(:s, 'A..Z' => 'a..z'); | 17:26 | |
p6eval | rakudo 29491: OUTPUT[abcdefg] | ||
Auzon | rakudo: say '<>&'.trans(['<', '>', '&'], ['<', '>', '&']); | 17:27 | |
p6eval | rakudo 29491: OUTPUT[Must pass a List of Pairs for transliterationcurrent instr.: 'parrot;Any;trans' pc 10268 (src/gen_builtins.pir:6556)] | ||
moritz_ | Auzon: s/,/=>/ | ||
Auzon | rakudo: say '<>&'.trans(['<', '>', '&'] => ['<', '>', '&']); | ||
p6eval | rakudo 29491: OUTPUT[<>&] | ||
Auzon | yeah, I saw that :) | ||
moritz_ | p5 vs p6 | ||
p6 wins ;) | |||
Auzon | Nah, I just misread the original statement | ||
17:28
iblechbot left
|
|||
Auzon | but the error message is helpful indeed :) | 17:28 | |
cjfields_ | yes, made sense to me to add that in | 17:29 | |
moritz_ | if we just relied on MMD it would have said "no applicable method found" or "Type mismatch in MMD" | ||
Auzon | Though, isn't it a Pair of Lists instead of a List of Pairs? | 17:30 | |
cjfields_ | Recent changes to S05 will require me to change a few things (spaces are always important, for instance), but it works for now | ||
No, you can use a List of Pairs | 17:31 | ||
pmichaud | (moving all := clonings to front of lexical scope) -- that's essentially the solution we were coming up with in Parrot -- i.e., have all of the lexical bindings take place at the beginning of the enclosing block | 17:32 | |
cjfields_ | rakudo: say "ABC".trans( ('A'=>'a'), ('B'=>'b'), ('C'=>'c') ) | ||
p6eval | rakudo 29491: OUTPUT[abc] | ||
pugs_svn | r21339 | Auzon++ | [gsoc_spectest] simple smartlink cleanup | ||
Auzon | cjfields_++ | ||
ruoso | pmurias, hi... | ||
lambdabot | ruoso: You have 3 new messages. '/msg lambdabot @messages' to read them. | ||
Auzon | rakudo: say 'abc'.trans('a' => 'b', 'b' => 'c', 'c' => 'a'); | 17:33 | |
p6eval | rakudo 29491: OUTPUT[bca] | ||
Auzon | I like that both ways are possible :) | ||
17:33
cjfields left
|
|||
cjfields_ | it's fairly nice. TimToady made a few clarifications which I am working on which will be nice | 17:34 | |
so you can do something like: | |||
$str.=trans( / \s+ / => ' ' ); # squash all whitespace to one space | 17:35 | ||
or have the left side of the pair be a closure | |||
(just not yet) | 17:36 | ||
Auzon | rakudo: my %hash = <a b b c c a>; say 'abc'.trans(%hash.keys => %hash.values) | 17:37 | |
p6eval | rakudo 29492: OUTPUT[bca] | ||
pmichaud | rakudo: my %hash = <a b b c c a>; say 'abc'.trans(%hash.pairs); | ||
p6eval | rakudo 29492: OUTPUT[Method 'pairs' not found for invocant of class 'Perl6Hash'current instr.: '_block11' pc 94 (EVAL_11:33)] | ||
pmichaud | we should fix that. | ||
rakudo: my %hash = <a b b c c a>; say 'abc'.trans(%hash.list); | 17:38 | ||
p6eval | rakudo 29492: OUTPUT[Must pass a List of Pairs for transliterationcurrent instr.: 'parrot;Any;trans' pc 10268 (src/gen_builtins.pir:6556)] | ||
Auzon | perl6: my %hash = <a b b c c a>; %hash.pairs.say | ||
p6eval | elf 21339: OUTPUT[Pair=HASH(0x86cd2a0)Pair=HASH(0x881ad38)Pair=HASH(0x881bf68)Pair=HASH(0x881bfa8)Pair=HASH(0x881bfd8)Pair=HASH(0x881bf98)] | ||
..pugs: OUTPUT[c ab ca b] | |||
..rakudo 29492: OUTPUT[Method 'pairs' not found for invocant of class 'Perl6Hash'current instr.: '_block11' pc 88 (EVAL_12:31)] | |||
cjfields_ | interesting... | ||
pmichaud | rakudo: my %hash = <a b b c c a>; say 'abc'.trans(list(%hash)); | ||
p6eval | rakudo 29492: OUTPUT[Must pass a List of Pairs for transliterationcurrent instr.: 'parrot;Any;trans' pc 10268 (src/gen_builtins.pir:6556)] | ||
pmichaud | rakudo: my %hash = <a b b c c a>; say (%hash,).perl; | ||
p6eval | rakudo 29492: OUTPUT[[{"a" => "b", "b" => "c", "c" => "a"}]] | ||
pmichaud | Hash probably need a little work -- hasn't been updated since the List/Array changes. | 17:39 | |
ruoso | /usr/bin/env: ruby: No such file or directory (oops) | 17:40 | |
heh... | |||
../../../misc/elfish/elfX//../../STD_red/STD_red_run:93: syntax error, unexpected '>' | 17:42 | ||
pmurias, ^ any idea on what can I do to fix that? | 17:43 | ||
17:43
alanhaggai_ joined
|
|||
Auzon | rakudo: my @arr = <1 3 2 5 4 7 6>; say @arr.sort({$^a <=> $^b}); | 17:53 | |
p6eval | rakudo 29493: OUTPUT[1234567] | ||
Auzon | rakudo: my @arr = <1 3 2 5 4 7 6>; say @arr.sort(-> $x, $y {$x <=> $y}); | ||
p6eval | rakudo 29493: OUTPUT[Statement not terminated properly at line 1, near "(-> $x, $y"current instr.: 'parrot;PGE::Util;die' pc 120 (runtime/parrot/library/PGE/Util.pir:82)] | ||
Auzon | rakudo: my @arr = <1 3 2 5 4 7 6>; my $sort = -> $x, $y {$x <=> $y}; say @arr.sort($func); | ||
p6eval | rakudo 29493: OUTPUT[Statement not terminated properly at line 1, near "= -> $x, $"current instr.: 'parrot;PGE::Util;die' pc 120 (runtime/parrot/library/PGE/Util.pir:82)] | ||
Auzon | rakudo: my @arr = <1 3 2 5 4 7 6>; my $sort = sub {$^a <=> $^b}; say @arr.sort($func); | 17:54 | |
p6eval | rakudo 29493: OUTPUT[Scope not found for PAST::Var '$func'current instr.: 'parrot;PCT::HLLCompiler;panic' pc 156 (src/PCT/HLLCompiler.pir:103)] | ||
Auzon | rakudo: my @arr = <1 3 2 5 4 7 6>; my $sort = sub {$^a <=> $^b}; say @arr.sort($sort); | ||
p6eval | rakudo 29493: OUTPUT[[oops; continuation 0xb64df0b4 of type 19 is trying to jump from runloop 863 to runloop 110][oops; continuation 0xb64dee68 of type 19 is trying to jump from runloop 864 to runloop 110][oops; continuation 0xb64ded34 of type 19 is trying to jump from runloop 865 to runloop | ||
..110][... | |||
Auzon | rakudo: my @arr = <1 3 2 5 4 7 6>; my $sort = {$^a <=> $^b}; say @arr.sort($sort); | ||
p6eval | rakudo 29493: OUTPUT[1234567] | ||
Auzon | rakudo: sub foo {say $^b}; foo(1,2,3) | 17:55 | |
p6eval | rakudo 29493: OUTPUT[too many arguments passed (3) - 1 params expectedcurrent instr.: 'foo' pc 44 (EVAL_13:23)] | ||
Auzon | hm. | ||
TimToady | rakudo: sub foo { @_; say $^b}; foo(1,2,3) | 17:56 | |
p6eval | rakudo 29493: OUTPUT[1] | 17:57 | |
17:57
alanhaggai left
18:01
alanhaggai_ is now known as alanhaggai,
zamolxes joined
|
|||
pmurias | ruoso: hi | 18:03 | |
do you have ruby 1.9? | 18:04 | ||
18:04
donaldh left,
donaldh joined
|
|||
pmurias | ruoso: it looks like some -> {} syntax has crept into STD_red, and it now requires ruby 1.9 | 18:14 | |
18:18
apeiron left
|
|||
pmurias | ruoso: i got my ruby 1.9 from debian and it works | 18:31 | |
ruoso | pmurias, ok... I have ruby 1.8... I'll try with 1.9 | 19:12 | |
19:12
r0bby left
19:13
r0bby joined
|
|||
ruoso | pmurias, it worked... | 19:20 | |
pmurias | ruoso: good | 19:25 | |
ruoso | pmurias, I was just looking at test/15... | 19:26 | |
it looks awesome... | |||
but where does the values come from? | |||
pmurias | you mean $io,$hash? | ||
they are still mapped to c, and include in the boilerplate | |||
:( | |||
ruoso | oh... ok | 19:27 | |
you could probably name them after their actual P6 names... couldn't you? | |||
pmurias | you mean $*IN? | ||
ruoso | yes | 19:28 | |
pmurias | it would be better to fetch them from a namespace | ||
pugs_svn | r21340 | ruoso++ | [smop] test/15 was not really failing... the test count was wrong... SMOP_SLIME_DEBUG compile option can be set to show all the methods called in slime eval... | 19:29 | |
ruoso | pmurias, do we know if the namespace is a plain hash already? | 19:30 | |
if it is, please... feel free to add it... | |||
although we could probably implement it as one | |||
and replace it later if that is not the case | |||
use a dumb namespace for boostrap is probably a sane idea | 19:31 | ||
pmurias | do you now how things like if will be implemented? | 19:32 | |
ruoso | we have two options... | ||
the first is to make an assembler like conditional-jump | 19:33 | ||
the second is to implement a "if" type that have a "then" and an "else" attributes | |||
that would be callable code | |||
actually three code attributes | |||
"condition", "then" and "else" | |||
or even | 19:34 | ||
a list of pairs consisting of "condition" => "then" codes and a "else" code | |||
pmurias | the jump would be simpler | 19:35 | |
ruoso | and maybe more efficient... | 19:36 | |
pmurias, btw... I was thinking about that "exposing the frame as an array of nodes" thing you were talking about... | 19:37 | ||
pmurias | and? | 19:38 | |
ruoso | and I just realized that we could have sm0p generating new nodes on the fly | ||
instead of building a complete frame from the beggining | |||
pmurias | you mean lazily? | ||
ruoso | yes | ||
pmurias | any use for this | 19:39 | |
? | |||
19:39
Alias_ left,
Alias__ joined
|
|||
ruoso | I don't know yet... | 19:39 | |
it just crossed my mind | |||
;) | |||
but... | |||
"if" could feed one of the streams | |||
instead of doing a jump | 19:40 | ||
but as I said... it was just something that crossed my mind.. | |||
it could be building the sm0p nodes and throwing away the past nodes by traversing the AST | 19:42 | ||
a high-level JIT | 19:43 | ||
pmurias | a low-level JIT would help more | 19:44 | |
ruoso just brainstorming | |||
but it could choose a more direct invocation schema depending on the actual types of the objects | 19:45 | ||
that would be helpful already | |||
19:45
justatheory left
|
|||
pmurias | i'm actually thinking of switching to a register based calls only interpreter implementation | 19:46 | |
ruoso | like llvm? | ||
pmurias | translatable to llvm | 19:47 | |
ruoso: are you familiar with llvm/ | |||
s{/}{?} | |||
ruoso | not really | ||
nothingmuch is | 19:48 | ||
pmurias | i only read the tutorial | ||
ruoso | so did I... | ||
19:48
cjfields_ left
|
|||
ruoso | but I'm trying to ignore lower-level details right now and trying to move to writing actual P6 code ASAP... | 19:49 | |
I'm not very good at such low-level stuff... | |||
pmurias | we need to smop to run benchmarks before we can optimise it ;) | 19:50 | |
ruoso | I'm hoping someone with actual skills in low-level stuff to help with that later... | ||
pmurias | ruoso: do you have experience with parsing headers? | 19:51 | |
ruoso | I think the biggest challenge was to come up with something that allows this low-level to be replaced later.. | ||
C headers? not really... but the spec is quite simple, AFAIK | |||
pmurias | compared to perl6 ;) | 19:52 | |
so what's the next thing to be done? | 19:55 | ||
ruoso | I think you can move on implementing stuff that would be done to have usefull code compiled to sm0p | 19:57 | |
19:57
ingy joined
|
|||
ruoso | I'm moving with p6opaque that will allow us to have real p6 objects... | 19:57 | |
btw... take a try with the SMOP_SLIME_DEBUG compile option (you need to recompile smop_slime_node.c for it to take effect) | 19:58 | ||
it should help debugging the darn memory leaks | |||
pmurias | they are created when slime is used wrongly? | 20:01 | |
how do i get a social-text login? | 20:03 | ||
ruoso | sometimes the bug is in slime | ||
pmurias | ruoso: how do i get a social text account, openid dosn't work for me | 20:07 | |
? | |||
ruoso | pmurias, I don't remember how I got one... | ||
www.perlfoundation.org/nlw/register.html | 20:08 | ||
lambdabot | Title: Register | ||
ruoso | doesn't that help? | ||
pmurias | i can't register as i'm registered with openid-- | 20:09 | |
ruoso | weird | 20:10 | |
pmurias | openid worked | ||
ruoso | cool | 20:12 | |
pmurias | SMOP_SLIME_DEBUG dosn't help much | 20:14 | |
it should be possible to create a leak using sm0p | 20:15 | ||
ruoso | pmurias, it shouldn't be possible, you mean ;) | 20:16 | |
pmurias | yes | ||
ruoso | pmurias, where is the sm0p boilerplate defined? | 20:18 | |
pmurias | in elf/sm0p_boilerplate_* | 20:19 | |
you can look at Makefile.am | |||
* test/Makefile.am | |||
20:21
barney left
|
|||
pmurias | re shouldn't be possible, i meant in theory ;) | 20:21 | |
ruoso | when I change the boilerplate? do I need to do something else for it to take effect? | ||
pmurias | just recompile the tests | 20:22 | |
ruoso | I think the leak is in somehow in move_responder | 20:25 | |
test/14 have a very similar memory leak | 20:26 | ||
pugs_svn | r21341 | Auzon++ | [gsoc_spectest] move constant.t in spec | 20:27 | |
ruoso | pmurias, btw... you could have an additional preprocessor to use the "p6" blocks instead of "sm0p" blocks... | ||
they would simply inject the sm0p code inside the C source instead of adding the boilerplate | |||
pmurias | you could extend sm0p.pl | 20:29 | |
ruoso | yes... that would be ok also... | 20:30 | |
20:32
iblechbot joined
|
|||
ruoso | but I can only think about it after I succesfully hunt down the memory leak in test/14 | 20:32 | |
pmurias | ruoso: i can fight the leak, if you want to move on | ||
ruoso | we both could ;) | ||
pmurias, this leak is a very important one... we could both focus on getting rid of it... | 20:34 | ||
pmurias | got gobby? ;) | 20:36 | |
the boilerplate itself is leaky | 20:37 | ||
20:37
justatheory joined
|
|||
ruoso | there's one thing, yes... I was about to commit it | 20:38 | |
but that doesn't solve the problem entirely | |||
pugs_svn | r21342 | ruoso++ | [elfish/smop] releases must happen before loop | ||
pmurias | it should be possible to automaticly determin which object holds the leaking one | 20:40 | |
sorry, none of them hold it, it's not gc | 20:41 | ||
debugging gc would be easier ;) | 20:43 | ||
20:43
iblechbot left
|
|||
ruoso | (trace gc, you mean...) | 20:44 | |
pmurias | yes | 20:46 | |
ruoso | pmurias, I didn't use it somply because it seemed too hard to implement... | 20:47 | |
but it shouldn't be too hard to replace it... | |||
pmurias | don't we need ref counting for perl5? | 20:48 | |
ruoso | pmurias, we would still need to support SMOP_RELEASE and SMOP_REFERENCE | 20:51 | |
but they can do nothing in the case of trace gc | |||
pmurias | tracing gc can only collect things with a zero reference counter | 20:52 | |
i have to think/sketch it out... | 20:53 | ||
20:56
dblick left
|
|||
pmurias | ruoso: thought it out, objects which are tracked by the trace gc have a reference counter set to 1 initialy and it is decremented when they are unreachable | 20:59 | |
ruoso | pmurias, it doesn't even need to do that | ||
pmurias, the reference and release codes can be a noop | |||
there's no such thing as *the* smop gc... but each object can choose to use whatever it wants | 21:00 | ||
SMOP_RELEASE and SMOP_REFERENCES are calls made to the object's responder interface... | |||
some objects in smop are not subject to gc at all | |||
because they are singletons that are initialized in smop_init() | |||
and only destroyed in smop_destr | |||
pmurias | do you want to search all the memory for the adress of the object? | ||
if so RELEASE is a noop | 21:01 | ||
ruoso | the problem is that the object that caused the leak might be destroyed already | 21:03 | |
that's why I was only successfull by going each eval step and watching how many reference and release calls are made | |||
and detecting when some was missing | |||
pmurias | ruoso: i meant in you gc scheme | 21:05 | |
ruoso | yes... | ||
exactl | |||
because if some code some where misses a SMOP_RELEASE call | |||
you might not have a trace of it anymor | 21:06 | ||
so you can't introspect the memory to find out where it was | |||
pmurias | ruoso: you are refering to the way you are debugging the memory leak or how the gc would work in smop if it was implemented? | 21:07 | |
ruoso | the way I'm debugging now | ||
21:07
Sartak joined
|
|||
spinclad | so gc'd objects can ignore refcounts, but still all objects must support gc reference tracing... | 21:08 | |
ruoso | spinclad, the pointer to a function must exist... but that's all that is required | ||
pmurias | spinclad: gc'd objects can't ignore refcounts | ||
ruoso home & (will connect later) | |||
ingy | hai | 21:09 | |
21:09
rindolf left
|
|||
pmurias | ingy: hi | 21:09 | |
ingy | hi pmurias | ||
pmurias | ingy: you inquired about pixie a long time ago ;) | 21:10 | |
ingy | what's that again? | 21:11 | |
pmurias | a set of STD.pm hooks to make it emit elf AST | ||
pixie: say 44; | |||
p6eval | pixie: No output (you need to produce output to STDOUT) | 21:12 | |
ingy | pmurias: is pixie your thing that uses TimToady's parser? | ||
21:12
jfredett_ is now known as jfredett
|
|||
pmurias | ingy: one of my two things | 21:13 | |
pugs_svn | r21343 | pmurias++ | [pixie] fix pixie after STD5.pm -> STD.pmc | ||
ingy | what is the other and where do they live? | ||
pugs_svn | r21344 | Auzon++ | [gsoc_spectest] moved state.t into spec/ and cleaned a smartlink | ||
pmurias | STD5_dump_match in src/perl6 | ||
ingy | I've seen that... | ||
pmurias | and pixie in misc/pixie | 21:14 | |
ingy | ok | ||
can I install all of elf from pugs repo? | |||
Auzon | You need also Ruby 1.9 | 21:15 | |
*also need | |||
ingy | for elf? | ||
pugs_svn | r21345 | pmurias++ | [pixie] added edit a sh script i use for editing actions | ||
pmurias | ingy: for elf STD_red parser | ||
LS | 21:16 | ||
(caps-lock)-- | |||
ingy | is there an elf wiki or somesuch online README? | 21:17 | |
pmurias | misc/elf/README | 21:18 | |
and you can ask me questions ;) | |||
ingy | pmurias: you meant (CAPS_LOCK)__ | ||
:) | |||
TimToady | pugs-as-a-wiki... | ||
ingy | pmurias: ok. I'll have a play later | 21:19 | |
pmurias | i'll have to get round to converting pixie actions to p6 soon... | 21:20 | |
ingy | pmurias: I'm only interested in copying stuff for my new language :) | 21:21 | |
21:21
jhorwitz left
|
|||
pmurias | ingy: what's your new language? | 21:22 | |
ingy | C'Dent | ||
long story. there's some old misinformation at cdent.org. | |||
I need a quick nap. bbl& | 21:23 | ||
pmurias | if you want to integrate with elf,warp it or anything feel free | 21:25 | |
you can use my branch /misc/elfish/elfX or copy your own | |||
21:27
ruoso left
21:33
pmurias left
21:36
hercynium left
21:38
cjfields joined
|
|||
armagad | /j #silconslotcanyon | 21:45 | |
21:50
cjfields left
21:54
perlbot left
22:02
LordBr4in joined
22:15
pbuetow_ left
22:17
Chillance left
22:44
Limbic_Region joined
22:48
Jamtech left
|
|||
meppl | good night | 22:52 | |
22:57
meppl left
23:16
Psyche^ joined
23:20
ruoso joined
23:28
Patterner left
23:29
Psyche^ is now known as Patterner,
Exodist left
23:32
rindolf joined
23:49
cmarcelo left
|
|||
rindolf | Hi all. | 23:51 | |
TimToady: here? | |||
TimToady: do you know Spanish? | |||
Patterner | Oui. | 23:53 | |
rindolf | Patterner: isn't "Oui" French? | 23:55 | |
Si is Spanish. | |||
Patterner | darn | ||
rindolf | Well, there's also "Si" in French. | ||
For answerin positively to a "Don't you know Spanish?" | 23:56 | ||
23:57
bacek joined
|