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 - nigelbrown

#1
Hi All

Just to let you know I've put in a plug for newlisp at the codingmonkeys forum that covers a range (of largely basic-like) languages:

http://www.codingmonkeys.com/index.php?topic=1283.0;topicseen">http://www.codingmonkeys.com/index.php? ... ;topicseen">http://www.codingmonkeys.com/index.php?topic=1283.0;topicseen



Nigel
#2
In newlisp-tk going to editor window and deleting symbol removes it from edit window list but is still in newlisp when editor is exited. Is that expected?

Nigel
#3
newLISP newS / rapid game prototyping competition
January 27, 2007, 03:23:05 PM
See this site that runs competitions to demonstrate how rapidly games can be prototyped: http://www.experimentalgameplay.com/">http://www.experimentalgameplay.com/ . It arose from an interest by academica in game design and implementation (Entertainment Technology Center at Carnegie Mellon University).



Next competition starts Feb 3rd see http://www.experimentalgameplay.com/blog.php?b=686">http://www.experimentalgameplay.com/blog.php?b=686



Visual basic seems to be a common platform, perhaps prototyping would be even faster with newLisp? and give newLisp a profile in the area - any takers?



I'm not sure what gui framework would be best for this?

For a game example see http://www.experimentalgameplay.com/game.php?g=4">http://www.experimentalgameplay.com/game.php?g=4 or http://www.experimentalgameplay.com/game.php?g=1">http://www.experimentalgameplay.com/game.php?g=1.





Nigel
#4
Hi,

I'm trying porting from python  to newlisp (of course) but python has possibility of assigning stderr output to a pipe when starting a process

eg from chatsniff1.0.py - http://chatsniff.sourceforge.net/">http://chatsniff.sourceforge.net/

 pipe = Popen('tethereal -i '+str(gDevices.index(gCurrentDevice) + 1)+' -l -V -R "aim || ymsg || msnms || jabber"', bufsize = 1, cwd = path, shell=True, stdin=PIPE, stdout=PIPE, stderr=PIPE, universal_newlines = True)



while (process in newlisp syntax is : (process str-command int-pipe-in int-pipe-out [int-win32-option])

i.e. only stdin stdout directable to pipes.

The code in nl-filesys.c is:



CELL * p_process(CELL * params)

{

char * command;

int forkResult;

int inpipe = 0, outpipe = 0;



params = getString(params, &command);

if(params != nilCell)

   {

   params = getInteger(params, (UINT*)&inpipe);

   getInteger(params, (UINT *)&outpipe);

   }



if((forkResult = fork()) == -1)

    return(nilCell);

if(forkResult == 0)

    {

    /* redirect stdin and stdout to pipe handles */

    if(inpipe)

        {

        close(STDIN_FILENO);

        if(dup2(inpipe, STDIN_FILENO) == -1) exit(0);

        close(inpipe);

        }

    if(outpipe)

        {

        close(STDOUT_FILENO);

        if(dup2(outpipe, STDOUT_FILENO) == -1) exit(0);

        close(outpipe);

        }



    system(command);

    exit(0);

    }

 could another option after [int-win32-option] be [int-pipe-err]

and newlisp do STDERR_FILENO to pipe?

Or is this not recommended?



Is there another way? - I see  in

return value thread ( http://www.alh.net/newlisp/phpbb/viewtopic.php?t=789">http://www.alh.net/newlisp/phpbb/viewtopic.php?t=789 ) that stderr can be handled from exec

Lutz:

> (exec "ls *.abc 2>&1")

("ls: *.abc: No such file or directory")

>

The 2>&1 spec tell ls to redirect error output to stdout.



but don't know enough about system() to know if that approach is possible for (process.



Any tips?



Nigel
#5
newLISP and the O.S. / READLINE in linux vs linux_utf8
November 17, 2005, 12:12:29 PM
Hi Lutz,

re rpm building:



Building rpms for 8.7.1 I noted that the makefile for linux disables readline by default viz:

# makefile for newLISP v. 8.x.x on LINUX

#

# Note, that readline support may require different libraries on different OSs

#



OBJS = newlisp.o nl-symbol.o nl-math.o nl-list.o nl-liststr.o nl-string.o nl-filesys.o

   nl-sock.o nl-import.o nl-xml.o nl-web.o nl-matrix.o nl-debug.o pcre.o



#CFLAGS = -Wall -pedantic -Wno-uninitialized -c -O2 -g -DREADLINE -DLINUX

CFLAGS = -Wall -pedantic -Wno-uninitialized -c -O2 -g -DLINUX



CC = gcc



whereas the makefile for linux_utf8 has it enabled by default viz:

# makefile for newLISP v. 8.x.x on LINUX with UTF-8 support

#

# Note, that readline support may require different libraries on different OSs

#



OBJS = newlisp.o nl-symbol.o nl-math.o nl-list.o nl-liststr.o nl-string.o nl-filesys.o

   nl-sock.o nl-import.o nl-xml.o nl-web.o nl-matrix.o nl-debug.o nl-utf8.o pcre.o



CFLAGS = -Wall -pedantic -Wno-uninitialized -c -O2 -g -DREADLINE -DSUPPORT_UTF8 -DLINUX



CC = gcc





Lutz - how would you like the rpms for download done regarding READLINE?

Note also the needed changes re the spec files:

1.

the .spec files now live in /util instead of /doc so had to change Makefile to

reflect this for rpm and rpm_utf8 sections



2.

new file newlisp/gmp.lsp is not in file list of .spec files so had to add to

.spec file of rpm and utf8 rpm (get warning during rpm build otherwise)



Regards

Nigel
#6
newLISP and the O.S. / NewLISP gets a mention at IBasic
September 26, 2005, 01:57:59 AM
I've mentioned NewLISP as a dll to be accessed from IBasic (a win32 Basic) at

http://www.pyxia.com/community/viewtopic.php?p=58529#58529">http://www.pyxia.com/community/viewtopi ... 8529#58529">http://www.pyxia.com/community/viewtopic.php?p=58529#58529



There was earlier mention on the member only threads but I moved further discussion to an open thread.



Nigel
#7
Anything else we might add? / interpreted lisps
August 27, 2005, 07:13:58 PM
Hi all,

I came across this brief exposition of benefits of interpreted, dynamic typed lisps - thought you may be interested and have some comments:

http://www.cs.uni-bonn.de/~costanza/lisp-ecoop/submissions/Burger.pdf">http://www.cs.uni-bonn.de/~costanza/lis ... Burger.pdf">http://www.cs.uni-bonn.de/~costanza/lisp-ecoop/submissions/Burger.pdf



Nigel
#8
Just to let people know I've mentioned newlisp in the popcap discussion forum - http://developer.popcap.com/viewtopic.php?t=196">http://developer.popcap.com/viewtopic.php?t=196

popcap is a game framework released with a license with minimal restrictions. Newlisp was mentioned in the context of a possible scripting language for the framework.



Nigel
#9
I have to delve into the world of C++ and wondered if anyone has a wrapper class already done for newlisp? I realise I can do C calls within C++ but was wondering about a more 'native' solution.



Nigel
#10
newLISP in the real world / concurrent newlisp ?
March 27, 2005, 12:54:06 AM
Looking into a newlisp (distant?) future perhaps newlisp's contexts could be the basis for a concurrency model. I came across this blog:

http://home.comcast.net/~bc19191/blog/050119.html">http://home.comcast.net/~bc19191/blog/050119.html

discussing concurrency and lisp and got to thinking.

The current context system could be used to send off a light-weight concurrent process if it

was forbidden to/chose not to access other contexts or if inter-context contact was through

messages.



Perhaps in the future a fork of newlisp rewritten in erlang could be concurrent?



Just thinking out loud.

Nigel
#11
newLISP in the real world / urpmi newlisp ?
March 24, 2005, 01:57:04 AM
Hi all,

If newlisp was in a mandrake mirror as a contrib or perhaps even plf I could

>urpmi newlisp

and it would be installed. (see http://easyurpmi.zarb.org/">http://easyurpmi.zarb.org/ )

Now we've got the rpms how about going for inclusion into mandrake cooker?

See http://www.linux-mandrake.com/en/cookerdevel.php3">http://www.linux-mandrake.com/en/cookerdevel.php3

How to contribute some packages to Cooker?



    First, if you have developed a program and want to make your contribution in the RPM Contribs part of the distribution, please contact the RPM apps manager at contribs@mandrakesoft.com and tell him that you have a new package. Thank you and Good Luck!  



Although I guess this isn't much longer (sorry Lutz I've not installed your key):



[root@p800 nigel]# urpmi http://www.newlisp.org/downloads/newlisp-8.4.3-1mdk.i586.rpm">http://www.newlisp.org/downloads/newlis ... k.i586.rpm">http://www.newlisp.org/downloads/newlisp-8.4.3-1mdk.i586.rpm



The following packages have bad signatures:

/var/cache/urpmi/partial/newlisp-8.4.3-1mdk.i586.rpm: Invalid signature ((SHA1) DSA sha1 md5 (GPG) (MISSING KEY) GPG#3f83f9a6 NOT OK)

Do you want to continue installation ? (y/N) y

installing /var/cache/urpmi/partial/newlisp-8.4.3-1mdk.i586.rpm

Preparing...                ##################################################

   1:newlisp                ##################################################

[root@p800 nigel]#



Regards

Nigel
#12
Anything else we might add? / 127 char limit in get-url
January 05, 2005, 09:50:44 PM
I'm porting some amazon webservices code from their perl examples to newlisp (of course) and to retrieve the info from amazon a 206 char url is generated (below is the string formed from newlisp with my SubscriptionId X'ed out)

viz:

> (length "http://webservices.amazon.com/onca/xml?Service=AWSECommerceService&Operation=ItemLookup&SubscriptionId=XXXXXXXXXXXXXXXXXXXX&ItemId=052164481X&MerchantId=All&ResponseGroup=OfferFull&OfferPage=1&Condition=All">http://webservices.amazon.com/onca/xml? ... dition=All">http://webservices.amazon.com/onca/xml?Service=AWSECommerceService&Operation=ItemLookup&SubscriptionId=XXXXXXXXXXXXXXXXXXXX&ItemId=052164481X&MerchantId=All&ResponseGroup=OfferFull&OfferPage=1&Condition=All")

206

trying to get url gives:

> (get-url "http://webservices.amazon.com/onca/xml?Service=AWSECommerceService&Operation=ItemLookup&SubscriptionId=XXXXXXXXXXXXXXXXXXXX&ItemId=052164481X&MerchantId=All&ResponseGroup=OfferFull&OfferPage=1&Condition=All">http://webservices.amazon.com/onca/xml? ... dition=All">http://webservices.amazon.com/onca/xml?Service=AWSECommerceService&Operation=ItemLookup&SubscriptionId=XXXXXXXXXXXXXXXXXXXX&ItemId=052164481X&MerchantId=All&ResponseGroup=OfferFull&OfferPage=1&Condition=All")

"ERR: bad formed URL"

>

I see in nl-web.c the code:

int parseUrl(char* url, char* host, int* port, char* path)

{

char* colonPtr;

char* slashPtr;

int len;



/* trim trailing whitespace like '/r/n' from url */

if((len = strlen(url)) > 127) return(FALSE);

while(*(url + len) <= ' ' && len > 0)

   {

   *(url + len) = 0;

   len--;

   }

...

and

/* parse URL for parameters */

if(parseUrl(url, host, &port, path) == FALSE)

   return(stuffString(ERROR_BAD_URL));

...

so I suspect the long url is the problem.

I've not looked further into what would be required to accept longer url's but could this be done easily (in which case I could try coding)? Or would need some string buffer structures etc or different system calls?



Regards

Nigel
#13
newLISP in the real world / flushing thread output
September 20, 2004, 08:58:28 AM
When running my prime seive example

http://www.alh.net/newlisp/phpbb/viewtopic.php?p=2639#2639">http://www.alh.net/newlisp/phpbb/viewto ... =2639#2639">http://www.alh.net/newlisp/phpbb/viewtopic.php?p=2639#2639

 I notice that the println output from the multiple threads seems to come out in the order that they are exited rather than the order I would expect if each println printed on the console immediately. See output fragment below.

Is this apparent buffering likely to be in the console output or in the pipes? I'll try some timestamping to check.

However, is there a way to flush output by println to the console immediately? - or does thta always happen? In which case pipe buffering effects seem likely culprits.

I've no experience in this forking stuff!



Nigel





Output fragment:

[nigel@p800 nigel]$ ./bin/newlisp primethreads1.lsp

Prime number 1 is 2

[nigel@p800 nigel]$ Prime number 2 is 3

Killing 2

Prime number 3 is 5

Killing 3

Prime number 4 is 7

Killing 5

Killing 7

Prime number 5 is 11

Killing 11

Prime number 6 is 13

Killing 13

Prime number 7 is 17

Prime number 8 is 19

Killing 17

Killing 19

Prime number 9 is 23

Killing 23

Prime number 10 is 29

Killing 29

Prime number 11 is 31

Prime number 12 is 37

Killing 31

Killing 37

Prime number 13 is 41
#14
newLISP newS / newLisp 8.1.0 is up
August 11, 2004, 02:47:45 PM
Hi Lutz

I see 8.1.0 is on newlisp.org

Compiled and ran fine of course (Mdk 9.1)



Congrats



Nigel
#15
Anything else we might add? / common lisp live cd
August 11, 2004, 07:55:18 AM
Lispers may be interested in this live CD linux with common lisp bundled:

http://www.common-lisp.net/project/lisp-res-kit/">http://www.common-lisp.net/project/lisp-res-kit/



Nigel
#16
People (newLispers in particular) may be interested in the discussion of

dynamically scoped functions in aspect-oriented programming in lisp.

See http://www.cs.uni-bonn.de/~costanza/">http://www.cs.uni-bonn.de/~costanza/

particularly the pdf "Dynamically Scoped Functions as the Essence of AOP"

( http://www.cs.uni-bonn.de/~costanza/dynfun.pdf">http://www.cs.uni-bonn.de/~costanza/dynfun.pdf ).



Nigel
#17
newLISP and the O.S. / Install & live cd
August 08, 2004, 05:18:44 AM
I'm trying out newlisp and ClusterKnoppix - a live CD distribution that

has OpenMosix clustering 'off the shelf'. I've booted two of my home network

with V3.4 and found openmosix works fine and downloading newlisp source

compiling and running newlisp from the compilation directory works fine as expected.

Run multiple compute intensive newlisp programs and openmosix moves them between the nodes fine!

However, I wanted to use newlsip-tk and found the make install fails because on the 'live cd'

/usr/share is read-only. I tried running newlisp-tk from the ource directory but it

looks for images in the usr/share tree (the default place). I then wanted to change the .config

file for newlisp-tk (as suggested in the docs for running in a different directory)

 but you have to be able to start newlisp-tk to generate the first .config

file but I can't start newlisp-tk without a modified .config file?



To get to my point could a default .config file be in the source tree?  - it could be in

a few versions for different systems eg .config.linux that could be renamed.



Any other suggestions for running newlisp-tk without images etc  being in /usr/share



Nigel
#18
Anything else we might add? / ? mod_newlisp
July 18, 2004, 07:10:32 PM
I see scheme has a flavour:



[032] - mod_scheme 0.3.3

  by rahul (http://freshmeat.net/users/bluFox/">http://freshmeat.net/users/bluFox/)

  Fri, Jul 16th 2004 14:03



Internet :: WWW/HTTP :: HTTP Servers



About: mod_scheme is a Scheme module for Apache. It embeds  the Tinyscheme interpreter, and makes the functions  exported by the Apache Web server available to Scheme  programs.



Changes: The Scheme interpreter used by mod_scheme has been updated to the 1.35 release of tinyscheme. Issues with Unix compilation have been resolved. There are other minor bugfixes and cleanups.



License: The Apache License



URL: http://freshmeat.net/projects/mod_scheme/">http://freshmeat.net/projects/mod_scheme/



Would it be worth NewLisp being able to do that?



Regards

Nigel
#19
newLISP in the real world / another C free compiler
June 03, 2004, 09:01:43 PM
Previously Borland as the Win32 free compiler for NewLisp has been discussed with Pelles C being suggested as a possible alternative (I got errors trying to use Pelles C with no tweaking and have not had time to continue with it)

- now I realise that MS has release a free version (command line only) of Visual C++

viz

"  http://msdn.microsoft.com/visualc/vctoolkit2003/">http://msdn.microsoft.com/visualc/vctoolkit2003/



It's independent of .NET, basically superceeds MSVC++ 6.0. The free package includes all dev tools, libaries and operating system API files, but no graphical front end" - the quote is from http://www.keystoneframework.org">www.keystoneframework.org the home of a framework that could be looked at as an alternative front end that's more C-like than tk/tcl.



Have you ever tried NewLisp with MSVC Lutz?





Nigel
#20
I was looking a automatic checking for topic updates on this forum by get-url and regex for folder-new.gif as there are only 2 if no new topics so

(length (parse (get-url "http://www.alh.net/newlisp/phpbb/index.php">http://www.alh.net/newlisp/phpbb/index.php") "folder_new.gif"))

is 3.

However, to be logged in to see if there are new posts since my last vist/check I guess I have to send and receive cookie type info - I've looked around a bit and will look some more but hoped someone may have a quick answer on how to do cookies with newlisp?



I see the httpd server example says:

; handles cgi but no cookies



Nigel