To Do

To Do

PostPosted by forummaster » Thu Jan 15, 2009 2:04 pm

My wish list for new datatypes includes


forummaster
 
Posts: 567
Joined: Wed Jan 23, 2013 1:00 pm

To Do

PostPosted by miquel » Thu Mar 26, 2009 5:35 pm

May I suggest the symbol datatype like in A+ or NIAL ?

miquel
 
Posts: 8
Joined: Fri Mar 20, 2009 1:09 pm

To Do

PostPosted by forummaster » Tue Mar 31, 2009 10:59 am

{7.62}miquel wrote:
{7.62}miquel wrote:

May I suggest the symbol datatype like in A+ or NIAL ?

If I understand the A+ type, it provides "by reference" vs. "by value". I couldn't find the corresponding information about Nial, though.

NARS2000 already implements reference counts on arrays, so a symbol type would be useful when changing the value so all other references to the same symbol are updated at the same time. Do you have any other applications?
forummaster
 
Posts: 567
Joined: Wed Jan 23, 2013 1:00 pm

To Do

PostPosted by miquel » Wed Apr 22, 2009 5:14 pm

You are probably right for A+ but in fact in other APL implementations of symbol data, the signification is quite different. It is a scalar litteral quite different of a string which is represented in APL by a rank 1 array.

In Nial they call the same concept as a "phrase" whose description is:

A phrase is an atom of literal information in which a sequence of characters is taken as a unit. Phrases are used in
the place of character strings when the internal structure of the string does not need to be manipulated. Constant
phrases are denoted in Nial text by placing the double quote symbol ( " ) before the sequence of characters. Phrases
may also be constructed by applying the operation phrase to a character string.

In APL90 a symbol was prefixed by a grave accent: `symbol.

Ruby uses :symbol for the same thing. ANd I think that they are equivalent entities in Smalltalk.

This datatype is useful for representing names not for long texts. And we can think that name of constants, variables, functions are symbols associated with a value by means of a so called "symbol table".

But the greatest possible use of such a datatype is "symbolic computation" (in contrast with "evaluation").
miquel
 
Posts: 8
Joined: Fri Mar 20, 2009 1:09 pm

To Do

PostPosted by forummaster » Thu Apr 23, 2009 2:03 pm

{7.64}miquel wrote:
{7.64}miquel wrote:
[...]
This datatype is useful for representing names not for long texts. And we can think that name of constants, variables, functions are symbols associated with a value by means of a so called "symbol table".

But the greatest possible use of such a datatype is "symbolic computation" (in contrast with "evaluation").

Good point -- I like the idea of symbolic computation and hadn't thought of using is in that context. Thanks for the idea!
forummaster
 
Posts: 567
Joined: Wed Jan 23, 2013 1:00 pm

To Do

PostPosted by APLn00b » Thu Oct 01, 2009 3:25 am

As for implementing bignums (arbitrary-length integers):


Bignum arithmetic is just polynomial arithmetic plus a carry phase.

APLn00b
 
Posts: 1
Joined: Thu Oct 01, 2009 3:06 am


Return to New Datatypes

Who is online

Users browsing this forum: No registered users and 1 guest