Giter VIP home page Giter VIP logo

Comments (4)

Andriamanitra avatar Andriamanitra commented on August 28, 2024

I like the idea, although I'm a little bit worried about the potential complexity of supporting a wide variety of languages. The sub-command name should probably be more self-explanatory though, maybe generate-stub?

from coctus.

ellnix avatar ellnix commented on August 28, 2024

How about clash solve which creates the source file in the current directory with stubs (if any) and opens the default editor?
I think both the stub scripts and the editor should be user configurable like #19. Without a configured editor we could default to simply creating the source file with stubs.

from coctus.

Andriamanitra avatar Andriamanitra commented on August 28, 2024

How about clash solve which creates the source file in the current directory with stubs (if any) and opens the default editor? I think both the stub scripts and the editor should be user configurable like #19. Without a configured editor we could default to simply creating the source file with stubs.

Personally I think it's better for composability if generating the stub is its own command that users can then combine with other functionality using the full power of their preferred shell rather than some limited configuration format. For example in bash you could do

alias solve="clash stub --python > sol.py && $EDITOR sol.py"

or

alias solve-janet="clash stub | my-janet-stub-gen && $EDITOR sol.janet"

from coctus.

ellnix avatar ellnix commented on August 28, 2024

Personally I think it's better for composability if generating the stub is its own command that users can then combine with other functionality using the full power of their preferred shell rather than some limited configuration format. For example in bash you could do

I don't disagree that it would be a good idea to also have a command for just generating the stub, however I disagree that shell aliases are a good user interface.

And also I predict that running a solution will get a lot more complex when you consider languages like Rust, where you would ideally like a cargo project with a preset cargo.toml which includes common crates.

from coctus.

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.