Giter Site home page Giter Site logo

Comments (6)

epage avatar epage commented on May 31, 2024

imo yansi should do all or nothing. I appreciate that its (mostly) not doing things behind my back. The reason I was interested in yansi compared to termcolor (besides ergonomics) is termcolor half-implements the policy I need and implementing the rest felt like I was working against it rather than with it.

from yansi.

SergioBenitez avatar SergioBenitez commented on May 31, 2024

I think this is a rather special case. I don't want to care about the platform. Right now, I need to care about the platform. I cannot think of a single case where you would not want to write:

if !Paint::enable_windows_ascii() {
    Paint::disable()
}

I appreciate that its (mostly) not doing things behind my back. The

What do you feel it does behind your back?

from yansi.

epage avatar epage commented on May 31, 2024

What do you feel it does behind your back?

  • --color always would not be respected if yansi does this.
  • I already have to maintain my own "disable" tracking that has its own logic, on top of what Pain::disable does (see #17, #18)

from yansi.

SergioBenitez avatar SergioBenitez commented on May 31, 2024

These are fantastic points, @epage! I'll think about this a bit. Perhaps we simply want to try enabling coloring on Windows without disabling them if it doesn't work. Thus, a Paint::disable() always disables, but by default, you get colors on Windows without doing anything. What do you think?

from yansi.

epage avatar epage commented on May 31, 2024

Tired of copy/pasting my herding of cats (all of the color use in my applications), I've done some research on where Rust is at wrt to color and have created a prototype with a PoC conversion of termcolor (since it has the most varied use cases). I'd be interested in any feedback on the idea or design!

from yansi.

SergioBenitez avatar SergioBenitez commented on May 31, 2024

v2 (in progress, see v2 branch) automatically enables support on Windows.

from yansi.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.