Re: perl6 vs ruby

2020-03-03 Thread Fields, Christopher J
A few people had started a port of some BioPerl code to Perl6 a while ago; I 
tested this recently and it still passed tests.

https://github.com/cjfields/bioperl6

It should be renamed to bioraku!

Chris

Sent from my iPhone

On Mar 3, 2020, at 11:41 AM, Parrot Raiser <1parr...@gmail.com> wrote:


we use ruby for Biological data analysis. I wish perl6 should have got that 
capability.

Would you like to give us a sample problem,, to see if someone can
show a potential solution?


Re: A practical benchmark shows speed challenges for Perl 6

2016-03-31 Thread Fields, Christopher J


On Mar 31, 2016, at 8:56 AM, Tom Browder 
mailto:tom.brow...@gmail.com>> wrote:

On Thursday, March 31, 2016, Elizabeth Mattijsen 
mailto:l...@dijkmat.nl>> wrote:
> On 31 Mar 2016, at 14:12, Tom Browder > 
> wrote:
> Liz, it's a simple reader of a text file.  The only line processing is a 
> print of the number of characters of each line.  I guess I should eliminate 
> that but I assumed that was neglible since all the reader scripts do the same.

I wonder.  I wouldn’t be surprised if not printing number of chars would make a 
significant difference.

I'll try turning any line processing off, but note the Perl 5 reader does the 
same thing.

Best,

-Tom

Just to note, I have also seen dramatic differences in IO between Perl 5 and 
Perl 6, simply iterating through large files (in this case DNA sequence data) 
by line w/ no processing.

Chris


Re: books on p6?

2016-03-11 Thread Fields, Christopher J
Of course! the base URL has posts :P

http://www.learningperl6.com/

Knew I saw it somewhere...

Chris

On Mar 11, 2016, at 8:28 AM, Fields, Christopher J 
mailto:cjfie...@illinois.edu>> wrote:

The below link indicates an update in Dec. 2015.  I also recall seeing 
something after the Christmas release, maybe from brian d foy, which indicated 
this is still being worked on.

http://www.learningperl6.com/book/

Chris

On Mar 11, 2016, at 7:56 AM, Will Coleda 
mailto:w...@coleda.com>> wrote:

ISTR that link has been around for ages. I don't think they're
actually working on that book anymore.

On Thu, Mar 10, 2016 at 5:06 PM, Steve Mynott 
mailto:steve.myn...@gmail.com>> wrote:
See http://www.learningperl6.com/about/

Although this is still vapourware and the current best resources are
linked from the perl6.org<http://perl6.org> web pages.

S

On 10 March 2016 at 15:07, Brock Wilcox 
mailto:awwa...@thelackthereof.org>> wrote:
Yes, that is out of date. I don't know of any existing books or public
efforts to write ones.

We welcome contributions to docs.perl6.org<http://docs.perl6.org>, including 
tutorials,
walk-throughs, etc (beyond just references). That resource is getting
better, but slowly :)

--Brock


On Thu, Mar 10, 2016 at 3:59 AM, Luca Ferrari 
mailto:fluca1...@infinito.it>> wrote:

Hi all,
anybody knows of ongoing efforts for Perl 6 related books?
I suspect O'reilly title
<http://shop.oreilly.com/product/9780596007379.do> is pretty much out
of date, or am I wrong?

Thanks,
Luca



--
4096R/EA75174B Steve Mynott 
mailto:steve.myn...@gmail.com>>



--
Will "Coke" Coleda


Re: books on p6?

2016-03-11 Thread Fields, Christopher J
The below link indicates an update in Dec. 2015.  I also recall seeing 
something after the Christmas release, maybe from brian d foy, which indicated 
this is still being worked on.

http://www.learningperl6.com/book/

Chris

> On Mar 11, 2016, at 7:56 AM, Will Coleda  wrote:
> 
> ISTR that link has been around for ages. I don't think they're
> actually working on that book anymore.
> 
>> On Thu, Mar 10, 2016 at 5:06 PM, Steve Mynott  wrote:
>> See http://www.learningperl6.com/about/
>> 
>> Although this is still vapourware and the current best resources are
>> linked from the perl6.org web pages.
>> 
>> S
>> 
>>> On 10 March 2016 at 15:07, Brock Wilcox  wrote:
>>> Yes, that is out of date. I don't know of any existing books or public
>>> efforts to write ones.
>>> 
>>> We welcome contributions to docs.perl6.org, including tutorials,
>>> walk-throughs, etc (beyond just references). That resource is getting
>>> better, but slowly :)
>>> 
>>> --Brock
>>> 
>>> 
 On Thu, Mar 10, 2016 at 3:59 AM, Luca Ferrari  
 wrote:
 
 Hi all,
 anybody knows of ongoing efforts for Perl 6 related books?
 I suspect O'reilly title
  is pretty much out
 of date, or am I wrong?
 
 Thanks,
 Luca
>> 
>> 
>> 
>> --
>> 4096R/EA75174B Steve Mynott 
> 
> 
> 
> -- 
> Will "Coke" Coleda


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  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: Is there an equivalent env var to PERL5LIB for Perl 6 module locations?

2015-03-31 Thread Fields, Christopher J
On Mar 31, 2015, at 6:28 AM, Paul Cochrane  wrote:
> 
> On Tue, Mar 31, 2015 at 05:40:44AM -0500, Tom Browder wrote:
>> On Mon, Mar 30, 2015 at 7:35 PM, Rob Hoelz  wrote:
>>> Yup, PERL6LIB. =)
>> 
>> And how did you find out about it, i.e., where is it documented?
> 
> http://doc.perl6.org/language/5to6#Environment_variables
> 
> to be honest I cheated and have written the docs just today.  :-)
> 
> A `git grep LIB` in the spec sources turned up the text on environment
> variables in S19, so that'd be one place to check as well.  In general, if a
> search like that doesn't seem to turn up much, a `git grep` in the Rakudo
> sources also turns up quite a bit of info.
> 
> Cheers,
> 
> Paul

Funny, I had been using PERL6LIB for a number of years now and had assumed it 
was already documented (I recall it’s use popping up on IRC a number of years 
ago, which is where I picked it up).

chris

Re: Grammars and biological data formats

2014-08-09 Thread Fields, Christopher J
On Aug 9, 2014, at 8:51 PM, "Fields, Christopher J"  
wrote:
> 
> 
>> On Aug 9, 2014, at 5:25 PM, "t...@wakelift.de"  wrote:
>> 
>> 
>>> On 08/10/2014 12:21 AM, t...@wakelift.de wrote:
>>> Something that does surprise me is that your tests seem to imply that :p
>>> for subparse doesn't work. I'll look into that, because I believe it
>>> ought to be implemented already. Perhaps not properly hooked up, though.
>> 
>> On #perl6 I got corrected quite quickly: subparse is anchored to the
>> start and end of the target string, so :pos doesn't make sense. In this
>> case, you want just .parse
> 
> I mainly tested subparse() to see if it would find the second FASTA record 
> (which works if using :p and not :pos).
> 
> Sorry, I should have updated that, but subparse() with :p works fine; the 
> spec mentions :pos though (I plan on submitting a pull request on that).
> 
>> Another thing is that if lines() does keep all data around, it should be
>> considered a bug, as we should be able to infer that we don't keep the
>> list itself around and thus won't be able to refer to its previous
>> values later on. Thus, we should free the memory for the earlier lines
>> in the target string after the loop is done with them.
>> 
>> I have not yet tested, if this is the case, though.
>> 
>> Hope that clears up a bit of potential confusion before it can arise
>> - Timo
> 
> I can try that out.
> 
> Chris

Oh, and thanks everyone for the quick replies!

Chris

Re: Grammars and biological data formats

2014-08-09 Thread Fields, Christopher J

> On Aug 9, 2014, at 5:25 PM, "t...@wakelift.de"  wrote:
> 
> 
>> On 08/10/2014 12:21 AM, t...@wakelift.de wrote:
>> Something that does surprise me is that your tests seem to imply that :p
>> for subparse doesn't work. I'll look into that, because I believe it
>> ought to be implemented already. Perhaps not properly hooked up, though.
> 
> On #perl6 I got corrected quite quickly: subparse is anchored to the
> start and end of the target string, so :pos doesn't make sense. In this
> case, you want just .parse

I mainly tested subparse() to see if it would find the second FASTA record 
(which works if using :p and not :pos).

Sorry, I should have updated that, but subparse() with :p works fine; the spec 
mentions :pos though (I plan on submitting a pull request on that).

> Another thing is that if lines() does keep all data around, it should be
> considered a bug, as we should be able to infer that we don't keep the
> list itself around and thus won't be able to refer to its previous
> values later on. Thus, we should free the memory for the earlier lines
> in the target string after the loop is done with them.
> 
> I have not yet tested, if this is the case, though.
> 
> Hope that clears up a bit of potential confusion before it can arise
>  - Timo

I can try that out.

Chris




Grammars and biological data formats

2014-08-09 Thread Fields, Christopher J
(accidentally sent to perl6-lang, apologies for cross-posting but this seems 
more appropriate)

I have a fairly simple question regarding the feasibility of using grammars 
with commonly used biological data formats.  

My main question: if I wanted to parse() or subparse() vary large files (not 
unheard of to have FASTA/FASTQ or other similar data files exceed 100’s of GB) 
would a grammar be the best solution?  For instance, based on what I am reading 
the semantics appear to be greedy; for instance:

   Grammar.parsefile($file)

appears to be a convenient shorthand for:

   Grammar.parse($file.slurp)

since Grammar.parse() works on a Str, not a IO::Handle or Buf.  Or am I 
misunderstanding how this could be accomplished?

(just to point out, I know I can subparse() as well but that also appears to 
act on a string…)

As an example, I have a simple grammar for parsing FASTA, which a (deceptively) 
simple format for storing sequence data:

   http://en.wikipedia.org/wiki/FASTA_format

I have a simple grammar here:

   https://github.com/cjfields/bioperl6/blob/master/lib/Bio/Grammar/Fasta.pm6

and tests here:

   https://github.com/cjfields/bioperl6/blob/master/t/Grammar/fasta.t

Tests pass with the latest Rakudo just fine.

chris