[perl #127395] [LTA] no levenshtein for method names

2016-01-27 Thread via RT
# New Ticket Created by Alex Jakimenko # Please include the string: [perl #127395] # in the subject line of all future correspondence about this issue. # https://rt.perl.org/Ticket/Display.html?id=127395 > Code: say ‘foo’.starts-wizh(‘f’) Result: Method 'starts-wizh' not found for invocant o

Re: Rationale for $!

2016-01-27 Thread yary
On Wed, Jan 27, 2016 at 11:00 AM, Felipe Gasper wrote: > Could it not be: > > try my $f = open(...) or die … > Don't need a "try" there to make it work. An exception object/failure is false, so "my $f = open(...) or die" will assign the exception to $f, which is false, causing the "die" to execu

Re: Nice-to-have class methods

2016-01-27 Thread Tom Browder
On Wed, Jan 27, 2016 at 7:09 AM, Elizabeth Mattijsen wrote: >> On 27 Jan 2016, at 14:00, Tom Browder wrote: >> >> Given so many handy methods for built-in classes, it would be nice to have a >> couple of more for some, for instance: ... >> IO::Handle.say (or println) >> Like print except with

Re: Nice-to-have class methods

2016-01-27 Thread Tom Browder
On Wednesday, January 27, 2016, Peter Pentchev wrote: > > On Wed, Jan 27, 2016 at 07:00:11AM -0600, Tom Browder wrote: > > Given so many handy methods for built-in classes, it would be nice to have > > a couple of more for some, for instance: > > > > IO:Path.stemname > > Like basename except any

Re: Rationale for $!

2016-01-27 Thread Moritz Lenz
On 01/27/2016 04:32 PM, Felipe Gasper wrote: On 27 Jan 2016 10:15 AM, Moritz Lenz wrote: On 01/27/2016 03:15 PM, Felipe Gasper wrote: So, what *is* the scoping of $!? Scoped to a routine, iirc (sub, method, regex) Interesting. JavaScript programmers that I’ve known bemoan that their langua

Re: Rationale for $!

2016-01-27 Thread Felipe Gasper
On 27 Jan 2016 11:03 AM, Brandon Allbery wrote: On Wed, Jan 27, 2016 at 11:00 AM, Felipe Gasper mailto:fel...@felipegasper.com>> wrote: Unrelated, but, does open() not throw on failures anyway? (Noodling with the perl6 REPL just now seems inconclusive.) There have been issues with fai

Re: Rationale for $!

2016-01-27 Thread Felipe Gasper
On 27 Jan 2016 10:56 AM, Moritz Lenz wrote: But, what is the point of $! at all? Convenience. It makes it easy to write commonly-used constructs much faster. My mostly unscientific approach to gather usage of try vs. CATCH in the ecosystem: moritz@hack:~/p6/perl6-all-modules$ git grep --word

Re: Rationale for $!

2016-01-27 Thread Felipe Gasper
On 27 Jan 2016 10:44 AM, Peter Pentchev wrote: On Wed, Jan 27, 2016 at 10:32:46AM -0500, Felipe Gasper wrote: [snip] But, what is the point of $! at all? The exception is given to the CATCH block as $_. If I want access to it outside CATCH, isn’t the expected workflow to save CATCH{$_} to a vari

Re: Rationale for $!

2016-01-27 Thread Peter Pentchev
On Wed, Jan 27, 2016 at 10:32:46AM -0500, Felipe Gasper wrote: [snip] > But, what is the point of $! at all? The exception is given to the CATCH > block as $_. If I want access to it outside CATCH, isn’t the expected > workflow to save CATCH{$_} to a variable, the way my example does it? Well, it

Re: Rationale for $!

2016-01-27 Thread Felipe Gasper
On 27 Jan 2016 10:15 AM, Moritz Lenz wrote: On 01/27/2016 03:15 PM, Felipe Gasper wrote: So, what *is* the scoping of $!? Scoped to a routine, iirc (sub, method, regex) Interesting. JavaScript programmers that I’ve known bemoan that their language uses function scoping rather than block sc

Re: Nice-to-have class methods

2016-01-27 Thread H.Merijn Brand
On Wed, 27 Jan 2016 14:14:17 +, Philip Hazelden wrote: > For a "convert files to $format" thing, you'd want to replace the > extension. You don't need to specify the previous extension(s) if it's a > quick-and-dirty thing where you know everything passed to it will be > acceptable; and you do

Re: Rationale for $!

2016-01-27 Thread Moritz Lenz
On 01/27/2016 03:15 PM, Felipe Gasper wrote: So, what *is* the scoping of $!? Scoped to a routine, iirc (sub, method, regex)

Re: Nice-to-have class methods

2016-01-27 Thread Brandon Allbery
On Wed, Jan 27, 2016 at 9:50 AM, Peter Pentchev wrote: > Right, so that would probably mean that you need a function that removes > the *last* extension; that might indeed make sense, although it's > trivial to implement as a regular expression substitution (but also beware > the case of a filena

Re: Nice-to-have class methods

2016-01-27 Thread Peter Pentchev
On Wed, Jan 27, 2016 at 02:14:17PM +, Philip Hazelden wrote: > On Wed, Jan 27, 2016 at 1:43 PM Peter Pentchev wrote: > > > On Wed, Jan 27, 2016 at 07:00:11AM -0600, Tom Browder wrote: > > > Given so many handy methods for built-in classes, it would be nice to > > have > > > a couple of more f

Re: Rationale for $!

2016-01-27 Thread Felipe Gasper
On 27 Jan 2016 7:15 AM, Moritz Lenz wrote: On 01/27/2016 07:17 AM, Felipe Gasper wrote: Hello, What is the purpose of having $! in Perl 6? The global variables in Perl 5 are a constant headache, prompting us to need to local()ize variables like $@, $!, and $? to avoid unforeseen cons

Re: Nice-to-have class methods

2016-01-27 Thread Philip Hazelden
For a "convert files to $format" thing, you'd want to replace the extension. You don't need to specify the previous extension(s) if it's a quick-and-dirty thing where you know everything passed to it will be acceptable; and you don't want to, if you're passing out to some other service which can ha

Re: [perl #127382] AutoReply: [BUG]memory leak slurp

2016-01-27 Thread dump array
perl6 --version This is Rakudo version 2015.12 built on MoarVM version 2015.12 implementing Perl 6.c. On Tue, Jan 26, 2016 at 9:14 PM, perl6 via RT wrote: > Greetings, > > This message has been automatically generated in response to the > creation of a trouble ticket regarding: > "[BUG]

Re: [perl #127374] git-protocol not passed to MoarVM/dynasm.git

2016-01-27 Thread Sebastien Moretti
Hi I have issues with GIT and https (company restrictions) and have to use git with the git protocol. Hopefully rakudo Configure.pl includes an option to use git as protocol (--git-protocol=git). It works perfectly to clone nqp and MoarVM. Unfortunately when MoarVM Configure.pl is called, MoarVM

[perl #127382] [BUG]memory leak slurp

2016-01-27 Thread via RT
# New Ticket Created by dump array # Please include the string: [perl #127382] # in the subject line of all future correspondence about this issue. # https://rt.perl.org/Ticket/Display.html?id=127382 > i have 36M big sql file, this: my $content = slurp 'file', :bin; eats up all my computer

Re: Nice-to-have class methods

2016-01-27 Thread Peter Pentchev
On Wed, Jan 27, 2016 at 07:00:11AM -0600, Tom Browder wrote: > Given so many handy methods for built-in classes, it would be nice to have > a couple of more for some, for instance: > > IO:Path.stemname > Like basename except any suffix is removed Hmm, this sounds like a nice idea on a first gla

Nice-to-have class methods

2016-01-27 Thread Tom Browder
Given so many handy methods for built-in classes, it would be nice to have a couple of more for some, for instance: IO:Path.stemname Like basename except any suffix is removed IO::Handle.say (or println) Like print except with an added newline. Cheers! -Tom

Re: Nice-to-have class methods

2016-01-27 Thread Elizabeth Mattijsen
> On 27 Jan 2016, at 14:00, Tom Browder wrote: > > Given so many handy methods for built-in classes, it would be nice to have a > couple of more for some, for instance: > > IO:Path.stemname > Like basename except any suffix is removed Seems like a nice idea. > IO::Handle.say (or println) >

Nice-to-have class methods

2016-01-27 Thread Tom Browder
Given so many handy methods for built-in classes, it would be nice to have a couple of more for some, for instance: IO:Path.stemname Like basename except any suffix is removed IO::Handle.say (or println) Like print except with an added newline. Cheers! -Tom

Re: Rationale for $!

2016-01-27 Thread Moritz Lenz
Hi, On 01/27/2016 07:17 AM, Felipe Gasper wrote: Hello, What is the purpose of having $! in Perl 6? The global variables in Perl 5 are a constant headache, prompting us to need to local()ize variables like $@, $!, and $? to avoid unforeseen consequences like RT #127386 and those docu

Re: [perl #127374] git-protocol not passed to MoarVM/dynasm.git

2016-01-27 Thread Bart Wiegmans
I humbly suggest that rakudobrew, or perhaps rakudo Configure.pl, edit .gitmodules before running MoarVM Configure.pl if passed a different git protocol than https://. That is probably a better solution than trying to find a lowest-common-denominator protocol which is supported everywhere, since it