dylan-lang / dylan-playground Goto Github PK
View Code? Open in Web Editor NEWImplementation of play.opendylan.org
License: MIT License
Implementation of play.opendylan.org
License: MIT License
Could be fun to play around with mini benchmarks in the playground and share them.
Make something even simpler to use than benchmark-repeat
: benchmarking (repeat: 10, print: #t) do-stuff() end
which will either return the overall timing and allocation info or print it to the console, depending on the value of the print:
argument. (benchmark-repeat
returns a sequence of iteration values.)
Don't run the previously built executable if the current build doesn't generate an executable. I suspect this means checking the mod time on the exe before starting the build and comparing after the build.
Probably whitelist libraries and modules that are acceptable.
Limit run-time to, say, 20 seconds.
Lower right corner of code textarea seems natural.
/stats
page to see activity/home/cgay/dylan/workspaces/playground/dev/play-f5a40c6e0ce5/main.dylan:6: Serious warning - Method { define method factorial (n :: singleton(0), #next next-method) => (#rest results) ... end } not congruent with generic function - the method's values list includes #rest, but the generic's values list does not
--------------------------------------
define method factorial (n == 0) 1 end; // called when n = 0
--------------------------------------
/home/cgay/dylan/workspaces/playground/dev/play-f5a40c6e0ce5/main.dylan:7: Serious warning - Method { define method factorial (n :: singleton(1), #next next-method) => (#rest results) ... end } not congruent with generic function - the method's values list includes #rest, but the generic's values list does not
--------------------------------------
define method factorial (n == 1) 1 end; // called when n = 1
--------------------------------------
/home/cgay/dylan/workspaces/playground/dev/play-f5a40c6e0ce5/main.dylan:8-10: Serious warning - Method { define method factorial (n, #next next-method) => (#rest results) ... end } not congruent with generic function - some of the method's required parameter specializers aren't subtypes of their counterparts in the generic
------------------------------------------------------------------
8 define method factorial (n) // called for any other n
9 n * factorial(n - 1)
10 end;
---
3485 ? Ssl 0:15 dylan-playground --config /home/cgay/dylan/workspaces/playground/live/config.live.xml --working-directory /
13103 ? Z 0:00 \_ [sh] <defunct>
25202 ? Z 0:00 \_ [sh] <defunct>
25307 ? Z 0:00 \_ [sh] <defunct>
Presumably not calling wait()
after process dies. Not sure whether it's the Playground's responsibility or whether run-application
should always do it.
Provide checkboxes to enable showing DFM and assembly output.
Currently there's a bug in -dfm
for the regular-expression library so can't enable it.
Currently can only generate assembly for HARP back end, IIRC.
To avoid disk full DOS attacks, limit how often one client can share code. Guessing it has to be IP based.
Rather than linking directly to DRM, LibRef, etc, put a Help button with a menu of choices.
Compiler warnings are inside a <pre>
tag and they don't wrap to the window width, so they require horizontal scrolling.
Would've been useful for fraya's DOT share: https://play.opendylan.org/shared/034b4318d2a01602
CodeMirror probably?
Currently playground code always goes in ./play-<hash-code>/
. Should use a slightly deeper directory structure like ./xx/yy/play-xxyy<rest-of-hash-code>
instead.
Could also store metadata about whether the playground was shared and GC the ones over a certain age that haven't been shared.
After running a first example, if I choose another example, the code textfield does not change.
Firefox 83.0 (Linux 64 bits)
Basically store the example code semi-permanently based on the playground ID, but when the link is followed a new playground ID should be created so they don't conflict. I think. Probably need to set a long TTL but make a note that there are no guarantees.
Initial implementation just stores plain text of the code. Need a way to store metadata such as the version of the playground with which it was created so that I can use the correct module definition as that changes. Or possibly just the time the share was created.
Since we don't have Cap'n proto, probably compressed json.
Making this high priority so I don't have to do a data format change after we're using this more.
Use the environment-commands
library instead of shelling out to dylan-compiler
. This will save the startup time of dylan-compiler
, currently 0.17s on the server machine.
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.