-
Notifications
You must be signed in to change notification settings - Fork 126
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
Allow to derive custom DSL interpreters from kscript #67
Comments
Actually, I've presented this idea on the roadmap for kscript at kotlinconf, see https://holgerbrandl.github.io/kscript_kotlinconf_2017/kscript_kotlinconf.html#56 So it's great having somebody coming forward with an actual usecase. :-) My original idea was more about having a standard set of default dependencies ( For the technical realization, I thought about the following: Instead of the standard kscript launcher script (see https://github.com/holgerbrandl/kscript/blob/master/kscript) we/you would create new one that defines a header template (listing your dsl depndencies) to be injected into the user-script. mydsl:
Fo dsl scripts you would just point to your dsl interpreter in the shebang:
The What do you think? For sure if you think that forking is better, please go ahead, I'm happy to learn from you. :-) |
I think what you say makes sense! I will spend some time reading the code and then expect to see some pull requests to discuss/change/laugh at etc. Glad to hear it fits with your vision. |
What I like about direct inclusion is they can be URLs as well, which means you can distribute a script and the included files then can be updated individually real time by updating the page the url points at. So for example.. I have a script that has remote includes to Hmm.. This could perhaps be DSL-as-as-Service on the cloud? |
Please have a look (not yet released, but via repo) and feel welcome to report problems. I've added some basic howto under https://github.com/holgerbrandl/kscript/blob/master/docs/user_guide.md#create-interpreters-for-custom-dsls |
I am writing a DSL and using kscript to execute the DSL.. so in the end I am going to need to hide away stuff like..
Do you think I should fork the repository when I start doing this or this is something you would like to include in kscript?
The text was updated successfully, but these errors were encountered: