Post Reply 
newRPL - build 1089 released! [update:build 1158]
02-18-2019, 08:21 PM
Post: #381
RE: newRPL - build 1089 released! [update:build 1158]
I did some more thinking on list variants, I thought I'd share. Think of this as a speculative dream, not a list of demands. Smile

First, any list can be converted into "multiset" format. I'm not sure how this should be displayed, but mechanically it's basically two lists: One of elements, one of their multiplicities. ADDing two multiset lists would just add the multiplicities for elements they have in common. A new UNION command would instead take the MAX of the two multiplicities. INTERSECT (or some shorter name) would take their MIN instead. SSUB (set subtraction) would subtract the multiplicities, treating negative numbers as zero. (Naturally, a multiplicity of zero means being removed from the list.)

(I've actually coded a version of set subtraction for regular lists in oldRPL. It has all sorts of unexpected uses!)

There would be a command to split a multiset into two regular lists, one of elements and one of multiplicities. Also one to retrieve the multiplicity of a given element.

(Incidentally, if multisets exist, they would be the natural way for FACTORS to output.)

Sets would then just be multiset lists in which the multiplicities would be constrained to be at most one.

I think multisets are actually more useful than sets, though harder to get working. You can immediately convert a multiset into a set by setting all multiplicities to 1.

The question remains how multisets should respond to operations like '+' and '*'. I'm honestly not sure yet.
Find all posts by this user
Quote this message in a reply
02-18-2019, 11:40 PM
Post: #382
RE: newRPL - build 1089 released! [update:build 1158]
Aha, thoughts converging into something.
The dictionary-lists or lua tables would allow you to assign a multiplicity to a numeric key, so it's a good container for what you want to achieve with multi sets. From there it's just a matter of defining sets commands to do the operations. Not sure about using overloadable operators (to keep the tables generic), but specific commands would work (much like it works now for binary integers, BADD, BSUB, etc operating over an existing generic type).
Find all posts by this user
Quote this message in a reply
02-19-2019, 02:04 AM (This post was last modified: 02-19-2019 02:09 AM by The Shadow.)
Post: #383
RE: newRPL - build 1089 released! [update:build 1158]
Is there any easy way to retrieve a list of the numeric keys? I'm not familiar with Lua.
Find all posts by this user
Quote this message in a reply
02-19-2019, 06:58 PM (This post was last modified: 02-19-2019 06:58 PM by Claudio L..)
Post: #384
RE: newRPL - build 1089 released! [update:build 1158]
(02-19-2019 02:04 AM)The Shadow Wrote:  Is there any easy way to retrieve a list of the numeric keys? I'm not familiar with Lua.

A bit off topic but yes, there's a function pairs() that iterates over all key/value pairs, and there's ipairs() that iterates over numeric keys only.
But I was talking about the object itself, not necessarily how Lua interacts with it. It's a generic container with key/value pairs, much like directories are in RPL, except the key can be any object, not just idents.
Find all posts by this user
Quote this message in a reply
02-20-2019, 04:17 PM
Post: #385
RE: newRPL - build 1089 released! [update:build 1158]
All ROMs were updated to 1177.

All crashes from 1171 should (hopefully) be fixed. Other glitches are still there, like the rule for sqrt(-3) wasn't fixed.
At least shouldn't crash, allowing people to test and experiment.

BTW, the ROM size is pushing 1002 kbytes, very close to the 1024 kbyte limit of the 39gs and 40g. After we reach the limit, some things will need to be trimmed down on those platforms unfortunately.
Find all posts by this user
Quote this message in a reply
03-02-2019, 08:25 PM
Post: #386
RE: newRPL - build 1089 released! [update:build 1158]
All ROMs updated to build 1180 (well, not all of them, just the ROMs but not the android version, for now).

* I fixed an infinite loop when using more than one expansive variables '.XX' in rules (I had the code in place to break the infinite loop, but the decision had the logic inverted... oh well, it's fixed now).
* Improved the rule set of AUTOSIMPLIFY to keep polynomials better.
* Changed the base assumption of variables to be "Finite real" or "Finite complex", depending on complex mode flag, when no attributes are explicitly given.

Should make a little more sense now (writing rules is hard).
Find all posts by this user
Quote this message in a reply
03-03-2019, 06:33 PM (This post was last modified: 03-03-2019 06:33 PM by The Shadow.)
Post: #387
RE: newRPL - build 1089 released! [update:build 1158]
Sounds great! Unfortunately I probably won't have time to test today, but I look forward to it!

By the way, what's the status of the rule conditions?
Find all posts by this user
Quote this message in a reply
03-03-2019, 07:00 PM
Post: #388
RE: newRPL - build 1089 released! [update:build 1158]
(03-03-2019 06:33 PM)The Shadow Wrote:  Sounds great! Unfortunately I probably won't have time to test today, but I look forward to it!

By the way, what's the status of the rule conditions?

The status is "not yet implemented". I took a short break from this symbolic engine, it's getting boring after a while. So I'm developing my very own compression algorithm for no reason at all, and it won't be better than all the available algorithms, in fact it will compress less and be very slow, but fun to code and test. Like when food critics need to cleanse their palates before they keep working, I need a mind cleansing, then I'll be back at newRPL and its complexity.
Find all posts by this user
Quote this message in a reply
03-03-2019, 09:34 PM
Post: #389
RE: newRPL - build 1089 released! [update:build 1158]
(03-03-2019 07:00 PM)Claudio L. Wrote:  
(03-03-2019 06:33 PM)The Shadow Wrote:  Sounds great! Unfortunately I probably won't have time to test today, but I look forward to it!

By the way, what's the status of the rule conditions?

The status is "not yet implemented". I took a short break from this symbolic engine, it's getting boring after a while. So I'm developing my very own compression algorithm for no reason at all, and it won't be better than all the available algorithms, in fact it will compress less and be very slow, but fun to code and test. Like when food critics need to cleanse their palates before they keep working, I need a mind cleansing, then I'll be back at newRPL and its complexity.

Understood, have a good time! Do you want me to refrain from bringing up any issues I may find for the next few weeks?

I really appreciate all the work you've done on newRPL.
Find all posts by this user
Quote this message in a reply
03-05-2019, 01:58 PM
Post: #390
RE: newRPL - build 1089 released! [update:build 1158]
(03-03-2019 09:34 PM)The Shadow Wrote:  Understood, have a good time! Do you want me to refrain from bringing up any issues I may find for the next few weeks?

Feel free to bring in new ideas, issues and discussions. It's the only part that makes it "not so boring", and seeing people interested pushes me to keep coming back to it. I wasn't going to have a CAS, for example, but once I got into how to implement the basic algebraic manipulation commands in the 50g, I had to implement a proper rules engine. It's all a "why not?", but when the code gets too complex it can drain your energy very quickly (and your spare time).
Find all posts by this user
Quote this message in a reply
03-08-2019, 07:20 PM
Post: #391
RE: newRPL - build 1089 released! [update:build 1158]
(03-05-2019 01:58 PM)Claudio L. Wrote:  but when the code gets too complex it can drain your energy very quickly (and your spare time).

This should be one of the maxim that everyone doing a non trivial project (not paid) should know.

Wikis are great, Contribute :)
Find all posts by this user
Quote this message in a reply
Post Reply 




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