Re: [perl #128628] problem using semaphore with many threads

2016-07-28 Thread Jonathan Worthington
On Fri, Jul 22, 2016 at 10:46 AM, mt1957 via RT < perl6-bugs-follo...@perl.org> wrote: > I'm afraid the test I've created still hangs in rakudo version > 2016.07.1-37-g60f256d built on MoarVM version 2016.07-3-gc01472d > implementing Perl 6.c. > > That's still a too old MoarVM version. You'd need

Re: state and = vs :=

2014-10-02 Thread Jonathan Worthington
On 10/2/2014 16:03, Elizabeth Mattijsen wrote: On 01 Oct 2014, at 07:48, Father Chrysostomos wrote: Does ‘state’ govern ‘:=’ the way it governs ‘=’? In other words, just as this: state $x = 1; only assigns to $x once (per closure), does the same apply to this? state $x := $y; I can

Rakudo Star Release 2014.04 - A useful, usable, "early adopter" distribution of Perl 6

2014-05-05 Thread Jonathan Worthington
perl6-langu...@perl.org perl6-compi...@perl.org parrot-us...@lists.parrot.org Cc: Bcc: Message-Id: <1399313885.8...@jnthn.net> X-Originating-IP: 62.220.188.70 X-Mailer: Webmin 1.550 Date: Mon, 05 May 2014 20:18:05 +0200 (CEST) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="bound139931

Re: static inline probing for MoarVM

2014-02-19 Thread Jonathan Worthington
On 2/18/2014 16:15, Nicholas Clark wrote: On Tue, Feb 18, 2014 at 03:11:01PM +, Nicholas Clark wrote: Attached is the proposed patch, which implements compiler based probing for the MoarVM Configure.pl. Tested on OS X, FreeBSD, Linux, HP/UX and AIX. Not tested on Win32, so might not work th

Re: MoarMV attempts to lock an already locked mutex

2014-01-09 Thread Jonathan Worthington
On 1/9/2014 22:40, Nicholas Clark wrote: On Thu, Jan 09, 2014 at 10:32:37PM +0100, Jonathan Worthington wrote: Hi, On 1/9/2014 22:00, Nicholas Clark wrote: I've been running with the appended for a few weeks now, and I think that it's the right fix. Unfortunately, releasing the mut

Re: MoarMV attempts to lock an already locked mutex

2014-01-09 Thread Jonathan Worthington
Hi, On 1/9/2014 22:00, Nicholas Clark wrote: On Sat, Dec 21, 2013 at 08:45:49PM +, Nicholas Clark wrote: ==11811== Thread #1: Attempt to re-lock a non-recursive lock I already hold ==11811==at 0x4C2BFC1: pthread_mutex_lock (hg_intercepts.c:484) ==11811==by 0x4FACB40: uv_mutex_lock

Re: detecting missing roots and other GC mistakes

2013-12-19 Thread Jonathan Worthington
Hi, On 12/16/2013 10:15, Nicholas Clark wrote: Edited it to carry on with just NQP, and got a hit at 2013. Starting program: /home/nicholas/Sandpit/burndown1/bin/moar --libpath=src/vm/moar/stage0 src/vm/moar/stage0/nqp.moarvm --bootstrap --module-path=gen/moar/stage1 --setting-path=gen/moar/s

Re: Unexpected expansion of string with xx

2013-12-19 Thread Jonathan Worthington
On 12/19/2013 3:47, Richard Hainsworth wrote: Initially I though the following was a bug, but now I'm not sure. I got these results perl6 -v This is perl6 version 2013.09 built on parrot 5.5.0 revision 0 $ perl6 > say '0' xx 4 0 0 0 0 Are you sure you didn't want the x (string repetition) opera

Re: detecting missing roots and other GC mistakes

2013-12-17 Thread Jonathan Worthington
On 12/15/2013 21:50, Nicholas Clark wrote: On Sun, Dec 15, 2013 at 05:56:40PM +, Nicholas Clark wrote: With this, all NQP tests pass I can build the Rakudo setting, with a nursery size of 2048K. I have now written a script that will attempt to repeatedly recompile that far, each time dropp

Re: Building MoarVM on Solaris

2013-08-22 Thread Jonathan Worthington
On 8/22/2013 20:00, Andy Dougherty wrote: I have attached an updated set of patches I used to build MoarVM. These worked on both Solaris11/x64 and on OpenBSD 5.3. They also seemed to cause no harm under Linux. The patches were made with git format-patch, but to avoid possible corruption through

Re: [perl #116280] [BUG] NaN, Inf, -Inf aren't padded with spaces in sprintf in Rakudo

2013-01-08 Thread Jonathan Worthington
On 1/8/2013 22:38, Patrick R. Michaud wrote: I wonder what it would take to write a version of sprintf in Perl 6 or NQP directly, ignoring all speed aspects for the time being. Then we'd at least have something portable, provably correct, easily modified, and that could be used as a reference i

Rakudo Star 2012.10 released

2012-10-29 Thread Jonathan Worthington
On behalf of the Rakudo and Perl 6 development teams, I'm happy to announce the October 2012 release of "Rakudo Star", a useful and usable distribution of Perl 6. The tarball for the October 2012 release is available from . A Windows .MSI version of Rakudo

Re: [perl #113660] [BUG] rakudo build fails when building NQPCORE.setting.pir starting with rakudo git tag 0fde4a1e375a26da8d7b511aafdb6174e934b757

2012-06-21 Thread Jonathan Worthington
On 6/21/2012 23:59, Ron Schmidt via RT wrote: So jnthn asked on IRC for someone to get the NQP commit that causes the build to break and I think I got it I set rakudo to build from rakudo commit 0fde4a1e375a26da8d7b511aafdb6174e934b757 and did Perl Configure.pl -- gen-parrot and watched the buil

Re: [perl #113660] [BUG] rakudo build fails when building NQPCORE.setting.pir starting with rakudo git tag 0fde4a1e375a26da8d7b511aafdb6174e934b757

2012-06-21 Thread Jonathan Worthington
On 6/21/2012 23:59, Ron Schmidt via RT wrote: So jnthn asked on IRC for someone to get the NQP commit that causes the build to break and I think I got it I set rakudo to build from rakudo commit 0fde4a1e375a26da8d7b511aafdb6174e934b757 and did Perl Configure.pl -- gen-parrot and watched the buil

Re: sound distribution practices

2012-04-07 Thread Jonathan Worthington
On 4/7/2012 19:11, Allison Randal wrote: Okay, instead of just complaining about this, I want to do something about it. The Rakudo packages are so fragile on Debian, that they need special constraints to make sure the Parrot packages are held back until the Rakudo packages are updated. So, why i

Announce: Rakudo Star 2012.02 released

2012-02-28 Thread Jonathan Worthington
On behalf of the Rakudo and Perl 6 development teams, I'm happy to announce the February 2012 release of "Rakudo Star", a useful and usable distribution of Perl 6. The tarball for the February 2012 release is available from . In the Perl 6 world, we make

Announce: Rakudo Star 2012.01 released

2012-01-28 Thread Jonathan Worthington
On behalf of the Rakudo and Perl 6 development teams, I'm happy to announce the January 2012 release of "Rakudo Star", a useful and usable distribution of Perl 6. The tarball for the January 2012 release is available from . In the Perl 6 world, we make a

Re: [perl #77202] [BUG] "Method 'foo' not found" error is missing class name

2011-10-05 Thread Jonathan Worthington
On 10/5/2011 3:40 AM, Mark J. Reed wrote: In 'A.foo', is the invocant really "of class A"? I mean, given that it *is* class A... No, it's not "class A", or some kind of class object - those don't exist in Perl 6. It's an empty instance of class A, so the error message is appropriate. The invoc

Re: PDL datastructure in the core spec

2011-04-06 Thread Jonathan Worthington
have in implementing it. Jonathan Worthington is working on a new meta object system for Rakudo, which for example should enable natively typed arrays, and other goodies. This would be an excellent foundation for PDL. A bunch of the stuff that needs to happen to get the S09 PDL-ish bits implement

Re: [perl #80694] [BUG] Strange stateful results when calling a method containing a .^can call in Rakudo

2010-12-13 Thread Jonathan Worthington
On 13/12/2010 21:08, Carl Mäsak (via RT) wrote: # New Ticket Created by "Carl Mäsak" # Please include the string: [perl #80694] # in the subject line of all future correspondence about this issue. #http://rt.perl.org/rt3/Ticket/Display.html?id=80694> rakudo: class A { method foo { 'abc' };

Re: Implementations until Perl 6.0.0 released?

2010-11-27 Thread Jonathan Worthington
On 27/11/2010 18:37, Jonathan Worthington wrote: On 26/11/2010 17:17, gvim wrote: I'm new to the Perl 6 lists so can someone tell me if the "implementations" of Perl 6 will eventually transition to a Perl 6.0.0 standard or will TIMTOWTDI apply to the language itself inde

Re: Implementations until Perl 6.0.0 released?

2010-11-27 Thread Jonathan Worthington
On 26/11/2010 17:17, gvim wrote: I'm new to the Perl 6 lists so can someone tell me if the "implementations" of Perl 6 will eventually transition to a Perl 6.0.0 standard or will TIMTOWTDI apply to the language itself indefinitely? The implementations are aiming towards passing a common test s

Packed arrays and assignment vs binding

2010-11-13 Thread Jonathan Worthington
Hi, Per S09, we can write in Perl 6: my int @x; And the idea is that we get a packed array - conceptually, a single lump of memory allocated and and storing a bunch of ints contiguously. Contrast this to: my Int @x; Where we get an array of scalar containers, each of which is only allowed

Re: [perl6/specs] 58fe2d: [S12] spec setting and getting values of attribute...

2010-09-30 Thread Jonathan Worthington
On 30/09/2010 10:49, Damian Conway wrote: As long as C<.perl> works the way it does, there can be no real privacy. Sigh. That is indeed badly broken. Surely it ought to default to C, and require class architects to override .perl explicitly if they wish to break encapsulation. I see/use .perl

Re: not using get/set (was Re: [perl6/specs] 4d77c0: ...)

2010-09-30 Thread Jonathan Worthington
On 30/09/2010 21:38, Darren Duncan wrote: Mark J. Reed wrote: Of alternatives you didn't mention, I like "put" - as pithy as "get" and "set", with plenty of corresponding history (SmallTalk, POSIX, HTTP,...). Actually, *yes*. I didn't think of this one at the time but when you mentioned the

Re: Buf.pm: FIFO and grammar

2010-08-13 Thread Jonathan Worthington
Nicholas Clark wrote: On Thu, Aug 12, 2010 at 03:38:31PM +0200, Carl Mäsak wrote: In fact, jnthn++ had a talk at YAPC::EU the other week where he showed how nested signatures can be used to make hierarchical matches. A proof-of-concept module could simply be some sugar around this already ex

Re: Smart match isn't on Bool

2010-08-01 Thread Jonathan Worthington
Darren Duncan wrote: TSa (Thomas Sandlaß) wrote: ... unless you want C to do a value-and-type check, in which case it doesn't exactly follow the pattern for smartmatching of the other builtin types (which only check value equivalence, not type equivalence). This is true only if you want to dis

Re: Array membership test?

2010-07-29 Thread Jonathan Worthington
Mark J. Reed wrote: Possibly a FAQ, but is there a simple way of asking if an item is contained in an array? I know of $x ~~ any(@array) and @array.grep({ $_ ~~ $x}), but those both seem a bit complicated for a conceptually simple test, so I'm wondering if I'm missing something. Note that grep d

Re: [perl #76442] [BUG} say ?1..2 # prints ones indefinitively

2010-07-12 Thread Jonathan Worthington
Aaron Sherman wrote: On Sun, Jul 11, 2010 at 9:46 PM, Patrick R. Michaud wrote: On Sat, Jul 10, 2010 at 04:44:40AM -0700, Stephane Payrard wrote: # both statement below print 1 ad nauseam. say ?1..2 say (?1)..2 What should the result of True..2 be? (Note that (1,2) is probabl

Re: [perl #76330] MONKEY_TYPING cannot add method named invoke

2010-07-02 Thread Jonathan Worthington
Paweł Pabian (via RT) wrote: # New Ticket Created by Paweł Pabian # Please include the string: [perl #76330] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=76330 > [19:53] rakudo: use MONKEY_TYPING; augment class Any { m

Re: S06 -- grammatical categories and macros

2010-06-30 Thread Jonathan Worthington
Aaron Sherman wrote: See below for the S06 section I'm referring to. I'm wondering how we should be reading the description of user-defined operators. For example, "sub infix:<(c)>" doesn't describe the precedence level of this new op, so how is it parsed? Is there a default? The default is

Re: underscore in numbers

2010-06-17 Thread Jonathan Worthington
Aaron Sherman wrote: The spec says, and NQP seems to implement (Rakudo, I think, picks up from NQP as defined in HLL-s0.pir, is this right?) that a single underscore is ignored between any two digits in a number, not between the radix and the number. However, it seems to me that this would be ve

Re: expression of seconds (was Re: A new era for Temporal)

2010-04-09 Thread Jonathan Worthington
Darren Duncan wrote: Dave Rolsky wrote: On a smaller point, I think second vs whole_second is the wrong Huffman coding. I'd think most people want the integer value. Well, whatever you call things, the most important thing is to keep the seconds count as a single number which can do fractions

Re: [perl #59118] Class attributes without accessors don't work in Rakudo

2010-03-21 Thread Jonathan Worthington
Carl Mäsak via RT wrote: On Sun Mar 21 14:33:26 2010, lue wrote: class A { has $.b; method x { $!b = "b" } }; A.new.x this works. Sure, but that doesn't create a class attribute, as was the topic of this ticket. :) The 'has' declarator gives each object instance its own attribute, wh

Re: Type system for Perl 6

2010-02-05 Thread Jonathan Worthington
Giuseppe Castagna wrote: On 02/05/2010 11:29 PM, Jonathan Worthington wrote: And the odering in dispatch is not a type lattice as in Cecil but a topological ordering. Again I've no clue what that means. and all objects that do A are also B doers. So one could infer that we have A <

Re: Type system for Perl 6

2010-02-05 Thread Jonathan Worthington
Giuseppe Castagna wrote: Yes I saw that inheritance is not subtyping. I would not share this decision since as an outsider, it seems to me that Perl6 has redundant syntax (too many different ways to express the same thing), so it is astonishing that in that case the choice was to use the same k

Re: Type system for Perl 6

2010-02-05 Thread Jonathan Worthington
Hi, TSa (Thomas Sandlaß) wrote: There is no formally defined subtype relation or rules for subsumption. A type is called narrower without details what that means. A is a subtype of B if A ~~ B, where ~~ is the smart-match operator..It's up to the type object on the RHS how it responds to this.

Re: [perl #71536] [BUG] Rakudo allows two multi variants with the exact same signature to be defined

2009-12-27 Thread Jonathan Worthington
On 22/12/2009 10:22, Moritz Lenz wrote: Carl MXXsak (via RT) wrote: This be Rakudo 8dc189. $ perl6 -e 'multi sub f($a) {}; multi sub f($a) {}; f(42)' Ambiguous dispatch to multi 'f'. Ambiguous candidates had signatures: :(Any $a) :(Any $a) The definition of two variants with equivalent sig

Re: unusual invocants

2009-10-21 Thread Jonathan Worthington
Ovid wrote: I was asking the special case where: 1. A class consumes two (or more) roles 2. Each roles provides a method with an identical signature 3. The methods are not equivalent and neither role can rely on the other's method With that, you have roles which cannot be composed. You must

Re: Overloading Roles

2009-10-06 Thread Jonathan Worthington
Jon Lang wrote: Concerning that last one: would it be reasonable to have a Discrete role that provides a .succ method, and then overload the Range role? E.g.: role Range[Ordered ::T] { ... } role Range[Ordered Discrete ::T] { ... method iterator ( -> RangeIterator ) { .

Re: time complexity of searching elements in hash tables in Perl

2009-08-22 Thread Jonathan Worthington
Nicholas Clark wrote: My understanding is that this makes Perl 5 hash tables amortised O(1). Hopefully someone else will answer the Perl 6 side properly. My understanding is that the point of a hash table data structure was that lookups are amortised O(1). However, doing it right - and cert

Re: [perl #68306] Rakudo 2009-07

2009-08-08 Thread Jonathan Worthington
Aaron Sherman (via RT) wrote: I'm working in a firewalled environment today where I can't get access to git, so here's what I see in 2009-07 downloaded from http://github.com/rakudo/rakudo/downloads S12 says: "The .^methods method returns method-descriptors containing: name

Re: Testing Perl 6 analog to Perl 5's tie.

2009-08-08 Thread Jonathan Worthington
Aaron Sherman wrote: On Sun, Aug 2, 2009 at 1:10 PM, Moritz Lenz wrote: Let's pick up this old mail before it gets completely warnocked ;-) For the record, this discussion only applies to scalar implementation types. For example for Arrays I expect things to work by overriding the method p

Re: Fwd: [perl #64080] tests available

2009-07-29 Thread Jonathan Worthington
Just to weigh in with another developer opinion... Patrick R. Michaud wrote: For each ticket that is open, it's very useful to know that a spectest has been written for the ticket and where that spectest is located. So, having the notification added to RT is valuable to me at least, as it means

Roles discussion

2009-07-08 Thread Jonathan Worthington
Hi all, It's been interesting to participate in the roles discussion so far, and I'm happy to see there's a lot of interest in getting the right options and the right defaults. I'm leaving tomorrow morning on vacation, and will be mostly offline for a week or so (the alps are quite a distract

Re: YAPC::EU and Perl 6 Roles

2009-07-08 Thread Jonathan Worthington
Hi, Going back to the original question... Ovid wrote: It needs the timed fuse() from a Bomb role and a non-lethal explode() from a Spouse role, though each role provides both methods. I'm curious... 1) How often do you in real life find yourself needing to do things like this in real life?

Re: YAPC::EU and Perl 6 Roles

2009-07-08 Thread Jonathan Worthington
Jon Lang wrote: Jonathan Worthington wrote: Ovid wrote: Though I have issues with Jonathan's approach (I don't like classes silently discarding role methods as this has caused us many bugs at the BBC), it's much cleaner that what I see here. s/Jonathan'

Re: YAPC::EU and Perl 6 Roles

2009-07-08 Thread Jonathan Worthington
Ovid wrote: - Original Message From: Timothy S. Nelson class PracticalJoke { has Bomb $bomb handles ; has Spouse $spouse handles ; } Note that I have no idea where (if anywhere) the type goes in this. Hopefully someone will correct me here. Note that this does not us

Re: [perl #67278] non-awesome error message on 'class NewClass does OldClass'

2009-07-07 Thread Jonathan Worthington
Moritz Lenz wrote: chromatic wrote: On Monday 06 July 2009 23:55:28 Moritz Lenz wrote: I think abusing a class as a role is forbidden I hope it's not! Well, it surely depends on context. You can "pun" a role into a class by instantiating it, but the correct way to apply

Re: YAPC::EU and Perl 6 Roles

2009-07-07 Thread Jonathan Worthington
Brandon S. Allbery KF8NH wrote: On Jul 7, 2009, at 08:13 , Jonathan Worthington wrote: Brandon S. Allbery KF8NH wrote: I was trying to figure out how to do it with nextsame, but that's not looking very simple. On the other hand, if they were multis then they get added to the multi cand

Re: YAPC::EU and Perl 6 Roles

2009-07-07 Thread Jonathan Worthington
Brandon S. Allbery KF8NH wrote: On Jul 7, 2009, at 07:34 , Jonathan Worthington wrote: Jon Lang wrote: I believe that the official word is to say: class PracticalJoke does Bomb does Spouse { method fuse () { Bomb::fuse } method explode () { Spouse::explode } } This way won't

Re: YAPC::EU and Perl 6 Roles

2009-07-07 Thread Jonathan Worthington
Jon Lang wrote: I believe that the official word is to say: class PracticalJoke does Bomb does Spouse { method fuse () { Bomb::fuse } method explode () { Spouse::explode } } This way won't work, because: * It's doing a sub call to something that's a method * The lookup won't wor

Re: YAPC::EU and Perl 6 Roles

2009-07-07 Thread Jonathan Worthington
Ovid wrote: Giving a talk about roles at YAPC::EU in Lisbon Hey, me too! :-) and I'm a bit stuck on how to translate a Perl 5 example into Perl 6. Basically, Imagine a "PracticalJoke" class which has fuse() and explode methods(). It needs the timed fuse() from a Bomb role and a non-lethal

Re: [perl #66928] [BUG] Null PMC access when doing .WHAT on a built-in infix op in Rakudo

2009-07-01 Thread Jonathan Worthington
Kyle Hasselbacher wrote: I've written a test for this in S12-methods/what.t in r27345. # RT #66928 { lives_ok { &infix:<+>.WHAT }, 'Can .WHAT built-in infix op'; isa_ok &infix:<+>.WHAT, Multi, '.WHAT of built-in infix op is Multi'; } Second one probably wants to be: ok &infix:<+>.W

Re: [perl #66006] Misleading error for undefined methods

2009-05-26 Thread Jonathan Worthington
jason switzer (via RT) wrote: # New Ticket Created by "jason switzer" # Please include the string: [perl #66006] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=66006 > When a method is called without using one of the avai

Re: Array variables as formal parameters ???

2009-05-23 Thread Jonathan Worthington
Hi, Little clarification... Henry Baragar wrote: I think that in your "Example 1", that you may be making too making too much of a distinction between "$a" and "@a". That is: sub f2(@y) {...} has exactly the same signature as sub f2($x is Array) {...} In other words, they both take

Re: Meditations on a Loop

2009-05-22 Thread Jonathan Worthington
Daniel Ruoso wrote: Em Sex, 2009-05-22 às 01:25 -0500, John M. Dlugosz escreveu: @primes = do $_ if prime($_) for 1..100; becomes @primes = $_ when prime($_) for 1..100; you gained one stroke, it's certainly better... I think it's time to play golf with Perl 6 already ;) joke

Re: r26700 - docs/Perl6/Spec

2009-05-07 Thread Jonathan Worthington
Moritz Lenz wrote: Jon Lang wrote: @@ -1836,6 +1836,12 @@ prototype objects, in which case stringification is not likely to produce something of interest to non-gurus.) +The C<.^parents> method by default returns a flattened list of all +parents sorted in MRO (dispatch) order. Other option

.WALK

2009-05-07 Thread Jonathan Worthington
Hi, I've just checked in a test file for .WALK as spec'd in S12. http://svn.pugscode.org/pugs/t/spec/S12-introspection/walk.t While I'm happy :canonical, and :super are correct (the first is just C3 by default and the second just those from the superclass) and I think :breadth is also, I'm a

Re: [perl #64922] An unamiguous case of dispatch treated as an ambiguous one

2009-04-22 Thread Jonathan Worthington
Carl Mäsak (via RT) wrote: # New Ticket Created by "Carl Mäsak" # Please include the string: [perl #64922] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=64922 > This might be in RT already, but I didn't find it, so...

Re: [perl #64448] [BUG] rakudo cannot be executed outside rakudo's build directory

2009-04-04 Thread Jonathan Worthington
jason switzer (via RT) wrote: According to pmichaud: (00:10:51) pmichaud: oh, looks like a bug jnthn introduced. (00:11:08) pmichaud: I suspect I'll have to let him repair it. (00:12:27) pmichaud: The code being generated by actions.pm is now adding a line like: .include "src/pr_macros.pir" (0

Re: S08 Draft questions (Captures and Signatures)

2009-04-01 Thread Jonathan Worthington
Jon Lang wrote: Invocants: * Is it illegal to specify an invocant in a sub, or is it merely nonsensical? That is, should the compiler complain, or should it silently treat the invocant as the first positional parameter? (The latter has the advantage that you don't have to worry about what the

Re: [perl #63874] [PATCH] floor-ceiling-round-sign-and-abs-in-perl6

2009-03-24 Thread Jonathan Worthington
Geoffrey Broadwell wrote: On Tue, 2009-03-24 at 11:56 -0500, Patrick R. Michaud wrote: On Mon, Mar 16, 2009 at 09:41:37PM -0700, Geoffrey Broadwell wrote: Gotcha. Sounds fine by me (as long as the Perl 6 signatures don't carry significantly more overhead than the pure-PIR version).

Re: r25891 - in docs/Perl6/Spec: . S32-setting-library

2009-03-20 Thread Jonathan Worthington
Daniel Ruoso wrote: Em Sex, 2009-03-20 às 14:08 +0100, Jonathan Worthington escreveu: It's probably a minor issue, but part of me wants Junction to be OK too for explaining stuff. Telling people the default parameter type is Any, to accept anything they can write Object and to accept

Re: r25891 - in docs/Perl6/Spec: . S32-setting-library

2009-03-20 Thread Jonathan Worthington
Daniel Ruoso wrote: Em Qua, 2009-03-18 às 18:50 -0700, Larry Wall escreveu: On Wed, Mar 18, 2009 at 06:32:18PM -0700, Jon Lang wrote: : > +method !eigenstates (Junction $j: --> List) : : Shouldn't that be lowercase-j junction? Maybe, though there might be a Junction role involved for su

Re: filing a ticket

2009-03-20 Thread Jonathan Worthington
Amir E. Aharoni wrote: I wanted to file a couple of tickets about Rakudo. Unfortunately, i couldn't find instructions for doing it anywhere at www.rakudo.org or dev.perl.org/perl6/ . So how do i do it? Apologies for the lack of information. Short answer: send email to rakudo...@perl.org to

Re: Rakudo release tomorrow

2009-03-20 Thread Jonathan Worthington
Patrick R. Michaud wrote: Hello, everyone! I'm now officially back from a very restful and enjoyable family vacation. Glad you got some rest and fun. :-) I intended to put out a call for release blockers yesterday but we got back to our hotel room very late and we had to get up early thi

Re: Rakudo release tomorrow

2009-03-20 Thread Jonathan Worthington
Carl Mäsak wrote: Patrick (>): I intended to put out a call for release blockers yesterday but we got back to our hotel room very late and we had to get up early this morning to pack and catch our flights home. So, although I'm fairly sure that I could cut the release now and everything woul

Re: r25821 - docs/Perl6/Spec

2009-03-18 Thread Jonathan Worthington
Mark J. Reed wrote: Shouldn't that desugar to (Int $ where 0)? After all, 0.WHAT is Int... Yes, I proposed that in my second reply too, after realizing .WHAT gave us that too. :-) Of course, then someone will expect multi sub fib (0|1) { return @_[0] } to DTRT here... That's fine, bec

Re: r25821 - docs/Perl6/Spec

2009-03-18 Thread Jonathan Worthington
Jonathan Worthington wrote: Moritz Lenz wrote: pugs-comm...@feather.perl6.nl wrote: +You can leave out the block when matching against a literal value of some +kind: + +multi sub fib ($n where 0|1) { return $n } +multi sub fib (Int $n) { return fib($n-1) + fib($n-2) } + +In fact

Re: r25821 - docs/Perl6/Spec

2009-03-18 Thread Jonathan Worthington
Moritz Lenz wrote: pugs-comm...@feather.perl6.nl wrote: +You can leave out the block when matching against a literal value of some +kind: + +multi sub fib ($n where 0|1) { return $n } +multi sub fib (Int $n) { return fib($n-1) + fib($n-2) } + +In fact, you can leave out the 'where' d

Re: [perl #56976] [TODO] implement state variables

2009-03-17 Thread Jonathan Worthington
Nicholas Clark wrote: On Tue, Mar 17, 2009 at 06:45:51PM +0100, Jonathan Worthington wrote: Nicholas Clark wrote: Yay. As does this? my @bar = 1,2,3; sub swatest { (state @foo) = @bar; my $x = @foo.perl; @foo[0]++; return $x } is swatest(), '[1,

Re: [perl #56976] [TODO] implement state variables

2009-03-17 Thread Jonathan Worthington
Nicholas Clark wrote: Yay. As does this? my @bar = 1,2,3; sub swatest { (state @foo) = @bar; my $x = @foo.perl; @foo[0]++; return $x } is swatest(), '[1, 2, 3]', 'array state initialized correctly'; is swatest(), '[1, 2, 3]', 'array state retained betwe

Re: [perl #56976] [TODO] implement state variables

2009-03-17 Thread Jonathan Worthington
Nicholas Clark wrote: Do you have list assignment working properly? ie: state (@foo) = @bar; and, I think, state (@foo) = baz(); Aye, thankfully that just fell naturally out of Rakudo's existing list assignment implementation, though it was under-tested. So I just added: my @

Re: Roles driven by events

2009-03-16 Thread Jonathan Worthington
Ovid wrote: Having a problem with the following role in Perl 5: package PIPs::ResultSource::Role::HasTags; use Moose::Role; requires 'do_setup'; after 'do_setup' => sub { ... }; So far this has worked really well, aside from that one class which didn't call 'do_setup'. Oops. Requiri

Re: a junction or not

2009-03-15 Thread Jonathan Worthington
Richard Hainsworth wrote: The following (the n:> is to mark the lines) are legal: 1:> my @x = 1,2,3,4; ([+] @x).say; # output 10 2:> my @x = 1|11,2,3,4; ([+] @a).perl.say; # output any(10,20) 3:> my @x = 1|11,2,3,4; ([+] @a).eigenstates.min.say; # output 10 However, the next line isnt 4:> my @x

Re: Recursive Runtime Role Reapplication Really Rebounds

2009-03-12 Thread Jonathan Worthington
Daniel Ruoso wrote: Em Qui, 2009-03-12 às 10:28 -0700, Larry Wall escreveu: On Thu, Mar 12, 2009 at 08:51:45AM -0700, Ovid wrote: : > From: David Green : > I suppose, but is there a reason why you want to apply roles instead of coercing : > the results? : Because I am coming from Moose inst

Re: [perl #63384] [BUG] actions.pm calling setting.pm methods by mistake

2009-02-23 Thread Jonathan Worthington
Chris Dolan (via RT) wrote: gen_actions.pir and gen_setting.pir both have ":subid("16")" and the wrong one is being called during compilation. I'm using parrot 0.9.1, compiled from svn tag RELEASE_0_9_1 and building Rakudo from git head (commit f23eda2c5251db5a90f5fdd3b587d4c234ee70e4) on M

Re: Implementing $?LINE and other S02 compile-time vars

2009-02-16 Thread Jonathan Worthington
Patrick R. Michaud wrote: They're likely doable, yes. I'm not entirely certain how to handle the case of anonymous grammars, classes, roles, etc. -- those lookups may be a bit trickier. I planned to do these just as lexicals. Since we build the class inside the block anyway, if we set a $?C

References to parts of declared packages

2009-02-11 Thread Jonathan Worthington
Hi, If we declared, for example: role A::B {}; Then what should a reference to A be here? At the moment, Rakudo treats it as a post-declared listop, however I suspect we should be doing something a bit smarter? If so, what should the answer to ~A.WHAT be? Thanks, Jonathan

Re: [perl #62730] Internal Parrot errors leak through when passing some kinds of pairs

2009-01-29 Thread Jonathan Worthington
chromatic wrote: On Wednesday 28 January 2009 05:43:08 jn...@jnthn.net via RT wrote: I figured this would be easy to fix, but it's not. Basically, because for infix:=> we could have any complex expression that generates a key on the RHS, and Parrot does not allow us to pass named arguments w

Re: Rakudo repository -- svn or git?

2009-01-27 Thread Jonathan Worthington
Patrick R. Michaud wrote: On Tue, Jan 27, 2009 at 11:25:29AM -0700, Stephen Weeks wrote: Switching the rakudo repository to git means that it would likely live on github, at least for a short time. We'd also have to provide mechanisms for people to continue to obtain and be able to easily co

Re: [svn:parrot] r35869 - trunk/languages/perl6/src/classes

2009-01-22 Thread Jonathan Worthington
Will Coleda wrote: On Thu, Jan 22, 2009 at 11:45 AM, Patrick R. Michaud wrote: On Wed, Jan 21, 2009 at 09:00:23AM -0800, c...@cvs.perl.org wrote: Author: coke Date: Wed Jan 21 09:00:22 2009 New Revision: 35869 Modified: trunk/languages/perl6/src/classes/Range.pir Log: Add a basic

Re: [perl #62568] [BUG] Intermittant I/O test failures

2009-01-21 Thread Jonathan Worthington
publiustemp-perl6compil...@yahoo.com (via RT) wrote: I've been trying to update Test.pm but I'm getting bitten by intermittent failures in I/O tests when I run "make spectest". These usually happen in t/spec/S16-filehandles/io_in_for_loops.t and t/spec/S16-filehandles/io_in_while_loops.t. The

Re: Ops Review

2009-01-20 Thread Jonathan Worthington
chromatic wrote: On Monday 19 January 2009 14:13:22 Bob Rogers wrote: Do you think that would be fast enough? The usual way for dynamic languages to get fast compiled numeric code is to bind variables to hardware types at compile time, and then inline numeric operations in order to use that

Re: [perl #41825] [BUG] morph vtable override not working in PIR

2009-01-17 Thread Jonathan Worthington
Patrick R. Michaud wrote: Just for the record, AFAICT none of PGE/PCT/Rakudo make use of morph any longer. This is true AFAIK too. We now have the 'copy' opcode to do what the "morph workaround" was doing (and I don't think copy is using VTABLE_morph). IIRC, copy once used to, but stopp

Re: [perl #62260] [BUG] END blocks don't see external variables

2009-01-13 Thread Jonathan Worthington
Patrick R. Michaud wrote: Confirmed -- there are still issues with lexicals in a variety of control blocks. I skimmed the code for that today. I noticed that we compiled the blocks right away and pushed them onto @?END at compile time. Is there any reason not to just compile them with every

Re: [PATCH] Add .trim method

2009-01-12 Thread Jonathan Worthington
Ovid wrote: - Original Message In the pir, doesn't the "s = self" line copy self, thus ensuring that I'm changing "s" and not "self"? No, it's binding. Or do I need "s = clone self" (or however it's written). Yeah, but also note that substr would return a copy... Can't sa

Re: [PATCH] Add .trim method

2009-01-12 Thread Jonathan Worthington
Aristotle Pagaltzis wrote: * Ovid [2009-01-12 16:05]: Or all could be allowed and $string.trim(:leading<0>) could all $string.rtrim internally. ++ Note you can write it :!leading too. :-) Jonathan

Re: [perl #62156] Problems with File objects

2009-01-11 Thread Jonathan Worthington
Patrick R. Michaud via RT wrote: On Sat Jan 10 03:34:57 2009, masak wrote: rakudo: File.new rakudo 35336: OUTPUT«get_bool() not implemented in class 'File' [...] rakudo: say File.new rakudo 35336: OUTPUT«get_string() not implemented in class 'File' [...] rakudo: say File.new.WHAT rakudo

Re: [perl #61990] [BUG] setset .WHAT returns incorrect value

2009-01-05 Thread Jonathan Worthington
publiustemp-perl6interna...@yahoo.com (via RT) wrote: For r35004: subset Even of Int where { not $_ % 2 }; my Even $num = 2; say $num; say $num.WHAT; Output: 2 Int I'm expecting: 2 Even I think the current behaviour is correct (or at least, implemented to match my und

Re: [perl #57968] Fix issues with Int type constraint and Integer PMCs

2008-11-25 Thread Jonathan Worthington
Patrick R. Michaud via RT wrote: Is this still an issue? If so, can we enumerate the exact things we want this ticket to address? There's nothing in this area I know of that needs addressing. I suggest closing the ticket and if we find any specific issues relating to this, we can open one w

Re: [perl #45857] [IMCC][RFC] #line vs .line

2008-11-23 Thread Jonathan Worthington
Patrick R. Michaud wrote: Either way works for me -- PCT can generate either without much difficulty. It probably makes more sense to have separate .file and .line directives. In particular, I wouldn't want to be repeating the .file annotation information throughout the bytecode! :-) Just a r

Re: [perl #45857] [IMCC][RFC] #line vs .line

2008-11-23 Thread Jonathan Worthington
Klaas-Jan Stol wrote: Minor detail: .file does not actually exist, except in PIRC. Well, I guess we can add it... I do not have a strong preference for adding it. Pro: it's a bit clearer than .line, as .line indicates, ehm, the "line" :-) Specifying a filename by .line is a bit weird. Con:

Re: [perl #45857] [IMCC][RFC] #line vs .line

2008-11-23 Thread Jonathan Worthington
Klaas-Jan Stol via RT wrote: On Thu Dec 13 04:35:13 2007, pmichaud wrote: On Sat Sep 29 08:57:28 2007, kjs wrote: A few months ago, the "#line" directive was implemented. I'm wondering what the reason was why it looks like a comment (as # will start a comment). Is there an

Re: multi return values

2008-11-21 Thread Jonathan Worthington
Andy Colson wrote: Hi all, what's wrong with this code: use v6; sub multireturn($x, $y) { my $a = $x * 2; my $b = $y * 2; return($a, $b); } my($a, $b) = multireturn(2, 3); Nothing that I can see. using: This is Rakudo Perl 6, revision 32970 built on parrot 0.8.1-devel for i486-

Re: A question about role-private attributes

2008-11-09 Thread Jonathan Worthington
[EMAIL PROTECTED] wrote: I am trying to understand the following small portion from S12, and it seems slightly ambiguous to me: === from S12: You may wish to declare an attribute that is hidden even from the class; a completely private role attribute may be declared like this: C The na

Type variables

2008-11-08 Thread Jonathan Worthington
Hi, A while ago I got some (admittedly under-tested) early support in for type variables. I went to check it over today to play with it a bit and try and improve the testing situation and found that it's somewhat broken. The reason is that: my ::T = Int; Now parses as if "my ::T" is a call

Re: [perl #60168] [PATCH] Refactor Junction.

2008-10-28 Thread Jonathan Worthington
Patrick R. Michaud wrote: Note that all of this effectively disappears when we have the dispatcher handling Junctions properly -- i.e., the specialized operator functions defined in Junction really should not exist. Yup, and I don't plan to spend any more time on those functions inside Juncti

Re: method signature issues

2008-09-21 Thread Jonathan Worthington
chromatic wrote: On Saturday 20 September 2008 22:24:52 Chris Davaz wrote: If it is the case that :method and :multi are incompatible, I am a bit surprised to see that in the Rakudo src directory: I said they're incompatible -- meant in terms of their semantics. I didn't say they do

  1   2   3   4   5   6   >