From: Kenny Tilton
Subject: Calling All Noobs: Mini RtL Survey
Date: 
Message-ID: <qvfwf.30653$GW1.13862@news-wrt-01.rdc-nyc.rr.com>
So WTF? This used to be a nice, restful graveyard. Past few months have 
gotten ridiculous. What are all you noobs doing here?

0. Hero worship: http://www-formal.stanford.edu/jmc/frames.html
1. Paul Graham
2. Peter Seibel
3. The Reddit Incident (nah, too recent)
4. Java finally got to me (and what took it so long)
5. http://wiki.alu.org/The%20Road%20to%20Lisp%20Survey
6. The Savages of comp.lang.lisp are good training for the Bulls of Pamplona
7. Other ________________________________________

thx,

kenny

ps. And stop stepping on my flowers

From: Creighton Hogg
Subject: Re: Calling All Noobs: Mini RtL Survey
Date: 
Message-ID: <Pine.LNX.4.58.0601081652470.2590@login01.hep.wisc.edu>
On Sun, 8 Jan 2006, Kenny Tilton wrote:

> So WTF? This used to be a nice, restful graveyard. Past few months have 
> gotten ridiculous. What are all you noobs doing here?
> 
> 0. Hero worship: http://www-formal.stanford.edu/jmc/frames.html
> 1. Paul Graham
> 2. Peter Seibel
> 3. The Reddit Incident (nah, too recent)
> 4. Java finally got to me (and what took it so long)
> 5. http://wiki.alu.org/The%20Road%20to%20Lisp%20Survey
> 6. The Savages of comp.lang.lisp are good training for the Bulls of Pamplona
> 7. Other ________________________________________
> 
> thx,
> 
> kenny
> 
> ps. And stop stepping on my flowers

I got into Lisp a few months ago because of looking into 
Genetic Programming and the writings of St. Graham the 
Advocator.  I don't even like alot of what he says, but damn 
he can be persuasive.
From: Sylvain
Subject: Re: Calling All Noobs: Mini RtL Survey
Date: 
Message-ID: <NfGdnaEm4-5AO1zeRVn-iw@speakeasy.net>
Creighton Hogg wrote:
> of St. Graham the
> Advocator.  I don't even like alot of what he says, but damn 
> he can be persuasive.

same here,  I kinda cringe when he says you're no better
than dead when you are over 38 -- not quite in so many
words but that's the gist of it -- but that's how I got
interested too.

--Sylvain (a 'runner' and proud of it)
From: ········@gmail.com
Subject: Re: Calling All Noobs: Mini RtL Survey
Date: 
Message-ID: <1136769581.708147.124060@g43g2000cwa.googlegroups.com>
>7. Other ________________________________________

Common Lisp was my first language. I developed a stereo vision and a
natural language parsing algorithm with pen and paper not knowing what
programming was. (I had recently dropped out of the English department
of the local uni and was kind of searching for direction) I read on the
internet that there was this thing called "lisp" that people used for
"ai". So I bought a book on C  and a book on lisp. Three days later I
took the book on C back, I had this immediate "oh shit" reaction to
lisp that I'd never gotten from anything else before.

Two later I took a week off of work and drove down to ILC 05 to see
what's up. I think the people I met and the things I saw people had
done have also had a huge effect.

>1. Paul Graham
>2. Peter Seibel

The book was ANSI Common Lisp. I bought PCL at ILC 05. Both were
excellent, IMHO

8. _______I_Didn't_Know_Any_Better___________________

Nick
From: ········@gmail.com
Subject: Re: Calling All Noobs: Mini RtL Survey
Date: 
Message-ID: <1136778219.090427.204170@f14g2000cwb.googlegroups.com>
>Two later I took a week off of work and drove down to ILC 05 to see
>what's up.

Two [months] later I took a week off of work and drove down to ILC 05
to see 
what's up.

;)

nick
From: micromoog
Subject: Re: Calling All Noobs: Mini RtL Survey
Date: 
Message-ID: <1136771005.875380.10600@g49g2000cwa.googlegroups.com>
Kenny Tilton wrote:
> So WTF? This used to be a nice, restful graveyard. Past few months have
> gotten ridiculous. What are all you noobs doing here?
>
> 0. Hero worship: http://www-formal.stanford.edu/jmc/frames.html
> 1. Paul Graham
> 2. Peter Seibel
> 3. The Reddit Incident (nah, too recent)
> 4. Java finally got to me (and what took it so long)
> 5. http://wiki.alu.org/The%20Road%20to%20Lisp%20Survey
> 6. The Savages of comp.lang.lisp are good training for the Bulls of Pamplona
> 7. Other ________________________________________


My eventual goal is to learn Common Music
(http://commonmusic.sourceforge.net), which is a set of Lisp libraries.
 Properly learning Lisp itself has been so interesting, though, that
I've yet to return to the original task.

Paul Graham's essays helped too.

I don't know if you use Reddit (collective scream), but the "Hot" list
has been carrying a number of Lisp- and functional-programming-related
articles pretty much every day.  And I don't think this has anything to
do with the language it was originally written in ;)  There does indeed
seem to be a general increase in interest in Lisp.
From: ······@corporate-world.lisp.de
Subject: Re: Calling All Noobs: Mini RtL Survey
Date: 
Message-ID: <1136798988.105280.230170@g14g2000cwa.googlegroups.com>
micromoog schrieb:

> My eventual goal is to learn Common Music
> (http://commonmusic.sourceforge.net), which is a set of Lisp libraries.
>  Properly learning Lisp itself has been so interesting, though, that
> I've yet to return to the original task.

Then don't miss the excellent book 'Notes from the Metalevel' by
Heinrich K. Taube,
which explains Common Music usage in depth. It also comes with
a CDROM with the examples as Lisp sources. A 'must have' for any
serious Common Music user.

>
> Paul Graham's essays helped too.
>
> I don't know if you use Reddit (collective scream), but the "Hot" list
> has been carrying a number of Lisp- and functional-programming-related
> articles pretty much every day.  And I don't think this has anything to
> do with the language it was originally written in ;)  There does indeed
> seem to be a general increase in interest in Lisp.
From: micromoog
Subject: Re: Calling All Noobs: Mini RtL Survey
Date: 
Message-ID: <1136819938.930753.54220@z14g2000cwz.googlegroups.com>
······@corporate-world.lisp.de wrote:
> micromoog schrieb:
>
> > My eventual goal is to learn Common Music
> > (http://commonmusic.sourceforge.net), which is a set of Lisp libraries.
> >  Properly learning Lisp itself has been so interesting, though, that
> > I've yet to return to the original task.
>
> Then don't miss the excellent book 'Notes from the Metalevel' by
> Heinrich K. Taube,
> which explains Common Music usage in depth. It also comes with
> a CDROM with the examples as Lisp sources. A 'must have' for any
> serious Common Music user.
>

I just gave it to myself for Christmas :)  As soon as I get through _A
Gentle Introduction to Symbolic Computation_, I plan to delve in.  I've
been cracking it open now and then to random pages, and so far every
one has seemed way too much fun.
From: GP lisper
Subject: Re: Calling All Noobs: Mini RtL Survey
Date: 
Message-ID: <slrnds46al.b4k.spambait@phoenix.clouddancer.com>
On Sun, 08 Jan 2006 21:29:58 GMT, <·············@nyc.rr.com> wrote:
> What are all you noobs doing here?
>
> 7. Other ________________________________________

The 15 year old software I wanted to run was written in near ANSI
lisp.  Now it is too late to turn back...


-- 
If you don't like LOOP, how do you feel about DOLIST ?
From: Kenny Tilton
Subject: Re: Calling All Noobs: Mini RtL Survey
Date: 
Message-ID: <Xlqwf.50422$Ed.31804@news-wrt-01.rdc-nyc.rr.com>
GP lisper wrote:
> On Sun, 08 Jan 2006 21:29:58 GMT, <·············@nyc.rr.com> wrote:
> 
>>What are all you noobs doing here?
>>
>>7. Other ________________________________________
> 
> 
> The 15 year old software I wanted to run was written in near ANSI
> lisp.  Now it is too late to turn back...
> 
> 

the punch line would be if you ended up tossing the 15 year-old software 
but kept on using the language in which it was written.

:)

kt
From: GP lisper
Subject: Re: Calling All Noobs: Mini RtL Survey
Date: 
Message-ID: <slrnds66so.b4k.spambait@phoenix.clouddancer.com>
On Mon, 09 Jan 2006 09:50:47 GMT, <·············@nyc.rr.com> wrote:
> GP lisper wrote:
>> On Sun, 08 Jan 2006 21:29:58 GMT, <·············@nyc.rr.com> wrote:
>> 
>>>What are all you noobs doing here?
>>>
>>>7. Other ________________________________________
>> 
>> The 15 year old software I wanted to run was written in near ANSI
>> lisp.  Now it is too late to turn back...
>
> the punch line would be if you ended up tossing the 15 year-old software 
> but kept on using the language in which it was written.

Oh, I've kept using CL, with many thanks to you along the way.  I
won't toss that software, it's a bit too valuable, but I do know how
improve it now.


-- 
If you don't like LOOP, how do you feel about DOLIST ?
From: Ulrich Hobelmann
Subject: Re: Calling All Noobs: Mini RtL Survey
Date: 
Message-ID: <42eqbcF1ip8meU3@individual.net>
GP lisper wrote:
> On Sun, 08 Jan 2006 21:29:58 GMT, <·············@nyc.rr.com> wrote:
>> What are all you noobs doing here?
>>
>> 7. Other ________________________________________
> 
> The 15 year old software I wanted to run was written in near ANSI
> lisp.  Now it is too late to turn back...

Hehe, sounds like the ultimate trap.  Just like Unix lured us all into 
using C, and Windows made it C++.  The Mac sports ObjC, so I guess we 
have to wait for Movitz ;)

-- 
the bottom line is that a JavaSchool that won't teach C and won't teach
Scheme is not really teaching computer science, either.  --  Joel Spolsky
From: GP lisper
Subject: Re: Calling All Noobs: Mini RtL Survey
Date: 
Message-ID: <slrnds67cr.b4k.spambait@phoenix.clouddancer.com>
On Mon, 09 Jan 2006 10:56:59 +0100, <···········@web.de> wrote:
> GP lisper wrote:
>> On Sun, 08 Jan 2006 21:29:58 GMT, <·············@nyc.rr.com> wrote:
>>> What are all you noobs doing here?
>>>
>>> 7. Other ________________________________________
>> 
>> The 15 year old software I wanted to run was written in near ANSI
>> lisp.  Now it is too late to turn back...
>
> Hehe, sounds like the ultimate trap.

It was, but it helped that there was a published paper that pretty
much lined me up pointing at lisp, after previously trying with
another language.  That paper+code was good enough to see me thru the
effort of 'learning lisp' after I recognized that lisp is orthogonal
to every other language I've learned.  After that, it was too late and
lisp is clearly the last language I will ever learn. As basically an
assembly language programmer, it's scary nowdays to start thinking
(sometimes) in CLOS.
From: Rob Warnock
Subject: Re: Calling All Noobs: Mini RtL Survey
Date: 
Message-ID: <DJqdncuoKsfQNVneRVn-gA@speakeasy.net>
GP lisper  <········@clouddancer.com> wrote:
+---------------
| As basically an assembly language programmer, it's scary nowdays
| to start thinking (sometimes) in CLOS.
+---------------

You want scary? I'll give you scary! Try peeking & poking hardware
registers from within CMUCL, heh-heh!  MMAP some hardware into your VM
and then do (setf (system:sap-ref-32 (system:int-sap addr) 0) new-value)
[which in C is "*((u32*)(addr)+0) = new-value"]. I have a whole toolkit
of such low-level hacks that I use to do user-mode debugging of hardware
at my current POE.

Long ago [1992] at a PPOE, I did it in Tcl, with a C bolt-on (DSO) for
the low-level stuff. Then I moved to SCM, then to MzScheme, and now
finally to CMUCL -- which turns out to be able to do the whole thing
inside the language, without the grotty C DSO add-on. [Though if you
*need* a grotty DSO add-on for something, CMUCL can handle that, too.]


-Rob

-----
Rob Warnock			<····@rpw3.org>
627 26th Avenue			<URL:http://rpw3.org/>
San Mateo, CA 94403		(650)572-2607
From: Edi Weitz
Subject: Re: Calling All Noobs: Mini RtL Survey
Date: 
Message-ID: <uk6d76s9p.fsf@agharta.de>
On Wed, 11 Jan 2006 00:40:13 -0600, ····@rpw3.org (Rob Warnock) wrote:

> You want scary? I'll give you scary! Try peeking & poking hardware
> registers from within CMUCL, heh-heh!  MMAP some hardware into your
> VM and then do (setf (system:sap-ref-32 (system:int-sap addr) 0)
> new-value) [which in C is "*((u32*)(addr)+0) = new-value"]. I have a
> whole toolkit of such low-level hacks that I use to do user-mode
> debugging of hardware at my current POE.

Sounds interesting.  Do you have plans to make that publicly
available?

Cheers,
Edi.

-- 

Lisp is not dead, it just smells funny.

Real email: (replace (subseq ·········@agharta.de" 5) "edi")
From: Rob Warnock
Subject: low-level hacking [was Re: Calling All Noobs... ]
Date: 
Message-ID: <G_qdnfy3B944eFnenZ2dnUVZ_v2dnZ2d@speakeasy.net>
Edi Weitz  <········@agharta.de> wrote:
+---------------
|  ····@rpw3.org (Rob Warnock) wrote:
| > You want scary? I'll give you scary! Try peeking & poking hardware
| > registers from within CMUCL, heh-heh!  MMAP some hardware into your
| > VM and then do (setf (system:sap-ref-32 (system:int-sap addr) 0)
| > new-value) [which in C is "*((u32*)(addr)+0) = new-value"]. I have a
| > whole toolkit of such low-level hacks that I use to do user-mode
| > debugging of hardware at my current POE.
| 
| Sounds interesting. Do you have plans to make that publicly available?
+---------------

I guess I could put up the very lowest-level stuff (~150 lines), but:

1. It's more a set of patterns than a true "module". It all loads
   into the "CL-USER" package, since that's where I usually work.

2. I don't have a fully fleshed-out example of how to use it for
   something serious that's not proprietary to some current or
   previous employer [most real applications involve page after page
   of symbolic hardware register locations and bit definitions!].

3. The low-level stuff isn't very useful if you don't have any
   interesting mmap'able hardware lying around you want to poke at...  ;-}

4. If applied to introspection of CMUCL itself [I've been using it
   for some of that lately], much of it is *NOT* GC-safe. You have
   to be very sure you know what you're doing, and sometimes need
   to do a (GC :FULL T) before starting a sequence of operations
   [or maybe wrap a SYSTEM:WITHOUT-GCING around it].

5. Calling MAKE-LISP-OBJ with a bad argument can easily crash CMUCL,
   and maybe your system.

6. You have to un CMUCL as root to mmap I/O memory space. Running
   CMUCL as root can crash your system. YOU HAVE BEEN WARNED!

But if you really think anyone else would find it useful...  ;-}  ;-}

Most of it is just abbreviations and shortcuts to facilities
that are already in CMUCL for anyone who looks at the source,
e.g., MAKE-LISP-OBJ is just (IMPORT 'KERNEL:MAKE-LISP-OBJ);
R32 and W32 are just SYSTEM:SAP-REF-32 wrappers:

    (defun r32 (addr)
      (declare (optimize (speed 3) (debug 0) (safety 0)))
      (system:sap-ref-32 (system:int-sap addr) 0))

    (defun w32 (addr &rest values)
      (declare (optimize (speed 3) (debug 0) (safety 0)))
      (loop for i fixnum from 0 by 4
	    and v of-type (unsigned-byte 32) in values
	do (setf (system:sap-ref-32 (system:int-sap addr) i) v))
      (values))

R8/W8/R16/W16 are similar, and D32 (formerly named DUMP32) is just
a loop around R32 & FORMAT. My MMAP is just a thin wrapper around
UNIX:UNIX-MMAP with a slightly simplified calling sequence for the
cases I mostly use, a typical use being (MMAP "/dev/mem" PCI-BUS-ADDRESS T)
[where the PCI bus address is where some device register got mapped
by the BIOS, which on Linux you find out *manually* with "lspci"]:

    (defun mmap (file offset length &optional write-p)
      (let* ((ofs32 (if (zerop (logand offset #x80000000))
		      offset
		      (- offset #x100000000))) ; Fake up a "(signed-byte 32)"
	     (mode (logior #+linux unix::O_SYNC     ; Not on BSD (*sigh*)
			   (if write-p unix:O_RDWR unix:O_RDONLY)))
	     (fd (unix:unix-open file mode 0)))
	(if (not fd)
	  (error "Can't open ~s: ~s" file (unix:get-unix-error-msg))
	  (unwind-protect
	      (let ((mode (logior unix:PROT_READ
				  (if write-p unix:PROT_WRITE 0))))
		(system:sap-int
		  (unix:unix-mmap nil length mode unix:MAP_SHARED fd ofs32)))
	    (unix:unix-close fd)))))

Is this level stuff really interesting to others?


-Rob

-----
Rob Warnock			<····@rpw3.org>
627 26th Avenue			<URL:http://rpw3.org/>
San Mateo, CA 94403		(650)572-2607
From: Edi Weitz
Subject: Re: low-level hacking
Date: 
Message-ID: <uy81n58h6.fsf@agharta.de>
On Wed, 11 Jan 2006 05:01:57 -0600, ····@rpw3.org (Rob Warnock) wrote:

> But if you really think anyone else would find it useful...  ;-} ;-}

Hehe, thanks.

> Is this level stuff really interesting to others?

Not immediately.  But I have a project in preparation where this might
turn out to be useful.  And, anyway, it's always nice to know what's
already out there... :)

Thanks,
Edi.

-- 

Lisp is not dead, it just smells funny.

Real email: (replace (subseq ·········@agharta.de" 5) "edi")
From: John Thingstad
Subject: Re: low-level hacking [was Re: Calling All Noobs... ]
Date: 
Message-ID: <op.s27ovvqcpqzri1@mjolner.upc.no>
On Wed, 11 Jan 2006 12:01:57 +0100, Rob Warnock <····@rpw3.org> wrote:


>
>     (defun w32 (addr &rest values)
>       (declare (optimize (speed 3) (debug 0) (safety 0)))
>       (loop for i fixnum from 0 by 4
> 	    and v of-type (unsigned-byte 32) in values
> 	do (setf (system:sap-ref-32 (system:int-sap addr) i) v))
>       (values))
>

Speaking of which the type declarations in the loop variable really
interested me. If fills a whole which declare can't cover.
But it dosn't seem to work in LspWorks.
Is this a SBCL spesific addition?

-- 
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
From: Rob Warnock
Subject: Re: low-level hacking [was Re: Calling All Noobs... ]
Date: 
Message-ID: <RZydnUG_dO3RaVnenZ2dnUVZ_tednZ2d@speakeasy.net>
John Thingstad <··············@chello.no> wrote:
+---------------
| Rob Warnock <····@rpw3.org> wrote:
| > (defun w32 (addr &rest values)
| >   (declare (optimize (speed 3) (debug 0) (safety 0)))
| >   (loop for i fixnum from 0 by 4
| > 	    and v of-type (unsigned-byte 32) in values
| >     do (setf (system:sap-ref-32 (system:int-sap addr) i) v))
| >     (values))
| 
| Speaking of which the type declarations in the loop variable
| really interested me. If fills a whole which declare can't cover.
| But it dosn't seem to work in LspWorks. Is this a SBCL spesific addition?
+---------------

Nope, it's right in the CLHS:

    http://www.lispworks.com/documentation/HyperSpec/Body/06_ai.htm
    6.1.9 Notes about Loop

    Types can be supplied for loop variables. It is not necessary to
    supply a type for any variable, but supplying the type can ensure
    that the variable has a correctly typed initial value, and it can
    also enable compiler optimizations (depending on the implementation). 

I'm using CMUCL, but I suspect SBCL is similar. And CLISP has no
problem with it.

Various sub-forms can take a TYPE-SPEC, though the "for-as-arithmetic"
sub-form is probably the most common usage:

    http://www.lispworks.com/documentation/HyperSpec/Body/m_loop.htm#loop
    ...
    with-clause::= with var1 [type-spec] [= form1]
		     {and var2 [type-spec] [= form2]}* 
    ...
    numeric-accumulation::= {count | counting | sum | summing | } 
			     maximize | maximizing | minimize | minimizing
			     {form | it} [into simple-var] [type-spec] 
    ...
    for-as-arithmetic::= var [type-spec] for-as-arithmetic-subclause
    ...
    for-as-in-list::= var [type-spec] in form1 [by step-fun] 

    for-as-on-list::= var [type-spec] on form1 [by step-fun] 

    for-as-equals-then::= var [type-spec] = form1 [then form2] 

    for-as-across::= var [type-spec] across vector 

UNSIGNED-BYTE is also standard:

    http://www.lispworks.com/documentation/HyperSpec/Body/t_unsgn_.htm

What Lispworks *might* not have is (UNSIGNED-BYTE 32) as a type
you can use in LOOP. Or it might require the optional OF-TYPE in
the FIXNUM declaration: Try replacing the "FOR I FIXNUM ..." with
"FOR I OF-TYPE FIXNUM ...". If that doesn't fix it, I'd file a bug.


-Rob

p.s.: The SYSTEM:SAP-REF-32 & SYSTEM:INT-SAP functions above
*are* unique to CMUCL, but that wasn't what you asked about.

-----
Rob Warnock			<····@rpw3.org>
627 26th Avenue			<URL:http://rpw3.org/>
San Mateo, CA 94403		(650)572-2607
From: Thomas F. Burdick
Subject: Re: low-level hacking [was Re: Calling All Noobs... ]
Date: 
Message-ID: <xcv8xtm4x03.fsf@conquest.OCF.Berkeley.EDU>
····@rpw3.org (Rob Warnock) writes:

> p.s.: The SYSTEM:SAP-REF-32 & SYSTEM:INT-SAP functions above
> *are* unique to CMUCL, but that wasn't what you asked about.

Well, CMUCL and SBCL, and possibly Scieneer.  They're probably common
to all SPICE-derived Lisps, though those three are probably the only
ones surviving.

-- 
           /|_     .-----------------------.                        
         ,'  .\  / | Free Mumia Abu-Jamal! |
     ,--'    _,'   | Abolish the racist    |
    /       /      | death penalty!        |
   (   -.  |       `-----------------------'
   |     ) |                               
  (`-.  '--.)                              
   `. )----'                               
From: Edi Weitz
Subject: Re: low-level hacking
Date: 
Message-ID: <upsmz55wg.fsf@agharta.de>
On Wed, 11 Jan 2006 12:29:45 +0100, "John Thingstad" <··············@chello.no> wrote:

> On Wed, 11 Jan 2006 12:01:57 +0100, Rob Warnock <····@rpw3.org> wrote:
>
>>       (loop for i fixnum from 0 by 4
>
> Speaking of which the type declarations in the loop variable really
> interested me. If fills a whole which declare can't cover.
> But it dosn't seem to work in LspWorks.

Why do you think that?

  CL-USER 11 > (pprint (macroexpand '(loop for i below 4 collect i)))

  (BLOCK NIL
    (MACROLET ((LOOP-FINISH () '(GO #:|end-loop-7571|)))
      (LET ((#:|to-7574| 4) (#:|by-7575| 1) (I 0))
        (LET ((#:|accumulator-7572| (LIST NIL)))
          (DECLARE (TYPE LIST #:|accumulator-7572|))
          (LET ((#:|aux-var-7577| #:|accumulator-7572|))
            (TAGBODY (PROGN (WHEN (OR (>= I #:|to-7574|)) (GO #:|end-loop-7571|)))
             #:|begin-loop-7570| (SETQ #:|aux-var-7577| (LAST (RPLACD #:|aux-var-7577| (LIST I))))
                     (PROGN
                       (LET ((#:|temp-7576| (+ I #:|by-7575|))) (SETQ I #:|temp-7576|))
                       (WHEN (OR (>= I #:|to-7574|)) (GO #:|end-loop-7571|)))
                     (GO #:|begin-loop-7570|)
             #:|end-loop-7571| (RETURN-FROM NIL (CDR #:|accumulator-7572|))))))))

  CL-USER 12 > (pprint (macroexpand '(loop for i fixnum below 4 collect i)))

  (BLOCK NIL
    (MACROLET ((LOOP-FINISH () '(GO #:|end-loop-7579|)))
      (LET ((#:|to-7582| 4) (#:|by-7583| 1) (I 0))
        (DECLARE (TYPE FIXNUM I))    ;;  <------- LOOK HERE
        (LET ((#:|accumulator-7580| (LIST NIL)))
          (DECLARE (TYPE LIST #:|accumulator-7580|))
          (LET ((#:|aux-var-7585| #:|accumulator-7580|))
            (TAGBODY (PROGN (WHEN (OR (>= I #:|to-7582|)) (GO #:|end-loop-7579|)))
             #:|begin-loop-7578| (SETQ #:|aux-var-7585| (LAST (RPLACD #:|aux-var-7585| (LIST I))))
                     (PROGN
                       (LET ((#:|temp-7584| (+ I #:|by-7583|))) (SETQ I #:|temp-7584|))
                       (WHEN (OR (>= I #:|to-7582|)) (GO #:|end-loop-7579|)))
                     (GO #:|begin-loop-7578|)
             #:|end-loop-7579| (RETURN-FROM NIL (CDR #:|accumulator-7580|))))))))

> Is this a SBCL spesific addition?

It can be found in the ANSI spec.  (Besides, Rob's code was for CMUCL
and not for SBCL, IIRC.)

Cheers,
Edi.

-- 

Lisp is not dead, it just smells funny.

Real email: (replace (subseq ·········@agharta.de" 5) "edi")
From: John Thingstad
Subject: Re: low-level hacking
Date: 
Message-ID: <op.s28oaut8pqzri1@mjolner.upc.no>
On Wed, 11 Jan 2006 13:02:39 +0100, Edi Weitz <········@agharta.de> wrote:

> (pprint (macroexpand '(loop for i fixnum below 4 collect i)))

Yes. Funny.. It seems to work with you example.
I tried of-type (integer 32) and that worked too.
Can't see why it didn't work with my code.
Anyhow thanks for the replies.

-- 
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
From: Ivan Boldyrev
Subject: Re: low-level hacking
Date: 
Message-ID: <6j8h93-nnv.ln1@ibhome.cgitftp.uiggm.nsc.ru>
On 9351 day of my life Rob Warnock wrote:
> 6. You have to un CMUCL as root to mmap I/O memory space. Running
>    CMUCL as root can crash your system. YOU HAVE BEEN WARNED!

Can (unix:unix-setuid +BLA-BLA-BLA+) after mmap'ing help?

-- 
Ivan Boldyrev

                        Today is the first day of the rest of your life.
From: Rob Warnock
Subject: Re: low-level hacking
Date: 
Message-ID: <sOSdndOnkbULwVreRVn-sw@speakeasy.net>
Ivan Boldyrev  <···············@cgitftp.uiggm.nsc.ru> wrote:
+---------------
| Rob Warnock wrote:
| > 6. You have to un CMUCL as root to mmap I/O memory space. Running
| >    CMUCL as root can crash your system. YOU HAVE BEEN WARNED!
| 
| Can (unix:unix-setuid +BLA-BLA-BLA+) after mmap'ing help?
+---------------

Not really, since mainly it's what you do with the MMAP'd area
that's potentially dangerous [regardless of which UID you do it
with]. E.g., if you reset a PCI device and don't restore the BARs
(or don't restore them correctly!) before the next time the O/S
touches that device... *BOOM!*


-Rob

-----
Rob Warnock			<····@rpw3.org>
627 26th Avenue			<URL:http://rpw3.org/>
San Mateo, CA 94403		(650)572-2607
From: Ivan Boldyrev
Subject: Re: low-level hacking
Date: 
Message-ID: <bqtm93-cg4.ln1@ibhome.cgitftp.uiggm.nsc.ru>
On 9353 day of my life Rob Warnock wrote:
> Ivan Boldyrev  <···············@cgitftp.uiggm.nsc.ru> wrote:
> +---------------
> | Rob Warnock wrote:
> | > 6. You have to un CMUCL as root to mmap I/O memory space. Running
> | >    CMUCL as root can crash your system. YOU HAVE BEEN WARNED!
> | 
> | Can (unix:unix-setuid +BLA-BLA-BLA+) after mmap'ing help?
> +---------------
>
> Not really, since mainly it's what you do with the MMAP'd area
> that's potentially dangerous [regardless of which UID you do it
> with]. E.g., if you reset a PCI device and don't restore the BARs
> (or don't restore them correctly!) before the next time the O/S
> touches that device... *BOOM!*

But it is dangerous with any programming language.  Why "CMUCL as root
can crash your system"?  Anything as root can crash it :)

-- 
Ivan Boldyrev

                       Perl is a language where 2 x 2 is not equal to 4.
From: Rob Warnock
Subject: Re: low-level hacking
Date: 
Message-ID: <IcOdnfp6bN0rm1feRVn-pw@speakeasy.net>
Ivan Boldyrev  <···············@cgitftp.uiggm.nsc.ru> wrote:
+---------------
| But it is dangerous with any programming language.  Why "CMUCL as
| root can crash your system"?  Anything as root can crash it :)
+---------------

Just so.  ;-}


-Rob

-----
Rob Warnock			<····@rpw3.org>
627 26th Avenue			<URL:http://rpw3.org/>
San Mateo, CA 94403		(650)572-2607
From: James Bielman
Subject: Re: Calling All Noobs: Mini RtL Survey
Date: 
Message-ID: <87u0c91rn2.fsf@jamesjb.com>
Edi Weitz <········@agharta.de> writes:

> On Wed, 11 Jan 2006 00:40:13 -0600, ····@rpw3.org (Rob Warnock) wrote:
>
>> You want scary? I'll give you scary! Try peeking & poking hardware
>> registers from within CMUCL, heh-heh!  MMAP some hardware into your
>> VM and then do (setf (system:sap-ref-32 (system:int-sap addr) 0)
>> new-value) [which in C is "*((u32*)(addr)+0) = new-value"]. I have a
>> whole toolkit of such low-level hacks that I use to do user-mode
>> debugging of hardware at my current POE.
>
> Sounds interesting.  Do you have plans to make that publicly
> available?

FWIW, the CFFI library is largely implemented in terms of a low-level
interface like this.  It could be useful for doing this sort of
unsavory pointer manipulation in multiple implementations (but heed
its pre-release status!).

There is also a draft addition to the spec for doing block copies from
Lisp vectors to pointers and vice versa (falling back to loops and
single-element access if necessary).

Rob's expression above looks like this in CFFI:

   (setf (mem-ref (make-pointer addr) :int) 0)

Each of the CFFI backends has compiler macros that open-code MEM-REF
directly as an SAP-REF-32 (or the equivalent) when the type is
constant.

James
From: Rob Warnock
Subject: Re: Calling All Noobs: Mini RtL Survey
Date: 
Message-ID: <VoGdnXLwHsxh-FreRVn-rw@speakeasy.net>
James Bielman  <·······@jamesjb.com> wrote:
+---------------
| > ····@rpw3.org (Rob Warnock) wrote:
| >> You want scary? I'll give you scary! Try peeking & poking hardware
| >> registers from within CMUCL, heh-heh!  MMAP some hardware into your
| >> VM and then do (setf (system:sap-ref-32 (system:int-sap addr) 0)
| >> new-value) [which in C is "*((u32*)(addr)+0) = new-value"]. I have a
| >> whole toolkit of such low-level hacks that I use to do user-mode
| >> debugging of hardware at my current POE.
| 
| FWIW, the CFFI library is largely implemented in terms of a low-level
| interface like this.  It could be useful for doing this sort of
| unsavory pointer manipulation in multiple implementations...
+---------------

Yes, possibly, if anybody wanted to do it with multiple implementations.
In my experience, when doing really low-level stuff like this one tends
to pick one implementation and stick with it unless some really major
problem pushes you off it.

But you might be right if one comes at it from a different angle.
I view such low-level hacks not so much as a "library" as a "pattern"
[in the Gabriel/Alexander sense, not in the GoF "pattern=class" sense].
I've implemented "r32/w32/dump32/mmap/mpin/etc." in Tcl, SCM, MzScheme,
and CMUCL. [So far...]  Yes, there might be a group of CL's for which
CFFI is a useful implementation technique for this pattern. But the
usefulness of the pattern (INHO) is broader than any single FFI or
even any single language.

+---------------
| Rob's expression above looks like this in CFFI:
|    (setf (mem-ref (make-pointer addr) :int) 0)
+---------------

Uh... Not quite. Look again at what I wrote. CMUCL's SYSTEM:SAP-REF-32
takes *two* arguments, a SAP and a fixnum offset. I think you probably
meant this:

     (setf (mem-ref (make-pointer (+ addr 0) :int) new-value)

or given the constant 0, this:

     (setf (mem-ref (make-pointer addr) :int) new-value)


-Rob

p.s. When I said "my current POE" above, I merely meant that I'm
doing user-mode debugging of hardware there recently with CMUCL.
But I've been doing user-mode debugging of hardware & user-mode
driver development as long as I've been in computing, all the
way back to 1970 on a PDP-10! Some of the user-mode drivers even
*stayed* in user mode, never making it into the kernel [no need].
(But the PDP-10's "user-mode I/O" and "realtime" features were
quite advanced. Unix/Linux could *still* learn from them...)

-----
Rob Warnock			<····@rpw3.org>
627 26th Avenue			<URL:http://rpw3.org/>
San Mateo, CA 94403		(650)572-2607
From: James Bielman
Subject: Re: Calling All Noobs: Mini RtL Survey
Date: 
Message-ID: <87u0c8zegu.fsf@jamesjb.com>
····@rpw3.org (Rob Warnock) writes:

> +---------------
> | Rob's expression above looks like this in CFFI:
> |    (setf (mem-ref (make-pointer addr) :int) 0)
> +---------------
>
> Uh... Not quite. Look again at what I wrote. CMUCL's SYSTEM:SAP-REF-32
> takes *two* arguments, a SAP and a fixnum offset. I think you probably
> meant this:
>
>      (setf (mem-ref (make-pointer (+ addr 0) :int) new-value)
>
> or given the constant 0, this:
>
>      (setf (mem-ref (make-pointer addr) :int) new-value)

Ah whoops, sorry, I missed NEW-VALUE somehow...  MEM-REF takes an
optional offset as well:

   (setf (mem-ref (make-pointer addr) :int 0) new-value)

James
From: John Thingstad
Subject: Re: Calling All Noobs: Mini RtL Survey
Date: 
Message-ID: <op.s3ca31fhpqzri1@mjolner.upc.no>
On Fri, 13 Jan 2006 09:34:04 +0100, Rob Warnock <····@rpw3.org> wrote:

For the record all Common Lisp's provide 1+..

-- 
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
From: Markus Grueneis
Subject: Re: Calling All Noobs: Mini RtL Survey
Date: 
Message-ID: <42dpleF1gr5teU1@individual.net>
Kenny Tilton wrote:
> [...] What are all you noobs doing here?
> 

Lurking.

> 0. Hero worship: http://www-formal.stanford.edu/jmc/frames.html
> 1. Paul Graham
> 2. Peter Seibel
> 3. The Reddit Incident (nah, too recent)
> 4. Java finally got to me (and what took it so long)
> 5. http://wiki.alu.org/The%20Road%20to%20Lisp%20Survey
> 6. The Savages of comp.lang.lisp are good training for the Bulls of 
> Pamplona
> 7. Other ________________________________________

Definitly Seibel, as I haven't yet programmed in Java. Just wanted to 
throw away old unused books, and suddenly noticed I already had the 
dead-tree version of PCL lying around, full of dust.  With some 
compassion I put it where it should have gone long before, beside my 
notebook.

Finally, there were no books to throw away, but now I've a reason to 
complain about my day-to-day job.

> 
> thx,
> 
> kenny
> 
> ps. And stop stepping on my flowers
From: Eli Gottlieb
Subject: Re: Calling All Noobs: Mini RtL Survey
Date: 
Message-ID: <gBjwf.92086$ME5.24959@twister.nyroc.rr.com>
Kenny Tilton wrote:
> So WTF? This used to be a nice, restful graveyard. Past few months have 
> gotten ridiculous. What are all you noobs doing here?
> 
> 0. Hero worship: http://www-formal.stanford.edu/jmc/frames.html
> 1. Paul Graham
> 2. Peter Seibel
> 3. The Reddit Incident (nah, too recent)
> 4. Java finally got to me (and what took it so long)
> 5. http://wiki.alu.org/The%20Road%20to%20Lisp%20Survey
> 6. The Savages of comp.lang.lisp are good training for the Bulls of 
> Pamplona
> 7. Other ________________________________________
> 
> thx,
> 
> kenny
> 
> ps. And stop stepping on my flowers
Read Graham and had a copy of "Lisp: A Gentle Introduction to Symbolic 
Computation" from my parents' university days lying around, so I decided 
to learn this "most powerful language ever".  Bought "Practical Common 
Lisp" on paper and have been tinkering since.
From: Giorgos Keramidas
Subject: Re: Calling All Noobs: Mini RtL Survey
Date: 
Message-ID: <86ek3inpex.fsf@flame.pc>
Kenny Tilton wrote:
> So WTF? This used to be a nice, restful graveyard. Past few months
> have gotten ridiculous. What are all you noobs doing here?

Learning to #'walk ;-)

> 0. Hero worship: http://www-formal.stanford.edu/jmc/frames.html
> 1. Paul Graham
> 2. Peter Seibel
> 3. The Reddit Incident (nah, too recent)
> 4. Java finally got to me (and what took it so long)
> 5. http://wiki.alu.org/The%20Road%20to%20Lisp%20Survey
> 6. The Savages of comp.lang.lisp are good training for the Bulls of Pamplona
> 7. Other ________________________________________

7. A combination of being an Emacs user and having written my fair share
   of personal .emacs customization stuff, reading the articles of Paul
   Graham and the freely available copy of "On Lisp", the online
   writings of Peter Norvig, a trip to San Francisco combined with an
   afternoon of bookworm-fun at Border's, where I bought myself Peter
   Seibel's PCL and a lot of lurking here and comp.lang.scheme, which
   helped me learn to appreciate the posts of a few select folks.
From: John Thingstad
Subject: Re: Calling All Noobs: Mini RtL Survey
Date: 
Message-ID: <op.s23o47jepqzri1@mjolner.upc.no>
On Sun, 08 Jan 2006 22:29:58 +0100, Kenny Tilton  
<·············@nyc.rr.com> wrote:

Definatly the reddit incident..
I'm trying out kpax right now!
Really cool.. (http://homepage.mac.com/svc/)
Also read his report.

> So WTF? This used to be a nice, restful graveyard. Past few months have  
> gotten ridiculous. What are all you noobs doing here?
>
> 0. Hero worship: http://www-formal.stanford.edu/jmc/frames.html
> 1. Paul Graham
> 2. Peter Seibel
> 3. The Reddit Incident (nah, too recent)
> 4. Java finally got to me (and what took it so long)
> 5. http://wiki.alu.org/The%20Road%20to%20Lisp%20Survey
> 6. The Savages of comp.lang.lisp are good training for the Bulls of  
> Pamplona
> 7. Other ________________________________________
>
> thx,
>
> kenny
>
> ps. And stop stepping on my flowers



-- 
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
From: Will McCutchen
Subject: Re: Calling All Noobs: Mini RtL Survey
Date: 
Message-ID: <1136826152.008020.242440@g14g2000cwa.googlegroups.com>
> So WTF? This used to be a nice, restful graveyard. Past few months have
> gotten ridiculous. What are all you noobs doing here?

Blame it on Paul Graham for the salespitch and Peter Seibel (and
Practical Common Lisp) for making it look understandable enough.
From: Eli Gottlieb
Subject: Re: Calling All Noobs: Mini RtL Survey
Date: 
Message-ID: <rdxwf.57131$XJ5.28376@twister.nyroc.rr.com>
Will McCutchen wrote:
>>So WTF? This used to be a nice, restful graveyard. Past few months have
>>gotten ridiculous. What are all you noobs doing here?
> 
> 
> Blame it on Paul Graham for the salespitch and Peter Seibel (and
> Practical Common Lisp) for making it look understandable enough.
> 
Excuse us for wanting to learn a new language!
From: Giorgos Pontikakis
Subject: Re: Calling All Noobs: Mini RtL Survey
Date: 
Message-ID: <1136833793.793820.67830@g14g2000cwa.googlegroups.com>
I had been programming in fortran for years, and I felt there should be

a better way to program a computer. Tried to learn C and C++ for a
while, but this was as boring as it gets.

Then, while working in a job unrelated to programming, and having
few things better to do in my free time:

-- With Graham's articles my heart started beating quiclky.
-- With SICP I fell in love.
-- With Seibel's and Graham's books I got married (with a
beautiful but very demanding wife).
-- Now, trying to write a real (numerical) app is like expecting
a child.

Giorgos
From: Philippe Lorin
Subject: Re: Calling All Noobs: Mini RtL Survey
Date: 
Message-ID: <43c2a46e$0$29053$626a54ce@news.free.fr>
Kenny Tilton wrote:
> So WTF? This used to be a nice, restful graveyard. Past few months have 
> gotten ridiculous. What are all you noobs doing here?

I really don't have a clue. As to why I *wasn't* here, I mean. It took 
me far too long to recognize the merits of Lisp as I kept greenspunning 
away with C and Java. I finally came because I was so tired of it that I 
was looking at any possible exit. I was considering how Python didn't 
quite fill the bill when I met a nice Lisp hacker who managed to 
convince me that all I desired and missed was already there waiting for 
me in Lisp. He was right.


> 1. Paul Graham
> 2. Peter Seibel

Both helped a lot.

Other reasons:
- I was infuriated to see that several music programming languages were 
based on Lisp. Why Lisp!? I wanted to try them. (I've not yet.)
- I was exposed to the Holy Emacs.
From: Kenny Tilton
Subject: Re: Calling All Noobs: Mini RtL Survey
Date: 
Message-ID: <OWEwf.41579$i1.26960@news-wrt-01.rdc-nyc.rr.com>
Kenny Tilton wrote:
> So WTF? This used to be a nice, restful graveyard. Past few months have 
> gotten ridiculous. What are all you noobs doing here?
> 
> 0. Hero worship: http://www-formal.stanford.edu/jmc/frames.html
> 1. Paul Graham
> 2. Peter Seibel
> 3. The Reddit Incident (nah, too recent)
> 4. Java finally got to me (and what took it so long)
> 5. http://wiki.alu.org/The%20Road%20to%20Lisp%20Survey
> 6. The Savages of comp.lang.lisp are good training for the Bulls of 
> Pamplona
> 7. Other ________________________________________
> 
> thx,
> 
> kenny
> 
> ps. And stop stepping on my flowers

Thanks to all the respondents.

The reasons are no different than what we learned from the original survey.

The winner and STILL champeeeen, Paaauuullll Graham. Not the 
word-of-mouth spike I was suspecting and kinda hoping for... well, hang 
on, in a way:

correct me if I am wrong, but I think blogging explains the upsurge. And 
blogging is done by everyday hackers as well as published certified 
gurus. So it is kinda word of mouth.

Yes? No? ie, Yeah, it is still PG, but more people are /reading/ PG and 
others?

kenny
From: Ties  Stuij
Subject: Re: Calling All Noobs: Mini RtL Survey
Date: 
Message-ID: <1136883626.768617.48910@g44g2000cwa.googlegroups.com>
> The reasons are no different than what we learned from the original survey.
> The winner and STILL champeeeen, Paaauuullll Graham.

well i for one am glad PG is mad about Lisp. i'd be doing some real
frustrated programming if he was a BASIC zealot.
From: Peter Seibel
Subject: Re: Calling All Noobs: Mini RtL Survey
Date: 
Message-ID: <m2bqygk6b8.fsf@gigamonkeys.com>
Kenny Tilton <·············@nyc.rr.com> writes:

> Kenny Tilton wrote:
>> So WTF? This used to be a nice, restful graveyard. Past few months
>> have gotten ridiculous. What are all you noobs doing here?
>> 0. Hero worship: http://www-formal.stanford.edu/jmc/frames.html
>> 1. Paul Graham
>> 2. Peter Seibel
>> 3. The Reddit Incident (nah, too recent)
>> 4. Java finally got to me (and what took it so long)
>> 5. http://wiki.alu.org/The%20Road%20to%20Lisp%20Survey
>> 6. The Savages of comp.lang.lisp are good training for the Bulls of
>> Pamplona
>> 7. Other ________________________________________
>> thx,
>> kenny
>> ps. And stop stepping on my flowers
>
> Thanks to all the respondents.
>
> The reasons are no different than what we learned from the original survey.
>
> The winner and STILL champeeeen, Paaauuullll Graham.

I wuz robbed!

-Peter

-- 
Peter Seibel           * ·····@gigamonkeys.com
Gigamonkeys Consulting * http://www.gigamonkeys.com/
Practical Common Lisp  * http://www.gigamonkeys.com/book/
From: Robert Uhl
Subject: Re: Calling All Noobs: Mini RtL Survey
Date: 
Message-ID: <m3psmxrpbw.fsf@4dv.net>
Kenny Tilton <·············@nyc.rr.com> writes:

> So WTF? This used to be a nice, restful graveyard. Past few months
> have gotten ridiculous. What are all you noobs doing here?
>
> 1. Paul Graham

First man I've read in a long while to take Lisp seriously (also esr, of
all men!).

> 2. Peter Seibel

PCL was an eye-opener; after that I started trying to convert a few of
my rainy-0day projects to CL.  The rest is, if not history, at least a
tolerably amusing farce...

-- 
Robert Uhl <http://public.xdi.org/=ruhl>
Don't quote laws to us.  We carry swords.
           --Ptolemy Magnus, circa 50 BC