[ANN] ElmFiddle.io - Elm snippets sharing made almost entirely using Elm

240 views
Skip to first unread message

Gabriel Grinberg

unread,
May 21, 2016, 3:05:33 PM5/21/16
to Elm Discuss
After falling in love with Elm I wanted to play around with it while doing something "real".
ElmFiddle.io is the result of my learning process with Elm, and was made almost entirely in Elm.
The code is far from perfect and it uses experimental concepts like http servers in node, but is pretty functional.

Here's a Snake game I made in it - http://www.elmfiddle.io/view/ciohidiwb0000ittvijce7hy5 :)

Unfortunately most of the work was done before 0.17, so it's written using 0.16.

The code is open-sourced, of course, and the repo contains more information about it.

I'd love to hear your feedback!

Nick H

unread,
May 21, 2016, 3:35:24 PM5/21/16
to elm-d...@googlegroups.com
This is awesome!

Right off the bat, I really like that -> gets rendered as an arrow. It's surprising how much nicer the code looks because of it.

You already have some big items on your to-do list, but integration with elm-format would be killer :-)

~Nick

--
You received this message because you are subscribed to the Google Groups "Elm Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elm-discuss...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Joey Eremondi

unread,
May 21, 2016, 5:03:26 PM5/21/16
to elm-d...@googlegroups.com
This is very nice! My initial thoughts:

Things that are great:
  • Like Nick, I love the ligatures.
  • The overall formatting, style and presentation of the site is quite nice
  • Being able to save is awesome

A couple of ideas:
  • The Save function is what makes this different from elm-lang.org/try, so I'd make this feature more clear from the beginning (like JSFiddle does)
  • It would be great if there were a way to beautify with elm-format (probably a long-term project)
  • Along the same lines, it would be nice if the examples matched the standard formatting, particularly with the colons. I've got a diff here.
Awesome work. Tools like this are really going to help bring Elm to the mainstream.

Janis Voigtländer

unread,
May 22, 2016, 2:32:23 AM5/22/16
to elm-d...@googlegroups.com

Very Cool! Be sure to make it listed at http://builtwithelm.co/.


--

Gabriel Grinberg

unread,
May 22, 2016, 10:00:59 AM5/22/16
to Elm Discuss
Thanks guys!
@Nick, checkout https://github.com/tonsky/FiraCode for more info on the font. I use it inside Atom and love it.

I will try prioritizing elm-format indeed.

@Joey,
Thanks for the kind words :) the save button was actually a dilemma I had. Wanted to avoid copying the UX from other fildde-ish styles, and with that I realised that you should only be able to save if your code ran and ran well (a.k.a had no errors).  I can disable it + tooltip instead of hiding it, and now that I think of it, to support sharing issues I might need to allow saving even with errors.. hmmm...

@Janis 
Almost forgot that, thanks! opening a request with them now

--
You received this message because you are subscribed to a topic in the Google Groups "Elm Discuss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/elm-discuss/ZI7UKO1xuBk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to elm-discuss...@googlegroups.com.

Rex van der Spuy

unread,
May 26, 2016, 12:52:10 PM5/26/16
to Elm Discuss
This is wonderful, thank you!!
I will be using it all the time :)

I know this is out-of-scope but....

... how difficult would it be to go a few steps further and turn this into an all-in-one Elm IDE, that also works offline?
A no-setup programming environment (for students especially) that's a one-stop-shop for writing and compiling Elm programs would be amazing.
Anyone care to comment?

Gage Peterson

unread,
May 26, 2016, 4:00:02 PM5/26/16
to Elm Discuss
I think that looking at: https://github.com/valderman/haste-compiler would be cool. This means that things like the elm-fmt and the elm compiler itself could be (maybe easily) run in the browser. 

Joey Eremondi

unread,
May 26, 2016, 4:02:40 PM5/26/16
to elm-d...@googlegroups.com
Either that or GHCJS, which seems to have a lot more support from the Haskell community. (Not sure why though).

Looking here it sounds like GHCJS is more complete and closer to GHC, but Haste makes cleaner JS. Maybe both are worth a try?

Gabriel Grinberg

unread,
May 26, 2016, 5:11:01 PM5/26/16
to Elm Discuss

Thanks Rex!
I actually wanted to do that in the first place - compile the Elm compiler to JS but that didn't go to well. I hope it's possible and will try to find time to try again.
If anyone has experience with GHCJS a client side elm com.piler can be awesome!

You received this message because you are subscribed to a topic in the Google Groups "Elm Discuss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/elm-discuss/ZI7UKO1xuBk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to elm-discuss...@googlegroups.com.

Joey Eremondi

unread,
May 26, 2016, 5:39:32 PM5/26/16
to elm-d...@googlegroups.com
I've fiddled with GHCJS Elm before, and it's a complicated road to go down. Elm-format on GHCJS is a much easier starting point.

Compiling a single Elm file with no standard library is quite easy, since you can just compile the elm-compiler library using GHCJS. However, it's trickier to get the prelude and packages working, since elm-package assumes you are using a file-system. It also uses the network library for fetching information, which uses a C FFI and thus can't compile to JS.

There's been talk of rewriting an alternate elm-package/elm-make for the browser, but I don't know if anyone's made progress on that.
Reply all
Reply to author
Forward
0 new messages