Post Reply 
Easy as { 1 2 3 }? (when { 1 2 3 } ≠ { 1 2 3 })
07-16-2018, 04:25 AM (This post was last modified: 07-16-2018 04:25 AM by Claudio L..)
Post: #11
RE: Easy as { 1 2 3 }?
(07-15-2018 06:07 PM)DavidM Wrote:  
(07-15-2018 05:54 PM)Claudio L. Wrote:  4) Switch to newRPL, forget about this mess and relax....

I figured you'd have that reaction, Claudio. Smile

I'm not joking, you are fighting to fix a system that is almost impossible to fix (I did succesfully modify the ROM back in the day to allow direct execution of C code, it was really hard so I know what you are facing). I feel your time and skills would be better spent on a system that CAN be fixed to your specs (that's the beauty of open source), hence I wanted to remind you you have a 4th option: come help with newRPL instead!
I like what you did with the List processing library, many of those commands should've been in the ROM to begin with, and probably should be in newRPL too.
You seem to have good ideas to either detect and fix "glitches" in the old system, or improve/expand the system, which is "by definition" the sole purpose of newRPL.

BTW, newRPL does your { 1 2 3 } problem this way (for the interested):
In my head, SAME refers to whether two things are identical or not, while == is more of a mathematical operator, between objects that have some definition of equality.
Both are overloadable operators, so each object type defines how to behave (including cross-type operations).
For most objects, SAME and == are equivalent, but for lists SAME always refers to the whole object, while == does list processing like most other operators, returning a list with the result of applying the operator to the elements.
SAME applies the operator SAME recursively on each object of the list (better than a binary comparison, though object handlers are free to implement SAME as a binary data comparison), it returns a single true/false if all elements in the list are the SAME.

{ 1 2 3 } DUP 2 * 2 / SAME ---> 1
{ 1 2 3 } { (1,0) 2 3 } SAME ---> 1 (because 1 (1,0) SAME is true in newRPL)

== works element by element, recursively if needed be. It returns a list (or list of lists) with true/false elements.

{ 1 2 3 } DUP 2 * 2 / == ---> { 1 1 1 }

Other composites behave different. For example a program defines SAME in a similar way to lists, but there's no equality between programs, the == operator is not defined so it throws an error.

It may be debatable, but at least this behavior is very consistent throughout newRPL.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Easy as { 1 2 3 }? - Joe Horn - 07-15-2018, 12:52 AM
RE: Easy as { 1 2 3 }? - DavidM - 07-15-2018, 01:41 AM
RE: Easy as { 1 2 3 }? - Joe Horn - 07-15-2018, 04:12 AM
RE: Easy as { 1 2 3 }? - DavidM - 07-15-2018, 04:52 AM
RE: Easy as { 1 2 3 }? - Claudio L. - 07-15-2018, 05:54 PM
RE: Easy as { 1 2 3 }? - DavidM - 07-15-2018, 06:07 PM
RE: Easy as { 1 2 3 }? - Claudio L. - 07-16-2018 04:25 AM
RE: Easy as { 1 2 3 }? - DavidM - 07-17-2018, 03:05 AM
RE: Easy as { 1 2 3 }? - rprosperi - 07-17-2018, 03:26 AM
RE: Easy as { 1 2 3 }? - DavidM - 07-17-2018, 03:31 AM
RE: Easy as { 1 2 3 }? - Massimo Gnerucci - 07-17-2018, 06:33 AM
RE: Easy as { 1 2 3 }? - John Keith - 07-17-2018, 12:32 PM
RE: Easy as { 1 2 3 }? - Massimo Gnerucci - 07-17-2018, 02:11 PM
RE: Easy as { 1 2 3 }? - John Keith - 07-17-2018, 08:49 PM
RE: Easy as { 1 2 3 }? - John Keith - 07-15-2018, 01:01 PM
RE: Easy as { 1 2 3 }? - Dave Britten - 07-15-2018, 02:38 PM
RE: Easy as { 1 2 3 }? - DavidM - 07-15-2018, 05:21 PM
RE: Easy as { 1 2 3 }? - Eddie W. Shore - 07-17-2018, 12:43 PM
RE: Easy as { 1 2 3 }? - rprosperi - 07-17-2018, 01:06 PM
RE: Easy as { 1 2 3 }? - DavidM - 07-17-2018, 01:41 PM
RE: Easy as { 1 2 3 }? - John Keith - 07-17-2018, 08:42 PM
RE: Easy as { 1 2 3 }? - ttw - 07-17-2018, 04:00 PM
RE: Easy as { 1 2 3 }? - BartDB - 07-17-2018, 04:51 PM
RE: Easy as { 1 2 3 }? - pier4r - 08-07-2018, 04:07 PM



User(s) browsing this thread: 1 Guest(s)