[Caml-list] Distinguish between osx and linux programmatically

2010-07-08 Thread Daniel Bünzli
Hello, Is there something in the standard library that allows me to distinguish between oxs and linux (Sys.os_type just returns Unix for both). Best, Daniel ___ Caml-list mailing list. Subscription management:

Re: [Caml-list] Distinguish between osx and linux programmatically

2010-07-08 Thread Alex
Hello, Is there something in the standard library that allows me to distinguish between oxs and linux (Sys.os_type just returns Unix for both). we had a similar problem, but finally (ab)used Ocamlbuild_pack.Ocamlbuild_Myocamlbuild_config.system and

Re: [Caml-list] Distinguish between osx and linux programmatically

2010-07-08 Thread Daniel Bünzli
On Thu, Jul 8, 2010 at 12:23 PM, Richard Jones r...@annexia.org wrote: How about running the external uname program. Yes, why not. I was hoping that I wouldn't have to resort to that kind of hacks, that I was missing a function using uname(3) directly. On Thu, Jul 8, 2010 at 12:48 PM, Alex

Re: [Caml-list] Distinguish between osx and linux programmatically

2010-07-08 Thread Richard Jones
On Thu, Jul 08, 2010 at 01:09:41PM +0200, Daniel Bünzli wrote: On Thu, Jul 8, 2010 at 12:23 PM, Richard Jones r...@annexia.org wrote: How about running the external uname program. Yes, why not. I was hoping that I wouldn't have to resort to that kind of hacks, that I was missing a

Re: [Caml-list] Distinguish between osx and linux programmatically

2010-07-08 Thread Romain Beauxis
Le jeudi 8 juillet 2010 06:44:34, Richard Jones a écrit : Stdlib could bind the uname(2) syscall, but it's legendary in its complexity. Seems more likely to cause problems than just calling out to the external program. I fail to see the complexity.. Where is it ? Such a function would also

Re: [Caml-list] adding a scripting language to an ocaml program

2010-07-08 Thread Mehdi Dogguy
On 08/07/2010 17:22, Thomas Fischbacher wrote: … if the interface is compatible (I didn't really check). I think so. Basically, I removed one function which never had worked anyway and added a number of new ones. Good. I had a quick look and noticed some changes for some type

Re: [Caml-list] Distinguish between osx and linux programmatically

2010-07-08 Thread Richard Jones
On Thu, Jul 08, 2010 at 10:42:40AM -0500, Romain Beauxis wrote: Le jeudi 8 juillet 2010 06:44:34, Richard Jones a écrit : Stdlib could bind the uname(2) syscall, but it's legendary in its complexity. Seems more likely to cause problems than just calling out to the external program. I

Re: [Caml-list] Distinguish between osx and linux programmatically

2010-07-08 Thread oliver
On Thu, Jul 08, 2010 at 06:01:24PM +0100, Richard Jones wrote: On Thu, Jul 08, 2010 at 10:42:40AM -0500, Romain Beauxis wrote: Le jeudi 8 juillet 2010 06:44:34, Richard Jones a écrit : Stdlib could bind the uname(2) syscall, but it's legendary in its complexity. Seems more likely to

RE: [Caml-list] Distinguish between osx and linux programmatically

2010-07-08 Thread David Allsopp
Oliver Bandel wrote: On Thu, Jul 08, 2010 at 06:01:24PM +0100, Richard Jones wrote: On Thu, Jul 08, 2010 at 10:42:40AM -0500, Romain Beauxis wrote: Le jeudi 8 juillet 2010 06:44:34, Richard Jones a écrit : Stdlib could bind the uname(2) syscall, but it's legendary in its complexity.

Re: [Caml-list] Distinguish between osx and linux programmatically

2010-07-08 Thread oliver
On Thu, Jul 08, 2010 at 01:09:41PM +0200, Daniel Bünzli wrote: On Thu, Jul 8, 2010 at 12:23 PM, Richard Jones r...@annexia.org wrote: How about running the external uname program. Yes, why not. I was hoping that I wouldn't have to resort to that kind of hacks, that I was missing a

Re: [Caml-list] Distinguish between osx and linux programmatically

2010-07-08 Thread Romain Beauxis
Le jeudi 8 juillet 2010 12:01:24, Richard Jones a écrit : Actually I misunderstood the link I posted (http://www.kernel.org/doc/man-pages/online/pages/man2/uname.2.html#NOTES) thinking it meant that the string fields in the structure could have variable width. Reading it again, they don't.

[Caml-list] C9 video on monads and coordinate systems Monadic Design Patterns for the Web workshop announcement

2010-07-08 Thread Greg Meredith
Dear CamlRiders, You may be interested in this video i did with Brian Beckmanhttp://channel9.msdn.com/shows/Going+Deep/E2E-Whiteboard-Jam-Session-with-Brian-Beckman-Greg-Meredith-Monads-and-Coordinate-Systems/ on monads, location and coordinate systems. Also, let me take this opportunity to

Re: [Caml-list] Distinguish between osx and linux programmatically

2010-07-08 Thread Török Edwin
On Thu, 8 Jul 2010 17:22:15 + David Allsopp dra-n...@metastack.com wrote: Oliver Bandel wrote: On Thu, Jul 08, 2010 at 06:01:24PM +0100, Richard Jones wrote: On Thu, Jul 08, 2010 at 10:42:40AM -0500, Romain Beauxis wrote: Le jeudi 8 juillet 2010 06:44:34, Richard Jones a écrit :

[Caml-list] ocaml for embedding

2010-07-08 Thread Gaspard Bucher
Hi List ! I'm writing an open source signal processing tool (mainly used for art projects). Basically objects are connected together through slots and send values to each other. Currently, objects are either C++ classes or Lua scripts that can be edited live (live coding), but the API is

[Caml-list] Native code stack overflow detection guarantees

2010-07-08 Thread Michael Ekstrand
Some time ago, I saw someone mention non-tail-recursive functions in native code as a security problem. Unfortunately, I cannot find where I read that again, but the basic idea was that, if you have a recursive function that uses stack linear in user-provided input, then the user can trigger a