From: Howard Brazee on
On Tue, 20 Jul 2010 11:02:58 +1200, "Pete Dashwood"
<dashwood(a)removethis.enternet.co.nz> wrote:

> Why not do it in COBOL if that is what you are comfortable with?
>
>(COBOL stringing/unstringing facilities might be very useful for a word
>puzzler...)
>
>Procedural things like puzzle solving can be adequately done in COBOL
>although the solution may take a little more writing than in another
>language.

Finding a good compiler for my Mac might be harder than learning, say
Lisp.

--
"In no part of the constitution is more wisdom to be found,
than in the clause which confides the question of war or peace
to the legislature, and not to the executive department."

- James Madison
From: Howard Brazee on
On Mon, 19 Jul 2010 15:23:46 -0700 (PDT), "robertwessel2(a)yahoo.com"
<robertwessel2(a)yahoo.com> wrote:

>For such tasks, a functional language like Haskell would probably be
>your best bet.

What are the differences between taking up Haskell or taking up Lisp?

--
"In no part of the constitution is more wisdom to be found,
than in the clause which confides the question of war or peace
to the legislature, and not to the executive department."

- James Madison
From: Howard Brazee on
On Mon, 19 Jul 2010 22:02:00 -0700 (PDT), Richard
<riplin(a)Azonic.co.nz> wrote:

>OpenCOBOL is free and is alleged to run on a Mac.
>
>http://www.opencobol.org/
>
>I would suggest that you could run it under a web server to give a
>user interface on the browser. SVG graphics is supported by Safari.

That may be the easiest.

>If you want a different language then I use Python for most everything
>and it runs on almost every machine from phones to supercomputers.

What are the advantages of Python for my personal use on one computer?

Hmmm. Eventually I will be downsizing and getting rid of my
library. That will be hard, but at that time I will evaluate e-book
readers, and may choose something that has some computing power.
Technology changes rapidly, so it would be a guess what I'd get - but
that might be a good reason for selecting a language that is on a lot
of platforms.

--
"In no part of the constitution is more wisdom to be found,
than in the clause which confides the question of war or peace
to the legislature, and not to the executive department."

- James Madison
From: SkippyPB on
On Mon, 19 Jul 2010 09:44:14 -0600, Howard Brazee <howard(a)brazee.net>
wrote:

>
>I was thinking about my retirement, and I have written CoBOL programs
>that figured out puzzles and fun stuff. My choice of languages is
>based upon being a competent CoBOL programmer.
>
>Let's say I want to write a Sudoko puzzler, a Rubic's Cube solver, or
>a word puzzle solver. My home computer is a Mac and I expect this
>won't change when I retire.
>
>What languages would you recommend for such a person?

Back in the 80's I used to write a lot of Commodore Basic and
Commodore Assembler programs for fun and for myself. Had fun, taught
me a lot about PC programming and ASCII and all of that. Maybe you'd
want to take a leap and learn something you can run an an Apple or
learn whatever it is they write those phone apps in.

Regards,
--

////
(o o)
-oOO--(_)--OOo-



"We in the industry know that behind every successful
screenwriter stands a woman. And behind her stands his wife."
-- Groucho Marx
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Remove nospam to email me.

Steve
From: robertwessel2 on
On Jul 20, 10:44 am, Howard Brazee <how...(a)brazee.net> wrote:
> On Mon, 19 Jul 2010 15:23:46 -0700 (PDT), "robertwess...(a)yahoo.com"
>
> <robertwess...(a)yahoo.com> wrote:
> >For such tasks, a functional language like Haskell would probably be
> >your best bet.
>
> What are the differences between taking up Haskell or taking up Lisp?


Oh, dear, now *that's* a way to start a flame war...

For interminable discussions of Lisp vs. Haskell, just type that into
your favorite search engine.

Haskell is a pure functional language, and much smaller than Lisp.
Functional programming is very different from imperative programming.
Basically functions cannot have state or side effects, and can be
though of as doing something to their inputs (which are basically not
changeable), to produce an output. IOW, existing data (using the term
loosely) in immutable - let's say you have a tree, inserting a new
node into the tree leads to a new tree with the new node in it, the
old tree still exists (eventually, if you stop using the old tree,
it'll get garbage collected away). (And before anyone raises
efficiency concerns, the tree is almost never actually duplicated
under the hood, rather most of it's contents after the insertion
operation would get shared by the old an new trees).

By making all actions stateless, it eliminates huge classes of
possible bugs, and makes functions massively easier to analyze. To
make a poor analogy, by eliminating goto's, structured programming
allows us to better understand our programs by greatly reducing any
confusion about how we got to a particular place in the program
(remembering that the issue is not the goto itself, rather the label
where it goes). Eliminating variables takes that many steps further.

Spreadsheets are sometimes used as an example of a limited type of
functional programming - you specify cells as either being constants,
or as some sort of transformation of the contents of other cells, and
there's very limited notion of anything like assignment (in the sense
of assigning a new value to a variable). Spreadsheets have a host of
different problems, and don't really demonstrate anything that you
might want to call (relatively) bug-free coding.

Functional programs are very often considerably shorter than
equivalent imperative ones, most Haskell proponents claim 2-10 times
less than an equivalent C program, and that's probably realistic
(although not for newbies who are still trying to write imperative
code in Haskell).

Anyway, it's impossible to do the subject any justice in a few
sentences, and I'll refer you to the Haskell Wiki instead:

http://www.haskell.org/haskellwiki/Haskell

Lisp, OTOH, is, well, Lisp. You can do anything in Lisp, including
functional programming. Lisp in many ways is not so much a language,
but en environment for creating new languages/paradigms/etc. It might
actually be a bit easier to transition into Lisp from an imperative
background (since you reasonably hack out fairly imperative style
code). Lisp is, in practice, a fairly large language. The "core"
language is quite small (insofar as that's distinct from everything
else), but you really need the massive library that comes with it to
do anything. In some senses it suffers the same multi-paradigm
problem as does C++, and a common problem is that programs written in
one style or paradigm are difficult to understand to practitioners of
another. IMO, becoming an expert at Lisp is a rather bigger
undertaking that doing so for Haskell. Which is not to say that Lisp
isn't worth learning, although I'd probable steer you towards Scheme
rather than Common Lisp on your first outing.

And if you're coming from a Cobol, or most imperative backgrounds,
you'll find either to be visually shocking experiences (although
totally unlike each other). But syntax is just syntax.

And there are several decent implementations of Haskell, Scheme and
Common Lisp for the Mac.