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