adrien changed the topic of #ocaml to: Discussions about the OCaml programming language | http://www.ocaml.org | OCaml 4.09 release notes: https://caml.inria.fr/pub/distrib/ocaml-4.09/notes/Changes | Try OCaml in your browser: http://try.ocamlpro.com | Public channel logs at http://irclog.whitequark.org/ocaml
brettgilio has joined #ocaml
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
mbuf has quit [Quit: Leaving]
gareppa has joined #ocaml
porchetta has joined #ocaml
<porchetta> what does isout and -1+ mean in http://dpaste.com/2SNCR22 ?
ziyourenxiang has quit [Ping timeout: 240 seconds]
barockobamo has joined #ocaml
<flux> guessing from context: add minus 1
<flux> the latter that is
<flux> can't guess what isout would mean :)
<flux> could mean checking if the value is boxed, but why would it do that..
<flux> actually it could mean that is tests if the value is > 2 and if so, it throws an exception handled by the catch
<flux> maybe not a real exception even though they are quite affordable, but for the purpose of local control flow..
<flux> so I guess switch* doesn't support 'else' clause
mbuf has joined #ocaml
smazga has joined #ocaml
<porchetta> thanks
drewr has joined #ocaml
mbuf has quit [Quit: Leaving]
amiloradovsky has joined #ocaml
nicoo has quit [Remote host closed the connection]
nicoo has joined #ocaml
barockobamo has quit [Remote host closed the connection]
gravicappa has quit [Read error: Connection reset by peer]
gravicappa has joined #ocaml
gravicappa has quit [Read error: Connection reset by peer]
gravicappa has joined #ocaml
gravicappa has quit [Read error: Connection reset by peer]
gravicappa has joined #ocaml
gravicappa has quit [Read error: Connection reset by peer]
gravicappa has joined #ocaml
gravicappa has quit [Read error: Connection reset by peer]
bitwinery has joined #ocaml
bitwinery has quit [Max SendQ exceeded]
bitwinery has joined #ocaml
gravicappa has joined #ocaml
gravicappa has quit [Read error: Connection reset by peer]
gravicappa has joined #ocaml
free_beard has quit [Remote host closed the connection]
gareppa has quit [Quit: Leaving]
ollehar has quit [Ping timeout: 250 seconds]
jco has joined #ocaml
<narimiran> is there some tutorial (or just some code examples) where one can learn how to use Format module?
<companion_cube> !search format
<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?
<companion_cube> although it might be a bit old
<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
gareppa has joined #ocaml
<simpson> jco: Here's the shell.nix I'm currently using in one project: https://gist.github.com/97afedbe1db3ec9f0de2f4ee71674816
<simpson> It really depends on the precise versions of things. Yes, I've had one-off version errors, but then I fixed them, I think.
Serpent7776 has joined #ocaml
gareppa has quit [Quit: Leaving]
<jco> thanks, I'm trying to find which libraries I have to fix!
webax[m] has quit [Quit: User has been idle for 30+ days.]
jaar has quit [Ping timeout: 265 seconds]
Haudegen has joined #ocaml
vicfred has joined #ocaml
bartholin has quit [Read error: Connection reset by peer]
gravicappa has quit [Ping timeout: 240 seconds]
bartholin has joined #ocaml
nullifidian__ has joined #ocaml
nullifidian_ has quit [Ping timeout: 265 seconds]
jao has quit [Remote host closed the connection]
kakadu has joined #ocaml
jao has joined #ocaml
Tsukimaru has joined #ocaml
Tsukimaru has quit [Client Quit]
gravicappa has joined #ocaml
Tsukimaru has joined #ocaml
Tsukimaru has quit [Quit: Leaving]
kjak has joined #ocaml
ocabot has quit [Remote host closed the connection]
ocabot has joined #ocaml
vicfred has quit [Quit: Leaving]
narimiran has quit [Ping timeout: 240 seconds]
brettgilio has quit [Ping timeout: 250 seconds]
bitwinery has quit [Quit: Leaving]
bitwinery has joined #ocaml
gravicappa has quit [Ping timeout: 265 seconds]
oni-on-ion has joined #ocaml
ravenousmoose has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
brettgilio has joined #ocaml
zolk3ri has quit [Remote host closed the connection]
tane has quit [Quit: Leaving]
jco has quit [Quit: WeeChat 2.6]
jao has quit [Remote host closed the connection]
jnavila has quit [Remote host closed the connection]
jao has joined #ocaml
peddie has quit [Quit: authenticating]
ericjmorey has joined #ocaml
ericjmorey has quit [Remote host closed the connection]
vicfred has joined #ocaml
kakadu has quit [Remote host closed the connection]
ziyourenxiang has joined #ocaml
Serpent7776 has quit [Quit: leaving]