companion_cube changed the topic of #ocaml to: Discussions about the OCaml programming language | http://www.ocaml.org | OCaml 4.11 release notes: https://caml.inria.fr/pub/distrib/ocaml-4.11/notes/Changes | Try OCaml in your browser: http://try.ocamlpro.com | Public channel logs at http://irclog.whitequark.org/ocaml
<d_bot> <rgrinberg> for ocaml-lsp-server to work properly, it needs access to the build environment and all installed libraries
<d_bot> <rgrinberg> So when you run `emacs .`, it launches ocam-lsp-server that is unable to see the ocnfiguration.
mjvoge02 has quit [Quit: Updating details, brb]
madgen_ has joined #ocaml
<d_bot> <inkbottle> For the sake of being thorough I'm trying to reproduce the steps described above; and it doesn't work.
<d_bot> <inkbottle> With a newly cloned opium,
<d_bot> <inkbottle> `esy install` is okay, but then `esy build` fails with `The following recquired C libraries are missing: libev.` which doesn't seem like a good reason, since I've just done the same thing less than 2 hours ago in a sibling directory.
<d_bot> <inkbottle> okay, this second attempt is with a git version 4 commits newer.
<d_bot> <inkbottle> And there is some meddling with `libev` between those 2 commits.
Tuplanolla has quit [Ping timeout: 256 seconds]
<d_bot> <inkbottle> ```bash
<d_bot> <inkbottle> rm -rf _esy/ esy.lock/ node_modules/
<d_bot> <inkbottle> git checkout cc66bde8f8dbf901
<d_bot> <inkbottle> esy install
<d_bot> <inkbottle> esy build
<d_bot> <inkbottle> esy b dune build @install```
<d_bot> <inkbottle> This time every steps worked fine (maybe there are too many steps, but anyway.)
<d_bot> <inkbottle> Then, `esy emacs .&`, and opening `opium.ml` as mentioned above.
<d_bot> <inkbottle> (This time I haven't added `ocaml-lsp-server` to the `dune-project` dependencies; the visible `ocaml-lsp-server` is the one from the default opam switch.)
<d_bot> <inkbottle> Result is squiggles and poor mouse-hovering information.
<d_bot> <inkbottle> So it might be the case that it is necessary to add `ocaml-lsp-server` to the `dune-project` dependencies (to avoid some inconsistencies).
amiloradovsky has quit [Remote host closed the connection]
amiloradovsky1 has joined #ocaml
amiloradovsky1 is now known as amiloradovsky
ygrek has quit [Remote host closed the connection]
<d_bot> <rgrinberg> You should definitely not add lsp server to the dune project file. If you want it in the sandbox, add it in your esy config
mxns has quit [Ping timeout: 272 seconds]
mxns has joined #ocaml
borne has quit [Ping timeout: 264 seconds]
dhil has quit [Ping timeout: 260 seconds]
mxns has quit [Ping timeout: 240 seconds]
mxns has joined #ocaml
mxns has quit [Quit: ZNC 1.8.2 - https://znc.in]
mxns has joined #ocaml
mxns has quit [Ping timeout: 264 seconds]
mxns has joined #ocaml
mxns has quit [Ping timeout: 264 seconds]
mxns has joined #ocaml
mxns has quit [Ping timeout: 260 seconds]
mxns has joined #ocaml
mxns has quit [Ping timeout: 256 seconds]
ygrek has joined #ocaml
mxns has joined #ocaml
mxns has quit [Ping timeout: 260 seconds]
Ekho has quit [Ping timeout: 244 seconds]
Ekho has joined #ocaml
mxns has joined #ocaml
Haudegen has quit [Ping timeout: 265 seconds]
nullcone has quit [Quit: Connection closed for inactivity]
mxns has quit [Ping timeout: 264 seconds]
mfp has quit [Ping timeout: 256 seconds]
mxns has joined #ocaml
jayesh-bhoot has joined #ocaml
<jayesh-bhoot> Hello. Can js_of_ocaml be loaded in utop? I tried `#require js_of_ocaml;;`, but utop quits with an error `Unimplemented Javascript primitive caml_pure_js_expr!`. It looks like I might have to #require something else before jsoo, but no clue what.
delysin has joined #ocaml
stan[m] has quit [*.net *.split]
h11 has quit [*.net *.split]
cbarrett has quit [*.net *.split]
d_bot has quit [*.net *.split]
penguwin has quit [*.net *.split]
chewbranca has quit [*.net *.split]
mgsk has quit [*.net *.split]
strmpnk has quit [*.net *.split]
heredoc has quit [*.net *.split]
heredoc has joined #ocaml
<jayesh-bhoot> My other guess is that utop doesnt provide JS runtime, hence doesnt provide JS primitives. So it cant load jsoo.
kvik has quit [Ping timeout: 264 seconds]
kvik has joined #ocaml
stan[m] has joined #ocaml
d_bot has joined #ocaml
cbarrett has joined #ocaml
chewbranca has joined #ocaml
mgsk has joined #ocaml
strmpnk has joined #ocaml
h11 has joined #ocaml
penguwin has joined #ocaml
penguwin has quit [Max SendQ exceeded]
penguwin has joined #ocaml
d_bot has quit [Remote host closed the connection]
d_bot has joined #ocaml
urek has quit [Ping timeout: 272 seconds]
<d_bot> <inkbottle> Right, that definitely makes sense.
ggole has joined #ocaml
lizzin has joined #ocaml
nullcone has joined #ocaml
ygrek has quit [Remote host closed the connection]
narimiran has joined #ocaml
waleee-cl has quit [Quit: Connection closed for inactivity]
<d_bot> <inkbottle> Since no `package.json` file is generated from `dune-project` file during the install I cannot merely amend it. Also the install process works so well just the way it is. I'll have to find a way to add just the extra dependencies without disturbing everything. Like "hybrid": 90% coming from `dune-project`, and 10% from some other `esy` config, and you don't have to mix them together manually beforehand.
<d_bot> <inkbottle> (It was very easy to add that directly to the `dune-project` file, even though it was quite silly when you think about it.)
<d_bot> <inkbottle> Maybe something like `esy build opam install somepackage` could have the expected result (of installing the opam package in the correct place in the sandbox, and not just somewhere else).
<d_bot> <rgrinberg> nah. don't mix opam and esy
<d_bot> <rgrinberg> choose one or the other
amiloradovsky has quit [Remote host closed the connection]
amiloradovsky has joined #ocaml
decentpenguin has quit [Read error: Connection reset by peer]
decentpenguin has joined #ocaml
osa1 has quit [Quit: osa1]
osa1 has joined #ocaml
amiloradovsky has quit [Remote host closed the connection]
seliopou has quit [Ping timeout: 256 seconds]
seliopou has joined #ocaml
Haudegen has joined #ocaml
Tuplanolla has joined #ocaml
narimiran has quit [Ping timeout: 240 seconds]
dborisog has joined #ocaml
hnOsmium0001 has quit [Quit: Connection closed for inactivity]
dborisog has quit [Ping timeout: 240 seconds]
urek has joined #ocaml
waleee-cl has joined #ocaml
bartholin has joined #ocaml
jnavila has joined #ocaml
_whitelogger has joined #ocaml
mfp has joined #ocaml
narimiran has joined #ocaml
webshinra has quit [Read error: Connection reset by peer]
mcginleyr1_ has joined #ocaml
webshinra has joined #ocaml
urek__ has joined #ocaml
mcginleyr1 has quit [Ping timeout: 272 seconds]
urek has quit [Ping timeout: 272 seconds]
adi_________ has quit [Ping timeout: 272 seconds]
mcginleyr1_ is now known as mcginleyr1
adi__________ has joined #ocaml
heredoc has quit [Ping timeout: 272 seconds]
Enjolras has quit [Ping timeout: 246 seconds]
heredoc has joined #ocaml
oni-on-ion has quit [Read error: Connection reset by peer]
Enjolras has joined #ocaml
borne has joined #ocaml
urek has joined #ocaml
urek__ has quit [Ping timeout: 240 seconds]
dhil has joined #ocaml
nullcone has quit [Quit: Connection closed for inactivity]
madroach has quit [Ping timeout: 272 seconds]
<d_bot> <ostera> Hello folks! due to unforeseen forces of nature I'm writing bindings to tree-sitter, through the `ocaml.rs` project
<d_bot> <ostera> (I gave ctypes a shot but i couldn't get anything running 🤷‍♂️ )
<d_bot> <ostera> but I'm having some trouble building the final executable
bartholin has quit [Ping timeout: 256 seconds]
<d_bot> <ostera> the error I'm getting looks like this: https://gist.github.com/ostera/a279d81b549649fe743606749687f303
<d_bot> <ostera> (not inlining because, well, irc)
<d_bot> <ostera> from the looks on that .S file, I see a rather odd but valid instruction: `@GOTPCREL(%rip)`: https://gist.github.com/ostera/654b164a21cd547eb09997c7b976141a#file-camlasmf24ff5-s-L41
<d_bot> <ostera> and I see it one other time a few lines below where it reads: `camlStdlib@GOTPCREL(%rip), %rax`
<d_bot> <ostera> my _guess_ from the error and the .S file, is that line 41 is _missing something_ before the instruction, eg. instead of `@GOTPCREL`, it should read like `camlStdlib@GOTPCREL`
bartholin has joined #ocaml
<hannes> ostera: reminds me of https://github.com/ocaml/ocaml/issues/7666
<d_bot> <ostera> thanks @hannes -- after starting again (maybe I did something wrong that I can't remember) I can't replicate anymore 🤷‍♂️
<d_bot> <ostera> I am curious tho if the `foreign_archives` stanza doesn't retrigger rules that produce the necessary .a / .so files
<d_bot> <ostera> e.g, if I run `dune clean`, my cargo built .a files go away
<d_bot> <ostera> an immediate `dune exec ./test.exe` _doesn't know the .a files are gone_
<d_bot> <ostera> even tho the library the executable depends on is using the `foreign_archives`
<d_bot> <ostera> and that I have a rule that generates the targets expected by `foreign_archives`
<d_bot> <ostera> maybe I need an additional rule to make the dependency explicit?
sonologico has joined #ocaml
sonologico has quit [Remote host closed the connection]
borne has quit [Ping timeout: 272 seconds]
bartholin has quit [Ping timeout: 265 seconds]
madroach has joined #ocaml
bartholin has joined #ocaml
<d_bot> <Drup> wee, finally managed to configure github action to automatically push docs, that was much harder than I though it would be X_x
<d_bot> <joris> @ostera shameless plug but did you try rust ocaml derive?
<d_bot> <joris> Long time I didn't check this project I should probably update it but I find it smoother than using ctypes
<Armael> nowadays I'd even use manual C bindings over using ctypes :/
<d_bot> <ostera> ```ocaml
<d_bot> <ostera> λ m
<d_bot> <ostera> dune build .
<d_bot> <ostera> Entering directory '/home/ostera/repos/github.com/AbstractMachinesLab/caramel'
<d_bot> <ostera> Done: 41/45 (jobs: 1)dune exec ./tests/main.exe
<d_bot> <ostera> Entering directory '/home/ostera/repos/github.com/AbstractMachinesLab/caramel'
<d_bot> <ostera> Done: 0/0 (jobs: 1)Entering directory '/home/ostera/repos/github.com/AbstractMachinesLab/caramel'
<d_bot> <ostera> tree-sitter v12
<d_bot> <ostera> old parser timeout in micros is: 0
<d_bot> <ostera> new parser timeout in micros is: 2112
<d_bot> <ostera> Getting sexp language...OK
<d_bot> <ostera> Language version: 12
<d_bot> <ostera> Setting language...make: *** [Makefile:5: build] Segmentation fault (core dumped)
<d_bot> <ostera> ```
<d_bot> <ostera>
<d_bot> <ostera> @joris this is slowly coming along, its definitely got its cycle problems (cargo keeps complaining that dune made some fails not writeable 🤷‍♂️ )
<d_bot> <ostera> but otherwise its very nice!
<d_bot> <joris> (initially I wrote rust ocaml derive for perf reason because it is much faster to write / read ocaml from rust than the opposite but also for practicality. I got tired of writing c like rust then ocaml bindings to the c like api meaning writing two bindings instead of one
<d_bot> <ostera> i see
<d_bot> <joris> Of course if there is already c api it is much easier but ocmal has sum types rust also has sum types
<d_bot> <ostera> yeah, i'm a lot more comfortable with rust than c tbh
<d_bot> <joris> But ctypes you have to go though awkward encoding of values
<companion_cube> And layers of code generation
neiluj has joined #ocaml
neiluj has joined #ocaml
borne has joined #ocaml
bartholin has quit [Ping timeout: 265 seconds]
<d_bot> <joris> Isn't there already two tree sitter bindings BTW?
<d_bot> <joris> They are not in good shape?
<d_bot> <ostera> there's a grammar for OCaml written in tree-sitter here: https://github.com/tree-sitter/tree-sitter-ocaml
<d_bot> <joris> I thought there was at least one binding in reason written by oni team. And another one
webshinra has quit [Read error: Connection reset by peer]
DanC has quit [Ping timeout: 244 seconds]
<d_bot> <ostera> I missed the oni bindings, they are here: https://github.com/onivim/oni2/tree/master/src/reason-tree-sitter
<d_bot> <mnxn> No idea how usable the bindings are
<d_bot> <ostera> having a look! 🙌
DanC has joined #ocaml
webshinra has joined #ocaml
<d_bot> <ostera> this is a much more involved approach, where the the raw tree-sitter grammar is used to generate ocaml source code, so you don't have to manually traverse the concrete syntax tree to build up a tree in ocaml
<d_bot> <ostera> i'll give it a shot and see where it is
bartholin has joined #ocaml
andreas303 has quit [Ping timeout: 240 seconds]
andreas303 has joined #ocaml
andreas303 has quit [Remote host closed the connection]
andreas303 has joined #ocaml
opweiqw has joined #ocaml
Jeanne-Kamikaze has joined #ocaml
lizzin has quit [Ping timeout: 264 seconds]
bartholin has quit [Remote host closed the connection]
bartholin has joined #ocaml
Anarchos has joined #ocaml
<d_bot> <Lupus> is it possible to hide type parameter so that my final type qualifies for abstract `type t` in module signature? 🤔 GADT may be?
<companion_cube> type t = Foo : 'a list -> t
<companion_cube> for example
<companion_cube> that's a GADT indeed
<d_bot> <Lupus> (some background: augmenting some type with phantom variables to encode some business logic, but there are places where I don't care about phantom variables and just need anything)
<d_bot> <Lupus> cool, I'll try to play with that
<companion_cube> you could put `_` for the phantom variable
urek__ has joined #ocaml
webshinra has quit [Remote host closed the connection]
urek has quit [Ping timeout: 272 seconds]
<d_bot> <Lupus> `type t = _ bar` does not work
<companion_cube> ah!yeah no you need to wrap it then.
<d_bot> <Lupus> already did, looks like this magic works 🙂 does that make me GADT user now? 😂
<companion_cube> yep!
<d_bot> <Lupus> awesome! thanks @companion_cube 🤘
<companion_cube> 🖖
lizzin has joined #ocaml
lizzin is now known as Guest58942
Guest58942 is now known as lizzin
lizzin is now known as Guest26312
bartholin has quit [Ping timeout: 256 seconds]
Guest26312 has quit [Changing host]
Guest26312 has joined #ocaml
webshinra has joined #ocaml
Guest26312 is now known as lizzin
ggole has quit [Quit: Leaving]
berberman has quit [Ping timeout: 264 seconds]
berberman has joined #ocaml
bartholin has joined #ocaml
<lizzin> Where do you set the location of ocamllsp within the vscode ocaml-platform extension?
<lizzin> ...I am getting an 'ocamllsp not found' error. but a `which ocamllsp` shows that it is in my opam dir
<d_bot> <theangryepicbanana> lizzin: add the directory to your PATH. that worked for me
narimiran has quit [Quit: leaving]
lizzin has quit [Ping timeout: 256 seconds]
<haesbaert> ssh naiad
<haesbaert> oops
jimt[m] has quit [Ping timeout: 240 seconds]
kanishkaa[m] has quit [Ping timeout: 240 seconds]
Manis[m] has quit [Ping timeout: 244 seconds]
aterius has quit [Ping timeout: 244 seconds]
jayesh-bhoot has quit [Ping timeout: 246 seconds]
loxs[m] has quit [Ping timeout: 246 seconds]
ptival[m] has quit [Ping timeout: 246 seconds]
mmohammadi9812 has quit [Ping timeout: 246 seconds]
motherfsck has quit [Ping timeout: 272 seconds]
h11 has quit [Ping timeout: 244 seconds]
stan[m] has quit [Ping timeout: 244 seconds]
pqwy[m] has quit [Ping timeout: 240 seconds]
dash has quit [Ping timeout: 244 seconds]
BitPuffin has quit [Ping timeout: 268 seconds]
camlriot42 has quit [Ping timeout: 240 seconds]
lnxw37d4 has quit [Ping timeout: 264 seconds]
aspiwack[m] has quit [Ping timeout: 244 seconds]
flux has quit [Ping timeout: 268 seconds]
labor[m] has quit [Ping timeout: 240 seconds]
peddie has quit [Ping timeout: 272 seconds]
motherfsck has joined #ocaml
hnOsmium0001 has joined #ocaml
lizzin has joined #ocaml
lizzin is now known as Guest16654
Guest16654 is now known as lizzin
lizzin has quit [Changing host]
lizzin has joined #ocaml
<lizzin> d_bot: which path? does vscode's path? the .opam dir is already in in my shells path
bartholin has quit [Ping timeout: 240 seconds]
h11 has joined #ocaml
mmohammadi9812 has joined #ocaml
jayesh-bhoot has joined #ocaml
loxs[m] has joined #ocaml
ptival[m] has joined #ocaml
camlriot42 has joined #ocaml
Manis[m] has joined #ocaml
peddie has joined #ocaml
kanishkaa[m] has joined #ocaml
jimt[m] has joined #ocaml
stan[m] has joined #ocaml
BitPuffin has joined #ocaml
aspiwack[m] has joined #ocaml
aterius has joined #ocaml
bartholin has joined #ocaml
labor[m] has joined #ocaml
dash has joined #ocaml
lnxw37d4 has joined #ocaml
flux has joined #ocaml
pqwy[m] has joined #ocaml
Anarchos has quit [Quit: Vision[0.10.3]: i've been blurred!]
urek__ has quit [Ping timeout: 246 seconds]
neiluj has quit [Quit: leaving]
aaaaaa has joined #ocaml
lizzin has quit [Ping timeout: 240 seconds]
Jeanne-Kamikaze has quit [Ping timeout: 240 seconds]
madroach has quit [Quit: leaving]
motherfsck has quit [Ping timeout: 264 seconds]
webshinra has quit [Remote host closed the connection]
motherfsck has joined #ocaml
urek__ has joined #ocaml
motherfsck has quit [Remote host closed the connection]
bartholin has quit [Remote host closed the connection]
webshinra has joined #ocaml
jnavila has quit [Quit: Konversation terminated!]
lizzin has joined #ocaml
lizzin is now known as Guest3460
Guest3460 is now known as lizzin
lizzin has quit [Changing host]
lizzin has joined #ocaml
mrvn has quit [Ping timeout: 264 seconds]
motherfsck has joined #ocaml
mrvn has joined #ocaml
oriba has joined #ocaml
mxns has quit [Ping timeout: 272 seconds]
mxns has joined #ocaml
Haudegen has quit [Ping timeout: 272 seconds]
Haudegen has joined #ocaml
mxns has quit [Ping timeout: 246 seconds]
vicfred has quit [Quit: Leaving]