IRC channel logs

2020-05-10.log

back to list of logs

***modula2 is now known as defaultxr
***catonano_ is now known as catonano
***jonsger1 is now known as jonsger
<bsima>how can I do regex capture groups in guile?
<dsmith>bsima: matchsubstring: https://www.gnu.org/software/guile/manual/html_node/Match-Structures.html
<dsmith>scheme@(guile-user)> (use-modules (ice-9 regex))
<dsmith>scheme@(guile-user)> (string-match "(.*) (.*)" "foo bar")
<dsmith>$1 = #("foo bar" (0 . 7) (0 . 3) (4 . 7))
<dsmith>scheme@(guile-user)> (match:substring $1 2)
<dsmith>$2 = "bar"
<dsmith>bsima: Like that ^^
<bsima>oh match substring takes another arg
<bsima>cool thanks
<bsima>scheme@(guile-user)> (index-titles)
<bsima>$2 = (("this is a title" . 2) ("test" . 1))
<bsima>scheme@(guile-user)> (assq "test" (index-titles))
<bsima>$3 = #f
<bsima>what the heck is going on?
<malaclyps>is guile3.0-chickadee working okay on mainline guix? The examples on https://dthompson.us/projects/chickadee.html just throw up a black window for me. guile3.0-sdl2 examples seem to work okay. I even tried creating a very simple patch to upgrade to 0.5.0...
<RhodiumToad>bsima: two strings with the same characters are not usually eq? to each other
<RhodiumToad>bsima: in fact they're not usually even eqv?
<RhodiumToad>bsima: so you'd need assoc, not assq or assv
<lampilelo>eq usualy means it's checking the equivalence of pointers or something that can fit into the word
<lampilelo>what you want is string=?
<RhodiumToad>you missed the question, it was about an association list
<lampilelo>ah, sorry
<RhodiumToad>the question was asking why assq (which compares with eq?) did not find the entry
<RhodiumToad>whereas assoc compares with equal? which compares strings by content, as string=? does
<lampilelo>you can use assoc from srfi-1 and specify string=? as equal operation
<lampilelo>yes, assoc uses equal?, so it should be good
<lampilelo>it recurses through the lists to compare their contents
<RhodiumToad>or of course one could convert the strings to symbols or keywords first
***apteryx is now known as Guest2620
***apteryx_ is now known as apteryx
<malaclyps>davexunit, though I couldn't get chickadee to work on the current Guix, I'm *really* enjoying messing around with guile-sdl2, especially with your coop repl code! It's exactly what I've been looking for in a repl-ish game dev environment!
<manumanumanu>Does GUILE_FOR_BUILD do something? I have a working 3.0.2 built from release tarballs, but now I want to build the very same version from git. It still seems to take ages
<RhodiumToad>(set! (age RhodiumToad) (1+ (age RhodiumToad)))
<manumanumanu>RhodiumToad: Happy birthday!
<manumanumanu>but that seems rather un-idiomatic scheme :D (set! ...) is a code (life?) smell :) :)
<RhodiumToad>:-)
<RhodiumToad>hm, srfi-19 doesn't seem to have a decent calendar difference function?
<pinoaffe>RhodiumToad: yep, it does not
<pinoaffe>there is time-difference though
<manumanumanu>Maybe we should port gregor from racket. They all swear by it...
<andswitch>malaclyps: https://www.gnu.org/software/guile/docs/docs-2.2/guile-ref/Cooperative-REPL-Servers.html ?
***jonsger1 is now known as jonsger
<malaclyps>andswitch, yep!
<malaclyps>davexunit, okay I worked out what's broken about guile3.0-chickadee in guix, touch wood I'll be able to submit the fixes upstream (it's just a matter of updating both guile3.0-sdl2 and guile3.0-chickadee I think)
<malaclyps>i can't believe I went on a huge exploratory voyage into common-lisp sdl2/openGL libraries, only to end up back at guile!
<malaclyps>that said, it did leave me a bit envious of some of the features of sly/SLIME that I wish I had in geiser
***janneke_ is now known as janneke
***danielalura is now known as danjelalura
<arpunk>malaclyps: Are you working with the new upstream version of chickadee or the one currently available on guix?
<manumanumanu>Sorry to ask such an off-topic question: does anybody here speak serbian or know of any way to travel into serbia through your country? A friend's father just died and we are looking for ways for him to be able to go home to Serbia. I am trying to find info about transit through neighbor counties, but my serbian/croatian/hungarian/romanian/bulgarian is limited.
<manumanumanu>if you have any info, we can chat privately, or you can send me an email at linus.bjornstam@fastmail.se
<unknown_lamer>dsmith: https://git.savannah.nongnu.org/cgit/bobotpp.git/commit/?id=3804f43913ab073eee40f09d3d46398c52cd8ba8 good news, I integrated git-version-gen today
<unknown_lamer>sneek: version
<sneek>Sneeky bot running on Guile version 3.0.0 using bobot++ 2.3.0-darcs
<unknown_lamer>oh, except the version isn't available to scheme, lovely
<unknown_lamer>sneek: botsnack
<sneek>:)