freenode/#lisp - IRC Chatlog
Search
17:15:03
thijso
How can I substitute a different function only if that different function (in a different package) is defined? I tried something like: (when (find-package 'dht-test) (setf (symbol-function '%debuglog) #'dht-test:%debuglog)) but then it complains about there not being a package called dht-test during compilation. This is in ECL, btw
17:15:51
Bike
instead of #'dht-test:%debuglog, (fdefinition (find-symbol "%DEBUGLOG" "DHT-TEST")), i guess
17:16:56
thijso
I was looking how I could do (symbol-function .. in a certain package, but that doesn't exist. Thanks, Bike
17:24:46
Bike
yes, fdefinition is like symbol-function except that it can also deal with setf functions.
17:35:38
quantico
hi, i understand this may be the wrong place entirely to ask, but does anyone have an idea on how i may run this lisp program?
17:36:06
quantico
it's apparently a new dialect of lisp called Bel "written in itself" but i have no idea how to make it run. o_o
21:21:41
LdBeth
> Programmer B feels honor-bound to retain the existing abstraction, but since isn't exactly the same for every case, they alter the code to take a parameter, and then add logic to conditionally do the right thing based on the value of that parameter.
21:24:50
aeth
CL isn't a particuarly noun-based language, and deep inheritance hierarchies don't seem to be too common. The last time I used inheritance at all, it was for gray streams
21:27:00
aeth
Shinmera: Compare an average CLOS system to an average Java or C++ system. In the latter, you're far more likely to have to rely on flow charts of interactions between heavy inheritance-using classes, while in the former you're probably going to be working mainly with generics that are almost indistinguishable from regular functions. And quite often you're supposed to use :before/:after/:around on those to customize, instead of inheritance.
21:28:01
aeth
Shinmera: The main place where I've personally used inheritance heavily is in the way trivial-gray-streams works (which might be one reason why they're not universally liked), and I suspect CLIM is similar but I haven't used it yet.
21:28:56
aeth
What I mean about noun-based is that in Java/C++/etc., your APIs are often noun-oriented, while even in CLOS-heavy CL, your APIs are probably still verb-oriented (in this case generic functions rather than regular functions)
21:29:16
Shinmera
I'm more confused about your assumption that CLIM is the only real user of inheritance hierarchies.
21:30:07
aeth
Shinmera: I didn't say "the only real user", I said "the major use" as in "the most elaborate". I haven't read any documentation as elaborate as CLIM for anything else quite like that, but feel free to show me something else.
21:30:26
aeth
It has been a while, though. Is CLIM composition over inheritance? I would be shocked.
21:31:46
jackdaniel
protocol classes indeed are meant to be inherited from, but that is more a signal, that this class implements said protocol
21:31:55
aeth
If CLIM doesn't count then it's literally just gray streams as far as elaborate inheritance goes, at least what I've encountered personally.
21:32:05
jackdaniel
unless you inherit from standard-foo (instead of the protocol class foo), you need to implement foo's protocols all by yourself
21:34:32
aeth
selwyn: It's controversial enough of an API to have at least one (probably more) alternative, as well as not being added to the base language itself (I think it was a proposal, wasn't it?)
21:35:36
jackdaniel
trivial gray streams were a rejected proposal but are useful enough to be included in most implementations
21:36:07
jackdaniel
some slowness may come from the gf dispatch, but other than that it is the programmer fault if they are slow
21:36:08
aeth
Shinmera: SBCL has three extensions included, including gray streams and simple streams, where the latter is an alternative to the former. http://www.sbcl.org/manual/#Streams
21:36:53
aeth
Where there's two there's probably many, so I wouldn't be surprised if there's a few more on some dark corner of the Internet, perhaps from the mid 90s
21:40:15
jackdaniel
aeth: to be meticulous there are clim streams: http://bauhh.dyndns.org:8000/clim-spec/P-V.html#_756, http://bauhh.dyndns.org:8000/clim-spec/P-VI.html#_1053 ; of course they are tailored for typed screen input and output formatting
21:40:53
aeth
jackdaniel: ah, okay, I actually was aware at one point that those were different, so my bad.
2:05:08
adlai
ACTION is estimating an ETA for ECL issue 305 fixing itself in the absence of external motivation