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

Enhancement request - add r@ word #9

Closed
ghost opened this issue Jan 2, 2017 · 5 comments
Closed

Enhancement request - add r@ word #9

ghost opened this issue Jan 2, 2017 · 5 comments

Comments

@ghost
Copy link

ghost commented Jan 2, 2017

I seem to use this word often

@zeroflag
Copy link
Owner

zeroflag commented Jan 2, 2017

r@ is like rp@ @ ?

@ghost
Copy link
Author

ghost commented Jan 2, 2017 via email

@zeroflag
Copy link
Owner

zeroflag commented Jan 2, 2017

Ok. Do you need it for convenience or performance reasons? Currently we have about 35 essential primitives and I'd like to keep this number as low as possible because of portability reasons. An other reason I wouldn't implement this as a primitive because a future plan is to add some treeshaking or dead code elimination tool which would remove all the words from the uber.forth which are not used. And a primitive cannot be removed by this technique because they are compiled into the binary. The heap size on the esp is 24k and it's quite a limiting factor, you can quickly fill it up by loading 3-4 modules and defining some new words.

Implenting this as a word is doable (there will be already a return address on the rstack and the real value is below that) but it would be slower.

@ghost
Copy link
Author

ghost commented Jan 2, 2017 via email

zeroflag pushed a commit that referenced this issue Jan 29, 2017
zeroflag pushed a commit that referenced this issue Jan 29, 2017
zeroflag pushed a commit that referenced this issue Jan 29, 2017
@zeroflag
Copy link
Owner

I added r@ to ext.S. This contains the nonessential primitives and some extra words. I realized this doesn't effects the size of the usable dictionary space.

zeroflag pushed a commit that referenced this issue Jan 29, 2017
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

1 participant