libera/#commonlisp - IRC Chatlog
Search
4:43:22
edgar-rft
zest: if it's self-contained you dont necessarily need quicklisp, but you could go *both* ways to increase the potential user base
4:45:22
beach
I think a decision like that depends on many things like the quality of the existing library, and the requirements of the client. To minimize maintenance, it is usually best to reuse existing code. But there are cases where the client can't (or won't) use an existing library in addition to yours.
4:49:44
beach
And it depends on the size of the existing library. For a small one, you can include similar code in your own library. But if the existing library is large, you may take on a lot of maintenance burden if you duplicate that functionality.
4:51:57
zest
beach: For something as replicatable as pattern matching, guess I'll roll with using cond for now and I'll sacrifice the eye candy.
4:52:42
zest
do you guys think there is a way to see what is a form of a function? I know 'describe describes data in general but is there smth that could make look at the actual definition of a function...
4:53:40
beach
I am going to be criticized for this, but here goes: If there were a way to do that for every function, then there would be no commercial Common Lisp vendors.
4:54:15
beach
So FUNCTION-LAMBDA-EXPRESSION is allowed to fail. This is also good because you can't get the lambda expression of a closure, nor of a generic function.
4:55:28
zest
beach: so i am guessing it doesn't work on all implementations... ah, well, good enough I just wanna examine some library functions without going to a directory and reading the src file
5:30:06
beach
zest: In one of my good talks to industry, I estimate the time saved by using a new tool vs the time it takes to learn it. The results are usually staggering, like a factor of 100 or so in favor of learning the new one.
5:30:52
beach
zest: Even just using Emacs abbrevs when I write email is a significant time saver, but some people here would dispute that, as usual.
5:33:11
beach
Unfortunately, as I explain in one of my essays, our brains are not good with such estimates, so we often make the wrong decisions. But as programmers, I think it is our duty is to set aside our immediate responses and do the math.
5:33:39
zest
beach: i saw one video named "play emacs as an instrument" and the person who did had such so much internal knowledge of emacs it was ridicolous
5:34:07
zest
among the things he did was he opened a file server in an SSH connection to his local host through eshell
5:34:11
beach
And, as I explain in my talk, a project leader that can't convince the programmers to use the right tools, should get rid of those programmers.
5:36:42
zest
beach: it adds up to overall productivity... i feel that today's tools are much less configurable than the older tools
5:39:53
zest
like forget about code editors for a second, even stuff like windows managers can just boost productivity
5:55:02
Guest86
jackdaniel Try to learn to give smart answers yourself before judging other's questions. This is a shame for CLIM maintainer though https://plaster.tymoon.eu/view/3816#3816 is good enough to judge ....
6:02:55
jackdaniel
yay, one more point towards the asshole of the year award, keep fingers crossed for me everybody
6:09:45
hefner_
tbf I can't figure out where you'd add that keyword either, although the title pane seems obviously wrong
6:11:21
jackdaniel
not that we implement the behavior, but open-window-stream should not error /with/ this keyword
6:16:25
jackdaniel
(and it is about the text cursor, not the pointer cursor, so in this sense it is off by default)
6:28:47
Guest80
beach you can change :initarg :medium to :initarg :doc-title with no change in code behavior.
6:38:43
beach
The term "visible" is used about a restart in RESTART-BIND and RESTART-CASE and it is related to the return value of the test function. But I can't see a definition of "visible" nor the relation between "visible" and "active" when it comes to restarts. Any hints?
6:42:02
jackdaniel
isn't it that visible means "invokable" while active means "present in the dynamic context"? I don't have a quote
6:44:29
jackdaniel
in http://www.lispworks.com/documentation/HyperSpec/Body/m_rst_ca.htm (:test arg): "... that returns true if the restart is to be considered visible."
6:44:50
jackdaniel
and in the Description: "In this case, the dynamic state is unwound appropriately (so that the restarts established around the restartable-form are no longer active) prior to execution of the clause. "
6:48:18
jackdaniel
we've discussed that earlier, if it is simply appended to the list then it will be correctly unwound either way
6:49:10
jackdaniel
(I think that the quote brought by scymtym is more in favor of restart clustering)
6:50:00
jackdaniel
btw, compute-restarts uses the term "applicable restarts" (which has a glossary entry) instead of "visible", but the context seem indicate that both term describe the same thing
7:39:02
beach
I think I have made up my mind. It seems "visible" is mentioned only in connection with the TEST-FUNCTION, so I'll define "visible" to mean "the TEST-FUNCTION returns true", and I will consider that a restart can be returned by FIND-RESTART or COMPUTE-RESTARTS only if it is visible.
7:44:23
beach
Almost. If by some secret way you could obtain a reference to an invisible restart, you could invoke it.
7:47:48
jackdaniel
do you have any plausible interpretation except for the "test associated with the restart"?
7:48:27
beach
The test being referred to seems to involve the association between a restart and a condition, and that has nothing to do with the test-function.
7:49:02
jackdaniel
the test function accepts one argument, that is the condition (see the initarg :test)
7:52:36
jackdaniel
that was my initial impression, but you've hinted something above, that "visible" means only that the test function returns T
7:52:46
beach
But it is not true that COMPUTE-RESTARTS returns all applicable restarts. A restart has to be active as well in order to be returned.
7:53:51
jackdaniel
the glossary entry says: "applicable restart n. 1. (for a condition) an active handler for which the associated test returns true when given the condition as an argument. 2. (for no particular condition) an active handler for which the associated test returns true when given nil as an argument. "
8:19:39
beach
One quirk though. If we take the "associated test" in the glossary entry for "applicable restart" to mean the TEST-FUNCTION, then it implies that we can call the test function with NIL and it should then return true.
8:20:24
beach
I think it is safest to assume that we can not call the test function with NIL, and if we have "no particular condition" we should not call the test function at all.
8:36:09
jackdaniel
that's not very conservative though, I'd rather fix the description of ":test" to explicitly allow nil
10:17:44
beach
I fear that someone who reads the dictionary entry for RESTART-BIND or RESTART-CASE might create a TEST-FUNCTION that does not work if passed NIL as an argument.
14:17:01
beach
What standard special forms or macros have a list of "bindings" other than LET, LET*, HANDLER-BIND, and RESTART-BIND?
14:18:35
beach
I mean syntactically, so that some part of the form can be identified as such a list of bindings.
14:22:44
ogamita
Also, binding is something that is established at run-time, so I wouldn't make such a difference between progv and let…
14:23:20
beach
For context, I am working on Iconoclast, which is a library defining ASTs for standard special forms and macros, and I am trying to identify reasonable mixin classes. That's why I am interested only in operators where the list of bindings is syntactically apparent.
14:25:34
bike
the format of the bindings is different for a lot of these, though. like LET is symbol | (symbol [value]), which is not what handler-bind or flet have.
14:38:29
beach
The idea is to extract certain features to mixin classes to avoid code duplication. Like bindings, declarations, documentation, body, clauses, ...