Skip to content

Commit ca59a0b

Browse files
nathanrboyergdalle
andauthored
Small additions to writing.md (#70)
* Small additions to writing.md * grammar fixes * Update pages/writing/writing.md Co-authored-by: Guillaume Dalle <[email protected]> * Updates from first round review * change "bash command" to "shell command" * Tweaks * I said fix deployment --------- Co-authored-by: Guillaume Dalle <[email protected]>
1 parent 610e613 commit ca59a0b

File tree

2 files changed

+17
-7
lines changed

2 files changed

+17
-7
lines changed

.github/workflows/Deploy.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,5 @@ jobs:
1717
- name: 🚀 Build and Deploy
1818
uses: tlienart/xranklin-build-action@main
1919
with:
20-
DEPLOY_BRANCH: ${{ github.event_name != 'pull_request' && 'gh-pages' || 'gh-pages-pr' }}
20+
DEPLOY: ${{ github.event_name == 'push' }}
21+
DEPLOY_BRANCH: 'gh-pages'

pages/writing/writing.md

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ In practice, an Integrated Development Environment (or IDE) makes the experience
158158

159159
The best IDE for Julia is [Visual Studio Code](https://code.visualstudio.com/), or VSCode, developed by Microsoft.
160160
Indeed, the [Julia VSCode extension](https://www.julia-vscode.org/) is the most feature-rich of all Julia IDE plugins.
161-
You can download it from the VSCode Marketplace and read its [documentation](https://www.julia-vscode.org/docs/stable/) cover to cover.
161+
You can download it from the VSCode Marketplace and read its [documentation](https://www.julia-vscode.org/docs/stable/).
162162

163163
\vscode{
164164

@@ -184,19 +184,27 @@ The available functionalities should be roughly similar to those of VSCode, at l
184184
You can execute a Julia script from your terminal, but in most cases that is not what you want to do.
185185

186186
```bash
187-
julia myfile.jl
187+
julia myfile.jl # avoid this
188188
```
189189

190190
Julia has a rather high startup and compilation latency.
191191
If you only use scripts, you will pay this cost every time you run a slightly modified version of your code.
192192
That is why many Julia developers fire up a REPL at the beginning of the day and run all of their code there, chunk by chunk, in an interactive way.
193+
Full files can be run interactively from the REPL with the `include` function.
194+
195+
```julia-repl
196+
julia> include("myfile.jl")
197+
```
198+
199+
Alternatively, `includet` from the [Revise.jl](https://timholy.github.io/Revise.jl/stable/user_reference/#Revise.includet) package can be used to "include and track" a file.
200+
This will automatically update changes to function definitions in the file in the running REPL session.
193201

194202
\vscode{
195203

196204
[Running code](https://www.julia-vscode.org/docs/stable/userguide/runningcode/) is made much easier by the following commands:
197205

198-
* `Julia: Start REPL` (shortcut `Alt + J` then `Alt + O`) - this is different from opening a VSCode _terminal_ and launching Julia manually from there, because the integrated Julia REPL allows you to send code from files to the REPL directly.
199-
* `Julia: Execute Code in REPL and Move` (shortcut `Shift + Enter`) - the executed code is the block containing the cursor, or the selected part if it exists.
206+
* `Julia: Restart REPL` (shortcut `Alt + J` then `Alt + R`) - this will open or restart the integrated Julia REPL and is different from opening a VSCode _terminal_ and launching Julia manually from there.
207+
* `Julia: Execute Code in REPL and Move` (shortcut `Shift + Enter`) - this will execute in the integrated Julia REPL either the code selected by the cursor or, if no selection, the code block containing the cursor.
200208

201209
}
202210

@@ -547,7 +555,7 @@ For example, typing `@locals` in Infiltrator-mode will print local variables:
547555
using Infiltrator
548556
549557
function fermat_prime_infil(n)
550-
k = 2^n
558+
k = 2^n
551559
F = 2^k + 1
552560
@infiltrate
553561
for d in 2:isqrt(F)
@@ -640,7 +648,8 @@ In the debugging pane of the Julia extension, click `Run and Debug` to start the
640648
The program will automatically halt when it hits a breakpoint.
641649
Using the toolbar at the top of the editor, you can then _continue_, _step over_, _step into_ and _step out_ of your code.
642650
The debugger will open a pane showing information about the code such as local variables inside of the current function, their current values and the full call stack.
643-
651+
The debugger can be [sped up](https://www.julia-vscode.org/docs/dev/userguide/debugging/#Settings-to-speed-up-the-debugger) by selectively compiling modules that you will not need to step into via the `+` symbol at the bottom of the debugging pane.
652+
It is often easiest to start by adding `ALL_MODULES_EXCEPT_MAIN` to the compiled list, and then selectively remove the modules you need to have interpreted.
644653
}
645654

646655
<!-- Clean up -->

0 commit comments

Comments
 (0)