Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Topics - newdep

#481
If under linux or Bsd you want a help started, use the "init.lsp" file.

a simple edit like below will give you a direct local help.



;; start links web-browser and loads the manual

;; a function called (help) is now global

(define-macro (help)

        ( ! "/usr/local/bin/links /usr/share/doc/newlisp/newlisp_manual.html" )

        (global 'help))



Norman.
#482
newLISP in the real world / rotate on list
February 27, 2004, 11:58:02 AM
Hello Lutz,



(Linux 7.5.4)



Im currious what im doing wrong in the following example, perhpas you can

point out the mistake. I could emagin that (net-sessions) is static in itself still the first rotate Is accepted.



>(net-sessions)

(4 3)

>(rotate (net-sessions))

(3 4)

>(rotate (net-sessions))

(3 4)



As you can see the 'rotate only worked once, still rotate is destructive to the

'net-sessions list, its not updated a second time. If you would say that i should isolate the list from 'net-sessions befor doing a rotate (because of the dynamic/static behaviour of the 'net-sessions list) i'll work with that ;-)



Ofcourse a normal list works...



> (set 'x (list 1 2 3 4))

(1 2 3 4)

> (rotate x)

(4 1 2 3)

> (rotate x)

(3 4 1 2)

> (rotate x)

(2 3 4 1)

> (rotate x)

(1 2 3 4)





Regards,

Norman.
#483
newLISP in the real world / net-close
February 26, 2004, 12:57:39 PM
Hello Lutz,





Just a currious question..



When using 'net-close in a new started console the following happens;

and i was just currious if behaviour is related to the stderr stdin stdout?



>(net-close 0)  # loops the console prompt



>(net-close 1)  # waits



>(net-close 2)  # returns true



PS: it would actualy be nice to be able in newlisp to have

access to a list using network functions, like: (net-close (net-sessions))





Regards,

Norman.
#484
newLISP in the real world / lists
February 25, 2004, 12:59:36 PM
Hello All,



Oooo im probably making the "newbe" greeting posting this one ;-)



Im trying to extend a list, now im using 'append or 'cons still the original

variable stays untouched (featured) when i dont use an extra (set 'var ...)



below the example..



> (set 'alist (list '(something)))

((something))



> (set 'alist (cons alist '(hello) ))

(((something)) hello)



> alist

(((something)) hello)



> (set 'alist ( append alist (list '(someone)) ) )

(((something)) hello (someone))



> alist

(((something)) hello (someone))





--- but is it possible to extend a list without the use of the "extra" 'set?

--- so that the original 'list is updated?



like ->



(append alist (list '(to-add)))



or



(cons alist '(new-one))







Regards,

Norman.
#485
newLISP in the real world / net-listen
February 25, 2004, 11:27:07 AM
I was wondering if its possible to overrule the 'net-listen 'port so that newlisp

is able to bind also to a specific IP, currently it binds to all Addresses,

which is fine ofcourse. So is an extention like (set 'server (net-listen x.x.x.x 12345)) possible ?



My second question (related indirectly to the above)

is how to replace currenlty the (net-local 'port) , which displays

"0.0.0.0" (nth 0 (net-local port)) with something like "12.12.12.12"  (localhost)



A (print (net-lookup (nth 0 (net-local server)))) gives me always 'nil, the

workaround it to place 0.0.0.0 in the /etc/host file.



If a (net-listen 'port) would be able to listen to 'ip the second 0.0.0.0 issue

is automaticly solved.



Just a brain spin...



Norman.
#486
Whither newLISP? / into binary code
February 24, 2004, 02:54:27 PM
Hello Lutz,



I think you had this question already a few times but ill try to hit it again :-)

Although i like intepreters very much sometimes a binary-code could help too..

(its a never ending story ;-) But is there already a wrapper for newLisp or a direct compilation possible from generated code?



Just out of intrest, so dont hit me :-)



Regards, Norman.
#487
Anything else we might add? / newLisp and Rebol
February 23, 2004, 11:44:59 AM
Hello All,



I dont want to start a "yes or no" game :-) Im just currious, I played some years ago with lisp and afterthat fanatic with Tcl and ended up with rebol the last  2 years and that brings me to a spontanious occeurance...



Some Rebol function equal NewLisp or visa versa?

Is this realy an coincidence or is there some Example-Jacking done ?

Its funny to see overlaps though...



Greetings..And ill digg into newLIsp ;-)