<Boarders>
is there an easy way in ocaml to compare two hashtables for equality in the sense of having the same keys and values?
hackinghorn has quit [Quit: Leaving]
<d_bot>
<Swerve> I don't know of any built-in way, but something like this might work: https://pastebin.com/iENePd9R
<Boarders>
thanks, I'll give that a go, the core one also seems to include a useful equal function
<Boarders>
is there any good resource that people know giving a bunch of exercises to understand aspects of the module system?
mbuf has joined #ocaml
luna_ has joined #ocaml
<d_bot>
<raedr7n> Hey, does someone want to let me bounce an idea off them real quick? I'm looking at developing a reasonML-like syntax over ocaml, but I have a couple questions about the viability of exposing a limited subset of the language. This would mostly be an educational excercise/for fun.
<companion_cube>
it's very doable to expose only a subset of the language, yes
<d_bot>
<raedr7n> It seems like that would probably prevent the use of many ocaml libraries by programmers of the language. I don't really care about that, but do you think people in general would?
luna_ has quit [Remote host closed the connection]
<d_bot>
<raedr7n> You know, nevermind.
<d_bot>
<raedr7n> I don't think I really care what people would think.
<companion_cube>
well, if it's like reason, you could mix syntaxes.
luna_ has joined #ocaml
luna_ has quit [Remote host closed the connection]
luna_ has joined #ocaml
luna_ has quit [Ping timeout: 252 seconds]
hexreel has joined #ocaml
Serpent7776 has joined #ocaml
luna_ has joined #ocaml
motherfsck has quit [Ping timeout: 272 seconds]
motherfsck has joined #ocaml
hexreel has quit [Quit: WeeChat 3.2]
mro has joined #ocaml
gravicappa has joined #ocaml
Haudegen has joined #ocaml
Guest58 has joined #ocaml
Guest58 has quit [Client Quit]
Haudegen has quit [Quit: Bin weg.]
glassofethanol has joined #ocaml
mro has quit [Remote host closed the connection]
mro has joined #ocaml
mro has quit [Remote host closed the connection]
mro has joined #ocaml
mro has quit [Remote host closed the connection]
mro has joined #ocaml
mro has quit [Read error: Connection reset by peer]
mro has joined #ocaml
mro has quit [Ping timeout: 252 seconds]
rgrinberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mro has joined #ocaml
Tuplanolla has joined #ocaml
mro has quit [Ping timeout: 255 seconds]
bartholin has joined #ocaml
mro has joined #ocaml
Serpent7776 has quit [Read error: Connection reset by peer]
Serpent7776 has joined #ocaml
mro has quit [Ping timeout: 265 seconds]
mro has joined #ocaml
mro has quit [Ping timeout: 255 seconds]
luna_ has quit [Remote host closed the connection]
Haudegen has joined #ocaml
Tuplanolla has quit [Quit: Leaving.]
cedric has joined #ocaml
luna_ has joined #ocaml
luna__ has joined #ocaml
mro has joined #ocaml
luna_ has quit [Ping timeout: 252 seconds]
mro has quit [Ping timeout: 252 seconds]
neiluj has joined #ocaml
<neiluj>
Hello! If using a bytes ref, and writing bytes on it, it allocates enough memory for the bytes?
<neiluj>
And if you're appending new bytes?
luna__ has quit []
<octachron>
Using a bytes ref seems strange since `bytes` is already mutable. And no, bytes are not resized dynamically, out-of-range accesses are an error.
<neiluj>
thanks octachron
mro has joined #ocaml
favonia has quit [Ping timeout: 246 seconds]
mro has quit [Ping timeout: 252 seconds]
favonia has joined #ocaml
favonia has quit [Ping timeout: 252 seconds]
favonia has joined #ocaml
<companion_cube>
bytes ref + int ref makes sense though
<companion_cube>
or a record with these as mutable fields; it's basically a `Buffer.t`
mro has joined #ocaml
<neiluj>
indeed
<neiluj>
I went with a mutable field bytes in the record
<neiluj>
it reallocates memory each time
<neiluj>
but I didn't find a way to "memcopy" bytes
<companion_cube>
Bytes.blit
mro has quit [Client Quit]
<companion_cube>
hmm you shouldn't need to reallocate every time though
<neiluj>
oh indeed, many thanks
favonia has quit [Ping timeout: 252 seconds]
favonia has joined #ocaml
mbuf has quit [Quit: Leaving]
favonia has quit [Ping timeout: 252 seconds]
favonia has joined #ocaml
zebrag has joined #ocaml
aquijoule__ has quit [Remote host closed the connection]
aquijoule__ has joined #ocaml
cedric has quit [Remote host closed the connection]
d_bot has quit [Remote host closed the connection]
d_bot has joined #ocaml
d_bot has quit [Remote host closed the connection]
d_bot has joined #ocaml
<d_bot>
<tars0x9752> Hi, I made a tiny VSCode Extension which provides auto-completion for .ocamlformat file. Idk if any of you need this but let me post it here. (...btw I'm a complete beginner so this is written in TS. If I became comfortable with OCaml and its ecosystems, I'd like to re-write this in OCaml. But, as of now I have no clue. 🙃 )
<d_bot>
<Swerve> In using dune with Js\_of\_ocaml, the docs say to run `dune build ./foo.bc.js` if I want to compile `foo.ml` to javascript. Then I use `node <path\_to\_file>/foo.bc.js` to run foo. What is the `.bc.js` extension for?
<d_bot>
<Swerve> Also, If I want to use the js code generated as a script in an html page, should I refer to it as `foo.bc.js`, or as `foo.js`? Any info would be super helpful.
<d_bot>
<thangngoc89> @Swerve it's a convention of dune
<d_bot>
<thangngoc89> `exe` for executable
<d_bot>
<thangngoc89> `bc` for bytecode
<d_bot>
<thangngoc89> `bc.js` for jsoo build
<d_bot>
<Swerve> Can I treat `bc.js` like I would treat `.js`?
<d_bot>
<thangngoc89> yes
<d_bot>
<thangngoc89> just treat it like any js file
<d_bot>
<octachron> (Maybe don't try to read it)
<d_bot>
<thangngoc89> ^ this
<d_bot>
<thangngoc89> treat it like a black box. lol
<d_bot>
<Swerve> Yeah the error messages are really not easy to decipher I've found
<d_bot>
<octachron> You can see the`bc.js` as a sign that this a compiled-to-js file rather than a js source file.
<d_bot>
<Swerve> Gotcha, thanks for the info!
Haudegen has joined #ocaml
neiluj has quit [Remote host closed the connection]
neiluj has joined #ocaml
mro has quit [Ping timeout: 252 seconds]
neiluj has quit [Ping timeout: 255 seconds]
favonia has quit [Ping timeout: 246 seconds]
favonia has joined #ocaml
neiluj has joined #ocaml
favonia has quit [Ping timeout: 246 seconds]
mro has joined #ocaml
favonia has joined #ocaml
mro has quit [Ping timeout: 252 seconds]
favonia has quit [Ping timeout: 252 seconds]
favonia has joined #ocaml
favonia has quit [Ping timeout: 255 seconds]
mro has joined #ocaml
favonia has joined #ocaml
mro has quit [Ping timeout: 252 seconds]
motherfs1 has joined #ocaml
motherfsck has quit [Ping timeout: 272 seconds]
favonia has quit [Ping timeout: 252 seconds]
favonia has joined #ocaml
motherfs1 has quit [Ping timeout: 252 seconds]
<d_bot>
<psteckler> Has anyone using the Jane St libraries noticed that long-running code leaks pipe descriptors (FIFOs)?
motherfs1 has joined #ocaml
xeel has joined #ocaml
<d_bot>
<Deadrat> How did you find the leakage?
mro has joined #ocaml
favonia has quit [Ping timeout: 252 seconds]
favonia has joined #ocaml
mro has quit [Ping timeout: 268 seconds]
<d_bot>
<psteckler> a user reported the output of `lsof`
neiluj has quit [Remote host closed the connection]
neiluj has joined #ocaml
isekaijin has quit [Ping timeout: 252 seconds]
isekaijin has joined #ocaml
favonia has quit [Ping timeout: 255 seconds]
favonia has joined #ocaml
favonia has quit [Ping timeout: 252 seconds]
favonia has joined #ocaml
Stumpfenstiel has joined #ocaml
gravicappa has quit [Ping timeout: 252 seconds]
Stumpfenstiel has quit [Quit: No Ping reply in 180 seconds.]
xeel has quit [Quit: nyaa~]
Stumpfenstiel has joined #ocaml
waleee has joined #ocaml
favonia has quit [Ping timeout: 255 seconds]
favonia has joined #ocaml
troydm has joined #ocaml
favonia has quit [Ping timeout: 252 seconds]
favonia has joined #ocaml
favonia has quit [Ping timeout: 252 seconds]
favonia has joined #ocaml
Serpent7776 has quit [Quit: leaving]
rgrinberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]