IRC channel logs

2015-12-01.log

back to list of logs

<paroneayea>not that it's important too much but I still can't decide if the module namespace should be "eightsync" or 8sync
<paroneayea>scheme@(guile-user)> ,m (8sync agenda)
<paroneayea>scheme@(#{8sync}# agenda)>
<paroneayea>is kinda weird
<paroneayea>(%8sync) has solved the "valid portable scheme name" for the "main feature" operator
<paroneayea>so I guess I would be okay if it was eightsync
<paroneayea>ACTION quietly frets a bit more.
<paroneayea>hm okay
<paroneayea>so (select) can tell me if there are exceptions on a file descriptor port
<paroneayea>er, exceptional conditions
<paroneayea>but hwo do I tell what they are?
<paroneayea>I guess I can check port-closed? for one thing
<paroneayea>ohhhh
<paroneayea>except *isnt'* for errors
<paroneayea>read is
<paroneayea> :O
<paroneayea>thanks glibc manual!
<nalaginrut>morning guilers~
<ArneBab>paroneayea: I’d think that eightsync is good — the safer choice (which will surprise less people)
<rekado>paroneayea: personally I don't like %sync because it looks like a (module-)global variable.
<artyom-poptsov>ACTION just implemented SSH config parsing in Guile-SSH.
<artyom-poptsov>Now let's try to use Guile-DBI along with Guile-SSH tunnels to connect to a remote database...
<paroneayea>rekado: I agree a bit, though % is also shorthand for prompts... anyway I'll probably add an (eightsync 8lias) thing for people who want just (8sync) not (%8sync) and are okay with guile-specific symbols
<paroneayea>ArneBab: I think you're right, I'll switch (back, again!) to eightsync
<amz3>eck! python ascynio rely a lot on mutability
<amz3>I am looking for a way to watch a fd without while
<amz3>seems like a callback with a closure that queue a new coroutine when datagram is complete is a possible solution
<davexunit>low-level i/o is inherently imperative
<davexunit>there's going to be a lot of mutation
<davexunit>functional programming is not the right paradigm for this low-level stuff
<amz3>sure
<paroneayea>"All IO operations are equally imperative, though some are more imperative than others"
<paroneayea> -- George Orwell
<paroneayea>in the book Asyncio Farm
<Madsy>davexunit: I was thinking about that the previous day. Whether one could use Scheme to implement kernel modules for a host OS.
<Madsy>Disregarding details like loss of performance
<paroneayea>Madsy: iirc Hurd does allow that sorta
<Madsy>I mean, if you got a kernel bug it doesn't matter much whether it is C code or Scheme code which crashes
<Madsy>But Scheme code might as well have better recovery options (if it matters)
<amz3>I don't think about making scheme kernel modules for some time now...
<amz3>Madsy: you might have a point
<Madsy>Eh.. it's moot anyway. No completely new OS has any chance to take off nowadays, unless you have a lot of resources.
<Madsy>So we're stuck with the stupid C ABIs :-/
<rekado>Madsy: the Hurd can still take off.
<rekado>it uses the NetBSD rumpkernel for drivers in the future, so the driver problem is soon solved.
<rekado>there are lisp bindings for translator stuff, but I don't know if they still work.
<rekado>it should not be too difficult to write Scheme bindings.
<davexunit>the Hurd folks have used tinyscheme for some cool stuff
<davexunit>ludo wants guile to displace it
<rekado>I don't know if translators or servers would count as "kernel modules", but with the Hurd there isn't much in the kernel anyway.
<rekado>most code is in the core servers.
<paroneayea>btw
<paroneayea>is there still time to submit a talk proposal for the Guile room I assume?
<paroneayea>not from me but from another person
<davexunit>yes
<ArneBab>damn, deadline…
<ArneBab>do you have the link at hand right now — I want to submit a wisp talk
<ArneBab> https://penta.fosdem.org/submission/FOSDEM16/
<ArneBab>(found it :))
<ArneBab>can I still change the event title und subtitle
<ArneBab>?
***karswell` is now known as karswell
<paroneayea>davexunit: I just showed evan prodromou 8sync and syncbot
<paroneayea>and he was like whoaaaa
<paroneayea>:D
<amz3>some much parens ;)
<davexunit>paroneayea: oh cool! take that node!
<dsmith-work>Tuesday Greetings, Guilers
<dsmith-work>Whoah. (exp 2 7) nicks?
***guile-guest6 is now known as wiko
***wiko is now known as wilord
<artyom-poptsov>Finally got it working: https://gist.github.com/artyom-poptsov/03b58dab9ee360238942
<artyom-poptsov>An exemplary program that executes specified PostgreSQL queries through an SSH tunnel established right from the scheme code.
<artyom-poptsov>Just about ~15 lines of code and -- voila! -- you have a tunnel running.
<amz3>it sounds like magic
<amz3>ACTION reading
<artyom-poptsov>amz3: It's not magic, it's Lisp.
<amz3>:)
<artyom-poptsov>To me it has some practical value, aside the fact that it's fun to play with.
<davexunit>artyom-poptsov: awesome!
<davexunit>maybe I can use this code to connect to a remote guix daemon
<amz3>artyom-poptsov: what are you using it for, I'm curious
<artyom-poptsov>Now I can query a database that is not accessible directly from my machine.
<amz3>you are behind a firewall?
<artyom-poptsov>We have a DB that is running on a customer's server, and I don't have direct access to it, only through an intermediate host.
<amz3>I'm not sure how ssh tunnel works
<amz3>for instance, in the snippet, there is no destination port?
<amz3>I though that 2 ports were involves, the tunnel port and the destination port
<artyom-poptsov>Yes, you're right. But here I specified only the local port; in this case 'make-tunnel' uses the same destination port as the specified local port.
<amz3>ok
<artyom-poptsov>amz3: The procedure is described in the Info documentation, if you're interested.
<amz3>no I get it, I did know that tunnel could basicly spoof a port
<amz3>I did *not* know
<artyom-poptsov>You don't have to use the same port number as local and destination port.
<artyom-poptsov>s/as/for/
<artyom-poptsov>What I'm going to do now is to write a Scheme program that will query a DB from my machine and handle the responses to solve a practical task.
<amz3>like login on a bank main frame and execute "DROP TABLE;"
<amz3>?
<artyom-poptsov>"DROP TABLE HUMANS; SELECT * FROM GHOSTS;"
<artyom-poptsov> https://xkcd.com/1409/
<artyom-poptsov>Well, not that practical task. A useful one.
<amz3>nice
<amz3>I stumbled upon a line of Python, that I think can't happen in scheme, I think it illustrate the difference in design of Python vs Scheme
<amz3> https://hg.python.org/cpython/file/tip/Lib/asyncio/events.py#l137
<amz3>this happens, because in python you can inspect the bindings associated with traceback frames
<amz3>s/bindings/local context
<artyom-poptsov>amz3: Hmm, an object assignes itself to 'None', am I right?
<amz3>yes, under the wood, it does something like sys._getframe().f_locals['self'] = None, and sys._getframe() is stored with the exception.
<amz3>s/wood/hood
<artyom-poptsov>I'm not very fluent in Python, although I did write some code in it.
<amz3>basicly it's an edge case of the library
<amz3>but scary
<ArneBab>paroneayea: I submitted the wisp talk: https://penta.fosdem.org/submission/FOSDEM16/event/4264
<paroneayea>ArneBab: \\o/
<amz3>I may come to fosdem after all, but not sure I can give a talk
<amz3>what is the shortest talk time?
<artyom-poptsov>amz3: I think the minimum length of a lightning talk is 15 minutes.
<amz3>thx
<ArneBab>I selected 15 minutes