companion_cube changed the topic of #ocaml to: Discussion about the OCaml programming language | http://www.ocaml.org | OCaml 4.14.0 released: https://ocaml.org/releases/4.14.0.html | Try OCaml in your browser: https://try.ocamlpro.com | Public channel logs at https://libera.irclog.whitequark.org/ocaml/
Soni has quit [Ping timeout: 256 seconds]
<d_bot> <atlx> Hi, everything was working fine im my project until LLVM now released v14. Now I tried to build my project: `dune build` but I was getting "LLVM not found error," so anyways I update with `opam update && opam upgrade` and now it says LLVM package installation failed
<d_bot> <atlx> Any ideas?
<d_bot> <atlx> $ llvm-config --version # Verify active LLVM version.
<d_bot> <Tom> Hi, I have the following use case for parallel programming in OCaml for which I have no previous experience. I have two functions computing the same thing but using a different method. I would like to run them both in parallel (truly parallel, not concurrently), wait for the first that finishes, and return the result. Could this be achieved easily using some of the existing libraries?
riverdc has quit [Quit: quitting]
raskol has joined #ocaml
raskol has quit [Ping timeout: 240 seconds]
waleee has joined #ocaml
xd1le has joined #ocaml
bobo_ has joined #ocaml
spip has quit [Ping timeout: 268 seconds]
Soni has joined #ocaml
waleee has quit [Ping timeout: 244 seconds]
rgrinberg has joined #ocaml
jpds1 has quit [Remote host closed the connection]
jpds1 has joined #ocaml
<d_bot> <jumpnbrownweasel> prior to Ocaml 5.0 (called multi-core Ocaml, in the works), parallelism is only possible with multiple processes, see: <https://ocamlverse.github.io/content/parallelism.html#parallelism>
<d_bot> <jumpnbrownweasel> or i guess you could try OCaml 5.0 since it is in alpha
terrorjack has quit [Quit: The Lounge - https://thelounge.chat]
terrorjack has joined #ocaml
jpds1 has quit [Ping timeout: 268 seconds]
jpds1 has joined #ocaml
Sankalp has quit [Ping timeout: 256 seconds]
Sankalp has joined #ocaml
TakinOver has joined #ocaml
rgrinberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
azimut has quit [Ping timeout: 268 seconds]
wagle has quit [*.net *.split]
leah2 has quit [*.net *.split]
greenbagels has quit [*.net *.split]
tristanC has quit [*.net *.split]
x88x88x has quit [*.net *.split]
dwt_ has quit [*.net *.split]
v0idpwn has quit [*.net *.split]
wagle has joined #ocaml
v0idpwn has joined #ocaml
greenbagels has joined #ocaml
leah2 has joined #ocaml
greenbagels has quit [Changing host]
greenbagels has joined #ocaml
dwt_ has joined #ocaml
rom1504 has quit [*.net *.split]
bgs has quit [*.net *.split]
megeve has quit [*.net *.split]
JSharp has quit [*.net *.split]
x88x88x has joined #ocaml
rom1504 has joined #ocaml
bgs has joined #ocaml
Serpent7776 has quit [Quit: leaving]
JSharp has joined #ocaml
megeve has joined #ocaml
tristanC has joined #ocaml
mbuf has joined #ocaml
mro has joined #ocaml
olle has joined #ocaml
Haudegen has joined #ocaml
mro has quit [Quit: Leaving...]
mro has joined #ocaml
leah2 has quit [Quit: trotz alledem!]
leah2 has joined #ocaml
bcw has joined #ocaml
kakadu has joined #ocaml
bastienleonard has joined #ocaml
mro has quit [Quit: Leaving...]
bartholin has joined #ocaml
waleee has joined #ocaml
Haudegen has quit [Quit: Bin weg.]
yilin has joined #ocaml
<yilin> \test
<yilin> Oops. @geoff unfortunately I wanted to use the output of a program as an argument; using the generated file works fine. I'm doing the slightly hacky approach of writing the output to the file and then using `${file:read}` which is working but a bit odd.
<d_bot> <cheeze> hello, how do i inspect the type of `( <- )`. in the ocaml toplevel, i can do things like `( * )` and then it will give me `- : int -> int -> int = <fun>`. but when i do `( <- )`, it's a syntax error
<d_bot> <leviroth> I don't think `( <- )` is a function
Haudegen has joined #ocaml
<d_bot> <cheeze> is it just a keyword
<d_bot> <cheeze> like `|`
<d_bot> <leviroth> Yeah
<d_bot> <cheeze> the reason why i asked is because
<d_bot> <cheeze> my vscode actually shows this when i hover over the arrow
<sim642> That's more about the indexing
<d_bot> <cheeze> ohhhhhh
<d_bot> <cheeze> wait, wouldn't indexing only be `int array -> int -> int`
<sim642> Although <- is also for mutable record fields
<d_bot> <NULL> You can't override the default value of `( .()<- )` so you can't access it as an operator name
<sim642> ^ the index and assign are combined
<d_bot> <cheeze> ohhh i see, that whole thing is the operator
<d_bot> <NULL> But you can define (and inspect) `( .%()<- )` (where `%` can be replaced by a lot of things)
<d_bot> <cheeze> i see, thank you
<d_bot> <NULL> (and `( .%() )` for the indexing operator)
spip has joined #ocaml
<d_bot> <cheeze> what are some examples where % is replaced?
<d_bot> <cheeze> what do i replace it with?
bobo_ has quit [Ping timeout: 240 seconds]
<d_bot> <NULL> % is already a valid example, but any string fitting the grammar nonterminal `dot-ext` in the page I linked will work
<sim642> The indexops page gives the exact characters that you can use for a custom indexing operator
<sim642> They aren't used very much though
<d_bot> <cheeze> oh i got it, thank you
<sim642> AFAIK the owl library is the most prominent user of custom indexing operators
<d_bot> <cheeze> oke, i will check it out after i finish with this book
Sankalp has quit [Ping timeout: 240 seconds]
Sankalp has joined #ocaml
Sankalp has quit [Ping timeout: 260 seconds]
Sankalp has joined #ocaml
bacam has quit [Quit: upgrade]
<d_bot> <cheeze> is it not allowed to have records and data types together like so?
<d_bot> <cheeze> ```ocaml
<d_bot> <cheeze> type colour = Red | Yellow | Green | { hex : int }
<d_bot> <cheeze> ```
<d_bot> <NULL> `type colour = Red | Yellow | Green | Hex of { hex : int }`
<d_bot> <NULL> You always need a constructor in a sum type
<d_bot> <cheeze> oh oke thanks
yilin has quit [Ping timeout: 240 seconds]
<sim642> Although... if the fields of inline records were distinct, it technically would be possible to distinguish them without a constructor
<sim642> It would be a terrible idea though
Anarchos has joined #ocaml
bcw has quit [Quit: WeeChat 1.9.1]
motherfsck has joined #ocaml
<d_bot> <cheeze> oh you mean Hex of int? yeah that works too but the example that i gave was a contrived one
waleee has quit [Ping timeout: 244 seconds]
<d_bot> <leviroth> How would that work?
<d_bot> <leviroth> You mean like distinguish them at compile time, but still generate a variant tag to distinguish them at runtime?
bartholin has quit [Quit: Leaving]
bartholin has joined #ocaml
motherfsck has quit [Ping timeout: 272 seconds]
yilin has joined #ocaml
bobo_ has joined #ocaml
spip has quit [Ping timeout: 272 seconds]
waleee has joined #ocaml
azimut has joined #ocaml
kakadu_ has joined #ocaml
kakadu has quit [Ping timeout: 272 seconds]
rgrinberg has joined #ocaml
bacam has joined #ocaml
motherfsck has joined #ocaml
Haudegen has quit [Quit: Bin weg.]
rgrinberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
szkl has joined #ocaml
Sankalp has quit [Ping timeout: 272 seconds]
Sankalp has joined #ocaml
rgrinberg has joined #ocaml
Serpent7776 has joined #ocaml
Anarchos has quit [Quit: Vision[]: i've been blurred!]
Haudegen has joined #ocaml
yilin has quit [Ping timeout: 260 seconds]
sagax has quit [Remote host closed the connection]
yilin has joined #ocaml
lnxw37 has joined #ocaml
TakinOver has quit [Ping timeout: 276 seconds]
lnxw37 has quit [Ping timeout: 260 seconds]
mbuf has quit [Quit: Leaving]
sagax has joined #ocaml
<yilin> Hi, is there any particular policies about what would be accepted into the Unix bindings of stdlib? There are a few calls which I'd like to use but don't exist yet (in particular `shm_open` for `mmap`).
<haesbaert> it's POSIX so it's probably at least open for discussion
<haesbaert> might be too niche though
<haesbaert> there is always this: https://github.com/ygrek/extunix
yilin has quit [Ping timeout: 260 seconds]
noddy has quit [Quit: WeeChat 3.5]
dextaa has quit [Read error: Connection reset by peer]
dextaa has joined #ocaml
dextaa has quit [Read error: Connection reset by peer]
dextaa has joined #ocaml
remexre has quit [Ping timeout: 255 seconds]
remexre has joined #ocaml
<d_bot> <Bluddy> what's the easiest way to use things like deriving_ppx with functor applications such as stdlib's Set?
<d_bot> <Bluddy> deriving_sexp, specifically
noddy has joined #ocaml
<d_bot> <Bluddy> is there no easy solution?
yilin has joined #ocaml
<sim642> Define your own Set.Make extension that implements the function you want
<companion_cube> or a functor that takes a Set.S and adds the required functions?
<sim642> If it's structural, then the element module needs the function too, not just OrderedType
motherfsck has quit [Ping timeout: 240 seconds]
motherfsck has joined #ocaml
xd1le has quit [Quit: xd1le]
yilin has quit [Ping timeout: 260 seconds]
Sankalp has quit [Ping timeout: 276 seconds]
bartholin has quit [Quit: Leaving]
bartholin has joined #ocaml
Sankalp has joined #ocaml
raskol has joined #ocaml
dnh has joined #ocaml
bartholin has quit [Quit: Leaving]
azimut has quit [Ping timeout: 268 seconds]
omegatron has quit [Quit: Power is a curious thing. It can be contained, hidden, locked away,and yet it always breaks free.]
azimut has joined #ocaml
raskol has quit [Ping timeout: 240 seconds]
<d_bot> <Bluddy> makes it really annoying to use functors...
Anarchos has joined #ocaml
<d_bot> <deepspacejohn> You can also define your own printer and use the `[@printer my_set_pp]` annotation when you need it.
brettgilio has quit [Remote host closed the connection]
olle has quit [Ping timeout: 276 seconds]
wingsorc has joined #ocaml
brettgilio has joined #ocaml
ahlk has quit [Remote host closed the connection]
waleee has quit [Ping timeout: 260 seconds]
waleee has joined #ocaml
dnh has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dnh has joined #ocaml
Anarchos has quit [Quit: Vision[]: i've been blurred!]
rgrinberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dnh has quit [Ping timeout: 276 seconds]
<d_bot> <leviroth> Depending on the overall context I might say "convert to an association list, then convert that to a sexp"
<d_bot> <leviroth> A little more manual at each call site, but avoids having to plumb everything through new functors.
<d_bot> <leviroth> Oh, is part of the question "how can I put a set in e.g. a record field but still use `[@@deriving sexp]` on that record?" @Bluddy
waleee has quit [Ping timeout: 272 seconds]
waleee has joined #ocaml
Tuplanolla has quit [Quit: Leaving.]
raskol has joined #ocaml
waleee has quit [Ping timeout: 272 seconds]
waleee has joined #ocaml
rgrinberg has joined #ocaml
gjvc has quit [Quit: leaving]
rgrinberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
spip has joined #ocaml
raskol has quit [Ping timeout: 260 seconds]
bobo_ has quit [Ping timeout: 272 seconds]
waleee has quit [Ping timeout: 272 seconds]
waleee has joined #ocaml