Skip to content
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

Banners #92

Open
fieker opened this issue Apr 17, 2020 · 10 comments
Open

Banners #92

fieker opened this issue Apr 17, 2020 · 10 comments

Comments

@fieker
Copy link
Contributor

fieker commented Apr 17, 2020

The issue of banners for your projects comes up about every 6 months. So we, the project leaders, discussed it and recording this here, as an issue to be able to link against this.

Computer Algebra Systems always have banners

  • Julia, Maple, Mathematica, Maple, ...
  • Gap, Singular, Polymake
    Thus our "cornerstones" have banners - which can be suppressed in non-interactive mode.

Now we added a new, interactive, user interface to our systems, so of course, we display banners on interactive use - and do not print them otherwise. In Oscar, we "accumulate" the individual banners into the Oscar one.

Hecke/ Nemo are intended also as computer algebra systems, not "only" as libraries, thus have banners - which are not shown unless we are interactive.

@fieker fieker pinned this issue Apr 17, 2020
@wbhart
Copy link
Contributor

wbhart commented Apr 17, 2020

It's worth adding that we have been removing banners where this is actually desirable (e.g. non-interactive/library use), but that this has been technically very difficult.

We apologise to everyone who has been affected by this. The issue is being addressed as we are able.

@iliailmer
Copy link

Hi, so is there a way to disable showing the banner by default when using Oscar as a dependency in a project? In out code, we have not just Oscar but all of its dependecies showing banners as well. It would be nice to have unified way to disable the display by default (i.e. an ENV value).

@fingolfin
Copy link
Member

fingolfin commented Nov 29, 2020

If Oscar is a dependency of something else, then I agree that at most it should show its banner, but not the dependencies. That this is not currently the case is a bug!

Here's what e.g. GAP.jl does:

    if haskey(ENV, "GAP_SHOW_BANNER")
        show_banner = ENV["GAP_SHOW_BANNER"] == "true"
    else
        show_banner =
            isinteractive() && !any(x -> x.name in ["Oscar"], keys(Base.package_locks))
    end

The use of the (undocumented) Base.package_locks is likely the core of the problem. But that code isn't by me, so I don't know right now how to fix it. Perhaps @fieker has an idea.

Note that for GAP.jl and also Hecke.jlNemo.jl you can turn off the banner with an env var. While it shouldn't be necessary here, you could use that as a workaround. We should also consider adding similar env var overrides to more of the OSCAR packages.

@thofma
Copy link
Collaborator

thofma commented Nov 29, 2020

We don't have it in Hecke yet, but after talking to @fieker,
we decided to add it soon.

@fingolfin
Copy link
Member

I meant Nemo.jl, not Hecke.jl, my bad.

@iliailmer
Copy link

@fingolfin I put this line at the top of my module like so:

module MyModule
ENV["NEMO_PRINT_BANNER"] = "false"

and it still prints the banner. Is it such placement correct?

@mohamed-barakat
Copy link
Contributor

module MyModule
ENV["NEMO_PRINT_BANNER"] = "false"

It is too late. The banner is printed before this line is reached.

@mohamed-barakat
Copy link
Contributor

If it is only about your use, you can add the following line to .julia/config/startup.jl:

ENV["NEMO_PRINT_BANNER"] = false

@slel
Copy link

slel commented Mar 16, 2021

Not sure this is the right place for such a discussion but
how about a banner that takes a little less vertical space
and possibly uses unicode for smoother rendering?

Some attempts starting with the current Oscar banner.

Current: ascii, 7-line:
 -----    -----    -----      -      -----
|     |  |     |  |     |    | |    |     |
|     |  |        |         |   |   |     |
|     |   -----   |        |     |  |-----
|     |        |  |        |-----|  |   |
|     |  |     |  |     |  |     |  |    |
 -----    -----    -----   -     -  -     -

Ascii, 5-line:
 ---    ---    ---     -     ---
|   |  |      |       / \   |   |
|   |   ---   |       ---   |---
|   |      |  |      |   |  |   |
 ---    ---    ---   -   -  -   -

Unicode, 5-line:
╭───╮  ╭───╮  ╭───╮  ╭───╮  ┌───╮
│   │  │      │      │   │  │   │
│   │  ╰───╮  │      ├───┤  ├──<
│   │      │  │      │   │  │   │
╰───╯  ╰───╯  ╰───╯  ┴   ┴  ┴   ┴

Unicode, 3-line:
╭──╮  ╭──╮  ╭──╮  ╭──╮  ┌──╮
│  │  ╰──╮  │     ├──┤  ├─<
╰──╯  ╰──╯  ╰──╯  ┴  ┴  ┴  ┴

Unicode, 4-line:
╭───╮
│   │  ╭──╮  ╭──╮  ╭──╮  ┌──╮
│   │  ╰──╮  │     ├──┤  ├─<
╰───╯  ╰──╯  ╰──╯  ┴  ┴  ┴  ┴

@ulthiel
Copy link
Contributor

ulthiel commented Apr 22, 2022

I absolutely agree with (the first part of) Nemocas/AbstractAlgebra.jl#158 (comment) and think no message should be displayed at all.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants