[Haskell-cafe] Haskell School of Expression (graphics)

Jason Dagit dagitj at gmail.com
Wed Jun 1 19:39:13 CEST 2011


On Mon, May 30, 2011 at 1:19 AM, Jerzy Karczmarczuk
<jerzy.karczmarczuk at unicaen.fr> wrote:
> Henk-Jan van Tuyl commenting Andrew Coppin
>>
>> ... (about HOpenGL and H.Platform) ...
>>>
>>> Uh... yes, you might be right about that. However, AFAIK you still need
>>> something with which to create a rendering surface in the first place. (Not
>>> sure if HP includes GLUT...)
>>
>>
>> As you can see in the HP documentation at
>>  http://lambda.haskell.org/hp-tmp/docs/2011.2.0.0/index.html
>> , both OpenGL and GLUT are present.
>>
> Or simply download and execute the examples before raising doubts... (the
> Haskell translation of the NeHe tutorials, etc.) No need for speculation.
>
> Now, I have a  personal pedagogical comment.

Wow, this is great feedback!  Thank you.  I'm CC'ing the opengl list.

> A few months ago I gave to some 30 students an assignment (a family of, with
> freely chosen variants). A long one, to complete in 2 months or more, and
> the subject was - the implementation, coding and running some nice 3D scenes
> with HOpenGL. I teach Haskell for years, usually the projects, which should
> be "applied" are devoted to some exercices in AI / games, compilation, text
> processing, graph manipulation, lazy numerics, etc., you know the song. This
> time I decided to propose something more visual.
>
> The results? A true DISASTER!
> They did "something", all of them, and all their realisations were the nec
> plus ultra of mediocrity... Since my students were as clever and laborious
> as always, and I didn't drink much vodka during this process, I asked them
> what happened? The short "standard" assignments went smoothly as always...
>
> The answers (concentrated) were as follows:
>
> The OpenGL bindings in Haskell are hardly "functional".  You make us sweat
> with generic functional patterns, laziness, exquisite typing,
> non-determinism monad, parsing tools, etc., and then you throw us into this
> ugly imperativism ! Nobody liked your assignment, it was no pleasure for us,
> and our results are the consequence thereof. Where is Haskell?? Of course,
> we had to execute the typical syntactic gymnastics, but without
> understanding the functioning of all those "variables", and other stuff
> relevant to the stateful OpenGL engine. Perhaps, if we had before a semester
> of OpenGL, and at least two months of a true course/tutorial (not your
> pseudo-tutorial on the Web...) we could be more productive.

I think the opengl bindings themselves should be have a level that
closely matches the C API so that people can use famous books like the
redbook to learn it.  I wouldn't really expect us Haskellers to stop
there though, as that's the OpenGLRaw library.  I think we need
something a bit higher level on top that lets you use non-FFI types.
That's the OpenGL library.  Then we need something that Haskellers
*actually* use that provides resource loading, management, type typing
etc.  I think we need scene graphs and what have you.

There is a summer of code student working on the OpenGL library part
of it, or HGL as he likes to call it.

I know someone else has been working on a scene graph / scene
management library.  I don't think the opengl creators meant for
people to develop at that level.  I think they really did mean for
people to build "middleware" on top of it and I think that's what we
in the Haskell community need to do.

By the way, did you show your students gloss?
http://hackage.haskell.org/package/gloss

Thanks,
Jason



More information about the Haskell-Cafe mailing list