uncomfy has quit [Remote host closed the connection]
random-jellyfish has joined #ocaml
Serpent7776 has joined #ocaml
rgrinberg has joined #ocaml
bartholin has quit [Quit: Leaving]
mro has joined #ocaml
mro has quit [Ping timeout: 264 seconds]
rgrinberg has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
mro has joined #ocaml
gentauro has quit [Read error: Connection reset by peer]
gentauro has joined #ocaml
<toastal>
Newb q: I’m trying to figure out the best way to print a file with indentation & the like. My search is leading me to Format (& Fmt), but I’m afraid I’m going down the wrong path as if this is for echoing stdout info and not for, like, writing a file. Is this correct? Also, do I need to do this via printf functions to stdout? Shouldn’t I be collecting the string manipulation functions and then executing it in ‘main’ rather than just b
<toastal>
arfing to stdout as a side-effect? I think I’m missing something…
<toastal>
Am I supposed to be building up a `formatter`?
dnh has joined #ocaml
Hammdist has quit [Quit: Client closed]
Hammdist has joined #ocaml
<octachron>
Format is a good enough tool for printing to stdout with indentation.
<octachron>
Generally, you want to define a printer (a function of type: Format.formatter -> t -> unit) for your type.
<toastal>
<toastal>
That puts me on the right path
random-jellyfish has quit [Quit: Client closed]
rgrinberg has joined #ocaml
<discocaml>
<._null._> Format can print anywhere, be it stdout (`printf`) stederr (`eprintf`), a string `(sprintf`) or, in your case, in a file `formatter_of_out_channel`
xmachina has quit [Ping timeout: 260 seconds]
rgrinberg has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
xmachina has joined #ocaml
Hammdist has quit [Quit: Client closed]
rgrinberg has joined #ocaml
rgrinberg has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
xmachina has quit [Ping timeout: 255 seconds]
xmachina has joined #ocaml
bibi_ has joined #ocaml
chrisz has quit [Ping timeout: 252 seconds]
azimut has joined #ocaml
chrisz has joined #ocaml
random-jellyfish has joined #ocaml
random-jellyfish has quit [Quit: Client closed]
waleee has joined #ocaml
xmachina1 has joined #ocaml
xmachina has quit [Ping timeout: 244 seconds]
xmachina1 is now known as Co2
Co2 has quit [Quit: WeeChat 4.0.4]
waleee has quit [Ping timeout: 245 seconds]
Hammdist has joined #ocaml
xmachina has joined #ocaml
rgrinberg has joined #ocaml
xmachina has quit [Client Quit]
xmachina has joined #ocaml
xmachina is now known as Co2
Co2 is now known as xmachina
rgrinberg has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
dhil has joined #ocaml
rgrinberg has joined #ocaml
rgrinberg has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Hammdist has quit [Quit: Client closed]
Serpent7776 has quit [Quit: WeeChat 1.9.1]
mro has quit [Quit: Leaving]
xmachina has quit [Ping timeout: 258 seconds]
xmachina has joined #ocaml
bartholin has joined #ocaml
bibi_ has quit [Ping timeout: 246 seconds]
edr has joined #ocaml
azimut_ has joined #ocaml
azimut has quit [Ping timeout: 252 seconds]
rgrinberg has joined #ocaml
rgrinberg has quit [Client Quit]
Hammdist has joined #ocaml
dhil has quit [Ping timeout: 258 seconds]
rgrinberg has joined #ocaml
Serpent7776 has joined #ocaml
oriba has joined #ocaml
WindGalaxy has joined #ocaml
TrillionEuroNote has quit [Ping timeout: 258 seconds]
<WindGalaxy>
friends, i'm thinking to try out ocaml on some free hours this weekend. Looks like book "real world ocaml" is a good place to start, but it lists using version 4.13.1. With 5.1 recently released, was there anything in there that would make the book out of date that I need to worry about?
TrillionEuroNote has joined #ocaml
dhil has joined #ocaml
azimut_ has quit [Ping timeout: 252 seconds]
<discocaml>
<octachron> Since "real world ocaml" is using base, there should be no visible difference.
<discocaml>
<rbjorklin> Maybe this should go into the #dune channel but here goes:
<discocaml>
<rbjorklin> What’s the most sensible way of including resources such as a default config or a `site.css` bundle in your project? I realize I could just have a `Resource` module with some multi-line strings in it but that would lose syntax highlighting for something like css. Are there other options?
dhil has quit [Ping timeout: 264 seconds]
dnh has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dnh has joined #ocaml
bartholin has quit [Quit: Leaving]
random-jellyfish has joined #ocaml
<companion_cube>
I have a little tool to bake files into a OCaml module
<companion_cube>
there are similar tools on opam (`crunch` maybe?)
troydm has joined #ocaml
troydm1 has quit [Ping timeout: 244 seconds]
TrillionEuroNote has quit [Ping timeout: 240 seconds]