IRC channel logs


back to list of logs

<graywolf>Hello, I am tryint to use the srfi-64 module, however I have troubles figuring out how to set the log file location. Would anyone know?
<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...
<RavenJoad>apteryx: Yesterday (for me), you answered my srfi-64 test & make -j question with "it can only parallelize modules at a time". Does this mean a new thread/process is created for each test-begin block, which is then executed in parallel?
<RavenJoad>I'm asking because I have 2 suites of tests which depend on a database being present, one for testing opening, closing, and otherwise manipulating the database, and another suite for actually manipulating the database. But both use a "test.db" path, which makes the 2 sets of tests conflict when cleaning up/working on the DB.
<RavenJoad>Sorry, test suite 1 opens/opens multiply/closes/closes multiply the database. Test suite 2 adds, removes, and searches the database. But both use the same database path name.
<graywolf>Is it possible to get a string that does not contain unicode charaters, but an actual utf8 bytes? I know there is string->utf8, but that returns a bytevector, I need something for which string? is #t.
<graywolf>I am trying to use a non-guile piece of scheme and it assumes char == byte; so I need to convert my strings before passing that to that library and have no idea how.
<old>graywolf: I typically use a script that run the test for me
<old>I think everyone use something like this
<old>graywolf: Here's the `run-tests' script that you can use like so: `run-tests tests/test-foo.scm tests/test-bar.scm'
<old>and here is the test-driver I took from hall with little modification:
<old>you can inspire yourself from the test-driver if you want to understand how to make a test-runner
<old>or just use it :-)
<graywolf>Thanks for the links, will check it out :)
<RavenJoad>graywolf: As for utf8 bytes, could you not strip out the bytes in the byte vector which you do not want, then use utf8->string to get it back to a string?
<graywolf>I... do not think so. I do not really have much to strip. Let's assume I have a "\u00e9", I would like to convert it to a string such that (string-ref s 0) returns a character with numerical value of 195. (Since (string->utf8 "\u00e9") is #vu8(195 169)).
<graywolf>It is... a long time since I had to think about unicode, so maybe I am missing something obvious?
<RavenJoad>I probably am too. I know very little about Guile's string-handling facilities. I usually find it faster grep through Guix than read the manual.
<old>sneek: later tell graywolf try this: (apply string (map integer->char (u8vector->list (string->utf8 "\u00e9"))))
<sneek>Got it.
<apteryx>ACTION sends srfi 125 to guile-devel, which builds on top of srfi 126 & srfi 128
<apteryx>next in line: srfi 209
<apteryx>looks like I'll end up adding a bunch of recent srfis for it; it wants, which is implemented via srfi 160
<euouae>I'd like to learn Guile, should I learn Scheme first?
<RavenJoad>euouae: Guile IS a Scheme (rather Guile is an implementation of the Scheme language). So by learning Guile, you learn Scheme.
<euouae>RavenJoad: Doesn't guile add something extra to scheme?
<RavenJoad>Yes and no. I would say a majority of the extra things in Guile you have to import a library to use.
<Arsen>indeed, the base language is scheme still
<euouae>got it
<haugh>is there conventional logic for when to use let- vs. when- prefixes?
<haugh>excuse me, s/when-/with-/g
<haugh>e.g. I've got a macro to implicitly do the `delay' and identifier-syntax for `force'; would you call it let-promise or with-promise or something else?
<haugh>it's not critical but it's the kind of thing that distracts me
<RavenJoad>I typically think/see (with-thing x forms) when you need x to be given a particular value during the execution of forms.
<RavenJoad>For example, I have a with-db syntax-rule that opens the specified DB, stores the pointer to a parameter, runs an arbitrary number of queries, and then cleans up, lastly clearing the parameter.
<haugh>we also have things like with-syntax which change multiple bindings and let-escape-continuation which binds only one