Unsubscribe

2017-10-03 Thread Christopher Howard



signature.asc
Description: This is a digitally signed message part


Unsubscribe

2017-10-03 Thread Christopher Howard
Good bye Christopher Howard <christopher.how...@qlfiles.net> :-(
You are now unsubscribed



-- 
https://directory.fsf.org/wiki/Main_Page

-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: PicoLisp on quora.com

2017-09-26 Thread Christopher Howard
Something that would be of more interest would be a comparison of
Scheme and PicoLisp. I think even people who who use CL a lot are kind
of embarrassed about a lot of the design choices, and recognize that it
was meant to be a practical hodgepodge of features from different
lisps, rather than a focused design philosophy.

Of course, a lot of the same points below would still apply. But with
Schemes the whole issue of composability vs monolithism as mentioned in
the chrisdone.com article pretty much melts away. SRFI-1 has all the
"haskell" functions mentioned in the article.

I work with Guile Scheme, and to me the biggest differences between
Guile and PicoLisp are: (1) Guile code is compiled (though often at
runtime); and (2) Guile is designed from the ground up to interface
well with system libraries (you can even embed Guile inside a C program
fairly easily).

Of course, scheme is really just a language specification and design
philosophy, and implementations get even more fragmented than CL does,
because Scheme is more minimalistic and extensible than CL. So, perhaps
a comparison of Scheme and PicoLisp would be even more challenging.

On Tue, 2017-09-26 at 17:07 +0200, andr...@itship.ch wrote:
> Disclaimer: I don't really know Common Lisp.
> 
> Just a try, use it as inspiration not as answer, would need re-
> wording to be used as quora answer:
> 
> - they're about the same age, both inspired by Maclisp, both used
> commercially since the 1980s
> - picolisp is a language and runtime VM - CL is a language
> specification with multiple implementations
> - CL libraries may often be platform-dependent (or depend on a
> certain compiler to be used) - code in picolisp has much less such
> dependencies
> - picolisp has no compiler, purely interpreted by design - CL is
> usually compiled, interpreted only during development
> - picolisp directly evals s-expressions, the structure of the memory
> representation is the same as the structure of the source code -
> common lisp compiles to XX (?)
> - only 3 strong types: list, number (arterially big signed integers),
> symbol (with property list), all other types are dynamically duck-
> typed - common lisp has many types (?)
> - picolisp uses F-Expressions (FEXPRs, Functions which decide
> themselves if/when/how to evaluate arguments) - common lisps uses
> macros (rewrite code). F-Expr are slightly more powerful but cannot
> be compiled
> - common lisp as big community - picolisp community is pico
> - many libraries for CL - in picolisp programmers usually re-use
> libraries from other languages
> - picolisp strongly follows unix philosophy - CL does not follow unix
> philosophy ( http://chrisdone.com/posts/haskell-lisp-philosophy-diffe
> rence )
> - picolisp has integrated graph database, persistent database objects
> are first-class citizens, integrated prolog engine
> - picolisp has no multithreading, instead picolisp has integrated IPC
> to work with multiple processes and makes asynchronious programming
> easy - common lisp has ... ???
> 
> Please correct my errors.
> 
> Most points of the FAQ should probably go into the quora answer: http
> ://www.software-lab.de/doc/faq.html
> See also: http://picolisp.wikidot.com/
> 
> 
> 
> - Original Message -
> From: Mike Pechkin [mailto:mike.pech...@gmail.com]
> To: picolisp@software-lab.de
> Sent: Tue, 26 Sep 2017 15:58:05 +0300
> Subject: Re: PicoLisp on quora.com
> 
> >
> >
> > Uh, oh, this is really tough.
> 
> 
> Just one smart paragraph.
> 
> (mike)
> 
> 
> 
-- 
Christopher Howard
Enterprise Solutions Manager
Alaska Satellite Internet
3239 La Ree Way
Fairbanks, Alaska 99709
1-888-396-5623
https://alaskasatelliteinternet.com
personal web site: https://qlfiles.net
https://emailselfdefense.fsf.org/en/




signature.asc
Description: This is a digitally signed message part


Installation / Load Paths

2017-09-02 Thread Christopher Howard
Hi, what is the customary way PicoLisp programmers deal with load path
issues when trying to install a completed program onto a Gnu/Linux
system? My program has two *.l files. What I wanted to do was:

- Put the *.l files in $(PREFIX)/share/programname/
- Have a bash or picolisp script in $(PREFIX)/bin that starts the
program in $(PREFIX)/share/programname.
- Preferably do all this without having to modify the callers CWD.

This creates some difficulties because one of the source files simply
does a (load "myothermodule.l"), which works great when running from
the source directory, but not when installed somewhere outside the CWD.
Do I need to change that to (load "@myothermodule.l) and modify the @
variable somehow during invocation? Or I guess I could install all my
supporting files in @lib/ in the picolisp installation directory.

Or is there some other "load-path" mechanism in picolisp I'm not
seeing...?

-- 
https://qlfiles.net
https://emailselfdefense.fsf.org/en/


signature.asc
Description: This is a digitally signed message part


Re: Dr. Theobold Text Adventure Game: Looking for Beta Testers

2017-09-02 Thread Christopher Howard
Hi, thanks for the response. I think I may need to disable the "Project
Homepage" feature, or put a stub in there. Regarding the download
links, which link are you using? A think there may be a problem with
line wrapping in the release announcement I sent out, breaking the link


Dr. Theobold Text Adventure Game: Looking for Beta Testers

2017-09-02 Thread Christopher Howard
This link is a release announcement for a beta version of a text-
adventure game I wrote in PicoLisp:

http://lists.nongnu.org/archive/html/dr-theobold-discuss/2017-09/msg000
00.html

This is the project home page:

https://savannah.nongnu.org/projects/dr-theobold/

I am looking for at least one more beta tester to work through the game
before releasing the production release. Please let me know if you
testing the game, so I know whether or not I need to look for more
testers. Please note that beta testers can request FREE (vague) hints
from the game designer if they get stuck on any particular part of the
game! Limited time offer! :)

-- 
https://qlfiles.net
https://emailselfdefense.fsf.org/en/


signature.asc
Description: This is a digitally signed message part


Re: Beginner RESTful Web app in PicoLisp?

2017-08-18 Thread Christopher Howard
If somebody does not want to put their license on *every* source code
file, I can live with that, unwise as it is. But it has to be at least
mentioned once in the source code package! Or at least once in the
place where you get the code from!

I don't know how this works in the rest of the world, but in the USA,
copyright means ALL RIGHTS RESERVED unless the copyright holder
declares otherwise.

On Fri, 2017-08-18 at 07:47 +0200, Alexander Burger wrote:
> On Fri, Aug 18, 2017 at 07:44:33AM +0200, Alexander Burger wrote:
> > On Thu, Aug 17, 2017 at 06:05:20PM -0800, Christopher Howard wrote:
> > > Hi, this does look interesting! However, the license for the code
> > > is
> > > not stated clearly anywhere in the code or on the wiki, as near
> > > as I
> > > can tell.
> > 
> > Uuhh, in what kind of world are we living!? In which people become
> > paranoid
> > about the license for a *single* line of code? Surely not my world.
> 
> Sorry, I just noticed that this referred to the bitbucket wiki, not
> the
> single-liner! Still ...
> 

signature.asc
Description: This is a digitally signed message part


Re: Beginner RESTful Web app in PicoLisp?

2017-08-17 Thread Christopher Howard
Hi, this does look interesting! However, the license for the code is
not stated clearly anywhere in the code or on the wiki, as near as I
can tell.

On Thu, 2017-08-17 at 09:30 +0300, Alexander Sharihin wrote:
> Hello!
> 
> If you want create rest app you can try this library: https://bitbuck
> et.org/iromero91/web.l/wiki/Home
> 
> 2017-08-17 8:48 GMT+03:00 Christopher Howard <christopher.howard@qlfi
> les.net>:
> > Hi, I want to create a really simple PicoLisp Web application that
> > parses the URL, and does something. Probably something silly, e.g.,
> > visiting http://localhost/addition/2/2 returns a Web page showing
> > 2+2 =
> > 4. Is there some small sample PicoLisp code I could look at or
> > start
> > with?
> > 
> > I saw on picolisp.com the tutorial <https://picolisp.com/wiki/?mind
> > bgui
> > >, but it didn't seem quite like what I was looking for.
> 
> 

signature.asc
Description: This is a digitally signed message part


Beginner RESTful Web app in PicoLisp?

2017-08-16 Thread Christopher Howard
Hi, I want to create a really simple PicoLisp Web application that
parses the URL, and does something. Probably something silly, e.g.,
visiting http://localhost/addition/2/2 returns a Web page showing 2+2 =
4. Is there some small sample PicoLisp code I could look at or start
with?

I saw on picolisp.com the tutorial , but it didn't seem quite like what I was looking for.

signature.asc
Description: This is a digitally signed message part


Re: Line Width Formatting

2017-08-09 Thread Christopher Howard
Sounds like just what I need. Thanks!

On Wed, 2017-08-09 at 11:27 +0200, Alexander Burger wrote:
> Hi Christopher,
> 
> > Hi list. I need a function that would print out a string, but
> > inserting
> > newlines in between words to ensure that line width does not exceed
> > some arbitrary value. Does somebody already have such a function?
> 
> How about the 'wrap' function in @lib/misc.l ?
> 
>    http://software-lab.de/doc/refW.html#wrap
> 
> ♪♫ Alex
> 

signature.asc
Description: This is a digitally signed message part


Line Width Formatting

2017-08-09 Thread Christopher Howard
Hi list. I need a function that would print out a string, but inserting
newlines in between words to ensure that line width does not exceed
some arbitrary value. Does somebody already have such a function? I'm
sure I could figure it out, but it seems like one of those reinventing-
the-wheel scenarios. It would save me a little bit of time on a big
project if somebody already had one to share.
-- 
https://qlfiles.net
https://emailselfdefense.fsf.org/en/


signature.asc
Description: This is a digitally signed message part


Re: Less powerful 'str?

2017-06-17 Thread Christopher Howard
I think I found what I was looking for, modifying an example from the docs:

: (mapcar pack (split (chop (line T)) " "))
go north
-> ("go" "north")

On 06/17/2017 02:35 PM, Joh-Tob Schäg wrote:
> Take a look at 'read.
> You may need to 'eval the result.
> If 'read does not suit your needs i wrote a tokenizer and parser but the
> source code is not yet ready fot publication
> 
> Am 17.06.2017 23:42 schrieb "Christopher Howard"
> <christopher.how...@qlfiles.net <mailto:christopher.how...@qlfiles.net>>:
> 
> Hi list. I find that the 'str function is rather convenient for
> processing commands from the user, as it converts the input to list
> format, like in
> 
> : (str (line T))
> go north
> -> (go north)
> 
> However, it creates complications in allowing commands like:
> 
> : (str (line T))
> `(+ 1 2 3)
> -> (6)
> 
> and
> 
> : (str (line T))
> "crash!
> EOF Overrun
> ?
> 
> Is there another simple way to get the lists provided by 'str without
> the user this power to run code?
> 
> --
> https://qlfiles.net
> 
> --
> UNSUBSCRIBE: mailto:picolisp@software-lab.de
> <mailto:picolisp@software-lab.de>?subject=Unsubscribe
> 

-- 
https://qlfiles.net

-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Less powerful 'str?

2017-06-17 Thread Christopher Howard
Hi list. I find that the 'str function is rather convenient for
processing commands from the user, as it converts the input to list
format, like in

: (str (line T))
go north
-> (go north)

However, it creates complications in allowing commands like:

: (str (line T))
`(+ 1 2 3)
-> (6)

and

: (str (line T))
"crash!
EOF Overrun
?

Is there another simple way to get the lists provided by 'str without
the user this power to run code?

-- 
https://qlfiles.net

-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: single letters

2017-06-16 Thread Christopher Howard
Thanks!

On 06/16/2017 08:29 PM, Mike Pechkin wrote:
> https://bitbucket.org/mihailp/tankfeeder/src/70c0cfb9e8e3adf4737f70a23a9d4b615d74e4ff/onechar.l?at=default=file-view-default
> 
> On Sat, Jun 17, 2017 at 5:31 AM, Christopher Howard
> <christopher.how...@qlfiles.net <mailto:christopher.how...@qlfiles.net>>
> wrote:
> 
> Hi list. In picolisp, what would be the simplest way to check if a
> string (trans sym) is one character long and that the character is one
> of the letters a-z or A-Z?
> 
> --
> https://qlfiles.net
> 
> --
> UNSUBSCRIBE: mailto:picolisp@software-lab.de
> <mailto:picolisp@software-lab.de>?subject=Unsubscribe
> 
> 

-- 
https://qlfiles.net

-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


single letters

2017-06-16 Thread Christopher Howard
Hi list. In picolisp, what would be the simplest way to check if a
string (trans sym) is one character long and that the character is one
of the letters a-z or A-Z?

-- 
https://qlfiles.net

-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


State monad in PicoLisp

2017-05-09 Thread Christopher Howard
Hi list, just for the fun of sharing, I wanted to show that I translated
the State Monad from Haskell into PicoLisp:

http://git.savannah.nongnu.org/cgit/picolisp-nb.git/tree/state-monad/state-monad.l?id=cb96377cf513b927e8a3c73a77ab5ed6c95a9be8

One would perhaps want to write some more syntactic sugar to make it as
convenient to use as the Haskell version.

I think for the most part picolispers would not find the state monad
useful. However, I could conceive of myself using it in a game or
simulation where a single "World" variable is constantly be referenced
and modified, allowing me to pass it around in clean FP style without
making it an explicit parameter.

-- 
https://qlfiles.net

-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: Picolisp within Picolisp (for games, etc.)? Or, PicoLisp VM?

2017-05-03 Thread Christopher Howard
Just out of curiosity: does PicoLisp have some mechanism for dumping the
process image (or some equivalent effect) so you can save a PicoLisp
process in a certain state and restart it there.

On 04/28/2017 08:54 AM, Alexander Burger wrote:
> On Fri, Apr 28, 2017 at 08:08:35AM -0800, Christopher Howard wrote:
>> Sounds like quite a project in and of itself.
> 
> Indeed.
> 
> You might consider to take ErsatzLisp (or miniPicoLisp), and throw out all I/O
> functionality, and other system accesses like Runtime...exec().
> 
> ♪♫ Alex
> 
>> On 04/27/2017 10:18 PM, Joh-Tob Schäg wrote:
>>> I thought about the same.
>>> My insights are:
>>> You can 'let all relevant symbols with alternative functions or just
>>> NIL. Adresses 1 & 2
>>> You might want to change the repl in a way that if for example the
>>> symbols car and list are evaluated they return a meaningless number. (It
>>> might be possible to calculate the offset and execute arbitrary lisp
>>> code.) 1 & 2
>>> And alternative would be to rewrite the picolisp eval function and only
>>> let it load Symbols from a certain namespace/symbol to function property
>>> list.
>>> Regarding 3: the best way to archieve that is putting the execution of
>>> this code in a 'later. You can either cancel them after a certain time
>>> via kill while your game world goes on (ask regenaxer how the open pipe
>>> is handled or wait for the result) 3 execution time aspect.
>>> To controll the space aspect you need rewrite picolisp in picolisp and
>>> maintain your own free list or let all functions the user can call
>>> either increase a counter on each allocation and throw an error if the
>>> number of allocations exhausts the virtual machine capacity.
>>>
>>> Am 28.04.2017 04:18 schrieb "Christopher Howard"
>>> <christopher.how...@qlfiles.net <mailto:christopher.how...@qlfiles.net>>:
>>>>
>>>> Hi list, I was wondering if there would be a practical way to safely
>>>> contain a picolisp interpreter (or some subset of commands) inside
>>>> another picolisp program. E.g., suppose you have a computer game
>>>> programmed in PicoLisp, and the main character found a computer terminal
>>>> that allowed him to run some commands or program something in PicoLisp
>>>> The obvious safety concerns here are:
>>>>
>>>> (1) You either want to disable disk access, or make it so that disk
>>>> access pulls from a virtual disk in the game.
>>>>
>>>> (2) You don't want the user to be changing memory in the game itself,
>>>> only his virtual memory.
>>>>
>>>> (3) You don't want the user to be able to exhaust memory or blow the
> 

-- 
Christopher Howard, Computer Assistant
Alaska Satellite Internet
3239 La Ree Way, Fairbanks, AK 99709
907-451-0088 or 888-396-5623 (toll free)
fax: 888-260-3584
mailto:christop...@alaskasi.com
http://www.alaskasatelliteinternet.com

-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: Picolisp within Picolisp (for games, etc.)? Or, PicoLisp VM?

2017-04-28 Thread Christopher Howard
Sounds like quite a project in and of itself.

On 04/27/2017 10:18 PM, Joh-Tob Schäg wrote:
> I thought about the same.
> My insights are:
> You can 'let all relevant symbols with alternative functions or just
> NIL. Adresses 1 & 2
> You might want to change the repl in a way that if for example the
> symbols car and list are evaluated they return a meaningless number. (It
> might be possible to calculate the offset and execute arbitrary lisp
> code.) 1 & 2
> And alternative would be to rewrite the picolisp eval function and only
> let it load Symbols from a certain namespace/symbol to function property
> list.
> Regarding 3: the best way to archieve that is putting the execution of
> this code in a 'later. You can either cancel them after a certain time
> via kill while your game world goes on (ask regenaxer how the open pipe
> is handled or wait for the result) 3 execution time aspect.
> To controll the space aspect you need rewrite picolisp in picolisp and
> maintain your own free list or let all functions the user can call
> either increase a counter on each allocation and throw an error if the
> number of allocations exhausts the virtual machine capacity.
> 
> Am 28.04.2017 04:18 schrieb "Christopher Howard"
> <christopher.how...@qlfiles.net <mailto:christopher.how...@qlfiles.net>>:
>>
>> Hi list, I was wondering if there would be a practical way to safely
>> contain a picolisp interpreter (or some subset of commands) inside
>> another picolisp program. E.g., suppose you have a computer game
>> programmed in PicoLisp, and the main character found a computer terminal
>> that allowed him to run some commands or program something in PicoLisp
>> The obvious safety concerns here are:
>>
>> (1) You either want to disable disk access, or make it so that disk
>> access pulls from a virtual disk in the game.
>>
>> (2) You don't want the user to be changing memory in the game itself,
>> only his virtual memory.
>>
>> (3) You don't want the user to be able to exhaust memory or blow the
> stack.
>>
>> --
>> https://qlfiles.net
>>
>> --
>> UNSUBSCRIBE: mailto:picolisp@software-lab.de
> <mailto:picolisp@software-lab.de>?subject=Unsubscribe
> 

-- 
Christopher Howard, Computer Assistant
Alaska Satellite Internet
3239 La Ree Way, Fairbanks, AK 99709
907-451-0088 or 888-396-5623 (toll free)
fax: 888-260-3584
mailto:christop...@alaskasi.com
http://www.alaskasatelliteinternet.com

-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Picolisp within Picolisp (for games, etc.)? Or, PicoLisp VM?

2017-04-27 Thread Christopher Howard
Hi list, I was wondering if there would be a practical way to safely
contain a picolisp interpreter (or some subset of commands) inside
another picolisp program. E.g., suppose you have a computer game
programmed in PicoLisp, and the main character found a computer terminal
that allowed him to run some commands or program something in PicoLisp.
The obvious safety concerns here are:

(1) You either want to disable disk access, or make it so that disk
access pulls from a virtual disk in the game.

(2) You don't want the user to be changing memory in the game itself,
only his virtual memory.

(3) You don't want the user to be able to exhaust memory or blow the stack.

-- 
https://qlfiles.net

-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: Serial communication?

2017-04-25 Thread Christopher Howard
perhaps that is preparing the communications channel somehow.

Notwithstanding your declaration of absolute certainty, I still am
wondering if the *manner* of reading and writing is somehow relevant,
thinking specifically of the *timing*. In the above strace, the microcom
code is constantly calling select to check whether to file descriptors
are ready for reading, before actually doing the read. Significant...?
select() document states that the purpose of select() is to make sure
(among other things) that it is possible to do a read() without blocking.

Perhaps I'm boring you all at this point. Maybe it would be more useful
to talk with numato developers or a linux forum and come back when I
know more.

On 04/25/2017 08:13 AM, Alexander Burger wrote:
> On Tue, Apr 25, 2017 at 07:49:33AM -0800, Christopher Howard wrote:
>> Well, since microcom and screen can both read the data fine, logically
>> it must be a fault either in my picolisp programming, or the way
>> picolisp handles input. At home I've been playing around with coding it
>> different to try to capture more in a single read, such us using 'rd,
> No, as we saw in the strace, the low-level read does not return. So it doesn't
> matter how you intend to process the data on the higher levels ('rd' vs. 
> 'read'
> vs. 'line' or 'char').
> 
>> and introducing delays at various points, but no luck so far. I'm going
>> to try to strace microcom and see what it does differently. Maybe it all
>> has something to do with the ioctl params...?
> 
> What about the serial line parameters? Some handshaking?
> 
> 
>> Incidentally, is the a way in picoLisp to pull all available data from a
>> file (not just a line) in one call, but without evaluating said data?
>> There's load, but that always evaluates the file data. I guess I could
>> do a character at a time and poll for eof...?
> 
> Yes, e.g
> 
>(in File (make (while (char) (link @
> 
> But easier is
> 
>(in File (till))
> 
> for a list of characters or
> 
>(in File (till NIL T))
> 
> for a single long string.
> 
> ♪♫ Alex
> 

-- 
https://qlfiles.net

-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: Serial communication?

2017-04-25 Thread Christopher Howard
Well, since microcom and screen can both read the data fine, logically
it must be a fault either in my picolisp programming, or the way
picolisp handles input. At home I've been playing around with coding it
different to try to capture more in a single read, such us using 'rd,
and introducing delays at various points, but no luck so far. I'm going
to try to strace microcom and see what it does differently. Maybe it all
has something to do with the ioctl params...?

Incidentally, is the a way in picoLisp to pull all available data from a
file (not just a line) in one call, but without evaluating said data?
There's load, but that always evaluates the file data. I guess I could
do a character at a time and poll for eof...?

On 04/24/2017 09:49 PM, Alexander Burger wrote:
> On Mon, Apr 24, 2017 at 07:56:32PM -0800, Christopher Howard wrote:
>> The lines...
>>
>> write(3, "ver\n", 4)= 4
>> read(3, "ver\n", 8192)  = 4
>>
>> ..are where I have prinl'd "ver" to the dev file and got it echoed back.
> 
> Yes, as observed.
> 
> 
>> I do not know what...
>>
>> read(3, 0x9f0148, 8192) = ? ERESTARTSYS (To be restarted
> 
> Here it hangs in the next read. The first read returned only 4 bytes (as seen
> from the "= 4" return value) despite 8 KiB were requested, but then no more 
> data
> arrive.
> 
> Perhaps the opposing side doesn't flush() after writing? Or some tty or USB
> driver doesn't? In any case, this seems not under the control of this PicoLisp
> process.
> 
> ♪♫ Alex
> 

-- 
Christopher Howard, Computer Assistant
Alaska Satellite Internet
3239 La Ree Way, Fairbanks, AK 99709
907-451-0088 or 888-396-5623 (toll free)
fax: 888-260-3584
mailto:christop...@alaskasi.com
http://www.alaskasatelliteinternet.com

-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: Serial communication?

2017-04-24 Thread Christopher Howard
Here is the relevant part of the strace:

write(1, "(check-version", 14)  = 14
write(1, "\10\10\10\10\10\10\10\10\10\10\10\10\10\10(check-version)",
29) = 29
select(1, [0], [], NULL, NULL)  = 1 (in [0])
fcntl(0, F_GETFL)   = 0x8002 (flags O_RDWR|O_LARGEFILE)
fcntl(0, F_SETFL, O_RDWR|O_NONBLOCK|O_LARGEFILE) = 0
read(0, "\r", 8192) = 1
fcntl(0, F_SETFL, O_RDWR|O_LARGEFILE)   = 0
write(1,
"\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10(check-version)\10", 31) = 31
write(1, "\n", 1)   = 1
open("/dev/ttyACM0", O_RDWR|O_CREAT, 0666) = 3
fcntl(3, F_SETFD, FD_CLOEXEC)   = 0
ioctl(3, SNDCTL_TMR_TIMEBASE or SNDRV_TIMER_IOCTL_NEXT_DEVICE or TCGETS,
{B9600 -opost -isig -icanon -echo ...}) = 0
write(3, "ver\n", 4)= 4
read(3, "ver\n", 8192)  = 4
read(3, 0x9f0148, 8192) = ? ERESTARTSYS (To be restarted
if SA_RESTART is set)
--- SIGINT {si_signo=SIGINT, si_code=SI_KERNEL} ---
rt_sigreturn()  = -1 EINTR (Interrupted system call)

The lines...

write(3, "ver\n", 4)= 4
read(3, "ver\n", 8192)  = 4

..are where I have prinl'd "ver" to the dev file and got it echoed back.

I do not know what...

read(3, 0x9f0148, 8192) = ? ERESTARTSYS (To be restarted
if SA_RESTART is set)

..means, but it must be significant.

The SIGINT is from me pressing Ctrl-C after the program seems to have hung.

On 04/23/2017 05:39 AM, Alexander Burger wrote:
> On Sat, Apr 22, 2017 at 04:46:35PM -0800, Christopher Howard wrote:
>>   (in Dev
>>  (line) # ADDED LINE
>>  (setq Output (line)) )
>>   (close Dev) )
>>Output )
>>
>> ..a call to (check-version) will hang, as though waiting for more
>> output, instead of giving me the second line (the result data).
> 
> Yes, strange that the second call to (line) hangs. Perhaps you could 'strace'
> the picolisp process to see what exactly is received?
> 
> ♪♫ Alex
> 

-- 
https://qlfiles.net

-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: Serial communication?

2017-04-22 Thread Christopher Howard
Hi, revisiting this issue. I've got a Numato GPIO device using
/dev/ttyACM0 that shows settings

$ sudo stty -F /dev/ttyACM0
speed 9600 baud; line = 0;
kill = ^H; min = 1; time = 0;
-brkint -icrnl -imaxbel
-opost -onlcr
-isig -icanon -echo -echoe -echok

I can connect to device just fine using "screen", and get expected
input/output interaction:

$ sudo screen /dev/ttyACM0

>ver
0008

According to the Numato manual:

"...the device echoes every single character sent to
it and so when you read the response, the data that is read will
include the command itself, a carriage return, the response which you
are interested in, a '>' character and another carriage return. You
will need to extract the response from this bunch of data..."

If I try this in picolisp...

(de check-version ()
   (let? Dev (open "/dev/ttyACM0")
  (out Dev
 (prinl "ver") )
  (in Dev
 (setq Output (line)) )
  (close Dev) )
   Output )

..I get response...

: (check-version)
-> ("v" "e" "r")

Which would be expected. However, if I run (line) twice in order to try
to capture that second line...

(de check-version ()
   (let? Dev (open "/dev/ttyACM0")
  (out Dev
 (prinl "ver") )
  (in Dev
 (line) # ADDED LINE
 (setq Output (line)) )
  (close Dev) )
   Output )

..a call to (check-version) will hang, as though waiting for more
output, instead of giving me the second line (the result data).

On 02/18/2017 04:54 AM, Alexander Burger wrote:
> On Sat, Feb 18, 2017 at 09:24:09AM +0100, Alexander Burger wrote:
>>(out "/dev/ttyACM0"
>>... )
>>
>>(in "/dev/ttyACM0"
>>... )
> 
> Some devices don't like it very much to be opened and closed all the time
> (losing queued data, for example). In that case, you could try:
> 
>(let? Dev (open "/dev/ttyACM0")
>   (loop
>  (in Dev
> ... )
>  ...
>  (out Dev
> ... ) ) )
> 
> ♪♫ Alex
> 

-- 
https://qlfiles.net

-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: PicoLisp mirror on github

2017-04-22 Thread Christopher Howard
What is the significance of the version number components (major,
minor...)? Does versions 17.6 and greater aim for backwards
compatibility with 16.12?

On 04/21/2017 09:03 AM, Mansur Mamkin wrote:
> Hi all!
> 
> I've extended my previous script that handled
> https://bitbucket.org/mmamkin/picolisp/
> 
> Now we have also git-repository at https://github.com/picolisp/picolisp
> 
> https://software-lab.de/picoLisp.tgz is checked four times a day and new
> commits are created when it has changed
> 
> Best regards,
> 
> Mansur Mamkin
> 
> 
> 
> 

-- 
https://qlfiles.net

-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: PilMCU status

2017-04-13 Thread Christopher Howard
Hi, this looks very cool. I'm very impressed. A few questions:

1) When do you start crowdfunding so we can preorder?

2) Is this (or will this be) an open hardware project?

3) Are there PilMCU codes to be released in some repo or tarball?

4) From what I understood one of the arguments against having arrays in
PicoLisp is that you would be expected to use arrays in a C library and
use them through FFI. Do I conclude correctly then that there would be
no access to arrays on a PilMCU system?

On 04/13/2017 06:15 AM, Kuba Tyszko wrote:
> Hi Geo,
> 
> Wow, this is so cool, we all thought you went completely missing but it seems 
> you’ve been putting a ton of work into this, including a whole PCB 
> “motherboard” (I remember your original prototype was simply using an Altera 
> dev board).
> 
> I haven’t finished watching the video but gotten up to 20 minute mark where 
> you typed (+ 1 2 3 4 5) - so the machine works.
> 
> Awesome job!
> 
> Thanks
> 
>> On Apr 12, 2017, at 5:45 PM, George Orais <gpor...@yahoo.com> wrote:
>>
>> Hi List!
>>
>>
>> At last here is the link for the demo video of PilMCU in action!
>>
>> https://youtu.be/mMgIvITAMBc
>>
>> I hope you will enjoy the show :)
>>
>> Again, my special thanks to Alex for his great idea and support on this 
>> project.
>>
>> Let's see how it goes and will keep you all posted.
>>
>>
>> BR,
>> Geo
>> -- 
>> UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
> 

-- 
Christopher Howard, Computer Assistant
Alaska Satellite Internet
3239 La Ree Way, Fairbanks, AK 99709
907-451-0088 or 888-396-5623 (toll free)
fax: 888-260-3584
mailto:christop...@alaskasi.com
http://www.alaskasatelliteinternet.com
-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: List graph library?

2017-04-06 Thread Christopher Howard
Hi, thanks. That 'view function might be sufficient for my present needs
(debugging some generated data structures) but I'll keep Graphviz in the
back of my mind.

Does somebody already have a PicoLisp lib for converting lists -> DOT?

On 04/06/2017 08:26 AM, Loyall, David wrote:
>> Does somebody have a FOSS library handy for graphing a picolisp list (like, 
>> hierarchically)? Say, SVG format or something?
> 
> Christopher, are you familiar with Graphviz?
> 
> It's a 26 year old suite of tools.  https://en.wikipedia.org/wiki/Graphviz
> 
> I generally use lisp (common lisp, actually) to generate text files in the 
> DOT language and then use the standard graphviz tools to render images in 
> various formats including SVG.
> 
> Another option, which I have not tried but may be powerful is to use FFI to 
> programmatically build graphs and render them using the various graphviz C 
> APIs.
> 
> I hope this information is helpful.
> 
> Cheers,
> --Dave
> PԔ � )mX�����zV�u�.n7�����r��e===
> 

-- 
Christopher Howard, Computer Assistant
Alaska Satellite Internet
3239 La Ree Way, Fairbanks, AK 99709
907-451-0088 or 888-396-5623 (toll free)
fax: 888-260-3584
mailto:christop...@alaskasi.com
http://www.alaskasatelliteinternet.com
-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: Which emacs mode to use?

2017-04-05 Thread Christopher Howard
Hi, I was referring to the lib/el folder inside the picolisp source
archive from http://software-lab.de/picoLisp-16.12.tgz.

I followed the manual installation instructions so that my picolisp is
installed at /usr/local/src/picoLisp. And so I just added this to my
~/.emacs:

(add-to-list 'load-path "/usr/local/src/picoLisp/lib/el")
(load "tsm.el") ;; Picolisp TransientSymbolsMarkup (*Tsm)
(autoload 'run-picolisp "inferior-picolisp")
(autoload 'picolisp-mode "picolisp" "Major mode for editing Picolisp." t)
(add-to-list 'auto-mode-alist '("\\.l$" . picolisp-mode))

On 04/05/2017 05:01 PM, Tim Johnson wrote:

>I'm unclear as to where lib/el is. Note that I have .el files at
>/usr/share/emacs/site-lisp/picolisp. (I installed picolisp via
>the "standard" config-make compilation route.)
> 
>What is the full path of your lib/el?
>thanks, Chris
> 


-- 
https://qlfiles.net
-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


List graph library?

2017-04-05 Thread Christopher Howard
Hi. Does somebody have a FOSS library handy for graphing a picolisp list
(like, hierarchically)? Say, SVG format or something? I can't imagine
somebody else hasn't already tackled that problem...

-- 
https://qlfiles.net
-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: Evaluation confusion

2017-04-01 Thread Christopher Howard
I expect my code so far will hardly impress you, but you can view it here at

http://git.savannah.nongnu.org/cgit/picolisp-nb.git/tree/text-adventure

When the game is (mostly) complete I'll probably fork it out to a
separate project.

On 04/01/2017 04:11 AM, Joh-Tob Schäg wrote:
> @Christopher Howard,
> 
> I would be interested in seeing the source code for your text adventure
> RPG as i am working on a MOO (MUD (Multi user Dungeon) Object Oriented).
> 
> You may not want to rebalance after every insert. But you can balance a
> 'idx by 'balance . You can always benchmark these combinations it your
> approach is faster the mailing list would be interested in your results
> and the source.
> 
> 2017-04-01 13:56 GMT+02:00 Christopher Howard
> <christopher.how...@qlfiles.net <mailto:christopher.how...@qlfiles.net>>:
> 
> Ah, okay. Somehow in my mind I had reversed the meaning of "==" and "=".
> 
> @Joh-Tob: I am writing a text-adventure game, using a balanced binary
> tree as the primary data structure for managing game data. I wrote my
> own AA Tree implementation (with guidance from Wikipedia). I see the idx
> and balance functions in PicoLisp reference, but my concern is I don't
> see how you do with those an (efficient) self-balance after single
> inserts to an existing tree, nor how to do self-balancing deletes from
> an existing tree.
> 
> On 04/01/2017 01:46 AM, Alexander Burger wrote:
> > Hi Christopher,
> >
> >> : (aa-search '(("threshold" (("long-description" "You stand in front of
> >> a wooden door, reputed to be the home of one Dr. Theobold. The door has
> >> a small keyhole.") NIL NIL 1)) NIL NIL 1) "threshold")
> >> -> ("threshold" ...
> >
> >> However, if I run this command, I get a different result:
> >>
> >> : (aa-search (rooms) "threshold")
> >> ...
> >
> >
> > The problem is the '==' in
> >
> >>   (if (== Key (car (aa-kv Tree)))
> >
> >
> > You pass a transient symbol "threshold", and '==' checks for exactly 
> this
> > symbol. The scope of transient symbols is per file or REPL instance, so 
> you ran
> > the first test probably in the same instance, while "threshold" in the 
> second
> > was a new, different, symbol.
> >
> > Either use '=' for comparison, or use only internal symbols as keys.
> >
> > ♪♫ Alex
> >
> 
> --
> https://qlfiles.net
> --
> UNSUBSCRIBE: mailto:picolisp@software-lab.de
> <mailto:picolisp@software-lab.de>?subject=Unsubscribe
> 
> 

-- 
https://qlfiles.net
-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: Evaluation confusion

2017-04-01 Thread Christopher Howard
Additional question: Should I expect any weird behavior with transient
symbols and the '< or '> operators? E.g. (assuming the symbols have not
been assigned strange values) is it true that "abc" will always be less
than "abd" regardless of the scope of the transient symbols?

On 04/01/2017 03:56 AM, Christopher Howard wrote:
> Ah, okay. Somehow in my mind I had reversed the meaning of "==" and "=".
> 
> @Joh-Tob: I am writing a text-adventure game, using a balanced binary
> tree as the primary data structure for managing game data. I wrote my
> own AA Tree implementation (with guidance from Wikipedia). I see the idx
> and balance functions in PicoLisp reference, but my concern is I don't
> see how you do with those an (efficient) self-balance after single
> inserts to an existing tree, nor how to do self-balancing deletes from
> an existing tree.
> 
> On 04/01/2017 01:46 AM, Alexander Burger wrote:
>> Hi Christopher,
>>
>>> : (aa-search '(("threshold" (("long-description" "You stand in front of
>>> a wooden door, reputed to be the home of one Dr. Theobold. The door has
>>> a small keyhole.") NIL NIL 1)) NIL NIL 1) "threshold")
>>> -> ("threshold" ...
>>
>>> However, if I run this command, I get a different result:
>>>
>>> : (aa-search (rooms) "threshold")
>>> ...
>>
>>
>> The problem is the '==' in
>>
>>>   (if (== Key (car (aa-kv Tree)))
>>
>>
>> You pass a transient symbol "threshold", and '==' checks for exactly this
>> symbol. The scope of transient symbols is per file or REPL instance, so you 
>> ran
>> the first test probably in the same instance, while "threshold" in the second
>> was a new, different, symbol.
>>
>> Either use '=' for comparison, or use only internal symbols as keys.
>>
>> ♪♫ Alex
>>
> 

-- 
https://qlfiles.net
-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: Evaluation confusion

2017-04-01 Thread Christopher Howard
Ah, okay. Somehow in my mind I had reversed the meaning of "==" and "=".

@Joh-Tob: I am writing a text-adventure game, using a balanced binary
tree as the primary data structure for managing game data. I wrote my
own AA Tree implementation (with guidance from Wikipedia). I see the idx
and balance functions in PicoLisp reference, but my concern is I don't
see how you do with those an (efficient) self-balance after single
inserts to an existing tree, nor how to do self-balancing deletes from
an existing tree.

On 04/01/2017 01:46 AM, Alexander Burger wrote:
> Hi Christopher,
> 
>> : (aa-search '(("threshold" (("long-description" "You stand in front of
>> a wooden door, reputed to be the home of one Dr. Theobold. The door has
>> a small keyhole.") NIL NIL 1)) NIL NIL 1) "threshold")
>> -> ("threshold" ...
> 
>> However, if I run this command, I get a different result:
>>
>> : (aa-search (rooms) "threshold")
>> ...
> 
> 
> The problem is the '==' in
> 
>>   (if (== Key (car (aa-kv Tree)))
> 
> 
> You pass a transient symbol "threshold", and '==' checks for exactly this
> symbol. The scope of transient symbols is per file or REPL instance, so you 
> ran
> the first test probably in the same instance, while "threshold" in the second
> was a new, different, symbol.
> 
> Either use '=' for comparison, or use only internal symbols as keys.
> 
> ♪♫ Alex
> 

-- 
https://qlfiles.net
-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Evaluation confusion

2017-03-31 Thread Christopher Howard
Hi list, I'm a little confused at a bug in my code.

I have this procedure 'rooms that returns some data:

: (rooms)
-> (("threshold" (("long-description" "You stand in front of a wooden
door, reputed to be the home of one Dr. Theobold. The door has a small
keyhole.") NIL NIL 1)) NIL NIL 1)

Now, if I run a command (another aa-search) on that data (copy and
pasted) I get the result I expect:

: (aa-search '(("threshold" (("long-description" "You stand in front of
a wooden door, reputed to be the home of one Dr. Theobold. The door has
a small keyhole.") NIL NIL 1)) NIL NIL 1) "threshold")
-> ("threshold" (("long-description" "You stand in front of a wooden
door, reputed to be the home of one Dr. Theobold. The door has a small
keyhole.") NIL NIL 1))

However, if I run this command, I get a different result:

: (aa-search (rooms) "threshold")
-> NIL

Q: Should not the results be the same?

Here are definitions of the various functions:

: (pp 'rooms)
(de rooms NIL
   (cadr (aa-search World "rooms")) )

: (pp 'aa-search)
(de aa-search (Tree Key)
   (unless (not Tree)
  (if (== Key (car (aa-kv Tree)))
 (aa-kv Tree)
 (if (< Key (car (aa-kv Tree)))
(aa-search (aa-left Tree) Key)
(aa-search (aa-right Tree) Key) ) ) ) )
-> aa-search


-- 
https://qlfiles.net
-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Random Access?

2017-03-24 Thread Christopher Howard
Hi list. I noticed that when I evaluate

(list (box) (box) (box))

I get

($177760526373112 $177760526373114 $177760526373116)

Where each memory location is two more than the previous. I am wondering
if this behavior is guaranteed to always be the case, the implication
being one could have random access to any cell provided he knew the
address of the first cell.

-- 
https://qlfiles.net
-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: Unclear licensing

2017-03-15 Thread Christopher Howard
Hi, to me there are (at least) two categories of JavaScript here that
need to be addressed. When I look at the page source for a Web app
(specifically, picolisp-gosper), I see two things:

(1) JavaScript which is loaded straight out of the files that come with
the release. As near as I can tell, these served files exactly match the
ones in the picolisp release.

"""
http://localhost:8080/@lib/canvas.js&quot</a>;>
http://localhost:8080/@lib/plio.js&quot</a>;>
http://localhost:8080/@lib/form.js&quot</a>;>
"""

(2) Inline JavaScript on the page which calls functions from those
files. This JavaScript is, presumably, what is generated by the picolisp
program.

"""

onload=drawCanvas('$testID', 200)


"""

I believe it would be best to view (1) as library files, which are
covered under the release license (hopefully the same one as in
COPYING). On the other hand, (2) should be viewed as separate developer
code making use of said libraries. The library files should be marked
with appropriate licensing headers. The developer code which calls it
need not be under the same license, or any license, at least in this
case, as your license is not full copyleft in the sense that the GPL
licenses are. In any case, I don't think the existence of (2) eliminates
the need for proper licensing of (1).

On 03/13/2017 10:14 PM, Alexander Burger wrote:
> On Mon, Mar 13, 2017 at 03:57:00PM -0800, Christopher Howard wrote:
>> confusion and uncertainty.) The JavaScript is a special case because
>> 90%+ of the people who will see/use the JavaScript will receive it from
>> a Web server and, if they inspect the source of the JavaScript, will
>> only see "Copyright so and so" and will have to assume that it is
>> proprietary.
> 
> Especiall for the case of JavaScript I do not understand the argument.
> 
> The JavaScript code in PicoLisp is deeply interacting with the server's Lisp
> code, and makes absolutely no sense to be used (or parts of it) is isolation.
> Should we put a licence on every line?
> 
> ♪♫ Alex
> 

-- 
https://qlfiles.net
-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: Unclear licensing

2017-03-13 Thread Christopher Howard
Right. Admittedly, that is not *so* much of a concern when you are
looking at code that you have just unpackaged directly from the
release... you can infer that the license in COPYING applies to every
unlabeled file in the release. (Though, that leaves open potential for
confusion and uncertainty.) The JavaScript is a special case because
90%+ of the people who will see/use the JavaScript will receive it from
a Web server and, if they inspect the source of the JavaScript, will
only see "Copyright so and so" and will have to assume that it is
proprietary.

If I ever do a Picolisp Web app I will certainly add the license headers
myself if I must. I'm just saying that if *you* guys care about *your*
users, you'll want to at least put the license headers on the JavaScript
files. The logical place to do that would be once in the official
release, rather than having ever developer need to do it independently.

I would even go a bit further and suggest making the JavaScript LibreJS
compatible:

https://www.gnu.org/software/librejs/
https://www.gnu.org/software/librejs/manual/librejs.html#JavaScript-Web-Labels

As mentioned, I'm willing to help out with this if desired.

On 03/13/2017 10:09 AM, Bruno Franco wrote:
> I think that what Christopher means is that adding a licence makes the
> developer's wishes clear. When you put a permissible licence its obvious
> you don't care what people do with the code, but if there's no licence
> at all it *could* mean you don't care, or it *could* mean you do care
> but just forgot to say it. In the case with no licence, there will be
> people who would like to use the code however they want, but stop
> because they're not sure the developer would accept it. This is not a
> problem with anyone in this community, who knows the code is free to use
> for anyone. It is more for people who find the code without knowing
> anything about the developer.
> 
> On Mon, Mar 13, 2017 at 3:38 AM, Joh-Tob Schäg <johtob...@gmail.com
> <mailto:johtob...@gmail.com>> wrote:
> 
> Hi Christopher,
> 
> You can interpret the:
> 
> Thanks for your concerns! But I still do not see where the
> problem is. I don't
> care what others do with the code. It is free!
> 
> As make a ~fork~ of it which adds license headers you seem to
> desperately want.
> 
> 2017-03-13 7:57 GMT+01:00 Alexander Burger <a...@software-lab.de
> <mailto:a...@software-lab.de>>:
> 
> Hi Christopher,
> 
> > Nevertheless, I would strongly recommend *at least* putting 
> licensing
> > information on the JavaScript files, even if only using the 
> one-liner
> > approach. Since the JavaScript will usually be served through a Web
> > server, it will be impossible for Web users to tell that it is 
> freely
> > licensed code. Code with unclear licensing is no better than 
> proprietary
> > code for practical purposes.
> 
> Thanks for your concerns! But I still do not see where the
> problem is. I don't
> care what others do with the code. It is free!
> 
> ♪♫ Alex
> --
> UNSUBSCRIBE: mailto:picolisp@software-lab.de
> <mailto:picolisp@software-lab.de>?subject=Unsubscribe
> 
> 
> 

-- 
Christopher Howard, Computer Assistant
Alaska Satellite Internet
3239 La Ree Way, Fairbanks, AK 99709
907-451-0088 or 888-396-5623 (toll free)
fax: 888-260-3584
mailto:christop...@alaskasi.com
http://www.alaskasatelliteinternet.com
-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: Unclear licensing

2017-03-12 Thread Christopher Howard
I'll certainly do that if need arises, though I think it would be better
if the release actually had them in there from the start. But if the
lead developer is set against it, I'm not going to keep whining about it.

Nevertheless, I would strongly recommend *at least* putting licensing
information on the JavaScript files, even if only using the one-liner
approach. Since the JavaScript will usually be served through a Web
server, it will be impossible for Web users to tell that it is freely
licensed code. Code with unclear licensing is no better than proprietary
code for practical purposes.

On 03/11/2017 02:23 AM, Jakob Eriksson wrote:

> 
> What I do when incorporating a source file which has no license or
> copyright information at the top:
> 
> I just add it... it takes a couple of minutes, tops and then I'm done.
> 
> 
> 
> 

-- 
https://qlfiles.net
-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: Unclear licensing

2017-03-11 Thread Christopher Howard


On 03/10/2017 11:18 PM, Alexander Burger wrote:
> Hi Christopher,
> 
>> Hello list. I'm having a lot of fun with picolisp, doing practice
>> problems and working with different codes.
> 
> Great! :)

I'll be uploading all my own codes for git access as soon as my project
request clears Savannah Non-GNU.

> 
> 
>> One concern I have though is
>> that most of the files in the Picolisp 16.12 release do not have proper
>> license labeling. For legal safety and to avoid confusion, we need to
>> have at least *every source code* file in the release labeled at the top
> 
> Uuuhh! This is one of the last things I would like to have. Every unnecessary
> line is one too much! I hate such noise. Also, patching the sources now would 
> be
> a disaster for file metadata.
> 
> *Who* has any problems with the current state?
> 
> ♪♫ Alex
> 

To borrow a quote from stackexchange:

"
The problem is that it's very easy to dis-aggregate a single source code
file from its larger project, such as someone just checking out,
emailing, downloading one file, without the rest that contains the full
copyright. And then that file can get passed along ad-infinitum into
time, to Nth parties who may have no idea of the files origins.

The copyright notice at the top reminds anyone who runs across that lone
file that it is in fact copyrighted, not public domain, and thus some
license may or may not be involved in its distribution or use. Versus
letting the finder make their own random assumptions.
"

In my case, the most likely situation is that I would make a GPL'd
project that incorporates the picolisp interpreter source code, with new
files containing the GPL notices but old files still containing the
original licensing information.

A more concrete example: Recently I have been hacking the emacs mode
elisp code that comes with picolisp release, to add my own preferred
functionality (shortly to be released). Of course, those elisp files do
actually have license information included. But I could potentially hack
other parts of the release as well.

An alternative to putting the full license in each file would be to use
a SPDX License Identifier. I think in your case this one-liner comment
would work for most files:

SPDX-License-Identifier: MIT

That would match with https://spdx.org/licenses/MIT.html.

-- 
https://qlfiles.net
-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Unclear licensing

2017-03-10 Thread Christopher Howard
Hello list. I'm having a lot of fun with picolisp, doing practice
problems and working with different codes. One concern I have though is
that most of the files in the Picolisp 16.12 release do not have proper
license labeling. For legal safety and to avoid confusion, we need to
have at least *every source code* file in the release labeled at the top
of the file with the applicable license. This is especially important
since you have some files in the release that are under different
licenses (e.g., some elisp under GPL-2); also you have javascript files
that are served by some of your libraries and, when served, end up
looking like they have no license at all (if someone inspects the
javascript code) when (presumably) the javascript also is freely licensed.

Is that already something on your TODO list? I am willing to help with
this... I just need to know if you want me to create a patch against the
stable version 16.12, or some other release. Of course, the danger with
me being involved is you might at some point claim I've misrepresented
your licensing intentions.

-- 
https://qlfiles.net
-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: TC -> Loop Transformation?

2017-03-10 Thread Christopher Howard
Hi, sorry about the delayed response — just had a new baby and have been
in the hospital for a few days.

What I am trying to accomplish is be able to represent algorithms in a
recursive format (which is often what comes naturally to me and seems
cleaner and easier to understand) without the stack penalty. This is why
TCO is baked into Scheme and CL, as the lisp people usually have this
mindset. If you don't, that is fine and probably not worth an extended
discussion. In my Haskell days, I represented most algs in some
recursive format, though I found out there was usually some higher level
abstraction available encapsulating the recursion.

The "macro" I wrote seems to accomplish what I want, though I'm thinking
maybe there are a few things in the macro code itself that could be
improved. E.g., it seems a little weird throwing an exception, but I
wasn't sure how else to do a non-local jump. And there is potential also
for variable name collisions between the macro variables and the
function that is passed in.

On 03/04/2017 11:46 PM, Alexander Burger wrote:
> Hi Christopher,
> 
> thanks for sharing these ideas!
> 
> However I'm a bit clueless about what you want to achieve.
> 
>> Hi, I while ago I asked how I might somehow represent a loop as a a tail
>> call recursion, so as to give me the pattern I like without the call
>> penalties.
> 
> Isn't it a lot easier to write a 'while', 'for' or 'do' loop then?
> 
> ♪♫ Alex
> 

-- 
https://qlfiles.net
-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


TC -> Loop Transformation?

2017-03-04 Thread Christopher Howard
Hi, I while ago I asked how I might somehow represent a loop as a a tail
call recursion, so as to give me the pattern I like without the call
penalties. Since nothing was forthcoming, I took a stab at it myself.
Probably my noobish attempt will be ugly to you veterans, but I was
hoping if I posted it I might get suggested improvements or alternative
approaches:

(de zip-set (L1 L2)
   (while (and L1 L2)
  (set (car L1) (car L2))
  (setq L1 (cdr L1))
  (setq L2 (cdr L2)) ) )

(de tc-recursion X
   (let (tc
  (list '@
 (list 'prog
(list 'zip-set (list 'car (list 'quote (car X))) '(rest))
'(setq Cont T)
'(throw 'TC) ) ) )
  (prog
 (setq Cont T)
 (while Cont
(setq Cont NIL)
(catch 'TC
   (run (cdr X)) ) ) ) ) )

(de tc-test ()
   (setq A 1)
   (tc-recursion (A)
  (prinl A)
  (if (>= A 10) A
 (tc (+ A 1)) ) ) )

Please include constructive suggestions along with the criticism.

-- 
https://qlfiles.net
-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: Self-similar fractal curves on canvas

2017-03-02 Thread Christopher Howard
Hi, this looks cool and I want to play around with it, but licensing
information is not clear. Could you please add clear licensing/copying
terms to the repository (ideally on each source file)?

On 03/01/2017 11:44 PM, Lindsay John Lawrence wrote:
> I developed this a bit more.
> 
> https://github.com/thinknlive/picolisp-gosper
> 
> I think now it may be a nice little tool to explore these kinds of functions.
> 
> You can step draw the results, or draw all at once.  You can also
> modify the lisp function code and then reload the module to try the
> changes immediately without restarting the service.
> 
> I'll add more over time as I think of it. Perhaps zoom and navigation
> buttons, buttons to change the step size and refresh rate from the ui,
> etc.
> 
> The picolisp ui framework makes this so easy.
> 
> /Lindsay
> 
> 
> On Wed, Mar 1, 2017 at 4:42 AM, Erik Gustafson
>  wrote:
>> Hi Lindsay,
>>
>> I practiced a bit more with the built-in functions...
>>
>> https://github.com/thinknlive/picolisp-gosper.git
>>
>>
>> Very cool! Looks like you've got '*/' all figured out now :)
>>
>> Thanks for sharing
>>
>> - Erik

-- 
https://qlfiles.net
-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: Lifespan of memory of parameters

2017-02-26 Thread Christopher Howard
Thanks for the quick reply, and the great info I get on this list. Maybe
more to the point would be a function like so:

(de foo (Lst)
  # some kind of escape condition usually here
  (foo (modified-copy Lst)) )

Where modified-copy is a function that returns a *new* list.

After, say, the tenth time foo is called, are there now ten lists in memory?

Rationale: In some cases it feels safer and more natural to implement
the algorithm as a recursive algorithm where you are always passing
around modified copies of the data.

Or do we have to use loops and set a variable each iteration?

On 02/25/2017 11:06 PM, Alexander Burger wrote:
> On Sun, Feb 26, 2017 at 08:31:37AM +0100, Alexander Burger wrote:
>>   (let A (bar (copy Lst))
>>  (off Lst)
>>  (doSomethingWithTheCopy)
>>  ...
>>
>> With (off Lst) *one* refernce to the list is cleared, but the list will be
>> garbage collected only when the *last* reference is gone, which is not under
>> control of 'foo'.
> 
> Of course, if you *know* that 'Lst' is not owned by anybody else, i.e. it was
> freshly created by reading or list manipulations etc., you don't need to copy 
> it
> at all in the first place. 'copy' is used rather seldom, in cases where you 
> want
> to do destructive operations on list that might be owned by someone else.
> 
> ♪♫ Alex
> 

-- 
https://qlfiles.net
-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Lifespan of memory of parameters

2017-02-25 Thread Christopher Howard
Hi list, could someone educate me a little regarding the following (or
point me to the right documentation):

Say I have function

(foo (Lst)
   (bar (copy Lst)) )

My question is: At the point when bar is called, is Lst now gone (i.e.,
marked for garbage collection) or does that wait until bar returns? If
the latter, is there a way to tell the interpreter that you are done
with the first Lst (i.e., so you don't have two of them floating around)?

-- 
https://qlfiles.net
-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Destructive element modification?

2017-02-24 Thread Christopher Howard
Hi list. How do I *destructively* modify the value of one element in a
list? E.g.

(setq Lst (1 2 3 4))

How do I set the second element to be 10, without creating a new list,
and without using "con" to change a lot of the list?

-- 
https://qlfiles.net
-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: Building functions with dynamic scope

2017-02-21 Thread Christopher Howard
Thank you. I'll check some evening this week and see if this subject is
adequately covered on the wiki, and try to incorporate this in if it is not.

On 02/21/2017 10:13 AM, Alexander Burger wrote:
> Hi Christopher,
> 
>> (de make-adder (N) (list '(X) (list '+ 'X N)))
>>
>> That works, but I was wondering if there was some more readable way to
>> do it.
> 
> Well, the standard candidate for that purpose is 'curry' (though we learned 
> that
> this function name is a bit unlucky ;)
> 
>(de make-adder (N)
>   (curry (N)
>  (X) (+ X N) ) )
> 
> In this call, 'N' is kept in a closure, allowing it to be changed while the
> generated function runs:
> 
>(make-adder 7)
>-> ((X) (job '((N . 7)) (+ X N)))
> 
> This is here not necessary, thus 'curry' allows you to tell it when
> values are constant by using pattern variables, here '@N':
> 
>(de make-adder (@N)
>   (curry (@N)
>  (X) (+ X @N)) )
> 
>(make-adder 7)
>-> ((X) (+ X 7))
> 
> 
> Another option (in addition to your direct 'list'ing, is 'fill'
> 
>    (de make-adder (N)
>   (fill '((X) (+ X N)) 'N) )
> 
>(make-adder 7)
>-> ((X) (+ X 7))
> 
> ♪♫ Alex
> 

-- 
Christopher Howard, Computer Assistant
Alaska Satellite Internet
3239 La Ree Way, Fairbanks, AK 99709
907-451-0088 or 888-396-5623 (toll free)
fax: 888-260-3584
mailto:christop...@alaskasi.com
http://www.alaskasatelliteinternet.com
-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Building functions with dynamic scope

2017-02-21 Thread Christopher Howard
Hi list. Earlier I had a bit of trouble figuring out how to do function
construction with dynamic scoping, i.e., what would "normally" be

(de make-adder (N) '((X) (+ X N)))

I figured out I could do

(de make-adder (N) (list '(X) (list '+ 'X N)))

That works, but I was wondering if there was some more readable way to
do it.

-- 
Christopher Howard, Computer Assistant
Alaska Satellite Internet
3239 La Ree Way, Fairbanks, AK 99709
907-451-0088 or 888-396-5623 (toll free)
fax: 888-260-3584
mailto:christop...@alaskasi.com
http://www.alaskasatelliteinternet.com
-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: Future of PicoLisp?

2017-02-20 Thread Christopher Howard
Well, of course, you guys are free to do want you want to try and please
whomever you want. I'm just an actual user of picolisp. Whenever I find
that a project is on Github, I find the url for cloning the repository,
and then never use any of the project site features ever again (issue
tracker, etc.) Just take it as my $0.02 feedback if nothing else.

On 02/20/2017 10:31 AM, Jakob Eriksson wrote:
> 
> Another tradeoff is that there are very few people and projects
> on any site besides Github. This is the reality.
> 
> -- Jakob
> 

-- 
Christopher Howard, Computer Assistant
Alaska Satellite Internet
3239 La Ree Way, Fairbanks, AK 99709
907-451-0088 or 888-396-5623 (toll free)
fax: 888-260-3584
mailto:christop...@alaskasi.com
http://www.alaskasatelliteinternet.com
-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: Future of PicoLisp?

2017-02-20 Thread Christopher Howard
I'm sure my opinion has very little weight around here, but since other
people are discussing it I want to put in a plug for Savannah (Non-GNU):

https://savannah.nongnu.org/

If you aren't willing to run the proprietary JavaScript on Github it
becomes a real pain to work with. (Gets an F rating from FSF
<https://www.gnu.org/software/repo-criteria-evaluation.en.html>.)
Includes Subversion and Git support.

The only tradeoffs with savannah nongnu is it sometimes takes them a few
weeks to approve your project hosting, and they require you to put
licensing information on each code file (a really good idea anyway).

On 02/20/2017 09:19 AM, Jakob Eriksson wrote:
> 
> 
> I would love for the public repo to be on github!
> 
> I think for many, an open source project does not really exist,
> unless it is on Github. We should also try to resurrect somehow,
> the [picolisp] tag on Stack Overflow.
> 
> Given that it is encouraged to put in official documentation in the
> form of Q/A on Stack Overflow, I think we could have a coordinated
> effort from here to do it.
> 
> 
> 
> 
> On 2017-02-20 18:15, Petr Gladkikh wrote:
>> I admit that I am a passerby here but my impression is that things
>> around PicoLisp feel closed and this is not about the code itself.
>> In particular, there seems to be no public source code repository so
>> source history can only be inferred somehow from releases. I see that
>> some people already try to mirror it (see,
>> e.g. https://github.com/taij33n/picolisp
>> <https://github.com/taij33n/picolisp>) but since it is not "official"
>> there's no development or associated discussions. Since revision control
>> is essential for any non-trivial project, the lack of it is surprising.
>> Also there's no public bug tracker. Instead I have to subscribe to this
>> list so it is hard to track what happened to issues. 
>>
>> That said removing some friction for outsiders would help to keep things
>> running.
>>
>>
>> 2017-02-03 8:47 GMT+01:00 Alexander Burger <a...@software-lab.de
>> <mailto:a...@software-lab.de>>:
>>
>> Hi all,
>>
>> the future of PicoLisp is dark. I'm not sure if it can survive in
>> packaged
>> distribution.
>>
>> Ubuntu doesn't support it any more, probably due to the PIE (position
>> independent executable) on x86-64.
>>
>> And at least on Android they seem to demand switching to Clang. The
>> 32-bit
>> versions of PicoLisp (pil32 and mini) which are written in C cannot
>> be compiled
>> on Clang, because Clang doesn't support dynamically allocated
>> arrays, which
>> pil32 depends on. As far as I notices, pil64 also has trouble on
>> Clang/Android.
>>
>> :( Alex
>> --
>> UNSUBSCRIBE: mailto:picolisp@software-lab.de
>> <mailto:picolisp@software-lab.de>?subject=Unsubscribe
>>
>>
>>
>>
>> -- 
>> Petr Gladkikh

-- 
Christopher Howard, Computer Assistant
Alaska Satellite Internet
3239 La Ree Way, Fairbanks, AK 99709
907-451-0088 or 888-396-5623 (toll free)
fax: 888-260-3584
mailto:christop...@alaskasi.com
http://www.alaskasatelliteinternet.com
-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Serial communication?

2017-02-17 Thread Christopher Howard
Hi list. As mentioned before, I've got picolisp running on a mips32r2
system running librecmc-1.3.4. I want to communicate with an ACM device
available at /dev/ttyACM0. Is there a library for serial communication?
And/Or do I need to interface to a C library?

-- 
https://qlfiles.net
-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Recursion-Loop Macro?

2017-02-11 Thread Christopher Howard
Hi list. I got the impression from some of the documentation that we
aren't planning to implement TCO in picoLisp, and that the preferred
approach is to just use a loop. I don't want to argue against that, but
I was just wondering if perhaps somebody had a macro that made a loop
look like a recursive tail call?

-- 
https://qlfiles.net
-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Segfault with huge list...?

2017-02-10 Thread Christopher Howard
Hi list. When I try to do

(apply '+ (range 1 100)

I get segfault. I thought maybe this was some kind of internal
limitation of the apply function, so I defined a foldl:

(de foldl (Fn Acc Lst)
(if (== () Lst) Acc
(let Acc2 (Fn Acc (car Lst))
 (foldl Fn Acc2 (cdr Lst)) ) ) )

: (foldl '+ 0 (range 1 1000))
(foldl '+ 0 (range 1 1000))
-> 500500
: (foldl '+ 0 (range 1 100))
(foldl '+ 0 (range 1 100))

..and again, a segfault.

Am I doing something wrong?

-- 
https://qlfiles.net
-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


box? on address

2017-02-09 Thread Christopher Howard
Hi, I was just trying to understand...

: (box? (box (4 5 6)))
-> $384375304
: (box? $384375304)
-> NIL
: (car $384375304)
-> 4

Shouldn't (box? $384375304) be non-NIL?

-- 
Christopher Howard, Computer Assistant
Alaska Satellite Internet
3239 La Ree Way, Fairbanks, AK 99709
907-451-0088 or 888-396-5623 (toll free)
fax: 888-260-3584
mailto:christop...@alaskasi.com
http://www.alaskasatelliteinternet.com
-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: Mips / LibreCMC build

2017-02-08 Thread Christopher Howard
I added a wiki page here:

http://picolisp.com/wiki/?picolisponmips

On 02/08/2017 04:57 AM, Mike Pechkin wrote:
> 
> 
> On Wed, Feb 8, 2017 at 3:45 PM, Christopher Howard
> <christopher.how...@qlfiles.net <mailto:christopher.how...@qlfiles.net>>
> wrote:
> 
> I would like to share the build with the world. Did you
> guys want to host the build somehow, or did you want me to host
> elsewhere and then link to my repo?
> 
> 
> ​You could​
> ​ create page on
> http://picolisp.com/wiki
> with anounce here and or reddit.com/r/lisp <http://reddit.com/r/lisp>
> 
> ​Mike
> ​
> 

-- 
https://qlfiles.net
-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: Modularization / Shared Libraries

2017-02-08 Thread Christopher Howard
Thank you. Could you explain this code:

(load
   "@test/src/main.l"
   "@test/src/apply.l"
   "@test/src/flow.l"
   "@test/src/sym.l"
   "@test/src/subr.l"
   "@test/src/big.l"
   "@test/src/io.l"
   "@test/src/db.l"
   "@test/src/net.l"
   "@test/src/ext.l"
   "@test/src/ht.l" )

How is the "@" character being used here? The reference documentation
mentions the wildcard character in conjunction with match and fill, but
I'm not clear on what it means here.

On 02/08/2017 04:47 AM, Mike Pechkin wrote:
> 
> 
> On Wed, Feb 8, 2017 at 3:20 PM, Christopher Howard
> <christopher.how...@qlfiles.net <mailto:christopher.how...@qlfiles.net>>
> wrote:
> 
> Hi all, picolisp newbie here. I was trying to figure out how to
> "modularize" my code; there doesn't seem to be a module system built in,
> but the reference doc did mention support for shared libraries. A few
> questions:
> 
> 
> ​As I can understand you mix two different functions - load and native
> 
>  
> 
> 
> 1) On Gnu/Linux, how do you put code into a shared library?
> 
> 
> ​Look how builtin tests splits to files:​
> https://bitbucket.org/mmamkin/picolisp/src/e33e90fb0e11aa6cdb8634c8ef73b1dac5c1f60a/lib/test.l?at=default=file-view-default
> 
>  
> 
> 2) Where on the system does picolisp search for shared libraries?
> 
> 
> native searches in dirs from ldconfig -p​
> 
> 

-- 
Christopher Howard, Computer Assistant
Alaska Satellite Internet
3239 La Ree Way, Fairbanks, AK 99709
907-451-0088 or 888-396-5623 (toll free)
fax: 888-260-3584
mailto:christop...@alaskasi.com
http://www.alaskasatelliteinternet.com
-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Mips / LibreCMC build

2017-02-08 Thread Christopher Howard
Hi all, I was able to compile picolisp for mips32r2 to run on
librecmc-1.3.4, which I did for the purpose of having a lisp interpreter
on my TPE-R1100. I would like to share the build with the world. Did you
guys want to host the build somehow, or did you want me to host
elsewhere and then link to my repo? I was planning on doing a new build
for each release of librecmc, if it proves necessary.

This build was a little more complicated than a regular one, as it is a
buildroot-based embedded environment, and the embedded environment does
not have it's own compiler. So I had to (1) build a compilation toolkit
from the librecmc source code; (2) put the picolisp source code inside
the toolkit; (3) modify the Makefile to compile with the correct flags,
and to use the toolkit compiler; (4) deleted src/ and doc/ files to get
a build slim enough to fit on the limited embedded memory; (5) tarballed
it and installed onto the librecmc system just following the "global
installation" instructions. Seems to work great. (I used it to write
some code to turn the TPE-R1100 LEDs into a binary clock display.)

I have not yet created a proper buildroot package as that looked like it
was going to be more complicated.

-- 
https://qlfiles.net
-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Modularization / Shared Libraries

2017-02-08 Thread Christopher Howard
Hi all, picolisp newbie here. I was trying to figure out how to
"modularize" my code; there doesn't seem to be a module system built in,
but the reference doc did mention support for shared libraries. A few
questions:

1) On Gnu/Linux, how do you put code into a shared library?

2) Where on the system does picolisp search for shared libraries?

-- 
https://qlfiles.net
-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Subscribe

2017-02-06 Thread Christopher Howard
Hello Christopher Howard <christopher.how...@qlfiles.net> :-)
You are now subscribed



-- 
https://qlfiles.net
-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Subscribe

2017-02-06 Thread Christopher Howard
Hello Christopher Howard <christop...@alaskasi.com> :-)
You are now subscribed



-- 
Christopher Howard, Computer Assistant
Alaska Satellite Internet
3239 La Ree Way, Fairbanks, AK 99709
907-451-0088 or 888-396-5623 (toll free)
fax: 888-260-3584
mailto:christop...@alaskasi.com
http://www.alaskasatelliteinternet.com
-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe