adrien changed the topic of #ocaml to: Discussions about the OCaml programming language | http://www.ocaml.org | OCaml 4.09 release notes: https://caml.inria.fr/pub/distrib/ocaml-4.09/notes/Changes | Try OCaml in your browser: http://try.ocamlpro.com | Public channel logs at http://irclog.whitequark.org/ocaml
smazga has quit [Quit: leaving]
analogue has joined #ocaml
nicoo has quit [Ping timeout: 240 seconds]
nicoo has joined #ocaml
olle has quit [Ping timeout: 258 seconds]
analogue has quit [Quit: Leaving]
olle has joined #ocaml
Cypi has quit [Ping timeout: 265 seconds]
Cypi has joined #ocaml
spew has quit [Quit: Connection closed for inactivity]
nicolaus has joined #ocaml
<nicolaus> Hi, can I ask what database could be good for ocaml, in terms of latency? I want to be able to retrieve and write data fast.
<nicolaus> I am talking about single digit microseconds latency
sarna has quit [Quit: bye]
dx has quit [Remote host closed the connection]
klntsky_ has quit [Ping timeout: 240 seconds]
andreas303 has quit [Ping timeout: 240 seconds]
nicoo has quit [Ping timeout: 240 seconds]
cartwright has quit [Ping timeout: 240 seconds]
nopf has quit [Ping timeout: 260 seconds]
sarna has joined #ocaml
mbuf has joined #ocaml
tormen_ has joined #ocaml
tormen has quit [Ping timeout: 265 seconds]
nicoo has joined #ocaml
klntsky_ has joined #ocaml
cartwright has joined #ocaml
andreas303 has joined #ocaml
aiju has quit [Ping timeout: 252 seconds]
nopf has joined #ocaml
dx has joined #ocaml
mfp has quit [Ping timeout: 265 seconds]
aiju has joined #ocaml
cartwright has quit [Remote host closed the connection]
cartwright has joined #ocaml
nicolaus has quit [Quit: Lost terminal]
cartwright has quit [Read error: Connection reset by peer]
cartwright has joined #ocaml
nicolaus has joined #ocaml
<mbuf> Are there OCaml meetings that happen in this channel? I am interested to know when GitHub issues and PRs are discussed? Thanks!
sailor177354 has joined #ocaml
retropikzel has left #ocaml [#ocaml]
sailor177355 has joined #ocaml
sailor177354 has quit [Ping timeout: 260 seconds]
cthuluh_ has joined #ocaml
dborisog has joined #ocaml
cthuluh has quit [Ping timeout: 268 seconds]
freusque has quit [Ping timeout: 268 seconds]
fre2 has joined #ocaml
kvik has quit [Ping timeout: 240 seconds]
kvik has joined #ocaml
ggole has joined #ocaml
nicolaus has quit [Quit: Lost terminal]
hq1 has joined #ocaml
hq1 is now known as Guest16827
Guest16827 has quit [Client Quit]
Serpent7776 has joined #ocaml
bartholin has joined #ocaml
sailor177355 has quit [Ping timeout: 258 seconds]
bartholin has quit [Quit: Leaving]
kleisli has quit [Ping timeout: 265 seconds]
chindy has quit [Remote host closed the connection]
chindy has joined #ocaml
ollehar has joined #ocaml
mfp has joined #ocaml
nebulus has joined #ocaml
ygrek_ has joined #ocaml
nebulus has quit [Remote host closed the connection]
sailor177355 has joined #ocaml
mbuf has quit [Quit: Leaving]
dhil has joined #ocaml
nullifidian has joined #ocaml
nullifidian_ has quit [Ping timeout: 265 seconds]
TheLemonMan has joined #ocaml
z3n3 has quit [Quit: WeeChat 2.7]
z3n3 has joined #ocaml
ygrek_ has quit [Ping timeout: 265 seconds]
Haudegen has joined #ocaml
GreyFaceNoSpace has quit [Ping timeout: 268 seconds]
dhil has quit [Ping timeout: 248 seconds]
spew has joined #ocaml
GreyFaceNoSpace has joined #ocaml
<simpson> I'm trying to define a module that has a private exception type. I have a sum type already, `type 'a t = ...`
<simpson> And then I want to do `exception Thrown of 'a t`, I think. But alas, it is not permitted. Understandably so! What's the right thing to write in my .ml and .mli files?
sagax has quit [Quit: Konversation terminated!]
dhil has joined #ocaml
ygrek_ has joined #ocaml
<octachron> The problem is the parameter `'a` in `'a t`. Would you need to know the type `'a` after the exception is raised?
<simpson> I was hoping to instantiate the module with the type, akin to `type 'a t` kinds of shenanigans.
<simpson> I gather that, if I were to cram everything into one file, I could use a "locally abstract type"? I'm still reading about them.
<octachron> Wait, you want to define the exception for one specific type `something t`?
<simpson> Zooming out a bit, I'm trying to factor some exception-handling code into its own file. Originally I have something like `exception Thrown of my_object_system thrown`, with a concrete type.
sailor177355 has quit [Ping timeout: 240 seconds]
sagax has joined #ocaml
TheLemonMan has quit [Quit: "It's now safe to turn off your computer."]
<octachron> I fear that I cannot really guess what you are trying to refactor. Do you have few similar exceptions with a somewhat common handling? In this case, you may want to use a functor taking the exception definition as input.
def` has joined #ocaml
mahmudov has joined #ocaml
vicfred has quit [Ping timeout: 268 seconds]
Serpent7776 has quit [Quit: Leaving]
khodzha has joined #ocaml
ollehar has quit [Ping timeout: 265 seconds]
GreyFaceNoSpace has quit [Read error: Connection reset by peer]
GreyFaceNoSpace has joined #ocaml
narimiran has joined #ocaml
mahmudov has quit [Read error: No route to host]
mahmudov has joined #ocaml
ggole has quit [Quit: Leaving]
g0d_shatter has joined #ocaml
mahmudov has quit [Read error: No route to host]
TheLemonMan has joined #ocaml
mahmudov has joined #ocaml
Haudegen has quit [Quit: Bin weg.]
mahmudov has quit [Read error: No route to host]
mahmudov has joined #ocaml
vicfred has joined #ocaml
kleisli has joined #ocaml
dhil has quit [Ping timeout: 260 seconds]
dhil has joined #ocaml
FreeBirdLjj has joined #ocaml
smazga has joined #ocaml
<simpson> octachron: In this case, I'm factoring not to remove duplicated code, but to ensure isolation. I'd like for this module's exception handling to be contained to the module.
FreeBirdLjj has quit [Ping timeout: 265 seconds]
<octachron> Then you can just remove the exception from the interface
ygrek_ has quit [Ping timeout: 258 seconds]
<simpson> I'm only defining it in the .ml file, not the .mli, but that doesn't seem to suffice.
cranix has joined #ocaml
<cranix> hello
<cranix> i'm using fedora
<cranix> i have installed ocamlgraph-devel package using dnf
<cranix> and i'm not able to load it to repl
<cranix> i'm using utop
<cranix> #require "topfind";;
<cranix> #use "graph";
<cranix> not found
<cranix> i tried to load ocamlgraph and also failed
<octachron> You need `#require "ocamlgraph"`
<companion_cube> it's #use "topfind";; #require "ocamlgraph";;
<octachron> simpson, if the exception is not defined in the interface, then it cannot be used directly from outside the module.
<simpson> octachron: That would be the hope, yes. I'm trying to isolate the control-flow subsystem for an interpreter for a programming language. I would very much like it if the module's interface were the only way to manage user-level exceptions.
<octachron> So, in the end, you don't have any issues?
kleisli has quit [Ping timeout: 268 seconds]
<simpson> No, in the end, my issue hasn't changed at all. It sounds like your recommendation is to just not do what I want to do.
<cranix> thanks
<cranix> Nou such package: ocamlgraph
<octachron> I have no idea what is your issue with removing the exception from the interface. You might want to describe your issue a little more precisely.
<octachron> cranix, I imagine that you don't have opam installed?
haesbaert has quit [Ping timeout: 240 seconds]
<simpson> octachron: Precision isn't the problem; the problem is that I'm not sure how to appease the type system. Precisely, I want this module, but in OCaml instead of Python: https://github.com/monte-language/typhon/blob/master/typhon/objects/ejectors.py
GreyFaceNoSpace has quit [Quit: Ex-Chat]
<cranix> octachron: u have installed opam
<cranix> but used dnf
kleisli has joined #ocaml
<octachron> Then the question is which ocaml are you using?
<octachron> simpson, I still don't have any idea of what is your issue. What did you try?
<cranix> ocaml --version
<cranix> toplevel 4.07.0
<octachron> "ocamlc -where" should be a little more informative
<cranix> /usr/lib64/ocaml
<cranix> this is what it returned
<octachron> simpson, if you don't have a mli file, the compiler uses the inferred interface where every types and definitions is available and transparent
<simpson> octachron: In that repository, there is already a state.ml and state.mli for one factored-out piece; I am attempting to now factor out this other piece, concerned with ejectors and exceptions.
g0d_shatter has quit [Ping timeout: 265 seconds]
<octachron> cranix, so you are using the system ocaml. Maybe the confusion is at the ocamlfind level, what does "which ocamlfind" say?
<octachron> (note that if you have opam installed, I would advise to use it to install libraries)
<cranix> ~/.opam/default/bin/ocamlfind
<cranix> right
<cranix> i can try to install it via opa,
<cranix> *opam
<cranix> but i'm afraid of making mess in my system
<cranix> something will be updated by dnf something else by opam
<cranix> and then versions of packages will start to be incompatibile...
kleisli has quit [Ping timeout: 268 seconds]
<octachron> If you are doing development in OCaml, it makes sense to only use opam: you can use more recent versions, and the installed ocaml libraries are only available to the dev's user.
dhil has quit [Ping timeout: 260 seconds]
<cranix> octachron: thanks
<cranix> i will try with opam
g0d_shatter has joined #ocaml
ygrek_ has joined #ocaml
kleisli has joined #ocaml
<cranix> what is current state of parallelism in ocaml?
<cranix> i read that this is not obvious
<cranix> i will be solving problem that will benefit from algorithm forking itself and recursively following on smaller parts of task
bartholin has joined #ocaml
ygrek_ has quit [Ping timeout: 268 seconds]
tane has joined #ocaml
dborisog has quit [Ping timeout: 265 seconds]
g0d_shatter has quit [Ping timeout: 268 seconds]
<octachron> cranix, the runtime has a global lock like python. Thus process level parallelism works. Concurrency works too. But not thread-level parallelism.
<cranix> octachron: thanks for information
<cranix> why it has global lock?
<cranix> i was thinking that being functional language it would be rather doable to have thread level parallelism
<companion_cube> the GC.
<companion_cube> it's hard to make a good parallel GC
<cranix> ok
<cranix> i understood
kakadu has joined #ocaml
g0d_shatter has joined #ocaml
<cranix> i'm looking for simple example of persistent graphs in ocamlgraph
<cranix> examples contain only mutable graph
<cranix> i'm trying to read testing code
<cranix> but it is a little hard to follow...
g0d_shatter has quit [Read error: Connection reset by peer]
g0d_shatter has joined #ocaml
kleisli has quit [Ping timeout: 240 seconds]
kleisli has joined #ocaml
narimiran has quit [Ping timeout: 258 seconds]
g0d_shatter has quit [Ping timeout: 268 seconds]
kakadu__ has joined #ocaml
kakadu has quit [Ping timeout: 258 seconds]
g0d_shatter has joined #ocaml
ygrek_ has joined #ocaml
ygrek_ has quit [Ping timeout: 272 seconds]
tane has quit [Quit: Leaving]
mahmudov has quit [Ping timeout: 258 seconds]
ygrek_ has joined #ocaml
kleisli has quit [Remote host closed the connection]
kleisli has joined #ocaml
ygrek_ has quit [Ping timeout: 268 seconds]
ArthurStrong has joined #ocaml
g0d_shatter has quit [Ping timeout: 268 seconds]
mahmudov has joined #ocaml
philtor has quit [Ping timeout: 260 seconds]
kamog has joined #ocaml
kakadu__ has quit [Remote host closed the connection]
spew has quit [Quit: Connection closed for inactivity]
Haudegen has joined #ocaml
Hrundi_V_Bakshi has joined #ocaml
TheLemonMan has quit [Ping timeout: 258 seconds]
mahmudov has quit [Remote host closed the connection]
rcabaco has quit [Ping timeout: 245 seconds]
philtor has joined #ocaml
fantasticsid has joined #ocaml
smazga has quit [Ping timeout: 265 seconds]