Re: L-system rules with PicoLisp

2017-03-03 Thread Alexander Burger
On Fri, Mar 03, 2017 at 01:39:25PM +0100, Joh-Tob Schäg wrote: > I haven't figured out how to do it yet, but I think, in this case, a > 'recursive' solution that renders as points are created would use a lot > less resources, assuming that processed replacement rules are garbage > collected as the

Re: L-system rules with PicoLisp

2017-03-03 Thread Alexander Burger
Hi Lindsay, Joh-Tob, On Fri, Mar 03, 2017 at 12:47:12PM +0100, Joh-Tob Schäg wrote: > > Is the garbage collection in picolisp immediate if the resource can be > > released? > > No, picolisp uses a mark and sweep halt the world garage collector. During > sweep phase the complete allocated RAM is

Re: L-system rules with PicoLisp

2017-03-03 Thread Joh-Tob Schäg
Makes sense probably. The greatest compliment i received in months. 2017-03-03 20:04 GMT+01:00 Alexander Burger : > On Fri, Mar 03, 2017 at 01:39:25PM +0100, Joh-Tob Schäg wrote: > > I haven't figured out how to do it yet, but I think, in this case, a > > 'recursive'

Re: L-system rules with PicoLisp

2017-03-03 Thread Lindsay John Lawrence
Hi Alex, Joh-Tob, A 'co may be exactly what I am looking for in this case. Thanks! Generating all the states at once was nice in one sense as I could immediately scale the view when rendering the results. Picolisp easily supported lists of ~2M elements on the 4GB, single-core virtual box I am

Re: L-system rules with PicoLisp

2017-03-03 Thread Lindsay John Lawrence
Thanks Alex, Your explanation was the motivation I needed to attempt the recursive version... /Lindsay > Yes and no. It is correct that the garbage collector does not run at each > release. Instead, it runs when a new cell is needed and the current heap is > found to be full. > > So garbage

Re: L-system rules with PicoLisp

2017-03-03 Thread Alexander Burger
Hi Lindsay, > The code below is the recursive Gosper implementation I came up with that > uses very little stack. This version just emits states. > ... > Picolisp continues to impress me with its expressiveness and power. As ever, I can't resist to suggest some optimizations :) > (de Plot (L)

Re: L-system rules with PicoLisp

2017-03-03 Thread Joh-Tob Schäg
Is the garbage collection in picolisp immediate if the resource can be released? No, picolisp uses a mark and sweep halt the world garage collector. During sweep phase the complete allocated RAM is checked. If that would happen after each release of a resource picolisp would be very slow.

A small SemVer library for PicoLisp

2017-03-03 Thread Alexander Williams
Hi all, I've recently published a small Semantic Versioning library which helps for validating, sorting, and comparing version strings which somewhat adhere to Semver.org (2.0.0). https://github.com/aw/picolisp-semver The code in semver.l actually contains two full implementations

Re: L-system rules with PicoLisp

2017-03-03 Thread Joh-Tob Schäg
​​ The initial iterative replacement solution I came up with (below) quickly runs out of resources as it has to build the entire list before starting to draw. ​What error did you get? How much resources does picolisp use? Do you call ulimit before?​ I think you may have some fundamental

Re: native calling

2017-03-03 Thread David Bloom
Wow, don't know how I missed that one. Thanks AW! More code to learn from. Good luck with lib choice Mike, I'll be watching and learning from that as well. -David On Mar 3, 2017 1:35 AM, "Mike" wrote: On Mar 3, 2017, at 01:24, David Bloom wrote: