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
zaquest has joined #ocaml
lobo has quit [Quit: zleep]
ely-se has joined #ocaml
Denommus` is now known as Denommus
ryanartecona has quit [Quit: ryanartecona]
ollehar has quit [Quit: ollehar]
kakadu has quit [Remote host closed the connection]
fraggle_ has joined #ocaml
fraggle_ has quit [Ping timeout: 240 seconds]
JacobEdelman has quit [Quit: Connection closed for inactivity]
Fleurety has quit [Ping timeout: 256 seconds]
fraggle_ has joined #ocaml
Fleurety has joined #ocaml
badon has quit [Disconnected by services]
badon_ has joined #ocaml
badon_ is now known as badon
seangrove has joined #ocaml
fraggle_ has quit [Ping timeout: 245 seconds]
Guest14 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
lokien_ has quit [Quit: Connection closed for inactivity]
apache2_ has joined #ocaml
seangrov` has joined #ocaml
MorTal1ty_ has joined #ocaml
vishesh has quit [Quit: WeeChat 1.3]
noplamodo_ has joined #ocaml
cyraxjoe_ has joined #ocaml
Denommus` has joined #ocaml
Leonidas_ has joined #ocaml
cthuluh_ has joined #ocaml
gustav__1 has joined #ocaml
vpm_ has joined #ocaml
govg_ has joined #ocaml
rfv_ has joined #ocaml
vishesh has joined #ocaml
lambdahands_ has joined #ocaml
oskarth_ has joined #ocaml
seangrove has quit [*.net *.split]
Denommus has quit [*.net *.split]
govg has quit [*.net *.split]
nullremains has quit [*.net *.split]
rossberg has quit [*.net *.split]
djellemah has quit [*.net *.split]
noplamodo has quit [*.net *.split]
gustav___ has quit [*.net *.split]
chris2 has quit [*.net *.split]
NhanH has quit [*.net *.split]
cthuluh has quit [*.net *.split]
Leonidas has quit [*.net *.split]
rfv has quit [*.net *.split]
vpm has quit [*.net *.split]
cyraxjoe has quit [*.net *.split]
maker has quit [*.net *.split]
lambdahands has quit [*.net *.split]
MorTal1ty has quit [*.net *.split]
andreypopp has quit [*.net *.split]
stephe has quit [*.net *.split]
oskarth has quit [*.net *.split]
strmpnk has quit [*.net *.split]
Madars has quit [*.net *.split]
apache2 has quit [*.net *.split]
NhanH has joined #ocaml
andreypopp_ has joined #ocaml
chris2 has joined #ocaml
djellemah has joined #ocaml
Madars has joined #ocaml
lambdahands_ is now known as lambdahands
Denommus` is now known as Denommus
MorTal1ty_ is now known as MorTal1ty
fraggle_ has joined #ocaml
rfv_ is now known as rfv
virtualeyes has joined #ocaml
oskarth_ is now known as oskarth
strmpnk has joined #ocaml
stephe has joined #ocaml
maker has joined #ocaml
rossberg has joined #ocaml
stephe has quit [Changing host]
stephe has joined #ocaml
Guest38 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Denommus has quit [Quit: going home]
ely-se has quit [Quit: Leaving...]
fraggle_ has quit [Read error: Connection reset by peer]
struk|desk|away is now known as struk|desk2
sh0t has joined #ocaml
vpm_ is now known as vpm
struk|desk2 is now known as struk|desk|away
cmpxchg has quit [Remote host closed the connection]
sz0 has joined #ocaml
hnagamin has joined #ocaml
hnagamin has quit [Ping timeout: 256 seconds]
struk|desk|away is now known as struk|desk2
xiaolin has quit [Remote host closed the connection]
govg_ has quit [Ping timeout: 272 seconds]
seangrov` has quit [Ping timeout: 240 seconds]
virtualeyes has quit [Ping timeout: 256 seconds]
larhat1 has quit [Quit: Leaving.]
struk|desk2 is now known as struk|desk|away
please_help has quit [Ping timeout: 245 seconds]
please_help has joined #ocaml
hnagamin has joined #ocaml
hnagamin has quit [Read error: Connection reset by peer]
antkong has joined #ocaml
antkong has quit [Client Quit]
antkong has joined #ocaml
struk|desk|away is now known as struk|desk2
pierpa has quit [Ping timeout: 250 seconds]
ygrek_ has quit [Ping timeout: 276 seconds]
govg has joined #ocaml
antkong has quit [Quit: antkong]
enitiz has joined #ocaml
ryanartecona has joined #ocaml
sh0t has quit [Remote host closed the connection]
JacobEdelman has joined #ocaml
mac10688 has quit [Ping timeout: 256 seconds]
enitiz has quit [Quit: Leaving]
ygrek_ has joined #ocaml
ryanartecona has quit [Quit: ryanartecona]
Sorella has quit [Quit: Connection closed for inactivity]
octachron has joined #ocaml
badon has quit [Ping timeout: 250 seconds]
struk|desk2 is now known as struk|desk
MercurialAlchemi has joined #ocaml
kansi has joined #ocaml
ygrek_ has quit [Ping timeout: 256 seconds]
badon has joined #ocaml
darkf has joined #ocaml
lokien_ has joined #ocaml
slash^ has joined #ocaml
struk|desk is now known as struk|desk|away
Simn has joined #ocaml
octachron has quit [Ping timeout: 250 seconds]
octachron has joined #ocaml
Guest14 has joined #ocaml
lokien_ has quit [Quit: Connection closed for inactivity]
damason has quit [Ping timeout: 250 seconds]
JacobEdelman has quit [Quit: Connection closed for inactivity]
aantron has quit [Remote host closed the connection]
yawnt has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 240 seconds]
slash^ has quit [Read error: Connection reset by peer]
slash^ has joined #ocaml
Guest14 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
MercurialAlchemi has joined #ocaml
Leonidas_ is now known as Leonidas
Guest14 has joined #ocaml
antkong has joined #ocaml
eni_ has joined #ocaml
eni_ is now known as eni
sillyotter has joined #ocaml
Guest14 has quit [Quit: Textual IRC Client: www.textualapp.com]
sillyotter has quit [Client Quit]
vishesh is now known as stupid
stupid is now known as tick-tock
tick-tock is now known as TickTock
TickTock has quit [Quit: WeeChat 1.3]
kushal has quit [Read error: Connection reset by peer]
vishesh has joined #ocaml
fluter has quit [Ping timeout: 245 seconds]
octachron has quit [Quit: Leaving]
nicoo has quit [Remote host closed the connection]
fluter has joined #ocaml
nicoo has joined #ocaml
myst|fon has joined #ocaml
Stalkr has joined #ocaml
<myst|fon> hello, can anyone help me with this please? https://gist.github.com/stasmi/98bd3189d3c273e6a9c1 Is such a thing even possible?
MercurialAlchemi has quit [Ping timeout: 240 seconds]
larhat1 has joined #ocaml
<flux> myst|fon, no. the way to do that could be: type binop = Add | Sub type unaryop = Imm type ast = Unary of (unaryop * ast) | Binary of (binop * ast * ast)
<myst|fon> flux: thanks.
kakadu has joined #ocaml
MercurialAlchemi has joined #ocaml
virtualeyes has joined #ocaml
kakadu has quit [Quit: Page closed]
zpe has joined #ocaml
antkong has quit [Quit: antkong]
Haudegen has quit [Ping timeout: 250 seconds]
mac10688 has joined #ocaml
Haudegen has joined #ocaml
cmpxchg has joined #ocaml
wolfcore has quit [Ping timeout: 260 seconds]
ygrek_ has joined #ocaml
virtualeyes is now known as nullremains
wolfcore has joined #ocaml
kushal has joined #ocaml
octachron has joined #ocaml
ygrek_ has quit [Ping timeout: 272 seconds]
ggole has joined #ocaml
kakadu has joined #ocaml
struk|desk|away is now known as struk|desk
chris2 has quit [Ping timeout: 240 seconds]
eni has quit [Read error: No route to host]
MercurialAlchemi has quit [Ping timeout: 240 seconds]
chris2 has joined #ocaml
mac10688_ has joined #ocaml
zpe has quit [Remote host closed the connection]
pierpa has joined #ocaml
Sorella has joined #ocaml
octachron has quit [Ping timeout: 250 seconds]
struk|desk is now known as struk|desk|away
octachron has joined #ocaml
Haudegen has quit [Ping timeout: 240 seconds]
Haudegen has joined #ocaml
Haudegen has quit [Ping timeout: 256 seconds]
Haudegen has joined #ocaml
lokien_ has joined #ocaml
sh0t has joined #ocaml
eni_ has joined #ocaml
eni_ is now known as eni
RossJH has joined #ocaml
ollehar has joined #ocaml
MercurialAlchemi has joined #ocaml
cyraxjoe_ has quit [Ping timeout: 272 seconds]
cyraxjoe has joined #ocaml
aantron has joined #ocaml
Fleurety has quit [Ping timeout: 256 seconds]
darkf_ has joined #ocaml
darkf has quit [Ping timeout: 250 seconds]
octachron has quit [Quit: Leaving]
Fleurety has joined #ocaml
Fleurety has quit [Excess Flood]
Fleurety has joined #ocaml
hairer has joined #ocaml
Fleurety has quit [Excess Flood]
Fleurety has joined #ocaml
Fleurety has quit [Max SendQ exceeded]
MercurialAlchemi has quit [Ping timeout: 256 seconds]
lokien_ has quit [Quit: Connection closed for inactivity]
Fleurety has joined #ocaml
Fleurety has quit [Max SendQ exceeded]
badon has quit [Read error: Connection reset by peer]
badon has joined #ocaml
MercurialAlchemi has joined #ocaml
govg has quit [Ping timeout: 256 seconds]
Fleurety has joined #ocaml
govg has joined #ocaml
Fleurety has quit [Max SendQ exceeded]
Fleurety has joined #ocaml
Fleurety has quit [Max SendQ exceeded]
darkf_ is now known as darkf
struk|desk|away is now known as struk|desk
arquebus has joined #ocaml
darkf has quit [Ping timeout: 250 seconds]
darkf_ has joined #ocaml
arquebus has quit [Quit: Textual IRC Client: www.textualapp.com]
manizzle has quit [Ping timeout: 256 seconds]
kakadu has quit [Remote host closed the connection]
Fleurety has joined #ocaml
phonzbm has joined #ocaml
Fleurety has quit [Max SendQ exceeded]
k1000_ has quit [Quit: .]
Stalkr has quit [Quit: Leaving...]
Stalkr has joined #ocaml
k1000 has joined #ocaml
Stalkr has quit [Ping timeout: 264 seconds]
JacobEdelman has joined #ocaml
manizzle has joined #ocaml
hairer has quit []
struk|desk is now known as struk|desk|away
seangrove has joined #ocaml
<seangrove> Hey all, struggling a bit - I'm using Opium to get a toy http server up and running. I would like for one of the request handlers to e.g. /some-id to then make a cohttp request to e.g. twitter.com/some-id.json, and return the json parsed output (basically just proxying at this stage)
<seangrove> The challenge I'm running into is figuring out how Lwt fits in - I have the code that can make the serve a request to localhost/some-id, and I have the code that can make a call to twitter/some-id.json, but cohttp obviously returns lwt-wrapped values. so I get `string Lwt.t` instead of `string`, which is what my handler is expecting
<Drup> what does your handler returns ?
struk|desk|away is now known as struk|desk
<Drup> (you're an haskeller, right ?)
<seangrove> Drup: Nope, coming from Clojure-world
<seangrove> Bah, sorry it's so vague, still struggling to articulate things :P
<seangrove> I'll post a bit more, one moment
<seangrove> Maybe that's a bit more clear
<seangrove> I feel I'll probably have to invert parts of the program to get the types wrapped in Lwt values to work correctly, but I'm struggling to see what the transformation is :P
<Drup> You must use either Lwt.bind (>>=) or Lwt.map (>|=) to use the string
<seangrove> Drup: Inside of the handler itself, I would assume, right?
<Drup> yes
<Drup> Some things like that should work, I guess
<seangrove> Ok, so then that's going to also return a value wrapped in Lwt, which means that the Opium App stuff may have a problem
<Drup> new_item >>= fun x -> `Json (x |> json_of_item |> Ezjsonm.wrap) >>= respond'
<seangrove> I'll give it a try first
<Drup> new_item >|= fun x -> `Json (x |> json_of_item |> Ezjsonm.wrap) >>= respond'
<Drup> rather that
<Drup> respond' also returns a Lwt.t so it's fine :)
<seangrove> Drup: Ok great, that makes sense - glad my intuition wasn't toooo far off, heh
<seangrove> I'll play with that for a bit, thanks!
<seangrove> Drup: Also, you're the main force behind js_of_ocaml, right?
<Drup> ahahahah
<Drup> :D
<Drup> well, jerôme vouillon's commit are not properly counted in this, but mine are exactly accurate
badon has quit [Ping timeout: 276 seconds]
<seangrove> Heh, ok - well in any case, thanks for the 47 commits - js_of_ocaml is a huge reason I'm interested in OCaml
<Drup> my main contribution was the ppx and tyxml
<Drup> but yeah, as far as jsoo is concerned, all the credits are too jerome and hugo, I work on the ocsigen project too, but in other parts
<seangrove> It would have been nice to see some answers for Jordan here https://news.ycombinator.com/item?id=10866113
<seangrove> I was curious about the flambda opts too
<Drup> in which thread was that ?
<seangrove> The OCamlScript thread
<Drup> right, YC is a tad more annoying that reddit for long running threads
<Drup> 1) hugo is looking at separate compilation for jsoo
<Drup> 2) the flambda question is difficult, mostly because I don't know much about jsoo's internals
<Drup> my understanding, derived from what pierre chambart and jerome vouillon told me, is that a good amount of things done by flambda are not representable in bytecode and would be annoying to implement in js.
ollehar has quit [Ping timeout: 245 seconds]
<seangrove> Interesting, thanks!
<struk|desk> I wouldn't mind if "module A (B) = struct .. end" implied that "module A (B:B) = struct .. end"
darkf_ is now known as darkf
<seangrove> Drup: I don't think I quite want: new_item >|= fun x -> `Json (x |> json_of_item |> Ezjsonm.wrap) >>= respond'
<seangrove> respond' returns <something> Lwt.t, and >|= returns 'b Lwt.t, so that line will return <something> Lwt.t Lwt.t
manizzle has quit [Remote host closed the connection]
<seangrove> new_item >|= fun x -> `String ("test") >>= respond' (* This expression has type Opium_rock.Response.t Lwt.t Lwt.t *)
<seangrove> Pretty cool that it catches all this at compile time though :)
kakadu has joined #ocaml
<Drup> ah, yeah, >>= then
<seangrove> Yup, that did it - at least for compile errors, now lets see how it behaves...
<seangrove> Whoops, nope, doesn't compile. Will poke at it some more
<seangrove> Nice, it works! Now I have to figure out how to coerce the text into JSON, and then hopefully into an OCaml type
<seangrove> A lot to get through, heh
<seangrove> If I define a type in OCaml with all the fields from the JSON spec, but some of the JSON fields are optional, is it not possible to coerce it into the OCaml type?
<seangrove> Nevermind, I think RWO covers this
<seangrove> Yeah, just "x option", makes sense
silver has joined #ocaml
govg has quit [Ping timeout: 245 seconds]
<struk|desk> seangrove: for say, ppx_protobuf you can annotate a type with default values, could be something similar with the json framworks
<struk|desk> *frameworks
govg has joined #ocaml
ollehar has joined #ocaml
ollehar has quit [Ping timeout: 245 seconds]
zpe has joined #ocaml
zpe has quit [Remote host closed the connection]
ak0s has joined #ocaml
Fleurety has joined #ocaml
Fleurety has quit [Excess Flood]
phonzbm has quit [Quit: Connection closed for inactivity]
Fleurety has joined #ocaml
Haudegen has quit [Ping timeout: 265 seconds]
Anarchos has joined #ocaml
Fleurety_ has joined #ocaml
Fleurety has quit [Remote host closed the connection]
ollehar has joined #ocaml
Anarchos has quit [Quit: Vision[0.9.7-H-20140108]: i've been blurred!]
ollehar has quit [Client Quit]
Anarchos has joined #ocaml
kansi has quit [Ping timeout: 260 seconds]
ak0s has quit [Remote host closed the connection]
Fleurety_ has quit [Max SendQ exceeded]
Haudegen has joined #ocaml
ygrek_ has joined #ocaml
Anarchos has quit [Quit: Vision[0.9.7-H-20140108]: i've been blurred!]
seangrove has quit [Ping timeout: 240 seconds]
struk|desk is now known as struk|desk|away
Jane-PC has joined #ocaml
Jane-PC has quit [Changing host]
Jane-PC has joined #ocaml
Jane-PC has quit [Quit: Leaving]
Anarchos has joined #ocaml
seangrove has joined #ocaml
ely-se has joined #ocaml
zpe has joined #ocaml
seangrove has quit [Ping timeout: 250 seconds]
struktured has joined #ocaml
zpe has quit [Remote host closed the connection]
ggole has quit []
slash^ has quit [Read error: Connection reset by peer]
MercurialAlchemi has quit [Ping timeout: 272 seconds]
gustav__1 is now known as gustav___
darkf has quit [Quit: Leaving]
larhat2 has joined #ocaml
larhat1 has quit [Read error: Connection reset by peer]
struktured has quit [Ping timeout: 265 seconds]
larhat2 has quit [Client Quit]
larhat1 has joined #ocaml
j_king has quit [Ping timeout: 260 seconds]
j_king has joined #ocaml
Simn has quit [Quit: Leaving]
lobo has joined #ocaml
eni has quit [Ping timeout: 240 seconds]
strmpnk_ has joined #ocaml
noplamodo has joined #ocaml
kakadu_ has joined #ocaml
cmpxchg_ has joined #ocaml
rfv_ has joined #ocaml
strmpnk has quit [Ping timeout: 240 seconds]
lambdahands has quit [Ping timeout: 240 seconds]
rfv has quit [Ping timeout: 240 seconds]
noplamodo_ has quit [Ping timeout: 240 seconds]
kakadu has quit [Ping timeout: 240 seconds]
cmpxchg has quit [Ping timeout: 240 seconds]
strmpnk_ is now known as strmpnk
rfv_ is now known as rfv
Fleurety has joined #ocaml
mort___ has joined #ocaml
Fleurety has joined #ocaml
lambdahands has joined #ocaml
mort___ has quit [Client Quit]
lokien_ has joined #ocaml
mort___ has joined #ocaml
yawnt has quit [Ping timeout: 245 seconds]
mort___ has left #ocaml [#ocaml]
Fleurety has quit [Excess Flood]
jtmcf has joined #ocaml
Fleurety has joined #ocaml
<Anarchos> opam list shows only 3 base packages. What should i do ?
<jtmcf> Hi everyone! brand new to learning ocaml. I'm excited, it seems like a great language
Fleurety has quit [Excess Flood]
<Anarchos> jtmcf YES IT IS §
silver has quit [Quit: rakede]
Fleurety has joined #ocaml
Fleurety has quit [Excess Flood]
<aantron> hello :)
<nullcatxxx_> hello
kakadu_ has quit [Remote host closed the connection]
Stalkr has joined #ocaml
Stalkr has quit [Ping timeout: 272 seconds]
<def`> Anarchos: read opam documentation. opam list --all
<ely-se> jtmcf: hope is but a postponed disappointment