<magnicida>I'm working on some library to make it easy to bind C++ code to Guile ***sajith is now known as Guest52073
<solene>hello, what is the best way to describe a structure with attributes in guile scheme ? I'm currently using (list '(attr1 . "value1") '(attr2 . "value2")) and retrieve values with (cdr (assoc 'attr1 mylist)) but I'm not sure it's the best way to achieve this <lloda>solene: in Guile there's assoc-ref <lloda>if you're not sure, encapsulate so you can change the structure later w/o affecting users <lloda>e.g. to a hash table later on <solene>indeed, assoc-ref is easier than my code, thanks lloda <solene>I miss getf and keywords from common lisp <solene>is it right that I can't use keywords instead of pairs ? like #:attr1 "value1" instead of '(attr1 . "value1") <mbuf>Does guile use pthreads? <mbuf>can it be used for parallel and concurrent programming? <solene>mbuf: AFAIK guile uses green threads so everything runs on one CPU but can share time between tasks <janneke>solene: you can use `((#:attr1 . ,v1) (#:attr2 . ,v2)) <lloda>solene: mbuf: Guile does use pthreads. See (ice-9 threads). It's not the most robust thing ever ime, but it's there. <mbuf>solene, lloda okay, thanks! <solene>janneke: that's the same as not using keyword ? <janneke>solene: i don't understand...using keywords as keys is using keywords, not using keywords as keys is using ... well whatever you are using <lloda>I think solene wants to (make-data #:key value #:other-key other-value ...) <solene>janneke: I'm still in a common lisp way to think so I have bad habits from a schemer point of view, both languages are close and also very differents. I was writing this in common lisp and wondered if it was possible (list #:attr1 "value" #:attr2 "value") <lloda>I guess you can build that taking a rest list and then using keyword->symbol <janneke>solene: ah...i'm not much of a lisper <janneke>i think (ice-9 optargs) has something for handling (list #:attr1 "value" #:attr2 "value") <solene>I'll see ice-9 and make-data, thanks janneke and lloda <solene>but assoc-ref works so at least I got one way to do what I need ! :) <mbuf>solene, what is the alternative to green-threads? <solene>mbuf: I don't know, I'm not using guile since a long time and I've read this in a tool documentation relying on guile that only green threads were available. and lloda said that pthreads were available with ice-9 <lloda>solene: make-data doesn't exist, I was making it up. You can build it though ***eagleflo_ is now known as eagleflo
***bgardner_ is now known as bgardner
<ArneBab>via (import (ice-9 threads))) ; see (help par-map) <ArneBab>it uses pthreads, though, which means you’ll want to have larger chunks of work. Essentially it gives you a thread pool. <ArneBab>mbuf: fibers manage to give you both: easy threading and full usage of all your cores. So go for that if you can. <mbuf>in GNU Artanis how is javascript added? <mbuf>ArneBab, will give it a try; thanks! <mbuf>ArneBab, is there anyone actively working on Emacs-Guile? <ArneBab>ACTION wants to have a development team who uses Guix and Guile and Emacs and Wisp to build meaningful programs. <ArneBab>now we just need someone to give us money for that :) <paroneayea>ACTION just sent "thanks for the reply" to the mailing list then felt awkward about it <rekado>I have some Czech coins left after my trip to Prague. I’d use them to fund work on Guix/Guile/Emacs/Wisp. <rekado>Now we only need to find people willing to match the donation. <janneke>ArneBab: i'm working with a team that has adopted Guile and is adopting Guix... <janneke>civodul: yeah, took me > 3 years in the physical universe <civodul>how much would it take in the virtual universe? <janneke>in the virtual universe, guile took 3 weeks, guix took only a week <civodul>OrangeShark: awesome! i have a few commits regarding settings and error handling <janneke>it's so cool how guile and guix reinforce eachother <OrangeShark>janneke: that is cool, how did you manage to pull that off? :) <janneke>OrangeShark: by helping others solve an impossibl problem using Guile, then practice patience and much hard work <janneke>ACTION tried much evangelism and finally gave up <civodul>yeah it always works better when you solve practical issues <janneke>civodul: Guile solved Rutger's problem -- that's almost 3 years ago <civodul>janneke: now we need Rutger to solve "our" problems :-) <paroneayea>since I don't have a good solution for suspending custom ports right now <paroneayea>I'm going to keep working on the 8sync-on-top-of-fibers thing so I can use an independent thread as a workaround <civodul>paroneayea: sorry i didn't help with this! <civodul>that's quite a lot to page in and my cache is kinda full ;-) <ArneBab>syntax: (test 'testname ...) with ... the forms from srfi-64. <ArneBab>avoiding (test-begin 'testname) and (test-end 'testname) makes for easier parsing. <ArneBab>(they are added automatically using the 'testname) <civodul>paroneayea: i'd like to play around with Fibers or 8sync "one of these days", so hopefully i'll get to these issues too <ArneBab>usage in the repl: (import (examples doctests)) (define (one) "(test 'foo (test-equal 1 (one)))" 1) (doctests-testmod (current-module)) <ArneBab>ACTION marks one more point on his convenient-coding-wishlist <rekado>I’m autoconf’iscating another in-house tool today and I wished I could use Guile instead of the autoconf/automake/m4 macros. <ArneBab>rekado: what’s missing for you in autoconf? (I think it’s pretty good that autotools keep their requirements tiny — you need something to build Guile while there is no Guile yet) <rekado>it would already be helpful to be able to generate configure.ac and Makefile.am from Guile. <rekado>I find the syntax arcane and it’s tedious and verbose to write custom checks. <paroneayea>and after swimming in this stuff for a while I'm finally getting it ;P <paroneayea>wingo: to do the gc of waiters, I'm assuming we're going to have to add a mutex around it right... right? <paroneayea>maybe I could implement stack-filter! using update! from stack.scm <paroneayea>I'm imagining a scenario where fiber A keeps doing stack-push! <paroneayea>and fiber B is trying to do asingle stack-push-all! <paroneayea>since fiber B will try to append an entire list and then spin if it fails <paroneayea>maybe this won't happen in practice but I worry about these kinds of things <ArneBab>rekado: do you know conf? https://bitbucket.org/ArneBab/conf ← my try at autotools templates: conf new <project> — currently mostly supports bash, but adding other project-types just requires adding templates. <rekado>ArneBab: I package a lot of bioinfo pipelines and this requires custom version checks all the time. <rekado>I also need to check for R packages, so I wrote a macro that starts R and tries to load the required libraries. <ArneBab>having a template with pre-created (but commented-out) checks might help a lot with that. <rekado>well, I can also just pour this into an m4 macro file <rekado>it’s just not something I enjoy doing and it’s error prone <ArneBab>would it be less error-prone with guile? Wouldn’t that actually add another layer of indirection? Or would you call Guile for the checks?