companion_cube changed the topic of #ocaml to: Discussion about the OCaml programming language | http://www.ocaml.org | OCaml 5.0 released(!!1!): https://ocaml.org/releases/5.0.0.html | Try OCaml in your browser: https://try.ocamlpro.com | Public channel logs at https://libera.irclog.whitequark.org/ocaml/
tizoc has quit [Quit: Coyote finally caught me]
masterbuilder has quit [Quit: leaving]
tizoc has joined #ocaml
duckie has quit [Quit: Client limit exceeded: 20000]
Stumpfenstiel has quit [Ping timeout: 252 seconds]
masterbuilder has joined #ocaml
Haudegen has quit [Ping timeout: 264 seconds]
kotrcka has joined #ocaml
<discocaml> <Zhou Wu> One client.
<discocaml> <Zhou Wu> Two clients.
<discocaml> <Zhou Wu> Three clients!
duckie has joined #ocaml
spip has quit [Quit: Konversation terminated!]
azimut has quit [Quit: ZNC - https://znc.in]
azimut has joined #ocaml
kotrcka has quit [Remote host closed the connection]
chrisz has quit [Ping timeout: 252 seconds]
chrisz has joined #ocaml
rf has quit [Remote host closed the connection]
waleee has quit [Ping timeout: 248 seconds]
azimut has quit [Ping timeout: 255 seconds]
azimut has joined #ocaml
bgs has joined #ocaml
kurfen has quit [Ping timeout: 255 seconds]
kurfen_ has joined #ocaml
emp_ has quit [Ping timeout: 255 seconds]
emp has joined #ocaml
trev_ has joined #ocaml
azimut has quit [Ping timeout: 255 seconds]
bartholin has joined #ocaml
Haudegen has joined #ocaml
olle has joined #ocaml
anpad has quit [Quit: ZNC 1.8.2 - https://znc.in]
anpad has joined #ocaml
<discocaml> <lukstafi> Thanks for `_intf`!
<discocaml> <lukstafi> How does one install documentation? I'm surprised that github search `_build/default/_doc/_html/index.html path:**/dune` returns empty; but people use things like `cp -r _build/default/_doc/_html/* ${DOCDIR}/doc/dev/` (shell) or `cp -r _build/default/_doc/_html/* ${DOCDIR}/doc/dev/` (makefile).
<discocaml> <lukstafi> How does one install documentation? I'm surprised that github search `_build/default/_doc/_html/index.html path:**/dune` returns empty; but people use things like `cp -r _build/default/_doc/_html/* ${DOCDIR}/doc/dev/` (shell) or `@rsync -a _build/default/_doc/_html/ docs/` (makefile).
<discocaml> <lukstafi> But searching `index.html path:**/dune` has many hits, browsing now
<discocaml> <lukstafi> This seems to work:
<discocaml> <lukstafi> This seems to work:
<discocaml> <lukstafi> ```ocaml
<discocaml> <lukstafi> (rule
<discocaml> <lukstafi> (alias doc)
<discocaml> <lukstafi> (action (run cp -r _doc/_html ../../doc/html)))
<discocaml> <lukstafi> ```
<discocaml> <lukstafi> OK, found an example: https://github.com/savonet/ocaml-posix/blob/main/dune
gwizon has joined #ocaml
<discocaml> <froyo> was `#` made right-associative to disallow the "chaining" pattern?
<discocaml> <froyo> regarding objects
wingsorc has quit [Ping timeout: 248 seconds]
<discocaml> <tjammer> The main problem here is that the ctypes library, which the bindings are based on, doesn't work with js_of_ocaml. I'd imagine one would need to create another set of bindings for js, which then internally call the emscripten-compiled raylib library.
<discocaml> <tjammer> I wanted to at least do a hello world using this approach but never got around to it.
<discocaml> <Marc> Something like ocaml calling javascript functions which are themselves mapped to the C library compiled with emscripten?
<discocaml> <tjammer> I was thinking two sets of bindings; one for ocaml native and one for js
<discocaml> <tjammer> I don't think there's an easy solution
azimut has joined #ocaml
waleee has joined #ocaml
mbuf has joined #ocaml
bartholin has quit [Quit: Leaving]
rf has joined #ocaml
ks_ has quit [Remote host closed the connection]
masterbuilder has quit [Quit: Lost terminal]
<discocaml> <Ampelmännchen> are there any ways where ocaml is useful im making websites?
masterbuilder has joined #ocaml
mro has joined #ocaml
Stumpfenstiel has joined #ocaml
mro has quit [Remote host closed the connection]
mro has joined #ocaml
spip has joined #ocaml
xgqt has quit [Ping timeout: 255 seconds]
xgqt has joined #ocaml
mro has quit [Remote host closed the connection]
mbuf has quit [Quit: Leaving]
bartholin has joined #ocaml
gwizon has quit [Quit: Lost terminal]
count3rmeasure has joined #ocaml
Haudegen has quit [Quit: No Ping reply in 180 seconds.]
Haudegen has joined #ocaml
Haudegen has quit [Quit: No Ping reply in 180 seconds.]
Haudegen has joined #ocaml
<discocaml> <ilo Kali> there's a tyxml library that allows you to generate HTML/SVGs, a webserver library called Dream, and a javascript transpiler
<discocaml> <ilo Kali> you could theoretically write an entire website in OCaml
<technomancy> why theoretically
<discocaml> <Max Korp (Frisk)> Our entire business web app, internal web app, and both mobile apps are built in reasonml, but you could clearly do that with ocaml just as well
mro has joined #ocaml
mro has quit [Ping timeout: 256 seconds]
<discocaml> <ilo Kali> you could ~~theoretically~~ write an entire website in OCaml
<discocaml> <ilo Kali> technomancy: i was not sure if anyone had done it before
<discocaml> <ilo Kali> edited for clarity
<discocaml> <ilo Kali> you can ~~theoretically~~ write an entire website in OCaml
<companion_cube> I mean... Yeah? Clearly
<companion_cube> I have a (server rendered) little website about some logic stuff that's entirely ocaml
tpefreedom has joined #ocaml
<technomancy> the idea that it might somehow not be possible is certainly ... an odd one
<companion_cube> idk if anyone ever dreamt of a site fully in Java or C++, tbh
<companion_cube> Without a healthy level of expressiveness for writing html as combinators (or jsx), it's a bit of a nightmare
olle has quit [Ping timeout: 255 seconds]
<octachron> There is also ocsigen/eliom for multi-tier web framework; and the late Besport aka a social network written in OCaml
tpefreedom1 has joined #ocaml
tpefreedom1 has joined #ocaml
tpefreedom1 has quit [Changing host]
tpefreedom has quit [Ping timeout: 264 seconds]
<companion_cube> (ofc my website is 100% CCWheel but there are more robust ways indeed)
<hammdist> since nobody has mentioned in yet https://github.com/ocsigen/js_of_ocaml which allows you to write frontend code for websites in ocaml
<companion_cube> it's part of the ocsigen/eliom stack :)
<discocaml> <lukstafi> js_of_ocaml plus a web worker is also a way to write "full stack" web programs where you don't need to run a server (it just runs on someone's computer). But I guess that doesn't count as a website.
olle has joined #ocaml
tpefreedom has joined #ocaml
tpefreedom has quit [Changing host]
tpefreedom has joined #ocaml
cedric has joined #ocaml
tpefreedom1 has quit [Ping timeout: 264 seconds]
mro has joined #ocaml
Serpent7776 has joined #ocaml
Serpent7776 has quit [Ping timeout: 268 seconds]
alexherbo2 has joined #ocaml
count3rmeasure has quit [*.net *.split]
xgqt has quit [*.net *.split]
bgs has quit [*.net *.split]
chrisz has quit [*.net *.split]
tizoc has quit [*.net *.split]
m5zs7k has quit [*.net *.split]
micro has quit [*.net *.split]
wagle has quit [*.net *.split]
hannes has quit [*.net *.split]
sim642 has quit [*.net *.split]
daimrod has quit [*.net *.split]
jsoo_ has quit [*.net *.split]
dinosaure2 has quit [*.net *.split]
haesbaert has quit [*.net *.split]
oisota has quit [*.net *.split]
ralu1 has quit [*.net *.split]
nore has quit [*.net *.split]
xgqt has joined #ocaml
nore has joined #ocaml
chrisz has joined #ocaml
tizoc has joined #ocaml
hannes has joined #ocaml
daimrod has joined #ocaml
dinosaure2 has joined #ocaml
haesbaert has joined #ocaml
jsoo_ has joined #ocaml
ralu1 has joined #ocaml
micro has joined #ocaml
sim642 has joined #ocaml
wagle has joined #ocaml
count3rmeasure has joined #ocaml
oisota has joined #ocaml
bgs has joined #ocaml
m5zs7k has joined #ocaml
ralu1 has quit [Max SendQ exceeded]
micro has quit [Max SendQ exceeded]
micro has joined #ocaml
ralu1 has joined #ocaml
mro has quit [Remote host closed the connection]
mro has joined #ocaml
mro has quit [Remote host closed the connection]
azimut has quit [Ping timeout: 255 seconds]
mro has joined #ocaml
azimut has joined #ocaml
<discocaml> <cemerick> all of ocaml.org is written in OCaml AFAIK; my current startup is *almost* all OCaml, from the non-web algorithmic bits up to the web frontend
<discocaml> <cemerick> those are obviously two very particular examples; that's just to say, web dev in OCaml is much more than possible ;-P
<discocaml> <ilo Kali> i am aware it was possible, just knew no examples of anyone doing it
<discocaml> <ilo Kali> however, now i do
<discocaml> <ilo Kali> thanks
tpefreedom has left #ocaml [Leaving]
szkl has joined #ocaml
wingsorc has joined #ocaml
trev_ has quit [Remote host closed the connection]
hammdist has quit [Ping timeout: 260 seconds]
cedric has quit [Quit: Konversation terminated!]
mro has quit [Quit: Leaving...]
bgs has quit [Remote host closed the connection]
count3rmeasure has quit [Ping timeout: 268 seconds]
olle has quit [Ping timeout: 255 seconds]
bartholin has quit [Quit: Leaving]
azimut_ has joined #ocaml
azimut has quit [Ping timeout: 255 seconds]
Tuplanolla has quit [Quit: Leaving.]
Stumpfenstiel has quit [Ping timeout: 248 seconds]
<discocaml> <lagarto> If I do something like this in my main routine:
<discocaml> <lagarto> ```ocaml
<discocaml> <lagarto> let data = allocate_big_thing () in
<discocaml> <lagarto> (* more code using/building data *)
<discocaml> <lagarto> let final = finalize_data_in_better_format data in
<discocaml> <lagarto> (* from here there's no more references to "data" *)
<discocaml> <lagarto> (* lots of code, calls, loops etc *)
<discocaml> <lagarto> (* whole program never returns from this function *)
<discocaml> <lagarto> ```
<discocaml> <lagarto> The whole program is going to run forever theoretically with "data" in scope, never referred to again.
<discocaml> <lagarto>
<discocaml> <lagarto> How reliable is it that ocaml will be sure not to store the foo pointer on the stack or anywhere the garbage collector can see it and erroneously think it's alive? (I ask in part because unlike java or whatever I obviously can't assign null to it ...)
waleee has quit [Quit: WeeChat 3.8]
waleee has joined #ocaml
<discocaml> <lagarto> Or I guess also "is it reliable" ... if it's not, maybe this style of code is just a memory leak?
Serpent7776 has joined #ocaml