freenode/#lisp - IRC Chatlog
Search
12:36:20
xificurC
standard doc generator? The cliki lists too many to browse :( https://cliki.net/Documentation%20tool . Ones that look OK on a first look so far - staple, heap
12:49:21
jackdaniel
subjective tip: write documentation, don't generate it (because by then it is hardly a documentation)
12:49:53
jackdaniel
I like to link sjl's post about the matter in situations like this: http://stevelosh.com/blog/2013/09/teach-dont-tell/
12:50:48
ogamita
xificurC: yeah, you have basically two choices: 1- you learn SGML and you use docbook. 2- you write your own.
12:51:07
ogamita
xificurC: if you write your own, be sure to generate one of the input formats of pandoc.
12:52:22
ogamita
I liked reStructured Text, but it's too rudimentary to produce nice PDF, so you end up using a lot of extensions custom or not, and the rst document is not readable anymore. So org-mode does it for now.
12:57:20
xificurC
I appreciate, understand and agree with most of what you all said. We already agreed we only want a few lines of comments of docstrings to document the functionality and would rather browse the sources for more in depth knowledge. This is a low-effort task as the tool being documented is marginal compared to other tasks we have. However a few lines
12:58:16
xificurC
I like the idea of "write your own" if it's not rocket science to crawl a file and get back all the comments and defined symbols with their docstrings
13:02:12
xificurC
I really don't want to go into the details of why and what would it take to rewrite, but that's where we are
13:11:54
flip214
What's the base location of PURI nowadays? cliki points to puri.b9.com which doesn't exist anymore; is com.b9.puri.ppcre the current replacement? (QL seems to return pure PURI, though)
13:13:06
jackdaniel
flip214: in quicklisp-projects repository you may find the exact url from which ql gets it
13:22:51
ogamita
xificurC: a full-fleshed CL parser includes a full implementation of CL, thanks to reader macros and #. in particular!
13:24:43
ogamita
shka__: extracting docstrings frmo loaded systems is very defective. (defun foo (x) #+sbcl "X must be a sb-ext:foo and this will do such and such" #-sbcl "X must be a string describing a foo and this will do that and the other" …)
13:25:11
beach
xificurC: Eclector was designed to be a complete Common Lisp READ function, which, in addition, is able to keep "discarded" material such as comments and expressions discarded by reader conditionals.
13:25:35
ogamita
shka__: it's not theorical, there are quite a number of implementation specific definitions, and docstrings depending on features in the wild.
13:26:30
shka__
ogamita: if you are generating documentation for your own code, this issue become irrelevant
13:29:12
ogamita
The point is that you need to further restrict the language to be able to process it so naively. In any case, there are already software engineering rules and other conventions. But the problem is when you do that without documenting the language the restrictions.
13:38:31
flip214
after doing QL:update-all-dists and ql-dist:clean I now get "Component "dexador" not found - needed by cl-coveralls, it seems
15:12:11
beach
Everytime a module extracted from SICL to an independent project is independently useful, I am pleased. Even more so when said project is improved and maintained independently, as in this case by scymtym.
15:53:56
pfdietz
It's a context-aware diff/merge tool, working on ASTs from various sources. For Lisp, it uses ASTs produced by Eclector.
16:19:30
beach
Speaking of extracting stuff, would there be a "market" for an extracted Common Lisp printer? I.e. would such a thing be possible to incorporate into existing Common Lisp implementations. In particular would it be possible to incorporate it into implementations written in C or C++, or would they need a printer written in the host language anyway?
16:20:43
jmercouris
if I define macroA which expands to something that includes macroB, but macroB has not been yet read
16:23:22
beach
There is already a portable pretty printer that I assume most implementations are using. I have a near-complete FORMAT for SICL, but this time I was thinking more of PRINT-OBJECT, PRINT, etc. and the printer variables.
16:23:29
jackdaniel
jmercouris: if you wrote macro-a which expands (macro-b something), and macro-b is not defined yet when you type (macro-a), then it will expand to (macro-b something) and treat macro-b as function
16:24:07
dlowe
jmercouris: it's specifically documented http://www.lispworks.com/documentation/HyperSpec/Body/03_bcaa.htm
16:24:33
jmercouris
so here's the thing, if I manually expand the macro myself in the repl twice, it works
16:24:57
Bike
So the idea here is that define-parenstatic and define-command are in different files?
16:25:33
Bike
That's okay, as long as you don't actually use define-parenstatic before define-command is available.
16:26:12
jmercouris
you can see the ASD file here: https://github.com/atlas-engineer/next/blob/master/next.asd
16:29:01
jackdaniel
moreover your code will break, if body has declarations (due to what you do there, either get declarations correctly or wrap ,@body in locally
16:29:17
Bike
i'm looking at macro.lisp and the definition of define-parenstatic doesn't seem to match your paste.
16:30:48
pfdietz
beach: it would be interesting if the pretty printer could be made to print other languages as well. I think it already can, to large extent. I think Baker had a paper on this.
16:31:05
pfdietz
Another thing that would be nice would be printing to something other than raw ascii.
16:32:06
Bike
Are you sure that you're actually using the definition of define-parenscript with the define-command and not the one with the defun?
16:33:54
Bike
if i were you i'd reload everything, making sure the version of define-parenstatic with defun is never loaded
16:34:26
pfdietz
beach: so just as Eclector is interesting because it's extensible/customizable, so a printer would be. There are real use cases (came up in my previous job) where this would have been handy.
16:40:26
jackdaniel
and when you C-c C-c this single form, is the print triggered ? (inferior-buffer or repl)
16:46:07
pfdietz
beach: I think what a printer would need to produce is some intermediate representation (with indentation and line breaks computed), which could then be walked to produce the actual output (raw ascii, HTML, etc.)
16:46:21
jmercouris
jackdaniel: as expected, putting in the break before make instance results in the debugger coming up
16:47:49
jmercouris
if I manually C-c C-c the forms after my system is loaded, they exist in the hashtable
16:49:06
jackdaniel
and if you put break in this expansion (toplevel, before make-instance), do you get a break during load
16:58:47
jmercouris
however its okay, I can do without this functionality for now, I'll leave it out
17:03:03
jackdaniel
I've cloned your software (don't put binary data in git repository <sigh>), adjusted parenstatic macro and loaded it
17:08:24
jackdaniel
assets/ directory. repository has over 50 thanks to that, while source is less than 500KB
17:09:09
jackdaniel
just don't put pictures in git repository. either way clean your cache, clone repository anew, make change to the parenstatic macro and load it, problem solved
17:10:04
jmercouris
however at this point, I'm not sure how I feel about obliterating old data and forcing a fast forward or something
17:11:20
jackdaniel
do what you want, keep in mind though that pulling 50MB for 500KB of source code may be considered silly. git is not good at managing something what is not text (there are annex and lfs extensions for that afaik)
20:00:27
pjb
stylewarning: the problem being that *features* are usually used with #+/#-, ie. at read-time.
20:01:39
pjb
On the other hand, the purpose of that library may be to add it for the benefit of other libraries, such as client libraries, so it could add it whenever you want, at compilation-time, at load-time or at run-time, depending on the intended use.
20:01:45
stylewarning
Bike: I mean, would you just do a toplevel PUSH somewhere while the system is being compiled? Should it really be done at load time?
20:03:13
stylewarning
I want to place this variable to indicate a library has a particular feature (the library complies to a standard). So it seems like it should be done at load time, since somebody could compile it into a bunch of FASLs.
20:05:49
pjb
stylewarning: (eval-when (:load-toplevel :execute) (pushnew 'my-library:feature *features*))
20:06:17
pjb
It's better to provide features last, when you're sure the whole library has been loaded without errors.
20:12:29
jackdaniel
stylewarning: cffi has a separate file in its sources called "features.lisp" and it is the last file (just as pjb suggests)
23:23:42
verisimilitude
I see you've been working with CHIP-8, lately, no-defun-allowed; I find that interesting, as I've been working with CHIP-8 as a starting point for some of my works, although this isn't much related to Lisp. Feel free to PM me if you're interested.