freenode/#lisp - IRC Chatlog
Search
8:57:36
splittist
have text with various fonts and colors (sic) displaying with CLIME. Now to do it properly and tidy up (:
9:35:30
lukego
next thing I'm going to hack is ACCEPT by clicking on a presentation. probably on monday though. the big question I'm wondering is if we can avoid the (with-output-to-emacs (s) ...) business e.g. could (draw-rectangle ...) automatically initialize the CLIM state without needing that macro? I think it would be invoked on *standard-input* which would be a slime-input-stream. dunno. maybe wrong idea.
9:39:39
easye
Could someone point me to the irc channel where shinmera et. al. hangout (#shinkuma or something?)
9:52:30
edgar-rft
nij: ...the predicate <predicate-name>, which must be a symbol whose global function definition is a one-argument predicate.
10:06:29
beach
nij: Did you watch the panel discussion of ELS2021? Kevin Layer from Franz inc said something quite good. He said something like, it is easy for individual users to have wishes for this or that feature to be added, but we (i.e. the creators of implementations) are responsible for ALL our users.
10:06:30
beach
Plus, users typically don't understand the implications of their wishes on the rest of the system, and it is more likely than not, especially if they are not experienced implementors, to suggest something that would be catastrophic for the overall system, in particular for performance.
10:07:21
nij
I threw that comment out just to see if someone can offer a reason why that's not the case.
10:08:14
beach
nij: So, as a creator or maintainer of a Common Lisp implementation, I feel that it gets really boring to listen to wishes from individual users with no knowledge of language design or compiler design.
10:10:00
nij
As a creator of a CL implementation, do you see why not allowing lambdas in (satisfies..)?
10:11:05
beach
nij: The people who created the standard are probably all individually both smarter and more experienced than I am, and collectively they are totally awesome. I would have to look up the reason just as you would because I can't keep everything in my head. But you can count on nearly every decision of the standard to be well motivated.
10:11:14
no-defun-allowed
As someone who is vaguely maintainer-shaped, I have to wonder how you would interpret a (SATISFIES (LAMBDA ...)) form.
10:11:18
splittist
CLIM/McCLIM question - what is the height of an empty string? Different backends seem to have different answers: 0 or line height. (I guess this is the same as: what is the height of #\Newline?)
10:11:58
no-defun-allowed
Would it be as if the name was COERCEd to a function, possibly invoking COMPILE?
10:12:26
nij
no-defun-allowed: well, the lambda should take one input, and yes just compile that function.
10:13:08
beach
nij: I much prefer such curiosity to be expressed as questions, rather than: "It'd be nice if I can put a lambda there." which sounds more like a request from a user with no experience in language design or compiler design.
10:13:56
nij
Common' we all know CLHS is the standard.. there's no way to change it. And there are many ways to invoke a question.. but sure I can make it a more proper question next time..
10:15:22
beach
You probably haven't (yet) seen all request similar to that one that we get all the time here, so you might not realize how tired one gets of trying to respond to them.
10:16:04
no-defun-allowed
Would it be compiled every time we call (typep foo '(satisfies (lambda ...))), making it bog slow to run in a loop, or could it be cached (or compiled with the rest of the code or ...)?
10:17:00
beach
"I would like nested packages", "I would like for generic functions to be able to dispatch on arbitrary types", "I would like for EVAL to have access to the lexical environment".
10:17:14
edgar-rft
nij: CLtL2 says "lambda-expressions are disallowed in order to avoid scoping problems" -> https://www.cs.cmu.edu/Groups/AI/html/cltl/clm/node47.html
10:17:35
no-defun-allowed
Suppose we are terrible users and include a macro which does side effects as part of macroexpansion. In the latter case, should we specify that the function may only be compiled once? What if we don't use a constant lambda expression?
10:18:03
no-defun-allowed
Then how would you define when it is okay to cache? I suppose the most appropriate move would be to say it is undefined how many times that function is compiled.
10:19:01
beach
nij: I can't see it either. Often, you see these problems only when you are about to type the code in the compiler for handling a particular case.
10:21:47
edgar-rft
nij: It might have been a problem with some specific compiler at that time or maybe it's a problem that I don't see or understand.
10:21:52
nij
no-defun-allowed: I'd say to cache or not to cache is a general problem of lambdas without a name? That's not particular here.
10:31:47
_death
White_Flame: well, https://plaster.tymoon.eu/view/2433#2433 works and as far as I can see, should work
10:36:13
_death
cl-su-ai also contains text saying SATISFIES comes from Interlisp, and that it took a form there.. but I don't see anything like it in the Interlisp manual.. Interlisp's TYPEP took an integer for typespec.. the various types had integers associated with them
10:39:46
_death
nij: well, the lambda has to either be interpreted, or compiled each time the function is called..
10:41:52
_death
it looks like Maclisp also had a TYPEP, but it's more analogous to CL's TYPE-OF (so badly named..)
10:42:37
jdz
nij: I can imagine compiler being able to reason about type checks with symbols as predicates (for instance, when a compiler can prove a value does not change between multiple such tests). With a lambda, you cannot compare the tests (variable names may differ, lexical environment must be proven to be equal, etc.). But I just conjure this use case up on the spot.
10:43:23
_death
nij: declarations are a compile-time thing, so if a closure has to be created during runtime it's kinda weird
10:46:03
jackdaniel
making the compiler handle things like this usually ends with kludges that make it harder to get things right
10:46:13
_death
nij: when you want "lambda in satisfies" in a useful situation, you can often generate a global function with a name (say generated by make-symbol) and use that
10:47:12
jackdaniel
and the type system in common lisp is quite elaborate already for better or worse
10:57:19
contrapunctus
agumonkey: I used to love them, but then I realized that it's basically a let* without local variable names acting as "comments" of sorts...so sometimes they just obfuscate code.
11:02:45
jmercouris
does anyone know of any successful systems that allow for some sort of intelligent markup?
11:03:01
jmercouris
e.g. I can reference a symbol in my documentation, and then some documentation export tool does something intelligent with it
11:03:48
jmercouris
if nobody knows of any succesful usages of this markup, I am also interested in why that might be, and suggestions for some sort of markup
11:04:23
edgar-rft
_death: thank you for the pointers to the original discussions and historical background information :-)
11:04:58
Gnuxie[m]
jmercouris: using markup won't be portable and you have to be considerate for what it will look like when someone calls #'documentation
11:05:03
no-defun-allowed
The jmercourtis had a problem making nice-looking documentation, and thought "Oh, I'll use a documentation generator!" Then he had two problems.
11:05:50
Gnuxie[m]
that being said, it would be possible to have a macro like Shinmera's documentation utils and figure out how to offer both
11:06:27
no-defun-allowed
jmercouris, when confronted with a documentation-making problem, thought to himself, "I know, I'll use a documentation generator." Now he has two problems.
11:07:26
no-defun-allowed
jmercouris: My experience is that instead I wrote my own documentation in Markdown, then because I wanted a nice book, I ported to TeX. Then that made for a poor website, so I ported to Scribble.
11:08:00
jmercouris
am I correct in thinking that you are from Australia, or am I confusing you with some one else?
11:08:45
no-defun-allowed
contrapunctus: The problem for me has consistently been that introducing the protocol and the code feel like they should be done in different orders.
11:09:07
no-defun-allowed
jmercouris: No, I transferred and I'm in a weird superposition which is mostly in first year. Let's say I have 7/8 of a year down though.
11:10:13
no-defun-allowed
contrapunctus: Also in my very specific sitation, I want to write my implementation with a restrictive license, but the specification with a permissive one. So tangling the two would get legally tangled too.
11:10:50
jmercouris
You can use a 'licenses' directory which specifies what is licensed under what, but intermingling licenses in the same file is indeed messsy
11:11:04
no-defun-allowed
jmercouris: Take a look at <https://theemacsshibe.gitlab.io/documentation/> for the output of this approach.
11:12:18
jmercouris
I would like a single point of truth though... I don't want to make discrete sources
11:12:46
no-defun-allowed
You also have the case that a documentation string lies about what the code it documents does.
11:13:24
no-defun-allowed
If there is a discrepancy, I look at what I wrote down in the book, a documentation string if present, and the implementation, and decide which I meant to write. Usually it's what's in the book, and that is usually because it makes the most sense.
11:14:06
no-defun-allowed
That is to say that intentionally accidentally forgetting implementation details leads to documentation which convinces you to remove the painful details.
11:16:21
no-defun-allowed
Yes, literate programming is a thing people do, and you can do it with org-mode.