Re: sending data over udp

2010-08-14 Thread Daniel Elliott
Thank you for the answer and the suggestions.  I will look into them furthe=
r.

- dan

On Sat, Aug 14, 2010 at 11:28 AM, Alexander Burger a...@software-lab.de wr=
ote:
 Hi Dan,

  You mean, for example, by sending a list of numbers representing bytes=
?
  e.g.
 
  =3DA0 (udp Host Port (1 2 3 4 5 6 7))

 Yes, but without the extra bytes for the list data structure.

 Unfortunately, the existing 'udp' function cannot do that. It can handle
 only Lisp data.

 You could make your own custom function, e.g. with inline-C using 'gcc'

 =A0 (load @lib/gcc.l)

 =A0 (gcc net NIL 'rawUdp)

 =A0 any rawUdp(any ex) {
 =A0 =A0 =A0...
 =A0 =A0 =A0byte buf[UDPMAX];

 =A0 =A0 =A0...
 =A0 =A0 =A0fill 'buf' with bytes
 =A0 =A0 =A0sd =3D socket(AF_INET, SOCK_DGRAM, 0)
 =A0 =A0 =A0sendto(sd, buf, ...)
 =A0 =A0 =A0close(sd);

 =A0 }
 =A0 /**/

 but this is rather tedious, manipulating the buffer and byte data.

 I don't know any really easy way at the moment. How about writing raw
 bytes to a pipe or temp file, and using an external tool like 'nc' to
 actually transfer the data?

 Cheers,
 - Alex
 --
 UNSUBSCRIBE: mailto:picol...@software-lab.de?subject=3dunsubscribe

-- 
UNSUBSCRIBE: mailto:picol...@software-lab.de?subject=unsubscribe


sending data over udp

2010-08-13 Thread Daniel Elliott
A few weeks ago I asked about sending data over TCP.  Well, my program
must now use UDP and it appears that UDP simply sends PicoLisp data
structures.

Prior to this, I was simply creating a list of byte-sized numbers and
using wr to send them via TCP.

Is there any way to do something similar using UDP?

By the way, this question is somewhat time sensitive.

Thank you.

- dan
-- 
UNSUBSCRIBE: mailto:picol...@software-lab.de?subject=unsubscribe


Re: PL vs. BSD License

2010-08-02 Thread Daniel Elliott
Hello.

Does the GPL affect code that I write that runs on PicoLisp, or just
changes to the PicoLisp interpreter?

If only changes to the interpreter are affected, than GPL is the way
to go as far as I am concerned.

However, I should add that many large companies (at least in the US)
are irrationally terrified of anything GPL.  It is very annoying.

- dan

On Mon, Aug 2, 2010 at 3:50 AM, Mansur Mamkin mmam...@mail.ru wrote:
 Hi all,

 Hi all,

 as this discussion popped up recently and in the past, and will surely
 pop up in the future: What do you think if PicoLisp were released under
 the BSD license instead of GPL?


 Why not? It would be great to see PicoLisp under BDS license

 Oops, sorry, I mean BSD

 --
 UNSUBSCRIBE: mailto:picol...@software-lab.de?subject=unsubscribe

-- 
UNSUBSCRIBE: mailto:picol...@software-lab.de?subject=unsubscribe


Fwd: PicoLisp Browser GUI example error

2010-07-27 Thread Daniel Elliott
Didn't see the mailing list until after I sent this email.  Any ideas?


-- Forwarded message --
From: Daniel Elliott danelliotts...@gmail.com
Date: Tue, Jul 27, 2010 at 8:45 AM
Subject: PicoLisp Browser GUI example error
To: a...@software-lab.de, josef.ba...@2bartl.de


Mr. Burger and Mr. Bartl,

Thank you for your work on PicoLisp. =A0It is absolutely perfect for an
important portion of a agricultural system prototype my startup is
building. =A0We want to use PicoLisp on a device running OpenWRT. =A0We
have already successfully built and installed PicoLisp on the device
with the help of Jeronimo Pellegrini's package.

However, I am having difficulty with the Browser GUI example. =A0When
I run picolisp this is what I get:

r...@openwrt:/usr/share/picolisp# pico dbg.l lib/http.l lib/xhtml.l
lib/form.l -'server 8080 ~/helloworldhttp.l'
tput: can't exec
tput: can't exec
[/usr/bin/../share/picolisp/lib/debug.l:147] !? (in l...@lib/tags
(while (read) (let Sym @ (if (get Sym '*Dbg) (set @ (read)) (put Sym
'*Dbg (cons (read)))
/usr/bin/../share/picolisp/lib/tags open: No such file or directory

Is it looking for a tags.l file in the lib? =A0If so, it is not present.

Thanks, again, for your work on this language. =A0We are hopeful we will
be able to use it for other parts of our system (perhaps in place of
common Lisp) but are starting with running it on an embedded device.

By the way, is there a better place to post this question?

Thank you.

- dan elliott
-- 
UNSUBSCRIBE: mailto:picol...@software-lab.de?subject=unsubscribe


Re: PicoLisp Browser GUI example error

2010-07-27 Thread Daniel Elliott
Thanks!  That got me over the hump.  I put a tags file in lib.  It
turns out the ht library was also missing from the package.  I will
let Jeronimo Pellegrini know.

Once I added those two things, I was able to run the first couple
lines of the example.

- dan

On Tue, Jul 27, 2010 at 9:25 AM, Alexander Burger a...@software-lab.de wro=
te:
 Hi Dan,

 Didn't see the mailing list until after I sent this email. =A0Any ideas?

 No problem. In general it is better to ask such questions in the mailing
 list, though, as other people might also benefit then. Next time then ;)


 Thank you for your work on PicoLisp. =A0It is absolutely perfect for an
 important portion of a agricultural system prototype my startup is

 Hehe, that's interesting :-) Josef Bartl an me initially also worked on
 agricultural systems (warehoses) when we first met (almost 20 years
 ago).


 building. =A0We want to use PicoLisp on a device running OpenWRT. =A0We
 have already successfully built and installed PicoLisp on the device
 with the help of Jeronimo Pellegrini's package.

 OK


 However, I am having difficulty with the Browser GUI example. =A0When
 I run picolisp this is what I get:

 r...@openwrt:/usr/share/picolisp# pico dbg.l lib/http.l lib/xhtml.l
 lib/form.l -'server 8080 ~/helloworldhttp.l'
 tput: can't exec
 tput: can't exec

 I see. The 'tput' command seems not available on OpenWRT. This makes
 sense, as this is not very useful in such an environment.

 I would suggest to remove the whole expression (when (sys TERM) ..)
 from lib/dbg.l. It is not important, it only sets the '*Tsm' console
 mode (the transient symbol markup, which underlines transient symbols
 (strings)).

 [/usr/bin/../share/picolisp/lib/debug.l:147] !? (in l...@lib/tags
 (while (read) (let Sym @ (if (get Sym '*Dbg) (set @ (read)) (put Sym
 '*Dbg (cons (read)))
 /usr/bin/../share/picolisp/lib/tags open: No such file or directory

 Is it looking for a tags.l file in the lib? =A0If so, it is not present.

 Yeah, it seems it didn't get included into the distribution. It is
 rather large, and only needed for source access during debugging. I
 would suggest to create an empty file lib/tags.

 Please let me know how you get along, and don't hesitate to ask! :-)

 Cheers,
 - Alex

-- 
UNSUBSCRIBE: mailto:picol...@software-lab.de?subject=unsubscribe


threading in PicoLisp

2010-07-27 Thread Daniel Elliott
Hello again,

I have my HTTP-based GUI but my process is going to do a bunch of
stuff and it would be nice if the web server were still responsive.
The GUI will only display information about the status of the program
and will be able to display information from the DB.

Would this be best handled by threading or through sharing a PicoLisp
database?  How is threading handled in PicoLisp?

- dan elliott
-- 
UNSUBSCRIBE: mailto:picol...@software-lab.de?subject=unsubscribe