*chrislck_ in admiration of macro hackers ***chrislck_ is now known as chrislck
<elliotpotts>is there a c equivalent of `lambda`? I asked the other day about a userdata <sneek>Welcome back elliotpotts, you have 1 message! <elliotpotts>I'm solving my lambda problem in a rather horrible way: <elliotpotts>scm_c_eval_string(format("(define foo (lambda args (dispatch (make-pointer {}) args)))").c_str()) <elliotpotts>sneek: thanks, I did see that page, it sounds like it's outdated? if it's not, I guess I'll use that <catonano>lloda: did you find anything about filename completions in the REPL ? <lloda>it's nice to have filename completions inside a (load "... form <lloda>but having them everywhere, it's very annoying <catonano>lloda: well I'm interested in the issue. Should you find anything, I'd appreciate if you would share it <lloda>otherwise it bothers me that (let () (define a 0) a) is ok but (when #f (define a 0) a) is an error :-\ <ArneBab>lloda: that bothers me, too. it’s no longer as bad as before Guile 3 (you can now do (define (foo)(define a 5)(write a) (define b 6) b) ), but it still feels not-so-nice that I sometimes have to explicitly start a let-scope <ArneBab>(when #f (let ()(define a 0) a)) ;; works <ArneBab>so the let in when should be implicit if there’s a define <ArneBab>It’s also strange that this does not work: (when #f (begin (define a 0) a)) <ArneBab>Are there compiler-theory reasons for that, or is it just simplicity? <elliotpotts>leoprikler: the problem is it's difficult to register them as scheme functions <leoprikler>ArneBab: (when #f x) is already short for (if #f (begin x)), is it not? <lloda>imo it's kinda wack that (begin (define a 0) a) is ok, but (if #f (begin (define a) a)) is not <lloda>altho thinking about it it seems unavoidable. Sometimes you need to group and not scope <lloda>would be easier if these two were one and the same <ArneBab>begin just pulls the code back into the outer scope, AFIK <leoprikler>I think part of it is, that "if" bodies are no longer seen as top levels <leoprikler>otherwise (when feature (define-public (yay) 'yay)) would make sense <topoi>I'm using OpenBSD as enddevice and suddenly (since 6.8?) my dhclient doesn't seem to get an IP from a specific router. The non-OpenBSD devices I'm using still get their IP's. Any Idea? <manumanumanu>chrislck: don't you like Continuation-passing syntax-rules macros? :D :D <manumanumanu>I didn't make that shit up, though. Alex Shinn has been the source of almost all my WTF-syntax-rules?! moments... <elliotpotts>so, I'm still quite confused about exception handlers <elliotpotts>if I'm implementing what amounts to a REPL, I need to: <elliotpotts>for 2, I can use scm_read, but how to I catch exceptions raised during this? <roelj>Is there something link valgrind for Guile? I'd like to see why my program's memory slightly expands as days pass by. <civodul>roelj: there's no heap profiler, but there's 'gcprof', an allocation profiler <civodul>it can give you hints as to what's leaking <roelj>civodul: Alright, can I log the output of gcprof to a file? <roelj>Oh, I can just pass #:port. That doesn't seem to be documented in the manual. <roelj>civodul: Thanks! I think I've got it now. It'll take a few days before I know whether this gave me the information I was looking for :) <civodul>roelj: maybe you can stress your program so it consumes memory more quickly <roelj>civodul: Trying indeed. I do get a lot of ";;; (what! #<stack 7f1bb3895600>)", and "anon #x17bc1a8" in the summary table..