companion_cube changed the topic of #ocaml to: Discussion about the OCaml programming language | http://www.ocaml.org | OCaml 5.3.0 released: https://ocaml.org/releases/5.3.0 | Try OCaml in your browser: https://try.ocamlpro.com | Public channel logs at https://libera.irclog.whitequark.org/ocaml/
ridcully has joined #ocaml
ridcully_ has quit [Ping timeout: 252 seconds]
inline has quit [Quit: Leaving]
Haudegen has quit [Quit: Bin weg.]
inline has joined #ocaml
Tuplanolla has quit [Quit: Leaving.]
hannes has quit [Ping timeout: 260 seconds]
hannes has joined #ocaml
nlocalhost has quit [Read error: Connection reset by peer]
nlocalhost has joined #ocaml
mange has joined #ocaml
YuGiOhJCJ has joined #ocaml
marijanp has joined #ocaml
lane has quit [Server closed connection]
lane has joined #ocaml
myrkraverk has joined #ocaml
myrkraverk_ has quit [Ping timeout: 255 seconds]
agentcasey has joined #ocaml
beo has quit [Server closed connection]
beo has joined #ocaml
myrkraverk_ has joined #ocaml
myrkraverk has quit [Ping timeout: 245 seconds]
myrkraverk has joined #ocaml
myrkraverk_ has quit [Ping timeout: 252 seconds]
myrkraverk_ has joined #ocaml
myrkraverk has quit [Ping timeout: 260 seconds]
myrkraverk_ has quit [Read error: Connection reset by peer]
myrkraverk_ has joined #ocaml
myrkraverk__ has joined #ocaml
myrkraverk_ has quit [Ping timeout: 272 seconds]
henrytill has quit [Server closed connection]
henrytill has joined #ocaml
agentcasey has quit [Quit: ZNC 1.9.0+deb2build3 - https://znc.in]
agentcasey has joined #ocaml
myrkraverk has joined #ocaml
myrkraverk__ has quit [Ping timeout: 260 seconds]
pluviaq has quit [Server closed connection]
pluviaq has joined #ocaml
myrkraverk_ has joined #ocaml
myrkraverk has quit [Ping timeout: 260 seconds]
Humean has quit [Ping timeout: 248 seconds]
toastal has left #ocaml [#ocaml]
toastal has joined #ocaml
euphores has joined #ocaml
euphores has quit [Quit: Leaving.]
amadaluzia has joined #ocaml
YuGiOhJCJ has quit [Quit: YuGiOhJCJ]
euphores has joined #ocaml
Serpent7776 has joined #ocaml
dhil has joined #ocaml
<discocaml> <christopherfujino> This question is probably more due to my weak unix understanding...although I can get this to work in C...
<discocaml> <christopherfujino>
<discocaml> <christopherfujino> ```ocaml
<discocaml> <christopherfujino> let () =
<discocaml> <christopherfujino> let read, write = Unix.pipe () in
<discocaml> <christopherfujino> let uname_pid = match Unix.fork () with
<discocaml> <christopherfujino> | 0 ->
<discocaml> <christopherfujino> Unix.dup2 write Unix.stdout;
<discocaml> <christopherfujino> Unix.execvp "uname" [|"uname"|]
<discocaml> <christopherfujino> | _ as pid -> pid in
<discocaml> <christopherfujino> Printf.printf "executed uname as %d...\n%!" uname_pid;
<discocaml> <christopherfujino> let tr_pid = match Unix.fork () with
<discocaml> <christopherfujino> | 0 ->
<discocaml> <christopherfujino> Unix.dup2 read Unix.stdin;
<discocaml> <christopherfujino> Unix.execvp "tr" [| "tr"; "x"; "s" |]
<discocaml> <christopherfujino> | _ as pid -> pid in
<discocaml> <christopherfujino> Printf.printf "executed tr as %d...\n%!" tr_pid;
<discocaml> <christopherfujino>
<discocaml> <christopherfujino> Printf.printf "about to await %d...\n%!" uname_pid;
<discocaml> <christopherfujino> let i, _ = Unix.waitpid [] uname_pid in
<discocaml> <christopherfujino> Printf.printf "%d\n" i;
<discocaml> <christopherfujino> Unix.close write;
<discocaml> <christopherfujino> print_endline "closed write...";
<discocaml> <christopherfujino>
<discocaml> <christopherfujino> Printf.printf "about to await %d...\n%!" tr_pid;
<discocaml> <christopherfujino> let i, _ = Unix.waitpid [] tr_pid in
<discocaml> <christopherfujino> Printf.printf "%d\n" i
<discocaml> <christopherfujino> ```
<discocaml> <christopherfujino>
<discocaml> <christopherfujino> This code hangs forever at `Unix.waitpid [] tr_pid`, apparently because my `tr` command never exits (`uname` does however). Here is (a subset of) the contents of `ps aux` while my program is hanging:
<discocaml> <christopherfujino>
<discocaml> <christopherfujino> My C version is looks almost the same, with calls to `pipe()`, `fork()`, `dup2()`, and `execvp()`
<discocaml> <christopherfujino> This question is probably more due to my weak unix understanding...although I can get this to work in C...
<discocaml> <christopherfujino>
<discocaml> <christopherfujino> ```ocaml
<discocaml> <christopherfujino> let () =
<discocaml> <christopherfujino> let read, write = Unix.pipe () in
<discocaml> <christopherfujino> let uname_pid = match Unix.fork () with
<discocaml> <christopherfujino> | 0 ->
<discocaml> <christopherfujino> Unix.dup2 write Unix.stdout;
<discocaml> <christopherfujino> Unix.execvp "uname" [|"uname"|]
<discocaml> <christopherfujino> | _ as pid -> pid in
<discocaml> <christopherfujino> Printf.printf "executed uname as %d...\n%!" uname_pid;
<discocaml> <christopherfujino> let tr_pid = match Unix.fork () with
<discocaml> <christopherfujino> | 0 ->
<discocaml> <christopherfujino> Unix.dup2 read Unix.stdin;
<discocaml> <christopherfujino> Unix.execvp "tr" [| "tr"; "x"; "s" |]
<discocaml> <christopherfujino> | _ as pid -> pid in
<discocaml> <christopherfujino> Printf.printf "executed tr as %d...\n%!" tr_pid;
<discocaml> <christopherfujino>
<discocaml> <christopherfujino> Printf.printf "about to await %d...\n%!" uname_pid;
<discocaml> <christopherfujino> let i, _ = Unix.waitpid [] uname_pid in
<discocaml> <christopherfujino> Printf.printf "%d\n" i;
<discocaml> <christopherfujino> Unix.close write;
<discocaml> <christopherfujino> print_endline "closed write...";
<discocaml> <christopherfujino>
<discocaml> <christopherfujino> Printf.printf "about to await %d...\n%!" tr_pid;
<discocaml> <christopherfujino> let i, _ = Unix.waitpid [] tr_pid in
<discocaml> <christopherfujino> Printf.printf "%d\n" i
<discocaml> <christopherfujino> ```
<discocaml> <christopherfujino>
<discocaml> <christopherfujino> This is running on Linux; this code hangs forever at `Unix.waitpid [] tr_pid`, apparently because my `tr` command never exits (`uname` does however). Here is (a subset of) the contents of `ps aux` while my program is hanging:
<discocaml> <christopherfujino>
<discocaml> <christopherfujino> My C version is looks almost the same, with calls to pipe(), fork(), dup2(), and execvp()
marijanp has left #ocaml [Error from remote client]
cr1901_ has quit [Read error: Connection reset by peer]
xvilka has quit [Server closed connection]
xvilka has joined #ocaml
bartholin has joined #ocaml
marijanp has joined #ocaml
cr1901 has joined #ocaml
hannes has quit [Ping timeout: 260 seconds]
Haudegen has joined #ocaml
euphores has quit [Quit: Leaving.]
euphores has joined #ocaml
eilvelia has quit [Read error: Connection reset by peer]
eilvelia has joined #ocaml
itszor has quit [Read error: Connection reset by peer]
priime has joined #ocaml
zor has joined #ocaml
priime has quit [Read error: Connection reset by peer]
priime has joined #ocaml
priime has quit [Remote host closed the connection]
myrkraverk has joined #ocaml
myrkraverk_ has quit [Ping timeout: 260 seconds]
priime has joined #ocaml
toastal has quit [Ping timeout: 260 seconds]
wingsorc has quit [Ping timeout: 260 seconds]
myrkraverk_ has joined #ocaml
myrkraverk has quit [Ping timeout: 252 seconds]
toastal has joined #ocaml
Anarchos has joined #ocaml
<discocaml> <lukstafi> Modular explicits are not tagged with the 5.5 milestone. Any chance they will land? Any guarantee that they will land in <=5.6?
olle has quit [Ping timeout: 260 seconds]
itszor has joined #ocaml
zor has quit [Ping timeout: 248 seconds]
Haudegen has quit [Quit: Bin weg.]
johnridesabike has joined #ocaml
Anarchos has quit [Ping timeout: 260 seconds]
mange has quit [Remote host closed the connection]
myrkraverk_ has quit [Ping timeout: 260 seconds]
marijanp has left #ocaml [#ocaml]
marijanp has joined #ocaml
Haudegen has joined #ocaml
agentcasey has quit [Quit: ZNC 1.9.0+deb2build3 - https://znc.in]
amadaluzia has quit [Quit: You]
tronexte has quit [Ping timeout: 276 seconds]
tronexte has joined #ocaml
Humean has joined #ocaml
humasect has joined #ocaml
humasect has quit [Quit: Leaving...]
humasect has joined #ocaml
gwizon has quit [Quit: leaving]
<discocaml> <mostafa_touny> Could we get in touch with anyone from [Jane Street](https://www.janestreet.com/) or [Ahrefs](https://ahrefs.com/) to learn their data engineering use cases, which would motivate the development of [Raven](https://github.com/raven-ml/raven)?
<discocaml> <mostafa_touny> The industry is moving towards declarative data pipelining, and OCaml does have the potential.
<discocaml> <mostafa_touny> The industry acknowledges the value of declarative data pipelining, and OCaml does have the potential. See [Data Bricks](https://www.databricks.com/product/data-engineering/lakeflow-declarative-pipelines)
<discocaml> <mostafa_touny> The industry acknowledges the value of declarative data pipelining, and it could be an opportunity for OCaml. See [Data Bricks](https://www.databricks.com/product/data-engineering/lakeflow-declarative-pipelines)
<discocaml> <mostafa_touny> The industry acknowledges the value of declarative data pipelining. See [Data Bricks](https://www.databricks.com/product/data-engineering/lakeflow-declarative-pipelines)
<humasect> i had spoken with Ahrefs before, great people. had a medical emergency i couldnt compelte the final task of interview =(
<discocaml> <christopherfujino> Ok nvm, figured it out. the semantics in my C program were a little different, there I closed the write end of the pipe BEFORE forking the second process. not sure why that would make a difference, but it works now.
Haudegen has quit [Quit: Bin weg.]
<discocaml> <christopherfujino> maybe if you don't close the FD before the second fork, then the second child process will have the other end of its own pipe open, and thus the pipe never closes?
<humasect> a
Tuplanolla has joined #ocaml
Anarchos has joined #ocaml
shwouchk has quit [Remote host closed the connection]
shwouchk has joined #ocaml
Haudegen has joined #ocaml
Humean has quit [Quit: Leaving]
b0o has quit [Server closed connection]
b0o has joined #ocaml
myrkraverk has joined #ocaml
ripsquid has quit [Ping timeout: 272 seconds]
humasect has quit [Remote host closed the connection]
humasect has joined #ocaml
ripsquid has joined #ocaml
ursa-major has quit [Server closed connection]
ursa-major has joined #ocaml
dhil has quit [Ping timeout: 260 seconds]
seeg has quit [Server closed connection]
seeg has joined #ocaml
myrkraverk_ has joined #ocaml
myrkraverk has quit [Ping timeout: 260 seconds]
greenonions has joined #ocaml
Mister_Magister has quit [Ping timeout: 255 seconds]
Mister_Magister has joined #ocaml
Ankhers has quit [Server closed connection]
humasect has quit [Quit: Leaving...]
Ankhers has joined #ocaml
Mister_Magister_ has joined #ocaml
Mister_Magister has quit [Ping timeout: 252 seconds]
Mister_Magister_ is now known as Mister_Magister
Mister_Magister_ has joined #ocaml
Mister_Magister has quit [Ping timeout: 255 seconds]
euphores has quit [Ping timeout: 252 seconds]
wingsorc has joined #ocaml
Mister_Magister has joined #ocaml
Mister_Magister_ has quit [Ping timeout: 248 seconds]
euphores has joined #ocaml
Mister_Magister has quit [Remote host closed the connection]
Mister_Magister has joined #ocaml
nirvdrum7410 has quit [Quit: The Lounge - https://thelounge.chat]
myrkraverk has joined #ocaml
myrkraverk_ has quit [Ping timeout: 276 seconds]
myrkraverk_ has joined #ocaml
myrkraverk has quit [Ping timeout: 252 seconds]
Anarchos has quit [Quit: Vision[]: i've been blurred!]
casastortaAway has quit [Ping timeout: 255 seconds]
casastortaAway has joined #ocaml
amadaluzia has joined #ocaml
euphores has quit [Ping timeout: 252 seconds]
johnridesabike has quit [Quit: johnridesabike]
agentcasey has joined #ocaml
Serpent7776 has quit [Ping timeout: 255 seconds]
bartholin has quit [Remote host closed the connection]
Tuplanolla has quit [Ping timeout: 255 seconds]
gwizon has joined #ocaml
gwizon has quit [Quit: leaving]