Live data from Hacker News

Snake in Elm with WebGL

github.com

11–20 of 29 posts

Re: Snake in Elm with WebGL

#12
post #5

I attended a two day Elm workshop a while back. There is a lot there to love, I just think it's Haskell inspired syntax is a major impediment to it's mainstream adoption. I however would love to be proven wrong as the webs reliability would be so remarkably improved.

Here's a challenge for you: what syntax would be better? I don't mean that in a derogatory way. I think you are right that the syntax (being very foreign to people) does provide an impediment, but puzzling out how to implement the same functionality with a more familiar syntax would be extremely difficult (though potentially very fun).

Well, something like C-like, for maximum familiarity.

What functionality is difficult to render in C-like syntax?

Re: Snake in Elm with WebGL

#13
post #5

I attended a two day Elm workshop a while back. There is a lot there to love, I just think it's Haskell inspired syntax is a major impediment to it's mainstream adoption. I however would love to be proven wrong as the webs reliability would be so remarkably improved.

I work on Reason, which is something you might like: http://facebook.github.io/reason/

Elm has been personally an inspiration too. Nice set of decisions and tradeoffs for what they're trying to achieve, though yeah, mainstream syntax might not be one of them, but that's fine.

Re: Snake in Elm with WebGL

#14

Earlier quoted context omitted.

Here's a challenge for you: what syntax would be better? I don't mean that in a derogatory way. I think you are right that the syntax (being very foreign to people) does provide an impediment, but puzzling out how to implement the same functionality with a more familiar syntax would be extremely difficult (though potentially very fun).

Well, something like C-like, for maximum familiarity. What functionality is difficult to render in C-like syntax?

Currying

Re: Snake in Elm with WebGL

#15
post #5

I attended a two day Elm workshop a while back. There is a lot there to love, I just think it's Haskell inspired syntax is a major impediment to it's mainstream adoption. I however would love to be proven wrong as the webs reliability would be so remarkably improved.

Imho, Elm's syntax is more akin to OCaml than to Haskell. Besides OCaml, it reminds me a lot of F#.

Or any other strict language in ML family like SML. Still it tells something about language popularity when is Elm is only compared with Haskell.

Re: Snake in Elm with WebGL

#16
post #5

I attended a two day Elm workshop a while back. There is a lot there to love, I just think it's Haskell inspired syntax is a major impediment to it's mainstream adoption. I however would love to be proven wrong as the webs reliability would be so remarkably improved.

Here's a challenge for you: what syntax would be better? I don't mean that in a derogatory way. I think you are right that the syntax (being very foreign to people) does provide an impediment, but puzzling out how to implement the same functionality with a more familiar syntax would be extremely difficult (though potentially very fun).

Redux follows the same pattern with your more "familiar" syntax.

Typed functional programming offers wins that forces more safety and modularity onto the code. These are all long term wins. Ultimately I would argue that elm's syntax is better suited for extremely complex projects that have low tolerance for bugs.

Re: Snake in Elm with WebGL

#18

Earlier quoted context omitted.

Here's a challenge for you: what syntax would be better? I don't mean that in a derogatory way. I think you are right that the syntax (being very foreign to people) does provide an impediment, but puzzling out how to implement the same functionality with a more familiar syntax would be extremely difficult (though potentially very fun).

Redux follows the same pattern with your more "familiar" syntax. Typed functional programming offers wins that forces more safety and modularity onto the code. These are all long term wins. Ultimately I would argue that elm's syntax is better suited for extremely complex projects that have low tolerance for bugs.

Redux is a javascript library. It shares some idioms with correct Elm code, but is a very different beast.

Re: Snake in Elm with WebGL

#19
post #11

I made Snake in 103 lines of ClojureScript for a talk from 2015: https://github.com/theronic/cljs-snake It would be fun to implement WebGL as a renderer.

I'm going to make this the "Other awesome snake implementations" sub-conversation

Here is a snake in 4k (sn4ke) mapped onto a sphere instead of a 2d playsurface, which is one of my favourites. http://www.pouet.net/prod.php?which=61035 Here is an awesome music-driven one that modifies the songs based on level and "danger" http://www.pouet.net/prod.php?which=57518

But the best snake ever was the one from FastTracker 2 by Triton! http://www.pouet.net/prod.php?which=13350

Re: Snake in Elm with WebGL

#20

Earlier quoted context omitted.

Well, something like C-like, for maximum familiarity. What functionality is difficult to render in C-like syntax?

Currying

I can get the same effect as currying with C syntax by deliberating invoking a special function:

    functools.partial(old_function, my_new_argument)
Is this such a useful thing that you need the functional style syntax to make it even easier to do?
Post reply on HN