Re: Problem using precompiled Physics::Measure objects

2024-07-31 Thread Elizabeth Mattijsen
> On 31 Jul 2024, at 14:14, Kevin Pye wrote: > We'll keep looking at other ways of defining the objects, but thanks anyway. > (And sorry for increasing the RakuAST work needed.) No worries: what would help is a golf of the problem. And make that an issue in the rakudo repo. Liz

Re: Problem using precompiled Physics::Measure objects

2024-07-31 Thread Kevin Pye
ub > (https://docs.raku.org/syntax/sub%20EXPORT) to export whatever values > that were created when the mainline of the module runs. > > Disadvantages to this approach: > - you lose the standard capability to selective importing > - the constants are created at module load time

Re: Problem using precompiled Physics::Measure objects

2024-07-31 Thread Elizabeth Mattijsen
> On 31 Jul 2024, at 06:10, Kevin Pye wrote: > > I am trying to build a replacement for the existing Physics::Constants > module, but running into problems when loading the pre-compiled version. I > want to use code like: > > unit module Physics::Constants; > > use Physics::Unit; > use Physic

Problem using precompiled Physics::Measure objects

2024-07-30 Thread Kevin Pye
I am trying to build a replacement for the existing Physics::Constants module, but running into problems when loading the pre-compiled version. I want to use code like: unit module Physics::Constants; use Physics::Unit; use Physics::Measure; constant \avogadro-constant is export(:DEFAULT, :fun

Re: Objects, TWEAK and return

2021-03-22 Thread yary
Agreed! -y On Mon, Mar 22, 2021 at 6:45 PM Ralph Mellor wrote: > On Mon, Mar 22, 2021 at 2:12 PM yary wrote: > > > > It's not good practice to use "map" for side effects only, discarding > > the returned value–which happens here > > I agree. > > > Would [using `for`] also work-around the lack

Re: Objects, TWEAK and return

2021-03-22 Thread Ralph Mellor
On Mon, Mar 22, 2021 at 2:12 PM yary wrote: > > It's not good practice to use "map" for side effects only, discarding > the returned value–which happens here I agree. > Would [using `for`] also work-around the lack of sink context in TWEAK? Yes. > I think it is a cause of the unexpected behavi

Re: Objects, TWEAK and return

2021-03-22 Thread yary
Good to see this investigated down to the details, yet I just realized something that was bothering me about it. Going back to the original post: submethod TWEAK { $!filelist.lines».split(',').map( -> ($a, $b) { @!show.push: ( $a, $b ) }); } It's not good practice to use "map" for side ef

Re: Objects, TWEAK and return

2021-03-21 Thread Ralph Mellor
On Sun, Mar 21, 2021 at 9:47 PM wrote: > > Waw! :) Following your examples and suggestions, these work: > > > class { submethod TWEAK(-->Nil) { Any.map: {say 99} } }.new; > > class { submethod TWEAK { sink Any.map: {say 99} } }.new; > > class { submethod TWEAK { eager Any.map: {say 99} } }.new;

Re: Objects, TWEAK and return

2021-03-21 Thread mimosinnet
Waw! :) Following your examples and suggestions, these work: > class { submethod TWEAK(-->Nil) { Any.map: {say 99} } }.new; > class { submethod TWEAK { sink Any.map: {say 99} } }.new; > class { submethod TWEAK { eager Any.map: {say 99} } }.new; I really appreciate your discussion. Let me know

Re: Objects, TWEAK and return

2021-03-14 Thread Ralph Mellor
On Sun, Mar 14, 2021 at 2:12 AM Brad Gilbert wrote: > > Ralph, the last value in all functions are not sunk by default, > so of course the last one in `TWEAK` is not sunk by default. Right. Thanks for correcting this misleading part of my explanation. > The bug is that the calling code is not si

Re: Objects, TWEAK and return

2021-03-13 Thread Brad Gilbert
Ralph, the last value in all functions are not sunk by default, so of course the last one in `TWEAK` is not sunk by default. This is intended behaviour. It is up to the code that calls a function to sink the result if that is the desired behaviour. sub foo { 'a b c'.words».uc.map: *.s

Re: Objects, TWEAK and return

2021-03-13 Thread Ralph Mellor
Here's a golf: class { submethod TWEAK { Any.map: {say 99} } }.new; # class { submethod TWEAK { Any.map: {say 99}; 42 } }.new; # 99 class { submethod TWEAK (--> 42) { Any.map: {say 99} } }.new; # 99 The last line in a `BUILD` or `TWEAK` submethod is not eagerly evaluated

Re: Objects, TWEAK and return

2021-03-13 Thread Brad Gilbert
I think that this is caused because it is returning a 「Sequence」 that is not getting sunk. This is because the last value from a function is never sunk in that function. You could also use 「eager」 「sink」 or follow it with 「Nil」 or some other value (instead of 「return」) eager $!filelist.lines»

Re: Objects, TWEAK and return

2021-03-13 Thread Vadim Belman
At the first glance it looks like bug. Possibly a result of over-optimization. Worth opening an issue at https://github.com/rakudo/rakudo/issues Best regards, Vadim Belman > On Mar 13, 2021, at 3:29 PM, mimosin...@gmail.com wrote: > > Hi, > > When working with this week challenge for the Perl

Objects, TWEAK and return

2021-03-13 Thread mimosinnet
Hi, When working with this week challenge for the PerlWeeklyChallenge , I noticed this behaviour with TWEAK: *This does not work:* submethod TWEAK { $!filelist.lines».split(',').map( -> ($a, $b) { @!show.push: ( $a, $b ) }); } *This works:* submethod

Re: classes and objects questions

2020-12-17 Thread ToddAndMargo via perl6-users
On 12/14/20 2:33 PM, ToddAndMargo via perl6-users wrote: Hi All, https://docs.raku.org/language/classtut "A tutorial about creating and using classes in Raku" So far so good. "Raku has a rich built-in syntax for defining and using classes." U. Forgot something did

Re: classes and objects questions

2020-12-15 Thread ToddAndMargo via perl6-users
n the missing parts of the "tutorial" for me? Many thanks, -T Okay, here are some Perl 5 definitions for PerlDocs: https://perldoc.perl.org/perlglossary class A user-defined type, implemented in Perl via a package that provides (either directly or by inheritance) methods (that i

Re: classes and objects questions

2020-12-15 Thread ToddAndMargo via perl6-users
On 12/15/20 12:34 AM, WFB wrote: JJ may be right about the OO thing, but it makes the tutorial pretty much useless.  How "class" and "object" *relate* to Raku needs to be explained. When we are talking about describing Classes and Objects in a few words, the

Re: classes and objects questions

2020-12-15 Thread ToddAndMargo via perl6-users
ss of Java, later Javascript, and other new languages, O-O and its jargon became sufficiently mainstream that even many programmers working with other languages learned the terminology. I suspect that many programmers trained since the mid-90s assume that it's the only way to code, and that o

Re: classes and objects questions

2020-12-15 Thread Parrot Raiser
r new languages, O-O and its jargon became sufficiently mainstream that even many programmers working with other languages learned the terminology. I suspect that many programmers trained since the mid-90s assume that it's the only way to code, and that objects and classes are inherent parts of

Re: classes and objects questions

2020-12-15 Thread WFB
JJ may be right about the OO thing, but it makes the > tutorial pretty much useless. How "class" and "object" > *relate* to Raku needs to be explained. > When we are talking about describing Classes and Objects in a few words, then I agree. Searching on the web revea

Re: classes and objects questions

2020-12-14 Thread ToddAndMargo via perl6-users
For starters, I need to have the definition of "class" and "object". Then I need their rules. -T On 12/14/20 10:33 PM, WFB wrote: Hi ToddAndMargo, Thanks for the effort to improve the Raku docs. However, this is a Raku not OO (Object Oriented

Re: classes and objects questions

2020-12-14 Thread WFB
Hi ToddAndMargo, Thanks for the effort to improve the Raku docs. However, this is a Raku not OO (Object Oriented ) related tutorial. As JJ already pointed out, these pages are to show the reader how you get things done in Raku, not what OO

Re: classes and objects questions

2020-12-14 Thread ToddAndMargo via perl6-users
On 12/14/20 5:24 PM, Aureliano Guedes wrote: That's why, as a community-developed language (including docs) I'd like to suggest to you help to improve the docs. This way, when I have - with some lucky - free time, I may learn with you and all others that wrote these docs. Hi Aureliano, I abso

Re: classes and objects questions

2020-12-14 Thread Aureliano Guedes
Hi Todd, I'm a computational biologist and my knowledge is limited to what I need to do data science and data analysis in my field. So far, after a few years, I developed a very shy ability in programming languages. Luckily, having Perl 5 as my first love. Perhaps, at the time I was able to use M

classes and objects questions

2020-12-14 Thread ToddAndMargo via perl6-users
Hi All, https://docs.raku.org/language/classtut "A tutorial about creating and using classes in Raku" So far so good. "Raku has a rich built-in syntax for defining and using classes." U. Forgot something did we? What is a "class"? Next up: "A default construct

Re: regex objects as hash keys

2020-04-06 Thread Joseph Brenner
> Object hashes currently come with a performance penalty. That's why they are > currently not the default. Thanks, that makes sense. On 4/6/20, Elizabeth Mattijsen wrote: >> On 6 Apr 2020, at 07:19, Joseph Brenner wrote: >>> If you want a Hash which allows any >> kind of object as key, you

Re: regex objects as hash keys

2020-04-06 Thread Elizabeth Mattijsen
> On 6 Apr 2020, at 07:19, Joseph Brenner wrote: >> If you want a Hash which allows any > kind of object as key, you have to declare it such: > >> my $obj = Rutabaga.new; >> my %vegeout{Any}; # <-- see: >> https://docs.raku.org/language/hashmap#Non-string_keys_(object_hash) > > That's an inte

Re: regex objects as hash keys

2020-04-05 Thread Joseph Brenner
t you wouldn't be able to use the keys of the hash as a regex >> object later, which seems sub-optimal, though not a concern for >> my present purposes. > > The same thing happened with your Rutabaga object. It had a default > Str method that was called when you used it as

Re: regex objects as hash keys

2020-04-05 Thread Tobias Boege
a default Str method that was called when you used it as a hash key. It didn't really store the object in the key but just its .Str: %vegeout.keys.any ~~ Rutabaga; # OUTPUT: «False» %vegeout.keys.all ~~ Str; # OUTPUT: «True» %vegeout.keys[0] === $obj; # OUTPUT: «False» This is be

regex objects as hash keys

2020-04-05 Thread Joseph Brenner
I find in Raku that (as expected) I can use an object as a hash key: class Rutabaga { method color { say "purple (and white)"; } } my $obj = Rutabaga.new my %vegeout; %vegeout{ $obj } = "this works"; And for something I was doing I wanted to save up data about matches for various

Re: getting comb to return match objects

2019-11-17 Thread Joseph Brenner
other? >>> >>> Thank you, and any further help appreciated, Bill. >>> >>> >>> On Sat, Nov 16, 2019 at 6:34 AM Timo Paulssen wrote: >>>> Hi Bill, >>>> >>>> In your repl examples you're actually passing the True or

Re: getting comb to return match objects

2019-11-17 Thread Parrot Raiser
asn't > even sure if the ":match" flag was supposed to be positional > or not-- a point Yary picked up on. > >> So if I understand what you're >> saying correctly, if we see something like "Bool >> :$match" that says we should drop the dolla

Re: getting comb to return match objects

2019-11-16 Thread Joseph Brenner
and what you're > saying correctly, if we see something like "Bool > :$match" that says we should drop the dollar-sign > ($) and enter ":match" to set "Bool" = True, and > thus return the list of match objects? Something like that. The ":$match"

Re: getting comb to return match objects

2019-11-16 Thread Elizabeth Mattijsen
>>> slot for :$match. >>> >>> In order to pass true or false for the "match" named parameter you have >>> different syntactical options: >>> >>> comb(/\w/, "a;b;c", match => True) # maybe the simplest is using a pair >

Re: getting comb to return match objects

2019-11-16 Thread Timo Paulssen
ot;a;b;c", match => True) # maybe the simplest is using a pair >> >> comb(/\w/, "a;b;c", :match) # using "colon pair" syntax; it's syntax that >> puts a colon at the beginning and makes a pair >> >> comb(/\w/, "a;b;c", :

Re: getting comb to return match objects

2019-11-16 Thread William Michels via perl6-users
tch) # using "colon pair" syntax; it's syntax that > puts a colon at the beginning and makes a pair > > comb(/\w/, "a;b;c", :match(True)) # :match is short for match => True, and > :match(True) is long for match => True > > comb(/\w/, "a;b;

Re: getting comb to return match objects

2019-11-16 Thread Timo Paulssen
parameter to pass a value for $limit   comb(/\w/, "a;b;c", 2, :match) # output up to two results, as match objects Here's a few comments on the examples you pasted: > On another note (or possibly the same note), I tried code similar to > Joe's > with fair success.

Re: getting comb to return match objects

2019-11-16 Thread William Michels via perl6-users
Hi Yary, I went over this with Joe as well, and I was equally confused. So if I understand what you're saying correctly, if we see something like "Bool :$match" that says we should drop the dollar-sign ($) and enter ":match" to set "Bool" = True, and thus re

Re: getting comb to return match objects

2019-11-11 Thread yary
>> > >> Can someone give me an example of how to use the comb routine to > >> return a list of match objects? > >> > >> The documentation here: > >> > >> https://docs.perl6.org/type/Str#routine_comb > >> > >> Mentions a b

Re: getting comb to return match objects

2019-11-10 Thread Joseph Brenner
ot;foobar".comb(/./, :g, :match); > (「f」 「o」 「o」 「b」 「a」 「r」) > >> On 10 Nov 2019, at 23:46, Joseph Brenner wrote: >> >> Can someone give me an example of how to use the comb routine to >> return a list of match objects? >> >> The documentation here: >&

Re: getting comb to return match objects

2019-11-10 Thread Elizabeth Mattijsen
dd "foobar".comb(/./, :g, :match); (「f」 「o」 「o」 「b」 「a」 「r」) > On 10 Nov 2019, at 23:46, Joseph Brenner wrote: > > Can someone give me an example of how to use the comb routine to > return a list of match objects? > > The documentation here: > > https://do

getting comb to return match objects

2019-11-10 Thread Joseph Brenner
Can someone give me an example of how to use the comb routine to return a list of match objects? The documentation here: https://docs.perl6.org/type/Str#routine_comb Mentions a boolean option to get match objects: > If $matcher is a Regex, each Match object is > converted to a Str,

[perl #124814] Roast rakudo skip/todo test:./S32-num/fatrat.t line:181 reason: 'FatRat arith + type objects'

2018-05-14 Thread Zoffix Znet via RT
Re-filed with more details on the issue in https://github.com/rakudo/rakudo/issues/1830

[perl #126897] [BUG] Slip objects deparse as List

2018-03-07 Thread Zoffix Znet via RT
On Sun, 13 Dec 2015 13:15:56 -0800, elizabeth wrote: > so no > further tests needed > > > Liz And in addition it's covered by tests for another slip bug: https://github.com/perl6/roast/commit/7eea834e98090b1f571dabe719784eaa0b0207ff Closing.

[perl #126897] [BUG] Slip objects deparse as List

2018-03-07 Thread Zoffix Znet via RT
On Sun, 13 Dec 2015 13:15:56 -0800, elizabeth wrote: > so no > further tests needed > > > Liz And in addition it's covered by tests for another slip bug: https://github.com/perl6/roast/commit/7eea834e98090b1f571dabe719784eaa0b0207ff Closing.

[perl #124226] [BUG] Opportunity to catch syntactically detectable calls to attribute-accessing methods on type objects in Rakudo

2017-12-03 Thread Aleks-Daniel Jakimenko-Aleksejev via RT
Still reproducible (2017.11,HEAD(e5b660e)) On 2015-04-01 13:19:33, masak wrote: > <[Tux]> m: class C { has Int $!x; method foo { ($!x, my $b) = > (1,2);}};C.foo > 19:45 <+camelia> rakudo-moar 6caf1d: OUTPUT«Cannot look up attributes > in a type object␤ in method foo [...] > <[Tux]> is that explain

[perl #78200] [BUG] LTA error message when using attributes on type objects

2017-11-09 Thread Daniel Green via RT
On Sun, 05 Nov 2017 07:54:01 -0800, alex.jakime...@gmail.com wrote: > FWIW the error message seems to be coming from MoarVM: > https://github.com/MoarVM/MoarVM/blob/ad86184681590c81fc25b9e90b406e5163098796/src/6model/reprconv.c#L607 > (many similar lines like this in that file) > > On 2017-11-05 0

[perl #78200] [BUG] LTA error message when using attributes on type objects

2017-11-05 Thread Aleks-Daniel Jakimenko-Aleksejev via RT
FWIW the error message seems to be coming from MoarVM: https://github.com/MoarVM/MoarVM/blob/ad86184681590c81fc25b9e90b406e5163098796/src/6model/reprconv.c#L607 (many similar lines like this in that file) On 2017-11-05 07:46:17, alex.jakime...@gmail.com wrote: > Hey Tobias, it looks like you've be

[perl #78200] [BUG] LTA error message when using attributes on type objects

2017-11-05 Thread Aleks-Daniel Jakimenko-Aleksejev via RT
Hey Tobias, it looks like you've been working on this ticket for over two years. How is it going? On 2015-04-09 12:09:55, FROGGS.de wrote: > How about: > > (before) > $ perl6-m -e 'class A { has $!x; method foo { say $!x } }; A.foo' > Cannot look up attributes in a type object > in method foo at -e

[perl #132149] [BUG] Some Method objects use wrong .gist method

2017-09-22 Thread via RT
# New Ticket Created by Zoffix Znet # Please include the string: [perl #132149] # in the subject line of all future correspondence about this issue. # https://rt.perl.org/Ticket/Display.html?id=132149 > Method objects have their own `.gist` method[^1] that just print `.name`. However, un

[perl #125293] [BUG] Match objects don't roundtrip through .perl

2017-09-12 Thread Christian Bartolomaeus via RT
The tests in question have been unfudged with roast commit https://github.com/perl6/roast/commit/6db316eaae. (This was probably fixed with merging the 'uncurse' branch.) The last example from the last comment (using EVAL) works as expected, too: $ ./perl6-m -e 'say Map.new("a", 42).perl.EVAL' M

[perl #129008] [BUG] Pair.perl confused by some type objects

2017-09-11 Thread Brian S. Julin via RT
On Mon, 11 Sep 2017 16:53:15 -0700, b...@abrij.org wrote: > On Mon, 11 Sep 2017 13:35:54 -0700, zef...@fysh.org wrote: > > Brian S. Julin via RT wrote: > > >Fixed in 2017.6 or thereabouts. > > > > Specifically commit c6b03c45c7173e21be6c53fc629fa27f2676c76a, dated > > 2017-06-15. > > > > -zefram

[perl #129008] [BUG] Pair.perl confused by some type objects

2017-09-11 Thread Brian S. Julin via RT
On Mon, 11 Sep 2017 13:35:54 -0700, zef...@fysh.org wrote: > Brian S. Julin via RT wrote: > >Fixed in 2017.6 or thereabouts. > > Specifically commit c6b03c45c7173e21be6c53fc629fa27f2676c76a, dated > 2017-06-15. > > -zefram Tests added in roast 9a09b4ee, resolving this ticket.

Re: [perl #129008] [TESTNEEDED] Pair.perl confused by some type objects

2017-09-11 Thread Zefram via RT
Brian S. Julin via RT wrote: >Fixed in 2017.6 or thereabouts. Specifically commit c6b03c45c7173e21be6c53fc629fa27f2676c76a, dated 2017-06-15. -zefram

Re: [perl #129008] [TESTNEEDED] Pair.perl confused by some type objects

2017-09-11 Thread Zefram
Brian S. Julin via RT wrote: >Fixed in 2017.6 or thereabouts. Specifically commit c6b03c45c7173e21be6c53fc629fa27f2676c76a, dated 2017-06-15. -zefram

[perl #129008] [TESTNEEDED] Pair.perl confused by some type objects

2017-09-11 Thread Brian S. Julin via RT
On Fri, 19 Aug 2016 19:00:53 -0700, zef...@fysh.org wrote: > Pair.perl produces incorrect output for some type objects: > > > ((Int) => 2).perl > Int => 2 > > ((Int) => 2).perl.EVAL.perl > :Int(2) > > Following the fix for [perl #126890] it's correct

[perl #123015] [RFC] methods for accessing binary data in Buf objects

2017-09-01 Thread Brian S. Julin via RT
On Mon, 20 Oct 2014 07:01:07 -0700, moritz wrote: > On Mon Oct 20 06:54:16 2014, abraxxa wrote: > > As discussed on IRC mainly with moritz I'd need a way to get the > > number of bytes, not elements, of a Buf object so it can be looped > > and > > each byte accessed with $buf.[$idx]. > > I'm requir

[perl #125656] [CONC] Creating too many Proc::Async objects fills the file descriptor table, which causes libuv to abort()

2017-07-13 Thread Aleks-Daniel Jakimenko-Aleksejev via RT
On 2017-07-13 08:18:20, alex.jakime...@gmail.com wrote: > On 2017-07-12 22:49:43, ug...@cpan.org wrote: > > This only applies if you call .stdout or .stderr *and* never close > > them. > > Hm, isn't it fixed now? Similarly to > https://github.com/perl6/doc/issues/1304 ? Ah, no, it's not. It's a co

[perl #125656] [CONC] Creating too many Proc::Async objects fills the file descriptor table, which causes libuv to abort()

2017-07-13 Thread Aleks-Daniel Jakimenko-Aleksejev via RT
On 2017-07-12 22:49:43, ug...@cpan.org wrote: > This only applies if you call .stdout or .stderr *and* never close them. Hm, isn't it fixed now? Similarly to https://github.com/perl6/doc/issues/1304 ?

[perl #125656] [CONC] Creating too many Proc::Async objects fills the file descriptor table, which causes libuv to abort()

2017-07-12 Thread Nick Logan via RT
This only applies if you call .stdout or .stderr *and* never close them.

[perl #125656] [CONC] Creating too many Proc::Async objects fills the file descriptor table, which causes libuv to abort()

2017-06-19 Thread Will Coleda via RT
On Mon, 20 Jul 2015 20:09:39 -0700, r...@hoelz.ro wrote: > See the attached script. Still dying with version 2017.06-13-g6b634a369 built on MoarVM version 2017.06-2-gcc27eebf -- Will "Coke" Coleda

[perl #125656] [CONC] Creating too many Proc::Async objects fills the file descriptor table, which causes libuv to abort()

2017-06-19 Thread Will Coleda via RT
On Mon, 20 Jul 2015 20:09:39 -0700, r...@hoelz.ro wrote: > See the attached script. Still dying with version 2017.06-13-g6b634a369 built on MoarVM version 2017.06-2-gcc27eebf -- Will "Coke" Coleda

[perl #128041] [JVM] Failing tests for equivalence of Buf objects

2017-03-20 Thread Zoffix Znet via RT
On Sat, 30 Apr 2016 11:16:44 -0700, barto...@gmx.de wrote: > Starting with rakudo commit fe2be65806 two tests in S16-io/supply.t > start to fail with rakudo-j. The following rakudo commit 463e7589a1 > seems to change the code path for the tests in question, but also > makes them fail. Only if one r

[perl #130458] [REGRESSION] NFC and NFD objects no longer smartmatch as strings ("7\x[308]".NFD ~~ /^ \d+ $/)

2016-12-31 Thread Christian Bartolomaeus via RT
Unfortunately commit 8d35951 breaks the build on JVM. It dies during stage parse with Error while compiling, type X::Parameter::InvalidType suggestions: () typename: Uni at line 32953, near " $uni) { " in panic (gen/jvm/stage2/NQPHLL.nqp:348) [...] Type Uni is not usable with rakudo-j:

Re: [perl #130458] [REGRESSION] NFC and NFD objects no longer smartmatch as strings ("7\x[308]".NFD ~~ /^ \d+ $/)

2016-12-30 Thread Elizabeth Mattijsen
e about this issue. > # https://rt.perl.org/Ticket/Display.html?id=130458 > > > > Code: > say "7\x[308]".NFC ~~ /^ \d+ $/ > > > Result (2015.12,2016.10): > 「7̈」 > > > Result (2016.11,HEAD): > 「55」 > > > Previously it worked with

[perl #130458] [REGRESSION] NFC and NFD objects no longer smartmatch as strings ("7\x[308]".NFD ~~ /^ \d+ $/)

2016-12-30 Thread via RT
15.12,2016.10): 「7̈」 Result (2016.11,HEAD): 「55」 Previously it worked with NFC objects as if they were strings, which intuitively makes sense. However, I'm not going to claim that this is what it should do, I'm just pointing out that the behavior was changed. Right now it works wit

[perl #129014] [BUG] Range.new confused by type objects

2016-08-20 Thread via RT
# New Ticket Created by Zefram # Please include the string: [perl #129014] # in the subject line of all future correspondence about this issue. # https://rt.perl.org/Ticket/Display.html?id=129014 > The Range class allows most values to be used as endpoints, even things such as type obje

Re: [perl #129007] [BUG] Baggy.perl confused by type objects

2016-08-19 Thread Zefram
Additional: it also gets confused by some Pair objects as keys: > (("a b" => "c") => 2).Bag.perl ("a b" => "c"=>2).Bag > (("a b" => "c") => 2).Bag.perl.EVAL.perl Type check failed in assignment; expected Int

[perl #129008] [BUG] Pair.perl confused by some type objects

2016-08-19 Thread via RT
# New Ticket Created by Zefram # Please include the string: [perl #129008] # in the subject line of all future correspondence about this issue. # https://rt.perl.org/Ticket/Display.html?id=129008 > Pair.perl produces incorrect output for some type objects: > ((Int) => 2).perl

[perl #129007] [BUG] Baggy.perl confused by type objects

2016-08-19 Thread via RT
e reliable fix would be for Baggy.perl to construct Pair objects and call .perl on them, so that the logic to handle this only needs to be in one place (Pair.perl). -zefram

[perl #128041] [JVM] Failing tests for equivalence of Buf objects

2016-04-30 Thread via RT
# New Ticket Created by Christian Bartolomaeus # Please include the string: [perl #128041] # in the subject line of all future correspondence about this issue. # https://rt.perl.org/Ticket/Display.html?id=128041 > Starting with rakudo commit fe2be65806 two tests in S16-io/supply.t start to f

[perl #127402] Set.hash stringifies its objects

2016-01-28 Thread via RT
# New Ticket Created by Elizabeth Mattijsen # Please include the string: [perl #127402] # in the subject line of all future correspondence about this issue. # https://rt.perl.org/Ticket/Display.html?id=127402 > [09:58:03] m: my $s = set( $() ); dd $s.hash # argh, uncaught bug :-( [09:

Re: [perl #126891] [BUG] module objects badly behaved for type checks

2015-12-16 Thread Zefram
Elizabeth Mattijsen via RT wrote: >This seems to apply to any variable type and any PseudoStash: Further generalisation: it also happens for any package object (GLOBAL, MAIN) and any role object (Iterable, Dateish). In both cases, the .^isa misbehaviour is seen as well as the actual ability to by

[perl #126541] Expose native file descriptor for handle like objects.

2015-12-14 Thread jn...@jnthn.net via RT
On Mon Nov 02 10:54:27 2015, jns...@gellyfish.co.uk wrote: > Hi, > In a number of places in the design documents it is suggested that > certain functionality on files (e.g. fcntl, ioctl) or sockets (e.g. > getsockname, setsockopt) should be provided by external modules via > the NativeCall interfac

Re: [perl #126897] [BUG] Slip objects deparse as List

2015-12-13 Thread Elizabeth Mattijsen
> On 13 Dec 2015, at 20:53, Zefram (via RT) > wrote: > > # New Ticket Created by Zefram > # Please include the string: [perl #126897] > # in the subject line of all future correspondence about this issue. > # https://rt.perl.org/Ticket/Display.html?id=126897 > > > > $ perl6 -e 'slip(2,3).W

[perl #126897] [BUG] Slip objects deparse as List

2015-12-13 Thread via RT
# New Ticket Created by Zefram # Please include the string: [perl #126897] # in the subject line of all future correspondence about this issue. # https://rt.perl.org/Ticket/Display.html?id=126897 > $ perl6 -e 'slip(2,3).WHAT.say; slip(2,3).perl.EVAL.WHAT.say' (Slip) (List) The .perl method o

Re: [perl #126891] [BUG] module objects badly behaved for type checks

2015-12-13 Thread Elizabeth Mattijsen
; (sub (Int $a) { 1 })(CORE) > Type check failed in binding $a; expected Int but got CORE > in sub at :1 > in block at :1 > > CORE is a module object; other module objects behave similarly. As shown > above, they can be assigned to type-constrained variables despite not > m

[perl #126891] [BUG] module objects badly behaved for type checks

2015-12-12 Thread via RT
t; other module objects behave similarly. As shown above, they can be assigned to type-constrained variables despite not meeting the type constraint. Additionally, the .^isa method fails to operate on them; don't know whether these two faults are really related. Type constraint does apply as expe

[perl #126835] Signature objects don't smartmatch

2015-12-07 Thread via RT
# New Ticket Created by Wenzel Peppmeyer # Please include the string: [perl #126835] # in the subject line of all future correspondence about this issue. # https://rt.perl.org/Ticket/Display.html?id=126835 > class C{}; my $sig1 = (my method (C: Int) {}).signature; my $sig2 = (my method (C: I

[perl #111498] [BUG] something weird is going on with object hashes and mixed-in objects in Rakudo

2015-11-28 Thread Christian Bartolomaeus via RT
Current behaviour: $ perl6-m -e 'my $r1 = role { method foo() { 5 } }; my $r2 = role { method foo() { 7 } }; my %hash{Any}; %hash{"quux" but $r1} = 9; %hash{"quux" but $r2} = 11; say %hash.keys>>.foo' (5 7) Is that the expected answer?

[perl #126541] Expose native file descriptor for handle like objects.

2015-11-02 Thread via RT
# New Ticket Created by Jonathan Stowe # Please include the string: [perl #126541] # in the subject line of all future correspondence about this issue. # https://rt.perl.org/Ticket/Display.html?id=126541 > Hi, In a number of places in the design documents it is suggested that certain functio

[perl #126520] Proxy objects - frequent FETCHs

2015-10-31 Thread via RT
oxy objects: class C { has $!foo; method foo is rw { say "foo"; $!foo; } has $!bar; method bar is rw { Proxy.new( say "proxy new"; FETCH => sub ($) { say "ba

[perl #126462] Bug returning objects directly from called methods using some form of named arguments

2015-10-27 Thread via RT
# New Ticket Created by mt1957 # Please include the string: [perl #126462] # in the subject line of all future correspondence about this issue. # https://rt.perl.org/Ticket/Display.html?id=126462 > Two samples of code for which the problem is closely related The first problem; return

Bug returning objects directly from called methods using some form of named arguments

2015-10-26 Thread mt1957
Two samples of code for which the problem is closely related The first problem; return MongoDB::Cursor.new( collection => self, OP_REPLY=> $OP_REPLY, criteria=> %@criteria ); Generates the error; 'Default constructor for 'MongoDB::Cursor'

[perl #123037] [BUG] .gist on typed array shows (Any) instead of real type objects

2015-10-24 Thread Christian Bartolomaeus via RT
Also masak's example works now as expected: $ perl6 -e 'my Int @a; @a[4]++; say @a[0]; say @a' (Int) [(Int) (Int) (Int) (Int) 1] I added a test (without say, but using .gist) to S09-typed-arrays/arrays.t with commit https://github.com/perl6/roast/commit/4ec7087158. I'm closing this ticket as 'r

Re: Bug creating objects using some form of named arguments

2015-09-29 Thread mt1957
The trouble I get at the moment is an error generared by the following piece of code return MongoDB::Cursor.new( collection => self, OP_REPLY=> $OP_REPLY, criteria=> %@criteria ); It generates the error; Default constructor for 'MongoDB:

Re: Bug creating objects using some form of named arguments

2015-09-28 Thread mt1957
On 09/28/2015 07:16 PM, mt1957 wrote: False alarm, had a typing error in the code so, mea culpa poli :-[ . Hi Below a set of tests where all object creates are done well except for the last one using a sub or method returning the created object. class X { has Str $.a; } my X $x .= new(

Bug creating objects using some form of named arguments

2015-09-28 Thread mt1957
Hi Below a set of tests where all object creates are done well except for the last one using a sub or method returning the created object. class X { has Str $.a; } my X $x .= new(a => 'abc'); say "\$x = {$x.perl}"; $x .= new(:a('abc')); say "\$x = {$x.perl}"; $x .= new :a('abc'); say "\$

[perl #123037] [BUG] Typed array contains (Any) type objects when assigning past the end of the array in Rakudo

2015-09-13 Thread Christian Bartolomaeus via RT
On Thu Oct 23 04:51:47 2014, masak wrote: > m: my Int @a; @a[4]++; say @a[0]; say @a > rakudo-moar 315ec6: OUTPUT«(Int)␤(Any) (Any) (Any) (Any) 1␤» > Is that *supposed* to say "(Any)" there? > no, (Int) > * masak submits rakudobug Actually, the typed array seems to c

Re: [perl #125998] Should IO objects behave like values?

2015-09-05 Thread Elizabeth Mattijsen
Note that we’re talking really about IO::Path objects here, which is what .IO generates. And in that context, I think an object $a with a given abspath, would be eqv to $b with the same abspath. Because that *is* the identifier on a file system, is it not? Liz = > On 05

Re: [perl #125998] Should IO objects behave like values?

2015-09-05 Thread Bart Wiegmans
I kind of think that's impossibly complex. What does it even mean for IO objects to be value-equal? They represent unknowns in any case. Even if they resolved to the same file, they might be read at different times and have different contents. Or a write to one object may succeed and anothe

Re: [perl #125998] Should IO objects behave like values?

2015-09-05 Thread Elizabeth Mattijsen
; > > This:: > > '/tmp'.IO eqv '/tmp'.IO > > returns ``False``. > > Is this correct? Should IO behave like value objects? > > Possible problems: > > - two IO referring to non-existent paths: should they compare like > their string re

[perl #125998] Should IO objects behave like values?

2015-09-05 Thread via RT
? Should IO behave like value objects? Possible problems: - two IO referring to non-existent paths: should they compare like their string representation? or always be different? or what? - ``/tmp`` and ``/tmp/``: should they compare as equal? should we ``.resolve`` them before compari

[perl #125656] Creating too many Proc::Async objects fills the file descriptor table, which causes libuv to abort()

2015-07-20 Thread via RT
# New Ticket Created by Rob Hoelz # Please include the string: [perl #125656] # in the subject line of all future correspondence about this issue. # https://rt.perl.org/Ticket/Display.html?id=125656 > See the attached script.use v6; my @procs; for ^1000 { .say; my $proc = Proc::Asy

[perl #125655] Garbage collected running Proc::Async objects don't seem to clean up their handles, causing libuv to abort()

2015-07-20 Thread via RT
# New Ticket Created by Rob Hoelz # Please include the string: [perl #125655] # in the subject line of all future correspondence about this issue. # https://rt.perl.org/Ticket/Display.html?id=125655 > See the attached script. This is similar to https://rt.perl.org/Ticket/Display.html?id=1256

[perl6/specs] beb870: Spec action objects/methods

2015-07-05 Thread GitHub
-regex.pod Log Message: --- Spec action objects/methods Commit: e4f79178aa87db3fd51ca50eeb38451c86cc7b42 https://github.com/perl6/specs/commit/e4f79178aa87db3fd51ca50eeb38451c86cc7b42 Author: Rob Hoelz Date: 2015-07-04 (Sat, 04 Jul 2015) Changed paths: M S99

[perl #112660] [BUG] Can push non-X objects to an attribute array typed with X in Rakudo

2015-07-03 Thread Christian Bartolomaeus via RT
AFAIU this ticket is about the type of @.slots not being respected. This seems to be fixed now: $ perl6 -e 'class A { has Method @.slots; }; A.new.slots.push: [1, 2, 3]' Type check failed in assignment to '@!slots'; expected 'Method' but got 'Array' in block at -e:1 I added a test to S32-arra

[perl #125293] Match objects don't roundtrip through .perl

2015-06-06 Thread Christian Bartolomaeus via RT
As far as I understand it, the problem can be golfed to the following: $ perl6 -e 'say EnumMap.new("a", 42).perl' EnumMap.new(:a(42)) $ perl6 -e 'say EnumMap.new("a", 42).perl.perl' "EnumMap.new(:a(42))" $ perl6 -e 'say EnumMap.new("a", 42).perl.EVAL' EnumMap.new()

[perl #125293] Match objects don't roundtrip through .perl

2015-05-30 Thread Will Coleda via RT
Additionally, there's a test that refers to on the match object, which dies with: This representation (Null) does not support associative access in block at t/spec/S05-match/perl.rakudo.moar:23 That is skipped. -- Will "Coke" Coleda

  1   2   3   4   5   6   7   8   9   10   >