adrien changed the topic of #ocaml to: Discussions about the OCaml programming language | http://www.ocaml.org | OCaml 4.07.1 release notes: https://caml.inria.fr/pub/distrib/ocaml-4.07/notes/Changes | Try OCaml in your browser: http://try.ocamlpro.com | Public channel logs at http://irclog.whitequark.org/ocaml | Due to ongoing spam, you must register your nickname to talk on the channel
weird_error has quit [Quit: weird_error]
ziyourenxiang has joined #ocaml
weird_error has joined #ocaml
weird_error has quit [Quit: weird_error]
weird_error has joined #ocaml
weird_error has quit [Quit: weird_error]
weird_error has joined #ocaml
weird_error has quit [Quit: weird_error]
oni-on-ion has joined #ocaml
andrewalker has quit [Ping timeout: 244 seconds]
<ghostyy> how do i get type information in the repl? like how ghc has :t
andrewalker has joined #ocaml
<ghostyy> oh utop does it although i dont know how to make it load my file, it complains about cant find module Core
<ghostyy> String.concat " " (List.map (fun x -> x) []) this snippet works in utop but in my file it complains Error: The function applied to this argument has type ?sep:Core.String.t -> string This argument cannot be applied without label with characters corresponding to the (List.map ...) bit
andrewalker has quit [Quit: ZNC 1.6.2 - http://znc.in]
FreeBirdLjj has joined #ocaml
<ghostyy> oh, opening Core changes the definition of "String.concat" "List.map" to something that uses named arguments (and also reorders the arguments in List.map????)
<oni-on-ion> yea its a different standard lib
<oni-on-ion> im still using the default builtin one so far. been looking at "Tablecloth" though
FreeBirdLjj has quit [Ping timeout: 258 seconds]
andrewalker has joined #ocaml
<companion_cube> you could use containers, it extends the stdlib ;)
<companion_cube> (it's also my lib, so shameless plug)
mfp has quit [Ping timeout: 246 seconds]
<oni-on-ion> or modules =)
okuu has joined #ocaml
ale64bit has joined #ocaml
_whitelogger has joined #ocaml
gravicappa has joined #ocaml
jao has quit [Ping timeout: 246 seconds]
ale64bit has quit [Ping timeout: 246 seconds]
oni-on-ion has quit [Remote host closed the connection]
caltelt_ has joined #ocaml
ygrek has quit [Ping timeout: 255 seconds]
oni-on-ion has joined #ocaml
JimmyRcom has quit [Ping timeout: 268 seconds]
JimmyRcom has joined #ocaml
sonologico has quit [Ping timeout: 246 seconds]
caltelt_ has quit [Ping timeout: 258 seconds]
ShalokShalom has joined #ocaml
ShalokShalom has quit [Remote host closed the connection]
bytesighs has quit [Read error: Connection reset by peer]
lynn_ is now known as lynn
chenglou has quit [Write error: Connection reset by peer]
mjvoge02 has quit [Read error: Connection reset by peer]
bytesighs has joined #ocaml
mgsk has quit [Write error: Connection reset by peer]
adi________ has quit [Read error: Connection reset by peer]
chenglou has joined #ocaml
mjvoge02 has joined #ocaml
adi________ has joined #ocaml
jerme_ has quit [Write error: Connection reset by peer]
mgsk has joined #ocaml
jyc___ has quit [Ping timeout: 258 seconds]
JSharp has quit [Write error: Connection reset by peer]
jerme_ has joined #ocaml
angerman has quit [Write error: Connection reset by peer]
cbarrett has quit [Read error: Connection reset by peer]
ec has quit [Read error: Connection reset by peer]
timeless has quit [Read error: Connection reset by peer]
JSharp has joined #ocaml
jyc___ has joined #ocaml
angerman has joined #ocaml
cbarrett has joined #ocaml
ec has joined #ocaml
timeless has joined #ocaml
bitonic has quit [Ping timeout: 258 seconds]
ygrek has joined #ocaml
bitonic has joined #ocaml
sunil has joined #ocaml
Haudegen has joined #ocaml
barockobamo has joined #ocaml
pierpal has joined #ocaml
pierpal has quit [Quit: Poof]
pierpal has joined #ocaml
kvda has joined #ocaml
kvda has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ygrek has quit [Ping timeout: 255 seconds]
silver has joined #ocaml
silver has quit [Read error: Connection reset by peer]
silver has joined #ocaml
Serpent7776 has joined #ocaml
jaar has joined #ocaml
amosbird has quit [Ping timeout: 246 seconds]
amosbird has joined #ocaml
silver has quit [Read error: Connection reset by peer]
silver has joined #ocaml
nullifidian_ is now known as nullifidian
silver has quit [Read error: Connection reset by peer]
silver has joined #ocaml
silver has quit [Remote host closed the connection]
jbrown has quit [Ping timeout: 258 seconds]
kakadu has joined #ocaml
oni-on-ion has quit [Remote host closed the connection]
sagax has quit [Quit: Konversation terminated!]
sagax has joined #ocaml
dhil has joined #ocaml
ShalokShalom has joined #ocaml
mfp has joined #ocaml
Haudegen has quit [Remote host closed the connection]
gravicappa has quit [Ping timeout: 246 seconds]
gravicappa has joined #ocaml
salmon123 has joined #ocaml
salmon123 has left #ocaml [#ocaml]
wilfredh has joined #ocaml
<wilfredh> morning folks :)
<wilfredh> I have a style question
<wilfredh> which is better?
<wilfredh> let () = foo 1 in let () = bar 2 in ...
<wilfredh> or
<wilfredh> foo 1; bar 2; ...
<theblatte> foo 1 ; bar 2 ; ... :)
<wilfredh> is there any difference?
<wilfredh> I was wondering if the code was written to deliberately be defensive against e.g. `foo` taking two arguments
<theblatte> makes the `;` slightly more prominent since it's an important operation
<theblatte> ocaml will already warn if foo is partially applied (more precisely, if the result is not of type unit)
freyr69 has joined #ocaml
<theblatte> let _ = foo 1 in ... is the dangerous one, even ignore (foo 1) will warn (w5) if `foo 1` is partially applied
<wilfredh> thank you :)
ygrek has joined #ocaml
ShalokShalom has quit [Remote host closed the connection]
<vsiles> I usually use let ()/_ = to add some printfs in some strange places
<vsiles> also that reminds me: if then; should be baned :D
reynir has quit [Quit: WeeChat 2.4]
reynir has joined #ocaml
ggole has joined #ocaml
dhil has quit [Ping timeout: 246 seconds]
ShalokShalom has joined #ocaml
andreas303 has quit [Remote host closed the connection]
dhil has joined #ocaml
ShalokShalom has quit [Remote host closed the connection]
jao has joined #ocaml
jao is now known as Guest65111
ShalokShalom has joined #ocaml
weird_error has joined #ocaml
ShalokShalom has quit [Remote host closed the connection]
weird_error has quit [Quit: weird_error]
<notnotdan`> Does anyone here has experience with Fmt? I am trying to find out if I am using it correctly: https://gist.github.com/co-dan/4e19be3843a7a0ff4515eaa1ad176df8
<notnotdan`> I just want to format an AST nicely.
<notnotdan`> I guess my biggest issue is that I don't immediately see the usefulness of it, because for the formatting my inductive types I have to write the pretty-printers as functions of Format.t, instead of just using combinators
andreas303 has joined #ocaml
status402 has joined #ocaml
<ggole> I usually just use Format directly
<ggole> I think the main appeal is that you don't have to repetitively specify boxes in format strings
<notnotdan`> I see. Do you possible have an example I can look at?
<ggole> eg, with Format when you write "(%a)" the parens will not interact with boxes at all, so you probably won't get the result you want: you need to write "(%[<2>%a%])" or something like that, whereas the combinators will do that stuff for you
<notnotdan`> I only saw the Format example in the tutorial
<notnotdan`> What do you mean the parents will not interact with boxes? the argument for %a will be printed according to its box, right?
<ggole> The stuff in the manual is worth looking at
<ggole> The box for the %a won't be 'inside' the parens
<ggole> (If the %a printer establishes it's own boxes, then those will be fine.)
<notnotdan`> Yeah I see. thanks
status402 has quit [Quit: status402]
spew has joined #ocaml
ShalokShalom has joined #ocaml
dhil has quit [Ping timeout: 257 seconds]
dhil has joined #ocaml
ShalokShalom has quit [Remote host closed the connection]
jbrown has joined #ocaml
ygrek has quit [Ping timeout: 258 seconds]
freyr69 has quit [Remote host closed the connection]
ShalokShalom has joined #ocaml
dhil has quit [Ping timeout: 250 seconds]
dimitarvp has joined #ocaml
dimitarvp has quit [Client Quit]
oni-on-ion has joined #ocaml
ziyourenxiang has quit [Ping timeout: 268 seconds]
pyon has joined #ocaml
pyon has quit [Quit: ERC (IRC client for Emacs 26.2)]
barockobamo has quit [Remote host closed the connection]
jbrown has quit [Ping timeout: 258 seconds]
jbrown has joined #ocaml
Jesin has quit [Quit: Leaving]
govg has joined #ocaml
AtumT has joined #ocaml
Jesin has joined #ocaml
pierpal has quit [Quit: Poof]
pierpal has joined #ocaml
tane has joined #ocaml
q9929t has joined #ocaml
sagax has quit [Read error: Connection reset by peer]
sagax has joined #ocaml
dhil has joined #ocaml
q9929t has quit [Client Quit]
sagax has quit [Ping timeout: 245 seconds]
jaar has quit [Quit: Leaving]
pyon has joined #ocaml
sagax has joined #ocaml
sagax has quit [Ping timeout: 268 seconds]
sagax has joined #ocaml
sagax has quit [Client Quit]
TheLemonMan has joined #ocaml
AtumT_ has joined #ocaml
AtumT has quit [Ping timeout: 246 seconds]
Anarchos has joined #ocaml
<Anarchos> is it possible to use Format.pp_print_string in order to write on a Unix local socket ?
pyon has quit [Ping timeout: 268 seconds]
<companion_cube> sure, turn your socket into a out_channel, then use Format.formatter_of_channel or something like that
<companion_cube> don't forget to flush
ravenous_ has joined #ocaml
jrslepak has quit [Quit: leaving]
jrslepak has joined #ocaml
djellemah has joined #ocaml
kakadu has quit [Quit: Konversation terminated!]
Anarchos has quit [Quit: Vision[0.10.3]: i've been blurred!]
gravicappa has quit [Ping timeout: 258 seconds]
djellemah has quit [Ping timeout: 250 seconds]
ShalokShalom has quit [Remote host closed the connection]
lelf has joined #ocaml
tane has quit [Quit: Leaving]
<notnotdan`> ah flushing, of course
ale64bit has joined #ocaml
<lelf> Hi. I have a newbie stupid question -- TLD;R is "#show option" works as expected, but after "open Base" it only shows "'a Base.Option.t". How do I actually see the definition?
dhil has quit [Ping timeout: 255 seconds]
<octachron> lelf, option is particular because it is a predefined type. For other types, you can just follow the aliases
Haudegen has joined #ocaml
<lelf> octachron: why do I see it in "Stdlib", but not after "open Base"? And how do I actually see it?
<companion_cube> Base isn't compatible with the stdlib
<octachron> Well, option is not part of Stdlib but is part of small group of core types that pre-exists the Stdlib.
<octachron> The problem is that when you open base, the base export of option shadows the original one, and you lost access to the name of the original option
<lelf> refrasing it, how do I see the definition of option after "open Base"? No way at all?
<lelf> it's more a theoretical question, but I'm trying to understand
<octachron> I don't see any way before 4.08
<octachron> I imagine you could define module Predef = struct type 'a t = 'a option = None | Some of 'a end
<octachron> But this is a lot of effort for a mostly theoretical question
<lelf> and with 4.08?
<octachron> there is Stdlib.Option.t
ravenous_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<lelf> how does it help with base's option? :) And still, what makes it inaccessible with "#show"?
<octachron> because base option is the same thing as the predefined/stdlib option
jack5638 has quit [Ping timeout: 246 seconds]
<lelf> the same, but still defined in base, but isn't it shadowed?
TheLemonMan has quit [Ping timeout: 244 seconds]
jack5638 has joined #ocaml
<octachron> Base defines an alias to option: https://github.com/janestreet/base/blob/master/src/base.ml#L300
sonologico has joined #ocaml
rilakika has joined #ocaml
Serpent7776 has quit [Quit: leaving]
vic_ has joined #ocaml
vsui has joined #ocaml
<vsui> Could I ask an ocamlformat question?
<octachron> lelf, it is just base option being defined as equal to stdlib option
<vsui> Basically, I am using neoformat with ocamlformat and it seems to have trouble formatting .mli files with nested module signatures
ggole has quit [Quit: Leaving]
<vsui> From what I can tell neoformat writes the .mli file buffer to a temp file with no extension so ocamlformat can't tell its meant to be a .mli file and gives a syntax error when trying to format
<vsui> Wondering if anyone has encountered this/knows a fix
rilakika has quit [Ping timeout: 256 seconds]
<lelf> octachron: so still, who do I sacrifice to see the def of option, after open Base, in 4.08.0? :)
<octachron> #show Caml.Option.t should work
vic_ has quit [Ping timeout: 256 seconds]
ale64bit has quit [Read error: Connection reset by peer]
<lelf> well, it's not in 4.08.0+beta3. And how to I even know that it's Caml.Option.t
<octachron> did you open base, and which version?
<octachron> (I am not sure why you are so keen on displaying option documentation with #show)
<lelf> Yes, opened, base=v0.12.0. Just trying to understand. A haskeller making sense of ocaml basically
<octachron> base 0.12 does not support 4.08?
<octachron> but honestly, this is just a minor flaw of #show which cannot show a predefined type once it has been shadowed by an alias to itself
sonologico has quit [Remote host closed the connection]
sonologico has joined #ocaml
spew has quit [Quit: going home]
timeless has quit [Ping timeout: 252 seconds]
timeless has joined #ocaml
sonologico has quit [Remote host closed the connection]
sonologico has joined #ocaml
vsui has quit [Ping timeout: 246 seconds]
Haudegen has quit [Ping timeout: 258 seconds]
sonologico has quit [Remote host closed the connection]
sonologico has joined #ocaml
ShalokShalom has joined #ocaml
caltelt_ has joined #ocaml
lelf has quit [Ping timeout: 268 seconds]
caltelt_ has quit [Ping timeout: 246 seconds]
vsui has joined #ocaml
vsui has quit [Ping timeout: 259 seconds]
Redfoxmoon has quit [Read error: Connection reset by peer]
Redfoxmoon has joined #ocaml
nullifidian has quit [Ping timeout: 258 seconds]
vsui has joined #ocaml
sonologico has quit [Remote host closed the connection]
sz0 has joined #ocaml
sonologico has joined #ocaml
seliopou has quit [Ping timeout: 244 seconds]
vsui has quit [Ping timeout: 258 seconds]
kark_ has quit [Remote host closed the connection]