IRC channel logs

2020-01-30.log

back to list of logs

<mwette>xb
*chrislck wonders why call-with-values is part of scheme at all. so unschemy.
<wingo>chrislck: what do you think (call/cc (lambda (k) (k 1 2))) should evaluate to?
*davexunit was just using call-with-values this morning (first time using guile in months, 3.0 wooooooo)
<chrislck>uh oh... wasn't trying to wake up the boss.
*chrislck uses srfi-1's partition... it'd be easier to return (cons yes-values no-values) imho
<lloda>you don't need to use call-with-values chrislck . Use srfi-71 (better) or srfi-8
<davexunit>I wonder what the performance implications of using data structures explicitly are. I have this assumption that it would be more costly than the language handling multiple return values.
<davexunit>I don't know if that is true, of course.
<davexunit>but my preference would be to avoid allocation whenever possible.
<davexunit>and using cons is definitely allocating.
<wingo>davexunit: is it? :) ,c (match (cons 1 2) ((a . b) (+ a b)))
<wingo>compiles to 3
<davexunit>I was waiting for this :)
<wingo>i am sympathetic to "just use data structures" but then the logical conclusion is that function arguments should also be a single data structure
<davexunit>wingo can have little a bait
<wingo>:)
<davexunit>dusted off some code last night. before burn out set in a few months ago I had written some openal, libvorbisfile, libmpg123 bindings for a love2d-like audio system. still works with guile 3. phew.
<dustyweb>hi davexunit
<dustyweb>very cool :)
<davexunit>hey dustyweb
<dustyweb>hi davexunit !
<dsmith-work>Thursday Greetings, Guilers
<rlb>dsmith, wingo: found the dynamic-link/load-extension problem w 3.0.0, but don't know *why* yet. A shared lib that just has a SCM_DEFINEd function that returns scm_sym_unquote will cause the ENOENT load failure. I'm guessing it's because it can't find the symbol, and wonder if the visibility/location of that changed?
<rlb>"worked fine" in 2.2.6
*rlb wishes the loader had a way to tell me what was missing (or he knew about it, if there is one)...
<rlb>"already is one"
<dsmith-work>Yeah, sure would be nice to differentiate "file not found" and "symbol not found".
<nly>hi
<rlb>dsmith-work: hmm wonder if it's coming from dlopen(), and if so, if we're not using dlerror(), if that might produce something more details... (Not deeply familiar with those apis/behaviors.)
<rlb>dsmith-work: maybe I'll test that later.
<rlb>dsmith-work: looks like that *is* the dlerror() output (via dynl.c), so unsurprisingly, it might require changes to libdl or similar.
***dsmith-w` is now known as dsmith-work
<dsmith-work>rlb: Sounds familiar. I looked into it at one time.
<dsmith-work>The sterror messges are mostly right most of the time. But sometimes not.
<dsmith-work>Trying to mount sometthing when the kenrel wasn't configured for that filesystem returns a misleading message.
<dsmith-work>Like the permissions are wrong, or file not found.
***nckx- is now known as nckx
<jcowan>In the Mesa programming languages, function arguments are the elements of an anonymous record, and returned values are the elements of another anonymous record.
<jcowan>so let f = foo(a, b) where foo says return(c, d) and you can use f.c and f.d to get the values.
<jcowan>In Chicken, returning multiple values is no more or less efficient than returning a single value, because it is just calling the continuation with multiple arguments. Similarly, invoking a call/cc procedure is the same as invoking any other procedure, with no special stack munging required.