IRC channel logs


back to list of logs

***dje is now known as xdje
***cluck` is now known as cluck
<zacts>mark_weaver: yo
<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>nah, it's ok!
<zacts>I understand
<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>please don't ask me to write it a third time :-P
<zacts>thanks! I promise!
<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>oh that's cool
<zacts>I have guile-reset.scm backed up, so yeah. thanks.
<zacts>backed up online also
<mark_weaver>cool :)
<nalaginrut>morning guilers~
<Chaos`Eternal>hi, does there exist a guile yaml implementation?
<Chaos`Eternal>hi, i disconnected
<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?
<nalaginrut>alright, scm_from_locale_symbol
*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>I won't, don't worry about it ;-)
<nalaginrut>I'm fan of SXML and json
<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>oh, it's a BOM...
<Chaos`Eternal>very glade to hear that, taylanub , thanks
<Chaos`Eternal>I don't like yaml either
<Chaos`Eternal>but shit happens
<taylanub>Chaos`Eternal: if you want something usable for Guile ASAP, you could make libyaml bindings
<taylanub>using the FFI, say.
<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
<nalaginrut>I'll find it out, now I have to go
<mark_weaver>okay, ttyl!
<nalaginrut>see you
<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.
<mark_weaver>hi zacts
<lloda>mark_weaver: you're right.
<lloda>so I had defined scm_funp = SCM (*)() by myself which is why I required the extra cast. Cast is now gone.
<davexunit>morning guilers
<davexunit>this got posted to r/scheme recently, I found it quite interesting:
<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 rest-bind chicken scheme library:
<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>serhart: yes
<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
<serhart>just seems unnecessarily verbose
<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.
<lloda>i never use #:use-module :p
<davexunit>I only use use-modules when I'm not within a module
<davexunit>in a one-off script or at the REPl
<lloda>I just don't see the point.
<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
<davexunit>ask the mailing list :)
<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>will we though?
<taylanub>... eventually
<nalaginrut>davexunit: how do you know that? ;-)
<davexunit>nalaginrut: know what?
<nalaginrut>his product use chicken scheme
<nalaginrut>or he said it in the video?
<davexunit>nalaginrut: he says it
<nalaginrut>ok, I'm watching
<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
<nalaginrut>maybe that's the rule of the game
<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>I realize this too
<davexunit>it's a damn shame
<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
<Chaos`Eternal>you filtered out 90% percent of un-qualified coder
<Chaos`Eternal>just kidding
<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>the Boss earn more money
<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>yeah, well we're getting better.
<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
<nalaginrut>me too, I even write Guile specific code
<davexunit>I use tons of guile specific code.
<davexunit>at least in the web development space, guile is getting a pretty solid foundation
<nalaginrut>I rarely write rnrs portable code
<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>DeeEff: what kind of maths?
<DeeEff>linear algebra mostly
<davexunit>is there a third-party library that can do it?
<DeeEff>I need something like the Eigen library for C++
<DeeEff>or LAPACK, at least
<davexunit>I'm writing my own linear algebra stuff for 2D/3D games
<DeeEff>Ah, sly, I seem to recall that
<davexunit>you could write bindings to GSL
<nalaginrut>I don't think portability is important in Scheme code, maybe too extreme perspective...
<davexunit>GNU Scientific Library
<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
<nalaginrut>DeeEff: few threads, huh?
<DeeEff>just this ian grant stuff. I remember when GNU Thunder was first sent to the mailing list a few months back
<DeeEff>( ⊙‿⊙)
<davexunit>it's quite the saga
<nalaginrut>oh, that thread
<nalaginrut>actually, I love the idea, which could make Guile a very important role in GNU system ;-)
<nalaginrut>but it's huge workload
<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>there're backdoors hide in maths model
<nalaginrut>so it's not enough to defend it in software
<paroneayea> :)
<paroneayea>I'd just ignore him.
<paroneayea>it's not worth the poison.
<nalaginrut>I should say, 'could be backdoors hide in maths model'
<DeeEff>paroneayea: lol
<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...
<davexunit>yeah, time to ignore.
<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
<davexunit>DeeEff: yes
<nalaginrut>I always afraid FFI will be slow
<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'...
<nalaginrut>time to sleep
<nalaginrut>night guilers~
<lloda`>DeeEff: don't know if it's a good example, but: