00:00
orbifx has quit [Ping timeout: 248 seconds]
00:54
waleee has quit [Ping timeout: 248 seconds]
01:21
rgrinberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
02:50
chrisz has quit [Ping timeout: 268 seconds]
02:52
chrisz has joined #ocaml
03:00
rgrinberg has joined #ocaml
03:11
rgrinberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
03:40
rgrinberg has joined #ocaml
04:07
spip has quit [Ping timeout: 248 seconds]
04:07
spip has joined #ocaml
04:22
John_Ivan has quit [Ping timeout: 256 seconds]
04:32
dh` has quit [Ping timeout: 252 seconds]
04:37
mbuf has joined #ocaml
05:04
williewillus_ has quit [Quit: Leaving]
05:14
azimut has quit [Ping timeout: 268 seconds]
05:33
gopiandc1 has quit [Read error: Connection reset by peer]
05:34
zebrag has quit [Quit: Konversation terminated!]
05:39
gopiandc1 has joined #ocaml
05:48
rgrinberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
05:50
gopiandc1 has quit [Ping timeout: 248 seconds]
05:51
gopiandc1 has joined #ocaml
06:38
dh` has joined #ocaml
06:43
Serpent7776 has joined #ocaml
07:08
dh` has quit [Changing host]
07:08
dh` has joined #ocaml
07:16
adanwan_ has quit [Read error: Connection reset by peer]
07:17
adanwan has joined #ocaml
07:23
gopiandc1 has quit [Ping timeout: 252 seconds]
07:24
gopiandc1 has joined #ocaml
07:28
bartholin has joined #ocaml
07:30
olle has joined #ocaml
07:37
<
Leonidas >
I am porting a project to dune and the author has asked me to put the Makefile bits back and holy shit is is a lot of code that also does a way worse job building (e.g. spewing artifacts all over the source tree)
08:27
<
sim642 >
Sounds fun
08:27
<
sim642 >
I recently also ported some Makefile stuff to dune fully (instead of having dune run make...)
08:29
<
sim642 >
It can be a bit rough though because dune doesn't allow declaring targets in different directories
08:30
gopiandc1 has quit [Ping timeout: 256 seconds]
08:31
gopiandc1 has joined #ocaml
08:52
trev has joined #ocaml
09:48
orbifx has joined #ocaml
10:03
<
pgiarrusso >
sim642: dune allows at least declaring targets in subfolders
10:04
<
pgiarrusso >
You need (subdir name (rule …))
10:06
<
sim642 >
That's declaring a rule in a subdir, not a target of a rule in the current dir to be in a subdir
11:20
orbifx has quit [Quit: orbifx]
11:28
Serpent7776 has quit [Ping timeout: 248 seconds]
11:30
dnh has joined #ocaml
11:39
Techcable has quit [Remote host closed the connection]
11:41
Techcable has joined #ocaml
11:46
Serpent7776 has joined #ocaml
12:22
gopiandc1 has quit [Ping timeout: 256 seconds]
12:23
gopiandc1 has joined #ocaml
12:51
Everything has joined #ocaml
13:11
oriba has joined #ocaml
13:25
Everything has quit [Quit: leaving]
13:51
xgqt has quit [Ping timeout: 248 seconds]
13:52
xgqt has joined #ocaml
14:17
jtm has quit [Ping timeout: 268 seconds]
14:18
jtm has joined #ocaml
14:21
trev has quit [Remote host closed the connection]
14:45
azimut has joined #ocaml
15:01
Haudegen has joined #ocaml
15:17
<
olle >
Error: Unknown field inline_tests
15:17
<
olle >
Did opam install ppx_inline_test
15:17
<
olle >
Anything else I should do?
15:25
<
olle >
Hm, also "Error: ppx_inline_test: extension is disabled because the tests would be ignored (the build system didn't pass -inline-test-lib)"
15:25
<
olle >
No reasonable google result found
15:25
<
companion_cube >
did you add a `(preprocess ` instruction?
15:25
<
olle >
Added all info here ^
15:26
<
companion_cube >
ah then no idea
15:26
<
companion_cube >
should be in the docs of ppx_inline_test no?
15:26
<
olle >
Can check that
15:27
<
olle >
Maybe the problem is that I have my test in a separate folder than the library?
15:27
<
olle >
So top line is not (library ..., but (test ...
15:28
<
olle >
Guess I could move the test to the lib folder, won't matter for me
15:37
gwizon has joined #ocaml
16:01
John_Ivan has joined #ocaml
16:06
bobo_ has joined #ocaml
16:06
spip has quit [Ping timeout: 256 seconds]
16:08
szkl has quit [Quit: Connection closed for inactivity]
16:18
<
olle >
Nice, new error message. "Error: No inline tests backend found.
16:18
<
olle >
Getting "closer"
16:20
<
olle >
Oh, it works, but don't know why :d
16:20
<
olle >
Error: This expression has type ('a * Cstruct.t, Asn.error) Result.result
16:20
<
reynir >
likely it's not a problem if I upgrade, but there's a package constraining the versions
16:21
<
olle >
Result.result is abstract because no corresponding cmi file was found in path.
16:21
<
olle >
Is that the problem, being abstract?
16:21
<
reynir >
I think so
16:22
<
reynir >
As far as I can tell they're both Stdlib.result
16:22
<
companion_cube >
do you use the dune option to remove implicit dependencies?
16:24
rgrinberg has joined #ocaml
16:24
<
reynir >
It's in x509.0.11.2. I don't know
16:24
<
reynir >
Anyway it turns out I don't need x509.. \o/
16:27
Serpent7776 has quit [Quit: WeeChat 1.9.1]
16:42
Haudegen has quit [Ping timeout: 256 seconds]
17:18
Tuplanolla has joined #ocaml
17:23
Serpent7776 has joined #ocaml
17:38
azimut has quit [Ping timeout: 268 seconds]
18:02
<
olle >
5 [%test_eq:int] 1 1
18:02
<
olle >
Error: Unbound value sexp_of_int
18:02
<
olle >
[%test_eq: int] 1 1, looks trivial enough? What's wrong?
18:09
<
olle >
Also, can I make a dune library contain multiple files?
18:11
azimut has joined #ocaml
18:12
<
companion_cube >
a library can contain many modules, sure
18:13
<
olle >
companion_cube: Hmmm, can't seem to find them from my bin/main.ml file :/ Only the "main" module.
18:13
<
companion_cube >
if the main moduel hsa the same name as the library, you need to re-export from it
18:13
<
companion_cube >
it acts like __lib__.py or lib.rs or whatever, if present
18:15
<
olle >
companion_cube: What's "re-export"?
18:15
<
olle >
Oh, include or something?
18:16
<
companion_cube >
typically, `module Foo = Foo`, or include, or `let x = Foo.x`, etc.
18:17
<
olle >
Lemme try that
18:17
<
olle >
Works, thanks \o/
18:20
dwt_ has quit [Ping timeout: 252 seconds]
18:22
<
olle >
OK, so Menhir question
18:22
<
olle >
All my program must start with `<?php // @pholyglot`, but I don't want it to be a token, or add it to the AST
18:24
<
olle >
Perhaps it works
18:25
mbuf has quit [Quit: Leaving]
18:30
<
olle >
This seems to work
18:30
<
olle >
68 | s=START_SCRIPT d=list(declaration); EOF {Declaration_list d}
18:30
<
olle >
Just don't use s after ;
18:39
rgrinberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
18:41
rgrinberg has joined #ocaml
18:41
azimut has quit [Remote host closed the connection]
18:42
<
olle >
It's a token, but not added to the ast
18:42
azimut has joined #ocaml
18:48
<
olle >
OK, new error :)
18:48
<
olle >
Error: PTyp expected
18:48
<
olle >
In [%test_eq program]
18:48
<
olle >
The program type is missing some ppx thingy so it can be compared in tests?
18:49
<
companion_cube >
what is "program" here? an expression?
18:49
<
olle >
companion_cube: It's the ast type, actually
18:49
<
companion_cube >
ah wait. maybe it does need equal_program?
18:50
<
olle >
companion_cube: ppx_compare?
18:54
<
companion_cube >
or write it yourself probably
18:54
<
companion_cube >
I don't use this ppx, really, I have no idea
18:55
<
olle >
Ehm, how do I [@@derive two things]?
18:55
azimut has quit [Ping timeout: 268 seconds]
18:56
<
companion_cube >
[@@derive foo, bar]
18:57
<
olle >
Oh, list type does not derive compare... :|
18:57
azimut has joined #ocaml
18:59
<
companion_cube >
hmm any deriver worth its salt should know `list`
18:59
<
olle >
Apparently, I need ppx_compare_lib for base types
19:01
Anarchos has joined #ocaml
19:03
<
olle >
Still same PTyp error ><
19:06
azimut has quit [Remote host closed the connection]
19:06
azimut has joined #ocaml
19:07
<
olle >
Meh, syntax error, my bad
19:10
<
Anarchos >
weird, in merlin i always get file_perm instead of int
19:11
<
companion_cube >
they're aliases
19:12
<
olle >
* No agreement on the version of ocaml:
19:12
<
olle >
The OCaml toplevel, version 4.14.0
19:12
<
sim642 >
Probably another thing for the opam "hard to understand conflict" issue
19:12
<
companion_cube >
you sure you `eval $(opam env)` ? if so, is it an old OCaml
19:13
<
olle >
It says I have ocaml 4.14 installed
19:13
<
olle >
After doing the eval
19:13
<
olle >
sim642: link?
19:14
<
Anarchos >
companion_cube i know they are alias, but i prefer to see types as int-> ... instead of file_perm ->....
19:14
<
sim642 >
I think the issue now links to a discussion where more are being collected
19:15
<
sim642 >
Anarchos, I think it's just merlin picking the "closest" name for the type
19:16
<
sim642 >
Have you used "open Unix" to bring it into scope?
19:17
<
Anarchos >
sim642 yes
19:17
<
Anarchos >
sim642 maybe i should use rather Unix.XXX syntax instead of opening it
19:20
<
olle >
[ERROR] undefined filter variable in dependencies of catala.0.7.0: catalaz3mode
19:20
<
companion_cube >
hmm, not to me
19:21
<
sim642 >
olle, I think there was an issue about it, I saw someone asking recently
19:21
<
companion_cube >
in doubt, check on ocaml/opam-repository
19:29
Anarchos has quit [Quit: Vision[]: i've been blurred!]
19:29
<
olle >
sim642: Thanks
19:29
<
olle >
Never had problems with opam before :d
19:31
<
olle >
Nah, probably another error causing my build to break
19:32
<
olle >
- ppx_sexp -> ocaml
19:32
Anarchos has joined #ocaml
19:32
<
olle >
Which version is ppx_sexp assuming with "ocaml" here??
19:32
<
olle >
- downgrade ocaml 4.14.0 to 4.02.3 [required by ppx_sexp]
19:33
<
olle >
This downgraded is needed for ppx_sexp
19:33
<
Anarchos >
olle you got your eureka moment...
19:34
<
olle >
ppx_sexp is the wrong package, facepalm
19:34
<
olle >
ppx_sexp_conv
19:37
<
olle >
Holy smoke, it works x|
19:37
<
olle >
Painful setup
19:37
<
olle >
And lots of details missing from realworldocaml
19:39
<
olle >
Thanks for all help
19:41
<
reynir >
good old 4.02.3
19:43
<
companion_cube >
:DDDDD
19:43
<
companion_cube >
that's one version too low even for me
19:45
rgrinberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
19:45
<
olle >
And my first compiler test ever now runs <3
19:46
<
olle >
For my previous project, I never wrote any tests, and to come back 6 months later, having no idea where I was...
19:46
<
Anarchos >
olle compiler test ?
19:46
<
olle >
Anarchos: My own compiler, not OCaml compiler :)
19:46
<
olle >
or transpiler*
19:47
<
Anarchos >
olle ok :) i am working on the tiger compiler from the Andrew Appel book 'modern compiler implementation' , when i have time
19:47
<
olle >
Anarchos: Good book?
19:47
<
olle >
I only ever read one book on compilers, in Java lul
19:47
<
olle >
Then the OCaml LLVM tutorial
19:48
<
Anarchos >
olle yes good one
19:48
<
olle >
Can I motivate such a read on office hours... :d
19:53
<
olle >
So, should I do opam lock now...?
19:53
<
companion_cube >
probably… if you made it work
19:56
Anarchos has quit [Quit: Vision[]: i've been blurred!]
19:56
Anarchos has joined #ocaml
19:57
<
olle >
Hm, what am I locking? I want to "freeze" my dev env in this project
19:58
<
companion_cube >
should lock all the opam libraries that you use
19:59
<
olle >
companion_cube: I can't use my dune-project file for that?
20:00
<
olle >
opam lock <package name from dune-project>
20:01
<
Anarchos >
olle opam pin ?
20:01
<
companion_cube >
no, I think it needs to use the opam files
20:01
<
companion_cube >
but you can generate these from dune-project 😅
20:02
<
olle >
companion_cube: nice, how? or link?
20:10
nerdypepper has quit [Quit: bye]
20:10
nerdypepper has joined #ocaml
20:27
Anarchos has quit [Quit: Vision[]: i've been blurred!]
20:36
hrberg has joined #ocaml
20:39
waleee has joined #ocaml
20:40
rgrinberg has joined #ocaml
20:42
olle has quit [Ping timeout: 256 seconds]
20:57
neiluj has joined #ocaml
21:00
<
neiluj >
Hey! Got a C stub that executes two nested for loops and prints the product of their indices, but it crashes when I run dune test
21:00
<
neiluj >
keeping only one loop with a print works on the other hand
21:01
<
neiluj >
do you have some ideas on what to look at to hopefully fix this nasty issue?
21:02
<
neiluj >
also noticed that the C function is called a lot of time, even though it is called once in the OCaml code
21:08
<
neiluj >
oh, the C function happens to be also called a lot of time even if the Ocaml call to the C function is commented
21:22
azimut has quit [Remote host closed the connection]
21:23
azimut has joined #ocaml
21:28
gwizon has quit [Ping timeout: 252 seconds]
21:40
jpds has quit [Remote host closed the connection]
21:41
jpds has joined #ocaml
21:48
jpds has quit [Remote host closed the connection]
21:49
jpds has joined #ocaml
21:56
<
sleepydog >
neiluj: is your stub large? could you pastebin it?
22:20
Serpent7776 has quit [Quit: leaving]
22:25
<
neiluj >
sleepydog, somewhat, and depends on a specific C library
22:25
<
neiluj >
it turns out that removing parameters doesn't make the ocaml program crash
22:26
<
neiluj >
from 5 arguments to 1 for the C stub
22:28
<
neiluj >
since valgrind doesn't work with dune test, I guess I should make an executable and then run it with valgrind, but I'm not familiar with that
22:29
<
neiluj >
removing arguments (CAMLParams) also reduces the number of prints so the number of calls to the C function
22:32
<
neiluj >
thanks for helping with this stuff, I'll try to debug with valigrind by crafting an executable, that should give the error
22:55
bartholin has quit [Quit: Leaving]
23:05
Haudegen has joined #ocaml
23:11
Tuplanolla has quit [Ping timeout: 252 seconds]