Problem found with PERL6LIB environment variable (cont)

2015-06-08 Thread mt1957

ls,

Also seems to go wrong for RAKUDOLIB
Example (in tcsh shell);

$ setenv RAKUDOLIB .:lib:/home/marcel/Software/lib/perl6/lib
$ setenv PERL6LIB .:lib:/home/marcel/Software/lib/perl6/lib
$ perl6 some-program.pl6
some-program.pl6 .. ===SORRY!===
Could not find Semi-xml in any of:
  file#.:lib:/home/marcel/Software/lib/perl6/lib
  file#.:lib:/home/marcel/Software/lib/perl6/lib
  file#/home/marcel/.perl6/2015.05-139-g2281689/lib
  inst#/home/marcel/.perl6/2015.05-139-g2281689
  file#/home/marcel/Software/lib/perl6/share/perl6/lib
  file#/home/marcel/Software/lib/perl6/share/perl6/vendor/lib
  file#/home/marcel/Software/lib/perl6/share/perl6/site/lib
  inst#/home/marcel/Software/lib/perl6/share/perl6
  inst#/home/marcel/Software/lib/perl6/share/perl6/vendor
  inst#/home/marcel/Software/lib/perl6/share/perl6/site

Now both aren't split on the colon to get multiple paths.

Greetings,
Marcel Timmerman



Problem found with PERL6LIB environment variable

2015-06-08 Thread mt1957

ls,

Found another problem in the new rakudo (understood that was from 4/8). 
Version: 'This is perl6 version 2015.05-139-g2281689 built on MoarVM 
version 2015.05-49-g07fbd62'


It seems that perl6 doesn't understand the environment variable PERL6LIB 
anymore.

Example (in tcsh shell);

$ setenv PERL6LIB .:lib:/home/marcel/Software/lib/perl6/lib
$ perl6 some-program.pl6
some-program.pl6 .. ===SORRY!===
Could not find Semi-xml in any of:
  file#.:lib:/home/marcel/Software/lib/perl6/lib
  file#/home/marcel/.perl6/2015.05-139-g2281689/lib
  inst#/home/marcel/.perl6/2015.05-139-g2281689
  file#/home/marcel/Software/lib/perl6/share/perl6/lib
  file#/home/marcel/Software/lib/perl6/share/perl6/vendor/lib
  file#/home/marcel/Software/lib/perl6/share/perl6/site/lib
  inst#/home/marcel/Software/lib/perl6/share/perl6
  inst#/home/marcel/Software/lib/perl6/share/perl6/vendor
  inst#/home/marcel/Software/lib/perl6/share/perl6/site

You can find the PERL6LIB text back in the first line of the error 
message. It isn't split on the colon to get multiple paths.


Greetings,
Marcel Timmerman



Re: [perl #125334] min(+'a', +'a').say prints Inf but should produce an error

2015-06-08 Thread Patrick R. Michaud
On Mon, Jun 08, 2015 at 06:08:33AM -0700, Will Coleda via RT wrote:
 I agree that this should be throwing the same conversion error. 

I disagree to the extent that making min() throw the conversion error seems
to go against the purpose of designing soft/lazy Failure types into Perl 6
in the first place.

Sometimes we speak about not having the entire rocket explode simply
because of a few errors in the input set.  In this case, min() is designed
to silently ignore undefined values in its calculations.  Since in this
example all of the input values were undefined, min returned its 0-arg
case of Inf.

Perhaps an argument could be made that if min() is invoked on a list
consisting only of undefined values, it should return the first (undefined)
value instead of Inf.  In other words, undefined values end up in this
middle-region between lowest defined value and Inf, or something like
that.

At any rate, at this moment it's more of a specification issue than an
actual rakudobug.

Pm


Re: Problem found with PERL6LIB environment variable

2015-06-08 Thread Brandon Allbery
On Mon, Jun 8, 2015 at 3:09 PM, Fields, Christopher J cjfie...@illinois.edu
 wrote:

 I had the same problem recently, tied to the revised path names (e.g. the
 ‘file#’ prefix).  Any reason for the change?  Kinda caught me by surprise.


It's so that there can be things that are not directories of files that can
be sources of modules (think: database, or a custom object that can look up
modules somewhere else and import them from there).

IIRC the colon separator was replaced with a semicolon?

-- 
brandon s allbery kf8nh   sine nomine associates
allber...@gmail.com  ballb...@sinenomine.net
unix, openafs, kerberos, infrastructure, xmonadhttp://sinenomine.net


Re: Problem found with PERL6LIB environment variable

2015-06-08 Thread Tobias Leich
Hi, you might use this:

say $*DISTRO.cur-sep
rakudo-moar 228168: OUTPUT«,␤»


Am 08.06.2015 um 21:17 schrieb Brandon Allbery:
 On Mon, Jun 8, 2015 at 3:09 PM, Fields, Christopher J
 cjfie...@illinois.edu mailto:cjfie...@illinois.edu wrote:

 I had the same problem recently, tied to the revised path names
 (e.g. the ‘file#’ prefix).  Any reason for the change?  Kinda
 caught me by surprise.


 It's so that there can be things that are not directories of files
 that can be sources of modules (think: database, or a custom object
 that can look up modules somewhere else and import them from there).

 IIRC the colon separator was replaced with a semicolon?

 -- 
 brandon s allbery kf8nh   sine nomine
 associates
 allber...@gmail.com mailto:allber...@gmail.com  
ballb...@sinenomine.net mailto:ballb...@sinenomine.net
 unix, openafs, kerberos, infrastructure, xmonad  
  http://sinenomine.net



Re: Problem found with PERL6LIB environment variable

2015-06-08 Thread Fields, Christopher J
I had the same problem recently, tied to the revised path names (e.g. the 
‘file#’ prefix).  Any reason for the change?  Kinda caught me by surprise.

chris

 On Jun 8, 2015, at 11:51 AM, mt1957 mt1...@gmail.com wrote:
 
 ls,
 
 Found another problem in the new rakudo (understood that was from 4/8). 
 Version: 'This is perl6 version 2015.05-139-g2281689 built on MoarVM version 
 2015.05-49-g07fbd62'
 
 It seems that perl6 doesn't understand the environment variable PERL6LIB 
 anymore.
 Example (in tcsh shell);
 
 $ setenv PERL6LIB .:lib:/home/marcel/Software/lib/perl6/lib
 $ perl6 some-program.pl6
 some-program.pl6 .. ===SORRY!===
 Could not find Semi-xml in any of:
  file#.:lib:/home/marcel/Software/lib/perl6/lib
  file#/home/marcel/.perl6/2015.05-139-g2281689/lib
  inst#/home/marcel/.perl6/2015.05-139-g2281689
  file#/home/marcel/Software/lib/perl6/share/perl6/lib
  file#/home/marcel/Software/lib/perl6/share/perl6/vendor/lib
  file#/home/marcel/Software/lib/perl6/share/perl6/site/lib
  inst#/home/marcel/Software/lib/perl6/share/perl6
  inst#/home/marcel/Software/lib/perl6/share/perl6/vendor
  inst#/home/marcel/Software/lib/perl6/share/perl6/site
 
 You can find the PERL6LIB text back in the first line of the error message. 
 It isn't split on the colon to get multiple paths.
 
 Greetings,
 Marcel Timmerman
 



Re: How to do a substring replacement in Perl 6

2015-06-08 Thread Bruce Gray

On Jun 8, 2015, at 3:51 PM, Douglas E. Miles d...@veritablesoftware.com wrote:

 Hi all!
 
 From http://perldoc.perl.org/functions/substr.html:
 
 substr has a 4th argument (or you can use substr as an lvalue) for 
 replacement.
 substr EXPR,OFFSET,LENGTH,REPLACEMENT
 
 From http://doc.perl6.org/routine/substr I don't see any way to do a 
 replacement. What is the idiomatic way of doing a positional string 
 replacement in Perl 6? Thanks!

Method form:
$ perl6 -e 'my $s = abc; $s.substr-rw(1,1) = z; say $s;'
azc

Function form:
$ perl6 -e 'my $s = abc; substr-rw($s, 1,1) = z; say $s;'
azc

I also do not see substr-rw in doc.perl6.org.
It needs to be added.
In the meantime, you can find it here:
http://design.perl6.org/S32/Str.html

— 
Hope this helps,
Bruce Gray (Util of PerlMonks)

panda occurrence of deprecated code message

2015-06-08 Thread mt1957

l.s.

Running newest panda code on newest perl6 (This is perl6 version 
2015.05-139-g2281689 built on MoarVM version 2015.05-49-g07fbd62).


$ panda list
...

Method for (from Any) seen at:
  /home/marcel/Software/Packages/panda/lib/Panda/App.pm, lines 51,54
Deprecated since v2015.5, will be removed with release v2015.9!
Please use flatmap instead.


Marcel Timmerman


How to do a substring replacement in Perl 6

2015-06-08 Thread Douglas E. Miles

Hi all!

From http://perldoc.perl.org/functions/substr.html:

substr has a 4th argument (or you can use substr as an lvalue) for 
replacement.

substr EXPR,OFFSET,LENGTH,REPLACEMENT

From http://doc.perl6.org/routine/substr I don't see any way to do a 
replacement. What is the idiomatic way of doing a positional string 
replacement in Perl 6? Thanks!


Re: How to do a substring replacement in Perl 6

2015-06-08 Thread Paul Cochrane
Hi Douglas,

 From http://perldoc.perl.org/functions/substr.html:
 
 substr has a 4th argument (or you can use substr as an lvalue) for
 replacement.
 substr EXPR,OFFSET,LENGTH,REPLACEMENT
 
 From http://doc.perl6.org/routine/substr I don't see any way to do a
 replacement. What is the idiomatic way of doing a positional string
 replacement in Perl 6? Thanks!

I believe `substr-rw` is what you're looking for:


$ perl6
 my $s = The black cat climbed the green tree;
The black cat climbed the green tree
 my $z = substr-rw($s, 14, 7) = jumped from;
jumped
 $s.say
The black cat jumped from the green tree


As far as I know, not all of its behaviour has been implemented yet (FWIW it
looks like it shouldn't have returned jumped above; my guess is that it
should have been climbed.  Nevertheless, it seems to do that which you're
looking for.

Hope that helps!

Cheers,

Paul


[perl6/specs] 555788: Correct to - too

2015-06-08 Thread GitHub
  Branch: refs/heads/master
  Home:   https://github.com/perl6/specs
  Commit: 55578889f62c345a325d0f54db72d4b44434a819
  
https://github.com/perl6/specs/commit/55578889f62c345a325d0f54db72d4b44434a819
  Author: Paul Cochrane p...@liekut.de
  Date:   2015-06-08 (Mon, 08 Jun 2015)

  Changed paths:
M S32-setting-library/Str.pod

  Log Message:
  ---
  Correct to - too




Re: Problem found with PERL6LIB environment variable

2015-06-08 Thread mt1957

On 06/08/2015 09:24 PM, Tobias Leich wrote:

say $*DISTRO.cur-sep



Hi Tobias,

It returns a comma.

I've used this in the path and processing is now ok. I was stuck with 
panda unable to do anything. As a workaround I can continue now. 
Hopefully this separator will be set back to ':' again.


Greets,
Marcel


Re: How to do a substring replacement in Perl 6

2015-06-08 Thread Douglas E. Miles

Thanks Paul!

On 6/8/2015 2:46 PM, Paul Cochrane wrote:

Hi Douglas,


 From http://perldoc.perl.org/functions/substr.html:

substr has a 4th argument (or you can use substr as an lvalue) for
replacement.
substr EXPR,OFFSET,LENGTH,REPLACEMENT

 From http://doc.perl6.org/routine/substr I don't see any way to do a
replacement. What is the idiomatic way of doing a positional string
replacement in Perl 6? Thanks!

I believe `substr-rw` is what you're looking for:


$ perl6

my $s = The black cat climbed the green tree;

The black cat climbed the green tree

my $z = substr-rw($s, 14, 7) = jumped from;

jumped

$s.say

The black cat jumped from the green tree


As far as I know, not all of its behaviour has been implemented yet (FWIW it
looks like it shouldn't have returned jumped above; my guess is that it
should have been climbed.  Nevertheless, it seems to do that which you're
looking for.

Hope that helps!

Cheers,

Paul





Re: How to do a substring replacement in Perl 6

2015-06-08 Thread Douglas E. Miles

Thanks Bruce!

On 6/8/2015 4:04 PM, Bruce Gray wrote:

On Jun 8, 2015, at 3:51 PM, Douglas E. Miles d...@veritablesoftware.com wrote:


Hi all!

 From http://perldoc.perl.org/functions/substr.html:

substr has a 4th argument (or you can use substr as an lvalue) for replacement.
substr EXPR,OFFSET,LENGTH,REPLACEMENT

 From http://doc.perl6.org/routine/substr I don't see any way to do a 
replacement. What is the idiomatic way of doing a positional string replacement 
in Perl 6? Thanks!

Method form:
$ perl6 -e 'my $s = abc; $s.substr-rw(1,1) = z; say $s;'
azc

Function form:
$ perl6 -e 'my $s = abc; substr-rw($s, 1,1) = z; say $s;'
azc

I also do not see substr-rw in doc.perl6.org.
It needs to be added.
In the meantime, you can find it here:
http://design.perl6.org/S32/Str.html

—
Hope this helps,
Bruce Gray (Util of PerlMonks)





Re: How to do a substring replacement in Perl 6

2015-06-08 Thread Bruce Gray

On Jun 8, 2015, at 3:51 PM, Douglas E. Miles d...@veritablesoftware.com wrote:

 Hi all!
 
 From http://perldoc.perl.org/functions/substr.html:
 
 substr has a 4th argument (or you can use substr as an lvalue) for 
 replacement.
 substr EXPR,OFFSET,LENGTH,REPLACEMENT
 
 From http://doc.perl6.org/routine/substr I don't see any way to do a 
 replacement. What is the idiomatic way of doing a positional string 
 replacement in Perl 6? Thanks!

Method form:
$ perl6 -e 'my $s = abc; $s.substr-rw(1,1) = z; say $s;'
azc

Function form:
$ perl6 -e 'my $s = abc; substr-rw($s, 1,1) = z; say $s;'
azc

I also do not see substr-rw in doc.perl6.org.
It needs to be added.
In the meantime, you can find it here:
http://design.perl6.org/S32/Str.html

— 
Hope this helps,
Bruce Gray (Util of PerlMonks)



Re: [perl #125352] [BUG] Empty object hash listifies to Nil

2015-06-08 Thread Elizabeth Mattijsen
Fixed with 2281689a0f9e337de935

Liz

 On 07 Jun 2015, at 13:57, (via RT) perl6-bugs-follo...@perl.org wrote:
 
 # New Ticket Created by   
 # Please include the string:  [perl #125352]
 # in the subject line of all future correspondence about this issue. 
 # URL: https://rt.perl.org/Ticket/Display.html?id=125352 
 
 
 19:43:05raydiak | m: say (my %h).list.perl
 19:43:05   +camelia | rakudo-moar 442a56: OUTPUT«()␤»
 19:43:14raydiak | m: say (my %h{Any}).list.perl
 19:43:15   +camelia | rakudo-moar 442a56: OUTPUT«Nil␤»
 19:44:00  masak | raydiak: I don't see why that latter one should be Nil 
 when the former isn't.
 19:44:10  jnthn | Me either
 19:44:34raydiak | nor me
 19:44:38  masak | even moreso since ISTR Nil was decoupled from meaning 
 undefined empty list recently.
 19:45:06  masak | raydiak: please rakudobug-submit, kthx.



[perl #125334] min(+'a', +'a').say prints Inf but should produce an error

2015-06-08 Thread Will Coleda via RT
I agree that this should be throwing the same conversion error. Here's probably 
why it's giving Inf, though:

$ perl6
 say min()
Inf
 say max()
-Inf


-- 
Will Coke Coleda