Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.forth > #32106
| Path | csiph.com!usenet.pasdenom.info!aioe.org!.POSTED!not-for-mail |
|---|---|
| From | "Rod Pemberton" <dont_use_email@xnothavet.cqm> |
| Newsgroups | comp.lang.forth |
| Subject | Reduce dictionary lookups using LIT ? |
| Date | Tue, 01 Jul 2014 20:24:36 -0400 |
| Organization | Aioe.org NNTP Server |
| Lines | 46 |
| Message-ID | <op.xicgra2o6zenlw@localhost> (permalink) |
| NNTP-Posting-Host | CNsg4fVcCsvs3UaOgZtQCw.user.speranza.aioe.org |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=iso-8859-1; format=flowed; delsp=yes |
| Content-Transfer-Encoding | 7bit |
| X-Complaints-To | abuse@aioe.org |
| User-Agent | Opera Mail/12.16 (Linux) |
| X-Notice | Filtered by postfilter v. 0.8.2 |
| Xref | csiph.com comp.lang.forth:32106 |
Show key headers only | View raw
Reduce dictionary lookups using LIT ? ... I saw a quote from a Forth book which said LIT was also useful to eliminate dictionary lookups of numbers when loading and compiling a vocabulary. So, instead of: : ONE 1 ; \ LIT compiled by innner interpreter this would be used in a vocabulary: : ONE LIT 1 ; \ LIT explicitly used Here, 1 is not searched for in the dictionary by the inner interpreter when compiling ONE due to the use of LIT . I'd like to use that syntax in my vocabulary, but I think it creates some problems. I already have a historically based run-time LIT which works differently. A new "high-level" LIT as used in ": ONE LIT 1 ;" would need to be something like the following: : LIT BL WORD NUMBER POSTPONE LITERAL ; IMMEDIATE Except, LITERAL calls the original run-time LIT: : LITERAL POSTPONE LIT , ; IMMEDIATE : LIT R> DUP "cell_adjustment" >R @ ; This creates a name conflict between the two LITs, since my vocabulary would need to use both at the same time. A common option in such naming conflict situations is to rename the run-time, wrapping it in paren's, e.g.: (LIT) . Except, I don't want to change the historical name of the original run-time LIT . It seems to be well accepted. So, is there a common name for such a high-level LIT? Or, was there a version of LIT that did both? And, is this technique even used anymore? Rod Pemberton
Back to comp.lang.forth | Previous | Next — Next in thread | Find similar | Unroll thread
Reduce dictionary lookups using LIT ? "Rod Pemberton" <dont_use_email@xnothavet.cqm> - 2014-07-01 20:24 -0400
Re: Reduce dictionary lookups using LIT ? "Elizabeth D. Rather" <erather@forth.com> - 2014-07-01 19:39 -1000
Re: Reduce dictionary lookups using LIT ? bruce.mcfarling@gmail.com - 2014-07-02 10:30 -0700
Re: Reduce dictionary lookups using LIT ? "Elizabeth D. Rather" <erather@forth.com> - 2014-07-02 08:53 -1000
Re: Reduce dictionary lookups using LIT ? Mark Wills <markwills1970@gmail.com> - 2014-07-02 13:47 -0700
Re: Reduce dictionary lookups using LIT ? BruceMcF <agila61@netscape.net> - 2014-07-02 19:45 -0700
Re: Reduce dictionary lookups using LIT ? albert@spenarnc.xs4all.nl (Albert van der Horst) - 2014-07-03 16:56 +0000
Re: Reduce dictionary lookups using LIT ? bruce.mcfarling@gmail.com - 2014-07-03 10:34 -0700
Re: Reduce dictionary lookups using LIT ? Mark Wills <markwills1970@gmail.com> - 2014-07-02 01:27 -0700
Re: Reduce dictionary lookups using LIT ? Bernd Paysan <bernd.paysan@gmx.de> - 2014-07-02 17:11 +0200
Re: Reduce dictionary lookups using LIT ? albert@spenarnc.xs4all.nl (Albert van der Horst) - 2014-07-02 16:31 +0000
Re: Reduce dictionary lookups using LIT ? Bernd Paysan <bernd.paysan@gmx.de> - 2014-07-02 20:32 +0200
Re: Reduce dictionary lookups using LIT ? "Rod Pemberton" <dont_use_email@xnothavet.cqm> - 2014-07-03 03:01 -0400
Re: Reduce dictionary lookups using LIT ? "Elizabeth D. Rather" <erather@forth.com> - 2014-07-02 21:42 -1000
Re: Reduce dictionary lookups using LIT ? anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2014-07-03 16:05 +0000
Re: Reduce dictionary lookups using LIT ? "Rod Pemberton" <dont_use_email@xnothavet.cqm> - 2014-07-03 03:00 -0400
Re: Reduce dictionary lookups using LIT ? anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2014-07-02 09:35 +0000
Re: Reduce dictionary lookups using LIT ? "Elizabeth D. Rather" <erather@forth.com> - 2014-07-02 06:51 -1000
Re: Reduce dictionary lookups using LIT ? chitselb <chitselb@gmail.com> - 2014-07-02 14:30 -0700
Re: Reduce dictionary lookups using LIT ? "Rod Pemberton" <dont_use_email@xnothavet.cqm> - 2014-07-03 03:51 -0400
Re: Reduce dictionary lookups using LIT ? Stefan Mauerhofer <smauerhofer@androsoft.ch> - 2014-07-03 02:41 -0700
Re: Reduce dictionary lookups using LIT ? "Alex McDonald" <blog@rivadpm.com> - 2014-07-03 11:44 +0100
Re: Reduce dictionary lookups using LIT ? Stefan Mauerhofer <smauerhofer@androsoft.ch> - 2014-07-03 06:03 -0700
Re: Reduce dictionary lookups using LIT ? "Alex McDonald" <blog@rivadpm.com> - 2014-07-03 15:16 +0100
Re: Reduce dictionary lookups using LIT ? anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2014-07-03 16:31 +0000
Re: Reduce dictionary lookups using LIT ? "Alex McDonald" <blog@rivadpm.com> - 2014-07-03 19:58 +0100
Re: Reduce dictionary lookups using LIT ? "Alex McDonald" <blog@rivadpm.com> - 2014-07-03 20:02 +0100
csiph-web