adrien changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | OCaml 4.00.1 http://bit.ly/UHeZyT | http://www.ocaml.org | Public logs at http://tunes.org/~nef/logs/ocaml/
tac has quit [Ping timeout: 245 seconds]
willb has quit [Ping timeout: 264 seconds]
ivan\ has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
willb has joined #ocaml
ivan\ has joined #ocaml
Playground has joined #ocaml
ousado has quit [Remote host closed the connection]
ousado has joined #ocaml
ousado has quit [Changing host]
ousado has joined #ocaml
ulfdoz_ has joined #ocaml
ulfdoz has quit [Ping timeout: 240 seconds]
ulfdoz_ is now known as ulfdoz
tani has quit [Quit: Verlassend]
hongboz has joined #ocaml
cdidd has joined #ocaml
jamii has quit [Ping timeout: 255 seconds]
myx has quit [Quit: ушёл]
madroach has quit [Ping timeout: 248 seconds]
madroach has joined #ocaml
oriba has quit [Quit: oriba]
eikke has quit [Ping timeout: 252 seconds]
justdit has joined #ocaml
Demitar has quit [Ping timeout: 255 seconds]
tac-tics has joined #ocaml
weie has joined #ocaml
weie has quit [Quit: Leaving...]
justdit has quit [Ping timeout: 244 seconds]
fayden has quit [Ping timeout: 276 seconds]
fayden has joined #ocaml
SuperNoeMan has joined #ocaml
<SuperNoeMan> how do I install utop on mac? https://github.com/diml/utop
<diml> SuperNoeMan: you should try with opam: http://opam.ocamlpro.com/
<SuperNoeMan> It has instructions, but its proving harder than I thought. I wish there was some kind of really easy script
hongboz has quit [Ping timeout: 252 seconds]
<diml> SuperNoeMan: actually i did it last week: port install opam and then opam install utop
<SuperNoeMan> thank you so much
<SuperNoeMan> I knew there had to be an easier way. I really wish that the actual maintainers of utop would just put the opam way on there... gah
<diml> SuperNoeMan: actually i am the author of utop
<diml> yeah, i should probably put the opam way in the README
<diml> doing it now
<SuperNoeMan> wow!
<SuperNoeMan> thank you so much
<SuperNoeMan> I was going to write them an email reqeust :)
<SuperNoeMan> you da boss!
tac-tics has quit [Quit: Page closed]
<diml> it's pushed. I wrote a note at the beginning of the readme
<SuperNoeMan> :) diml
SuperNoeMan has quit [Remote host closed the connection]
Playground has quit [Ping timeout: 245 seconds]
Playground has joined #ocaml
Playground has quit [Client Quit]
braden_ has joined #ocaml
cdidd has quit [Remote host closed the connection]
<braden_> anyone here?
<braden_> *here*
weie has joined #ocaml
braden_ has quit [Quit: Page closed]
fayden has quit [Quit: Bye]
fayden has joined #ocaml
ManAmongHippos has joined #ocaml
fayden has quit [Client Quit]
fayden has joined #ocaml
gour has joined #ocaml
troydm has quit [Ping timeout: 256 seconds]
troydm has joined #ocaml
cdidd has joined #ocaml
Playground has joined #ocaml
ManAmongHippos has quit [Quit: ManAmongHippos]
andreypopp has joined #ocaml
<wmeyer``> hi
Playground has quit [Quit: When I come back, please tell me in what new ways you have decided to be completely wrong.]
<wmeyer``> (morning)
<adrien> moin
<wmeyer``> is the ocamlbuild stopping you at the moment?
<wmeyer``> we need to think about cross compilation story for ocamlbuild anyway
<adrien> I've been a bit low on free time this week
<adrien> I had to skip ocamlbuild
<wmeyer``> yeah, me too
<adrien> anyway it's not required
<wmeyer``> Ok, feel free to raise tickets anyway
<adrien> build the cross-compiler requires: ocamlc, ocamlopt, ocamlmklib
<adrien> cross-compiling a native compiler will require: ocamldoc, ocamlbuild, camlp4, ocamllex, ...
<wmeyer``> but building packages requires ocamlbuild to understand that your target is different than host
<adrien> the biggest issue is that -custom seems undoable
<adrien> -custom requires to dlopen() the libraries you link against in order to find primitives; obviously you're not going to dlopen() a .dll file on linux
<wmeyer``> there might be other way to find the primitives
<adrien> wmeyer``: it needs to pick up the right compiler but that should be easily doable with ocamlfind
<adrien> about -custom, probably, we could skip it and simply not use it
<wmeyer``> I'm keen on seein the toolchain being cross compilation aware.
<adrien> it's used because windows doesn't grok shebangs...
<adrien> hmm, ocamlbuild is going to need to know it's doing cross because it needs to know whiich files are being created
<adrien> but for windows that could be solved by ocamlbuild seeing that ".exe" means "expect .dll files"
<adrien> and for others the extensions shouldn't change
<adrien> but actually, there is no choice: ocamlbuild has to support cross-compilation
<adrien> if it tries to build myocamlbuild.ml with the cross-compiler, it won't work
<adrien> I'd prefer to have a command-line switch for that: it makes it possible to reuse the ocamlbuild from your native installation
cdidd has quit [Remote host closed the connection]
Playground has joined #ocaml
cdidd has joined #ocaml
dwmw2_gone is now known as dwmw2_LHR
dwmw2_LHR has quit [Excess Flood]
dwmw2_gone has joined #ocaml
dwmw2_gone is now known as dwmw2_LHR
<wmeyer``> adrien: we can work it out
<wmeyer``> but there are other priorities, I'll raise mantis tickets for this chunk
<adrien> I think the main outstanding issue currently is that it doesn't pick the proper ASM generator (it uses the host's); I hope to have working native binaries right after solving that
<wmeyer``> yes, the current configuration is bolted to config, it picks the code generator from the target directory, and becasuse of bootstrapping it picks always from the same
andreypopp has quit [Quit: sleep]
Yoric has joined #ocaml
rwmjones has quit [Ping timeout: 276 seconds]
Submarine__ has joined #ocaml
rwmjones has joined #ocaml
andreypopp has joined #ocaml
cyball has quit [Quit: Leaving.]
Simn has joined #ocaml
RagingDave has joined #ocaml
Yoric has quit [Remote host closed the connection]
Yoric has joined #ocaml
invariant has joined #ocaml
<invariant> Is there any way to install multiple OCaml compilers in parallel (in time) with opam?
<invariant> I am thinking that it should be possible if multiple user accounts would be used.
<orbitz> I don't think it currently supports it
mcclurmc has joined #ocaml
gour has quit [Disconnected by services]
gour_ has joined #ocaml
ontologiae has joined #ocaml
<wmeyer``> invariant: you can change the root via --root option and then use normal shell & operator to spawn two opam process at the same time
<invariant> wmeyer``, odd that this isn't the default then.
<wmeyer``> invariant: AFAIK, opam relies on a state in the root and locks, to ensure consistency. It's not odd.
wmeyer`` is now known as wmeyer
<invariant> wmeyer``, with multiple roots, there is no issue when installing multiple compilers.
<invariant> wmeyer, all of them will have their own lock.
<invariant> wmeyer, still, there is no reason for having locks with freely available databases.
ManAmongHippos has joined #ocaml
<wmeyer> invariant: well, it's still a single line shell command.
<wmeyer> invariant: i got your point that for each toolchain opam could maintain separate root. In practice however --root is used rarely
Cyanure has joined #ocaml
q66 has joined #ocaml
dwmw2_LHR is now known as dwmw2_gone
Yoric has quit [Ping timeout: 246 seconds]
ontologiae has quit [Ping timeout: 256 seconds]
ManAmongHippos has quit [Quit: ManAmongHippos]
jamii has joined #ocaml
justdit has joined #ocaml
justdit has quit [Read error: No route to host]
jamii has quit [Ping timeout: 252 seconds]
ontologiae has joined #ocaml
jamii has joined #ocaml
Yoric has joined #ocaml
eikke has joined #ocaml
tane has joined #ocaml
<invariant> ocamldoc complains with "Bad magic number for this ocamldoc dump" for the 4.00.1+annot compiler.
<invariant> Where does ocamldoc search and doesn't opam modify that information?
eikke has quit [Ping timeout: 252 seconds]
eikke has joined #ocaml
emmanuelux has quit [Ping timeout: 244 seconds]
pippijn has quit [Quit: qq]
pippijn has joined #ocaml
pippijn has quit [Changing host]
pippijn has joined #ocaml
emmanuelux has joined #ocaml
andreypopp has quit [Quit: sleep]
weie_ has joined #ocaml
weie has quit [Ping timeout: 255 seconds]
RagingDave has quit [Quit: Ex-Chat]
Submarine__ has quit [Ping timeout: 248 seconds]
Submarine__ has joined #ocaml
Demitar has joined #ocaml
justdit has joined #ocaml
tac has joined #ocaml
justdit has quit [Ping timeout: 248 seconds]
Demitar has quit [Quit: No Ping reply in 180 seconds.]
Demitar has joined #ocaml
tac has quit [Ping timeout: 245 seconds]
cdidd has quit [Remote host closed the connection]
Snark_ has joined #ocaml
Playground has quit [Ping timeout: 248 seconds]
Demitar has quit [Remote host closed the connection]
Submarine__ is now known as Submarine
Submarine has quit [Changing host]
Submarine has joined #ocaml
ulfdoz has quit [Quit: kernel-update]
<flux> has anyone worked on erlang-like concurrency for ocaml? that is, threads could pass messages by copying (or passing pointers if it can be guaranteed that the pointer is invalid or not used in the sending end after that), and each thread would have their own garbage collector?
<flux> so the task would be "put n ocaml threads into same address space, have them use their own gcs"
<flux> in principle I suppose it's not a lot different from having OS processes, but I suppose using threads is lighter
<orbitz> I think the VM would haveto change dramatically
<orbitz> I knwo some people are working on doing this for Erlang, but it would be closer to a scheduler in erlang than a process
<orbitz> since every one is still quite heavy (a whole VM perthread)
ulfdoz has joined #ocaml
eikke has quit [Ping timeout: 248 seconds]
<Qrntz> flux, JoCaml
iZsh has quit [Quit: Coyote finally caught me]
<Qrntz> that's the closest it gets AFAIK
ftrvxmtrx has quit [Quit: Leaving]
iZsh has joined #ocaml
Playground has joined #ocaml
<adrien> flux: have you seen ocamlnet's stuff?
gour_ is now known as gour
peoppenheimer has quit [Quit: peoppenheimer]
justdit has joined #ocaml
invariant has quit [Quit: ZNC - http://znc.in]
invariant has joined #ocaml
justdit has quit [Read error: Connection reset by peer]
Enjolras has quit [Ping timeout: 255 seconds]
pkrnj has joined #ocaml
<invariant> Does the debugger only work on bytecode?
<adrien> % ocamldebug $(which ocamlopt.opt) Objective Caml Debugger version 3.12.1
<adrien> (ocd) r
<adrien> Loading program... /opt/ocaml/bin/ocamlopt.opt is not a bytecode file.
<adrien> yes
<adrien> gdb works for native code
<adrien> not incredibly nice but there is stuff you can find to make it better
andreypopp has joined #ocaml
<invariant> The program is running. Quit anyway ? (y or n) Garbage data from process 9857
<invariant> That's the only information I get from running ocamldebug thebytecode
weie has joined #ocaml
<invariant> I have absolutely no idea what is it trying to say and why when it does that.
<invariant> I also have no idea why anyone would write a program like that in the first place.
<adrien> did you check the manual?
<invariant> I don't see why 'run
<invariant> ' wouldn't be sufficient.
<invariant> I also don't see why there would be any reason to make it return anything else than gdb.
<invariant> According to the manual, run is valid.
<invariant> The manual does not contain the string The program is running
<invariant> As such, I would say there is both a tool failure and a documentation failure here.
weie_ has quit [Ping timeout: 252 seconds]
emmanuelux has quit [Ping timeout: 248 seconds]
mcsquiggedy_ has joined #ocaml
areece has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
areece has joined #ocaml
<invariant> adrien, am I saying something ridiculous or do you agree?
<adrien> I don't know; I rarely use the debugger
<adrien> it works here; are you sure you're not mixing tools and binaries from different versions of ocaml?
<invariant> Both point at same prefix tools.
<invariant> Both being compiler and debugger.
mcsquiggedy_ is now known as mcsquiggedy
<wmeyer> invariant: please report ocamldebug problems here: http://caml.inria.fr/mantis/my_view_page.php . Thanks!
emmanuelux has joined #ocaml
<wmeyer> invariant: in most cases I don't use debugger too, but there is some complicated code with side effects that is known to be debugged under ocamldebug.
<wmeyer> invariant: and yes, ocamldebug works only with bytecode
Snark_ has quit [Quit: Quitte]
<invariant> wmeyer, what does this mean? No source file for Str.
Nahra has joined #ocaml
Nahra has quit [Changing host]
Nahra has joined #ocaml
<invariant> wmeyer, in this case two different kinds of outputs are mixed and as such it's hard to see what comes from the debugger and what comes from the program being debugged.
<wmeyer> invariant: I'd love to see your problem described in the bug tracker
<wmeyer> invariant: I hope it gives you some hint. Otherwise gdb and ocaml is getting more and more mature to be able to debug ocaml codes. Please see the branch in svn
<invariant> wmeyer, yes, you are not interested in hearing issues via IRC.
<invariant> wmeyer, I think it's just a matter that the tools cannot handle native code.
<invariant> wmeyer, or perhaps I should say foreign code.
<invariant> wmeyer, so, all state is lost when you hit the buggy code.
<invariant> A proper debugger would happily continue running in such a case.
<wmeyer> invariant: no, I am not, because it will get lost in few hours. We are really interested in professional support from users. If there is a problem, even if it's a user problem, the development teram is very happy to see it reported.
Anarchos has joined #ocaml
<wmeyer> invariant: this and perhaps other problems
invariant has left #ocaml []
gustav__ has quit [Read error: Connection reset by peer]
invariant has joined #ocaml
gustav__ has joined #ocaml
<avsm> shinwell is working on native code debugging via gdb. the demo is quite awesome… http://www.cl.cam.ac.uk/projects/ocamllabs/projects/gdbdwarf.html
Playground has quit [Quit: When I come back, please tell me in what new ways you have decided to be completely wrong.]
<invariant> Why is there such a great interest in OCaml from the Horizon's institute?
<invariant> Who is paying for all of that in the end? British tax payers?
<wmeyer> avsm: thanks for the link
<invariant> Apparently Jane Street funds that project.
weie has quit [Quit: Leaving...]
Submarine has quit [Remote host closed the connection]
<invariant> How can a compiler installed with a prefix named myprefix be integrated with opam?
<invariant> It would be really convenient if a symbolic link was enough to make it work.
gour has quit [Quit: WeeChat 0.3.8]
braden_ has joined #ocaml
<invariant> I seem to have gotten it to work.
ftrvxmtrx has joined #ocaml
Cyanure has quit [Remote host closed the connection]
jamii has quit [Read error: Connection reset by peer]
bitbckt has quit [Quit: out]
cross has quit [Ping timeout: 240 seconds]
bitbckt has joined #ocaml
bitbckt has quit [Changing host]
bitbckt has joined #ocaml
cross has joined #ocaml
<Reventlov> hello
<Reventlov> how to specify the maximum number of line of toplevel output to print ?
<Reventlov> I found set_print_length but this is only for camllight
<Anarchos> Reventlov no idea, Giskard
<Reventlov> Or, is there a function to print whole array ?
<Reventlov> I found nothing in man Array
Anarchos has quit [Quit: Vision[0.9.7-H-090423]: i've been blurred!]
SuperNoeMan has joined #ocaml
<Qrntz> see #print_depth, #print_length
<SuperNoeMan> in C/C++, doing cout << "\""
<SuperNoeMan> prints a single "
<SuperNoeMan> I want to concatenate a single " with the rest of a string
<SuperNoeMan> so, I think "\"" ^ my_string
<SuperNoeMan> but that prints the \ with it. I don't want that.
<SuperNoeMan> how do I get a single "?
<Qrntz> SuperNoeMan, the toplevel echoes string values escaped
<Qrntz> # print_endline ("\"" ^ "foo") ;;
<Qrntz> "foo
<Qrntz> - : unit = ()
<Qrntz> it won't be there when you print or otherwise use it
<SuperNoeMan> Qrntz: thanks much
<Qrntz> np
<Reventlov> Qrntz: hey
<Reventlov> this is "old"
<invariant> I thought I had it working, since opam didn't complain, but that was just because it completely wasn't working. Now it is only half broken. Is there something like an opam manual for adding new compilers?
<Reventlov> "old-311"
<Qrntz> Reventlov, so?
<Reventlov> this is not a problem ?
<invariant> It is ->recommanded<- WRONG that you add eval `opam config env` in the configuration file of your shell (most likely ~/.bashrc or ~/.profile).
<invariant> rm -rf $(dirname $(opam config var prefix)) MY EYES
xavierm02 has joined #ocaml
<xavierm02> hey
<xavierm02> in batteries
<xavierm02> external of_int : int -> int = "%identity"
<xavierm02> external to_int : int -> int = "%identity"
<xavierm02> I don't get the point of this code >_<
<Reventlov> ty
<Qrntz> Reventlov, I linked you to the latest manual too, which has the same description for both of these
<Qrntz> xavierm02, it does exactly what it's supposed to
<Qrntz> I guess it's a convention in Batteries to have {of,to}_int functions in numeric modules
<invariant> The supposedly advanced usage of opam is not advanced enough for me.
<invariant> I do see one way to work around the problem, which is by compiling opam itself with the dwarf compiler which will make it the system compiler.
<invariant> Still, that's a hack and an option to opam switch to an arbitrary directory containing a ocaml compiler build should work.
<invariant> I don't quite get the design where a compiler is being built and installed as a mandatory side-effect of opam.
<invariant> That's just conflating two different steps into one.
<invariant> Not a problem if it's there just for convenience, but not if the primitive elements are not exported.
nimred has joined #ocaml
nimred has quit [Changing host]
nimred has joined #ocaml
pkrnj has quit [Quit: Computer has gone to sleep.]
Nahra has quit [Quit: leaving]
xavierm02 has quit [Quit: Leaving]
Playground has joined #ocaml
RagingDave has joined #ocaml
leoncamel has quit [Ping timeout: 255 seconds]
<SuperNoeMan> Hey, I'm working on an ocaml function that I want to have some properties
<SuperNoeMan> I want to convert my definition of a rexp type (regular expression type)
<SuperNoeMan> to a string
<SuperNoeMan> here's this...
<SuperNoeMan> actually, look at this instead: https://gist.github.com/787dcf0042d81abd1a12
cyball has joined #ocaml
Yoric has quit [Ping timeout: 252 seconds]
RagingDave has quit [Read error: Operation timed out]
RagingDave has joined #ocaml
<SuperNoeMan> nevermind I found the answer
<ousado> SuperNoeMan: to which question?
<SuperNoeMan> I was getting an error
<ousado> ah
<SuperNoeMan> or how to solve the problem to the error was getting. That's what I should have said
<SuperNoeMan> sorry, I'm in a rush with some friends. I know how it feels when someone comes with halfway defined questions and they expect others to be able to help
<ousado> easy
<SuperNoeMan> I can't figure out how to use the debugger to help solve my problem
<SuperNoeMan> do I just do let main = ... in order to have main executed when my program is executed?
cyball has quit [Ping timeout: 255 seconds]
<SuperNoeMan> whenever I do ocamldebug myprog
<SuperNoeMan> and I try to break main
<SuperNoeMan> I get an error
<SuperNoeMan> Unbound identifier main
<SuperNoeMan> I don't know why... how do I simply debug this like I would gdb? I compiled it with -g. Load the program, break main and then step through execution...
<SuperNoeMan> also, trace my_func isn't tracing it, it's just saying Error: Unbound value trace
<Qrntz> 01:13:14 < SuperNoeMan> do I just do let main = ... in order to have main executed when my program is executed?
<Qrntz> no.
<Qrntz> you use «let () = …»
<SuperNoeMan> ah ok
<Qrntz> that's going to be the entry point
<Qrntz> also
<Qrntz> 01:23:25 < SuperNoeMan> also, trace my_func isn't tracing it, it's just saying Error: Unbound value trace
<Qrntz> if that's in the toplevel, then the directive is «#trace»
<Qrntz> not «trace» which would be a value's name
mcsquiggedy has quit [Remote host closed the connection]
<SuperNoeMan> Qrntz: wow you are awesome thanks!
<Qrntz> you're welcome
<SuperNoeMan> very simple tips to someone that is new
<SuperNoeMan> one more question about how to access functions within functions
<SuperNoeMan> if I'm going to trace my_func and my_func contains code within it like let sub_func ... in
<SuperNoeMan> how do I trace sub_func?
<SuperNoeMan> Qrntz:
<Qrntz> AFAIK, you don't
<Qrntz> you can only trace the functions in scope
<SuperNoeMan> aww...
<Qrntz> so define it at the top level
<SuperNoeMan> gah
<Qrntz> for tracing purposes
pkrnj has joined #ocaml
<SuperNoeMan> ok thanks
Simn has quit []
yroeht has joined #ocaml
RagingDave has quit [Quit: Ex-Chat]
ski has quit [Ping timeout: 252 seconds]