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
orivej has quit [Ping timeout: 248 seconds]
freemint_ has quit [Ping timeout: 260 seconds]
zod_ has joined #picolisp
zod_ has quit [Read error: Connection reset by peer]
aw- has joined #picolisp
zod_ has joined #picolisp
alexshendi has joined #picolisp
zod_ has quit [Read error: Connection reset by peer]
<m_mans> Hi all!
<aw-> hi m_mans
<m_mans> Does anybody have solution for interaction with Telegram from PicoLisp?
<m_mans> Just to know
<aw-> no, but i think there's a c library for that
<aw-> you can probably use FFI with it
<m_mans> yeah, I hope so
<m_mans> there was some function to access transient symbol in function defined in another scope
<Regenaxer> Hi m_mans! I think 'loc'
<m_mans> yeah, T
<Regenaxer> Or pkgg~sym if you use namespaces
<m_mans> I've just found it in my local wiki too
<Regenaxer> :)
<m_mans> thanks!
<aw-> Regenaxer: hi
<aw-> Regenaxer: can you change some things in PilBox?
<aw-> i want to request a few small changes
<aw-> 1. always display "PicoLisp REPL" and "Settings" under the buttons
<aw-> 2. once the REPL is loaded, auto-focus keyboard to the input box
<Regenaxer> Hi aw-
<Regenaxer> You can do that yourself :)
<Regenaxer> The focus *is* on the bottom text field
<aw-> yes probably haha
<Regenaxer> just modify App.l, put it into a ZIP
<Regenaxer> The 'repl' function is from @lib/form.l btw
<Regenaxer> I just released a new version, 11
<Regenaxer> Improved error handling
<Regenaxer> Shows now a page with the Lisp error
<cess11> m_mans: Possibly Telegram can be put in place of SMS-application in Android and used as such a client through the Termux-API. Not tried it but might try something like that with Signal sometime when I have a few hours to spare.
<cess11> Also, hi!
<Regenaxer> Hi cess11
<m_mans> Hi cess11
<m_mans> I meant interaction in server, not in Android
<Regenaxer> aw-, I just remember. You are right
<Regenaxer> Though the 'repl' function does set the focus, it is disabled on touch devices
<Regenaxer> in general
<Regenaxer> Because it turned out very annoying if the keyboard pops up on every GUI page
<Regenaxer> (for Penti, and even worse for normal virtual keyboards)
<Regenaxer> It is disabled in function idFocus(fld) in @lib/form.js
<tankfeeder> hi all
rob_w has joined #picolisp
rob_w has quit [Changing host]
rob_w has joined #picolisp
<tankfeeder> im interested in telegram integration
<tankfeeder> i would digg
<tankfeeder> in
<m_mans> would be nice
<aw-> Regenaxer: ok thanks!
<beneroth> hi all
<Regenaxer> Hi beneroth
<beneroth> m_mans, Telegram has an API for bots, so you surely could write a bot. I assume a REST api...
<beneroth> Good morning Regenaxer :)
orivej has joined #picolisp
roundsf` has joined #picolisp
roundsf has quit [Ping timeout: 252 seconds]
<m_mans> hi beneroth
<beneroth> hey m_mans :)
rudha has joined #picolisp
rgrau has joined #picolisp
<tankfeeder> so up and running telegram bot on picolisp depends on webhooks up and running
<tankfeeder> if i can setup webhook for bitbucket then i can do it for telegram
aw- has quit [Quit: Leaving.]
<beneroth> tankfeeder, cool :)
rudha has quit [Quit: Leaving]
<tankfeeder> beneroth: do you how to do it?
<beneroth> I have not implemented bitbucket API nor telegram API (https://core.telegram.org/api)
<beneroth> Webhooks send an request (probably JSON) to the URL you specified in bitbucket.
<tankfeeder> does examples exists how to handle incoming post requests?
<beneroth> the request arguments and their meaning is described on the first link you gave
<beneroth> Webhook: bitbucket sends request to your webserver
<beneroth> you can always first just make a picolisp webserver which writes all input it receives to a logfile, and put a webhook to it into bitbucket.
<tankfeeder> im asking only about picolisp web server
<tankfeeder> never tried
<beneroth> ah
<tankfeeder> any example?
<beneroth> depends on the webserver. for the standard one, see @lib/http.l: https://software-lab.de/doc/app.html, https://software-lab.de/doc/form/form.html
<tankfeeder> any wiki pages?
<beneroth> I found cyborgars / Jose Romeros imlementation easy to start with: https://bitbucket.org/iromero91/web.l/wiki/Home
<beneroth> but that is a different webserver implementation than the standard one
<tankfeeder> ok
<tankfeeder> thanks
<beneroth> you are welcome :)
<beneroth> for a general introduction into HTTP I recommend: http://www.jmarshall.com/easy/http/
alexshendi has quit [Ping timeout: 248 seconds]
alexshendi has joined #picolisp
rob_w has quit [Quit: Leaving]
chuckJ has quit [Ping timeout: 252 seconds]
rob_w has joined #picolisp
<beneroth> Regenaxer, how to detect closing of a tcp socket?
<Regenaxer> (rd) etc. return NIL
<beneroth> is there any way beside a failing write/read attempt on lisp level?
<beneroth> or even a hook?
<Regenaxer> I would not call it "failed"
<Regenaxer> If NIL may be in the data, yoou can use (== "EOF" (rd "EOF"))
<beneroth> lets say I have a open read & write tcp connection and I want to detect when the TCP connection gets closed by the other computer
<Regenaxer> yep
<Regenaxer> normally NIL
<Regenaxer> 'task' wakes up
<Regenaxer> See e.g. app/main.l
<Regenaxer> (task (port @) # Set up query server in the background
<Regenaxer> (let? Sock (accept @)
<Regenaxer> (unless (fork) # Child process
<Regenaxer> (in Sock
<Regenaxer> (while (rd)
<Regenaxer> (sync)
<beneroth> ah, ok. so put the socket into a 'task', and when it wakes up but reading failes, then the underlying tcp connection was actively closed by the other peer, like this?
<Regenaxer> (tell)
<Regenaxer> (out Sock
<Regenaxer> (pr (eval @)) ) ) )
<Regenaxer> (bye) )
<Regenaxer> (close Sock) ) )
<Regenaxer> yes, though this is not a "fail", but a clean EOF
<beneroth> T
<Regenaxer> as on files too
<beneroth> no wake up on "fail", I assume then? (the other party closed/crashed/got stuck, but didn't send the tcp close signal) ?
<beneroth> afaik this cannot be passively detected
<Regenaxer> Yes
<Regenaxer> TCP cannot fail in this sense
<beneroth> ok thanks
<beneroth> well it can :)
<Regenaxer> I think it can hang a very long time
<beneroth> yep
<Regenaxer> up to a day or so
<beneroth> yep. stale connection.
<Regenaxer> T
<Regenaxer> I have this sometimes when my router hangs
<beneroth> my use case is weird SMTP timeouts to a third party server. I think about putting a proxy between my smtp server and the weird third-party one. probably better to just put a standard TCP dumper in between, but maybe writting a little SMTP proxy with pil would also be an option
<beneroth> the cause is most likely the SMTP software on the third party server
<Regenaxer> I see
rgrau has quit [Ping timeout: 260 seconds]
orivej has quit [Ping timeout: 258 seconds]
abel-normand has joined #picolisp
orivej has joined #picolisp
abel-normand has left #picolisp ["ERC (IRC client for Emacs 25.3.1)"]
rob_w has quit [Quit: Leaving]
orivej has quit [Ping timeout: 248 seconds]
orivej has joined #picolisp
miskatonic has joined #picolisp
alexshendi has quit [Read error: Connection reset by peer]
alexshendi has joined #picolisp
miskatonic has quit [Remote host closed the connection]