caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: "Daniel Bünzli" <daniel.buenzli@erratique.ch>
To: Florent Monnier <monnier.florent@gmail.com>
Cc: caml list <caml-list@inria.fr>
Subject: Re: [Caml-list] SDL2 bindings, testers and feedback welcome
Date: Tue, 17 Dec 2013 16:14:02 +0100	[thread overview]
Message-ID: <73BC433938F343F6B83AF31E2EC0D84F@erratique.ch> (raw)
In-Reply-To: <CAE1DttAHRjXJXD2MYpW6-s17phSEUnDsu5ghQiJSFx_=o7NJpg@mail.gmail.com>

Le mardi, 17 décembre 2013 à 15:17, Florent Monnier a écrit :
> I can test it on Mageia Linux and on MS/Windows with Cygwin Terminal
> with MingW's compilator.
>  
> Should we test SDL 2.0.0 or 2.0.1 (or both?)
As long as tsdl is not released I plan to follow the latest 2.0.X, since SDL bugs get fixed in the process.

> But I would say (IMHO) that it would be good to have both, an
> exceptionfull module for beginning, and an exceptionless module for
> the rewritting of the initial drafts.

I'm not fond of diluting APIs into various incarnations, it augments the overall bureaucracy and I like to have a single way of doing things. Getting rid of handling these `Error cases seems an `ignore` or monad away so I tend to lean on keeping it the way it is now.

> > * The signature/approach of certain binding functions may be disputable
> > or may need change to achieve reasonable performance.
>  
> could you elaborate?

If you take a function like Sdl.render_draw_lines [1] a lot of copying is involved for transforming that point list into a pointer on an array of points. Hence I also provide the function Sld.render_draw_lines_ba [2] which takes the point list as a bigarray and allows to perform the call without any copying, depending on where your data comes from this can be much more efficient. Since I didn't use the binding yet, I may have missed less obvious opportunities.  

[1] http://erratique.ch/software/tsdl/doc/Tsdl.Sdl.html#VALrender_draw_lines
[2] http://erratique.ch/software/tsdl/doc/Tsdl.Sdl.html#VALrender_draw_lines_ba



> Would it be indiscreet to ask you if you wrote this code as a
> volunteer or if you got paid for it, and how much?  

1/3 (~1 week) of the code was sneaked during my stay at OCaml Labs when I was bored working on vg. The remaining 2/3 are self-funded but I need part of it for a paid project.  

Best,

Daniel



  reply	other threads:[~2013-12-17 15:14 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-17  6:11 Daniel Bünzli
2013-12-17  7:02 ` Anthony Tavener
2013-12-17 14:17 ` Florent Monnier
2013-12-17 15:14   ` Daniel Bünzli [this message]
2013-12-18  6:54   ` Erkki Seppala
2013-12-18  8:05     ` Anthony Tavener
2013-12-18  9:24       ` Daniel Bünzli
2013-12-18  8:18     ` Florent Monnier
2013-12-22 10:01       ` Kakadu
2013-12-30 13:28         ` Vu Ngoc San
2013-12-17 17:05 ` Ashish Agarwal
2013-12-17 17:47   ` Daniel Bünzli
2013-12-17 18:57     ` Ashish Agarwal
2013-12-17 19:45       ` Anthony Tavener
2013-12-18 15:40         ` Ashish Agarwal
2013-12-18 18:02           ` Yotam Barnoy
2013-12-18 19:53             ` Daniel Bünzli
2013-12-18 22:29               ` Ashish Agarwal
2013-12-18 22:45                 ` Daniel Bünzli
2013-12-17 20:26       ` Daniel Bünzli
2013-12-18  1:13         ` Francois Berenger
2013-12-18  6:44           ` Erkki Seppala
2013-12-18  9:21           ` Daniel Bünzli
2013-12-19  1:11             ` Florent Monnier
2013-12-19  6:39       ` Florent Monnier
2013-12-17 19:29     ` Erkki Seppala
2013-12-19  5:20 ` Florent Monnier
2013-12-19  5:27   ` Florent Monnier
2013-12-19  7:13   ` Daniel Bünzli
2013-12-19 12:38     ` Florent Monnier
2014-02-12 10:43 ` Daniel Bünzli

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=73BC433938F343F6B83AF31E2EC0D84F@erratique.ch \
    --to=daniel.buenzli@erratique.ch \
    --cc=caml-list@inria.fr \
    --cc=monnier.florent@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).