Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.forth > #28274 > unrolled thread

How to get an address for a string by direct user input without using PAD

Started byhank.lenzi@gmail.com
First post2014-02-08 18:26 -0800
Last post2014-02-15 19:23 -0800
Articles 20 on this page of 104 — 21 participants

Back to article view | Back to comp.lang.forth


Contents

  How to get an address for a string by direct user input without using PAD hank.lenzi@gmail.com - 2014-02-08 18:26 -0800
    Re: How to get an address for a string by direct user input without using PAD albert@spenarnc.xs4all.nl (Albert van der Horst) - 2014-02-09 12:18 +0000
      Re: How to get an address for a string by direct user input without using PAD hughaguilar96@yahoo.com - 2014-02-09 20:00 -0800
        Re: How to get an address for a string by direct user input without using PAD hank.lenzi@gmail.com - 2014-02-13 15:47 -0800
    Re: How to get an address for a string by direct user input without using PAD anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2014-02-09 13:02 +0000
      Re: How to get an address for a string by direct user input without using PAD anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2014-02-09 13:12 +0000
    Re: How to get an address for a string by direct user input without using PAD Julian Fondren <julian.fondren@gmail.com> - 2014-02-09 08:48 -0800
      Re: How to get an address for a string by direct user input without using PAD henry.lenzi@gmail.com - 2014-02-11 16:22 -0800
      Re: How to get an address for a string by direct user input without using PAD henry.lenzi@gmail.com - 2014-02-11 16:22 -0800
    Re: How to get an address for a string by direct user input without using PAD "Elizabeth D. Rather" <erather@forth.com> - 2014-02-09 08:47 -1000
      Re: How to get an address for a string by direct user input without using PAD hughaguilar96@yahoo.com - 2014-02-09 18:13 -0800
        Re: How to get an address for a string by direct user input without using PAD Julian Fondren <julian.fondren@gmail.com> - 2014-02-10 02:27 -0800
          Re: How to get an address for a string by direct user input without using PAD hughaguilar96@yahoo.com - 2014-02-14 01:20 -0800
            Re: How to get an address for a string by direct user input without using PAD Julian Fondren <julian.fondren@gmail.com> - 2014-02-18 14:14 -0800
              Re: How to get an address for a string by direct user input without using PAD hughaguilar96@yahoo.com - 2014-02-18 20:11 -0800
                Re: How to get an address for a string by direct user input without using PAD Julian Fondren <julian.fondren@gmail.com> - 2014-02-19 06:56 -0800
              Re: How to get an address for a string by direct user input without using PAD hughaguilar96@yahoo.com - 2014-02-18 21:17 -0800
        Re: How to get an address for a string by direct user input without using PAD Steve <jsgrahamus@yahoo.com> - 2014-02-10 19:29 +0000
          Re: How to get an address for a string by direct user input without using PAD hughaguilar96@yahoo.com - 2014-02-14 01:34 -0800
        Re: How to get an address for a string by direct user input without using PAD henry.lenzi@gmail.com - 2014-02-11 16:25 -0800
      Re: How to get an address for a string by direct user input without using PAD henry.lenzi@gmail.com - 2014-02-11 16:59 -0800
        Re: How to get an address for a string by direct user input without using PAD "Elizabeth D. Rather" <erather@forth.com> - 2014-02-11 16:58 -1000
          Re: How to get an address for a string by direct user input without using PAD henry.lenzi@gmail.com - 2014-02-12 16:07 -0800
            Re: How to get an address for a string by direct user input without using PAD Paul Rubin <no.email@nospam.invalid> - 2014-02-12 16:46 -0800
              Re: How to get an address for a string by direct user input without using PAD Paul Rubin <no.email@nospam.invalid> - 2014-02-12 16:47 -0800
                Re: How to get an address for a string by direct user input without using PAD hank.lenzi@gmail.com - 2014-02-13 15:53 -0800
              Re: How to get an address for a string by direct user input without using PAD hank.lenzi@gmail.com - 2014-02-13 15:52 -0800
            Re: How to get an address for a string by direct user input without using PAD "Elizabeth D. Rather" <erather@forth.com> - 2014-02-12 14:32 -1000
              Re: How to get an address for a string by direct user input without using PAD hank.lenzi@gmail.com - 2014-02-12 17:13 -0800
                Re: How to get an address for a string by direct user input without using PAD Paul Rubin <no.email@nospam.invalid> - 2014-02-12 18:56 -0800
                  Re: How to get an address for a string by direct user input without using PAD anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2014-02-13 08:40 +0000
                    Re: How to get an address for a string by direct user input without using PAD hank.lenzi@gmail.com - 2014-02-13 17:16 -0800
                  Re: How to get an address for a string by direct user input without using PAD hank.lenzi@gmail.com - 2014-02-13 16:32 -0800
                Re: How to get an address for a string by direct user input without using PAD hughaguilar96@yahoo.com - 2014-02-14 01:11 -0800
                  Re: How to get an address for a string by direct user input without using PAD hank.lenzi@gmail.com - 2014-02-15 12:15 -0800
                    Re: How to get an address for a string by direct user input without using PAD hughaguilar96@yahoo.com - 2014-02-15 17:35 -0800
                Re: How to get an address for a string by direct user input without using PAD hughaguilar96@yahoo.com - 2014-02-14 12:02 -0800
                  Re: How to get an address for a string by direct user input without using PAD hank.lenzi@gmail.com - 2014-02-15 12:57 -0800
                    Re: How to get an address for a string by direct user input without using PAD hughaguilar96@yahoo.com - 2014-02-15 18:12 -0800
                      Re: How to get an address for a string by direct user input without using PAD henry.lenzi@gmail.com - 2014-02-15 19:10 -0800
                        Re: How to get an address for a string by direct user input without using PAD hughaguilar96@yahoo.com - 2014-02-15 19:34 -0800
                          Re: How to get an address for a string by direct user input without using PAD "Alex McDonald" <blog@rivadpm.com> - 2014-02-16 09:48 +0000
                            Re: How to get an address for a string by direct user input without using PAD hughaguilar96@yahoo.com - 2014-02-16 03:21 -0800
                              Re: How to get an address for a string by direct user input without using PAD albert@spenarnc.xs4all.nl (Albert van der Horst) - 2014-02-17 12:38 +0000
                                Re: How to get an address for a string by direct user input without using PAD Andrew Haley <andrew29@littlepinkcloud.invalid> - 2014-02-17 08:09 -0600
                                  Re: How to get an address for a string by direct user input without using PAD Bernd Paysan <bernd.paysan@gmx.de> - 2014-02-17 19:32 +0100
                              Re: How to get an address for a string by direct user input without using PAD "Alex McDonald" <blog@rivadpm.com> - 2014-02-17 14:53 +0000
                                Re: How to get an address for a string by direct user input without using PAD hughaguilar96@yahoo.com - 2014-02-17 20:48 -0800
                                  Re: How to get an address for a string by direct user input without using PAD "Alex McDonald" <blog@rivadpm.com> - 2014-02-18 16:21 +0000
                        Re: How to get an address for a string by direct user input without using PAD Roelf Toxopeus <rt4all@notthis.hetnet.nl> - 2014-02-16 09:32 +0100
                        Re: How to get an address for a string by direct user input without using PAD hughaguilar96@yahoo.com - 2014-02-16 03:07 -0800
                        Re: How to get an address for a string by direct user input without using PAD Alexander Skobelev <al.skobelev@gmail.com> - 2014-02-16 10:09 -0800
                          Re: How to get an address for a string by direct user input without using PAD hughaguilar96@yahoo.com - 2014-02-16 15:39 -0800
                          Re: How to get an address for a string by direct user input without using PAD hank.lenzi@gmail.com - 2014-02-17 19:54 -0800
                            Re: How to get an address for a string by direct user input without using PAD "Elizabeth D. Rather" <erather@forth.com> - 2014-02-17 19:51 -1000
                              Re: How to get an address for a string by direct user input without using PAD hank.lenzi@gmail.com - 2014-02-18 16:40 -0800
                            Re: How to get an address for a string by direct user input without using PAD humptydumpty <ouatubi@gmail.com> - 2014-02-18 11:44 -0800
                              Re: How to get an address for a string by direct user input without using PAD hank.lenzi@gmail.com - 2014-02-18 15:18 -0800
                            Re: How to get an address for a string by direct user input without using PAD Julian Fondren <julian.fondren@gmail.com> - 2014-02-18 14:48 -0800
                              Re: How to get an address for a string by direct user input without using PAD hank.lenzi@gmail.com - 2014-02-18 16:00 -0800
                                Re: How to get an address for a string by direct user input without using PAD albert@spenarnc.xs4all.nl (Albert van der Horst) - 2014-02-19 01:01 +0000
                                  Re: How to get an address for a string by direct user input without using PAD hank.lenzi@gmail.com - 2014-02-18 18:11 -0800
                                    Re: How to get an address for a string by direct user input without using PAD hank.lenzi@gmail.com - 2014-02-18 18:19 -0800
                                      Re: How to get an address for a string by direct user input without using PAD humptydumpty <ouatubi@gmail.com> - 2014-02-19 11:41 -0800
                                        Re: How to get an address for a string by direct user input without using PAD hank.lenzi@gmail.com - 2014-02-19 16:24 -0800
                                          Re: How to get an address for a string by direct user input without using PAD hughaguilar96@yahoo.com - 2014-02-19 23:08 -0800
                                            Re: How to get an address for a string by direct user input without using PAD Gerry Jackson <gerry@jackson9000.fsnet.co.uk> - 2014-02-20 13:11 +0000
                                              Re: How to get an address for a string by direct user input without using PAD hughaguilar96@yahoo.com - 2014-02-20 21:10 -0800
                                                Re: How to get an address for a string by direct user input without using PAD humptydumpty <ouatubi@gmail.com> - 2014-02-20 22:42 -0800
                                                  Re: How to get an address for a string by direct user input without using PAD hughaguilar96@yahoo.com - 2014-02-21 22:16 -0800
                                          Re: How to get an address for a string by direct user input without using PAD humptydumpty <ouatubi@gmail.com> - 2014-02-20 12:04 -0800
                                  Re: How to get an address for a string by direct user input without using PAD Gerry Jackson <gerry@jackson9000.fsnet.co.uk> - 2014-02-19 07:45 +0000
                                    Re: How to get an address for a string by direct user input without using PAD albert@spenarnc.xs4all.nl (Albert van der Horst) - 2014-02-19 20:10 +0000
                                      Re: How to get an address for a string by direct user input without using PAD Gerry Jackson <gerry@jackson9000.fsnet.co.uk> - 2014-02-19 22:25 +0000
                                        Re: How to get an address for a string by direct user input without using PAD albert@spenarnc.xs4all.nl (Albert van der Horst) - 2014-02-20 12:10 +0000
                                          Re: How to get an address for a string by direct user input without using PAD Gerry Jackson <gerry@jackson9000.fsnet.co.uk> - 2014-02-20 13:10 +0000
                                            Re: How to get an address for a string by direct user input without using PAD albert@spenarnc.xs4all.nl (Albert van der Horst) - 2014-02-20 17:11 +0000
                Re: How to get an address for a string by direct user input without using PAD "Elizabeth D. Rather" <erather@forth.com> - 2014-02-15 16:34 -1000
                  Re: How to get an address for a string by direct user input without using PAD hughaguilar96@yahoo.com - 2014-02-15 19:06 -0800
                    Re: How to get an address for a string by direct user input without using PAD henry.lenzi@gmail.com - 2014-02-15 19:22 -0800
              Re: How to get an address for a string by direct user input without using PAD "Rod Pemberton" <dont_use_email@xnohavenotit.cnm> - 2014-02-13 02:56 -0500
                Re: How to get an address for a string by direct user input without using PAD "Elizabeth D. Rather" <erather@forth.com> - 2014-02-12 22:13 -1000
                  Re: How to get an address for a string by direct user input without using PAD anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2014-02-13 08:56 +0000
                    Re: How to get an address for a string by direct user input without using PAD albert@spenarnc.xs4all.nl (Albert van der Horst) - 2014-02-13 11:57 +0000
            Re: How to get an address for a string by direct user input without using PAD "Rod Pemberton" <dont_use_email@xnohavenotit.cnm> - 2014-02-13 02:56 -0500
        Re: How to get an address for a string by direct user input without using PAD albert@spenarnc.xs4all.nl (Albert van der Horst) - 2014-02-12 14:56 +0000
          Re: How to get an address for a string by direct user input without using PAD mhx@iae.nl - 2014-02-12 11:24 -0800
          Re: How to get an address for a string by direct user input without using PAD henry.lenzi@gmail.com - 2014-02-12 15:48 -0800
            Re: How to get an address for a string by direct user input without using PAD Paul Rubin <no.email@nospam.invalid> - 2014-02-12 16:18 -0800
              Re: How to get an address for a string by direct user input without using PAD hank.lenzi@gmail.com - 2014-02-12 17:39 -0800
            Re: How to get an address for a string by direct user input without using PAD Bernd Paysan <bernd.paysan@gmx.de> - 2014-02-13 01:41 +0100
              Re: How to get an address for a string by direct user input without using PAD Hank Lenzi <henry.lenzi@gmail.com> - 2014-02-12 17:25 -0800
                Re: How to get an address for a string by direct user input without using PAD Bernd Paysan <bernd.paysan@gmx.de> - 2014-02-14 01:25 +0100
                  Re: How to get an address for a string by direct user input without using PAD hank.lenzi@gmail.com - 2014-02-13 17:03 -0800
                    Re: How to get an address for a string by direct user input without using PAD albert@spenarnc.xs4all.nl (Albert van der Horst) - 2014-02-14 02:41 +0000
            Re: How to get an address for a string by direct user input without using PAD stephenXXX@mpeforth.com (Stephen Pelc) - 2014-02-13 12:40 +0000
      Re: How to get an address for a string by direct user input without using PAD henry.lenzi@gmail.com - 2014-02-11 17:41 -0800
    Re: How to get an address for a string by direct user input without using PAD Mark Wills <markrobertwills@yahoo.co.uk> - 2014-02-10 02:32 -0800
      Re: How to get an address for a string by direct user input without using PAD henry.lenzi@gmail.com - 2014-02-11 17:23 -0800
      Re: How to get an address for a string by direct user input without using PAD hank.lenzi@gmail.com - 2014-02-13 15:49 -0800
    Re: How to get an address for a string by direct user input without using PAD Julian Fondren <julian.fondren@gmail.com> - 2014-02-12 20:50 -0800
      Re: How to get an address for a string by direct user input without using PAD hank.lenzi@gmail.com - 2014-02-13 16:38 -0800
    Re: How to get an address for a string by direct user input without using PAD hughaguilar96@yahoo.com - 2014-02-15 19:20 -0800
      Re: How to get an address for a string by direct user input without using PAD henry.lenzi@gmail.com - 2014-02-15 19:23 -0800

Page 5 of 6 — ← Prev page 1 2 3 4 [5] 6  Next page →


#28361

From"Rod Pemberton" <dont_use_email@xnohavenotit.cnm>
Date2014-02-13 02:56 -0500
Message-ID<op.xa7mzzee5zc71u@localhost>
In reply to#28344
On Wed, 12 Feb 2014 19:32:49 -0500, Elizabeth D. Rather  
<erather@forth.com> wrote:

> An alternative (completely different approach) would be to have all the  
> 100+ drugs in a database. A "prescription" could consist of a linked  
> list of the components (probably stored as the record# in the database,  
> not the name).
>

Not to be critical, but isn't that what the historic Forth dictionary is?
I.e., database of Forth words as a linked-list.  E.g., why create another?


Rod Pemberton

[toc] | [prev] | [next] | [standalone]


#28363

From"Elizabeth D. Rather" <erather@forth.com>
Date2014-02-12 22:13 -1000
Message-ID<IeadnVsoF90N42HPnZ2dnUVZ_oudnZ2d@supernews.com>
In reply to#28361
On 2/12/14 9:56 PM, Rod Pemberton wrote:
> On Wed, 12 Feb 2014 19:32:49 -0500, Elizabeth D. Rather
> <erather@forth.com> wrote:
>
>> An alternative (completely different approach) would be to have all
>> the 100+ drugs in a database. A "prescription" could consist of a
>> linked list of the components (probably stored as the record# in the
>> database, not the name).
>
> Not to be critical, but isn't that what the historic Forth dictionary is?
> I.e., database of Forth words as a linked-list.  E.g., why create another?

No. The dictionary is a very different structure from a database. 
Storage is different (e.g., may be on disk or allocated memory), access 
is different (via index or other lookup different from a dictionary 
search on name), and content is different (records containing fixed 
fields). Even if the data is in a linked list (which sometimes works, 
but not always) the linkage has to be entirely separate from the 
dictionary. For example, it doesn't involve vocabularies. In most 
applications, a database is in a completely separate space, for many 
reasons, cache management among them.

It's a big mistake to confuse dictionary entries with a database in most 
cases. This isn't saying that variables, constants, and short arrays 
shouldn't be incorporated in the dictionary, but not a real database. 
Quite a different creature.

Cheers,
Elizabeth

-- 
==================================================
Elizabeth D. Rather   (US & Canada)   800-55-FORTH
FORTH Inc.                         +1 310.999.6784
5959 West Century Blvd. Suite 700
Los Angeles, CA 90045
http://www.forth.com

"Forth-based products and Services for real-time
applications since 1973."
==================================================

[toc] | [prev] | [next] | [standalone]


#28370

Fromanton@mips.complang.tuwien.ac.at (Anton Ertl)
Date2014-02-13 08:56 +0000
Message-ID<2014Feb13.095654@mips.complang.tuwien.ac.at>
In reply to#28363
"Elizabeth D. Rather" <erather@forth.com> writes:
>It's a big mistake to confuse dictionary entries with a database in most 
>cases. This isn't saying that variables, constants, and short arrays 
>shouldn't be incorporated in the dictionary, but not a real database. 
>Quite a different creature.

Whatever a "real database" may be.

Sure, if you want persistance and updates without using an editor, the
dictionary may be the wrong thing to use.

But if you are fine with the restrictions implied by the dicitionary,
it's perfectly fine to use that.  These restrictions are:

- Doing updates by editor (alternatively, having a file or screen per
  record, and using the file (or screen) system for persistence, but
  that's getting away from simplicity).

- Search only with a single key.

- Data fits in memory.

- Need to reload when an entry is changed or added (if updates are
  made by editor).

Forth-2012 even has TRAVERSE-WORDLIST, which allows enumerating all
records in a database that is organized as a wordlist.

- anton
-- 
M. Anton Ertl  http://www.complang.tuwien.ac.at/anton/home.html
comp.lang.forth FAQs: http://www.complang.tuwien.ac.at/forth/faq/toc.html
     New standard: http://www.forth200x.org/forth200x.html
   EuroForth 2013: http://www.euroforth.org/ef13/

[toc] | [prev] | [next] | [standalone]


#28377

Fromalbert@spenarnc.xs4all.nl (Albert van der Horst)
Date2014-02-13 11:57 +0000
Message-ID<52fcb323$0$25283$e4fe514c@dreader34.news.xs4all.nl>
In reply to#28370
In article <2014Feb13.095654@mips.complang.tuwien.ac.at>,
Anton Ertl <anton@mips.complang.tuwien.ac.at> wrote:
>"Elizabeth D. Rather" <erather@forth.com> writes:
>>It's a big mistake to confuse dictionary entries with a database in most
>>cases. This isn't saying that variables, constants, and short arrays
>>shouldn't be incorporated in the dictionary, but not a real database.
>>Quite a different creature.
>
>Whatever a "real database" may be.
>
>Sure, if you want persistance and updates without using an editor, the
>dictionary may be the wrong thing to use.
>
>But if you are fine with the restrictions implied by the dicitionary,
>it's perfectly fine to use that.  These restrictions are:
>
>- Doing updates by editor (alternatively, having a file or screen per
>  record, and using the file (or screen) system for persistence, but
>  that's getting away from simplicity).
>
>- Search only with a single key.
>
>- Data fits in memory.
>
>- Need to reload when an entry is changed or added (if updates are
>  made by editor).
>
>Forth-2012 even has TRAVERSE-WORDLIST, which allows enumerating all
>records in a database that is organized as a wordlist.

I was bitten by a design mistake such as implied by Elizabeth's
restriction. I used the dictionary to have a linked list for the
mnemonics of my ciasdis assembler. For such a tool one is entitled
to use carnal knowledge, so there-in in itself lies no problem.

After the ciasdis tool grow, the combined functionality of the
links presented more and more problems, so I now have a separate
link field in all mnemonics object. Where an such an object has at
least 5 fields/methods, the saving by leaning on the dictionary
were minute, and ciasdis is more portable now.

>
>- anton

Groetjes Albert
-- 
Albert van der Horst, UTRECHT,THE NETHERLANDS
Economic growth -- being exponential -- ultimately falters.
albert@spe&ar&c.xs4all.nl &=n http://home.hccnet.nl/a.w.m.van.der.horst

[toc] | [prev] | [next] | [standalone]


#28362

From"Rod Pemberton" <dont_use_email@xnohavenotit.cnm>
Date2014-02-13 02:56 -0500
Message-ID<op.xa7m06l75zc71u@localhost>
In reply to#28341
On Wed, 12 Feb 2014 19:07:15 -0500, <henry.lenzi@gmail.com> wrote:

>  The thing is, a patient's "continuous use" prescription (as they are  
> called in our health system - diabetes, hypertension depression, etc.)  
> are comprised of more than one drugs. We have patients that take over 20  
> drugs on a regular basis.

I'm not sure of a Forth solution, perhaps a description of a C style  
solution
will inspire you or someone.  You'll need to read the C info to understand
why I mention what I do about Forth afterwards.

A C solution would likely use integers here.  I.e., integers to represent  
each
drug.  You'd need a method to convert strings for drug names to integers,  
and
also from integers to strings.  In C, that would be done by lookup tables,
i.e., an indexed arrays of strings.  You'd loop and compare strings to find
the index, or you'd index to retrieve a string.  You could also use a hash
function generating integers from strings.

In Forth, you already have mechanism that converts strings to integers. You
simply define a Forth word.  It's XT is an integer.  Each word is placed
in a "database" - the Forth dictionary - which is usually a linked-list
of Forth words.  FIND and ' (tick) or compling a word into a definition
are ways to use the XT.


Rod Pemberton

[toc] | [prev] | [next] | [standalone]


#28331

Fromalbert@spenarnc.xs4all.nl (Albert van der Horst)
Date2014-02-12 14:56 +0000
Message-ID<52fb8bb2$0$9256$e4fe514c@dreader35.news.xs4all.nl>
In reply to#28320
In article <57250061-2462-4e0f-978e-aca53a0dd874@googlegroups.com>,
 <henry.lenzi@gmail.com> wrote:
 <SNIP>
>
>TIA,
>Hank Lenzi
>
>PS: You'll be happy to learn, I just bought a SwiftForth license
>tonight. ;-) I'm thinking of shipping the prescription software as a
>standalone executable, eventually. I think my fellow doctor colleagues
>will appreciate that. They kind of panic when I show them how to load
>files at the prompt. :-) Anyways, we're on track to serving 6.000
>patients' presciptions with my Forth-based DSL and database (it's
>working as of *now*). I would *never* in my wildest dream could have
>imagined Forth to be such a productive tool. It's been 3 weeks, and I
>got *so* much done it's *unreal* - stuff that would have taken me *much*
>more time in C, C++, Java, etc (I don't really get what Java programmer
>mean when they say they have frameworks that make them more productive
>when you have to read 300 pages of documentation just to wrap your head
>around a framework...What the *hell* is *that* ?!)
>Anyways, well, what do you know, it is *true* what they say about
>Forth... Wow! WOW!
>

Nice to hear such from some one comparitively new to Forth.
Sometimes we doubt whether we are not narrow minded.

Groetjes Albert
-- 
Albert van der Horst, UTRECHT,THE NETHERLANDS
Economic growth -- being exponential -- ultimately falters.
albert@spe&ar&c.xs4all.nl &=n http://home.hccnet.nl/a.w.m.van.der.horst

[toc] | [prev] | [next] | [standalone]


#28338

Frommhx@iae.nl
Date2014-02-12 11:24 -0800
Message-ID<c8a2bf47-c362-43fc-b41a-7020f6ab392e@googlegroups.com>
In reply to#28331
On Wednesday, February 12, 2014 3:56:50 PM UTC+1, Albert van der Horst wrote:
> 
> Nice to hear such from some one comparitively new to Forth.
> Sometimes we doubt whether we are not narrow minded.

I don't doubt that :-)

-marcel

[toc] | [prev] | [next] | [standalone]


#28339

Fromhenry.lenzi@gmail.com
Date2014-02-12 15:48 -0800
Message-ID<9278b45a-9ebc-42b8-a6da-d3f8161fc8b9@googlegroups.com>
In reply to#28331
> Nice to hear such from some one comparitively new to Forth.
> 
> Sometimes we doubt whether we are not narrow minded.
> 

> Groetjes Albert
> 

 Keep the faith! "It's all true" :-)

 As a matter of fact, I kind of stand in awe myself in how I solved my headaches with Forth. My software is *so* simple...But I got a database, a readline, a DSL, words that can "macroexpand". Are you kidding me?! I can only *imagine* what advanced Forth is...

 What you guys need to do is write more - blogs, etc. Get it out there. Show people how to do amazing things!

 Sometimes, I feel some of you don't even know that you're doing magical stuff - maybe because you've programmed Forth for so long, and you live in your nice confortable world (good for you!). Since you don't feel the pain, you waste no time with advocacy or comparisons.

 Also, I feel Forth also needs to shape up in the multiplatform GUI front. That would be nice...Although, this doesn't really matter for users - as 90% of them are on Windows - but it does carry some weight in how developers might view Forth. Developer mindshare is important.

 Anyways, I'm glad I found Forth!

 Hank Lenzi

[toc] | [prev] | [next] | [standalone]


#28340

FromPaul Rubin <no.email@nospam.invalid>
Date2014-02-12 16:18 -0800
Message-ID<7xmwhv3lxh.fsf@ruckus.brouhaha.com>
In reply to#28339
henry.lenzi@gmail.com writes:
>  Anyways, I'm glad I found Forth!

Congrats, and welcome.  Out of curiosity, what else have you tried?  You
posted some comparisons with heavyweight compiled languages like C++ and
Java, but you might also like trying some lighter scripting languages
like Python or Ruby, or even Lisp.  

[toc] | [prev] | [next] | [standalone]


#28349

Fromhank.lenzi@gmail.com
Date2014-02-12 17:39 -0800
Message-ID<10bb24d1-116a-4bae-9d5f-9dd61a8487d8@googlegroups.com>
In reply to#28340
Em quarta-feira, 12 de fevereiro de 2014 22h18min02s UTC-2, Paul Rubin  escreveu:
> hank.lenzi@  writes:
> 
> >  Anyways, I'm glad I found Forth!
> 
> 
> 
> Congrats, and welcome.  Out of curiosity, what else have you tried?  You
> 
> posted some comparisons with heavyweight compiled languages like C++ and
> 
> Java, but you might also like trying some lighter scripting languages
> 
> like Python or Ruby, or even Lisp.

 I learned a bit of Common Lisp before I learned C. I also know some Perl.
 Sure, we can get stuff done in all of these languages.
 What I find very atractive about Forth is how there are mini-blocks that you must fit. When you assemble them,, you get a little robot.
 Honestly, about Python: you must assume too much (the correct version, etc.) Good in theory. In practice, it fails.
 C is boring (I think). Common Lisp, Smalltalk and Forth are the ones that I like. 
 Forth - I believe :-)
 Cheers,
 Hank Lenzi

[toc] | [prev] | [next] | [standalone]


#28345

FromBernd Paysan <bernd.paysan@gmx.de>
Date2014-02-13 01:41 +0100
Message-ID<ldh4cf$g5j$1@online.de>
In reply to#28339
henry.lenzi@gmail.com wrote:

> Also, I feel Forth also needs to shape up in the multiplatform GUI front.
> That would be nice...

You haven't found MINOS yet...

http://bernd-paysan.de/bigforth.html

-- 
Bernd Paysan
"If you want it done right, you have to do it yourself"
http://bernd-paysan.de/

[toc] | [prev] | [next] | [standalone]


#28347

FromHank Lenzi <henry.lenzi@gmail.com>
Date2014-02-12 17:25 -0800
Message-ID<c4f909c3-e274-4609-913c-62766341d260@googlegroups.com>
In reply to#28345
On Wednesday, February 12, 2014 10:41:51 PM UTC-2, Bernd Paysan wrote:
> henry.lenzi@gmail.com wrote:
> 
> 
> 
> > Also, I feel Forth also needs to shape up in the multiplatform GUI front.
> 
> > That would be nice...
> 
> 
> 
> You haven't found MINOS yet...
> 

Hi Bernd - 

 As a matter of fact, I did look into it, but it just sort of froze in Windows.

 I'm sorry, but I can't expect Linux on our health clinic. And I have no say in that matter either.

 Also, part of the documentation was in German, IIRC. AFAIK, OTOH, Gforth is a well-regarded Forth.

 Initially my stuff is in Win32Forth but, again, documentation is a big issue for me. I really must get stuff done. I thought VFX Forth was pretty good too, but it seemed to me some things (such as shipping a turnkey application) were easier done in SwiftForth).

 Anyways, competition is good! The more, the better!

 All the best,
 Hank Lenzi

[toc] | [prev] | [next] | [standalone]


#28400

FromBernd Paysan <bernd.paysan@gmx.de>
Date2014-02-14 01:25 +0100
Message-ID<ldjnpe$thu$1@online.de>
In reply to#28347
Hank Lenzi wrote:

>  As a matter of fact, I did look into it, but it just sort of froze in
>  Windows.

Strange.  I've maintained a MINOS program over years that was in use by a 
number of customers...  But that's why I don't recommend developing FOSS for 
Windows: You get absolutely no useful feedback.  It is next to impossible to 
fix bugs, unless you see them yourself.  I've looked at the downloads of the 
bigForth for Windows version vs. the Linux version, and at one point in 
time, the relation was 50/50.  The feedback relation was 0/100.  No feedback 
whatsoever from the Windows side.  Occasionally, when asking someone 
directly, he'll tell me something in the line of "it just sort of froze" or 
whatever most unhelpful description you can imagine.

That was when I gave up.  There's no culture for bug reports in the Windows 
user world.  If you report a bug, precicely state what you did, so that this 
can be reproduced.  Be open for a second round to make things more clear, 
the other side might misunderstand your problem.

I've quite good experience with the few Russian guys who use Gforth on 
Android.  They are way overrepresented in the bug reports statistics, and 
they do provide useful feedback.

IMHO, the unhelpfulnes of Windows user feedback is that they are not used to 
ever get any help on feedback.  Or even figure out how to reproduce bugs or 
get more informations.  If you use Windows, you are helpless, anyways.

>  I'm sorry, but I can't expect Linux on our health clinic. And I have no
>  say in that matter either.

Sure.

>  Also, part of the documentation was in German, IIRC.

Yes, I can see that this is a problem.  The German documentation is also 
lacking.  There are people who use MINOS productively, though, and not all 
of them are German native speakers.  Ok, the rest of them are AFAIK of 
Russian origin, but that might only be, because they just do provide 
feedback.

-- 
Bernd Paysan
"If you want it done right, you have to do it yourself"
http://bernd-paysan.de/

[toc] | [prev] | [next] | [standalone]


#28404

Fromhank.lenzi@gmail.com
Date2014-02-13 17:03 -0800
Message-ID<3fa3c93a-279b-462d-8ce6-df460d4b9738@googlegroups.com>
In reply to#28400
Hi Bernd --

 IIRC, you (or some other bigFORTH developer) do mention in the web site you don't really aim to support Windows, because of problems regarding the Windows API.

> 
> >  Also, part of the documentation was in German, IIRC.
> 
> 
> 
> Yes, I can see that this is a problem.  

 Documentation is a *huge* part. *HUGE*. That, IMHO, is the biggest problem with open source software. The software may be top notch, but the newcomer never gets to use it properly. 

 Documentation = time to ship something. 

 People will pay for better polished products, that is a fact, because time is money. In my case, it's all about not having another episode of tendinitis. I will gladly pay people who have a good solution. I have *no* problem with proprietary software, I think it's *great* that Forth Inc. has carved out a niche in the software jungle for themselves...using FORTH - after all those years! I think it's absolutely *beautiful* that that's happened! What a beautiful thing, truly! Everyone, by the way, that is using Forth. You too, and your customers. That's so special! (But that web page, you guys, it's showing its age...that does *not* convey a good impression :-) No offense! )

 For instance, I almost chose VFX Forth (mainly because of the GTK support) but I found the documentation kind of...too "geeky" in what regards creating a turnkey application (this is a lame way to put it, I know).

 Best regards
 -- Hank Lenzi

[toc] | [prev] | [next] | [standalone]


#28408

Fromalbert@spenarnc.xs4all.nl (Albert van der Horst)
Date2014-02-14 02:41 +0000
Message-ID<52fd8250$0$25285$e4fe514c@dreader34.news.xs4all.nl>
In reply to#28404
In article <3fa3c93a-279b-462d-8ce6-df460d4b9738@googlegroups.com>,
 <hank.lenzi@gmail.com> wrote:
 <SNIP>
>
> For instance, I almost chose VFX Forth (mainly because of the GTK
>support) but I found the documentation kind of...too "geeky" in what
>regards creating a turnkey application (this is a lame way to put it, I
>know).

I agree that the need to make turnkey applications is underestimated in
the Forth community. That is why my Forth ( ciforth, lina, wina) that
is lacking in many respects, has a top notch turnkey facility.

If the content of the file echoe.frt is:
"
  : doit   ." We go to Rome" CR ;
"
then
   lina -c echoe.frt
produces a turnkey echoe
that does
    We go to Rome

A 32-bit version will easily run on a 15 year old Linux distribution
without an installed Forth, without need for a shared object library
("dll"), without assuming environment variables etc.

(The compilation requires exactly two files, forth and a source-library,
but neither is needed to *run* the executable.)


> Best regards
> -- Hank Lenzi
-- 
Albert van der Horst, UTRECHT,THE NETHERLANDS
Economic growth -- being exponential -- ultimately falters.
albert@spe&ar&c.xs4all.nl &=n http://home.hccnet.nl/a.w.m.van.der.horst

[toc] | [prev] | [next] | [standalone]


#28378

FromstephenXXX@mpeforth.com (Stephen Pelc)
Date2014-02-13 12:40 +0000
Message-ID<52fcbcca.33339831@news.demon.co.uk>
In reply to#28339
On Wed, 12 Feb 2014 15:48:21 -0800 (PST), henry.lenzi@gmail.com wrote:

> Also, I feel Forth also needs to shape up in the multiplatform GUI front. =
>That would be nice...Although, this doesn't really matter for users - as 90=
>% of them are on Windows - but it does carry some weight in how developers =
>might view Forth. Developer mindshare is important.

See the pictures at:
  http://www.mpeforth.com/vfxcom.htm

Stephen

-- 
Stephen Pelc, stephenXXX@mpeforth.com
MicroProcessor Engineering Ltd - More Real, Less Time
133 Hill Lane, Southampton SO15 5AF, England
tel: +44 (0)23 8063 1441, fax: +44 (0)23 8033 9691
web: http://www.mpeforth.com - free VFX Forth downloads

[toc] | [prev] | [next] | [standalone]


#28322

Fromhenry.lenzi@gmail.com
Date2014-02-11 17:41 -0800
Message-ID<7073d79c-ed0f-4029-8d25-042d07035af3@googlegroups.com>
In reply to#28283
> In addition to the other suggestions people have given, my thought is to 
> 
> process each piece as you get it, rather than wait till you have all 
> 
> three. Maybe you can only do preliminary processing, and save the 
> 
> results somewhere, each being in a different place.

I thought about using a look-up table with CREATEd stored CHAR variables, and then vectored execution. This is hack that kind of emulates object encapsulation (because the memory is protected and dedicated) and method dispatch (via vectored execution).

For instance, I can create a database key with

: $NAME CREATE 46 ( . ) WORD C@ 1+ ALLOT ;

but I don't know how to do it automatically. And I also can't seem to ask this "object" what its name is (meaning, as a string address and count that can be dropped on the stack).

The use of a look-up table with vectored execution dispatch is realisitic, in the sense that there's only so many medications that can fit in a sheet of paper, but code gets a bit big (and ugly). By which I mean: there's a finite number of entities in the look-up CREATEd table. And this: I really am not able to emulate anything like closures or iterators at the momment. That is to say, I just can't keep going creating an object (the CREATEd Forth word associated with the string) automatically (via a routine or via input, without invoking $NAME very explicitly.

Hank Lenzi

[toc] | [prev] | [next] | [standalone]


#28292

FromMark Wills <markrobertwills@yahoo.co.uk>
Date2014-02-10 02:32 -0800
Message-ID<b9881c49-5f6e-4a40-b642-324e35c3c121@googlegroups.com>
In reply to#28274
No need for string allocation/de-allocation at all. Let the dictionary do your work for you:

variable product    \ the drug to dispense
variable milligrams \ milligrams per pill
variable #pills     \ number of pills in prescription
variable #per_day   \ number of pills to take per day

: reset_vars ( -- )
    0 milligrams !
    0 #pills !
    0 #per_day !
    false product ! ;

\ drugs list
: capt ( -- ) 
    c" Captopril" product ! ;

: para ( -- ) 
    c" Paracetomol" product ! ;

: aspi ( -- ) 
    c" Aspirin" product ! ;
\ end of drugs list

: MG ( milligrams -- )
    milligrams ! ;

: CP ( #pills -- )
    #pills ! ;

: XD ( #per_day -- )
    #per_day ! ;

: prescribe ( -- )
    reset_vars ;

: done ( -- )
    cr
    product @    0= abort" Error: no product specified"
    milligrams @ 0= abort" Error: dose size not set"
    #pills @     0= abort" Error: quantity not set"
    #per_day @   0= abort" Error: daily dosage not set"
    
    \ re-direct output to printer here
    ." ----------------------------" CR
    product @ count type space milligrams @ . ." mg" cr
    ." Take " #per_day @ . ." per day" cr
    ." Quantity: " #pills @ . ." tablets." cr
    ." WARNING: Do not exceed the stated daily dose." cr
    ." ----------------------------" CR
    \ re-direct output to console here
;

prescribe capt 50 mg 2 xd 30 cp done

Output:
----------------------------
Captopril 50 mg
Take 2 per day
Quantity: 30 tablets
WARNING: Do not exceed the stated daily dose.
----------------------------


Note that you can specify the parameters in any order:

prescribe 50 mg aspi 30 cp 2 xd done

HTH

Mark

[toc] | [prev] | [next] | [standalone]


#28321

Fromhenry.lenzi@gmail.com
Date2014-02-11 17:23 -0800
Message-ID<caa1ac24-f0cb-4f53-b8e6-fd134bcb95a5@googlegroups.com>
In reply to#28292
Em segunda-feira, 10 de fevereiro de 2014 08h32min38s UTC-2, Mark Wills  escreveu:
> No need for string allocation/de-allocation at all. Let the dictionary do your work for you:
>  
> HTH
>  
> Mark

Certainly insightful, Mark (for me, at least). Well... insightful or right under my nose. ;-)

There's an aspect I might not have mentioned: I might want to *not* evaluate a Forth word at first (say, "CAPT25" is just "CAPT25") and not expand it ("Captopril 25mg"). This is useful, for instance, for book keeping (simple word-frequency stats) or for spelling-correction (better yet, 
in the future predictive input - but maybe this is really hard with Forth strings? I have no idea...)

Thanks!

Hank Lenzi

[toc] | [prev] | [next] | [standalone]


#28395

Fromhank.lenzi@gmail.com
Date2014-02-13 15:49 -0800
Message-ID<a50da300-5c02-4189-b9b9-04f8fa77149f@googlegroups.com>
In reply to#28292
> No need for string allocation/de-allocation at all. Let the dictionary do your work for you:
> 

 Hi Mark --

 This assumes one drug per prescrition.
 
 - Hank Lenzi

[toc] | [prev] | [next] | [standalone]


Page 5 of 6 — ← Prev page 1 2 3 4 [5] 6  Next page →

Back to top | Article view | comp.lang.forth


csiph-web