Search guile IRC channel logs

These are the channel logs matching your query foo

2023-01-31[21:04:38] <mfiano> I hope that makes sense. Additionally, the "how do i ensure a cleanup form is evaluated" question was raised by dadinn last week, and by me a couple months ago. It took me a week to find the solution after I was reminded of it. If Guile users are asking for a way to do this, it seems only natural to either include such 5 lines in Guile, or maybe just the inclusion of guile-foo, where foo is
2023-01-31[21:05:05] <mfiano> guile-foo in guix or something i mean
2023-02-10[02:22:22] <dthompson> like if 'foo' could be called with an int or a float, 2 functions would need to be defined.
2023-02-12[01:36:51] <old> Say you define <foo> then <bar> has a member <foo> in it?
2023-02-12[01:59:25] <old> It only the user to describe the instrumentation do be done in a declarative way : struct patch_op op = { .type = PATCH_INSTALL, .addr = { .func_sym = "foo", .insn_offset = 2 } }
2023-02-12[01:59:57] <old> You can clearly read it has: Install a patch at the second instruction of function foo
2023-02-20[03:41:56] <daviid`> cow_2001: here is a tiny example (catch #t (lambda () (module-ref (current-module) 'foo)) (lambda args (pk 'undefined-foo) #f))
2023-02-28[21:46:16] <dthompson> as opposed to *foo* for a top-level mutable thing
2023-02-28[22:04:17] <wingo> and that translates to guile C api, conventionally that %foo would be sys_foo (or scm_sys_foo)
2023-03-22[02:52:47] <dsmith> As in DESTDIR=$(pwd)/foo make distcheck
2023-03-30[11:16:32] <_graywolf> I would like to use guile to configure my program, but I am unsure how that is usually done. Should I just return an alist '((name . "foo"))? Provide specific functions (set-name "foo")? Something else?
2023-04-06[04:57:50] <flatwhatson> you need a match pattern which will match a single object, eg. ($ <vfunc> foo bar baz) to destructure the record
2023-05-12[04:01:20] <RhodiumToad> but then a method defined as (foo (self <myobject>) (str <string>)) won't match
2023-05-12[21:58:08] <old> > ,trace (utime "foo") in the REPL
2023-05-19[20:31:46] <Arsen> so, if you fd = open ("foo", O_RDONLY); flock (fd, FL_EXCL); abort (); in C, the lock is released
2023-06-11[21:16:33] <wingo> guild compile -W2 foo.scm
2023-06-11[21:18:24] <wingo> so i would take a guile you have in /opt/whatever/bin/guild compile -W2 foo.scm. ah but if it's not the wrong number of args i don't know ;)
2023-06-24[16:36:14] <mwette> rlb: in your new code, is there a discernible difference between ascii and utf-8 strings, like `(ascii-string? "foo")' ?
2023-07-02[18:36:23] <rlb> scheme@(guile-user)> (define-module (foo))
2023-07-02[18:36:23] <rlb> $2 = #<directory (foo) 7fe56abe0960>
2023-07-02[18:36:26] <rlb> scheme@(foo)> (current-module)
2023-07-02[18:36:29] <rlb> $3 = #<directory (foo) 7fe56abe0960>
2023-07-13[17:43:35] <dthompson> define an exception type: (define-exception-type &foo-error &error make-foo-error foo-error (bar foo-error-bar))
2023-07-13[17:44:02] <dthompson> raise a custom exception: (raise-exception (make-foo-error 'some-relevant-detail))
2023-07-13[17:44:45] <dthompson> catch custom exception: (with-exception-handler (lambda (e) (pk 'caught e)) (lambda () ...) #:unwind? #t #:unwind-for-type &foo-error)
2023-07-13[17:46:30] <dthompson> the other important detail is that exceptions are composable. (make-exception (make-foo-error 'some-relevant-detail) (make-exception-with-message "ruh oh, that's a error!") (make-exception-with-irritants '(i dunno)))
2023-07-15[01:51:06] <daviid> foo, bar, baz ... then what is the 4th most common used name that follows?
2023-07-15[01:57:17] <daviid> zap or zab, quux is terrible, but foo, bar, baz, zab sounds funnier
2023-07-15[01:59:54] <dalepsmith> "quux" just seemed odd. Wrong number of chars. To my ear the foo bar bas zap has a somewhat rising vocal resonance.
2023-08-10[20:35:35] <RhodiumToad> (basename "foo/bar.baz") => "bar.baz"
2023-08-11[00:27:03] <RhodiumToad> my examples aren't quite right if you didn't do basename first, consider "foo.bar/baz"
2023-08-24[03:57:22] <haugh> Even after the following it's telling me "unknown file name": (module-obarray-set! (module-obarray (resolve-module '(foo))) 'filename "foo.scm")
2023-08-24[04:04:35] <haugh> Okay! I only needed (set-module-filename! (resolve-module '(foo)) "foo.scm")
2023-09-03[05:56:14] <daviid> RhodiumToad: if you save this test module, add-to-load-path ... ,use (add-property) - then try (make <foo> #:bar 7) it should fail, where here after the fix (i still need to clean and push, it works fine (make <foo> #:bar 7) => $3 = #<<foo> 7fb3a73673c0> (!bar $3) => 7
2023-09-04[01:34:26] <RhodiumToad> hmm. if (make <some-object> prop: foo) isn't actually setting the property, how best to debug it?
2023-09-04[12:27:13] <graywolf> Hello, I am trying to use (ice-9 match), but cannot figure out based on the info page how to do so. Pattern ('foo . bar) matches for example '(foo . xxx) and captures 'xxx into the bar.
2023-09-04[12:34:53] <rekado> (match thing (('foo . (? string? bar)) (pk 'bar-is-a-string bar)))
2023-09-08[22:34:38] <mwette> so, #<output: "foo"> versus #<input: "bar">
2023-09-29[10:19:04] <wingo> iirc it does so by having automake run ./check-guile foo.test, and it has a list of all the tests
2023-09-29[15:32:40] <minima> basically, to safeguard against "echo foo; rm some-important-stuff"
2023-09-29[17:01:52] <dthompson> dadinn: parameters as in make-parameter? usually those are named like 'current-foo' and earmuffs would be reserved for a op-level mutable variable.
2023-09-29[17:24:26] <dadinn> dthompson yes, like in (define foo (make-parameter #f))
2023-09-29[17:30:28] <dthompson> (define-module (foo) #:export (*foo*)) (define *foo* 1) (define (inc-foo!) (set! *foo* (+ *foo* 1)))
2023-09-29[18:21:24] <rlb> With the parallel test arrangement, you get closer to the same thing if you run ./check-guile foo.test after a failure. With current guile, the envt is (as you suggest) potentially different.
2023-09-30[22:44:39] <rlb> Right not I do something pervasive and no real idea what it costs, i.e. at the tree-il level everything gets a trampoline, so (foo bar) becomes ((invoke foo) bar), and then invoke can be specialized for keywords, etc.
2023-09-30[23:13:14] <rlb> So lokke rewrites clj (foo ...) as ((invoke foo) ...) during compilation, and the default specialization of invoke is just identity, and so it'll take "anything", and only act on things that have further specialization like keywords.
2023-10-06[04:44:50] <daviid> abcdw: it's 'ourwonderfulbot later tell foo ...'
2023-10-11[19:30:11] <mwette> graywolf (use-modules ((foo bar) #:select (baz)))
2023-10-11[19:31:32] <mwette> or (let ((foo-1 (@ (foo bar) baz)) (foo-2 (@ (bar foo) baz)) ...) ...)
2023-10-12[04:19:10] <old> (let/ec return (let lp ... (return 'foo)))
2023-10-23[01:57:45] <RhodiumToad> (define foo (case-lambda ((one) ...actual body here...) ((two one) (foo one)))
2023-10-23[03:38:11] <RhodiumToad> (let (...) (define foo (case-lambda ...)) foo)
2023-10-27[03:16:31] <daviid> :-) - didn't know it was that complicated, what about (system "mkdir -p foo/bar")? i understand apteryx wants a scheme version, but ...
2023-11-04[01:30:15] <graywolf> My current "solution" is (module-set! (resolve-module '(srfi srfi-64) 'test-log-to-file "foo.log"), but I will be first to admit that it is pretty ewww...
2023-11-04[02:49:20] <old> graywolf: Here's the `run-tests' script that you can use like so: `run-tests tests/test-foo.scm tests/test-bar.scm'
2023-11-13[06:52:55] <isaneran> define has the syntactic sugar for (define foo (lambda ...))
2023-11-13[06:53:04] <isaneran> with (define (foo ...) ...)
2023-11-13[06:53:43] <isaneran> (let ((foo (lambda ...))) ..) -> (let (((foo ...) ...)) ...)
2023-12-10[03:55:49] <euouae> I'm also trying to run this <https://termbin.com/3job> from the command line with either `env GUILE_LOAD_PATH=. guile -e main -s foo.scm` or `-l foo.scm` but neither work
2024-02-03[16:12:22] <Arsen> (call-with-input-string "(foo bar baz)" read)
2024-02-21[02:08:39] <mwette> anyway, if you run `objcopy -I binary -B i386 -O elf64-x86-64 foo.go foo.xo' that generates a .xo file that can be linked with other file: gcc -o myprog myprog.c foo.xo `pkg-config --cflags --libs guile-3.0`
2024-02-28[01:58:54] <rlb> ...very surprised args-fold doesn't (appear to) support --foo value, i.e. requires --foo=value.
2024-02-28[02:00:11] <old> --foo value vs --foo=value
2024-02-28[02:02:11] <rlb> I *never* type --foo=bar, so I'd want my tool to support both at least.
2024-02-28[02:43:50] <rlb> ...possibly also conflating a bit wrt the similar clj form that does do what I expected i.e. (:require [foo.bar :as bar :refer [x y z]).
2024-03-06[15:52:35] <graywolf> Is the fact that (foo #:a 1 #:a 2) returns 2 for (define* (foo #:key a) a) something I can rely on or just an implementation detail?
2024-03-06[20:57:48] <dthompson> #<<foo> bar: "baz"> looks silly
2024-03-07[01:00:01] <freakingpenguin> I should be able to cludge something together with functions but a (define-foo) macro feels like it would be cleaner.
2024-03-07[01:05:49] <rlb> freakingpenguin: yes, I think more or less -- try (macroexpand '(test 'foo))
2024-03-07[01:11:00] <rlb> scheme@(guile-user)> (macroexpand '(test 'foo))
2024-03-07[01:11:00] <rlb> $1 = #<tree-il (define bar-46dea41ac6af4d9 (const foo))>
2024-03-26[15:26:40] <freakingpenguin> Is there an existing function that takes '((a b)) '((c d)) and gives '((a b c d))? Best I have is (list (append (car foo) (car bar))) which feels kinda ugly.
2024-03-26[15:33:34] <freakingpenguin> (list (fold-right append '() foo bar)) works too which is slightly better I guess. ieure: I think I can make that work since I can guarantee a and b aren't lists themselves.
2024-04-13[15:22:37] <graywolf> mwette: It is shame that there is no simple way to set docstring for a variables. (define foo "this is foo" 'foo) would be nice
2024-04-13[15:29:23] <graywolf> (set-object-property! foo 'documentation "Contains a @code{'bar}.")