Leonidas changed the topic of #ocaml to: Discussion about the OCaml programming language | http://www.ocaml.org | OCaml 4.13.0 released: https://ocaml.org/releases/4.13.0.html | Try OCaml in your browser: https://try.ocamlpro.com | Public channel logs at https://libera.irclog.whitequark.org/ocaml/
vicfred has quit [Quit: Leaving]
Haudegen has quit [Ping timeout: 240 seconds]
TakinOver has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
Tuplanolla has quit [Quit: Leaving.]
rgrinberg has joined #ocaml
Colt has quit [Remote host closed the connection]
Colt has joined #ocaml
rgrinberg has quit [Read error: Connection reset by peer]
rgrinberg has joined #ocaml
kaph has quit [Ping timeout: 260 seconds]
Soni has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
Soni has joined #ocaml
spip has joined #ocaml
spip is now known as Guest8997
Guest7910 has quit [Ping timeout: 240 seconds]
rgrinberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rgrinberg has joined #ocaml
rgrinberg has quit [Client Quit]
rgrinberg has joined #ocaml
kaph_ has joined #ocaml
mbuf has joined #ocaml
Haudegen has joined #ocaml
gopcode has joined #ocaml
<gopcode> Hi, Is it possible to close an input_channel without closing the underlying file descriptor?
<gopcode> For context, I'm working on a file on a unix fs that may be changed during the execution of the program
<gopcode> currently my plan is to open a Unix file descriptor for the file once
<gopcode> there are functions to build an in_channel from a file descriptor, but as in_channels are buffered, once I've created an in_channel for the file, if it changes, I can't read the new data from the existing in_channel
<gopcode> but, the file descriptor is still open, so I could fseek to the beginning, and create a new in_channel to access the new data
<gopcode> the question remains how to "clean up" the old in_channel which buffered the old input without closing the persisted file descriptor
vb has quit [Ping timeout: 256 seconds]
vb has joined #ocaml
rgrinberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
gravicappa has joined #ocaml
xd1le has joined #ocaml
rgrinberg has joined #ocaml
jlrnick has joined #ocaml
Haudegen has quit [Quit: No Ping reply in 180 seconds.]
Haudegen has joined #ocaml
Colt has quit [Ping timeout: 260 seconds]
Colt has joined #ocaml
jlrnick has quit [Ping timeout: 256 seconds]
hackinghorn has quit [Read error: Connection reset by peer]
hackinghorn has joined #ocaml
mro has joined #ocaml
<rgrinberg> Why do you need to "clean up" the in_channel? Just throw the value away and let the GC dispose of it
<rgrinberg> If you really want to "close" it, you can just dup the fd before doing so
mro has quit [Remote host closed the connection]
mro has joined #ocaml
Tuplanolla has joined #ocaml
<gopcode> ah, tI thought in_channels had to be closed manually to free up the resources they take, but I guess that's only required to close the file descriptor
hackinghorn has quit [Ping timeout: 260 seconds]
waleee has quit [Ping timeout: 260 seconds]
waleee 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
hackinghorn has joined #ocaml
rgrinberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mro has quit [Remote host closed the connection]
mro has joined #ocaml
jlrnick 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 [Remote host closed the connection]
mro has joined #ocaml
bartholin has joined #ocaml
mro has quit [Remote host closed the connection]
kakadu has joined #ocaml
mro has joined #ocaml
mro has quit [Remote host closed the connection]
Serpent7776 has quit [Quit: leaving]
mro has joined #ocaml
mro has quit [Remote host closed the connection]
mro has joined #ocaml
mro has quit [Remote host closed the connection]
<d_bot> <Kakadu> If I want my program to use a remote git repo (on Github/Gitlab) as a storage, should I look at C interface of git or https://github.com/mirage/ocaml-git could be sufficient?
<hannes> Kakadu: I use ocaml-git for pulling and pushing to GitHub/gitea, using git-over-ssh.
Haudegen has quit [Quit: Bin weg.]
<d_bot> <Kakadu> @hannes: Could you recommend any example?
<d_bot> <dinosaure> You can see this binary which `fetch` a Git repository: https://github.com/dinosaure/docteur/blob/main/bin/make.ml (and make a `*.img` from it)
<d_bot> <dinosaure> Currently, I was mostly focus about the MirageOS support. So you need to do the glue sometimes but, at least, it works 🙂
Haudegen has joined #ocaml
<d_bot> <dinosaure> After it depends on your goal, for instance, this executable wants to `fetch` a repository _in memory_. That means that it does not create a `.git` as `git` does
<d_bot> <Kakadu> Cool, it creates a file with an image if my repo!
<d_bot> <dinosaure> seems pretty close to what `docteur` does 🙂
Guest8997 has quit [Ping timeout: 240 seconds]
spip has joined #ocaml
spip is now known as Guest7163
Anarchos has joined #ocaml
chrisz has quit [Ping timeout: 250 seconds]
chrisz has joined #ocaml
bartholin has quit [Quit: Leaving]
xd1le has quit [Quit: xd1le]
jlrnick has quit [Ping timeout: 268 seconds]
mro has joined #ocaml
<d_bot> <VPhantom> Hm. What's the point of a _typed_ GADT without a value? i.e. `type _ t = (* variants with values *) |String : string t`
<d_bot> <VPhantom> vs `|String : _ t`
<d_bot> <VPhantom> In both cases its only purpose that I can think of, is to provide a `String` case when matching.
chrisz has quit [Ping timeout: 260 seconds]
chrisz has joined #ocaml
<Fardale> In the first case, when you match a value of type 'a t, en the branch String, you will add the equality 'a = string, in the second case you won't. Then if you have a function "string t -> _" you can use it in the first case but not in the second case.
<d_bot> <VPhantom> I see, thanks. 🙂
mbuf has quit [Quit: Leaving]
mro has quit [Remote host closed the connection]
Haudegen has quit [Quit: Bin weg.]
chrisz has quit [Ping timeout: 245 seconds]
mro has joined #ocaml
chrisz has joined #ocaml
mro has quit [Remote host closed the connection]
Anarchos has quit [Quit: Vision[]: i've been blurred!]
mro has joined #ocaml
mro has quit [Remote host closed the connection]
mro has joined #ocaml
mro has quit [Ping timeout: 245 seconds]
Everything has joined #ocaml
Haudegen has joined #ocaml
mro has joined #ocaml
mro has quit [Ping timeout: 240 seconds]
jlrnick has joined #ocaml
Guest7163 has quit [Ping timeout: 240 seconds]
Guest7163 has joined #ocaml
mro has joined #ocaml
mro has quit [Ping timeout: 268 seconds]
mro has joined #ocaml
mro has quit [Ping timeout: 260 seconds]
waleee has quit [Ping timeout: 252 seconds]
waleee has joined #ocaml
mro has joined #ocaml
mro has quit [Ping timeout: 250 seconds]
rgrinberg has joined #ocaml
mro has joined #ocaml
mro_ has joined #ocaml
mro has quit [Ping timeout: 245 seconds]
mro_ has quit [Ping timeout: 245 seconds]
rgrinberg has quit [Ping timeout: 240 seconds]
vicfred has joined #ocaml
rgrinberg has joined #ocaml
kaph_ has quit [Ping timeout: 268 seconds]
rgrinberg has quit [Ping timeout: 252 seconds]
rgrinberg has joined #ocaml
gravicappa has quit [Ping timeout: 240 seconds]
rgrinberg has quit [Ping timeout: 268 seconds]
rgrinberg has joined #ocaml
tomku has quit [Quit: leaving]
tomku has joined #ocaml
dstein64- has joined #ocaml
dstein64 has quit [Ping timeout: 252 seconds]
dstein64- is now known as dstein64
rgrinberg has quit [Ping timeout: 250 seconds]
rgrinberg has joined #ocaml
rgrinberg has quit [Read error: Connection reset by peer]
rgrinberg has joined #ocaml
rgrinberg has quit [Ping timeout: 256 seconds]
rgrinberg has joined #ocaml
Haudegen has quit [Quit: No Ping reply in 180 seconds.]
Haudegen has joined #ocaml
tomku has quit [Ping timeout: 240 seconds]
rgrinberg has quit [Ping timeout: 256 seconds]
rgrinberg has joined #ocaml
rgrinberg has quit [Client Quit]
tomku has joined #ocaml
jlrnick has quit [Ping timeout: 256 seconds]
kaph has joined #ocaml