Skip to content
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

Create an AskScript Playground #108

Closed
czerwinskilukasz1 opened this issue Jun 10, 2020 · 15 comments
Closed

Create an AskScript Playground #108

czerwinskilukasz1 opened this issue Jun 10, 2020 · 15 comments
Assignees
Labels
AskScript ./src/askscript/** enhancement New feature or request size: 16h (medium-large) tasks for approx. 16 hours
Milestone

Comments

@czerwinskilukasz1
Copy link
Collaborator

We would like to let visitors on askql.org try programming in Ask as soon as possible.
The idea is to create a playground - an editor where a visitor can write or paste, instantly run AskScript and get the result.

@czerwinskilukasz1 czerwinskilukasz1 linked a pull request Jun 10, 2020 that will close this issue
@czerwinskilukasz1 czerwinskilukasz1 self-assigned this Jun 10, 2020
@czerwinskilukasz1 czerwinskilukasz1 added AskScript ./src/askscript/** enhancement New feature or request labels Jun 10, 2020
@czerwinskilukasz1 czerwinskilukasz1 added this to the v1.1 milestone Jun 10, 2020
@mhagmajer
Copy link
Contributor

This indeed would be a great feature! What (if any) additions do we need to make to this repository in order to make this possible? How do we make it so that after every release (ideally after every commit) the playground is updated?

@czerwinskilukasz1
Copy link
Collaborator Author

As Marcin mentioned to me in a private message, as for frontend, this editor looks cool.
In addition, VS Code uses it for syntax coloring, so we could re-use syntax coloring plugin
https://microsoft.github.io/monaco-editor/

I'm saying: yes, this sounds great :). And it's on MIT license, so we can freely reuse it.

@czerwinskilukasz1
Copy link
Collaborator Author

OK, working on this one.

@czerwinskilukasz1
Copy link
Collaborator Author

czerwinskilukasz1 commented Jun 16, 2020

@mhagmajer , according to this issue, syntax highlighting in VS Code uses TextMates parsers while Monaco Editor uses JS regexes, at least for Python.
Do you have additional information on syntax coloring in these editors?

@mhagmajer
Copy link
Contributor

@czerwinskilukasz1 I haven't looked into it. Whatever VS Code uses for syntax highlighting can support many programming languages so should be able to support AskScript as well

@czerwinskilukasz1
Copy link
Collaborator Author

czerwinskilukasz1 commented Jun 16, 2020

Whatever VS Code uses for syntax highlighting can support many programming languages so should be able to support AskScript as well

Of course.

@czerwinskilukasz1
Copy link
Collaborator Author

What I wanted to is that VS Code uses a different syntax coloring method, so we can't reuse syntax coloring from Monaco Editor.
More info: 1, 2

@czerwinskilukasz1
Copy link
Collaborator Author

Here are official examples of syntax coloring in Monaco and here's a playground.

@czerwinskilukasz1
Copy link
Collaborator Author

The short term plan for 1.1. was:

  • Create any well-working and reasonably looking Playground, which can be used to run AskScript programs.
    This is done.

My long term plans for AskScript Playground is:

  • Get design update from Kari
  • Add more examples to the Playground
  • Use Monaco Editor
  • Add syntax highlighting (which is a separate task from adding syntax highlighting in VS Code)
  • Consider adding a window which allows to define own resources in Javascript (this is potentially dangerous, so we need a good discussion and plan)

What are your thoughts, @mhagmajer?

@mhagmajer
Copy link
Contributor

@czerwinskilukasz1 the playground server PR is still open and I there is none for the client. Code needs to be merged into this repo so that everyone can participate.

Please discuss any changes to milestones with me and align your plans with the milestones.

@czerwinskilukasz1
Copy link
Collaborator Author

Please discuss any changes to milestones with me and align your plans with the milestones.

Not sure what you mean as we are in constant contact.

Let me create a separate issue for each of the tasks in bullet points, so that we can assign them to milestones.

@czerwinskilukasz1
Copy link
Collaborator Author

Closing this one as done, the Playground is available at: http://cli.askql.org:3000/

Follow-ups are:

@mhagmajer
Copy link
Contributor

Reopening since the linked PR is still open.

@mhagmajer mhagmajer reopened this Jun 18, 2020
@czerwinskilukasz1
Copy link
Collaborator Author

czerwinskilukasz1 commented Jun 18, 2020

Closing PR #87.

@czerwinskilukasz1
Copy link
Collaborator Author

And closing this ticket.

@czerwinskilukasz1 czerwinskilukasz1 added size: 16h (medium-large) tasks for approx. 16 hours and removed size: 32h (large) tasks for approx. 32 hours labels Jul 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
AskScript ./src/askscript/** enhancement New feature or request size: 16h (medium-large) tasks for approx. 16 hours
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants