Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LOADB/SAVEB woes #500

Open
jkotlinski opened this issue Dec 27, 2022 · 9 comments
Open

LOADB/SAVEB woes #500

jkotlinski opened this issue Dec 27, 2022 · 9 comments

Comments

@jkotlinski
Copy link
Owner

jkotlinski commented Dec 27, 2022

Back in 2009, LOADB/SAVEB got their names because "LOAD" was already in use.

Since "LOAD" is now unused, I think it would make sense to rename "LOADB"/"SAVEB" to simply "LOAD"/"SAVE" (or, possibly, "LOAD-FILE"/"SAVE-FILE").

@jkotlinski
Copy link
Owner Author

On more thought. Maybe "LOAD" is not that great, it is normally used for Block loading, so there is some risk of conflict or confusion.

SuperForth64 uses "LOADRAM" and "SAVENAME + SAVE".

ultraFORTH83 uses "BLOAD"/"BSAVE".

More investigation to follow...

@Whammo
Copy link
Collaborator

Whammo commented Dec 29, 2022

Something Unix-ish, like maybe READ WRITE.
Jonesforth was no help.

@jkotlinski
Copy link
Owner Author

I like LOAD-FILE/SAVE-FILE best, because this naming is similar to Forth Standard words (OPEN-FILE, CLOSE-FILE, ...) but it is unclear if it is worth a breaking change...

@Whammo
Copy link
Collaborator

Whammo commented Jan 13, 2023

Maybe they should be hidden and we can offer LOAD and SAVE in io.fs?

@ekipan
Copy link
Contributor

ekipan commented Apr 20, 2023

Something Unix-ish, like maybe READ WRITE.

If I understand correctly, unlike standard read-file and write-file, loadb and saveb do the whole file instead of following a seek pointer (Edit: so these names are probably not the best).

Does the "binary data" mentioned in the manual mean "PRG file" (another thing I don't know about)? If so how about load-prg and save-prg?

@jkotlinski
Copy link
Owner Author

I think "binary data" is nonsense, you are right in that it reads whole .prg files. Maybe load-prg/save-prg is good.

@jkotlinski
Copy link
Owner Author

Another gripe about saveb. The range is given as start address + end address. In Forth, it is nearly always start address + length.

@jkotlinski
Copy link
Owner Author

Yet another confusing thing... loadb takes first filename, then data address. saveb takes first data address, then filename. It is set up for mistakes.

@Whammo
Copy link
Collaborator

Whammo commented Apr 28, 2023

v Likes things a certain way.

@jkotlinski jkotlinski changed the title Rename LOADB/SAVEB LOADB/SAVEB woes Apr 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants