Gleam Playground
A browser based playground for the Gleam language.
Community: Gleam language Discord channel.
Try Gleam in your browser!
Home Page: https://johndoneth.github.io/gleam-playground/
License: MIT License
A browser based playground for the Gleam language.
Community: Gleam language Discord channel.
Once Gleam has a working language server, it should be possible to use it self-contained in the browser to provide completion, documentation viewing, and other nice features.
This could be done by extending the wasm-compiler to provide an entry to spawn an LSP instance then integrating the instance with Monaco.
On mobile, the editors are stacked vertically which is usually a good idea. However, the editors intercept touch events making it impossible to scroll the page (not just the editor) by swiping with a finger.
I propose to show a tab bar on mobile instead, with 3 tabs: "Gleam", "Result", "Compiled JS/Erlang". When pressing the "Build & Run" button, the "Result" tab should be opened automatically.
Having the ability to select from a list of examples could help those trying to learn specific language concepts. A dialog box would be necessary to confirm overwriting the existing code.
It should be configurable how the output (in the "Result" section) should be presented. I'm thinking about two options:
The question is what UI to use for the configuration.
Hello,
share links are very long. But it is very nice that the playground works without any server.
I am proposing to zip it. This is what I came up with:
fn tester(flag1, flag2) {
case #(flag1, flag2) {
#(True, True) -> True
#(True, False) -> False
#(False, True) -> False
#(False, False) -> False
}
case #(flag1, flag2) {
#(True, True) -> True
#(True, False) -> False
#(False, True) -> False
#(False, False) -> False
}
case #(flag1, flag2) {
#(True, True) -> True
#(True, False) -> False
#(False, True) -> False
#(False, False) -> False
}
}
pub fn main() {
tester(True, False)
}
current link:
new compressed link:
Source: https://raw.githubusercontent.com/lpil/nerf/main/src/nerf/websocket.gleam
current link:
new compressed link:
I think I will allow old code to live on by naming it zsource...
// size cannot be used with float
match categories {
SegmentOptionCategories {
typ: Some(Float { .. }),
size: Some(opt),
..
} => err(ErrorType::FloatWithSize, opt.location()),
_ => Ok(categories.segment_type()),
}
erlang floats:
expected one of the supported sizes 16, 32, or 64
Would be nice to run tests / style linting / code linting / enforce code formatting, etc. with GitHub Actions.
Hello! It would be cool if folks could use the current version of Gleam with the playground :)
Thanks,
Louis
As discussed here, @JohnDoneth is already working on porting the playground to Gleam. I'd like to know the current status of this port and how one can contribute.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.