libera/#commonlisp - IRC Chatlog
Search
5:05:21
mfiano
Using the MOP, would it be possible to "disable" EQL specialization for a new generic function in a supplier library, such that consumer code only using class name specialization does not need to change (no new qualifiers in defmethod forms, etc)
6:53:14
jackdaniel
mfiano: perhaps a befire method on add-method that check the defined method for illegal specializers
6:56:21
mfiano
Ok, thank you. That might work. I'm just expanding on my new project idea notes on [digital] paper and exploring different designs. No real reason.
9:20:34
euouae
On Emacs with SLIME, I've noticed that `items' inside docstrings such as `car' show up in bold
9:21:07
euouae
Is there anything that can be done with them? and how is Common Lisp documentation navigated in general?
9:21:31
euouae
I'm trying to think whether a Markdown reader macro with a few extra features (cross-link, etc) would make sense
9:25:06
scymtym
what would the reader macro do? you can (if you really want to) just use markdown in the documentation string as it is
9:26:53
euouae
phoe: One thing would be to allow docstrings to sit aligned, not having the first sentence intended and the rest left-aligned
9:27:15
scymtym
euouae: i mean you apply some sort of validity check, maybe, but the object returned by the reader macro has to be a string if you want to use it in docstring position
9:27:20
phoe
there are two questions that you need to ask in this case - what do you want to write your source code in, and what sort of output you want to get after the processing
9:27:56
euouae
scymtym: yeah it'll be a string, but it'll be in a format that will be fed into the HTML producing engine
9:28:24
euouae
Ideally the reader macro behaves differently depending on some dynamic variable so that I can turn that on/off so the normal user can read the docstring normally too
9:28:48
euouae
I don't think this is necessarily a reader macro thing either. It could be done without the reader macro. But the alignment -- I think the reader macro should definitely do that.
9:29:33
scymtym
right, doesn't sound like a reader macro except for the changed alignment and whitespace processing
9:31:50
euouae
As for the `car' question, is that an Emacs thing? Are docstrings supposed to have it?
9:32:19
euouae
I tend to do FOO for function parameters and `foo' for symbols. Is that valid or nonsense? I can't tell
9:32:31
scymtym
that is a convention for emacs lisp that happens to be inherit by some (all?) lisp modes
12:47:17
AadVersteden[m]
Logic programming: any commonly used libraries? I once built a hacked prolog library so I suspect something exists that I'm missing.
12:47:43
AadVersteden[m]
I have a problem in which I want to distribute information through a network of objects. Most of the rules for distribution are known up front. The entities to attach information to and their relationships are only known at runtime, as is the starting information. Cycles may exist.
12:48:12
AadVersteden[m]
Perhaps it makes most sense to build something ad-hoc to get a better feel for this.
13:48:29
euouae
phoe, but the silly system name has to be part of the asd file and the directory too?
13:57:45
phoe
the directory containing the system can be named foo/ but then you'll need to have foo/org.phoe.foo.asd containing (DEFSYSTEM #:ORG.PHOE.FOO ...)
13:59:07
euouae
I wrote my little toy graph library and now I want to try the other goodies -- unit tests, benchmarking & profiling
13:59:28
euouae
I got twice side-tracked... I was writing a random package utility but now I'm doing that :P
14:01:24
phoe
and please write your own testing framework as a training exercise, but for the love of whatever gods you worship please do not have anyone use it in practice
14:02:40
phoe
yeah, getting to the stage where you have your own EVAL with lexical variables is really fun to figure out how Lisp can work under the hood
14:06:55
dipper
there is so many game engine in market, I don't think use lisp make one can earn money.
14:07:07
euouae
I tend to use GPL but I think CL has very of those projects and I don't want it to just be in the way of it
14:07:28
phoe
LLGPL is one popular choice; it's essentially LGPL with a little bit of Lisp-specific preamble
14:07:57
beach
euouae: I wouldn't hesitate using GPL for end-user applications. I am afraid many people frown upon xGPL, so I use BSD for libraries and such.
14:08:08
phoe
for bigger applications that you'd rather not have others reuse without sharing the code-- yes, what beach said
14:12:11
thuna`
In docstrings, when you need to quote multiple words in `', do people put \ before each space? The highlighting doesn't work for me unless I do that so I tend to do it but I can't imagine that's a normal thing to do.
14:12:43
phoe
I only put \ between a newline and opening parentheses because otherwise slime/sly gets god damn confused
14:13:10
phoe
...but then again, I do not use `' in docstrings and instead prefer to use SCREAM-CASE for symbol names
14:13:58
thuna`
phoe: Yeah, I do that for variables, functions, etc. too but I quote type names and such
14:14:43
phoe
thuna`: that's really weird to me tbh, I wouldn't do any of this just to get slime highlighting inside docstrings themselves
14:43:08
thuna`
Alright, figured it out. In the file `lisp/emacs-lisp/lisp-mode.el', you change (rx-define lisp-mode-symbol (+ (| (syntax word) (syntax symbol) (: "\\" nonl)))) to (rx-define lisp-mode-symbol (+ (| (syntax word) (syntax symbol) (: "\\" nonl) " ")))
14:46:26
thuna`
If you send more than 15 lines of code in patches in total, you need to assign with the fsf
14:47:10
phoe
yes, I see; I guess you could also send a mail to the devel list and ask someone to commit on your behalf since this is a trivial change
14:50:55
morganw
I've always assumed that what gets quoted should be valid as a name, so it wouldn't be possible to have a space in it. If it is meant to imply a quoted string I think it would use double quotes.
14:52:07
thuna`
Yeah, that's true for symbols but quoting CL glossary entry names is a valid use of the `' quotes I think
14:52:44
phoe
at that point, sure, if it can contain whitespace then it should be able to contain newlines
14:53:03
thuna`
And since CL doesn't link the quoted strings like emacs does for elisp, it shouldn't be too big of an issue
14:59:07
pjb
Anyways, I don't like `'. It works for ASCII, but we have unicode nowadays. Use “ and ”.
14:59:32
euouae
thuna`, for the contract to be enforceable, they pay you $1, but I can't technically be paid, I'm in the US on a tourist visa
15:01:09
Nilby
ACTION prefers ‘these’ aka #\LEFT_SINGLE_QUOTATION_MARK and #\RIGHT_SINGLE_QUOTATION_MARK, which are less likely to be mistaken for unmatched punctuation such as #\APOSTROPHE
15:02:26
pjb
euouae: if you're not US resident, you don't have to declare it to US IRS, so nobody will know if you got money from the US to your home country.
15:02:29
thuna`
My keyboard has those bound to AltGr (imagine left alt) + Shift + {b,n}. I'm NOT typing those on a regular basis.
15:23:56
_death
better to tell asdf to call your own test function, rather than directly to parachute's
15:44:28
euouae
if I define a variable with defparameter like (defparameter *x* 1) and then in parachute use :fix (*x*) it doesn't restore its value to 1
15:45:45
euouae
if *x* is (cons 1 2) and I do (setf (car *x*) 3), isn't it supposed to be restored to (cons 1 2) after the test?
15:47:18
NotThatRPG_away
euouae: But you are side-effecting onto the original value when you set the car
15:47:48
Shinmera
you're modifying the structure, not the binding. the fixture only fixes the binding in place.
15:49:59
Shinmera
Anyway, it cannot fix the entire structure in place, because it cannot transparently copy structures to preserve their state.
15:50:43
Shinmera
uh. when you change it in the test and want it to restore to the original value afterwards?
16:37:23
Shinmera
yes but at least usually those people also admit that do/do* sucks real bad and use something like iterate instead.
16:38:03
jackdaniel
kakuhen: this may be a knee-jerk reaction to people who seem compelled to teach them that the loop is teh wai
16:40:07
jackdaniel
loop is fine for what its designed for, even if a bit obscure (specification and extensibility wise)
16:43:12
NotThatRPG
kakuhen: I'm one of the ones that Shinmera is talking about. I *never* use do/do* and I *do* use iterate. If you are interested, I could say why, but otherwise won't...
16:45:06
euouae
NotThatRPG: are you up for a challenge? I can give you a function with do* that I like better than loop
16:45:11
kakuhen
at one point in time I was also an iterate fanboy but then caved in to the (relative) portability of loop
16:45:12
kakuhen
as long as im dealing with code that isnt defining custom stuff into iterate or using e.g. the NEXT-ITERATION form, then I generally refactor into a LOOP
16:45:49
NotThatRPG
I prefer iterate for it's better integration with multiple values and because the LOOP conditionals are awful
16:46:31
euouae
I don't think it's _that_ challenging, but I struggled with loop and I found do* nicer