freenode/lisp - IRC Chatlog
Search
1:40:56
Bike
why bother with satisfies or typep in that case? all it does is make your program longer
2:06:36
Bike
since complex types work in an upgradey way, i think (typep (complex 7d0) '(complex (real 0 0))) could be true in some implementation
7:11:33
phoe
I have no idea what DAO-CLASS is, but I assume that it's a typo problem between USER-ID versus USER-IP
7:16:03
beach
ebrasca: My guess is that the metaclass requires you to have a slot named user-id, but your slot is named ida.
7:18:24
beach
ebrasca: So by importing that symbol, you med it impossible for both phoe and me to determine that this symbol came from Postmodern.
7:19:07
phoe
I guess that postmodern docs should be able to solve this problem, or maybe someone with more postmodern dao experience
7:19:40
phoe
beach: honestly I think the same, but I know everything I need once he mentioned the import
7:20:42
beach
phoe: Sure, but ebrasca is also contributing to SICL, and the style guide for SICL, explicitly calls for explicit package prefixes, possibly using package-local nicknames.
7:21:45
beach
But if ebrasca doesn't understand the reason for the rule, then it is likely going to be a problem in the SICL contributions too.
7:30:28
ebrasca
beach: Your style guide is a bit bad. See this one https://lisp-lang.org/style-guide/ , I think it is more easy to understand.
7:40:11
beach
I am not trying to be aggressive. I am just tired of arguing stuff like this, over and over. I made up my mind about the SICL style guide. Saying that it is "bad" is not helping.
7:41:39
Nilby
I like line length 80 because my eyes aren't great and I want to be able look at multiple pages side by side on a laptop. ... or underwater. in the dark. through a straw. :)
7:42:08
beach
And I would have to explain why I prefer what I wrote, to the guide in the link that you posted. And, like I said, I am really, really tired of that.
7:44:15
minion
flip214, memo from rpg: I don't have any experience with CL-WHO, so I don't know what ITERATE would do with it, but there are relatively easy-to-use extension capabilities in ITERATE.
7:49:31
ex_nihilo
ebrasca: I usually have two panes open side-by-side in emacs when I am coding; 80 cols works great for that on my laptop, but much wider and I start to have line-wrapping problems
7:52:36
ebrasca
I did not think about smaller screens , in screen I can fit 160 with two panes side by side so thinked 140 is ok.
7:55:23
flip214
ebrasca: lisp code is much denser than other programming languages, so line breaks (and indentation) is a valuable tool to show relations between forms; I think having too much stuff in one line is harmful.
7:55:55
flip214
Nilby: sometimes I change an xterm to a 1-pixel font - so that I can do graphics via writing spaces and X's ;)
7:57:42
Nilby
Also 1 or 2 pixel fonts are good for editor minimaps, which also add to the width on-screen.
8:07:34
ex_nihilo
ebrasca: if a lambda list is too long, you could put arguments on multiple lines, but that could also be a sign that your function is trying to do too much; maybe two functions would be better
8:08:32
flip214
ex_nihilo: that quickly degenerates into a function that prepares some object with lots of args, and then a function that consumes such an object and only a few args... which is not better, IMO
8:10:20
ex_nihilo
flip214: I don't mean that you should solve the problem of long lists of arguments by adding function definitions; I meant that when you have long lists of arguments you should _consider_ whether you have the best design
8:12:22
phoe
when they get too long and there is too many of them I tend to cut them in half and create a new package
8:21:01
phoe
moon-child: in Lisp, notnot means that we want something of type BOOLEAN, not a generalized boolean
8:21:28
beach
So without arguing a particular width, I think the purpose is to minimize the amount of white space (without changing the preferred names) so that the maximum amount of information can be presented to the programmer. Now, we can just go count the fraction of white space to non-white space for different widths.
8:22:11
beach
phoe: That would be weird. (not (null ...)) sure, but not (not (not ...)) because in the last case, ... should already be Boolean.
8:24:37
flip214
beach: In german it's uncommon to say "außer ...."; I notice that I don't use UNLESS. I feel much more comfortable with (IF (NOT ...)) which corresponds to the German "Wenn nicht 'alles gut ist', 'sage Fehler'" example.
8:24:47
jdz
And have to resort to converting UNLESS into WHEN and do the boolean transformations of the test-form.
8:25:22
flip214
I sometimes try both (NOT (AND ...)) and (OR (NOT ) (NOT )) to see which is more readable
8:25:36
phoe
I generally avoid UNLESS AND and UNLESS OR and convert it to WHEN OR and WHEN AND whenever possible
8:25:48
engblom
I saw https://lisp-lang.org/style-guide/ mentioned. There is actually one thing I wish it had: better instructions for how to achieve the 100 character limit per line. Like recommendations on how to split longer forms, how to handle longer docstrings, max number of forms/line etc.
8:26:03
beach
flip214: I understand. I use (IF (NOT ...) as well, but not as a replacement for UNLESS. I use it when there is both a `then' and an `else' form, and I have reasons to care about the order of the two.
8:26:34
ex_nihilo
beach: if you wanted a bool instead of a list from MEMBER, wouldn't you use (NOT (NOT (MEMBER ...)))?
8:28:12
beach
ex_nihilo: I tend to pretend that MEMBER returns a Boolean, and I would use FIND if I want some object.
8:29:56
jdz
I think I'd use either (if (member ...) t nil), or (not (null (member ...))) instead of double NOT.
8:36:29
beach
engblom: Like I said, the idea would be to minimize the fraction of white space to non-white space. You introduce newlines as required. If the newlines leave too much space to the right, you have too many. If have too much indentation, you have too few.
9:00:28
pjb
beach: if you want to convert a generalized boolean to a boolean, (not (not gb)) is indicated. It is hard to justify (not (null gb)) in that case, because gb is a boolean, so a boolean operator such as NOT is indicated.
9:03:36
beach
ebrasca: I haven't thought about it much. It is certainly higher priority to work on the code itself.
9:05:38
pjb
ATOM may very well return (you dummy bastard) when x is not a cons cell. (atom 't) #| --> :failed |# (atom "hello") #| --> generalized |# (atom 'nil) #| --> boolean |# (atom '(a . d)) #| --> nil |#
9:08:31
beach
That's a cute idea. Make an implementation that does everything that is allowed by the standard in the most non-obvious way.
9:09:28
beach
Er, I mean "That's a cute idea. Make an implementation that does everything that is allowed by the standard, but in the most non-obvious way"
9:10:36
pjb
To be a conforming implementation any undefined behavior must be defined and documented.
9:12:03
beach
"If AREF is passed an object that is not an array, then a short snippet of "Jingle bells" is played to the speaker".
9:17:01
heisig
The Common Lisp equivalent of Bastard Tetris (http://fph.altervista.org/prog/bastet.html) :D
9:24:27
fiddlerwoaroof
beach: I've often thought randomizing things where the spec leaves order unspecified would be useful
9:51:44
pjb
For the limits, they could be random, or be parameter of the program evicl --array-total-size-limit=1060
10:20:06
flip214
well, just use the rounded-down value to whole days, that's another level of unexpectedness there
11:58:37
dim
jmercouris: see http://p-nand-q.com/programming/languages/java2k/index.html and other "languages" there for inspiration and awes