purescript / trypurescript

PureScript in the browser
https://try.purescript.org
BSD 3-Clause "New" or "Revised" License
118 stars 50 forks source link

Try Flare #41

Closed paf31 closed 7 years ago

paf31 commented 7 years ago

@sharkdp The process for adding libraries has become much easier since last time we hosted Try Flare. We can also serve the client code from this repo too, like we do with Thermite and purescript-slides if you like. Would you be interested?

cc @garyb too, since we could potentially put together a "Try Halogen" too now.

See #39 for an example of adding a new library.

sharkdp commented 7 years ago

That would be great! Thanks for all the work @paf31 and @soupi!

I'd love to port the try-flare client to the new framework but I have trouble setting up trypurescript locally (Same-origin policy problems). It would be great if you could re-enable the Flare backend. What do you need for that? The packages I would like to include are:

{
  "name": "tryflare",
  "ignore": [
    "**/.*",
    "node_modules",
    "bower_components",
    "output"
  ],
  "dependencies": {
    "purescript-flarecheck": "^2.0.0",
    "purescript-console": "^2.0.0",
    "purescript-const": "^2.0.0",
    "purescript-exists": "^2.0.0",
    "purescript-free": "^3.0.1",
    "purescript-graphs": "^2.0.0",
    "purescript-profunctor": "^2.0.0",
    "purescript-quickcheck": "^3.1.1",
    "purescript-semirings": "^3.0.0",
    "purescript-validation": "^2.0.0"
  }
}

(This is basically the core package set + flare + flarecheck, also including -canvas, -drawing, -smolder ...)

The topo-sorted list I get as output from psc is here: https://gist.github.com/sharkdp/f9aca32fcd35b24b80a93c055c7ca2b0

soupi commented 7 years ago

I haven't experienced these kind of problems trying to run trypurescript locally. how are you running the backend and client?

On my machine to run a backend I use psc-package or bower to download all the purs files i depend on and then to run the backend i run:

.stack-work/dist/x86_64-linux/Cabal-1.22.5.0/build/trypurescript/trypurescript 3333 staging/core/.psc-package/**/src/**/*.purs staging/core/src/TryPureScript.purs

and for the client i just use node's http-server.

paf31 commented 7 years ago

I do the same but I use python for the client: python -m SimpleHTTPServer

paf31 commented 7 years ago

@sharkdp I'll try to deploy the server later today, thanks!

paf31 commented 7 years ago

@sharkdp The server is now up at https://compile.purescript.org/flare. Let me know if you need any help with the client changes.

sharkdp commented 7 years ago

Very cool, thank you so much! I'll send a PR very soon.