***dje is now known as xdje
***cluck` is now known as cluck
<zacts>My irssi server is back online <zacts>I've checked the logs, and see no responses. mark_weaver must be busy. =) <mark_weaver>sorry, I've been very busy with other things. and I wrote that procedure for you once already :-P <zacts>if you find the time to help that would be great, if not I may be able to figure it out myself. <zacts>basically I only need to know how to implement (reset) in guile2 <zacts>(reset) => ;; exits any procedures it is within, and returns the user to the REPL <mark_weaver>zacts: (define (reset . results) (abort-to-prompt (default-prompt-tag) (lambda (k) (apply values results)))) <mark_weaver>this is enhanced from what you asked for: you can optionally pass one or more arguments to 'reset', and it will return those results to the REPL. <mark_weaver>by the way, if you were to save that 'k' somewhere (or return it to the REPL), that's a continuation that could be used to restart the computation from where it was stopped. the argument(s) to 'k' would become the return value(s) of 'reset'. <zacts>I have guile-reset.scm backed up, so yeah. thanks. <Chaos`Eternal>i had asked a question that is there any yaml parser/generator in Guile? <nalaginrut>what's the alternative of scm_str2symbol, it's dropped in maser? *taylanub puts it on the TODO to implement a YAML parser in R7RS <nalaginrut>taylanub: thanks for doing that, I'd love to have it too <nalaginrut>seems Guile-2.0 has problem to compile with g++, I have some code written in C++ and used Guile for extension <nalaginrut>gsubr.h:68:13: error: initializing argument 5 of scm_unused_struct* scm_c_define_gsubr(const char*, int, int, int, scm_t_subr) [-fpermissive] <taylanub>YAML seems very complex so don't count on me on ticking off that TODO point in the near future. :P <nalaginrut>alright, I added -fpermissive, it's gone, but seems g++ doesn't like these code ;-P <taylanub>hm, I wonder why (with-input-from-string "\\ufeff!" read-char) => #\\! instead of #\\177377 (0xfeff) <taylanub>Chaos`Eternal: if you want something usable for Guile ASAP, you could make libyaml bindings <mark_weaver>nalaginrut: can you show us the entire error message? <mark_weaver>it sounds like you're calling 'scm_c_define_gsubr' from somewhere, and you probably need to cast the 5th argument to (scm_t_subr) <nalaginrut>I hope it's not a problem in Guile, but in my code <lloda>when I moved from 1.8 to 2.0 I had to cast the last arg of scm_c_define_gsubr to (void *). In 1.8 I used SCM (*)() there. The definition in gsubr.c uses SCM (*)(), but gsubr.h uses scm_t_subr which is void * (per __scm.h). There's a comment at the definition of scm_t_subr. <lloda>so, the last arg of scm_c_define_gsubr has to be void *. <mark_weaver>I think it's better to cast to 'scm_t_subr', because that's what actually in the prototype of scm_c_define_gsubr. <lloda>so I had defined scm_funp = SCM (*)() by myself which is why I required the extra cast. Cast is now gone. <davexunit>it seems entirely unrelated to scheme since the speaker talks about C and Python a lot, but the company he works for wrote their product in chicken scheme <davexunit>the implementation is so tiny, I'm going to port this to guile. <serhart>the guile docs say that the #:use-module option for define-module is equivalent to use-modules <serhart>but it doesn't seem to support everything use-modules does? <serhart>do you have to have a #:use-module for each module you are including? <davexunit>(define-module (foo) #:use-module (ice-9 match) #:use-module (srfi srfi-1)) <serhart>is there a reason for that? instead of using the shorter use-modules form? <davexunit>I think it's better from an organizational standpoint <davexunit>but I don't actually know of any technical reason why you should use it over use-modules. <davexunit>I felt that way at first, too, but I don't think it's a big deal anymore. <davexunit>I imagine it's done this way for a reason, but I just don't know it. <davexunit>I only use use-modules when I'm not within a module <serhart>it would be nice if there was a use-modules option for define-module <serhart>was curious as to why there wasn't, especially since use-modules exists <taylanub>serhart: you can use `use-modules' instead of a series of #:use-module <davexunit>taylanub: serhart is wondering why #:use-module doesn't work the same way <taylanub>well there was the question "do you have to have a #:use-module for each module you are including?" <serhart>the docs say #:use-module is equivalent to it <taylanub>just clarifying that you can use either. you can mix them too if you want <taylanub>I usually use `use-modules' because the other is too verbose <serhart>yeah, that's what i'm probably going to do, was just curious why #:use-module doesn't actually let you do the use-modules form <taylanub>eventually we'll all use `define-library' anyway ;P <davexunit>and their bitbucket account has a bunch of scheme libraries <nalaginrut>I heard it! Well, now that PG said: do not talk about that you use Lisp in your product, so I think it's fine with him to avoid to talk Scheme ;-D <davexunit>sometimes I feel like the only way I'm going to get to write scheme professionally is to go into business for myself. <nalaginrut>seems the only chance the let the Boss know the value of Scheme is that the Boss is Schemer <nalaginrut>another point is the cost of hiring Schemer is higher than Pythoner, since it's not so easy to replace him/her <nalaginrut>if I run a product written in Scheme successfully, I'll think such question: how can I hire another Schemer? <Chaos`Eternal>but if you hired a schemer, who must be very strong, smart, productful <nalaginrut>Chaos`Eternal: yes, Joel Spolsky said he prefer pay such guys a rather high price, they can do the best job even if there're just three guys <nalaginrut>higher salary, fewer people, better work, that's all <Chaos`Eternal>but i read a survey reporting that schemers are not paying well.... <nalaginrut>I've heard that too, but it's fair since most successful business uses Java or C++ <nalaginrut>I think one of big problems of Scheme is lacking libs, see, you can't get your YAML parser at present <davexunit>is YAML even used very much outside of ruby applications? <nalaginrut>but it's getting better, since R6Rs and R7Rs defines lib interfaces <davexunit>I never see YAML files that aren't for internal use only. <nalaginrut>davexunit: I think the point is that people run away when they got negative answer all the time ;-) <nalaginrut>"is there XXX?" "no", "how about YYY" "no", "well, ZZZ?" "no"... <davexunit>but if people keep running away then we'll never have those libs. <nalaginrut>yes, RnRs plays an important role since there's no libs definition before, so powerful people write their own, poor people just run away ;-P <davexunit>I'm more-so concerned with guile than i am about other scheme implementations. <nalaginrut>oh~when we're talking about these, I realize there're 3 people run away <davexunit>at least in the web development space, guile is getting a pretty solid foundation <davexunit>gnutls, guile-json, guile-oauth, artanis, etc. <DeeEff>I would love to write exclusively guile but it doesn't work perfectly on windows quite yet. <DeeEff>and also it needs some more maths tbh <DeeEff>If only I understood the FFI more... :( <davexunit>is there a third-party library that can do it? <DeeEff>I need something like the Eigen library for C++ <davexunit>I'm writing my own linear algebra stuff for 2D/3D games <nalaginrut>I don't think portability is important in Scheme code, maybe too extreme perspective... <DeeEff>nalaginrut: it's not the end of the earth. Usually portability comes down to changing use-modules -> require-extension or something or other <DeeEff>but I _do_ think guile on windows would be cool, and some more tutorials would be nice <nalaginrut>DeeEff: yes, even Guile specific code, people can port the code <DeeEff>I'm actually just reading through the guile-devel mailing list, and oh man <DeeEff>just this ian grant stuff. I remember when GNU Thunder was first sent to the mailing list a few months back <nalaginrut>actually, I love the idea, which could make Guile a very important role in GNU system ;-) <nalaginrut>besides, no one can make sure that it could be done <DeeEff>well, my first thought about this PDF debacle is why doesn't he just sign his text essay with GPG? <DeeEff>the signature proves it hasn't been tampered with <DeeEff>he doesn't need to publish as pdf <nalaginrut>I think Hurd is perfect, but a never-down-project can be perfect anytime... <nalaginrut>I'm surprise with that PDF, because he has a post in the blog, many sentences, but throw a link to a PDF for what he really want to say <davexunit>DeeEff: I think Ian would contest that claim of proof. <DeeEff>contest on what grounds? that GPG doesn't work or is somehow compromised? GPG could not possibly be so blatantly compromised as to unittingly obscure the hash and private key signature of a random email message. <davexunit>DeeEff: I'm not saying he's right, but if you read a bit of what he wrote, he does claim that essentially all of computing is compromised. <DeeEff>I think it's a gross over-estimation <DeeEff>information theory would suggest you could not possibly pack that much malicious code into such a small segment of bytes <DeeEff>I mean think about it, you have the text you actually wrote + the hash of the text + the hash of your private key signature <DeeEff>how many bytes can you compromise in the text and signature without the author noticing? <DeeEff>rather, without data degradation (sent text appears to have been tampered with). <DeeEff>part of the trust in PGP is the idea that you don't have to trust the source, but you can trust the content was not changed. <mark_weaver>it's true that signatures don't actually prove anything at all <DeeEff>how? you can't tamper with the content of the email, because on the verification side, the signature wouldn't verify. <nalaginrut>guys, I would stop to talk about Ian, since I don't want he appear here to argue with these things. Seriously, I prefer talk with him in pure tech things, he know more than me <mark_weaver>almost all crypto relies on our belief that certain problems are hard <nalaginrut>I should say, 'could be backdoors hide in maths model' <DeeEff>I was more just wondering why he won't use GPG. Probabalistically speaking, neutering GPG / PGP would be _incredibly_ hard. <DeeEff>if, of course, you do it properly <paroneayea>he's being unhelpful and rude, and while his comments make some degree of sense, not as much as they completely don't make sense at all. <DeeEff>in any case, sorry about bringing up this offtopic nonsense. <nalaginrut>there're so many personal email and mailing list were dragged in this topic, I don't think llvm guys and Linus would be interested in this issue... <DeeEff>davexunit: does sly use the guile FFI? <nalaginrut>sometimes I wonder which should I use, C wrapper or FFI, it's better to have an official note, or benchmark <DeeEff>davexunit: is there a particular source file that gives a good example as to how to use it? <nalaginrut>dunno, I always thought 'speed defines the winner'...