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

minor copy edits and formatting for Getting Started #26439

Merged
merged 5 commits into from
Mar 16, 2018
Merged

minor copy edits and formatting for Getting Started #26439

merged 5 commits into from
Mar 16, 2018

Conversation

cormullion
Copy link
Contributor

@cormullion cormullion commented Mar 13, 2018

I was planning on a pass through the Julia manual doing some copy-editing. The instructions said I must do a make docs build before making a PR. However, I tried this and after an hour or two it died in a blizzard of complaints about Fortran and OpenBLAS...

So this PR hasn't been tested with make docs. I'll make this one PR, just in case it contains anything worth preserving.

Edit: fix #26463

@@ -25,8 +25,8 @@ julia> ans
3
```

To exit the interactive session, type `^D` -- the control key together with the `d` key or type
`quit()`. When run in interactive mode, `julia` displays a banner and prompts the user for input.
To exit the interactive session, type `CTRL-D` (press the Control/`^` key together with the `d` key), or type
Copy link
Contributor

Choose a reason for hiding this comment

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

I appreciate the more explicit phrasing, but I wonder what benefit mentioning the ^ key brings here. I thought the caret notation was purely symbolic; are there input systems with an actual "^" key used for producing control characters?

FWIW, I actually just tried literally typing ^D (^, Space, Shift+D), ^d (^, Space, D), and combinations I expected to produce ̂D (^, Shift+D) and ̂d (^, D) in the julia prompt (v0.6.0 if it matters), as well as (^+Shift+D), and none of this worked. For context, I'm using a Portuguese keyboard layout which has a ̂~ key that produces combined characters like "ã" and "â" (using shift), unless a space is typed after the caret key, in which case I get "~a" and "^a". Perhaps @stevengj can provide commentary here regarding whether my input methods may have interfered.

Copy link
Contributor Author

@cormullion cormullion Mar 13, 2018

Choose a reason for hiding this comment

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

I think it's always 'ctrl' (or 'control') on Mac keyboards, but in menus and documentation people nearly always use ⌃ (U+2303) or something similar, but that could be mistaken for an up arrow. You can get fonts to show keys, but I wouldn't know whether that's a good idea to rely on it. Images would be a bit more explicit: not e2a7f0ab87a1ac02820623e18720a689 but 66514edcffc7bbe0570847902c3f5c4b, although keyboards vary a lot...

Copy link
Contributor

@waldyrious waldyrious Mar 13, 2018

Choose a reason for hiding this comment

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

Just to make sure we're on the same page: are you saying that there are indeed physical "^" keys in keyboards, or that there are not, but people tend to represent the control character in documentation as if such keys existed (as a shortcut, I suppose, the same way Emacs/Vim use C-x)?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

1: Yes

2: they do.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah, got it. Thanks for clarifying.

@@ -65,19 +66,19 @@ foo
bar
```

The `--` delimiter can be used to separate command-line args to the scriptfile from args to Julia:
The `--` delimiter can be used to separate command-line arguments for the script file from arguments for Julia:
Copy link
Member

Choose a reason for hiding this comment

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

Arguments to the file sounds good to me?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I clarified my intentions a bit... :)

_/ |\__'_|_|_|\__'_| | Commit 2bb94d6 (11 days old master)
|__/ | x86_64-apple-darwin13.1.0
| | |_| | | | (_| | | Version 0.7.0-DEV.4480 (2018-03-07 11:38 UTC)
_/ |\__'_|_|_|\__'_| | Commit fa462ba112 (5 days old master)
Copy link
Member

Choose a reason for hiding this comment

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

You can replace this full code block with:

```@eval
io = IOBuffer()
Base.banner(io)
banner = String(take!(io))
import Markdown
Markdown.parse("""
```
\$ julia

$(banner)
julia> 1 + 2
3

julia> ans
3
```
""")
```

and this will be generated when the docs are built and we never have to update this manually again (:tada: )

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Great idea!

Copy link
Member

@KristofferC KristofferC left a comment

Choose a reason for hiding this comment

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

Failed to evaluate `@eval` block.

ERROR: ErrorException("syntax: incomplete: invalid string syntax")

@fredrikekre
Copy link
Member

Good thing we have Documenter running in strict mode. Oh wait, someone turned that off in 87913c6 :trollface:

@fredrikekre
Copy link
Member

Okay, this works locally

```@eval
io = IOBuffer()
Base.banner(io)
banner = String(take!(io))
import Markdown
Markdown.parse("```\n\$ julia\n\n$(banner)\njulia> 1 + 2\n3\n\njulia> ans\n3\n```")
```

@KristofferC
Copy link
Member

Good thing you are working on adding it back ;)

@cormullion
Copy link
Contributor Author

Do I need to do anything more towards this?

@@ -327,7 +327,7 @@ julia> 2*Float16(4.)
Float16(8.0)
```

The underscore `_` can be used as digit separator:
Copy link
Member

Choose a reason for hiding this comment

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

I think the previous way was better (see e.g. dotnet/roslyn#216)

@KristofferC KristofferC merged commit 277e6d5 into JuliaLang:master Mar 16, 2018
@KristofferC
Copy link
Member

I changed back the digit separator to the previous version and merged. Hope that was ok.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Getting started page shows an outdated REPL
4 participants