Subscribe

2010-10-31 Thread Christophe Gragnic

Re: gettext

2010-11-20 Thread Christophe Gragnic
--- En date de : Sam 20.11.10, Alexander Burger a...@software-lab.de 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

SUBSCRIBE

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

Unsubscribe

2010-11-24 Thread Christophe Gragnic
Good bye Christophe Gragnic christophegrag...@yahoo.fr :-( 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 quintf...@gmail.com 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

Re: Speedtest PicoLisp vs Emacs Lisp

2012-04-25 Thread Christophe Gragnic
On Wed, Apr 25, 2012 at 4:47 PM, Alexander Burger a...@software-lab.de 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

Re: Speedtest PicoLisp vs Emacs Lisp

2012-04-27 Thread Christophe Gragnic
a...@software-lab.de 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. However, this seems quite some

Re: pilog in ersatz

2012-07-09 Thread Christophe Gragnic
On Mon, Jul 9, 2012 at 7:31 AM, Alexander Burger a...@software-lab.de 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

Re: pilog in ersatz

2012-07-10 Thread Christophe Gragnic
On Mon, Jul 9, 2012 at 11:12 PM, Doug Snead semaphore_2...@yahoo.com 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.

Re: pilog in ersatz

2012-07-10 Thread Christophe Gragnic
On Tue, Jul 10, 2012 at 9:56 AM, Alexander Burger a...@software-lab.de 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

Re: PicoLisp Book

2012-07-20 Thread Christophe Gragnic
On Fri, Jul 20, 2012 at 2:45 PM, Alexander Burger a...@software-lab.de 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

Re: PicoLisp Book

2012-07-21 Thread Christophe Gragnic
On Sat, Jul 21, 2012 at 8:05 PM, Thorsten Jolitz tjol...@googlemail.com 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),

Re: Transient symbol with a single backslash

2014-01-25 Thread Christophe Gragnic
On Fri, Jan 24, 2014 at 10:54 PM, Axel Svensson svenssona...@gmail.com 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)

Re: Transient symbol with a single backslash

2014-01-25 Thread Christophe Gragnic
On Sat, Jan 25, 2014 at 3:01 PM, Thorsten Jolitz tjol...@gmail.com 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 a...@software-lab.de 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

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

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 be

Re: Copy a symbol to another (

2014-02-05 Thread Christophe Gragnic
On Wed, Feb 5, 2014 at 5:34 PM, Alexander Burger a...@software-lab.de 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 a...@software-lab.de 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

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)

Re: exit codes

2014-05-06 Thread Christophe Gragnic
On Tue, May 6, 2014 at 2:48 PM, Alexander Burger a...@software-lab.de 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,

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

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 t...@logand.com 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

Re: Regarding the implementations of PicoLisp

2014-05-11 Thread Christophe Gragnic
On Fri, May 9, 2014 at 7:59 PM, Rick Lyman lyman.r...@gmail.com 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)

Re: Regarding the implementations of PicoLisp

2014-05-12 Thread Christophe Gragnic
On Mon, May 12, 2014 at 8:06 AM, Alexander Burger a...@software-lab.de 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,

Re: Regarding the implementations of PicoLisp

2014-05-12 Thread Christophe Gragnic
On Mon, May 12, 2014 at 2:16 PM, Joe Bogner joebog...@gmail.com 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

Re: Regarding the implementations of PicoLisp

2014-05-12 Thread Christophe Gragnic
On Mon, May 12, 2014 at 7:03 PM, Joe Bogner joebog...@gmail.com 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 a...@software-lab.de 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

Re: Pretty-Printing and Source Code Indentation

2014-06-03 Thread Christophe Gragnic
On Tue, Jun 3, 2014 at 2:51 PM, Alexander Burger a...@software-lab.de 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

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)

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:

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 srborlon...@gmail.com 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

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)

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 srborlon...@gmail.com 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

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 srborlon...@gmail.com 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

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 srborlon...@gmail.com 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

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 srborlon...@gmail.com 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

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

Re: My possibly wrong use of apply

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

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 is

Re: Build transient value on the fly

2014-07-25 Thread Christophe Gragnic
On Fri, Jul 25, 2014 at 12:00 PM, Alexander Burger a...@software-lab.de 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

Re: Build transient value on the fly

2014-07-27 Thread Christophe Gragnic
On Sun, Jul 27, 2014 at 3:09 PM, Tomas Hlavaty t...@logand.com 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

Re: Build transient value on the fly

2014-07-28 Thread Christophe Gragnic
On Mon, Jul 28, 2014 at 9:27 AM, Tomas Hlavaty t...@logand.com 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

Re: Build transient value on the fly

2014-07-28 Thread Christophe Gragnic
On Mon, Jul 28, 2014 at 9:11 PM, Tomas Hlavaty t...@logand.com 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

Re: Build transient value on the fly

2014-07-29 Thread Christophe Gragnic
Le 29 juil. 2014 10:40, andr...@itship.ch 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 jon.klei...@fsat.no 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

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

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)

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 a...@software-lab.de 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

Re: NIL and

2014-08-24 Thread Christophe Gragnic
On Sun, Aug 24, 2014 at 7:47 AM, Alexander Burger a...@software-lab.de wrote: pelletier.mic...@gmail.com 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.

Re: try picolisp

2014-08-28 Thread Christophe Gragnic
On Thu, Aug 28, 2014 at 7:53 PM, Jakob Eriksson ja...@aurorasystems.eu 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

Re: try picolisp

2014-08-28 Thread Christophe Gragnic
On Thu, Aug 28, 2014 at 9:32 PM, Jon Kleiser jon.klei...@fsat.no 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).

Re: try picolisp

2014-08-29 Thread Christophe Gragnic
Hi. On Fri, Aug 29, 2014 at 8:30 AM, Alexander Burger a...@software-lab.de 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

Re: try picolisp

2014-08-29 Thread Christophe Gragnic
! Christophe Gragnic, If you use Docker containers… Thanks for your proposal. I'm just a (maths teacher) and ((computer science and dev) hobbyist and teacher). I try to build things that are as simple as possible. Building, (and even only maintaining if already built) something like: - web site

Re: try picolisp

2014-08-29 Thread Christophe Gragnic
On Fri, Aug 29, 2014 at 9:43 PM, Tomas Hlavaty t...@logand.com 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

Re: try picolisp

2014-08-30 Thread Christophe Gragnic
On Sat, Aug 30, 2014 at 8:52 AM, Alexander Burger a...@software-lab.de 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

Re: try picolisp

2014-08-30 Thread Christophe Gragnic
On Sat, Aug 30, 2014 at 11:31 AM, Tomas Hlavaty t...@logand.com 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

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 t...@logand.com 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

Re: try picolisp

2014-09-01 Thread Christophe Gragnic
On Mon, Sep 1, 2014 at 5:52 AM, Tomas Hlavaty t...@logand.com 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.

Re: try picolisp

2014-09-01 Thread Christophe Gragnic
On Mon, Sep 1, 2014 at 10:02 PM, Thorsten Jolitz tjol...@gmail.com 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)

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 t...@logand.com 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

Re: (index 'any 'lst) implementation

2014-09-03 Thread Christophe Gragnic
On Wed, Sep 3, 2014 at 2:56 PM, Alexander Burger a...@software-lab.de 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

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

Re: Announce: PicoLisp in Hardware (PilMCU)

2014-09-19 Thread Christophe Gragnic
On Fri, Sep 19, 2014 at 7:08 PM, Loyall, David david.loy...@nebraska.gov 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

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

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 a...@software-lab.de 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

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

Re: Syntax Highlighting in PicoLisp

2014-11-22 Thread Christophe Gragnic
On Sat, Nov 22, 2014 at 8:37 AM, Alexander Burger a...@software-lab.de 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

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

Re: Location of an error

2015-01-26 Thread Christophe Gragnic
On Sat, Jan 24, 2015 at 9:07 AM, Alexander Burger a...@software-lab.de 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.

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

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

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 a...@software-lab.de 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

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: Google Code closing

2015-03-13 Thread Christophe Gragnic
On Fri, Mar 13, 2015 at 4:32 PM, Alexander Williams a...@unscramble.co.jp 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

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

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 a...@software-lab.de 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

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

Re: Pseudo Random Number Generation across PicoLisp implementations

2015-04-23 Thread Christophe Gragnic
at 10:50 PM, Christophe Gragnic christophegrag...@gmail.com 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 tried to inspect the source for getting some

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 jon.klei...@fsat.no 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:

Re: In ersatz, seed is not returning a small number

2015-04-28 Thread Christophe Gragnic
On Tue, Apr 28, 2015 at 7:58 PM, Alexander Burger a...@software-lab.de wrote: Hi Christophe, Hi Alex. Is it really so important that the random generators give the same results? Not so much important indeed, not crucial, but very interesting! I had never intended that. The reason is that

Re: Pseudo Random Number Generation across PicoLisp implementations

2015-04-28 Thread Christophe Gragnic
On Tue, Apr 28, 2015 at 8:35 AM, Alexander Burger a...@software-lab.de wrote: Hi Christophe, […] n = (Seed 32) % n; should it be OK? Yes. It works. Great. Thanks for the input! Thank you for considering it ! The 2)b) of my big email (april, 26th) of this thread was not answered but

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 a...@software-lab.de 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

Re: In ersatz, seed is not returning a small number

2015-04-28 Thread Christophe Gragnic
On Tue, Apr 28, 2015 at 8:38 AM, Alexander Burger a...@software-lab.de wrote: Good, but this is not completely correct. It stores the reduced 32-bit value in 'Seed'. I think 'Seed' must keep the full 64-bit value. Indeed. I'm not used to read lines with interleaved affectations. I changed it

In ersatz, seed is not returning a small number

2015-04-27 Thread Christophe Gragnic
Dear list, In seed, line 3310 of fun.src, I'd suggest a 32 bits shift then a cast to an int for the result to conform to the docs: http://www.software-lab.de/doc/refS.html#seed n = (int)((initSeed(ex.Cdr.Car.eval()) * 6364136223846793005L) 32); chri -- http://profgra.org/lycee/ (site pro)

A transient with a single hat character

2015-05-20 Thread Christophe Gragnic
Hi list, Is there a way to have just ^ in PicoLisp ? I read the docs, and especially this section: http://www.software-lab.de/doc/ref.html#transient-io and didn't find an answer to my question. Maybe it would be nice to add this corner case to the examples ? chri -- http://profgra.org/lycee/

PicoLisp now detected on GitHub

2015-06-17 Thread Christophe Gragnic
Hi list. They even spelled it correctly ! https://github.com/github/linguist/pull/2449#issuecomment-112829159 See one of your repos or this one: https://github.com/Microalg/Microalg chri -- http://profgra.org/lycee/ (site pro) http://delicious.com/profgraorg (liens, favoris)

Re: Announce: MCU based PicoLisp machines for sale

2015-11-03 Thread Christophe Gragnic
Thanks for the announcement. On Wed, Nov 4, 2015 at 3:03 AM, Raman Gopalan wrote: > > [4]: https://www.adafruit.com/products/284 http://www.4star.it/ worked better for me. chri -- http://profgra.org/lycee/ (site pro) http://delicious.com/profgraorg (liens, favoris)

Adaptation in PicoLisp of a nice video in Ruby about the Y combinator

2015-12-02 Thread Christophe Gragnic
Hi dear list, I wanted to share the first lines (already quite a few) of a work in progress. I watched this video quite a long time ago: https://www.youtube.com/watch?v=FITJMJjASUs and wanted to see how a PicoLisp version would look like. See what I've done so far here:

Hosting PicoLisp

2015-12-13 Thread Christophe Gragnic
Hi, My host of choice is quite nice but doesn't allow me to run my own processes. Everything must live behing Apache. I guest most people on this list run their own servers but maybe you'll have some answers to these two questions: 1) Is it possible to serve a PicoLisp app behing Apache? 2) Do

Re: PicoLisp Website

2015-12-13 Thread Christophe Gragnic
On Sun, Dec 13, 2015 at 6:51 PM, Erik Gustafson wrote: > Hi all, > > Awesome! Thanks for the feedback. Glad you all like it :) I liked it too. Very nice work. I tried to investigate how you embed the REPL but no luck. Could you explain please? Are the exprs executed

Re: PicoLisp Website

2015-12-14 Thread Christophe Gragnic
On Mon, Dec 14, 2015 at 9:05 AM, Alexander Burger wrote: > > So, yes, it is executed on the server. This feature opens up the server > completely, so it is better not enabled on a publicly accessible system. Hi all, hi Alex. Maybe the job could securely be done by EmuLisp.

Re: wr function in Ersatz

2016-01-02 Thread Christophe Gragnic
On Thu, Dec 31, 2015 at 12:37 PM, Alexander Burger wrote: > > A better idea: Why do you bother with ErsatzLisp at all? If you don't > have Linux or another POSIX system, instead of starting the Java-VM you > might as well start a Linux-VM and run real PicoLisp with all

Questions about EmuLisp

2016-01-02 Thread Christophe Gragnic
Hi all, These are primarily questions for Alex, but I'm interested in the answers of other people too. I'm a big fan of PicoLisp even if I only scratched the surface yet, since I don't use the server or the DB. I know most of the heavy PicoLisp users here rely extensively on the server and the

Re: A symbol that is bound only once

2015-12-30 Thread Christophe Gragnic
On Tue, Dec 29, 2015 at 11:40 PM, Rick Hanson wrote: > I admit that I didn't watch the video; You should ! The guy is funny. Alternatively you can read a page where I translate every step to PicoLisp: http://galerie.microalg.info/profgra:tests:y_combinator with live code

  1   2   >