IRC channel logs


back to list of logs

<wkmanire>What controls the heap size for guile? I tried to (make-list VERY-LARGE-NUMBER #t) and it fails.
<wkmanire>Didn't come anywhere near to consuming my 16gb of memory.
<rlb>wkmanire: first place to look might be "ulimit -a"
<RhodiumToad>there does seem to be a separate limit in play: "Too many heap sections: Increase MAXHINCR or MAX_HEAP_SECTS"
<dsmith-work>Hey Hi Howdy, Guilers
<sneek>I've been running for 12 days
<sneek>This system has been up 16 weeks, 5 days, 23 hours, 59 minutes
<hackeryarn>I am trying to use guile-hall to manage my dependencies for a projects, specifically guile-json. All the configuration commands seem to run correctly but when I try to run (use-modules (json)) it can't find the module. I am executing ./pre-inst-env guile when I try to run this, so as far as I understand everything should work.
<hackeryarn>Does anyone use guile-hall and know if there is anything additional I need to do, outside the steps specified in the readme?
<hackeryarn>To add to this. When I echo $GUILD_LOAD_COMPILED_PATH or $GUILD_LOAD_PATH both are empty.
<hackeryarn>I mean $GUILE_LOAD_PATH sorry.
<tohoyn>hackeryarn: set GUILE_LOAD_PATH or GUILE_LOAD_COMPILED path so that they contain the directory of json
<tohoyn>if you have json as a compiled file use GUILE_LOAD_COMPILED_PATH, otherwise GUILE_LOAD_PATH
<hackeryarn>I guess I expected guile-hall to do this automatically when it sets up guix.scm and puts guild-json under propagated-inputs. I guess I am not too clear where propagated-inputs go and how they get linked.
<hackeryarn>So guile-hall does take care of the linking automatically after some digging i found that the default guile-json and guile-json-1 on guix only install for guile 2.2. I was using guile 3. After upgrading to guile-json-4 everything worked like a charm. If anyone else runs into guix dependency problems, $GUID_ENVIRONMENT is super helpful to check.
<atuin>I have a macro that generates a procedure with keywords but when guile compiles the code it sends a warning about "possibly wrong number of arguments", is that expected or am I doing something wrong?
<lilyp>atuin: are you adhering to the calling conventions of your generated procedure?
<lilyp>If you have e.g. (defun (foo #:key bar baz)) but you call it (foo #:spam ham eggs)
<lilyp>then a compile warning will be raised
<atuin>yeah, i adhere, and the code works fine
<atuin>it's just the warning when compiling the test code
<atuin>the problem seems to be that it's generated by macro and maybe the compiler does not have that info
<lilyp>do you get the right calling conventions when you simply ask the REPL what your procedure is?
<atuin>did not try, let me see
<atuin>but i tried same thing with a simpler version of teh macro and i dont get the warning when I call the function generated by that macro
<atuin>yes, the REPL shows the keyword in both cases
<lilyp>so just to get this straight:
<lilyp>(my-keyword-function-definer1 my-function) (my-function #:keyword value) works fine
<lilyp>but (my-keyword-function-definer2 my-function) (my-function #:keyword value) raises a warning
<atuin>yes, but only when guile compiles the code before running
<atuin>the code works
<atuin>I'm modifying the simpler macro into the complex one to see when do I get the warning :D
<atuin>lilyp: seems I found the issue, nothing related to the macro :D
<atuin>I was doing (define chdir (my-macro some params here))
<atuin>then calling (chdir params #:continuable? #t)
<atuin>I guess the compiler was getting confused with the name of the symbol: chdir
<atuin>because it's defined by guile, interesting
<dsmith-work>One cute trick for debugging macros is just quote the output expression.
<dsmith-work>scheme@(guile-user)> (define-syntax-rule (foo a) (begin (display a)(newline)))
<dsmith-work>scheme@(guile-user)> (foo "Hello")
<dsmith-work>scheme@(guile-user)> (define-syntax-rule (foo a) '(begin (display a)(newline)))
<dsmith-work>scheme@(guile-user)> (foo "Hello")
<dsmith-work>$3 = (begin (display "Hello") (newline))
<jpoiret>how do i properly report a syntax error in a syntax-case form?
<drakonis>dsmith-work: when you put it this way, it is so simple
<drakonis>macros all seem disgustingly simple
<dsmith-work>And often unnecessary
<drakonis>the guile docs makes them look harder than it is in reality
<dsmith-work>syntax-rules are brilliantly simple.
<jpoiret>isn't there any way for syntax-error to report the location of the syntax error?
<jpoiret>The situation is: i'm defining some syntax using syntax-case, and either 1) I don't put a catch-all at the end, and the message is cryptic (source expression failed to match any pattern) 2) I put a catch-all at the end with syntax-error to have a descriptive error message, but then it doesn't have the location of the error
<jpoiret>alright, digging through the source code, I could make it work using (syntax-violation #f "Error message" x) where x is the syntax object being matched on. I haven't been able to make syntax-error work for this use case, but syntax-violation is undocumented too. Any idea what the best method would be?