some Elm projects by undergraduate students

301 views
Skip to first unread message

Janis Voigtländer

unread,
Feb 12, 2015, 3:07:00 PM2/12/15
to elm-d...@googlegroups.com

Hello all,

At the end of a course I gave this semester, I asked students to implement something (more or less, whatever they want) in Elm, as a kind of end of term project, since Elm/FRP was the last topic we covered during the regular lectures. I guess it’s interesting to share the results with the list. Unsurprisingly, most (but not all) students chose to write some game clone.

For the interested, links to the source codes (in most cases, in the students’ GitHub accounts) are on the course page.

Have fun!

Janis

Peter Damoc

unread,
Feb 12, 2015, 4:00:39 PM2/12/15
to elm-d...@googlegroups.com
Awesome results. 
Thanks for sharing! :) 

--
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.



--
There is NO FATE, we are the creators.
blog: http://damoc.ro/

Hassan Hayat

unread,
Feb 12, 2015, 4:08:06 PM2/12/15
to elm-d...@googlegroups.com
Awesome! It's great that functional programming is now being taught at the undergrad level. Wow, if only you were my teacher in college. Implementing linked lists and stacks in C++ were fun and all but nothing compared to 2048. 

I do have to ask, now that you have taught Elm in a course, what are your takeaways? Was the experience generally positive or negative? How did the students adapt to the language? From the projects, I conclude that the students must've really grasped the concepts in Elm, but to what extend did they struggle? etc...

Janis Voigtländer

unread,
Feb 12, 2015, 4:54:48 PM2/12/15
to elm-d...@googlegroups.com
I really like the results as well. As to takeaways from the teaching, I'll have a chance to reflect more on that in the next few weeks, and will also have a chance to speak again with each student (oral exams) and will be interested myself in their impressions of various aspects from the course and certainly the practical Elm part as well.

About the fact that this was done on undergraduate level, I should qualify that the students were indeed undergraduates, but all very bright undergraduates! The course is an elective one, and is actually the second one along my FP teaching path. So, the students in there had already followed me a semester talking about Haskell and Prolog and then decided to take my follow-on course on advanced FP concepts. So there certainly is some selection bias here. But, I do have plans to also try Elm out on complete programming novices. That will be a different, but I guess also interesting experience.
--

Kim-Ee Yeoh

unread,
Feb 12, 2015, 5:07:52 PM2/12/15
to elm-d...@googlegroups.com
Hi Janis,

Thank you for sharing your students work.

Did you have a chance to look at their source code?

Did you detect any especially must-see code useful to an elm developer?

-- Kim-Ee

--

Max Goldstein

unread,
Feb 12, 2015, 5:32:44 PM2/12/15
to elm-d...@googlegroups.com
I also would like to know the highlights from the source code. Did, for example, the Game of Life person implement 2D arrays in a way worth turning into a third party library?

Hassan Hayat

unread,
Feb 12, 2015, 7:08:03 PM2/12/15
to elm-d...@googlegroups.com
Sorry for interjecting, but for the questions about the source code, Janis does link to the source code. It's wherever it says "Quellcode hier" (which I suppose means "Sourcecode here" but don't take my word for it, I don't speak German). In case that was a source of confusion, hopefully that helps.

Hassan Hayat

unread,
Feb 12, 2015, 7:12:29 PM2/12/15
to elm-d...@googlegroups.com
And, by the way Janis, wow! Prolog at the undergrad level. I'm impressed. I bet you end up with highly skilled and talented students. I think that could make other colleges rethink their computer science programs. 
To unsubscribe from this group and stop receiving emails from it, send an email to elm-discuss+unsubscribe@googlegroups.com.

Raoul Duke

unread,
Feb 12, 2015, 7:15:00 PM2/12/15
to elm-discuss
> And, by the way Janis, wow! Prolog at the undergrad level. I'm impressed. I
> bet you end up with highly skilled and talented students. I think that could
> make other colleges rethink their computer science programs.

wow, you sure are trying to bait the Monty Python Yorkshire
chest-pounders to come out of the woodwork: "Well, sonny, when *I* did
undergrad, we wrote a Prolog interpreter in Scheme that was written in
ML!" :-) and here i thought CS programs had gotten *better* since I
was through it all. ;-)

Hassan Hayat

unread,
Feb 12, 2015, 7:22:01 PM2/12/15
to elm-d...@googlegroups.com
Lol, Raoul. No, I was just thinking about my own CS classes where I thought that imperative and OOP was the only thing there. Had I known that there were things other than loops, classes, and endlessly stepping through code in a debugger, I would've probably pursued a CS degree alongside my Math degree.

Max Goldstein

unread,
Feb 12, 2015, 7:53:47 PM2/12/15
to elm-d...@googlegroups.com
Raoul, I don't know if you're joking or not, but I actually did implement a scheme-like language in ML for undergrad. I mean, it wasn't from scratch, more like a buggy implementation of Hindley-Milner type inference, and we never got to Prolog though there was a chapter on it, but still.

And I'm aware I could find the source without too much trouble, I'm just lazy :)

Raoul Duke

unread,
Feb 12, 2015, 8:16:22 PM2/12/15
to elm-discuss
> but I actually did

see! the Yorkshiremen cometh!

(i wasn't kidding at all, it is what we did.)

Janis Voigtländer

unread,
Feb 13, 2015, 1:45:17 AM2/13/15
to elm-d...@googlegroups.com
Haven't yet had a very deep look through the source code myself, but yes, that should be interesting.

Two specific issues that came up during the work, i.e., students asked about how they could do something that they thought there should be a way but Elm didn't really have a good solution:

1. How to include short animations? In situations where fpsWhen does not seem to apply since the "control" for turning the animations on/off depends on the current state which is itself part of the program's "global foldp", so using it as input signal for fpsWhen would lead to loopiness.

2. How to get the mouse position relative to some Element? Something like what Haskell's diagrams library supports as point queries would have helped.


Am Donnerstag, 12. Februar 2015 schrieb Max Goldstein :
I also would like to know the highlights from the source code. Did, for example, the Game of Life person implement 2D arrays in a way worth turning into a third party library?

--

Evan Czaplicki

unread,
Feb 13, 2015, 3:59:23 AM2/13/15
to elm-d...@googlegroups.com
Janis, thanks for sharing, these games are delightful!

The Promise stuff will introduce a way to allow certain kinds of loops that'll make it easier to use fpsWhen in the specific case you describe. I suspect there'll be a better answer someday, perhaps along these lines.

For #2, this is long requested and is in my plan for when I modernize Elements. I learned a lot doing elm-html (which has this feature) and need to bring those lessons back to Elements.

Jeff Smits

unread,
Feb 13, 2015, 6:10:00 AM2/13/15
to elm-discuss
This is cool stuff, thanks for sharing. I get a "too much recursion" with Game of Life, but all the others work really well and are fun! :)

On Fri, Feb 13, 2015 at 7:45 AM, Janis Voigtländer <janis.voi...@gmail.com> wrote:
Haven't yet had a very deep look through the source code myself, but yes, that should be interesting.

Two specific issues that came up during the work, i.e., students asked about how they could do something that they thought there should be a way but Elm didn't really have a good solution:

1. How to include short animations? In situations where fpsWhen does not seem to apply since the "control" for turning the animations on/off depends on the current state which is itself part of the program's "global foldp", so using it as input signal for fpsWhen would lead to loopiness.

This is an old problem. It's what originally inspired me to look into a general solution for loopiness.
 
2. How to get the mouse position relative to some Element? Something like what Haskell's diagrams library supports as point queries would have helped.

Yeah, something like diagrams would be cool to have. Maybe next year you can (ab)use your position as a teacher to have students make cool Elm libraries as their end of term project? :P
Reply all
Reply to author
Forward
0 new messages