ChanServ changed the topic of #ocaml to: Discussions about the OCaml programming language | http://www.ocaml.org | OCaml 4.02.1 announcement at http://ocaml.org/releases/4.02.html | Public channel logs at http://irclog.whitequark.org/ocaml
palomer has joined #ocaml
seanmcl has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
javamonn has joined #ocaml
mengu has quit [Remote host closed the connection]
<apache2> what does this error mean: "Error: This expression has type mytype, but an expression was expected of type mytype. The type constructor mytype would escape its scope"
<apache2> I'm doing: let c = Hashtbl.find colors color in List.hd c.blue
<apache2> apparently it has a problem with c.blue
<Drup> show the various type definition involved
nojb has joined #ocaml
struktured has joined #ocaml
jonludlam has quit [Ping timeout: 245 seconds]
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
tsumetai has joined #ocaml
nojb has quit [Quit: nojb]
tsumetai` has quit [Ping timeout: 264 seconds]
javamonn has quit [Remote host closed the connection]
ygrek has quit [Ping timeout: 252 seconds]
javamonn has joined #ocaml
rgrinberg has joined #ocaml
dhil has quit [Quit: Leaving]
shinnya has quit [Ping timeout: 256 seconds]
<Algebr> I'm really confused, I have something that expects a format string apparently and I'm giving it a plain string, now I'm getting this error http://pastebin.com/WTp6cW02, which makes no sense to me...I've trying wrapping it in a sprintf to no avail as well
seanmcl has joined #ocaml
<Drup> show the code.
<Algebr> let f = "hello" in if Log.Global.level () = `Debug then Log.Global.debug f;
<Drup> not surprising, just inline f
<Algebr> I can't do that
<cmtptr> I bet I can
<Algebr> Is there no way to turn a string variable into a format string?
<Drup> Algebr: let f : _ format6 = ....
<Algebr> right, but I still need to use f as a string later on..
<Algebr> Is there something that copies results?
palomer has quit [Quit: palomer]
curiosity has quit [Quit: Leaving]
<Drup> ok, I have a better proposition for you
<Drup> Log.GlobaL.debug "%s" f
<Drup> formats are not string
<Algebr> WAT!
<Algebr> That works
<Algebr> why, how
<Drup> the compiler happen to do gross magic to make it look like they are the same
<Drup> but they are not
<Algebr> this is ridiculous
seanmcl has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Drup> what is ridiculous ?
<Drup> "%s" is the format expecting a string argument
<Algebr> that you can make a format string like that on the fly
djellemah_ has joined #ocaml
<Drup> well, I use them quite often and %s is rather frequent ...
<Drup> (or I don't understand your remark)
<Algebr> thank you Drup, this is like magic to me.
<struktured> I think he's happy about but perplexed
<struktured> *about it
<struktured> Obj.magic magic
hugomg has joined #ocaml
djellemah has quit [Ping timeout: 265 seconds]
<struktured> just wondering out loud...could a ppx solution be equally as powerful as printf?
<cmtptr> Algebr, having a non-literal format string is sketchy anyway because it dictates the number of arguments the function expects
<cmtptr> I have no clue how it works in ocaml, but in C it uses varargs and that would be a good way to write some really terrible bugs
<Algebr> I'm familiar with varargs, but ocaml format strings still are a mystery to me
<Algebr> Anyway, are there any easy way to making strings that colorize the output on terminal?
<Algebr> without having to use lambaterm..
<Drup> Algebr: ansicolor
<Drup> (but lambda term is cool :D)
<Drup> cmtptr: in OCaml, it's currently done with GADT
<Drup> so it's completely typed and the "variadic" behavior is proved correct by the type checker.
<cmtptr> neat
<Drup> the only fishy part is that formats look like strings despise being something quite different. And the compiler actually do some magic "if I have type constaints on a string literal to make it a format, I transform it at compile time"
<Algebr> So if something uses Lwt and you want to use Async, then you can't use that library basically right?
<Drup> indeed
<Drup> (just use lwt :p)
<Algebr> lol
<struktured> Algebr: yeah it's very frustrating. I'm dealing with that problem right now. I am using async but trying to funtorize it out enough that I could swap in other monadic style (concurrency) frameworks without too much code duplication.
<rgrinberg> struktured: pick one for your actual app and if wants a port he can help you out
<rgrinberg> but yeah, have a good reason to use async over lwt
<struktured> I was thinking I can write my own monad signature, functorize out a few basic concurrency esqu operations
<struktured> then plugin whatever to make different versions of the lib, as needed.
<rgrinberg> struktured: how do you know you will need an async port?
wraithm has quit [Quit: leaving]
<struktured> I already have an async port, somewhat :). I need a concept of concurrency in the library itself, although I could simulate it with RNG. I also am probably going to use a riakc client based on async for some important bits. Those two reasons were enough for me
<rgrinberg> ok then how do you know you need an lwt port :)
andreypopp has quit [Quit: Connection closed for inactivity]
<struktured> well I want to share my library with europeans
<struktured> thats all :)
<rgrinberg> let them ask for it first :P
<struktured> I am also genuinely interested in coming up with a reasonable strategy for generating async and lwt implementations from one code base, on any project which might need it.
<struktured> finally, I acutally don't like sexp error handling. I refuse to consider it good enough for ocmal
<struktured> *ocaml
hugomg has quit [Ping timeout: 256 seconds]
<rgrinberg> you mean something like https://github.com/agarwal/future?
<struktured> yes, but w/o the goal of "upgrading" you to core
<struktured> You can see the conversation in the open issue on there, although I really don't have much more to offer. I don't have a good solution for error handling but I don't think an abstraction library should force Error.t on you either.
<rgrinberg> why? Error.t will be in pervasives in the next release
<struktured> you mean Result.t ?
<rgrinberg> oh yeah
<struktured> yeah that's cool
<rgrinberg> you're right Error.t picks the error type for you
<rgrinberg> Or_error i should say
<struktured> yeah, exactly. if future functorize over Error.t I would like it much better, but that's not going to happen, and perhaps it shouldn't. I don't really know
<rgrinberg> hmm isn't error.t just a lazy string underneath? Maybe if core exposed it...
<Drup> especially since it makes much less sense from lwt's point of view, since Lwt.t already contains potential errors
<struktured> Lwt's approach is much less intrusive in this regard I'd say, as an error is just another possible state of the monad. (Of course you still have specialized try / catch syntax, but at least it's still just traditional ocaml exception types)
<struktured> anyhow, I am still trying to prove that polymorphic variants are (not?) the right approach
<struktured> to myself at least
hugomg has joined #ocaml
ygrek has joined #ocaml
<rgrinberg> r/ocaml is a little slow these days :/
<struktured> yeah it perhaps the weather is too nice
palomer has joined #ocaml
darkf has joined #ocaml
seanmcl has joined #ocaml
seanmcl has quit [Client Quit]
asQuirreL has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<nicoo> struktured: Why do you think polyvariants aren't right for error monads?
Algebr has quit [Ping timeout: 265 seconds]
dubosec has joined #ocaml
asQuirreL has joined #ocaml
<struktured> They seem like a decent choice to me intuitively, but people who use them for a while seem to think they are not worth it.
nullcat has joined #ocaml
asQuirreL has quit [Client Quit]
palomer has quit [Quit: palomer]
<struktured> nicoo: one complaint is the compiler errors or type signatures can be become huge. I don't have a problem with that- you can sometimes unify the types too which reduces the size of the signature at least
<dubosec> This is a ridiculously simple question, but I am trying to create a craps program, and there are regular six-sided dice involved. I want to make sure that the "rolls" (dice randomization) makes sense. I would post the code in this comment, but it's a little long, so I will link the github repo here: https://github.com/cdubose/Craps-Game.git
palomer has joined #ocaml
<Drup> dubosec: you forgot Random.self_init ()
palomer has quit [Client Quit]
<Drup> struktured: there are various use of polymorphic variants
<Drup> the one for error types or for "simple" types (in particular, non recursive ones) don't really create the issues you describe
<dubosec> What does added Random.self_init do? It sounds like it initializes something
<Drup> dubosec: it seeds the random generator :)
<dubosec> oh, okay. Thanks!
palomer has joined #ocaml
palomer has quit [Client Quit]
<struktured> Drup: hmm so why do people use it as an argument against them for errors?
tsumetai has quit [Ping timeout: 264 seconds]
javamonn has quit [Remote host closed the connection]
<Drup> poly var for error handling is just a by product to the fact that the ocaml community can't possibly agree on anything
<Drup> (well, it's getting better, slowly :p)
palomer has joined #ocaml
<Drup> the error messages suck more (and you do loose some confidence in the mighty typechecker), though
<Drup> it's just not nearly as terrible as when using poly var to encode an AST, for example :p
swgillespie has joined #ocaml
<struktured> because you don't have to match on all cases you mean?
<Drup> not exactly
<Drup> it's just more dodgy. If you don't annotate the type, the typechecker will check the types are the same only when composing function, not when defining them
<struktured> I see
<struktured> yeah, even with variants you can be a jerk and match on _
palomer has quit [Quit: palomer]
javamonn has joined #ocaml
darkf_ has joined #ocaml
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
swgillespie has joined #ocaml
darkf has quit [Disconnected by services]
darkf_ is now known as darkf
hugomg has quit [Quit: Leaving]
javamonn has quit [Remote host closed the connection]
javamonn has joined #ocaml
idegen has quit [Quit: Leaving.]
psy_ has joined #ocaml
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
pyon is now known as pyon-nope
pyon-nope is now known as pyon
shinnya has joined #ocaml
hugomg has joined #ocaml
javamonn has quit [Remote host closed the connection]
Axle has joined #ocaml
hugomg has quit [Quit: Leaving]
alkoma has quit [Remote host closed the connection]
rgrinberg has quit [Quit: WeeChat 1.1.1]
mengu has joined #ocaml
mengu has quit [Ping timeout: 252 seconds]
osa1 has quit [Ping timeout: 265 seconds]
<dmbaturin> Will Lwt stream push work with preemptive threads?
MercurialAlchemi has joined #ocaml
<dmbaturin> Looks like not.
MercurialAlchemi has quit [Ping timeout: 240 seconds]
nojb has joined #ocaml
MercurialAlchemi has joined #ocaml
<ilia> Error: This expression has type unit but an expression was expected of type <mytype>. This is an error I am getting on the last line of source file
<nojb> maybe some unclosed expression somewhere ... post the code ?
<struktured> dmbaturin: what are you trying to do exactly? run a lwt stream read operation in a detached function or something?
<ilia> let process_file f = let ic = open_in f in let circles = read_file ic in close_in ic; circles let () = let crc = process_file ifile in List.iter print_circle crc
Simn has joined #ocaml
<dmbaturin> struktured: I'm trying to handle multiple concurrent connections. I was thinking that to avoid running a thread per connection I could run loops that accept connections, poll descriptors, and handle received messages in different threads, where a descriptor obtained from accept is passed to the poll thread.
<nojb> sorry need more context to see what's wrong ... where is the definition of ifile, process_file, etc. ?
<ilia> file is big
<nojb> gist.github.com is your friend :)
<ilia> well, 70 lines
<ilia> one sec
<dmbaturin> bpaste.net supports ocaml syntax, among others.
<nojb> dmbaturin: threads in lwt are very cheap so I wouldn't worry about having a thread per connection
nojb has quit [Read error: Connection reset by peer]
nojb has joined #ocaml
<dmbaturin> nojb: Well, there are more problems. If I have a thread per connection, and they update some internal state, how do I pass that state between threads?
<struktured> dmbaturin: is the connection a lwt stream in your case?
<dmbaturin> struktured: A connection is a file descriptor received from Lwt_unix.accept.
<dmbaturin> I was thinking of using Lwt_stream to pass messages read from those descriptors between threads.
<nojb> dmbaturin: well, it depends on what you are doing, but what's keeping you from sharing that state among all the threads ?
<dmbaturin> nojb: That is, a mutable value?
<nojb> is the state mutable or immutable ?
<nojb> any way you can just post all the read messages on a single lwt_stream and then have a single thread read from the strema and update the state
<struktured> ^^
<dmbaturin> Well, mock example. Let it be a counter service where clients can send INC and READ messages, first increments a counter, second returns its value.
<dmbaturin> The counter is shared between clients.
<nojb> one sec - be back in 5 mins
nojb has quit [Quit: nojb]
A1977494 has joined #ocaml
A1977494 has left #ocaml [#ocaml]
<dmbaturin> ilia: Which line causes the type error message?
<ilia> the infamous line# 69
nojb has joined #ocaml
<ilia> last line
<dmbaturin> But there are only 62 line.
<dmbaturin> * lines
<ilia> the last one
<ilia> List.iter print_circle crc
<ilia> that line complains
<nojb> illia: missing } in line 46 ?
<ilia> yes, missed
<nojb> dmbaturin: let counter = ref 0 in let rec loop () = accept () >>= fun fd -> let rec loop1 () = read fd >>= function `Inc -> incr counter ; loop1 () | `Read -> write fd !counter; loop1 () in ignore (loop1 ()); loop ()
<nojb> something like that :)
<nojb> ilia: ocp-indent is your friend :)
<nojb> ilia: another missing } in line 32, also x should be z
Kakadu has joined #ocaml
<ilia> changed
nojb has quit [Quit: nojb]
ygrek has quit [Ping timeout: 246 seconds]
matason has joined #ocaml
<ilia> fixed mistypes, same error
<flux> why doesn't this result in "default=hello" in --help? Arg.(required & opt (some string) (Some "hello") & info ["c"; "cache"] ~docv:"SERVER" ~doc)
<flux> it does work if I use 'value' in place of 'required'. maybe this is conflicting somewhere in Cmdliner.
<flux> but I really need that argument and (Some "Hello") is actually result of a function returning string option.
<flux> so while I need it it may not need to be given..
<flux> I could just branch to two different cases depending on if it has the default value or not, but I'd rather not :)
matason has quit [Ping timeout: 255 seconds]
sepp2k has joined #ocaml
freling has joined #ocaml
nojb has joined #ocaml
<nojb> flux: a required argument cannot have a default value ...
<nojb> why not value & opt string "hello"
<flux> cannot? it certainly can :-)
<flux> nojb, but I don't always have a default value
<flux> it depends on what the configuration file reads
<nojb> cannot = it seems to contradict the meaning of required - which is why cmdliner omits it from the man page
<flux> so is there a shorter way to write this: match best_cache persist with | None -> Arg.(required & opt (some string) None & info ["c"; "cache"] ~docv:"SERVER" ~doc) | Some default -> Arg.(value & opt string default & info ["c"; "cache"] ~docv:"SERVER" ~doc)
<flux> I would prefer the 'required' would Just Work (TM) :)
sepp2k has quit [Quit: Leaving.]
sepp2k has joined #ocaml
<nojb> I think this is the right way to write it ...
<flux> I would like to interpreted 'required' not as that user must provide it but that as Cmdliner is required to provide a value to my function ;)
nojb has quit [Quit: nojb]
psy_ has quit [Ping timeout: 246 seconds]
nojb has joined #ocaml
mengu has joined #ocaml
<flux> I think though that it is not quite obvious from the generated documentation which fields are optional and which are not..
<nojb> required is actually meant to be used only with positional arguments - optional arguments are always "optional"
<flux> well, I don't find it the best user interface to have a list of arguments that need to be in certain order, in particular if some of those options are not needed if they can be read from a configuration file..
psy_ has joined #ocaml
<flux> so this functionality of saying: foo: required option --quality is mising is perfect for me.
<flux> I don't think a command line option library should be _too_ opinionated what can and should be done, unless it defines a "command line style guide" that covers examples of different kind of argument usage scenarios, so that a developer in pinch can refer to that then instead of just dropping the library :P
nojb has quit [Quit: nojb]
freling has quit [Quit: Leaving.]
MercurialAlchemi has quit [Ping timeout: 250 seconds]
ggole has joined #ocaml
nullcat has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
sepp2k has quit [Quit: Leaving.]
tane has joined #ocaml
<dmbaturin> What I could do with a variation of nojb's code so far is to hang my machine. :)
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Submarine has joined #ocaml
Submarine has joined #ocaml
sepp2k has joined #ocaml
swgillespie has joined #ocaml
tsumetai has joined #ocaml
slash^ has joined #ocaml
nojb has joined #ocaml
yakov has joined #ocaml
<nojb> flux: the use of required is (somewhat) addressed in cmdliner's docs, http://erratique.ch/software/cmdliner/doc/Cmdliner.Arg.html#argterms
<nojb> dmbaturin: the code may need some adjustment, but it should not hang your machine ... :)
<dmbaturin> nojb: Well, your code doesn't compile because the final "in" part is missing. Chances are I made up it wrong. :)
<nojb> right right it was meant to be more like pseudo code ...
<nojb> also, accept, read, and write require definitions :)
<nojb> too many details to work out in one line - just trying to give the gist of the code
sepp2k has quit [Quit: Leaving.]
sepp2k has joined #ocaml
lordkryss has joined #ocaml
<dmbaturin> nojb: The "ignore (loop1 ()); loop ()" confuses me. What is the idea here? Why does it start another outer loop?
<nojb> right - loop () is the accept loop, it waits for an incoming connection and then spawn a new thread (loop1 ()) that reads from that connection and performs the requested action ...
<apache2> here's my failing code from last night https://ezcrypt.it/OvAn#PZxECWZvW5nJrMva8Tv6AW9U
<dmbaturin> nojb: Yeah, but won't it spawn outer loops to no end?
<nojb> what do you mean by outer loops ?
<dmbaturin> Well, my level of misunderstanding is probably deeper than I'd like to be.
<nojb> :)
<dmbaturin> What's the intended structure of that code? "let rec main_loop () = accept sock >>= handle_connection; main_loop ()"?
rwmjones has quit [Ping timeout: 246 seconds]
<nojb> that's right
<apache2> hm, syntax highlighting didn't work there. here's a new paste with colors! https://bpaste.net/show/884f58182ed7
<nojb> apache2: move line 4 after line 7
<apache2> oh. wow. can I help the type inferrence so I can have it defined earlier on?
rand000 has joined #ocaml
<nojb> no, the type used for keys and values must be in the scope of the definition of the hash tbl
<apache2> ok
<apache2> thank you, I had no idea what was going on
rossberg has quit [Ping timeout: 265 seconds]
<dmbaturin> nojb: Before I hang my machine again, does this look right: https://bpaste.net/show/a0e5ae6c7aa1 ? :)
<nojb> no :)
<nojb> the ignore should be removed from line 11 and 20
<dmbaturin> That is, don't wrap the expression in ignore?
<nojb> right
<nojb> line 17 should read Lwt_unix.accept sock >>= handle_connection >>= serve
<nojb> and in handle_connection, it should be let rec loop ic oc = Lwt_io.read_line ic >>= reply >>= Lwt_io.write_line >>= fun () -> loop ic oc in ...
<nojb> and, most importantly, you want line 17 to read something like ignore (loop ic oc); Lwt.return_unit
<nojb> sorry, line 20 should read Lwt_unix.accept sock >>= handle_connection >>= serve
asQuirreL has joined #ocaml
<dmbaturin> Wait. fun () -> loop ic oc or loop ic oc; Lwt.return_unit ?
rossberg has joined #ocaml
<dmbaturin> Ah. Won't it go inifinitely deep at line 11?
<dmbaturin> Or it's will form a loop? Let me try.
<nojb> sure
<dmbaturin> nojb: This works. Thanks a lot!
<nojb> cool
djellemah_ has quit [Ping timeout: 246 seconds]
tani has joined #ocaml
tane has quit [Ping timeout: 240 seconds]
rwmjones has joined #ocaml
<dmbaturin> nojb: For dead connections, attempt to read from channels will end up in Lwt_io.Closed_channel?
<nojb> I think you will get End_of_file
<nojb> Closed_channel is raised if you close the channel expclitily
<nojb> and then you try to use it
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<dmbaturin> Also, is atomicity of reference assignment guaranteed by the runtime lock, I don't need to think about it?
<adrien> depends
<adrien> close() and shutdown() trigger different behaviours and if you're on a pipe you get something different again
<nojb> dmbaturin: lwt threads are cooperative - the only point where threads can be switched is at bind points >>=
<nojb> so sequences of ocaml code without binds will execute without any interruptions
yakov has quit [Ping timeout: 256 seconds]
<dmbaturin> Ah, good to know.
<dmbaturin> Well, I knew they are cooperative, I didn't realize where precisely switching occurs. :)
tsumetai has quit [Ping timeout: 265 seconds]
tsumetai` has joined #ocaml
larhat has joined #ocaml
<dmbaturin> If I want to use Lwt_log, I need to wrap functions that are after the log call in a function that accepts unit?
Haudegen has quit [Ping timeout: 272 seconds]
larhat has quit [Quit: Leaving.]
TheLemonMan has joined #ocaml
A1977494 has joined #ocaml
A1977494 has quit [Client Quit]
Haudegen has joined #ocaml
Denommus` has joined #ocaml
Denommus has quit [Ping timeout: 244 seconds]
<adrien> does anyone know the output of 'file' on mac os x shared libraries?
<adrien> ah, found "libhello.dylib: Mach-O 64-bit dynamically linked shared library x86_64"
sdothum has joined #ocaml
oscar_toro has quit [Ping timeout: 264 seconds]
<mk270> without recommending ocp-indent, can anyone tell me how to get tuareg-mode to indent with spaces rather than tabs?
<theblatte> (indent-tabs-mode nil)?
<theblatte> it's generic emacsery, not tuareg-specific
<mk270> theblatte - thanks - i was sure i'd already tried that - let me try again :)
<theblatte> if you want that only for .ml files you'll have to work a bit harder
<mk270> no, i've got it working with a hook now - it was set globally but not working in tuareg-mode. dunno why. fixed well enough for my purposes. many thanks!
<ggole> indent-tabs-mode is buffer local. Setting it globally using just setq won't work.
<ggole> You could setq-default, but a hook is probably better (so you are probably in good shape now).
oscar_toro has joined #ocaml
nojb has quit [Quit: nojb]
<mk270> thanks
<mk270> you'll all be pleased to know that tuareg-mode has yielded before the crushing onslaught of the wisdom of #ocaml
tani has quit [Quit: Verlassend]
agarwal1975 has joined #ocaml
tsumetai` has quit [Ping timeout: 272 seconds]
Gama11 has joined #ocaml
AlexRussia has quit [Ping timeout: 240 seconds]
mengu__ has joined #ocaml
mengu has quit [Ping timeout: 256 seconds]
seanmcl has joined #ocaml
AlexRussia has joined #ocaml
hugomg has joined #ocaml
javamonn has joined #ocaml
struktured has quit [Ping timeout: 265 seconds]
mengu has joined #ocaml
mort___ has joined #ocaml
MercurialAlchemi has joined #ocaml
ontologiae has joined #ocaml
mengu__ has quit [Ping timeout: 264 seconds]
osa1 has joined #ocaml
idegen has joined #ocaml
Haudegen has quit [Ping timeout: 245 seconds]
wildsebastian has joined #ocaml
Haudegen has joined #ocaml
tsumetai has joined #ocaml
osa1 has quit [Ping timeout: 256 seconds]
seanmcl has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
psy_ has quit [Remote host closed the connection]
<bernardofpc> hi all
<bernardofpc> is there a way to programatically know a (good) bound for the size of an array
<adrien> wrt what?
javamonn has quit [Remote host closed the connection]
<bernardofpc> not having Out_of_memory appear
<bernardofpc> (I could bissect the length but this seems a bit awkward)
<bernardofpc> (I'm trying to write an adaptive Sieve of Eratosthenes, so I'd like to have large-ish chunks on which to do the calculations, evaluate some stats, then throw it away and start with a new chunk afresh)
<Drup> use growable array and start small.
<bernardofpc> Idon't understand
<bernardofpc> my case is that I have the sieve up to 10^7 already done
<bernardofpc> this allows me to sieve all primes below 10^(14)
dubosec has quit [Ping timeout: 240 seconds]
<bernardofpc> but for the sieve to be fast, I need to profit from the speed gain of NOT doing divisions too much
<bernardofpc> so for each chunk (say of 10^8 primes) I do only one "mod" per prime blow 10^7
<bernardofpc> *below
<bernardofpc> (and I can't grow an array to hold 10^14 bits)
<Drup> right.
Hannibal_Smith has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 264 seconds]
javamonn has joined #ocaml
javamonn has quit [Remote host closed the connection]
struktured has joined #ocaml
tsumetai` has joined #ocaml
palomer has joined #ocaml
tsumetai has quit [Ping timeout: 245 seconds]
osa1 has joined #ocaml
Haudegen has quit [Ping timeout: 256 seconds]
darkf has quit [Quit: Leaving]
javamonn has joined #ocaml
struktured has quit [Remote host closed the connection]
bjorkintosh has quit [Quit: Leaving]
nojb has joined #ocaml
javamonn has quit [Remote host closed the connection]
ontologiae has quit [Ping timeout: 264 seconds]
struktured has joined #ocaml
TheLemonMan has quit [Quit: "It's now safe to turn off your computer."]
javamonn has joined #ocaml
javamonn has quit [Remote host closed the connection]
javamonn has joined #ocaml
javamonn_ has joined #ocaml
javamonn has quit [Read error: Connection reset by peer]
Haudegen has joined #ocaml
matason has joined #ocaml
struktured has quit [Remote host closed the connection]
struktured has joined #ocaml
javamonn_ has quit [Remote host closed the connection]
hugomg has quit [Ping timeout: 276 seconds]
dubosec has joined #ocaml
seanmcl has joined #ocaml
struktured has quit [Remote host closed the connection]
struktured has joined #ocaml
bjorkintosh has joined #ocaml
struktured has quit [Ping timeout: 245 seconds]
<flux> nojb, well, if there are multiple (say 5+) required arguments, is the best user experience achieved with positional arguments?
<flux> in particular when regular named arguments work nicely with aliases as well.
seanmcl has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<nojb> flux: sure, am just reporting on the design choices of cmdliner - I don't necessary agree with them :)
struktured has joined #ocaml
javamonn has joined #ocaml
matason has quit []
matason has joined #ocaml
n3ss3s has joined #ocaml
Algebr has joined #ocaml
mengu has quit []
hilquias has joined #ocaml
struktured has quit [Remote host closed the connection]
mort___ has quit [Quit: Leaving.]
struktured has joined #ocaml
seanmcl has joined #ocaml
sepp2k has quit [Ping timeout: 244 seconds]
BitPuffin|osx has joined #ocaml
struktured has quit [Remote host closed the connection]
MercurialAlchemi has joined #ocaml
hilquias has quit [Ping timeout: 264 seconds]
seanmcl has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
palomer has quit [Quit: palomer]
nojb has quit [Quit: nojb]
sepp2k has joined #ocaml
hilquias has joined #ocaml
javamonn has quit [Remote host closed the connection]
struktured has joined #ocaml
struktured has quit [Remote host closed the connection]
hugomg has joined #ocaml
larhat has joined #ocaml
palomer has joined #ocaml
seanmcl has joined #ocaml
palomer has quit [Client Quit]
ygrek has joined #ocaml
tsumetai` has quit [Ping timeout: 244 seconds]
tsumetai has joined #ocaml
psy has joined #ocaml
rgrinberg has joined #ocaml
javamonn has joined #ocaml
jbrown has quit [Read error: No route to host]
jbrown has joined #ocaml
badon has quit [Disconnected by services]
badon_ has joined #ocaml
marynate has joined #ocaml
badon_ is now known as badon
dav has quit [Ping timeout: 240 seconds]
shinnya has quit [Ping timeout: 265 seconds]
seanmcl has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
andreypopp has joined #ocaml
dav has joined #ocaml
ygrek has quit [Ping timeout: 255 seconds]
maufred has quit [Ping timeout: 264 seconds]
javamonn has quit [Remote host closed the connection]
marynate has quit [Quit: Leaving]
Haudegen has quit [Ping timeout: 276 seconds]
nullcat_ has joined #ocaml
BitPuffin|osx has quit [Ping timeout: 265 seconds]
djellemah has joined #ocaml
Haudegen has joined #ocaml
seanmcl has joined #ocaml
Submarine has quit [Remote host closed the connection]
seanmcl has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
rgrinberg has quit [Quit: WeeChat 1.1.1]
hilquias has quit [Remote host closed the connection]
mcclurmc has joined #ocaml
mcclurmc_ has quit [Ping timeout: 256 seconds]
Haudegen has quit [Ping timeout: 240 seconds]
<tobiasBora> Hello !
<tobiasBora> I am looking for a Selenium WebServer API for Ocaml, does anyone knows if it exists ?
<apache2> ocamlfind: Package `ctypes.foreign.threaded' not found - required by `ctypes.foreign'
<apache2> anyone have an idea how to make it find that?
Submarine has joined #ocaml
Submarine has joined #ocaml
<flux> just a stab in the dark, enable threads?
Haudegen has joined #ocaml
tsumetai` has joined #ocaml
tsumetai has quit [Ping timeout: 244 seconds]
n3ss3s has quit [Ping timeout: 272 seconds]
swgillespie has joined #ocaml
<flux> companion_cube, is there some algorithm for finding in which containers.x a certain module is in?-)
<apache2> flux: I did :(
<apache2> I assume that's why ctypes wants the thread thing
<flux> hmm, so it seems PrintBox should be in containers.misc, but..
<flux> ah yes, I was looking for it in the wrong way :). Containers_misc.PrintBox it is.
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dubosec has quit [Ping timeout: 255 seconds]
<theblatte> is there something I can add to my _tags file so that ocamlbuild will not compile foo.ml even though it's in an included directory?
<theblatte> the overall goal is that I want to write a use a foo.ml from the current directory and not included/foo.ml, but then it complains at the end that both of them define Foo
<theblatte> s/write a//
<jcloud> It looks like ocaml build has an -ignore option
<jcloud> If you try that on the command line, does that work?
<theblatte> -ignore included/foo.ml didn't work
<theblatte> the tag gets added but it compiles anyway
<jcloud> Oh. :(
<theblatte> ah, maybe I need to ignore the .mli
<theblatte> nope
n3ss3s has joined #ocaml
<flux> hmm, it seems ppx_deriving comes with .show, but not with .read. are there solutions that give the read, or should I just use (say) json?
dubosec has joined #ocaml
<theblatte> oh well, I'll move included/foo.ml out of the way in the Makefile before calling ocamlbuild /o\
shinnya has joined #ocaml
<zozozo> theblatte: I think that having two file with the same way is not a really good idea, generally speaking
<zozozo> sorry, same name
andreypopp has quit [Quit: Connection closed for inactivity]
<theblatte> zozozo: sure
larhat has quit [Quit: Leaving.]
<zozozo> theblatte: maybe you could rename one of them ?
<theblatte> I'm trying to hack around something, but maybe I'll bite the bullet and do something more proper
<theblatte> zozozo: what I'm trying to do is to use a standalone ocaml program with sources prog/ with js_of_ocaml, but I need to modify a few of its modules (eg, file IO) so that it works in the browser, without modifying prog/
<theblatte> hence the other foo.ml
<zozozo> sounds like a hask indeed
<theblatte> the proper way would be to functorise what I need to take a "fileIO" module as parameter I guess
<zozozo> or use a module MyIO with your modifications
robink has quit [Ping timeout: 244 seconds]
<theblatte> but if I need one for js and one for standalone, then I'm back with the same issue
<zozozo> right
small-wolf has joined #ocaml
robink_ has joined #ocaml
<flux> companion_cube, I suppose there's no easy way of going from data to ascii-representation of a tv show list with PrintBox..
lordkryss has quit [Quit: Connection closed for inactivity]
BitPuffin|osx has joined #ocaml
JuggleTux has joined #ocaml
small-wolf has quit [Remote host closed the connection]
Erylisia has joined #ocaml
<Algebr> stuff like having modules named Websocket and WebSockets is insane
freling has joined #ocaml
freling has quit [Remote host closed the connection]
freling has joined #ocaml
freling has quit [Client Quit]
<Algebr> I'm looking for Lwt_io_ext.sockaddr_of_dns but can't find it, I'm guessing it was removed from the Lwt API?
manizzle has quit [Ping timeout: 256 seconds]
swgillespie has joined #ocaml
Erylisia has quit [Quit: Quitte]
rand000 has quit [Ping timeout: 250 seconds]
Erylisia has joined #ocaml
Tekilla has joined #ocaml
Tekilla has quit [Read error: Connection reset by peer]
Tekilla has joined #ocaml
tsumetai` has quit [Ping timeout: 245 seconds]
slash^ has quit [Read error: Connection reset by peer]
mrknife has joined #ocaml
<flux> when in doubt, git clone :)
<flux> (git log -S str can find commits involving str)
JuggleTux has left #ocaml [#ocaml]
Anarchos has joined #ocaml
leblon has quit [Ping timeout: 245 seconds]
rand000 has joined #ocaml
yakov has joined #ocaml
<flux> companion_cube, I suppose btw that PrintBox is utf8-aware? not that I have yet had that kind of issuse with anything but my own code :)
<flux> turns out I cannot just String.sub utf8 strings and expect proper utf8 strings to come out!
<flux> oh my, it provides 'set_string_len" function
seanmcl has joined #ocaml
<flux> companion_cube, support for ANSI colors/attributes would be nice!
ygrek has joined #ocaml
Hannibal_Smith has quit [Quit: Leaving]
ggole has quit []
<flux> companion_cube, also I do think there are still issues with unicode regardless the length function setter..
Simn has quit [Read error: Connection reset by peer]
hilquias has joined #ocaml
rand000 has quit [Quit: leaving]
wildsebastian has quit [Ping timeout: 252 seconds]
monod has joined #ocaml
javamonn has joined #ocaml
Gama11 has quit [Read error: Connection reset by peer]
tsumetai has joined #ocaml
JuggleTux has joined #ocaml
nojb has joined #ocaml
JuggleTux has left #ocaml [#ocaml]
alinab has joined #ocaml
alinab has quit [Client Quit]
Erylisia has quit [Read error: Connection reset by peer]
Erylisia has joined #ocaml
badon_ has joined #ocaml
badon has quit [Disconnected by services]
badon_ is now known as badon
seanmcl has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
javamonn has quit [Remote host closed the connection]
javamonn has joined #ocaml
djellemah has quit [Ping timeout: 244 seconds]
sepp2k has quit [Quit: Leaving.]
n3ss3s has quit [Ping timeout: 272 seconds]
javamonn has quit [Remote host closed the connection]
javamonn has joined #ocaml
ygrek has quit [Ping timeout: 240 seconds]
javamonn has quit [Remote host closed the connection]
javamonn has joined #ocaml
javamonn has quit [Remote host closed the connection]
javamonn has joined #ocaml
Anarchos has quit [Quit: Vision[0.9.7-H-20140108]: i've been blurred!]
tsumetai has quit [Ping timeout: 240 seconds]
javamonn has quit [Ping timeout: 276 seconds]
manizzle has joined #ocaml
javamonn has joined #ocaml
Erylisia has quit [Read error: Connection reset by peer]
Tekilla has quit [Read error: Connection reset by peer]
matason has quit [Ping timeout: 245 seconds]
Erylisia has joined #ocaml
Tekilla has joined #ocaml
tsumetai has joined #ocaml
Erylisia has quit [Read error: Connection reset by peer]
Erylisia has joined #ocaml
Kakadu has quit [Remote host closed the connection]
seanmcl has joined #ocaml
monod has quit [Quit: Cya guys!!]
Snark has quit [Quit: leaving]
Snark has joined #ocaml
Algebr has quit [Remote host closed the connection]
seanmcl has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
MisaMisa has joined #ocaml
asQuirreL has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Erylisia has quit [Read error: Connection reset by peer]
Tekilla has quit [Read error: Connection reset by peer]
Tekilla has joined #ocaml
Erylisia has joined #ocaml
systmkor has joined #ocaml
hugomg has quit [Quit: Leaving]
osa1 has quit [Ping timeout: 276 seconds]
madroach has quit [Ping timeout: 264 seconds]
nullcat_ has quit [Quit: gone...]
madroach has joined #ocaml
dubosec has quit [Read error: Connection reset by peer]
dubosec has joined #ocaml
Erylisia has quit [Read error: Connection reset by peer]
Tekilla has quit [Read error: Connection reset by peer]
Erylisia has joined #ocaml
Tekilla has joined #ocaml
osa1 has joined #ocaml
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
xificurC has quit [Remote host closed the connection]
xificurC has joined #ocaml
javamonn has quit [Remote host closed the connection]