Re: Baby steps to create a dataframe structure

2020-07-21 Thread Marc Chantreux
hello, On Tue, Jul 21, 2020 at 10:56:22PM -0300, Aureliano Guedes wrote: > Then, a native call to R may be better cus bring us dataframe an a lot of > statistical functions natively without other R's package. coming from perl/shell and having to use pandas a little bit, my current perception of "

df.column1 ... stealing from others could be counter-productive?

2020-07-29 Thread Marc Chantreux
> > df.column1 ... return a list of values on this column > That thought should be a topic in its own right. what i really like in raku is that chance to not have all those fancy keywords just because langages lack of syntax so stealing from pandas, incanter, and others is a good idea only if we d

Notes/Questions about Leon Timmermans's talk

2021-06-09 Thread Marc Chantreux
hello, I just saw this and it's very good https://www.youtube.com/watch?v=elalwvfmYgk The features he picked are indeed things i really like in raku and i learned some interesting details. Other details are still bugging me so i have some questions there: A. if x -> $y with // For exemple, giv

Re: Notes/Questions about Leon Timmermans's talk

2021-06-10 Thread Marc Chantreux
Hello, > > sub foo ( Int $x ) { 0 if $x > 5 } > > sub hello {say "hello $^world"} > > if defined my $value = foo 45 { hello $value } >with foo 7 { say $^value } i feel really dumb right now as i just used with and didn't made the match in my head. > or if you want to trigger on *not* d

pairs of separators from a string

2021-08-21 Thread Marc Chantreux
hello, i would like to get the list of opening (α) and closing (ω) separators from this string: &""''(){}[] too many years of perl made me think about this solution or something alike but it didn't work. my (\α,\ω) =| map { .[0,2…∞], .[1,3…∞] }, q&""''(){}[]&.comb; fixing this is i

(sigils are awesome, they say ...) Re: pairs of separators from a string

2021-08-22 Thread Marc Chantreux
thanks everyone for sharing, Vadim, my ($a, $b) = { @^a[0,2...Inf], @a[1,3...Inf] }.(q<(){}[]>.comb); say $a[0]; say $b[0] oh. i never see this direct call of a lambda before but it really makes sense! this is the answer i like the most. i rewrote it my way and this works my ($a, $b) = { .[0,

[solved] pairs of separators from a string

2021-08-22 Thread Marc Chantreux
hello Yary, > and my instinct is that "map" is adding a layer you don't need or want for > this issue, should just be sending the results of comb to a block. But I > can't quite get the syntax right (and docs.raku.org seems down at the > moment) With this and what i understood from Vladim, i trie

Re: pairs of separators from a string

2021-08-22 Thread Marc Chantreux
hello William, > your string, or whether-or-not some might be nested within each other. You > show a lone ampersand ("&") at the beginning of your example, but other > strings may not be so simple. really sorry about this artefact from previous attempts :( > > $string.comb(/ ( <:Ps> ~ <:Pe> .?)

[better solution] pairs of separators from a string

2021-08-24 Thread Marc Chantreux
hello everyone, I made a mistake while replying to all of us so anwsers never reached your boxes. I'll summerize in one answer: Bill: > Is it just even/odd elements that you want to separate out? If so, maybe > .grep() is your friend here I don't think it is: 0, 2 ... * seems to be * closer to

fixing the documentation

2021-08-25 Thread Marc Chantreux
hello people, D526P: https://docs.raku.org/language/5to6-nutshell#index-entry-PERL6LIB-PERL6LIB DFIM : https://docs.raku.org/language/modules#Finding_installed_modules DLIB : https://docs.raku.org/programs/03-environment-variables#index-entry-RAKULIB This D526P is deprecated and some RAKULIB de

Re: fixing the documentation

2021-11-18 Thread Marc Chantreux
Hello, > The best would be if you propose a PR or open an issue at > https://github.com/Raku/doc. Any help with the documentation would > most certainly be appreciated as people working on the docs project > are overloaded. Sorry I was late on this because I wasn't sure how to revamp the whole th

can't make from a S/// ?

2021-11-18 Thread Marc Chantreux
hello rakoons, I want to be able to parse this: CSV.parse( '162,1,2,"Watt, Mrs. James (Elizabeth ""Bessie"" Inglis Milne)",female,40,0,0,C.A. 33595,15.75,,S', actions => CSV_as_table.new, ).made.say; I wrote this simple Grammar and action grammar CSV { rule TOP {* %% \n } tok

Re: fixing the documentation

2021-11-19 Thread Marc Chantreux
hello, Le Fri, Nov 19, 2021 at 07:12:13AM +0100, JJ Merelo a écrit : > Thanks a lot. well ... not sure who should thank someone here .. i meant: you spent so much more time on the raku ecosystem than i did ... thanks everyone.

Re: can't make from a S/// ?

2021-11-19 Thread Marc Chantreux
hello Ralph, Thank you for the whole explaination and links. > method col:sym ($_) { .make: S:g/'""'/"/ } i dug around it but missed it! arggh ... > > am I right when i feel there is a way to do this > > substitution inside the grammar > As I've shown, yes. But it draws you into the `$/` dance

why not raku ?

2021-11-19 Thread Marc Chantreux
hello, > I like ruby and perl so do I but raku is by far my prefered interpreted langage now. I don't raku that much and most of the time, i read the doc more than i actually write code but when it's writen, it's always elegant and concise the way i never seen before. > Maybe perl6 is still not

Re: can't make from a S/// ?

2021-11-20 Thread Marc Chantreux
hello William, > method col:sym ($/) { make $/.subst(/'""'/, '"', :global).Str } which is just a longuest version of the line Ralph wrote. i'm inclined to think that this is easier to read: method col:sym ($/) { .make ~S:g/'""'/"/ } > The following line seems to work just fine, with-or-with

Raku and Datasciences

2021-11-20 Thread Marc Chantreux
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 ope

Re: can't make from a S/// ?

2021-11-20 Thread Marc Chantreux
helllo William, > > Marc wrote: > > i'm inclined to think that this is easier to read: > > method col:sym ($/) { .make ~S:g/'""'/"/ } > That's not working for me. I'm on Moar (2021.06). works for me with: Welcome to 𝐑𝐚𝐤𝐮𝐝𝐨™ v2021.09. Implementing the 𝐑𝐚𝐤𝐮™ programming language v6.d.

Re: can't make from a S/// ?

2021-11-20 Thread Marc Chantreux
> On Sat, Nov 20, 2021 at 9:03 PM Marc Chantreux wrote: > > > > method col:sym ($/) { .make ~S:g/'""'/"/ } > > > That's not working for me. I'm on Moar (2021.06). > > works for me with: > > method col:sym ($_) { .make: ~S:g

Re: can't make from a S/// ?

2021-11-21 Thread Marc Chantreux
hello William, > #old: > rule TOP {* %% \n } > token line { * %% ',' } > #new: > rule TOP {* } > token line { * %% ',' \n } ohhh ... indeed! when i fixed the code on Ralph's instructions, i finally was able to slurp a whole file and discovered a emtpy entry at the end of the flow

is 'use v6' still a thing?

2021-12-28 Thread Marc Chantreux
hello people, long time ago, there was this 'use v6' line so perl should be v6 and still run v5.* things. I just took a look to https://raku.land/github:JJ/SDL2 and seen use v6; Does it still makes sense? Regards. -- Marc Chantreux Direction du numérique de l'Universit

Re: is 'use v6' still a thing?

2021-12-29 Thread Marc Chantreux
g your lines, i realized it's not worth to spare it. thank you. regards marc -- Marc Chantreux Direction du numérique de l'Université de Strasbourg Pôle de Calcul et Services Avancés à la Recherche (CESAR) http://annuaire.unistra.fr/p/20200

the MAIN questions

2021-12-29 Thread Marc Chantreux
hello rakoons, I have a script named fixlines which is basically sub fixline (Str $line) { ... } say fixline $_ for lines; This is far enough for personal usage but i would like to release it so i need a decent -h to be implemented and basically should look like Usage: fixlines [--test] to

Re: the MAIN questions

2021-12-29 Thread Marc Chantreux
hello Daniel, > > Did i just dreamed about it ? > You sort of dreamed it. damn! thanks for the red pill. > my $argfiles = IO::ArgFiles.new(@files || '-'); my perl history works against me there: i see @files.elems || '-' here :) thank you. > The other change I'd suggest for additional ele

Last day for FOSDEM submission

2021-12-30 Thread Marc Chantreux
hello people, I just discovered this this morning: https://www.reddit.com/r/rakulang/comments/rrcp4c/steal_these_ideas_for_raku_fosdem_talks/ I don't remember if there was a previous annoucement in this list but it's still possible to jump in. I just submitted one on "Replacing Bash scripts wit

shell to raku

2021-12-31 Thread Marc Chantreux
Le Fri, Dec 31, 2021 at 01:20:45PM +, Wesley Peng a écrit : > Replacing Bash scripts with Raku? That’s an interesting thing Well ... replacing bash is always a good thing but raku is not always the rhs of the substitution (could be dash/mksh/rc, make/mk, C, ...). raku is now my tool of choice

probably worth a bug report ?

2022-01-01 Thread Marc Chantreux
hello rakoons, I got this error message Too few positionals passed; expected 1 argument but got 0 in sub xxx at - line 1 in block at - line 2 Welcome to 𝐑𝐚𝐤𝐮𝐝𝐨™ v2021.09. Implementing the 𝐑𝐚𝐤𝐮™ programming language v6.d. Built on MoarV

Re: probably worth a bug report ?

2022-01-02 Thread Marc Chantreux
Le Sun, Jan 02, 2022 at 12:32:46PM +0100, Elizabeth Mattijsen a écrit : > Maybe first explain why the error thanks for the explaination. especially > $ raku -e 'sub a(|c) { dd c }; a b => 42' > \(:b(42)) now my sub works the way I wanted: sub got (|c) { for c.hash.kv -> $rule ,$inpu

shorter way to set states in -n?

2022-07-02 Thread Marc Chantreux
hello rakoons, AFAIK about raku -n, I need 2 lines to setup a state with a default value seq 2| raku -ne ' state (@o, @f); BEGIN @o = 0 xx 3; @o.push: "ok"; say @o; ' but is there a shorter way ? regards, marc

Re: shorter way to set states in -n?

2022-07-02 Thread Marc Chantreux
say @o; ' works fine! thank you very much. -- Marc Chantreux Direction du numérique de l'Université de Strasbourg Pôle de Calcul et Services Avancés à la Recherche (CESAR) http://annuaire.unistra.fr/p/20200

Re: shorter way to set states in -n?

2022-07-03 Thread Marc Chantreux
hello, > Is this a bug, or are my (our?) expectations wrong? I posted on the list precisely because the doc. wasn't enough to GTD so I can't reply your question :) regards -- Marc Chantreux Direction du numérique de l'Université de Strasbourg Pôle de Calcul et Services Avan

something between run and qx() ?

2022-08-04 Thread Marc Chantreux
he qx construction (something like :r for run). What I really would like to write is: raku -e ' qx:r< dpkg-query -f ${db-fsys:Files} -W gnuplot* >.lines>>.grep(*.IO.f)>>.say ' Any suggestion is welcome. Regards, -- Marc Chantreux Pôle de Calcul et Services Avancés à la Recherche (CESAR) http://annuaire.unistra.fr/p/20200

Re: something between run and qx() ?

2022-08-04 Thread Marc Chantreux
Hi Brian and thanks for your reply. > There is the 'x' adverb for Q -- I think qx is equivalent to Q:x exactly. that's why Q:x doesn't help as it still run sh -c to execute the command. regards, -- Marc Chantreux Pôle de Calcul et Services Avancés à la

Re: something between run and qx() ?

2022-08-04 Thread Marc Chantreux
s = grep *.IO.f, map *.trim, `< dpkg-query -f ${db-fsys:Files} -W gnuplot* >; insead of my @installed-files = grep *.IO.f, map *.trim, ( run :out, < dpkg-query -f ${db-fsys:Files} -W gnuplot* > ).out.l

Re: something between run and qx() ?

2022-08-04 Thread Marc Chantreux
the FOSDEM talk: sub prefix:<`>(|c) is tighter(&infix:<.>) { (run :out, c).out.lines } the `is tighter` thing was because I hoped I could write something like `.grep( / '.txt' $ / ).say Is is something to do to fix it ? Thanks everything you do on Raku! regards --

questions about sigpipe

2022-08-08 Thread Marc Chantreux
applications.» Can anyone give more detail about it? Thanks for any answer and regards, PS: sigpipe is also a nice example of usage for INIT and NativeCall. -- Marc Chantreux Pôle de Calcul et Services Avancés à la Recherche (CESAR) http://annuaire.unistra.fr/p/20200

rotor in comb?

2022-08-27 Thread Marc Chantreux
{ say "$_ = $digraph{$_}" for sort { $digraph{$b} <=> $digraph{$a} } keys %digraph } $_=lc; while (/([a-z]{2})/g) {++$digraph{$1}; --pos; } ' Any help is very welcome. regards, -- Marc Chantreux Pôle de Calcul et Services Avancés à la Recherche (CESAR) http://annuaire.unistra.fr/p/20200

Re: rotor in comb?

2022-08-28 Thread Marc Chantreux
match(:exhaustive, /(<[a..z]> ** 2)/) }).flat.Bag.sort({-.value, .key})' "$@" raku -e ' lines.race.map({ |map ~*, .lc.match(:exhaustive, /(<[a..z]> ** 2)/) }).flat.Bag.sort({-.value, .key}).map: &say ' -- Marc Chantreux Pôle de Calcul et Services Avancés à la Recherche (CESAR) http://annuaire.unistra.fr/p/20200

steps of a path

2022-09-03 Thread Marc Chantreux
on. my \path = [ "/var/log/messages" .split: "/" ]; .say for (^path).map( { path[0..$_].join: "/" } )[1..*]; I'm pretty sure I saw a very concise and elegant way to transform ( A B C ) to ((A) (A B) (A B C)) in the past but I'm enable to figure out how. Any help

Re: steps of a path

2022-09-03 Thread Marc Chantreux
lt;<. raku -ne '.Str.say for m:ex{^ [:r "/" <-[/]>+]+? }' /var/log/messages and it is pretty good compared to the sed version: <<. sed -E ':b p; s:/[^/]+$::; t b' thank you very much to both of you: I learned a lot on this post. -- Marc Chantreux Pôle de Calcul et Services Avancés à la Recherche (CESAR) http://annuaire.unistra.fr/p/20200

Re: steps of a path

2022-09-03 Thread Marc Chantreux
On Sat, Sep 03, 2022 at 09:50:08PM +0100, Ralph Mellor wrote: > > ( A B C ) to ((A) (A B) (A B C)) ? > [^1,^2,^3] I got that one and tried to generalize it with something more generic (using * to get the number of elements). thanks for helping -- Marc Chantreux Pôle de Calcul et

Re: steps of a path

2022-09-04 Thread Marc Chantreux
Interesting as it can provide a relative short solution with no advanced concept. I tried this line but got an immutability problem. I tried multiple work around with no success for the moment. <<. raku -e 'lines.IO.map: {repeat {.put} while not .=parent ~~ "/" }' /var/log

Re: steps of a path

2022-09-05 Thread Marc Chantreux
eauty of it. why made me realize I should take time between two post so I can have a fresh mindset for all of them! Actually: this is by far the simplest solution. Thanks. -- Marc Chantreux Pôle de Calcul et Services Avancés à la Recherche (CESAR) http://annuaire.unistra.fr/p/20200

Re: steps of a path

2022-09-05 Thread Marc Chantreux
I love this one. I used uniq and run so the whole script can be run from raku (except the xargs ls avoid the ARG_MAX error) <<. raku -e 'run < ls -lUd >, unique map {(.IO, *.parent …^ "/")>>.Str.Slip}, lines' /var/log/messages /var/log/auth.log regards

Re: steps of a path

2022-09-06 Thread Marc Chantreux
some idoms. > Is that because it knows me, or has google started blessing Larry's > neologisms for the whole planet?!? ) Why not? new words happens all the time and those one are useful for programmers. -- Marc Chantreux Pôle de Calcul et Services Avancés à la Recherche (CESAR) http:/

Re: who call raku?

2024-02-10 Thread Marc Chantreux
On Thu, Feb 08, 2024 at 02:25:00PM -0800, ToddAndMargo via perl6-users wrote: > Actually, I am looking for the name of the calling program: > Cobian, Task manager, deamon, etc.. linux centric anwser: raku -e 'say "/proc/{"/proc/$*PID/stat".IO.words[3]}/comm".IO.lin

Re: pint: Elizabeth, sort list???

2024-03-05 Thread Marc Chantreux
ar64bang5bar abar64foo abar64foo4foo abar64foo4bar abar64foo14bar abar64foo5bar afoo13 afoo4 >.sort: { | map { +$_ // $_ }, .split: /\d+/, :v } The ouput seems to be ok. regards, -- Marc Chantreux Pôl

Re: pint: Elizabeth, sort list???

2024-03-07 Thread Marc Chantreux
mp;say) what I would love instead is something closer than the haskell's $ operator with a very low priority so it could be possible to be parenthesis free. as example. I would like 1..10 ==> map * * 2 ==> say to be a joyful version of (1..10).map(* * 2).say regards -

Re: pint: Elizabeth, sort list???

2024-03-07 Thread Marc Chantreux
hello, > ==> sort({ | map { +$_ // $_ }, .split: /\d+/, :v }) ==> say() ok … so I'm lost but I'm not even curious to understand why (because of my lack of interest for the ==> operator :)) regards marc -- Marc Chantreux Pôle CESAR (Calcul et services avancés à la re

perl6 spec tests results ?

2012-08-28 Thread Marc Chantreux
hello, i'm writing an article on Perl6 and i would like some facts to reassure early adopters. according to the test suite and the will of Perl6 implentors, what proportion (in %) of Perl6 can be concidered as stable? what are the parts that are not ? any link ? regards marc

another parrot langage ?

2012-08-28 Thread Marc Chantreux
hello, i wonder if there is another actively developped or stable langage on top of rakudo. regards marc

s:g/T/U/ doesn't work ?

2012-10-24 Thread Marc Chantreux
hello perl6 people, On This is perl6 version 2012.09.1 built on parrot 4.6.0 revision 0 When i try to run use v6; use Test; for 'GATGGAACTTGACTACGTAAATT' { s:g/T/U/; is $_ , 'GAUGGAACUUGACUACGUAAAUU' , 'RNA'; } I get Cannot assign to

the nature of a scalar?

2012-10-24 Thread Marc Chantreux
hello perl6 people, this code says "foo", exactly as expected. use v6; my $path = ""; $path ||="foo"; say $path; I'm trying to use the same thinh in a get callback of Baildador and it doesn't work. i try to understand why is it so. use v6; use lib 'lib'; use Bailador; get / (

Re: s:g/T/U/ doesn't work ?

2012-10-24 Thread Marc Chantreux
hello again, i felt dumb reading your answers! it seems obvious now. thanks everyone. regards

enc2xs and perl6 ?

2013-01-05 Thread Marc Chantreux
hello guys, As i think Perl6 can be the next reference langage for data integration in libraries systems, i'm porting MARC::MIR and MARC::MIR::Template in Perl6. Well … basic things are now working when it come to UTF8 files, but i have tons of data encoded in iso5426. I would like to resuse the

prove that the meaning of live is math

2013-05-26 Thread Marc Chantreux
lue ~~ any < m a t h > } i already know i have to get used to the anoying \ at the end of the lines but i'm pretty sure there are plenty ways to make this expression shorter. things i tried to get shorter: * .value ~~ any < m a t h > * ('a'..'z') thanks

Re: prove that the meaning of live is math

2013-05-27 Thread Marc Chantreux
On Sun, May 26, 2013 at 02:37:24PM +0200, Moritz Lenz wrote: > On 05/26/2013 12:49 PM, Marc Chantreux wrote: > > say [+] > > ('a'..'z')\ > > .pairs\ > > .map: { 1 + .key if .value ~~ any < m a t h > } > > > > i a

as perl6 has no $/ ...

2013-09-23 Thread Marc Chantreux
/bin/bash > \ , < mc x 1000 1000 marc /home/marc /bin/zsh > ) Speaking about ISO2709 format, it would be: @records = "book.mrc".IO.records( :rs("\x1d"), :fs("\x1e"), :ss("\x1f")) but i seen nothing in the doc or the code. regards, mar

Re: Perl6-debug - interface question

2013-09-23 Thread Marc Chantreux
erpret them correctly? Sure: the default cygwin terminal (mintty) handle control caracters the right way. please install the cygwin base and execute perl6-debug in the cygwin terminal. You can find cygwin there: http://cygwin.com/install.html HTH marc -- Marc Chantreux (eiro on github and free

isn't :nl awkward ?

2013-09-23 Thread Marc Chantreux
t-line-separator don't you think :rs ( and the method input-record-separator ) must be used there ? and why not carre about IFS ? regards -- Marc Chantreux (eiro on github and freenode) http://eiro.github.com/ http://eiro.github.com/atom.xml "Don't believe everything you read on the Internet" -- Abraham Lincoln

Re: isn't :nl awkward ?

2013-09-24 Thread Marc Chantreux
de my memory usage as some marc collections are often hundreds of gigabytes big. if you see my snippets again, i used an anonymous iterator un perl5 and the gather function un perl6 to be sure that the records are read on demand. regards -- Marc Chantreux (eiro on github and freenode) http://eiro.git

Re: any module like Getopt::Long ?

2013-11-15 Thread Marc Chantreux
e is no need of such a module as parsing command line options is a perl6 built-in feature: http://perl6advent.wordpress.com/2010/12/02/day-2-interacting-with-the-command-line-with-main-subs/ regards -- Marc Chantreux (eiro on github and freenode) http://eiro.github.com/ http://eiro.github.com/

Re: any module like Getopt::Long ?

2013-11-15 Thread Marc Chantreux
say "n is $n, interface is $i, input is {@spec}"; } regards -- Marc Chantreux (eiro on github and freenode) http://eiro.github.com/ http://eiro.github.com/atom.xml "Don't believe everything you read on the Internet" -- Abraham Lincoln

Re: any module like Getopt::Long ?

2013-11-15 Thread Marc Chantreux
On Sat, Nov 16, 2013 at 12:58:57AM +0200, Serge A. Ribalchenko wrote: > > it's *@input, not @input: > Thank you! you're welcome :) -- Marc Chantreux (eiro on github and freenode) http://eiro.github.com/ http://eiro.github.com/atom.xml "Don't believe everyt

perl6 hackathon at fpw'14?

2014-06-11 Thread Marc Chantreux
want to help for one of this projets? have your own one in perl6? please tell me: we'll hack together. regards -- Marc Chantreux (eiro on github and freenode) http://eiro.github.com/ http://eiro.github.com/atom.xml "Don't believe everything you read on the Internet" -- Abraham Lincoln

match an empty string?

2014-07-12 Thread Marc Chantreux
> 'server account,,,' , login => 'root' ) { my ( $rule, $candidate ) = .kv; ok ?PAccountDB.subparse( $candidate, :rule($rule) ) , "subrule $rule matches $candidate"; } -- Marc Chantreux Université de Strasbourg, Direction Informatique 14 Rue René Descartes, 67084 STRASBOURG CEDEX ☎: 03.68.85.57.40 http://unistra.fr "Don't believe everything you read on the Internet" -- Abraham Lincoln

Re: match an empty string?

2014-07-13 Thread Marc Chantreux
ntax thing and finished the program. thanks everyone. -- Marc Chantreux (eiro on github and freenode) http://eiro.github.com/ http://eiro.github.com/atom.xml "Don't believe everything you read on the Internet" -- Abraham Lincoln

Re: perl6 hackathon at fpw'14?

2014-07-30 Thread Marc Chantreux
ext moves would be: * write more perl6ish code * add some templating features as tags to have things like {? users {ul {@ users u {li {$u.firstname} {$u.lastname} } }} } YA way to learn some perl6 code. regards -- Marc Chantreux (eiro on github and freenode) http://eir

add subs from $?PACKAGE.HOW ?

2014-12-08 Thread Marc Chantreux
meta helpers. what i would like to write is $?PACKAGE. < link meta img >.map: { $?PACKAGE.^add_method\ ( $?PACKAGE , $_ , &tag.assuming( tag => $_ ) ) } but $?PACKAGE.HOW is a PackageHOW and add_method comes with ClassHOW. if someo

hash of lists of hashes, not hash of lists

2014-12-09 Thread Marc Chantreux
: I want a nested datastructure so please don't .list.item. I guess when i would have fixed my code, i would be able to run something like: %posts.kv.map: -> $k, $v { say $k; $v.map: ..ident(4).say } any help would be appreciated. regards -- Marc Chantreux "Don't believe everything you read on the Internet" -- Abraham Lincoln

Re: hash of lists of hashes, not hash of lists

2014-12-09 Thread Marc Chantreux
i made it so i reply to myself: On Tue, Dec 09, 2014 at 08:03:22PM +0100, Marc Chantreux wrote: > which is almost perfect, but i don't know how to say to perl6 something > like: I want a nested datastructure so please don't .list.item. use [] to surround the array my %po

Re: Is < > creating and Array or Parcel ?

2015-08-02 Thread Marc Chantreux
methods and can act both as a hash and and array (in perl6, you'll say "which is both Positionnal and Associative"). HTH. (also hope it's correct) -- Marc Chantreux (eiro on github and freenode) http://eiro.github.com/ http://eiro.github.com/atom.xml "Don't believe everything you read on the Internet" -- Abraham Lincoln

Re: Is < > creating and Array or Parcel ?

2015-08-03 Thread Marc Chantreux
On Sun, Aug 02, 2015 at 10:35:23PM +1000, Lloyd Fournier wrote: > If you want to assign to an array which is an element of another array: > > @a = $z[0].list this is very confusing because this is not a LoL. $z.flat seems more intuitive to me. -- Marc Chantreux (eiro on github and

Re: What are Perl 6's killer advantages over Perl 5?

2015-08-26 Thread Marc Chantreux
not declared. Did you mean '$this'? > at -e:1 > --> my Int $this = 1; ⏏$thıs++; say $this; > That, IMHO, is a huge deficiency! so usefull in most cases of oneliners! i really hope this deficiency is here to stay :) -- Marc Chantreux (eiro on github and freenode) http://eiro.gi

Re: What are Perl 6's killer advantages over Perl 5?

2015-08-27 Thread Marc Chantreux
I use an alias that has ‘-M strict’ in it. > > I was thinking -e vs. -E, like perl5 complete different usage but it would be nice to have a flag for "use strict" both in perl5 and 6 -- Marc Chantreux (eiro on github and freenode) http://eiro.github.com/ http://eiro.github.co

Re: What are Perl 6's killer advantages over Perl 5?

2015-08-31 Thread Marc Chantreux
On Fri, Aug 28, 2015 at 05:48:07PM +0200, Carl Mäsak wrote: > Good news! I just pushed a change (with backing from other core > developers) that makes -e strict by default! awesome! thank you Carl! -- Marc Chantreux (eiro on github and freenode) http://eiro.github.com/ http://eiro.gith

isn't $PERL6LIB separator ':' on unix ?

2015-09-08 Thread Marc Chantreux
:../dnsmanager-v6/lib perl6 t/basic.t ===SORRY!=== Could not find X::html in any of: file#lib:../dnsmanager-v6/lib ... so it seems $PERL6LIB doesn't split on the separators i used to use. any idea? -- Marc Chantreux Université de Strasbourg, Direction Informatique 14 Rue René Descartes,

Re: isn't $PERL6LIB separator ':' on unix ?

2015-09-09 Thread Marc Chantreux
On Wed, Sep 09, 2015 at 09:24:57AM +0200, Tobias Leich wrote: > Please try $*DISTRO.cur-sep i just changed my perl6 settings in .zshenv export -UT PERL6LIB perl6lib $(perl6 -e '$*DISTRO.cur-sep.say') it now works like a charm! thank you! -- Marc Chantreux (eiro on github and f

questions about qw<>

2015-10-13 Thread Marc Chantreux
this is a good thing"; # this is a good thing this is working but raised 2 questions: * if it was so easy, why isn't it in perl6? [ ] i missed the good paragraph of the documentation ? [ ] i'm going to do something very stupid ? [ ] other, your answer here * i just

Re: questions about qw<>

2015-10-13 Thread Marc Chantreux
to/blob/master/lib/Rototo.pm#L11 > became a list of pairs. Can’t really tell without the br code. But, > fwiw, I don’t think you need the prefix % at all :-) i do 'cause of the signature (*%attrs) thanks for your answer! cya -- Marc Chantreux (eiro on github and freenode) http://eiro.github.com/ http://eiro.github.com/atom.xml "Don't believe everything you read on the Internet" -- Abraham Lincoln

combine hashes

2015-11-06 Thread Marc Chantreux
e, 1 => john, enable => True when expected is login => jdoe, first => john, enable => True; i also tried other things like :p, .pairs, :kv but none of them seems to work. can someone help ? regards -- Marc Chantreux Université de Strasbourg, Direction Informatique 14 Ru

Re: combine hashes

2015-11-07 Thread Marc Chantreux
# {:enable, :first("john"), :login("jdoe")} > > Cheers, > Moritz -- Marc Chantreux (eiro on github and freenode) http://eiro.github.com/ http://eiro.github.com/atom.xml "Don't believe everything you read on the Internet" -- Abraham Lincoln

Re: combine hashes

2015-11-07 Thread Marc Chantreux
m===SORRY!=== Error while compiling Variable '%x' is not declared at :1 --> my %y = :enable, ⏏%x< login first >:p;  my %x = < login jdoe first john last doe >; > say %y.perl; # {:enable, :first("john

Re: combine hashes

2015-11-07 Thread Marc Chantreux
t; login jdoe first john last doe >; my %y = flat (:enable, %x< login first >:p); is ok but my %x = < login jdoe first john last doe >; my %y = flat :enable, %x< login first >:p; give me > first => john, last => doe, login => jdoe > Unexpected named par

Re: combine hashes

2015-11-07 Thread Marc Chantreux
damnit... i accidentally sent this WIP version of the email. i apologize. regards On Sat, Nov 07, 2015 at 10:04:16AM +0100, Marc Chantreux wrote: > On Sat, Nov 07, 2015 at 08:17:21AM +0100, Moritz Lenz wrote: > > my %x = < login jdoe first john last doe >; > > my %y = fla

Re: combine hashes

2015-11-07 Thread Marc Chantreux
that one is crap too. again: i'm sorry On Sat, Nov 07, 2015 at 10:13:17AM +0100, Marc Chantreux wrote: > hello Moritz, > > On Sat, Nov 07, 2015 at 08:17:21AM +0100, Moritz Lenz wrote: > > my %x = < login jdoe first john last doe >; > > my %y = flat (:enable, %x

Re: combine hashes

2015-11-07 Thread Marc Chantreux
ue, %x ) :!enable; regards -- Marc Chantreux (eiro on github and freenode) http://eiro.github.com/ http://eiro.github.com/atom.xml "Don't believe everything you read on the Internet" -- Abraham Lincoln

&MAIN signature to preserve @*ARGFILES ?

2015-11-28 Thread Marc Chantreux
rl6. i googled, tried to read the doc and grep in roast but i found no way to do it. any idea to help me. so thanks thanks for reading and helping. regards -- Marc Chantreux (eiro on github and freenode) http://eiro.github.com/ http://eiro.github.com/atom.xml "Don't believe ev

Re: &MAIN signature to preserve @*ARGFILES ?

2015-11-28 Thread Marc Chantreux
ap: {$fmt.sprintf(|$_)} } sub MAIN (*@*ARGS,:$t) { .say for padded-cols $t, $*ARGFILES.lines.map: (*.split($t)).eager; } -- Marc Chantreux (eiro on github and freenode) http://eiro.github.com/ http://eiro.github.com/atom.xml "Don't believe everything you read on the Internet" -- Abraham Lincoln

Re: &MAIN signature to preserve @*ARGFILES ?

2015-11-29 Thread Marc Chantreux
seems the problem remains so i don't think this is about my code. sub MAIN (*@*ARGS,:$t) { say "$t" # .say for padded-cols $t, $*ARGFILES.lines.map: (*.split($t)) } i'm now running with This is perl6 version 2015.11 built on MoarVM version 2015.11 regards --

lazy gather?

2017-03-13 Thread Marc Chantreux
x.map({ abs golden - $_ }); which is not so appealing. then my programs starts to burn cpu and gets nothing. this is because it seems that gather isn't on demand so i moved the subscript [^1000]. this works but isn't intellectually right anymore. any idea to make it more appealing ? regard

Re: lazy gather?

2017-03-14 Thread Marc Chantreux
: (golden - *).abs; > say distances[^1000]; excellent! i updated my perl6 and tested this code and it works well! thank you everyone. -- Marc Chantreux (eiro on github and freenode) http://eiro.github.com/ http://eiro.github.com/atom.xml "Don't believe everything you read on the Internet" -- Abraham Lincoln

please apply to this CfP

2017-03-14 Thread Marc Chantreux
hello people, Polyconf comes to Paris in 2017: https://eventil.com/events/polyconf-17/submissions/new and I would be really important to have a perl6 primer there. Any volonteer ? regards -- Marc Chantreux (eiro on github and freenode) http://eiro.github.com/ http://eiro.github.com

sympa hackathon: perl6 for the IM part ?

2017-03-14 Thread Marc Chantreux
meone wants to help us, everyone is very welcome. just subcribe to this list: https://framalistes.org/sympa/info/sympa-20th-birthday-hackathon regards -- Marc Chantreux (eiro on github and freenode) http://eiro.github.com/ http://eiro.github.com/atom.xml "Don't believe everything you read

Re: lazy gather?

2017-03-14 Thread Marc Chantreux
h the readable one :) thanks for help regards -- Marc Chantreux (eiro on github and freenode) http://eiro.github.com/ http://eiro.github.com/atom.xml "Don't believe everything you read on the Internet" -- Abraham Lincoln

lats rakudo version from rakudobrew ?

2017-09-11 Thread Marc Chantreux
tually built stuff but at the end, perl6 -v still gives me 2017.05. any idea ? regards marc -- Marc Chantreux (eiro on github and freenode) http://eiro.github.com/ http://eiro.github.com/atom.xml "Don't believe everything you read on the Internet" -- Abraham Lincoln

takeWhile ?

2017-09-11 Thread Marc Chantreux
m almost there: (116, * * .6 ... * < 2 ).say but the first $_ < 2 remains in the list. the only one alternative i see is a gather/take loop but i really expect something shorter from perl6 :) any idea ? regards -- Marc Chantreux (eiro on github and freenode) http://eiro.gi

Re: takeWhile ?

2017-09-11 Thread Marc Chantreux
nstead of (116, * * .6 ...^ * < 2 ).say the first expression is valid and i don't know what is does. the first expression is valid *and correct*. thank you! -- Marc Chantreux (eiro on github and freenode) http://eiro.github.com/ http://eiro.github.com/atom.xml "Don&#x

Re: takeWhile ?

2017-09-11 Thread Marc Chantreux
up before comparing to 2. and now i got it :) thank you for this regards -- Marc Chantreux (eiro on github and freenode) http://eiro.github.com/ http://eiro.github.com/atom.xml "Don't believe everything you read on the Internet" -- Abraham Lincoln

Re: lats rakudo version from rakudobrew ?

2017-09-13 Thread Marc Chantreux
t you want to track that.) i did it. i also removed all the repo and artefacts to start from scratch. yes i got a 2017.5. I have no more time to investigate so i fallback to my old script to make things work. thank you for helping -- Marc Chantreux (eiro on github and freenode) http://eiro.github

  1   2   >