Blukunfando has joined #picolisp
Blukunfando has quit [Ping timeout: 246 seconds]
aw- has quit [Quit: Leaving.]
razzy has joined #picolisp
orivej has joined #picolisp
aw- has joined #picolisp
orivej has quit [Ping timeout: 272 seconds]
rob_w has joined #picolisp
razzy has quit [Quit: Connection closed]
beneroth has quit [Ping timeout: 264 seconds]
beneroth has joined #picolisp
razzy has joined #picolisp
orivej has joined #picolisp
mmmattyx has joined #picolisp
aw- has quit [Quit: Leaving.]
razzy has quit [Ping timeout: 264 seconds]
rob_w has quit [Read error: Connection reset by peer]
Seteeri has joined #picolisp
<
Seteeri>
So I made a str sym: "(mkStr $Kern)" which returns a valid sym, and I'm trying to parse it using the (_)str fn but can't figure it out
<
Regenaxer>
Hi Seteeri
<
Regenaxer>
So mkStr() returns a transient symbol, right?
<
Regenaxer>
What kind of parsing?
<
Seteeri>
I'm trying to turn it into lisp data
<
Seteeri>
I was looking at the parse fn also
<
Regenaxer>
Like this? (str "a (1 2) b") -> (a (1 2) b)
<
Seteeri>
for simplicity, it contains "T" right now
<
Regenaxer>
'sym' always makes a list
<
Regenaxer>
if you just want a symbol, 'intern' is perhaps better
<
Regenaxer>
(intern "T")
<
Seteeri>
the string is meant to contain the "kernel" code
<
Seteeri>
my plan is to store it as a global sym so it's always accessible
<
Regenaxer>
in a very long string
<
Seteeri>
mmm I guess 'any is what I'm looking for
<
Regenaxer>
Better perhaps as 'plio' code
<
Regenaxer>
a little more compact
<
Seteeri>
yes thats the other method
<
Seteeri>
store it directly as lisp data
<
Regenaxer>
thats even better
<
Regenaxer>
but takes more space
<
Regenaxer>
I suspect 'plio' is the best
<
Regenaxer>
the new 'plio' function can directly read from a buffer (pointer)
<
Seteeri>
essentially compile it in
<
Regenaxer>
At compile time (out "file.
<
Regenaxer>
At compile time (out "file.plio" (pr *Kernel))
<
Regenaxer>
if *Kernel holds a large expression (list)
<
Regenaxer>
then (eval (plio *Kern)) can execute it later
<
Regenaxer>
"file.plio" can be converted byte definitions in the source
<
Seteeri>
then just include the binary data
<
Regenaxer>
somehow
<
Seteeri>
I did that last time
<
Seteeri>
I used the incbin directive
<
Regenaxer>
in the pil64 version?
<
Seteeri>
except I fed it line by line into the repl
<
Seteeri>
that wasn't ideal ofc
<
Seteeri>
maybe useful for very debose debugging
<
Seteeri>
the only downside I suppose is the reader macros are converted
<
Regenaxer>
right. In plio too
<
Seteeri>
but if manipulating lisp data as data, it's a different thought process
<
Regenaxer>
or, to be correct, plio has no read macros
<
Seteeri>
its a new function ya?
<
Regenaxer>
'plio'? yes
<
Seteeri>
I know there was that small c library before
<
Regenaxer>
Maybe still useful
<
Regenaxer>
for other programs to generate plio
<
Regenaxer>
there is alse lib/plio.js, but only one direction
<
Regenaxer>
only reading
<
Regenaxer>
needed in browser to get data from pil server
<
Seteeri>
also plio is the db format?
<
Regenaxer>
exactly
<
Seteeri>
when I attempt to do (let (X (mkStr $Kern)) (_any X)) where Kern="T", it segfaults
<
Seteeri>
in the fn any, Exe is the argument list?
<
Regenaxer>
The Lisp level functions like _any cannot be called in pilsrc, because they try to evaluate the args
<
Regenaxer>
Thus it calls (T) as a function :)
<
Seteeri>
so I'd need to call parse directly
<
Regenaxer>
yes, on the name of the transient symbol
<
Regenaxer>
What if you (read) the data?
<
Regenaxer>
i.e. keep them in the file
<
Regenaxer>
then (eval (read))
<
Regenaxer>
or, if plio, (eval (rd))
<
Seteeri>
I'm planning to do the plio as you mentioned; I was just experimenting with pilsrc
<
Regenaxer>
Advantage is that the kernel does not occupy memory at runtime just to be executed once
<
Regenaxer>
ok, yeah
<
Seteeri>
right now, it's mostly for pedantic purposes :)
<
Regenaxer>
good :)
<
Seteeri>
if someone wanted to modify/reboot the kernel while it is running
<
Seteeri>
i would have main just loop eval the kernel code
<
Seteeri>
if they do (bye), it'll re-eval
<
Regenaxer>
I see, restart
<
Seteeri>
a hard restart or powerdown, I still need to code the asm fns
<
Seteeri>
later on, i can add an option for kernel boot - if the user wanted to keep the kern code/data in ram
<
Seteeri>
i can also try rd later (to rd from a ptr)
<
Regenaxer>
'rd' needs a file, 'plio' reads from a byte buffer
<
Seteeri>
the raspberry pi bootloader loads all of it into ram...altho it might have an interface to rd from the memory card
<
Seteeri>
but i understand what you mean
Seteeri has quit [Remote host closed the connection]
Blukunfando has joined #picolisp
Regenaxer has quit [Ping timeout: 240 seconds]
aw- has joined #picolisp
orivej has quit [Ping timeout: 246 seconds]