Subscribe

2010-10-31 Thread Christophe Gragnic

gettext

2010-11-19 Thread Christophe Gragnic
Hi all, I was wondering if there was a way to use gettext to load the value= s of the transient symbols.=0AOr maybe you'll convince me that it is a bad = idea...=0A=0Achri=0A=0A=0A -- UNSUBSCRIBE: mailto:picol...@software-lab.de?subject=unsubscribe

Re: gettext

2010-11-20 Thread Christophe Gragnic
--- En date de : Sam 20.11.10, Alexander Burger a =E9= crit :=0A=0A> I must confess I was not aware of GNU gettext. What=0A> advan= tages would it have?=0A=0A=0A1) It's a widely used and trusted machinery.= =0A2) Some tricky problems are dealt with, like plurals:=0A=0Ahttp://www.gn= u.org/software

SUBSCRIBE

2010-11-24 Thread Christophe Gragnic
Moving from Y! to G.

Unsubscribe

2010-11-24 Thread Christophe Gragnic
Good bye Christophe Gragnic :-( You are now unsubscribed Thanks.=0A=0A=0A -- UNSUBSCRIBE: mailto:picol...@software-lab.de?subject=unsubscribe

Re: PicoLisp is DEAD

2012-02-08 Thread Christophe Gragnic
Hi there, I'm one of the silent listener ;) On Wed, Feb 8, 2012 at 3:44 AM, Thorsten wrote: > I was a bit shocked to hear that somebody so skilled like Alex has > difficulties to make a living based on PL - then what about me, a > struggling beginner? It makes me think about music. You can be a

Re: Google Summer of Code (GSoC) 2012

2012-02-28 Thread Christophe Gragnic
I can't wait finding picolisp runtime on the Android Market of course! Less powerful but could bring eyes on picolisp: integrate it in SL4A. http://code.google.com/p/android-scripting/ Just an idea, doesn't seem brilliant, sorry. chri -- UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsu

Re: Speedtest PicoLisp vs Emacs Lisp

2012-04-25 Thread Christophe Gragnic
A suggestion for wiki URLs: don't change them but provide, as Google does, a 'cleaned URL' to copy/paste on the page. chri -- Envoyé de ma messagerie électronique. Merci de divulguer cette adresse mail au minimum (pour les envois en groupe, utilisez la copie invisible). -- UNSUBSCRIBE: mailto:p

Re: Speedtest PicoLisp vs Emacs Lisp

2012-04-25 Thread Christophe Gragnic
On Wed, Apr 25, 2012 at 4:47 PM, Alexander Burger wrote: > Hi Christophe, > >> A suggestion for wiki URLs: don't change them but provide, as Google >> does, a 'cleaned URL' to copy/paste on the page. > > This sounds indeed like a good idea! It could be put in some prominent > place on each page. W

Re: Speedtest PicoLisp vs Emacs Lisp

2012-04-27 Thread Christophe Gragnic
wrote: > On Fri, Apr 27, 2012 at 03:11:51PM +0200, Christophe Gragnic wrote: >> A popup appears when clicking the «o-o» icon. For individual posts, > > Ah, thanks! It didn't occur to me that the chain symbol was a "link". > Makes perfect sense, though. > >

Re: pilog in ersatz

2012-07-09 Thread Christophe Gragnic
On Mon, Jul 9, 2012 at 7:31 AM, Alexander Burger wrote: > > Yes. This is an infinite recursion. Thanks Alex. That's nice and pedagogical from you to only give a hint but I didn't find my way to a solution. So it seems it's not a syntax problem, but a conceptual one. I thought about @x and @y bein

Re: pilog in ersatz

2012-07-10 Thread Christophe Gragnic
On Mon, Jul 9, 2012 at 11:12 PM, Doug Snead wrote: > > Hmmm. Where do "alix" and "sw" originate? I do not understand that. Sorry for the confusion, I was doing my tests with real names in my family but thought afterwards I should use names that could be understood by anybody. My handmade-search-

Re: pilog in ersatz

2012-07-10 Thread Christophe Gragnic
On Tue, Jul 10, 2012 at 9:56 AM, Alexander Burger wrote: > > don't find a match, the fourth one > >(be bigger (@x @y) (bigger @x @z) (bigger @z @y)) > > will always match and recurse infinitely. Is it because it always match or because to know if it would succeed, it must test itself? Hence t

Re: PicoLisp Book

2012-07-20 Thread Christophe Gragnic
On Fri, Jul 20, 2012 at 2:45 PM, Alexander Burger wrote: > > Well, I have all the solutions I posted so far in a single large source > file ("rosettacode.l", 17194 lines as of today). Wa, this is quite a lot!!! Knowing it's one of the most concise, quite a lot of tasks must have been solved!!! Do

Re: PicoLisp Book

2012-07-21 Thread Christophe Gragnic
On Sat, Jul 21, 2012 at 8:05 PM, Thorsten Jolitz wrote: > > BTW > I just found out that there is an upper limit for book size (at > Amazon some 870 pages or so) in self-publishing, so if I include the > function reference (some 200 pages) and the rosettacode examples (huge), > what I really would

Transient symbol with a single backslash

2014-01-24 Thread Christophe Gragnic
Hi, I'm a long time fan of Picolisp but never went through the whole docs, and never found a practical use for it, until today! Well, I'm not using the real Picolisp but EmuLisp but I asked Jon and in fact his Emulisp acts as the real Picolisp regarding my problem. As you can see here: http://pro

Re: Transient symbol with a single backslash

2014-01-25 Thread Christophe Gragnic
On Fri, Jan 24, 2014 at 10:54 PM, Axel Svensson wrote: > If you need to output something that isn't 'read' readable, then you're > trying to output something that isn't lisp code. If that is the case, use > the functions to output text rather than code. > > (prin "(This 'is (not) \"\\code\" ..)")

Re: Transient symbol with a single backslash

2014-01-25 Thread Christophe Gragnic
On Sat, Jan 25, 2014 at 3:01 PM, Thorsten Jolitz wrote: > what about this (although no slash at all remains): > > ,--- > | : (pipe (out (prin "(This 'is (not) \"\\code\" ..)")) (setq X (read))) > | -> (This 'is (not) "code" ..) >

Re: Transient symbol with a single backslash

2014-01-25 Thread Christophe Gragnic
On Sat, Jan 25, 2014 at 7:39 PM, Alexander Burger wrote: > Hi Christophe, Hi Alex. > I'm not sure if I exactly understand what your problem is, but let me > try to explain a bit. > … I think I'm now OK with PicoLisp returning "read'able" transients. But understanding the mechanism doesn't solve

Typo in the manual

2014-02-02 Thread Christophe Gragnic
At http://software-lab.de/doc/ref.html#errors In the last sentence «An arbitrary error can be thrown explicitly with quit.» quit links to http://software-lab.de/doc/refC.html#quit but should link to http://software-lab.de/doc/refQ.html#quit Happy hacking. -- http://profgra.org/lycee/ (site pro)

Copy a symbol to another (value, properties…)

2014-02-05 Thread Christophe Gragnic
Hi, I'm embedding a language in PicoLisp and would like to have aliases for certain commands. Is there a way to duplicate a symbol? Like: : (setq a "hello") : (alias 'a 'b) : b -> "hello" I'd like b to also have a's properties. The copy can be «by value» or «by ref». Both available separatly would

Re: Copy a symbol to another (

2014-02-05 Thread Christophe Gragnic
On Wed, Feb 5, 2014 at 5:34 PM, Alexander Burger wrote: > > You could do > >(de alias ("Sym1" "Sym2") > (set "Sym2" (val "Sym1")) > (putl "Sym2" (getl "Sym1")) > "Sym2" ) Indeed. This works fine (except for `set` that is not implemented in EmuLisp!). >> The copy can be «by

Problems running some EmuLisp tests with ersatz

2014-04-16 Thread Christophe Gragnic
Hi all, I'm currently playing with non mainstream PicoLisp versions (sorry for that!) and found some issues. 1) Regarding this snippet: (for ((I . N) 11 (not (= I 4)) (inc N)) (list I N)) the official PicoLisp and ersatz 27 return (4 14), but ersatz 29 (currently the most recent version) returns (

Re: Problems running some EmuLisp tests with ersatz

2014-04-17 Thread Christophe Gragnic
On Thu, Apr 17, 2014 at 8:00 AM, Alexander Burger wrote: >> 1) Regarding this snippet: (for ((I . N) 11 (not (= I 4)) (inc N)) (list I >> N)) >> the official PicoLisp and ersatz 27 return (4 14), >> but ersatz 29 (currently the most recent version) returns (3 13). > > Correct. This was fixed a wh

exit codes

2014-05-06 Thread Christophe Gragnic
Hi, Say I have a PicoLisp script named tests.l. Is there a way to have an exit code for: pil -bye tests.l I couldn't find anything about this in the «invocation» section of the docs. Thanks. chri -- http://profgra.org/lycee/ (site pro) http://delicious.com/profgraorg (liens, favoris) https://t

Re: exit codes

2014-05-06 Thread Christophe Gragnic
On Tue, May 6, 2014 at 2:48 PM, Alexander Burger wrote: > Hi Christophe, Hi Alex, Thanks (again…) for your quick reply. >> Say I have a PicoLisp script named tests.l. Is there a way to have an >> exit code for: >> pil -bye tests.l > > Yes, though the above would never reach "tests.l", because 'b

Regarding the implementations of PicoLisp

2014-05-08 Thread Christophe Gragnic
Hi, I'm currently embedding a «pedagogical pseudo-code like language» in PicoLisp. As using plain browsers is a nice thing to have in front of students, I tried with EmuLisp (PicoLisp in JS, by Jon Kleiser, that I won't thank enough, with Alex), which proved to be a good solution for me. So I had

Re: Regarding the implementations of PicoLisp

2014-05-09 Thread Christophe Gragnic
Hi, Thanks for all your answers. On Fri, May 9, 2014 at 8:48 AM, Tomas Hlavaty wrote: >> Now my question: how far could be pushed the idea to write a maximal >> subset of Picolisp in a minimal subset of Picolisp? > > I have explored this in my Java implementation: > > $ git clone http://logand.

Re: Regarding the implementations of PicoLisp

2014-05-11 Thread Christophe Gragnic
On Fri, May 9, 2014 at 7:59 PM, Rick Lyman wrote: > below are a few of the errors generated [compiling miniPicoLisp with > emscripten]: > > flow.c:41:62: warning: '&&' within '||' [-Wlogical-op-parentheses] >if (isNum(x = EVAL(x)) || isNil(x) || x == T || isCell(x) && > isNum(car(x))) >

Re: Regarding the implementations of PicoLisp

2014-05-12 Thread Christophe Gragnic
On Mon, May 12, 2014 at 8:06 AM, Alexander Burger wrote: > Hi Will, > thanks for you long explanation! Right, and thanks to all for this interesting journey in the internals. > The problem with this is that is horribly inefficient. I'm interested by a clang compatible version, just to see what

Re: Regarding the implementations of PicoLisp

2014-05-12 Thread Christophe Gragnic
On Mon, May 12, 2014 at 2:16 PM, Joe Bogner wrote: > > I was able to compile miniPicoLisp on windows under clang. I basically just > replaced all instances of variable array initialization, such as: > > struct {any sym; any val;} bnd[length(x = car(expr))+3]; > > with > > //TODO > struct {any sym;

Re: Regarding the implementations of PicoLisp

2014-05-12 Thread Christophe Gragnic
On Mon, May 12, 2014 at 7:03 PM, Joe Bogner wrote: > > I think the main difference is your Makefile > Instead of: > > clang $*.c > > I'm doing this: > > $(CC) -w -c $*.c > > The -w suppresses warnings Great. It works now. I fixed the warnings and didn't add the -w flag though

Re: Pretty-Printing and Source Code Indentation

2014-06-03 Thread Christophe Gragnic
On Tue, Jun 3, 2014 at 1:53 PM, Alexander Burger wrote: > > Hi all, Hi abu. > fyi, I wrote a little article >http://picolisp.com/wiki/?prettyPrint One remark: there is something weird near «Only indentaion, though,» (color and typo). One question: could you explain what the script you use i

Re: Pretty-Printing and Source Code Indentation

2014-06-03 Thread Christophe Gragnic
On Tue, Jun 3, 2014 at 2:51 PM, Alexander Burger wrote: > > Oops, right! I used :{Only} (the markup for code) instead of !{Only) > (markup for bold). Fixed it :) Also: indentaion -> indentation >> I saw your tweet yesterday and was amazed: 1986! >> This is really huge. Call this mature. > > Wel

Some explanations needed about (rand) in Ersatz

2014-06-14 Thread Christophe Gragnic
Hi, Using Ersatz, the values returned by (rand) do not fit in -2147483648 .. +2147483647, as specified in: http://software-lab.de/doc/refR.html#rand Am I missing something? chri -- http://profgra.org/lycee/ (site pro) http://delicious.com/profgraorg (liens, favoris) https://twitter.com/profgra

Classpath problem(?) with NetLogo-Ersatz integration

2014-06-26 Thread Christophe Gragnic
Hi all, I'm trying to play with NetLogo: http://ccl.northwestern.edu/netlogo/ from Picolisp/Ersatz. I managed to create a working .java with an empty NetLogo model, but am stuck at translating this file to Picolisp. The .java is here: http://stackoverflow.com/questions/24390853/expected-command-e

Re: Classpath problem(?) with NetLogo-Ersatz integration

2014-06-26 Thread Christophe Gragnic
On Thu, Jun 26, 2014 at 12:57 PM, Samuel Dennis Borlongan wrote: > (javaImport org.nlogo.lite.InterfaceComponent) > > Note the lack of the space in the command javaImport. What may have happened > is that the command (java) is invoke with the (null) parameters Import and > org.nlogo.lite.Interface

Re: Classpath problem(?) with NetLogo-Ersatz integration

2014-06-26 Thread Christophe Gragnic
Thanks. I'm making progress, but I can't figure out how the interop files in the java dir are loaded in Samuel's version. What I do for now is to manually append the files to the `pil` call. I'd like to understand and use the proper way ! -- http://profgra.org/lycee/ (site pro) http://delicious.

Re: Classpath problem(?) with NetLogo-Ersatz integration

2014-06-26 Thread Christophe Gragnic
On Thu, Jun 26, 2014 at 5:54 PM, Samuel Dennis Borlongan wrote: > Try replacing the picolisp.jar file with the mainline jar. > > What I usually do is to call mkJar with the original jar, which then builds > my version. > > The problem with my version of the jar is that I've been running Java 8 > s

Re: Classpath problem(?) with NetLogo-Ersatz integration

2014-06-26 Thread Christophe Gragnic
Hi Samuel (and others reading!), On Fri, Jun 27, 2014 at 2:16 AM, Samuel Dennis Borlongan wrote: > You woud need to (load "@java/java+.l)" to load all the java > interoperability functions. Thanks. > Question to the audience: should I then add said function to the ersatz > launch script as part

Re: Classpath problem(?) with NetLogo-Ersatz integration

2014-06-27 Thread Christophe Gragnic
On Fri, Jun 27, 2014 at 9:10 AM, Samuel Dennis Borlongan wrote: > Not really. > I've checked-in an updated version that works when ersatz/pil is invoked. Thanks but still no luck: $ ersatz/pil [ersatz/java/java+.l:1] !? (load "@ersatz/java/init") "@ersatz/java/init" -- Read open error ? chri

Re: Classpath problem(?) with NetLogo-Ersatz integration

2014-06-27 Thread Christophe Gragnic
On Fri, Jun 27, 2014 at 11:29 AM, Samuel Dennis Borlongan wrote: > How about now? Sorry, `ersatz/pil` is OK, but `cd ersatz` then `./pil` is not ("ersatz/java/init" -- Read open error). > (I blame Windows [path handling weirdness that allows syntax that doesn't > work in non-Windows environments

Re: Classpath problem(?) with NetLogo-Ersatz integration

2014-06-27 Thread Christophe Gragnic
On Fri, Jun 27, 2014 at 4:11 PM, Samuel Dennis Borlongan wrote: > Fixed. > Now both > ersatz/pil -javaVersion -bye > and > cd ersatz ; ./pil -javaVersion -bye ; cd .. > work. Almost. There is still a path separator issue. In ./pil, it's -cp .:tmp:… instead of -cp .;tmp:… Thanks for considering a

My possibly wrong use of apply

2014-07-08 Thread Christophe Gragnic
Dear list, I'm writing an .svg file from Picolisp. For this, I'm using the xml lib Jon once started to write, a small lib that was enhanced by others: https://www.mail-archive.com/picolisp@software-lab.de/msg00510.html Here is the content of my demo file: (load "lib/xml.l") # I have this next li

Re: My possibly wrong use of apply

2014-07-08 Thread Christophe Gragnic
On Tue, Jul 8, 2014 at 10:38 AM, Alexander Burger wrote: > Hi Christophe, Hi Alex, thanks for this prompt answer. >> # In order to call with the default args and then the particular args, >> # decided to use apply: >> (apply (quote text text-anchor "middle" font-size 24 x 120 y 99 > > Yes, thi

Build transient value on the fly

2014-07-25 Thread Christophe Gragnic
Hi, The technical/dry question: Is it possible to shortcut the value resolution of transient symbols with a custom function? Something like: (de shortcut_transient (name) (pack name "!")) This would add a "!" to the default value of a transient sym. If I had to answer, I'd say «no», but PicoLisp

Re: Build transient value on the fly

2014-07-25 Thread Christophe Gragnic
On Fri, Jul 25, 2014 at 12:00 PM, Alexander Burger wrote: > Hi Christophe, Hi Alex. > Hmm, so is this the same as the localization does in PicoLisp? Quite the same, except that we don't have a list of all messages to translate. Any transient, even an unexpected one, should «spontaneously» have

Re: Build transient value on the fly

2014-07-25 Thread Christophe Gragnic
On Fri, Jul 25, 2014 at 4:53 PM, Alexander Burger wrote: > I see. This is not possible, because the fetching of a symbol's value > happens at the very lowest level of the interpreter (in fact it is only > a single machine instruction), and can't be changed from the outside. > And if you'd change t

Re: Build transient value on the fly

2014-07-27 Thread Christophe Gragnic
On Sun, Jul 27, 2014 at 8:05 AM, Alexander Burger wrote: > Hi Christophe, Hi. > Thinking about it (again), it occurs to me that this description in some > way matches the behavior of _external_ symbols. These also may change > their value (and properties) «spontaneously». > > Perhaps you can tak

Re: Build transient value on the fly

2014-07-27 Thread Christophe Gragnic
On Sun, Jul 27, 2014 at 3:09 PM, Tomas Hlavaty wrote: > Hi Christophe, Hi. As I tried to explain in this sentence: >> No problem for Display, but "hello" should spontaneously have its value >> changed to some XML containing the string "hello". I had no problem with functions (I used a simple «d

Re: Build transient value on the fly

2014-07-28 Thread Christophe Gragnic
On Mon, Jul 28, 2014 at 9:27 AM, Tomas Hlavaty wrote: > Hi Christophe, > No problem for Display, but "hello" should spontaneously have its value changed to some XML containing the string "hello". > > in other words, you want to use the transient symbol "hello" as a > variable? What is p

Re: Build transient value on the fly

2014-07-28 Thread Christophe Gragnic
On Mon, Jul 28, 2014 at 9:11 PM, Tomas Hlavaty wrote: > > I can't make sense of what you are trying to achieve. Why do you want > to use transient symbols? Why not use normal interned symbols? How > does your use case differ? Do you have a simple example? Suppose you embed a DSL in Picolisp,

Re: Build transient value on the fly

2014-07-29 Thread Christophe Gragnic
Le 29 juil. 2014 10:40, a écrit : > > Why not redefine function Afficher? > [...] > Would that be an idea? But this IS the idea I'm trying to explain!!! The problem was to also redefine transient symbols, dynamically. chri

Documentation again

2014-08-11 Thread Christophe Gragnic
Le 7 août 2014 14:11, "Jon Kleiser" a écrit : > > I use the frame-based solution for doc lookup (index.html by me), here < http://www.software-lab.de/doc/>, I realised only a few months ago that these pages were Jon's work (or in part?). Thanks for this. I'd be curious to have an historical point

Re: Build transient value on the fly

2014-08-15 Thread Christophe Gragnic
Dear list, some updates about my problem. I eventually decided to do the things The Good Way. Adding a shortcut to EmuLisp was a fun hack, almost a joke, but not a good idea as: 1) It was not EmuLisp anymore. 2) I may need this export functionality with other platforms (read PicoLisp implementatio

Little mess around the docs in the ref

2014-08-22 Thread Christophe Gragnic
Hi, `car` and `cdr` are ok but all the other combinations should point to: http://software-lab.de/doc/refC.html#cXr Also I didn't forget the thread about the docs that I started. I may thank you and answer to all soonish. chri -- http://profgra.org/lycee/ (site pro) http://delicious.com/profg

NIL and ""

2014-08-23 Thread Christophe Gragnic
Hi all, Is there somewhere some info about "" being NIL? I'd like to know why, maybe with some historical hindsight, and if there is a mean to trick the interpreter? The language I'm trying to embed in PicoLisp would love to have "" and NIL different ! chri -- http://profgra.org/lycee/ (site

Re: NIL and ""

2014-08-23 Thread Christophe Gragnic
On Sat, Aug 23, 2014 at 3:13 PM, Alexander Burger wrote: >> Is there somewhere some info about "" being NIL? >http://software-lab.de/doc/ref.html#nilSym >http://software-lab.de/doc/ref.html#nilSym-io Thanks. I knew about this links, I just wanted to know why. >> The language I'm trying t

Re: NIL and ""

2014-08-23 Thread Christophe Gragnic
On Sat, Aug 23, 2014 at 9:17 PM, Michel Pelletier wrote: > > If NIL doesn't exist at all, then why do you need to expose it? If > you language exposes lists or strings then empty ones carry the same > meaning. I don't want to expose it. Sorry, maybe I wasn't clear enough. In particular, I'd like

Re: NIL and ""

2014-08-23 Thread Christophe Gragnic
On Sun, Aug 24, 2014 at 7:47 AM, Alexander Burger wrote: > >> wrote: >> > >> > If NIL doesn't exist at all, then why do you need to expose it? If >> > you language exposes lists or strings then empty ones carry the same >> > meaning. >> >> I don't want to expose it. >> Sorry, maybe I wasn't clea

Re: try picolisp

2014-08-28 Thread Christophe Gragnic
On Thu, Aug 28, 2014 at 7:53 PM, Jakob Eriksson wrote: > Is it hard to implement minimalist version of minipicolisp in browser ? > Like http://tryclj.com/ ? Hi Mike. There is EmuLisp, a JS implementation by Jon Kleiser. It is not advertised much on the official PicoLisp website. Jon wrote it as a

Re: try picolisp

2014-08-28 Thread Christophe Gragnic
On Thu, Aug 28, 2014 at 9:32 PM, Jon Kleiser wrote: > > Thanks to suggestions from Christophe, I have > re-structured the code, And removed some trailing whitespace! (more to come (crossing fingers)). > corrected some errors, > and implemented a few new functions (more coming). Some say OOP wil

Re: try picolisp

2014-08-29 Thread Christophe Gragnic
Hi. On Fri, Aug 29, 2014 at 8:30 AM, Alexander Burger wrote: > I didn't announce it much. I've never put it into a publicly accessible > application or demo, for the obviously HUGE security reasons. Just an idea I have to tell. I guess this idea I'll describe here is delicate to implement and ti

Re: try picolisp

2014-08-29 Thread Christophe Gragnic
On Fri, Aug 29, 2014 at 10:40 AM, Alexander Burger wrote: > > The 'repl' in the PicoLisp release has about the same security as an SSH > session (if it is used via an SSL session). With the standard role and > permission system, you have a good control about who is allowed to use > it. The idea h

Re: try picolisp

2014-08-29 Thread Christophe Gragnic
android app…). Note that you just quoted me at the end. Maybe you just have to click somewhere to avoid what is called «top posting» (posting a message with the answer before the email where the question is). Funny that you master quite complex systems with Docker and don't know how to quote an

Re: try picolisp

2014-08-29 Thread Christophe Gragnic
On Fri, Aug 29, 2014 at 9:43 PM, Tomas Hlavaty wrote: > > that is impossible, and even contradictory! You can't allow arbitrary > functionality and disallow some functionality at the same time. Executing a script doesn't mean every line will work as expected! `rm -fr /` can be executed, but does

Re: try picolisp

2014-08-30 Thread Christophe Gragnic
On Sat, Aug 30, 2014 at 8:52 AM, Alexander Burger wrote: > Hi Christophe, Hi Alex, > I would not disable them system-wide. Oops. Indeed. In fact I'm still very influenced by Tcl. Tch has an «interp» command that allow to create, and in fact cascade, interpreters. Untrusted scripts will only be

Re: try picolisp

2014-08-30 Thread Christophe Gragnic
On Sat, Aug 30, 2014 at 11:31 AM, Tomas Hlavaty wrote: > >> Executing a script doesn't mean every line will work as expected! >> `rm -fr /` can be executed, but doesn't always work ;) > > You see, then you are not allowing arbitrary functionality. Maybe I should have said: «Execute arbitrary scri

Swimming against the tide, again (this time with numbers)

2014-08-31 Thread Christophe Gragnic
Hi all crazy Lispers! I managed to handle "" being NIL, thanks to Michel and Alex. Now I have another similar problem with numbers. First, I understand the reasons behind having fixpoint numbers in Picolisp (basically simple implementation and control). Now considering that my goal is to implement

Re: try picolisp

2014-08-31 Thread Christophe Gragnic
On Sun, Aug 31, 2014 at 12:09 PM, Tomas Hlavaty wrote: > > would this clasify? You mean «clarify»? > $ cat >/dev/null > rm -fr / > ^d > > I executed arbitrary script while limiting its effects. Indeed. > The most important missing part is to define, what functionality exactly > do you want to

Re: try picolisp

2014-09-01 Thread Christophe Gragnic
On Mon, Sep 1, 2014 at 5:52 AM, Tomas Hlavaty wrote: > > […] it is unsafe by design. > […] > even if you bind those symbols to 'prog', an attacker could set them to > the original values, which are simple numbers. Hey, this is a very nice idea and answer to my question of safe interps. > It shou

Re: try picolisp

2014-09-01 Thread Christophe Gragnic
On Mon, Sep 1, 2014 at 10:02 PM, Thorsten Jolitz wrote: > > could you elaborate on this a bit? Sorry, I cannot give you better info that what is in the ref: http://www.tcl.tk/man/tcl8.6/TclCmd/interp.htm#M4 chri -- http://profgra.org/lycee/ (site pro) http://delicious.com/profgraorg (liens,

Re: Swimming against the tide, again (this time with numbers)

2014-09-02 Thread Christophe Gragnic
Hi all, On Mon, Sep 1, 2014 at 6:05 AM, Tomas Hlavaty wrote: >> : (* 1.0 1.0) >> -> 100 > > You want: (*/ 1.0 1.0 1.0), see http://software-lab.de/doc/ref_.html#*/ That's funny because I read about */ right before posting my email but couldn't connect with my problem. If there is room for clarif

Re: Swimming against the tide, again (this time with numbers)

2014-09-03 Thread Christophe Gragnic
On Tue, Sep 2, 2014 at 8:14 PM, Tomas Hlavaty wrote: >> >> «…by multiplying with (or dividing by) the scale factor, which is always >> `1.0`.» > > it doesn't have to be always 1.0. If it was, it would not need to be > there at all. Oops. Could you give me some details about my mistake? Isn't «1

Re: (index 'any 'lst) implementation

2014-09-03 Thread Christophe Gragnic
On Wed, Sep 3, 2014 at 2:56 PM, Alexander Burger wrote: > > What you describe here is call "lazy evaluation". While some languages > support this, PicoLisp (like most other Lisps) doesn't. > […] > The fundamental rule of Lisp function calls (a function recursively > evaluates its arguments before

Ersatz: Passing/receiving floats to/from Java libs

2014-09-14 Thread Christophe Gragnic
Hi, I was wondering how easy it was to pass floats to java libs from Ersatz, and also maybe receive some and rescale them to ints. I can't find anything about this in the docs of Ersatz or in srborlongan's project: http://picolisp.com/wiki/?JavaIterop Thanks for having read this maybe silly questio

Re: Announce: PicoLisp in Hardware (PilMCU)

2014-09-19 Thread Christophe Gragnic
On Fri, Sep 19, 2014 at 7:08 PM, Loyall, David wrote: > > The Internet would like to run this locally. Yes ! > Would you post the verilog source and build files? Or a link to a repository? Now PicoLisp should not be jealous of BF anymore: https://github.com/briandef/bf16 (Quite funny that Alex

Re: Announce: PicoLisp in Hardware (PilMCU)

2014-09-19 Thread Christophe Gragnic
On Fri, Sep 19, 2014 at 10:53 PM, Loyall, David wrote: > If you sell a FPGA configured to be an open source Lisp CPU, I'll buy a few Someone on Hacker News: «where's the kickstarter page? I want a few of those.» I'd buy a few too. chri -- http://profgra.org/lycee/ (site pro) http://delicious

Re: Announce: PicoLisp in Hardware (PilMCU)

2014-09-22 Thread Christophe Gragnic
On Mon, Sep 22, 2014 at 11:26 AM, wrote: > > Maybe you don't even need a crowdfunding project, if we find enough people > this way? It really can't hurt. Maybe it could even ×10 (or more) the founds. On Mon, Sep 22, 2014 at 8:09 PM, Heow Goodman wrote: > If we're talking small potatoes, I'm su

The many uses of PilMCU

2014-10-07 Thread Christophe Gragnic
Hi list ! This thread is meant to collect ideas about PilMCU. At least mine (because I need to clean them up a bit) and ideas of other PicoLispers (out of curiosity). Maybe some items will look more like questions like «is it even possible?»! (This email took me at least two weeks of careful draf

Re: MiniPicoLisp Code in ROM

2014-10-10 Thread Christophe Gragnic
Hi, On Wed, Oct 8, 2014 at 1:30 PM, Alexander Burger wrote: > > That's right. I'd gladly do it if somebody pays me for a couple of days Alex, maybe crowdfunding would be a solution, even for this kind of «small» task ! chri -- http://profgra.org/lycee/ (site pro) http://delicious.com/profgr

Re: The many uses of PilMCU

2014-10-17 Thread Christophe Gragnic
I just realised that my first email has been truncated !!! Strange as, in my gmail, when I reply to myself, I have the email in its entirety: (I just added http://www.arduino.cc/ ) On Tue, Oct 7, 2014 at 10:36 PM, Christophe Gragnic wrote: > Hi list ! > > […I delete the part you already

Is there a 'conc that evaluates its first arg ?

2014-11-04 Thread Christophe Gragnic
Hi, Maybe I should tell my problem as a whole. I'm implementing a embedded language in PicoLisp. I'm currently implementing lists with objects: # Internals (class +Liste) (dm T (ELTS) (=: elts ELTS) ) (dm push> (elt) (conc (:: elts) (list elt)) ) # this doesn't work # Interface with

Re: Is there a 'conc that evaluates its first arg ?

2014-11-05 Thread Christophe Gragnic
On Wed, Nov 5, 2014 at 7:53 AM, Alexander Burger wrote: > Hi Christophe, Hi Alex, hi all. > I can assure you that 'conc' always evaluates its first arg. OK, then the reason why there is no need to quote A in the example at: http://www.software-lab.de/doc/refC.html#conc is that A is not really n

Syntax in src64

2014-11-11 Thread Christophe Gragnic
Hi Alex, I was staring at this magnificent piece of code, say in this file: https://code.google.com/p/picolisp/source/browse/src64/flow.l and was wondering why and how some pieces of code didn't have parens. My guess about the «why»: since its an assembler, there is no need for a tree of instructio

Re: Syntax Highlighting in PicoLisp

2014-11-22 Thread Christophe Gragnic
On Sat, Nov 22, 2014 at 8:37 AM, Alexander Burger wrote: > Hello list, Hello ! > I'm opposed to syntax highlighting of symbols in PicoLisp. Wao, this is quite an introduction for a post on the list ! I guess that it is not spontaneous and may be triggered by a discussion on IRC? > As I underst

Location of an error

2015-01-23 Thread Christophe Gragnic
Hi all, I emulated a «while» loop with a function defined with a `de`, say `my_while`. It has a body that allows a user defined body (the user is a developer!) to be executed, thanks to 'run. Now when the code of the user/dev contains a mistake, the location of the error is always at the line wher

Suggestions for the doc of *Err

2015-01-24 Thread Christophe Gragnic
Hi, I was trying to avoid the «? prompt» in case of an error. I know that this REPL is sometimes useful, but not for my use case. I eventually succeeded with (de *Err (bye)). During this journey, I noticed a few things. About *Err, the doc says in: http://www.software-lab.de/doc/refE.html#*Err «a

Re: Location of an error

2015-01-26 Thread Christophe Gragnic
On Sat, Jan 24, 2015 at 9:07 AM, Alexander Burger wrote: >> Now when the code of the user/dev contains a mistake, the location >> of the error is always at the line where `my_while` is called and not in its >> body at the line of the mistake. > > I'm not sure I understand the problem. I thought i

Rainbow parens for vim users

2015-02-18 Thread Christophe Gragnic
Hi list. I discovered this several weeks ago and thought this afternoon that it may interest some of you. Put this in .vim/ftdetect/lisp.vim au BufNewFile,BufRead *.l set filetype=lisp Then this in your .vimrc let g:lisp_rainbow = 1 " for things like +-*/><= to stay white: hi def lispFunc cter

Re: Google Code closing

2015-03-13 Thread Christophe Gragnic
On Fri, Mar 13, 2015 at 4:32 PM, Alexander Williams wrote: > Everyone's comments are valid, but we need to remember: > > For PicoLisp's user base to grow, lowering barriers to entry should be the > first priority. The choice of the repo wouldn't have any effect on pure picolisp users, but on deve

27 implementations of a Lisp

2015-03-13 Thread Christophe Gragnic
Hi, I thought some people here might be interested by this: https://github.com/kanaka/mal Excerpt from the readme: ««« Mal is a learning tool. See the make-a-lisp process guide. Each implementation of mal is separated into 11 incremental, self-contained (and testable) steps that demonstrate core

Static file server with Ersatz

2015-03-16 Thread Christophe Gragnic
Hi list, I'm investigating a way to be able to fire up a static file server like in Python: python -m http.server 8000 but with Ersatz. Has it been done ? If not, would it involve: 1) the use of the -server function in http.l 2) grab the path of the requested file 3) read the file and send it to

Re: Static file server with Ersatz

2015-03-16 Thread Christophe Gragnic
Hi Alex, hi Joe. On Mon, Mar 16, 2015 at 9:41 AM, Alexander Burger wrote: > Hi Christophe, > >> but with Ersatz. Has it been done ? If not, would it involve: >> 1) the use of the -server function in http.l > > I haven't thought about this in depth. 'server' might be ported to > Ersatz perhaps, by

Pseudo Random Number Generation across PicoLisp implementations

2015-04-22 Thread Christophe Gragnic
Hi all, The next paragraph gives a bit of context. If you are bored you can skip it and go directly to the technical question. I use PicoLisp to implement a pedagogical language, directly embedded in PicoLisp. In an exercise about dices, I noticed a kind of similarity among the results of my stud

Re: Pseudo Random Number Generation across PicoLisp implementations

2015-04-23 Thread Christophe Gragnic
at 10:50 PM, Christophe Gragnic wrote: > Now the question. I found discrepancies between PicoLisp: > : (rand 1 1000) > -> 1 > : (rand 1 1000) > -> 934 > : (bye) > > And Ersatz > : (rand 1 1000) > -> 1 > : (rand 1 1000) > -> 967 > : (bye) > > I

Re: Pseudo Random Number Generation across PicoLisp implementations

2015-04-24 Thread Christophe Gragnic
On Thu, Apr 23, 2015 at 11:12 AM, Jon Kleiser wrote: > > Feel free to give it a try. As EmuLisp uses JavaScript numbers, > 6364136223846793005 is too many digits, but you may find a way around it. Progress is being made. I use this JS lib for arbitrary big integers: https://github.com/defunctzom

Re: Pseudo Random Number Generation across PicoLisp implementations

2015-04-25 Thread Christophe Gragnic
Hi, Still struggling. I'd like some help to find my mistake trying to understand the Ersatz version of initSeed. The source is here, if you don't have it handy: https://code.google.com/p/picolisp/source/browse/ersatz/sys.src#234 final static long initSeed(Any x) { Means it gives back a signed 64

Re: Pseudo Random Number Generation across PicoLisp implementations

2015-04-26 Thread Christophe Gragnic
On Sun, Apr 26, 2015 at 5:48 PM, Alexander Burger wrote: > Hi Christophe, > > […] > >> return n>=0? n*2 : -n*2+1; >> >> This ensures the return value is non negative (?). >> But why would not the result overflow? > > Yes, it may overflow. The above operation is to keep the sign bit in bit > zero o

Re: Pseudo Random Number Generation across PicoLisp implementations

2015-04-27 Thread Christophe Gragnic
On Mon, Apr 27, 2015 at 8:01 AM, Alexander Burger wrote: > […] > A shift of 32 bits, however, would not suffice, because > it would put the sign bit of the original 64-bit number into the MSB of > the result. OK, I understand. I have some more ideas to try to make the behaviors of (rand m n) in

  1   2   >