IRC channel logs


back to list of logs

<Guest96687>wingo: I can't find anywhere in guile-gnome's code [C and scheme] where <read-only-slot> is defined: please share the magic with me :) and abracadabra tell me where it is defined
<daviid>wingo: that was me, daviid :)
<wingo>sneek: later tell daviid i believe <read-only-slot> is defined in goops itself
<sneek>Got it.
<wingo>guile-2.1.3 archives ready for distribution:
<janneke>wingo congrats!
<Walakea>is it true that Lisp is underrated?
<nalaginrut>Walakea: well, it's Scheme which is underrated
<janneke>Walakea: i think that depends on who is doing the rating ;-)
<Walakea>what does Common Lisp offer in addition to Scheme?
<Walakea>i heard that CL is more suitable for practical programming
<janneke>Walakea: use whichever lisp dialect you like most, or fits your environment best
<rubdos>janneke, damn. I just wanted to go full Scheme+Lisp history on him.
<rubdos>But he's gone.
<wingo>s/him/them/, s/he's/they're/
<janneke>rubdos: why, you know them?
<janneke>rubdos: also, you have a link of that for me...I'm pretty green on that and all
<rubdos>No links, sorry. At the Vrije Universiteit Brussel, they get thaught Scheme in first Bachelor of computer science.
<rubdos>I got my first Scheme experience in third Ba.
<janneke>I'm an autodidact. Used guile as an extension language, mainly for simple expressions. It took me ten years to start to grok it. SMOBS and macros scared the shit out of me ;-)
<janneke>only lately i start to realise that my mind has always wanted to think functionally...and that the programming languages i used made that real hard, sometimes.
<amz3`>I still don't know what functionnal is really
<amz3`>functionnal programming
<amz3`>but, I'm very happy of my xor* procedure :D
<wingo>ok, release is done, have fun
<wingo>the web page should update shortly
<amz3`>artyom-poptsov: o/
<amz3`>by the way, I taking orders for adding feature in hyper
<artyom-poptsov>amz3`: Hello!
<amz3`>I'm not sure where to go from here
<nalaginrut>"functional" was understood as immutable, but nowadays it become a modern mystery with many confusing concepts
<galex-713>Hi, how can I base64-encode something (like a number) with guile?
<galex-713>I’m going to create an gmail account through tor and I want to generate a random mail address, thus using base64
<galex-713>or maybe base32
<galex-713>Depend of what’s accepted…
<galex-713>How do I create a charset and encode a number to it using it as a base/radix?
<galex-713>And how do I use a random source coming from /dev/random?
<nalaginrut>galex-713: For base64, you may read this implementation
<nalaginrut>galex-713: and for random, you may read this function
<nalaginrut>\\/dev/urandom is recommended
<galex-713>not for security
<galex-713>nalaginrut: why isn’t that integrated to guile? it seems pretty general
<galex-713>(although maybe libgcrypt or nettle could be used I think)
<galex-713>nalaginrut: wtf is base64 always considered cryptography? it’s just an encoding
<nalaginrut>galex|713: it was a weak crypto method, even Caesar cipher was considered crypto
<nalaginrut>although it's nothing crypto in modern view
<galex|713>That’s completely arbitrary and history-related :/
<galex|713>that lower security since then people can think it’s *really* crypto
<galex|713>nalaginrut: anyway, why isn’t that either in guile, either using a libgcrypt/nettle binding in guile? :)
<galex|713>well, rather nettle, libgcrypt seems to not implement base64
<nalaginrut>galex|713: you may ask wingo or mark_weaver, but we have gnutls for encryption
<galex|713>wingo: ^
<galex|713>nalaginrut: gnutls is only for tls I think
<galex|713>(and can’t find its doc in the guile reference)
<nalaginrut>galex|713: you should read guile-gnutls
<nalaginrut>it's in gnutls project
<nalaginrut>as built-in binding
<galex|713>that’s arbitrary too, no?
<nalaginrut>what does the mean by arbitrary
<galex|713>that it could has been as well in guile…
<galex|713>or, well, maybe less practical… dunno… complicated…
<nalaginrut>I think the binding is officially maintained by gnutls project, so it's fine
<janneke>amz3`: i see my functional bias as the wish to avoid state at all cost
<galex|713>Ok, I learnt both gpg PLUS coreutils PLUS nettle PLUS you implement base64
<galex|713>And probably each single programer on the earth
<nalaginrut>galex|713: oh, I forget there's industrial lib in Scheme
<nalaginrut>there're some mainstream crypto implementation in Scheme
<nalaginrut>I think it's one of the reason why we don't put them in Guile, since the lib is large
<janneke>amz3`: not wanting to see what can be considered "data" in program text, imparative statements that can represented as a list to map over
<galex|713>nalaginrut: so to teach people to copypaste code instead of using libraries?
<nalaginrut>galex|713: it is library
<galex|713>nalaginrut: more precisely, it’s a library not packaged in Debian :/
<nalaginrut>galex|713: I wrote/paste lot of code for Artanis because we lack many things 4 years ago
<nalaginrut>galex|713: you don't have to install it from apt-get, please try guildhall
<nalaginrut>galex|713: just like npm in node
<galex|713>nalaginrut: I suppose the easiest way to install guildhall is through guildhall?
<galex|713>Otherwise “trust github to run your distro” right?
<nalaginrut>for the libs in Guile, the installation is just copy it to the path
<nalaginrut>galex|713: yeah, pip insatll pip
<galex|713>nalaginrut: exactely
<galex|713>nalaginrut: so in first place I want debian to sign guildhall :)
<nalaginrut>well, you remind me that the signature is important if I write pkg manager for Artanis
<galex|713>a pkg manager for artanis :o
<galex|713>Why is everybody writing package managers? :(
<nalaginrut>pkg manager has three types: for system (yum, apt), for language (npm, pip), for project deployment (bundle)
<nalaginrut>they're very different
<nalaginrut>Artanis needs one for easy deploy
<nalaginrut>wingo: thanks for 2.1.3, I'm looking forward 2.2 release officially, and I guess it's possible in this year? ;-P
<galex|713>Oh got it
<galex|713>guile-gnutls packaged in stable but not in testing
<janneke>galex|713: because guix isn't ready yet?
<galex|713>janneke: guile-gnutls not packaged in testing has to do with the guix readiness?
<galex|713>janneke: do you mean guix will be used to ease packagement on debian?
<janneke>galex|713: was reacting on your 'Why is everybody writing package managers?'
<janneke>guix could be used to make deployment on debian easier...I used guix on debian since february
<galex|713>janneke: but why isn’t it ready? I thought it worked?
<janneke>galex|713: it's ready in theory, but in practice it still lacks packages/importers for guilhall pipi, npm
<janneke>galex|713: software that you need packaged, may not be there yet, and you may have to package it yourself. keeping your own set of packages is easy, contributing them is easy, but still...some effort might be required from your side
<galex|713>janneke: (I asked you the same on #guix so you can answer here so we can discuss with other #guix people and free this channel ^^)
<galex|713>no problem :)
<S1>I have an interesting bug (feature?). The REPL of Guiles C library changes the way, floats are interpreted in format strings. Before I call the REPL, printf("%f", 1.0) is evaluated to "1.000000", in a callback function of the REPL the same code is evaluated to "1,000000". I am using a german system btw, maybe the locale is the root of this behavior? A minimal code example can be found here:
<S1>The locale seems to be the root of this behavior indeed. When I call the program with LC_NUMERIC="en_US.UTF-8" (instead of "de_DE.UTF-8") the conversion happens correctly.
<S1>So is this supposed to be some kind of feature or is it just a bug?
<wingo>nalaginrut: it's possible :)
<wingo>S1: see
<wingo>the bit on GUILE_INSTALL_LOCALE
<wingo>running the repl will usually call setlocale() on your behalf
<S1>wingo: thx
<holomorph>wingo: hooray \\o/
<Walakea>how are scheme lists represented?
<Walakea>linked list or doubly linked list?
<alchmzt>probably a silly question, but how do i make an https request with (web client)
<alchmzt>(http-get "https://..") sends an http request
<Walakea>wikipedia says singly linked
<wingo>alchmzt: the answer is a little complicated, you need gnutls.... maybe nalaginrut is around and knows how this works
<random-nick>Walakea: singly
<sneek>Welcome back random-nick, you have 2 messages.
<sneek>random-nick, dsmith says:
<sneek>random-nick, dsmith says: Check out the various index pages, like See the addrinfo entry. Follow the link
<alchmzt>i did a few google searches, i found absolutely zero for "guile https request"
<wingo>we need to better support https in guile's web stuff
<random-nick>oh, thanks
<alchmzt>i would hope that guile automagically builds an https request when it sees the uri
<alchmzt>oh well
<alchmzt>is there any documentation i can read that might help?
<wingo> is an old patch
<alchmzt>i looked at the guile manual and google
<random-nick>Walakea: see
<Walakea>scheme version of arrays ae vectors?
<wingo>i think that links to guix which has an https implementation
<alchmzt>the situation is that bad?
<alchmzt>thanks for link
<alchmzt>i'll check it out
<Walakea>random-nick i downloaded the 800-page book but i think that is too massive for me
<alchmzt>Walakea: it is scary to begin with, but it's great having all of that in one place
<Walakea>to easily begin
<random-nick>Walakea: arrays in guile refer to multi-dimensional vectors
<random-nick>Walakea: so yes, single dimension arrays are vectors
<wingo>i can't believe we waited until 2014 to get mark_weaver to be a maintainer
<wingo>what were we thinking
***karswell` is now known as karswell
<nalaginrut>alchemizt: it's not hard to wrap a https-get with guile-gnutls, take a look at this:
<amz3`>is it possible to define the xor* procedure
<amz3`>to take multiple arguments, without a macro
<ijp>(define* ((xor* . blah) uid) will give you a list of arguments blah instead of the two you have now
<random-nick>also check out case-lambda
<amz3`>I could consume the rest argument until there is no more argument but a b
<amz3`>it's similar to the macro actually
<amz3`>ACTION looking at case-lambda
<ijp>case lambda isn't a good fit
<ijp>well, a no better fit
<amz3`>I like case-lambda; not sure why it's not a better feet
<ijp>but you don't have to stop at two arguments, 0 is an identity, so you can go all the way down to 0 args
<amz3`>(xor) == 1 ?
<amz3`>(xor 1) then?
<amz3`>ah ok I did not know about that
<ijp>in fact, this is how logxor works
<mark_weaver>for any binary operation, if (f a id) == a for all a, then 'id' is an identity for that operation, and it is certainly the case that (xor a 0) == a for all a
<ijp>(define ((xor* fs) uid) (fold logxor 0 (map (lambda (f) (if (procedure? f) (f uid) f)) fs)))
<ijp>you can straightforwardly merge the fold and map, but I didn't bother
<ijp>fs -> . fs
<mark_weaver>well, I should have said "for any commutative binary operation"
<mark_weaver>or, if not, I should have said "if (f a id) == (f id a) == a for all a"
<mark_weaver>but you get the idea :)
<amz3`>ijp: there an issue with you line
<amz3`>I think...
<mark_weaver>ijp: I would move the (procedure? f) out of the lambda, so that it doesn't get checked on every iteration.
<mark_weaver>oh, nevermind...
<mark_weaver>sorry, didn't read the code carefully enough
<amz3`>ijp: if one of fs is a procedure the result of the map should go through xor*
<amz3`>or is it mistake in the original function
<ijp>it's fine
<amz3`>you are prolly right
<ijp>I mean, I guess the code is different if you have procedures that return procedures
<ijp>but such procedures could be uncurried and the duplicate arguments removed
<ijp>pretty straightforward exercise
<Guest14035>wingo: congrat for the release!
<amz3`>yes you are right
<daviid>ACTION <- who am I
<sneek>daviid, you have 1 message.
<sneek>daviid, wingo says: i believe <read-only-slot> is defined in goops itself
<daviid>wingo: thanks
***siel_ is now known as siel
<daviid>wingo: so, could you now please fix bug#20093 with the highest priority and let me know, so I can start to use master asap as well, thaaaannnks!
<stis>heya guilers!
<fantazo>how do guilers do a "auto-reloading loop" for developing?
<fantazo>and is there a way to unload an extension? like in "I have recompiled extension X and I want that guile uses the new-recompiled version and not the old one which is now in memory"
<mark_weaver>fantazo: I don't think we have a way to easily unload C extensions, or at least I don't know how to do it, but for normal scheme modules you can use the ,reload REPL command
<mark_weaver>I would just keep relaunching guile
<mark_weaver>when debugging a C extension
<fantazo>mark_weaver, has that something todo with ffi lib or some implementation detail?