Re: try picolisp

2014-09-02 Thread Tomas Hlavaty
Hi Christophe,

 Christophe Gragnic christophegrag...@gmail.com writes:
 It should be possible to
 find the original values from another instance of picolisp, for example.

 Is it always possible?

try it:

in 1st console:

$ ~/picoLisp/p
: call
- 267631
: ^d

in 2nd console:

$ ~/picoLisp/p
: call
- 267631
: ^d

The number is the same.

If you bind 'call' to NIL, I could (setq call 267631) and revert your change.

 Or simply call something that crashes PicoLisp, e.g.
 […]

 Here comes the power of embedded interpreters, which PicoLisp
 does not have.

Well, you could write one in PicoLisp!  It should not be that hard and
you would have a complete control over what you allow to be executed.

Cheers,

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


Re: try picolisp

2014-09-02 Thread Thorsten Jolitz
Christophe Gragnic
christophegrag...@gmail.com writes:

 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

thx for the link!

-- 
cheers,
Thorsten

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


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.

 It should be possible to
 find the original values from another instance of picolisp, for example.

Is it always possible?

 Or simply call something that crashes PicoLisp, e.g.
 […]

Here comes the power of embedded interpreters, which PicoLisp
does not have.

Thanks to all for this interesting discussion !


chri

-- 

http://profgra.org/lycee/ (site pro)
http://delicious.com/profgraorg (liens, favoris)
https://twitter.com/profgraorg
http://microalg.info
--
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: try picolisp

2014-09-01 Thread Thorsten Jolitz
Christophe Gragnic
christophegrag...@gmail.com writes:

Hi Christophe,

 On Mon, Sep 1, 2014 at 5:52 AM, Tomas Hlavaty

 Or simply call something that crashes PicoLisp, e.g.
 […]

 Here comes the power of embedded interpreters, which PicoLisp
 does not have.

could you elaborate on this a bit?

-- 
cheers,
Thorsten

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


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)
http://delicious.com/profgraorg (liens, favoris)
https://twitter.com/profgraorg
http://microalg.info
-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: try picolisp

2014-08-31 Thread Tomas Hlavaty
Hi Christophe,

 Christophe Gragnic christophegrag...@gmail.com writes:
 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 arbitrary scripts while limiting their effects.»

would this clasify?

$ cat /dev/null
rm -fr /
^d

I executed arbitrary script while limiting its effects.

The most important missing part is do define, what functionality exactly
do you want to allow and which effects are acceptable.  Even if you
allow safe operations (whatever that means), users could spin your
machine in a loop eating precious CPU time.  How would you limit that at
PicoLisp or Tcl level?

Cheers,

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


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 want to allow and which effects are acceptable.

Some examples:
Allow: execution flow, setting/defining symbols, maths operations, print,
Deny: system calls (or controlled by ACL), file operations (or
sandboxed), redefine important symbols

 Even if you
 allow safe operations (whatever that means), users could spin your
 machine in a loop eating precious CPU time.  How would you limit that at
 PicoLisp or Tcl level?

Indeed. Admitedly derisory measures would be limiting number of iterations,
execution time…


chri

-- 

http://profgra.org/lycee/ (site pro)
http://delicious.com/profgraorg (liens, favoris)
https://twitter.com/profgraorg
http://microalg.info
--
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: try picolisp

2014-08-31 Thread Tomas Hlavaty
Hi Christophe,

 Christophe Gragnic christophegrag...@gmail.com writes:
 On Sun, Aug 31, 2014 at 12:09 PM, Tomas Hlavaty t...@logand.com wrote:

 would this clasify?

 You mean «clarify»?

sorry, I meant classify.

Cheers,

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


Re: try picolisp

2014-08-30 Thread Alexander Burger
Hi Christophe,

  Then, the most glaring security risks are the 'call' and 'pipe'
  functions, and the pipe functionalities of 'in', 'out' and 'load'. They
  allow a REPL user to directly access the interlying system. If these
  were disabled (can probably done on the Lisp level in the 'repl'
 
 How would you disable them? Would this be ok?
 (de annihilate @ (mapcar '((sym) (set sym NIL)) (rest)))
 Then call it this way (I think that I understand now why low level functions
 should evaluate their args):
 (annihilate 'call 'pipe ...)

I would not disable them system-wide.

The critical point is only the place where 'eval' is called. I would
change this fragment from the 'repl' function (line 336 in lib/form.l)

   (catch '(NIL)
  (let Res (in /dev/null (eval (any Str)))
 (prin - )
 (println Res) ) )

to something like

   (catch '(NIL)
  (let Res
 (in /dev/null
(let (call prog  load prog  in prog  out prog  pipe prog  dir prog)
   (eval (any Str)) ) )
 (prin - )
 (println Res) ) )

Note that this sets these functions to 'prog'. Setting them to NIL like
in your example is also OK, but gives a runtime error, while 'prog'
silently evaluates its arguments and does nothing.

Another option would be not to disable some of these functions
completely, but allow I/O to controlled places. This can be done, for
example, by disallowing list arguments to 'in' and 'out' (they trigger
pipe calls), and checking the path names for allowed ranges.


 This is the delicate/time consuming part: testing, trying to crack a
 «safe» interp.

And this is _always_ possible, I believe. It depends on what you call
crack, but unless you hamper the language until it is no longer
turing-compatible, an attacker can always create infinite loops or
unlimited recursions and thus seriously disturb the server.

And if you try to control this too (e.g. with a watchdog which kills
such processes), an attacker can still find other ways, like a DoS
attack.

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


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 scripts will only be interpreted by embedded (so-called) safe
interpreters, and the interpreter of the main app is still a normal one.

 The critical point is only the place where 'eval' is called. I would
 […]

Thanks for providing these hints.


chri

-- 

http://profgra.org/lycee/ (site pro)
http://delicious.com/profgraorg (liens, favoris)
https://twitter.com/profgraorg
http://microalg.info
--
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: try picolisp

2014-08-30 Thread Tomas Hlavaty
Christophe Gragnic christophegrag...@gmail.com writes:

 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 executed, but doesn't always work ;)

You see, then you are not allowing arbitrary functionality.

Cheers,

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


Re: try picolisp

2014-08-30 Thread Tomas Hlavaty
Hi Amaury,

 Amaury Hernández Águila amhe...@gmail.com writes:
 A Container is basically a VM, but cheaper.

kind of, but not really.  You can say that in the context of your
accepted trade-offs but it is not true in general.

 The downsides negligible,
 like the limitation of running only a single Linux kernel for all the
 containers, or not being able to run other operating systems (if the
 host machine is a Linux with a kernel version X.X.X, all the
 containers will be Linux X.X.X).

One of the most important downsides is that it is not as secure as VM.
Search internet for docker security.  Problem is that not everything
in Linux is namespaced.

Cheers,

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


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 arbitrary scripts while limiting their effects.»


chri

-- 

http://profgra.org/lycee/ (site pro)
http://delicious.com/profgraorg (liens, favoris)
https://twitter.com/profgraorg
http://microalg.info
--
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: try picolisp

2014-08-29 Thread Alexander Burger
Hi All,

 Is it hard to implement minimalist version of minipicolisp in browser ?
 Like http://tryclj.com/ ?

In addition to the proposed solutions involving JavaScript versions
of PicoLisp:


Perhaps not many people are aware that standard PicoLisp comes with a
REPL in the browser GUI since many years.

It is the 'repl' function in @lib/form.l. To try it, put this
into a script:

   #!/usr/bin/pil

   (load @lib/http.l @lib/xhtml.l @lib/form.l)

   (de home ()
  (app)
  (action
 (html 0 REPL @lib.css NIL
(repl) ) ) )

   (server 8080 !home)
   (wait)

Point your browser to http://localhost:8080 (or, better, start httpGate
and point to http://localhost). You can type arbitrary expressions into
the text field below, and hit Enter or press the eval button. Then see
the output in the text area above.

Works with and without JavaScript, also in a text browser like w3m.


I didn't announce it much. I've never put it into a publicly accessible
application or demo, for the obviously HUGE security reasons.

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


Re: try picolisp

2014-08-29 Thread Jon Kleiser
Hi,

On 29. aug. 2014, at 06:27, H. Hirzel hannes.hir...@gmail.com wrote:

 On 8/28/14, Christophe Gragnic christophegrag...@gmail.com wrote:
 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).
 
 Some say OOP will come before Christmas.
 
 Christophe’s github repo has what I now call EmuLisp v.2.
 
 URL for EmuLisp v.2. repo?

Right now I have no real repo for v.2. You can find my .js files referenced 
from this console:
https://dl.dropboxusercontent.com/u/48186945/web/pico/emulisp-console2.html

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


Re: try picolisp

2014-08-29 Thread Alabhya Singh
Thanks a lot Alex.

PicoLisp already has everything except ease of learning!



Re: try picolisp

2014-08-29 Thread Alexander Burger
Hi Christophe,

 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
 to implement and time consuming, with no real need for now (except
 for showcase purposes), but interesting nonetheless.

Yes, indeed very delicate ;-)

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.

Then, the most glaring security risks are the 'call' and 'pipe'
functions, and the pipe functionalities of 'in', 'out' and 'load'. They
allow a REPL user to directly access the interlying system. If these
were disabled (can probably done on the Lisp level in the 'repl'
function itself), attackers cannot call external commands or processes
any more (can they?).

But then an attacker could still read many files. So perhaps disable all
I/O functions? How far it makes sense to go? But in any case it doesn't
seem too difficult to me.

The easiest would be to let the server run in a minimal virtual machine.

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


Re: try picolisp

2014-08-29 Thread Thorsten Jolitz
Alexander Burger a...@software-lab.de writes:

Hi Alex,

 Is it hard to implement minimalist version of minipicolisp in browser ?
 Like http://tryclj.com/ ?

 In addition to the proposed solutions involving JavaScript versions
 of PicoLisp:


 Perhaps not many people are aware that standard PicoLisp comes with a
 REPL in the browser GUI since many years. [...]

just tried it out, its neat!

Imagine the interactive PicoLisp web tutorials that could be written if
there would actually be a safe PicoLisp interpreter as proposed -
thats a nice idea. 

Or would it suffice to define the tutorial functions and start a
server that only allows these functions and nothing else?

-- 
cheers,
Thorsten

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


Re: try picolisp

2014-08-29 Thread andreas
 Imagine the interactive PicoLisp web tutorials that could be written if
 there would actually be a safe PicoLisp interpreter as proposed -
 thats a nice idea.

 Or would it suffice to define the tutorial functions and start a
 server that only allows these functions and nothing else?

check out http://tryruby.org to see how such a thing is properly done (GUI
wise). I find it really clever made. Would surely be a huge boost to have
something similar for our beloved picolisp :)

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


Re: try picolisp

2014-08-29 Thread Amaury Hernández Águila
I have been working on collaborative and interactive software development
for the past year. I can build a particular solution for PicoLisp (I had
been working with Common Lisp and newLISP). The safe execution environment
is achieved by running the code in a Docker container.

I could modify a little my software to have the functionality of a Try
PicoLisp.

If you're interested, I could work on this, but it'll take me a while
because I'm working on finishing my thesis.

I could also release a collaborative and interactive platform for the
development of PicoLisp projects. At first I was  thinking on releasing it
for the Common Lisp community, but I'm always scared of presenting
something to them because they're... not as nice as you guys.
El ago 29, 2014 7:36 AM, andr...@itship.ch escribió:

  Imagine the interactive PicoLisp web tutorials that could be written if
  there would actually be a safe PicoLisp interpreter as proposed -
  thats a nice idea.
 
  Or would it suffice to define the tutorial functions and start a
  server that only allows these functions and nothing else?

 check out http://tryruby.org to see how such a thing is properly done (GUI
 wise). I find it really clever made. Would surely be a huge boost to have
 something similar for our beloved picolisp :)

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



Re: try picolisp

2014-08-29 Thread Amaury Hernández Águila
How do I quote someone? (I'm not that social and I've never participated in
a mailing list before, do I just copy and paste and add the ?)

Christophe Gragnic,

If you use Docker containers, as with my proposed solution, you can do
whatever you want with the container (a mini virtual machine) and if
everything gets destroyed for example, you can just build a new container
in less than a second. The containers are isolated from the host machine,
so everything is safe.

El ago 29, 2014 9:32 AM, Christophe Gragnic christophegrag...@gmail.com
escribió:

 On Fri, Aug 29, 2014 at 10:40 AM, Alexander Burger a...@software-lab.de
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 here is not access to the REPL, but (quote from the Tcl ref):
 «safe to execute an arbitrary script from your worst enemy without
 fear of that script damaging the enclosing application or the rest of
 your computing environment.»

  Then, the most glaring security risks are the 'call' and 'pipe'
  functions, and the pipe functionalities of 'in', 'out' and 'load'. They
  allow a REPL user to directly access the interlying system. If these
  were disabled (can probably done on the Lisp level in the 'repl'

 How would you disable them? Would this be ok?
 (de annihilate @ (mapcar '((sym) (set sym NIL)) (rest)))
 Then call it this way (I think that I understand now why low level
functions
 should evaluate their args):
 (annihilate 'call 'pipe ...)

  function itself), attackers cannot call external commands or processes
  any more (can they?).

 This is the delicate/time consuming part: testing, trying to crack a
 «safe» interp.

  But then an attacker could still read many files. So perhaps disable all
  I/O functions? How far it makes sense to go?

 No idea, but the Tcl guys may have think about this a lot. From the ref:

 «««
 The following commands are hidden by interp create when it creates a
 safe interpreter:
 cd encoding exec exit
 fconfigure file glob load
 open pwd socket source
 These commands can be recreated later as Tcl procedures or aliases, or
 re-exposed by interp expose.
 The following commands from Tcl's library of support procedures are
 not present in a safe interpreter:
 auto_exec_ok auto_import auto_load
 auto_load_index auto_qualify unknown
 »»»

 I also thought about resources. For showcase purposes, a computation
 running more than 5 seconds should be killed. What do you think?

 I'm also asking the question in the context of Emulisp. If ever there
 is a platform like
 http://jsbin.com/ supporting PicoLisp, what «in browser» operations will
be
 safe to allow?


 chri

 --

 http://profgra.org/lycee/ (site pro)
 http://delicious.com/profgraorg (liens, favoris)
 https://twitter.com/profgraorg
 http://microalg.info
 --
 UNSUBSCRIBE: mailto:picolisp@software-lab.de?subjectUnsubscribe


Re: try picolisp

2014-08-29 Thread Christophe Gragnic
On Fri, Aug 29, 2014 at 6:45 PM, Amaury Hernández Águila
amhe...@gmail.com wrote:
 How do I quote someone? (I'm not that social and I've never participated in
 a mailing list before, do I just copy and paste and add the ?)

It's just what email clients do (including gmail, be it online, 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 email!

 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
- triggering VMs or jails
- to run code
- that will output results to the user
frightens me as hell.


chri

---

http://profgra.org/lycee/ (site pro)
http://delicious.com/profgraorg (liens, favoris)
https://twitter.com/profgraorg
http://microalg.info
--
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: try picolisp

2014-08-29 Thread Amaury Hernández Águila
Alright, let me try:

 It's just what email clients do (including gmail, be it online, 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 email!

I don't use emails that much :( but yeah, I'm ashamed for not knowing about
it.

  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
 - triggering VMs or jails
 - to run code
 - that will output results to the user
 frightens me as hell.

Well, then you teach me about quoting an email and I take care about the
system :D


Re: try picolisp

2014-08-29 Thread Tomas Hlavaty
Hi Amaury,

 Amaury Hernández Águila amhe...@gmail.com writes:
 [...]
 The safe
 execution environment is achieved by running the code in a Docker
 container.

what do you mean by safe?  It's certainly not secure.

Using VM like Alex suggests is better.

Cheers,

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


Re: try picolisp

2014-08-29 Thread Tomas Hlavaty
Hi Christophe

 Christophe Gragnic christophegrag...@gmail.com writes:
 The idea here is not access to the REPL, but (quote from the Tcl ref):
 «safe to execute an arbitrary script from your worst enemy without
 fear of that script damaging the enclosing application or the rest of
 your computing environment.»

that is impossible, and even contradictory!  You can't allow arbitrary
functionality and disallow some functionality at the same time.

Cheers,

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


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 executed, but doesn't always work ;)

-- 

http://profgra.org/lycee/ (site pro)
http://delicious.com/profgraorg (liens, favoris)
https://twitter.com/profgraorg
http://microalg.info
-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: try picolisp

2014-08-29 Thread Amaury Hernández Águila

  The safe
  execution environment is achieved by running the code in a Docker
  container.

 what do you mean by safe?  It's certainly not secure.


Okay, there's a Host machine that is running all the Docker containers
(also called Jails). When a user starts a session, a Container gets
created. This user will send all his PicoLisp code through the website to a
Container that is running a PicoLisp server. The PicoLisp server executes
the code, and the result is returned to the user.

If the user ever tries (delete-all-files) or whatever, that Container will
get affected, but not the host machine. If the user wants to continue with
his session, the Host can create another Container. A professor I know was
working on a system that automatically creates and destroys the containers
as needed. For this approach, we could have several PicoLisp servers (5,
for example) running inside a single Container. If someone runs malicious
code inside of the container, the container gets automatically destroyed
and re-created. The bad thing about this solution is that the other users
would lose their sessions.

Something that could get implemented is to save all the PicoLisp sessions
(their source code) in a Redis database, and that way the users wouldn't
lose their sessions.

It looks too complicated, but most of this has already be done in my
University. It was tested with Python, though.

Also, the system resources required for a container are minimal. Around 5
Mb of RAM per container. We could have 20 containers running 5 PicoLisp
servers, for a total of 100 users running Try PicoLisp simultaneously.

Anyway, the advantage of this approach is users would have 100% the
functionality of PicoLisp, not a watered down version, or a restricted
version.



 Using VM like Alex suggests is better.


A Container is basically a VM, but cheaper. The downsides negligible, like
the limitation of running only a single Linux kernel for all the
containers, or not being able to run other operating systems (if the host
machine is a Linux with a kernel version X.X.X, all the containers will be
Linux X.X.X).


 Cheers,

 Tomas
 --
 UNSUBSCRIBE: mailto:picolisp@software-lab.de?subjectUnsubscribe



try picolisp

2014-08-28 Thread Mike Pechkin
hi,

Is it hard to implement minimalist version of minipicolisp in browser ?
Like http://tryclj.com/ ?

Mike


Re: try picolisp

2014-08-28 Thread Jakob Eriksson
Maybe not with Emscripten. 

On August 28, 2014 7:41:12 PM CEST, Mike Pechkin mike.pech...@gmail.com wrote:
hi,

Is it hard to implement minimalist version of minipicolisp in browser ?
Like http://tryclj.com/ ?

Mike

-- 
Skickat från min Android-telefon med K-9 E-post. Ursäkta min fåordighet.

Re: try picolisp

2014-08-28 Thread Michel Pelletier
The 64 bit version of picolisp can be ported to any machine.  There
is an existing emulator that generates C code, another emulator that
generated Javascript would be cool!

-Michel

On Thu, Aug 28, 2014 at 10:41 AM, Mike Pechkin mike.pech...@gmail.com wrote:
 hi,

 Is it hard to implement minimalist version of minipicolisp in browser ?
 Like http://tryclj.com/ ?

 Mike

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


Re: try picolisp

2014-08-28 Thread Joe Bogner
Hi Mike,

I would also be interested in minipicolisp running under Emscripten.
In the meantime, have you seen Jon Kleiser's EmuLisp:
http://folk.uio.no/jkleiser/pico/emuLisp/console.html ?



On Thu, Aug 28, 2014 at 1:41 PM, Mike Pechkin mike.pech...@gmail.com wrote:
 hi,

 Is it hard to implement minimalist version of minipicolisp in browser ?
 Like http://tryclj.com/ ?

 Mike

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


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 website.
Jon wrote it as a pet project to understand the internals of PicoLisp better.
It is of course much closer to ersatz or minipico than the real picolisp,
and still far from complete but very usable.
At least, I use it! I use it in a real project (an embedded language,
with pedagogical purposes only).
Jon is very reactive and try his best to answer/implement my suggestions.

Home page:
http://folk.uio.no/jkleiser/pico/emuLisp/
Console:
http://folk.uio.no/jkleiser/pico/emuLisp/console.html
Semi-official and semi-main repo:
https://github.com/grahack/emulisp
A hint about the saneness of the implementation (how 'quote is implemented):
https://github.com/Grahack/EmuLisp/blob/master/emulisp_core.js#L931
The home page of my language (French only):
http://microalg.info/

 On August 28, 2014 7:41:12 PM CEST, Mike Pechkin mike.pech...@gmail.com
 wrote:

 Maybe not with Emscripten.

I once tried to compile minipico with emscripten. Discussed somewhere here:
http://comments.gmane.org/gmane.lisp.picolisp.general/4392

On Thu, Aug 28, 2014 at 7:52 PM, Michel Pelletier
pelletier.mic...@gmail.com wrote:
 The 64 bit version of picolisp can be ported to any machine.  There
 is an existing emulator that generates C code, another emulator that
 generated Javascript would be cool!

I once thought about http://asmjs.org/ but as I understand this project,
it is not what we could call a JS implementation of an asm.
Deceit.


chri

-- 

http://profgra.org/lycee/ (site pro)
http://delicious.com/profgraorg (liens, favoris)
https://twitter.com/profgraorg
http://microalg.info
-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: try picolisp

2014-08-28 Thread Jon Kleiser
Hi,

The Home page and Console of my EmuLisp that Christophe mentions, relates 
to the first version of EmuLisp, which may now be regarded as obsolete. Thanks 
to suggestions from Christophe, I have re-structured the code, corrected some 
errors, and implemented a few new functions (more coming). Christophe’s github 
repo has what I now call EmuLisp v.2. Instead of going with my old console 
design, I have now, at least for my own use, based my new console on 
jq-console. You can find it here:

https://dl.dropboxusercontent.com/u/48186945/web/pico/emulisp-console2.html

One feature I plan to port from my old v.1 console is the canvas that lets you 
monitor arbitrary Lisp expressions graphically.

/Jon

On 28. aug. 2014, at 20:22, Christophe Gragnic christophegrag...@gmail.com 
wrote:

 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 website.
 Jon wrote it as a pet project to understand the internals of PicoLisp better.
 It is of course much closer to ersatz or minipico than the real picolisp,
 and still far from complete but very usable.
 At least, I use it! I use it in a real project (an embedded language,
 with pedagogical purposes only).
 Jon is very reactive and try his best to answer/implement my suggestions.
 
 Home page:
 http://folk.uio.no/jkleiser/pico/emuLisp/
 Console:
 http://folk.uio.no/jkleiser/pico/emuLisp/console.html
 Semi-official and semi-main repo:
 https://github.com/grahack/emulisp
 A hint about the saneness of the implementation (how 'quote is implemented):
 https://github.com/Grahack/EmuLisp/blob/master/emulisp_core.js#L931
 The home page of my language (French only):
 http://microalg.info/
 
 On August 28, 2014 7:41:12 PM CEST, Mike Pechkin mike.pech...@gmail.com
 wrote:
 
 Maybe not with Emscripten.
 
 I once tried to compile minipico with emscripten. Discussed somewhere here:
 http://comments.gmane.org/gmane.lisp.picolisp.general/4392
 
 On Thu, Aug 28, 2014 at 7:52 PM, Michel Pelletier
 pelletier.mic...@gmail.com wrote:
 The 64 bit version of picolisp can be ported to any machine.  There
 is an existing emulator that generates C code, another emulator that
 generated Javascript would be cool!
 
 I once thought about http://asmjs.org/ but as I understand this project,
 it is not what we could call a JS implementation of an asm.
 Deceit.
 
 
 chri
 
 -- 
 
 http://profgra.org/lycee/ (site pro)
 http://delicious.com/profgraorg (liens, favoris)
 https://twitter.com/profgraorg
 http://microalg.info

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


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).

Some say OOP will come before Christmas.

 Christophe’s github repo has what I now call EmuLisp v.2.

Also, this repo is watched by Travis:
https://travis-ci.org/Grahack/EmuLisp

BTW Jon, I had to remove use strict; for now because of NodeJS.
I have to investigate why the strict mode makes the EMULISP object
not available to the JS script that launches the tests.


chri

-- 

http://profgra.org/lycee/ (site pro)
http://delicious.com/profgraorg (liens, favoris)
https://twitter.com/profgraorg
http://microalg.info
--
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: try picolisp

2014-08-28 Thread H. Hirzel
On 8/28/14, Christophe Gragnic christophegrag...@gmail.com wrote:
 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).

 Some say OOP will come before Christmas.

 Christophe’s github repo has what I now call EmuLisp v.2.

URL for EmuLisp v.2. repo?

 Also, this repo is watched by Travis:
 https://travis-ci.org/Grahack/EmuLisp

 BTW Jon, I had to remove use strict; for now because of NodeJS.
 I have to investigate why the strict mode makes the EMULISP object
 not available to the JS script that launches the tests.


 chri

 --

 http://profgra.org/lycee/ (site pro)
 http://delicious.com/profgraorg (liens, favoris)
 https://twitter.com/profgraorg
 http://microalg.info
 --
 UNSUBSCRIBE: mailto:picolisp@software-lab.de?subjectUnsubscribe

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