RetroForum Welcome, Guest. Please login or register.
September 07, 2010, 05:51:50 AM
Home Help Search Calendar Login Register

RetroForth Discussion  |  Older Boards  |  Development  |  Topic: Rx Handbook, Draft of Revision 2 « previous next »
Pages: 1 Go Down Print
Author Topic: Rx Handbook, Draft of Revision 2  (Read 3345 times)
Charles Childers
Administrator
Sr. Member
*****

Karma: +2/-0
Offline Offline

Posts: 745


View Profile WWW
Rx Handbook, Draft of Revision 2
« on: March 19, 2006, 07:59:30 PM »

I uploaded a draft of my work in progress on updating the Rx Core documentation. You can read it (about 400k, in PDF format) at http://retroforth.org/doc/rx-handbook.pdf

This covers the current changes since the original Rx Core used in 9.0.x, and also adds some expanded content and new sections to the handbook.

I'd appreciate feedback on this! I personally think it's an improvement, but more input is needed as always.
Logged
helmar@spirit
Newbie
*

Karma: +0/-0
Offline Offline

Posts: 2


View Profile
Re: Rx Handbook, Draft of Revision 2
« Reply #1 on: March 19, 2006, 10:18:44 PM »

crc,

good work Wink

Well I still dont understand why the classes:

.DATA - as a class that compiles "literals"
.FORTH - as a class that describes the normal colon-defintions
.SELF - as a class that implements something very similar to "IMMEDIATE-words" from ANS
.INLINE - as the class for words that inline their code

are not enough? Really - I dont understand it. I dont get the point. Help me a litttle...

-Helmar

PS: The mail for forgotten passwords seems to take a long time... I did not get it...
Logged
Charles Childers
Administrator
Sr. Member
*****

Karma: +2/-0
Offline Offline

Posts: 745


View Profile WWW
Re: Rx Handbook, Draft of Revision 2
« Reply #2 on: March 19, 2006, 10:42:35 PM »

I have the .class as a bit of additional support for the classes themselves. With some of my work on a debugger, it makes it easy to identify the classes that are defined.

As to .macro, I chose to keep this separate from .self, since I only want macros to have a compile-time action. Rather than doing state @ if .... ;then around the definitions, I decided to have a separate class for this.

I will check and see if I can find out why the server is not sending out the password emails; nothing is stuck in the queue at this point, so I'm not sure where the problem is Sad
Logged
Charles Childers
Administrator
Sr. Member
*****

Karma: +2/-0
Offline Offline

Posts: 745


View Profile WWW
Re: Rx Handbook, Draft of Revision 2
« Reply #3 on: March 19, 2006, 10:48:31 PM »

Sending passwords should now work again; I still had the server set to the old server I used to use. Huh
Logged
helmar@spirit
Newbie
*

Karma: +0/-0
Offline Offline

Posts: 2


View Profile
Re: Rx Handbook, Draft of Revision 2
« Reply #4 on: March 19, 2006, 10:51:25 PM »

How about a class that ensures compilation? This would be really great as extension to the four I''ve enumerated. Eg. IF or FOR or DO that cause compilation in every case - until a word that turns off compilation - something like THEN - occurs.

OBSOLETED Cheesy : What's on with the notification mails, I dont know - I still did not get it. Could it be my mail-service provider did not accept the mail? Well, it would be very unlikely but it could be.

-Helmar
Logged
Helmar
Library Contributor
Full Member
****

Karma: +1/-0
Offline Offline

Posts: 129

TUCK what??? SWAP OVER!!!


View Profile
Re: Rx Handbook, Draft of Revision 2
« Reply #5 on: March 19, 2006, 10:55:13 PM »

Hahhhh... Nice to be me again Cool

-Helmar
Logged
Charles Childers
Administrator
Sr. Member
*****

Karma: +2/-0
Offline Offline

Posts: 745


View Profile WWW
Re: Rx Handbook, Draft of Revision 2
« Reply #6 on: March 20, 2006, 03:11:22 PM »

Quote
How about a class that ensures compilation? This would be really great as extension to the four I''ve enumerated. Eg. IF or FOR or DO that cause compilation in every case - until a word that turns off compilation - something like THEN - occurs.

I don't quite understand how this is useful. Words such as IF and FOR are rather useless outside a definition, or am I wrong?
Logged
Helmar
Library Contributor
Full Member
****

Karma: +1/-0
Offline Offline

Posts: 129

TUCK what??? SWAP OVER!!!


View Profile
Re: Rx Handbook, Draft of Revision 2
« Reply #7 on: March 20, 2006, 03:18:12 PM »

I don't quite understand how this is useful. Words such as IF and FOR are rather useless outside a definition, or am I wrong?

No, it's not useless. Especially since RF also interprets sources on startup. It's also good for interactive use - so you dont need to define a word to only do something repeatedly. Also examples could be given more easily. Eg. if you want to introduce the concept of loops, you dont need to define a new word, but
Code:
100 for '# emit next
would be enough for the user to test how the loop works.

-Helmar
Logged
Chuck Adams
Contributor
Jr. Member
***

Karma: +0/-0
Offline Offline

Posts: 24


View Profile
Re: Rx Handbook, Draft of Revision 2
« Reply #8 on: March 20, 2006, 06:47:02 PM »

Hear hear -- I've always found it lame that most forths don't let you use loops and conditionals in the interpreter.  Of course switching these on requires some kind of block behavior, which forth provides in word definitions, but the interpreter has no concept of. 

I'm not sure it calls for yet another class to enable that behavior, as we already have a word that does the job of switching the compiler for a "block" on, namely ::.  It does unfortunately leak the temporary definition, but that can be fixed by wrapping it in another word.  No classes involved in that approach.




Logged
Helmar
Library Contributor
Full Member
****

Karma: +1/-0
Offline Offline

Posts: 129

TUCK what??? SWAP OVER!!!


View Profile
Re: Rx Handbook, Draft of Revision 2
« Reply #9 on: March 20, 2006, 10:55:03 PM »

Chuck,

the implementation as class would have the big advantage that new words that require compilation could be easy to implement by simply assigning the class to them. One other big advantage in solving this problem with classes is that the user can reflect that behaviour easier if he is able to see the class of the word. My HelFORTH has a coloured "words" for that purpose - I do think a nice "blue" would be still available for such a class Cool

-Helmar
Logged
Charles Childers
Administrator
Sr. Member
*****

Karma: +2/-0
Offline Offline

Posts: 745


View Profile WWW
Re: Rx Handbook, Draft of Revision 2
« Reply #10 on: March 22, 2006, 04:12:54 AM »

I fixed a minor mistake in Appendix 1 today, (had the wrong class on ^), so an updated copy is now online.

In addition, the word information is now accessible via help in the 9.1 development build. (http://retroforth.org/projects/901.tar.gz). At present it only covers the words in the Rx Handbook, but this will be expanded to cover all words in Retro soon.
Logged
Charles Childers
Administrator
Sr. Member
*****

Karma: +2/-0
Offline Offline

Posts: 745


View Profile WWW
Re: Rx Handbook, Draft of Revision 2
« Reply #11 on: March 24, 2006, 12:49:38 AM »

Yet another updated copy is now online. This time the contents have been reorganized, and I added a new section on the threading model used. It's getting closer to ready I think...
Logged
Pages: 1 Go Up Print 
RetroForth Discussion  |  Older Boards  |  Development  |  Topic: Rx Handbook, Draft of Revision 2 « previous next »
Jump to:  


Login with username, password and session length

Powered by MySQL Powered by PHP Powered by SMF 1.1 RC2 | SMF © 2001-2005, Lewis Media Valid XHTML 1.0! Valid CSS!