hello people,

> I am still defending that we need a package for data
> analysis/science/engineer (like the Perl5 PDL, Python Pandas or R
> data.table) and an IDE for streaming programming like jupyter or rstudio.

I'm still excited about this idea and my offer to test/feedback/document
remains open.

A first step should be to start with examples of pure Raku code. Once
we are confident about the fact it's the state of art of the langage, we
can merge it into

https://github.com/Raku/examples/tree/master/categories

I started it by using a turorial made by a colleage
(in french, sorry) about "exploring facts about the titanic demography
with python"

https://www.youtube.com/watch?v=FNDWAybVPcc

which is a good example:

* simple grammar
* simple data manipulations
* interesting facts to work on

simpler enough to explore Raku concepts and asking myself a lot of
questions like "is it possible that a grammar can Supply objects
or beging lazy".

so could something inspired like that grammar

grammar CSV {
        rule  TOP { <line>*  }
        token line { <col>* %% ',' \n }
        proto token col {*}
        token col:sym<bare>   { <-[\n",]>* }
        token col:sym<quoted> {
                '"' ~ '"'
                [<( [ '""' | <-[\n"]> ]* )>]
        }
}

which is basically used that way:

my @data =
    CSV.parse(
        actions => CSV_as_table.new,
        "quoted.csv".IO.slurp
    ).made;
my \col = %( $_ Z=> ^$_ with @data.shift.List );

be used this way to take avantage of lazyness:

my @top5 = do {
        .use_headers;
        .head(5)
} with onfly CSV, "quoted.csv".IO;

# IO stops tor read at line 6

regards,
marc


Reply via email to