You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* 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]>
Copy file name to clipboardExpand all lines: pages/writing/writing.md
+15-6Lines changed: 15 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -158,7 +158,7 @@ In practice, an Integrated Development Environment (or IDE) makes the experience
158
158
159
159
The best IDE for Julia is [Visual Studio Code](https://code.visualstudio.com/), or VSCode, developed by Microsoft.
160
160
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/).
162
162
163
163
\vscode{
164
164
@@ -184,19 +184,27 @@ The available functionalities should be roughly similar to those of VSCode, at l
184
184
You can execute a Julia script from your terminal, but in most cases that is not what you want to do.
185
185
186
186
```bash
187
-
julia myfile.jl
187
+
julia myfile.jl# avoid this
188
188
```
189
189
190
190
Julia has a rather high startup and compilation latency.
191
191
If you only use scripts, you will pay this cost every time you run a slightly modified version of your code.
192
192
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.
193
201
194
202
\vscode{
195
203
196
204
[Running code](https://www.julia-vscode.org/docs/stable/userguide/runningcode/) is made much easier by the following commands:
197
205
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, orthe 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.
200
208
201
209
}
202
210
@@ -547,7 +555,7 @@ For example, typing `@locals` in Infiltrator-mode will print local variables:
547
555
using Infiltrator
548
556
549
557
function fermat_prime_infil(n)
550
-
k = 2^n
558
+
k = 2^n
551
559
F = 2^k + 1
552
560
@infiltrate
553
561
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
640
648
The program will automatically halt when it hits a breakpoint.
641
649
Using the toolbar at the top of the editor, you can then _continue_, _step over_, _step into_ and _step out_ of your code.
642
650
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.
0 commit comments