IRC channel logs
2017-07-08.log
back to list of logs
<cmaloney>quick "I don't get it" question: if I do (eqv? "5" "5") in guile I get #f, but in racket I get #t. Is eqv? implementation dependent and if so what is guile doing differently? <janneke>two strings may or may not be the same object <janneke>note that Guile's reply will yield #t <cmaloney>and it says for characters and numbers that if they contain the same value then they return #t <cmaloney>I'm seeing that equal? is returning #t, which I expected <cmaloney>but the difference between eqv? is puzzling. :) <daviid>cmaloney: not for characters, I thing you are miss reading the doc here <daviid>cmaloney: but anyway, better use string=? on strings <janneke>cmaloney: wow, 2.0.9 -- that's ancient <cmaloney>janneke: Blame Ubuntu. They don't bump to 2.0.13 until 17.04 <cmaloney>daviid: Right, I get that. I'm trying to explain this to other folks and just noticed a discrepancy that I wanted to clarify. :) <janneke>cmaloney: how sad; oh well, as long as their users/customers are happy ;-) <daviid>cmaloney: I think you are confusing characters and strings <cmaloney>daviid: I think I'm more confused at how eqv is different between racket and guile. ;) <cmaloney>and racket is treating "5" as equivalent, whereas guile isn't. <daviid>cmaloney: so, this will do what you think: (eqv? #\\5 #\\5) <cmaloney>was describing the difference between eq, eqv, and equal in the context of "eq? does direct comparisons without checking type or value, whereas equal? does a deeper compare) <cmaloney>and wanted to include eqv in that explanation, but I think I'll leave that out <cmaloney>this is for folks who haven't necessarily seen scheme before, and it looks like this gets into implementation details <daviid>cmaloney: eqv? works fine :), but the doc says for numbers and characters... then you pass a string, which has 'nothing to do with' <daviid>scheme@(guile-user)> (equal? "5" "5") <cmaloney>right. So it looks like there is a difference of implementation between racket and guile <daviid>scheme@(guile-user)> (string=? "5" "5") <cmaloney>I think I have my answer though. Thank you for the clarification. <cmaloney>(and yes, I'm going to hand-wave eqv and show equal? and string=? for string comparison) <janneke>cmaloney: there's a difference of implementation in guile 2.0.9 and guile 2.0.13, and guile 2.2 and ... <janneke>most probably you can find similar differences in different racket versions too? <cmaloney>janneke: Possibly. I'm not sure as I haven't looked <cmaloney>adding it to the list of things that I find charming about scheme dialects <daviid>I managed to completely lock my erc buffers, no idea how... <daviid>yes, especially when you are talking to someone... had to kill restart... but ok <cmaloney>so it even changed between point releases. :-D <cmaloney>yeah, totally hand-waving this for this presentation <cmaloney>OK, I think I have this sorted then. Thanks again, all <stis>cmaloney: I think that string literals changed so that they share the same string object if put as literals in source code, that's why you get that behavior <stis>(let ((a (make-string 1)) (b (make-string 1))) (string-set! a 0 #\\5) (string-set! b 0 #\\5) (list a b (eqv? a b))) <stis>hey amz2: I'm trying to understand the consistency of a model. <stis>I'm reading a book that try to discuss what happens when you build an object by covering a spherical shell with loops of charges and a current. <amz3>I feel stupid with my webdev stuff <stis>hecking for Guile version >= 2.0.9... configure: error: Guile 2.0.9 required, but 2.2.2 found <stis>don't you need guile 2.2 stuff for this <daviid>stis: guile's autoconf macros have been updated, quite a while ago then once more recently, so it appears you have an (quite) old guile.m4 in the way ... <stis>(use-modules (ice-9 suspendable-ports)) <stis>(install-suspendable-ports!) <amz3>No, I mean Yes via guile-fibers <amz3>OT: it's far too hot here <davexunit>I've tried a couple of times and each time some weird stuff happens that I can't figure out <stis>amz3: the code in that repo seam to be old, not sure how to help then <stis>also I have problems loading fibers, I get <stis>ibtool: Version mismatch error. This is libtool 2.4.2 Debian-2.4.2-1ubuntu2, but the <stis>libtool: definition of this LT_INIT comes from libtool 2.4.6. <stis>libtool: You should recreate aclocal.m4 with macros from libtool 2.4.2 Debian-2.4.2-1ubuntu2 <amz3>stis: are you saying that you are trying to help me? <stis>well trying at least, thinks that fibers are a fun project <amz3>I am recording a video about wiredtiger right now <amz3>I will go back to fiber thing just in 30 minutes or so <amz3>AFAIK paroneayea successfully integrated guile-fibers with 8sync so it must be possible to integrate with guile-websocket <amz3>this issue is a road blocker for my guile hacking <amz3>I can't hack on guile without websocket support otherwise, I will need to wait for ijp to finish its work on javascript backend (or maybe, better help) <amz3>I could work on my imap implementation... <amz3>nalaginrut: I just discovered that the conference you participated in, is rated A* <amz3>I don't understand, it seems like the guile-websocket on fibers works <amz3>it the first time, I think something doesn't work and actually it works <amz3>most of the time it's I am facing the reverse situation <amz3>well, I was not prepared for that situation, this unlocks a lot of possibilies <amz3>I will stop making noise on the channel and try to debug this <amz3>so it hangs on 'write-response' from (web response) <amz3>not really, but it still hangs. <amz3>I know, I will try wireshark <amz3>this fibers websocket things will remain a mistery