playground
playground copied to clipboard
Support for Reason
I like to see Reason on the Playground.
Check out https://reasonml.github.io/try/
I prefer the Playground for its dark background, the examples and it is also way more overseeable to me.
There will be a new BuckleScript website in the near future, based on infrastructure used to make the reason website, which will most likely use the same playground as is used there. Whether it'll have a dark background I don't know, but I doubt anything will be done to this playground until then. Especially considering there's already a reason playground that supports the use case :)
Check out https://reasonml.github.io/try/
Interestingly I cannot do anything on that page. Cannot type in to anything, no scripts blocked, no errors in console... Interesting...
The current version overrides console logging to capture program output, so there may still be errors. I just had a PR merged that does the evaluation and output capturing in a web worker instead, but the site hasn't been updated to use it yet.
cc @chenglou @jaredly
What bothers me, is that a lot of the examples all over the page are not working in the try section, including the example on the front page.
There's work underway to have both a selection of examples in the playground, and runnable examples in the guide and elsewhere.
See https://github.com/reasonml/reasonml.github.io/pull/128 and https://github.com/reasonml/reasonml.github.io/pull/145 for details
@OvermindDL1 could you give a screenshot of what you see? Also what browser are you using?
https://reasonml.github.io/try/?reason=DYUwLgBAHhC8EEYAMBuAUAKQM4DpgHsBzaFIA
this is what it should look like.
NOTE if you're using a browser other than chrome/firefox/safari, I can't vouch for your success.
You can copy-and-paste any of the examples here if you want to try them out right away: https://github.com/reasonml/reasonml.github.io/pull/128/files#diff-d91ff326bb64b518c5748a72456cbb64R26
@ShalokShalom given that there already is a reason playground, would you like to open an issue there (https://github.com/reasonml/reasonml.github.io/issues) expressing your styling preferences?
@jaredly I'm running Chrome 60.
Your https://reasonml.github.io/try/?reason=DYUwLgBAHhC8EEYAMBuAUAKQM4DpgHsBzaFIA link works, what I saw before were the 4 boxes with their labels in the upper-right corners but they were entirely blank and unclickable, no code or line numbers in them.
Hmm, on some reloads I'm seeing things like this pop into the console:
Refused to execute inline script because it violates the following Content Security Policy directive: "script-src 'unsafe-eval' *". Either the 'unsafe-inline' keyword, a hash ('sha256-70UX0+cT/qf3p1Q8SUy0Vohe36d1GERDgd51d0kP+6g='), or a nonce ('nonce-...') is required to enable inline execution.
For note, I'm at work, and the browsers are enforced to certain security guidelines that do make things like react work poorly depending on how it is coded (yet not anything else that I've run across).
Oh, there is one more: https://reasonml.github.io/reason-tools/popup.html#
@OvermindDL1 that sounds like a chrome extension you're using is acting up. CSPs only apply, as far as I know, if a) the html document explicitly requires it (which ours doesn't) or b) the code is in a chrome extension.
It could be his employer uses a proxy that adds http headers or injects html code into webpages, which would be nuts, but i've seen worse. The playground does use eval, so the warning/error makes perfect sense if that's the case.
It could be his employer uses a proxy that adds http headers or injects html code into webpages, which would be nuts, but i've seen worse. The playground does use eval, so the warning/error makes perfect sense if that's the case.
No, they just do things like block requests that don't match the same security as the origin and things like that. No rewriting.
@OvermindDL1 that sounds like a chrome extension you're using is acting up. CSPs only apply, as far as I know, if a) the html document explicitly requires it (which ours doesn't) or b) the code is in a chrome extension.
I mostly just have uMatrix, but even entirely disabling it still had that randomly. It only ever happens on sites that use react I've noticed but I've not looked closely enough to find a pattern yet. Happens both at work and at home (at home I have a lot of extensions, not so at work).
Hmm, I use uMatrix too. Never seen anything like this, or had a problem with the reason playground once the necessary scripts were whitelisted.