IRC channel logs


back to list of logs

<koz_>Does Guile have a map-indexed kinda function? It basically works like map, but also calls proc with the index of the entry it's being fed.
<koz_>So (map-indexed foo '(a b c)) would call (foo a 0) (foo b 1) (foo c 2) and collect them into a list.
<Petit_Dejeuner>(map foo lst (iota (length lst))) ?
<koz_>Petit_Dejeuner: So 'no', I guess. Oh well, I can just write it.
<davexunit>yeah, it's easy to write.
<koz_>For the R6RS assertion-violation, what does the who and the irritant1 etc argument expect?
<koz_>Like, strings, symbols, some other thing?
<davexunit>that I do not know
<koz_>The manual doesn't explain it like, at all.
<koz_>I guess I could try...
<davexunit>if you figure it out, a patch to the manual would be great!
<koz_>davexunit: Seemingly it takes symbols and even evaluates them.
<koz_>So passing it a symbol bound to a procedure will be expanded to a procedure.
***profan_ is now known as profan
***petercommand is now known as petercommandA_A
***petercommandA_A is now known as petercommand
<turbopape>morning guys !
<turbopape>I have one use case I wanted to ask you about:
<turbopape>is developing a datastore in C, and using Guile as a vector for its manipulating DSL a good idea ?
<turbopape>I mean, guile would be the basis for an API permitting to manipulate the inner C data structures, ...
<ArneBab>turbopape: Guile is well suited to build a DSL, so I’d say yes. Just ensure that it is available on all platforms you want to target.
<ArneBab>turbopape: however you could start by implementing the datastore directly in Guile (rapid prototyping) with the option of moving it to C later, when you find out that you actually need the CPU-efficiency.
<turbopape>thank you ArneBab.So I assume the C structs and functions are directly callable from Guile right?
<ArneBab>Have a look at FFI for the details:
<amz3>turbopape: what kind of datastore do you want to develop?
<amz3>I'm asking because there is bindings of wiredtiger that can help you in the task
<turbopape>amz3 It is a document store, in the vein of those modern NoSQL stores
<turbopape>I will have a look on wiredtiger
<turbopape>thank you for the pointers amz3...
<turbopape>Thank you ArneBab, I am going through the manual and I've a taste of integrating C in Guile already.
<amz3>wiredtiger is the backing store of mongodb
<amz3>well the repository is at
<turbopape>yeah, I've seen it. But how is its licensing amz3?
<amz3>it works with develop branch of github/wiredtiger/wiredtiger
<turbopape>Let me check on github...
<amz3>gplv2 or gplv3
<amz3>I'm very interested in contributing to such a project so don't hesitate to ask
<turbopape>okay amz3, thank you !
<turbopape>I consider maybe opensourcing the data store (guile + wiredtiger)
<turbopape>but selling proprietary "business" software on top of them...
<turbopape>I think it is possible as far as the GPL is concerned...
<turbopape>as I am linking to the library, I'll opensource
<turbopape>but as I will be connecting to the DS, I can sell, right ?
<turbopape>thnk you for the ideam amz3, I was considering going with leveldb but I was reluctant, too old and too limited...
<amz3>it's much faster than leveldb
<turbopape>you are the author of guile-wiredtiger amz3?
<turbopape>amirouche ?
<amz3>amirouche is my real name
<turbopape>oh ! so you are the amirouche that answered my question on guile-users rgarding ? I am Rafik naccache :)
<amz3>ok ^^
<amz3>yes it's me
<turbopape>nice to meet you amz3 !
<turbopape>I come from clojure
<turbopape>I developed a simple DS with clojure and leveldb, but had to do myself the documents stuff
<turbopape>I came here because I thought using leveldb thourgh JNI through Clojure was too limiting...
<amz3>leveldb has no transaction
<turbopape>and I found a project ready for me in scheme :)
<amz3>basically the reason
<amz3>but building a database is no simple
<turbopape>It is a long and tough project
<turbopape>I intend to add history management...
<amz3>you want to do datomic?
<amz3>a datomic?
<turbopape>nope, not thinking about datalog
<turbopape>for the moment being
<turbopape>just a versioning of the documents with possibility of querying the different versions
<turbopape>plus a simple query language to go back in time
<turbopape>I can contribute to guile-wiredtiger, that would save me precious time
<amz3>hmm, I mocked the declarative querying using minikanren (a datalog like DSL)
<turbopape>Cool! I am into miniKanren,
<turbopape>I wrote a book on clojure with a full chapter on core.logic (minikanren on clojure)
<amz3>turbopape: there is a few problems to install guile wiredtiger but it's possible to do, I should fix it, but right now I can't
<turbopape>I love minikanren, I can surely go fastly with it...
<turbopape>thx !
<turbopape>I'm gonna focus on guile - wiredtiger
<amz3>I'm not sure how you can sell it tho
<turbopape>No, I'm not thinking about selling the datastore
<turbopape>but some business apps around it.
<turbopape>banking, finance, etc...
<amz3>you plan to do those apps in guile?
<turbopape>The dataStore and computation part. I don't think the frontend part would be easily done in guile.
<amz3>I'm trying biwascheme now days...
<amz3>but I don't have anything ok with it
<amz3>that's said I know it works
<turbopape>does biwa spit js ?
<amz3>but bindings it with React.js is not easy
<amz3>turbopape: no
<turbopape>for react you have om that's simple and great (in clojurescript)
<amz3>I should have a look at how they do it
<amz3>thanks for suggesting it
<amz3>nice chating with you turbopape, I gotta go
<turbopape>my pleasure amz3, see ya !
<mthl>nalaginrut: Hi, jut to let you know I have packaged Artanis in Guix.
<nalaginrut>mthl: thank you very much!
<nalaginrut>mthl: could you please point me out how to install it with Guix? And I could update Manual for it
<mthl>nalaginrut: Using Guix is a little involving. Normally everything is documented is the Guix Manual
<mthl>The binary installation is the way to go for fast installation, then you will have to set some environment variables, and create some builder/group.
<mthl>What I describe is better describe in the manual
<nalaginrut>mthl: so I just need "guix build artanis"?
<mthl>It depends what you want to do :)
<mthl>For installation the command is "guix package -i artanis"
<mthl>For a development environment to build Artanis from it's tarball it will be "guix environment artanis" to launch a shell with the dependencies, then "configure && make && make install"
<mthl>Actually The package definition I have done miss the database optional dependencies which are not packaged yet.
<mthl>nalaginrut: Maybe you will want to give a try? :)
<mthl>Since you are a Guile hacker it will be nice to have you involved with Guix.
<nalaginrut>mthl: thanks, but I just want to ask if the package name is "artanis" or "artanis-0.1.0" ;-)
<mthl>the package name is “artanis”
***karswell` is now known as karswell
<darthlukan>mark_wea`: Just wanted to thank you again for the help last week
<darthlukan>it's been slow going so far as making something useful with guile, but that's my own lack of imagination
<darthlukan>I am finding that it's a lot more intuitive than I previously gave it credit for :)
<jpp>Hi all. I'm new to guile (and Scheme) so just had a basic question.
<jpp>When I try to use (string->number "3"), I get an error that says "ERROR: In procedure exact?: Wrong type argument in position 1: "3""
<jpp>Any idea what I'm doing wrong?
<davexunit>(string->number "3") works for me
<ft>Works for me
<jpp>Ok, let me re-start my session and see if that helps.
<jpp>Well, I restarted and it's working now. Thanks for the help!
<davexunit>perhaps you re-defined what that procedure does accidentally
<jpp>I think that's what I did. I was going through the "Simply Scheme" book online, which comes with a file that re-defines a lot of basic procedures. So that must have been it.
<jpp>Thanks again.
<Zerock>Gem of the day:
<mark_weaver>to make matters worse, that code is gross, improperly indented, and incomplete.
<mark_weaver>anyone who sees "beauty" in that code has a different idea of beauty than me. I suspect the poster actually wanted to make lisp look as bad as possible.
<mark_weaver>not a "gem" to these eyes...
<Zerock>mark_weaver: It's the concept, not the code.
<Zerock>Because he didn't even use a monospace font.
<mark_weaver>poor execution
<civodul>ACTION got "The Little Prover" for his birthday \\o/
<Riviera>happy birthday then 8)
<civodul>thanks ;-)
<civodul>(that was yesterday)
<Riviera>belated* :)
<civodul>i feel like it's a book that can change my programming life, we'll see
<sleblanc>basic question: how can I check if a variable of some name exists? something like #ifdef THEVARIABLE … in CPP
<sleblanc>i.e. I know the name of the variable, but not if it is defined or not
<paroneayea>civodul: ooooh
<paroneayea>civodul: I have it but have not made it through it yet...
<paroneayea>civodul: so many good lisp books to make it through... (I'm working through SICP exercises right now!)
<civodul>paroneayea: and you know what, it reminded me of our discussion regarding the web site and the drawings
<civodul>i already had "The Reasoned Schemer"
<paroneayea>civodul: :) I love The Little books for that
<civodul>and both have those funny drawings that make them very inviting
<paroneayea>civodul: you might have seen my tutorial suggestion for the site email
<paroneayea>civodul: which takes some ideas from The Little Schemer
<paroneayea>using toys instead of food
<civodul>not seen it yet, i have a guile-devel backlog
<civodul>oh, cool
<paroneayea>civodul: I thought since we have drawings of kids playing with toy robots, it could be a nice fit
<paroneayea>sirgazil seemed to approve, so :)
<civodul>sounds like a good idea, i should catch up on this :-)
<artyom-poptsov>sleblanc: Hi. There's 'defined?' procedure; I suppose it does exactly what you need. I.e.: (defined? 'the-variable)
<sleblanc>artyom-poptsov, sounds good to me. It's hard to look up this kind of Scheme stuff on the net because you end up with many results for common scheme, guile, r5rs, etc.
<koz_>sleblanc: You should dig through the Guile manual for these things - it's quite well-indexed.
<artyom-poptsov>sleblanc: Agreed with koz_, the manual is the right point to start from:
<mark_weaver>sleblanc: there are subtle problems that arise from typical uses of 'defined?'. out of curiosity, what do you need it for?