-
-
Notifications
You must be signed in to change notification settings - Fork 291
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
Move welcome message to end of code loading #389
Conversation
Right now it only prints it once, when Pluto is precompiling, but not when you launch it for the second time. It this is nice (accidental) feature. Is it the same with |
Ah, no. With this it would print each time (I assumed that was what was wanted) Perhaps the |
Oh yeah that would be perfect! Good idea |
015e223
to
9867a4b
Compare
@fonsp updated! 👍 |
I just realized that if the user precompiles via |
This is fine, it's only there to say hello and make the software seem less intimidating, if you are precompiling then you're probably comfortable enough to do without the message. |
it makes sense to print banner in interactive mode (you may add any new ideas are welcome though! |
I tried |
not sure what do you mean by "always |
Try it out yourself: make a package that prints |
From within |
@fonsp this is what I get: module MyPackage
__init__() = @show isinteractive()
end $ julia --project # starting repl
_
_ _ _(_)_ | Documentation: https://docs.julialang.org
(_) | (_) (_) |
_ _ _| |_ __ _ | Type "?" for help, "]?" for Pkg help.
| | | | | | |/ _` | |
| | |_| | | | (_| | | Version 1.5.1 (2020-08-25)
_/ |\__'_|_|_|\__'_| | Official https://julialang.org/ release
|__/ |
julia> using MyPackage
[ Info: Precompiling MyPackage [c2604015-7b3d-4a30-8a26-9074551ec60a]
isinteractive() = true
how did you do? |
I guess you tried to store the value in a variable ;) then indeed it's assigned during precompilation, where module MyModule
using Dates
const date_loaded = now()
get_date_loaded() = date_loaded
end precompilation of this package will fix EDIT: I guess it's all better explained here: https://docs.julialang.org/en/v1/manual/modules/#Module-initialization-and-precompilation than what I did ;) |
Oh that explains it, thanks! But still, I am happy with the current accidental behaviour. |
I noticed that for me, the welcome message appears well-before code loading has finished and the repl is ready. This might make for nicer UX?