Dear Brad,
Thank you so much for taking the time to reply!
I wrote a few notes inline, below:
On Sat, Oct 10, 2020 at 4:07 PM Brad Gilbert wrote:
>
> Functions in Raku tend to have one job and one job only.
>
> `split` splits a string.
>
> So if you call `split` on something that is not a string
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 where this value
> >
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 where this value
> comes from.
This comes from the length of the array; the array is coerced into a numeric
I'd like to help with my 2 cents.
Given your comparison with R, sum, and mean are expected to play with a
vector rather than log and sin are expected to play with single numbers.
Then, the expected behavior for numerics types in Raku still the same as in
R. The difference is only that the
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. At least, it is possible
> : > to mimic that behavior in Raku:
> : >
> : > List.^find_method('split').wrap: {
Here's another way of phrasing these answers-
Some routines like "join" operate on strings, and thus coerce their
argument to a string.
Some routines like "sin" operate on numbers, and thus coerce their argument
to a number.
Each class defines how it coerces to Str or Num, regardless of what is
On Sat, Oct 10, 2020 at 4:49 PM Tobias Boege wrote:
> On Sun, 11 Oct 2020, Tobias Boege wrote:
> > On Sat, 10 Oct 2020, William Michels via perl6-users wrote:
> > > then proceed to process the function call. As it is my understanding
> that
> > > Raku incorporates a lot of different programming
Thank you Timo for the favor of a reply!
On Sat, Oct 10, 2020 at 3:35 PM Timo Paulssen wrote:
> On 10/10/2020 23:21, William Michels via perl6-users wrote:
> > So I guess the first question I have is whether the 'auto-joining' of
> > array elements is specc'ed or not.
> >
> > What you seem to
On Mon, Oct 12, 2020 at 6:02 AM Brian Duggan wrote:
> On Saturday, October 10, William Michels via perl6-users wrote:
> > I can point to the (functional) R-programming language to show what
> happens
> > there. When manipulating "array-like" (i.e. vector) objects in R, you can
> > do nested
Thank you, Joe, for taking the time to write such a cogent reply. And
thanks to Tobias and everyone else who has taken the time to reply to my
questions.
On Sat, Oct 10, 2020 at 3:38 PM Joseph Brenner wrote:
> William Michels wrote:
>
> >I actually wondered where the different programming
On Mon, Oct 12, 2020 at 01:14:09PM -0300, Aureliano Guedes wrote:
: > This seems pretty convenient and intuitive. At least, it is possible
: > to mimic that behavior in Raku:
: >
: > List.^find_method('split').wrap: { $^a.map: *.split($^b) }
: > List.^find_method('sin').wrap:
These behave like overwriting
> List.^find_method('split').wrap: { $^a.map: *.split($^b) }
> List.^find_method('sin').wrap: *.map: *.sin;
>
but they don't have to, since Aureliano started with "wrap" they can be
actual wrappers:
sub map-over-arg(\A) {my =nextcallee; A.map:{nextone $_}}
On Mon, Oct 12, 2020 at 10:03 AM Brian Duggan wrote:
> On Saturday, October 10, William Michels via perl6-users wrote:
> > I can point to the (functional) R-programming language to show what
> happens
> > there. When manipulating "array-like" (i.e. vector) objects in R, you can
> > do nested
On Saturday, October 10, William Michels via perl6-users wrote:
> I can point to the (functional) R-programming language to show what happens
> there. When manipulating "array-like" (i.e. vector) objects in R, you can
> do nested function calls, or sequential (piped) function calls, and still
>
On Sun, 11 Oct 2020, Tobias Boege wrote:
> On Sat, 10 Oct 2020, William Michels via perl6-users wrote:
> > then proceed to process the function call. As it is my understanding that
> > Raku incorporates a lot of different programming paradigms (imperative,
> > object-oriented, functional, etc.),
On Sat, 10 Oct 2020, William Michels via perl6-users wrote:
> So I guess the first question I have is whether the 'auto-joining' of array
> elements is specc'ed or not.
>
I did not find anything that explicitly requires @array.split() to force
@array into a string, but there are tests in
Functions in Raku tend to have one job and one job only.
`split` splits a string.
So if you call `split` on something that is not a string it gets turned
into one if it can.
This happens for most functions.
Having `split` be the only function that auto-vectorizes against an array
would be very
William Michels wrote:
>I actually wondered where the different programming paradigms
>would be delineated
I think were the present topic has to do more with the
strong/weak/gradual typing debates-- here Raku is doing an
automatic type conversion that a "strong-typing" fanatic
would sneer at.
On 10/10/2020 23:21, William Michels via perl6-users wrote:
> So I guess the first question I have is whether the 'auto-joining' of
> array elements is specc'ed or not.
>
> What you seem to be saying is that when calling a function on an
> array, the first response is for Raku to call something
So I guess the first question I have is whether the 'auto-joining' of array
elements is specc'ed or not.
What you seem to be saying is that when calling a function on an array, the
first response is for Raku to call something similar to 'cat' on the array,
then proceed to process the function
On Tue, 06 Oct 2020, William Michels via perl6-users wrote:
> [...]
>
> So my question regards "special-casing" of split/join in Raku. Is the first
> result on comma-delimited data the default, i.e. joining disparate elements
> of an array together head-to-tail? Or is the second result on
>
21 matches
Mail list logo