Giter Site home page Giter Site logo

Comments (5)

sckott avatar sckott commented on June 13, 2024

thanks for the issue @mye

@aedobbyn do you have any knowledge in this area?

two things: 1) i'm not sure i know how to send output to stdout instead of stderr, and 2) even if there's a straight-forward way to do it, what is best practice for a) interactive, and b) non-interactive usage?

from cowsay.

aedobbyn avatar aedobbyn commented on June 13, 2024

Ooh hm I'm not sure off the bat. But I agree with you @mye that's probably annoying to get that message every time. If we changed

cowsay/R/say.r

Line 135 in 0c8dad1

if (crayon::has_color() == FALSE) {
to

if (crayon::has_color() == FALSE && (!is.null(what_color) || !is.null(by_color)))

I think we at least solve that issue

from cowsay.

aedobbyn avatar aedobbyn commented on June 13, 2024

Okay so according to the first answer here, message prints to stderr by default where as print and cat got to stdout.

So we could add a new type called "print" and put something in such that when interactive() is false, default to the "print" type.

from cowsay.

mye avatar mye commented on June 13, 2024

Why does it have to be stderr in interactive mode? (Maybe something about R I'm not aware of, but I don't see the point in putting the expected output on stderr).

from cowsay.

sckott avatar sckott commented on June 13, 2024

So we could add a new type called "print" and put something in such that when interactive() is false, default to the "print" type.

sounds good @aedobbyn

@mye i don't know, that's just the way R is. i think we'd want to maintain idiomatic R here, while using @aedobbyn suggestion for non-interactive mode

from cowsay.

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.