freenode/#lisp - IRC Chatlog
Search
5:44:38
asarch
From "http://www.gigamonkeys.com/book/object-reorientation-generic-functions.html": (defmethod withdraw ((account bank-account) amount) <- Which part is the name of the parameter[1] and which is the specializer[2]?
6:06:02
asarch
Another question: what is a "specializer"? Does it mean, "an instance" or "a super class"?
6:07:00
Bike
your method definition is for a method that takes two parameters, and the first parameter is an instance of the class bank-account.
6:24:51
addsub
I am not sure whether the author cares, but I found a grammatical error in the first chapter of 'gentle intro'
6:36:10
addsub
I lost it, it isn't really important since it doesn't impact the procedure, but sounds ghetto. It's a 'be' that should be an 'are'.
6:45:17
phoe
It is impossible to retrieve the value of a class-allocated slot without creating an instance of said class.
6:46:00
phoe
I thought that MOP:CLASS-PROTOTYPE would allow me to do this, but: "Whether the instance is initialized is not specified."
6:47:38
phoe
I'll need to write a class-slot-value or something that fetches the slot metaobject from the class itself.
6:48:04
addsub
page 19 'Chapter 1 Functions and Data 7. Second sentence in second line 'It is important that you be able to tell the difference between numbers'
7:11:28
phoe
Does this mean that I can do (slot-value (class-prototype 'foo) 'class-allocated-slot)?
7:16:13
beach
The MOP definitely does not have the same level of standard as the Common Lisp HyperSpec does.
8:46:51
jackdaniel
fe[nl]ix: I've updated the semaphore PR yesterday (taken into account your remarks)
10:05:24
light2yellow
why am I getting "value (fact k) is not of type number" ( https://pastebin.com/raw/EhG8tW6R ) ? shouldn't it look at fact and see that it returns number? or I cannot do this because macros don't evaluate at compile time, but have to be compileable?
10:13:03
light2yellow
if I replace (mult2 (fact k)) with (* 2 (fact k)) it works as intended, so I don't undestand why it doesn't work with the macto
10:24:52
light2yellow
phoe: because I'm exploring the laguage. also, never mind, I finally figured out what `, , and @ do, so (mult2 (a) `(* 2 ,a)) seems to work
10:34:40
beach
light2yellow: Things don't quite work that way. If you ask for help, you can not demand that people ignore all the style violations in order to answer only the particular issue you are asking for.
12:45:32
phoe
If someone has a while, I'd like to request a review of https://github.com/phoe/protest/blob/master/doc/protocol.md - I have more or less finished documenting the protocol side of PROTEST and I wonder if it is understandable.
12:58:00
Xof
oh, horrors, you're probably allowed to redefine a short-form method combination into a long-form one (and vice versa)
13:03:51
jackdaniel
a live coding session with McCLIM and gadgets: https://www.youtube.com/watch?v=RBOrllTA-yc (forgive me a shameless plug :)
13:16:18
Xof
if you're in the mood for looking at overgeneralizations in CLOS, contemplate (class-prototype (find-class 'integer))
13:19:00
_death
but it gives bad result for (find-class 'float), and a weird result for (find-class 't)..
13:19:23
phoe
...well, correct, (sb-mop:class-prototype (find-class 't)) ;=> #<unknown pointer object, lowtag=#x3 {10005972F3}>
13:22:24
Bike
i was doing i forget what in clasp and it started trying to take class prototypes of numeric classes, and that went badly
13:22:55
Bike
it ws something general like trying to get prototypes of classes methods specialized on, for some reason
13:24:58
Xof
next up: I need to write a method combination which uses args-lambda-list, and then redefine it in an interesting way
13:30:55
Xof
the good news is that I reckon this can be made to display hilariously broken behaviour
13:32:23
phoe
Xof: please document it and submit to the next ELS, so you can stand up and announce everyone, "I have bad news and bad news; the bad news is that Didier was right last year, the bad news is that I found things that are even worse than that"
13:38:03
Bike
i've thought about how to implement it, but it seems like a huge pain in the ass, and nobody uses method combinations to begin with, let alone their exotic features
13:40:45
phoe
obfuscated lisp coding contest is troublesome as soon as you allow reader macros because you can implement a malbolge parser and write the rest of your program in malbolge.
13:41:15
Xof
(defgeneric foo (x) (:method-combination japh) (:method ((x symbol)) x)) (foo x) ; => "Just another Lisp hacker"
13:41:36
Bike
https://github.com/McCLIM/McCLIM/blob/b3546424f68ccc72c762ccb8be16400768ad2479/Libraries/ESA/utils.lisp#L202-L228 this? still no :arguments
13:45:40
Bike
looks like it's only used for one function, which has two methods, both of which return 0 as primary value
13:50:02
MichaelRaskin
phoe: you do know that obfuscated C contest is considered succesful when the year's winning entry leads to a rule change for the next year?
13:51:21
MichaelRaskin
A malbolge parser as a reader in obfuscated lisp content would not even need a rule change, it will just get a «so what» from every judge
14:08:11
Bike
off the top of my head, you could have a positive integer be the parameter, then have qualifiers be a rational, then make the effective method the list of execution of a FRACTRAN program in order
14:10:50
phoe
while inside a method combination, you could perhaps redefine the method combination and call the GF again
15:26:07
beach
jackdaniel: The clstandard_build is not exactly what I am looking for to use for WSCL. It builds each file separately, which is not good enough for the kind of cross referencing I have in mind.
15:47:34
Xof
looping back is, I think, fairly easy: you can manipulate the next method list for every call-method site