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

Messages - frontera000

#1
Anything else we might add? / cool
March 11, 2008, 12:52:40 PM
glad to hear it's all working well! maybe you can post the newlisp code.
#2
Anything else we might add? / fcgi
March 11, 2008, 11:33:39 AM
clisp and cmucl have fastcgi support packages. they can perform better when using fcgi.



similarly nothing prevents newlisp from using libfcgi -- dynamically load FCGIAccept (or something like that) if you're worried about performance.



newlisp is so fast, i personally don't have problems just doing cgi the old fashioned way.
#3
newLISP newS / inferior lisp
March 11, 2008, 12:58:30 AM
i just use the normal inferior lisp mode inside emacs.



all you have to do is to set inferior-lisp-program to point to newlisp (with -C

option).





(load-library "inf-lisp")



(setq inferior-lisp-program "C:/users/bob/bin/newlisp.bat")



the newlisp.bat just has this:



c:"program files"newlispnewlisp.exe -C



then i can just edit any newlisp program in emacs and evaluate any selected

region by just doing control-C control-R.  this is typically all i need. i use the same method for clisp too.  i don't use slime. it's too complicated and buggy.



inferior lisp mode is simple and does all that i want, which is to interact

with REPL inside emacs.



i used to use newlisp mode by Tim Johnson, but i found it unnecessary for my needs.
#4
newLISP in the real world / thanks for clarification
March 10, 2008, 11:50:28 AM
i was confused.  too used to clisp still...



# clisp

  i i i i i i i       ooooo    o        ooooooo   ooooo   ooooo

  I I I I I I I      8     8   8           8     8     o  8    8

  I   `+' /  I      8         8           8     8        8    8

     `-+-'  /       8         8           8      ooooo   8oooo

    `-__|__-'        8         8           8           8  8

        |            8     o   8           8     o     8  8

  ------+------       ooooo    8oooooo  ooo8ooo   ooooo   8



Copyright (c) Bruno Haible, Michael Stoll 1992, 1993

Copyright (c) Bruno Haible, Marcus Daniels 1994-1997

Copyright (c) Bruno Haible, Pierpaolo Bernardi, Sam Steingold 1998

Copyright (c) Bruno Haible, Sam Steingold 1999-2000

Copyright (c) Sam Steingold, Bruno Haible 2001-2006



[1]> (defun x (y) (setq x y))

X

[2]> (x 2)

2

[3]> x

2
#5
newLISP in the real world / not sure if this helps
March 10, 2008, 11:38:45 AM
gdb ./newlisp

GNU gdb 6.6-debian

Copyright (C) 2006 Free Software Foundation, Inc.

GDB is free software, covered by the GNU General Public License, and you are

welcome to change it and/or distribute copies of it under certain conditions.

Type "show copying" to see the conditions.

There is absolutely no warranty for GDB.  Type "show warranty" for details.

This GDB was configured as "i486-linux-gnu"...

Using host libthread_db library "/lib/libthread_db.so.1".

(gdb) r

Starting program: /root/newlisp-9.3.3/newlisp

newLISP v.9.3.3 on Linux IPv4, execute 'newlisp -h' for more info.



> (define (x y) (set 'x y))

(lambda (y) (set 'x y))

> (x 2)



Program received signal SIGSEGV, Segmentation fault.

evaluateExpression (cell=0x0) at newlisp.c:1090

1090    if(cell->type & EVAL_SELF_TYPE_MASK) return cell;

(gdb) bt

#0  evaluateExpression (cell=0x0) at newlisp.c:1090

#1  0x08052f4c in evaluateLambda (localLst=0x8080808, arg=<value>,

    newContext=0x80830b0) at newlisp.c:1411

#2  0x0804e8bc in evaluateExpression (cell=0x80805b8) at newlisp.c:1179

#3  0x0805334b in evaluateStream (stream=0xbff35cd4, outDevice=2, flag=0)

    at newlisp.c:946

#4  0x08053a2b in executeCommandLine (command=0xbff35e45 "(x 2)n", outDevice=2,

    cmdStream=0xbff35e2c) at newlisp.c:924

#5  0x080540a9 in main (argc=1, argv=0xbff35ff4) at newlisp.c:732

(gdb) up

#1  0x08052f4c in evaluateLambda (localLst=0x8080808, arg=<value>,

    newContext=0x80830b0) at newlisp.c:1411

1411            result = evaluateExpression(cell);

(gdb) p cell

$1 = (CELL *) 0x0

(gdb) l

1406    /* evaluate body expressions */

1407    cell = localLst->next;

1408    result = nilCell;

1409    while(cell != nilCell)

1410            {

1411            result = evaluateExpression(cell);

1412            cell = cell->next;

1413            }

1414    result = copyCell(result);

1415

(gdb) p nilCell

$2 = (CELL *) 0x807f0a8

(gdb) up

#2  0x0804e8bc in evaluateExpression (cell=0x80805b8) at newlisp.c:1179

1179                                    result = evaluateLambda((CELL *)pCell->contents, args->next, newContext);

(gdb) p *(CELL *)pCell->contents

$3 = {type = 255, next = 0x80807e8, aux = 134738088, contents = 134744040}

(gdb) down

#1  0x08052f4c in evaluateLambda (localLst=0x8080808, arg=<value>,

    newContext=0x80830b0) at newlisp.c:1411

1411            result = evaluateExpression(cell);

(gdb) l 1400

1395    goto GET_LOCAL;

1396

1397    GOT_LOCALS:

1398    /* put unassigned args in $args */

1399    pushEnvironment(argsSymbol->contents);

1400    pushEnvironment((UINT)argsSymbol);

1401    argsSymbol->contents = (UINT)getCell(CELL_EXPRESSION);

1402    if(result != nilCell)

1403      ((CELL*)argsSymbol->contents)->contents = (UINT)result;

1404    ++localCount;

(gdb) p *(CELL*)argsSymbol->contents

$4 = {type = 59, next = 0x807f0a8, aux = 134738088, contents = 134738088}

(gdb)
#6
newLISP in the real world / debug segfault
March 10, 2008, 11:02:28 AM
[root@andLinux ~]# newlisp

newLISP v.9.3.3 on Linux IPv4, execute 'newlisp -h' for more info.



> (define ( x y ) (setq x y ))

(lambda (y) (setq x y))

> (debug (x 1))



-----



(define (x y)

  #(setq x y)#)





[-> 3 ] s|tep n|ext c|ont q|uit > n

Segmentation fault

[root@andLinux ~]#
#7
newLISP in the real world / setsockopt / getsockopt
December 17, 2007, 09:00:56 AM
i am in need of setting some socket options. specifically, i am interested in setting send and receive socket level buffer sizes.  these numbers can affect network throughput performance significantly. i am writing some high performance network apps and the lack of socket option API is getting in the way.  i could import shared library but i think perhaps newLISP needs these things in the socket API.  that allows more portable way of setting options (winsock and BSD style )



any thoughts?
#8
newLISP newS / data-type
October 14, 2007, 08:32:17 PM
I really like data-type.



One thing I noticed is how it maps to SXML. This way it can be used for defining data-type which can be turned into XML on the fly, which can give new capabilities to newLISP applications.



I really hope this becomes part of the language.
#9
newLISP newS /
August 06, 2007, 09:22:15 AM
Thanks. I was trapped in Java hell for a year. :)
#10
newLISP newS / v9.1.11 slice
August 05, 2007, 11:04:55 PM
> (slice '(a b c d e f) 2 -1)

(c d e)

> (slice '(a b c d e f) 2 )

(c d e f)



Second one seems to be correct.



Both should give same results, no?
#11
newLISP Graphics & Sound / guiserver ide output blurry
August 05, 2007, 12:24:07 PM
Hi all!

Guiserver is really great.   The IDE is fun to use. I noticed one thing though. Sometimes when I "run" the code using the > button, the output area text gets blurry (multiple lines get superimposed). Has anyone seen this?
#12
newLISP Graphics & Sound /
July 19, 2007, 05:37:09 PM
I go away for a while (due to a job) and look what happens!  Guiserver is awesome! I'm reading the code and it looks great.



One thing occurred to me while reading the code.



It would be cool to do more declarative style GUI programming. Similar to JavaFX , Laszlo, XAML, XUL, etc.   Except we can send s-exp to the server instead.  That way we should be able to do things like:



(canvas (width 500) (height 300)

  (window (x 20) (y 20) (width 100) (height 100)))



and send the whole thing to guiserver and it should do the right thing.



Just an idea.
#13
newLISP newS /
October 16, 2006, 09:33:58 AM
Oh my Deus!



You wrote all this?



Anyway, it is amazing.  Very clear and readable.  And helpful! Thank you.
#14
newLISP newS /
October 15, 2006, 10:48:14 PM
I just wanted to add to this and say thank you.  newLISP gives me a real alternative from having to use other languages that mostly rub me the wrong way.  newLISP makes me happy.



:-)
#15
newLISP in the real world /
October 12, 2006, 11:00:22 AM
Hi

Thanks.

Yes, I know it looks like what was being done is quite silly but the intent was to pop items off a list. The problem was that (list 1 2 3 4) was something that was inside another list.  The example I showed is a little more obvious to diagnose.



I was doing something like



(while (setq x (pop (last something))) (print x))



where something was a return value of a function. The function returned:



(list 1 3 4 (list 1 2 3 4))



something like that.



In thinking idiomatically, I didn't think of how interpreter was going to work with the data.



This is one of the areas where programming langauges run into trouble with me -- they don't know what I mean!!! :-)