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


Groups > comp.lang.python > #21855

Re: Programming D. E. Knuth in Python with the Deterministic Finite Automaton construct

Newsgroups comp.lang.python
From Albert van der Horst <albert@spenarnc.xs4all.nl>
Subject Re: Programming D. E. Knuth in Python with the Deterministic Finite Automaton construct
Date 2012-03-18 11:08 +0000
Message-ID <m12uyz.od0@spenarnc.xs4all.nl> (permalink)
Organization Dutch Forth Workshop
References <gR09r.22645$I33.16090@uutiset.elisa.fi>

Show all headers | View raw


In article <gR09r.22645$I33.16090@uutiset.elisa.fi>,
Antti J Ylikoski  <antti.ylikoski@tkk.fi> wrote:
>
>In his legendary book series The Art of Computer Programming,
>Professor Donald E. Knuth presents many of his algorithms in the form
>that they have been divided in several individual phases, with
>instructions to GOTO to another phase interspersed in the text of the
>individual phases.
>
>
>
>I. e. they look like the following, purely invented, example:  (Knuth is
>being clearer than me below.....)
>
>
>
>A1.  (Do the work of Phase A1.)  If <zap> then go to Phase A5,
>otherwise continue.
>
>A2.  (Do some work.) If <zorp> go to Phase A4.
>
>A3.  (Some more work.)
>
>A4.  (Do something.)  If <condition ZZZ> go to Phase A1.
>
>A5.  (Something more).  If <foobar> then go to Phase A2, otherwise
>end.

I can rewrite this into Python in my sleep, without resorting
to formal techniques.
Instead try one of the harder algorithms like T (Toom Cook)
that must be translated to recursive functions that pass
data down. That took me quite a wile.

The correct answer is, it is just labour. Deal with it.
Note that if you want to translate it to assembler, it is
relatively easy.

<SNIP>

>
>kind regards, Antti J Ylikoski
>Helsinki, Finland, the EU

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

Back to comp.lang.python | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Programming D. E. Knuth in Python with the Deterministic Finite Automaton construct Antti J Ylikoski <antti.ylikoski@tkk.fi> - 2012-03-17 16:03 +0200
  Re: Programming D. E. Knuth in Python with the Deterministic Finite Automaton construct Mel Wilson <mwilson@the-wire.com> - 2012-03-17 10:39 -0400
  Re: Programming D. E. Knuth in Python with the Deterministic Finite Automaton construct Kiuhnm <kiuhnm03.4t.yahoo.it> - 2012-03-17 15:45 +0100
    Re: Programming D. E. Knuth in Python with the Deterministic Finite Automaton construct Michael Torrie <torriem@gmail.com> - 2012-03-17 09:01 -0600
      Re: Programming D. E. Knuth in Python with the Deterministic Finite Automaton construct Kiuhnm <kiuhnm03.4t.yahoo.it> - 2012-03-17 16:12 +0100
        Re: Programming D. E. Knuth in Python with the Deterministic Finite Automaton construct Michael Torrie <torriem@gmail.com> - 2012-03-17 09:53 -0600
          Re: Programming D. E. Knuth in Python with the Deterministic Finite Automaton construct Kiuhnm <kiuhnm03.4t.yahoo.it> - 2012-03-17 18:55 +0100
            Re: Programming D. E. Knuth in Python with the Deterministic Finite Automaton construct Michael Torrie <torriem@gmail.com> - 2012-03-17 17:28 -0600
              Re: Programming D. E. Knuth in Python with the Deterministic Finite Automaton construct Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-03-18 01:54 +0000
                Re: Programming D. E. Knuth in Python with the Deterministic Finite Automaton construct Albert van der Horst <albert@spenarnc.xs4all.nl> - 2012-03-18 11:03 +0000
              Re: Programming D. E. Knuth in Python with the Deterministic Finite Automaton construct Kiuhnm <kiuhnm03.4t.yahoo.it> - 2012-03-19 02:02 +0100
                Re: Programming D. E. Knuth in Python with the Deterministic Finite Automaton construct Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2012-03-19 01:02 -0400
                Re: Programming D. E. Knuth in Python with the Deterministic Finite Automaton construct Kiuhnm <kiuhnm03.4t.yahoo.it> - 2012-03-19 11:24 +0100
  Re: Programming D. E. Knuth in Python with the Deterministic Finite Automaton construct Roy Smith <roy@panix.com> - 2012-03-17 11:47 -0400
    Re: Programming D. E. Knuth in Python with the Deterministic Finite Automaton construct Antti J Ylikoski <antti.ylikoski@tkk.fi> - 2012-03-17 18:31 +0200
      Re: Programming D. E. Knuth in Python with the Deterministic Finite Automaton construct John Nagle <nagle@animats.com> - 2012-03-17 11:44 -0700
  Re: Programming D. E. Knuth in Python with the Deterministic Finite Automaton construct Evan Driscoll <driscoll@cs.wisc.edu> - 2012-03-17 21:59 -0500
  Re: Programming D. E. Knuth in Python with the Deterministic Finite Automaton construct Albert van der Horst <albert@spenarnc.xs4all.nl> - 2012-03-18 11:08 +0000

csiph-web