Skip to content

Commit

Permalink
Add disclaimer to the banner
Browse files Browse the repository at this point in the history
  • Loading branch information
johnmyleswhite committed Nov 23, 2014
1 parent c9da7cb commit f96ef2d
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions base/version.jl
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,9 @@ function banner(io::IO = STDOUT)
end
end
commit_date = GIT_VERSION_INFO.date_string != "" ? " ($(GIT_VERSION_INFO.date_string))": ""

disclaimer = """Note that the REPL is only meant for prototype development. If you are
interested in the performance of a piece of code, please put that code
inside of a function so that Julia's JIT compiler can optimize it."""
if have_color
tx = "\033[0m\033[1m" # text
jl = "\033[0m\033[1m" # julia
Expand All @@ -238,7 +240,9 @@ function banner(io::IO = STDOUT)
$(jl)_/ |\\__'_|_|_|\\__'_|$(tx) | $(commit_string)
$(jl)|__/$(tx) | $(Sys.MACHINE)
\033[0m""")
$(disclaimer)
\033[0m
""")
else
print(io,"""
_
Expand All @@ -250,6 +254,8 @@ function banner(io::IO = STDOUT)
_/ |\\__'_|_|_|\\__'_| | $(commit_string)
|__/ | $(Sys.MACHINE)
$(disclaimer)
""")
end
end

10 comments on commit f96ef2d

@StefanKarpinski
Copy link
Member

Choose a reason for hiding this comment

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

I approve on the premise that @JeffBezanson will find this so annoying that he may be willing to consider #8870 to be an actual issue rather than a feature ;-)

@Sisyphuss
Copy link

Choose a reason for hiding this comment

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

Even in the prototype development (e.g. scientific experiment), sometimes we need high performance, while the global variables are unavoidable. So the best solution is to tell people not to involve a global variable in any loop, as I mentioned in #8870.

@johnmyleswhite
Copy link
Member Author

Choose a reason for hiding this comment

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

That is not the best solution. Stefan already pointed out what's wrong with your interpretation of the problem with globals. Please reread what he wrote.

@JeffBezanson
Copy link
Member

Choose a reason for hiding this comment

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

We used to have such a nice banner. Too bad those days will be gone.

@Sisyphuss
Copy link

Choose a reason for hiding this comment

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

@JeffBezanson , so you have found a good solution?

@JeffBezanson
Copy link
Member

Choose a reason for hiding this comment

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

I had forgotten about it, but I decided what I'd prefer: #9123 (comment)

@Sisyphuss
Copy link

@Sisyphuss Sisyphuss commented on f96ef2d Apr 30, 2015 via email

Choose a reason for hiding this comment

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

@pao
Copy link
Member

@pao pao commented on f96ef2d Apr 30, 2015

Choose a reason for hiding this comment

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

@Sisyphuss, please be cautious when mentioning the names of Julia macros, and either quote them with backticks as code, or spell out the word "at", so as to avoid sending notifications to GitHub users uninvolved with the Julia project. Thanks!

@jiahao
Copy link
Member

@jiahao jiahao commented on f96ef2d Apr 30, 2015

Choose a reason for hiding this comment

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

@Sisyphuss we have Base.warn_once.

@JeffBezanson
Copy link
Member

Choose a reason for hiding this comment

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

Yes, you would get exactly one warning.

Please sign in to comment.