Re: why not raku ?

2021-11-22 Thread Aureliano Guedes
ng easy and well with C++ libs. On Mon, Nov 22, 2021 at 2:50 PM Clifton Wood wrote: > Aureliano: > > How are you attempting to call xframe functions? > > On Mon, Nov 22, 2021 at 11:24 AM Aureliano Guedes < > guedes.aureli...@gmail.com> wrote: > >> Hi Clifton

Re: why not raku ?

2021-11-22 Thread Aureliano Guedes
D=~/.*::(\d+)/;seek(DATA,$1,0);print# Salve Joshua >> Nilsen >> getc DATA}$"="'};&{'";@_=unpack("C*",unpack("u*",':50,$'.#> > >> '3!=0"59,6!`%%P\0!1)46%!F.Q`%01,`'."\n"));eval "&{'@_'}"; __END__ is >> near! :) >> > -- Aureliano Guedes skype: aureliano.guedes contato: (11) 94292-6110 whatsapp +5511942926110

Re: why not raku ?

2021-11-22 Thread Aureliano Guedes
's as ambitious >>>> as Truffle/Graal/JVM, perhaps even more so. >>>> >>>> But it should and *will* be easy to get it a little at a time. >>>> >>>> But we're not there yet. >>>> >>>> There's a fairly obvious way to make it vas

Re: why not raku ?

2021-11-19 Thread Aureliano Guedes
developpers are legions on the market now so everyone >> choose this as an argument >> * we need more packages on raku.land >> * i really think technologies are massively adopted when they are >> packaged in main linux distros because lot of people don't want to >> bother compiling an interpreter or adding extra repos to do it. >> >> regards, >> marc >> > -- Aureliano Guedes skype: aureliano.guedes contato: (11) 94292-6110 whatsapp +5511942926110

Re: [naive] hash assingment

2021-07-14 Thread Aureliano Guedes
{'column1>'}==> map({.sqrt}); > > (Also, you may already know this, but when the keys of your hash are > strings, you > can write %a instead of %a{'column1'} ) > > Hope that helps! > > –codesections > -- Aureliano Guedes skype: aureliano.guedes contato: (11) 94292-6110 whatsapp +5511942926110

Re: [naive] hash assingment

2021-07-14 Thread Aureliano Guedes
not yet be referenced to create column3. > > You need to do that on another line: > > %a = %a.map: { .sqrt }; > > Which gives the following: > > > %a.gist.say > # {column1 => [1 2 3 4 5], column2 => [a b c d e], column3 => (1 > 1.4142135623730951 1.7320508075688772

Re: [naive] hash assingment

2021-07-14 Thread Aureliano Guedes
797749979) How I access the array's values within the hash? On Wed, Jul 14, 2021 at 2:55 PM Marcel Timmerman wrote: > On 7/14/21 7:43 PM, Aureliano Guedes wrote: > > Hi all, > > Trying to knowing a little bit more about Raku lang, I decided to write a > simple (as possible) lib to

[naive] hash assingment

2021-07-14 Thread Aureliano Guedes
']⏏} Now we got an error. Someone may explain me why I got this error?? Thanks in advance -- Aureliano Guedes skype: aureliano.guedes contato: (11) 94292-6110 whatsapp +5511942926110

Re: classes and objects questions

2020-12-14 Thread Aureliano Guedes
ng ".new"? > > Why are we using the syntax for a hash (=>)? > > And: > $!upper.x > > What is the rules and purpose for such? Why > the "!" and why the "."? > > > I do realize the documentation is not meant for > beginners, but rather a refresher for advanced > users that do not need it, but this link definitely > said "tutorial" -- fifth word in. > > Would some kind soul please fill in the missing > parts of the "tutorial" for me? > > Many thanks, > -T > -- Aureliano Guedes skype: aureliano.guedes contato: (11) 94292-6110 whatsapp +5511942926110

Re: The ,= operator

2020-12-07 Thread Aureliano Guedes
; You may want to `zef install Readline` or `zef install Linenoise` or use > rlwrap for a line editor > > To exit type 'exit' or '^D' > > my %hash = do for ^1 { %hash } > {} > > my %hash2 = do for ^1 { %hash2<> } > {} > > my %hash3 = do for ^1 { %hash3<*> } > Odd number of elements found where hash initializer expected: > Only saw 1 element > in block at line 1 > > > my @array = do for ^1 { @array } > (\Array_140587615723064 = [Array_140587615723064]) > > my @array2 = do for ^1 { @array2[] } > (\Array_140587615723904 = [Array_140587615723904]) > > my @array3 = do for ^1 { @array3[*] } > [()] > > Best Regards, Bill. > > -- Aureliano Guedes skype: aureliano.guedes contato: (11) 94292-6110 whatsapp +5511942926110

Re: Language Design: 'special casing' of split()? (i.e. .split performs concomitant .join? )

2020-10-14 Thread Aureliano Guedes
Oh, thanks, now it makes sense. On Wed, Oct 14, 2020 at 12:01 PM Brian Duggan wrote: > On Wednesday, October 14, Aureliano Guedes wrote: > > In this point, the unique weirdness I'd like to understand is why in Raku > > `@nums.log == 2.302585092994046e0`. I don't understand w

Re: Language Design: 'special casing' of split()? (i.e. .split performs concomitant .join? )

2020-10-14 Thread Aureliano Guedes
t 14, 2020 at 3:28 AM William Michels via perl6-users < perl6-users@perl.org> wrote: > On Mon, Oct 12, 2020 at 10:02 AM Larry Wall wrote: > > > > On Mon, Oct 12, 2020 at 01:14:09PM -0300, Aureliano Guedes wrote: > > : > This seems pretty convenient and intuitive. A

Re: Language Design: 'special casing' of split()? (i.e. .split performs concomitant .join? )

2020-10-12 Thread Aureliano Guedes
my @words = ; > my @nums = 0, π/2, 3 * π/2; > > say @words.split(','); > say @nums.sin; > > gives us > > ((a b) (c d)) > (0 1 -1) > > Brian > -- Aureliano Guedes skype: aureliano.guedes contato: (11) 94292-6110 whatsapp +5511942926110

Re: print particular lines question

2020-08-31 Thread Aureliano Guedes
Depends where in your code the $++ is. It may play as global or as local. raku -e 'for 1..3 {say $++}; say $++' On Mon, Aug 31, 2020 at 9:03 PM ToddAndMargo via perl6-users < perl6-users@perl.org> wrote: > > > adn > > fixed > -- Aureliano Guedes skype: aureliano.gue

Re: print particular lines question

2020-08-31 Thread Aureliano Guedes
>> >> Works beatifically! And no bash pipe! >> >> $ raku -ne '.say if $++ == 3|2|5' Lines.txt >> Line 2 >> Line 3 >> Line 5 >> >> What is `$++`? >> >> -T >> > -- Aureliano Guedes skype: aureliano.guedes contato: (11) 94292-6110 whatsapp +5511942926110

Re: 2020.07.02 just hit

2020-07-24 Thread Aureliano Guedes
which bug? On Fri, Jul 24, 2020 at 3:23 PM ToddAndMargo via perl6-users < perl6-users@perl.org> wrote: > GetRaku new update downloaded 2020.07 --> 2020.07.02 > > Uh Oh. They must have found a bug. Wonderful that > they are on top of things! > > :-) >

Re: Raku version of "The top 10 tricks of Perl one-liners" ?!?

2020-07-22 Thread Aureliano Guedes
t; > > >Using -M on the command line tells perl to load the given module > >before running your code. There are thousands of modules available > >on CPAN, numerous of them potentially useful in one-liners, but > >one of my favorite for one-liner use is Regexp::Common, which, as > >its name suggests, contains regular expressions to match numerous > >commonly-used pieces of data. > > > >The full set of regexes available in Regexp::Common is available > in > >its documentation, but here's an example of where I might use it: > > > >Neither the ifconfig nor the ip tool that is supposed to replace > it > >provide, as far as I know, an easy way of extracting information > for > >use by scripts. The ifdata program provides such an interface, but > >isn't installed everywhere. Using perl and Regexp::Common, > however, > >we can do a pretty decent job of extracing an IP from ips output: > > > >ip address list eth0 | \ > > perl -MRegexp::Common -lne 'print $1 if /($RE{net}{IPv4})/' > > I don't know if there's anything quite comparable. And who's to say > what's "common" anymore... Certainly we have -M. But Raku's regex > and grammars are so much more powerful that these things are likely to > kept in more specific Grammar modules anyway, or just hand-rolled for > the purpose on the spot. > > >~nelhage Join the discussion Comments ( 7 ) > > Larry > -- Aureliano Guedes skype: aureliano.guedes contato: (11) 94292-6110 whatsapp +5511942926110

Re: Baby steps to create a dataframe structure

2020-07-22 Thread Aureliano Guedes
the raw interface separately from the higher level one, > so you'll be able to use NativeCall internally and have the minimal set of > external code. > > [¹] libgsl has different functions for each data type. > > On Wed, Jul 22, 2020 at 1:42 AM Aureliano Guedes < > guedes.aureli

Re: 2020.07 just hit

2020-07-22 Thread Aureliano Guedes
the Unicode operators, ≡ and ≢ (though the > permutations speedup > is pretty cool too). > -- Aureliano Guedes skype: aureliano.guedes contato: (11) 94292-6110 whatsapp +5511942926110

Re: Baby steps to create a dataframe structure

2020-07-21 Thread Aureliano Guedes
I have had a lot of success with using CPAN's Perl modules with Raku > programs. > > Best regards, > > -Tom > > -- Aureliano Guedes skype: aureliano.guedes contato: (11) 94292-6110 whatsapp +5511942926110

Baby steps to create a dataframe structure

2020-07-21 Thread Aureliano Guedes
as: df.column1 and it should return a list of values on this column. Also, when it read the delim file it should check each column type. All suggestions are welcome. -- Aureliano Guedes skype: aureliano.guedes contato: (11) 94292-6110 whatsapp +5511942926110

Re: 2020.07 just hit

2020-07-21 Thread Aureliano Guedes
$ raku --version This is Rakudo version 2020.07 built on MoarVM version 2020.07 implementing Raku 6.d. Whats is new?? On Tue, Jul 21, 2020 at 6:21 PM ToddAndMargo via perl6-users < perl6-users@perl.org> wrote: > GetRaku new update downloaded 2020.06 --> 2020.07 > -- A

Re: I cannot install any lib with Zef

2020-07-20 Thread Aureliano Guedes
t passing tests, but continuing with > --force-test > ===> Installing: Digest::SHA256::Native:ver<0.03> > ===> Install [FAIL] for Digest::SHA256::Native:ver<0.03>: Failed to open > file > /home/acpguedes/.zef/store/Digest-SHA256-Native-0.03.tar.gz/Digest-SHA256-N

Re: doing an inner join via cross-product

2020-07-20 Thread Aureliano Guedes
ting unreadable: > > > > my %joined2 =| @results.map({ $_[0].keys => .map({ .values }).flat > }); > > > > In any case, the %joined structure feels more perlish, for > > example it's easier to use it to generate reports: > > > > for %joined.keys -> $key {

I cannot install any lib with Zef

2020-07-20 Thread Aureliano Guedes
suggestions? Thanks in advance -- Aureliano Guedes skype: aureliano.guedes contato: (11) 94292-6110 whatsapp +5511942926110

Re: perl streaming framework

2020-07-14 Thread Aureliano Guedes
egex matching. > > There are "spark streaming", "flink streaming", "storm streaming", and a > lot of others, but they don't support perl language well. > > So I expect the community, either perl6 or perl5, can make that a > framework. > > We can't lose the capability in big data, cloud computing, AI, ML, > streaming, these are the main features of current internet. > > Everyone today writes CGI with perl? NO. > > > > Thanks. > > > -- Aureliano Guedes skype: aureliano.guedes contato: (11) 94292-6110 whatsapp +5511942926110

Re: perl streaming framework

2020-07-14 Thread Aureliano Guedes
>>> page for them? >>> >>> 3. Can you link to some examples? >>> >>> 4. Do you mean something like http://pdl.perl.org/ (or numpy for >>> python)? >>> >>> >>> > Thank you. >>> >>> >>> >>> -- >>> >>> Shlomi Fish https://www.shlomifish.org/ >>> Why I Love Perl - https://shlom.in/joy-of-perl >>> >>> The reason the Messiah has not come yet, is because Chuck Norris keeps >>> finding >>> faults in God’s plan for his coming. >>> — https://www.shlomifish.org/humour/bits/facts/Chuck-Norris/ >>> >>> Please reply to list if it's a mailing list post - >>> https://shlom.in/reply . >>> >> -- Aureliano Guedes skype: aureliano.guedes contato: (11) 94292-6110 whatsapp +5511942926110

root cubic

2020-07-09 Thread Aureliano Guedes
if there are more details). That's why 0.2 + 0.1 == 0.3 in Raku returns True whilst in other languages like Python, Perl5, and Ruby return False. Then, I was just playing around and I'd like to check if it is expected. Thanks -- Aureliano Guedes skype: aureliano.guedes contato: (11) 94292-6110

Re: why so different

2020-06-22 Thread Aureliano Guedes
Thanks again. I'm trying to get proficiency in Raku by converting some Python programs mine in Raku. On Mon, Jun 22, 2020 at 6:41 PM Tobias Boege wrote: > On Mon, 22 Jun 2020, Aureliano Guedes wrote: > > Thank you for the clarification. > > > > There is a method

Re: why so different

2020-06-22 Thread Aureliano Guedes
Thank you for the clarification. There is a method to set Rat precision at the scope of the program to apply to all *.Rat() cases? On Mon, Jun 22, 2020 at 5:57 PM Tobias Boege wrote: > On Mon, 22 Jun 2020, Aureliano Guedes wrote: > > Hi all, > > > > First, I'm naive i

why so different

2020-06-22 Thread Aureliano Guedes
nderstand the Num actually have the traditional behavior which leads this: 0.1.Num() + 0.2.Num() != 0.3.Num() And Rat is awesome cos deal nice to the real world. Anyway, I do not expect so different results between Rat and Num. Thanks, Aureliano Guedes -- Aureliano Guedes skype: aureliano.guede

Re: just curious to know

2020-06-14 Thread Aureliano Guedes
the special things in perl 6, > then Rust and Go (so special in both concurrency and parallelism) are > already spreading its wings over the information technology field. Both > are statically typed and compiled languages and there would be more > "welcome gesture" for these languages in the field. > > > > To put my question simply, where is the space for perl 6 in today's > technology? > > Please enlighten me (any body from user group) on this. > > > > Thank you, > > > > Regards, > > Radhakrishnan > -- Aureliano Guedes skype: aureliano.guedes contato: (11) 94292-6110 whatsapp +5511942926110

Re: bash "."?

2020-05-13 Thread Aureliano Guedes
CTL=yes > DELAY=0 > NM_CONTROLLED=yes > BOOTPROTO=none > PREFIX=24 > ... > > Many thanks, > -T > -- Aureliano Guedes skype: aureliano.guedes contato: (11) 94292-6110 whatsapp +5511942926110

Re: perl6 vs ruby

2020-03-05 Thread Aureliano Guedes
> > > 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? > -- Aureliano Guedes skype: aureliano.guedes contato: (11) 94292-6110 whatsapp +5511942926110

Re: variable as subroutine?

2020-02-12 Thread Aureliano Guedes
Thank for sharing, I'll watch right now On Wed, Feb 12, 2020 at 4:28 PM William Michels wrote: > > > On Wed, Feb 12, 2020 at 8:12 AM Aureliano Guedes < > guedes.aureli...@gmail.com> wrote: > >> >> >> On Wed, Feb 12, 2020 at 1:09 PM Andy Bach >>

Re: variable as subroutine?

2020-02-12 Thread Aureliano Guedes
t; as @a - raku doesn't swap sigils, so arrays always use @ even when they're > being dereferenced (?) to a single element - unlike Perl5 > Now I see. I din't know that. Thanks. I must study better Raku. > -- > *From:* Aureliano Guedes > *Sent:* Tuesday, Febru

Re: Metamethods: WHERE

2020-02-12 Thread Aureliano Guedes
20 at 10:27:20AM -0300, Aureliano Guedes wrote: > > So, I'd like to find a way to test if two variables are bound or not, > > especially concerning their memory address. > > > > If the address is not fixed for a lifetime, I must be able to test it in > > just one cy

Re: Metamethods: WHERE

2020-02-12 Thread Aureliano Guedes
$a =:= $b; # False > > my $c := $b; > say $b =:= $c; # True > > On Wed, Feb 12, 2020 at 7:27 AM Aureliano Guedes < > guedes.aureli...@gmail.com> wrote: > >> Thank you. >> >> So, I'd like to find a way to test if two variables are bound or not, >

Re: Metamethods: WHERE

2020-02-12 Thread Aureliano Guedes
ote: > > > > On 12 Feb 2020, at 13:44, Aureliano Guedes > wrote: > > > > What "WHERE" should return? > > > > I was trying to find a method to return the memory address of some data. > > Then I find the WHERE statement. > > https://rosettacode.org/wiki/

Metamethods: WHERE

2020-02-12 Thread Aureliano Guedes
$b = 4; 4 > $c 4 > $c = 5 5 > $b 5 > $a.WHERE 94576802723392 > $b.WHERE 94576802723352 > $c.WHERE 94576802723352 > $b = 4 # back to same $a value 4 > $c 4 > $a.WHERE 94576802723392 > $c.WHERE 94576802723392 > $b.WHERE 94576802723392 -- Aureliano Guedes

Re: variable as subroutine?

2020-02-11 Thread Aureliano Guedes
ls anymore, so it should be > @a[0](2) > > maybe, pass the param, to the first bucket in @a which is holding a sub, > so run it - works here > > my @a = * **2; > [{ ... }] > > say @a[0](4); > 16 > > as does ".()" > > say @a[0].(5); > 25 > ---

Re: perl6 with XS

2020-02-03 Thread Aureliano Guedes
Also, this is amazing: https://docs.raku.org/language/nativecall#sub_nativecast On Mon, Feb 3, 2020 at 8:32 AM Aureliano Guedes wrote: > This is nice. > Sorry for my ignorance but what is the advantage in use CArray instead of > a usual raku array? > https://docs.raku.org/languag

Re: perl6 with XS

2020-02-03 Thread Aureliano Guedes
nguage/nativecall > which is what you use instead. -- Darren Duncan > > On 2020-02-02 6:36 p.m., wes park wrote: > > HI > > > > In perl5 we can use the underline C library for example JSON C with XS > interface. > > In perl6 how can we implement it? > > &

Re: My keeper on hashes

2020-01-15 Thread Aureliano Guedes
native value types for hashes not yet implemented. Sorry. > >> > > On 2020-01-15 18:27, yary wrote: > > Capital I in Int, to not use native type > > > >> my Int %h = A => 123 > > > > {A => 123} > > > > > > -y > > Hi Yary, > > Updated and awesome! Thank you! > > Is Int > > https://docs.raku.org/type/Int > Int objects store integral numbers of arbitrary size > > one of those "Magic" variables that is unbounded, meaning > I can have a 1024 bit integer if I choose? > > -T > -- Aureliano Guedes skype: aureliano.guedes contato: (11) 94292-6110 whatsapp +5511942926110

Re: Bug to report: cardinal called an integer

2020-01-13 Thread Aureliano Guedes
can later modify it to use more tailor made type > as necessary, but Int is always going to be the safest bet. > > Hope this helps you. > > [1] I never use unsigned variants of integers where arithmetic may be > involved do to overflow and use variants of signed integers instead &

Re: Bug to report: cardinal called an integer

2020-01-13 Thread Aureliano Guedes
tences, but ALL native > > types are constrained by a certain number of bits. > > > Hi Paul, > > For those of you who were no privy to Paul and my > offline discussion, he must have wrote me 10 > times trying to explain things to me before > I got it. He is a real mensch. > > 30 seconds! Yikes! I never found it. > > https://docs.raku.org/type/UInt > should have stated that directly, but did not. > > And to add injury, > > https://docs.raku.org/language/nativetypes > "Raku offers a set of /native/ types with a fixed, > and known, representation in memory" > > Did not state who they were. Sort of like when I > want the salt, I always reach for the pepper! > > The state of the documentation drives me ... > > AAHH! > > -T > -- Aureliano Guedes skype: aureliano.guedes contato: (11) 94292-6110 whatsapp +5511942926110

Re: Variable character class

2019-09-07 Thread Aureliano Guedes
ing a character class via a variable. > >> >> > >> >> Perl 5: > >> >> sub matching_chars { > >> >> (my $chars_to_match, local $_) = @_; > >> >> /([$chars_to_match]+)/ > >> >> } > >> >> > >> >> say matching_chars('24680', '19584203'); # says 8420 > >> >> say matching_chars('+\/\]\[', 'Apple ][+//e'); # says ][+// > >> >> > >> >> Perl 6: > >> >> sub matching_chars(Str $chars_to_match, Str $_) { > >> >> # warnings, treats as string not variable > >> >> m/<[$chars_to_match]>/; > >> >> } > >> >> > >> >> How do I get Perl 6 to interpret a variable in the contents of a > character class? > >> >> From http://docs.perl6.org/language/regexes#Regex_interpolation I'd > think that Rakudo would use the literal contents of $chars_to_match, > instead it's using the literal chars "$ c h a r s _ t o _ m a t c h" and > warning about repeated c, underscore, etc. > >> >> > >> >> -y > >> > > >> > > >> > > >> > -- > >> > __ > >> > > >> > :(){ :|:& };: > -- Aureliano Guedes skype: aureliano.guedes contato: (11) 94292-6110 whatsapp +5511942926110

Re: perl6-regex: retaining $/.pos after an unsuccesful match without a temporary variable?

2019-08-18 Thread Aureliano Guedes
t >> of the 'c' modifier in Perl 6? >> die unless $test =~ /\Gbar/g; >> >> say pos $test; # yields "13" >> >> I managed to translate such code in Perl 6, by using the "m:p/.../" >> regex, >> >> When I anticipate an unsuccessful match then I must temporarily store >> $/.pos and provide it to the next regex (e.g. "m:p($P)//"), so it seems, >> >> That works but it riddles my current solutions with "$P = $/.pos;" >> assignments. >> >> Is there a way to retain this match like in Perl 5? >> >> Is there a better way in general? >> >> ... perhaps it's time to look into grammars? ;) >> >> Thanks! >> >> Regards, >> >> Raymond Dresens. >> >> >> >> >> >> -- Aureliano Guedes skype: aureliano.guedes contato: (11) 94292-6110 whatsapp +5511942926110