IRC channel logs

2016-03-26.log

back to list of logs

***dje is now known as dje42
<davexunit>wee, websocket client does proper frame masking and properly validates the opening handshake now.
<cmhobbs>is there anything built into guile (or external modules) that can get system info like uptime or memory/processor usage?
<cmhobbs>i'm using open-import-pipe now
<davexunit>cmhobbs: I don't know if POSIX specifies interfaces for those things
<cmhobbs>ok
<davexunit>Guile doesn't tend to include things that aren't portable
<holomorph>like linux abstract sockets!
<cmhobbs>oddly enough, my old system info script isn't functioning
<cmhobbs>just hangs after compilation
<cmhobbs>oh, wow
<cmhobbs>i'm dumb
<cmhobbs>it's a damn webserver
<cmhobbs>i forgot i added that component
<cmhobbs>anyone have examples for writing text/strings to a file in guile? i'm coming up short in searches and i'm not sure what verbage to look for in the reference manual
<daviid>cmhobbs: look in the manual for format, write, write-char, write-line ...
<davexunit>cmhobbs: display and format are the common ones
<davexunit>(call-with-output-file "foo" (lambda (port) (display "hello!\\n" port)))
<cmhobbs>thanks
<cmhobbs>are there any weather libraries for guile?
<davexunit>none that I know of
***holomorp1 is now known as holomorph
<amz3>héllo guilers!
<amz3>cojy: Can you further explain how the --> works? and how conj and term are related?
<cojy>amz3: sure but in other channel i think
<paroneayea>hello, *
<jmarciano>how do I ping from guile?
<davexunit>jmarciano: write code that speaks the the ICMP protocol
<jmarciano>yes, I rather use ping
<jmarciano>reusing is better, I will re-write my software, but I need some foundation
<davexunit>I guess I don't understnd what you're trying to do. I haven't seen any code to do ICMP in Guile, so if you want to use Guile code to ping a server you will have to write it.
<mark_weaver>jmarciano: if you just want to run the existing "ping" command, you could use either 'system*' or the procedures in the (ice-9 popen) module.
<mark_weaver>(the latter if you want to be able to read the output of ping)
<mark_weaver>search for 'open-pipe' in the Guile manual
<jmarciano>yes yes, I understand, first I search for available stuff, then I can suffer
<jmarciano>sure I understand, if you davexunit don't know it, it is not there, I have to search yet...
<jmarciano>I see ice-9 popen documentation, but does not tell me much, I would need to look too much inside, I rather search ...
<davexunit>search for what?
<jmarciano>for ping....
<jmarciano>I understand you don't search, you write it. But i need to search
<cmhobbs>are there any weather libraries for guile? i'd like to tinker with getting temperature as i don't have a thermometer handy yet
<cmhobbs>if not, what should i grep the ref manual for to look at polling restful apis?
<jmarciano>I get it
<davexunit>cmhobbs: the (web client) module has HTTP client stuff
<davexunit>for HTTPS, you'll need the Guile bindings that come with gnutls
<cmhobbs>thanks
<jmarciano>then I will forget about ping, and include only http check too...
<jmarciano>Oh yes, there are I am.
<jmarciano>how do i check for type of value returned?
<amz3>héllo again ;)
<mark_weaver>jmarciano: use type predicates like 'number?', 'boolean?', 'list?', etc.
<mark_weaver>although I find those to be rarely needed in practice.
<davexunit>this may sound like a weird question, but what's a sure fire way of making a guile process exit abnormally, like via a segmentation fault or something like that? :)
<davexunit>trying to write a test that involves a guile process being terminated via a signal
<amz3>davexunit: Keyboard interupt doesn't work?
<davexunit>amz3: need automation
<amz3>for a test?
<amz3>just curious here
<davexunit>yup
<davexunit>for Guix
<davexunit>darn, I was hoping I could segfault Guile by using the FFI, but the bootstrap guile can't do ffi things
<davexunit>(dynamic-link) returns a dynamic object linked against nothing
<amz3>davexunit: I was going to propose to use a bug in guile, #23000 but it requires an open socket
<amz3>and is not future prooof
<davexunit>using a bug is not a good way :)
<davexunit>the problem is that I'm operating under a number of limitations, including that the process is PID 1 inside a container, which means it can't be killed in the usual ways.
<davexunit>fun stuff.
<mejja>divide-by-zero ?
<davexunit>I need some way to spawn a process that is capable of sending SIGTERM or SIGSEGV to the init process and successfully kill it
<cojy>davexunit: abort without a prompt
<jmd>davexunit: You want to kill init !!!??
<cojy>segfaults it
<cojy>i was too lazy to file a bug about it
<cojy>oh
<davexunit>jmd: pid 1 of a pid namespace
<davexunit>not the real init