libera/#commonlisp - IRC Chatlog
Search
7:54:22
beach
"The :DIRECT-SLOTS argument is a list of canonicalized slot specifications". Not so great in my opinion.
7:59:57
scymtym
beach: variable (and parameter) names must balance multiple constraints: 1) uniqueness 2) reasonable conciseness 3) a description of the role of the variable in its context 4) a description of the value and probably more. i think you might be overemphasizing 4) over 3)
8:02:54
beach
Well, let me put it this way then. When I saw the parameter name SLOT, I immediately assumed it was a slot metaobject. Then when I saw (STRING SLOT) my mental model fell apart. And it is usually the case that I am not unique in any way, so it seems likely that other people will have the same reaction. So it is not doing the person reading the code a favor to write SLOT when the name of a slot is meant.
8:08:33
scymtym
beach: i agree in that case, but for :DIRECT-SLOTS, emphasizing the direct part, that is the role in the given context, instead of :SLOT-SPECIFIERS seems fair to me. going for both with something like :SLOT-SPECIFIERS-FOR-DIRECT-SLOTS or :SPECIFIERS-FOR-DIRECT-SLOTS is probably getting too long
8:09:40
beach
I would much prefer :SLOT-SPECIFIERS. Since you don't have specifiers for effective slots, it has to be for direct slots.
8:13:56
beach
In fact, they must have changed it for the standard, because the AMOP claims that the parameter for DEFCLASS is called DIRECT-SLOTS.
8:49:58
beach
Shinmera: I am continuing my reading of your article, if it is still useful: "This means that unlike" and "This leaves theprogram" are more examples where it is preferable (and I say "preferable" to avoid having some people interpret what I say as a rule) to have a demonstrative pronoun be followed by a noun phrase.
8:50:53
beach
"error, you can immediately" -> "error; you can immediately" or "error. You can immediately" .
8:53:56
lisp123
:) My english grammar is pretty bad, but I looking into the other day (unrelated to this topic). In relation to lisp, I chose to write (if (atom a) (list a) a) vs. (if (listp a) a (atom a)) for an expression that coerces an atom to a list
8:56:36
beach
The thing with demonstrative pronouns without noun phrases is that often the author has not thought about what it is referring to, and as a result, it often does not refer to anything at all.
8:56:37
lisp123
Hmm, I guess I need (if (listp a) a (list a)) --> Although (if (and (atom a) (not (null a))) (list a) a) IMO reads better
9:00:07
beach
Shinmera: My (admittedly small) family says that an adverb followed by a verb should not be connected with a hyphen, so "well designed" rather than "well-designed".
9:00:45
lisp123
Reason I was partial to (if (atom a..)) (before the case of NIL made it convoluted) was that it focused more on the operation --> IF ATOM, make it a list, otherwise keep it as-is" vs. When it is not a list, make it a list
9:01:38
lisp123
One could alternatively say "If a list, keep it as is, otherwise make it a list", but I felt the focal point of the expression was on the coercion from atom to list. This is all purely subjective thinking however
9:03:19
lisp123
One could argue (if (and (atom a) (not (null a))) (list a) a) is a clearer version, although its too long
9:05:16
beach
Shinmera: "only invoke the restart under special conditions" -> "invoke the restart only under special conditions". In writing, the first phrase reads "only INVOKE the restart [and not, say, REMOVE the restart] under special conditions" which is likely not what you want.
9:05:42
beach
In the spoken language, the distinction can be made with intonation. Not so easy in writing.
9:07:09
lisp123
beach: Do you have any good resources on technical writing? Your style is very good (similar to GLS in quality)
9:07:37
lisp123
I guess standard english grammar & style considerations apply, but wonder how you learnt it all
9:08:44
beach
lisp123: Not really. I learned it the hard way by having my texts scrutinized by my (admittedly small) family. She has a PhD in English and she was the only person to be promoted to "distinguished technical writer" at ILOG. That said, Pinker's book "The sense of style" is a good start.
9:10:51
lisp123
Thanks, well it definitely shows (esp. in your age old article on formatting rules for Lisp, which I read a year ago at the start of learning Lisp). I will check out that book
9:11:56
beach
lisp123: It is really a matter of common sense in combination with re-reading your own texts carefully. You want to make the text as unambiguous as possible, and you want to get the message across fast. In technical writing, I mean. Literature is different of course.
9:14:03
beach
Shinmera: "Using this extra information the programmer" -> "Using this extra information, the programmer". The first sentence looks like it would continue "Using this extra information the programmer provided..." which is not what you want.
9:15:02
beach
"which when set to ti its minimum will tell" -> "which, when set to ti its minimum, will tell"
9:15:04
john-a-carroll
Regarding "well-designed", as a native English speaker I think the phrase "well-designed recovery points" is fine. "well-designed" is being used as an adjective, modifying "points" which is a noun
9:16:03
lisp123
(This article was the one I was referring to, its a classic: https://dept-info.labri.fr/~strandh/Teaching/PFS/Common/Strandh-Tutorial/indentation.html)
9:17:04
beach
john-a-carroll: The point of the exercise here is to avoid annoying referees. I know this paper doesn't have that aspect to worry about, but I am giving general advice. And if there are groups of people that get annoyed by a hyphen between an adverb and the verb, then it is best to avoid it.
9:18:32
beach
john-a-carroll: If you want to run the risk of annoying your referees by keeping the hyphen that you prefer, that decision is of course up to you.
9:19:14
beach
john-a-carroll: I know when I am a referee, and the grammar is really bad, I can't concentrate on the contents, and that makes me really annoyed.
9:20:05
beach
And the reason I am giving the advice here, as opposed to by email, is that I think many #commonlisp participants could benefit from it.
9:20:59
john-a-carroll
I absolutely agree that idiomatic and precise writing is important - not just for the referee, but so that the eventual reader does not get confused. I'm an academic, and I've been saying this to my students all my professional life
9:23:22
beach
Shinmera: "When focusing on the SBCL implementation, there are" is a dangling participle.
9:24:47
beach
"These techniques mostly focus on type dispatch.." -> "These techniques focus mostly on type dispatch.."
9:32:20
beach
Shinmera: The traditional grammar says that if you "replace A by B", you "substitute B for A", But not "substitute A by B".
9:35:28
loke
"Substitute A with B" make sense. People using "for" sometimes implies it backwards, which is very difficult to parse.
9:36:53
beach
Use "replace A by B" or "replace A with B" if you are worried about people not being able to parse the other one.
9:38:54
beach
Shinmera: "advantages and challenges present when working in a ..." is a dangling participle.
9:40:00
beach
Shinmera: Done. I think the paper is good, especially for the kind of audience you are targeting. Will you get to present it in person? That should be a good thing.
9:47:30
Shinmera
beach: Yes, it'll be an in-person 20 minute talk at the Game Industry Conference in Poland next week.
9:47:42
jackdaniel
it must be that he is the handsome and attractive person according to the last section :)
9:49:58
Shinmera
Unfortunately I seem to have fallen ill with something, so I'm trying to recover today
9:55:04
loke[m]
<beach> "Right, but that's no reason to..." <- I'm not annoying them at all. I'm saying that one makes sense.
9:55:19
loke[m]
It's the "for" that has the potential to be confusing. I certainly can never get it right.
10:09:28
_death
you can look at the argument order for SUBSTITUTE (new for old) and REPLACE (old with new)..
10:27:11
_death
CL operators often follow this "natural English" convention, sometimes leading to inconsistency
10:28:36
antoszka
yeah, it's also a matter of reusing some then-popular names from then-mainstream Lisps whose legacy went into the ANSI standard
10:53:39
Shinmera
so this isn't a nonsequitur, I was on a podcast that talked about indie team building. It's off-topic here, but if you want to have a listen: https://www.rengenmarketing.com/podcast/how-indie-devs-can-nail-effective-team-building-with-nicolas-hafner-indie-game-movement-ep-261-show-notes/
12:03:22
pjb
The importance of comma cannot be stressed too much: "Let's eat Grandma." vs. "Let's eat, Granma."
13:16:50
lisp123
You should try it out, it works well, although there are obviously some gotchas. (which even databases have)
13:16:51
pve
lisp123: great, can you tell me how you use it? Like, does it enable new kinds of workflows, for instance?
13:18:05
lisp123
I use it for persistent in memory data storage, _replacing_ databases. So I have a certain class. And I can create instances of that class and they automatically get added to the BKNR Data Store, which I can query because it automatically generates indexes for each slot (e.g. "class-with-slot-name")
13:19:31
lisp123
Depends on what you are after. BKNR will be very fast because its in-memory (however it will need to load everything on startup, so if you refresh your image often, then factor that in)
13:20:16
lisp123
However, its "searching" capabilities are basically limited to hash table looksup, again very fast, but not as detailed as an SQL database. Also SQL has all the other stuff going for it - normalisations etc, so really depends on your data structure
13:20:29
pve
lisp123: For something like AllegroCache I can immediately see the value it brings, but for an in-memory solution it's less clear to me how it should be used
13:22:03
lisp123
I'm no expert, but if you are primarily dealing with one set of class objects, e.g. books in a bookstore, or theorems in a maths book, or cars in a garage, then BKNR works well because its mapped directly to your class structure
13:22:47
lisp123
If you need to work across tables and link them with keys and that sort of stuff, then SQL is probably better
13:22:58
pve
lisp123: It's another object persistence solution which stores instances transparently on disk (unless I'm very mistaken)
13:24:07
lisp123
In general, you can't go wrong with SQLite or Postmodern. And maybe after looking at it from that perspective, consider BKNR or an alternative
13:26:21
lisp123
From Google...First Author on Statice...Weinreb, D.; Can't get much better than that
13:31:13
Xach
Hmm, flipping through it has alerted me to something I've never heard of before, "ORION" from MCC, in Common Lisp.
13:34:17
didi
Can I specialize a method's parameter to `unsigned-byte'? i.e., (defmethod foo ((non-negative-integer unsigned-byte) ...) ...)
18:24:43
danirukun[m]
<Arcsech> "`company-mode` worked out of the..." <- huh interesting, I keep tuning my init file, but it still does nothing - even if I manually run `company-complete`, it says "no completions"
18:25:30
danirukun[m]
* ```elisp... (full message at https://libera.ems.host/_matrix/media/r0/download/libera.chat/01d4e0f2befa21d55a79942129070e9b31b6b2d5)
18:47:05
danirukun[m]
ACTION uploaded an image: (149KiB) < https://libera.ems.host/_matrix/media/r0/download/matrix.org/zGENjDkHaUgWMfgnGJosoTEI/image.png >