***drakonis1 is now known as drakonis
<dsmith>Isn't nginx supposed to be to latest hotness? <alextee[m]>chrislck: thx. I hope I can figure out more ways to use guile ***catonano_ is now known as catonano
<daviid>str1ngs: are you using multiple inheritance in nomad? maybe you told me but i forgot ... ***wxie1 is now known as wxie
***d4ryus1 is now known as d4ryus
***terpri__ is now known as terpri
<str1ngs>davidl: I know for sure with emacsy I have some multiple inheritance. Maybe with g-golf but I can't recall off hand for sure. If it's important I can double check for you? <str1ngs>davidl: also g-golf is updated to version: 1-804.5d2903a now in guix. so if anyone needs the latest with guix just make sure they guix pull. <str1ngs>sneek: later tell daviid I know for sure with emacsy I have some multiple inheritance. Maybe with g-golf but I can't recall off hand for sure. If it's important I can double check for you? <str1ngs>sneek: later tell daviid also g-golf is updated to version: 1-804.5d2903a now in guix. so if anyone needs the latest with guix just make sure they guix pull. <str1ngs>davidl: sorry for the noise that was meant for daviid :) <str1ngs>sneek: later tell daviid though for g-golf I would not use something like. (define-class text-widget (gtk-text-view gtk-box)) since multiple inheritance is not supported by GTK. hopefully I understood your question right. <roelj>Is there an equivalent “add-to-load-path” for the %load-compiled-path? <dsmith-work>pkill9: Nope. You need to do what add-to-load-path is doing. Look in boot-9.scm *pkill9 wants to make a guile web scraper <pkill9>how can you search recursively for <identifier> in (<identifier> . <value>)? <pkill9>guile-json produces those pairs for keys <pkill9>hmm actually i wouldn't need to do that <pkill9>because I already know the structure of the data <chrislck>pkill9: are you working with nested-alists? <pkill9>im working with nested lists, not sure what an alist vs a list is though <pkill9>argh, im able to ping the domain, yet guile keeps saying 'name or service not known' <mwette>pkill9: check the tree-fold routines in (sxml fold) <roelj>When I want to conditionally add an attribute in sxml (like this: (sxml->xml `(input (@ ,(if #f `(checked "") '()))))..). What can I put in the place of the empty list to let sxml->xml NOT include it in its XML representation? <chrislck>,@ is the bully equivalent of , -- it takes more than 1 space on the bus <chrislck>,@ is the bully equivalent of , -- it takes as much space as it wants <pkill9>i'm constantly getting this: In procedure getaddrinfo: Name or service not known <pkill9>but i can ping and access the website <roelj>chrislck: This is exactly what I was looking for, thanks! <mwette>roelj: use . : (@ . ,(if #f `((checked "")) '())) <dsmith-work>pkill9: So what does that suggest? You are using getaddrinfo differently than ping, or maybe ping isn't using get addrinfo? <mwette>the difference is (list '@ '()) vs (cons '@ '()) <heisenberg-25>Hi, why is the getaffinity procedure not available on non-linux systems? running (getaffinity 0) on ubuntu succeeds but fails for Mac OSx. Is there a work around <heisenberg-25>or is there some flag that I should compile guile with to make it work? <mwette>heisenberg-25: hybridkernel.com/2015/01/18/binding_threads_to_cores_osx.html <pkill9>dsmith-work: (web client) is using getaddrinfo <heisenberg-25>mwette: Thank you, this really helps. I will post question if I run into an obstacle :) <dsmith-work>That reminds me. What does it take to use https with the (web client) ? <pkill9>how can I deal with unsupported characters in text that gets passed to guile-json <pkill9>i want to just replace all non-supported characters in a string basically <pkill9>the json parser passes some text to integer->char, and then an error: json/parser.scm:249:2: In procedure read-control-char: <pkill9>In procedure integer->char: Argument 1 out of range: <pkill9>55358 i believe is a hugging emoji, lol <RhodiumToad>55358 = U+D83E, which is a high surrogate, and therefore not a valid character <RhodiumToad>I believe json encodes surrogate pairs separately? so you might have to fetch both parts of the pair and convert them together <RhodiumToad>U+D83E could be the first half of U+1F917, which would encode as U+D83E U+DD17 <RhodiumToad>if it's trying to decode \uXXXX independently when the value is a surrogate, yes <RhodiumToad>(it's kind of ick that json uses that encoding in the first place...) <pkill9>guix's guile-json is 3 stable versions out of date, so it may have been fixed, i'll see <RhodiumToad>it is not correct that "Characters in Guile match the JSON representation" so that breaks <RhodiumToad>I guess the fix should be to read 4 hex digits, and if the value is in DC00-DFFF throw error, if it's D800-DBFF then read in an immediately following \uXXXX and error if that isn't DC00-DFFF <minerjoe>Need some help, please. Tried google, no avail. How do you get guile to output unicode characters? <RhodiumToad>(display (integer->char 8308)) works for me in shell <sneek>Welcome back daviid, you have 3 messages! <sneek>daviid, str1ngs says: I know for sure with emacsy I have some multiple inheritance. Maybe with g-golf but I can't recall off hand for sure. If it's important I can double check for you? <sneek>daviid, str1ngs says: also g-golf is updated to version: 1-804.5d2903a now in guix. so if anyone needs the latest with guix just make sure they guix pull. <sneek>daviid, str1ngs says: though for g-golf I would not use something like. (define-class text-widget (gtk-text-view gtk-box)) since multiple inheritance is not supported by GTK. hopefully I understood your question right. <minerjoe>The problem isn't actually in geiser. I have a web app and am trying to output sxml. Using (format #t "~A" #\20164) give "?". <daviid>str1ngs: i was just being curious - you may use multiple inheritance in g-golf <minerjoe>RhodiumToad: I'm just generating lists with quasiquote. Using format to generate strings. Is there a way to tell guile not to use "?" but the real thing? <dsmith-work>minerjoe: Pretty sure guile uses ? when it doesn't know how to encode the charcter. <minerjoe>dsmith-work: I'm new to guile, old common lisp programmer, just figuring things out. This would be something related to "ports"? <RhodiumToad>(sxml->xml `(foo ,(format #f "~A" #\20164))) for example works perfectly for me <minerjoe>And I'd like to fix the geiser<->emacs so that it works at the REPL also. <minerjoe>Does anyone here have emacs+geiser that correctly displays unicode? <RhodiumToad>minerjoe: what does (port-encoding (current-output-port)) return? <RhodiumToad>for whatever reason, likely to do with your LANG / LC_* environment vars, the output port encoding is wrong <minerjoe>(set-port-encoding! (current-output-port) "UTF-8") <minerjoe>I'm pretty sure I can figure out how to get the web-server to now output. <RhodiumToad>it'll be picking up the default for that encoding from LANG or LC_* <minerjoe>RhodiumToad: well my LANG=LANG=en_US.UTF-8 <minerjoe>Eh. pasting failing. Probably ok. All en_US.UTF-8 <dsmith-work>minerjoe: Could the environment for your shell and your web server be different? <minerjoe>Na. I just ran (system "locale") at the start of the app and it's all en_US.UTF-8 <RhodiumToad>if the current output port isn't the default one for guile's stdout, then whatever created it might be setting the encoding <minerjoe>Do you know what port is used for (format #f ...) ? <dsmith-work>Things were a lot simpler back when everything was just american english. Bytes were Chars and Chars were Bytes... <minerjoe>dsmith-work: I think. But don't know how to set the encoding? <RhodiumToad>no, it's when the result returned by the format #f is being displayed that it gets changed to ? <heisenberg-25>is using scm_without_guile really worth it? The doc says it provides small optimization for the GC but is it worth the extra line of codes and adding wake pipes? <RhodiumToad>i.e. (eq? (string-ref (format #f "~A" #\20164) 0) #\20164) should be #t unconditionally, regardless of any encoding settings *dsmith-work has been doing lots of Rust lately.. <minerjoe>RhodiumToad: I've narrowed down the problem to scm_to_locale_string, which is converting the guile string into the C string that the web-server is serving. Any idea how to set the locale for that? <RhodiumToad>is this guile embedded in something, or the guile REPL binary? <RhodiumToad>ah. so it's possible that the environment didn't do setlocale, and is therefore in C locale. <pkill9>i tested latest stable guile-json and it still fails with the error i was talking about, gonna report bug <RhodiumToad>what does (setlocale LC_CTYPE) return in the embedded environment? <minerjoe>RhodiumToad: That works! Thanks! I just added setlocale(LC_CTYPE, "en_US.utf-8") to the main() and we're off and running. <minerjoe>And geiser is now working with unicode also. <RhodiumToad>note that setlocale(LC_ALL,""); is the more standard way <minerjoe>RhodiumToad: Ok. I'll see if that works. <RhodiumToad>you don't want LC_CTYPE set differently to the other locale settings in general. <RhodiumToad>the default if setlocale is not called is equivalent to setlocale(LC_ALL,"C"); using "" means "read the LANG and LC_* environment variables" <dsmith-work>(depending on the value of env var GUILE_INSTALL_LOCALE) <RhodiumToad>right. The snag from the point of view of embedded usage is that the locale set by setlocale() affects the whole process, sometimes in unexpected and very bad ways <dsmith-work>That happens *before* guile calls scm_boot_guile(), btw. <minerjoe>RhodiumToad: Thanks for the help! Happy hacking! <RhodiumToad>I'd change that function to something like read-hex-val removing the integer->char, and write a new read-unicode-char <dsmith-work>minerjoe: Things are working fine for me. Was just pointing out that the guile exec calls setlocal before "booting" the library. A C application (that uses libguile) needs to do that too. <RhodiumToad>which would read one hex val, return it via integer->string if it's <#xD800 or >#xDFFF, and process the surrogate pair otherwise <minerjoe> dsmith-work: Yes. Thank you. Was the info I needed. <RhodiumToad>huh, actually maybe it's my c+p that's at fault, have to look into that