freenode/#lisp - IRC Chatlog
Search
6:25:07
beach
I think of a style guide as merely documenting established conventions. Not as an attempt to expose personal preferences.
7:47:34
beach
A two page document that contains more than 40 occurrences of "I" is not a style guide. It is an exposure of personal preferences.
7:55:17
no-defun-allowed
http://verisimilitudes.net/2020-02-14 I guess. Usually I would expect that the newest documents are at the top of the list.
7:57:32
Shinmera
beach: He did say that he just wanted to note his own preferences, but I honestly don't understand the point of writing something like that up, if it's not meant to be generally useful?
7:59:27
no-defun-allowed
I disagree with (the example of) reusing symbols; the latter would cause less of a hastle if another programmer wanted to extend the program, maybe to also count the number of symbols with function bindings.
8:04:20
White_Flame
most of the doc is personal preference (much of which I could give real reasons against), but that one is pretty cut and dry
8:07:27
no-defun-allowed
I don't understand what is meant by "A macro should strive to have an expansion which is pleasant to a human reader and also stress using pure standard Common Lisp where possible". The first part is hard to do in some situations, such as parsing, where the code generated is going to be ugly no matter what, but I don't understand what "pure standard Common Lisp" means. Can I not expand to another macro I define using
8:08:08
jeosol
I am not sure if he is trying to be funny, argumentative or not. He said he doesn't use WHEN and UNLESS. Haha. Interesting ...
8:09:14
beach
jeosol: I think "argumentative" is the answer. If you look in the logs of this channel for the last 2 years, and you search for utterances by me mentioning that name, you will see.
8:10:10
jeosol
I am surprised by some of the things he writes, whether is a lisper or just some troll.
8:10:17
no-defun-allowed
If so, I'm done for, because in one of my projects I have a DEFINE-FUNCTION-OPCODE, which generates a body for DEFINE-OPCODE which calls a function, which then expands to %DEFINE-OPCODE with some typo checking. That seems like a fair expansion path otherwise.
8:10:24
beach
jeosol: It is basically a long list of "I don't give a damn about conventions. This is what *I* think."
8:11:26
jeosol
That's how I read it. Especially the comment about using 100 columns vs. 80 columns, and alluding to tribal fire ...
8:12:41
jeosol
I guess I shouldn't take it seriously then. I thought it was something that probably incorporated and built on Norvig's/Pitman's guidelines
8:13:46
beach
It's the exact opposite. That document was recommended to this person more than a year ago. The fact that Norvig and Pitman are much more experienced does not seem to matter.
8:14:17
jeosol
He really just wants to argue and be against convention. In almost every paragraphs, he comes across as not wanting to heed or following any convention.
8:15:47
no-defun-allowed
And the example code shouldn't be presented differently to actual code, as it is already distinguishable from other text by the gray background and monospace font. That is especially confusing in the context of a style guide; should we write all upcased code?
8:16:00
beach
I mean, by not following the recommendations on that page, you actually follow the recommendations on that page. :)
8:16:24
jeosol
no-defun-allowed: yeah, the comment about upcase, I didn't see the point of it at all.
8:17:31
no-defun-allowed
(I don't mind people saying "screw you guys, I'm going to do my own thing" and acting upon it, as that sometimes creates very interesting results, but this style and its presentation are very silly.)
8:19:22
White_Flame
what is this supposed to mean? "if a multi-word predicate name ends in P, that implies it's not a predicate, but a variation on one."
9:22:56
jackdaniel
White_Flame: if I had to take a guess, it tries to hint a difference between simple-string-p and string-lessp
9:23:32
jackdaniel
where the former is a predicte for type simple-string, while the latter is a variation of a predicate lessp
9:48:30
madrik
As advised, I have removed CL packages I got from Apt (Debian) and now manage them using quicklisp.
9:49:09
madrik
And thank you for recommending FiveAM. The idea of suites was what I was missing in RT.
12:00:33
madrik
When I try to evaluate '(quicklisp-quickstart:install)' after load 'quicklisp.lisp' in SBCL, I get an error:
12:06:44
edgar-rft
madrik: is that on Windows? "the truename of :" looks like the colon of a Windows drive letter like "C:\"
12:13:40
edgar-rft
hmm, what SBCL version is that? Debian somtimes has stoneage software in its repos
12:15:27
madrik
Well, I tried the 1.4.16 version that Debian provides, and I also built 2.0.1 from source.
12:24:00
pjb
So try to (setf *default-pathname-defaults* #P"") on those implementations where it doesn't work and try again.
12:30:18
madrik
In SLIME's backtrace, I see that (truename #P"") is called in the course of quicklisp's install procedure.
12:31:34
pjb
madrik: calling (truename #P"") is bad. Try to see where this #P"" comes from, and why it's not filled with an actual pathname.
12:36:02
madrik
I first thought that maybe it could be an issue with SBCL's interpreter, and so switched it to use the compiler.
12:37:21
madrik
I see that MERGE-PATHNAMES is called with arguments QUICKLISP-QUICKSTART::*HOME* and (TRUENAME *DEFAULT-PATHNAME-DEFAULTS*)
12:37:50
madrik
sb-interpreter::data = #(#<function merge-pathnames> #<sexpr quicklisp-quickstart::*home*... #x1002900A33> #<sexpr (truename *default-pathname-de... #x1002900A73>)
13:06:10
pjb
madrik: (TRUENAME *DEFAULT-PATHNAME-DEFAULTS*) is a bug in general, since *DEFAULT-PATHNAME-DEFAULTS* is not normaly bound to a file pathname.
13:09:45
Xach
WHat do you get from sbcl --noinform --non-interactive --no-userinit --no-sysinit --eval '(print *default-pathname-defaults*)' --eval '(terpri)'?
13:11:28
Xach
How about sbcl --noinform --non-interactive --eval '(print *default-pathname-defaults*)' --eval '(terpri)' ?
13:14:34
Xach
How about: ssbcl --noinform --non-interactive --load ~/Source/quicklisp/quicklisp.lisp --eval '(quicklisp-quickstart:install)'
13:17:05
madrik
Quicklisp has already been installed. Load #P"/home/madrik/quicklisp/setup.lisp" instead.
13:19:44
Xach
How about: sbcl --noinform --non-interactive --load ~/Source/quicklisp/quicklisp.lisp --eval '(quicklisp-quickstart:install :path "/tmp/quicklisp/")'
13:21:51
Xach
Well, sorry it glitched, that is not an error that happens typically. It's not a "oh that happens all the time and here's the workaround" sort of thing.
13:29:39
madrik
If I want to use quicklisp to manage local projects of mine, what should I put in 'quicklisp/local-projects' -- the ASD system definitions and all Lisp source files?
13:31:28
beach
You can make any number of subdirectories in that directory, or you can put symbolic links (at least for SBCL) in that directory to anywhere you like.
13:32:18
beach
You just need to remember to execute (ql:register-local-projects) after every new ASDF file you create.
13:49:16
madrik
Is the DO form in PRODUCE-TWO-RANDOM-NUMBERS a good way to get two distinct random numbers?
13:51:16
_death
madrik: you can (random n) to get the first number, then (random (1- n)) to a number that can be mapped to the second number
13:56:54
_death
in this case, it means if the second number is less than the first, take it as is, otherwise, increment by 1
13:59:41
beach
If the first number is A, then A+1 will never be produced as a result of that procedure.
14:00:43
_death
you can think of the first as returning an index to a sequence of (iota n) and the second as returning an index to the sequence (remove first-number (iota n))
14:01:33
_death
beach: suppose N=10 and A=5.. if the second form (random 9) returns 5, then the second number is A+1=6