IRC channel logs

2016-12-07.log

back to list of logs

<cynlic>howdy all
<cynlic>I realize this isn't a personal help site, but does anyone have an idea about pipe a continuous stream of chars from guile?
<cynlic>*about how to pipe
<nalaginrut>morning guilers~
<ota>Fractional review of "this one is v approachable!" -wingo (http://okmij.org/ftp/continuations/ZFS/context-OS.pdf "Delimited Continuations in Operating Systems")
<ota>I only read part of it late at night & in a hurry. Quit when I got to an example mentioning monads. Had trouble understanding, so "approachable" must assume more background with continuations and such than I have.
<ota>More "feedback" than anything like "review". FWIW
<ota>Thanks for the link, in any case.
<roelj>How can I get the value of a symbol? I'm doing (define my-test "hello") \\n (string->symbol "my-test"), and it return the symbol name (my-test). How can I get the value ("hello")?
<roelj>Is (eval (string->symbol "my-test") (interaction-environment)) The Right Way?
<ota>In the read-eval-print-loop, just enter the symbol: my-test
<ota>Evaluating symbols to their values is the default case.
<roelj>ota: Yes, but I'm passing a symbol in a function. And that symbol contains the string to a file system path.
<roelj>ota: So I need to get the file system path, but also the actual variable name.
<random-nick>why not pass the path itself?
<ota>Ah, so you want to see the variable/symbol and then also get its value.
<roelj>random-nick: I also want the variable name.
<roelj>ota: Yes
<random-nick>that's a weird request
<roelj>I can either pass the symbol or its symbol->string variant
<random-nick>why not a car and a cdr'
<ota>Passing eval the symbol's name is maybe the best. But yes, consider doing it another way...
<random-nick>roelj: also eval is not what you want anyway
<random-nick>for what you want to do you should use module introspection
<ota>There is probably a way to just ask for its value. Eval is pretty heavy-weight
<roelj>Here's the snippet: http://paste.lisp.org/+75C5
<random-nick>roelj: this is the right way for accessing variables by symbol
<random-nick>roelj: https://www.gnu.org/software/guile/manual/html_node/Module-System-Reflection.html#Module-System-Reflection
<random-nick>roelj: basically (module-variable (current-module) 'symbol)
<roelj>ACTION scratches his head
<roelj>I was looking for something very simple actually
<random-nick>s/module-variable/module-ref/
<roelj>How would you simplify this: http://paste.lisp.org/+75C5/1
<roelj>I'd like to put each call to install-directory in a for-each.
<random-nick>for-each can take more than one list
<roelj>So (for-each install-directory (list "lib" "etc") (list lib etc))?
<random-nick>yes
<roelj>Doh, it works :) Thanks!
<dsmith>{appropriate time} Greetings, Guilers
<daviid>hi dsmith, and guilers!
<thomassgn>hi, thought I'd start using guile as my script language. but struggle finding docs for subprocesses (for launching external commands) and arguments (like ls -l getting the -l...)
<thomassgn>(already asked in #lisp)
<davexunit>thomassgn: see pipes
<davexunit>in the manual
<thomassgn>cool, thanks.
<davexunit>#lisp is a bad place to ask
<davexunit>this is very guile specific
<davexunit>I imagine #lisp is more about common lisp
<davexunit>#scheme would be better, but still not specific enough.
<thomassgn>allright, cool. Will come here first then :)
***heroux_ is now known as heroux
<paroneayea>hello #guile
<daviid>hi paroneayea
<paroneayea>wingo: am I reading right? does fibers not make as much use of suspendable-ports as I expected?
<paroneayea>I expected current-read-waiter and current-write-waiter to be playing a more prominent role, but maybe I'm not understanding right.
<paroneayea>oh
<paroneayea>wait
<paroneayea>no wonder :P
<paroneayea>it's in fibers.scm at the top level
<paroneayea>I was grepping inside the fibers/ subdirectory :)
<paroneayea>this matches more what I expected.
<paroneayea>wingo: hm, inet-ntoa is no longer in the default environment in guile 2.2
<paroneayea>whereas it was in 2.0
<paroneayea>but it's not documented as being in some module to be imported
<paroneayea>do you know what's up?
<paroneayea>oh
<paroneayea>I see they were deprecated in NEWS
<paroneayea>I guess not in the manual yet
<paroneayea>ok!
<paroneayea>it does say it's deprecated in the manual :)
<paroneayea>ACTION should stop pestering wingo with stupid questions he figures out the answer to 5 minutes later, sorry :P
<wingo>paroneayea: np :)
<medfly>Hi!
<wingo>good evening :)
<davexunit>xb
<davexunit>oops
<wingo>civodul: hej, wdyt about we put out a 2.1.5 release right now. if any probs we can just roll another one
<wingo>i have a tagged distchecked tarball that fixes the major hydra prob
<wingo>but i think there's still some --without-threads stuff to fix after the release
<wingo>maybe i should look at that, hum
<medfly>:)
<wingo>well indeed. i guess i should fix that
<paroneayea>procrastination driven development
<paroneayea>working on porting 8sync agenda right now to the suspendable ports. it turns out refactoring my existing code is easier than starting from scratch with a "minimalist" demo, which is nice.
<medfly>there's some weird I think deprecated logic in config.rpath
<medfly>freebsd[123]*) this now matches freebsd10 and freebsd11, I think :)
<medfly>I guess it was intended for 1,2,3
<dsmith>medfly: heh yeah, looks like
<medfly>ACTION was a little puzzled from http://gnats.netbsd.org/51694
<wingo>weird that http://alpha.gnu.org/gnu/guile is different from the same url over https
<wingo>anyway
<wingo>guile 2.1.5 out :)
<medfly>congrats :)
<wingo>tx :)
<dsmith>yey
<sneek>ACTION cheers
<dsmith>wingo: Ya, that http https difference happened last time too. Different servers?
<wingo>civodul: would you mind updating the news and also updating README.MAINTAINERS or something? :-)
<wingo>for the haunt web site change i mean
<wingo>the instructions in cvs (!) don't seem to work any more
<wingo>as there is no more (website exporter)
<wingo>heresy: maybe we can check a copy of haunt into guile-web :)
<wingo>i guess given that haunt is in guix tho it's fine
<wingo>ok, way early zzzz
<wingo>night :)
<davexunit>wingo: I know you're gone but whoa lightweight pre-emptive threads! I missed this development until now.
<davexunit>I don't know if we can do this yet, but MIT runs this contest called battlecode <https://www.battlecode.org/> where competitors make AI to compete in a real-time strategy game.
<davexunit>the way they enforce fairness is to give each AI player a limit to how many VM instructions can be run per "turn"
<davexunit>it's written in Java, so they are using some kind of pre-emptive threading on the VM.
<davexunit>I would love to know if we can do something like this in Guile.
<civodul>wingo: congrats!
<civodul>oh, too bad for the web site
<davexunit>hmm, I can't figure out how to use system-async-mark in a single-threaded program. I basically want to write a type of profiler, like the release notes mention.
<davexunit>the first thing I thought of was to write something that would interrupt constantly, incrementing a counter and then resuming the continuation
<davexunit>would love of an example of a simple usage of these new and improved interrupts
<thomassgn>trying to use for-each on a list, but can't figure out how to use the current list item in my procedure.
<thomassgn>Heres my current attempt: (for-each (display (string-concatenate (list (car args) "\\n"))) args)) ; but it fails after printing the first member of args. can't see any mention of this in the docs.
<thomassgn>ah, lambda maybe?
<thomassgn>hah, ofcourse. (for-each (lambda (arg) (display (string-concatenate (list arg "\\n")))) args))
<medfly>I was curious about that freebsd[123] thing, and apparently they were using a.out until freebsd 4
<medfly>so that explains it.
<dsmith>Is anyone here tantalum <sph@posteo.eu> ?