Parrot 5.7.0 "Azure-rumped Parrot" | parrot.org/ | Log: irclog.perlgeek.de/parrot | #parrotsketch meeting Tuesday 19:30 UTC
Set by moderator on 27 September 2013.
00:11 rurban1 joined 00:12 Psyche^ joined 00:19 TonyC joined
dalek p: 69c6085 | coke++ | t/docs/opcodes.t:
Add first pass at docs tester

Currently verifies that every opcode in docs/ops.markdown has a corresponding entry in nqp-jvm (and vice versa).
00:35
p: b4c094e | coke++ | docs/ops.markdown:
remove (for now) docs for ops not in JVM.
00:38
p: f59ce6e | coke++ | / (2 files):
Update doc formatting, track with test.
01:26
p: 0cbaefe | coke++ | docs/ops.markdown:
document more I/O opcodes
p: 7129541 | coke++ | docs/ops.markdown:
document more opcode variants
p: 9259f8e | coke++ | t/docs/opcodes.t:
ignore empty opcodes
p: deae10b | coke++ | docs/ops.markdown:
document moar ops
01:46 FROGGS_ joined 01:58 rurban1 joined 02:01 benabik joined 02:10 kid51_ joined 03:04 preflex_ joined
dalek p: 6758931 | coke++ | docs/ops.markdown:
document bitops, relocate a type check, add isprime
04:09
p: f06d02c | coke++ | docs/ops.markdown:
add more opcodes.

Also fix some previous entries suffering from cutandpaste
p: 8b7c688 | coke++ | docs/ops.markdown:
fix typo. :(
04:12
06:42 patspam joined 07:04 FROGGS joined 07:44 rurban1 joined 07:46 hdanak joined 08:44 rurban1 joined 09:46 rurban1 joined 10:12 mtk0 joined 10:46 rurban1 joined
dalek kudo/nom: f6e11ba | (Elizabeth Mattijsen)++ | t/spectest.data:
Make sure @a:exists and @a:delete tests are run
10:56
11:47 rurban1 joined 12:47 rurban1 joined 13:08 PacoAir joined 13:48 rurban1 joined 14:05 bluescreen joined
Zefram Util: I've mailed you twelve further bug reports 14:39
I've also got two much more subjective items
I'll throw these open to the channel; welcome opinions on whether I should report these as bugs 14:40
firstly, the arbitrary default recursion limit of 1000. seems like a bad choice of default, because it breaks function composition: in the general case a function call that works in one place won't necessarily work if called from inside a subroutine 14:42
secondly, I don't see any way to create an anonymous class, although there is a way to create an anonymous *sub*class
14:48 rurban1 joined 15:11 denisboyun joined 15:18 rurban1 joined 15:20 denisboyun joined 15:21 FROGGS joined
Util Zefram: /msg sent 15:37
Zefram: You should be able to change the recursion limit per-interpreter:
$P0 = getinterp
$P0."recursion_limit"(900000)
Or, do you mean that the initial value should be higher, even though you can change it in any given program? If so, how high? 15:38
Zefram I'm aware that it's changeable. although I only know that through grepping the source: neither the limit itself nor its changeability are documented 16:05
if it were unchangeable I'd have made a bug report of a different character
my more subjective claim is that imposing a limit *by default* is a poor choice 16:06
I'm actually changing the limit to -1 in my code, which effectively removes the limit
I'm not sure what the limit is trying to achieve 16:07
it's not preventing you from running out of memory, because you're free to consume as much memory as you like as long as you do it iteratively, or via tailcalling, or if you disguise your recursion as tailcalling by using explicit continuation passing 16:08
the recursion limit seems to be just... training wheels, to prevent n00bs getting themselves confused by this newfangled recursion trickery
and as having a recursion limit breaks ordinary function composition semantics, I think the training wheels shouldn't be in place by default 16:09
I have no objection to it being a non-default option 16:10
clarifying: I have no objection to the training wheels being a non-default option 16:13
16:14 denisboyun joined 16:18 benabik joined 16:19 rurban1 joined
Util Zefram: I see your point, but I don't feel so strongly about it that I immediately agree with changing the default to -1. 16:32
The ameliorating factor for me is that (in our projected future)
most PIR/PASM code will be run via another (higher-level) language like Perl 6 or TCL,
and *those* languages will have already set the recursion limit to whatever they want.
Having a default max recursion limit in the base config allows Parrot to tell you about
infinite loops in your hand-crafted PIR, which is helpful to even non-beginners sometimes :)
Also, I am just scratching the surface of Haskell, and f.composition is not yet a primary idiom to me.
Zefram well, it's per-interpreter, not per-HLL
Util This is certainly worth a ticket, to allow ongoing discussion.
Zefram ok, I'll open a ticket
well, mail you the beginnings of one 16:33
what about anonymous classes?
I'm finding it inconvenient that some ops insist on writing into the namespace in addition to returning their result in a register 16:34
rurban recursion_limit needs to be documented at least 16:43
Util Zefram: Do you have an example of the "writing into the namespace in addition..."? Or was that one of the 12 bug reports? 16:44
I agree about documenting the r.limit.
re: anonymous classes; I need to look at the code before I speak to that. 16:45
Zefram I can put together an example if you want. it's behaviour of the newclass op, which returns a class metaobject and also writes into the namespace using the name that it was given
the documentation has some mention of using the subclass op to get an anonymous subclass, but doesn't mention any way to get an anonymous class without providing a parent class 16:46
the newclass behaviour looks more like a deliberate design decision than a mistake, which is why I've classed this issue as subjective and needing opinions before proceeding with a ticket. but the availability of anonymous subclasses (if that actually works) makes newclass look anomalous 16:47
unfortunately investigating just what gets written into the namespace is impeded by the typeof and isa anomalies that are somewhere in the twelve reports that I mailed to you 16:48
rurban but even anonymous classes need a parent 16:53
Zefram anonymous classes need a parent just as much as named classes, no more and no less
rurban in my case an empty parent uses the default Object as parent class. names should be just optional, yes. registering them into namespaces makes lexically scoped classes hard 16:55
Zefram exactly 16:57
rurban this needs a discussion on the mailing list 16:58
but should be no problem to implement 16:59
Zefram guess I should open a ticket for it then
thanks
rurban p5-mop has exactly this very problem
Zefram yeah, it's really difficult to work around Perl 5's use of the name as a proxy for the class all over the place 17:00
benabik I occasionally wonder if Parrot's idea of a single global namespace is problematic in and of itself.
Zefram but Parrot does have class metaobjects
I think Parrot's built-in namespace is an abstraction inversion. but not really *wrong* in itself 17:01
rurban names are needed for the general usecase, but should be optional for the simple, fast and small lexical case
Zefram you've just got to watch out for things *relying* on the namespace, which is where Perl 5 has a problem
benabik Well, Parrot's class mechanism is tied to its namespaces. 17:02
Zefram there are some Parrot doc notes about using namespaces to manage named methods, which has me a bit worried
does that imply that a class must have an absolute name?
benabik Probably.
rurban hmm... 17:03
Zefram if a class must have an absolute name, then you can't GC classes, because the namespace keeps a reference to some aspects of the class
benabik Yup.
Zefram if it's all managed through class metaobjects, otoh, you can GC classes perfectly well, and there's nothing to stop you naming a class (by storing the class metaobject in the namespace)
hence abstraction inversion to have the namespace come first 17:04
benabik Having to store methods in a namespace would also be less of an issue if the namespaces weren't global.
Zefram oh yes, there's no problem having an internal namespace for methods that just hangs from the class metaobject 17:05
that's all gcable
benabik The "natural" result (IMHO) is that you remove the global namespace and just have lexical outer ones. Loading a modules returns a namespace that you can install into your own namespaces however you want. (merge, name, leave anonymous, whatever.) 17:06
But anyway...
17:23 denis_boyun__ joined 17:31 rurban1 joined
dalek p/cclass-backslash: 65c84f3 | (Arne Skjærholt)++ | t/qregex/rx_charclass:
Add test for character class with space in it.
18:26
p/cclass-backslash: 401bc9e | (Arne Skjærholt)++ | src/QRegex/P6Regex/ (2 files):
Refactor regex backslash handling to correctly handle character classes.

Now, "\\ " isn't incorrectly parsed as unspace (which is illegal in regexes).
18:32 rurban1 joined 18:41 darbelo joined 18:52 denis_boyun joined
dalek p: 65c84f3 | (Arne Skjærholt)++ | t/qregex/rx_charclass:
Add test for character class with space in it.
19:02
p: 401bc9e | (Arne Skjærholt)++ | src/QRegex/P6Regex/ (2 files):
Refactor regex backslash handling to correctly handle character classes.

Now, "\\ " isn't incorrectly parsed as unspace (which is illegal in regexes).
p: a2a6cc8 | (Arne Skjærholt)++ | src/QRegex/P6Regex/ (2 files):
Rerefactor backslash handling.

Now, running regex and character classes don't share any code for handling backslash escapes. This means that there's some code duplication, but it'll make it easier to change character classes into something like skip lists later on.
19:35 rurban1 joined
dalek p: 879f8d1 | coke++ | docs/ops.markdown:
meta docs
19:55
p: 02cf729 | coke++ | docs/ops.markdown:
add more string opcodes
p: 2b8f9e3 | coke++ | docs/ops.markdown:
fix typo, minor formatting
20:35 rurban1 joined
dalek kudo/nom: 5a7979e | (L. Grondin)++ | src/core/List.pm:
first attempt
20:59
kudo/nom: 04e2541 | lizmat++ | src/core/List.pm:
Merge pull request #211 from grondilu/combinations

List.combinations and List.permutations
kudo/nom: ae7ce99 | (L. Grondin)++ | src/core/List.pm:
expand tabs
21:10
kudo/nom: a103418 | lizmat++ | src/core/List.pm:
Merge pull request #212 from grondilu/combinations

fixing indentation
21:29 hdanak joined 21:50 darbelo_ joined 21:54 rurban1 joined 22:55 rurban1 joined 23:16 rurban1 joined 23:57 FROGGS joined