Uh, it looks like the three backquotes before and after is the trick to get block quotes; is there any docs on using this site? Anyways, now that block quotes are working, here is my ~/.julia/config/startup.jl
pkgs = ["Revise", "Debugger", "PyPlot", "BenchmarkTools", "Random", "PyCall",
"Statistics", "MAT", "Printf", "Random"]
for pkg in pkgs
if Base.find_package(pkg) === nothing
using Debugger, PyPlot, Printf
@warn "Error initializing Revise" exception=(e, catch_backtrace())
print("\nHello, startup.jl from ~/.julia/config has just been run\n")
if you compare lines 3 and 4 in your startup – the difference is exactly that line 3 has quote marks (
”) as opposed to line 4 which has “poor mans quotes” or in other words the “inch” character as limiters for a string. Line 3 might have been changed by an advanced text editor, but is no longer right Julia code, since
“...”is not how to delimit a string
Concerning the three backticks – that is not a quote/blockquote but a code environment, i.e. all stuff between that is set as code (the same for single backticks in running text like
`code` is set as
code. A block quote would need all lines prepended with a
>so (yay we can illustrate code env directly)
> I am a
I am a
(but note that this does not look like code – and for code lines you want them to look like code)
But for code you are actually looking for the three backticks code-environment. This is indeed unrelated to Julia and more the discourse forum markup, I found an overview at Discourse Guide: Code Formatting - Meta - Stonehearth Discourse
Concnering the order. All I could find anywhere was the location
~/.julia/config/startup.jl. But it might be (have not found that yet) that your first file takes priority over the local one? Since that only contains a line calling the local one you could try to rename/remove the global one (your first) one and then check whether it runs you local one?
edit: You could try this command How do I open and edit my startup.jl file? - #3 by ianshmean and see which file opens?
edit2: Did you by any chance set the
JULIA_DEPOT_PATH? See https://docs.julialang.org/en/v1/manual/command-line-options/ the
startup-file command line option, if that is not set it should load your local one.
There should be a preview button, as is common for markdown formatted forums.
But line 3:
Is a comment line so the quotes in it should have no effect? Re not running startup.jl: kellertuer, thank you for your excellent suggestions and help, and the time it took you to reply. The problem was JULIA_DEPOT_PATH was set, and it turns out only the first entry of DEPOT_PATH is checked to see if it contains a startup.jl file. This is not mentioned in the documentation re JULIA_DEPOT_PATH. For example:
~/.julia/config/startup.jl is not run, but:
~/.julia/config/startup.jl is run. I think this is a place where the documentation can be improved. I still can’t find the “preview” link which could also help. Still, I now understand how to start julia, and can go on to understanding how to run it, such as why:
gives an error on the @printf macro, but if I do:
I don’t get the error; but that’s a topic for another day. I sincerely thank everyone for the help on getting startup.jl to run; topic closed.
If you type
? DEPOT_PATH in REPL or take a look at Constants · The Julia Language
it specifically mentions
The first entry is the “user depot” and should be writable by and owned by the current user. The user depot is where: registries are cloned, new package versions are installed, named environments are created and updated, package repos are cloned, newly compiled package image files are saved, log files are written, development packages are checked out by default, and global configuration data is saved. Later entries in the depot path are treated as read-only and are appropriate for registries, packages, etc. installed and managed by system administrators.
the importance and role of the first folder over the second and all following ones.
For your preview question – When I type my answers here I have an editor window on the left and to the right of that a preview (well now its hidden behind the “this topic has been answered” message that you can close.
For the further problems – let’s maybe not turn this into “The thread that answers quite a few questions.” – that is a question for another day but maybe even more for another thread/topic here on Discourse. Also because I have no clue what your