IRC channel logs

2016-10-22.log

back to list of logs

***berndj is now known as Guest27486
***zv is now known as Guest60629
***Guest60629 is now known as zv
***zv is now known as Guest76333
***Guest76333 is now known as zv
***Guest27486 is now known as berndj
<amz3>héllo #guile :)
<paroneayea>hello, *
<amz3>o/
<OrangeShark>hello
<amz3>paroneayea: what are you up to?
<paroneayea>hm cool
<paroneayea>something I've felt missing from GOOPS (though mark_weaver gave me a nice macro, define-method*, that kind of stands in)
<paroneayea>is keyword arguments on define-method
<paroneayea>looks like CLOS had them, and an interesting way of handling the arguments
<paroneayea> https://www.cs.cmu.edu/Groups/AI/html/cltl/clm/node282.html
<amz3>I am not a fan of how slots are handled in goops
<amz3>IIUC you have to declare in advance all used slots
<amz3>s/used/useful/
<amz3>is that correct?
<paroneayea>amz3: isn't that the case in most slot-using structures?
<paroneayea>I mean, otherwise I guess you can use hashtables / alists / property lists
<paroneayea>but also if you want to have slot access be efficient, you need to declare it up front I think
<amz3>yeah in Python too, you have to declare __slots__ to be efficient
<amz3>also I'm not sure what happens to arguments passed to the constructor
<amz3>seems like there is so fizz buzz happening regarding declareted slots
<paroneayea>damn netsplits
<amz3>:/
<daviid>amz3: what 'fizz buzz' ...? what are you not sure about? the protocol is fully described in the doc, is it not? any self conmtained example which
<daviid>an example maybe?
<amz3>I will read the docs again
<amz3>maybe it will be more clear
<daviid>amz3: what is it your are trying to do and does not (did not) work? paste some ...
<amz3>When I create an instance of some object, I was expecting that the arguments passed to the constructor to be what I passed, but it's not the case
<amz3>I don't have paste right now
<daviid>amz3: does not make sense to me, please write a tiny example and paste, I'd be happy to look at it
<daviid>'the constructor' you mean make?
<amz3>yes
<amz3>I mean the interaction between make and initialize is different from what I am used to
<daviid>I'm sorry, I don't understand, make just calls make-instance, which is defined by the protocol
<paroneayea>amz3: maybe you're referring to how you have to define #:init-keyword, which is maybe a bit tedious?
<paroneayea>and you would prefer that to be inferred by the slot definition?
<jmd>Is there a way to get the name of a character from its codepoint or from the charcter itself?
<jmd>(yes I have read the manual)
<daviid>amz3: what have you been used to?
<amz3>jmd: char->integer ?
<amz3>daviid: python mostly, but I know javascript, and little bit of java
<jmd>amz3: No. That doesn't do what I want.
<jmd>I want a procedure which will take #\\soh as input and give "#\\soh" as output.
<daviid>the java oop design is a humanity disaster
<daviid>amz3: i'd be happy to help, but i'd ned ti understand what you don't undrstand, an example would be cool
<spk121>jmd: you can make an output string port and then use "write" to write the char to the port.
<jmd>spk121: Well I thought that would be the same as (format #f "~s" )
<rekado>jmd: (call-with-output-string (lambda (port) (write #\\soh port)))
<rekado>$6 = "#\\\\soh"
<spk121>jmd: when I try (format #f "~s" #\\soh), I do get "#\\\\soh"
<jmd>Hmm. In that instance so do I.
<amz3>daviid: nvm, it just feels overly complicated compared to what python basic python classes do, probably for good reasons tho.
<daviid>amz3: sorry, I very much doubt it is 'overly complicated' compared to python, how about you write a short example in python, then we write the same in goops