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... :) <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>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>I think that's the notation for summation of a matrix *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>you'll be happy to know he immediately came on #emacs and started complaining about how he is too stupid for scheme *wingo has made some progress on the cps2 experiments <nalaginrut>btw, I found it seems there's bug while expand define-macro <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>I think it's related to define-macro within 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>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 <wingo>i get an unpacker error when pushing to master <wingo>is that a guix thing i wonder <lloda>shouldn't the first be equivalent to the second? it gives me a macro error. <nalaginrut>lloda: I got same error, and I thought it should be same <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 <stis>he's called foof there if I'am not misstaken <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 <jmd>Is there a function to make (assq-set! (assq-set! (assq-set! x 'this #f) 'that 0) 'other "xx") easier ? <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>(append '((this #f) (that 0) (other "xx")) my-alist) <jmd>davexunit: But the alist may already have values with those keys. <jmd>I want to overwrite those values if they exist. <davexunit>(assq-ref '((foo . 1) (bar . 2) (foo . 3)) 'foo) <davexunit>it's a little odd, but it makes alists a persistent data structure. <jmd>(append `((this . "xx"))`((this . "xx"))) will give a list with two members wont it? <jmd>Well then the list will grow indefinitely. <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>Happy hacking with Emacs Lisp! To switch back, type `,L scheme'. <duud>(+ 1 1) works but (/ 1 1) doesn't <duud>ok, it's guile not me :) <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 <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 <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_>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 ;) <ArneBab_>bipt: can we help you (with a moderate time investment)? *dsmith-work cheers bipt on *paroneayea joins in the cheering <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? <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? <paroneayea>also, oh hey, now that I know how to guix package things, I probably *can* finally do guile-emacs packaging :) <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 <ArneBab_>I’ll try installing guile-emacs on my homeserver (there long compile times don’t hurt) <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 <taylanub>bipt: may I post that on #emacs for some laughs? :P <bipt>paroneayea, a guix package would be cool! <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