copy` has quit [Quit: Connection closed for inactivity]
noddy2OOO has joined #ocaml
nicoo has joined #ocaml
zirman has joined #ocaml
unbalanced has joined #ocaml
ryanartecona has quit [Quit: ryanartecona]
ryanartecona has joined #ocaml
kakadu has quit [Remote host closed the connection]
jlongster has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
unbalanced has quit [Ping timeout: 252 seconds]
jlongster has joined #ocaml
<Algebr>
Would it make sense to Marshal a closure, push it over a pipe and have a child process exec it?
jlongster has quit [Ping timeout: 260 seconds]
sh0t has joined #ocaml
<Algebr>
hmm, it does work....now I wonder what about mixing with lwt
seangrove has quit [Ping timeout: 260 seconds]
seangrove has joined #ocaml
ryanartecona has quit [Quit: ryanartecona]
Simn has quit [Quit: Leaving]
silver_ has quit [Quit: rakede]
unbalanced has joined #ocaml
malina has joined #ocaml
fraggle_ has quit [Ping timeout: 260 seconds]
fraggle_ has joined #ocaml
<mfp>
Algebr: yes, there's no problem marshalling closures as long as the processes have identical code (in practice, one of them being fork()ed). Preemptive caveat: do not try to pattern match against marshalled exceptions (they won't match even when it seems they should). In practice, you'll want to either use exns after conversion to string form or use a sum type like the standard result type.
zirman has quit [Remote host closed the connection]
zirman has joined #ocaml
al-damiri has quit [Quit: Connection closed for inactivity]
<mfp>
also Algebr> I guess the stdlib doesn't expose the number of cores on the machine, don't see anything in sys or unix IIRC it's available in extunix
noplamodo has quit [Remote host closed the connection]
pon1980 has joined #ocaml
calculemus has quit [Ping timeout: 246 seconds]
<Algebr>
mfp: any hints why that code sample gives duplicates
<mfp>
Algebr: reading it
noplamodo has joined #ocaml
<mfp>
Algebr: Lwt_io.printl does not flush the channel, does it?
<mfp>
so the child inherits the buffer with the Parent pid: xxxx stuff and then writes it again
<Algebr>
Oh I think there was a mention to do flush in lwt docs, will try now
<mfp>
and if it does flush, you're not waiting for that anyway
<mfp>
since Lwt.ignore_result
<mfp>
works here if you open Lwt and then |> Lwt_io.printl >>= fun () -> Lwt_io.flush Lwt_io.stdout >>= fun () ->
<Algebr>
hmm, I get inconsistent results, sometimes 3 lines printed out, sometimes 4
<mfp>
to flush and wait for the write to finish
<Algebr>
I added Lwt_io.flush_all () |> Lwt.ignore_result; in between the fork and the pipe
<mfp>
if you Lwt.ignore_result you'll get a race condition
<Algebr>
why
<Algebr>
I need that explicit sequenceing of the bind I take it
<mfp>
by the time you fork the flush might not be done if you don't bind
<mfp>
it's rather weird that the pipe is not ready to be written right away when created, but if you don't sequence explicitly it's sort of behaving according to specs
zirman has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
<Algebr>
okay, now working as expected, thank you very much
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
<mfp>
np
<mfp>
Algebr: btw on further thought, you probably want to use, say, a unix domain socket created in the parent process and multiple children accepting on it -- this way you can easily do recursive task decomposition in children
<Algebr>
What do you mean by recursive task decomposition? So I fork say n number, each child does an accept on the socket?
<mfp>
yes
<mfp>
that way you can lwt_parallel (or however you call the ('a -> 'b Lwt.t) -> ('a -> 'b Lwt.t) function) in the workers too
wu_ng has joined #ocaml
<mfp>
with pipes, you'd have to have the children inherit all the pipes, plus have the code to schedule to another worker (which might happen to be busy)
<Algebr>
but if every child accepts the socket then how do I give tasks to specific processes
<Algebr>
and lwt_parallel, are you taking about the separate ocaml package?
<mfp>
you want to make the workers stateful?
<mfp>
I mean the (made up) name of the ('a -> 'b Lwt.t) -> ('a -> 'b Lwt.t) I assumed you were making
<mfp>
if you want to dispatch to a specific worker, it'll be different of course
<Algebr>
I want to have one master process with 8 subprocesses. Each subprocess gets a Queue.t of jobs to do, the jobs come up in the master process and then I push from the master to each of the Queue.t, with some simple load balancing. I want each of the 8 subprocesses to be checking their respective Queue.t and doing the queue if there is any to do
<mfp>
and you need to be able to bind tasks to a specific process?
<Algebr>
only insofar as I give tasks to the processes with the least sized Queue
<Algebr>
Maybe there's a better way to organize this
<mfp>
I think the accept() approach is close to optimal regarding load balancing: a process busy computing won't let the Lwt engine check for new events, so it doesn't accept; only processes that would otherwise be idle (waiting for I/O or whatever) accept
zirman has joined #ocaml
<mfp>
works for e.g. nginx, should work for dispatching tasks
<mfp>
plus subprocesses can themselves decompose the task further, send subtasks to other processes (via the shared socket) and compute the rest themselves
<ocaml368>
Naive means ? Learning this. It is recursion and doesn't mutate. But no patterns. Does that make it less functional ?
<ocaml368>
You mean not succint
<ocaml368>
I get the point about the loop though.
<Armael>
it is not efficient
<companion_cube>
ocaml368: no, I was speaking about algorithmic complexity :-)
<companion_cube>
you make `n` recursive calls in the loop, each of which calls `List.length`
<ocaml368>
Aren't things like that optimized away by the compiler ?
seangrove has joined #ocaml
whisperedcigar has joined #ocaml
govg has joined #ocaml
<companion_cube>
in this particular case, maybe, but I'm not sure
<companion_cube>
it would not correct to "optimize" it if length had side effects, for instance
seangrove has quit [Ping timeout: 246 seconds]
whisperedcigar has quit [Ping timeout: 245 seconds]
<ocaml368>
Right. I was mainly trying to think functionally.
freusque has quit [Quit: WeeChat 1.4]
<companion_cube>
ah! well depends whether you do this for learning, or for using the function afterwards :)
wu_ng has quit [Ping timeout: 264 seconds]
ygrek_ has quit [Ping timeout: 245 seconds]
govg has quit [Ping timeout: 240 seconds]
ziyourenxiang has joined #ocaml
govg has joined #ocaml
mfp has joined #ocaml
ziyourenxiang has quit [Max SendQ exceeded]
dhil has joined #ocaml
ziyourenxiang has joined #ocaml
BitPuffin|osx has joined #ocaml
_andre has joined #ocaml
AlexRussia has joined #ocaml
malina has quit [Ping timeout: 265 seconds]
vicfred has quit [Quit: Leaving]
malina has joined #ocaml
malina has quit [Remote host closed the connection]
<Algebr>
Okay it seems like magic to me, how does Marshaling of closures even work
<flux>
one big part of the magic is knowing that both ends are the same binray
<Algebr>
go on, magician
<flux>
I guess after the environment is marshalled as usual and it just works?-)
<flux>
s/after/after that/
<flux>
meaning the actual code is just marshalled as a pointer.
<Armael>
I thought marshalling raises an exception on functional values
<Armael>
does it not with 4.04?
whisperedcigar has joined #ocaml
<flux>
there's a magic flag to allow marshalling them
<flux>
been there since I remember
<Armael>
ah, right
<flux>
but it requires the same binary to do both marshalling and unmarshalling
<flux>
enforced by checksums
<flux>
and, failing that, segmentation faults ;)
<Armael>
makes sense
govg has quit [Ping timeout: 245 seconds]
whisperedcigar has quit [Ping timeout: 245 seconds]
govg has joined #ocaml
<Algebr>
grr, I want to make 5 subprocess in a loop but then for the child I want to get out of the loop, need to raise an exception, no cleaner way...?
seangrove has joined #ocaml
<flux>
well, there's the Pervasives.Exit exception made for you, if it makes you feel better :)
S11001001 has quit [Ping timeout: 258 seconds]
JSharp_ has joined #ocaml
stephe_ has joined #ocaml
grandy_____ has joined #ocaml
seangrove has quit [Ping timeout: 248 seconds]
emmanueloga_ has joined #ocaml
stephe has quit [Ping timeout: 258 seconds]
JSharp has quit [Ping timeout: 258 seconds]
MorTal1ty_ has joined #ocaml
stephe_ is now known as stephe
JSharp_ is now known as JSharp
AltGr has quit [Ping timeout: 258 seconds]
emmanueloga has quit [Ping timeout: 258 seconds]
emmanueloga_ is now known as emmanueloga
AlexRussia has quit [Ping timeout: 248 seconds]
bigs_ has quit [Ping timeout: 258 seconds]
M-martinklepsch has quit [Ping timeout: 258 seconds]
MorTal1ty has quit [Ping timeout: 258 seconds]
grandy____ has quit [Ping timeout: 258 seconds]
grandy_____ is now known as grandy____
MorTal1ty_ is now known as MorTal1ty
M-pesterhazy has quit [Ping timeout: 258 seconds]
<Algebr>
just extra annoying with lwt
<Algebr>
actually not that bad with the syntax extensions
FreeBirdLjj has joined #ocaml
M-martinklepsch has joined #ocaml
M-pesterhazy has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 260 seconds]
freusque has joined #ocaml
jun has joined #ocaml
govg has quit [Ping timeout: 258 seconds]
BitPuffin|osx has quit [Remote host closed the connection]
freusque has quit [Quit: WeeChat 1.4]
<jstolarek>
I'm getting a compilation warning
<jstolarek>
"implicit elimination of optional arguments"
<jstolarek>
how do I silence that warning?
<jstolarek>
ie. can I explicitly eliminate optional arguments?
<companion_cube>
-w -48
<companion_cube>
or the same in _tags, …
dhil has quit [Ping timeout: 245 seconds]
<jstolarek>
sorry, I was imprecise
<jstolarek>
I don't want to turn that warning off in general
<jstolarek>
I just have a place in code where I know this is done intentionally and that this is fine to do
<jstolarek>
I'd like to modify the code there so that the warning is not triggered
<jstolarek>
but I still want compiler to check for such things
<Drup>
jstolarek: you can either pass none explicitely: foo ?bar:None
<Drup>
or eta expand : (fun x -> foo x)
<companion_cube>
unrelated, but qtest release in progress!
seangrove has joined #ocaml
<jstolarek>
Drup: that's what I needed. Thanks!
silver has joined #ocaml
AlexRussia has joined #ocaml
seangrove has quit [Ping timeout: 245 seconds]
janmi has joined #ocaml
orbifx-m has joined #ocaml
BitPuffin|osx has joined #ocaml
<orbifx-m>
What's the internal representation of negative numbers in ocaml?
<orbifx-m>
Two's complement?
<orbifx-m>
L
<rixed>
same as >0 integers IIRC: shifted one bit left.
Algebr has quit [Remote host closed the connection]
shinnya has joined #ocaml
timclassic has quit [Quit: Client limit exceeded: 5000]
fraggle_ has joined #ocaml
zirman has joined #ocaml
<orbifx-m>
?
<orbifx-m>
Any documentation
copy` has joined #ocaml
<companion_cube>
the series of blog posts on ocaml internals by RW jones is very nice
<companion_cube>
a bit outdated w.r.t optimization nowadays, maybe
whisperedcigar has quit [Ping timeout: 245 seconds]
whisperedcigar has joined #ocaml
FreeBirdLjj has joined #ocaml
<grayswandyr>
hi I wonder if the following is "easily" doable in OCaml: (1) I'd like to define a type for a logic (in practice: LTL) that contains pure propositional logic, and I'd like to be able to distinguish purely propositional formulas from full-LTL formulas. I guess I'd have a 'a fml GADT with 'prop fml' and 'ltl fml' formulas
<grayswandyr>
(2) but then I also want to define *one* and_ function that takes two formulas and yields a prop fml if both arguments are prop fml, and ltl fml otherwise. This seems harder to me
FreeBirdLjj has quit [Ping timeout: 240 seconds]
<grayswandyr>
(to simplify thing. the _ fml type may contain a True consructor of type prop fml, Next that yields a ltl fml whatever its argument and (I guess) two constructors AndT and AndP yielding (resp) ltl fml and prop fml)
zirman has quit [Remote host closed the connection]
seangrove has joined #ocaml
<thizanne>
grayswandyr: you might be able to do that with polymorphic variants but i guess it would involve some kind of subtyping which doesnt work well with gadt
whisperedcigar has quit [Ping timeout: 245 seconds]
<grayswandyr>
thizanne: yes I thought about this but I didn't succeed...
<Drup>
grayswandyr: I guess you have operation that work only on prop fml. Do you also have operation that work only on ltl fml ?
<grayswandyr>
Drup: let me think
<grayswandyr>
I don't think so
<Drup>
in that case, polymorphism is your savior
seangrove has quit [Ping timeout: 250 seconds]
<grayswandyr>
let me see
<Drup>
grayswandyr: do you have a small code example that I can tweak to show you ?
<grayswandyr>
well fro the type here is what I currently have, and obvisouly it's not ok:
<grayswandyr>
type 'a fml = | True : p fml | Next : _ fml -> t fml | AndP : p fml * p fml -> p fml | AndT : _ fml * _ fml -> t fml
<grayswandyr>
(p is prop, t is ltl/time)
bigs_ has joined #ocaml
<grayswandyr>
I'd like to avoid AndT taking two p fml
<grayswandyr>
at least one of them should be t fml
S11001001 has joined #ocaml
<grayswandyr>
(notice that I would be far happuer to even hacve only one And contsructor)
<grayswandyr>
then I'd like to write a "smart constructor" and_ for AndP and AndT
<Drup>
prop formulas are polymorphic, t formula are monomorphic. If you want to operate only on t formulas, you constraint the type.
<Drup>
(You can do the opposite too, if you prefer. Depends on what operation you want)
loocash has joined #ocaml
<Drup>
The issue is that you can only do one kind of constraint. This prevents you to express the opposite. Also, you can't define global constant polymorphic formulas because of value restriction.
<grayswandyr>
thanks, unfortunately And shouldn't be polymorphic
<Drup>
grayswandyr: what do you mean ?
<grayswandyr>
Anf of two prop fml is prop fml, but if at least one argument is ltl fml the resulting type should be ltl fml
<Drup>
Yes, that's what this will do
<grayswandyr>
oops
<grayswandyr>
ok I was confused by the type for And
<grayswandyr>
so how would I write a function that only works on formulas that are *not* t fml
<grayswandyr>
it's not possible I guess, this is what you meant above
<Drup>
grayswandyr: I wrote that at the end
<grayswandyr>
yeah
<Drup>
(in the 2nd version)
<Drup>
since p ≠ t, the typechecker figures it out. You really need to expose the constructor T and P in your .mli to show that the types are different.
<thizanne>
grayswandyr: what is not possible with this solution is writing functions that only work on formulas that are not p fml
<thizanne>
(like a function that only works on Next)
pierpa has joined #ocaml
<thizanne>
(well you can write it with an assert false in the True case, but the match exhaustivity checker will need that True case)
<Drup>
Exactly.
nomicflux has joined #ocaml
<thizanne>
grayswandyr: the types works by saying "True can be anything, Next is necessarily ltl, And preserves the nature of the operands"
<grayswandyr>
ok thank you. I had sorted out almost the same thing, the difference being that I had written: True : p fml instead of _ fml
dhil has quit [Quit: Quit]
<thizanne>
so if you have a p fml, you know that there cannot be any Next in the tree of ands (because then the t parameter would have propagated to the top)
<grayswandyr>
yep
<thizanne>
but you cant express with that type the property "this formula does have a Next somewhere"
<Drup>
Yeah, the trick is to leverage polymorphism as a property by itself
jnavila has quit [Ping timeout: 256 seconds]
<grayswandyr>
I think I was trying to use some sort of subtyping saying that p <: t and hence True : p fml would entail True : t fml when needed
<thizanne>
that's what I was trying to do with poly variants
<thizanne>
problem is, subtyping and gadt do not play well together
<thizanne>
(that's why Drup wasnt happy)
<grayswandyr>
yeah I did the same and couldn't heave my code correctly typed
<grayswandyr>
It would be cool to see some blogger (e.g. Drup :-) ) explaining in layman terms how to devise GADT-based code out of a semi-formal specification more or less written in a fragment of FOL=
<grayswandyr>
Drup: your post about diff lists is already a bit harder as it features existentials
<Drup>
I'm, unfortunatly, a very poor logician. I just did enough OCaml program to rediscover some commonly known tricks
dhil has joined #ocaml
sepp2k has joined #ocaml
<grayswandyr>
said otherwise, as an occasional OCaml programmer (it's not my main job), I often feel there is some GADT trickery possible but can't succeed in doing doing it
<Drup>
That particular trick would make an amusing post, though. I would need to find a bigger example
<grayswandyr>
and the eternal 'a expr example doesn't help that much
<grayswandyr>
my real example is the following one:
<grayswandyr>
I generate some code for nusmv/nuxmv
<grayswandyr>
some generated code should go int the LTL specification area that SMV defines
<grayswandyr>
and some other code should go in the invariant section
<grayswandyr>
but a formula in the invariant section shouldn't contain temporal connectives
<grayswandyr>
and I write only one generation function
freusque has joined #ocaml
<grayswandyr>
so I need to track whether the generation function yields a prop fml (suitable for invariant) or ltl fml
<Drup>
I see
<grayswandyr>
of course I could do this with additional dynamic verifications
<grayswandyr>
but this doesn't feel right :)
dhil has quit [Ping timeout: 252 seconds]
agarwal1975 has joined #ocaml
FreeBirdLjj has joined #ocaml
maattdd has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 260 seconds]
FreeBirdLjj has joined #ocaml
seangrove has joined #ocaml
dhil has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 246 seconds]
seangrove has quit [Ping timeout: 250 seconds]
shinnya has quit [Ping timeout: 250 seconds]
vramana has quit [Remote host closed the connection]
mfp has quit [Ping timeout: 260 seconds]
<jstolarek>
What is the meaning of this warning:
<jstolarek>
"the following private methods were made public implicitly"
<jstolarek>
The listed methods are decalred as private
<jstolarek>
and I don't understand why are they made public
jao has joined #ocaml
Mercuria1Alchemi has quit [Ping timeout: 246 seconds]
unbalanced has joined #ocaml
MercurialAlchemi has joined #ocaml
lopex has quit [Quit: Connection closed for inactivity]
<Flerex>
I've defined a function "time" and I've also set "open Unix", now the compiler thinks that when I call "time" I'm trying to use Unix.time. Is there any way to solve this?
kamog has joined #ocaml
<thizanne>
Flerex: yes, do not open Unix :)
<Flerex>
hahaha
<Flerex>
But I have to, because I also need the function time
<def`>
just type Unix.time
<thizanne>
^
<Flerex>
Oh, I see.
<Flerex>
Thanks!
<thizanne>
you can do `module U = Unix` if four letters are too much for you
<thizanne>
(and then U.time)
<Flerex>
hahaha okay
<companion_cube>
it's a nice feature imho
<flux>
you can also open modules locally
<flux>
let my_function arg = let open Unix in ..
<Flerex>
I'm having a working with this snippet of code:
<Flerex>
But I realized that that's gonna update the clock every 5 min since the moment you opened the clock, not every 5 minutes by the current time
zpe has quit [Remote host closed the connection]
zpe has joined #ocaml
<flux>
so the solution is to take current unix epoch time, and use ie. sleep (300 - epoch_time % 300)
<flux>
except for some inconveniences such as epoch time being a float
zpe has quit [Ping timeout: 250 seconds]
<Flerex>
I'm thinking:
whisperedcigar has joined #ocaml
<Flerex>
The loop is not gonna let me write any other commands in the top level and the clock is supposed to be closed with the close_clock function. Is there any other way without using a loop, flux ?
<flux>
well, you can use the Thread module
<flux>
or you can use a thread-like system such as Lwt
johnf_ has quit [Read error: Connection reset by peer]
<Flerex>
o.O
<Flerex>
Imma check that module, but judging by the name I think our professor didn't want us to use that
<flux>
probably not.
<flux>
the Thread module comes with OCaml, though
<octachron>
Flerex: more simply, did you have an exit condition, e.g. print the time for 15 minutes, wait for a keyboard input ?
<Flerex>
octachron No, the only way to close the clock should be close_clock. What's strange is that the only library they talk about is the Graphics library.
<Flerex>
Even tho I guess that won't matter, as we needed the Unix library for the time.
jao has joined #ocaml
<Flerex>
flux can thread be used on the toplevel?
<octachron>
Flerex: just to be sure "close_clock" is a function that you have defined yourself?
<octachron>
and not a message from the exterior environment
<Flerex>
Our professors did, it's this one:
<Flerex>
let close_clock () = close_graph ();;
<octachron>
ok, this means that you need to define a exit condition for your loop
<octachron>
otherwise, "looping from all eternity and call close_clock after the end of eternity" is not going to work
<Flerex>
Yeah, but what they expect us to do is to write in the top level "open_clock", and then a new window would appear with the clock. When you want to close it, you would write again in the top level "close_cock"
johnf_ has joined #ocaml
<flux>
and the window would update?
<flux>
or would it just draw itself once?
noddy2OOO has quit [Ping timeout: 240 seconds]
<flux>
if it would update, I think using the Thread-module is unavoidable. however, I would imagine you would have been taught about those if they were thought to be used..
infinity0 has quit [Ping timeout: 258 seconds]
<Flerex>
Yes, it would update
<Flerex>
I'm gonna send my professor an email just to clarify all of this
<Flerex>
Thank you and sorry
infinity0 has joined #ocaml
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 265 seconds]
octachron has quit [Quit: Page closed]
rwmjones|hols has quit [Ping timeout: 240 seconds]
rwmjones has joined #ocaml
whisperedcigar has quit [Ping timeout: 245 seconds]
lopex has joined #ocaml
zpe has joined #ocaml
nathanielc has quit [Quit: ZNC 1.6.3 - http://znc.in]
whisperedcigar has joined #ocaml
zpe has quit [Ping timeout: 248 seconds]
jnavila has joined #ocaml
kakadu has quit [Quit: Konversation terminated!]
<mfp>
I'm getting ~40us overhead for task parallelization overhead with the "accept race" pattern -- around ~5x slower than Lwt_preemptive.detach, but over 10x faster than lwt-parallel as far as I could benchmark (parallel crashed with EMFILE after a few hundred iterations of the bm loop leaving lots of processes around)
<Drup>
mfp: that would make a nice library (or a new module in lwt)
DemiMarie has joined #ocaml
ygrek_ has joined #ocaml
<Drup>
how plateform specific is it ?
<DemiMarie>
Thoughts on raw pointer support? Would you use it?
<mfp>
Drup: it uses fork, so no win32 (could be adapted to execve the workers though, would need to take over cmdline parsing). Also unix domain sockets, but could use regular TCP sockets as well.
<mfp>
the create socket, fork repeatedly, accept concurrently in children idiom should work pretty much everywhere unix-ish enough, it's what nginx or apache do
<Drup>
aantron: ^
<aantron>
already looking :)
<Drup>
:]
<mfp>
aantron: lines 24 to 138, the rest is latency + trivial fib benchmarking
<Drup>
DemiMarie: I value the fact that ocaml can't cause segfaults (without Obj.magic) is more valuable.
<aantron>
i prefer a separate library, as im already pretty stressed out from dealing with what is in lwt now. unless mfp wants to sign up as a co-maintainer :)
<mfp>
separate lib sounds better to me too :)
<Drup>
blarg, grammar, you get the point :p
<aantron>
however i would be willing to support it in various ways, e.g. if you need some new api or modification to the internals
<aantron>
and/or link to it in the hypothetical list of related libraries
<Drup>
having two libs like that mean that every user will wonder which one should be used
<Drup>
(and your is basically a straigh improvements, afaics)
<mfp>
also I wonder if there's something to Parallel I don't get, I mean it fails badly when I essentially try to call Parallel.run Lwt.return () more than ~500 times
<mfp>
leaves a ton of processes around that don't even show up in top
<mfp>
I think so, doesn't it by default on Linux
<aantron>
yes, that's right
<mfp>
was there some function to know in Lwt_engine or something?
<aantron>
afaik there is Lwt_sys.have, which just tells you if libev support is compiled in
<mfp>
have `libev;; - : bool = true
<aantron>
you might be able to do something with Lwt_engine.get to find out if its actually being used. i havent done much with Lwt_engine yet
<aantron>
i usually just looked at the configure output but obviously you'd have to reinstall lwt for that and look at the verbose log :) i just happen to do that all the time while developing
<mfp>
I always believed the select engine would be better than the libev one with few (enough) fds (because fewer syscalls being used than with epoll)
<mfp>
but everyonce in a while I read about people complaining about the select engine and recommending the libev one
<aantron>
lwt has a way to know, using the Lwt_config, but i believe this module is internal
<aantron>
-the* Lwt_config
tane has quit [Ping timeout: 250 seconds]
<mfp>
aantron: I think there's probably some merit in having something to get the number of cores in Lwt_unix/Lwt_preemptive or such (with different stubs for unix and win32). Having a full lib for a single tiny stub function sounds overkill
<mfp>
using sysconf on unix and whatever win API there is
<aantron>
yeah, agreed. PRs very welcome :) we now have CI on linux, os x, and win32 too btw, so it should be relatively easy to test on windows. you can even RDP into it and develop inside appveyor VMs if you need to (i've done this..)
ryanartecona has quit [Quit: ryanartecona]
noddy2OOO has joined #ocaml
tane has joined #ocaml
smondet has joined #ocaml
jao has quit [Ping timeout: 268 seconds]
tane has quit [Client Quit]
<aantron>
i wrote a reddit scraping bot. it probably violates the reddit TOS. any interest in forwarding messages from it to IRC? :p
<aantron>
(talking about /r/ocaml of course)
Dohxis has joined #ocaml
_andre has quit [Quit: leaving]
<Dohxis>
Hello I am a newbie here. Not sure if this is a good place to ask, but maybe someone could help me where to start learning OCaml?