IRC channel logs

2016-04-10.log

back to list of logs

<ijp>j-bob from "the little prover" doesn't seem as packagable as minikanren was
<ijp>it rebinds some builtins to make them total
<ijp>(car '()) == (), etc
<fhmgufs>Hello! I want to run something in a new thread and do something else in the time between. Is there a way I can get notified when the thread is finished?
<fhmgufs>Like a hook or sth like that.
<wleslie>what will you do when you are notified?
<ozzloy>janneke, i was a vim user for a decade, then switched to emacs over 2 years when learning lisp
<janneke>ozzloy: sounds familiar :-)
<fhmgufs>wleslie: I want to input some stuff to a pipe and at the same time run a thread which reads all its output and gets the return value, when it's finished.
<fhmgufs>Oh, my question was wrong, that's no problem. The problem is that I have to know the return value in the procedure doing the input.
<fhmgufs>With the pipe opening function I want to provide the following interface: Returning a procedure writing to the pipe and, if it's closed, returning its return value.
<fhmgufs>And at the same time reading all the output of pipe and if it's finished close the pipe and get the return value.
<fhmgufs>Now I need to know this value in the writing function.
<fhmgufs>Ok, I have made it now using custom handlers passed as arguments to the first function.
<stis>hey guilers!
<rain1>hello
<madmax96>Hey all, if I want to eval a variable in a macro, how can I do this? I'm trying something like (define-syntax test (syntax-rules () ((_ expr) (local-eval expr (the-environment)))), but if I use it in a function like this: (define (k x) (test '(+ x 10))), I get an unbound variable error
<rain1>I think it's impossible
<rain1>why don't you do something like this instead
<rain1>(define-syntax test (syntax-rules () ((_ expr) (test-helper 'expr expr))))
<rain1>where test-helper is a function taking an expression and its value as input
<madmax96>why both?
<rain1>what exactly do you want to do with your test macro?
<madmax96>This just recreated the problem I was having simply. I'd like to modify a bunch of expressions by inserting a new value into each one
<rain1>well why not use (lambda (x) (+ x 10))
<rain1>then you can run it with different values of x by call ing it
<mark_weaver>madmax96: macros are expanded at compile time, before the program is run, so of course it cannot access the run-time values of variables.
<mark_weaver>s/it/they/
<mark_weaver>consider something like this: (define (my-procedure x y) (my-macro x y))
<madmax96>ahhh, I neglected to consider that
<mark_weaver>my-macro is expanded only once, before the program is run, and certainly before 'my-procedure' is called (which could happen many times)
<wingo>moo
<stis>as the cows in sweden says: muu
<wingo>:)