Comments (4)
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.
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.
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.
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)
- Make `clash show` return an error when it is followed by an invalid HANDLE
- Update `README.md` HOT 2
- Add numbers to test cases in `clash run`
- Support NO_COLOR environment variable
- Segmentation errors not being backtraced.
- Command `run` not printing certain special characters
- Crash when stubgen includes `gameloop`
- Stub generator generates invalid code when named variables conflict with loop variable
- Stub generator produces invalid Rust code for `loop N+1` HOT 3
- Easier way to get started / run your code against the testsuite. HOT 1
- "Porcelain" commands HOT 1
- Global configuration HOT 1
- Finish renaming things to coctus HOT 1
- `coctus fetch` SEGFAULT
- Test "framework" HOT 2
- Clean up the App Struct HOT 1
- Variable casing doesn't match CodinGame
- Hardcoded index in template
- Rename `clashlib` to `coctuslib` HOT 1
- Rename `keywords` to `reserved_words`
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from coctus.