On Sat, Jul 15, 2017 at 7:21 AM, Jakob Eriksson <ja...@aurorasystems.eu> wrote:
> Still, PicoLisp source, I mean the program you write in PicoLisp,
> (not the C code) can become quite large depending on your application.
>
> We mitigated this, not by storing the "compiled" structures of pointers
> to pointers. (Although we could have - but that would have been
> complicated to implemented I think, and I am not convinced it would have
> been much smaller than the text source.)
> Instead, we compressed the text files (picolisp source code) and
> unpacked them upon on loading. Source code in general compresses very well.
> In principle, I think you could create something like these Javascript
> "minifiers" before putting it through compression. This hypothetical
> PicoLisp minifier would for instance replace long variable names with
> shorter ones.

This is another approach I that crossed my mind too, though I have
only passing interaction with the JS world.
I am assuming one could implement a load-like function that uses gzip
and decompresses the stream in addition to reading.

Matt
>
>
> https://github.com/mishoo/UglifyJS
>
>
>
>
>
>
>
> On 2017-07-15 12:56, Alexander Burger wrote:
>> Hi Matt,
>>
>>> In order to minimize flash footprint, I was wondering if it would be
>>> possible to compile code down to byte code?  The reason i wanted to do that
>>> is then I could make of some library functions in reader macros off-target
>>> and avoid installing libraries on the target.
>>
>> Can you explain what you mean? Compile *what* to byte code? Not the PicoLisp
>> binary, right?
>>
>> Note that normal PicoLisp doesn't compile anything. It "compiles" to 
>> structures
>> of pointers to pointers, where the compiler is called the "reader" in Lisp.
>>
>> As you talk of libraries, you should look at miniPicoLisp. It "compiles" Lisp
>> source files to C structures, to be able to put them into ROM instead of
>> precious RAM at runtime. However, these are still not byte codes, but the 
>> good
>> old pointers to pointers :)
>>
>> ♪♫ Alex
>>
>
> --
> UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe

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

Reply via email to