freenode/lisp - IRC Chatlog
Search
20:35:53
White_Flame
when paredit won't let you delete because it thinks there's an imbalanced parenthesis, how can you get it to show where that imbalance is?
20:36:12
White_Flame
I have a file that's mostly comments, and something in there is confusing paredit
20:36:41
phoe
I don't usually have that problem because I use rainbow-parens and I identify missing parens by color
20:38:42
Nilby
emacs sometimes up if you have something like the re "^(defun" in docstring or in a multi-line comment
20:39:17
White_Flame
again, all parens are balanced, even in the comments. Paren balanced scope doesn't even traverse multiple lines
20:41:06
White_Flame
clearly there is a location where it transitions from "balanced" to "imbalanced"
20:43:09
White_Flame
hmm, yeah I think I just fixed it, too. change "|#" to ";;|#" and now it stops whining
21:01:10
pjb
Nilby: the advice is to use \( when you have to put a parenthesis at the start of a line in docstrings.
21:02:15
pjb
Reader macros can imbalance paredit, which still uses emacs forward-sexp/backward-sexp instead of a CL lexer/parser.
21:36:17
engblom
I know I have once before asked but I forgot: what is the difference between :use and #:use in defpackage?
21:43:22
engblom
pjb: Thanks, I found the use of #:use but it must then be specific to mgl-pax:define-package, which is used in that file
22:07:15
engblom
I will have to use multiple return values. Does CL have destructuring as in Clojure? (meaning I can have something like (defun adding ((x y)) (+ x y)) and then call it with the result of a multivalue function)?
22:15:30
engblom
I am looking at https://github.com/keithj/alexandria/blob/master/package.lisp. Why do all the exported functions got #:function-name instead of just :function-name?
22:16:17
Bike
the things in defpackage are string designators, so symbols have no meaning beyond their symbol name, so #:f and :f are the same to defpackage
22:16:29
Bike
the only difference is that with #:f there will not be a symbol interned in the keyword package
22:19:44
Bike
keyword is a special package. all the symbols in it are constants with themselves as values. that's why if you put :foo in the repl you get :foo back.
22:20:12
kagevf
you can also do (multiple-value-call #'+ 1 2 3) ... m-v-c will take all the values of any forms ... it's like it does the (values ...) for you
22:25:14
pjb
Since eval is a function :foo would be evaluated before its value being passed to eval…
0:34:07
nij
Hello! I cannot figure out why flet fails to bind a function in a lexical environment: https://bpa.st/3VPQ .. While evaluated, it complains that #'adhoc-test is unbound.
0:35:01
Bike
typep is just a function, so it doesn't know anything about the lexical environment it's called in
0:35:09
nij
Oh.... yeah now I remember: "which must be a symbol whose global function definition is a one-argument predicate." http://clhs.lisp.se/Body/t_satisf.htm#satisfies
0:37:35
nij
Bike: what would you do to type-test in this scenario, in which "3" and "2" appearing in the def of adhoc-test might vary at run time?
0:42:48
nij
Anyway, do we really need #'typep? It feels very restrictive when I cannot put any lambdas there.
0:50:00
saturn2
typep is useful for the things it is meant for. it's not meant to express every possible predicate
0:51:56
saturn2
i think SATISFIES is kind of a half-baked afterthought and was probably a mistake to include in the standard
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