I recently spent several days improving the OCaml FreeTDS C bindings for work, and I thought it might be useful to share the problems I ran into and how to solve them.

I tried to order things so the most likely issues are listed first, but if you're trying to debug some C binding crashes, I recommend just reading the whole thing.

This post will assume you're already familiar with the official documentation.

Read more

This is a short post to document an issue we ran into at work so it will show up in search results for people who have this problem in the future.

  • Use FreeTDS 1.0 if you can.
  • If you're stuck on FreeTDS 0.91 (and possible other pre-1.0 versions), don't use any TDS version above 7.0.

Read more

From a non-theoretical engineer perspective, a monad is a kind of container that you can apply functions to to get a new monad. In particular, you need a way to put something into your monad and a way to apply changes to it. These are called return and bind. There is also a third operation, map, which is a combination of the two. Note that monads are allowed to be empty, which will make bind and map not do anything; and they can also contain more than one thing (in which case bind and map will call the function you give them more than once and merge the results).

Read more

Page 1 / 10 »