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


Groups > comp.lang.forth > #34429

Re: Does Forth solve the paradox?

From Paul E Bennett <Paul_E.Bennett@topmail.co.uk>
Newsgroups comp.lang.forth
Subject Re: Does Forth solve the paradox?
Date 2014-11-16 00:45 +0000
Organization Hidecs Consultancy
Message-ID <ccqacoFl667U1@mid.individual.net> (permalink)
References <6f36e5e5-037c-41e2-89c5-2bc11937ddcd@googlegroups.com> <m43ijk$lsm$1@dont-email.me> <5eKdnVY0PdQQf_jJnZ2dnUVZ8sKdnZ2d@supernews.com> <2014Nov15.172155@mips.complang.tuwien.ac.at> <5467ea7a$0$6851$e4fe514c@dreader36.news.xs4all.nl>

Show all headers | View raw


Albert van der Horst wrote:

> In article <2014Nov15.172155@mips.complang.tuwien.ac.at>,
> Anton Ertl <anton@mips.complang.tuwien.ac.at> wrote:
>>Andrew Haley <andrew29@littlepinkcloud.invalid> writes:
>>> A good counter example is sorting: there
>>>is no general-purpose sorting algorithm which is the best for all
>>>datasets and all systems.
>>
>>Best?  That sounds like "tightly optimized for a specific application
>>szenario", which I mentioned earlier.  Otherwise, mergesort and
>>quicksort are pretty good algorithms, and either one will do nicely
>>for most of the few applications that need sorting.  In the last 25
>>years, I did nearly all of my sorting with the Unix sort program; I
>>needed sorting in a program written in something lower-level than a
>>shell-script only once (and there I used standard C's qsort()
>>function).
> 
> I had the problem of sorting a glossary, first by chapter then by
> wordname. This I had solved by a c++ program (my first actually: 1994).
> It specifies records and fields by regular expressions.
> This was because I didn't know how to solve that sorting problem in some
> other way. This general purpose full featured 10 kg sledgehammer has
> served me nicely, and I recently made it to compile again to a 64 bit
> version, after using the unaltered program till my 90 MHz Pentium broke
> down. It is instrumental in generating the ciforth documentation.
> 
> At the time,it came out first in a comparative test I did, in
> reliability, features and even in speed.
> 
> Bottom line, a situation where you want to sort integers in a
> straight array is rare. You can handle fixed records with an
> execution token for the comparison , and that is a one screener.
> But if you're encountering a somewhat hard practical situation
> that probably doesn't cut it.
> 
> And as you point out, mostly you sort files anyway.
> The unix sort has some heavy usage with me on all kind of euler problems,
> to analyse tables of results for patterns.
> 
>>
>>- anton
> 
> Groetjes Albert

One interesting aspect for sorting the Dictionary that was presented at one 
of the EuroForth's was to add another linkage into the header that could 
contain the sequence number for its sorted order. Only this field got sorted 
and the rest of the body stayed put. Seemed quite a neat solution, 
especially if you wanted an alphabetically ordered dictionary listing.

-- 
********************************************************************
Paul E. Bennett IEng MIET.....<email://Paul_E.Bennett@topmail.co.uk>
Forth based HIDECS Consultancy.............<http://www.hidecs.co.uk>
Mob: +44 (0)7811-639972
Tel: +44 (0)1235-510979
Going Forth Safely ..... EBA. www.electric-boat-association.org.uk..
********************************************************************

Back to comp.lang.forth | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Does Forth solve the paradox? forthisit@gmail.com - 2014-11-05 08:08 -0800
  Re: Does Forth solve the paradox? albert@spenarnc.xs4all.nl (Albert van der Horst) - 2014-11-05 19:45 +0000
    Re: Does Forth solve the paradox? "Elizabeth D. Rather" <erather@forth.com> - 2014-11-05 10:43 -1000
      Re: Does Forth solve the paradox? Paul Rubin <no.email@nospam.invalid> - 2014-11-05 14:04 -0800
        Re: Does Forth solve the paradox? "Elizabeth D. Rather" <erather@forth.com> - 2014-11-05 12:49 -1000
          Re: Does Forth solve the paradox? rickman <gnuarm@gmail.com> - 2014-11-05 18:13 -0500
            Re: Does Forth solve the paradox? "Elizabeth D. Rather" <erather@forth.com> - 2014-11-05 13:54 -1000
            Re: Does Forth solve the paradox? albert@spenarnc.xs4all.nl (Albert van der Horst) - 2014-11-06 10:13 +0000
          Re: Does Forth solve the paradox? the_gavino_himself <visphatesjava@gmail.com> - 2014-11-05 20:55 -0800
          Re: Does Forth solve the paradox? Paul Rubin <no.email@nospam.invalid> - 2014-11-05 22:19 -0800
      Re: Does Forth solve the paradox? m.a.m.hendrix@tue.nl - 2014-11-06 03:05 -0800
        Re: Does Forth solve the paradox? anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2014-11-06 11:43 +0000
          Re: Does Forth solve the paradox? m.a.m.hendrix@tue.nl - 2014-11-06 04:46 -0800
            Re: Does Forth solve the paradox? anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2014-11-06 16:58 +0000
    Re: Does Forth solve the paradox? rickman <gnuarm@gmail.com> - 2014-11-05 17:22 -0500
    Re: Does Forth solve the paradox? the_gavino_himself <visphatesjava@gmail.com> - 2014-11-05 18:54 -0800
    Re: Does Forth solve the paradox? anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2014-11-06 09:22 +0000
      Re: Does Forth solve the paradox? Mark Wills <markwills1970@gmail.com> - 2014-11-06 03:20 -0800
      Re: Does Forth solve the paradox? Andrew Haley <andrew29@littlepinkcloud.invalid> - 2014-11-06 10:18 -0600
        Re: Does Forth solve the paradox? albert@spenarnc.xs4all.nl (Albert van der Horst) - 2014-11-06 18:30 +0000
          Re: Does Forth solve the paradox? Andrew Haley <andrew29@littlepinkcloud.invalid> - 2014-11-07 03:22 -0600
        Re: Does Forth solve the paradox? "Rod Pemberton" <buzzoff@nonamewhichexists.cmm> - 2014-11-06 16:57 -0500
          Re: Does Forth solve the paradox? forthisit@gmail.com - 2014-11-06 14:38 -0800
          Re: Does Forth solve the paradox? "Elizabeth D. Rather" <erather@forth.com> - 2014-11-06 13:58 -1000
        Re: Does Forth solve the paradox? Paul Rubin <no.email@nospam.invalid> - 2014-11-07 10:40 -0800
          Re: Does Forth solve the paradox? Andrew Haley <andrew29@littlepinkcloud.invalid> - 2014-11-08 02:36 -0600
          Re: Does Forth solve the paradox? "Elizabeth D. Rather" <erather@forth.com> - 2014-11-07 22:45 -1000
        Re: Does Forth solve the paradox? Bernd Paysan <bernd.paysan@gmx.de> - 2014-11-14 01:33 +0100
          Re: Does Forth solve the paradox? m.a.m.hendrix@tue.nl - 2014-11-14 02:34 -0800
          Re: Does Forth solve the paradox? Andrew Haley <andrew29@littlepinkcloud.invalid> - 2014-11-14 05:07 -0600
            Re: Does Forth solve the paradox? anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2014-11-15 16:21 +0000
              Re: Does Forth solve the paradox? Andrew Haley <andrew29@littlepinkcloud.invalid> - 2014-11-15 11:52 -0600
              Re: Does Forth solve the paradox? hughaguilar96@yahoo.com - 2014-11-15 12:47 -0800
              Re: Does Forth solve the paradox? albert@spenarnc.xs4all.nl (Albert van der Horst) - 2014-11-16 00:06 +0000
                Re: Does Forth solve the paradox? Paul E Bennett <Paul_E.Bennett@topmail.co.uk> - 2014-11-16 00:45 +0000
                Re: Does Forth solve the paradox? albert@spenarnc.xs4all.nl (Albert van der Horst) - 2014-11-16 13:39 +0000
      Re: Does Forth solve the paradox? Paul E Bennett <Paul_E.Bennett@topmail.co.uk> - 2014-11-06 19:54 +0000
  Re: Does Forth solve the paradox? Ilya Tarasov <ilya74.tarasov@gmail.com> - 2014-11-06 08:26 -0800
    Re: Does Forth solve the paradox? "Rod Pemberton" <buzzoff@nonamewhichexists.cmm> - 2014-11-06 16:57 -0500

csiph-web