ChanServ changed the topic of #ocaml to: Discussions about the OCaml programming language | http://www.ocaml.org | OCaml 4.02.1 announcement at http://ocaml.org/releases/4.02.html | Public channel logs at http://irclog.whitequark.org/ocaml
Arsenik has quit [Remote host closed the connection]
<Drup> let (@$) = Array.append
<Drup> done. :)
AltGr has joined #ocaml
arj has joined #ocaml
<thetabyte> oh whoa! to methods starting with certain identifiers automatically support infix, or?
<thetabyte> *functions
<Drup> composed of certain chars, yes
troydm has joined #ocaml
arj has quit [Ping timeout: 240 seconds]
arj has joined #ocaml
madroach has quit [Ping timeout: 250 seconds]
madroach has joined #ocaml
arj has quit [Ping timeout: 250 seconds]
NoNNaN has quit [Remote host closed the connection]
NoNNaN has joined #ocaml
BitPuffi1 has joined #ocaml
BitPuffin has quit [Ping timeout: 258 seconds]
arj has joined #ocaml
arj has quit [Ping timeout: 240 seconds]
malc_ has quit [Quit: leaving]
malc_ has joined #ocaml
mcclurmc has quit [Remote host closed the connection]
mcclurmc has joined #ocaml
mcclurmc has quit [Remote host closed the connection]
Simn has quit [Read error: Connection reset by peer]
arj has joined #ocaml
badkins has joined #ocaml
arj has quit [Ping timeout: 265 seconds]
arj has joined #ocaml
SomeDamnBody has joined #ocaml
arj has quit [Ping timeout: 258 seconds]
<SomeDamnBody> So, I have this ml file; I'm new ocaml, but at one point in the file it has let () = blah ;; and then later, just statements outside of any let binding...
<SomeDamnBody> this is a file that produces an executable, so it's like, which happens first, the let () binding or the end of the file, where the open statements are?
<malc_> SomeDamnBody: let ()
<SomeDamnBody> then the global statements right?
darkf has joined #ocaml
<malc_> SomeDamnBody: i don't know what you mean by global statement
<SomeDamnBody> at the very end of the program it has: !outf !out prog
<malc_> let () = <code> is no different than a begin <code> end or something
ygrek has joined #ocaml
pyon has quit [Quit: rcirc on GNU Emacs 24.4.1]
<SomeDamnBody> malc_, well I was just confused about how ocaml determines what main is
<SomeDamnBody> in C++ you don't have statements like int x = 1+1; somefunc(); in global scope
<malc_> SomeDamnBody: there's no main
<SomeDamnBody> it always starts at main for c++
<SomeDamnBody> ah ok
<malc_> SomeDamnBody: everything that's a statement is evaluated in textual order
<SomeDamnBody> ok
BitPuffi1 has quit [Ping timeout: 255 seconds]
<SomeDamnBody> I have a function defined in a library that uses the Arg module
<SomeDamnBody> I want to use the function directly without modifying how to represents command line arguments
<SomeDamnBody> is there any way I could feed a string to Arg.parse as though it were on the command line?
<malc_> Arg.parse_argv
arj has joined #ocaml
<SomeDamnBody> malc_, so say, the program is written with Arg.parse
arj has quit [Ping timeout: 240 seconds]
<SomeDamnBody> and the command I give to it is "-bin blah -l kayy"
<SomeDamnBody> how does that become a string array?
<SomeDamnBody> is it [| "-bin"; "blah"; "-l"; "kayy" |] ??
<malc_> SomeDamnBody: [| prog_name, ...
<SomeDamnBody> malc_, as I had had it?
badkins has quit [Remote host closed the connection]
<malc_> SomeDamnBody: excuse me?
<SomeDamnBody> as in [| prog_name; "-bin"; "blah"; "-l"; "kayy" |]
<malc_> aye
<SomeDamnBody> :) thanks
<malc_> # String.concat "," (Array.to_list Sys.argv);;
<malc_> - : string = "/net/bin/ocaml"
badkins has joined #ocaml
arj has joined #ocaml
q66 has quit [Quit: Leaving]
mcclurmc has joined #ocaml
mcclurmc has quit [Ping timeout: 240 seconds]
arj has quit [Ping timeout: 240 seconds]
siddharthv_away is now known as siddharthv
mcclurmc has joined #ocaml
lordkryss has quit [Quit: Connection closed for inactivity]
arj has joined #ocaml
arj has quit [Ping timeout: 245 seconds]
WraithM has quit [Quit: leaving]
arj has joined #ocaml
yomimono has joined #ocaml
arj has quit [Ping timeout: 240 seconds]
samrat has joined #ocaml
akuhlens has joined #ocaml
q66[lap] has quit [Read error: Connection reset by peer]
bytbox has joined #ocaml
shinnya has quit [Ping timeout: 250 seconds]
q66[lap] has joined #ocaml
badkins has quit []
arj has joined #ocaml
shinnya has joined #ocaml
johnf has joined #ocaml
arj has quit [Ping timeout: 255 seconds]
bytbox has quit [Remote host closed the connection]
akuhlens has quit [Quit: This computer has gone to sleep]
arj has joined #ocaml
arj has quit [Ping timeout: 258 seconds]
manud_ has quit [Quit: Be back later ...]
arj has joined #ocaml
araujo has quit [Quit: Leaving]
akuhlens has joined #ocaml
pyon has joined #ocaml
akuhlens has quit [Client Quit]
arj has quit [Ping timeout: 250 seconds]
akuhlens has joined #ocaml
samrat has quit [Quit: Computer has gone to sleep.]
WraithM has joined #ocaml
arj has joined #ocaml
arj has quit [Ping timeout: 258 seconds]
<SomeDamnBody> I have a library that exports most things, but I need to compile a few objects that don't get linked into it's cma rather than writing what's in those ml files all over again
<whitequark> build system?
<SomeDamnBody> build system?
<whitequark> what build system do you use?
arj has joined #ocaml
<SomeDamnBody> ocamlmakefile
<SomeDamnBody> ok i think I may have found it...
<SomeDamnBody> basically, I'm using parts of a file from a script that sitched other parts of hte library that I consume together
<SomeDamnBody> it was the ml that had the let () in it
<struk> well I just spent 2 hours trying to reinvent async's Deferred.Result.Monad_infix, poorly. Then I discovered it already existed.
arj has quit [Ping timeout: 265 seconds]
samrat has joined #ocaml
ggole has joined #ocaml
arj has joined #ocaml
arj has quit [Ping timeout: 256 seconds]
mcclurmc has quit [Remote host closed the connection]
<SomeDamnBody> in my overall ocaml project, there are multiple definitions of let () =
<SomeDamnBody> and toplevel based "mains"
<SomeDamnBody> I need functions defined in one "main file" and want to use just those, letting the rest of it be ignored
<SomeDamnBody> how do I do that?
akuhlens has quit [Quit: This computer has gone to sleep]
<whitequark> let () is not a definition
<whitequark> let () = expr just says "execute and ignore the result of expr"
<malc_> whitequark: no it's not, let () binds unit to unit
<malc_> let _ does what you describe though
<whitequark> malc_: I know. effectively it has the same result.
<whitequark> well, actually, "binds" is not correct here
<whitequark> it's an irrefutable match of expr with ()
<whitequark> it doesn't bind anything, you can't bind constructors using let.
<SomeDamnBody> ok, well basically I have two "mains"
<SomeDamnBody> I want to select which will run
<whitequark> SomeDamnBody: give them names
<whitequark> let main1 () = ...
<whitequark> instead of let () = ...
<SomeDamnBody> kk
<whitequark> then, explicitly call whichever you like from a let () =
<malc_> whitequark: it doesn't have the same result.. given that let () = 1 will not work but let _ = 1 will
akuhlens has joined #ocaml
<whitequark> sigh
arj has joined #ocaml
arj has quit [Ping timeout: 265 seconds]
yomimono has quit [Ping timeout: 272 seconds]
ygrek has quit [Ping timeout: 240 seconds]
arj has joined #ocaml
brendan has joined #ocaml
arj has quit [Ping timeout: 245 seconds]
govg has quit [Quit: leaving]
mcclurmc has joined #ocaml
chambart has joined #ocaml
mcclurmc has quit [Ping timeout: 256 seconds]
arj has joined #ocaml
malc_ has quit [Quit: leaving]
arj has quit [Ping timeout: 272 seconds]
akuhlens has quit [Quit: This computer has gone to sleep]
samuel02 has joined #ocaml
<struk> whitequark: having trouble with ppx import...trying to redefine a module with "type t" part of the module enhanced with deriving features. how does one do this? Getting an error like this when trying to do it with jane street core list : Type [%import :Core.Std.List.t] does not have a Protobuf mapping
<whitequark> you need to require import before deriving
<mrvn> You can import types and not just modules?
<whitequark> sure
<mrvn> oh way, ppx. never mind. I need my morning coffee.
<struk> whitequark: you mean my build order is wrong? let me check
<whitequark> yes
<struk> argh even worse I forgot to run some stupid oasis command to pick up the _oasis changes
samuel02 has quit [Remote host closed the connection]
<whitequark> oasis setup -setup-update dynamic
<whitequark> or something like that
arj has joined #ocaml
<struk> whitequark: oasis seems to be ignoring my order in BuildDepends...is there a better way to force ordering?
<whitequark> I don't actually think so
<whitequark> well, you can add them manually in _tags
arj has quit [Ping timeout: 240 seconds]
<struk> hmm ok
q66[lap] has quit [Read error: Connection reset by peer]
manud_ has joined #ocaml
q66[lap] has joined #ocaml
ygrek has joined #ocaml
arj has joined #ocaml
arj has quit [Ping timeout: 265 seconds]
MercurialAlchemi has joined #ocaml
darkf has quit [Ping timeout: 255 seconds]
cdidd has quit [Ping timeout: 264 seconds]
samuel02 has joined #ocaml
samuel02 has quit [Remote host closed the connection]
Guest652 has quit [Ping timeout: 264 seconds]
pyx has joined #ocaml
pyx has quit [Changing host]
pyx has joined #ocaml
pyx has quit [Client Quit]
arj has joined #ocaml
darkf has joined #ocaml
darkf has quit [Changing host]
darkf has joined #ocaml
arj has quit [Ping timeout: 272 seconds]
psy has quit [Remote host closed the connection]
darkf has quit [Quit: Leaving]
darkf has joined #ocaml
nojb has joined #ocaml
nojb has quit [Quit: nojb]
Simn has joined #ocaml
samuel02 has joined #ocaml
nojb has joined #ocaml
arj has joined #ocaml
arj has quit [Ping timeout: 244 seconds]
samuel02 has quit []
oscar_toro has quit [Ping timeout: 265 seconds]
keen___________7 has quit [Read error: Connection reset by peer]
larhat has joined #ocaml
keen___________7 has joined #ocaml
q66[lap] has quit [Read error: Connection reset by peer]
q66[lap] has joined #ocaml
nojb has quit [Quit: nojb]
nojb has joined #ocaml
govg has joined #ocaml
Guest652 has joined #ocaml
psy has joined #ocaml
siddharthv is now known as siddharthv_away
testcocoon has quit [Quit: Coyote finally caught me]
testcocoon has joined #ocaml
BitPuffi1 has joined #ocaml
oscar_toro has joined #ocaml
BitPuffi1 is now known as BitPuffin
arj has joined #ocaml
kakadu has joined #ocaml
arj has quit [Ping timeout: 264 seconds]
enitiz has quit [Ping timeout: 245 seconds]
nojb has quit [Quit: nojb]
nojb has joined #ocaml
siddharthv_away is now known as siddharthv
ollehar has joined #ocaml
arj has joined #ocaml
arj has quit [Ping timeout: 264 seconds]
chambart has quit [Ping timeout: 240 seconds]
SomeDamnBody has quit [Ping timeout: 255 seconds]
thetabyte has quit [Quit: Leaving.]
nojb has quit [Quit: nojb]
<companion_cube> o/
arj has joined #ocaml
thomasga has joined #ocaml
thomasga has quit [Client Quit]
Shozan is now known as SHODAN
flx has joined #ocaml
flux has quit [Remote host closed the connection]
flx is now known as flux
arj has quit [Ping timeout: 256 seconds]
<adrien> morning
skchrko has joined #ocaml
cdidd has joined #ocaml
dsheets has joined #ocaml
lordkryss has joined #ocaml
bezirg has joined #ocaml
arj has joined #ocaml
arj has quit [Ping timeout: 256 seconds]
mcclurmc has joined #ocaml
mcclurmc has quit [Ping timeout: 255 seconds]
George____ has joined #ocaml
_andre has joined #ocaml
vogler has joined #ocaml
oscar_toro has quit [Ping timeout: 264 seconds]
thomasga has joined #ocaml
arj has joined #ocaml
manud_ has quit [Quit: Be back later ...]
arj has quit [Ping timeout: 244 seconds]
pgomes has joined #ocaml
choeger_tu has joined #ocaml
ikaros has joined #ocaml
jonludlam has joined #ocaml
Simn has quit [Ping timeout: 265 seconds]
expo873 has quit [Quit: Connection closed for inactivity]
arj has joined #ocaml
arj has quit [Ping timeout: 240 seconds]
choeger_tu has quit [Quit: choeger_tu]
zwer_f has quit [Remote host closed the connection]
zwer has joined #ocaml
<companion_cube> is there a mktemp wrapper in Lwt?
<whitequark> no
<companion_cube> guess I'll have to use system() -_-
<whitequark> no
<whitequark> you can wrap it using something from Lwt_unix
<whitequark> ah no
<whitequark> Lwt_preemptive.detach
<companion_cube> well, Lwt_process.with_process_out
<Leonidas> companion_cube: I wrote an mktemp function with Lwt...
<Leonidas> (for diretories, because ocaml stdlib does not have one for temporary directories)
<companion_cube> I need a temp file :p
<whitequark> companion_cube: no, you detach and use the function from Unix
<adrien> mk*s*temp()
<whitequark> Unix.mktemp uses mkstemp when it's available
<whitequark> iirc
<whitequark> hm, actually there is no Unix.mktemp
<whitequark> I swear I seen it somewhere
<whitequark> companion_cube: ah. ExtUnix.All.mkstemp
<companion_cube> there's no mktemp
<companion_cube> in Unix
<companion_cube> adrien: what's the difference
<companion_cube> ?
<whitequark> yeah, I mixed it up with something else
<adrien> companion_cube: man 3 mktemp
<adrien> BUGS
<adrien> Never use mktemp().
<companion_cube> -_-
<companion_cube> ok, ok, I'll call mkstemp -d foo bar
<whitequark> read on
<whitequark> >Some implementations follow 4.3BSD and replace XXXXXX by the current process ID and a single letter, so that at most 26 different names can be returned.
<adrien> yeah, the whole thing is worth a read but I wasn't going to paste it in full :)
arj has joined #ocaml
arj has quit [Ping timeout: 245 seconds]
AlexRussia has quit [Ping timeout: 245 seconds]
arj has joined #ocaml
<Unhammer> can tuareg-mode treat comments a sexp's? I keep doing C-M-k hoping it'll kill a (* … *)
<Unhammer> *as
arj has quit [Ping timeout: 255 seconds]
q66[lap] has quit [Ping timeout: 250 seconds]
ygrek has quit [Ping timeout: 244 seconds]
thomasga has quit [Quit: Leaving.]
<whitequark> Drup: I think I spotted (sic) the worst pun in the OCaml ecosystem
pierpa` has quit [Ping timeout: 255 seconds]
pierpa has quit [Ping timeout: 255 seconds]
araujo has joined #ocaml
choeger_tu has joined #ocaml
arj has joined #ocaml
mcclurmc has joined #ocaml
Simn has joined #ocaml
mort___ has joined #ocaml
choeger_tu has quit [Quit: choeger_tu]
mcclurmc has quit [Ping timeout: 244 seconds]
arj has quit [Ping timeout: 264 seconds]
samrat has quit [Quit: Computer has gone to sleep.]
maufred has quit [Remote host closed the connection]
<Unhammer> is there a description somewhere of the object system in js_of_ocaml/eliom? I just learnt by trial and failure that "method setItem : js_string t -> js_string t -> unit meth" means I have to pass both args as a tuple
AlexRussia has joined #ocaml
maufred has joined #ocaml
enitiz has joined #ocaml
shinnya has quit [Ping timeout: 250 seconds]
arj has joined #ocaml
rand000 has joined #ocaml
siddharthv is now known as siddharthv_away
shinnya has joined #ocaml
arj has quit [Ping timeout: 256 seconds]
<kakadu> not really a tuble
<kakadu> tuple*
<kakadu> It is just a syntax extension which looks like a tuple
<Unhammer> :(
<kakadu> it expands ##(...) into something
* Unhammer really does not like all these syntax extension
<whitequark> I think you can't use application syntax there without extending typedtree
<whitequark> well, the typechecker rather
<whitequark> accessing typedtree.
arj has joined #ocaml
ygrek has joined #ocaml
arj has quit [Ping timeout: 250 seconds]
_5kg has quit [Ping timeout: 255 seconds]
samrat has joined #ocaml
chambart has joined #ocaml
<bernardofpc> xyh> opam init :: Cannot download https://opam.ocaml.org/urls.txt, please check your connection settings -> had the same bug on sunday... dunno WHY downloading takes that long to start :/
choeger_tu has joined #ocaml
arj has joined #ocaml
bytbox has joined #ocaml
bytbox has quit [Remote host closed the connection]
AltGr has left #ocaml [#ocaml]
_5kg has joined #ocaml
akuhlens has joined #ocaml
BitPuffin has quit [Ping timeout: 256 seconds]
lopex has quit [Read error: Connection reset by peer]
jeroud has quit [Read error: Connection reset by peer]
c74d is now known as Guest13071
lopex has joined #ocaml
S11001001 has quit [Write error: Connection reset by peer]
jeroud_ has joined #ocaml
jzelinskie has quit [Write error: Connection reset by peer]
n1ftyn8 has quit [Write error: Connection reset by peer]
andreypopp_ has quit [Write error: Connection reset by peer]
rfv has quit [Write error: Connection reset by peer]
divyanshu has quit [Read error: Connection reset by peer]
bobpoekert has quit [Write error: Connection reset by peer]
cojy has quit [Read error: Connection reset by peer]
akuhlens has quit [Client Quit]
msch has quit [Write error: Connection reset by peer]
Guest13071 has quit [Ping timeout: 265 seconds]
sivoais has quit [Ping timeout: 265 seconds]
emmanueloga_ has quit [Ping timeout: 265 seconds]
S11001001 has joined #ocaml
jcloud has quit [Ping timeout: 265 seconds]
n1ftyn8 has joined #ocaml
divyanshu has joined #ocaml
jzelinskie has joined #ocaml
cojy has joined #ocaml
bobpoekert_ has joined #ocaml
andreypopp_ has joined #ocaml
sivoais has joined #ocaml
akuhlens has joined #ocaml
emmanueloga_ has joined #ocaml
msch has joined #ocaml
rfv has joined #ocaml
jcloud has joined #ocaml
c74d has joined #ocaml
Guest652 has quit [Ping timeout: 272 seconds]
mcclurmc has joined #ocaml
arj has quit [Ping timeout: 255 seconds]
sivoais has quit [Ping timeout: 264 seconds]
sivoais has joined #ocaml
mcclurmc has quit [Ping timeout: 240 seconds]
sivoais has quit [Ping timeout: 255 seconds]
_5kg has quit [Ping timeout: 250 seconds]
sivoais has joined #ocaml
sooheon has joined #ocaml
chambart has quit [Ping timeout: 264 seconds]
arj has joined #ocaml
thomasga has joined #ocaml
chambart has joined #ocaml
sivoais has quit [Ping timeout: 272 seconds]
<companion_cube> Leonidas: btw, do you have your Lwt.mktemp function somewhere on the web?
fraggle-boate has quit [Ping timeout: 264 seconds]
arj has quit [Ping timeout: 245 seconds]
bezirg has quit [Ping timeout: 272 seconds]
sivoais has joined #ocaml
<Leonidas> whitequark: maybe you saw it in extunix?
<whitequark> Leonidas: read on...
<Leonidas> whitequark: ah. right. oops.
sooheon has quit [Ping timeout: 250 seconds]
arj has joined #ocaml
sivoais has quit [Ping timeout: 265 seconds]
fraggle-boate has joined #ocaml
sivoais has joined #ocaml
zpe has joined #ocaml
sivoais has quit [Ping timeout: 240 seconds]
sivoais has joined #ocaml
lordkryss has quit [Quit: Connection closed for inactivity]
mcclurmc has joined #ocaml
BitPuffin has joined #ocaml
shinnya has quit [Ping timeout: 245 seconds]
<Unhammer> uh how do I change the <base> element created by eliom?
chambart has quit [Ping timeout: 255 seconds]
AlexRussia has quit [Ping timeout: 265 seconds]
<Unhammer> I'd like to run it behind apache under a subdir, but that <base href="http://localhost:8080"> messes up all the links
_5kg has joined #ocaml
sivoais has quit [Ping timeout: 265 seconds]
chambart has joined #ocaml
sivoais has joined #ocaml
bezirg has joined #ocaml
darkf has quit [Quit: Leaving]
Thooms has joined #ocaml
pootler has joined #ocaml
sivoais has quit [Ping timeout: 264 seconds]
sivoais has joined #ocaml
seanmcl has joined #ocaml
sivoais has quit [Ping timeout: 255 seconds]
sivoais has joined #ocaml
AlexRussia has joined #ocaml
jeroud_ is now known as jeroud
arj has quit [Quit: Leaving.]
arj has joined #ocaml
sivoais has quit [Ping timeout: 264 seconds]
sivoais has joined #ocaml
dsheets has quit [Ping timeout: 255 seconds]
sivoais has quit [Ping timeout: 244 seconds]
sivoais has joined #ocaml
dsheets has joined #ocaml
psy has quit [Remote host closed the connection]
sivoais has quit [Ping timeout: 272 seconds]
sivoais has joined #ocaml
def` has joined #ocaml
larhat has quit [Quit: Leaving.]
sivoais has quit [Ping timeout: 272 seconds]
sivoais has joined #ocaml
<Drup> whitequark: I ... don't understand the joke
<Drup> Unhammer: http://ocsigen.org/js_of_ocaml/2.5/manual/library for an explanation of the syntax extension
AlexRussia has quit [Ping timeout: 264 seconds]
<whitequark> Drup: Elbereth
<Drup> Ok, yeah, normal.
Thooms has quit [Ping timeout: 240 seconds]
<Drup> I don't know (and even like) lotr enough for this kind of jokes.
lordkryss has joined #ocaml
AlexRussia has joined #ocaml
<whitequark> I actually mainly remember it from Nethack.
<whitequark> if you write Elbereth in the dust enough times, monsters will avoid the square with you.
<whitequark> ... that's even more obscure isn't it
<Drup> :D
vogler has quit [Quit: WeeChat 1.0.1]
sivoais has quit [Ping timeout: 250 seconds]
bytbox has joined #ocaml
pgomes has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
sivoais has joined #ocaml
sivoais has quit [Read error: Connection reset by peer]
sivoais has joined #ocaml
<nicoo> whitequark: I approve both references
* nicoo give whitequark The Very Official Nicoo's Seal of Approval
<nicoo> :þ
<_andre> hello
<_andre> is there a way around this error? http://pastebin.com/MQYxeNrW
<_andre> the level type is exactly the same as the Lwt_log.level definition
<flux> _andre, well, they have the same constructors but they are not the same :-)
skchrko has quit [Quit: Leaving]
<_andre> well yeah
<flux> I think the way to go is to define the levels in a separate module and refer to them with, say, type level = LogLevels.t
<flux> you can do type level = LogLevels.t = Debug | Info | .. if you want
badkins has joined #ocaml
<flux> if you want the constructors to be available without opening
<flux> but I'm not certain what you want :)
Thooms has joined #ocaml
dsheets has quit [Ping timeout: 240 seconds]
dsheets has joined #ocaml
<_andre> flux: i'm building a logger module from a functor that takes a module with the log level type and a few logging functions as its argument
kakadu has quit [Quit: Page closed]
<_andre> and i was trying to pass the Lwt_log functions to the functor
struk has quit [Ping timeout: 258 seconds]
ikaros has quit [Quit: Ex-Chat]
<nicoo> _andre: THe issue is that you shouldn't have the type definition in either signatures
<nicoo> just `type log_level` to state that the modules contain that type
<_andre> but then i can't expose the variants
<nicoo> _andre: You can : the module you get by applying the functor will have log_lovel = Lwt_log.log_level
<nicoo> Let me write an example
psy has joined #ocaml
<_andre> yes, but what if i want `level` to be that specific variant type (with the same constructors as Lwt_log.level)?
<_andre> eg. include `val to_string : level -> string` in `S`
<flux> _andre, well, 'type level = Lwt_log.level' instead of plain 'type level' then
<flux> but it will need to be repeated
<flux> you could just leave it completely out and have val to_string : Lwt_log.level -> string instead
<flux> it remains so that if you have type a = A and type b = A, the types a and b are incompatible
<flux> you must have type a = A type b = a
<flux> or: type a = A and type b = a = A
thomasga has quit [Quit: Leaving.]
<_andre> what i'd like to be able to do is to be able to use other loggers (ie, not Lwt_log) as long as the levels type is compatible
slash^ has joined #ocaml
badkins has quit [Ping timeout: 272 seconds]
<flux> you probably need to provide a way to construct adapters
<flux> so your code works as is without caring about Lwt_log
<flux> then you have a module that can convert those levels to Lwt_log levels and vice versa
Thooms has quit [Quit: WeeChat 1.0.1]
zelines has joined #ocaml
ollehar has quit [Ping timeout: 245 seconds]
Guest652 has joined #ocaml
akuhlens has quit [Quit: This computer has gone to sleep]
thomasga has joined #ocaml
kakadu has joined #ocaml
<thomasga> any idea how to define something like: type ('a', 'b) t = 'b Map.Make( type t = 'a) ?
<thomasga> (using first-class modules)
<companion_cube> impossible
<thomasga> sniff
<companion_cube> the problem is lack of higher-ranked types
<companion_cube> otoh, you can wrap operations on the map within a record/object
<def`> thomasga: I don't get what you want
<thomasga> I want to avoid: type 'a step_map = 'a Map.Make(Step).t
<thomasga> is not included in
<thomasga> type 'a step_map = 'a Map.Make(S).t
<thomasga> although S = Step in the typing environment
<thomasga> so I'd like to define a (step, 'a) map instead
<companion_cube> http://vrac.cedeela.fr/truc.ml apparently this compiles!!
nlucaroni has joined #ocaml
<companion_cube> http://vrac.cedeela.fr/foo.html better
<def`> you can pack the map module with the value…
<thomasga> companion_cube: cool, thanks!
<companion_cube> not sure that's what you need
<thomasga> def`: in that case I cannot propagate the type constraint easily
<thomasga> def`: type ('a, 'b) t = (module Map.S with type key = 'a) * 'a M.t
<thomasga> there is no M
kakadu has quit [Quit: Konversation terminated!]
<thomasga> ('b M.t sorry)
cyanure__ has joined #ocaml
<def`> module type MT = sig type k type v module M : Map.S with type key = k val x : v M.t end;;
<def`> type ('a,'b) t = (module MT with type k = 'a and type v = 'b);;
<companion_cube> oh, hi def`
kakadu has joined #ocaml
mcclurmc_ has joined #ocaml
<def`> Good luck manipulating that. And binary operations won't be possible, at least without some equality witnesses.
mcclurmc has quit [Ping timeout: 255 seconds]
<nlucaroni> How would I write a rule for OCamlbuild to run a sedscript on all C files when they copy to the _build directory? or the entire _build/ directory if not possible?
<thomasga> or I will just switch to 4.02 to get module alias, that will solve my typing problem without having to use heavy lifting
choeger_tu has quit [Ping timeout: 264 seconds]
jwatzman|work has joined #ocaml
arj has quit [Ping timeout: 255 seconds]
mcclurmc has joined #ocaml
q66 has joined #ocaml
mcclurmc_ has quit [Ping timeout: 264 seconds]
<def`> thomasga: +1
srcerer has joined #ocaml
yomimono has joined #ocaml
zpe has quit [Remote host closed the connection]
thetabyte has joined #ocaml
MrScout has joined #ocaml
badkins has joined #ocaml
thetabyte has quit [Ping timeout: 240 seconds]
jonludlam has quit [Ping timeout: 240 seconds]
Hannibal_Smith has joined #ocaml
MrWuffles has joined #ocaml
<MrWuffles> Hello everyone! I am trying to understand the following piece of code: let rec expr : expr -> binst list = function
<MrWuffles> Specifically what 'binst' is
<ggole> It's a type name
thomasga has quit [Ping timeout: 265 seconds]
<ggole> At a guess, it's short for b___ instruction, maybe binary
<MrWuffles> Ah that would make sense actually
<MrWuffles> Thank you!
<ggole> MrWuffles: how familiar are you with OCaml syntax?
<MrWuffles> Not very
<ggole> Ah, I'll explain a bit more then
<MrWuffles> I'm having trouble finding where binst is defined
manizzle has quit [Ping timeout: 272 seconds]
<ggole> The : means basically "is the type of", and everything after that but before the = is a type
<ggole> Do you have any open statements prior to this code?
<ggole> If so, it could be in any of those.
<MrWuffles> You mean the definition?
<MrWuffles> That is the first time that appears in the code
<MrWuffles> Oh! Nevermind
<MrWuffles> It was in another file
<MrWuffles> I'm a moron
<MrWuffles> Thank you very much though!
jao has joined #ocaml
jao has quit [Changing host]
jao has joined #ocaml
<ggole> If it was in another file, you should have needed an open to use it unqualified like that
<def`> companion_cube: hello, I won't stay there for long ;)
<ggole> Usually people suggest not using open because of the problem you just had. You can shorten module names and use them locally to make that less annoying.
<MrWuffles> The person who wrote this code is not into readability :P
ygrek has quit [Ping timeout: 256 seconds]
<ggole> :)
jonludlam has joined #ocaml
yomimono has quit [Ping timeout: 264 seconds]
<flux> merlin.. :)
<flux> I wonder if it there could be merlin-directed syntax highlighting
enitiz has quit [Remote host closed the connection]
<def`> flux: right time to ask… There could, but that won't be before a looooong time.
chambart has quit [Ping timeout: 258 seconds]
davine has joined #ocaml
tristero has quit [Ping timeout: 240 seconds]
MrWuffles has quit [Ping timeout: 240 seconds]
pgas has quit [Remote host closed the connection]
<Unhammer> Drup, thanks for the link :)
tani has joined #ocaml
tani is now known as tane
zpe has joined #ocaml
dsheets has quit [Ping timeout: 240 seconds]
thetabyte has joined #ocaml
manizzle has joined #ocaml
zpe has quit [Ping timeout: 245 seconds]
George____ has quit [Ping timeout: 246 seconds]
manizzle has quit [Ping timeout: 256 seconds]
slash^ has quit [Read error: Connection reset by peer]
acieroid has quit [Ping timeout: 240 seconds]
manizzle has joined #ocaml
davine has quit [Ping timeout: 240 seconds]
manizzle has quit [Quit: Leaving]
manizzle has joined #ocaml
bezirg has quit [Ping timeout: 244 seconds]
tristero has joined #ocaml
arj has joined #ocaml
samrat has quit [Quit: Computer has gone to sleep.]
zpe has joined #ocaml
arj has quit [Ping timeout: 272 seconds]
pgomes has joined #ocaml
manud_ has joined #ocaml
ddosia has joined #ocaml
badkins has quit [Read error: Connection reset by peer]
<ddosia> Hello. I have ocaml version 4.01.0, installed via opam. Just did `opam switch 4.02.1` and successfully installed this version, but all my packages are left in previous version. Basically I don't need 4.01.0 version, but want to upgrade. Any advice?
<Drup> opam switch export then import
arj has joined #ocaml
thetabyte has quit [Quit: Leaving.]
thetabyte has joined #ocaml
<ddosia> Drup: thanks!
arj has quit [Ping timeout: 272 seconds]
<ddosia> > merlin.1.5 is not available because it requires OCaml >= 4.00.1 & < 4.02.0. Skipping.
<ddosia> doh :(
Thooms has joined #ocaml
<Drup> yeah, that's the issue with export, it takes the exact version, so it doesn't work all that well
nadako has joined #ocaml
mort___ has quit [Ping timeout: 265 seconds]
<ddosia> ahh, that is fine, did not notice that is bound to precise version
ggole has quit []
<ddosia> do you suggest just to reinstall problematic packages?
def` has quit [Quit: def`]
davine has joined #ocaml
arj has joined #ocaml
Anarchos has joined #ocaml
sooheon has joined #ocaml
Hannibal_Smith has quit [Quit: Sto andando via]
<Drup> yes
arj has quit [Ping timeout: 264 seconds]
mearnsh has quit [Changing host]
mearnsh has joined #ocaml
Anarchos has quit [Quit: Vision[0.9.7-H-20140108]: i've been blurred!]
kakadu has quit [Quit: Konversation terminated!]
zelines has quit [Ping timeout: 255 seconds]
acieroid has joined #ocaml
pierpa` has joined #ocaml
bezirg has joined #ocaml
arj has joined #ocaml
sooheon has quit [Ping timeout: 255 seconds]
sooheon has joined #ocaml
arj has quit [Ping timeout: 244 seconds]
lordkryss has quit [Quit: Connection closed for inactivity]
pootler has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
davine has quit [Quit: Leaving]
sooheon has quit [Remote host closed the connection]
sooheon has joined #ocaml
<nicoo> Drup: I usually do some awk magic on the exported universe file, then xargs opam install < universe.awk
Anarchos has joined #ocaml
govg has quit [Quit: leaving]
ddosia has quit [Quit: Leaving.]
karn09 has joined #ocaml
arj has joined #ocaml
tane has quit [Quit: Verlassend]
arj has quit [Ping timeout: 240 seconds]
struk has joined #ocaml
sooheon has quit [Ping timeout: 272 seconds]
arj has joined #ocaml
thetabyte has quit [Quit: Leaving.]
arj has quit [Ping timeout: 264 seconds]
cyanure__ has quit [Remote host closed the connection]
chambart has joined #ocaml
struk_at_dtut has joined #ocaml
arj has joined #ocaml
pgomes has quit [Quit: Leaving]
struk has quit [Ping timeout: 245 seconds]
arj has quit [Ping timeout: 256 seconds]
<struk_at_dtut> whitequark: regarding using _tags to force ppx_import to be listed first- can you give me an example of that?
pierpa has joined #ocaml
yomimono has joined #ocaml
kanzaros has left #ocaml ["Leaving"]
jonludlam has quit [Ping timeout: 240 seconds]
Anarchos has quit [Quit: Vision[0.9.7-H-20140108]: i've been blurred!]
arj has joined #ocaml
zpe has quit [Remote host closed the connection]
zpe has joined #ocaml
jonludlam has joined #ocaml
jao has quit [Ping timeout: 240 seconds]
arj has quit [Ping timeout: 265 seconds]
jonludlam has quit [Client Quit]
Guest652 has quit [Ping timeout: 256 seconds]
zpe has quit [Ping timeout: 255 seconds]
arj has joined #ocaml
thetabyte has joined #ocaml
arj has quit [Ping timeout: 250 seconds]
maufred has quit [Ping timeout: 272 seconds]
maufred has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 250 seconds]
boogie has joined #ocaml
zelines has joined #ocaml
struktured has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
struktured has joined #ocaml
Thooms has quit [Quit: WeeChat 1.0.1]
jonludlam has joined #ocaml
zpe has joined #ocaml
maufred has quit [Ping timeout: 258 seconds]
maufred has joined #ocaml
arj has joined #ocaml
zpe has quit [Ping timeout: 240 seconds]
karn09 has quit [Quit: Leaving.]
arj has quit [Ping timeout: 245 seconds]
jao has joined #ocaml
jao has quit [Changing host]
jao has joined #ocaml
thetabyte has quit [Quit: Leaving.]
seanmcl has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
arj has joined #ocaml
badon has joined #ocaml
struk_at_dtut has quit [Ping timeout: 258 seconds]
zelines has quit [Ping timeout: 272 seconds]
arj has quit [Ping timeout: 240 seconds]