IRC channel logs


back to list of logs

***wxie1 is now known as wxie
***wxie1 is now known as wxie
***apteryx is now known as Guest71302
***apteryx_ is now known as apteryx
***rekado_ is now known as rekado
<rekado>ArneBab: can you recommend a way to load a wisp file? I’m using a copy of (language wisp spec)’s “read-one-wisp-sexp” with “load”, but I see that the return value of (wisp-scheme-read-chunk port) doesn’t have any source properties.
<dsmith-work>UGT Greetings, Guilers
<rekado>ArneBab: never mind: it was all my problem!
<dukester>Learning scheme using guile. Noob question OK?
<justin_smith>I was *just* about to type out "just go ahead and ask"
<tohoyn>sneek: botsnack
<dsmith-work>dustyweb: Always.
<dsmith-work>dustyweb: Bah. Sorry
<justin_smith>dsmith-work: once again we fail to meet the SLA for random IRC drop ins
<dsmith-work>"Don't ask to ask, just ask. Then wait. Hours maybe."
<justin_smith>on some topics, I've gotten great time saving advice after a 48 hour wait on IRC
<leoprikler>Still higher throughput than carrier pigeons, though.
<justin_smith>and far less coordination overhead
<leoprikler>not to mention the emissions
<dustyweb>no worries dsmith-work :)
<dustyweb>leoprikler: carrier pigeons are high latency, but with TB+ sized microsd cards, they nonetheless may have incredible averaged bandwidth rates
<leoprikler>Perhaps, but those may not be suitable for transportation under all conditions (e.g. heavy rain)
<dustyweb>leoprikler: indeed, high packet loss :)
<leoprikler>though I suppose the same could be said for paper
<nij>There was an article in the CL circle a few years ago, claiming that CL is finally an (acceptable) scripting language (link: To be honest, I don't understand that article well. But hoping to use Guile as my scripting language, I wonder if Guile satisfies what the article says? Is Guile "an acceptable scripting language" as well?
<dustyweb>nij: it's heavily used as a scripting language here, yes
<justin_smith>nij: historically it's been advocated as a replacement for other scripting languages, and it's designed to be embedable
<nij>Thats my impression is, and also is what I hope for :D
<dustyweb>nij: also "scripting language" is only vaguely defined, but yes, Guile can be used for every definition of it
<justin_smith>nij: I don't know if it's "the official embedded scripting option for gnu" any more, but it's used in many programs
<dustyweb>even in the case of writing manu-scripts for plays, as ArneBab has demonstrated ;)
<nij>justin_smith: it might not be the case any more :(?
<nij>dustyweb: reference please :D :D ?!?!
<justin_smith>nij: I haven't checked so I'm being cautious in what I claim :D
<justin_smith>"Guile is the GNU Ubiquitous Intelligent Language for Extensions, and the official extension language of the GNU project." -
<justin_smith>so it's still the case, officially at least
<dustyweb>nij: more specifically, you should ask
<dustyweb>"what do I want to do?"
<dustyweb>or, we should ask you ;)
<nij>I mean ArneBab's showcase
<leoprikler>I have no idea, what they mean by an acceptable scripting language either.
<leoprikler>Like why would a scripting language even need a build system?
<nij>to run faster ?
<leoprikler>What about a build system makes a scripting language run faster?
<justin_smith>in order to use a language that isn't portable without a build system?
<leoprikler>Isn't that a bit circular, though?
<justin_smith>yes, it was a joke
<justin_smith>I may be skewed here, but I think the actual motive for that paper is "we want our build system to be as general and able to leverage the OS as much as make"
<justin_smith>with a minor side effect of demonstrating you could also do other random portable system stuff with cl if you jump through those same hoops
<nij>maybe I should just go to #lisp and ask "What's the point of this paper.. [link]" :P
<leoprikler>I think there's a nicer way of phrasing that question, but yeah, I somewhat agree with justin's reading.
<nij>Yeah I won't do that..
<leoprikler>Tbh. it is more of an example why *not* to have a language/tool-specific build system.
<justin_smith>as an aside, it's amazing how much languages can build little galapagos of closed of evolution - cl people know a lot of things the rest of us can learn from, and they also have conventions that are absolutely nuts
<justin_smith>(of course I could say that about haskellers, or people who are forced to use c++, or clojurists, or...)
<nij>(or nonprogrammers)
<nij>(again just a joke. sorry)
<leoprikler>to be fair, C++ has some features that I greatly miss in Scheme, like templates
<leoprikler>GOOPS just isn't the same :(
<ecraven>the one thing I'm coming to miss most is type declarations, that I can use at compile-time to decide things..
<ecraven>but templates are like macros, not like goops, aren't they?
<justin_smith>ecraven: macros used to parameterize code over types though
<leoprikler>templates are smart macros
<justin_smith>leoprikler: have you ever used ml / ocaml? I like their version - parameterized modules which take one or more types as arguments, returning a namespace of functions over the specified types
<ecraven>justin_smith: the problem [well, trade-off really] is not the calculation, but that you are fundamentally *missing* the actual type information.
<leoprikler>I have so far only heard of ML, never used it.
<ecraven>for example, I was playing around with some opengl stuff.. I'd like to just pass around bytevectors, which contain vec2, vec3, vec4 and so on. these could efficiently be passed along to OpenGL. but now, they don't have any more type information than "bytevector", so I cannot actually use them well in code
<Anonymous____>Someone can gimme a help to solve an exercise? im completly lost**
<justin_smith>ecraven: right, but in ocaml that's mixed with inference (which automatically figures out the types) and introspection (that tells you the types), plus (usually optional) declaration
<justin_smith>Anonymous____: you can always just ask
<leoprikler>To be fair, I like types as predicates actually.
<Anonymous____>Its from an exercise from The Scheme Programming Language Ed4
<leoprikler>It's conceptually close to C++ concepts 😉️
<Anonymous____>I never have seen any kind of loop being possible withouth recursion or iterative construction using "gotos" internally
<Anonymous____>So i have no idea what the author means in this exercise
<ecraven>justin_smith: yea, maybe I'd like a Scheme that works like ocaml :P
<ecraven>I haven't looked at ocaml in a decade or two, I should do that again
<ecraven>probably what I want is just plain impossible :D
<justin_smith>ecraven: most ocaml code *can* work as sexps even (it's just considered weird to write it that way)
***Anonymous____ is now known as Anonymous__
<justin_smith>eg instead of "f(x)" they use "f x", and "(f x)" is the same
<ecraven>what's a good book? Real world OCaml?
<justin_smith>Anonymous__: we have looping constructs in scheme, eg. "do"
<leoprikler>Anonymous__: You're supposed to use call/cc to create a loop in a similar way to setjmp/longjmp.
<justin_smith>ecraven: yeah, that one is decent
<ecraven>which other would you recommend?
<justin_smith>ecraven: the official language doc written by the compiler authors is actually good
<justin_smith>it's a full book, not just a manual
<Anonymous__>justin_smith: i already did while and other using define-syntax, but i dont think author want this, because all of those have recursive means in his internals
<justin_smith>Anonymous__: yeah, leoprikler has your actual answer here
<justin_smith>call/cc is just pretentious goto anyway, right?
<Anonymous__>leoprikler: hmm, trying to think how to do this
<ecraven>justin_smith: thanks!
<leoprikler>I'm trying with you, I'll let you know once I've figured it out
<Anonymous__>I just have seen about call/cc today, it seems like a goto with steroids because the state is back again
<justin_smith>Anonymous__: right, which means you can do the thing with goto you initially said wasn't allowed
<Anonymous__>I have read some examples in wiki too.. its very strange for me, but im thinking this cool also
<Anonymous__>the author dont explicit says that iterative syntax is not allowed, but its dont seem to be what he wants
<Anonymous__>the book have an answer leoprikler, but im not going to read it yet
<Anonymous__>Will keep trying
<justin_smith>ecraven: also, I would be remiss not to mention that rust borrows a *lot* of good features from ml, while being more mainstream and having a much more active community these days
<ecraven>yea, but rust is an entirely different sort of language than Scheme, to my limited knowledge at least
<leoprikler>Okay, I got it
<justin_smith>ecraven: that's true - the first version of ml was written in a lisp, and in many ways it shows, rust is further away and tries to be more like c++
<dsmith-work>While Rust has some FP-like stuff in it, it is very much an imperative language.
<cbaines>Am I doing something wrong here, or is Guile just really broken?
<cbaines>Calling (backtrace) is something you can see in the Guile manual
<cbaines>Yet Guile seems to crash, inside (backtrace) !
<Anonymous__>leoprikler: I did it with the help of ecraven in #scheme
<Anonymous__> leoprikler . thats the final result, o almost just followed the idea ecraven give me, you solution is similar?
<leoprikler>that's the same as your previous one, just different brackets, no?
<leoprikler>but why sleep?
<Anonymous__>I just put sleep so i can see the count slowly
<Anonymous__>its not needed
<Anonymous__>I have missed the first step the last one because i will be not bounded.. i tried to use i in lambda passed to call/cc in the other version
<Anonymous__>thats the answer in book
<dukester\0>is this a guile developer channel only?
<justin_smith>dukester\0: no
<dukester\0>So noob learner questions OK?
<dsmith-work>dukester\0: But answers might be slow.. Don't worry about waiting a day or two.
<dukester\0>"Teach Yourself Scheme in Fixnum Days" says that (define foo bar) defines a global variable. AND to use (set! foo bar) changes the value. However, I can change the value by just re-defining foo. Is that normal?
<civodul>cbaines: your example works for me; that is, it displays two backtraces: the first one from the 'backtrace' call, the second one due to non-continuable exception
<civodul>that's with 3.0.5
<cbaines>civodul, so you don't get the same output I do?
<civodul>which is weird in itself
<cbaines>what value is printed for COLUMNS?
<cbaines>is it?
<cbaines>;;; ("COLUMNS" #f)
<civodul>no no, it's set
<cbaines>Right, that'll be why
<civodul>otherwise that'd mean 'getenv' is broken
<civodul>yeah if i unset COLUMNS, i get the same error as you
<cbaines>I'm pretty sure that's a sure sign that this is a bug in Guile
<joshuaBPMan>Hello, I'm considering adding the (decode) module to guile's default (web ) module and friends.  So it would be (web decode).
<civodul>the error comes from the 'terminal-width' fluids
<cbaines>I'm also getting more confident that this is a weird but, as the string->number call is wrapped with false-if-exception
<joshuaBPMan>code is from here:
<civodul>cbaines: right, *that* is weird
<joshuaBPMan>would ya'll be ok to add this to guile's web implementation?
<joshuaBPMan>I'm not asking you to do it, I'll make the patch...
<cbaines>civodul, you're definitely testing using a script, rather than a REPL?
<cbaines>the behaviour is different in a REPL
<civodul>cbaines: yes; and indeed, at the REPL, i can call (terminal-width) with COLUMNS unset, and it returns 72
<civodul>hey but wait!
<civodul>you're using a pre-unwind handler here
<civodul>whereas false-if-exception only sets a post-unwind handler
<civodul>so yours gets to run first
<civodul>oh that's interesting
<cbaines>what, so the Guix Build Coordinator code is not responsable for error handling inside of (system repl debug)...
<cbaines>... no one told me!
<cbaines>hmm, what you said made sense initially, but I'm not so sure now
<ft>dukester\0: There is also a way to use define inside of another definition, introducing a name within another scope. Using set! always modifies the value of the symbol that's in scope. It doesn't introduces a new binding.
<dukester\0>ft: Got it - I think. Going to read on. Thx.
<ft>dukester\0: On the top-level, using (define foo ...) after a previous (define fo ...) will replace the earlier definition. So in that case it'll seem similar. set! modifies the previous definition.
<ft>What I said isn't really limited to the top-level either.
<dukester\0>ft: ok will play with it a bit and see.
<justin_smith>also, set! works with bindings created by let, and unlike calling let again it actually changes the variable rather than hiding it
<justin_smith>I guess that's a variation on what ft already mentioned
<dukester\0>justin_smith: Got it. thx
<cbaines>civodul, maybe it is with-exception-handler that's breaking false-with-exception within (system repl debug)...
<cbaines>I switched out with-exception-handler for with-throw-handler, and (backtrace) doesn't crash
<wingo>good evening
*wingo looks at removing ltdl dep, for the nth time
*dsmith-work applauds
<wingo>i am assuming that these days, .la files are useless
<wingo>do people agree?
<wingo>i know that fedora/redhat/etc delete them from their packages
<wingo>i see that debian removes them as well
<wingo>this may be a 3.2 change tho so i guess i should branch :/
<wingo>civodul: thoughts welcome ^
<wingo>maybe we could drop the dep in 3.0 tho, if functionality isn't changed
<nij>Are there ql/asdf equivalents for guile?
<wingo>not really :/ most guile hackers end up using guix for that, as a more general user-space package manager
<wingo>there was an attempt a while back to make a guile-specific thing but afaiu it did not succeed
<wingo>but guix does it better than guile could have done in many ways
<daviid>wingo: hello! is there any hope that module-use! bug in 3.0 can be solved?
<nij>so I just want to write a little script that deals with csv files..
<nij>how would guix help in this case?
<wingo>daviid: link?
<nij>(I noticed that it's not as easy as in CL to find a package that helps deal with csv)
<daviid>wingo: sure, just a sec
<daviid>it was first reported (not by me but that does matter) here bug#43025
<wingo>nij: if guix packaged a csv package, it would be as simple as "guix install guile-csv" :)
<wingo>but as-is, i would recommend copy-paste fwiw :/ e.g.
<nij>OH! I didn't know it's under "guile-charting" :-( sorry for that
<nij>Any tips on searching packages?
<ft>Some are here: - Other than that: Salt. Wounds. :)
<nij>Also, I heard that comparing to CL, guile might lack of many packages. Would you recommend me to use cl as my main scripting lang as opposed to guile?
<nij>ft: I checked that page, and searched "csv" with no luck.
<wingo>CL may well have more packages!
<ft>I wasn't trying to suggest that it was complete in any shape or form. :)
<nij>ft: sure :-) I get that. Thanks for the suggestion anyway!!
<wingo>yeah library availability is getting better but not like python-level :)
<daviid>wingo: g-golf needs module-use!, not a works around 'as proposed' - no pun, there is a real problem with the work around, which offers a 'static' re-export, unlike module-use!, which does the right thing ... let me know if you need more info - the bug report (first message) has a snipset
<daviid>sneek: guile-software?
<sneek>guile-software is
<wingo>daviid: can look a it at some point, sur
<daviid>ft: nij, ^^
<wingo>not tonight
*wingo pleased that gnulib is still a thing
<daviid>wingo: thanks you very much. I bleive it is the only 'stopper' for g-golf to work with 3.0
<nij>wingo: is python-level >>>>>>>> CL-level?
<wingo>nij: yes :)
<civodul>wingo: Debian has "always" removed .la files :-)
<civodul>are you considering not using libtool?
<spk121>wingo: re libltdl. These days dlopen() is available on BSD, Linux, Cygwin. The only holdout is Windows Native or MinGW, but, cygwin has Windows Native to dlopen conversion code
<civodul>or ltdl?
<civodul>ah ltdl
<civodul>yeah, it's probably okay to remove
<civodul>i hit a .so/.dylib issue a couple of weeks ago, which i thought didn't exist anymore
<civodul>but if that's the only problem, that should be manageable
<spk121>also, once I replaced ltdl with gmodule to see if I could. There's a tree in the repo (wip-replace-ltdl-with-gmodule) not that you'd want to add a gmodule dependency
<civodul>(and ltdl didn't help in this case anyway)
<wingo>spk121: that would be really nice if we just had to have a special case for mingw.
<wingo>our needs are not so complicated so perhaps we could locally define just the parts of dlopen/* that we would need, and otherwise just code to the dlopen api
<spk121>wingo: IMHO, that is what you should do. Code to dlopen. Borrow Cygwin's dlopen for posix-w32.c should MinGW or Windows Native be resurrected.
<davexunit>windows native build would be nice :)
<wingo>spk121: tx very much for feedback. (does mingw not work right now??)
<daviid>ecraven: ywrt opengl, are you aware of guile-opengl?
<daviid>ecraven: for info, here
<dsmith-work>If ltdl goes away, will that fix the long standing misleading error message that happens when it can't find the .so OR the init func returns an error?
<spk121>wingo: MinGW on 3.0.x is broken. The patches to get it up and running, but not fully featured, are here. I keep meaning to clean the patches and commit them some day.
<wingo>spk121: weird that it differs from 2.2, as i don't think much OS-related changed. but ACK. obviously working on windows would be good!
<wingo>& please feel free to commit anything that's upstreamable
*wingo will update gnulib soon; have a half-done update locally