adrien changed the topic of #ocaml to: Discussions about the OCaml programming language | http://www.ocaml.org | Upcoming OCaml MOOC: https://huit.re/ocamlmooc | OCaml 4.03.0 release notes: http://ocaml.org/releases/4.03.html | Try OCaml in your browser: http://try.ocamlpro.com | Public channel logs at http://irclog.whitequark.org/ocaml
fraggle-boate has quit [Ping timeout: 250 seconds]
noddy has quit [Ping timeout: 250 seconds]
fraggle-boate has joined #ocaml
al-damiri has quit [Quit: Connection closed for inactivity]
brunoro has joined #ocaml
brunoro has quit [Ping timeout: 246 seconds]
jimt has quit [Ping timeout: 265 seconds]
noddy has joined #ocaml
jimt has joined #ocaml
cataska has quit [Quit: Textual IRC Client: www.textualapp.com]
cpdean has joined #ocaml
theblatte has quit [Ping timeout: 245 seconds]
jeffmo has quit [Quit: jeffmo]
theblatte has joined #ocaml
shinnya has quit [Ping timeout: 256 seconds]
Sim_n has quit [Quit: Leaving]
breitenj has joined #ocaml
XC[m]1 has joined #ocaml
brunoro has joined #ocaml
brunoro has quit [Ping timeout: 256 seconds]
sh0t has quit [Remote host closed the connection]
noddy has quit [Ping timeout: 258 seconds]
rgrinberg has quit [Ping timeout: 268 seconds]
wu_ng has joined #ocaml
nore has quit [Ping timeout: 265 seconds]
copy` has quit [Quit: Connection closed for inactivity]
noddy has joined #ocaml
nore has joined #ocaml
brunoro has joined #ocaml
brunoro has quit [Ping timeout: 260 seconds]
boadie has joined #ocaml
noddy has quit [Ping timeout: 268 seconds]
sh0t has joined #ocaml
michbad has joined #ocaml
govg has quit [Ping timeout: 268 seconds]
jimt_ has joined #ocaml
jimt has quit [Ping timeout: 260 seconds]
jimt_ is now known as jimt
xcaptain has joined #ocaml
noddy has joined #ocaml
brunoro has joined #ocaml
mfp has quit [Ping timeout: 256 seconds]
brunoro has quit [Ping timeout: 245 seconds]
Heasummn has quit [Ping timeout: 265 seconds]
brunoro has joined #ocaml
marsam has joined #ocaml
brunoro has quit [Ping timeout: 250 seconds]
marsam has quit [Read error: Connection reset by peer]
noddy has quit [Ping timeout: 248 seconds]
noddy has joined #ocaml
nomicflux has joined #ocaml
Sorella has quit [Quit: Connection closed for inactivity]
struktured has joined #ocaml
nomicflux has quit [Quit: nomicflux]
fraggle_ has quit [Ping timeout: 246 seconds]
nomicflux has joined #ocaml
nomicflux has quit [Client Quit]
fraggle_ has joined #ocaml
cpdean has quit [Quit: Leaving.]
brunoro has joined #ocaml
pierpa has quit [Ping timeout: 256 seconds]
brunoro has quit [Ping timeout: 248 seconds]
noddy has quit [Ping timeout: 260 seconds]
govg has joined #ocaml
brunoro has joined #ocaml
MercurialAlchemi has joined #ocaml
malc_ has joined #ocaml
sh0t has quit [Remote host closed the connection]
struktured has quit [Quit: Konversation terminated!]
brunoro has quit [Ping timeout: 256 seconds]
nomicflux has joined #ocaml
nomicflux has quit [Client Quit]
luzie has quit [Remote host closed the connection]
nomicflux has joined #ocaml
nomicflux has quit [Client Quit]
cataska has joined #ocaml
cataska has quit [Read error: Connection reset by peer]
cataska has joined #ocaml
cataska_ has joined #ocaml
cataska has quit [Ping timeout: 268 seconds]
MercurialAlchemi has quit [Ping timeout: 250 seconds]
brunoro has joined #ocaml
noddy has joined #ocaml
brunoro has quit [Ping timeout: 268 seconds]
AlexDenisov has joined #ocaml
Algebr` has quit [Ping timeout: 260 seconds]
huop has joined #ocaml
slash^ has joined #ocaml
nomicflux has joined #ocaml
wxfdglm has joined #ocaml
brunoro has joined #ocaml
jao has quit [Ping timeout: 246 seconds]
michbad has quit [Read error: Connection reset by peer]
brunoro has quit [Ping timeout: 248 seconds]
MercurialAlchemi has joined #ocaml
dmi3y has joined #ocaml
cataska_ has quit [Quit: Textual IRC Client: www.textualapp.com]
nomicflux has quit [Quit: nomicflux]
jnavila has joined #ocaml
huza has joined #ocaml
brunoro has joined #ocaml
AlexDenisov has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
brunoro has quit [Ping timeout: 260 seconds]
govg has quit [Ping timeout: 260 seconds]
xcaptain has quit [Ping timeout: 246 seconds]
AltGr has joined #ocaml
brunoro has joined #ocaml
Simn has joined #ocaml
copy` has joined #ocaml
brunoro has quit [Ping timeout: 252 seconds]
huza has quit [Quit: WeeChat 1.0.1]
freusque has joined #ocaml
brunoro has joined #ocaml
AlexDenisov has joined #ocaml
rossberg has joined #ocaml
troydm has quit [Ping timeout: 265 seconds]
rixed is now known as rixed_would_code
rixed_would_code is now known as rixed_code_4_foo
Sim_n has joined #ocaml
Simn has quit [Ping timeout: 246 seconds]
AlexDenisov has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Sim_n has quit [Quit: Leaving]
AlexDenisov has joined #ocaml
Kakadu_afk has joined #ocaml
rixed_code_4_foo is now known as rixed
govg has joined #ocaml
argent_smith has joined #ocaml
<Kakadu_afk> Folks, can we (with ocamlbuild) compile single source file into two executables (with different linking options)?
Kakadu_afk is now known as Kakadu
<Kakadu> I kind of have two parts of code with similar interface which need to be tested for performance
johnelse has quit [Quit: leaving]
argent_smith1 has joined #ocaml
johnelse has joined #ocaml
argent_smith has quit [Ping timeout: 256 seconds]
dakk has joined #ocaml
AlexDenisov has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bronsen has quit [Quit: WeeChat 1.7-dev]
AlexDenisov has joined #ocaml
soupault has joined #ocaml
brunoro has quit [Ping timeout: 245 seconds]
kamog has joined #ocaml
brunoro has joined #ocaml
zpe has joined #ocaml
_andre has joined #ocaml
Algebr` has joined #ocaml
AlexDenisov has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
govg has quit [Ping timeout: 248 seconds]
AlexDenisov has joined #ocaml
zpe has quit [Remote host closed the connection]
wu_ng has quit [Ping timeout: 256 seconds]
troydm has joined #ocaml
<flux> if not otherwise, then via intermediate file copy?
<Kakadu> It will be great to find an example plugin somewhere
<reynir> Maybe symlinks will work?
<sgronblo> could someone explain to me why ocaml cant figure out that a type is correct if i have an explicit type in my .mli file but it can when i write the type right into my .ml file
maattdd has quit [Ping timeout: 260 seconds]
mfp has joined #ocaml
<Kakadu> an example, plz
fluter has quit [Ping timeout: 258 seconds]
AlexDenisov has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
wxfdglm has quit [Quit: leaving]
brunoro has quit [Ping timeout: 256 seconds]
malc_ has quit [Remote host closed the connection]
fluter has joined #ocaml
silver has joined #ocaml
chris2 has quit [Ping timeout: 245 seconds]
Sorella has joined #ocaml
chris2_ has joined #ocaml
TarVanimelde has joined #ocaml
chris2_ is now known as chris2
dxtr has joined #ocaml
luzie has joined #ocaml
brunoro has joined #ocaml
AlexDenisov has joined #ocaml
TarVanimelde has quit [Read error: Connection reset by peer]
zpe has joined #ocaml
AlexDenisov has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Simn has joined #ocaml
AlexDenisov has joined #ocaml
nomicflux has joined #ocaml
<frefity> does ocaml have built in unsigned 64 bit ints?
<Drup> no
<frefity> ok, so should I use something like this? https://github.com/andrenth/ocaml-stdint
<Armael> uh, I didn't know about ocaml-integers
<Armael> what's the difference with stdint ?
<companion_cube> it's OCaml, we need to have several libs for everything
<reynir> Maybe there's a nointeger library :v
<Drup> honestly, I am not capable of juding the differences
sfri has quit [Remote host closed the connection]
<freehck> Hello. Is there some deduplication function which comparision fucntion in stdlib?
<freehck> s/which/with/
Muzer has quit [Read error: Connection reset by peer]
<lyxia> List.sort_uniq
pierpa has joined #ocaml
<companion_cube> oh, that's new
sfri has joined #ocaml
<Algebr`> nice, two integer libs, but one done by yallop
<Armael> in my mind ctypes was using ocaml-stdint, so I'm puzzled
<hannes> in case you don't want the magical wrapping behaviour of (unsigned) integers, I also did https://github.com/hannesm/usane where add/sub/mult exposes the carry bit explicitly
dmi3y has quit [Quit: dmi3y]
petroav has joined #ocaml
Muzer has joined #ocaml
frefity has quit [Ping timeout: 246 seconds]
dmi3y has joined #ocaml
nomicflux has quit [Quit: nomicflux]
nicoo has quit [Remote host closed the connection]
nicoo has joined #ocaml
d0nn1e has quit [Ping timeout: 268 seconds]
frefity has joined #ocaml
<reynir> Cool
<hannes> (unreleased atm due to no time and resources to test on 32 bit)
d0nn1e has joined #ocaml
TarVanimelde has joined #ocaml
frefity has quit [Ping timeout: 265 seconds]
AlexDenisov has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
yomimono has joined #ocaml
AlexDenisov has joined #ocaml
frefity has joined #ocaml
cpdean has joined #ocaml
TarVanimelde has quit [Read error: Connection reset by peer]
petroav has quit [Ping timeout: 260 seconds]
ciniglio` has joined #ocaml
zpe has quit [Remote host closed the connection]
huop has quit [Quit: Page closed]
sh0t has joined #ocaml
<Kakadu> folks, do types like ` type 'a t = 'a ` have special name or something?
nomicflux has joined #ocaml
<Drup> identity ?
<yomimono> phantom types?
al-damiri has joined #ocaml
<Drup> yomimono: that's not phantom
<Kakadu> phantoms happen we don't use type parameter. There we don't use actual type's name
<Drup> Kakadu: non recursive ? :D
<Kakadu> Antiphantom ?????
<yomimono> oh sorry, misread this :P
<Drup> Kakadu: I mean, it's pretty much just a normal type, I fail to see what you are trying to characterize
Kakadu has quit [Quit: Konversation terminated!]
Kakadu has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 250 seconds]
<Kakadu> Drup: Do somebody it can be a normal type. But today I got a question like "Does OCaml really accept this definition?"
<Kakadu> s/Do/For/
<Drup> kakadu: why did the person though it wouldn't ?
<Kakadu> lack of experience probably
<thizanne> maybe you could just name it an alias type
<thizanne> and explain why it's not that different from type 'a t = 'a list
dmi3y has quit [Quit: dmi3y]
shinnya has joined #ocaml
<freehck> lyxia: thx
dmi3y has joined #ocaml
agarwal1975 has joined #ocaml
yomimono has quit [Quit: Leaving]
seangrove has joined #ocaml
nomicflux has quit [Quit: nomicflux]
govg has joined #ocaml
orbifx-m has joined #ocaml
<orbifx-m> Does anyone know what kind of concurrent access Queue doesn't support?
<orbifx-m> I'm confused given that OCaml is not able to run in parallel..
nomicflux has joined #ocaml
<balod> None: "Warning This module is not thread-safe: each Queue.t value must be protected from concurrent access (e.g. with a Mutex.t). Failure to do so can lead to a crash."
<orbifx-m> But I've been running it with threads and it's been working fine.. For a long time as far as I know.
bronsen has joined #ocaml
<orbifx-m> Do they mean C threads?
<Algebr`> orbifx-m: what made that message? the compilers?
<balod> That's my understanding
dmi3y has quit [Quit: dmi3y]
<orbifx-m> I'm going to swtich to something else just to be safe, but I think there is something not right there with Queue.
<orbifx-m> .. and that message
nomicflux has quit [Client Quit]
<flux> orbifx-m, you still have interrupting multithreading in ocaml
<flux> orbifx-m, but the background threads just don't run
<flux> orbifx-m, of course thread-buggy apps can work by chance.
<orbifx-m> It's been working for too long. I suspect that I'm not doing something which actually causes it. Like interruptions; how do interruptions work?
<flux> I think with signals
<flux> do you have byterun or native?
<orbifx-m> native
<orbifx-m> Are those signals preemptive?
<balod> Do you have Queue.t shared by Thread.t instances?
<orbifx-m> Yes
shinnya has quit [Ping timeout: 252 seconds]
<orbifx-m> As a way of passing info.
<orbifx-m> But I think each thread either only reads or writes. Which may be why I'm getting away with it
<balod> 1 thread writing while another reads should be the perfect failure scenario...
nomicflux has joined #ocaml
<edwin> orbifx-m: have you look at the Event module?
<orbifx-m> edwin: yes, after I became aware of that warning
<orbifx-m> Can't say I found it very intuitive
<orbifx-m> Lwt streams might be better
<edwin> but are you using real threads or lwt threads?
<edwin> if you are using Lwt then it is better to use its own primitives for synchronization
<orbifx-m> Yeah, might end up using other features from it too, so thinking of going down that way
<balod> Lwt threads would not trigger the concurrency problem, but yes using its own primitives would help the scheduler
<orbifx-m> So are OCaml threads preemptive? From withing the OCaml runtime?
<orbifx-m> Can their scheduler stop a thread abruptly?
<balod> Are we talking stdlib Thread or Lwt thread ?
<orbifx-m> stdlib Thread (I think Lwt are cooperative, so can't preempt, right?)
<flux> Event is super interface once you find the Concurrent ML documentation about it
<flux> but it has two flaws: no timeouts, no garbege-collected threads
<edwin> if you create the thread with the Thread module then OCaml can switch execution from one thread to another (not exactly at arbitrary points, so the situation is not as bad as in C)
<flux> so the idea is that you write code like (I don't remember if the functions are correct): let rec thread () = match Event.select [Event.wrap (Event.read channel) (fun msg -> `Channel msg); .. ] with .. loop () .. possibly building abstractions for asynchronous message queues so you don't need to Event.sync inside the handler loop
<orbifx-m> edwin: so does it basically have "yield" littered around the standard librarly?
<flux> and you can build your own Events with Event.wrap. but this part is where it's a bit limited.. you can build timeouts but they are horribly inefficient and horrible ;)
<balod> edwin: event for native code? I thought they would be unix threads
<edwin> I think for native threads it uses signals
<edwin> or at least I was watching my program with strace and it kept getting signals periodically? (50ms or so?)
rpip has quit [Ping timeout: 258 seconds]
Denommus has joined #ocaml
<edwin> let me see if I can find some documentation on this
<orbifx-m> Ok, OCamlUnix says that std threads are preemptive and don't have to use yield
MercurialAlchemi has joined #ocaml
<orbifx-m> I wonder what Lwt does with the stack when it comes to a yield.
<balod> Well if you really want to know https://github.com/ocsigen/lwt ;)
<flux> in any case, anydaynow we might have ocaml-multicore and Queue will be even more unsafe! though better message passing primitives will arise.
<orbifx-m> balod: it's a bit much at the momement, need to get on with implementation
<orbifx-m> but I'm curious so if anyone knows, would like to know.
<aantron> orbifx-m: lwt threads don't have their own stacks
<aantron> a "thread" in lwt is just a reference cell that can contain a value, an exception, or the state "not finished yet"
<aantron> and that can have follow-on threads attached to it (usually by the bind operation)
<aantron> follow-on functions* actually
<aantron> so that if you do a bind on an lwt thread, if the thread already has a value, the function gets that value. if it is sleeping, the function is called in the future, when the thread gets a value
<orbifx-m> aantron: thanks. So it's like the program "re-composes" it's self at every yield?
<aantron> sort of. it's like a big soup of continuations, where the threads are some kind of "synchronization points" between the continuations
<aantron> if you do a yield lwt roughly speaking just tries to find another continuation to run
<aantron> "threads" above being these reference cells
<orbifx-m> Cool thanks. That does it for now. I want ot look into the details more.
nomicflux has quit [Quit: nomicflux]
<edwin> https://ocaml.github.io/ocamlunix/threads.html "OCaml threads (since version 3.08) use the sigvtalarm signal internally to implement preemption of threads."
<edwin> https://ocaml.github.io/ocamlunix/signals.html#sec86 "On receiving a signal, OCaml records the receipt of the signal but the signal handling function will only be executed at certain checkpoints. These are frequent enough to provide the illusion of asynchronous execution. The checkpoints typically occur during allocations, loop controls, or interactions with the system (particularly system calls)."
<edwin> that is what I could find on how the preemption works for threads, but when writing code I think its safe to assume that your execution can be interrupted and another thread run, unless you use Lwt where you are in control of those points via the bind operator
<orbifx-m> yeah they are preemptive. Found it in the same guide, in threads.
<orbifx-m> Thanks
jao has joined #ocaml
nomicflux has joined #ocaml
sh0t has quit [Ping timeout: 260 seconds]
octachron has joined #ocaml
nomicflux has quit [Quit: nomicflux]
malc_ has joined #ocaml
cpdean has quit [Quit: Leaving.]
sh0t has joined #ocaml
brunoro has quit [Ping timeout: 265 seconds]
Algebr` has quit [Ping timeout: 246 seconds]
cpdean has joined #ocaml
jnavila has quit [Quit: It was time]
nomicflux has joined #ocaml
brunoro has joined #ocaml
AlexDenisov has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
brunoro has quit [Ping timeout: 260 seconds]
ryanartecona has joined #ocaml
Algebr` has joined #ocaml
soupault has quit [Remote host closed the connection]
nahra has quit [Ping timeout: 265 seconds]
rpip has joined #ocaml
Anarchos has joined #ocaml
veggie_ has joined #ocaml
Kakadu has quit [Quit: Konversation terminated!]
brunoro has joined #ocaml
brunoro has quit [Ping timeout: 256 seconds]
nomicflux has quit [Quit: nomicflux]
gjaldon has joined #ocaml
th5 has joined #ocaml
gjaldon has quit [Remote host closed the connection]
slash^ has quit [Read error: Connection reset by peer]
AlexDenisov has joined #ocaml
dmi3y has joined #ocaml
sfri has quit [Remote host closed the connection]
veggie_ has quit [Ping timeout: 268 seconds]
jnavila has joined #ocaml
Kakadu has joined #ocaml
sfri has joined #ocaml
orbifx-m has quit [Ping timeout: 256 seconds]
_andre has quit [Quit: leaving]
gjaldon has joined #ocaml
gjaldon has quit [Remote host closed the connection]
pierpa has quit [Ping timeout: 252 seconds]
veggie_ has joined #ocaml
sfri has quit [Remote host closed the connection]
copy` has quit [Quit: Connection closed for inactivity]
brunoro has joined #ocaml
brunoro has quit [Ping timeout: 240 seconds]
sfri has joined #ocaml
soupault has joined #ocaml
zpe has joined #ocaml
noddy has quit [Ping timeout: 256 seconds]
malc_ has quit [Quit: ERC (IRC client for Emacs 25.0.50.2)]
<soupault> yay, 4.04 in opam
veggie_ has quit [Ping timeout: 245 seconds]
noddy has joined #ocaml
brunoro has joined #ocaml
dmi3y has quit [Quit: dmi3y]
ryanartecona has quit [Quit: ryanartecona]
ryanartecona has joined #ocaml
soupault has quit [Remote host closed the connection]
brunoro has quit [Ping timeout: 265 seconds]
Algebr` has quit [Ping timeout: 258 seconds]
fre has joined #ocaml
veggie_ has joined #ocaml
veggie_ has quit [Quit: WeeChat 1.5]
nomicflux has joined #ocaml
troydm has quit [Ping timeout: 256 seconds]
AlexDeni_ has joined #ocaml
AlexDenisov has quit [Ping timeout: 260 seconds]
brunoro has joined #ocaml
brunoro has quit [Ping timeout: 260 seconds]
Simn has quit [Quit: Leaving]
th5 has quit [Remote host closed the connection]
MercurialAlchemi has quit [Ping timeout: 252 seconds]
Denommus has quit [Ping timeout: 260 seconds]
copy` has joined #ocaml
nahra has joined #ocaml
dakk has quit [Ping timeout: 258 seconds]
jnavila has quit [Remote host closed the connection]
zpe has quit [Remote host closed the connection]
zpe has joined #ocaml
djellemah has quit [Ping timeout: 244 seconds]
zpe has quit [Ping timeout: 244 seconds]
zpe has joined #ocaml
fre has quit [Quit: WeeChat 1.4]
brunoro has joined #ocaml
ryanartecona has quit [Quit: ryanartecona]
brunoro has quit [Ping timeout: 260 seconds]
zpe has quit [Remote host closed the connection]
zpe has joined #ocaml
zpe has quit [Ping timeout: 252 seconds]
Kakadu has quit [Remote host closed the connection]
silver_ has joined #ocaml
cpdean has quit [Quit: Leaving.]
agarwal1975 has quit [Quit: agarwal1975]
silver is now known as Guest82612
silver_ is now known as silver
ryanartecona has joined #ocaml
Guest82612 has quit [Ping timeout: 258 seconds]
noddy has quit [Ping timeout: 240 seconds]
djellemah has joined #ocaml
orbifx has joined #ocaml
<orbifx> any implementations of Set recommended over and above the std Set?
<companion_cube> probably not, they are quite good
AltGr has left #ocaml [#ocaml]
<orbifx> thank companion_cube
<orbifx> thanks*
ryanartecona has quit [Quit: ryanartecona]
octachron has quit [Quit: Leaving]
brunoro has joined #ocaml
brunoro has quit [Ping timeout: 250 seconds]
Anarchos has quit [Quit: Vision[0.9.7-H-20140108]: i've been blurred!]
zpe has joined #ocaml
zpe has quit [Ping timeout: 252 seconds]
nomicflux has quit [Quit: nomicflux]
cpdean has joined #ocaml
madroach has quit [Read error: Connection reset by peer]
noddy has joined #ocaml
nomicflux has joined #ocaml