00:04
hlisp_ has quit [Remote host closed the connection]
00:08
hlisp has joined #ocaml
00:12
hlisp has quit [Ping timeout: 240 seconds]
00:21
olle_ has quit [Ping timeout: 264 seconds]
00:36
hlisp has joined #ocaml
00:50
rosterok has quit [Quit: Connection closed for inactivity]
00:53
Anarchos has quit [Ping timeout: 256 seconds]
01:10
ygrek has joined #ocaml
01:36
mfp has quit [Ping timeout: 256 seconds]
02:07
dborisog has joined #ocaml
02:20
ansiwen has joined #ocaml
02:51
pigeonv has quit [Ping timeout: 260 seconds]
03:08
ygrek has quit [Ping timeout: 272 seconds]
03:26
hlisp has quit [Remote host closed the connection]
03:27
hlisp has joined #ocaml
03:32
hlisp has quit [Remote host closed the connection]
03:51
hlisp has joined #ocaml
03:53
hlisp has quit [Remote host closed the connection]
03:58
hlisp has joined #ocaml
04:09
_whitelogger has joined #ocaml
04:10
taharqa has quit [Ping timeout: 256 seconds]
04:11
hlisp has quit [Remote host closed the connection]
04:11
taharqa has joined #ocaml
04:16
hlisp has joined #ocaml
04:18
narimiran has joined #ocaml
04:20
hlisp has quit [Ping timeout: 246 seconds]
04:26
hlisp has joined #ocaml
04:35
muskan has quit [Ping timeout: 245 seconds]
04:36
cranix has quit [Ping timeout: 260 seconds]
04:37
cranix has joined #ocaml
04:40
hlisp has quit [Ping timeout: 260 seconds]
04:42
mbuf has joined #ocaml
04:45
hlisp has joined #ocaml
04:49
hlisp has quit [Ping timeout: 246 seconds]
04:55
hlisp has joined #ocaml
04:59
kleisli has quit [Remote host closed the connection]
04:59
hlisp has quit [Ping timeout: 256 seconds]
05:00
kleisli has joined #ocaml
05:00
jao has quit [Ping timeout: 246 seconds]
05:10
hlisp has joined #ocaml
05:22
hlisp has quit [Ping timeout: 256 seconds]
05:32
hlisp has joined #ocaml
05:37
hlisp has quit [Ping timeout: 246 seconds]
06:05
hlisp has joined #ocaml
06:09
muskan has joined #ocaml
06:09
muskan has left #ocaml [#ocaml]
06:59
sagax has joined #ocaml
07:06
amiloradovsky has joined #ocaml
07:06
Haudegen has joined #ocaml
07:19
<
def >
something like (menhir (modules short_parser))
07:23
<
mbuf >
def, the upstream code examples only has the (rule ...) declaration
07:29
<
def >
because this was a common rule it is now builtin in dune
08:32
hlisp has quit [Remote host closed the connection]
08:33
hlisp has joined #ocaml
09:51
clockish has quit [Quit: bye]
09:51
clockish has joined #ocaml
09:51
mfp has joined #ocaml
10:08
olle__ has joined #ocaml
10:46
nullcone has quit [Quit: Connection closed for inactivity]
11:15
pigeonv has joined #ocaml
12:30
ggole has joined #ocaml
12:43
vicfred has quit [Remote host closed the connection]
12:43
vicfred has joined #ocaml
13:01
Haudegen has quit [Quit: Bin weg.]
13:10
raver has quit [Remote host closed the connection]
13:13
terrorjack___ has quit []
13:14
terrorjack has joined #ocaml
13:21
raver has joined #ocaml
13:50
jao has joined #ocaml
14:01
hlisp has quit [Remote host closed the connection]
14:12
Haudegen has joined #ocaml
14:26
ferd has joined #ocaml
14:27
tane has joined #ocaml
14:28
ygrek has joined #ocaml
14:32
Anarchos has joined #ocaml
14:48
amiloradovsky1 has joined #ocaml
14:48
amiloradovsky has quit [Ping timeout: 260 seconds]
14:48
amiloradovsky1 is now known as amiloradovsky
14:52
jao has quit [Ping timeout: 246 seconds]
14:52
hlisp has joined #ocaml
15:02
amiloradovsky has quit [Remote host closed the connection]
15:03
amiloradovsky has joined #ocaml
15:14
olle__ has quit [Ping timeout: 256 seconds]
15:20
amiloradovsky has quit [Ping timeout: 260 seconds]
15:26
amiloradovsky has joined #ocaml
15:40
hlisp_ has joined #ocaml
15:40
hlisp has quit [Ping timeout: 272 seconds]
15:52
hlisp_ has quit [Remote host closed the connection]
16:21
Anarchos has quit [Quit: Vision[0.10.3]: i've been blurred!]
16:34
Haudegen has quit [Quit: Bin weg.]
16:40
Anarchos has joined #ocaml
16:49
ggole has quit [Quit: Leaving]
16:54
nullcone has joined #ocaml
16:58
<
companion_cube >
how is -custom supposed to work exactly? where does ocamlc look for the .a or .so to pack in the binary?
16:58
<
companion_cube >
cause LD_LIBRARY_PATH doesn't seem to be enough
16:58
<
companion_cube >
(unless dune removes it, but I hope not)
17:26
jao has joined #ocaml
17:29
olle_ has joined #ocaml
17:31
theglass has joined #ocaml
17:31
theglass has quit [Changing host]
17:31
theglass has joined #ocaml
17:37
Haudegen has joined #ocaml
17:46
mbuf has quit [Quit: Leaving]
17:50
<
def >
it calls the C linker
17:51
<
companion_cube >
but it doesn't pass the env variables I think
17:51
<
def >
I don't think the linker looks in LD_LIBRARY_PATH
17:52
<
def >
by default it look for runtime library in the standard_library path (look at the output of ocamlc -config)
17:53
Anarchos has quit [Quit: Vision[0.10.3]: i've been blurred!]
17:53
<
def >
-verbose also help to see how the linker is invoked
18:00
gareppa has joined #ocaml
18:01
gareppa has quit [Remote host closed the connection]
18:04
muskan has joined #ocaml
18:04
amiloradovsky has quit [Ping timeout: 260 seconds]
18:17
theglass has joined #ocaml
18:17
theglass has quit [Changing host]
18:17
theglass has joined #ocaml
18:36
jbrown has quit [Ping timeout: 272 seconds]
18:39
<
companion_cube >
yeah so we're missing things in ocamlfind paths :)
18:39
<
companion_cube >
the stdlib path doesn't get very far
18:51
jbrown has joined #ocaml
18:55
pigeonv has quit [Ping timeout: 244 seconds]
19:08
pigeonv has joined #ocaml
19:11
<
olle_ >
what's the type of +?
19:11
<
olle_ >
as in addition
19:12
<
companion_cube >
int -> int -> int
19:15
<
olle_ >
and `=` is 'a -> 'a -> bool ?
19:16
<
companion_cube >
yeah
19:16
<
companion_cube >
it's compiler magic though
19:16
<
olle_ >
no fancy SystemF PhD paper?
19:16
<
olle_ >
wait, no type-classes in OCaml
19:22
<
pigeonv >
values are dynamically inspected
19:22
muskan has quit [Remote host closed the connection]
19:23
muskan has joined #ocaml
19:23
<
olle_ >
Also: Some 3 > Some 2 --> true
19:25
<
pigeonv >
when you test a=b, a and b must have the same type
19:26
<
pigeonv >
values that fit into a single machine word are easy to compare
19:26
<
olle_ >
what companion_cube meant is, compare to +. and -. etc
19:27
<
olle_ >
Compiler magic --> use same `=` for all types
19:27
<
olle_ >
Normally not possible in OCaml
19:27
<
pigeonv >
it's a nasty hack
19:27
<
olle_ >
"nasty" is too strong :)
19:27
<
pigeonv >
blocks are dynamically inspected
19:27
<
pigeonv >
as long as you don't compare closures
19:27
<
pigeonv >
then, chaos ensues
19:28
<
pigeonv >
(actually you just get an exception)
19:29
dborisog has quit [Ping timeout: 256 seconds]
19:29
<
pigeonv >
anyway, it's not decidable whether two arbitrary functions are equal
19:30
<
reynir >
what's the name for ( = ) : 'a -> 'b -> bool
19:30
<
reynir >
(not in OCaml)
19:30
<
companion_cube >
heterogeneous equality?
19:30
<
reynir >
there's a funny nickname
19:31
<
Armael >
JMeq in dependent type theory
19:31
<
olle_ >
OK, so my function `run_operation op lval rval` does not work to run twice with different arguments.
19:32
<
olle_ >
I assume 'a evaluates to something and cannot be changed later during compilation?
19:32
<
pigeonv >
it happens with '_a
19:32
<
pigeonv >
(weak polymorphic types)
19:32
<
olle_ >
what's the solution?
19:33
<
olle_ >
let me google...
19:33
<
pigeonv >
sometimes they come from partially applied functions
19:34
<
pigeonv >
for example, List.map (fun x -> x) has type '_a list -> '_a list
19:34
<
olle_ >
Explicitly polymorphic annotations?
19:34
<
reynir >
John Major equality
19:35
<
Armael >
reynir: yeah
19:35
<
pigeonv >
nice name
19:36
<
olle_ >
run_if_operation (op : 'a -> 'a -> bool) (content : 'a) (value : 'a) : string =
19:37
<
reynir >
how does it not work?
19:37
<
olle_ >
reynir: running it twice with different 'a
19:38
<
olle_ >
I want `>` for int, and `=` for string and int
19:38
<
pigeonv >
'a in your signature isn't polymorphic
19:38
<
olle_ >
ok, so where to put 'a. ?
19:38
<
olle_ >
syntax is not clear for me
19:39
<
olle_ >
But they write functions a little bit differently
19:39
<
olle_ >
ok, let me test
19:40
<
pigeonv >
let f : 'a. op:('a -> 'a -> bool) -> ... ?
19:41
<
olle_ >
pigeonv: yes, works now!
19:41
<
olle_ >
had to rewrite function signature like in the examples
19:42
<
pigeonv >
it's a bit unpractical, but yeah
19:42
<
pigeonv >
and 'a doesn't always mean the same thing
19:43
<
pigeonv >
this is valid: let f (x : 'a) = 2 * x
19:43
<
pigeonv >
'a unifies with int
19:45
<
pigeonv >
if you want to compare things with different types,
19:45
<
pigeonv >
maybe you could just tag them
19:45
<
olle_ >
no, this is less code
19:45
<
octachron >
If you want to use a function argument with different argument you need to put it in a polymorphic record field: "type comp = { f: 'a. 'a -> 'a -> bool }"
19:46
<
pigeonv >
oh, right, I thought about using run_if_operation multiple times
19:46
<
pigeonv >
but that's not the point... sorry
19:47
<
olle_ >
'a. worked fine
19:55
Jesin has quit [Quit: Leaving]
20:01
Jesin has joined #ocaml
20:04
narimiran has quit [Ping timeout: 272 seconds]
20:09
Jesin has quit [Quit: Leaving]
20:13
Jesin has joined #ocaml
21:06
<
olle_ >
- #9232: allow any class type paths in #-types,
21:06
<
olle_ >
What's #-type?
21:06
<
olle_ >
val f: #F(X).t -> unit
21:06
<
olle_ >
Functor stuff?
21:09
<
olle_ >
wait, someone already asked on reddit
21:14
nullcone has quit [Quit: Connection closed for inactivity]
21:17
<
Drup >
object/polymorphic-variant stuff :p
21:18
<
companion_cube >
the day I see `#F(X).t ` in a codebase is the day I quit :D
21:22
<
Drup >
we've both done worse.
21:22
<
Drup >
well, maybe mostly me
21:23
<
companion_cube >
:DDDDD
21:23
<
companion_cube >
maybe mostly you indeed
21:24
<
Drup >
don't sell yourself short, I believe in you :D
21:24
<
companion_cube >
I use some GADTs, but few functors, remember? :p
21:24
<
companion_cube >
(well at least not higher order functors, as you were saying earlier)
21:25
<
octachron >
And honestly the "feature" is mostly here because it makes the syntax more logical and easier to describe in the manual.
21:33
<
olle_ >
I'd like to try typestate with phantom types wrapped in monad
21:33
<
olle_ >
Gasche described that many years ago in a stackoverflow thread.
21:33
<
olle_ >
But it's late, sleep
21:33
<
companion_cube >
o/
21:47
tane has quit [Quit: Leaving]
22:12
hlisp has joined #ocaml
22:50
jao has quit [Remote host closed the connection]
22:54
nullcone has joined #ocaml
23:00
Haudegen has quit [Quit: No Ping reply in 180 seconds.]
23:01
Haudegen has joined #ocaml
23:02
jao has joined #ocaml
23:41
muskan has quit [Ping timeout: 245 seconds]
23:45
Haudegen has quit [Ping timeout: 264 seconds]