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
eikke__ has quit [Ping timeout: 260 seconds]
troutwine_away is now known as troutwine
philtor has quit [Ping timeout: 255 seconds]
thomasga has quit [Quit: Leaving.]
troutwine is now known as troutwine_away
oriba_ has quit [Quit: oriba_]
nojb has quit [Ping timeout: 245 seconds]
jao has joined #ocaml
jao has quit [Changing host]
jao has joined #ocaml
WraithM has joined #ocaml
jwatzman|work has quit [Quit: jwatzman|work]
penglingbo has quit [Ping timeout: 250 seconds]
troutwine_away is now known as troutwine
dotfelix has joined #ocaml
tautologico has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
troutwine is now known as troutwine_away
dotfelix has quit [Client Quit]
dotfelix has joined #ocaml
yomimono has joined #ocaml
struktured has joined #ocaml
<yomimono> where can I find documentation on directives in utop?
dotfelix has quit [Quit: Leaving]
<yomimono> specifically, I want to get more output on what's actually going on when I #require something
mort___ has quit [Ping timeout: 240 seconds]
q66 has quit [Quit: Leaving]
hausdorff has quit [Remote host closed the connection]
penglingbo has joined #ocaml
shinnya has quit [Ping timeout: 240 seconds]
struktured has quit [Read error: Connection reset by peer]
hausdorff has joined #ocaml
hausdorff has quit [Read error: Connection reset by peer]
hausdorff has joined #ocaml
tautologico has joined #ocaml
<tautologico> I'm building a lib as a shared library to use as a plugin, but this plugin depends on another findlib package... when I try to use the plugin the program can't find the symbols for the package my plugin depends on. anyway to link everything in a single .cmxs?
<Drup> huum, -link-all ?
<Drup> (not sure)
<tautologico> seems to work, now I get a segfault
<Drup> a segfault O_o
<Drup> due to what ?
troutwine_away is now known as troutwine
ygrek has joined #ocaml
<tautologico> I have no idea
troutwine is now known as troutwine_away
<mfp> tautologico: this and other fun things can happen if you link a module twice (e.g. Unix, once in the main program, another in the .cmxs)
Eyyub has quit [Ping timeout: 260 seconds]
englishm1 has quit [Quit: Leaving.]
english__ has quit [Remote host closed the connection]
tautologico has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
hausdorff has quit [Remote host closed the connection]
hausdorff has joined #ocaml
hausdorff has quit [Remote host closed the connection]
hausdorff has joined #ocaml
johnnydiabetic has joined #ocaml
englishm has joined #ocaml
englishm_ has joined #ocaml
englishm has left #ocaml [#ocaml]
tautologico has joined #ocaml
philtor has joined #ocaml
philtor has quit [Ping timeout: 260 seconds]
philtor has joined #ocaml
bjorkintosh has quit [Ping timeout: 245 seconds]
bjorkintosh has joined #ocaml
arquebus has joined #ocaml
tautologico has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
troutwine_away is now known as troutwine
sad0ur has quit [Read error: No route to host]
sad0ur has joined #ocaml
troutwine is now known as troutwine_away
yomimono has quit [Quit: Leaving]
hausdorff has quit [Remote host closed the connection]
hausdorff has joined #ocaml
hausdorff has quit [Remote host closed the connection]
jao has quit [Ping timeout: 245 seconds]
philtor has quit [Ping timeout: 250 seconds]
arquebus has quit [Quit: Konversation terminated!]
hausdorff has joined #ocaml
WraithM has quit [Ping timeout: 260 seconds]
siddharthv_away is now known as siddharthv
pgomes has joined #ocaml
johnnydiabetic has quit [Ping timeout: 260 seconds]
sorabji has left #ocaml ["ERC Version 5.3 (IRC client for Emacs)"]
axiles has joined #ocaml
ddosia has quit [Quit: Leaving.]
ddosia has joined #ocaml
pgomes has quit [Quit: Leaving]
WraithM has joined #ocaml
hhugo has quit [Quit: Leaving.]
WraithM has quit [Ping timeout: 255 seconds]
WraithM has joined #ocaml
Simn has joined #ocaml
tidren has joined #ocaml
ollehar has joined #ocaml
troutwine_away is now known as troutwine
ygrek has quit [Ping timeout: 245 seconds]
hhugo has joined #ocaml
ollehar has quit [Ping timeout: 250 seconds]
troutwine is now known as troutwine_away
hhugo has quit [Client Quit]
ggole has joined #ocaml
seliopou has quit [Ping timeout: 240 seconds]
seliopou has joined #ocaml
ygrek has joined #ocaml
penglingbo has quit [Ping timeout: 255 seconds]
troutwine_away is now known as troutwine
zpe has joined #ocaml
tidren has quit [Remote host closed the connection]
tidren_ has joined #ocaml
troutwine is now known as troutwine_away
tidren_ has quit [Remote host closed the connection]
squiggnet_ has quit [Ping timeout: 240 seconds]
squiggnet has joined #ocaml
tidren has joined #ocaml
_0xAX has joined #ocaml
tidren has quit []
cago has joined #ocaml
WraithM has quit [Ping timeout: 255 seconds]
zpe has quit [Remote host closed the connection]
Eyyub has joined #ocaml
englishm_ has quit [Remote host closed the connection]
englishm has joined #ocaml
sagotch has joined #ocaml
troutwine_away is now known as troutwine
Hetu has joined #ocaml
BitPuffin has quit [Ping timeout: 245 seconds]
troutwine is now known as troutwine_away
BitPuffin has joined #ocaml
Eyyub has quit [Ping timeout: 256 seconds]
Kakadu has joined #ocaml
hausdorff has quit [Remote host closed the connection]
hausdorff has joined #ocaml
hausdorff has quit [Ping timeout: 240 seconds]
eikke__ has joined #ocaml
zpe has joined #ocaml
troutwine_away is now known as troutwine
sagotch has quit [Remote host closed the connection]
Averell has quit [Read error: Connection reset by peer]
troutwine is now known as troutwine_away
Eyyub has joined #ocaml
jonludlam has joined #ocaml
MercurialAlchemi has joined #ocaml
<MercurialAlchemi> Hi folks
mingus has joined #ocaml
<MercurialAlchemi> How do you implement something similar to try-with-resource in Ocaml?
mingus is now known as ewd
<def`> 1. let finalize f u = try let r = f () in u (); r with exn -> u (); raise exn
<def`> so you have a finalize construct
<def`> finally*
<def`> 2. let with_myresource r f = acquire r; finally f (fun () -> release r)
<def`> 3. with_myresource r (fun () -> bla bla bla)
<MercurialAlchemi> ok, so it's not really built-in
<MercurialAlchemi> no library does this?
<flux> probably some do :-)
<def`> some libraries do, if needed
<flux> but what those patterns I always find lacking (for the general case) is the ability to not release the resource
<def`> it's not built-in: no, it can be implemented with lower-level constructs ;)
<flux> for example if you end up needing to put the resource away for use elsewhere
<def`> yes, this construct ties the lifetime of a resource to the lexical scope
<flux> I suppose a library with reference counter resource management would have an easy way out
Averell has joined #ocaml
<def`> this become a problem with you have abstraction purposely allowing to escape the scope, like concurrency monad
<flux> access_reference_counted_resource r (fun underlying_resource -> stash_away (resource_with_increased_reference_count r)) or something.
<def`> flux: or just abstracting over a monad with a notion of scope exit (MonadPlus-like in haskell, though it's a bit too limited)
<MercurialAlchemi> yes, in this case you'd need a stateful bona fide resource manager
<MercurialAlchemi> which is kind of why I came here: the question struck while I was doing a CR dealing with such a beast (in Java)
<def`> it depends on what you know about the lifetime of the resource
<def`> the with_pattern* works if its lifetime is delimited to lexical scope.
<MercurialAlchemi> absolutely
<MercurialAlchemi> and in my experience, it's most often the case
<def`> if you want completely dynamic lifetime, well you need a GC ;)
<MercurialAlchemi> I'm fine with having constructs which work for the common case, which is why I'm a bit disappointed to be left with the impression that there isn't a built-in way of releasing a resource
<def`> with a concurrency monad like Lwt or Async, you should be able to handle all cases, at the expenses of having your code injected into the monad
<def`> MercurialAlchemi: I am not sure it would make sense, or it would be overly specific
<MercurialAlchemi> def`: I was thinking of an analog to the 'with' construct in Python, which definitely makes a lot of sense
<def`> I disagree.
<flux> reference-counted GC just works much better for resources other than memory
<def`> OCaml is expressive-enough to reimplement this notion in a convenient-way
<def`> And we have different notion of scope, to 'with' in python-sense construct is too specific
<def`> so 'with' construct as in python is too specific* Pfff, sorry
<MercurialAlchemi> I don't think it's a questoin of expressivity, you can easily implement an equivalent to the 'with' idiom in Python
Anarchos has joined #ocaml
<MercurialAlchemi> though it would be easier in ruby, I guess
yacks has quit [Ping timeout: 245 seconds]
<MercurialAlchemi> the point is that including in the language makes it a standard, and means that you can close IMAP connections the same way as SQL connections if they have the right method
<def`> when you to deal with resources, sockets, and so on, you're likely to be dealing with concurrency
yacks has joined #ocaml
<MercurialAlchemi> to go back to your second point, and here I'm likely to betray the fact that I'm not that far into Real World Ocaml, I'm not sure of what you mean about scope being different between Python and OCaml (if you mean the Python scoping rules inside a function suck, I'm right there with you, but I don't think they're relevant in this case)
<MercurialAlchemi> def`: sometimes
<def`> MercurialAlchemi: my point is that to deal with concurrency, we usually abstract over the control-flow
<def`> by intentionnally making values escape the "lexical scope" of the function (using closures), but relying on carefully crafted abstractions to keep things easy to manage
<MercurialAlchemi> def`: I've written tons of single-threaded code where I was only interested in opening files A,B and C and ensuring that they got closed in the right order when leaving the function
<MercurialAlchemi> def`: (after processing them)
<def`> a 'with' construct baked into the language could'nt (easily) be aware of this broaded notion of control flow
<def`> broader*
<def`> MercurialAlchemi: then the two lines idiom I gave you is enough to deal with those cases
<MercurialAlchemi> well, as far as I remember, Python has this exact issue wrt closures, but in many cases it's not a problem
<def`> which issue?
<MercurialAlchemi> that if your with block returns a closure containing your resource, you're going to have a bad surprise when you try to do anything with it, because it will be closed
<MercurialAlchemi> but it's a dumb thing to do to start with
<MercurialAlchemi> live by the sword, die by the sword
lgm has quit [Read error: Connection reset by peer]
<def`> I don't know when RWO introduce Async, but you should at least get to this point before thinking of a "general" with-construct
<MercurialAlchemi> My experience says such a thing is common enough to be standardized (on top of encouraging people to think about closing their resource), as long as the limitations are well-documented
<MercurialAlchemi> but maybe I'll change my mind when I get a better idea of what idiomatic OCaml looks like
<flux> maybe a debug-version of 'with' construct could use data dumping functionality to search the returned value for references to the resource ;-)
<def`> :DD, or attach a finalizer to the resource, runs two full gc when exiting scope, and ensure that finalizer has been run properly
<flux> well, that would typically be slower
<MercurialAlchemi> lol
penglingbo has joined #ocaml
<MercurialAlchemi> using a destructor in a gc language sounds like a bad plan
<MercurialAlchemi> that said...
<def`> php pages are expected to be short-lived, it sounds ok
<def`> (otherwise, php as a whole is a bad idea ;))
<MercurialAlchemi> Originally, I was under the impression that PHP was an illustration of the infinite monkey theorem
<MercurialAlchemi> But the more I see of it, the more I think it's more a viral generator of jobs for the industry, due to the number of bad practices it encourages
<MercurialAlchemi> Such an accumulation of appalling technical decisions cannot be random
troutwine_away is now known as troutwine
troutwine is now known as troutwine_away
ygrek has quit [Ping timeout: 250 seconds]
<Anarchos> MercurialAlchemi we all have to keep our jobs ;)
<MercurialAlchemi> Anarchos: yes, but languages where magic_quotes are not the gold standard of security make it harder than those who do
<Anarchos> MercurialAlchemi sure
<MercurialAlchemi> (I know, I know, it's not recommended anymore)
dsheets has joined #ocaml
dsheets has quit [Remote host closed the connection]
dsheets_ has joined #ocaml
ggole_ has joined #ocaml
ggole has quit [Ping timeout: 255 seconds]
Hetu has quit [Ping timeout: 264 seconds]
thomasga has joined #ocaml
hhugo has joined #ocaml
sagotch has joined #ocaml
<NoNNaN> whitequark: is there any way to use GuaranteedTailCallOpt after llvm-3.4 ? The option moved to TargetOption::GuaranteedTailCallOpt, but it looks like the llvm-c api does not expose the TargetOption parameter on creation nor does the ocaml binding. the lib/Target/TargetMachineC.cpp -> LLVMCreateTargetMachine does not have the TargetOption parameter, is there any other way (api, anything) to enable it?
thomasga has quit [Quit: Leaving.]
_andre has joined #ocaml
yman has joined #ocaml
<yman> Hi - From my OCaml application, I need to spawn a subprocess (with its own read-eval-print-loop) and communicate with it over time. I'm using Unix.open_process to get the in and out channels for the subprocess. But, when I use the input function in OCaml, it blocks when it has reached the end of the stream it's reading from. Is there an OCaml library that handles easily interacting with subprocesses?
<def`> are you closing the output in the subprocess?
<yman> Hmm, I don't think so - the subprocess is itself just presenting a read-eval-print-loop on its own stdin/stdout, and is designed for being used interactively in a terminal
maattdd has joined #ocaml
<yman> (I am not the `owner' of the subprocess - it's a stand-alone tool )
<yman> (I mean to say, I don't have access to the subprocess's source code)
<def`> if you are finished using the process, you can close stdin
yman_ has joined #ocaml
<yman_> Hi, I'm sorry, I disconnected and missed any replies you may have written.
siddharthv is now known as siddharthv_away
<def`> if you are finished using the sub process, you can close its stdin
<def`> maybe this will make it stop
<def`> otherwise, you can use Unix.select with an appropriate timeout to see if the process wrote anything
<def`> … but in general, there is a race condition: you can't tell if the process will write something in the future you might miss
<def`> so you need a way to signal the end
yman has quit [Ping timeout: 246 seconds]
<yman_> Hmm, tricky. I can perhaps rely on the fact that the subprocess presents its REPL prompt only once it's done with its output
<yman_> So perhaps I should just keep using input until I encounter the prompt
<def`> yes
<yman_> Thank you about Unix.select - I will look into that, too
<def`> that's what tools like expect does
<yman_> Great, thank you
Eyyub has quit [Ping timeout: 255 seconds]
Hetu has joined #ocaml
sagotch has quit [Ping timeout: 250 seconds]
cago has quit [Ping timeout: 240 seconds]
agarwal1975 has quit [Quit: agarwal1975]
ggole_ is now known as ggole
rand000 has joined #ocaml
thomasga has joined #ocaml
freling has quit [Quit: Leaving.]
freling has joined #ocaml
maattdd has quit [Ping timeout: 255 seconds]
penglingbo has quit [Ping timeout: 250 seconds]
yman_ has quit [Ping timeout: 246 seconds]
darkf has quit [Quit: Leaving]
agarwal1975 has joined #ocaml
hhugo has quit [Quit: Leaving.]
englishm has quit [Ping timeout: 256 seconds]
hhugo has joined #ocaml
parcs has quit [Ping timeout: 272 seconds]
penglingbo has joined #ocaml
parcs has joined #ocaml
englishm has joined #ocaml
nlucaroni has joined #ocaml
Hetu has quit [Remote host closed the connection]
thomasga has quit [Quit: Leaving.]
englishm1 has joined #ocaml
sagotch has joined #ocaml
sagotch_ has joined #ocaml
craigglennie has joined #ocaml
sagotch has quit [Ping timeout: 260 seconds]
cago has joined #ocaml
thomasga has joined #ocaml
thomasga has quit [Client Quit]
ygrek has joined #ocaml
Eyyub has joined #ocaml
johnnydiabetic has joined #ocaml
<ewd> how do you declare a function in a .mli file that return a type from a parametric module like a -> b Set?
<ewd> so I need to kind of instanciate Set on the .mli
<ggole> a -> Set.Make(...).t
<ggole> Or you can give it a name
hhugo has quit [Quit: Leaving.]
<ewd> ah ok, like type myset = Make(...).t?
<ggole> No, the module that is the application of the Set functor
<ggole> module Test : sig module S : Set.S with type elt = string val f : string -> S.t end = struct module S = Set.Make (String) let f x = ... end
<ewd> ok
<ewd> the last sounds a lot of boiler plate code
_0xAX has quit [Remote host closed the connection]
zpe has quit [Remote host closed the connection]
hhugo has joined #ocaml
Youri has quit [Ping timeout: 250 seconds]
Youri has joined #ocaml
sagotch_ has quit [Remote host closed the connection]
hausdorff has joined #ocaml
Youri has quit [Ping timeout: 264 seconds]
shinnya has joined #ocaml
maattdd has joined #ocaml
cago has quit [Ping timeout: 250 seconds]
jonludlam has quit [Ping timeout: 260 seconds]
jprakash has joined #ocaml
thomasga has joined #ocaml
craigglennie has quit [Quit: craigglennie]
hausdorff has quit [Remote host closed the connection]
hausdorff has joined #ocaml
hausdorff has quit [Ping timeout: 240 seconds]
George_ has joined #ocaml
craigglennie has joined #ocaml
englishm2 has joined #ocaml
englishm1 has quit [Read error: Connection reset by peer]
englishm has quit [Read error: Connection reset by peer]
englishm has joined #ocaml
thomasga has quit [Quit: Leaving.]
thomasga has joined #ocaml
hausdorff has joined #ocaml
craigglennie has quit [Quit: craigglennie]
thomasga has quit [Quit: Leaving.]
jennmoneydollars has joined #ocaml
morphles has joined #ocaml
jonludlam has joined #ocaml
shinnya has quit [Ping timeout: 255 seconds]
zpe has joined #ocaml
jonludlam has quit [Ping timeout: 260 seconds]
thomasga has joined #ocaml
Eyyub has quit [Ping timeout: 245 seconds]
stevej has joined #ocaml
maattdd has quit [Ping timeout: 264 seconds]
jonludlam has joined #ocaml
stevej has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
thomasga has quit [Quit: Leaving.]
hausdorff has quit [Remote host closed the connection]
penglingbo has quit [Ping timeout: 250 seconds]
hhugo has quit [Quit: Leaving.]
rand000 has quit [Ping timeout: 250 seconds]
hausdorff has joined #ocaml
isBEKaml_mobile has joined #ocaml
jonludlam has quit [Remote host closed the connection]
isBEKaml_mobile has left #ocaml [#ocaml]
rishabhjain has joined #ocaml
bert has joined #ocaml
bert is now known as Guest67440
George_ has quit [Ping timeout: 246 seconds]
hhugo has joined #ocaml
thomasga has joined #ocaml
Guest67440 has quit [Client Quit]
bert-- has joined #ocaml
hausdorff has quit [Remote host closed the connection]
hausdorff has joined #ocaml
dsheets_ has quit [Ping timeout: 264 seconds]
_0xAX has joined #ocaml
hausdorff has quit [Remote host closed the connection]
ollehar has joined #ocaml
tane has joined #ocaml
hausdorff has joined #ocaml
hausdorff has quit [Remote host closed the connection]
travisbrady has joined #ocaml
<travisbrady> Anyone here used assemblage? Is it an oasis replacement?
ewd has quit [Quit: Lost terminal]
<jpdeplaix> def` if I'm right
philtor has joined #ocaml
<whitequark> travisbrady: I've been thinking of using assemblage
<travisbrady> whitequark: what problem does it solve? Is it an oasis alternative?
<whitequark> yes
<travisbrady> ahh, ok. Do you know the rationale there? Like which parts of oasis does it attempt to improve upon?
<companion_cube> if it doesn't produce all files needed (meta, libraries, executables, doc) it's worthless :/
<whitequark> travisbrady: OASIS is too rigid
<whitequark> in most of my projects it turned out to be more of a hassle than improvement
<travisbrady> whitequark: I’ve had some issues too when trying to bind to C++ libs
<travisbrady> but for totally vanilla projects it works nicely
<whitequark> not really
<whitequark> ppx_deriving is pure OCaml...
Hannibal_Smith has joined #ocaml
tane has quit [Quit: Verlassend]
tautologico has joined #ocaml
philtor has quit [Ping timeout: 250 seconds]
hausdorff has joined #ocaml
philtor has joined #ocaml
q66 has joined #ocaml
hausdorff has quit [Quit: Leaving...]
travisbrady has quit [Quit: travisbrady]
pyon has joined #ocaml
Kakadu has quit [Quit: Page closed]
morphles has quit [Ping timeout: 260 seconds]
travisbrady has joined #ocaml
jao has joined #ocaml
jao has quit [Changing host]
jao has joined #ocaml
NoNNaN has quit [Ping timeout: 264 seconds]
<Leonidas> there is a ppx version of deriving? *neat*
<whitequark> I just wrote it, yes
<Leonidas> cool, thanks :)
* Leonidas stars it, to not forget about it
philtor has quit [Ping timeout: 260 seconds]
maattdd has joined #ocaml
<bert--> Can anyone tell me why the following expression is no good in utop, but works in an online repl: List.map (fun x -> x + 1) [1;2;3;4];;
<Drup> what is the error in utop ?
<bert--> Error: This expression should not be a function, the expected type is 'a list
<bert--> If I swap the order of the arguments, it's OK, though.
<ggole> Differing environments, probably
<ggole> Does it work if you ~f:(fun x -> x + 1)?
<mrvn> you must have opened some other module that contains a List.map with different type
<bert--> ggole: But I would think that List.map is pretty much established. With the ~f: label, either way works.
<ggole> There's several List.maps :)
<ggole> You're using the one from Core, apparently
<bert--> mrvn: Hmm... I think I just have the default RWO .ocamlinit
NoNNaN has joined #ocaml
<mrvn> no core or batteries in utops config?
<ggole> The online repl probably has just the inria stdlib
<bert--> mrvn: Core, yeah. No batteries.
<bert--> ggole: OK.
<mrvn> so Core.List.map is probably to blame
<bert--> Hm. Seems strange that it'd be implemented in that order.
<ggole> bert--: the underlying reason is that Core.List.map uses a label 'f' for its function argument
<ggole> And places it last.
jprakash has quit [Quit: Lost terminal]
<bert--> ggole: OK, fair enough. Am I alone in thinking it's strange to have the function follow the variable?
<companion_cube> with labels it doesn't really matter
<bernardofpc> but it's strange to curry, isn't it ?
<bernardofpc> (or |> )
maattdd has quit [Ping timeout: 272 seconds]
<ggole> I think the motivation is that if you have List.map list (fun x -> <huge function body>), it indents a bit nicer
<Drup> bernardofpc: on the contrary, it's nicer to curry
<Drup> to partially apply
pgomes has joined #ocaml
<Drup> list |> List.map ~f:( ... )
<Drup> but List.map list \n~f:(...)
<ggole> It's more consistent with other data structures, too
hhugo has quit [Quit: Leaving.]
<bert--> OK, guys. Thanks for the thoughts.
bert-- has quit [Quit: Page closed]
jwatzman|work has joined #ocaml
jprakash has joined #ocaml
Submarine has joined #ocaml
philtor has joined #ocaml
maattdd has joined #ocaml
<flux> flip!
<Drup> flux: naaaah
rishabhjain has quit []
philtor has quit [Ping timeout: 245 seconds]
Kakadu has joined #ocaml
morphles has joined #ocaml
philtor has joined #ocaml
thomasga has quit [Quit: Leaving.]
Eyyub has joined #ocaml
rks` has joined #ocaml
rinaku has joined #ocaml
<agarwal1975> anyone know how to construct “fun (type a)” in Parsetree?
<whitequark> #require "ppx_tools.metaquot";; [%expr fun (type a) -> ()]
Hannibal_Smith has quit [Quit: Sto andando via]
<agarwal1975> I haven’t started using ppx_tools yet. Trying to learn Parsetree by using it directly. Do you know the output of above?
<whitequark> Pexp_newtype
<Drup> agarwal1975: for this kind of question, the answer is always the same, "ocaml -dparsetree"
<whitequark> Drup: in this case, the answer is "just use ppx_tools" ;D
<Drup> whitequark: well, you may want to pattern match on the newtypes in a function, or something
<Drup> ppx_tools is not suited for patterns with variables lenghts
<whitequark> match expr with [%expr fun (type [%t? typ]) -> [%e? rest]]
<agarwal1975> thanks! I forgot about -dparsetree. Just starting to dabble with compilerlibs.
<Drup> (whitequark: and you know I don't disagree anyway :D)
<whitequark> oh, right
travisbrady has quit [Quit: travisbrady]
<whitequark> huh, it's very simple to parse ocaml code. Parser.parse_expression Lexer.token (Lexing.from_string "1+2");;
philtor has quit [Ping timeout: 264 seconds]
philtor has joined #ocaml
<agarwal1975> how do you get Parser module?
<whitequark> require "compiler-libs.common"
maattdd has quit [Ping timeout: 264 seconds]
<agarwal1975> I don’t get the parse_expression function.
<whitequark> 4.02?
<agarwal1975> No… need to upgrade.
philtor has quit [Ping timeout: 250 seconds]
travisbrady has joined #ocaml
pgomes has quit [Ping timeout: 264 seconds]
englishm1 has joined #ocaml
englishm_ has joined #ocaml
englishm2 has quit [Ping timeout: 255 seconds]
englishm has quit [Ping timeout: 240 seconds]
dsheets_ has joined #ocaml
manizzle has quit [Ping timeout: 260 seconds]
englishm_ has quit [Read error: Connection reset by peer]
englishm1 has quit [Read error: Connection reset by peer]
englishm has joined #ocaml
englishm_ has joined #ocaml
jprakash has quit [Ping timeout: 240 seconds]
badon has quit [Ping timeout: 260 seconds]
ygrek has quit [Ping timeout: 260 seconds]
maattdd has joined #ocaml
englishm has quit [Read error: Connection reset by peer]
englishm_ has quit [Read error: Connection reset by peer]
englishm1 has joined #ocaml
english__ has joined #ocaml
maattdd has quit [Ping timeout: 240 seconds]
sheijk has joined #ocaml
maattdd has joined #ocaml
rand000 has joined #ocaml
Hannibal_Smith has joined #ocaml
english__ has quit [Read error: Connection reset by peer]
englishm1 has quit [Read error: Connection reset by peer]
englishm has joined #ocaml
englishm_ has joined #ocaml
pgomes has joined #ocaml
ygrek has joined #ocaml
yomimono has joined #ocaml
_0xAX has quit [Remote host closed the connection]
nlucaroni has quit [Quit: leaving]
manizzle has joined #ocaml
jprakash has joined #ocaml
Eyyub has quit [Ping timeout: 255 seconds]
Hannibal_Smith has quit [Quit: Sto andando via]
penglingbo has joined #ocaml
_andre has quit [Quit: leaving]
maattdd has quit [Ping timeout: 255 seconds]
BitPuffin has quit [Ping timeout: 264 seconds]
maattdd has joined #ocaml
jprakash has quit [Ping timeout: 250 seconds]
no0y has joined #ocaml
maattdd has quit [Ping timeout: 264 seconds]
BitPuffin has joined #ocaml
jao has quit [Ping timeout: 245 seconds]
Haudegen has quit [Quit: Baba!]
penglingbo has quit [Ping timeout: 245 seconds]
OnkV has joined #ocaml
ygrek has quit [Ping timeout: 245 seconds]
Haudegen has joined #ocaml
Haudegen is now known as Guest38358
maattdd has joined #ocaml
pgomes has quit [Quit: Leaving]
morphles has quit [Ping timeout: 240 seconds]
Guest38358 is now known as Haudegen
maattdd has quit [Ping timeout: 240 seconds]
WraithM has joined #ocaml
maattdd has joined #ocaml
englishm_ has quit [Remote host closed the connection]
englishm has quit [Quit: Leaving.]
englishm has joined #ocaml
fold has quit [Ping timeout: 260 seconds]
Submarine has quit [Remote host closed the connection]
maattdd has quit [Ping timeout: 260 seconds]
englishm has quit [Ping timeout: 260 seconds]
nlucaroni has joined #ocaml
axiles has quit [Remote host closed the connection]
ggole has quit []
travisbrady has quit [Quit: travisbrady]
ollehar has quit [Ping timeout: 250 seconds]
tautologico has quit [Quit: Textual IRC Client: www.textualapp.com]
eikke__ has quit [Ping timeout: 260 seconds]
Nahra has quit [Remote host closed the connection]
Nahra has joined #ocaml
Kakadu has quit [Ping timeout: 250 seconds]
jprakash has joined #ocaml
Anarchos has quit [Quit: humans sleep, internet doesn't.]
Nahra has quit [Remote host closed the connection]
Nahra has joined #ocaml
Nahra has quit [Remote host closed the connection]
Nahra has joined #ocaml
dapz has joined #ocaml
Nahra has quit [Remote host closed the connection]
Nahra has joined #ocaml
maattdd has joined #ocaml
Nahra has quit [Remote host closed the connection]
johnnydiabetic has quit [Ping timeout: 260 seconds]
dsheets_ has quit [Ping timeout: 260 seconds]
shinnya has joined #ocaml
maattdd has quit [Ping timeout: 256 seconds]
eikke__ has joined #ocaml
Nahra has joined #ocaml
Nahra has quit [Ping timeout: 260 seconds]
<Drup> whitequark: can I have a link to the various sublime text utilities for ocaml ?
agarwal1975 has quit [Quit: agarwal1975]
sheijk has quit [Ping timeout: 255 seconds]
<nicoo> Drup: Planning on switching editors ?
<Drup> nicoo: certaintly not, just completing https://github.com/rizo/awesome-ocaml
<nicoo> Ah, ok. I felt really surprised :)
Nahra has joined #ocaml
BitPuffin has quit [Ping timeout: 250 seconds]
Nahra has quit [Ping timeout: 240 seconds]
hhugo has joined #ocaml
Nahra has joined #ocaml
Nahra has quit [Remote host closed the connection]
darkf has joined #ocaml
agarwal1975 has joined #ocaml
Nahra has joined #ocaml
Nahra has quit [Remote host closed the connection]
Nahra has joined #ocaml
Nahra has quit [Remote host closed the connection]
dapz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
maattdd has joined #ocaml
jao has joined #ocaml
jao has quit [Changing host]
jao has joined #ocaml
sheijk has joined #ocaml
maattdd has quit [Ping timeout: 240 seconds]
BitPuffin has joined #ocaml
WraithM has quit [Quit: Lost terminal]
WraithM has joined #ocaml
dapz has joined #ocaml
yomimono has quit [Quit: Leaving]
Simn has quit [Quit: Leaving]
eikke__ has quit [Ping timeout: 250 seconds]
madroach has quit [Ping timeout: 250 seconds]
madroach has joined #ocaml
NoNNaN has quit [Remote host closed the connection]
NoNNaN has joined #ocaml
hto has quit [Quit: Lost terminal]
hhugo has quit [Quit: Leaving.]
maattdd has joined #ocaml
philtor has joined #ocaml