freenode/#lisp - IRC Chatlog
Search
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
16:26:24
nyef`
Today I learned: The AMOP specification for MAKE-METHOD-LAMBDA includes an example which uses FLET to bind CALL-NEXT-METHOD, an action forbidden by CLHS.
16:28:35
beach
I am not sure that's the right interpretation of what the Common Lisp HyperSpec says.
16:35:16
nyef`
CLHS FLET says that it establishes a function binding. CLHS 11.1.2.1.2 forbids this for external symbols of package COMMON-LISP. CLHS 11.1.2.1.2.1 provides exceptions for symbols which don't name standardized functions, macros, or special operators. CLHS CALL-NEXT-METHOD says that the exceptions of CLHS 11.1.2.1.2.1 don't apply.
16:58:52
Bike
make-method-lambda also respecifies call-method and make-method without giving detail on new syntax. it's kind of extracurricular.
18:18:41
akkad
is there any trivial-repl sorts of packages to provide the consistent niceties some repls offer. e.g. :pwd :cd :ls
18:32:21
pjb
and there's also a com.informatimago.common-lisp.interactive.interactive:rep if you need to implement the loop yourself.
19:11:49
fourier
is where a more/less portable way to get posix file descriptor from open file stream or at least file name? I could get it (filename) relatively easy on LispWorks and apparently on ccl, but dont have sbcl to test...
20:26:52
rme
It's probably too late for this year, but I wonder if it would be good to look into having a Lisp room at FOSDEM (which I just learned about). https://fosdem.org/2018/
20:31:51
rme
I keep talking about moving to France. If I ever do that, FOSDEM will even be close by.
21:09:19
alandipert
i can't figure out how to use fixnum-only * in this function, anyone have advice on how to type hint? https://gist.github.com/alandipert/f2602716487f29701b94e0db3a628e14 (everything is always fixnum)
21:24:21
fourier
alandipert: try (optimize (speed 3) (safety 0))and (float 0) (not sure about last one, maybe its lispworks only)
21:41:42
jasom
ever have one of those moments where sbcl tells you some code is unreachable, and you just can't figure out why?
21:59:50
jasom
well changing the type of depth to (mod 16) doesn't change things. Plus it shouldn't be *unreachable* because clearly if depth is 0 (which it's allowed to be) everything works fine
22:01:29
aeth
rme: One idea would be to do something that can be visualized through computer graphics. There are 6 or so libraries in CL that can handle visualizations, e.g. https://github.com/vydd/sketch
22:03:36
jmercouris
I feel bad because I use a global var to store completion candidates temporarily, but the whole minibuffer/command system needs an overhaul/rethink anyway
22:03:49
jasom
Bike: derived type is just "function"; it returns the result of a map-into which ought always be a vector, but it might not have been able to infer that
22:04:24
Bike
have you tried macroexpanding the loop? it's ugly, but that tends to help me understand how the compiler is thinking
22:05:39
jasom
yeah. Also, removing the type declaration for result doesn't change the dead-code note
22:09:57
jasom
https://gist.github.com/jasom/c95e083e4ba7c42e8321ede0e3d12583 is now updated with the maxroexpansion
22:15:59
Bike
yeah, i hardly see any way the make-array could be dead other than prefix-buckets being weird somehow.
22:24:25
pierpa
doens't the LAMBDA in (map-into new-level (lambda () (ironclad:make-digest +hash+))) needs an (ignored) argument?
22:42:45
AeroNotix
I wrote a browser with CL/webkit a while back, then real life + job got in the way. I still longingly look at the repo on github sometimes and think what could've been
22:43:43
jmercouris
AeroNotix: I WAS using QT, but now I am working on a GTK port for Linux, better bindings and speed
22:44:49
AeroNotix
interesting. In my research (that I did a while ago) I found that Qt, at least at first, looked better
22:45:06
jmercouris
I've already completely implemented it in QT, so I'm very familiar with that path :D
22:46:09
jmercouris
AeroNotix: On OSX the rendering was absymal, not necessarily due to the web-engine, but due to QT limitations, their port of any web engine requires them to do rendering, and that was always too slow
22:47:35
jmercouris
for example, there are literally 0 side effects when loading the code until you hit base.lisp
22:49:02
AeroNotix
I used that parenscript highlighter for a while. Eventually it started crashing a lot on me.
22:49:52
AeroNotix
jmercouris: I would be interested but my day job is ridiculous (and has been for for 3 years plus)
22:50:15
jmercouris
If you simply complete the GTK port, nEXT is literally ready to use as your daily driver
22:51:00
jmercouris
This is it, all you have to implement: https://github.com/nEXT-Browser/nEXT/blob/master/next/source/package.lisp
22:52:04
AeroNotix
If you're full steam ahead though with next I really wish you luck in seeing that idea come to fruition.
22:52:07
jmercouris
Hmm, I would rather work together on one project and get farther than divide our efforts
22:52:58
AeroNotix
so having a proper, fully, extensible browser done in The Lisp Way will have been realised.
22:54:59
jmercouris
If you're interested in the project goals thery can be seen here: https://github.com/nEXT-Browser/nEXT/tree/master/next#release-timeline
22:55:44
jmercouris
I also hope to be able to one day monetize nEXT, make some contributions back to the Lisp community, develop some tools stuff like that
22:56:10
AeroNotix
jmercouris: actually one of the reasons I initially started developing lispkit was because I couldn't ever find a browser that I could regexp search within a page
22:56:48
jmercouris
AeroNotix: Hmm, I don't have that working yet, I only JUST added a really basic search
22:57:06
AeroNotix
I think actually I was using the webkit APIs for it. I think they genuinely let you use regexp searches on a webkit browser instancce
22:57:11
jmercouris
I'm only now really getting to grips with parenscript, but I can already do some cool things
22:57:40
jmercouris
I literally only need to be able to 1. make a webkit view, 2. set the url, 3. execute JS
22:58:29
jmercouris
bought heavily into QT webkit, and the port to QT Webengine took almost like a year or something insane
22:58:40
jmercouris
I was able to complete my port in like 3 weeks, and 2 of those weeks were spent learning cocoa
22:59:40
AeroNotix
The lisp community was generally quite excited about lispkit/similar things. As much as the lisp community can be. I mean you have 900 stars on github
23:00:01
AeroNotix
got to remember there really isn't a huge active community behind lisp these days
23:00:02
jmercouris
AeroNotix: I have a feeling those are mostly like emacs users/ random programmers
23:01:26
jmercouris
I'll probably pilfer a bunch of code from Lispkit for the GTK port, so in a way, it will live on :D
23:03:18
jmercouris
I have your License located here https://github.com/nEXT-Browser/nEXT/tree/master/documents/external
23:03:19
AeroNotix
Cool. I'll star next and see where it goes. When it gets to the point of `make && make install` I'll probably switch to it. As I said, day job is just too demanding at the minute for anything deep and dark with non-work related programming if you get me
23:08:02
jmercouris
Your last name also didn't seem Polish, but I figured maybe you had ancestors from another country or something
23:08:35
AeroNotix
I am not sure about my surname. My mum did some ancestry stuff a few years ago and couldn't figure it out
23:10:41
rme
I need a better profile picture. I was trying to be artistic, but now I think it looks dumb.
23:12:18
jmercouris
rme: You know, that's an interesting name, we have a U Bahn Station here in Berlin named "Bellevue" it's pronounced "Bell Voo"
23:12:57
AeroNotix
Where I grew up in the UK we have a pub at the bottom of my mum's road called The Bellevue
23:16:38
runejuhl
For numbers 21-99 we say the last digit first, so 21 would be twenty-one in English and en-og-tyve (lit. one and twenty) in Danish
23:18:07
runejuhl
jmercouris: the worst thing is that kids in Danish schools have a harder time learning numbers (and math) because of the language
23:18:41
jmercouris
In literally every other language I know, numbers are consistent, except for the germanic derivatives
23:18:46
runejuhl
I've heard about teachers using the "correct" way of pronuncing numbers even though it's not valid Danish
23:19:54
runejuhl
There are a bunch more oddities about numbers in Danish. The system used to be based on multiples of 20, so 60 is "tres" (3 x 20) and 50 is "halvtreds" (2 x 20 + one half 20)
23:23:05
runejuhl
I better get to bed and catch a few zzzzs before my fever-ridden offspring decides to wake up and terrorize me...