beneroth_ has quit [Read error: Connection reset by peer]
beneroth has joined #picolisp
Iacob has quit [Ping timeout: 268 seconds]
Iacob has joined #picolisp
Iacob has quit [Ping timeout: 245 seconds]
Iacob has joined #picolisp
<fbytez>
What are some likely causes of "EOF Overrun"?
<abu[7]>
Either a missing ")" (or "]"), or a non-closed string
<abu[7]>
The error should show the line number of the offending expression
<abu[7]>
If it is a string, Vip shows it as underlines
<taleon>
I am new to PicoLisp. What is the most effective way of working? I haven't figured that out yet. My "way of working" still feels rather confusing. Start a terminal with `pil +`, then there (vi "foo.l"), then enter some code in the editor, then close with :w and :q, then load with (load "foo.l"), then execute the code and then start again from the beginning with (vi "foo.l"). I suppose it can all be done
<taleon>
more simply and differently, without constantly closing, loading, etc.
<taleon>
However, I haven't found that out yet, hence my question. :-)
<abu[7]>
Closing and starting is not bad, as it usually starts within milliseconds
<abu[7]>
I do both
<abu[7]>
But mostly do (vi 'foo) inside the application
<abu[7]>
or (vi "file.l")
<tankf33der>
i am always inside micro editor.
<tankf33der>
and call pil from it.
<abu[7]>
Vip is better, because it has all knowledge about the running environment
<tankf33der>
T
<abu[7]>
Note that if you start Vip with (vi 'foo), you can suspend it with "qz", drop back into REPL, and resume with (v)
<taleon>
I thought there would be a command directly from vip to switch to the repl and execute the code and vice versa, to simply transfer entries in the repl to the vip code.
<taleon>
Ah thank you. This is exactly what I was looking for.
<abu[7]>
yes, Ctrl-E on an expression
<taleon>
Great :-)
<abu[7]>
"E" for eval
<abu[7]>
or ":l<enter>" to (re)load the whole file
<fbytez>
I can't find any string or brace problems. Part of the "strangeness" is that's only occurring during the second accept/fork.
<fbytez>
The data is fine against another working implementation.
<fbytez>
I feel like I'm missing something semantic about how pil forking and handling sockets.
<abu[7]>
I think your code is correct
<abu[7]>
EOF error happens only during 'read' (or 'load)
<fbytez>
When I accept and fork from C, the same program but using stdin/out works.
<abu[7]>
Do you call 'read'?
<fbytez>
`in` and `rd`.
<abu[7]>
'rd' does not throw an EOF error iirc
<abu[7]>
So it must be 'load'
<fbytez>
The error is report at `(in *Peer` but only on a second accept/fork and it's not even the first use during that request.
<fbytez>
Which implies the source file, right?
<abu[7]>
Some garbage *after* the loop?
<abu[7]>
after exited with 'T'
<abu[7]>
You can do (bt) for backtrace at the error prompt
<abu[7]>
and (trace 'load) to see within which load it fails
<fbytez>
Does `(in *Peer ...` block?
<abu[7]>
Yes
<abu[7]>
Not 'in' but 'rd'
<abu[7]>
(trace 'rd)
<taleon>
I'm not sure what I'm doing wrong. When I open a repl (vi 'foo) in pil and suspend with `qz`, I can't get back to vip with `(w)`. Have I made a mistake and misunderstood the documentation?
<fbytez>
The test with w3m isn't sufficient because it terminates early.
<abu[7]>
then curl?
<fbytez>
https://danielfrost.org/share/jbxS/ — you can use these files in a command like: cat headers.txt payload-test.bin payload-seq-100.bin | nc localhost 8888 | hexdump -C
<abu[7]>
No, I don't want to start an involved setup, sorry
<fbytez>
Not a problem. I thought you wanted to see the issue for yourself.
<abu[7]>
Yes, but not with too much effort ;)
<taleon>
Quick question about vip: I use CTRL-E to evaluate the current S-expression after the cursor. Is it possible to evaluate the entire vip buffer, i.e. the whole file? Or is this only possible with a new (load 'foo.l)?
<taleon>
I have another question about vip: keyword "persistent mark". With `:m` you set a mark. What can I do with it? How can I use these marks? I haven't found anything further about it.
<abu[7]>
The mark is stored in a file with that name and thus survives restart of Vip
<abu[7]>
I used it as bookmarks when reading e-books
Iacob has quit [Quit: IRCNow and Forever!]
<taleon>
Oh, that's interesting. Thank you very much. :-)
Iacob has joined #picolisp
<abu[7]>
I exported some e-books with calibre to text and read them in Vip ;)
<abu[7]>
Has some advantages like easier navigation and most of all searching
<abu[7]>
The point is that if you set a mark once, Vip tracks and updates it, so you don't have to set it again when you quit the buffer
<taleon>
The mark file is defined with `:m foo` and saved after exiting vip, right? Only two numbers are stored there. How are these assigned to the file? Or should the mark file be named accordingly? `foo.l` and the mark file `foo.mrk` as an example? If I then open the mark file I can see the two numbers and can jump to this position manually?
<taleon>
The procedure for working with it is not yet entirely clear to me.
<abu[7]>
Yes, saved when exiting. You can take any string, it is a file name
<abu[7]>
If you read Book1.txt, you say :m book1
<abu[7]>
I usually just use :m a
<abu[7]>
as there is only one current book usually
<abu[7]>
The first number is the column, the second the line
<abu[7]>
So there is no hard connection between the file and the mark. Just in your head.
<taleon>
Ok, now it's clearer for me. thanks for the detailed explanation. i can do something with it. now i know where i was last with the cursor and can continue reading at this point using the line number in the mark file. That makes sense.
<taleon>
Sometimes the simple things are the most effective.
<abu[7]>
yeah :)
<abu[7]>
Simple concepts
<taleon>
I also find the bakup function with `:bak` ingenious. I used to do this before with `cp foo.l{,.bak}`.
<taleon>
Little by little I'm realizing how sophisticated vip is and how well you can work with it.
<abu[7]>
Glad to hear this :)
<abu[7]>
The concept of "marks" in Vip are perhaps confusing, because there are also the normal marks as in Vi[m]
<abu[7]>
a-z and A-Z iirc
<abu[7]>
The latter marks are in edit command mode, while :m is in the command window
<abu[7]>
(just for the records here)
<taleon>
I haven't even discovered the normal marks yet. :-) Thank you for pointing this out.
<abu[7]>
I use "e" most often as it is the easiest to type in Penti
<taleon>
How can I imagine that? I can set marks at different places in the current buffer and then jump back and forth between them?
<abu[7]>
Yes, exactly
<taleon>
Or do they work across several buffers?
<abu[7]>
or do any edit operation on it
<taleon>
Ah very great.
<abu[7]>
Go to some place and hit me
<abu[7]>
then from another place d'e
<abu[7]>
this deletes (cuts) up to the place of e
<abu[7]>
or y'e yanks the text etc.
<taleon>
Oh, very interesting. That's really good to know.
<abu[7]>
As always in Vi, you can combine any movements with editing commands
<abu[7]>
d2fx finds the second "x" in the line and delets all up to it
<abu[7]>
This is the feature which makes VI to the most powerful editor
<abu[7]>
Most people don't know it
<abu[7]>
They remember cw to change a word
<abu[7]>
But "w" is a movement command
<taleon>
Yes exactly
<abu[7]>
combiner with "c" for change
<abu[7]>
So you can do c'e to change until mark e
<abu[7]>
or cG to change until the end of the file
<taleon>
Good to know. I already knew about cG but not yet about c'e. Learned something new again. :-)
<abu[7]>
You see all these editing commands with (vi 'vip~move)
<taleon>
mark set for later reading.
<abu[7]>
Perfect :)
<taleon>
I'm offline again for a while. I learned a lot today. Thanks for your excellent support. You have probably already answered these questions 100x. :-)
<abu[7]>
In fact not so much. Most people don't dive so deep into Vip
<aw->
hi abu[7], you should definitely get VLC for android