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
penguwin has quit [Quit: NO CARRIER]
penguwin has joined #ocaml
malc_ has quit [Ping timeout: 256 seconds]
Hrundi_V_Bakshi has quit [Ping timeout: 256 seconds]
muskan has quit [Ping timeout: 245 seconds]
spew has quit [Quit: Connection closed for inactivity]
Haudegen has quit [Ping timeout: 240 seconds]
dhil has quit [Ping timeout: 240 seconds]
malc_ has joined #ocaml
heredoc has quit [Quit: ZNC - http://znc.in]
jmorris has joined #ocaml
mbuf has joined #ocaml
nullcone has joined #ocaml
osa1 has joined #ocaml
mfp has quit [Ping timeout: 260 seconds]
malc_ has quit [Ping timeout: 256 seconds]
malc_ has joined #ocaml
mbuf has quit [Ping timeout: 260 seconds]
oni-on-ion has quit [Ping timeout: 244 seconds]
waleee-cl has quit [Quit: Connection closed for inactivity]
narimiran has joined #ocaml
oni-on-ion has joined #ocaml
oni-on-ion has quit [Ping timeout: 256 seconds]
mbuf has joined #ocaml
osa1 has quit [Ping timeout: 246 seconds]
jmorris has quit [Remote host closed the connection]
vicfred has quit [Quit: Leaving]
bartholin has joined #ocaml
jbrown has joined #ocaml
Serpent7776 has joined #ocaml
decentpenguin has quit [Read error: Connection reset by peer]
decentpenguin has joined #ocaml
ggole has joined #ocaml
<Leonidas> flux1: yes
osa1 has joined #ocaml
malc_ has quit [Ping timeout: 265 seconds]
dckc has quit [Ping timeout: 260 seconds]
dckc has joined #ocaml
nullcone has quit [Quit: Connection closed for inactivity]
malc_ has joined #ocaml
<defolos> hey folks, could someone tell me what this syntax means: `(name * filter filter_or_constraint OpamFormula.formula) OpamFormula.formula`?
<defolos> the part in the brackets is a tuple, but what about the `OpamFormula.formula`, how does that relate to this tuple?
<flux1> first there is a tuple where the first part is of type 'name' and the second part is composed of two polymorphic types; first filter is a parameter to filter_or_constraint and then that is a parameter to formula. then all this is a parameter again to formula.
<flux1> it's like: (string * int list) list but with a bit different types
<flux1> an example of that would be [("hello", [4; 2]); ("world", [1; 2])]
<defolos> oh wow, I'll need another coffee for my brain to process that
<defolos> thanks flux[m] for the explanation!
<flux1> good luck :)
<flux1> I suggest you use the interactive repl for playing with those types
<flux1> ..or an editor that can give type feedback
<defolos> I'm already playing around with that in utop
<defolos> and still need to setup emacs correctly
waleee-cl has joined #ocaml
webshinra has quit [Remote host closed the connection]
osa1 has quit [Quit: osa1]
mfp has joined #ocaml
<alehander92> is utop
<alehander92> good
eureton has joined #ocaml
eureton has quit [Read error: Connection reset by peer]
eureton has joined #ocaml
<defolos> yes
mbuf has quit [Quit: Leaving]
heredoc has joined #ocaml
Haudegen has joined #ocaml
andreas303 has quit [Ping timeout: 240 seconds]
andreas303 has joined #ocaml
dhil has joined #ocaml
eureton has quit [Ping timeout: 244 seconds]
eureton has joined #ocaml
oriba has joined #ocaml
_whitelogger has joined #ocaml
malc_ has quit [Ping timeout: 240 seconds]
mbuf has joined #ocaml
oriba has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
jco has joined #ocaml
<jco> Hello!
<jco> We've defined a library with dune and would like to create two subdirectories within this library
<jco> are there any examples on how to structure this?
malc_ has joined #ocaml
dckc has quit [Ping timeout: 256 seconds]
dckc has joined #ocaml
eureton has quit [Ping timeout: 260 seconds]
<d_bot> <craigfe> As far as I know, this isn't possible with Dune. All modules in a library must be in the same directory.
<d_bot> <craigfe> My usual approach is to have subdirectories be a new OCamlfind library intended only for internal use, but this is unpleasant.
waleee-cl has quit [Quit: Connection closed for inactivity]
stux|RC has quit [Quit: Aloha!]
spew has joined #ocaml
stux|RC has joined #ocaml
tane has joined #ocaml
<jco> thanks craigfe!
<alehander92> should i use dune
<alehander92> for creating a new project (a binary+src files)
<companion_cube> if you're starting a project? sure
webshinra has joined #ocaml
muskan has joined #ocaml
toppo has joined #ocaml
zebrag has quit [Quit: Konversation terminated!]
<alehander92> and is property testing
<alehander92> big in ocaml?
<companion_cube> hmmm, it's used
<companion_cube> not sure if it's as big as in haskell, but it's a thing
<alehander92> i found QCheck
<alehander92> it's cool that it supports trees well, this seems good enough for many case
<companion_cube> I mean, it give you tools to write generators, including trees, yes :)
zebrag has joined #ocaml
jbrown has quit [Ping timeout: 246 seconds]
<jco> given a mutable datastructure (hashtable), how can we use it between different modules?
muskan has quit [Remote host closed the connection]
<jco> we have functions which process this datastructure in one module, and those functions are in turn called in another module
<companion_cube> do you pass the hashtable as an argument to the functions?
<jco> yes
muskan has joined #ocaml
<companion_cube> so I don't see the problem :s
<companion_cube> hashtables are just values
<jco> yeah, so the functions will mutate the variable
jbrown has joined #ocaml
<jco> the hashtable in this case
<companion_cube> yep
<jco> okay, good
<alehander92> do you guys
<jco> it's because so far I didn't used mutable variables in my ocaml programs
<alehander92> debug ocaml often
<alehander92> or is it hard to hit strange runtime behavior
<alehander92> i guess print/trace debugging is good enough for smaller projects
<companion_cube> jco: so, variables in OCaml are never mutable
<companion_cube> only *values* are (like array, ref, hashtable)
<jco> oh thanks for the distinction
zebrag has quit [Quit: Konversation terminated!]
<alehander92> dude ocamldebugger prompt is `oce`
<alehander92> ocd
<alehander92> i hope perfection is not expected by the user (but `#trace` seems cool enough)
zebrag has joined #ocaml
nkly has quit [Ping timeout: 256 seconds]
oriba has joined #ocaml
<oriba> I wonder about this kind of notation: Mymodule.(functionname parameters)
<oriba> where to find this in the refman?
<oriba> Is this some kind of shortcut?
<jco> oriba: it's a local open
<oriba> (newer syntax extension?)
<oriba> jco: aha ok. So syntctic sugar...
<jco> it's part of the language
<jco> yes!
kanishka has joined #ocaml
<oriba> ok, thx
<jco> it's a shorter version of let open MyModule in ...
<jco> np :)
kanishka has quit [Client Quit]
kanishka has joined #ocaml
kanishka has quit [Client Quit]
oriba has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
osa1 has joined #ocaml
<flux1> it's documented at: http://caml.inria.fr/pub/docs/manual-ocaml/expr.html#ss%3Aexpr-other (last one)
osa1 has quit [Ping timeout: 240 seconds]
<alehander92> do you guys use interning
<alehander92> like, does ocaml intern strings internally: i want to write a compiler and thought that most idents
<alehander92> would not change, so it makes sense to just use symbols mapping to the original strings
<alehander92> but i wondered if this is needed at all if ocaml optimizes them
<ggole> No, you'll have to implement that sort of thing yourself
<zozozo> It's also usually referred to as "hashconsing" from my experience
<companion_cube> hashconsing only makes sense when you have nice recursive structure ;)
<zozozo> That might be easier too use when searching for ocaml package that provide this kind of thing
<zozozo> companion_cube: well, hashconsing strings is also useful sometimes
<alehander92> ahh
<alehander92> is it something like what clojure does
<companion_cube> zozozo: in which case it's generally called 'interning' in most languages
<companion_cube> but there's no notion of "cons" :)
<alehander92> i think interning is easier, as it's just direct mapping (thanks ggole zozozo)
<malc_> hashconsing was useful when i was marshaling strings (a lot of them) back in 2001
<alehander92> but if i know most of my strings would stay the same
<alehander92> e.g. a compiler which just passes different variants of the same tree many times
<alehander92> in a pipeline
<ggole> It's the sort of thing I would add only after everything is working
<def> (and if you just reuse the string values, you might already have a lot of sharing... the benefits will come from accelerated comparison)
jco has quit [Quit: WeeChat 2.8]
narimiran has quit [Ping timeout: 240 seconds]
Hrundi_V_Bakshi has joined #ocaml
<alehander92> yeah but the other parts will change
<alehander92> maybe i should keep it simple
osa1 has joined #ocaml
toppo has quit [Remote host closed the connection]
toppo has joined #ocaml
malc_ has quit [Ping timeout: 265 seconds]
osa1 has quit [Ping timeout: 265 seconds]
osa1 has joined #ocaml
vicfred has joined #ocaml
dhil has quit [Ping timeout: 256 seconds]
toppo has quit [Remote host closed the connection]
toppo has joined #ocaml
malc_ has joined #ocaml
malc_ has quit [Remote host closed the connection]
muskan has quit [Remote host closed the connection]
waleee-cl has joined #ocaml
nullcone has joined #ocaml
muskan has joined #ocaml
mbuf has quit [Quit: Leaving]
dhil has joined #ocaml
muskan has quit [Remote host closed the connection]
muskan has joined #ocaml
rockethead has joined #ocaml
rockethead has quit [Remote host closed the connection]
andreas303 has quit [Remote host closed the connection]
andreas303 has joined #ocaml
vicfred has quit [Read error: Connection reset by peer]
vicfred has joined #ocaml
toppo has quit [Remote host closed the connection]
toppo has joined #ocaml
toppo has quit [Remote host closed the connection]
osa1 has quit [Ping timeout: 264 seconds]
madroach_ has quit [Ping timeout: 256 seconds]
taharqa has quit [Read error: Connection reset by peer]
vicfred has quit [Quit: Leaving]
taharqa has joined #ocaml
narimiran has joined #ocaml
rwmjones has quit [Quit: ZNC - 1.6.0 - http://znc.in]
rwmjones has joined #ocaml
ggole has quit [Quit: Leaving]
vicfred has joined #ocaml
amiloradovsky has joined #ocaml
tobiasBora2 has quit [Ping timeout: 256 seconds]
narimiran has quit [Ping timeout: 260 seconds]
muskan has quit [Ping timeout: 245 seconds]
tobiasBora2 has joined #ocaml
rockethead has joined #ocaml
rockethead has quit [Quit: rockethead]
vicfred has quit [Quit: Leaving]
waleee-cl has quit [Quit: Connection closed for inactivity]
andreas303 has quit [Remote host closed the connection]
andreas303 has joined #ocaml
tane has quit [Quit: Leaving]
Hrundi_V_Bakshi has quit [Ping timeout: 260 seconds]
Haudegen has quit [Ping timeout: 256 seconds]
vicfred has joined #ocaml
Jesin has quit [Quit: Leaving]