IRC channel logs

2016-03-22.log

back to list of logs

***cluck` is now known as cluck
<daviid>davexunit: when your write doc, for api matters, do you immediately write in the api.texi part of the manual or you compose extract from the surce?
<daviid>I wonder what is considered the best approach
<davexunit>daviid: I usually write docstrings first and add manual text later
<davexunit>I don't use the exact docstrings for manual text, because a manual serves a different purpose than a docstring
<daviid>ok, so you don't extract like guile [at least partially] does...
<mark_weaver>I don't think Guile does it anymore, does it?
<daviid>I was thinking that the API Ref Manual could extract the docstring as is
<daviid>mark_weaver: I don't know actually
<daviid>so I understand that you gues recommend to write the api directly in the texi file
<mark_weaver>iirc, there were experiments with that in the past (before I was involved), and they were deemed a failure and dropped.
<mark_weaver>afaik, we don't generate any part of the guile manual from source code now
<davexunit>daviid: I've bootstrapped a manual by extracting docstrings before
<daviid>ok, thanks for this info, I'm going to not trying this root myself then :)
<davexunit>but that was just to cut down on boilerplate and get the manual going quicker
<daviid>davexunit: ok
<ozzloy> http://paste.lisp.org/+6O27 line 426. i'm getting an error trying to make guix. i did not install guile-json, or gnutls-guile. should i?
<janneke>ozzloy: yes, it looks like that
<janneke>i know to build the guix.deb package you need guile-json installed
<ozzloy>janneke, thanks
<ozzloy>i installed guile-json from source and reran make in guix, but got the same error
<ozzloy>unfortunately, now i have to go to sleep. thanks for your help tonight
<ozzloy>suggestion before i go, the page that says guile-json is optional should say it's not optional https://www.gnu.org/software/guix/manual/html_node/Requirements.html
<wingo>moin
<civodul>hello!
<wingo>apparently javascriptcore, the js vm in webkit, is considering including a chicken-like stack :)
<wingo>just for debugging tho
<wingo>now that jsc has tail calls.
<civodul>oh neat
<civodul>JS is Schemer lair anyway, no? ;-)
<wingo>there's still a darknet, but i dunno, scheme is less academically interesting i think so new people don't train on it as much :)
<wingo>interesting in the sense that you can prove new things with it
<wingo>s/with/about/ maybe
<civodul>yeah
<Jookia>Newbie looking at Guile: What's the ecosystem/tooling like? Is it anything like Haskell's?
<taylan>basically Emacs is the tooling, and the "ecosystem" isn't very large and is mostly centralized, I'd say
<taylan>I might be wrong about the "ecosystem" part. (also not 100% sure what ecosystem means. :-)
<Jookia>Well, libraries/modules I can get online
<taylan>ok, I was thinking the right thing then
<taylan>there are a bunch of third-party Guile libraries but AFAIK not as many as there are for Haskell
<Jookia>So why use Guile?
<Jookia>Rather than Lisps with bigger ecosystems
<taylan>the Scheme with the bigger ecosystem is Racket, and many use it for that reason. Guile has its own advantages, and for many it's also important that it's related to the GNU community.
<taylan>also saying "Guile has a small ecosystem" and leaving it at that is maybe somewhat simplistic. one might rather want to see whether it has the things one actually sees oneself caring about, especially if planning for a specific project.
<Jookia>A lot of things that interest me would be to do with parallelism, distributed and fault-tolerant programs
<taylan>hmm, AFAIK Erlang is kind of the gold standard on that stuff :)
<Jookia>Scheme seems like it'd be a very good language for writing my own DSLs and programming in those in a purely functional fashion, and implementing them using impurity
<ecraven>termite is an interesting parallel Scheme
<peterbrett_work>Guile is really good at handling parallelism (in my experience)
<Jookia>petter: Oh?
<peterbrett_work>Admittedly I haven't done anything mega complicated with it but the things I've tried have seemed to scale very smoothly and have been reliable
<peterbrett_work>Guile is one of the few high-level language implementations that lets you use OS threads rather than green threads (no GIL like Python, Ruby, ...)
<Jookia>What are some good Guile-specific features?
<taylan>Jookia: interactive/iterative development maybe. AFAIK it's not as easy in e.g. Racket and Chicken. you can just C-M-x an edited top-level definition in an Emacs buffer and it sends it to the Geiser REPL which is connected to the application you're developing...
<taylan>like Emacs itself, you know? change functions/variables *while* the program is running...
<Jookia>I don't use Emacs :\\
<peterbrett_work>I like the large standard library that Guile provides, and the useful C API to libguile
<peterbrett_work>It makes embedding Guile in other programs — and adding extensions to Guile written in C — much easier.
<peterbrett_work>I haven't found any other Scheme that's as good from that point of view
<Jookia>Is there support for generic programming in Guile? Like using a map function over different data types?
<peterbrett_work>Yes
<rekado>Jookia: you don't have to use Emacs to talk to the REPL. It listens on a socket.
<lloda>peterbrett_work: I haven't found Guile to be that reliable with m/threading :-| par-map locks up, or ends up running everything in a single thread
<Jookia>I suppose the idea is I wrap C tools in Guile and write my code in Guile?
<peterbrett_work>Jookia: exactly
<Jookia>That's pragmatic
<peterbrett_work>lloda: Interesting — I haven't played with parmap for distributing work — I've done it manually in the past
<Jookia>Is there a drive to implement things in just Guile?
<rain1>Jookia, imo guile is really good
<Jookia>rain1: Oh?
<lloda>peterbrett_work: have you used OpenMP under or over Guile?
<rain1>the best scheme implementation
<peterbrett_work>lloda: no I haven't
<peterbrett_work>Jookia: Yes; there's been an emphasis on writing applications in Guile rather than extending applications using Guile since about the time Guile 2.0.0 was released
<Jookia>Would Guile be a good language for newbies? It doesn't seem to have as much batteries included and fixing this would require wrapping or writing a lot of stuff. Ecosystems :\\
<lloda>... I'm somewhat allergic to threading manually, it's too easy to do it wrong
<Jookia>Me too :\\
<rain1>batteries like what
<Jookia>Well, JSON parsing, TCP sockets, threading, parallel work, actor model, etc
<rain1>I think it has all that
<Jookia>I have a feeling I could implement a lot of that myself
<taylan>lloda: peterbrett_work: IIRC the par-map bug was fixed?
<taylan>maybe not in a release yet
<lloda>I use master, but it's been a while since master was rebased on stable-2.0, if it was fixed there
<kristofer>morning!
<rain1>good morning
<kristofer>ya'll know about any scheme meetups? Im in indianapolis and all ive been able to find is a local closure group
<kristofer>clojure
<rain1>close enough!
<rain1>clojure adds some complexity and things but its still part of the family
<kristofer>the last meeting in the clojure group was in august 2015 :-/
<ArneBab>Jookia: Guile has pretty much, but it isn’t always easy to find what you need.
<ArneBab>Jookia: you’ll find yourself looking for ice-9 and srfi pretty much. But with these two, you’re covered.
<csed>I forgot how nice the new website looks.
<csed>The little gnu drawings are adorable.
<ArneBab>definitely!
<Jookia>How hard would it be to write a Guile compiler?
<davexunit>what do you mean? Guile already has a compiler.
<rain1>it's extremely hard......
<taylan>Jookia: it already has/is a compiler tower. currently the final stage is byte-code; it's on the roadmap to target native code for some platforms.
<rain1>you can read about some of the incredible optimizations and things behind guile in wingolog blog
<peterbrett_work>I guess it depends how good a compiler you want :)
<davexunit>what kind of compiler are we even talking about?
<davexunit>this question is vague and everyone is giving different answers to different interpretations
<taylan>sounds like normal human communication to me :P
<rekado>Jookia: https://nalaginrut.com/archives/2014/04/15/simple%2C-but-not-so-simple
<rekado>"This article introduced a simple way to define a very simple programing language with 50 lines code, in Guile."
<Jookia>As in, writing an implementation of Guile that takes a file of Guile code and compiles/interprets it
<rekado>Jookia: it includes writing a parser with "lalr-parser".
<rekado>oh, that's what you mean
<rain1>Jookia, that would be a serious difficult undertaking, especially getting all the libraries to work
<peterbrett_work>Jookia: There's already a very simple C implementation which is used to bootstrap the "real" Guile compiler
<taylan>recently someone asked on comp.lang.scheme why (if #f #t) doesn't return #t and (if #t #f) doesn't return #f. it turned into a huge thread with different answers and nobody noticing that the OP was talking about the behavior of the 'if' from propositional logic and just wondering why Scheme's if isn't defined like that in propositional logic.
<davexunit>Jookia: so you want to reinvent guile's compiler tower? is this as a learning exercise?
<rain1>On the other hand, the core of scheme is very simple and you can make an interpreter for it in a page or two of code
<taylan>(well, at least that was *my* interpretation of the question. :P)
<Jookia>davexunit: I don't want to do it, I'm just curious about how complex Guile is. Maybe that's a bad measurement
<davexunit>you need a Scheme interpreter + the Guile runtime (libguile)
<peterbrett_work>davexunit: To make a basic interpreter you probably don't even need that much of the runtime either
<ArneBab>Jookia: Guile is a runtime for Scheme and other languages. Do you mean how hard it would be to write a compiler for Scheme?
<Jookia>I thought Guile was a language
<peterbrett_work>No, it's a Scheme implementation
<ArneBab>Jookia: Guile Scheme is the language
<Jookia>The site said "Guile is a programming language" in big text :P
<ArneBab>Jookia: Guile itself can be used for several languages which can use each others code
<ArneBab>Jookia: oh… that’s not perfectly accurate then :)
<ArneBab>Jookia: I guess it’s because Guile Scheme is the main language in Guile
<rain1>lisp is afamily of languages
<taylan>ArneBab: I think we recently have a bit of a shift in the community towards the "separate language" mentality, a la Racket
<rain1>containing the scheme family of languages
<ArneBab>but it sure is a recipe for confusing people here :)
<rain1>containing guile
<ArneBab>taylan: do you have a reference for that?
<taylan>though so far Guile still conforms to R5RS and R6RS out of the box, and possibly R7RS in the future...
<taylan>ArneBab: nope, it's just my general impression :)
<ArneBab>taylan: aside of “we want to make it good for users, even where plain Scheme doesn’t suffice for that”
<davexunit>ACTION supports the Racket approach
<ArneBab>I think it’s good to stay compatible with Scheme, but Guile should stand on its own legs: Can’t depend on pure Scheme tutorials without giving up the additional capabilities of Guile
<davexunit>standard Scheme is useless without additional extensions, the standards people haven't got a clue, so let's just make Guile good for users and support standards where it's sensible.
<rain1>scheme family of languages contains {R4RS scheme, R5RS scheme, chicken, larceny, racket, guile, ...}
<rain1>most programs only work on a single implementation
<davexunit>right, I think it's better to view Scheme as a family of related, but different, languages
<rain1>davexunit, yeah like biological classification/geneaology :)
<davexunit>people thinking of Scheme as a single language has been harmful to Scheme
<davexunit>people complain about fragmentation
<davexunit>because what you write for one Scheme won't necessarily work on another.
<ArneBab>davexunit: I’d like to have a tutorial for writing real applications in portable Scheme…
<rain1>even the classic books need updated to be compatable with a specific scheme impl.
<rain1>for example, it could be a very nice thing to take SICP - and update it to work well inside guile scheme
<davexunit>which is OK! you shouldn't expect elisp programs to run on common lisp implementations
<davexunit>or C code to work in Java
<rain1>I think that would help beginners
<ArneBab>for example it would be nice to be able to easily see whether the code in a SRFI works in all Schemes
<ArneBab>⇒ for writing libraries and such
<rain1>the SRFI stuff is quite nice for compatability - they are usually given a 'portable' reference implementation. That means it doesn't take too much effort for a given impl. to touch it up to work in their version of scheme
<ArneBab>and such a tutorial would also note for which part I need to rely on specific functionality
<ArneBab>implementation-specific
<rain1>but sadly there is no standard way to import a srfi - so even if you are quite careful and program only using basic SRFIs. Your program still needs a custom 'include' bit for each impl.
<ArneBab>there is a SRFI for that…
<rain1>haha
<rain1>:D
<rain1>author by Godel?
<taylan>you import a SRFI like (import (srfi n)) ;-)
<ArneBab>(import (srfi :0)) http://stackoverflow.com/a/21813275/7666
<taylan>fine, or that :P
<ArneBab>that loses all the nice features of use-modules, though
<taylan>it supports exclusion, renaming, etc...
<ArneBab>taylan: can you give me an example to select a single function?
<wingo>ACTION thinks "use-modules" is an awkwardly named operator
<wingo>"import" is a much better verb IMO
<ArneBab>(import (only (srfi :1) first))
<ArneBab>^ taylan that’s it
<ArneBab>wingo: use-modules sounds like fortrans USE
<taylan>ArneBab: right (supported in R7RS too, FWIW)
<ArneBab>(import (only (srfi :1) first)) ; actually doesn’t look too bad
<ArneBab>this is the SRFI for importing SRFIs: http://srfi.schemers.org/srfi-97/srfi-97.html
<ArneBab>better: (import (only (srfi :1 lists) first))
<ArneBab>^ valid
<ArneBab>wingo: so, should we use (use-modules) or (import) when writing code for Guile?
<wingo>ArneBab: no idea :) as you like, basically.
<wingo>i still use use-modules
<lloda>I've been using import forever /shrug
<taylan>ACTION only uses 'import' when writing RnRS code
<mark_weaver>if it weren't for the R6RS/R7RS split, I might suggest that we start migrating to using R?RS library syntax for defining and importing modules in Guile code. but unfortunately, they couldn't agree on the syntax, and I'm still not sure which branch to adopt.
<jmarciano>Learning guile... instead of Perl: simple nginx configuration for 55 websites is running: http://paste.lisp.org/display/311140
<rain1>nice one :)
<ArneBab>mark_weaver: is it r6rs (library …) vs. r7rs (define-library…)?
<jmarciano>rain1: was reading info...
<mark_weaver>ArneBab: yeah
<ArneBab>mark_weaver: so these do not actually clash, right?
<ArneBab>jmarciano: nice!
<ArneBab>given that there’s define, define-syntax and define-record-type, define-library looks consistent
<mark_weaver>ArneBab: they don't clash, but if were to adopt one, we'd still have to choose which one to adopt.
<mark_weaver>and the standard module names are all different too
<mark_weaver>*if we were to adopt one
<ArneBab>mark_weaver: looking at http://wiki.call-cc.org/eggref/4/r7rs#libraries — do I have to make any definition in the library part of the body of define-library? is that different for (library)?
<mark_weaver>ArneBab: ask taylan, his knowledge of R7RS details is much fresher than mine :)
<taylan>ArneBab: yeah, the actual code of an R7RS library appears within 'begin' forms and files specified with 'include' and 'include-ci'
<taylan>e.g. (define-library (foo) (import (scheme base)) (export foo) (define foo ...)) is invalid.
<ArneBab>so define-library has exactly three fields?
<rain1>think of define-library as a language
<mark_weaver>ArneBab: no. why don't you read the R7RS itself? :)
<ArneBab>and I would write the code in one file and define the library in another?
<mark_weaver>the relevant section is not very long
<ArneBab>mark_weaver: good point :)
<rain1>you can express a lot of information about defining the module in it
<ArneBab>seems that the order doesn’t matter
<ArneBab>do I understand r7rs correctly that a file with a library definition and includes could be used similar to a header file?
<ArneBab>(in C)
<taylan>ArneBab: yes, somewhat
<ArneBab>that could simplify using a file as script and then turning it into a library
<ArneBab>currently it bothers me that I have to change the hashbang when I use shell indirection and move from script to module
<ArneBab>with the library syntax I would not have to
<taylan>well, if your library 'include's a source file that's otherwise a script, then the script will get executed as the library is loaded into the system, since the top-level is evaluated when the library is loaded
<ArneBab>but when I use #!/bin/sh \\n exec guile -e main -s "$0" "$@" \\n !# that should not happen, right?
<ArneBab>(with \\n as linebreak)
<taylan>FWIW, define-library is basically SRFI-7 with different identifiers and a small twist in the semantics
<taylan>ArneBab: oh, yes
<ArneBab>currently I have to change this to #!/bin/sh \\n exec guile -e '(@@ (PKG MODULE) main)' -s "$0" "$@" \\n !#
<ArneBab>when I change to a module
<ArneBab>which isn’t really nice
<ArneBab>using (include…) in a separate file would avoid that
<ArneBab>but I guess a script cannot include from a library which uses the script?
<mark_weaver>ArneBab: you should be able to load the file as a module, and the shebang will be completely ignored in that case.
<mark_weaver>but maybe I don't fully understand what you're doing here :)
<rekado>does anyone here have experience with artanis?
<davexunit>I personally do not like several design decisions of artanis so I just build on top of what guile provides.
<ArneBab>taylan: I just tried the library definition, but stumbled. To reproduce: echo '(define foo "foo")' > foo.scm; echo '(define-library (moo) (include "foo.scm"))' > moo.scm; guile foo.scm ; guile moo.scm
<ArneBab>this says /tmp/foo.scm:1:0: definition in expression context, where definitions are not allowed, in form (define foo "foo")
<ArneBab>I don’t understand why…
<rekado>I'm really rusty when it comes to web stuff. So many JS libraries were published since I last did something and I don't like to waste time reinventing the wheel.
<ArneBab>taylan: this even pappens when I just write moo.scm as (define-library (moo) (begin (define foo "foo") foo))
<ArneBab>s/pappens/happens/
<ArneBab>taylan: do you know what I do wrong? This is almost exactly what is done in page 29 of r7rs
<mark_weaver>xb
<mark_weaver>(oops)
<ArneBab>:)
<taylan>ArneBab: Guie's R7RS support is still stuck in the r7rs-wip branch
<taylan>Guile*
<mark_weaver>yeah, sorry about that. I really need to pick that work up again.
<mark_weaver>the main blockers before were: (1) performance problems in 'write' when support for printing circular datums is enabled (as per R7RS), and (2) my concern that the code was not sufficiently tested to go out the door.
<mark_weaver>well, there was also (3) my uncertainty of whether or not I should support or hinder R7RS adoption, but I decided a while ago that we should support it.
<mark_weaver>I have an idea of how to solve problem 1, but haven't yet found the time to implement it.
<taylan>mark_weaver: I have improvements on the branch and a rebase on stable-2.0. a test suite is among the improvements. (taken from either Chibi or Kawa; don't remember.) I'm not sure how I should share these changes, since it involves a rebase.
<taylan>but IIRC you wanted it rebased on master?
<mark_weaver>yeah, I remember saying that, although now I'm thinking maybe it should go to stable-2.0
<mark_weaver>taylan: the rebase to current stable-2.0 should be straightforward enough, I guess. apart from the test suite, what other improvements did you make?
<ArneBab>taylan: ah ok, that explains that :)
<mark_weaver>I remember the hack to support defining srfi modules using standard syntax and having them be implicitly renamed to our (srfi srfi-N) names, but I was thinking about solving that issue in a different way, dunno.
<mark_weaver>s/standard syntax/standard names/
<taylan>mark_weaver: integers in module names, and "correct" handling of (srfi n) library definitions and imports. also the work builds atop two patches I have for stable-2.0 that are technically unrelated to R7RS; I think I sent them to the devel and/or bug MLs a while ago: "Transform R6RS SRFI module names on definition." and "Fix 'include' for files in load path."
<mark_weaver>ah, I had forgotten about that last thing.
<mark_weaver>ACTION looks
<taylan>"correct" handling of (srfi n) definitions and imports means: upon definition, their name is transformed to (srfi srfi-n), and upon import, the import is transformed to (srfi srfi-n), so it works transparently, integrates well with R6RS-style (srfi :n) definitions/imports (where the same twin transformation happens), and with define-module/use-modules with (srfi srfi-n) style
<mark_weaver>taylan: right, there are other ways of making that work that I was considering
<mark_weaver>your approach is certainly in line with the current hacks we have in place in the R6RS code, but I think we can do better...
<taylan>(currently, after defining (library (srfi :n) ...), (import (srfi :n)) fails because the latter actually looks for (srfi srfi-n), but the former doesn't transform the name. I fixed this along.)
<mark_weaver>bah, gotta go afk for a while, sorry...
<taylan>np, laters
<dsmith-work>Tuesday Greetings, Guilers
<ArneBab>taylan: it would be cool to have r7rs support in 2.0.12
<taylan>maybe we could almost-support it for now, leaving out the guarantee that 'write' terminates on cyclic data. that could then be added in a later release.
<ArneBab>that would be nice, I think
<ArneBab>also 2.0.12 would be nice :)
<ArneBab>I just added separate entries for 2.0.11 and 2.1.2 on the Wikipedia page: https://en.wikipedia.org/wiki/GNU_Guile
<ArneBab>now Guile has a stable release and a preview release there
<taylan>someone needs to update the logo :) last time I tried I couldn't find an SVG to make a PNG of a suitable size.
<holomorph>the old guile logo is so cute ;_;
<snowylike>So I've been wondering, what's this years GSoC proposals?
***daviid is now known as Guest53570
<jmarciano>how to strip white spaces from string?
<janneke>string-trim-both?
<jmarciano>tried it now, thanks, I guess it trims from ends, not inside.
<davexunit>jmarciano: (string-delete (lambda (char) (char-set-contains? char-set:whitespace char)) "foo bar baz")
<jmarciano>davexunit: let me try that
<jmarciano>ok that is something to learn for me.
<jmarciano>good to know. I forgot to leave last space... so I need to strip only duplicates
<jmarciano>and I noted this one for later.
<jmarciano>trying out with regexp-substitute, I hope I am right there with the function
<jmarciano>how can I in regexp say "whitespace"?
<jmarciano>ok reading emacs regexes
<mark_weaver>jmarciano: Guile currently uses POSIX regular expressions: http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap09.html
<mark_weaver>[[:space:]]
<jmarciano>yes, reference manual brought me to Emacs regexes, and it was [:space:] there, now I know I must put it within []
<jmarciano>(regexp-substitute/global #f "[[:space:]]+" "Hello \\n\\nhere" 'pre " " 'post) -- like this works
<jmarciano>This same line above works in REPL, but not in script: unbound variable regexp-substitute/global, how can that be...
<mark_weaver>jmarciano: you need the (ice-9 regex) module
<jmarciano>but in REPL is not visibly loaded
<jmarciano>or is it automatically loaded when command arrives?
<mark_weaver>no, I guess the default REPL environment already has it imported
<davexunit>seems to be the case
<jmarciano>aha, did not know that. Because I did not have it in .guile
<jmarciano>it works like a charm now
<mark_weaver>it's a bit surprising. the relevant code is in the (top-repl) procedure in module/ice-9/top-repl.scm
<mark_weaver>the modules automatically loaded are: (ice-9 r5rs) (ice-9 session) (ice-9 regex) and (ice-9 threads)
<mark_weaver>if I had been around when this code was added, I might have objected
<jmarciano>anybody works with PostgreSQL in Guile?
<jmarciano>as I am searching equivalent to Perl hashes, like data{"key_id"}{"name"}
<davexunit>make-hash-table
<davexunit>hash-ref
<davexunit>hash-set!
<jmarciano>ok I will learn that
<jmarciano>I was thinking there is PG function for that automatically
<mark_weaver>jmarciano: for postgresql, guile-dbi might be your best bet.
<jmarciano>yes? I use guile-pg
<mark_weaver>there's also guile-pg
<mark_weaver>I haven't used either of them, so I can't meaningfully compare them.
<jmarciano>I guess I can skip hash making, with for-each-tuple simply, process and display
<jmarciano>I guess there are 3 of them.
<jmarciano>hmm guixSD sadly does not have yet guile-dbi or guile-pg
<Jookia>Time to package them? ;)
<mark_weaver>jmarciano: well, if you're interested in learning how to write guix package recipes, maybe this is a good way to get started :)
<mark_weaver>they are probably not difficult, and the folks on #guix are generally quite helpful
<Jookia>Guix is what's gotten me in to Guile
<jmarciano>mark_weaver: I want yes, but I cannot get guix to load as module. Because of: config.scm.in
<jmarciano>so that is stop for me.
<rain1>autoconf or something creats the .scm from the .scm.in
<jmarciano>you say it...
<jmarciano>problem is that I don't know where to run autoconf.
<mark_weaver>jmarciano: do you have Guix or GuixSD running now?
<jmarciano>now I am writing mutt function to search for contacts from database
<jmarciano>I have Guix package manager on alien OS
<mark_weaver>jmarciano: did you read the "Building from Git" section of the Guix manual?
<jmarciano>you think that would give me config.scm?
<mark_weaver>actually, #guix would be a better place to discuss this
<jmarciano>never mind, I tried, I will try other time...
<mark_weaver>jmarciano: config.scm is created from config.scm.in when you run ./configure
<mark_weaver>okay
<jmarciano>hmm
<jmarciano>I was doing it from git, later people told me, do it directly, not from git... I did it directly, now I can get packages and all. But not that I can load guix module. Obviously Guix can load it.
<jmarciano>never mind, I need some help on understanding this: http://www.nongnu.org/guile-pg/doc/Result-Transforms.html#index-for_002deach_002dtuple
<jmarciano>or to find somewhere example of it
<jmarciano>I can see in source how it is defined...
<jmarciano>not that I get it... at all.
<jmarciano>search engines are like nobody ever used this module...
<jmarciano>how do I test "if zero"?
<janneke>(= x 0)
<jmarciano>aha so easy ok
<davexunit>(zero? x)
<jmarciano>aha
<jmarciano>and now just to solve for-each-tuple
<jmarciano>I can string-append "\\t" as tab?
<mark_weaver>"\\t" is a string literal containing a single tab, yes
<mark_weaver>jmarciano: 'string-join' might be of interest
<jmarciano>I used string-append
<jmarciano>aha string-join is similar to Perl join()
<jmarciano>how can I create a list, like dynamically, something like 1..1000 to become list?
<holomorph>iota
<jmarciano>oh thanks
<jmarciano>I have almost got it. But now I don't get UTF8 from database.
<jmarciano>or basically is there way to check for utf?
<jmarciano>or maybe I need something with setlocale...
<jmarciano>my DB is giving utf8 output
<jmarciano>but Guile is showing ???? instead
<jmarciano>with export GUILE_INSTALL_LOCALE=1, I get only one ?, with 0, I get ?? for one unicode char displayed.
<jmarciano>ohhh
<jmarciano>I found what to do: (setlocale LC_ALL "") and now I get Unicode output.
<jmarciano>even though it makes no sense, but OK
<Jookia>try (setlocale LC_ALL "en_US.UTF-8") ?
<jmarciano>now... I am not trying, it works. Maybe next time when it doesn't.
<jmarciano>And I finished, now I have nice Guile external search of database, directly from mutt email client: https://gnusocial.club/notice/3317