Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove unnecessary doc string macros, re-sync documentation #14310

Closed
wants to merge 1 commit into from

Conversation

jakebolewski
Copy link
Member

No description provided.

@jakebolewski jakebolewski added linear algebra Linear algebra docsystem The documentation building system labels Dec 7, 2015
@@ -149,7 +149,7 @@ Linear algebra functions in Julia are largely implemented by calling functions f

.. Docstring generated from Julia source

Compute an ``LDLt`` factorization of a real symmetric tridiagonal matrix such that ``A = L*Diagonal(d)*L'`` where ``L`` is a unit lower triangular matrix and ``d`` is a vector. The main use of an ``LDLt`` factorization ``F = ldltfact(A)`` is to solve the linear system of equations ``Ax = b`` with ``F\b``\ .
Compute an ``LDLt`` factorization of a real symmetric tridiagonal matrix such that ``A = L*Diagonal(d)*L'`` where ``L`` is a unit lower triangular matrix and ``d`` is a vector. The main use of an ``LDLt`` factorization ``F = ldltfact(A)`` is to solve the linear system of equations ``Ax = b`` with ``F``\ .
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this a mistake in escaping, or a bug?

@vtjnash
Copy link
Member

vtjnash commented Dec 8, 2015

@doc isn't trivially unnecessary -- it has the side-effect of disabling the standard julia string processing

@jakebolewski
Copy link
Member Author

I would have assumed that the two are synonymous, but now we have two different ways to do the same thing with subtle differences that are not documented. We really should just have one syntax for this stuff that everyone uses.

@JeffBezanson
Copy link
Member

@jakebolewski is right. I'm almost inclined to require doc""" """, to avoid gotchas like #12737.

@jakebolewski
Copy link
Member Author

I'd support requiring the doc form. I wished doc was just a keyword / first class syntax but I think I lost that argument over the summer.

@JeffBezanson
Copy link
Member

I'm fine with special-casing doc string literals to have the magic syntax. It seems better than the alternative of applying magic syntax to all string literals.

@StefanKarpinski
Copy link
Member

I think the ship has sailed on requiring the doc prefix on string literals. Going from allowing bare doc strings in 0.4 to requiring the doc prefix in 0.5 is not going to go over well. The main issue is using $ for inline latex. I propose using double backticks instead, which is what Scholarly Markdown uses. This has the additional advantage of rendering in a reasonable fashion (as inline LaTeX code) in Markdown engines that don't understand inline LaTeX. The main disadvantage is that it departs from Jupyter's Markdown flavor.

@jakebolewski
Copy link
Member Author

Isn't going to go over well.

As opposed to subtly breaking all code that uses arrays?

@StefanKarpinski
Copy link
Member

How is this breaking all code that uses arrays?

@jakebolewski
Copy link
Member Author

Getting a good documentation system that just works is one of the most important things to get right. I'm just advocating that on the whole if we have to make something backwards incompatible to fix corner cases then we should, given the magnitude of other proposed changes for 0.5.

@StefanKarpinski
Copy link
Member

No one is arguing that we should have a broken documentation system. I think we should get rid of all of the doc prefix versions of this and only have the bare doc string version and work on getting all the subtle docstring parser bugs taken care of. I feel that we've now taken care of most of the docstring parsing bugs. What is this business about breaking all of array usages?

@JeffBezanson
Copy link
Member

Having only the bare string version is also fine with me.

@KristofferC
Copy link
Member

Arraymageddon with views as default?

@StefanKarpinski
Copy link
Member

How is Arraymageddon relevant to this issue?

@tkelman
Copy link
Contributor

tkelman commented Dec 8, 2015

That "ship has sailed" pronouncements are not necessarily accurate for things like this.

There were some comments on the FRBNY announcement post from people who had never seen Julia that raw docstrings make it difficult to distinguish code from non-code. I'd be +1 on always needing doc.

@JeffBezanson
Copy link
Member

distinguish code from non-code

Syntax highlighting?

@tkelman
Copy link
Contributor

tkelman commented Dec 8, 2015

Sure but sometimes you have to read code in monochrome.

Changing the latex syntax would probably be good anyway, since there could be interpolation cases where you'd want normal string rules to apply. For example auto inserting the signature which we don't have a way of doing yet.

@StefanKarpinski
Copy link
Member

I agree that syntax highlighting is a good approach to addressing this – especially since we'll want to syntax highlight the markdown as markdown. There was also a complaint about multiline comments, which I'm much more sympathetic to since it's at the top of my regrettable features list.

@tkelman
Copy link
Contributor

tkelman commented Dec 8, 2015

Having Julia code be illegible in editors that have not been configured to highlight julia isn't great. Syntax highlighting is a convenience, it shouldn't be mandatory to understand things.

@JeffBezanson
Copy link
Member

But I don't see how doc solves that problem either. To me three quotes is enough of a visual cue to separate the doc string. Anyway I assume python has the same "problem"?

@StefanKarpinski
Copy link
Member

Yeah, I don't see what the issue is – strings get highlighted as strings if you don't have support for highlighting them as code. Guiding language designed based on the most broken possible editor configuration doesn't seem like it goes anywhere good.

@StefanKarpinski
Copy link
Member

The comments @tkelman is referring to in case people want to judge the apt level of concern:

https://news.ycombinator.com/item?id=10671581

I see the issue and I think it's a problem for basically any form of extensive inline documentation.

@tkelman
Copy link
Contributor

tkelman commented Dec 12, 2015

I'm going to close this since I think #14378 makes it redundant.

@tkelman tkelman closed this Dec 12, 2015
@tkelman tkelman deleted the jcb/syncdoc branch December 14, 2015 19:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docsystem The documentation building system linear algebra Linear algebra
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants