4 ms·
Here's a template for Racket: https://replit.com/@ConnorBrewster/racket https://replit.com/@ConnorBrewster/racket
by cbrewster 5y ago
Here's a template for Racket: https://replit.com/@ConnorBrewster/racket https://replit.com/@ConnorBrewster/racket
- fn-mote 5y agoRacket without graphics is ok but lacks a certain connection for teaching. Maybe someone will come along and make the graphics for Racket work the same way i3 works (which is really cool).
- jarcane 5y agoOK, experimenting with this example, I attempted to import a simple Racket web app (https://github.com/jarcane/RantStack https://github.com/jarcane/RantStack). I've provided links to the REPLs too for both attempts. attempt 1) I was able to import a Racket app from Github, added a similar nix config to it as described in the docs, but it would not run as it says nix-shell is not present. Apparently a repl needs to be blessed some how as a Nix instance to work, but there's no option to select that when importing or creating a repl. URL: https://replit.com/@jarcane/RantStack https://replit.com/@jarcane/RantStack attempt 2) Next I tried just forking your template, and literally just copy-pasting the code from my app (it's a single file anyway) into the main.rkt. This runs the app ... but I can't actually access it, because apparently the ports aren't being forwarded. Going to the URL as described in the repl.it docs just gives me an eternal "Repl waking up" screen that loads forever, but never resolves. URL: https://replit.com/@jarcane/racket https://replit.com/@jarcane/racket
- cbrewster 5y agoSorry, building nix environments from scratch is still rough around the edges and we are working to improve that at the moment. When hosting a web server, your app must listen on 0.0.0.0, adding that to your repl seems to make that work. I will make sure that is in our docs for web hosting. Working Racket web app: https://replit.com/@ConnorBrewster/racket-server https://replit.com/@ConnorBrewster/racket-server
- jarcane 5y agoAhh! That was the missing piece of the puzzle, thank you. Also played a bit with the Glitch import on an Elm import but found it broke npm in weird ways (something about a file being moved but not found?), but then the Github import of the same project wouldn't work either because of Node version incompatibilities that don't seem to be repl.it's fault exactly other than just "it runs node 12 and some stuff is broke on node 12". Does look promising otherwise though, with the Nix support I can see soooo many things being possible that simply weren't on other similar options like this.
- cbrewster 5y agoYeah, we are really excited about the future Nix will bring for us at Replit. Soon, language version incompatibility will be a thing of the past on Replit.