IRC channel logs

2015-05-08.log

back to list of logs

<daviid>folks, trying to grab the max of info about this C++ binding problem, using guile FFI I mean, or even G-Wrap but _not_ using libguile, and I came accross swig
<daviid>I thought it was dead but it seems well alive and recently patched the swig-guile functionality and the manual even refers to '... prior to guile 2.0.9 ...', so it's seems maintained...
<daviid> I wonder why it has never discussed here? swig-guile maintainers (it seems 3 persons are/have been invloved) where are you? I've quizz... :)
<not_a_tiger>What is "value v" here? http://www.gnu.org/software/guile/manual/guile.html#Closure
<mark_weaver>not_a_tiger: the value v is the result of evaluating the body of the let, in this case (sqrt (* s (- s a) (- s b) (- s c)))
<mark_weaver>"value v" is referred to again in the last item of that list.
<mark_weaver>it could be written better
<mark_weaver>the guile manual is okay as a reference, but I'm not sure it's the best way to learn scheme
<mark_weaver>for that, I would recommend other books, such as "The Little Schemer" or "Structure and Interpretation of Computer Programs" (SICP), the latter of which is available online with video lectures by the authors
<not_a_tiger>mark_weaver: Is "value v" just the Scheme-ish way of referring to the result of evaluating any expression? What does it mean?
<mark_weaver>no, it's not scheme-ish, it's just a bit awkward. instead, it might have been written like this: "let v be the result of evaluating the body of the let expression".
<not_a_tiger>I'm finding references to "value v" on pages about C++ and financial formulas. Is it some kind of mathematical notation?
<mark_weaver>well, in mathematics it is common to use single letters like 'v' as "variables"
<not_a_tiger>no it isn
<not_a_tiger>'t just a stand in for generic x
<not_a_tiger>value V ∈ [0, 1]. , we first find chroma:. T
<mark_weaver>huh?
<not_a_tiger>I think that's the notation for summation of a matrix
<not_a_tiger>Or something
<not_a_tiger>I didn't get that far in math
<not_a_tiger>fuckit
*not_a_tiger is to dumb for scheme
<mark_weaver>if you want to learn Scheme, I would recommend starting with "The Little Schemer". it's a great book.
<ijp>gone
<mark_weaver>alrighty then....
<ijp>you'll be happy to know he immediately came on #emacs and started complaining about how he is too stupid for scheme
<mark_weaver>heh
<zacts>hi
*wingo has made some progress on the cps2 experiments
<nalaginrut>wingo: nice
<nalaginrut>btw, I found it seems there's bug while expand define-macro
<nalaginrut>the activity is different between 2.1 and 2.0
<nalaginrut>so there should be a bug in certain side
<wingo>interesting
<nalaginrut>I'm trying to write typical code to reproduce it
<nalaginrut>but anyway, if one use the latest Artanis with guile-2.0, it's revealed immediately
<nalaginrut>it's fine in 2.1
<nalaginrut>I think it's related to define-macro within define-macro
<nalaginrut>I mean define-macro in define-macro
<nalaginrut>I mean use define-macro in define-macro
<wingo>don't use define-macro :-)
<wingo>doesn't mean there's not a bug of course
<nalaginrut>wingo: I have to use macro to define something before loading a file
<nalaginrut>it's better if there's alternative
<nalaginrut>I don't like define-macro too
<nalaginrut>it's not Scheme though
<nalaginrut>wingo: I want to define something before loading a file, and the code in this file will use these predefined thing
<nalaginrut>and the name of these predefined things will be generated when loading
<nalaginrut>anyway, define-macro works fine for me in 2.1
<wingo>i get an unpacker error when pushing to master
<wingo>is that a guix thing i wonder
<lloda>match question, http://paste.lisp.org/display/147958
<lloda>shouldn't the first be equivalent to the second? it gives me a macro error.
<nalaginrut>lloda: I think the order is same
<nalaginrut>lloda: I got same error, and I thought it should be same
<nalaginrut>but it's not
<nalaginrut>lloda: maybe add one more rule (match-two v (or (quasiquote p) ...) g+s sk fk i) to match-two could solve this problem
<stis>lloda, looks like a match bug to me, you could try to get the attention of alex shin at #scheme, guile is using his code
<wingo>*shinn
<stis>he's called foof there if I'am not misstaken
<stis>oups sorry!
<wingo>heh np :)
<stis>oh you don't need any variables at all in the failing version, that will stll bail out
<lloda>stis: I don't understand that last sentence
<lloda>racket gives me stdin::17: match: variable not bound in all or patterns at: x in: (or (quasiquote (a (unquote y))) (quasiquote ((unquote x) b)))
<lloda>I guess that's a different implementation?
<lloda>anyway, asking at #scheme, thanks for the pointer
<stis>in the first verision use (or `(a b) `(a b)) that fails as well
<lloda>ah, I see :-/
<lloda>that does work in racket
<jmd>Is there a function to make (assq-set! (assq-set! (assq-set! x 'this #f) 'that 0) 'other "xx") easier ?
<davexunit>I don't understand what that code is doing
<davexunit>if you actually feel the need to use assq-set!, you might as well just use a hash table.
<jmd>davexunit: It is hard to understand. That's one reason why I'm looking for something to make it easier.
<jmd>I could of course write a function, but I thought that probably one exists.
<davexunit>but what is this code accomplishing? I don't see an alist given here.
<davexunit>looks like you're trying to set 3 values on an alist?
<davexunit>just cons them on
<davexunit>(append '((this #f) (that 0) (other "xx")) my-alist)
<dsmith-work>Happy Friday, Guilers!!
<jmd>davexunit: But the alist may already have values with those keys.
<jmd>I want to overwrite those values if they exist.
<davexunit>jmd: that's okay
<davexunit>that's how you overwrite them in an alist
<davexunit>(assq-ref '((foo . 1) (bar . 2) (foo . 3)) 'foo)
<davexunit>returns 1
<jmd>Huhh!!???
<davexunit>it's a little odd, but it makes alists a persistent data structure.
<davexunit>which is a great quality to have.
<jmd>(append `((this . "xx"))`((this . "xx"))) will give a list with two members wont it?
<davexunit>yes
<jmd>Well then the list will grow indefinitely.
<davexunit>rarely an issue.
<jmd>It will be in my case.
<davexunit>but if you really would rather mutate something, you should use a hash table.
<duud>Hi #guile, when doing ",L elisp ; (/ 1 1)" I'm getting: ERROR: In procedure public-lookup: No variable bound to / in module (language elisp runtime function-slot)
<duud>Just trying to benchmark guiles elisp implementation
<duud>What's needed to try elisp in guiles repl?
<dsmith-work>duud: scheme@(guile-user)> ,L elisp
<dsmith-work>Happy hacking with Emacs Lisp! To switch back, type `,L scheme'.
<dsmith-work>elisp@(guile-user)> (+ 1 1)
<dsmith-work>$1 = 2
<dsmith-work>
<dsmith-work>duud: That's from master though
<dsmith-work>scheme@(guile-user)> (version)
<dsmith-work>$2 = "2.1.0.1814-eb9d44"
<duud>(+ 1 1) works but (/ 1 1) doesn't
<duud>I'm also on master
<dsmith-work>Indeed
<dsmith-work>Sounds like bug report time
<dsmith-work>sneek: bugs?
<sneek>Last time I checked bugs is send reports to bug-guile@gnu.org, and see bug reports at http://bugs.gnu.org/guile
<duud>ok, it's guile not me :)
<dsmith-work>duud: bipt would know.
<dsmith-work>Maybe some things haven't been merged back into guile yet.
<duud>That's strange, I compiled guile-emacs and (/ 1 1) and a lot of other stuff works inside emacs but not when I start a standalone repl and switch to elisp
<duud>Also what about the library functions that emacs provides, how do I load/access them inside the repl?
<bipt>duud, you can't usefully load most emacs libraries from guile's elisp alone, because most of them depend on parts of emacs not implemented by guile (e.g. buffers or even just defcustom)
<bipt>you can access scheme from within emacs, though, using the 'eval-scheme' function or scheme-interaction-mode
<duud>ok, makes sense
<bipt>and guile-elisp doesn't implement quite a lot of basic functions atm (even '/'), because they're provided by emacs and weren't essential for replacing the VM
<bipt>what's defined in module/language/elisp/boot.el (and special forms from compile-tree-il.scm) is all you get in guile's elisp
<duud>I see, thx
<ArneBab_>bipt: is the state of guile-emacs on emacswiki up to date?
<bipt>ArneBab_, yes. no major changes since last summer, but i'm actively working on it again as of last month
<ArneBab_>bipt: I read that, and I’m thrilled!
<ArneBab_>and it would provide guile for a huge number of platforms
<bipt>i hope to make the page completely out of date soon, especially the part about performance problems ;)
<davexunit>wow :)
<ArneBab_>cool!
<ArneBab_>bipt: can we help you (with a moderate time investment)?
<ArneBab_>(that’s all I can offer…)
*dsmith-work cheers bipt on
<paroneayea>bipt: \\o/
*paroneayea joins in the cheering
<bipt>thx everyone :)
<bipt>ArneBab_, it isn't very easy to contribute atm, but i plan to make it more accessible over the next few months
<ArneBab_>bipt: please drop me a note when I can help.
<bipt>there are some ideas on GuileEmacsTodo, but a lot of the tasks are too big/difficult ("Unify Elisp and Scheme strings")
<bipt>i will be sure to ping you
<paroneayea>bipt: and I've offered such before, but if you ever want help in promoting things, I'm more than happy to :)
<paroneayea>(I'd like to imagine I could help in coding but realistically I don't think I have the skills for it!)
<paroneayea>in the meanwhile I'll just be over here being excited about it :)
<ArneBab_>bipt: does guile-emacs still die when used with -nw?
<ArneBab_>bipt: in general it would be great if you could keep the GuileEmacsTodo up to date (on the high-level stuff): http://www.emacswiki.org/emacs/GuileEmacsTodo
<paroneayea>ArneBab_: I think wingo said bipt is currently rebasing guile-emacs on top of current emacs or something, maybe that is something that can be done after the next push of things?
<ArneBab_>that would be cool, yes
<paroneayea>also, oh hey, now that I know how to guix package things, I probably *can* finally do guile-emacs packaging :)
<ArneBab_>the script does not look too complicated: http://emacswiki.org/emacs/GuileEmacs#toc4
<paroneayea>ArneBab_: yes but many guile people already play with guix, maybe we can see more people testing things out if guix packaging exists...
<ArneBab_>definitely - I did not want to say that the guix package isn’t needed, but rather that it shouldn’t be too hard to do
*paroneayea nods
<ArneBab_>I’ll try installing guile-emacs on my homeserver (there long compile times don’t hurt)
<paroneayea>maybe there's no time like the present!
<paroneayea>after a typing break I'll try a guile-emacs package.
<bipt>ArneBab_, it does die with -nw, and i finally debugged it and determined that it's not my fault :p it happens upstream as well when dumping is disabled
<ArneBab_>oh…
<taylanub>hahaha
<taylanub>bipt: may I post that on #emacs for some laughs? :P
<bipt>taylanub, sure :D
<bipt>paroneayea, a guix package would be cool!
<paroneayea>bipt: :) I'll ping you when I have it together!
<bipt>i should note, wrt packaging, that it's hardcoded to load .el from the source directory (again, hacking around an upstream problem with not dumping emacs). but i think i could fix it
<paroneayea>bipt: oh, that's probably a problem