ChanServ changed the topic of #picolisp to: PicoLisp language | Channel Log: https://irclog.whitequark.org/picolisp/ | Picolisp latest found at http://www.software-lab.de/down.html | check also http://www.picolisp.com for more information
andyjpb has quit [Ping timeout: 264 seconds]
pierpal has quit [Quit: Poof]
pierpal has joined #picolisp
aw- has quit [Ping timeout: 264 seconds]
aw- has joined #picolisp
orivej has quit [Ping timeout: 240 seconds]
pierpal has quit [Quit: Poof]
pierpal has joined #picolisp
karswell has quit [Read error: Connection reset by peer]
karswell has joined #picolisp
rob_w has joined #picolisp
karswell has quit [Remote host closed the connection]
karswell has joined #picolisp
pierpal has quit [Ping timeout: 260 seconds]
<tankf33der> morning
<tankf33der> data still imports
<Regenaxer> Hi tankf33der
xificurC has joined #picolisp
karswell has quit [Ping timeout: 256 seconds]
alexshendi has quit [Ping timeout: 240 seconds]
<Regenaxer> tankf33der: What does the process do? Is the process size very big?
<tankf33der> started from 2GB, now 4GB
<tankf33der> started every 10k imports per 2 secs
<Regenaxer> 4GB is too big
<Regenaxer> Did you remove the 'read's?
<tankf33der> now 27sec per 10k
<tankf33der> Regenaxer: yes
<Regenaxer> ok
<Regenaxer> It is normal that it gets slower in time, as the index trees grow larger and larger
<Regenaxer> The bottleneck is always the indexes
<Regenaxer> and how much system disk cache can be used
orivej has joined #picolisp
<singa> Hi all!
<singa> is there any possibility to use 'catch with coroutines?
<Regenaxer> Hi singa! Yes.
<singa> as I understand it causes segfault due to stack manipulations rather nonlocal jumps
<Regenaxer> I think I did. You can catch in the main routine a throw from a coroutine iirc
<singa> this code causes segfault
<Regenaxer> Your case is even inside the same co
<Regenaxer> So I think the throw is not the problem
<singa> checked - works fine if catch is 'above coroutine
<singa> thanks!
<Regenaxer> the mapc is strange
<singa> it's just stripped code from project for example
<Regenaxer> Ah, ok, there may be more coroutines then
<Regenaxer> Still strange that it crashes
<cess11> Perhaps ulimit is too small.
<Regenaxer> No, it is only one coroutine
<Regenaxer> it indeed crashes on 'throw'
<Regenaxer> I investigate, forgot the details
pierpal has joined #picolisp
<Regenaxer> singa: "works fine if catch is 'above coroutine" I think this is not the solution
<Regenaxer> I tried variations with catch inside
<Regenaxer> It works sometimes and sometimes not, looks like a heisenbug
<tankf33der> Regenaxer: what is your maximum objects in picodb ?
<Regenaxer> For current applications, on a single machine a little less than a million (plus indexes)
<tankf33der> ok
<Regenaxer> But those were not imported in a single run, but over time
<Regenaxer> For a large import, the indexes are the bottleneck
<Regenaxer> You need to experiment with sizes and prunes etc
<Regenaxer> I did experiments with more objects with OpenStreetMap data
<Regenaxer> There I imported only a single index at a time to get better caching
<tankf33der> i cant experiment, i dont understand sizes and prunes
<tankf33der> picodb is not safe for humans.
<Regenaxer> The point is: A tree is getting very large, so either the process starts swapping, or it keeps too few nodes in memory
<Regenaxer> Why not safe?
<tankf33der> hardest start point.
<Regenaxer> As always in PicoLisp, you need to understand what you are doing ;)
<tankf33der> yea.
<tankf33der> i will safe your code in repo and abort.
<Regenaxer> If you like, I can take a look later
<tankf33der> no. its ok.
<tankf33der> waste of your time.
<tankf33der> i will try something smaller next time.
<Regenaxer> How many objects did you try?
<cess11> Good set for experimentation.
<Regenaxer> yeah
<tankf33der> 9M
<tankf33der> 9.7M
<Regenaxer> It is not so very much
<Regenaxer> The co/catch thing nags me
<Regenaxer> Seems a bug
andyjpb has joined #picolisp
<Regenaxer> For example, this segfaults:
<Regenaxer> (de foo ()
<Regenaxer> (catch "err"
<Regenaxer> (println 'OK)
<Regenaxer> (co "html"
<Regenaxer> (yield)
<Regenaxer> (throw "err") ) ) )
<Regenaxer> (foo)
<Regenaxer> (do 1 (foo))
<Regenaxer> But: If I do (foo) (foo)
<Regenaxer> or (do 2 (foo))
orivej has quit [Ping timeout: 240 seconds]
<Regenaxer> it does *not* crash
<Regenaxer> So it seems really a bug
<tankf33der> let me try
<singa> tried - segfaults
<Regenaxer> (foo) and (do 1 (foo)) seem to run differently
<Regenaxer> Looks like a stack position issue
<singa> as I understand - in place of throwing "err" 'co is going to destroy, instead it jumps stack above
<Regenaxer> No, as the throw is even inside the same co
<Regenaxer> Should not matter
<Regenaxer> "err" is caught, then (catch ) terminates and the coroutine stops
<Regenaxer> But it does not work always it seems
<singa> it crashes after continuation after yield
<Regenaxer> yes, but it seems the catch that crashes
<singa> https://pastebin.com/CM79h0ww - doesn't crashes since no yielding
<cess11> Doesn't crash if I repeat it slowly, segfaulted when I did it faster.
<Regenaxer> thanks cess11 - yes, definitely strange
<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?
<Regenaxer> As a return value you pass 'S
<Regenaxer> (native "@" "fun" 'S)
<Regenaxer> char *fun()
<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]
orivej has joined #picolisp
xificurC has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
grp has joined #picolisp
jibanes has quit [Ping timeout: 265 seconds]
jibanes has joined #picolisp
orivej has quit [Ping timeout: 244 seconds]
mikeyhc has quit [Ping timeout: 240 seconds]
Regenaxer has left #picolisp [#picolisp]
Regenaxer has joined #picolisp
<Regenaxer> I suspect this is the cause of the problem with catch in coroutines:
<Regenaxer> 21feb16
<Regenaxer> Catch frame bug in coroutines (64-bit)
<Regenaxer> {src64,pilos/src}/glob.l
<Regenaxer> {src64,pilos/src}/flow.l
<Regenaxer> (doc/Changlog)
<Regenaxer> This "fix" fixed something perhaps, but also seems to have broken smewhere else
<Regenaxer> I'll check sunday or next week if possible
<tankf33der> diff
freemint has joined #picolisp
freemint has quit [Ping timeout: 240 seconds]
freemint has joined #picolisp
<Regenaxer> Yes, flow.l, but the point is glob.l. The 'Catch' global moved into the 'Env' environment
<Regenaxer> I must study the details, don't remember any more
pierpal has quit [Quit: Poof]
pierpal has joined #picolisp
mtsd has joined #picolisp
mtsd has quit [Client Quit]
pierpal has quit [Read error: Connection reset by peer]
pierpal has joined #picolisp
jzp has joined #picolisp
pierpal has quit [Read error: Connection reset by peer]
f8l has quit [Remote host closed the connection]
f8l has joined #picolisp
andyjpb has quit [Remote host closed the connection]
styx has joined #picolisp
orivej has joined #picolisp
andyjpb has joined #picolisp
grp has quit [Quit: box shutting down...]
stix has joined #picolisp
styx has quit [Ping timeout: 240 seconds]
alexshendi has joined #picolisp
alexshendi has quit [Client Quit]
alexshendi has joined #picolisp
stix has quit [Quit: stix]
alexshendi has quit [Ping timeout: 264 seconds]
pierpal has joined #picolisp
aw- has quit [Ping timeout: 268 seconds]