Re: [Chicken-users] Re: YADT: yet another documentation thread

2008-02-16 Thread Graham Fawcett
On Feb 16, 2008 8:11 AM, Hans Nowak <[EMAIL PROTECTED]> wrote:

> Mark Fredrickson wrote:
> > I suggest we draft Hans (http://4.flowsnake.org/) for the Python doc.
> :-)
> I was actually going to write such a document last year... the Python
> programmer's guide to Chicken, or something.  As it turns out, I am much
> better
> at pointless blathering than at writing solid documentation. :-/  So for
> now, my
> "Python vs Scheme" posts will have to fill that void.


Just curious, how many of us on the list are (or were) Python users? I still
write and support a lot of Python code, and there was a time when I thought
of myself as a Pythonista. :-)

For the record, my language trajectory (where I've actually written serious
code) is C, Java, Python, Lisp, Scheme.

The CL community has a "My Road to Lisp" meme, where CL users write up a
quick story on how they "arrived". I'd *love* to hear people's My Road to
Chicken stories.

Graham
___
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] Re: YADT: yet another documentation thread

2008-02-16 Thread Shawn Rutledge
> For the record, my language trajectory (where I've actually written serious
> code) is C, Java, Python, Lisp, Scheme.

Mine was Pascal, C, C++, Java, Scheme (omitted less-serious stuff:
Logo, BASIC and Fortran from high school, Prolog, Perl... I've never
spent a lot of time with Perl but use it occasionally)   My current
job is a C++ one.


___
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] Re: YADT: yet another documentation thread

2008-02-16 Thread Elf


heh, my serious trajectory was ... gw-basic (bleh!), logo, lpc, c, c++, scheme,
prolog, scheme, java, scheme, lisp, scheme, scheme, scheme... 
(feel free to sing this to monty python's spam song, or to the 4-2-1 problem

if youd rather...)

... and my job is also (unfortunately) mostly c++ based.  but im trying to 
convince em that scheme is better, as always :)


-elf

On Sat, 16 Feb 2008, Shawn Rutledge wrote:


For the record, my language trajectory (where I've actually written serious
code) is C, Java, Python, Lisp, Scheme.


Mine was Pascal, C, C++, Java, Scheme (omitted less-serious stuff:
Logo, BASIC and Fortran from high school, Prolog, Perl... I've never
spent a lot of time with Perl but use it occasionally)   My current
job is a C++ one.


___
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users




___
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] Re: YADT: yet another documentation thread

2008-02-18 Thread Peter Bex
On Sat, Feb 16, 2008 at 05:03:47PM -0500, Graham Fawcett wrote:
> The CL community has a "My Road to Lisp" meme, where CL users write up a
> quick story on how they "arrived". I'd *love* to hear people's My Road to
> Chicken stories.

A little painful to admit, but I started out with BASIC on the C64, then got
a PC with QBASIC/QuickBASIC, then my first "real" language: C.  I stuck with
C for a long long time until I learned Scheme at university.  That was love
at first sight and I've been using it ever since :)  PLT first, then a little
bit of s48 and then Chicken.

At work I do a bit of Javascript programming (which is very Schemey), but
mostly in Ruby which I absolutely hate, as the #chicken crowd knows all too
well from my many rants about it :) (BTW, if nobody else is interested I'd
be happy to try my hand at a Ruby->Chicken tutorial).
Because of the many problems with Ruby, we're going to switch back to PHP...
Of course my secret plan is to sneak in Chicken as soon as I find an
opportunity to do so!

Cheers,
Peter
-- 
http://sjamaan.ath.cx
--
"The process of preparing programs for a digital computer
 is especially attractive, not only because it can be economically
 and scientifically rewarding, but also because it can be an aesthetic
 experience much like composing poetry or music."
-- Donald Knuth


pgpOU7xqJyPEW.pgp
Description: PGP signature
___
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] Re: YADT: yet another documentation thread

2008-02-18 Thread Mark Fredrickson


On Feb 18, 2008, at 12:45 PM, Peter Bex wrote:


On Sat, Feb 16, 2008 at 05:03:47PM -0500, Graham Fawcett wrote:
The CL community has a "My Road to Lisp" meme, where CL users write  
up a
quick story on how they "arrived". I'd *love* to hear people's My  
Road to

Chicken stories.


Pre-university:
BASIC. Pascal. C. C++.

University:
Rexx (I never discovered if this was a real language or just a  
teaching tool at my school. It's very similar to...) SML. Java. More C/ 
C++. More SML. Perl.


Post-university:
PHP. Ruby. JavaScript. Scheme (finally!)

I've been looking for my "go to" language for a long time. Ruby was a  
strong candidate, but Scheme takes what I like about Ruby and gives me  
more options. I looked at CL but found it weird and inconsistent. The  
little things matter. Now, I plan to plant myself firmly in Scheme and  
see where it takes me.



(BTW, if nobody else is interested I'd
be happy to try my hand at a Ruby->Chicken tutorial).


I too would be happy to help. I recently volunteered to give a Scheme  
introduction my local Ruby group.


-Mark



___
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] Re: YADT: yet another documentation thread

2008-02-18 Thread John Cowan
Mark Fredrickson scripsit:

> Rexx (I never discovered if this was a real language or just a  
> teaching tool at my school. 

Very real.  At one time it was the only scripting-style language
supported on OS/2, and it still exists in several forms, one of which
(NetRexx) runs on the Java VM.

See http://en.wikipedia.org/wiki/REXX .

-- 
John Cowan[EMAIL PROTECTED]http://ccil.org/~cowan
Nobody expects the RESTifarian Inquisition!  Our chief weapon is
surprise ... surprise and tedium  ... tedium and surprise 
Our two weapons are tedium and surprise ... and ruthless disregard
for unpleasant facts  Our three weapons are tedium, surprise, and
ruthless disregard ... and an almost fanatical devotion to Roy Fielding


___
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] Re: YADT: yet another documentation thread

2008-02-18 Thread Graham Fawcett
On Feb 18, 2008 1:45 PM, Peter Bex <[EMAIL PROTECTED]> wrote:

> On Sat, Feb 16, 2008 at 05:03:47PM -0500, Graham Fawcett wrote:
> > The CL community has a "My Road to Lisp" meme, where CL users write up a
> > quick story on how they "arrived". I'd *love* to hear people's My Road
> to
> > Chicken stories.
>
> A little painful to admit, but I started out with BASIC on the C64,


There's nothing embarrassing about that! Unless you mean that it's a sign of
your advanced age! ;-)

I started with BASIC on a Commodore PET when I was about 14. The first
computer I owned was a Commodore 64 -- I detasseled corn for a summer to
earn the cash. It was a *wonderful* machine, and I learned a lot of
languages on it: BASIC, COMAL, Forth, Logo and 6502 assembler.

Forth and Logo were revelations. Whatever strange things they did to my
brain have never really been undone. I remembered the 'head' and 'tail'
concepts from my adolescent Logo experiences; when I saw them much later in
Lisp and Scheme, I had a very strange feeling of deja vu.

The 6502 was the only CPU I ever really programmed assembly for. I had read
about cellular automata (probably Conway's Game of Life, and probably in a
Martin Gardner book) and managed to get a CA engine written in assembly that
was fast enough to run a game at a decent speed. It even had an opcode
system for describing the rules of the CA games. Not bad for a naive,
pre-Internet teenager! I wish I still had that code, but the audio-cassette
tape it was stored on has long since vanished.

Thanks for the trip down memory lane, Peter. ;-)

Graham
___
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] Re: YADT: yet another documentation thread

2008-02-19 Thread Alaric Snell-Pym


On 18 Feb 2008, at 6:45 pm, Peter Bex wrote:


A little painful to admit, but I started out with BASIC on the C64,
then got
a PC with QBASIC/QuickBASIC, then my first "real" language: C.  I
stuck with
C for a long long time until I learned Scheme at university.  That
was love
at first sight and I've been using it ever since :)  PLT first,
then a little
bit of s48 and then Chicken.


I started with BASIC on a ZX Spectrum, thence to Turbo BASIC on a PC
(an original PC! Not the XT, which had a hard disk, but a real PC
which had to have a 20MB hard disk on a card fitted, and would still
only boot from floppy!), then Pascal (again Borland's Turbo version),
then to 8086 assembly and C, more or less in parallel.

However, I was always taking books out of the library on other
languages. The local library was stocked with computer books in the
1970s and early 1980s when new programming languages weren't so
stigmatised as they are these days, so I read books on Lisp, FORTH,
FORTRAN, COBOL, Prolog and ADA as well as the ones I actually used;
but I didn't have any access to implementations.

But for my 14th birthday I was gifted with a then-new Demon Internet
account, and online, I found myself able to download implementations
of more languages, and access to Usenet: comp.lang.* in particular
caught my interest. I was confused about this concept of 'functional
programming' for a while, since all the descriptions of it I saw made
no sense. "Imagine programming without assignment" - uh, how would
*that* work?

So, for my 16th birthday, I asked my father for a stack of books I'd
heard recommendations of but hadn't been able to find. One of which
was SICP, which was my first introduction to Scheme. I also picked up
a book (well, *the* book, as far as I can tell) on Dylan, since that
seemed cool.

Anyway, I remember my surprise when, reading SICP, it said "Now we'll
cover assignment. What we've been doing so far is called 'functional'
programming", or words to that effect, since the way it was done so
far had all seemed perfectly sensible to me - I'd not actually
noticed the lack of assignment at all...

So yes, I liked the look of Scheme; it had a property I had begun to
notice in a few languages, that it simple to implement simply, yet
didn't preclude more efficient implementation in the way that, for
example, TCL with its everything-as-a-string would. This it had in
common with FORTH, and FORTH also had the fascinating metaprogramming
facility, not unlike defmacro (although I'd not come across macros in
the Lisp world at the time, with SICP rather skipping them).

However, I didn't have much chance to play with it in depth for a
while, since most of the programming I was doing required specific
libraries or whatever. Then I went off to University, where I had to
pick up a bunch of languages required for exercises: Java, Object-
Oriented Turing (a rather toy Modula-esque language), Haskell, a few
different assembly languages (as well as using C and Prolog, which I
knew anyway, but actually being forced to do exercises in Prolog
rather than just reading and thinking about it was a bit of an eye-
opener).

When it came to final year project time, however, I managed to talk
the lecturers into letting me do my own project rather than picking
one from their menu. And my project was in macro systems, as I had a
cunning plan to try and merge FORTH's metaprogramming system with
Scheme, which in effect involved a very low level macro system (I was
rather taken with minimalism in programming languages, you see).

Meanwhile, I was also working part time, so having to do more serious
Java, as well as PHP and a bit of Perl. I picked up Python myself out
of interest, since it looked like a better Perl.

Only recently did I have to learn Ruby. Ruby's... not *that* bad,
it's sort of half way between Python and Perl IMHO. So a bit cleaner
than Perl, but still with crufty misfeatures such as "do what I mean"
overloading, special core global variables like $_ and $` and all
that, regexps in the core language (there's more to life than
analysing strings, you know...), and so on. But Rails, however,
builds on top of that in entirely the wrong direction, and brings out
the worst of it.

ABS

--
Alaric Snell-Pym
Work: http://www.snell-systems.co.uk/
Play: http://www.snell-pym.org.uk/alaric/
Blog: http://www.snell-pym.org.uk/?author=4




___
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] Re: YADT: yet another documentation thread

2008-02-19 Thread Alaric Snell-Pym


On 19 Feb 2008, at 2:13 am, Graham Fawcett wrote:


The 6502 was the only CPU I ever really programmed assembly for. I
had read about cellular automata (probably Conway's Game of Life,
and probably in a Martin Gardner book)


Yay for Martin Gardner books! I also learnt a lot of fun things from
those :-)

ABS

--
Alaric Snell-Pym
Work: http://www.snell-systems.co.uk/
Play: http://www.snell-pym.org.uk/alaric/
Blog: http://www.snell-pym.org.uk/?author=4




___
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] Re: YADT: yet another documentation thread

2008-02-19 Thread Alaric Snell-Pym


On 18 Feb 2008, at 8:05 pm, Mark Fredrickson wrote:


I've been looking for my "go to" language for a long time. Ruby was
a strong candidate, but Scheme takes what I like about Ruby and
gives me more options. I looked at CL but found it weird and
inconsistent. The little things matter. Now, I plan to plant myself
firmly in Scheme and see where it takes me.



I guess I should say that I know I'd like to move on from Scheme one
day - but that day won't come until I've been able to implement the
thing myself ;-)

Pretty close to Scheme, though. Mainly, what I'd change is to
slightly extend s-expressions in a subtle way (introducing a
special syntax for records plus a means of namespacing symbols,
mainly), then drop mutability. Mutability is the main obstacle to
really kicking off with some of the more extreme optimisations and
interesting metaprogramming systems, and linear logic offers a far
cleaner approach to the concept of mutation in a pure functional
setting. However, Concurrent Clean, the only really extant linear
language at the moment, has a rather ugly syntax for complex multi-
step world-mutating operations, something roughly like:

someDialogue world::!World -> !World =
   let world' = print ("Hi, what's your name?" world) in
   let (world'', name) = input (world') in
   let world''' = print ("Hello, " . name, world'') in
   world'''

And don't even get me started on what happens when you have multiple
linear worldlines interacting.

What I propose instead, purely as syntactic sugar all done with
macros, is to have an 'algorithm' syntax that wraps a state machine
operating on one or more linear values, each of which has a name.
Each step in the algorithm is either a function call that may refer
to any number, N>=1 of linear state values, referred to by their
declared names, in which case the macros enforces that the first N
return values from that function are correctly typed to be the new
values of those linear state values, with the rest being available
for binding to names; or a control flow syntax. The result of the
algorithm macro is a function that accepts the initial values of the
linear state values and returns the final values, perhaps with extra
return values appended. So the above would be more like:

(define someDialogue
  (algorithm (world)
(print "Hi, what's your name?" world)
(let (name) (input world))
(print (string-append "Hello, " name) world)))

...but I need to experiment a bit to make sure it works properly.
Mainly with how the control flow is handled...

I'd like to implement this on terms of a FORTH-inspired VM, with
implementations of the VM that interpret it or go to native code.
Basing it on a FORTHy system means, among other things, that we get
the ability to do runtime compilation to native code if so desired:
"(lambda (a b c) x)", if x contains d, e, and f as free variables,
can just be a macro that expands to "(insert-free-variable-values-
into-closure (compile-closure-with-free-variables '(a b c) '(d e f)
'x) d e f)", if the compiler is smart enough to spot that the
(compile ...) is a constant subexpression and evaluate it at compile
time, even.

The compilation process onto my VM would, however, be very similar to
how Chicken works, even with a foreign-lambda type construct that
lets you write low-level FORTH opcodes or inline assembler (embedded
in FORTH) for things that must be speedy. I know I'm losing a lot by
not just doing what Chicken does and using GCC, but for various
reasons, I want to avoid GCC...

But I'm unlikely to have the time to build it for a couple of years
yet... So, I guess scheme will do for now ;-)

ABS

--
Alaric Snell-Pym
Work: http://www.snell-systems.co.uk/
Play: http://www.snell-pym.org.uk/alaric/
Blog: http://www.snell-pym.org.uk/?author=4




___
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] Re: YADT: yet another documentation thread

2008-02-19 Thread John Cowan
Alaric Snell-Pym scripsit:

> I'd like to implement this on terms of a FORTH-inspired VM, with
> implementations of the VM that interpret it or go to native code.

I take it you have read http://www.pipeline.com/~hbaker1/ForthStack.html ?

-- 
John Cowan  [EMAIL PROTECTED]http://ccil.org/~cowan
Big as a house, much bigger than a house, it looked to [Sam], a grey-clad
moving hill.  Fear and wonder, maybe, enlarged him in the hobbit's eyes,
but the Mumak of Harad was indeed a beast of vast bulk, and the like of him
does not walk now in Middle-earth; his kin that live still in latter days are
but memories of his girth and his majesty.  --"Of Herbs and Stewed Rabbit"


___
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] Re: YADT: yet another documentation thread

2008-02-19 Thread Alaric Snell-Pym


On 19 Feb 2008, at 5:11 pm, John Cowan wrote:


Alaric Snell-Pym scripsit:


I'd like to implement this on terms of a FORTH-inspired VM, with
implementations of the VM that interpret it or go to native code.


I take it you have read http://www.pipeline.com/~hbaker1/
ForthStack.html ?


Aye! Good 'ole Henry Baker! He's been quite an inspiration over the
years ;-)

ABS

--
Alaric Snell-Pym
Work: http://www.snell-systems.co.uk/
Play: http://www.snell-pym.org.uk/alaric/
Blog: http://www.snell-pym.org.uk/?author=4




___
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users