From: Ron Garret
Subject: Newlisp?
Date: 
Message-ID: <rNOSPAMon-D8E9A1.21194419102005@news.gha.chartermi.net>
Anyone here used Newlisp (www.newlisp.org)?  What's your impression?

rg

From: Andras Simon
Subject: Re: Newlisp?
Date: 
Message-ID: <vcd3bmwo9gp.fsf@csusza.math.bme.hu>
Ron Garret <·········@flownet.com> writes:

> Anyone here used Newlisp (www.newlisp.org)?  What's your impression?

Not me. But it was discussed here before (do a Google Groups search). 
See this message from Rob Warnock
http://groups.google.com/group/comp.lang.lisp/msg/1f70fe70a7b35aca?dmode=source&hl=en 
in particular. 

Andras
From: LuisGLopez
Subject: Re: Newlisp?
Date: 
Message-ID: <1129800371.097550.302300@f14g2000cwb.googlegroups.com>
Hey, that message is from long ago (2001), and I think the guys at
newlisp had donde a lot of work since then ;)... Anyway, it seems to be
another dialect of Lisp; not CL, nor scheme... and should be jugde that
way, I think
From: Marcin 'Qrczak' Kowalczyk
Subject: Re: Newlisp?
Date: 
Message-ID: <87vezsmn5a.fsf@qrnik.zagroda>
Ron Garret <·········@flownet.com> writes:

> Anyone here used Newlisp (www.newlisp.org)?  What's your impression?

Very bad.
http://groups.google.com/group/comp.lang.scheme/browse_frm/thread/997dc59b8ebb1749/af62130eefafd338
http://www.alh.net/newlisp/phpbb/viewtopic.php?p=2776&sid=9e59c8bbfaf5fa2afdfb2ff06141d20b

-- 
   __("<         Marcin Kowalczyk
   \__/       ······@knm.org.pl
    ^^     http://qrnik.knm.org.pl/~qrczak/
From: Frits de Vries
Subject: Re: Newlisp?
Date: 
Message-ID: <4357852e$0$773$3a628fcd@reader20.nntp.hccnet.nl>
Hello Ron,
I downloaded Newlisp last night.
At first sight and feel I like it very well.

Frits de Vries


"Ron Garret" <·········@flownet.com> schreef in bericht 
····································@news.gha.chartermi.net...
>
> Anyone here used Newlisp (www.newlisp.org)?  What's your impression?
>
> rg 
From: Marcin 'Qrczak' Kowalczyk
Subject: Re: Newlisp?
Date: 
Message-ID: <87sluwmmjn.fsf@qrnik.zagroda>
Ron Garret <·········@flownet.com> writes:

> Anyone here used Newlisp (www.newlisp.org)?  What's your impression?

Very bad.
http://www.alh.net/newlisp/phpbb/viewtopic.php?p=2776
http://groups.google.com/group/comp.lang.scheme/browse_frm/thread/997dc59b8ebb1749/af62130eefafd338
http://www.alh.net/newlisp/phpbb/viewtopic.php?t=407 (last message and next page)

-- 
   __("<         Marcin Kowalczyk
   \__/       ······@knm.org.pl
    ^^     http://qrnik.knm.org.pl/~qrczak/
From: ··@codeartist.org
Subject: Re: Newlisp?
Date: 
Message-ID: <1129891283.651165.17100@g44g2000cwa.googlegroups.com>
Marcin 'Qrczak' Kowalczyk schrieb:
> Very bad.
> http://www.alh.net/newlisp/phpbb/viewtopic.php?p=2776

Regarding "call-by-value" and "call-by-reference":
Those notions do not describe if first class objects of a language are
represented as references or not, but if the _binding_ of a variable is
passed by value or by reference.
In call-by-reference you pass the binding by reference. This means an
assignment to this parameter in the called procedure will change the
variable on the calling site. With call-by-value the value of the
binding is passed - which can be e.g. an immediate value like an
integer or the address of a more complex object. The last bit depends
on your language representing complex objects as object references
which counts for nearly all "modern" languages like Java, C# or Common
Lisp, Scheme and so on. Using call by value makes it (obviously)
impossible to change the binding of the outer variable - but it does
not restrict modification of the contents of an object. There are some
hybrid methods like call by value and result which works like call by
value but copies the last value of the variable binding of the called
procedure back to the outer variable binding.

Jochen Schmidt
From: Marcin 'Qrczak' Kowalczyk
Subject: Re: Newlisp?
Date: 
Message-ID: <87ek6frnis.fsf@qrnik.zagroda>
··@codeartist.org writes:

>> http://www.alh.net/newlisp/phpbb/viewtopic.php?p=2776
>
> Regarding "call-by-value" and "call-by-reference":
> Those notions do not describe if first class objects of a language are
> represented as references or not, but if the _binding_ of a variable is
> passed by value or by reference.

Indeed there are two issues:

1. What variables contain, and how much is copied by assignment
   (this is the same in all languages I know).

2. How mutable variables are passed to functions.



Regarding 1:

In Pascal, C and C# a variable contains an object. It may have some
simple structure but the size is fixed at compile time and usually
small.

In Perl a variable contains a scalar (string or pointer), an array
or a hash (dictionary). The amount of copying done by assignment is
unbounded but the copied structure is flat.

In C++, Tcl(?) and newLISP a variable contains an object which
may include a graph of subobjects belonging to it, unbounded and
potentially with a complex structure (physically implemented with
pointers but logically they are parts of the first object and they
are copied together).

In almost all other languages a variable always points to an object,
at least conceptually, and there are no mutations of a part of a
variable. This requires GC in order to be practical.

In all these languages except Tcl(?) and newLISP, an object (and thus
a variable) can be a pointer or contain pointers. So even if primarily
a variable contains an object, the style of storing references can be
easily emulated (modulo GC), you can create graphs of objects with
sharing and with mutations observed through all pointers.



Regarding 2 (call by value / call by reference):

In most languages variables are passed by value, i.e. passing
a variable to a function is equivalent to assignment between
variables.

In Pascal and C++ some parameters can be marked to be passed by
reference. In Perl and I think in Fortran all parameters are passed
by reference.

In several other languages most variables are passed by value but you
can pass some variables by reference explicitly, in a way which is
apparent at the call site, perhaps by forming a pointer to a variable
(Borland Pascal - but not standard Pascal, C, C++, C#, Perl, my Kogut).



So newLISP has the usual semantics of 2, but an unusual semantics of 1
with all variables containing objects and with no pointers to anonymous
objects. Graphs of objects can be emulated only by indirection through
a global table, where you store a name or index instead of a pointer
(no GC).

-- 
   __("<         Marcin Kowalczyk
   \__/       ······@knm.org.pl
    ^^     http://qrnik.knm.org.pl/~qrczak/
From: lin8080
Subject: Re: Newlisp?
Date: 
Message-ID: <435BA49C.C5577547@freenet.de>
Ron Garret schrieb:

> Anyone here used Newlisp (www.newlisp.org)?  What's your impression?

Yes. I love it. It is small quick-hack-friendly and easy.

Best thing is, version 6.22, newlisp.exe, 168448 Bytes runs on all
Windows Versions I have and with wine it runs on all Linux Distris I
have. Thats a point I do not found on other Lisps. So when you find this
version, get it, an editor with ()-checking is include, a debugger also
and  ... it can move the smile-icon around :)

stefan


;; -----------------------------------------------
;; copy from the context-help v.6.16 (see what it was):

Contexts in newLISP constitute different name spaces.  Each name space
has its own private symbol table.  The same name may be used for a
symbol in different contexts without a conflict.

Contexts are identified by symbols which are owned by the root or MAIN
context.  In this text context symbols are always shown in uppercase.
Lowercase contexts symbols may be used as well and are only avoided here
for better visibility.  The MAIN context contains also all symbols for
built in functions in newLISP.  MAIN is built in to newLISP and needs
not to be created by the user.  All symbols in MAIN are globals, also
known in any other context,  while symbols in any other context than
MAIN are only recognized in the context they where created. The
following lines simulate a command line session in newLISP.

Except for MAIN, the current context symbol is visible on the command
line before the '>' prompt symbol, e.g.:

> (context 'FOO)
FOO >

If the context FOO already exists, newLISP will just switch to it.  If
FOO does not exist newLISP will create it. All symbols which are now
created will be known only in the context 'FOO:

FOO> (set 'x 123)
123
FOO> (set 'y 456)
456
FOO> (symbols)
(x y)

To refer to a symbol outside it�s context, it has to be preceded by the
context name and a colon ''', e.g.:

> FOO:x
123

The same symbol 'x� may also be used in another context:

> (context 'FOO-B)
FOO-B> (set 'x 777)
777
FOO-B> FOO:x
123

When quoting a symbol from another context, the quote goes before the
context prefixing the symbol, e.g.:

>(set 'FOO-B:x 555)
555

When referring to a context, which does not exist, it will be created
implicitly, without using the 'context� function, and without switching
to the context:

>(set 'ACTX:var hello)
"hello"
>ACTX:var
"hello"

The same symbol used in a context could also be used in MAIN.  Now we
have three versions of 'x� all in a different context:

>(set 'x "I belong to MAIN")
"I belong to MAIN"
> FOO:x
123
> FOO-B:x
555
> x
"I belong to MAIN"

All symbols owned by MAIN are automatically accessible in any context,
but may be overwritten by context specific versions of this symbol:

> (set 'aVar 99999)
99999
> (context 'FOO)
FOO > aVar		  ; accesses aVar in MAIN
99999
FOO> (set 'aVar 11111)	  ; changes aVar in MAIN
11111
FOO> (set 'FOO:aVar 22222) ; forces own aVar in FOO

The 'context� function works like a compiler directive, which tells
newLISP where to put all symbols and definitions when compiling source
files the command line or strings in the 'eval-string� or 'symbol�
function:

;; file MY_PROG.LSP
;;
(context 'GRAPH)	  ; every thing from here on goes into GRAPH

(define (draw-triangle x y z)
	(...))

(define (something) (....
(context 'MAIN)	; switch back to MAIN
;;
;; end of file


The functions 'draw-triangle� and 'something� are now part of the
context GRAPH.  To execute this function from another context than GRAPH
they have to be prefixed as explained earlier.

(GRAPH:draw triangle 1 2 3)

Comparing symbols in different contexts will compare only their names
without regard to the contexts.

(set 'CTXA:val 123)

(set 'CTXB:val 456)

(= 'CTXA:val 'CTXB:val) => true	 ; same symbol 'val

This fact is important when programming with objects whose methods are
defined in different contexts.


Contexts and programming with objects.

Objects in newLISP, as outlined in a previous chapter, can be put in
contexts together with their methods, but still be used without too much
prefixing from other contexts.  The following program part implements an
account in a context ACCOUNT, which is then used from MAIN or any other
context.

;; file ACCLIB.LSP module for creating and maintaining accounts
;;

(context 'ACCOUNT)

(define (num selector arg1 arg2 arg3 | name balance)

 (apply selector))

(define (new)

  (set arg1 num)

  (set-state (eval arg1) (list arg2 arg3)) arg3)

(define (deposit)

  (set 'balance (+ balance arg1)))

(define (withdraw)

  (set 'balance (- balance arg1)))

(context 'MAIN)
;;
;; end of file

Now from the command line in MAIN context:

> (load "ACCLIB.LSP")

> (ACCOUNT:num 'new 'a123 "John Doe" 100)   ; create account

> (a123 'deposit 200)                        ; deposit 100$

> (get-state a123)                           ; get currents

On the second and third line it is not(!) necessary to prefix the
selector 'new or 'deposit with ACCOUNT. newLISP�s  internal comparison
works only on the name portion of the symbols without the context.  The
account �a123 will now reside in MAIN but refer to methods defined in
ACCOUNT.
(made by Lutz M�ller)
;; ----------------------------------------------------------