Talk:Ivy: Difference between revisions

From APL Wiki
Jump to navigation Jump to search
(Discussion of array model)
 
Line 2: Line 2:


I've marked Ivy as flat, because it's clearly not intended for computation on nested arrays. The examples and tests only ever show flat arrays, and nested arrays, when created, are often not formatted correctly. However, it's possible to create a nested array with an expression such as <code>,\ iota 4</code> or <code>"abc" o., "de"</code>. I think this is because the implementation has dedicated types for numbers and characters, but these aren't kept separate from the array types vector (rank 1) and matrix (arbitrary rank). So more accurately the current implementation of Ivy might be considered a [[based array model|based]] or [[nested array model|nested]] language that opens scalars (including non-simple ones) whenever they show up. That's confusing and probably not really the creator's intent, so I'm only mentioning it here. [[User:Marshall|Marshall]] ([[User talk:Marshall|talk]]) 19:50, 5 February 2021 (UTC)
I've marked Ivy as flat, because it's clearly not intended for computation on nested arrays. The examples and tests only ever show flat arrays, and nested arrays, when created, are often not formatted correctly. However, it's possible to create a nested array with an expression such as <code>,\ iota 4</code> or <code>"abc" o., "de"</code>. I think this is because the implementation has dedicated types for numbers and characters, but these aren't kept separate from the array types vector (rank 1) and matrix (arbitrary rank). So more accurately the current implementation of Ivy might be considered a [[based array model|based]] or [[nested array model|nested]] language that opens scalars (including non-simple ones) whenever they show up. That's confusing and probably not really the creator's intent, so I'm only mentioning it here. [[User:Marshall|Marshall]] ([[User talk:Marshall|talk]]) 19:50, 5 February 2021 (UTC)
== Features - recursion ==
Not sure it can be said that ivy has no recursion.
<source>
op fact x = x<=1: 1; x*fact(x-1)
fact 5
120
</source>
Regards, —[[User:Mykhal|Mykhal]] ([[User talk:Mykhal|talk]]) 12:40, 16 December 2022 (UTC)

Revision as of 12:40, 16 December 2022

Array model

I've marked Ivy as flat, because it's clearly not intended for computation on nested arrays. The examples and tests only ever show flat arrays, and nested arrays, when created, are often not formatted correctly. However, it's possible to create a nested array with an expression such as ,\ iota 4 or "abc" o., "de". I think this is because the implementation has dedicated types for numbers and characters, but these aren't kept separate from the array types vector (rank 1) and matrix (arbitrary rank). So more accurately the current implementation of Ivy might be considered a based or nested language that opens scalars (including non-simple ones) whenever they show up. That's confusing and probably not really the creator's intent, so I'm only mentioning it here. Marshall (talk) 19:50, 5 February 2021 (UTC)

Features - recursion

Not sure it can be said that ivy has no recursion.

op fact x = x<=1: 1; x*fact(x-1)

fact 5
120

Regards, —Mykhal (talk) 12:40, 16 December 2022 (UTC)