gildor changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | OCaml 3.12.1 http://bit.ly/nNVIVH
<_habnabit> you mean intnat *res_ptr ?
<_habnabit> pam returns a size_t *
<mrvn> _habnabit: yes.
<_habnabit> okay, thanks
<mrvn> _habnabit: typedef intnat value; so it doesn't matter. But I find it easier to read when you have all values tagged and all intnat not tagged.
<xenocons> tossing up between sml, ocaml and F# i think
<_habnabit> yeah, that makes sense
<mrvn> _habnabit: also consider adding caml_enter_blocking_section() / caml_leave_blocking_section() around the pam() call.
cyphase has joined #ocaml
<mrvn> _habnabit: I would even move the alloc_bigarray_dims() + Data_bigarray_val(res_bigarr) before the gsl_matrix_view_array() and use caml_enter_blocking_section() before caml_enter_blocking_section() () and caml_leave_blocking_section() before CAMLreturn
<mrvn> _habnabit: caml_enter_blocking_section() allows other threads to run in parallel.
<_habnabit> ah
<_habnabit> yeah, it probably won't matter since our application is entirely single-threaded
<_habnabit> but okay
<mrvn> till next month when you add threads ...
<_habnabit> unlikely; all our parallelism is done via forking
<_habnabit> or just mpi
* mrvn wants to write # let f x = let foo = external : int -> int = "foo" in foo x;;
Tobu has quit [Ping timeout: 260 seconds]
<_habnabit> there's no exception inheritance in ocaml, is there? I am so, so sick of Not_found :(
<_habnabit> (but there's already a pile of code that depends on Not_found getting raised from Map.find)
fantasticsid has joined #ocaml
iago has quit [Quit: Leaving]
Fullma has joined #ocaml
<adrien> OCAMLRUNPARAM="b" to get backtraces
<_habnabit> that's been in my .zshrc for a long, long time
<_habnabit> the issue is knowing _what_ wasn't found
KDr2 has joined #ocaml
NihilistDandy has quit [Ping timeout: 260 seconds]
Tobu has joined #ocaml
<adrien> ah
<xenocons> pippijn: hope you don't mind, ive been pasting the url round to ur parser :)
<xenocons> 'click viewsource man, prepare for mindblown'
Submarine has joined #ocaml
Submarine has quit [Changing host]
Submarine has joined #ocaml
<xenocons> pretty much, javascript parsing C to AST seems to blow minds
<xenocons> haha
<jimmyrcom> =O
<jimmyrcom> that js_of_ocaml thing sounds awesome
<jimmyrcom> I was thinking of going to this http://www.meetup.com/NYC-OCaml/events/53539402/ , but it's like 3 hours and NYC is expensive. I hope the thinkocaml book gets finished this year
Tobu has quit [Remote host closed the connection]
Tobu has joined #ocaml
avsm has quit [Quit: Leaving.]
Tobu has quit [Ping timeout: 272 seconds]
diego_diego has joined #ocaml
lihaitao has joined #ocaml
Tobu has joined #ocaml
Obfuscate has quit [Quit: WeeChat 0.3.5]
Obfuscate has joined #ocaml
NihilistDandy has joined #ocaml
NihilistDandy has quit [Ping timeout: 272 seconds]
Tobu has quit [Ping timeout: 260 seconds]
Tobu has joined #ocaml
Tobu has quit [Ping timeout: 260 seconds]
ftrvxmtrx has quit [Read error: Operation timed out]
ulfdoz has joined #ocaml
Submarine has quit [Ping timeout: 272 seconds]
Tobu has joined #ocaml
asdfhjkl has quit [Quit: Leaving]
ulfdoz has quit [Ping timeout: 276 seconds]
ftrvxmtrx has joined #ocaml
Tobu has quit [Ping timeout: 272 seconds]
diego_diego has quit [Quit: diego_diego]
diego_diego has joined #ocaml
Tobu has joined #ocaml
cdidd has joined #ocaml
ankit9 has joined #ocaml
jimmyrcom has quit [Ping timeout: 265 seconds]
pango is now known as pangoafk
ftrvxmtrx has quit [Quit: Leaving]
xaimus has joined #ocaml
emmanuelux has joined #ocaml
ftrvxmtrx has joined #ocaml
albacker has joined #ocaml
albacker has quit [Changing host]
albacker has joined #ocaml
diego_diego has quit [Quit: diego_diego]
Tobu has quit [Ping timeout: 272 seconds]
djcoin has joined #ocaml
Submarine has joined #ocaml
Tobu has joined #ocaml
skchrko has joined #ocaml
silver has joined #ocaml
cago has joined #ocaml
mnabil has joined #ocaml
KDr2 has quit [Ping timeout: 272 seconds]
ankit9 has quit [Quit: Leaving]
Cyanure has joined #ocaml
KDr2 has joined #ocaml
albacker has quit [Remote host closed the connection]
KDr2 has quit [Remote host closed the connection]
yroeht has quit [Ping timeout: 260 seconds]
KDr2 has joined #ocaml
yroeht has joined #ocaml
sgnb has quit [Remote host closed the connection]
KDr2 has quit [Remote host closed the connection]
thomasga has joined #ocaml
KDr2 has joined #ocaml
sgnb has joined #ocaml
avsm has joined #ocaml
avsm has quit [Quit: Leaving.]
Znudzon has joined #ocaml
andreypopp has joined #ocaml
flx_ has joined #ocaml
flux has quit [Ping timeout: 252 seconds]
flx_ is now known as flux
avsm has joined #ocaml
KDr2 has quit [Remote host closed the connection]
gildor has quit [Ping timeout: 260 seconds]
datkin has quit [Read error: Operation timed out]
_andre has joined #ocaml
ankit9 has joined #ocaml
datkin has joined #ocaml
datkin has quit [Ping timeout: 246 seconds]
ankit9 has quit [Quit: Leaving]
datkin has joined #ocaml
datkin has quit [Ping timeout: 245 seconds]
munga has joined #ocaml
munga has quit [Client Quit]
munga has joined #ocaml
Znudzon has quit [Ping timeout: 272 seconds]
lihaitao has quit [Quit: Ex-Chat]
Tobu has quit [Remote host closed the connection]
Tobu has joined #ocaml
skchrko has quit [Ping timeout: 246 seconds]
kaustuv has joined #ocaml
skchrko has joined #ocaml
jimmyrcom has joined #ocaml
datkin has joined #ocaml
smondet has joined #ocaml
Cyanure has quit [Remote host closed the connection]
munga has quit [Ping timeout: 244 seconds]
Tobu has quit [Ping timeout: 272 seconds]
Lor has joined #ocaml
<Lor> Any overbld users awake?
fantasticsid has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
diego_diego has joined #ocaml
Tobu has joined #ocaml
cdidd has quit [Remote host closed the connection]
cdidd has joined #ocaml
munga has joined #ocaml
diego_diego has quit [Quit: diego_diego]
kaustuv has left #ocaml []
Tobu has quit [Ping timeout: 272 seconds]
Tobu has joined #ocaml
diego_diego has joined #ocaml
andreypopp has quit [Quit: Computer has gone to sleep.]
skchrko has quit [Quit: ChatZilla 0.9.88.1 [Firefox 11.0/20120314111819]]
andreypopp has joined #ocaml
diego_diego has quit [Quit: diego_diego]
datkin has quit [Ping timeout: 272 seconds]
datkin has joined #ocaml
iago has joined #ocaml
<hcarty> mrvn: You could try ocamlbrew for all your custom OCaml building needs. It won't add a prefix/suffix to the executables, but it will put everything under an isolated directory.
<hcarty> thelema_: Is there a way to get the pid of a child process created with BatUnix.open_process_full?
<hcarty> thelema_: Or would I need to take the BatUnix/Unix code and create my own?
<thelema_> hcarty: probably not - you're welcome to make an improves open_process_full and send t to us for inclusion
<hcarty> thelema_: Ok, will do. I need to be able to kill the process - there doesn't seem to be a straightforward way to do that with the current implementation.
<thelema_> you'll have to get deeper into the interface than what we provide, then.
diego_diego has joined #ocaml
<hcarty> It looks that way, browsing through the code
<thelema_> Unless you really think that this ability/information is general purpose enough for more users
<hcarty> I'll dig into unix.ml
skchrko has joined #ocaml
<hcarty> Does anyone here know/have a guess about why the Unix.open_process* functions do not return the pid?
<d3z> Same reason they take a single string instead of a string and an array of strings, lack of foresight?
<d3z> OcamlNet's Shell module is much more useful.
<d3z> Sorry if that sounded harsh.
<d3z> Just frustration in the almost-general-enough-to-be-useful nature of the process code.
<hcarty> d3z: Thanks. I'll take a look at ocamlnet's Shell module. I forgot that exists...
<hcarty> d3z: Maybe a bit harsh, but also maybe a bit appropriate.
munga has quit [Quit: Ex-Chat]
Tobu has quit [Ping timeout: 272 seconds]
cago has quit [Quit: Leaving.]
<d3z> I just discovered Shell recently. With it, ocaml is actually reasonable to use for scripting-type tasks.
<d3z> The other thing I find myself having to work around is that input/output from Batteries doesn't support seeking.
<hcarty> My needs are fairly simple. I want to start a process, capture its output (stdout and stderr), killing the process if it takes too long to complete.
<hcarty> stdlib/Batteries provide all but the last component in an easy-to-use form.
<d3z> I haven't seen anything that provides that in an easy-to-use form.
<d3z> The libraries in other languages that do aren't usually very easy-to-use.
<hcarty> If open_process_full returned a pid along with the stdout/stdin/stderr I'd have everything I need.
<hcarty> I'm just a little concerned that there may be a good reason the pid is not returned from those functions.
<d3z> Shell_sys has an only slightly harder to use interface that gives access to the pid.
<chambart> hcarty: it depends on your notion of easy, but lwt provides what you need ( it is easy if you know lwt )
<d3z> It appears to provide exactly that, even, an optional timeout that kills the process if it takes too long.
<hcarty> chambart: I knew Lwt provided something, but I'm not sure if I'm ready to Lwt-ize my code yet :-)
<hcarty> chambart: That said, if it's easy enough to use and I can restrict its effect then I'm willing to give it a shot.
<hcarty> d3z, chambart: Thank you both
Tobu has joined #ocaml
<avsm> hcarty: Lwt, it's the only way to UNIX! :-)
zorun has quit [Read error: Operation timed out]
zorun has joined #ocaml
<hcarty> avsm: :-)
<hcarty> I keep looking for excuses to try Lwt for something other than a simple toy. Perhaps this will be that excuse.
<Lor> To be fair, lwt is just a hack to get around ocaml's lack of primitive lightweight threads.
silver has quit [Remote host closed the connection]
<Lor> But it's as good a hack as one can be.
<avsm> that's a bit unfair. It shows the language in quite a good light that concurrent threading can be built in pretty much pure ML
<mrvn> avsm: since when is lwt concurrent?
<Lor> avsm, that's not really news. One could also implement e.g. prolog-style backtracking with a similar monadic library.
<hcarty> Lor: What makes it a hack?
<avsm> Lor: who said it had to be novel to be useful? It exists, it's well written.
<Lor> avsm, I didn't dispute that.
<Lor> hcarty, just the fact that it doesn't integrate well with pre-existing code
diego_diego has quit [Quit: diego_diego]
<avsm> yeah, although I do find it quite useful to understand in complex systems code exactly what can potentially block, and what runs straight line
<Lor> That's an (accidental?) advantage, yes.
emmanuelux has quit [Quit: @+]
<chambart> Lor: It is now possible to wait for an Lwt thread in a classical OCaml thread (Lwt_preemptive.run_in_main). With that, it is possible to interract with non-lwt code
<chambart> ( it is in the darcs version, not yet released )
<Lor> Right. I hacked up something similar for my own purposes.
ftrvxmtrx has quit [Quit: Leaving]
err404 has joined #ocaml
Cyanure has joined #ocaml
thomasga has quit [Quit: Leaving.]
diego_diego has joined #ocaml
<pippijn> xenocons: that's ok
<pippijn> xenocons: any feedback?
diego_diego has quit [Quit: diego_diego]
diego_diego has joined #ocaml
diego_diego has quit [Client Quit]
avsm has quit [Quit: Leaving.]
ftrvxmtrx has joined #ocaml
djcoin has quit [Quit: WeeChat 0.3.2]
Znudzon has joined #ocaml
kaustuv has joined #ocaml
<hcarty> The Lwt solution is very short and simple, but the syntax is horribly ugly unless Lwt's syntax extension is used.
Cyanure has quit [Ping timeout: 240 seconds]
larsrh has left #ocaml []
snearch has joined #ocaml
Znudzon has quit [Remote host closed the connection]
iago has quit [Quit: Leaving]
pangoafk is now known as pango
Tobu has quit [Ping timeout: 272 seconds]
Tobu has joined #ocaml
albacker has joined #ocaml
albacker has quit [Changing host]
albacker has joined #ocaml
emmanuelux has joined #ocaml
<_habnabit> how can I tell ocamlfind to show what commands it will run?
<adrien> -verbose
<_habnabit> ah, thanks
<_habnabit> uggghhhh gcc :(
<mrvn> adrien: ever used git format-patch?
<adrien> mrvn: yes; several times actually
<adrien> (whenever I need to contribute to something not using git, I use that)
<mrvn> adrien: How come you didn't use it for extunix?
<adrien> mrvn: not me =)
<mrvn> ups, your nicks are too similar. :)
<adrien> :-)
<mrvn> I'm just looking at some bindings for fexecve(). Shouldn't that enter_blocking_section() before the exec?
skchrko has quit [Ping timeout: 246 seconds]
Znudzon has joined #ocaml
Cyanure has joined #ocaml
<kaustuv> Why does TypeRex have two entirely separate face families (ocp-face-* vs. typerex-font-lock-*)?
skchrko has joined #ocaml
kaustuv has left #ocaml []
Submarine has quit [Remote host closed the connection]
ulfdoz has joined #ocaml
snearch has quit [Quit: Verlassend]
_andre has quit [Quit: leaving]
ttamttam has joined #ocaml
Tobu has quit [Ping timeout: 260 seconds]
<d3z> I think it's for compatibility with people who have customized the faces. There are four choices for 'ocp-theme'.
<d3z> s/four/five/
<jonafan> i find ocsigen perplexing
ttamttam has left #ocaml []
avsm has joined #ocaml
ulfdoz has quit [Ping timeout: 244 seconds]
skchrko has quit [Quit: ChatZilla 0.9.88.1 [Firefox 11.0/20120314111819]]
emmanuelux has quit [Remote host closed the connection]
Tobu has joined #ocaml
iago has joined #ocaml
avsm has quit [Quit: Leaving.]
<pippijn> jonafan: why?
<jonafan> the documentation is bad
<jonafan> the site is bad
<jonafan> it seems to require javascript for every link
<jonafan> actually it works now. i don't know, but i had to reload every page after clicking a link before
err404 has quit [Quit: Ex-Chat]
Tobu has quit [Quit: No Ping reply in 180 seconds.]
Tobu has joined #ocaml
smondet has quit [Read error: Connection reset by peer]
<Lor> Any overbld users awake?
<xenocons> pippijn: ya, few people said it was awesome and 'wtf' lol
<xenocons> i haven't shown it to any parser nerds yet
Znudzon has quit [Ping timeout: 246 seconds]
cdidd has quit [Remote host closed the connection]
<_habnabit> okay is there any way to change the order of arguments that ocamlfind ocamlopt passes to the compiler? running into an issue with GNU ld where it needs the arguments in a slightly different order
<_habnabit> specifically if I can add `-lgsl` to the _end_ of the command passed to gcc, I'm goo
<_habnabit> d
ivan\ has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
Tobu has quit [Ping timeout: 260 seconds]
cyphase has quit [Ping timeout: 246 seconds]
<_habnabit> okay, well, I'm partway there
<_habnabit> putting -cclib -lgsl at the end of the ocamlfind command is good enough, but now I need to make ocamlbuild put it there too
<_habnabit> right now if I do `flag ["link"] (S[A"-cclib"; A"-lgsl"]);` then the -cclib -lgsl gets put too early
<_habnabit> (this is in After_rules, if it makes a difference)
ivan\ has joined #ocaml
Cyanure has quit [Remote host closed the connection]
cyphase has joined #ocaml