<Regenaxer>
The speed should not matter, but the sequence of calls
<cess11>
Right, switching between a 'do and just 'foo seems to cause segfault, just repeating either seems OK.
<Regenaxer>
T
<Regenaxer>
So the situation on the stack differs. Looks like an alignment problem
<Regenaxer>
I will have to look with gdb - not now
<Regenaxer>
asap :)
alexshendi has joined #picolisp
<alexshendi>
Hi, I have a question: Is it true that a picolisp function is either: a number or an s-expression?
<Regenaxer>
A number or a list of the form (sym ...) or ((sym sym ...) ...)
<alexshendi>
Regenaxer: Thanks! I am trying to write a structure editor and am wondering if I should use picolisp since I can get a function's source code in picolisp.
<cess11>
It's great for such things.
<Regenaxer>
Cool! What will this structure editor be used for?
<alexshendi>
What should I use for the UI? Tcl/Tk?
<Regenaxer>
Or ncurses?
<alexshendi>
Regenaxer: editing sexprs as well as functions?
<Regenaxer>
PicoLisp uses vi[mp] or emacs directly to edit structures
<Regenaxer>
yeah
<Regenaxer>
In pil you can do (edit 'foo)
<Regenaxer>
it modifies structures (values and properties)
<alexshendi>
Yes I know, but I want to use a different UI, similar to Interlisp SEDIT.
<cess11>
Or just '(cadr foo) to see the function body.
<Regenaxer>
hmm, rather just 'foo'
<Regenaxer>
(pp 'foo) is best
<cess11>
Right, I forget that you can do that with symbols alone.
pierpal has quit [Quit: Poof]
<cess11>
Rather suppress it due to keeping too long lists in them to be convenient.
pierpal has joined #picolisp
<mikeyhc>
hi all, whats the recommended way to get a string as an output argument when using native?
<mikeyhc>
sorry was not clear, I mean I have something like void fun(char*) where char* is used for output
<cess11>
alexshendi: Probably ncurses unless you want to glue on some JS and use the web stuff that comes with the VM.
<Regenaxer>
You must pass a malloc()ed area then
<mikeyhc>
Regenaxer: awesome, thanks!
<Regenaxer>
There are examples in doc/native.html
<cess11>
Personally I use vim plugins for similar functionality.
<Regenaxer>
alexshendi, I did now view the video fully, but I think I got the idea
<Regenaxer>
Isn't (edit 'foo) just doing the same?
<Regenaxer>
If you want an example how to use ncurses in pil, look at @lib/vip.l
<alexshendi>
Regenaxer: dosen't that just edit a textual representation of Foo in vip?
<Regenaxer>
It is a VI clone
<Regenaxer>
Edits files, but in the repl also s-expressions
<Regenaxer>
ah, sorry, no s-expressions
<alexshendi>
I must have a look then....
<Regenaxer>
For s-expressions the 'edit' function still uses Vim
<alexshendi>
I will look at vip anyways...
<Regenaxer>
ok
<Regenaxer>
Just ask for details
<Regenaxer>
Vip is my standard editor
<Regenaxer>
Only for files with non-utf8 charsets (eg e-mails) I fall back to Vim
<cess11>
For auto completion and autoindent you might want to skim through some vim or emacs plugins for inspiration. If you hook up reloading in the VM to such events it will probably be fairly similar to the Interlisp video.
<Regenaxer>
Vip does completion with TAB for symbols and files
<Regenaxer>
and autoindent with Comma
<Regenaxer>
Completion works for the current symbols in the heap
<cess11>
Alphabetical order, no?
<Regenaxer>
Just how they are found with (all)
<Regenaxer>
not necessarily alphabetic I think
<Regenaxer>
I don't remember :)
<cess11>
I think you're right, it's not alphabetic.
<Regenaxer>
yeah, cause it is 2 trees internally
<Regenaxer>
may be intermixed
<cess11>
Might be good as is, so it's almost done already then.
<cess11>
Lunch over, back to work.
<Regenaxer>
"done" in which sense?
<cess11>
An interface like the one in the video.
<Regenaxer>
yes
<alexshendi>
Vip is now included in the pil distro?
<Regenaxer>
yes
<Regenaxer>
In @lib/vip and @bin/vip
<alexshendi>
Regenaxer: Thanks!
<Regenaxer>
Welcome! :)
pierpal has quit [Quit: Poof]
pierpal has joined #picolisp
alexshendi has quit [Ping timeout: 276 seconds]
orivej has joined #picolisp
rob_w has quit [Quit: Leaving]
orivej has quit [Ping timeout: 265 seconds]
alexshendi has joined #picolisp
alexshendi has quit [Quit: Yaaic - Yet another Android IRC client - http://www.yaaic.org]