adrien changed the topic of #ocaml to: Discussions about the OCaml programming language | http://www.ocaml.org | OCaml MOOC http://1149.fr/ocaml-mooc | OCaml 4.02.3 announced http://ocaml.org/releases/4.02.html | Try OCaml in your browser: http://try.ocamlpro.com | Public channel logs at http://irclog.whitequark.org/ocaml
mrvn has quit [Ping timeout: 252 seconds]
mrvn has joined #ocaml
noddy has joined #ocaml
mistermetaphor has joined #ocaml
jeffmo has quit [Quit: jeffmo]
mistermetaphor has quit [Remote host closed the connection]
cdidd has quit []
rgrinberg has joined #ocaml
dsheets has joined #ocaml
cdidd has joined #ocaml
dsheets has quit [Ping timeout: 248 seconds]
noddy has quit [Ping timeout: 260 seconds]
Vintila has quit [Ping timeout: 244 seconds]
tennix has joined #ocaml
sh0t has joined #ocaml
jfntn has joined #ocaml
cdidd has quit [Remote host closed the connection]
cdidd has joined #ocaml
cdidd has quit [Remote host closed the connection]
jfntn has quit [Ping timeout: 244 seconds]
fraggle_ has quit [Ping timeout: 246 seconds]
fraggle_ has joined #ocaml
dsheets has joined #ocaml
fraggle_ has quit [Ping timeout: 246 seconds]
teknozulu has joined #ocaml
dsheets has quit [Ping timeout: 250 seconds]
tennix has quit [Ping timeout: 240 seconds]
cdidd has joined #ocaml
cdidd has quit []
average has joined #ocaml
mistermetaphor has joined #ocaml
rgrinberg has quit [Ping timeout: 244 seconds]
mistermetaphor has quit [Remote host closed the connection]
cdidd has joined #ocaml
cdidd has quit [Remote host closed the connection]
cdidd has joined #ocaml
seangrove has quit [Remote host closed the connection]
cdidd has quit [Client Quit]
cdidd has joined #ocaml
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
<destrius> hmm
FreeBirdLjj has joined #ocaml
<destrius> is jane street core supposed to work nicely with ppx_deriving_yojson and ppx_import?
<destrius> getting some confusing errors
hcarty has joined #ocaml
srcerer_ has joined #ocaml
jpdeplaix has quit [Ping timeout: 248 seconds]
srax has quit [Ping timeout: 248 seconds]
srcerer has quit [Ping timeout: 248 seconds]
tristero has quit [Ping timeout: 248 seconds]
wolfcore has quit [Ping timeout: 248 seconds]
wolfcore has joined #ocaml
tmtwd has joined #ocaml
anoisz has joined #ocaml
sh0t has quit [Quit: Leaving]
enquora has quit [Quit: enquora]
jpdeplaix has joined #ocaml
srax has joined #ocaml
tristero has joined #ocaml
average has quit [Remote host closed the connection]
average has joined #ocaml
average has quit [Changing host]
average has joined #ocaml
hcarty has quit [Ping timeout: 240 seconds]
tree_ has quit [Quit: Page closed]
copy` has quit [Quit: Connection closed for inactivity]
anoisz has quit [Ping timeout: 268 seconds]
johnelse has quit [Ping timeout: 248 seconds]
johnelse has joined #ocaml
pierpa has quit [Ping timeout: 246 seconds]
srcerer_ is now known as srcerer
tennix has joined #ocaml
average has quit [Quit: leaving]
Algebr has joined #ocaml
teknozulu_ has joined #ocaml
teknozulu has quit [Ping timeout: 244 seconds]
dsheets has joined #ocaml
mistermetaphor has joined #ocaml
dsheets has quit [Ping timeout: 250 seconds]
nichola__ has joined #ocaml
nicholasf has quit [Ping timeout: 260 seconds]
nichola__ has quit [Read error: Connection reset by peer]
nicholasf has joined #ocaml
pyon has quit [Quit: Reality is multi-dimensional. More precisely, two-dimensional.]
MercurialAlchemi has joined #ocaml
pyon has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
Algebr has quit [Read error: Connection reset by peer]
ygrek has quit [Ping timeout: 244 seconds]
Algebr has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 276 seconds]
MercurialAlchemi has joined #ocaml
dhil has joined #ocaml
nichola__ has joined #ocaml
nicholasf has quit [Ping timeout: 248 seconds]
cgc_ has joined #ocaml
njvg has joined #ocaml
dsheets has joined #ocaml
dsheets has quit [Ping timeout: 250 seconds]
mj12` has quit [Ping timeout: 240 seconds]
zpe has quit [Ping timeout: 268 seconds]
tobast has quit [Ping timeout: 250 seconds]
tmtwd has quit [Ping timeout: 248 seconds]
ygrek has joined #ocaml
mj12` has joined #ocaml
dhil has quit [Ping timeout: 276 seconds]
tobast has joined #ocaml
Kakadu has joined #ocaml
Kakadu has quit [Client Quit]
mistermetaphor has quit [Remote host closed the connection]
solrize has quit [Ping timeout: 268 seconds]
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
ygrek has quit [Ping timeout: 248 seconds]
AlexRussia has quit [Ping timeout: 244 seconds]
nichola__ has quit [Ping timeout: 240 seconds]
sz0 has joined #ocaml
Mercuria1Alchemi has joined #ocaml
Mercuria1Alchemi has quit [Ping timeout: 268 seconds]
kaustuv has joined #ocaml
cgc_ has quit [Quit: Leaving]
<kaustuv> Why does Format.pp_set_max_indent behave in this way? http://pastebin.com/4XTDJEqC
solrize has joined #ocaml
solrize has joined #ocaml
Simn has joined #ocaml
nicholasf has joined #ocaml
Algebr has quit [Ping timeout: 250 seconds]
hydan has joined #ocaml
nicholasf has quit []
Siorai has joined #ocaml
kushal has quit [Quit: Leaving]
zpe has joined #ocaml
noddy has joined #ocaml
noddy has quit [Ping timeout: 268 seconds]
silver has joined #ocaml
ygrek has joined #ocaml
kaustuv has left #ocaml ["ERC (IRC client for Emacs 24.5.1)"]
seangrove has joined #ocaml
sepp2k has joined #ocaml
noddy has joined #ocaml
kushal has joined #ocaml
larhat has joined #ocaml
demonimin has joined #ocaml
ygrek has quit [Ping timeout: 276 seconds]
jwatzman|work has joined #ocaml
jwatzman|work has quit [Remote host closed the connection]
jwatzman|work has joined #ocaml
pyon has quit [Ping timeout: 276 seconds]
dsheets has joined #ocaml
dsheets has quit [Remote host closed the connection]
dsheets has joined #ocaml
dsheets has quit [Remote host closed the connection]
dsheets has joined #ocaml
tobiasBora has quit [Ping timeout: 244 seconds]
_y has quit [Ping timeout: 276 seconds]
metaglog has joined #ocaml
noddy has quit [Ping timeout: 250 seconds]
_y has joined #ocaml
tobiasBora has joined #ocaml
A1977494 has joined #ocaml
M-Illandan has quit [Remote host closed the connection]
ggole has joined #ocaml
leyyin has joined #ocaml
M-Illandan has joined #ocaml
Siorai has quit [Ping timeout: 260 seconds]
dsheets has quit [Remote host closed the connection]
dsheets has joined #ocaml
noddy has joined #ocaml
noddy has quit [Ping timeout: 248 seconds]
<seangrove> Bah, no samoht around to bug re: Irmin questions
Mercuria1Alchemi has joined #ocaml
<flux> soo.. js_of_ocaml and https://facebook.github.io/react-native/ for mobile development, is it realistic?-)
<seangrove> flux: I've been hoping/prodding/pleading Algebr` to explore that route, it's one of the most exciting applications of OCaml for a lot of peope
<seangrove> It's going to be pretty prickly/painful for the first pioneer down there, but they'll be doing a lot of good for the rest of us
Mercuria1Alchemi has quit [Ping timeout: 246 seconds]
noddy has joined #ocaml
<seangrove> What json lib should I be using with auto-json deriving stuff? Yojson?
sz0 has quit [Quit: Connection closed for inactivity]
pyon has joined #ocaml
<zozozo> seangrove: ppx_deriving_yojson ?
<seangrove> zozozo: Yeah, using that, thanks
noddy has quit [Ping timeout: 240 seconds]
dsheets has quit [Remote host closed the connection]
dsheets has joined #ocaml
pyon has quit [Ping timeout: 260 seconds]
<Drup> seangrove: eliom people have been doing mobile applications (with cordova) lately
malina has quit [Ping timeout: 246 seconds]
fraggle_ has joined #ocaml
dsheets has quit [Remote host closed the connection]
malina has joined #ocaml
<flux> but then you would be using cordova.. of course, impossible to say if react native is any better :)
BitPuffin has joined #ocaml
seangrove has quit [Ping timeout: 244 seconds]
dsheets has joined #ocaml
ditadi has joined #ocaml
mettekou has joined #ocaml
mettekou has quit [Client Quit]
leyyin has quit [Quit: So Long, and Thanks for All the Fish]
AlexRussia has joined #ocaml
sh0t has joined #ocaml
ditadi has quit [Quit: WeeChat 1.4]
pyon has joined #ocaml
malina has quit [Ping timeout: 244 seconds]
rgrinberg has joined #ocaml
pyon has quit [Remote host closed the connection]
sh0t has quit [Ping timeout: 276 seconds]
pyon has joined #ocaml
seangrove has joined #ocaml
d0nn1e has quit [Ping timeout: 244 seconds]
d0nn1e has joined #ocaml
seangrove has quit [Ping timeout: 276 seconds]
pyon has quit [Ping timeout: 260 seconds]
pyon has joined #ocaml
zpe has quit [Remote host closed the connection]
sz0 has joined #ocaml
pyon has quit [Ping timeout: 246 seconds]
seangrove has joined #ocaml
pyon has joined #ocaml
seangrove has quit [Ping timeout: 264 seconds]
noddy has joined #ocaml
dsheets_ has joined #ocaml
dsheets has quit [Ping timeout: 246 seconds]
seangrove has joined #ocaml
seangrov` has joined #ocaml
noddy has quit [Quit: "it's a bit backwards around here"]
sh0t has joined #ocaml
pyon has quit [Ping timeout: 252 seconds]
seangrove has quit [Ping timeout: 252 seconds]
seangrov` has quit [Ping timeout: 244 seconds]
njvg has quit [Quit: Page closed]
copy` has joined #ocaml
tennix has quit [Ping timeout: 246 seconds]
MercurialAlchemi has quit [Ping timeout: 248 seconds]
MercurialAlchemi has joined #ocaml
hcarty has joined #ocaml
tmtwd has joined #ocaml
darkf has quit [Quit: Leaving]
<Leonidas> seako: I use ppx_deriving_yojson, works alright.
<Leonidas> seangrove, I should watch out what nick I autocomplete
kushal has quit [Quit: Leaving]
mistermetaphor has joined #ocaml
FreeBird_ has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 250 seconds]
tennix has joined #ocaml
seangrove has joined #ocaml
dsheets_ has quit [Remote host closed the connection]
matason has joined #ocaml
<zozozo> quick question: say you have to implement a function type with named parameters, is there a way to have named parameters not used in the function body, but without triggering the related warning ? I could do something like [@@@ocaml.warning "-27"], but I was wondering if there was another better way ?
dsheets has joined #ocaml
kushal has joined #ocaml
<Leonidas> let _ = your_arg in …?
<zozozo> Leonidas: the function should have type : "x:int -> int" for instance
<companion_cube> let f ~x:_ = ...
<zozozo> companion_cube: thx
<Leonidas> even better
<companion_cube> can also be used to rename a named arg
<companion_cube> ~f:foo
<companion_cube> ?f:(foo=42)
<companion_cube> :D
<companion_cube> ok, arcane syntax, much
slash^ has joined #ocaml
matason has quit [Ping timeout: 252 seconds]
FreeBird_ has quit [Remote host closed the connection]
<Leonidas> companion_cube: how do you come up with such things? do you read through the parser when bored? ;-)
<companion_cube> no
<companion_cube> I met the same problem, and managed to find the solution in the manual :D
<companion_cube> afaicr
FreeBirdLjj has joined #ocaml
<companion_cube> I like optional arguments, which explains why I know some corners
<def`> Leonidas: this is a nice practice :)
<Drup> The parser is a great read, it's full of surprises
FreeBirdLjj has quit [Ping timeout: 264 seconds]
pierpa has joined #ocaml
nicholasf has joined #ocaml
chindy has joined #ocaml
johnf has joined #ocaml
lokien_ has joined #ocaml
<struktured> companion_cube: cool trick
wiredsister has joined #ocaml
rgrinberg has quit [Ping timeout: 246 seconds]
jwatzman|work has quit [Quit: jwatzman|work]
larhat has quit [Quit: Leaving.]
nicholasf has quit [Remote host closed the connection]
Algebr has joined #ocaml
shinnya has joined #ocaml
Kakadu has joined #ocaml
ygrek has joined #ocaml
foocraft has joined #ocaml
orbifx has joined #ocaml
tennix has quit [Ping timeout: 252 seconds]
<seangrove> Is there a way to get Lwt to unwrap a value (blocking on it if necessary)?
<flux> Lwt_unix.run
<seangrove> flux: Hrm, will that work on Mirage or jsoo?
<flux> probably not
octachron has joined #ocaml
shinnya has quit [Ping timeout: 268 seconds]
sh0t has quit [Ping timeout: 250 seconds]
djellemah_ has joined #ocaml
<seangrove> Say I have a list of lwt items, e.g. post Lwt.t list, and I want to make it a Lwt.t post list, how do I go about that?
<seangrove> Bah, >>= is probably what I want
orbifx has quit [Ping timeout: 246 seconds]
<seangrove> (unwrapping both items is proving a little tricky in my head)
rpip has quit [Ping timeout: 250 seconds]
rpip has joined #ocaml
sepp2k has quit [Quit: Leaving.]
<flux> certainly >>= is what you usually do
<flux> there are also nice ppx extensions available to make that slightly less syntactically heavy
<seangrove> Yeah, is there a better way to write this? Seems a bit javascript-callback-hellish https://gist.github.com/sgrove/2061354c546817c03b4d99ebe4ef50f7
<flux> yes, by using the @@ operator :)
<flux> but it's not actually the same as the callback hell
pyon has joined #ocaml
<flux> because you can't screw it up by calling the wrong callback
<flux> oh you're already using let%lwt there
nicholasf has joined #ocaml
<seangrove> flux: That's all I know though
<seangrove> I suppose it looks a bit like https://i.imgur.com/BtjZedW.jpg
<flux> but that's not callback hell.. :)
<flux> Lwt provides its only list functions that deal with the monad
sepp2k has joined #ocaml
<flux> I don't use Lwt a lot but perhaps you are looking something like what I updated to the gist
<seangrove> flux: I thought cb-hell was the stackign up of anonymous functions
<seangrove> Oh, that does look a lot nicer!
<flux> actually that's a bit wrong, there is no lwt_acc required at all
<seangrove> Sure, no problem
nicholasf has quit [Ping timeout: 240 seconds]
<flux> is the operation in fact a bit no-op.. :) Lwt_list.map Lwt.return posts
dsheets has quit [Remote host closed the connection]
<flux> I expect Lwt actually has that function already implemented in Lwt_list
dsheets has joined #ocaml
<flux> in fact you should just do let lwt_posts = Lwt.list.map (fun post -> read_fs fs post.file) posts :-)
<flux> and even further: let%lwt posts' = ..
lokien_ has quit [Quit: Connection closed for inactivity]
<flux> I guess a lot of time the value an Lwt monad has is extracted right away with the binding operation (let%lwt or >>=)
<flux> instead of held arond, unless you need to put them through some pure facilities like List.map, just like you had done
<seangrove> flux: I'm not sure I get the "and even further" part - are you saying it can be collapsed into one expression?
<seangrove> One moment, I think it might be able to! :)
dsheets has quit [Ping timeout: 276 seconds]
djellemah has quit [Disconnected by services]
djellemah_ is now known as djellemah
djellemah_ has joined #ocaml
mettekou has joined #ocaml
ggole has quit []
dsheets has joined #ocaml
<flux> companion_cube, oh you moved containers.misc to its own package, makes sense. but now I need to fix my builds!
<Drup> seangrove: you should take a closer look at Lwt_list
dsheets has quit [Ping timeout: 250 seconds]
<seangrove> Drup: I've certainly looked through it, had been using a few functions, but will poke around some more
<flux> the ability to understand how to apply those functions will come with experience, it seems you have had a few of those heureka-moments already :).
<Drup> (and btw, this is not really callback hell, more like monad stack hell)
<flux> I would call it hell only after more than one monad is involved
AlexRussia has quit [Quit: WeeChat 1.4-dev]
<Drup> flux: 2, Lwt and List
<flux> well List is not being used monadically here, though I suppose it's quite close with its higher-order-functions
TheLemonMan has joined #ocaml
octachron has quit [Quit: Leaving]
hydan has quit [Quit: hydan]
slash^ has quit [Read error: Connection reset by peer]
hydan has joined #ocaml
hydan has quit [Remote host closed the connection]
mistermetaphor has quit [Remote host closed the connection]
Algebr has quit [Ping timeout: 260 seconds]
wiredsister has quit [Ping timeout: 268 seconds]
mistermetaphor has joined #ocaml
dsheets has joined #ocaml
BitPuffin has quit [Ping timeout: 276 seconds]
dsheets has quit [Ping timeout: 250 seconds]
silver has quit [Read error: Connection reset by peer]
silver has joined #ocaml
sh0t has joined #ocaml
malina has joined #ocaml
zpe has joined #ocaml
igitoor has quit [Ping timeout: 246 seconds]
igitoor has joined #ocaml
johnf has quit [Ping timeout: 246 seconds]
AlexRussia has joined #ocaml
<MercurialAlchemi> companion_cube: is there an lwt version of gen somewhere?
barcotoco has joined #ocaml
igitoor has joined #ocaml
igitoor has quit [Changing host]
<barcotoco> How can I get an OCaml program to print strings iteratively and not at the end of the program execution?
<zozozo> barcotoco: insert a print statement inside your program
<zozozo> howver AFAIR, channels are buffered in ocamls so you might want to flush the output if you want it to appear at the time you expect
<zozozo> so, in practice do things like: Format.printf "Hello world !@." (notice the @. at the end, which prints a newline and flushes the printer)
barcotoco has quit [Ping timeout: 250 seconds]
<Simn> Oh that's nice, now I don't have to write `print_endline (Printf.sprintf ...)` anymore.
barcoloco has joined #ocaml
sepp2k has quit [Quit: Leaving.]
johnf has joined #ocaml
<zozozo> Simn: well, Format has plenty of other shiny and useful features, such as boxes
barcoloco has quit [Client Quit]
johnf has quit [Ping timeout: 264 seconds]
MercurialAlchemi has quit [Ping timeout: 276 seconds]
<reynir> Is it »Printf.printf "hello world%!"«?
<reynir> yes
<j0sh> \n doesn't flush Printf.printf?
<zozozo> j0sh: why would it ? it's just an end of line character
A1977494 has quit [Remote host closed the connection]
johnf has joined #ocaml
Anarchos has joined #ocaml
johnf has quit [Ping timeout: 276 seconds]
<mahem1> Hmmm, anyone familiar with js_of_ocaml here?
<reynir> zozozo: Line buffering is quite common
<reynir> mahem1: yes, there are people here familiar with jsoo
<zozozo> reynir: I didn't know, probably because I code almost excluisvely in ocaml, :p
djellemah has quit [Ping timeout: 246 seconds]
<mahem1> Ok, so I am wondering how to properly pass data to and from ocaml and js. At the moment I can passing strings and numbers, but I am getting stuck on lists, records, objects...
<mahem1> I looked into JSON parsing, but it seems to be rather verbose.
chindy has quit [Remote host closed the connection]
zpe has quit [Remote host closed the connection]
zpe has joined #ocaml
zpe has quit [Remote host closed the connection]
zpe has joined #ocaml
johnf has joined #ocaml
zpe has quit [Ping timeout: 264 seconds]
TheLemonMan has quit [Quit: "It's now safe to turn off your computer."]
Nahra has quit [Ping timeout: 250 seconds]
ollehar1 has joined #ocaml
ollehar1 has quit [Client Quit]
ollehar1 has joined #ocaml
ollehar1 has quit [Client Quit]
Anarchos has quit [Excess Flood]
foocraft has quit [Remote host closed the connection]
teknozulu_ has quit [Ping timeout: 244 seconds]
fraggle_ has quit [Ping timeout: 246 seconds]
hcarty has quit [Ping timeout: 250 seconds]
fraggle_ has joined #ocaml
Algebr has joined #ocaml
nicholasf has joined #ocaml
Kakadu has quit [Remote host closed the connection]
dsheets has joined #ocaml
dsheets has quit [Ping timeout: 250 seconds]
badon has quit [Ping timeout: 244 seconds]
darkf has joined #ocaml
sh0t has quit [Ping timeout: 248 seconds]
Simn has quit [Quit: Leaving]
Jane-PC has joined #ocaml
Jane-PC has quit [Changing host]
Jane-PC has joined #ocaml
<companion_cube> flux: oh sorry! what do you need from containers.misc?
<companion_cube> I need to talk to mercurial tomorrow..
Nahra has joined #ocaml
sh0t has joined #ocaml
zpe has joined #ocaml
dsheets has joined #ocaml
dsheets has quit [Ping timeout: 250 seconds]
mettekou has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
mettekou has joined #ocaml
mettekou has quit [Client Quit]
silver has quit [Quit: rakede]
seangrov` has joined #ocaml
madroach has quit [Ping timeout: 244 seconds]
madroach has joined #ocaml
seangrove has quit [Ping timeout: 246 seconds]
Jane-PC has quit [Remote host closed the connection]
chindy has joined #ocaml
seangrov` has quit [Ping timeout: 264 seconds]
mistermetaphor has quit [Remote host closed the connection]