»ö« | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, alpha:, pugs:, std:, or /msg p6eval perl6: ... | irclog: irc.pugscode.org/ | UTF-8 is our friend! Set by moritz_ on 25 June 2010. |
|||
PerlJam | what is DO ? | 00:01 | |
00:06
mtk left
|
|||
jnthn | sorear: I'm quite sure it's just a block in the normal flow of code execution. | 00:07 | |
say 1; { say 2 }; say 3; | |||
is like (aside from the class decl | |||
say 1; class Foo { say 2 }; say 3; | |||
I think Rakudo has it that way too. | |||
And afaik it's spec. Or at least meant to be in there somewhere. :-) | 00:08 | ||
TimToady | package blocks are at DO time | ||
tylercurtis | rakudo: say 1; class Foo { say 2; } say 3; | ||
p6eval | rakudo 7579f7: OUTPUT«===SORRY!===Confused at line 20, near "class Foo "» | ||
tylercurtis | rakudo: say 1; class Foo { say 2; }; say 3; | ||
p6eval | rakudo 7579f7: OUTPUT«123» | ||
TimToady | sorear: this is specced at S10:88 | 00:09 | |
anything that wants run at some other time than DO time should be in a phaser | 00:14 | ||
but pretty much everything important about a class should be expressed by declarations within the class, not the normal code | |||
cognominal | thx jnthn for your 22:27 answer | 00:22 | |
PerlJam | so DO time is "normal execution time"? | 00:23 | |
00:23
skids left
00:25
skids joined
|
|||
PerlJam | (ack -wa DO of the synopses doesn't return any results) | 00:27 | |
TimToady | well, it's "do" not "DO"... | ||
00:28
aubreyja_ joined
|
|||
sorear | I see. | 00:33 | |
perl6: my class Foo { ... }; Foo.new.say; my class Foo { }; | |||
p6eval | rakudo 7579f7: OUTPUT«too few positional arguments: 1 passed, 2 (or more) expected in main program body at line 1» | ||
..pugs: ( no output ) | |||
sorear | Is that legal? | ||
sorear is quite hoping "no" | 00:34 | ||
TimToady | std: my class Foo { ... }; Foo.new.say; my class Foo { }; | ||
p6eval | std 31614: OUTPUT«ok 00:01 111m» | ||
00:34
ashleydev left
|
|||
tylercurtis | std: my $foo; $foo.say; my $foo; | 00:35 | |
p6eval | std 31614: OUTPUT«Potential difficulties: Useless redeclaration of variable $foo (see line 1) at /tmp/FWZ7DOwJ5s line 1:------> my $foo; $foo.say; my $foo⏏;ok 00:01 108m» | ||
arnsholt | Hmm. This given/when stuff was easier than I'd thought | ||
TimToady | tylercurtis: the ... makes it a stub decl | ||
tylercurtis | TimToady: Ah, right. Didn't notice the ... | ||
00:36
ashleydev joined
|
|||
arnsholt | rakudo: given 5 -> $x, $y { say "alive!" } # Hmm... | 00:36 | |
p6eval | rakudo 7579f7: OUTPUT«Not enough positional parameters passed; got 1 but expected 2 in main program body at line 2:/tmp/pMCr7Cye66» | ||
sorear | TimToady: std accepts it because the stub makes it in scope. I'm just imagining that, until the real decl, ::Foo is a Failure | ||
pugssvn | r31615 | lwall++ | [STDeco] start transitioning to {*} proto stubs | 00:39 | |
r31615 | (when bootstrapped and stable, we'll switch from the current {{*}} to {*}) | |||
r31615 | implement 'also' declarator, and attach 'also of' trait to proper $*DECLARAND | |||
r31615 | $*OFTYPE is now only used to preserve the 'of' type of a scope declarator until there is a declarand | |||
00:40
aubreyja_ left
|
|||
TimToady | sure, but it's expected that the real Foo must be defined later at compile time, and most code runs at run time | 00:40 | |
it's always going to fail to access something at compile time that isn't defined yet... | |||
pugssvn | r31616 | lwall++ | [STD] now that reboot is stable, change {{*}} proto stubs to {*} | 00:47 | |
sorear | TimToady: Am I correct that $STD::ALL is mostly a memory usage hack? | 00:52 | |
TimToady | no, it's primarily to break the OUTER:: cycles | 00:53 | |
sorear | that's what I meant | 00:54 | |
TimToady | :) | ||
but you have to minimally remember all the lexical scopes around YOU_ARE_HERE in the .syml | 00:55 | ||
and having them all is useful for debugging | 00:56 | ||
lue | afk | 00:59 | |
pugssvn | r31617 | lwall++ | [STDeco] transit CORE and lib/Test to {*} stubs | 01:00 | |
sorear | what I want to do is to separate STD.pm6 from the current module system | 01:01 | |
because the syml stuff appears to be pretty dependant on p5 semantics | |||
literal: Where in grok is the code which does line wrapping? | 01:10 | ||
01:13
masonkramer left
01:14
masonkramer joined,
masonkramer left,
ashleydev left
01:15
skids left
|
|||
literal | sorear: either Pod::Text (Perl 5 Pod) or Perl6::Perldoc (Perl 6 Pod) | 01:15 | |
01:18
TiMBuS joined
|
|||
sorear | literal: Where in Perl6::Perldoc? | 01:22 | |
literal | sorear: actually, I think Perl6::Perldoc doesn't do line-wrapping yet | 01:23 | |
sorear | so the fact that 'grok' output fits on my screen accurately even after format codes are excised is entirely accidental? | ||
literal | most likely | 01:24 | |
sorear | Hmm. | 01:25 | |
sorear wants to add optional dark grey line number annotations to grok output | |||
ingy | greetings | 01:27 | |
diakopter | . | ||
sorear | .. | ||
diakopter | welcome to our proudly humble abode | 01:28 | |
01:29
skids joined,
justatheory joined
|
|||
diakopter | .. in theory | 01:29 | |
01:31
justatheory left
01:35
whiteknight left
01:38
ashleydev joined
01:40
PenThrive joined
01:47
aubreyja joined
01:50
aubreyja is now known as aubreyja_
01:51
aubreyja_ is now known as aubreyja
|
|||
sorear | TimToady: would it be reasonable to rename Stash, NAME, etc to STD:: and CursorBase, RE_ast, etc to Cursor::? | 01:56 | |
sorear contemplates what STD would look like if it were purged of backtracking (every subrule either returns exactly one cursor or .panics) | 02:05 | ||
02:19
khb joined
02:21
isBEKaml joined
02:22
aubreyja left
02:23
PZt joined
|
|||
TimToady | Perl 6 requires backtracking | 02:24 | |
yes, the internal type could be renamed | 02:25 | ||
*typs | |||
*e | |||
ingy | does rakudo have a perl -I... equiv? | 02:39 | |
looks like PERL6LIB works at least | 02:42 | ||
02:45
masonkramer joined
|
|||
TimToady | I don't think there's a -I | 02:57 | |
03:04
aubreyja joined
|
|||
lue | rakudo: class B { has $.a is 0..0xFF }; B.new.a = 300; | 03:06 | |
p6eval | rakudo 7579f7: OUTPUT«===SORRY!===Unable to parse blockoid, couldn't find final '}' at line 20» | ||
03:07
aubreyja left
|
|||
lue | can you place limits on attributes? | 03:07 | |
.oO(I suppose one could modify the attribute's accessor...) |
03:15 | ||
03:21
sftp left
|
|||
sorear | lue: you can spell that 'has uint8 $.a' | 03:22 | |
generally speaking you (currently) do that using subset types | |||
power-of-power-of-two-minus-one subsets are predefined | 03:23 | ||
tylercurtis | rakudo: class B { has $.a where 0 <= * <= 255 }; B.new.a = 300; | ||
p6eval | rakudo 7579f7: OUTPUT«===SORRY!===Unable to parse blockoid, couldn't find final '}' at line 20» | ||
sorear | (at some point I'm going to drag stevan in here and get a real attribute system forward-ported, but that's not likely to be soon) | 03:24 | |
tylercurtis | rakudo: class B { has $.a where 0 <= * <= 255; }; B.new.a = 300; | ||
p6eval | rakudo 7579f7: OUTPUT«===SORRY!===Unable to parse blockoid, couldn't find final '}' at line 20» | ||
tylercurtis | rakudo: class B { has $.a where {0 <= $_ <= 255}; }; B.new.a = 300; | ||
p6eval | rakudo 7579f7: OUTPUT«===SORRY!===Unable to parse blockoid, couldn't find final '}' at line 20» | ||
lue | rakudo: class B { has uint8 $.a }; B.new.a = 300; | 03:25 | |
p6eval | rakudo 7579f7: OUTPUT«===SORRY!===Malformed has at line 20, near "uint8 $.a "» | ||
lue | too bad all the sized ints are NYI and their existence is dependant on Parrot (IIRC) | ||
rakudo: class B { has $.a where 0..0xFF }; B.new.a = 300; | 03:26 | ||
p6eval | rakudo 7579f7: OUTPUT«===SORRY!===Unable to parse blockoid, couldn't find final '}' at line 20» | ||
TimToady | rakudo: class B { has $.a of Any where 0..0xFF is rw }; B.new.a = 300 | ||
p6eval | rakudo 7579f7: OUTPUT«===SORRY!===Unable to parse blockoid, couldn't find final '}' at line 20» | 03:27 | |
TimToady | std: class B { has $.a of Any where 0..0xFF is rw }; B.new.a = 300 | ||
p6eval | std 31617: OUTPUT«===SORRY!===Two terms in a row at /tmp/IDUK2e7eBS line 1:------> class B { has $.a of Any where 0..0xFF ⏏is rw }; B.new.a = 300 expecting any of: bracketed infix constraint infix or meta-infix statement modifier | ||
..loopParse failedFAILE… | |||
TimToady | std: class B { has $.a where 0..0xFF is rw }; B.new.a = 300 | ||
p6eval | std 31617: OUTPUT«===SORRY!===Two terms in a row at /tmp/QxVDAXfpfl line 1:------> class B { has $.a where 0..0xFF ⏏is rw }; B.new.a = 300 expecting any of: bracketed infix constraint infix or meta-infix statement modifier loopParse | ||
..failedFAILED 00:01… | |||
lue | it's not specced, but methinks it should be legal (it's already doable in parameters) | ||
TimToady | std: class B { has $.a where 0..0xFF }; B.new.a = 300 | 03:28 | |
p6eval | std 31617: OUTPUT«ok 00:01 111m» | ||
tylercurtis | std: class B { has $.a is rw where 0..0xFF }; B.new.a = 300 | ||
p6eval | std 31617: OUTPUT«ok 00:01 111m» | ||
sorear | lue: approximately seven years ago, TimToady decided what was wrong with the Perl 5 object system and created a new one. | 03:29 | |
Two things have happened with this. | |||
Perl 6 has the old version, which has seen nearly no improvement over that time | |||
TimToady | rakudo: subset u8 where 0..255; class B { has u8 $.a is rw }; B.new.a = 300; | 03:30 | |
sorear | The Moose people have backported it to Perl 5 and have been improving it for all this time | ||
p6eval | rakudo 7579f7: ( no output ) | ||
TimToady | some of that is merely to tailor it to the idiosyncracies of p5, and not applicable | ||
I'd like to see a list of what you think isn't in that category | |||
sorear | If the current Perl 6 object system looks like a dusty prototype which has been unprioritized for seven years, that's because it has been | 03:31 | |
anonymous types | |||
triggers | |||
method modifiers | |||
runtime class creation by API | |||
representation traits | 03:32 | ||
isBEKaml | for instance, one thing I find confusing in the current object system in rakudo is we can instantiate from objects (I might be wrong in phrasing this though) | ||
TimToady | I think you're reading some of rakudo's limitations as Perl 6's limitations | ||
anon types are no problem | |||
triggers and method modifiers can be done | |||
isBEKaml | rakudo: class A { has $.x is Int}; my $foo = A.new; my $bar = $foo.new; # is this right? | 03:33 | |
sorear | how do you define an attribute with an anonymous type? | ||
p6eval | rakudo 7579f7: ( no output ) | ||
TimToady | bind it to ::T | ||
tylercurtis | rakudo: class Foo { }; my $f = Foo.new; say $f.new.WHAT =:= $f.WHAT | ||
p6eval | rakudo 7579f7: OUTPUT«1» | ||
lue | .oO(I saw masak do that!) |
||
TimToady | roles are full of anonymous types | ||
sorear | Our object system has no batteries | 03:34 | |
It's all extensibility and no features | |||
TimToady | you do like to overstate things, dontchya? :) | 03:35 | |
isBEKaml | I think saying $foo.new is pretty confusing imho. Objects are created from prototypes(classes) unless you're cloning another object. So .new is misleading here. | ||
03:35
kev joined
|
|||
lue | TimToady: should I be able to use where on attributes in roles/classes ? | 03:35 | |
TimToady | yes | ||
03:35
kev left
|
|||
TimToady | that's a rakudo nyi | 03:35 | |
sorear | Actually, my root problem is that I want an 'after' keyword built in | 03:37 | |
TimToady | also, some of the design philosophy is to let the implementations discover what they need behind .HOW and negotiate something cross-platform. | ||
sorear | not necessarily with the same spelling | ||
TimToady | you can .wrap any routine | ||
including a method | |||
sorear | TimToady: of course. I'm not saying drop everything right now | ||
TimToady | and your carping is part of the negotiation process :) | ||
sorear | but I don't want lue to think that the object system we have now is final | 03:38 | |
TimToady | but repr hooks have been envisioned from the start | ||
sorear | the perl 6 object system is going to be much more awesome than it is now | ||
despite the fact that some people seem to think it | |||
's perfect as is. imagination, use it | |||
TimToady | gee, now you tell me, after ten years... :P | 03:39 | |
sorear | anyways. | 03:40 | |
TimToady | the main point of the .HOW barrier is to let the language stabilize on top while we're still experimenting underneath | ||
we encapsulate repr even from the casual user | |||
that's very important, i think | |||
isBEKaml | tylercurtis: I wasn't aware of =:=. But I was thinking when doing $foo.new, we were cloning the object. :) | 03:41 | |
tylercurtis: my point still stands, it's misleading! | |||
TimToady | feel free to play with anything on the other side of .HOW; we want that | ||
sorear | I think that the single biggest difference between the Moose and P6 metamodels is that the Moose repr and how are the same object | ||
I'm not sure if this is a good thing | |||
TimToady | P6 is completely agnostic on that subject | 03:42 | |
so we can try it both ways | |||
ruoso++ was playing with separate RIs for smop | |||
tylercurtis | isBEKaml: I agree. On the other hand, sometimes I really like that all the methods of the proto-object are available on any object of the class. | 03:43 | |
sorear | S12:0791 specs the ability of a single class to interact with multiple, ergo independant, reprs | ||
isBEKaml | rakudo: class B { }; my $foo = B.new; say $foo.new =:= $foo; | ||
p6eval | rakudo 7579f7: OUTPUT«0» | ||
sorear | I've also come to the conclusion that the reasonable way to think about protoobjects is as an instance of a nonstandard repr, so every class gets to use at least two of them | 03:44 | |
TimToady | jnthn++ and I were discussing that earlier today, and I was telling him we could restrict that for efficiency | ||
that's kinda how words work in natural language too | 03:45 | ||
03:46
xinming joined
|
|||
TimToady | in tagmemics any given syntax structure can have multiple interpretations simultaneously depending on context | 03:46 | |
03:46
xinming left
|
|||
lue | rakudo: my $a where 0..0xFF; $a = 999; | 03:46 | |
p6eval | rakudo 7579f7: OUTPUT«===SORRY!===Confused at line 20, near "my $a wher"» | ||
03:47
xinming joined
|
|||
isBEKaml | tylercurtis: if we want all methods of proto-object available, I think we should be doing clone() , not .new - if I'm not wrong.. | 03:47 | |
lue | rakudo: sub xyzzy($a where 0..0xFF) { say $a }; xyzzy(390) | ||
p6eval | rakudo 7579f7: ( no output ) | ||
isBEKaml | tylercurtis: of course, that would limit the new object to be just using the attribute values that were available in the cloned object. | 03:48 | |
tylercurtis | isBEKaml: Sometimes, being able to get at "class" methods conveniently from the instance is quite nice. | 03:49 | |
isBEKaml | tylercurtis: $object.^methods ? | 03:50 | |
lue | (I'm assuming 'where' is a trait.) | ||
TimToady | it's officialy a post_constraint | ||
tylercurtis | Of course, you can always do $obj.WHAT.foo(I think this is the correct way). | ||
isBEKaml | tylercurtis: huh, why wouldn't $obj.foo() work? Unless I'm mistaken, class methods and object methods are the same... :| | 03:53 | |
tylercurtis | Right. | ||
isBEKaml: but, I'm saying, that sometimes I like being able to do that. | |||
isBEKaml | tylercurtis: following class hierarchy, the compiler would be able to resolve methods present in several parent classes.. | 03:54 | |
lue | .oO(not exactly easy to find an exisiting implementation of where in Rakudo) |
||
tylercurtis | Another benefit of not having a class/instance method distinction is that for classes where the users of that class will often not care about specific instances(e.g., a Compiler implemented as a class internally to store various of information in attributes), you can more easily allow them to be called either as Foo::Compiler.compile($source) or Foo::Compiler.new.compile($source), just by sticking "self.new.compile($source) unless self.defined" at the | 03:56 | |
beginning of the compile method. | |||
isBEKaml | lue Grammar.pm I think (not sure) | ||
03:56
juster joined
04:00
PZt left
|
|||
isBEKaml | tylercurtis: that took me sometime to understand. :) | 04:00 | |
tylercurtis: you're saying that we just abstract away the instantiations within method implementations? Sure, we can do that. But not doing that would lead to GC problems, I think. I'd rather avoid having to take care of such things. A clear demarcation between objects and classes would be preferable when it comes to instantiating new objects. | 04:04 | ||
tylercurtis | isBEKaml: I agree that being able to do SomeClass.new.new.new.new.new.new.WHAT.new.new.WHAT.WHAT.WHAT.new.new is confusing, but on the other hand, the class/instance method non-distinction can clarify code sometimes. | 04:05 | |
04:06
justatheory joined
|
|||
lue | my $a = 3; say $a.WHAT.WHAT | 04:07 | |
rakudo: my $a = 3; say $a.WHAT.WHAT | |||
p6eval | rakudo 7579f7: OUTPUT«Int()» | ||
isBEKaml | tylercurtis: I think it was always there. instance objects take to class object methods easily as they don't have their own independent method definitions, unless augmented with MONKEY_TYPING. | ||
tylercurtis | isBEKaml: For example, in my say-call-without-parentheses-on-arguments-that-are-positive-integers-with-singly-assigned-lexicals(although "lexical" don't really mean much when you don't have any way to create a new scope :) to LLVM compiler; the SIC::Compiler class keeps some internal variables for things like the numeric suffix for temporary variable names in the generated code. So, you need to create a new SIC::Compiler object to compile any code with | 04:08 | |
However, most uses of the SIC::Compiler class are going to consist of "SIC::Compiler.new.compile($the-source-code)". So, at the beginning of the compile method, I use self.defined to check if self is undefined(and thus, in my class's case, at least, is the proto-object), and return the result of calling the method with the same arguments on a newly-created SIC::Compiler object just as if you had done "SIC::Compiler.new.compile($the-source-code)", even | |||
though you just did "SIC::Compiler.compile($the-source-code)". | |||
I could still do that if Perl 6 had separate class and instance methods, but it would be less convenient. I'd have to write a separate class method instead of just sticking the one "return self.new.compile($source) unless self.defined;" line at the beginning. | 04:10 | ||
isBEKaml | tylercurtis: I agree with you there. self.method-name() is not too different from doing this.method-name() in other languages - apart from the fact that the method call happens only within the object's own blueprint of the class' method. | 04:15 | |
tylercurtis++ # I now see what he was driving at.. | 04:22 | ||
tylercurtis | I'm not really decided on whether I agree with not having the distinction yet, but I'm definitely finding myself doing stuff like that far more often in Perl 6(and even in NQP) where the method works on either the proto-object or the instance than in other languages. | 04:25 | |
And that sentence of mine was badly ordered. put in Perl(and even in NQP) just before "than in other languages" in your mind if it sounds incoherent. | 04:26 | ||
isBEKaml | tylercurtis: self.new has no (AFAIK) equivalent in other languages and offers an advantage here in P6. However, we do object.getClass().newInstance() in Java. | 04:27 | |
tylercurtis: so we always get the class method first. | 04:28 | ||
tylercurtis | isBEKaml: right. Other languages can do it. Although, it's not always obvious how or if a language can do some of the things that the unity of "class" and "instance" methods in Perl 6 allows. | ||
In Smalltalk, I hadn't even realized that class methods inherited until just now when I checked, but with Perl 6, it's obvious that "class" methods are inheritable. | 04:29 | ||
isBEKaml | tylercurtis: Java has the concept of Reflection that is not quite obvious/intuitive. Some programmers use it (mostly library developers), most would just avoid it. You have to jump through to get at what you want here. | 04:30 | |
tylercurtis: the non-distinguishable nature of class/object methods are somewhat problematic when done incorrectly. (I had referred to GC issues before). I think Perl should just the Right Thing when it sees one. | 04:32 | ||
tylercurtis: duh.. sorry if I'm being somewhat incoherent. Please let me know.. | 04:33 | ||
tylercurtis | In one of my projects in NQP(it's my GSoC project, in fact), I use a helper class to implement the Tree::Pattern.transform method, which descends through a tree and transforms, using a supplied sub, any parts of the tree that match the pattern. However, I want to be able to create subclasses of both the pattern class and the helper class with additional functionality(for example, to traverse tree subtypes). | ||
So, I did the obvious thing and created a method on the parent class that returns the appropriate helper class. | 04:34 | ||
Conveniently, I can also call the method on the class to find out what its helper class is. | 04:36 | ||
It logically feels like a property(not in the "attribute"/"class/instance variable" meaning of the word, but in the "something that describes something") of the class, but it's more convenient to call on the instance in most cases. Best of both worlds. :) | 04:38 | ||
04:40
justatheory left
|
|||
isBEKaml | Right. :) I think we should restrict the use of class methods to `self` alone and using it on objects are somewhat misleading. | 04:43 | |
doing self.new.method looks cleaner than $obj.new.method. | |||
But I guess that would lead to problems in implementation. How do we do $obj.WHAT? Related, we are doing this reflectively... I have no answer.. :) | 04:44 | ||
tylercurtis: where can I find out about your GSoC project? URL? | 04:47 | ||
tylercurtis: I'm looking at this. trac.parrot.org/parrot/browser/bran...er/library | 04:50 | ||
04:58
rv2733 joined
|
|||
tylercurtis | isBEKaml: that's it. I moved it to github.com/ekiru/tree-optimization this weekend so that it's easier for people to try. | 05:03 | |
It's also available via plumage("./plumage install tree-optimization"). | 05:04 | ||
05:04
ashleydev_ joined
05:06
ashleydev left,
ashleydev_ is now known as ashleydev
|
|||
tylercurtis | isBEKaml: certain parts of it aren't fully documented(in part because I've got some significant refactors planned for some of those parts and didn't want to have to write and then soon after rewrite it :). | 05:10 | |
isBEKaml | tylercurtis: ty. But that's alright. I just wanted to look at what you were doing, not necessarily understand it. ;) | 05:12 | |
tylercurtis | More things about it to look at are available at www.parrot.org/blog/839 , where I've been posting blog posts weekly-ish that have varied from tutorials to descriptions of APIs I was planning to implement to simple descriptions of what I've done for the week. | 05:17 | |
isBEKaml | tylercurtis: great! that's nice. :) | 05:21 | |
05:22
PZt joined
|
|||
tylercurtis | I'll probably be posting another sometime tomorrow, too. :) It's always nice when people sound like they're interested in one's project. :) | 05:22 | |
isBEKaml | I don't know how that feels. I'm yet to get my own project up. :) | 05:23 | |
I'm currently trying to understand parrot and rakudo. So my project won't be up anytime soon. ;) | 05:25 | ||
tylercurtis: can you tell me what other optimisations are you targeting apart from tailcall recursions? | 05:31 | ||
05:31
masonkramer left
|
|||
isBEKaml | tylercurtis: I believe there might be more since your first post about PAST Optimizations. :) | 05:32 | |
sorear | apparently, now that ibus + anthy are working, my compose key /isn't/ | 05:34 | |
05:35
ashleydev left
05:37
redicaps joined
|
|||
tylercurtis | isBEKaml: Well, I've mostly been working on the infrastructure, so far, but I've got a working optimization for some tail-calls with an explicit return in NQP-rx(extending it further is blocking on better understanding of PAST::Op(:pasttype<call>) and :pirop<tailcall> nodes), and a prototype of very basic constant-folding of Integer addition for NQP-rx. I've also done quite a bit of constant-folding for PIRATE(which is a PIR compiler written in NQP wit | 05:37 | |
PCT). | |||
05:39
hercynium left
|
|||
tylercurtis | Most of the rest of my GSoC is scheduled for implementing specific optimizations, and I have a list somewhere of some possible ones to work on, so expect to see more coming soon. Another thing I might attempt to do is some sort of transformation from PAST to some kind of SSA form to make optimizations simpler. | 05:39 | |
05:43
rv2733 left
05:44
Mowah joined
|
|||
tylercurtis sleep 28800 & | 05:49 | ||
05:49
tylercurtis left
06:45
cono left
06:48
redicaps left
06:55
cono joined
06:59
Mowah left
|
|||
sorear | perl6: say class Foo { ... } | 07:05 | |
p6eval | pugs: OUTPUT«*** No such subroutine: "&class" at /tmp/KFCnPQxcsT line 1, column 5 - line 2, column 0» | ||
..rakudo 7579f7: OUTPUT«» | |||
sorear | rakudo: say (class Foo { ... }).WHAT | 07:06 | |
p6eval | rakudo 7579f7: OUTPUT«error:imcc:syntax error, unexpected '\n' in file 'EVAL_1' line 76===SORRY!===syntax error ... somewhere» | ||
sorear | what. | ||
07:06
xinming left
|
|||
isBEKaml | rakudo: say { class Foo {} }.WHAT; | 07:07 | |
p6eval | rakudo 7579f7: OUTPUT«Block()» | ||
isBEKaml | rakudo: say { (class Foo {}).WHAT } | 07:08 | |
p6eval | rakudo 7579f7: OUTPUT«_block64» | ||
isBEKaml | class Foo {} doesn't seem to be treated as an expression in a saycall. | ||
rakudo: say ({ class Foo {} }).WHAT; | 07:09 | ||
p6eval | rakudo 7579f7: OUTPUT«Block()» | 07:10 | |
isBEKaml | rakudo: say (class Foo{}.new.WHAT) | 07:18 | |
p6eval | rakudo 7579f7: OUTPUT«===SORRY!===Illegal redeclaration of symbol 'Foo'» | ||
isBEKaml | rakudo: say ((class Quux{}).WHAT) | 07:25 | |
p6eval | rakudo 7579f7: OUTPUT«Code()» | ||
07:27
mulander left
07:39
tedv left
|
|||
moritz_ | good morning | 08:03 | |
isBEKaml | moritz_: good morning! at Hackathon? :) | 08:05 | |
moritz_ | nope | ||
sorear | good morning moritz_ | 08:06 | |
(is the _ part of your name? You seem to use it unusually often here) | |||
moritz_ | sorear: the 'moritz' nick is registered on freenode, so I settled with moritz_ here permanently | 08:07 | |
and registered it | |||
08:16
meppl joined
|
|||
moritz_ | speaking of freenode... the FAQ says that if somebody hasn't logged in for three month, it's possible to request that their nick is being freed | 08:19 | |
can I find out what was the last login date of a given nick? | |||
dalek | ecza: b125222 | sorear++ | (3 files): Implement a system of auxilliary stacks |
||
ecza: 7943914 | sorear++ | (4 files): More steps towards class decls. Allow lexget et al to directly access |
|||
ecza: 13b25f8 | sorear++ | (7 files): Add class statements |
|||
08:20
xinming joined
|
|||
TiMBuS | moritz_, /ns info moritz | 08:22 | |
Last seen : Mar 23 20:57:22 2010 (15 weeks, 4 days, 11:24:19 ago) | |||
moritz_ | TiMBuS: thanks | ||
TiMBuS | its an 8 year old nick tho, so | ||
yeah you might be stuck with the _ | 08:23 | ||
sorear | 03:24 [freenode] -!- moritz [~moritz@p579F9664.dip.t-dialin.net] | 08:25 | |
03:24 [freenode] -!- ircname : Moritz Lenz | |||
03:24 [freenode] -!- moritz_ [moritz@faui2k3.org] | |||
03:24 [freenode] -!- ircname : Moritz Lenz | |||
there are 2 active freenode connections here | |||
moritz_ | sorear: yes, just tired it... | ||
*tried | |||
sorear: the nick without the _ is registered by somebody else | |||
sorear | according to the freenode FAQ, a nick is considered expired after 60 days without use | ||
moritz qualifies almost twice over | 08:26 | ||
what does also :foo<bar> mean | 08:37 | ||
moritz_ doesn't quite understand 'also' | 08:38 | ||
sorear | also is new, less confusing syntax for something old | 08:39 | |
class Foo { also is Bar; } # new | 08:40 | ||
class Foo { is Bar; } # old | |||
class Foo is Bar { } # old and new, equivalent | |||
moritz_ | I understood that much, but I don't see how it works, in terms of parsing or underlying semantics | ||
sorear | it just lets you put traits inside the class body | 08:41 | |
if you don't want to put them in the header | 08:42 | ||
no semantic or parsing changes required | |||
moritz_ | sounds like something you could achieve with a module too | 08:43 | |
sorear | with a module too? | ||
moritz_ | I mean, it sounds like it doesn't need to go into core Perl 6, IMHO | 08:44 | |
sorear | nope | 08:45 | |
98% of the stuff in core Perl 6 doesn't need to be there, and this is no exception | 08:46 | ||
08:48
eternaleye left
08:57
Ross joined
08:58
Ross left
08:59
Ross joined,
Ross left,
Ross joined,
Ross left
09:07
Ross joined
09:08
Ross left
09:10
tadzik joined
09:16
pmurias joined
|
|||
pmurias | moritz_: ping | 09:16 | |
moritz_ | pmurias: pong | ||
pmurias | moritz_: still blocking on CHI? | 09:17 | |
moritz_ | pmurias: yes | ||
pmurias | comment the dependency out ;) | ||
dalek | ecza: 53b6cdf | sorear++ | (2 files): Implement 'also' |
||
ecza: 6e9becd | sorear++ | (4 files): Implement superclasses for also |
|||
ecza: 676bde0 | sorear++ | (2 files): Implement in-header trait syntax |
|||
ecza: 8da9e3d | sorear++ | (2 files): With no explicit superclasses, automatically add an Any superclass |
|||
ecza: 32d2ad5 | sorear++ | setting: A bunch of stub classes |
|||
sorear | niecza just jumped from 5 classes to ~50 | ||
sorear | since I've got class syntax working... took long enough. | 09:18 | |
moritz_ | sorear: should I investigate setting niecza up on p6eval? | ||
sorear | next up: methods. then, control structures | 09:19 | |
moritz_: niecza is going to become much easier to set up very soon | |||
pmurias notices perlito has a python backend | |||
sorear | once I can use pmurias++'s STD dist instead of hardcoding a path to my pugs checkout | 09:20 | |
moritz_ | sorear: then I'll wait... just tell me when you think it's time to add it | ||
sorear | (yes, I have hardcoded paths in a public git repo. I feel just a bit dirty for it.) | ||
moritz_ | pmurias: perlito seems to have quite a few backends :-) | ||
sorear out. | 09:21 | ||
pmurias | sorear: what do you need to use my STD dist? | ||
it use it for mildew currently | |||
s/it/i/ | 09:22 | ||
sorear | pmurias: it being announced and on CPAN, ideally | 09:23 | |
09:24
Ross joined
|
|||
sorear out for real. | 09:24 | ||
09:28
agentzh joined
|
|||
pmurias | moritz_: what's the best way to have an optional dependency? | 09:28 | |
moritz_ | pmurias: the META.yaml file has a "recommends" field, iirc | 09:29 | |
09:29
azert0x joined,
azert0x left
09:30
azert0x joined,
azert0x left
|
|||
moritz_ | oh, that's deprecated :/ | 09:30 | |
09:30
azert0x joined
|
|||
pmurias | an optional dependency will show up as a prompt to the user? "do you want to install 1 optional dependency?" | 09:30 | |
those are annoying | |||
moritz_ | search.cpan.org/~dagolden/CPAN-Meta...pm#prereqs | ||
runtime => { recommends => { CHI => '0.35' } } | 09:31 | ||
no idea how installer handle it | |||
pugssvn | r31618 | pmurias++ | [mildew] temporary disable the CHI dependency for moritz++ | 09:33 | |
pmurias | moritz_: try installing now | ||
moritz_: i think i'll just move Mildew::Frontend::STD::Cached into a seperate package | 09:34 | ||
moritz_ tries | |||
09:34
tadzik left
|
|||
moritz_ | Successfully installed Mildew-0.01 | 09:35 | |
what's next? SMOP? | |||
pmurias | yes | 09:36 | |
moritz_ | then.. Mildew-Setting-SMOP? | ||
pmurias | yes | ||
moritz_: smop installed? :) | 09:37 | ||
moritz_ | yes | ||
pmurias | good | ||
moritz_ | Mildew-Setting-SMOP too | ||
so, how do I run it? :-) | |||
pmurias | mildew -e 'say 1' | ||
it's installed into a non-default local::lib? | |||
moritz_ | ... and now I have to fix up @INC. | ||
09:38
tadzik joined
|
|||
tadzik | wklej.org/id/363056/ can someone show me the way? (line #37) | 09:39 | |
moritz_ | tadzik: try: method clear { $!z = 0; nextsame; } | 09:40 | |
pmurias | moritz_: eval $(perl -I$HOME/perl5/lib/perl5 -Mlocal::lib)? | 09:41 | |
moritz_ | pmurias: p6eval@debian:~$ ./mildew-install/bin/mildew | ||
Can't locate MildewCORE.lex in @INC (@INC contains: lib mildew-install/lib/perl5//x86_64-linux-gnu-thread-multi mildew-install/lib/perl5/ /etc/perl /usr/local/lib/perl/5.10.0 /usr/local/share/perl/5.10.0 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10 /usr/local/lib/site_perl .) at mildew-install/lib/perl5//CursorBase.pm line 320. | |||
find mildew-install/ -name MildewCORE.lex # no result | |||
pmurias | you installed Mildew-Setting-SMOP? | ||
moritz_ | yes | ||
pmurias | that's bad | ||
pmurias tried removing his local lib and installing everything on his box | 09:42 | ||
moritz_ | I can try again | ||
pmurias | * tries | ||
moritz_: wait with that | |||
moritz_ | Successfully installed Mildew-Setting-SMOP-0.01 | ||
pmurias | nopaste the ~/.cpanm/build.log? | 09:43 | |
(hint App::Nopaste is really usefull) | 09:44 | ||
moritz_ | pmurias: nopaste.snit.ch/21931 | 09:45 | |
tadzik: nopaste.snit.ch/21932 | 09:47 | ||
09:48
Trashlord left
|
|||
pmurias | hmm | 09:48 | |
moritz_: i found a different bug in Mildew-Setting-SMOP | 09:49 | ||
09:49
Trashlord joined
|
|||
pmurias | moritz_: can you find Mildew and SMOP filed in mildew-install? | 09:49 | |
moritz_ | mildew-install/lib/perl5/Mildew/Setting/SMOP.pm | 09:50 | |
mildew-install/lib/perl5/SMOP.pm | |||
when looking for SMOP.pm | 09:51 | ||
pmurias | moritz_: STD.pmc? | ||
moritz_ | mildew-install/lib/perl5/Mildew.pm | ||
mildew-install/lib/perl5/STD.pmc | |||
pmurias | moritz_: what i suspect is the Build process die'ing because of badly set @INC | 09:55 | |
dzil build;cd Mildew-Setting-SMOP;perl Build.pl;perl Build | 09:56 | ||
should return more info | |||
cd Mildew-Setting-SMOP-0.1 | |||
* 0.01 | |||
pmurias fixes an other bug in the build process... | 09:57 | ||
moritz_ | rakudo: die 2 | 09:59 | |
p6eval | rakudo 7579f7: OUTPUT«2 in main program body at line 20:/tmp/iWSoE1QX01» | ||
tadzik | moritz_: so before would be { nextsame; $.z = 0 } ? | ||
moritz_ | tadzik: actually it's the other way round | 10:01 | |
tadzik | or no, that'd be after | ||
yep | |||
then around is just a method with nextsame() in the middle. Makes sense, even better than in Moose | |||
moritz_ | nextsame just calls the next available method with the same name, and the same parameters as the current method | 10:02 | |
tadzik | so it looks up the parent class, the roles etc? | ||
moritz_ | and multi methods from the same class, if applicable | 10:03 | |
tadzik | mhm | ||
moritz_ | roles are flattened into classes at composition time, so they don't need to be considered specifically | ||
tadzik | I see. Thanks, moritz_++ | 10:04 | |
moritz_ | you're welcome | ||
you can also specifically call a method from another class | |||
so self.Point::clear() | |||
arnsholt | Right, my given/when for NQP is pretty much done | 10:14 | |
I got commit access to the repo at some point, so does pushing the branch to Github sound like a resonable way to submit it for review? | |||
10:24
isBEKaml left
|
|||
moritz_ | yes | 10:26 | |
arnsholt | Excellent | 10:27 | |
And done | 10:30 | ||
moritz_ | arnsholt++ | ||
10:44
timbunce joined
|
|||
TiMBuS | if i add two roles and they have a conflicting method, is there a way to disambiguate? or does the flattening make this not possible | 10:48 | |
Method 'dothing' collides and a resolution must be provided by the class | 10:52 | ||
oh ok | |||
that warning isnt thrown when using 'but' | |||
or, i guess, any kind of runtime composition | 10:53 | ||
10:58
whiteknight joined
|
|||
pugssvn | r31619 | colomon++ | [t/spec] Update fudging. | 11:07 | |
11:07
colomon joined
11:09
tadzik left,
agentzh left
|
|||
pugssvn | r31620 | pmurias++ | [mildew] fix a bug in the build process | 11:25 | |
pmurias | moritz_: maybe that will help with the installation of mildew (install mildew and mildew-setting-smop again) | ||
pugssvn | r31621 | pmurias++ | [mildew] add basic tests that check if Mildew-Setting::SMOP builds correctly | 11:37 | |
11:40
colomon left
|
|||
moritz_ | pmurias: # Failed test at t/01-tmp-is-created.t line 2 | 11:52 | |
all 6 subtests fail | |||
11:53
Guest38594 joined,
Guest38594 is now known as pragma_
|
|||
pmurias | moritz_: dzil build | 11:53 | |
moritz_: in Mildew-Setting-SMOP | |||
then perl Build.pl | |||
then perl Build | |||
and perl Build test | 11:54 | ||
that will allow us to see when do the errors happen | |||
moritz_ | doesn't reveal more details | 11:55 | |
building works | |||
the test doesn't | |||
no error messages except for "Failed test..." | 11:56 | ||
szabgab | I understand proto is now out and one should use pls ? | ||
where is pls ? | |||
pmurias | moritz_: is tmp created | ||
? | |||
moritz_ | szabgab: pls is only a proof-of-concept so far | 11:57 | |
pmurias | moritz_: run the test manually | ||
moritz_ | szabgab: so continue running proto for now | ||
no tmp/ created | |||
that's why the test fails :-) | |||
szabgab: and FYI, 'pls' is a branch in the proto repo | 11:58 | ||
pmurias | moritz_: perl -MSTD works? | ||
szabgab | ty | ||
pmurias | moritz_: make sure you don't have the STD from src/perl6 in your @INC | 11:59 | |
moritz_ | ugh, I had a relative path in PERL5LIB | ||
which didn't work out for installing Mildew | |||
pmurias: now perl -MSTD -e 1 works, but no tmp created | 12:00 | ||
pmurias | you ran perl Build again | ||
moritz_ | yes | ||
pugssvn | r31622 | pmurias++ | [mildew] remove a file which crept up into the repo | 12:03 | |
pmurias | Mildew-Setting-SMOP-0.01.tar.gz was creted by dzil build? | ||
* created | |||
moritz_ | pmurias: yes, that's where I run perl Build.PL | ||
pmurias | an old one crept into the repo so that's why i ask | 12:04 | |
moritz_ | btw is the 'diff' file there on purpose? | ||
moritz_ tries again | |||
still no tmp | 12:05 | ||
pugssvn | r31623 | pmurias++ | [mildew] remove trash found by mortiz++ | 12:06 | |
pmurias | moritz_: check if ACTION_code is called by inc/MyBuilder.pm | ||
inserting a warn should do | |||
pmurias updates Module::Build | 12:07 | ||
moritz_ | pmurias: it is not | 12:08 | |
moritz_ has Module::Build version 0.3603 | 12:09 | ||
pmurias has 0.3607 | 12:11 | ||
moritz_: try perl Build code? | 12:12 | ||
moritz_ | seems like a noop | 12:13 | |
szabgab | moritz_: looking at the book I see some of the chapeters in src/ that are not included in the Makefile , is that on purpose? | ||
pmurias | moritz_: that's worring | 12:14 | |
moritz_: could you nopaste your Build.PL | |||
? | |||
moritz_ | szabgab: afaict only builtins.pod shouuld not be included | ||
pmurias: nopaste.snit.ch/21934 | 12:15 | ||
szabgab: are others missing too? | |||
szabgab | and why not include it with a big todo? | ||
pmurias | moritz_: that's bad | ||
szabgab | checking | ||
pmurias | moritz_: that's seems to be the problem | ||
moritz_ | szabgab: we had some ongoing discussions whether it should be a proper chapter or an appendix, and then I forgot | 12:16 | |
szabgab: feel free to change though | |||
12:16
clintongormley joined
|
|||
pmurias | moritz_: could you dzil build in smop and nopaste the Build.PL from there? | 12:16 | |
szabgab | roles and subtypes are also missing from Makefile | ||
moritz_ | szabgab: that's bad... fixing... | ||
szabgab | I can fix it | 12:17 | |
I was just asking | |||
moritz_ | szabgab: even better :-) | ||
szabgab | as trying to get involved | ||
but I though I should first read what is there already :) | |||
what about creating a perl script insted of the make file ? | |||
moritz_ | what would be the benefit? | 12:18 | |
szabgab | checking for files not included in makefile | ||
pmurias | moritz_: maybe your dist::zilla version is different | ||
szabgab | or the files could be renamed to 01_prefix.pod etc | 12:19 | |
and build the list of files on the fly | |||
moritz_ | nopaste.snit.ch/21935 | ||
szabgab: if you want to do that, please check with lucs on #perl6book first, he might have some planned changes | |||
szabgab: and I don't like the number prefix, because we might still add chapters | 12:20 | ||
12:20
masak joined
|
|||
masak | oh hai, #perl6! | 12:20 | |
moritz_ | pmurias: Dist::Zilla version 4.101900 | 12:21 | |
masak: oh hai. I've added some crude line wrapping code into XML::Writer | |||
masak | ok. | 12:22 | |
pmurias | moritz_: nopaste your dist.ini | ||
masak | last night after logging off, instead of sleeping, I wrote that new Yapsi runtime. :) | ||
it was exactly the fun I had pictured it to be. | |||
pmurias | moritz_: from Mildew-Setting-SMOP | ||
moritz_ | pmurias: isn't that under version control? | ||
pmurias | yes | 12:23 | |
moritz_ | well, I didn't change it :-) | ||
Last Changed Rev: 31607 | |||
pmurias | moritz_: you have an incorrect Build.PL | ||
moritz_: you have App::nopaste installed? | 12:25 | ||
* App::Nopaste | |||
moritz_ | no | ||
but that's easyenough to change :-) | |||
pmurias | then you could nopaste stuff with "nopaste file" | 12:27 | |
moritz_: check the version NAME ^ | 12:29 | ||
of Dist::Zilla::Plugin::ModuleBuild | |||
moritz_: it seems our Dist:Zilla's behave differently | |||
12:30
timbunce left
|
|||
moritz_ | 2.101241 | 12:31 | |
pmurias | what? so your Dist::Zilla is made of different versions? | ||
perl -MDist::Zilla::Plugin::ModuleBuild -e 'print $Dist::Zilla::Plugin::ModuleBuild::VERSION' | 12:33 | ||
moritz_ | huh | ||
that's 4.101900 | |||
I got my version from looking into the module | |||
package Dist::Zilla::Plugin::ModuleBuild; | 12:34 | ||
BEGIN { $Dist::Zilla::Plugin::ModuleBuild::VERSION = '2.101241'; | |||
} | |||
seems to get overridden later on | |||
moritz_ shudders | |||
masak | jnthn: ping | ||
12:35
f00li5h joined
12:36
f00li5h left,
f00li5h joined,
f00li5h left,
f00li5h joined
12:37
f00li5h left,
f00li5h joined
|
|||
masak | f00li5h: stop that. :) | 12:37 | |
pmurias | moritz_: that's a leftover file from an old Dist::Zilla | 12:38 | |
moritz_: www.yourcargo.org/Mildew-Setting-SM....01.tar.gz | 12:40 | ||
12:40
lichtkind joined
|
|||
lichtkind | cheers | 12:41 | |
masak | \o | ||
pmurias | moritz_: you could try using that tarball if you Dist::Zilla is a strange hybrid | ||
12:42
s1n joined
|
|||
moritz_ | which depends on yet another new module. *sigh* | 12:45 | |
Can't locate Config/AutoConf.pm in @INC | |||
12:46
PenThrive left
|
|||
f00li5h | masak: turns out that i forgot about /connect -! ... | 12:46 | |
masak | f00li5h: no worries. :) | 12:47 | |
gist.github.com/471521 # yay! new runtime! | |||
12:47
takadonet joined
|
|||
takadonet | morning all | 12:48 | |
masak | takadonet: \o | ||
takadonet | masak: how are u? | ||
masak | takadonet: it's way too warm here in my part of the world, but I'm inside, and coding Perl 6, so I guess I'm fine. :) | ||
takadonet: and u? | 12:49 | ||
takadonet | masak: at ISMB right now waiting for the keynote speaker to start | ||
masak | nice. | ||
takadonet | masak: you do bioinformatics correct? | ||
masak | I try to. :) | 12:50 | |
takadonet | :) | ||
12:51
Ross left
|
|||
takadonet | masak: www.slideshare.net/bosc2010/fields-...10-bioperl | 12:52 | |
moritz_ | pmurias: with your tarball I get "Can't stat tmp: No such file or directory at /opt/perl-5.12.1/lib/5.12.1/Module/Build/Base.pm line 4858 | ||
masak looks | |||
moritz_ | " | ||
which is non-fatal | |||
takadonet | people were happy to see some bioperl6 code :) | ||
moritz_ | but later it dies with Can't locate object method "compile" via package "Mildew::Backend::C::So" at /home/p6eval/mildew-install/lib/perl5//Mildew/Compiler.pm line 21 | ||
(while running ./Build) | |||
masak | takadonet: yoy, Perl 6 is mentioned, at least :) | 12:53 | |
takadonet | masak: with some of my code! hehe | ||
12:54
sftp joined
|
|||
takadonet | masak: with help from you and moritz_ | 12:54 | |
moritz_ bows | |||
takadonet | bbl presentation is starting | ||
12:55
takadonet left
|
|||
pmurias | moritz_: is Mildew::Backend::C::So installed? | 12:56 | |
12:56
agentzh joined
|
|||
masak | takkadonet: very nice. takadonet++ | 12:56 | |
pmurias | moritz_: the non fatal warning is expected | 12:57 | |
moritz_: who own's the evalbot box? | |||
* owns | 12:59 | ||
cosimo | rakudo: my %h=('a'=>1,'b'=>2); my $h_ref=\%h; say $h_ref<a>; | 13:00 | |
p6eval | rakudo 7579f7: OUTPUT«Null PMC access in type() in main program body at line 20:/tmp/y9fWXYyJS1» | ||
cosimo | rakudo: my %h=('a'=>1,'b'=>2); my $h_ref=\%h; say $h_ref.perl; | ||
p6eval | rakudo 7579f7: OUTPUT«\("b" => 2, "a" => 1)» | ||
cosimo | rakudo: my %h=('a'=>1,'b'=>2); my $h_ref=\%h; say ${h_ref}<a>; | 13:04 | |
p6eval | rakudo 7579f7: OUTPUT«===SORRY!===Confused at line 20, near "say ${h_re"» | ||
cosimo | rakudo: my %h=('a'=>1,'b'=>2); my $h_ref=\%h; say $$h_ref<a>; | ||
p6eval | rakudo 7579f7: OUTPUT«===SORRY!===Confused at line 20, near "say $$h_re"» | ||
cosimo | rakudo: my %h=('a'=>1,'b'=>2); my $h_ref=\%h; say %h_ref<a>; | ||
p6eval | rakudo 7579f7: OUTPUT«===SORRY!===Symbol '%h_ref' not predeclared in <anonymous> (/tmp/HBwUba7bcT:20)» | ||
cosimo | rakudo: my %h=('a'=>1,'b'=>2); my $h_ref=\%h; say %{$h_ref}<a>; | ||
p6eval | rakudo 7579f7: OUTPUT«» | ||
moritz_ | pmurias: diakopter owns it | 13:05 | |
cosimo | rakudo: my %h=('a'=>1,'b'=>2); my $h_ref=\%h; say %$h_ref<a>; | 13:06 | |
p6eval | rakudo 7579f7: OUTPUT«Null PMC access in find_method('HOW') in main program body at line 1:/tmp/MEHuxodZza» | ||
cosimo | rakudo: my %h=('a'=>1,'b'=>2); my $h_ref=\%h; my %g = Hash($h_ref); say %g<a>; | 13:09 | |
p6eval | rakudo 7579f7: OUTPUT«Could not find sub &Hash in main program body at line 20:/tmp/uq2GdO8qo_» | ||
cosimo | rakudo: my %h=('a'=>1,'b'=>2); my $h_ref=\%h; my %g = %$h_ref; say %g<a>; | ||
p6eval | rakudo 7579f7: OUTPUT«===SORRY!===Confused at line 20, near "my %g = %$"» | ||
cosimo | mm | ||
pmurias | diakopter: ping | 13:12 | |
moritz_: try perl -MMildew::Backend::C::So -e 1 | 13:14 | ||
cosimo | rakudo: my %h=('a'=>1,'b'=>2); my $h_ref=\%h; my %g = $h_ref; say %g<a>; | ||
p6eval | rakudo 7579f7: OUTPUT«1» | ||
cosimo | shiny | ||
but isn't there a direct way? | 13:15 | ||
i'd have expected $h_ref.<a> to work | |||
rakudo: my %h=('a'=>1,'b'=>2); my $h_ref=\%h; say $h_ref.{'a'} | |||
p6eval | rakudo 7579f7: OUTPUT«Null PMC access in type() in main program body at line 20:/tmp/NRIhf8BtHO» | ||
cosimo | mmh | ||
13:18
tadzik joined
|
|||
masak submits rakudobug | 13:23 | ||
by the way, why isn't .invert in Cool? I wanted to use it on a List last night, and it turns out it's only defined for Hash. | 13:24 | ||
moritz_ | pmurias: fails, with 80 lines of "Couldn't load class" error messages. And App::Nopaste refuses to install | 13:25 | |
afk | |||
masak | rakudo: say (\my %h)<a> | 13:28 | |
p6eval | rakudo 7579f7: OUTPUT«Null PMC access in type() in main program body at line 20:/tmp/7teqOLAaKD» | ||
cosimo | rakudo: my $x = "someThing"; say $x ~~ m:i/something/; | ||
p6eval | rakudo 7579f7: OUTPUT«===SORRY!===Confused at line 20, near "say $x ~~ "» | ||
cosimo | rakudo: my $x = "someThing"; say $x ~~ m/something/; | ||
p6eval | rakudo 7579f7: OUTPUT«» | ||
cosimo | rakudo: my $x = "someThing"; say $x ~~ m/someThing/; | ||
p6eval | rakudo 7579f7: OUTPUT«someThing» | ||
cosimo | are regex modifiers broken? | 13:29 | |
masak | rakudo: my $x = "someThing"; say $x ~~ m/:i something/; | ||
p6eval | rakudo 7579f7: OUTPUT«someThing» | ||
masak | cosimo: NYI on the outside, that's all. | ||
cosimo | masak: NIY you mean? | ||
masak | I hear both abbreviations. | ||
NYI is the more common, though. | 13:30 | ||
cosimo | ok :) | ||
masak | they mean the same. | ||
cosimo | but the "Correct(tm)" form is m:i// then? | ||
masak | yes, I'd say so. | 13:31 | |
IIRC, the tricky part with implementing it was to change the regex after it had been compiled. | |||
since ':i' on the inside is how it "actually works", at least in PGE and nqp-rx. | 13:32 | ||
13:32
whiteknight left
|
|||
moritz_ | there is no "change the regex after it had been compiled" | 13:38 | |
the :i must be passed on the regex compiler | 13:39 | ||
currently the tricky thing with implementing adverbs in rakudo is not to make anything unrelated parsefail | |||
masak | ah. | 13:42 | |
moritz_ | I tried adding a simple ':g'? after the 's' parsing for s/// | ||
and it would then parsefail identifies starting with s. | 13:43 | ||
"huh". | |||
jnthn | masak: pong | ||
cosimo | rakudo: my @x = ('5c', 'Blah', '10', 'Blah'); say @x.shift.Int; | 13:44 | |
p6eval | rakudo 7579f7: OUTPUT«5» | 13:45 | |
cosimo | cool | ||
how do I convert, say '5c' to decimal? | |||
rakudo: say '5c'.hex; | |||
p6eval | rakudo 7579f7: OUTPUT«Method 'hex' not found for invocant of class 'Str' in main program body at line 20:/tmp/hruYr0rHDd» | 13:46 | |
moritz_ | rakudo: say :16('5C') | ||
p6eval | rakudo 7579f7: OUTPUT«92» | ||
masak | jnthn: remember we talked about SIC and explicitly putting in an 'outer' pointer from an inner block to its outer block? | ||
jnthn | Yes | 13:47 | |
masak | jnthn: I've forgotten your reson for why that was necessary; and now I have things working without it... :) | 13:48 | |
jnthn | Well, pointer sounds runtime-y | ||
masak | so there's probably something I'm missing. | ||
yes, the pointer became entirely runtime-y. | |||
jnthn | OK, and how do you know from the IL which block is nested inside which? | ||
cosimo | rakudo: my $hex = '5c'; say :16($hex); | ||
masak | but PIR has a static :outer() thingy. | ||
p6eval | rakudo 7579f7: OUTPUT«92» | ||
cosimo | rakudo: my $hex = '5c2f'; say :16($hex); | 13:49 | |
masak | jnthn: "IL"? | ||
p6eval | rakudo 7579f7: OUTPUT«23599» | ||
jnthn | SIC? | ||
cosimo | moritz_: masak: thanks | ||
masak | SIC currently doesn't know, doesn't care. | ||
jnthn | Um | ||
masak | the compiler cares, and the runtime cares. | ||
but not SIC. | |||
jnthn | So how do you know how to set up the links between blocks? | ||
That information must be *somewhere*? | |||
masak | well, the outer block takes a closure to the inner block at runtime. | 13:50 | |
at that point, an 'outer' pointer is made. | |||
this will work for subs as well as simpler things like immediate blocks. | 13:51 | ||
jnthn: here's an example of it working: gist.github.com/471521 | 13:52 | ||
jnthn | Right, so that's where you have said info in the bytecode. It builds the links like that. | ||
pmurias | shouldn't we have a nopaste mentioned in the topic? | ||
masak | jnthn: yes. so now I'm left wondering what PIR uses its :outer() attribute for :) | 13:53 | |
jnthn: since the blocks in SIC are about as static as static lexpads, and don't have much relation to the lexpads at runtime. | 13:54 | ||
jnthn | masak: e | ||
You aren't assuming that caller = outer here are you? | 13:55 | ||
masak | gosh, I hope not. :) | ||
13:55
rv2733 joined
|
|||
masak | for a while yesterday, I think I was. | 13:55 | |
but now I think I'm not, since it's all about when the closure is taken. it's taken at block entrance. | |||
after that, it might be called at any time, and will still have the right 'outer'. | 13:56 | ||
jnthn | rakudo: my $x = 42; sub foo { our sub bar { say $x } }; { my $x = 69; bar() } | ||
p6eval | rakudo 7579f7: OUTPUT«42» | ||
jnthn | masak: Will you get that right under your model? | ||
Here the foo block was never entered. | |||
masak | hm. | ||
that'll take the closure at CHECK time or something like that, I assume. | 13:57 | ||
rakudo: my $x = 42; sub foo { $x = 5; our sub bar { say $x } }; bar; foo; bar; | 13:58 | ||
p6eval | rakudo 7579f7: OUTPUT«425» | ||
masak | and it'll re-rake the closure if foo is ever entered. | ||
jnthn | I guess it just feels odd to me to set up the static chain dynamically, that's all. | ||
masak | yes, I think I have the model right in my head. :) | ||
willing to be proven wrong, of course. | |||
jnthn: well, it just feels wrong to put in something that I never end up using... | 13:59 | ||
rakudo: sub foo { my $y; our sub bar { say $y } }; bar | |||
p6eval | rakudo 7579f7: ( no output ) | ||
masak | this is problematic in my model. :/ | ||
and seemingly in Rakudo's, too :) | 14:00 | ||
locally, Null PMC access. | |||
masak submits rakudobug | |||
jnthn | Ugh | ||
Yeah, that's why we need the proto-lexpads. | |||
masak | yep. | 14:01 | |
let's call them 'static lexpads', like pmichaud has started doing. | |||
I'm going to have to think about that case some more. | |||
but probably when the closure is taken at CHECK time, it'll use the static lexpad as its .outer | 14:02 | ||
and then it works. | |||
14:02
slavik joined
|
|||
jnthn | Anyway, my answer in summary is, with the model you've adopted you don't need to say in the code 'my outer is X'. However, I know which model I prefer. :-) | 14:02 | |
masak | noted. :) | 14:03 | |
well, it just seemed to me there was a category in there somehow, at least in the way PIR does it. the :outer() thingies refer to other subs, i.e. static things in the code. whereas I needed to refer to outer lexpads, live things in the runtime. | 14:04 | ||
moritz_ | as soon as you start to optimize, you will be glad for every piece of information | ||
masak | the same block of code may have zero, one or several lexpads "associated" with it. | 14:05 | |
slavik | so, how much openmp type stuff will there be in Perl6? ;) | ||
masak | so pointing back to the parent *block* doesn't really tell me much anyway, it seems. | ||
s/parent/outer/ | |||
moritz_ | slavik: as much as people implement | ||
slavik | :( | 14:06 | |
masak | slavik: sorry, expecting a free lunch? :P | ||
slavik: is there funding money involved? | |||
slavik | masak: I wish ;) | ||
moritz_ | slavik: well, it's true for any other feature too | ||
slavik | honestly though, I wish there was a finalized spec | ||
hint hint wink wink | 14:07 | ||
*cough* TimToady *cough* | |||
moritz_ | considering how many quirks we found in the exisiting spec so far, finalizing it before it was implemented seems like a direct way to failure | ||
slavik | the moment there is, I think I will start to use Perl6 more seriously. | ||
masak | slavik: I used to wish for that, too. now I wish the spec freezes gracefully. | ||
slavik | moritz_: I am not accounting or implementation in that statement. | 14:08 | |
masak | slavik: the fact that you aren't... :) | ||
slavik | masak: I think you put it in better terms :) | ||
masak | that's why the spec *is* changing nowadays is mainly because of the implementations! | ||
moritz_ | slavik: you can't separate spec from implementation to the extend you like | ||
slavik | moritz_: not talking about separating them. | 14:09 | |
masak | we know what we want from Perl 6, but some ideas need tweaking when the rubber meets the road. | ||
moritz_ | so what do we want from Perl 6? :-) | ||
slavik | moritz_: it's in the sense of learning something and not having it change the next day ;) | ||
moritz_: cake | |||
and flying pigs | |||
moritz_ had cake today | 14:10 | ||
slavik | >.> | ||
moritz_ | strawberry and cream | ||
slavik | yea? well, one of my friends is a baker! take that! | ||
moritz_ | there's still some in the kitchen :-) | ||
moritz_ read "bake that" :-) | |||
slavik | haha | ||
pmurias | moritz_: diakopter is the one who could give me a acoount on the evalbot box? | 14:11 | |
moritz_ | pmurias: yes. Normally I could too, but I forgot my password :/ | ||
masak | moritz_: I want a simple, reliable model that I can't get into my head, and that my mind doesn't reject because it's inelegant. lately, with things coming together in Rakudo with nesting/OO/different kinds of variables, I've been getting a tast of that. it's wonderful. | 14:12 | |
s/can't/can/ | |||
14:13
kid51 joined
|
|||
pmurias | moritz_: why does App::Nopaste refuse to install? | 14:13 | |
moritz_ wonders if Perl 6 fits into a model that fits into your head :-) | |||
or mine | |||
pmurias: a dependency fails, HTTP::Server::Simple or so | |||
even though I don't want to run a server, just a client | |||
cosimo | rakudo: my @x = 1, 2, 3; @x[2]:delete; say @x; | 14:14 | |
p6eval | rakudo 7579f7: OUTPUT«===SORRY!===Confused at line 20, near "@x[2]:dele"» | ||
cosimo | rakudo: my @x = 1, 2, 3; @x[2].delete; say @x; | ||
p6eval | rakudo 7579f7: OUTPUT«Method 'delete' not found for invocant of class 'Int' in main program body at line 20:/tmp/GSSwm0mafY» | ||
moritz_ | operator adverbs NYI | ||
rakudo: my @x = 1, 2, 3; @x.delete(2); say @x.perl | |||
p6eval | rakudo 7579f7: OUTPUT«[1, 2]» | ||
moritz_ | rakudo: my @x = 1, 2, 3; @x.delete(1); say @x.perl | ||
masak | simple example: in github.com/masak/proto/blob/pls/t/s...ith-test.t , the @actions variable is threaded into the scopes of methods in mocking subclasses of the classes I want to test. as a consequence, I can run the code I want to test, and then inspect @actions. such a simple thing, but having all the components for it to work... is great. | ||
p6eval | rakudo 7579f7: OUTPUT«[1, Any, 3]» | ||
cosimo | moritz_: thanks | 14:15 | |
masak | moritz_: by the way, do you agree that .invert could well be on List, instead of on EnumMap? | ||
cosimo | rakudo: my @x = 1, 2, 3; splice(@x, 1); say @x; | ||
p6eval | rakudo 7579f7: OUTPUT«1» | ||
14:15
nathan06 joined
|
|||
cosimo | rakudo: my @x = 1, 2, 3; splice(@x, 1, 1); say @x; | 14:15 | |
p6eval | rakudo 7579f7: OUTPUT«13» | ||
moritz_ | masak: on both, actually :-) | ||
cosimo | rakudo: my @x = 1, 2, 3; splice(@x, 1, 1); say @x.perl; | ||
slavik | not exactly perl6 related, but is there a gui/browser type app for cpan? (like synaptic but for cpan) | ||
p6eval | rakudo 7579f7: OUTPUT«[1, 3]» | ||
pmurias | moritz_: could you nopaste the 80 line error? | 14:16 | |
masak puts it on List | |||
pmurias | if it's so long surely it must be very usefull ;) | ||
14:16
takadonet joined
|
|||
masak | moritz_: what'd be the failure mode for trying to .invert an odd-elemented List? | 14:17 | |
moritz_ | masak: none. .invert just returns a list of Pairs | ||
masak doesn't follow | |||
moritz_: but what if the input List isn't a list of Pairs? | |||
moritz_ | oh wait | ||
rakudo: say {a => 1, b => 2}.perl | 14:18 | ||
p6eval | rakudo 7579f7: OUTPUT«{"a" => 1, "b" => 2}» | ||
moritz_ | rakudo: say {a => 1, b => 2}.invert.perl | ||
p6eval | rakudo 7579f7: OUTPUT«(1 => "a", 2 => "b")» | ||
moritz_ | see, list of pairs | ||
masak | oh, I guess it'd just do $list.hash.invert, and the error'll come from .hash | ||
moritz_: we're talking past each other. | |||
moritz_ | I'd think List.invert would turn <a b c> into a => 0, b => 1, c => 2 | ||
masak | yes, exactly. | 14:19 | |
so $list.kv.hash.invert, then. | |||
and it needs to be spec'd :) | |||
14:19
christine joined
|
|||
moritz_ | except that .hash would stringify the keys/indexes | 14:19 | |
masak | hm. | 14:20 | |
moritz_ | it's more like $list.pairs.map({ .value => .key}) | ||
masak | ah, better. | ||
masak likes | |||
jnthn | Comments welcome from @all on news.perlfoundation.org/2010/07/hag...eta-m.html | 14:21 | |
pmurias | moritz_: i'll try to install Mildew on a fresh 5.12.1 so that all the undeclared dependencies will be exposed | ||
masak read "hugme grant" :) | |||
moritz_ | jnthn: I have that open in my browser tab all day, in order not to forget commenting | ||
jnthn | masak: :) | 14:22 | |
moritz_: I only just noticed it was posted :-) | |||
moritz_ wrote hugme completly without a grant | |||
pmurias: nopaste.snit.ch/21938 | 14:23 | ||
I kinda think that different installation procedures took different perl versions | |||
but then I don't understand why noen of the unit tests failed | |||
*none | |||
masak | oooh, S09! | ||
14:24
tylercurtis joined
|
|||
pmurias | moritz_: that's a missing Devel::Declare | 14:24 | |
masak | jnthn: I'm reading the "Benefits..." section, and thinking "wow, yes! send the guy money!" | ||
"Accessing object attributes by index offset" \o/ -- today's theme, clearly. | 14:26 | ||
pmurias | moritz_: and MooseX::Declare is mentioned as Moose prereq | ||
p6eval: did you ran Build in the tarball with the same @INC settings as when installing Mildew? | |||
14:26
xlat joined
|
|||
pmurias | s/p6eval/moritz_/ | 14:27 | |
moritz_ | yes | ||
though I'm not entirely sure | |||
pmurias | you installed the things before with cpanm -L mildew-install? | ||
moritz_ | yes | 14:28 | |
masak | jnthn: all in all, looks very good. | ||
jnthn++ | |||
moritz_ | masak: then also comment on the blog post | ||
masak does so | |||
14:31
Ross joined
|
|||
pmurias | moritz_: try running cpanm -L mildew-install . in the unpacked tar ball | 14:31 | |
moritz_ | pmurias: I'll try tomorrow, now I'm frustrated and don't want to touch any CPAN-like things for a while :/ | 14:33 | |
pmurias | just run the command if it failes i'll ask diakopter for a commit bit and finish the Mildew installation myself ;) | 14:34 | |
moritz_ | yes, fails | 14:35 | |
masak | time to wash some clothes. will be back later tonight. | ||
14:35
masak left
|
|||
tylercurtis | jnthn: if the new P6object doesn't support multiple inheritance, Parrot will need to either keep the old P6object around or have a standard work-around that does. Or at least, if it doesn't, I'll complain loudly. :) | 14:35 | |
moritz_ hopes that NQP-rx will be that workaround | 14:37 | ||
jnthn | tylercurtis: The comment is a bit speculative. But more importantly, I doubt that most things will use the very core directly. They'll use a meta-object for classes that does support multiple inheritance. | 14:40 | |
Oops, about to fail at being on time for church | 14:41 | ||
jnthn back later | |||
moritz_ | I just wonder about the usefulness of natively typed attributes when we don't have variables to store them | 14:42 | |
but I guess we have to start with one of them :-) | 14:43 | ||
szabgab: any success with adding those chapters to the Makefile? | 14:55 | ||
14:57
masonkramer joined
|
|||
cosimo | rakudo: my $x = "加"; say $x.chars; | 15:04 | |
p6eval | rakudo 7579f7: OUTPUT«1» | ||
cosimo | rakudo: my $x = "加"; say $x.bytes; | ||
p6eval | rakudo 7579f7: OUTPUT«3» | ||
cosimo | cool | ||
15:06
takadonet left
|
|||
moritz_ | rakudo: 3 does True; | 15:08 | |
p6eval | rakudo 7579f7: ( no output ) | 15:09 | |
moritz_ | rakudo: say 3 does True; | ||
shouldn't that fail, because 3 is immutable? | |||
p6eval | rakudo 7579f7: ( no output ) | ||
moritz_ | says 3 here locally | ||
dalek | ok: 92dcca7 | moritz++ | src/roles.pod: apply some editorial advise; short explanation for infix:<but> |
15:23 | |
15:25
nathan06 left
15:34
Mowah joined
|
|||
cosimo | I just finished chunked transfers support for LWP::Simple -> bit.ly/bZW1xa | 15:35 | |
\o/ | |||
moritz_ | \o/ | 15:37 | |
cosimo++ | |||
15:38
skids left
|
|||
cosimo | I find myself *wanting* to write Perl 6 code more and more | 15:38 | |
moritz_ | the patch doesn't look too painful | 15:39 | |
cosimo | actually, it looks clean doesn't it? i'm sure it can be improved, but... | 15:42 | |
moritz_ | these days when I write Perl 6 code I spend far more time on the application logic, testing and debugging than on working around rakudobug or NYI features | ||
tadzik | cosimo: still no binary file support, no? | ||
getstore will work only for plaintexts | |||
moritz_ | cosimo: yes, looks clean... I meant it wasn't full of workarounds or so | 15:43 | |
moritz_ is looking for ideas for his weekly Perl 6 challenges | 15:45 | ||
15:45
skids joined
15:46
Lawn joined
15:47
Mowah left
15:49
skids left
15:51
kid51 left
15:55
takadonet joined,
skids joined
|
|||
takadonet | can a grammar with action method be lazy? In sense that once we have one 'full' record we stop parsing the file and allowed to resume later? | 15:58 | |
cosimo | tadzik: why not? | ||
tadzik: or, why it doesn't work for non-plaintext? | 15:59 | ||
16:00
xlat left
|
|||
moritz_ | takadonet: in ideal Perl 6, yes | 16:01 | |
takadonet | moritz_: but not currently? | ||
moritz_ | at least I think so | ||
not currently | |||
tadzik | cosimo: I remember writing similar getstore for your LWP some time ago. Downloaded binary files were just recognised as text files by the OS | 16:02 | |
moritz_ | currently you need to emulate the laziness by matching one item, lazily record that (via gather/take), and then anchor the next match | ||
with $str.match($regex, :p($previous_position) | 16:03 | ||
takadonet | currently i'm using gather and take but perhaps I'm not anchor the next match | ||
cosimo | tadzik: a couple of weeks ago I didn't have HTTP headers parsing either | 16:05 | |
so it should be different now, but I haven't tried binary files yet | |||
16:06
avar joined
|
|||
avar | Hi, who has access to the perl6 github account? Please remove my commit access to perl6/book. I keep getting github issue spam about it. | 16:07 | |
Someone added me to that account without me knowing about it | |||
moritz_ | sorry, forgot to remove you :( | 16:08 | |
will do | |||
avar | WHEE | ||
oh yeah, forgot about having asked about it earlier. /me goldfish memory | |||
Just noticed it because someone filed 5 issues or something :) | 16:09 | ||
tadzik | Hmm. Is there a way to get the subroutine parameters like in Perl 5? How to get unknown number of params? | 16:10 | |
16:10
takadonet left
|
|||
slavik | data dumper? | 16:10 | |
moritz_ | sub f(*@a) { ...} | ||
tylercurtis | rakudo: sub foo { say @_; } foo 1, 2, 3, 4; | ||
p6eval | rakudo 7579f7: OUTPUT«===SORRY!===Confused at line 20, near "sub foo { "» | ||
tylercurtis | rakudo: sub foo { say @_; }; foo 1, 2, 3, 4; | 16:11 | |
p6eval | rakudo 7579f7: OUTPUT«1234» | ||
tylercurtis | rakudo: sub foo (*@positional, *%named) { say @positional; say %named }; foo 1, 2, 3, 4, :hey<there>; | 16:12 | |
moritz_ | avar: you should be gone now (I only have API access, so I'm not quite sure if it worked) | ||
p6eval | rakudo 7579f7: OUTPUT«1234hey there» | ||
avar | moritz_: whee | 16:13 | |
thanks! | 16:15 | ||
16:15
avar left
|
|||
tylercurtis | rakudo: sub foo ($one, $two, *@many) { say $one; say $two; .say for @many; }; foo("One...", "Two...", "I don't know how to count higher than two..., but at least these examples answer your question, eh, tadzik?"); | 16:16 | |
p6eval | rakudo 7579f7: OUTPUT«One...Two...I don't know how to count higher than two..., but at least these examples answer your question, eh, tadzik?» | ||
tadzik | yep, got it :) | ||
16:17
agentzh left
|
|||
ingy | greetings | 16:17 | |
16:18
isBEKaml joined
16:19
tylercurtis left
16:23
justatheory joined
16:30
justatheory left
|
|||
ingy is writing a simple YAML dumper for p6, because he's sick of .perl not dumping objects :\ | 16:31 | ||
cosimo | rakudo: my $status = 'HTTP/1.0 302 Found'; say $status ~~ m/30[12]/; | 16:33 | |
p6eval | rakudo 7579f7: OUTPUT«» | ||
cosimo | rakudo: my $status = 'HTTP/1.0 302 Found'; say $status ~~ m/302/; | ||
p6eval | rakudo 7579f7: OUTPUT«302» | ||
cosimo | rakudo: my $status = 'HTTP/1.0 302 Found'; say $status ~~ m/30[2]/; | ||
p6eval | rakudo 7579f7: OUTPUT«302» | ||
cosimo | rakudo: my $status = 'HTTP/1.0 302 Found'; say $status ~~ m/30[12]/; | ||
p6eval | rakudo 7579f7: OUTPUT«» | ||
cosimo | mmh | ||
rakudo: my $status = 'HTTP/1.0 302 Found'; say ($status ~~ '301' || $status ~~ '302'); | 16:34 | ||
lue | ohai o/ | ||
p6eval | rakudo 7579f7: OUTPUT«0» | ||
cosimo | rakudo: my $status = 'HTTP/1.0 302 Found'; say ($status ~~ m/301/ || $status ~~ m/302/); | ||
p6eval | rakudo 7579f7: OUTPUT«302» | ||
cosimo | rakudo: my $status = 'HTTP/1.0 301 Found'; say ($status ~~ m/301/ || $status ~~ m/302/); | ||
p6eval | rakudo 7579f7: OUTPUT«301» | ||
lue | rakudo: my $status = 'HTTP/1.0 301 Found'; say $status ~~ m/30[1|2]/ | 16:35 | |
p6eval | rakudo 7579f7: OUTPUT«301» | ||
cosimo | rakudo: my $status = 'HTTP/1.0 301 Found'; say $status ~~ m/30 <[12]>/; | ||
p6eval | rakudo 7579f7: OUTPUT«301» | 16:36 | |
cosimo | rakudo: my $status = 'HTTP/1.0 30A Found'; say $status ~~ m/30 <[12A]>/; | ||
p6eval | rakudo 7579f7: OUTPUT«30A» | ||
ingy | rakudo: { die 'foo'; CATCH { say $! } } | 16:44 | |
p6eval | rakudo 7579f7: OUTPUT«foo» | ||
ingy | rakudo: { die 'foo'; CATCH { die $! } } | ||
p6eval | rakudo 7579f7: ( no output ) | ||
lue | rakudo: warn ('bad things'); say $! | ||
p6eval | rakudo 7579f7: OUTPUT«bad things at line 20:/tmp/K1aVbYwf4cAny()» | ||
ingy | TimToady: is this on purpose? ^^ | ||
cosimo | TimToady: maybe this can be useful for newbies like me? nopaste.snit.ch/21945 | 16:45 | |
diakopter | is what on purpose? | 16:46 | |
TimToady | rakudo: die "message" | 16:47 | |
p6eval | rakudo 7579f7: OUTPUT«message in main program body at line 20:/tmp/oP5txIC0nC» | ||
TimToady | looks like a bug | ||
rakudo: die 'foo'; CATCH { when /bar/ {} } | 16:48 | ||
p6eval | rakudo 7579f7: ( no output ) | ||
TimToady | looks like it's not rethrowing correctly | ||
we don't tend to use exceptions heavily in p6 because it's counterproductive under parallelism | 16:49 | ||
so it's not exercised much | |||
we fail much more often than we die :) | |||
diakopter | ours is but to do and fail | 16:50 | |
ingy | TimToady: thanks | 16:52 | |
lue | is fail() less bad than die() ? [it is in English, just wondering here] | 16:53 | |
pugssvn | r31624 | lwall++ | [S05] redirect to new char class syntax with patch from cosimo++ | ||
TimToady | depends on whether you've done a 'use fatal', in which case fail does a die | ||
but usually fail just returns an unthrown exception as a form of undef | 16:54 | ||
16:54
TiMBuS left
|
|||
TimToady | if you try to use it as a value, then it dies | 16:54 | |
ingy | TimToady: where did you lift that concept from? | 16:55 | |
it's quite interesting... | 16:56 | ||
lue | rakudo: my $a where 0..0xFF; $a = 300; # is this use of 'where' legal? | ||
p6eval | rakudo 7579f7: OUTPUT«===SORRY!===Confused at line 20, near "my $a wher"» | ||
TimToady | every so now and again, I invent something from scratch | ||
std: my $a where 0..0xFF; $a = 300; # is this use of 'where' legal? | |||
p6eval | std 31623: OUTPUT«ok 00:01 111m» | ||
ingy | if true {TimToady++} | ||
TimToady | yes :P | ||
ingy: though it was a synthesis in the sense that there have always been languages that have the semi-predicate problem on either side of succeed/fail; I just decided to have it on neither side | 16:58 | ||
16:58
dual joined
|
|||
TimToady | so you can return interesting values of both success and failure | 16:58 | |
lue | [well, that changes where I should look to put it (excuse the pun) . Now to find where post_constraints for variables lie.] | ||
another example of a quantum language :) | 16:59 | ||
ingy | TimToady: heads or tails? | 17:00 | |
17:00
aubreyja joined
17:03
jaffa4 joined
|
|||
pugssvn | r31625 | lwall++ | [S12] Nail down class representations sooner to make jnthn++ happier | 17:03 | |
jaffa4 | hi | ||
ingy | greetings jaffa4 | 17:04 | |
jnthn | TimToady: \o/ | 17:05 | |
.oO( maybe I should read the commit pre-\o/ :-) ) |
|||
jaffa4 | hi ingy | ||
How is Rakudo star? | |||
jnthn | jaffa4: Coming along. The REPL now remembers variables and stuff between lines, closures are fixed, various other bits too. Still some stuff to go. | 17:09 | |
lue | would this work too: my $a; $a where 0..0xFF; ? [applying 'where' after declaration] | ||
jnthn | But the must-have things on the ROADMAP are more default with than not | ||
lue: no | |||
pugssvn | r31626 | lwall++ | [S12] discuss pessimizing optimizations with augment | ||
lue | I figured /me off to find where variables are first created in the grammar | 17:10 | |
TimToady | jnthn: did you see the CATCH problem earlier? | ||
jnthn | TimToady: no | 17:12 | |
Didn't backlog quite yet :-) | |||
TimToady | rakudo: die 'foo'; CATCH { when /bar/ {} } | 17:13 | |
p6eval | rakudo 7579f7: ( no output ) | ||
TimToady | that should rethrow | ||
rakudo: die 'foo'; CATCH { die "bar" } | |||
so should that | |||
p6eval | rakudo 7579f7: ( no output ) | ||
lue | std: my $a where 0..0xFF is copy | ||
p6eval | std 31625: OUTPUT«===SORRY!===Two terms in a row at /tmp/ZeGXZHrlza line 1:------> my $a where 0..0xFF ⏏is copy expecting any of: bracketed infix constraint infix or meta-infix statement modifier loopParse failedFAILED 00:01 114m» | ||
lue | std: my $a is copy where 0..0xFF | 17:14 | |
p6eval | std 31625: OUTPUT«ok 00:01 111m» | ||
jnthn | TimToady: Seems it swallows stuff too eagerly, yes. | ||
moritz_ | phenny: tell takadonet to look at <nopaste.snit.ch/21946>, which is a working example of lazy matching with Rakudo | ||
phenny | moritz_: I'll pass that on when takadonet is around. | ||
17:14
Ross left
|
|||
jnthn | I'll have to glance S04 to check when we auto-rethrow. | 17:14 | |
17:15
Ross joined
|
|||
TimToady | any time you fall of the end, basically; it's only succeed that bypasses | 17:15 | |
jnthn | TimToady: r31625 says just what I wanted | 17:16 | |
- layout P6opaque, P6hash, P5hash, P5array, PyDict, Cstruct, etc. | |||
+ repr P6opaque, P6hash, P5hash, P5array, PyDict, Cstruct, etc. | |||
17:16
tedv joined
|
|||
jnthn | I guess this is the repr that was set with the "is repr" trait? | 17:16 | |
So if you :repr(*) then .repr on the HOW returns *? | |||
TimToady | I presume | 17:17 | |
at least, for the class it would | |||
an instance might return something more specific, I suppose | |||
jnthn | Yeah, that was going to be my next question. | ||
Do we have a per-instance version too. :-) | |||
.REPR macro or some such. | |||
Anyway, +1 on the changes. Thanks. | 17:18 | ||
slavik | where can I read about diff between .MACRO and .method? | ||
jnthn | TimToady: btw, I liked the "also" change yesterday. | 17:19 | |
slavik | was Java's "everything implicitly extends Object" considered? Looks like a decent way of getting base functionality into an object | ||
sorear | good * #perl6 | ||
moritz_ | good now, sorear :-) | 17:20 | |
std: now | |||
slavik | o/ | ||
p6eval | std 31625: OUTPUT«ok 00:01 107m» | ||
slavik | std: now + 1 | ||
p6eval | std 31625: OUTPUT«ok 00:01 109m» | ||
slavik | std: now + 1 | ||
p6eval | std 31625: OUTPUT«ok 00:01 109m» | ||
sorear | I interpret the 'repr' trait on classes as being a specialization pragma | ||
slavik | :( | ||
sorear | The class body is allowed to assume that a specific repr will be used | ||
moritz_ | slavik: std does syntax check. | ||
lue | rakudo: say now | ||
slavik | oh | ||
p6eval | rakudo 7579f7: OUTPUT«Could not find sub &now in main program body at line 20:/tmp/i5MV7S6h5i» | ||
slavik | rakudo: now | ||
p6eval | rakudo 7579f7: OUTPUT«Could not find sub &now in main program body at line 20:/tmp/ChBxXBjQxq» | ||
jnthn | slavik: The default type of everything is Any | 17:21 | |
slavik | aww :( | ||
jnthn | slavik: Which in turn inherits from Mu | ||
moritz_ | facts: 1) gather/take is lazy | ||
jnthn | sorear: Yeah, I figure you can't take advantage of that knowledge until you parsed the whole class body. | ||
moritz_ | 2) my @a = 1..*; # also lazy | ||
jnthn | sorear: In case also repr(*); shows up along the way | ||
moritz_ | 3) assigning the result from gather/take to an array evaulates it eagerly | 17:22 | |
jnthn | But that's fine I guess. | ||
slavik | moritz_: unless it's ==> ? | ||
moritz_ | slavik: I'm talking about the 'is' situation in Rakudo, not the 'should be' situation | ||
slavik | oh | ||
moritz_ | sorry if that wasn't clear | ||
sorear | pmurias: Is your dist a fork of std or are you intending to merge it back at some point? | ||
slavik | moritz_: I have no idea what the is situation is ;) | ||
isBEKaml | rakudo: class Foo{}; Foo.^parents.perl.say; | ||
moritz_ | slavik: facts 1) to 3) describe it :-) | 17:23 | |
p6eval | rakudo 7579f7: OUTPUT«(Any, Mu)» | ||
isBEKaml | slavik: ^^ | ||
lue | [why is the basis for everything named Mu?] | ||
slavik | moritz_: I mean wouldn't op(<==) make it lazy? | ||
17:23
tadzik left
|
|||
slavik | it's a quark, and smaller than an atom, which is Any | 17:24 | |
or so I think | |||
jnthn | lue: S02 | ||
moritz_ | slavik: it would. But I'm kinda surprised that assignment doesn't work lazily with gather/take, even though my @a = 1..*; *is* lazy | 17:25 | |
so, the real question is: BUG? | |||
sorear | TimToady, jnthn: die in CATCH is a longstanding Parrot bug | 17:26 | |
trac.parrot.org/parrot/ticket/1631 | 17:27 | ||
jnthn | sorear: I was kinda hoping it was mostly a code-gen bug but maybe it's not so simple | ||
e.g. we needed to emit a pop_eh where we're not | |||
jnthn checks the ticket | |||
sorear | it's mostly likely a PAST bug. | ||
jnthn | sorear: ah, yes | 17:28 | |
OK | |||
Taht's probably easier to fix | |||
In PAST::Compiler somewhere | |||
(easier than if it was deep in Parrot) | 17:29 | ||
ops.'push_pirop'('pop_eh') | 17:30 | ||
hmm | |||
Looks like it is | |||
ingy | "Error: Too many positional parameters passed; got 2 but expected 1" ... what subroutine???!!! | 17:31 | |
moritz_ | ingy: less than awesome, and reported. Happens for method dispatch | ||
isBEKaml | moritz_: about my @a= 1..*; maybe you missed the parens around rvalue? I recently hit on this and pmichaud++ pointed out that '=' binds tighter than '..'. (What's the situation here? I sorely lack context here.. :() | ||
jnthn | moritz_: huh, when? | 17:32 | |
ingy | error reporting is teh big suck right now :\ | ||
pmurias | sorear: i could merge back the few changes i made, and make Dist::Zilla make a dist from the pile of files in src/perl6 | ||
jnthn | Doesn't the backtrace have the current method in? | ||
ingy | at least it keeps me around :\ | ||
moritz_ | isBEKaml: that's only the case in $scalar = 1..*; | ||
17:32
Lawn left
|
|||
moritz_ | rakudo: class Foo { method x() { } }; Foo.x(5) | 17:32 | |
jnthn | rakudo: class C { method m { } }; C.m(42) | ||
moritz_ | seems that p6eval is borked again | 17:33 | |
Too many positional parameters passed; got 2 but expected 1 | |||
that's what I get locally | |||
p6eval | rakudo 7579f7: ( no output ) | ||
jnthn | I get | ||
Too many positional parameters passed; got 2 but expected 1 in 'C::m' at line 1 in main program body at line 1 | |||
Oh, do you mean in the REPL? | |||
isBEKaml | moritz_: Ah, I see.. | ||
moritz_ | jnthn: yes | ||
jnthn | Oh | 17:34 | |
moritz_ | jnthn: but I've also seen that creeping up in normal code | ||
jnthn | moritz_: Got a ticket for a non-REPL case? | ||
ingy | rakudo: say Boolean::true | ||
p6eval | rakudo 7579f7: OUTPUT«Can not find sub Boolean::true in main program body at line 1» | ||
ingy | rakudo: say Boolean::True | 17:35 | |
p6eval | rakudo 7579f7: OUTPUT«Can not find sub Boolean::True in main program body at line 1» | ||
moritz_ | jnthn: Regex::Match.from(1, 2, 3); | ||
lue | ingy: that's Bool::True | ||
isBEKaml | rakudo: say (1 < 0).perl | ||
ingy | thx | ||
p6eval | rakudo 7579f7: OUTPUT«Bool::False» | ||
moritz_ | jnthn: gives a backtrace with line number, but without the method name | ||
jnthn | sorear: oh, may have found it | 17:36 | |
moritz_: oh | |||
ingy | rakudo: use Bool; say True | ||
jnthn | moritz_: That's an NQP class? | ||
p6eval | rakudo 7579f7: OUTPUT«===SORRY!===Unable to find module 'Bool' in the @*INC directories.(@*INC contains: lib /home/p6eval/.perl6/lib /home/p6eval//p1/lib/parrot/2.5.0-devel/languages/perl6/lib .)» | ||
moritz_ | jnthn: or even PIR | ||
jnthn | moritz_: ah, I can totally believe we may be crappy on those | ||
isBEKaml | jnthn: irclog.perlgeek.de/perl6/2010-07-11#i_2538819 | ||
this is another. | |||
ingy | is Bool::True the shortest form of Bool::True? | 17:37 | |
jnthn | ingy: Normally just True works | ||
moritz_ | rakudo: say True | ||
p6eval | rakudo 7579f7: OUTPUT«1» | ||
moritz_ | rakudo: say ?1 # even shorter | ||
p6eval | rakudo 7579f7: OUTPUT«1» | ||
ingy | why does it Str to '1'? | 17:38 | |
seems arcane | |||
moritz_ | masak recently said about the same | ||
ingy | </bitchin> | ||
17:39
Kodi joined
|
|||
ingy | phenny: tell masak /me hugs masak | 17:40 | |
phenny | ingy: I'll pass that on when masak is around. | ||
17:43
whiteknight joined
17:44
masonkramer left
|
|||
jnthn | > { die 'foo'; CATCH { die $! } } | 17:45 | |
foo | |||
ingy | rakudo: use Test; is "foo\nfoo\n", "bar\nbar\n", 'Baz!'; | ||
p6eval | rakudo 7579f7: OUTPUT«not ok 1 - Baz!# got: "foo\nfoo\n"# expected: "bar\nbar\n"» | ||
jnthn spectests and goes to make some noms | |||
ingy | is there a way to tell test not to serialize newlines as \n? | ||
jnthn | ingy: Suspect it's just doing .perl on them | 17:46 | |
ingy | nod :\ | ||
I need to get my waiver in to pmichaud so I can get meh bit! | 17:47 | ||
moritz_ | ingy: what would you have it serialize to instead? | ||
ingy | moritz_: I would do it same as p5 | 17:48 | |
sorear | moritz_: I have root on feather1, can I help you with your password problems? | ||
ingy | got: "foo | ||
moritz_ | sorear: no, wrong matchine | ||
ingy | # foo | ||
" | |||
like that | |||
moritz_ | ingy: that's a bit bad if there are spaces after the newline | ||
but now that .subst properly works for zero-width assertions, it should be SMOP to patch Test.pm if you really want it | 17:49 | ||
ingy | moritz_: testing yaml dumps is almost impossible with \n | ||
and TestML supports diff output of got/expected | 17:50 | ||
moritz_ | ingy: just get it right :-) | ||
pragma_ | I disagree. | ||
moritz_ | pragma_: with what? | ||
ingy | anyway, I just want it to be the same as p5 by default, and have options to do whatever pragma_ wants ;) | 17:51 | |
pragma_ concedes. | |||
ingy hugs pragma_ | |||
\@_o/ | 17:52 | ||
moritz_ | ingy: should it chomp trailing newlines? | 17:54 | |
ingy | whatever p5 does. ( I think that is no) | ||
jnthn | moritz_: S02-literals/quoting.t has two fails on Windows - iirc this is the one you asked me to check? | ||
moritz_ | jnthn: yes... qx and qqx at the very end | 17:55 | |
jnthn | not ok 145 - qx | ||
# got: "world\r\n" | |||
# expected: "world\n" | |||
not ok 146 - qqx | |||
# got: "world\r\n" | |||
# expected: "world\n" | |||
ingy | rakudo: say [].WHAT.WHAT | ||
p6eval | rakudo 7579f7: OUTPUT«Array()» | ||
moritz_ | jnthn: does it work if you .chomp the result from qx, and remove the \n from the RHS? | ||
lue | .oO(darn those crazy windows) |
||
ingy | rakudo say Array(1,2) | 17:56 | |
rakudo: say Array(1,2) | |||
p6eval | rakudo 7579f7: OUTPUT«Could not find sub &Array in main program body at line 20:/tmp/Xa7gAanl93» | ||
pugssvn | r31627 | Kodi++ | [S32/Temporal] Changed to use a different way of specifying time zones, which is hopefully saner than my last proposal. | ||
ingy | rakudo: say Array() | ||
p6eval | rakudo 7579f7: OUTPUT«Could not find sub &Array in main program body at line 20:/tmp/GixAlIescH» | ||
17:56
masak joined
|
|||
lue | ohai masak o/ | 17:57 | |
ingy | masak: \ (o) (x) / | ||
jnthn | moritz_: Probably will since I fixed .chomp for windows a while back | ||
masak | Oddly, Perl 6 doesn't seem to be mentioned at en.wikipedia.org/wiki/Semipredicate_problem | ||
someone should add it there. :) | |||
phenny | masak: 17:40Z <ingy> tell masak /me hugs masak | ||
jnthn | moritz_: nom time here | ||
masak submerges again | |||
17:57
masak left
|
|||
ingy | jnthn: nom nom | 17:57 | |
what kind of thing does .WHAT return? | 17:58 | ||
17:58
aubreyja left
|
|||
moritz_ | a type object | 17:59 | |
lue | masak: Perl 6 would get its own section on that page :) | ||
ingy | rakudo: say Array() | 18:00 | |
p6eval | rakudo 7579f7: OUTPUT«Could not find sub &Array in main program body at line 20:/tmp/zJ9HUJWQrQ» | ||
moritz_ | rakudo: say Array | ||
p6eval | rakudo 7579f7: OUTPUT«Array()» | ||
ingy | rakudo: say Array.WHAT | ||
p6eval | rakudo 7579f7: OUTPUT«Array()» | ||
ingy | whay not Type() ? | 18:01 | |
moritz_ | coercion syntax NYI | ||
rakudo: say Array.perl # if you want runnable code... | |||
p6eval | rakudo 7579f7: OUTPUT«Array» | ||
18:02
aubreyja joined
|
|||
ingy | rakudo: say Array.perl | 18:02 | |
p6eval | rakudo 7579f7: OUTPUT«Array» | ||
18:02
aubreyja_ joined
|
|||
ingy | rakudo: say Array.perl.WHAT | 18:02 | |
p6eval | rakudo 7579f7: OUTPUT«Str()» | ||
moritz_ | rakkudo: say "ab\ncd".subst(rx/^^/, '# ', :g) | ||
ingy | rakudo: say [].WHAT eq 'Array()' | 18:03 | |
p6eval | rakudo 7579f7: OUTPUT«1» | ||
18:03
aubreyja_ left
|
|||
moritz_ | rakudo: say "ab\ncd".subst(rx/^^/, '# ', :g) | 18:03 | |
p6eval | rakudo 7579f7: OUTPUT«# ab# cd» | ||
sorear | mm rakkudo | ||
18:03
isBEKaml left
|
|||
moritz_ | rakudo: use Test; isa_ok Mu, Mu, 'foo' | 18:04 | |
p6eval | rakudo 7579f7: OUTPUT«No applicable candidates found to dispatch to for 'isa_ok'. Available candidates are::(Mu $var, Any $type):(Mu $var, Any $type, Any $msg) in main program body at line 20:/tmp/pGmGDYICap» | ||
dalek | kudo: b48fb92 | moritz++ | Test.pm: allow Mu type checks in isa_ok |
18:10 | |
kudo: 582dc43 | moritz++ | Test.pm: [Test] make diagnostics in is() like in Perl 5, ingy++ |
|||
ingy | moritz_++ | 18:17 | |
\o/ | |||
moritz_: thanks | 18:18 | ||
ingy updates rakudo. prays that other shit don't break. | |||
18:21
eternaleye joined
|
|||
ingy | rakudo: say 'ingy'.times(3) | 18:23 | |
p6eval | rakudo 7579f7: OUTPUT«Method 'times' not found for invocant of class 'Str' in main program body at line 20:/tmp/rpkvq3boRA» | ||
ingy | rakudo: say 'ingy' x 3 | ||
p6eval | rakudo 7579f7: OUTPUT«ingyingyingy» | 18:24 | |
ingy | rakudo: say 'ingy' x 'foo' | ||
p6eval | rakudo 7579f7: OUTPUT«» | ||
moritz_ | rakudo: say ('ingy' xx 3).perl | ||
ingy guessed TimToady would be more creative ;) | |||
p6eval | rakudo 7579f7: OUTPUT«("ingy", "ingy", "ingy")» | ||
ingy | nice | 18:25 | |
rakudo: say (1,2).WHAT | |||
p6eval | rakudo 7579f7: OUTPUT«Parcel()» | ||
ingy | :D | ||
Parcel! | |||
moritz_ | rakudo: say ('ingy', ('ingy', 'foo') xx *).[^5].join(', ') | 18:26 | |
p6eval | rakudo 7579f7: OUTPUT«ingy, ingy, foo, ingy, foo» | ||
ingy | is that a term from the gay community? | ||
ingy dicks | |||
I mean *ducks* | |||
moritz_ | ingy: Parcel = Parenthesis Cell | ||
ingy | ha! | ||
TimToady++ | |||
only TimToady could come up with that | 18:27 | ||
I <3 the Perl community | |||
screw Python... (even if they have a more usable language) | |||
ingy is BACK! | |||
at least for now... | 18:28 | ||
only Perl is -Ofun | |||
lue | afk | 18:30 | |
18:30
[Coke] joined
|
|||
diakopter | interesting: cacm.acm.org/magazines/2010/7/95061...g/fulltext | 18:33 | |
(but over my head) | 18:34 | ||
ingy | is there an example of a perl module dist with `make install` capability? | 18:38 | |
moritz_ | ingy: all of my Perl 6 modules are installable, provided you generate a makefile with ufo (see <github.com/masak/ufo/>) | 18:39 | |
ingy | moritz_: example url? | 18:40 | |
arnsholt | Just see ufo's docs | ||
ingy wants to grab moritz_' modules | |||
18:42
Chillance joined
|
|||
ingy cues up Side A of Heart's Dreamboat Annie, FTW! | 18:43 | ||
moritz_ | ingy: github.com/moritz/Math-RungeKutta | 18:45 | |
ufo && make install | 18:46 | ||
ingy | :-* | ||
18:46
takadonet joined
18:47
nadim joined,
nathan06 joined
|
|||
ingy | moritz_: I already have my own Makefile which handles 'make test' and 'make t/specific.t' | 18:50 | |
does ufo, do make test? | |||
moritz_ | make test, yes | ||
ingy | guess I can find out and patch if necessary | ||
moritz_ | make t/specific.t not | ||
hugme: add ingy to ufo | 18:51 | ||
hugme | moritz_: sorry, I don't know anything about project 'ufo' | ||
moritz_ | uhm. | ||
just submit a patch :-) | |||
ingy | to the mothership? | ||
moritz_ | that masakship, yes :-) | ||
ingy | XD | 18:52 | |
moritz_: this would be a nice patch: ufo - | make -f - install | 18:58 | ||
pugssvn | r31628 | Kodi++ | [t/spec] Overhauled DateTime.t. Rakudo can pass all of these with my latest version of DateTime.pm. | ||
moritz_ | ingy: and a SMOP... | 19:01 | |
diakopter | wow, 1000 commits to pugscode svn in the last 2 months | ||
19:02
envi^home left
|
|||
ingy | moritz_: SMOP forthcoming :) | 19:02 | |
moritz_ | ingy: I'm faster :-) | ||
SMOP already written and tested | |||
... and pushed | |||
ingy | :P | 19:03 | |
moritz_++ # I guess :\ | |||
;) | |||
19:04
cono left
|
|||
moritz_ | that MAIN sub makes it really easy to have command line arguments with default values | 19:04 | |
ingy | moritz_: you realized that '-' means stdin, yeah? | ||
or stdout | |||
depending | |||
make -f - (reads stdin) | |||
moritz_ | is open('-') specced? | 19:05 | |
ingy | I just meant that `ufo -` prints to stdout | ||
19:05
cono joined
|
|||
moritz_ | yes, that's what my patch did | 19:06 | |
ingy | ok, the log msg didn't say that | ||
sorry, should have looked at the code | |||
moritz_ | it's alien technology. Of course it's magic :-) | 19:07 | |
ingy | neat, MAIN binds to @*ARGS? | ||
moritz_ | yes, with some additional magic | 19:08 | |
ingy | <3 | ||
moritz_ | like possible multi subs | ||
ingy | nod | ||
moritz_ | and named arguments bein --foo options | ||
ingy | ossum | ||
ingy puts on the fIREHOSE | 19:09 | ||
moritz++ # now I can install TestML to write YAML tests | 19:10 | ||
xoxo | 19:11 | ||
moritz_ | \o/ | 19:12 | |
ingy | > ufo - | sudo make -f - install clean | 19:15 | |
works! | |||
moritz_ | \o/ | ||
but why sudo? are you installing into a non-standard location? | 19:16 | ||
default is ~/.perl6/lib/ | 19:17 | ||
19:17
takadonet left
19:19
takadonet joined
|
|||
ingy | moritz_: O | 19:21 | |
moritz_: I thought stuff went where Test.pm goes... | |||
moritz_: take a look at: > perl -e 'use Test::More tests => 1; is "foo\nfoo\n", "foo\nfoo", "A test";' | 19:22 | ||
your new output++ is a little off | |||
moritz_ | you mean no leading/trailing ''? | 19:23 | |
19:23
payload joined
19:25
Kodi left
|
|||
ingy | moritz_: right | 19:27 | |
moritz_: also the period after Failed test 1 of 1. :) | 19:28 | ||
dalek | kudo: d60d064 | moritz++ | Test.pm: [Test] quote strings in diagnostic output |
19:31 | |
19:33
masak joined
|
|||
masak | ahoy! | 19:33 | |
moritz_ | aloha | ||
masak | so now there's two of us believing that enum values maybe should stringify to their names. ingy++ \o/ | 19:34 | |
ingy | masak: say Bool::True; | 19:35 | |
masak | ingy: True | 19:36 | |
ingy | :D | ||
masak , the living evalbot | |||
ingy | oui | ||
masak lives | |||
masak: I think I meant more that Bool should be first class in Perl 6 | 19:37 | ||
moritz_ | it's an enum as currently specced | ||
ingy | but I like where you are going. | ||
masak | ingy: I like that it's an enum. pmichaud seems grudgy over it being an enum. | 19:38 | |
ingy | masak: I like it too. | ||
masak: I'm writing a YAML dumper right now | |||
after I get it working ok, we should hack in .yaml support | 19:39 | ||
then .perl will be sad | |||
:) | |||
masak | :) | ||
19:43
takadonet left
|
|||
ingy | masak: did you like our ufo tweak? | 19:44 | |
masak | haven't studied it in detail. | 19:45 | |
ingy | ufo - | make -f - install clean | ||
no Makefile! | |||
masak | huh :) | ||
why? | |||
ingy | case I already have a Makefile | ||
and you say to throw it away | 19:46 | ||
so why ever make one? | |||
except as a speed op :P | |||
masak | feel free to prepare a patch, and I'll review it :) | ||
ingy | masak: too late | 19:47 | |
moritz++ !!! | |||
moritz_ already pushed one | |||
masak | o.O :) | ||
I'll review it pushed, then. :) | |||
ingy already pulled it | |||
it works great over here ;) | 19:48 | ||
masak | moritz_++ # cute change | ||
is assigning $*OUT equivalent in all ways to binding $*OUT? | 19:49 | ||
sorear | assigning $*OUT is a fatal error | ||
moritz_ | sorear: where is that specced? | ||
masak | sorear: not assigning *to* $*OUT. | ||
moritz_ | masak: except when one modifies the variable it is assigned to | 19:50 | |
masak | ah, right. | ||
sorear | it's not specced in so many words, but S03:1569 strongly implies that all bindings to $*OUT are readonly | ||
ingy | moritz_: your latest Test patch is great. thanks | 19:51 | |
moritz_ | sorear: no. | ||
sorear: it just describes ::= | |||
sorear: and only because it was RO-bound it's not modifiable in this example | 19:52 | ||
sorear | it establishes the standard way to bind $*OUT as ::=, not := | ||
moritz_ | no. It's just an exmaple for ::=. | 19:53 | |
sorear | along with S02:2705 | ||
Wait, how are you doing that | |||
19:54
IllvilJa joined
|
|||
sorear | I tried to take the synopses at face value once, there wasn't nearly enough to go on | 19:54 | |
moritz_ | $*OUT is not a user-defined dynamic variable | ||
ingy | rakudo: if 0 {} elsif 1 {say "OK"} | 19:55 | |
p6eval | rakudo 582dc4: OUTPUT«OK» | ||
ingy | elsif lives! | ||
worst name evar | |||
'elsif' is teh worst name evar -- gwall | 19:56 | ||
gloria actually told me that. (paraphrased) | |||
moritz_ things that X_CREAT is worse (don't remember what X is) | |||
*thinks | |||
masak kinda likes 'elsif' | 19:59 | ||
it's pronounced the way it's spoken! :P | 20:00 | ||
ingy | el `Sif | ||
masak | std: if 0 {} else if 1 { say "OK" } | 20:01 | |
p6eval | std 31628: OUTPUT«===SORRY!===Please use 'elsif' at /tmp/7j3yGrZiSI line 1:------> if 0 {} else if ⏏1 { say "OK" }Confused at /tmp/7j3yGrZiSI line 1:------> if 0 {} else if ⏏1 { say "OK" } expecting statement_controlParse | ||
..failedFAILED… | |||
20:01
rv2733 left
|
|||
masak | though in the above case, I'm sorely tempted to advocate a "just understand what I want already" kind of approach :) | 20:02 | |
if people want to write it out in long form, why not just let them? | 20:03 | ||
moritz_ | if we allow too much stuff, we end up with crappy error messages, long documentation and lettle consistency | 20:05 | |
ingy | wow: I almost asked how to do a simple thing (because I couldn't find doc on it) but then I just tried: for %node.keys.sort -> $key { | ||
\o/ | |||
perl6 is sometimes intuitive | |||
moritz_ | ingy: you can also say %node.sort, and it sorts by key too, and returns a list of paris | ||
*pairs | 20:06 | ||
moritz_ can't type anymore | |||
ingy | moritz_: I tried pairs but messed it up | ||
masak | is there a way to do nested signatures on pairs? | ||
moritz_ | rakudo: .value.say for { a => 1, b => 4, d => 8, c => 0 } | ||
p6eval | rakudo 582dc4: OUTPUT«Method 'value' not found for invocant of class '' in main program body at line 20:/tmp/R7ByJh2yA_» | ||
masak | because there totally should be. | ||
moritz_ | masak: sure, with .key and .value | ||
rakudo: .value.say for { a => 1, b => 4, d => 8, c => 0 }.sort | |||
p6eval | rakudo 582dc4: OUTPUT«1408» | 20:07 | |
masak | moritz_: no, I mean binding the key and value in each pair to a parameter. | ||
moritz_ | masak: sure, $pair ($key, $value) | 20:08 | |
masak | \o/ | ||
TimToady++ jnthn++ | |||
moritz_ | which works through the general mechanism of methods calls | ||
masak | the section "When is a closure not a closure" is strange and exhilarating. today I understand a little bit more of it than earlier. | 20:09 | |
jnthn | rakudo: { die 'foo'; CATCH { die $! } } | 20:22 | |
p6eval | rakudo 582dc4: ( no output ) | ||
jnthn | rakudo: { die 'foo'; CATCH { die $! } }; say "ok" | ||
p6eval | rakudo 582dc4: ( no output ) | ||
moritz_ | the first segfaults | 20:23 | |
jnthn | ah, ok | ||
Does anyone know the ticket #? | |||
I don't spot it. | |||
(Got a fix locally, gets through the Parrot tests and Rakudo spectest is looking good - almost there.) | |||
masak | jnthn: I think there is one. | 20:25 | |
looking. | |||
jnthn: rt.perl.org/rt3/Ticket/Display.html?id=64262 | 20:26 | ||
20:27
timbunce joined
20:33
wilx joined
20:34
jaffa4 left
|
|||
ingy | how do I change a grammar token at runtime? | 20:44 | |
(for my own grammar) | |||
lue | ohaio o/ | 20:46 | |
masak | ingy: I imagine the answer is the same as "how do I change a method at runtime?" | 20:47 | |
moritz_ | rakudo: class A { method foo { say "old" } }; my $x = A.new() but role { method foo { say "new" } }; $x.foo | 20:50 | |
p6eval | rakudo d60d06: ( no output ) | ||
masak | std: until 42 -> $a { ... } | ||
p6eval | std 31628: OUTPUT«ok 00:01 114m» | ||
moritz_ | says "new" here | ||
masak | std: unless 42 -> $a { ... } | 20:51 | |
p6eval | std 31628: OUTPUT«ok 00:01 111m» | ||
moritz_ | so "but" seems to work for replacing methods | ||
ingy | rakudo: grammar G1 { our $t = 'xxx'; token t { $t } rule TOP { <t> } } G1.parse("aaa xxx bbb") | ||
p6eval | rakudo d60d06: OUTPUT«===SORRY!===Unable to parse blockoid, couldn't find final '}' at line 20» | ||
jnthn | does to do it in place | ||
moritz_ | right | ||
masak | ingy: semicolon. | ||
moritz_ | two of them :-) | ||
masak | right. | ||
ingy: the rule is simple. | |||
ingy | rakudo: grammar G1 { our $t = 'xxx'; token t { $t }; rule TOP { <t> } }; G1.parse("aaa xxx bbb"); | ||
p6eval | rakudo d60d06: ( no output ) | ||
ingy | rakudo: grammar G1 { our $t = 'xxx'; token t { $t }; rule TOP { <t> } }; say G1.parse("aaa xxx bbb"); | 20:52 | |
p6eval | rakudo d60d06: OUTPUT«» | ||
ingy | rakudo: grammar G1 { our $t = 'xxx'; token t { $t }; rule TOP { <t> } }; say G1.parse("aaa xx bbb"); | ||
p6eval | rakudo d60d06: OUTPUT«» | ||
ingy | rakudo: grammar G1 { our $t = 'xxx'; token t { $t }; rule TOP { <t> } }; say G1.parse("xxx bbb"); | ||
p6eval | rakudo d60d06: OUTPUT«xxx » | ||
ingy | rakudo: grammar G1 { our $t = 'xxx'; token t { $t }; rule TOP { <t> } }; say G1.parse("xx bbb"); | 20:53 | |
p6eval | rakudo d60d06: OUTPUT«» | ||
ingy | rakudo: grammar G1 { our $t = 'xx'; token t { $t }; rule TOP { <t> } }; say G1.parse("xx bbb"); | ||
p6eval | rakudo d60d06: OUTPUT«xx » | ||
ingy | that seems like an ok way to do it for my needs | ||
moritz_ | you know that rules also can take parameters? | 20:55 | |
20:55
aubreyja left
|
|||
moritz_ | rakudo: grammar A { token TOP { <b("foo")> }; token b($x) { $x } }; say A.parse('foo') | 20:55 | |
p6eval | rakudo d60d06: OUTPUT«foo» | ||
moritz_ | rakudo: grammar A { token TOP { <b("foo")> }; token b($x) { $x } }; say A.parse('bar') | 20:56 | |
p6eval | rakudo d60d06: OUTPUT«» | ||
ingy | rakudo: grammar G1 { our $t = '+++'; token t { $t }; rule TOP { <t> } }; say G1.parse("+++ bbb"); | ||
p6eval | rakudo d60d06: OUTPUT«+++ » | ||
ingy | rakudo: grammar G1 { our $t = '+++'; token t { $t }; rule TOP {<t>} }; say G1.parse("+++ bbb"); | 20:57 | |
p6eval | rakudo d60d06: OUTPUT«+++» | ||
20:58
nathan06 left
|
|||
lue | rakudo: my $a where 0..10; $a = 20; | 20:59 | |
p6eval | rakudo d60d06: OUTPUT«===SORRY!===Confused at line 20, near "my $a wher"» | ||
lue | > my $a where 0..10; $a = 20; | ||
Contextual $*PARAMETER not found | |||
moritz_ | std: my $a where 0..10; $a = 20; | ||
p6eval | std 31628: OUTPUT«ok 00:01 111m» | 21:00 | |
21:00
timbunce left
|
|||
lue | ever closer! I can paste what I changed so far, | 21:00 | |
moritz_ | rakudo: my Int $a where 0..10; $a = 20; say $a | ||
p6eval | rakudo d60d06: OUTPUT«===SORRY!===Confused at line 20, near "my Int $a "» | ||
lue | [and yes, I remembered a separate branch this time :)] | ||
masak | rakudo: repeat while 42 -> $x! { say "OH HAI" } | 21:04 | |
p6eval | rakudo d60d06: OUTPUT«OH HAIOH HAIOH HAIOH HAIOH HAIOH HAIOH HAIOH HAIOH HAIOH HAIOH HAIOH HAIOH HAIOH HAIOH HAIOH HAIOH HAIOH HAIOH HAIOH HAIOH HAIOH HAIOH HAIOH HAIOH HAIOH HAIOH HAIOH HAIOH HAIOH HAIOH HAIOH HAIOH HAIOH HAIOH HAIOH HAIOH HAIOH HAIOH HAIOH | ||
..HAIOH… | |||
masak | rakudo: repeat while 42 -> $x! { say $x } | ||
p6eval | rakudo d60d06: | ||
..OUTPUT«4242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242 | |||
masak | hm. I guess that is according to spec. | 21:05 | |
jnthn | masak: It's only saying exactly the same as -> $x would. | ||
masak | aye. | ||
21:05
timbunce joined
|
|||
masak | I kinda thought it'd fail to bind. | 21:05 | |
jnthn | Why? | 21:06 | |
masak | because the first iteration doesn't pass in a value. | ||
or so I thought. | |||
jnthn | ? | ||
masak | in a 'repeat while' loop, one iteration is run, then the condition is tested. | 21:07 | |
jnthn | Ah, yes | ||
masak | so in the first iteration the condition hasn't been tested. | ||
thus (I thought) no parameter would be passed in. | |||
rakudo: repeat while my $a = 42 { say $a } | 21:08 | ||
p6eval | rakudo d60d06: | ||
..OUTPUT«Any()42424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242 | |||
21:09
Trashlord left
|
|||
lue | [ IIUC, here's what I did: gist.github.com/471833 ] | 21:09 | |
moritz_ | masak: re last section of S04, I agree it's a tough read | 21:10 | |
masak | moritz_: I'm not sure I understand what 'cloning' means exactly here. and to the extent that I (think I) understand, I'm not sure it's a good word for it. :) | 21:11 | |
moritz_ | "cloning" means "take a snapshot of the lexical environment" | 21:12 | |
masak | do you have a concrete example? | ||
moritz_ | my $x = 3; my $y = { ... }; # $x and $y are the lexical environment of the block | 21:14 | |
+ the setting, of course. But that's immutable anyway | |||
masak | I don't really see where "snapshot" comes in. one keeps around a pointer to that lexpad. | 21:15 | |
"snapshot" sounds like things are photographed and then the photo never changes. | |||
that's not what closures do at all. | |||
you can emulate mutable objects with closures, precisely because it's not just a snapshot, but a living link back to the surrounding lexpad. | 21:16 | ||
jnthn | It's a snapshot of that link. :-) | ||
moritz_ | masak: then think of it as a "branch" in the version control sense | ||
masak | I'm at the point where I think I got the theory right, but the terminology is confusing me. | 21:17 | |
moritz_ | masak: have you seen the "illguts", the illustrated guts of perl 5? | ||
masak | no. | ||
ah, found it: www.cpan.org/authors/id/GAAS/illguts-0.09.pdf | 21:18 | ||
moritz_ | hm, it's not in there anyway... sorry | ||
I'm looking for an illustration I've once seen | |||
masak | I saw that PDF the other day. | ||
moritz_: maybe you're thinking of HOP. it has a nice picture of lexpads, IIRC. | 21:19 | ||
ingy | masak: does ufo make install just install .pir, and is that enough? | ||
masak | ingy: per default, yes. | ||
ingy: moritz_ disagrees-ish with me on that. | |||
ingy | install lib/TestML/Runner/TAP.pir ~/.perl6/lib/TestML/Runner/TAP.pir | 21:20 | |
masak | ingy: there's another install target that installs the .pm files, too. | ||
moritz_ | install-src | ||
masak | right. | ||
ingy | Unable to find module 'TestML::Runner::TAP' in the @*INC directories. | ||
masak | huh. | ||
21:20
Ross left
|
|||
moritz_ | masak: if you have HOP available, page 76 describes how Perl 5 does it | 21:20 | |
ingy | (@*INC contains: t lib /Users/ingy/.perl6/lib | 21:21 | |
masak | moritz_: I don't right now, but I'll look it up when I get the chance. | ||
jnthn | masak: Installing just the PIR is not enough | ||
masak | jnthn: why not? | ||
jnthn | Because we look for the .pm files first | 21:22 | |
Because the .pir versions don't have a way for us to pull the version info out | |||
masak | huh. | ||
jnthn | And because .pir files are just cached compiled versions | ||
masak | well, then clearly ufo must install both .pir and .pm files. | ||
jnthn | The original source is authoritative. | ||
masak changes ufo | |||
ingy | \o/ | 21:23 | |
jnthn | masak++ | ||
ingy | masak++ | ||
masak | ingy++ # field-testing | ||
jnthn | There was a HUGE storm here earlier. I hope it's nice and cold out now. | ||
moritz_ | it's as simple as adding a install-src dependency to install: | ||
jnthn goes to take a quick walk and see | |||
ingy feels like the first man in space | |||
moritz_ | btw I got the same error too, but attributed it to my own stupidity | ||
ingy | moritz_: for what? | 21:24 | |
masak | moritz_: good idea. | ||
moritz_ | ingy: pir-installed-only module | ||
masak | pushed. | 21:25 | |
ingy: try now. | |||
lue | rakudo: say $*PARAMETER | 21:26 | |
p6eval | rakudo d60d06: ( no output ) | 21:27 | |
21:29
plobsing joined
|
|||
ingy | can I get 'use Module' to not import the exports? | 21:29 | |
lue | .oO(I wonder why it couldn't find contextual $*PARAMETER...) |
21:30 | |
ingy | masak: seems to work | 21:31 | |
masak | yay | ||
moritz_ | ingy: 'need Module;' iirc | ||
masak | std: my @a; my @b; zip(@a;@b) | 21:33 | |
p6eval | std 31628: OUTPUT«ok 00:01 113m» | ||
21:33
slavik left
|
|||
masak | std: loop (;;) -> $a { ... } | 21:35 | |
p6eval | std 31628: OUTPUT«===SORRY!===Missing block at /tmp/SPmRet1WfV line 1:------> loop (;;) ⏏-> $a { ... }Parse failedFAILED 00:01 107m» | ||
21:35
ashleydev joined
|
|||
lue | Grammar.pm is the one place where a document of some sort would be helpful in understanding all the weird little <tokens> and whatnot | 21:36 | |
ingy | moritz_, masak, everyone: CHECK IT!! -> github.com/ingydotnet/yaml-pm6/blob...t/dump.tml | ||
YAML.pm passes 4 tests writtn in TestML | |||
masak | nice. | ||
moritz_ | \o~ | 21:37 | |
ingy | it's STOOPID PHRESH \o/ | ||
lue | oooh! aaah! | 21:38 | |
ingy | masak++ # thanks for ufo++ | 21:39 | |
moritz_++ # thanks for fixing Test etc | |||
ingy writes more tests and refactors | |||
YAML::dump will be soon! | 21:40 | ||
21:40
ashleydev left
|
|||
lue | Can somebody point me in the right direction? I'm stuck on that error concerning $*PARAMETER | 21:41 | |
21:43
ashleydev joined,
ashleydev left
|
|||
jnthn | lue: For now probably just put parens around the decl. | 21:46 | |
lue | > my ($a where 0..10); $a = 20; | 21:47 | |
20 | |||
jnthn | Ah, guess constraint types on variables are not yet re-implemented. :-( | 21:51 | |
lue | so it's no longer a grammar issue? [see gist.github.com/471833 for what I did] | 21:52 | |
masak | loliblogged! use.perl.org/~masak/journal/40442 | 21:55 | |
& | 21:57 | ||
masak sleeps | 22:02 | ||
22:02
masak left
|
|||
lue | jnthn: what's weird is that 'where' works in parameters | 22:09 | |
rakudo: sub xyzzy($a where 0..10) { say $a }; xyzzy(5); xyzzy(15); | 22:10 | ||
p6eval | rakudo d60d06: OUTPUT«5» | ||
arnsholt | Does p6eval no longer print STDERR? | ||
jnthn | lue: No, it'll be more than a grammar issue. | 22:12 | |
lue: Not weird. | |||
The way signatures are built is a bit different. | |||
lue | The tricky bit [for me, considering my inexperience with Rakudo] is finding where the heck a reimplementation of 'where' for !signatures goes | 22:15 | |
jnthn | lue: I'm not quite sure how to do it off hand. | ||
arnsholt | It'd be in several places I guess? | 22:16 | |
lue | arnsholt: that's exactly what I don't like :D | ||
jnthn | lue: It'll finally need to be attached in declare_variable | 22:17 | |
arnsholt | Off the top of my head, both binding and assignment should heed constraints I think | ||
lue | jnthn: I wouldn't expect you to know. After all, it's NYI | ||
jnthn | arnsholt: It's not that they aren't heeding them. | ||
arnsholt: It's that the where constraint ain't being attached to the container. | |||
arnsholt | Oh, right =) | ||
jnthn | So that's "all" that needs doing :-) | ||
arnsholt | For some value of all, yeah | ||
jnthn | It shouldn't be too bad - I suspect we may want a fake $*PARAMETER to collect the where clauses. | 22:18 | |
But that also feels a tiny bit messy | |||
May work though | |||
Thing is, at the time I think STD didn't parse a where clause outside of a signature. | |||
lue | rakudo: our Fake $*PARAMETER; | ||
p6eval | rakudo d60d06: OUTPUT«===SORRY!===In "our" declaration, typename Fake must be predeclared (or marked as declarative with :: prefix) at line 20, near " $*PARAMET"» | 22:19 | |
jnthn | lue: will have to be in the grammar IIRC | ||
:my $*PARAMETER; or some such | |||
See where similar shows up inside Signature | |||
er, signature | |||
22:20
pjcj joined
|
|||
lue | signature as in signature.(pm|pir) ? | 22:21 | |
jnthn | no | ||
the rule in grammar.pm | |||
lue | ah | 22:22 | |
dalek | kudo: 62ee6d9 | jonathan++ | build/PARROT_REVISION: Bump PARROT_REVISION to get PAST::Compiler fix for exception handler code |
22:24 | |
lue | there's only a signature *token*, and :my $*PARAMETER doesn't show up there. [it does show up in the token below it, which is token parameter] | 22:25 | |
.oO(let's add it and see what happens!) |
|||
jnthn | lue: aha yes | ||
Taht's the one I meant | |||
pugssvn | r31629 | jnthn++ | [t/spec] Add test by KyleHa++ that didn't seem to have made it from the RT ticket to the tests for the CATCH not catching its own exception bug. | 22:26 | |
22:30
azert0x left
22:33
kid51 joined
|
|||
lue | > my $b where 0..10; $b = 39; | 22:37 | |
39 | |||
at least I don't need parentheses for that result anymore :) | |||
22:48
payload left
22:51
timbunce left
|
|||
araujo | lue, was it needed before? | 22:59 | |
lue | to get it to fail silently like that, yes. Or else an actual error message popped up. | ||
But now, it just fails silently :) | 23:00 | ||
23:04
elmex joined
23:09
elmex left
23:13
pmurias left
|
|||
sorear | jnthn: kyleha writes tests too? | 23:14 | |
kid51 is preparing an introductory talk on Rakudo* | 23:18 | ||
first audience may be a local Linux user group | |||
the talk is intended to be more of an announcement than an explanation | |||
kid51 would welcome feedback on slides: thenceforward.net/perl/talks/rakudo...index.html | 23:19 | ||
(obviously adapted from pmichaud's YAPC talk, with his permission) | |||
Tene | kid51: the "Star" part also came from the usage of * in Perl 6 as "Whatever" | ||
kid51 | Tene: yes I think pmichaud mentioned that in that talk | 23:20 | |
but that's a bit too fine a point for this talk | 23:21 | ||
Tene | 'k | ||
kid51 | ... so fine that I don't recall it from pmichaud's talk | ||
23:24
snarkyboojum joined
|
|||
snarkyboojum | kid51: on slide6 you mention Parrot and Pugs under the "Multiple implementations" bullet point. I have find that a bit misleading, perhaps Rakudo (on Parrot) and Pugs listed there? | 23:25 | |
kid51 | Well, Rakudo is the Perl 6 implementation on the Parrot virtual machine ... correct? | 23:26 | |
You can have multiple implementations of Perl 6. Those are the two most prominent. | 23:27 | ||
snarkyboojum | yeah, just pointing out that on my reading you were implying that Parrot is an implementation of Perl 6 (which I realise isn't your intention) | ||
23:27
justatheory joined
|
|||
kid51 | okay, I see what you're driving at; will fix | 23:28 | |
snarkyboojum | s/you were/you seemed to be/ | ||
jnthn | sorear: Yes :-) | ||
sorear | I knew he ran an automatic test crossposter | 23:29 | |
23:29
shade_ joined
23:31
justatheory left
|
|||
jnthn | No, he's written quite a lot of tests too :-) | 23:31 | |
kid51 | snarkyboojum: fixed in the source code (though not on the web site) | 23:33 | |
23:34
colomon joined
|
|||
kid51 | afk & | 23:34 | |
jnthn | o/ colomon :-) | 23:38 | |
ingy | rakudo: my $h = {}; $h{'foo'} ||= 0; say $h.perl; | 23:39 | |
p6eval | rakudo 62ee6d: OUTPUT«{"foo" => 0}» | ||
ingy | rakudo: my $h = {}; $h{'foo'}++ ||= 0; say $h.perl; | 23:41 | |
p6eval | rakudo 62ee6d: ( no output ) | 23:42 | |
23:42
masonkramer joined
|
|||
ingy | rakudo: my $h = {}; $h{'foo'}++ ||= 1; say $h.perl; | 23:42 | |
p6eval | rakudo 62ee6d: ( no output ) | ||
ingy | rakudo: my $h = {}; $h{'foo'}++; say $h.perl; | ||
p6eval | rakudo 62ee6d: OUTPUT«{"foo" => 1}» | ||
23:43
meppl left
|
|||
ingy | rakudo: my $h = {}; my $n = $h{'foo'}++; say $n; | 23:43 | |
p6eval | rakudo 62ee6d: OUTPUT«Any()» | ||
ingy | rakudo: my $h = {}; my $n = ++$h{'foo'}; say $n; | ||
p6eval | rakudo 62ee6d: OUTPUT«1» | 23:44 | |
ingy | rakudo: given 3 { when 4 { say "four" } } | 23:52 | |
p6eval | rakudo 62ee6d: ( no output ) | ||
ingy | rakudo: given 3 { when 3 { say "four" } } | ||
p6eval | rakudo 62ee6d: OUTPUT«four» | ||
23:55
Psyche^ joined
23:59
Patterner left,
Psyche^ is now known as Patterner
|