spew has quit [Quit: Connection closed for inactivity]
zolk3ri has quit [Remote host closed the connection]
smazga has quit [Quit: leaving]
kalio has quit [Ping timeout: 276 seconds]
kalio has joined #ocaml
nullifidian__ has quit [Read error: Connection reset by peer]
nullifidian__ has joined #ocaml
jao has quit [Ping timeout: 276 seconds]
oni-on-ion has quit [Ping timeout: 240 seconds]
unyu has quit [Ping timeout: 246 seconds]
silver has quit [Read error: Connection reset by peer]
unyu has joined #ocaml
ravenousmoose has joined #ocaml
ravenousmoose has quit [Ping timeout: 245 seconds]
Tsukimaru has quit [Ping timeout: 260 seconds]
ziyourenxiang has joined #ocaml
tormen has joined #ocaml
tormen_ has quit [Ping timeout: 268 seconds]
mfp has quit [Ping timeout: 265 seconds]
gravicappa has joined #ocaml
ygrek_ has quit [Ping timeout: 265 seconds]
ravenousmoose has joined #ocaml
ravenousmoose has quit [Ping timeout: 246 seconds]
bitwinery has quit [Quit: Leaving]
mbuf has joined #ocaml
brettgilio has quit [Quit: Quit]
brettgilio has joined #ocaml
narimiran has joined #ocaml
ravenousmoose has joined #ocaml
nullifidian__ has quit [Read error: Connection reset by peer]
nullifidian__ has joined #ocaml
Haudegen has joined #ocaml
vicfred has quit [Quit: Leaving]
barockobamo has joined #ocaml
amiloradovsky has joined #ocaml
amiloradovsky has quit [Ping timeout: 245 seconds]
amiloradovsky has joined #ocaml
free_beard has joined #ocaml
kjak has quit [Ping timeout: 276 seconds]
amiloradovsky has quit [Ping timeout: 246 seconds]
<Leonidas>
is printf formatting turing complete yet? I want to rewrite my ocaml programs into a formatting string, that should make it much more readable
ollehar has joined #ocaml
<flux>
be the change you want to see!
jaar has joined #ocaml
nullifidian_ has joined #ocaml
nullifidian__ has quit [Ping timeout: 276 seconds]
tane has joined #ocaml
vesper has quit [Ping timeout: 240 seconds]
vesper11 has joined #ocaml
Haudegen has quit [Quit: Bin weg.]
ggole has joined #ocaml
_whitelogger has joined #ocaml
mfp has joined #ocaml
jaar has quit [Ping timeout: 276 seconds]
jaar has joined #ocaml
otini has quit [Remote host closed the connection]
bglm[m] has quit [Write error: Connection reset by peer]
keep-learning[m] has quit [Remote host closed the connection]
copy` has quit [Read error: Connection reset by peer]
aecepoglu[m] has quit [Read error: Connection reset by peer]
cgenie[m] has quit [Remote host closed the connection]
aspiwack[m] has quit [Remote host closed the connection]
Haudegen[m] has quit [Remote host closed the connection]
sepp2k has quit [Read error: Connection reset by peer]
peddie has quit [Write error: Connection reset by peer]
jimt[m] has quit [Write error: Connection reset by peer]
zapashcanon[m] has quit [Remote host closed the connection]
dl3br[m] has quit [Write error: Connection reset by peer]
flux has quit [Write error: Connection reset by peer]
stan[m] has quit [Read error: Connection reset by peer]
webax[m] has quit [Read error: Connection reset by peer]
isaachodes[m] has quit [Remote host closed the connection]
prsafont[m] has quit [Remote host closed the connection]
Virgile[m] has quit [Remote host closed the connection]
rgr[m] has quit [Remote host closed the connection]
regnat[m] has quit [Read error: Connection reset by peer]
smondet[m] has quit [Read error: Connection reset by peer]
hdurer[m] has quit [Write error: Connection reset by peer]
barockobamo has quit [Remote host closed the connection]
jao has joined #ocaml
gareppa has joined #ocaml
jimt[m] has joined #ocaml
keep-learning[m] has joined #ocaml
aspiwack[m] has joined #ocaml
zapashcanon[m] has joined #ocaml
smondet[m] has joined #ocaml
hdurer[m] has joined #ocaml
peddie has joined #ocaml
copy` has joined #ocaml
bglm[m] has joined #ocaml
flux has joined #ocaml
Haudegen[m] has joined #ocaml
stan[m] has joined #ocaml
isaachodes[m] has joined #ocaml
webax[m] has joined #ocaml
Virgile[m] has joined #ocaml
rgr[m] has joined #ocaml
sepp2k has joined #ocaml
regnat[m] has joined #ocaml
dl3br[m] has joined #ocaml
aecepoglu[m] has joined #ocaml
cgenie[m] has joined #ocaml
otini has joined #ocaml
prsafont[m] has joined #ocaml
gareppa has quit [Quit: Leaving]
spew has joined #ocaml
<companion_cube>
Format is ♥
ygrek_ has joined #ocaml
<spew>
is it?
<companion_cube>
definitely, I miss it in other languages
<narimiran>
but their "A concrete example" is.... okayish, i guess
<narimiran>
but maybe i should ask another question: how do you print your maps/hashtables or 'a list lists or stuff like that (e.g. for debugging purposes)?
<narimiran>
my current solution is: copy-paste everything into utop, and utop will print what i need
<companion_cube>
I use CCFormat, in containers; there's `Fmt` as a popular library for that
<companion_cube>
and then I write my printers by hand, but if you're willing to use ppx there's `ppx_deriving.show1
<companion_cube>
.show`
<ggole>
The ppx ones are pretty bad
<narimiran>
any example of such usage of CCFormat + printer?
<narimiran>
thanks for the links, companion_cube! it will take me couple of days to wrap my head around all that @ stuff
<companion_cube>
it's a bit intimidating at first, but really, it's super nice
<companion_cube>
%d, %s, etc. work as everywhere else
<companion_cube>
%a is a parametrized formatter (so it takes printer + value), crucial for composing printers
<companion_cube>
and @[ … @] is a box, with `@ ` a breaking space and `@,` a break point (places where newlines can be inserted in boxes)
<companion_cube>
all the @ stuff is for formatting; all the % stuff is for how to print values
<spew>
I wish %a didn't expect "out_channel -> 'b -> unit" but just "'b -> string"
<companion_cube>
but that'd be very inefficient
<companion_cube>
(with format, it requires `Format.formatter -> 'a -> unit` btw)
<companion_cube>
spew: you would build a ton of intermediate strings
<spew>
yeah it depends on the Format6 type
<spew>
it's 'b -> 'a -> 'f
<spew>
I think
<spew>
where those match up to the format6 type variables
<companion_cube>
I must say I mostly use Format for printing stuff, as it's more flexible (you can print to files, buffers, custom formatters, etc.)
<companion_cube>
whereas the `Printf` stuff is a bit too specialized, alas
<spew>
I'm always using Printf I guess that's my problem
amiloradovsky has quit [Ping timeout: 276 seconds]
<ggole>
sprintf's %a expects a unit -> 'a -> string, if you really want that
<ggole>
(Not a good idea imo.)
<spew>
I know
<spew>
I just have never thought about using Format
<spew>
so I always define string_of functions
<spew>
instead of Format compatible ones
<spew>
that's really what my problem is
<spew>
I should do a big conversion
<companion_cube>
you can get back a to_string function using `let to_string x = Format.asprintf "%a" pp x`
<spew>
yes exactly
<spew>
instead I'm going straight to the less flexible thing
<spew>
I just never really thought about it
<companion_cube>
Format can be a bit complicated at first
<narimiran>
a bit? :D
ggole has quit [Quit: Leaving]
gareppa has joined #ocaml
zolk3ri has joined #ocaml
<jco>
Hey! Anyone using nix to manage their ocaml configuration per project?
<jco>
Of course opam can do this but I'm curious to know
gareppa has quit [Remote host closed the connection]
<simpson>
jco: Yeah, I use Nix along with direnv to set up my development environment, and I use per-project configuration.
jnavila has joined #ocaml
<jco>
simpson: cool! I'm using it for a project but it fails to build libraries if I upgrade to ocaml 4.08 (vs ocaml 4.07). Did you run with such issues?
<jco>
(Im also using the ocaml packages from nixpkgs.ocaml-ng