ChanServ changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | http://www.ocaml.org | OCaml 4.01.0 announce at http://bit.ly/1851A3R | Logs at http://irclog.whitequark.org/ocaml
Oejet has quit [Quit: Leaving.]
seanmcl has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
seanmcl has joined #ocaml
seanmcl has quit [Ping timeout: 248 seconds]
philtor_ has quit [Ping timeout: 248 seconds]
olauzon has quit [Quit: olauzon]
jao has joined #ocaml
jao has quit [Changing host]
jao has joined #ocaml
lordkryss_ has quit [Ping timeout: 240 seconds]
ygrek_ has joined #ocaml
jwatzman|work has quit [Quit: jwatzman|work]
ontologiae has joined #ocaml
cdidd_ has quit [Ping timeout: 264 seconds]
cdidd_ has joined #ocaml
boogie has quit [Remote host closed the connection]
ygrek_ has quit [Ping timeout: 255 seconds]
ontologiae has quit [Ping timeout: 264 seconds]
ygrek_ has joined #ocaml
ontologiae has joined #ocaml
q66 has quit [Quit: Leaving]
ontologiae has quit [Ping timeout: 240 seconds]
boogie has joined #ocaml
boogie has quit [Remote host closed the connection]
PLATOSCAVE has joined #ocaml
darkf has quit [Ping timeout: 272 seconds]
darkf has joined #ocaml
penglingbo has joined #ocaml
ebzzry_ has quit [Ping timeout: 240 seconds]
dant3 has quit [Ping timeout: 240 seconds]
dant3 has joined #ocaml
racycle has quit [Quit: ZZZzzz…]
waneck has quit [Ping timeout: 264 seconds]
f[x] has joined #ocaml
ygrek_ has quit [Ping timeout: 264 seconds]
brendan has joined #ocaml
skchrko has quit [Remote host closed the connection]
Eyyub has quit [Ping timeout: 240 seconds]
siddharthv_away is now known as siddharthv
typedlambda has quit [Ping timeout: 252 seconds]
axiles has joined #ocaml
typedlambda has joined #ocaml
alinab has joined #ocaml
jao has quit [Ping timeout: 260 seconds]
claudiuc has quit [Remote host closed the connection]
philtor_ has joined #ocaml
ebzzry_ has joined #ocaml
troydm has quit [Ping timeout: 252 seconds]
<orbitz> Whee, my DB can do CAS opeartions. Now just to do them across datacenters. No problem!
ebzzry_ has quit [Ping timeout: 255 seconds]
troydm has joined #ocaml
philtor_ has quit [Ping timeout: 260 seconds]
racycle has joined #ocaml
pgomes has joined #ocaml
alpounet has joined #ocaml
f[x] has quit [Ping timeout: 245 seconds]
pgomes has quit [Ping timeout: 264 seconds]
ebzzry_ has joined #ocaml
hhugo has joined #ocaml
wwilly has joined #ocaml
f[x] has joined #ocaml
eikke__ has joined #ocaml
cdidd_ has quit [Ping timeout: 260 seconds]
hto_ has joined #ocaml
cago has joined #ocaml
racycle has quit [Quit: ZZZzzz…]
ggole has joined #ocaml
Arsenik has joined #ocaml
eikke__ has quit [Ping timeout: 240 seconds]
cdidd has joined #ocaml
sagotch has joined #ocaml
BitPuffin has quit [Ping timeout: 264 seconds]
eikke__ has joined #ocaml
AltGr has joined #ocaml
Arsenik has quit [Remote host closed the connection]
<eikke__> has anyone ever seen a 'case-split' plugin for some ocaml editor?
<eikke__> so you can write e.g. 'let f : int option -> int = function _', move your cursor to the _, press some magic keys and it becomes 'None -> _ | Some v -> _'
ia0 has quit [Quit: leaving]
ia0 has joined #ocaml
Kakadu has joined #ocaml
<ggole> There's a request to add that to merlin: hasn't been done yet though
axiles has quit [Ping timeout: 252 seconds]
f[x] has quit [Remote host closed the connection]
axiles has joined #ocaml
ygrek has joined #ocaml
ollehar has joined #ocaml
wwilly has quit [Read error: Connection reset by peer]
wwilly has joined #ocaml
jludlam has joined #ocaml
willy_ has joined #ocaml
dapz has joined #ocaml
<eikke__> ty
hhugo has quit [Quit: Leaving.]
wwilly has quit [Ping timeout: 255 seconds]
Oejet has joined #ocaml
Simn has joined #ocaml
PLATOSCAVE has joined #ocaml
hhugo has joined #ocaml
rom1504 has joined #ocaml
rom1504 has left #ocaml [#ocaml]
lordkryss_ has joined #ocaml
BitPuffin has joined #ocaml
ollehar has quit [Ping timeout: 240 seconds]
<ggole> Nifty, pretty printing catches cycles now
jludlam is now known as jonludlam
remyzorg has joined #ocaml
<mrvn> That fails when you have to break in the middle of an expression
<mrvn> ups
octachron has joined #ocaml
<flux> ggole, does merlin have some code-writing/refactoring fatures?
<rks_> no (not yet)
<adrien_oww> rks_: you need to focus on that first imho
<adrien_oww> then we can replace eclipse
<adrien_oww> you already have the memory usage
* adrien_oww hides
ousado_ has joined #ocaml
<rks_> ("not yet" for the code-writing part, for the refactoring nothing is planned)
ousado has quit [Ping timeout: 260 seconds]
hhugo has quit [Quit: Leaving.]
<rks_> flux: did you have precise ideas / wishes on these topics?
<flux> rks_, not really, it just sounds interesting
<flux> renaming variable safely would be one useful I think
<flux> I usually use iedit-mode and I need to narrow the scope manually
ousado_ is now known as ousado
ousado has quit [Changing host]
ousado has joined #ocaml
<def`> safe renaming can be done with occurences listing
<def`> should be easy, what is iedit-mode ?
<flux> iedit-mode is a simple thing where you enter the mode and the occurrences of curernt word are highlighted. when you modify any of the highlighted words, all get modified.
<flux> also has ability to show only lines with the occurrences (with some context), narrow the region and start the iedit-mode from a selected string instead of the curernt word
<def`> merlin-occurences list all occurences of a variable following ocaml scoping rules
<flux> it's quite nice!
<def`> if it is possible to feed iedit with a custom list of occurences, then it should be easy
hhugo has joined #ocaml
<flux> I think there was some discussion that current occur-modes don't quite support arbitrary lists of matches
<flux> but I haven't looked at iedit
<flux> it indeed would be the best if it by default used some mode-specific way of finding occurrences
<def`> we reimplemented a custom occurences buffer, occur just sucks
avsm has joined #ocaml
<BitPuffin> well looks like I'm gonna use Async instead of Lwt after all. The Cohttp_lwt.get function does not include cancellation like Cohttp_async does
<avsm> BitPuffin: that can certainly be added (via Lwt.cancel)
<BitPuffin> yah
<BitPuffin> maybe
<eikke__> avsm: what's a sensible # of days to wait for a reply on an ocaml-ssl PR before 'escalating' things?
<BitPuffin> hrm
<eikke__> (note: I'm not 'complaining' now, just asking, very well aware less than 24h isn't reasonable ;-))
<avsm> eikke__: i think those should be rewritten in ctypes instead. the current ones worry me for anything external facing
<eikke__> avsm: might be, but since Lwt_ssl uses ocaml-ssl we're kinda married with it right now :-)
<avsm> yeah, I've been looking at disengaging them, and the pure ssl stack is looking code if performance isnt a prime concern
<BitPuffin> avsm: do you know if there is a way to stream a stream to disk like you'd do with an Async pipe?
<avsm> BitPuffin: lwt_io; lines_to_file i think
Arsenik has joined #ocaml
<eikke__> in combination with Lwt_io.with_file or something alike to get the output channel
<BitPuffin> avsm: thanks that seems simple enough
<BitPuffin> eikke__: thanks, I think I'll use lines_to_file though :)
<eikke__> ah, you got an Lwt_stream.t, sorry
<eikke__> when I read stream I thought Lwt_io.channel (don't use Lwt_stream)
alpounet has quit [Remote host closed the connection]
<BitPuffin> why shouldn't I use stream?
<eikke__> oh, no, that's not what I meant
<eikke__> 'we don't use lwt_stream'
<BitPuffin> ah
<BitPuffin> haha
<BitPuffin> I'm not sure how they differ
<avsm> streams are composable, Lwt_io is unix only but faster
<BitPuffin> oh well I can't have that lol
<BitPuffin> must be portable
ontologiae has joined #ocaml
<BitPuffin> so I must come up with my own way
<BitPuffin> alrighty
<BitPuffin> possybly map_s or something
divyanshu has joined #ocaml
dsheets has joined #ocaml
ontologiae has quit [Ping timeout: 255 seconds]
ontologiae has joined #ocaml
avsm has quit [Quit: Leaving.]
<BitPuffin> is it just me or does the search at https://ocaml.janestreet.com/ocaml-core/111.17.00/doc/core_kernel/ not work?
alpounet has joined #ocaml
<Kakadu> BitPuffin: It doesn't
<BitPuffin> Kakadu: too bad
<AltGr> it's still experimental
<AltGr> you may have better luck with running opam-doc locally (https://github.com/ocamllabs/opam-doc)
alpounet has quit [Remote host closed the connection]
alpounet_ has joined #ocaml
hhugo has quit [Quit: Leaving.]
PLATOSCAVE has quit [Read error: Connection reset by peer]
PLATOSCAVE has joined #ocaml
<BitPuffin> installing
ebzzry_ has quit [Read error: Connection reset by peer]
ebzzry__ has joined #ocaml
_andre has joined #ocaml
ygrek has quit [Ping timeout: 240 seconds]
alpounet_ is now known as alpounet
<BitPuffin> anyone know a decent basics tutorial ish thingy for ocamlfind?
<adrien_oww> what are you after?
<BitPuffin> well just how to compile something and link to opam libraries like lwt and core_kernel
<BitPuffin> because you do use ocamlfind for that right?
<adrien_oww> ocamlfind ocamlopt -linkpkg -package lwt,core_kernel foo.ml
<adrien_oww> (that's for link and compilation at the same time)
<BitPuffin> do I have to give it all the .ml files?
<adrien_oww> ocamlfind, yes
<adrien_oww> ocamlbuild, no
<BitPuffin> are all of those flags ocamlfind flags?
<BitPuffin> or are some of them ocamlopt flags
<adrien_oww> linkpkg and package are ocamlfind flags
<adrien_oww> flags ocamlfind doesn't know about are given to the ocaml compiler command that gets called
<BitPuffin> aha
<companion_cube> ocamlbuild -use-ocamlfind -package lwt,core_kernel foobar.native
<BitPuffin> that's pretty simple
<BitPuffin> Error: Unbound module Cohttp_lwt.Client
<BitPuffin> ocamlfind ocamlopt -linkpkg -package lwt,core_kernel,batteries,cohttp proof.ml test.ml
<companion_cube> maybe cohttp has a subpackage for lwt
<BitPuffin> I tried cohttp_lwt :P
<BitPuffin> but that didn't exist
<ggole> Open a toplevel and #list
<BitPuffin> aha
<BitPuffin> cohttp.lwt
<BitPuffin> even with that I get unbound module that's weird
<companion_cube> BitPuffin: is there really a reason not to use ocamlbuild ?
<BitPuffin> companion_cube: no? I just don't know wtf I'm doing :P
<BitPuffin> companion_cube: ocamlbuild didn't change anything though
<ggole> Keep adding packages until it works
* ggole coughs
<ggole> (And I think -use-ocamlfind is the default now.)
jonludlam has quit [Ping timeout: 260 seconds]
<BitPuffin> well I can't just keep adding every package in the universe
<BitPuffin> I've added the ones I use :s
<BitPuffin> unless I also have to add their dependencies and so on
<ggole> No, ocamlfind should chase those down for you
<BitPuffin> well alright
<BitPuffin> ocamlbuild -use-ocamlfind -package lwt,core_kernel,batteries,cohttp.lwt proof.ml test.ml test.native
<ggole> You don't need to list .ml files
<BitPuffin> oh?
<BitPuffin> convenient
<ggole> Ocamlbuild takes a target and goes to find whatever is needed to build it
<BitPuffin> still didn't work though
<ggole> Same error?
<BitPuffin> Cohttp_lwt.Client.get ~headers:header (Uri.of_string urlstr)
<BitPuffin> yeah
<BitPuffin> that's the line it's whining about
<ggole> Hmm, you might need -pkgs instead of -package
<BitPuffin> nope still got the same error
<ggole> Um.
<ggole> Bit hard to debug when I don't have any of that stuff installed.
<BitPuffin> the ocaml stuff?
<ggole> The libraries
<BitPuffin> the ocaml platform? ;) (adrien_oww)
<BitPuffin> ah
<adrien_oww> ='(
<BitPuffin> well I mean it would have complained if I didn't have those installed
<companion_cube> you need to bind uri
<BitPuffin> but uri is a dep of lwt
<BitPuffin> didn't make a difference
fraggle_laptop has joined #ocaml
lordkryss_ is now known as lordkryss
<companion_cube> does it fail at linking? in this case it should tell you which modue is missing
jonludlam has joined #ocaml
<BitPuffin> that's the build log
<BitPuffin> maybe Cohttp_lwt.Client isn't supposed to be a thing
<BitPuffin> there is a functor (I think) called Make_client
<companion_cube> yes, Client is actually a module type
<companion_cube> not a module
<BitPuffin> it's different in the async version then I think
<ggole> Mmm, functory
_obad_ has quit [Ping timeout: 255 seconds]
hhugo has joined #ocaml
<BitPuffin> render me confused then
<BitPuffin> oh so I'm supposed to use the Unix one
<BitPuffin> I hang
<BitPuffin> lol
tane has joined #ocaml
ontologiae has quit [Ping timeout: 252 seconds]
<BitPuffin> am I not supposed to do
<BitPuffin> match body with Cohttp.body.t -> ... | `Stream as s -> .... ?
tobiasBora has joined #ocaml
<BitPuffin> actually I mean Cohttp.body.t _ ->
<ggole> I would think that should be #Cohttp.body.t
elfring has joined #ocaml
<BitPuffin> oh
<BitPuffin> weird
<BitPuffin> I guess I couldn't learn about htat part because real world ocaml had a bug where it didn't show the code example :P
<ggole> #foo is a shorthand for all of the constructors in the polymorphic variant type foo
<ggole> So you might have type foo = [`A|`B] and then match ... with #foo -> x | `C -> y
fraggle_laptop has quit [Ping timeout: 240 seconds]
<ggole> #Cohttp.body.t _ should just be #Cohttp.body.t as far as I can tell
<ggole> Are you getting warnings or errors?
<BitPuffin> Error: Syntax error
<ggole> `Stream as body should probably be `Stream body, too
<BitPuffin> ah
<BitPuffin> although it doesn't get there
<BitPuffin> but yeah you are probably right
<ggole> That's not a syntax error, it's just suspicious
<ggole> (It binds body to the constructor `Stream, which doesn't seem useful.)
<BitPuffin> yeah that part was a mistake
<ggole> You might also need to parenthesize the fun, dunno
<BitPuffin> Could try
<BitPuffin> although I don't think it's necessary
<BitPuffin> nope same error :(
siddharthv is now known as siddharthv_away
<ggole> Wait
<ggole> Is it Cohttp.Body.t?
<BitPuffin> yeah
<ggole> Yeah, in retrospect that should be obvious
<ggole> foo.t (with lowercase foo) doesn't make sense in a type
<BitPuffin> because modules are always capitalized?
<ggole> Modules and constructors, yep
<ggole> Mostly due to type inference
ebzzry__ has quit [Remote host closed the connection]
<BitPuffin> hrm
<ggole> Are you still getting syntax error? You should be on to type errors now as far as I can tell
<BitPuffin> File "proof.ml", line 11, characters 18-19:
<BitPuffin> Error: Syntax error
<BitPuffin> I dunno why, I dunno how, yesterday you told me 'bout the blue blue sky
<ggole> You didn't .body.t => .Body.t there
<BitPuffin> *lol*
<BitPuffin> I'm stupid
<BitPuffin> :P
<ggole> OCaml's error reporting could use some work.
darkf has quit [Quit: Leaving]
seanmcl has joined #ocaml
<octachron> Using errors more explicit than just "syntax error" wouldn't hurt .
<ggole> I think it's mostly due to ocamlyacc. The type errors are usually quite a lot better.
<BitPuffin> well apparently my to list thing stuff is wrong
<BitPuffin> the error doesn't make much sense haha
<octachron> I imagine that a part of the problem is that reporting the parser errors could be quite confusing to the user
<octachron> cf, all the confusing syntax errors report of C(++) compiler which happens far far after the meaningful error.
<ggole> C compilers usually have a reasonable amount of effort put into nice error reporting though
<BitPuffin> oh it's because I get a list Lwt.t type back
<BitPuffin> well dayum
<BitPuffin> clang has nice error reporting
<octachron> ggole : They have, but it is a lot of work and syntax errors can still be quite confusing to beginner
<ggole> Sure, but ocaml's "syntax error" is no better
racycle has joined #ocaml
rand000 has joined #ocaml
<adrien_oww> easier to pinpoint than with C++ :P
<octachron> Yes. It is more or less not trying to solve the problem because you don't know the "right" answer.
<ggole> In the general case you don't, but in many useful cases you do.
<ggole> And Foo.foo.t is one of those cases.
<ggole> It's just work that hasn't yet been done, that's all.
penglingbo has quit [Ping timeout: 240 seconds]
tobiasBora has quit [Ping timeout: 248 seconds]
huza has joined #ocaml
elfring has quit [Quit: Konversation terminated!]
willy_ has quit [Quit: Leaving]
tobiasBora has joined #ocaml
<BitPuffin> doesn't make any sense
<BitPuffin> it says that line 15 returns a string but expects a Lwt.t
<BitPuffin> but that's what map is foooooor
hyperboreean has joined #ocaml
<BitPuffin> oh I see
<BitPuffin> why didn't it complain about capitalized Open
<BitPuffin> well same error still
hyperboreean has quit [Client Quit]
<BitPuffin> Error: This expression has type Core_kernel.Std.String.t = string
<BitPuffin> but an expression was expected of type 'a Lwt.t
<nox> I'm implementing Clang-like diagnostics for Erlang.
hyperboreean has joined #ocaml
divyanshu has quit [Quit: Computer has gone to sleep.]
hhugo has quit [Quit: Leaving.]
rand000 has quit [Ping timeout: 260 seconds]
hyperboreean has quit [Quit: leaving]
sagotch_ has joined #ocaml
sagotch has quit [Ping timeout: 252 seconds]
hyperboreean has joined #ocaml
hyperboreean has quit [Client Quit]
hyperboreean has joined #ocaml
tizoc has quit [Quit: Coyote finally caught me]
tizoc has joined #ocaml
racycle has quit [Quit: ZZZzzz…]
cago has quit [Remote host closed the connection]
pgomes has joined #ocaml
vfoley- has quit [Remote host closed the connection]
vfoley- has joined #ocaml
sagotch_ has quit [Remote host closed the connection]
vfoley- has quit [Changing host]
vfoley- has joined #ocaml
pgomes has quit [Quit: Page closed]
seanmcl has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
seanmcl has joined #ocaml
<BitPuffin> I don't get it :(
<BitPuffin> :P
<flux> bitpuffin, it needs an Lwt.t type. use 'return' to make one. though sounds possible you're doing something wrong.
<BitPuffin> flux: but map does that for me doesn't it (>|=)
<BitPuffin> map f m map the result of a thread. This is the same as bind m (fun x -> return (f x))
<BitPuffin> m >|= f is map f m
<octachron> BitPuffin : Have you tried to add "(" ")" blocks , it looks like it could be a precedence error?
<flux> bitpuffin, try return (String.concat li)
<flux> but you don't need that intermediate step
<flux> you can just do >|= fun li -> let str = String.concat li in Out_channel...
ygrek has joined #ocaml
<flux> whenever you have >|= fun xx -> yy, yy must be in the 'Lwt.t' level
<BitPuffin> octachron: yeah think I did
<flux> "asdf" is now x Lwt.t, neither is the return value of String.concat
<flux> so to make it an Lwt.t, you use return, which has type 'a -> 'a Lwt.t
<flux> at least this is what I gather from that example, I have not used Core and it's been quite some time since using Lwt either
<flux> I imagine both printf and Out_channel.write are 'a Lwt.t
<BitPuffin> flux: well what I posted earlier, map is the same as bind m (fun x -> return (f x))
<BitPuffin> and >|= is an alias for map
<BitPuffin> so thot *does* turn it in to a Lwt.t
<octachron> BitPuffin : which is haskell's fmap
<flux> oh ;-)
<flux> nevertheles, the compiler is never wrong ;)
<BitPuffin> no I know
<flux> btw, do you use Emacs or Vim?
<BitPuffin> which is why I am confused
<BitPuffin> I use both but I'm currently focusing a bit on emacs because I have been doing so much vim
<BitPuffin> (not the answer you expected was it? :P)
<octachron> BitPuffin : Have you tried (fun -> ..) in line 15, i think your type error makes senses if the compiler concate line 15 and 16
<flux> well, if you are using either you can make use of the type throwback feature
<flux> it's super nice when debugging type issues
<flux> basically: compile with -dtypes, use tuareg-mode, press C-c C-t over an expression, emacs will tell you back its type
<BitPuffin> Ah, haven't installed merlin yet
<octachron> i.e, "String.concat li >|= fun ..."
<BitPuffin> I changed it to not be another map
<BitPuffin> but yeah I'll try
<flux> another approach to debug type issues
<BitPuffin> but I'm fairly sure I've already tried
<flux> is to replace the problematic expression with assert false
huza has quit [Ping timeout: 260 seconds]
<flux> and see what else fails :)
<flux> it's particularly useful with the type throwback feature though, because then you get to ask the type the compiler inferred for 'assert false'
<BitPuffin> seems like it was precedence error after all octachron
<BitPuffin> which character of an operator is it that determines precedence?
<flux> the first one
<BitPuffin> Because with Async it is common practice to don't parenthesize fun
<BitPuffin> and there it is >>= and >>|
<BitPuffin> so precedence should be the same
<octachron> The syntax problem is more on the "fun x -> ..." expression which has no reason to stop at >|=
<octachron> With monadic binding (>>=) it is not a problem, but for fmap chaining you probably always need the parenthesis
<BitPuffin> but >>= and >|= have the same first char
strobegen has quit [Read error: Connection reset by peer]
<BitPuffin> so precedence shoudl be the same?
strobegen has joined #ocaml
<octachron> The precedence is the same
<BitPuffin> then why is one a problem and not the other
<octachron> and note that in thie third example, the functions are nested inside each others
<BitPuffin> aren't they nested in the first one as well?
<BitPuffin> the only thing that changes was indentation
seanmcl has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<BitPuffin> is it the match statement that messes things up?
tobiasBora has quit [Ping timeout: 245 seconds]
<BitPuffin> well I removed all the >|= and only have return's now instead, it compiled :s
seanmcl has joined #ocaml
NoNNaN has quit [Remote host closed the connection]
seanmcl has quit [Client Quit]
seanmcl has joined #ocaml
olauzon has joined #ocaml
slash^ has joined #ocaml
<octachron> Bad explanation from my part ... What I meant was that with (>>=), you generally use nested function ( monad_thing >>= fun y -> ( other_monad_thing >>= fun z -> return something ) )
philtor_ has joined #ocaml
<octachron> but with (>>| ) , since you don't enter the monad, you do ( monad_thing >>| (normal_function) ) >>| other_normal_function
<def`> With (>>=), you have some form of associativity that (>>=) doesn't enjoy
<octachron> The needed associativity is different between (>>|) and (>>=)
<def`> (m >>= fun x -> return x) fun x -> return x
<def`> oops
<def`> (m >>= fun x -> return x) >>= fun x -> return x
<def`> m >>= (fun x -> return x >>= fun x -> return x)
<def`> are equivalent (not necessarily as efficient :P)
<def`> (that (>|=) doesn't enjoy*)
<BitPuffin> def`: which one is more efficent? :P
<BitPuffin> but yeah I think I kind of grok a little bit
<BitPuffin> >>= is just a big chain and >|= is meant to return, not chain
<BitPuffin> so could you have a big list of >>= and then the final one be >|= without parens?
<def`> BitPuffin: watching at the code is enough to see which one is the most efficient, think about when works get done, when effects get delayed
<def`> (and because of the fun _ -> the operator is not syntactically associative, so don't worry, without parenthesis you always get the correctly balanced version)
<BitPuffin> def`: first one perhaps?
<def`> BitPuffin: second one, nesting on the right
<BitPuffin> oh
<def`> BitPuffin: think of the computation as a tree, you compute left to right and you want the immediate computation to be easily reachable, so near the root of the tree
<BitPuffin> well okay I guess it makes sense, the one on the right will already be ready to go when left is done
<BitPuffin> first I was thinking that left can get started while right gets set up
<BitPuffin> or whatever
<BitPuffin> but if you use the second one the computation starts to the right and not from the left
<BitPuffin> ?
<def`> The computation on the right doesn't exist, it has to go through an abstraction (fun x -> …), and the actual value of x is known only at the end of the left computation
<BitPuffin> hrm
pminten has joined #ocaml
philtor_ has quit [Ping timeout: 260 seconds]
tnguyen1 has joined #ocaml
cdidd has quit [Remote host closed the connection]
remyzorg has quit [Quit: WeeChat 0.4.3]
cdidd has joined #ocaml
tobiasBora has joined #ocaml
jonludlam has quit [Remote host closed the connection]
ebzzry has joined #ocaml
dapz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
tobiasBora has quit [Ping timeout: 252 seconds]
BitPuffin has quit [Ping timeout: 245 seconds]
lordkryss has quit [Ping timeout: 245 seconds]
racycle has joined #ocaml
NoNNaN has joined #ocaml
manizzle has joined #ocaml
ontologiae has joined #ocaml
pminten has quit [Remote host closed the connection]
eikke__ has quit [Ping timeout: 252 seconds]
NoNNaN has quit [Remote host closed the connection]
octachron has quit [Quit: Page closed]
jwatzman|work has joined #ocaml
boogie has joined #ocaml
strobegen has left #ocaml [#ocaml]
ontologiae has quit [Ping timeout: 245 seconds]
gasche has quit [Ping timeout: 264 seconds]
jwatzman|work has quit [Quit: jwatzman|work]
eikke__ has joined #ocaml
maattdd has joined #ocaml
NoNNaN has joined #ocaml
slash^ has quit [Read error: Connection reset by peer]
oriba has joined #ocaml
Kakadu has quit [Ping timeout: 246 seconds]
eikke__ has quit [Ping timeout: 252 seconds]
hto__ has joined #ocaml
hto__ has quit [Client Quit]
hto has quit [Quit: Lost terminal]
hto_ has quit [Quit: Lost terminal]
claudiuc has joined #ocaml
penglingbo has joined #ocaml
ygrek has quit [Ping timeout: 260 seconds]
dsheets has quit [Ping timeout: 264 seconds]
seanmcl has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
seanmcl has joined #ocaml
maattdd has quit [Ping timeout: 264 seconds]
Kakadu has joined #ocaml
malo has joined #ocaml
tani has joined #ocaml
tane has quit [Ping timeout: 252 seconds]
q66 has joined #ocaml
jwatzman|work has joined #ocaml
Arsenik has quit [Read error: Connection reset by peer]
Arsenik has joined #ocaml
eikke__ has joined #ocaml
penglingbo has quit [Ping timeout: 245 seconds]
bjorkintosh has joined #ocaml
maattdd has joined #ocaml
maattdd has quit [Ping timeout: 264 seconds]
q66_ has joined #ocaml
q66 has quit [Ping timeout: 252 seconds]
Eyyub has joined #ocaml
maattdd has joined #ocaml
q66_ is now known as q66
araujo has quit [Ping timeout: 240 seconds]
alpounet has quit [Remote host closed the connection]
alpounet has joined #ocaml
Sim_n has joined #ocaml
_tca_ has joined #ocaml
steshaw has quit [Ping timeout: 240 seconds]
ggherdov has quit [Ping timeout: 240 seconds]
andreypopp has quit [Ping timeout: 240 seconds]
_tca has quit [Ping timeout: 240 seconds]
Simn has quit [Ping timeout: 240 seconds]
fraggle_ has quit [Ping timeout: 240 seconds]
zarul has quit [Ping timeout: 240 seconds]
mrvn has quit [Ping timeout: 240 seconds]
Valdo has quit [Ping timeout: 240 seconds]
steshaw has joined #ocaml
_tca_ is now known as _tca
zarul has joined #ocaml
zarul has joined #ocaml
zarul has quit [Changing host]
alpounet has quit [Ping timeout: 264 seconds]
mrvn has joined #ocaml
andreypopp has joined #ocaml
PLATOSCAVE has quit [Ping timeout: 260 seconds]
Valdo has joined #ocaml
olauzon has quit [Quit: olauzon]
fraggle_ has joined #ocaml
PLATOSCAVE has joined #ocaml
Nahra has joined #ocaml
maattdd has quit [Ping timeout: 248 seconds]
ggherdov has joined #ocaml
Thooms has joined #ocaml
slash^ has joined #ocaml
_tca has quit [Changing host]
_tca has joined #ocaml
axiles has quit [Remote host closed the connection]
ggherdov has joined #ocaml
ggherdov has quit [Changing host]
andreypopp has quit [Changing host]
andreypopp has joined #ocaml
<eikke__> did anyone ever manage to get pa_ounit to work at all?
<orbitz> Hrm, I think i've just used OUnit
_andre has quit [Quit: leaving]
philtor_ has joined #ocaml
<orbitz> has anyone had any experience debugging make file environments being different in opam than on my shell?
<orbitz> odd behaviour i'm seeing
AltGr has left #ocaml [#ocaml]
<Kakadu> what values differ?
hhugo has joined #ocaml
<Kakadu> which*
<orbitz> Kakadu: well, in my makefile i export OCAMLPATH
<orbitz> and locally that works fine
<orbitz> and i have checked that $OCAMLPATH is empty in my shell
<orbitz> but when i do it via opam it does not work
<Kakadu> no idea
<Kakadu> I can only try to guess something
maattdd has joined #ocaml
<Kakadu> if you set $OCAMLPATH in your shell it will still work?
<orbitz> yes appaerd to eb something with pwd
<orbitz> my setup right now is i have my project
<orbitz> and i di oapm pin foo .
<orbitz> and i added an echo $(PWD) to it
<orbitz> then I changed dir to another one and did opam foo install
<orbitz> and teh PWD mathces the dir it's pinned in, NOT the dir the sorucecode actually is in
fraggle_ has quit [*.net *.split]
keen_ has quit [*.net *.split]
<orbitz> ok the fix is
<orbitz> use $(shell pwd) isntead of $(PWD)
<Kakadu> i.e. $(PWD) is where Makefile is located?
ontologiae has joined #ocaml
<orbitz> PWD appears to just be some vairable the shellset and opam as changed it's directory everywhere
<orbitz> soteh PWD is invalid
fraggle_ has joined #ocaml
keen_ has joined #ocaml
fraggle_ has quit [*.net *.split]
hhugo has quit [Quit: Leaving.]
pgomes has joined #ocaml
tobiasBora has joined #ocaml
malo has quit [Remote host closed the connection]
flux has quit [Ping timeout: 240 seconds]
fraggle_ has joined #ocaml
maattdd has quit [Ping timeout: 245 seconds]
philtor_ has quit [Ping timeout: 252 seconds]
ggole_ has joined #ocaml
msch_ has joined #ocaml
ggole has quit [Ping timeout: 264 seconds]
msch has quit [Ping timeout: 264 seconds]
ggole_ has quit [Client Quit]
msch_ is now known as msch
vbmithr has quit [Ping timeout: 264 seconds]
vbmithr has joined #ocaml
companion_cube has quit [Ping timeout: 264 seconds]
companion_cube has joined #ocaml
ollehar has joined #ocaml
pgomes has quit [Ping timeout: 240 seconds]
<ollehar> hello! how difficult do you think it would be to add ADT:s to Typescript?
<ollehar> adt : s
<ollehar> they have enums now
<ollehar> I want the enums to also carry data
<Drup> (why do you want to use typescript ?)
clog_ has joined #ocaml
<Kakadu> Let's take shovels and bury it
<ollehar> Drup: smooth transition from dynamic typing to static
<ollehar> smoother than js_of_ocaml
flux has joined #ocaml
<ollehar> I guess I can't use datastructures created it ocaml in other pure javasript files?
isomorph1smes has joined #ocaml
companion_square has joined #ocaml
Asmadeus_ has joined #ocaml
<Drup> you can pass "ocaml" functions to the js side.
<Drup> but it's going to be very awkward, the idioms are not the same in both languages
<ollehar> Drup: but not classes?
<ollehar> hm
<ollehar> I'm using angular as well
<Drup> classes ?
<ollehar> typescript is structurally typed, and so are objects in ocaml
<ollehar> maybe they could be exported, I don't know
<Drup> classes as in "how js_of_ocaml view js stuff" or real ocaml oop classes ?
ccasin_ has joined #ocaml
fraggle_laptop has joined #ocaml
<Drup> if the later .. I thing that's going to be acrobatic, the shorter way to know would be to look at how it's compiled to javascript
Kakadu has quit [Quit: Konversation terminated!]
<Drup> but using the js stuff written by other people from the ocaml side is easy
<orbitz> ollehar: adding a new fundamental concept to a language is always hard
<Drup> oh and : don't mix js_of_ocaml reactive style to js/Angular reactive style
<Drup> it's not going to end well
<Drup> (and react is better anyway)
companion_cube has quit [*.net *.split]
steshaw has quit [*.net *.split]
ggherdov has quit [*.net *.split]
bjorkintosh has quit [*.net *.split]
manizzle has quit [*.net *.split]
cdidd has quit [*.net *.split]
tnguyen1 has quit [*.net *.split]
jzelinskie has quit [*.net *.split]
leifw has quit [*.net *.split]
olasd has quit [*.net *.split]
teiresias has quit [*.net *.split]
so has quit [*.net *.split]
__marius____ has quit [*.net *.split]
clog has quit [*.net *.split]
ccasin has quit [*.net *.split]
alex_nx has quit [*.net *.split]
Armael has quit [*.net *.split]
isomorphismes has quit [*.net *.split]
Asmadeus has quit [*.net *.split]
pyx has joined #ocaml
tnguyen has joined #ocaml
alex_nx has joined #ocaml
Arsenik has quit [Remote host closed the connection]
PLATOSCAVE has quit [Ping timeout: 240 seconds]
PLATOSCAVE has joined #ocaml
Arsenik has joined #ocaml
bjorkintosh has joined #ocaml
manizzle has joined #ocaml
Armael has joined #ocaml
<Drup> ollehar: and back to your original question : I have no idea whatsoever of the representation used by Typescript, so can't possible answer it, but you can cheat by using a pair Enum*Content
<Drup> of course, it's not typesafe
cdidd has joined #ocaml
Thooms has quit [Quit: WeeChat 0.3.8]
<ollehar> Drup: no tuples in typescript :(
<Drup> why do you even want to use that language ?! >o<
* Drup starts ranting about languages with no tupes and no ADT.
<Drup> (I'm sure you can do a tuple object)
<ollehar> yea, one can make a class tuple<T, U>
<ollehar> but it's sweet to have tuples and adt built in
araujo has joined #ocaml
<ollehar> orbitz: ok. if only there was a shortcut to everything in life.
<adrien> node.js, C# and Java
eikke__ has quit [Ping timeout: 240 seconds]
<orbitz> ollehar: just use Roy
Arsenik has quit [Remote host closed the connection]
<ollehar> orbitz: looks awesome, thanks for the tip!!
eikke__ has joined #ocaml
jludlam has joined #ocaml
Sim_n has quit [Quit: Leaving]
srax has quit [Quit: WeeChat 0.3.8]
pgomes has joined #ocaml
<nickmeharry> As someone who has worked on Roy, just be warned that the language hasn't been touched in a few months.
<ollehar> nickmeharry: so it's abandoned?
<nickmeharry> If you're interested in working on it, we're over in #roy
<nickmeharry> I guess? The maintainer (puffnfresh) hasn't been around in a while.
<nickmeharry> He's off working on Purescript and Idris
hhugo has joined #ocaml
BitPuffin has joined #ocaml
<nickmeharry> I'd keep working on it, but maintaining a complier I don't understand in Javascript is rather difficult.
<nickmeharry> Honestly, at this point I'm tempted to rewrite the whole thing in ocaml.
<ollehar> hm
<ollehar> nickmeharry: so purescript replaced roy, then?
<ollehar> any active community?
<nickmeharry> It certainly seems like it.
<nickmeharry> Not really any community. No activity in #roy for 5 days.
philtor_ has joined #ocaml
<nickmeharry> It's usually a week or two between someone stumbling into the channel and asking a question, which may or may not get answered in a reasonable time.
<nickmeharry> I'm actually not sure where Roy fits in the compile-to-js spectrum.
<ollehar> (also, subreddit purescript makes more sence than roy :D )
tani has quit [Quit: Verlassend]
divyanshu has joined #ocaml
<orbitz> nickmeharry: if you rewrot in ocaml you could use js_of_ocaml to keep the compiler in js, right?
<Drup> what is the point of purescript, compared to other similar almost not javascript languages ?
<nickmeharry> orbitz: That's what I was thinking. Having a repl in Node.js was a selling point way back when.
pgomes has quit [Ping timeout: 240 seconds]
divyanshu has quit [Client Quit]
<nickmeharry> Ultimately, though, I'm not sure if it would help things a whole lot.
<nickmeharry> I think the project died due to lack of people contributing.
<nickmeharry> Switching to ocaml would drop the contributors count from 2 to 1 :(
slash^ has quit [Read error: Connection reset by peer]
<Drup> or maybe to the simple fact that the landscape of "new language which only purpose is to unfuck javascript" is already crowded
<nickmeharry> *major contributors, rather
<nickmeharry> Yeah, that too.
<nickmeharry> Like I said, I'm not sure where Roy fits there anymore.
alpounet has joined #ocaml
everyonemines has joined #ocaml
<ollehar> nickmeharry: do you have any feature plans for roy?
divyanshu has joined #ocaml
divyanshu has quit [Client Quit]
<nickmeharry> The last thing I was working on with it was integrating the Fantasy Land JS spec, but I had trouble with the type checking system.
<nickmeharry> ollehar: I think there are ADT like things in fantasy-land. Still looking for that one.
<Drup> I think you're better off using fay, at this point :p
<nickmeharry> IIRC fay is just Haskell compiled to JS.
<Drup> yeah, so you don't have to reinvent type classes.
<nickmeharry> Ah, here we go.
<nickmeharry> taggedSum should give you roughly what you're looking for.
<nickmeharry> Not sure how sophisticated TypeScript's typechecker is.
seanmcl has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<nickmeharry> Another option would be adt.js: https://github.com/natefaubion/adt.js
<ollehar> nickmeharry: only for node.js ?
hhugo has quit [Quit: Leaving.]
hhugo has joined #ocaml
<nickmeharry> adt.js appears to be self-contained
<nickmeharry> no require(), etc
<ollehar> will leave, thanks for the info and good luck with ray! :)
<nickmeharry> Thanks. I'll ping puffnfresh again and see if he has any plans to continue maintaining it.
<nickmeharry> If not, I'll take over and port it to ocaml.
ollehar has quit [Quit: ollehar]
Eyyub has quit [Ping timeout: 240 seconds]
darkf has joined #ocaml
tobiasBora has quit [Quit: Konversation terminated!]
jludlam has quit [Remote host closed the connection]
everyonemines has left #ocaml [#ocaml]
oriba has quit [Quit: oriba]
hhugo has quit [Quit: Leaving.]
madroach has quit [Ping timeout: 252 seconds]
bitbckt has quit [Remote host closed the connection]
alpounet has quit [Remote host closed the connection]
Nahra has quit [Remote host closed the connection]
madroach has joined #ocaml
alpounet has joined #ocaml
NoNNaN has quit [Remote host closed the connection]
NoNNaN has joined #ocaml
alpounet has quit [Ping timeout: 260 seconds]
philtor_ has quit [Ping timeout: 252 seconds]
flux has quit [Ping timeout: 252 seconds]
philtor_ has joined #ocaml
lordkryss has joined #ocaml
rhg has joined #ocaml
<rhg> warning
<rhg> you may be watched
<rhg> do usa&israel use the internet(facebook,youtube,twitter, chat rooms ..ect)to spy??
<rhg> do usa&israel use the internet 2 collect informations,,can we call that spying??
<rhg> ÊÍÐíÑ
<rhg> do they record&analyse everything we do on the internet,,can they harm you using these informations??
rhg has quit [Excess Flood]
<Drup> that was interesting
boogie has quit [Remote host closed the connection]
<companion_square> fresh news
BitPuffin has quit [Ping timeout: 252 seconds]