Hello pures!
A bit of background to get the context going. I’m a freelance game dev. tutorial creator under the GDQuest umbrella and since I’m interested in games, I was bummed out a bit that the WebGL bindings aren’t up to date.
I have experience with “simple” languages like Python, JavaScript to some extent and somewhat acquainted with C/C++. But I am almost a complete stranger when it comes to Haskell/Purescript even though I’ve been doings tests here and there for about 2-3 years now. I never made anything “in production” with these languages.
To test out and learn Purescript, which I actually prefer over Haskell, even as a desktop/CLI/generic language I decided to work on the WebGL bidings myself: https://github.com/razcore-art/purescript-webgl-generator.
Since I’m out of my depth here, I hoped to get some feedback early in the road so I don’t make huge blunders later.
The idea is to make a generator that creates the “raw” webgl bidings first, similar to https://github.com/mgmeier/purescript-webgl-generator, except I want to write it in Purescript and use the original KhronosGroup WebGL IDL spec files.
In any case, any feedback is much appreciated.
I haven’t added a readme file just yet, cause at this stage I’m just exploring/testing out stuff.
I’m especially interested how or even if it’s required to try and match the typedef
s in the WebGL spec. For example, does it even make sense to enforce a byte
type? Or is it enough that this is an Int
in Purescript?
And what about the WGLAST
construction:
data WGLType
= WGLInt
| WGLFloat
| WGLBoolean
| WGLNumber
type WGLIdentifier
= String
data WGLAST
= WGLTypeDef WGLIdentifier WGLType
| WGLEnum WGLIdentifier (List String)
I’m thinking that the parser will return List WGLAST
which then I’ll try to print out to Purescript & JavaScript. If there are better ideas please let me know.
Thanks!