freenode/#lisp - IRC Chatlog
Search
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
15:48:43
Xof
remember Didier said he wanted to be able to choose between or and and method-combination at runtime?
15:50:46
Xof
(what (lambda (f seq) (apply 'concatenate 'string (mapcar 'string seq))) 3) ; => "NILT"
16:57:52
thorondor[m]
hello. I have problem running cl-cairo2 on ECL. https://github.com/rpav/cl-cairo2/issues/24
17:06:41
jackdaniel
if function is declared to return :pointer, then result will be a void pointer and it is not incorrect
17:09:36
Bike
maybe there's supposed to be a side effect of making something on the screen or whatnot
17:10:13
_death
also seems cl-cairo2 already wraps surfaces.. https://github.com/rpav/cl-cairo2/blob/master/src/surface.lisp#L222
17:10:39
jackdaniel
I'll add a ticket to ecl's gitlab to print address of the pointer to avoid user confusion
17:11:35
Bike
if ecl keeps track of the referent type that's kind of interesting, i don't think other implementations do that
17:19:52
jackdaniel
if you narrow the problem please report the issue (if it is ECL's fault) at https://gitlab.com/embeddable-common-lisp/ecl/issues/
17:45:53
asarch
If I do: (defgeneric bread (butter ham) (:documentation "Bread for your breakfast")) and then I do: (defmethod bread ((butter hot-cake) coffe) (format t "American breakfast to go")). What's wrong?
17:48:58
jackdaniel
bisection indicates, that problem is somewhere between screen and a chair (exclusive)
17:49:22
Bike
(defmethod ((butter hot-cake) coffee) ...) means the method takes two arguments, and the first one is an instance of the class hot-cake
17:52:26
asarch
The book doesn't say anything about a previous class definition for, this case, "hot-cake"
17:55:45
Bike
looking at this chapter, it doesn't seem like the code is intended to be run independently.
17:56:38
edgar-rft
asarch, the last sentence on that page is "In the next chapter I'll show you how to define your own classes."
17:57:06
hjek
hi, anyone tried LTK? any code i run just gives me a blank window. tried to run a TCL/TK example with 'wish' and worked fine.
17:57:42
asarch
D'oh! I still was in the section "Multimethod" trying to figure out how to run that code...
18:02:11
hjek
ouch, i need to disable the smileys in pidgin. all the lisp code is just smiling faces
18:05:21
hjek
using newest ECL and LTK from quicklisp. any idea how to get information that would be useful for debugging / filing bug report?
18:08:42
thorondor[m]
jackdaniel: cl-cairo2 assumed that after calling (trivial-garbage:finalize <object> <function>), <object> was returned, but that was not the case for ECL
18:12:25
Bike
thorondor[m]: the trivial-garbage documentation states that finalize returns the object. if it doesn't on ecl, that's a bug in trivial garbage, not cairo2.
18:14:46
Bike
https://github.com/trivial-garbage/trivial-garbage/blob/master/trivial-garbage.lisp#L307-L313 ext:set-finalizer doesn't return the object i guess, so all you'd have to do is have the let return object
18:14:48
phoe
https://common-lisp.net/project/ecl/static/manual/re89.html does not say anything about the return value
18:16:02
thorondor[m]
it is trivial to implement in trivial-garbage anyway. just return the passed object, regardless of the implementation specific finalizer implementation
18:26:53
ealfonso
I was using one package (via (:use :lib1)) and decided to change to a different library lib2, so I removed lib1 from the :use list. now I'm getting a warning: "MY-PACKAGE also uses the following packages: lib1". how can I "un-use" a package?
18:27:09
ealfonso
I tried (unexport nil (FIND-PACKAGE 'lib1)) (unexport 'lib1), etc, which didn't work