freenode/lisp - IRC Chatlog
Search
4:08:29
asarch
A book that you can use as a reference manual (how to open files, how to list directories, etc)
4:09:35
aeth
PCL is more of an introduction. Common Lisp Recipes (same publisher, different author) is more of a reference. I don't think it's online. The ebook was on sale for $10 on Black Friday. So... you'd have to wait almost a year
4:16:50
aeth
The core language features of Common Lisp haven't been changed in over two decades. The language extensions are a mix between just as old as the language (things that didn't get in the standard, but could have) and fairly new things. They still move fairly slowly. But everything else is just like any other programming language, and it changes over time.
4:50:09
pierpa
The best reference manual for CL is CLTLII + checking CLHS to be sure particular things haven't changed.
6:04:52
asarch
One stupid question: I start sblc and then type a few expressions, is it possible to save them into a file?
6:19:12
myrkraverk
For example I have it configured with :history #p"~/.sbcl.history" ; in my .sbclrc
7:17:17
smokeink
Is there any easy/idiomatic way to find all symbols that are fbound to some function ?
7:29:19
loke
Does anyone know of a nice library that can parse infix expressions as strings and evaluate them?
7:32:12
myrkraverk
It's basically the tutorial in most compiler books, but I don't know about a library for it.
7:33:28
myrkraverk
As in, flag1 flag2 flag3 are meant to be mutually exclusive and so far, each is a simple parameter.
7:33:48
myrkraverk
For two, I can just use (and flag1 flag2) but it gets harder when there are 3 or more.
7:35:19
myrkraverk
Of course there's something simple to do it. I was thinking about rolling my own with LOOP.
7:35:56
loke
If you have lots of flags, LOOP witll be more efficient as it will allow you to exit early.
10:19:18
specbot
Processing of Top Level Forms: http://www.lispworks.com/reference/HyperSpec/Body/03_bca.htm
11:22:22
jmercouris
every letter is a symbol, and together they compose words which are also symbols which ultimately express something
11:36:03
pjb
jmercouris: I would argue the symbolic expression is more precise, by being more fuzzy on the actual ranges of frequency, and also, ontologically, since an actual perceived color (light frequency) can be different from the actual color of the surface, under light conditions.
11:36:44
Zhivago
It's not a very interesting grammar -- just one composed of atoms and forms, where a form is a list of atoms or forms.
11:38:30
jackdaniel
my point is exactly that – are shorthands for forms also considered s-expressions?
11:39:25
pjb
jackdaniel: now you always have the ambiguity between the textual form and the read form. But formally you can accept the textual form under those definitions.
11:40:55
Zhivago
Fortunately, reader macros aren't part of the definition of symbolic expressions, so we can exclude those.
11:42:45
pjb
the usual definition of sexp := atom | ( sexp… ) . wouldn't take into account circular structures.
11:43:46
kolb
the current onslaught of "let me document all your projects using my $docgenerator" has to stop -.-
11:44:50
kolb
No I have two zombie sites that *mis*-render the polished docs of my projects without me ever having opted in to that, and seemlingly no way to make them *stop*.
11:44:59
Zhivago
Just go back to the Recursive Functions of Symbolic Expressions and their Computation by Machine paper. :)
11:45:54
kolb
quickdocs and quickref are imho the CL equivalent of yellow-pages sites that come up when you google for something. It’s *never* the site you are looking for. They are content mills.
11:47:39
kolb
Zhivago: to whom? quickdocs is unmaintained and just a ghost ship floating the S3, quickref probably has way other priorities than me and my polished docs, and was done in an internship
11:48:33
kolb
There is no editor, that’s the whole point. These projects just blindly scrape quicklisp and dump the result on the net.
11:51:57
Zhivago
kolb: Do you want to do a better job, or just not see those results in google searches?
11:52:28
Fare
kolb: I'm sure Didier Verna, who oversaw quickref, will be glad to accommodate your requests for an API to customize how quickref extracts documentation for you.
11:55:23
kolb
Zhivago: I want the announcement of $docportal to include a reasoning of 1) why its supposed to supersede existing broken $docportal, 2) how they deal with the natural issue that there is no defined grammar for docstrings, 3) document a way to opt-in/out (the "I scrape facebook and host profiles" model is not new, and neither are the issues with it)
11:55:41
kolb
Sorry for ranting guys. Obviously I will not write a stern, but friendly letter, detailing my issues.
11:56:16
Xach
I think the projects are done in good faith to improve the experience of people trying to find and use documentation. I think shortcomings are worth discussing.
11:57:48
Zhivago
Perhaps what you rally want is a link from the documentatoin on those sites back to your site?
11:58:11
Xach
kolb: The way you describe the effort makes it sound maliciously lazy and incompetent.
11:59:11
kolb
Xach: it is objectively neglecting, since these projects expect the content providers to run after the content farm owners to fix issues.
11:59:24
jmercouris
pjb: symbol: a mark or character used as a conventional representation of an object
11:59:35
Xach
I've found quickdocs pretty helpful in the past. I was under the impression it was actively maintained.
11:59:46
Fare
kolb: if you provide a declarative way to specify what documentation convention a given system uses, you can help solve the issue.
11:59:46
jmercouris
I don't mean symbol as in the common lisp usage of symbol, but the generic definition of symbol
11:59:56
Xach
It's nice to search for e.g. "decode base64" and get a handful of potentially useful results in a single place.
12:00:00
jmercouris
unless of course we say that within S-exp, we define symbol to have a meaning specific to the context of common lisp
12:00:28
jmercouris
Zhivago: Outside of the context of common lisp exists a definition of symbol, that's the one I'm using
12:01:40
kolb
I don’t want to take quickdocs/quickref from you guys. I just don’t want my polished documentation to be mangled by it. I put a lot of work into hosting and working on my docs. And when people find them on quick$foo instead of my site, they will think its broken.
12:03:42
kolb
Xach: my problem is not with the concept, my problem is that its auto-opt-in and now I am forced to run after two projects to fix things. I.e. work out of nowhere.
12:04:20
Zhivago
jmercouris: Why are you talking about s-exps in terms of symbols rather than atoms?
12:04:45
jmercouris
Zhivago: I'm just taking the name "Symbolic Expression" and saying that all expressions that are communication involve symbols
12:05:46
pjb
jmercouris: the point is that S-expression is for data, and M-expression is for code. See http://informatimago.com/develop/lisp/com/informatimago/small-cl-pgms/m-expression/index.html
12:06:03
kolb
Xach: the licensing makes this not-illegal, but I am not talking abour prosecuting people. I am asking for decency.
12:06:25
Zhivago
Well, that's obviously nonsense -- we can communicate via sound waves. Those don't involve symbols per se.
12:06:48
Xach
kolb: right - but I mean that you could also end up with a hundred sites copying your work in bad faith with little recourse.
12:07:09
jmercouris
Zhivago: Changing the medium does not change the fact that the sound "the" is a symbol for a concept
12:08:39
kolb
jmercouris: I probably wouldn’t like the grammar, and I already have a formal language I use in my docstrings
12:09:20
kolb
jmercouris: the parser / renderer are GPLed and on QL, what we are missing imho is a way do say 'render my docs using X' in as ASDF file
12:10:05
kolb
jmercouris: i.e. why do you think its a good idea to force everyone to use the same language?
12:10:40
kolb
Xach: just because you can get away with something does not mean its a good idea to do, or that it necessarily has to happen / be the status quo. I don’t do politics in terms of game theory.
12:11:20
Xach
kolb: right, i mean your options of reactions and how much they can do are limited by your choice of licensing and the intentions of the people who have done something you don't like.
12:12:15
kolb
Xach: well no, fundamentally I am not looking for ways to coerce people to follow my will. I want us to agree on what’s cool and what’s not cool.
12:12:16
Xach
kolb: https://cr.yp.to/compatibility.html springs to mind a bit - i understand both positions and which one i find least objectionable depends on my short-term goals in a particular situation
12:16:14
Zhivago
kolb: How do those projects break your documentation? Do you have a link to one of the breakages?
12:17:46
jmercouris
kolb: Whenever you publish your content publicly, on a license that permits access to it, people can do with it as they wish, if you don't want people to reproduce parts of it etc, then write clauses in your license
12:18:25
jmercouris
I haven't checked quickref, but I they probably include a link to the source / the license
12:18:30
kolb
jmercouris: yes, yes, I know, when we have no rulers everybody will start murdering each other
12:19:20
kolb
Xach: standards can be nice at the edges, but I don’t think how you write your docs is an "edge". There are many reasons why you would want choice in that regard, and I would consider a coercive approach to unifying the CL documentation landscape highly problematic. What you are seeing happening in Quickdocs/Quickref are already sympthoms of ossification.
12:20:05
kolb
I love the fact that everyone in the CL world rolls their own documentation solution. I hate the fact that some want to become standard.
12:20:33
kolb
I would back a standard interface for converting between languages though, but that is a hard problem.
12:20:38
jmercouris
Actually, Xach could pretty much dictate how CL documentation would be since he is the bus-factor 1 of Quicklisp, maybe though if he was too strict people would fork Quicklisp or something
12:20:54
Xach
kolb: Do you discuss it here to vent cathartically or is it a real effort to change the minds of the people who work on quickdocs and quickref?
12:21:36
p_l
kolb: I'd argue that quickref, being for reference manuals, is a good idea. Let people write *good* user manual in whatever way they want, and have a slightly advanced variant of docstrings quickly searchable
12:22:42
kolb
p_l: I repeat again: I don’t want these projects to disappear, I am annoyed by the way they handle some specifics.
12:25:49
kolb
Xach: I would be interested in talking about how we could organize these kinds of things around the common "database" Quicklisp. I.e. I assume there is a way to include metadata in the DB these Quick* projects scrape. We could propose a way to signal a) if you prefefer your proect to be included in Quick* or not, b) i.e. how to produce HTML for you project c) ...
12:26:01
myrkraverk
And since I don't have anything on QL (yet) I don't care so much about reference aggregators.
12:27:06
kolb
Xach: i.e. with a way to express opt-in/out of the QL database, it would be easier for consumers of the database to respect their upstreams
12:28:21
myrkraverk
I find the idea of specifying what docstring-to-html to use, by aggregators, but I wonder how? Afaik, QL is just based on ASDF, and that doesn't have anything resembling such custom tags that I know of.
12:29:15
Xach
kolb: I can imagine some mechanisms, like creating a file with a special name in the repo or something.
12:32:03
jmercouris
that's actually been one of the reasons I have not wrote a single docstring (outside of defparameter defvar) in my project, I don't know which way is the best
12:32:17
jmercouris
if there was a dominant way I could be sure will not require me a rewrite in the future, I would do it
12:32:51
myrkraverk
jmercouris: I try to write the docstrings in a way that'll make it useful to use the function; so I don't have to read the source code, possibly years later, to re-use it.
12:33:42
jmercouris
I don't care about aggregators myself, I care about docstring -> reference manual generation tools
12:33:53
myrkraverk
Oh yeah. I tend to use `foo' because that's highlighted differently in [x]emacs.
12:34:33
myrkraverk
And to prove it, I just published this today: http://www.myrkraverk.com/blog/2017/12/xemacs-sorting-key-value-lines-by-value/
12:35:35
jmercouris
I imagine there are at least a couple dozen users worldwide, if not in the thousands
12:35:35
myrkraverk
So I generally refer to "both of us" when I talk about xemacs users; but I know there are more.
12:35:45
kolb
jmercouris: so as someone who has actually adopted a formal language in docstrings, I say in retrospect this is probably a bad approach. Docstrings are as intended by the standard used for lookup in the lisp IDE, i.e. apropos. Yes, I can now automatically generate my docs, but I also have a markup document for every public symbol in my source code.
12:36:31
jmercouris
kolb: But what about describing argument expectations, is that also not useful for someone in a lisp ide?
12:36:55
Shinmera
kolb: FWIW Staple includes a mechanism to allow extensions of the documentation system per system-being-documented, so you can add new definition types, customise the rendering of the main documentation part, etc.
12:37:16
myrkraverk
I find myself often delve into docstrings to figure out the return value. I personally try to put it in the second paragraph: Returns foo.
12:37:22
kolb
jmercouris: it totally is, but I doubt using a formal language/syntax for it is a good compromise between readability and style
12:37:33
Shinmera
But as far as I know Staple is the only doc system allowing for something like that
12:38:08
kolb
jmercouris: I have a comparatively lightweight syntax, but my public docstrings still have become quite beurocratic
12:39:09
kolb
jmercouris: and I guess when standards/non-standards keep you from riting docstrings, its obvious that its better to not think about standards, and just write what you think is useful instead
12:40:02
Shinmera
I've already written too much documentation to be bothered to go back and change it all even in the extremely unlikely situation that a standard for docstrings would be written that I agree with and fills my needs.
12:40:28
Shinmera
So I agree with the stance that the only way to work with this situation is to offer a customisable way to render the documentation.
12:41:37
Shinmera
I also agree that having a central place to discover documentation and projects is invaluable. But perhaps it would be better to simply include or link to the projects' own documentation for those that have it than to try to sledgehammer everything into one package, even if that would incur different looks for different proejcts.
12:42:55
kolb
Because people asked: this my the doc I host: http://mr.gy/software/maxpc/api.html this is quickref: http://quickref.common-lisp.net/maxpc.html#The-maxpc-package
12:43:51
kolb
Xach: I find it much more disturbing if Quick* goes down, i.e. single point of failure, compared to when links rot
12:44:47
Xach
kolb: I would really like a way to get good docs locally, as well. even though there are vanishingly few ways to be really offline now.
12:45:32
kolb
Xach: C-s (i.e. Save as...) HTML pages works well for me, I use an offline index (recoll) to search all my documentation (and system). Its nice.
12:46:46
kolb
Shinmera: that is the really nice way do it, and much appreciated. I understand that its annoying for maintainers to keep build artifacts in repositories though.
12:46:52
Shinmera
Staple also includes a "staple server" system to generate the docs in your browser on the fly.
12:47:15
Zhivago
kolb: I have to say that putting that kind of mark-up into docstrings seems like it's just begging for terrible things to happen.
12:47:35
Shinmera
kolb: I run (staple:generate :foo) that writes the about.html, and then a script to push that to the gh-pages branch. It's really no biggie.
12:48:11
kolb
Shinmera: oh ok, I was thinking more in the terms of including a HTML manual in release tarballs
12:48:57
kolb
Zhivago: yes, I deserve anything bad that might happen because I like well-typeset documentation
12:49:13
Xach
There are some projects that use a toolchain to generate docs that is very hard to acquire and use.
12:50:12
Zhivago
Have you considered a translator from your mark-up to plain-text that would be suitable in docstrings?
12:50:53
myrkraverk
In cases like the cl-ppcre docs disappearing from online, there's also ~/quicklisp/dists/quicklisp/software/cl-ppcre-2.0.11/doc/index.html
12:51:01
kolb
Zhivago: a full suite for my documentation system is on QL, it includes a formal document model based on s-expressions, translators to print, html and plaintext
12:52:51
Zhivago
Which presumably you expect random implementations to be able to display in some sane fashion.
12:53:09
Zhivago
This seems an unreasonable expectation, and the root of the problem you're currently talking about.
12:55:48
Colleen
Macro radiance-core:define-string-route https://shirakumo.github.io/radiance#MACRO%20RADIANCE-CORE%3ADEFINE-STRING-ROUTE
12:56:14
Shinmera
^for instance there's some formatting in there, and some "special" syntax recognised by staple, but it is still well readable from the repl
12:57:33
Shinmera
shka: I depend on documentation-utils in a lot of my projects for docstring reasons, and don't see the problem.
12:57:53
kolb
Zhivago: the root of the problem is people wanting to decide what’s "right" for everyone else
12:58:48
Shinmera
myrkraverk: The first line should describe the overall function in full, which can make it a tad long sometimes, yeah.
12:59:23
Zhivago
kolb: Yes, you want to decide that weird crap in docstrings is right for everyone else. :)
12:59:23
myrkraverk
Shinmera: Yes, I know; I tend to break the first line for my docstrings anyway; but the first line *is special*.
13:00:54
myrkraverk
And about long lines; I tend to split my screen horizontally, so I can put two code pages side by side (or manual, page, etc) -- but because most "modern" IDEs don't do that, developers have gotten extremely lazy about shortening long lines.
13:03:00
Zhivago
kolb: Are you putting weird mark-up into docstrings and expecting random systems to deal with that as you expect or not?
13:46:34
kolb
Shinmera: Regarding documentation-utils, can I get the untranslated docstring for a a symbol/type tuple?
13:46:53
Shinmera
There's currently no translation going on at all, so just DOCUMENTATION will do that
13:47:35
kolb
Shinmera: yeah but I would use a translator, but still need to get to the original source to generate my HTML docs
13:48:07
Shinmera
You're asking me about features that aren't implemented. How am I supposed to know how they would work?
13:48:25
kolb
http://shinmera.github.io/documentation-utils/#DOCUMENTATION-UTILS:*DOCUMENTATION-TRANSLATORS*
13:49:44
Shinmera
You COULD output some other place that side-effects documentation and stores the original string somewhere else to do what you want
13:50:45
shka
https://github.com/sirherrbatka/cl-data-structures/blob/master/src/api/docstrings.lisp
13:56:58
shka
i don't see need for docstample as a separate project, so i would rather add all features into documentation-utils, should i use github issues to discuss this?
14:45:35
lisp_guest
how exactly is LAMBDA as a symbol vs. LAMBDA as a macro differentiated by the evaluator?
14:46:11
lisp_guest
are the possible cases where a lambda expression is acceptable just enumerated on a case-by-case basis?
14:46:42
lisp_guest
yes, indeed. so how does the evaluator know when it's a macro and when it's a symbol?
14:47:21
beach
lisp_guest: It depends on the occurrence. If it is in a position where the form is evaluated normally, it is a macro call.
14:47:43
lisp_guest
Bike: right, that's what i'm wondering about. so it's basically hardwired into FUNCTION itself?
14:47:46
beach
lisp_guest: Otherwise, it is just a lambda expression starting with the symbol LAMBDA.
14:48:43
Bike
there are a few functions that deal with lambda expressions, like COMPILE and COERCE, but they take expressions as quoted data
14:49:53
lisp_guest
mhm. so basically, there are few special places when a lambda form has special meaning (like FUNCTION and calling a function), and in all other cases it's treated as a macro
14:50:42
Bike
function and lambda forms (which is what you call what beach said) are not normal evaluation contexts
14:51:59
TMA
lisp_guest: it is the same as with other symbols designating a macro -- when in normal evaluation context, the list (A ...) is a macro call for any symbol A designating a macro (including the symbol LAMBDA)
14:53:36
TMA
lisp_guest: there are special contexts (such as inside (QUOTE ...) or (FUNCTION ...) or other special forms where the context dictates following other rules as specified by that special form.
14:54:46
lisp_guest
mhm. so there's really nothing *that* special and black magic about it. the interpretation of the expression depends on the context and that's it
14:55:14
TMA
lisp_guest: additonally the (LAMBDA (...) ...) expression can be used in the operator place in a compound form. this is the only special case for (LAMBDA (...) ...)
14:57:04
TMA
lisp_guest: so that you can use ((lambda (a) (+ a a)) 1) instead of (funcall (lambda (a) (+ a a)) 1)
14:59:28
lisp_guest
what was weird when i first learned about this is that it seemed like black magic because i couldn't tell when it had its special meaning
14:59:42
lisp_guest
fiding out and confirming that it's "hard coded" into the standard makes it very easy to understand
15:01:34
Bike
it's described on the page for function, and lambda forms are explained in the pages on evaluation semantics.
15:05:49
Bike
a lambda expression. a list beginning with LAMBDA. like (lambda (x) x). like we've been talking about.
15:08:55
lisp_guest
Bike: exactly, but when i read "expression" i didn't think of such a list. i guess it's because i got used to what the term meant in other languages