beneroth changed the topic of #picolisp to: PicoLisp language | The scalpel of software development | Channel Log: https://libera.irclog.whitequark.org/picolisp | Check www.picolisp.com for more information
beneroth_ has quit [Quit: Leaving]
beneroth has joined #picolisp
avocadoist has quit [Ping timeout: 255 seconds]
seninha has quit [Remote host closed the connection]
isaneran has joined #picolisp
avocadoist has joined #picolisp
rob_w has joined #picolisp
isaneran has quit [Ping timeout: 256 seconds]
pablo_escoberg has joined #picolisp
pablo_escoberg has quit [Quit: Client closed]
aw- has quit [Ping timeout: 264 seconds]
isaneran has joined #picolisp
rob_w has quit [Quit: Leaving]
seninha has joined #picolisp
isaneran has quit [Ping timeout: 276 seconds]
pablo_escoberg has joined #picolisp
<pablo_escoberg> GM abu[7] et el.  I am thinking of undertaking a subproject and I'd like your input.  The idea is to implement the core of piolisp, the stuff written in C, in javascript (minus native, in/out etc) and exposing the DOM as a pil class.  I suppose the feasibility of the project hinges on the extent to which picolisp is written in picolisp vs. C,
<pablo_escoberg> and also on the extent to which i/o functions are critical to the functioning of the rest of the system.
<pablo_escoberg> I'm working on the frontend of my project and realizing how much easier it would be if I had a pilbox-like tool for the browser.
<abu[7]> !'m back a little later
<pablo_escoberg> No rush :)
<abu[7]> There was a JavaScript version by Jon Kleiser
<abu[7]> I don't know if this is still findable
<abu[7]> Then there is ErsatzLisp, a Java version
<abu[7]> And Pil32 was in C, and Pil64 in asm
<abu[7]> So lots of implementations to look at :)
<abu[7]> And of course the current version, pil21, is written in Pil itself
<abu[7]> So it is perhaps the closest of what you intend
<pablo_escoberg> Well, I guess most of pil21 is written in Pil itself.  There has to be some C component, right?
<pablo_escoberg> The basic cell, for example, must be implemented in C, no?
<pablo_escoberg> My thinking was to implement the cons cell as a JS object.
<abu[7]> Right, only the absolutely system-dependent parts
<abu[7]> single file @src/lib.c
<abu[7]> ErsatzLisp used a Java object as cons cell
<pablo_escoberg> ok, pretty sure that's all I will need to implement.  Once I have the equivalent in JS, based on a JS cons cell object, I should just be able to use the rest unmodified.
<pablo_escoberg> ok, so I am probably on the right track.
<abu[7]> You need to modify a lot
<abu[7]> or omit most
<abu[7]> as it is POSIX stuff
<pablo_escoberg> The idea is to omit all the posix stuff and use it as a javascript replacement.
<abu[7]> Ersatz omitted all interestigg things
<abu[7]> yes
<pablo_escoberg> how does pilbox integrate?
<abu[7]> Perhaps start with miniPicoLisp
<abu[7]> it omits all POSIX parts
<abu[7]> only stdio
<pablo_escoberg> ah! perfect, probably...
<abu[7]> PilBox uses the Dalvik machine as a database
<abu[7]> a Java object is an external object, very simple
<pablo_escoberg> Ah, ok.
<abu[7]> See @lib/android.l
<abu[7]> that's all
<abu[7]> and Reflector.java
<pablo_escoberg> So looks like I really need to look at minipicolisp and ersatzlisp and see if I can cobble something together.  I think it will be quite useful. Entire project, including frontend, in picolisp.
<abu[7]> Great!
<abu[7]> Perhaps there is simply a JS backend for LLVM?
<beneroth> LLVM might be an idea
<beneroth> there surely is one for webASM? :P
<beneroth> (webasm is the new flash...)
<abu[7]> Yeah
<beneroth> I recommend implementing JS/JS-generating as DSL in picolisp over implementing pil in JS...
<pablo_escoberg> I looked into WASM, but it doesn't give DOM access, which is the whole point of the exercise.
<pablo_escoberg> I'm looking at https://nearley.js.org/ among other things for the parser, but the syntax is simple enough that it may not really add much.
<pablo_escoberg> And yes, js generating DSL is a potential alternative, beneroth.  I'll definitely think about that as an alternative.
_whitelogger_ has joined #picolisp
_whitelogger has quit [Remote host closed the connection]
aw- has joined #picolisp
pablo_escoberg has quit [Quit: Client closed]
pablo_escoberg has joined #picolisp