Closed theAkito closed 5 years ago
did you try running the examples like https://github.com/Vladar4/sdl2_nim/blob/master/examples/ex101_init.nim?
did you try running the examples like https://github.com/Vladar4/sdl2_nim/blob/master/examples/ex101_init.nim?
Just ran this example and it works fine.
Then this can be closed?
Then this can be closed?
I can import sdl2/sdl
but it is missing the procs I need, as described in the OP.
Actually, I didn't notice, that it actually is within sdl2/sdl
so it seems to work now.
Still, it is confusing to import it with a different name, especially a name that conflicts with the official sdl2
package name. Very confusing.
I did not write this wrapper, but this is probably by design, so that fully qualified identifier have the prefix sdl
, not sdl2
or sdl2_nim
or something like that, similar to how the proces in C all have the prefixe SDL_
and not SDL2_
.
I did not write this wrapper, but this is probably by design, so that fully qualified identifier have the prefix
sdl
, notsdl2
or`sdl2nimor something like that, similar to how the proces in C all have the prefixe
SDLand not
SDL2_``.
Oh well, didn't expect that taking over design aspects from one of the worst designed programming languages in existence would be something to consider. 😁
it is something to consider when you want to port SDL programs written in C easily.
Still, it is confusing to import it with a different name, especially a name that conflicts with the official sdl2 package name. Very confusing.
Well, the conflict with th official package isn'n the issue since you won't use two of them together anyway (also, who knows what obscure bugs might creep out if you tried such thing).
I did not write this wrapper, but this is probably by design, so that fully qualified identifier have the prefix
sdl
, notsdl2
orsdl2_nim
or something like that, similar to how the proces in C all have the prefixeSDL_
and notSDL2_
.
Correct.
Regarding the name/import discrepancy, I was thinking about renaming the module to sdl2 to get rid of this nimble warning: https://github.com/Vladar4/sdl2_nim/issues/26 but it will surely interfere with the official sdl2 package.
If you have a better idea, please, let me know.
Vladar4 Thanks for your comment.
The name choice depends on your personal preference, I think. I could imagine calling it something like sdl2v (Vladar) or sdl2se (Special Edition 😁 )
because it would be absolutely clear that it is sdl2 but it would be also absolutely clear that it is not the official one but (perhaps a better) alternative to the original module. Of course there could be a name like sdl2_nim chosen or sdl2_ng though in my opinion this would be generic. I personally prefer something like the first examples like just, as mentioned, sdl2v because it is a very simple and tiny distinction but it is clear and that is what we need. What's your preference? 😃
Thanks, I'll keep this idea in mind.
I don't know what the hell I am doing wrong, but after installing this package 3 times, it still says when importing the module like this:
Or like this:
The following:
Info:
What am I missing?