From: Paul Donnelly on
Hugh Aguilar <hughaguilar96(a)yahoo.com> writes:

> I wrote a program to crack a linear-congruential encryption system in
> both Factor and Forth and obtained these times on my laptop:
> assembly-language 17 seconds
> SwiftForth 22 seconds
> Factor 9 minutes 14 seconds
> I expect that Common Lisp would be even worse than Factor, although I
> haven't tried it yet.

Why do you expect that? CL compilers are several decades more mature
than Factor's compiler.
From: Nicolas Neuss on
Hugh Aguilar <hughaguilar96(a)yahoo.com> writes:

> Learning PLT Scheme would have the benefit of allowing me to work on
> STAAPL, as that is the language Tom used. Maybe it would be a good
> idea for me to start out with a thin language such as Scheme and then
> graduate to a fat language such as Common Lisp when I'm feeling more
> ambitious. At the risk of sounding like a wimp, I'll admit that I am
> intimidated by Common Lisp; that is a really huge mountain to climb!

Since you are apparently interested in good performance I would surely
prefer Common Lisp (at least PLT Scheme is not the way to go).

Nicolas
From: Helmut Eller on
* Hugh Aguilar [2010-03-09 23:18+0100] writes:

> On Mar 9, 1:33 pm, Slobodan Blazeski <slobodan.blaze...(a)gmail.com>
> wrote:
>> I want to learn at least one concatenative language, since Joy is dead
>> will have to choose between Forth and Factor but that will have to
>> wait until we ship oops publish the app.
>
> I read about Joy but didn't try it. A problem with Joy was that it
> used the same syntax for quotations (code) and sequences (data).
> Factor uses square brackets for quotations and curly brackets for
> sequences, which simplifies the compiler and makes the language more
> powerful.

In Factor, quotations are sequences (but not all sequences are
quotations). Curly brackets { } are used for array literals; arrays are
also sequences.

> Isn't it true though, that Lisp is like Joy in that there is
> no syntactic difference between code and data? You use round brackets
> for both.

It depends. Some operators, most notably EVAL, can "execute" the list
representation of code. But usually the list representation is compiled
to something that can be executed more efficiently (typically machine
code) and compiled code is no longer a list. Macros in Lisp operate on
the list representation, though.

[...]
> The Factor community also has a concern about
> being "idiomatic," which is largely alien to the Forth culture. I read
> a little into that book "Let Over Lambda" and I liked the quote in the
> introduction: "Style is necessary only where understanding is
> missing."

I had the impression that Thinking Forth was concerned a lot with
style, conventions and the "Forth way" in general. I would also say
that well written Forth code, e.g. OpenFirmware, is highly stylized.

Helmut
From: Tim Bradshaw on
On 2010-03-09 18:28:15 +0000, Hugh Aguilar said:

> Do any of you guys on
> comp.lang.lisp know Forth? Lisp has always been described as "a
> programmable programming language." That is a pretty good description
> of Forth too. Other than Lisp and Forth, I don't know of any language
> that allows the programmer to write compile-time code --- our two
> languages are pretty much alone in that regard.

I wrote Forth before I wrote Lisp, and I had a look around for Forth
systems to play with recently again, though I failed to find anything I
could afford (I was really interested in something that would allow me
to tinker with controlling devices). Factor is a Forth-like language
which has a lot of Lispy features, and is pretty interesting.

I do think that Forth and Lisp should appeal to the same people (well,
they both appeal to me).

From: Tim Bradshaw on
On 2010-03-09 22:18:26 +0000, Hugh Aguilar said:

> Factor 9 minutes 14 seconds
> I expect that Common Lisp would be even worse than Factor, although I
> haven't tried it yet. The Factor community also has a concern about
> being "idiomatic," which is largely alien to the Forth culture. I read
> a little into that book "Let Over Lambda" and I liked the quote in the
> introduction: "Style is necessary only where understanding is
> missing."

[In my previous message I didn't realise you know about Factor, sorry
for that!]

From my experience (which is not enormous) with Factor I think that a
lot of CL systems should grind it into the dust in terms of
performance, although obviously this is implementation dependent.