Comments (9)
Anton, thanks for your interest! Do you want me to prepare a dedicated Expr sandbox so you can use it in the Getting Started guide and other parts of the documentation?
As for go.dev/play, I don't think it supports installing modules. Quoting the docs:
The playground can use most of the standard library, with some exceptions. The only communication a playground program has to the outside world is by writing to standard output and standard error.
Installing arbitrary modules in the sandbox would be too slow (and insecure).
from codapi.
Here is an example of playground: https://go.dev/play/p/XCoNXEjm3TS
It installs github.com/expr-lang/expr inside it.
If you could add support for Expr it will be super cool =). I can use it in https://expr-lang.org/docs/language-definition
from codapi.
It installs github.com/expr-lang/expr inside it.
Ouch, I was not aware of this feature! Still, I'd rather not allow arbitrary modules (yet).
I'd love to add Expr support, though! In fact, I have already done so (the name of the sandbox is expr-lang
).
I think you can use this sandbox both for full-blown Go examples (on the Expr Home and Getting Started pages) and for expression evaluation (Language Definition page).
I've prepared some examples:
I'd send you a PR, but it seems you're using Docusaurus, and I couldn't find the documentation build config or tasks in the Expr repo to check everything locally (integration with Docusaurus can be tricky sometimes).
from codapi.
Oh! Awesome! Yes, docusaurus site is in private repo right now. Will try to integrate those today.
from codapi.
Awesome! Let me know if you have any questions in the process.
As you probably know, Docusaurus' "markdown" is not really markdown (it is handled as a React component).
So it does not play well with web components (which the Codapi widget is) or templates.
Please see this guide for using Codapi with Docusaurus.
If you're testing on localhost, port 3000 is allowed to access Codapi.
from codapi.
@antonmedv Any luck integrating Codapi? I'm happy to help if you have any questions.
from codapi.
I was able to integrate it, but I need to figure out a better editor for expr.
from codapi.
Codejar maybe? It's a perfect fit for interactive examples, IMHO. I use it on the codapi website.
from codapi.
Okay then. Let me know if you have any questions.
from codapi.
Related Issues (12)
- support matplotlib ? HOT 2
- Understanding the purpose of `files` HOT 12
- Error - 403 - Forbidden. Your domain is probably not allowed on Codapi. HOT 2
- Permission denied on alpine HOT 8
- I have self-hosted the service, but I still get 403 - Forbidden HOT 3
- HelloStar 计划(HelloStar Plan) HOT 1
- Help me setup mysql sandbox HOT 1
- Can I run Classic asp? HOT 1
- Donation option? HOT 1
- run in k8s HOT 3
- help in creating a tool sandbox HOT 20
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 codapi.