IRC channel logs
2017-10-02.log
back to list of logs
<MuteParrot>Given a GOOP class in a module that has many slots with getter and setter methods, how can I export all the getters and setters? <MuteParrot>do I have to do (export get-foo get-bar get-baz ...) for each getter/setter, or is there a better way? <MuteParrot>also, is there a module with a define-method equivalent to define-public? or should I create my own macro for this? <daviid>MuteParrot: the former. note that you have to re-export if you imported a module tht also defines these getters/setters <daviid>MuteParrot: actually, with no offense what so ever, what you are asking for would not make sence in Guile's implementation of (part of) the CLOS protocol. however, I do understand you and wrote a macro oyu might be interested to use, and, combined with the module definition option #:duplicates (merge-generics replace warn-override-core warn last), will provide a simulation of the clos protocol (which defines a specific module for all <daviid>here is the macro i'm talking about: <daviid>oh, sorry not this one this one: <MuteParrot>in truth I know little about CLOS. when I'm not using guile I typically use racket not CL <daviid>MuteParrot: welcome! and here is a simple use so you can better grab what's going on: <daviid>MuteParrot: wc! yes racket oo system has nothing to do with clos (on purpose but imo, it was a very bad decision) <MuteParrot>yes, racket's oo seems to be not be used for much, probably as a consequence. off the top of my head I can only think of the gui package using it. <jherrlin>Hey folks, i am studying the SICP book and would like to have some feedback on one of the exercises. <jherrlin>please give me some feedback on the solution <ft>There are shorter solutions to this, if you think about how cons works. <ft>Specifically, what's (cons 1 '()) and what is (cons 2 '(1)). <ft>Yeah. If asked, I'd implement it like the first solution on your link does. I'd probably use a named-let, but that's a minor detail. <jherrlin>ft: thx for the feedback! i am currently looking at the second solution and trying to understand <jherrlin>ft: what is the reason you would choose the second? <ft>I wouldn't want to call append. <ft>So, I wouldn't choose it. <jherrlin>okey, i see! and it's not using tail-recursion so it could blow the stack to, right? <ft>Yup, that's not a tail call. <happy_gnu[m]>Not because I think they are good but because I think they are simple <happy_gnu[m]>And does anyone has any suggestions on what else to use? <daviid>happy_gnu[m]: note that guile-gnome is gnome-2 still, not gnome-3 (it is really good but won't 'look' like gnome-3, obviously), then for such a simple game I'd use guile-clutter (mind you it's a bit more difficult to install, but I wrote a step by step 'guide', and can help here...), or you could look at chickadee as well ... depending on your objectives <happy_gnu[m]>daviid: well my objective is making something for others <happy_gnu[m]>I just want to make a game or some program that others can use <daviid>happy_gnu[m]: the problem is, given that objective, how easy it is for others to install: it is difficult to install guile-gnome and even a bit more difficult to install guile-clutter, and these are not part of any distro (guile-gnome is in guix actually) <happy_gnu[m]>But you say it will be difficult to package it right? :( <daviid>happy_gnu[m]: tx, clutter has everything you need to write a simple game, but for real games you'd want to use another lib <daviid>happy_gnu[m]: I'd be very happy to help, wrt guile-gnome guile-clutter. then to package, yu best route will be to use guix (which has guile-gnome already) and get help to package guile-clutter, then your game ... <happy_gnu[m]>And I don't know any Libre program written in guile that I can collaborate. <happy_gnu[m]>I am learning to package stuff for guix but that is not exactly a program and I looked at GNU cash but it is written in C and I don't even understand GNU Cash <happy_gnu[m]>Even if the game is packaged for deb or rpm I doubt it will be very used anyway <daviid>happy_gnu[m]: before, take a look at chickadee <daviid>and there are tons of program you could contribute to <happy_gnu[m]>In scheme? I searched Github but found mostly Racket or Scheme implementations <daviid>happy_gnu[m]: send an email to guile-user asking to contribute to some project and see ... ? <daviid>happy_gnu[m]: no guarantee what so ever, maybe you'll receive no answer, I don't know ... <daviid>happy_gnu[m]: the guile community is full of lonely hackers :), that come here to ask for tips, code review, ideas for 'how should I do this and this...' but very friendly though <daviid>happy_gnu[m]: don't be, guilers are always happy to help, and I never seen any pedantic or condenscendent behavior here, just learn do and ask ... <daviid>happy_gnu[m]: for now, I'd go with your idea to write a simple game, to learn and 'do something' ...