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/
chambart has quit [Ping timeout: 248 seconds]
leoncamel has joined #ocaml
thomasga has quit [Quit: Leaving.]
q66 has quit [Quit: Quit]
Playground has quit [Quit: When I come back, please tell me in what new ways you have decided to be completely wrong.]
ulfdoz_ has joined #ocaml
TDJACR has joined #ocaml
ulfdoz has quit [Ping timeout: 264 seconds]
ulfdoz_ is now known as ulfdoz
TDJACR has quit [Client Quit]
TDJACR has joined #ocaml
madroach has quit [Ping timeout: 248 seconds]
madroach has joined #ocaml
doomrobo has quit [Quit: Leaving]
pkrnj has quit [Quit: Textual IRC Client: www.textualapp.com]
leoncamel has quit [Ping timeout: 252 seconds]
leoncamel has joined #ocaml
leoncamel has quit [Ping timeout: 240 seconds]
Playground has joined #ocaml
pkrnj has joined #ocaml
Playground has quit [Quit: When I come back, please tell me in what new ways you have decided to be completely wrong.]
Playground has joined #ocaml
weie has joined #ocaml
cdidd has quit [Ping timeout: 264 seconds]
_tca has joined #ocaml
weie_ has joined #ocaml
weie has quit [Ping timeout: 246 seconds]
justdit has joined #ocaml
sw2wolf has joined #ocaml
Playground has quit [Ping timeout: 255 seconds]
Yoric has joined #ocaml
Playground has joined #ocaml
pkrnj has quit [Quit: Computer has gone to sleep.]
justdit has quit [Quit: Lost terminal]
pkrnj has joined #ocaml
pkrnj has quit [Client Quit]
Playground has quit [Quit: When I come back, please tell me in what new ways you have decided to be completely wrong.]
Playground has joined #ocaml
fayden has quit [Ping timeout: 246 seconds]
adotbrown has joined #ocaml
_tca has quit [Remote host closed the connection]
gour has joined #ocaml
Cyanure has joined #ocaml
Playground has quit [Read error: No route to host]
Yoric has quit [Remote host closed the connection]
Yoric has joined #ocaml
Playground has joined #ocaml
Playground has quit [Ping timeout: 240 seconds]
Playground has joined #ocaml
emmanuelux has joined #ocaml
adotbrown has quit [Ping timeout: 265 seconds]
Playground is now known as lolcathost
lolcathost has quit [Ping timeout: 264 seconds]
sw2wolf has left #ocaml []
thomasga has joined #ocaml
leoncamel has joined #ocaml
adotbrown has joined #ocaml
Playground has joined #ocaml
astertronistic has joined #ocaml
gour has quit [Disconnected by services]
gour_ has joined #ocaml
thomasga has quit [Quit: Leaving.]
fusillia has joined #ocaml
fayden has joined #ocaml
xavierm02 has joined #ocaml
adotbrown has quit [Ping timeout: 255 seconds]
Snark has joined #ocaml
ontologiae has joined #ocaml
philed has joined #ocaml
philed has quit [Client Quit]
philed has joined #ocaml
mye has joined #ocaml
Cyanure has quit [Ping timeout: 248 seconds]
justdit has joined #ocaml
justdit has quit [Read error: Connection reset by peer]
justdit has joined #ocaml
leoncamel has quit [Ping timeout: 246 seconds]
weie_ has quit [Quit: Leaving...]
q66 has joined #ocaml
philed has quit [Read error: Connection reset by peer]
Zerker has joined #ocaml
Submarine has joined #ocaml
Zerker has quit [Quit: Colloquy for iPad - Timeout (10 minutes)]
weie has joined #ocaml
ontologiae has quit [Ping timeout: 240 seconds]
tane has joined #ocaml
RagingDave has joined #ocaml
justdit has quit [Quit: Lost terminal]
mye has quit [Ping timeout: 248 seconds]
leoncamel has joined #ocaml
mye has joined #ocaml
cdidd has joined #ocaml
zip has left #ocaml []
leoncamel has quit [Ping timeout: 244 seconds]
elixey has quit [Remote host closed the connection]
elixey has joined #ocaml
Playground has quit [Quit: When I come back, please tell me in what new ways you have decided to be completely wrong.]
Playground has joined #ocaml
osa1 has joined #ocaml
<osa1> is there a way to generate mydatatype -> string functions automagically ? (like Haskell's auto-generation of Show instance)
<mehdid> (The webpage is gone though)
RagingDave_ has joined #ocaml
adotbrown has joined #ocaml
RagingDave has quit [Ping timeout: 260 seconds]
ontologiae has joined #ocaml
adotbrown has quit [Ping timeout: 265 seconds]
<osa1> mehdid: thanks, but I can't compile that program
<osa1> Error: Unbound module MLast
<orbitz> osa1: in Core you do type t = balh blah with sexp and then that makes a functio sexp_of_t that you can print
<osa1> I don't unse Core, does batteries have an alternative to that ?
<orbitz> I don't know
<osa1> seems like it's a problem related with camlp4
<orbitz> your MLast one or in general?
<orbitz> the Core approach uses camlp4 to generat the functions
<osa1> MLast one
chambart has joined #ocaml
<orbitz> Ah, simple Core code if you do switch demonstrating https://github.com/orbitz/opass/blob/master/lib/db/db.ml
<flux> sexplib is a standalone package that does exactly that? maybe core uses it?
<orbitz> oh that's true, i just always associate it with core
<orbitz> yes you can install sexplib on yoru own. opam install sexplib
<osa1> great, now how can I use it ? seems like it doesn't have a documentation
<orbitz> use it like i did and compile with -package sexplib and -syntax sexplib.syntax i think
<orbitz> ops no
<orbitz> -package core,sexplib,sexplib.syntax -syntax camlp4o is how i compile that
<orbitz> so just remove the core
<thelema> osa1: batteries provides printing functions that make it much easier to create print functions, nothing automatic
<thelema> i.e. List.print (Tuple2.print Int.print String.print) stdout [(1,"xy");(2,"yz")]
RagingDave_ has quit [Quit: Ex-Chat]
<fasta> What's an easy way to reuse code in OCaml for use in _oasis projects? For example, with shell code you can use the source command and there is a very low barrier to make a library.
<fasta> With OCaml I have the impression you actually need to create a bunch of functions before it is worth the effort.
<fasta> As a result my OCaml utility programs are programs, not libraries.
<orbitz> fasta: I make libraries out of most everything
<orbitz> fasta: my ocaml projects are a collection of ocamlfind-enabld dirs, and I compile them as if they wer eany other library. Pushing them out on their own is easy if I decide to doso
leoncamel has joined #ocaml
<fasta> orbitz: ok, so you add some directories to some environment variable and it magically works?
<orbitz> yes
<orbitz> OCAMLPATH
<orbitz> or if you use ocamlbuild -I dir I think
<fasta> orbitz: does that also work with opam, etc.?
<orbitz> fasta: Opam just executes your build script, my build script establiseh teh paths
<orbitz> it's not very ocamly, but it's how I like it
<orbitz> but opass in opam uses the ocamlbuild trick with -I
<fasta> orbitz: I mean: doesn't setting OCAMLPATH interfere with opam?
<orbitz> No, why would it?
<fasta> orbitz: I don't know.
<orbitz> fasta: I append (or prepend) to OCAMLPATH, so whatever is there is still there
<fasta> orbitz: ok, so for extreme convenience you could just append everything you ever created.
<fasta> And then by the time something has really grown package it up more properly.
<fasta> Does OCAMLPATH override the standard locations?
<fasta> Or does it only add to it?
<fasta> Really annoying that searchengines throw away case.
<fasta> We have 100 times cheaper storage, but still no uppercase search.
<fasta> This variable may contain an additional search path for package directories. It is treated as if the directories were prepended to the configuration variable path.
<fasta> Thanks, author of man 5 findlib.conf
<fasta> orbitz: and does oasis or ocamlbuild not reset OCAMLPATH to be more 'pure' or something like that?
<orbitz> fasta: if you use ocamlbuild, you use -I to specify the path containing your lbraries, so no OCAMLPATH
<fasta> Ok, so ocaml -I /ad/asdas/dir1 -I /dasdsa/asdas/dir2 setup.ml -build (etc.)
lopex has quit [Quit: Planned maintenance, back soon]
bobry has quit [Quit: Planned maintenance, back soon]
lopex has joined #ocaml
chambart has quit [Ping timeout: 246 seconds]
milosn has quit [Ping timeout: 276 seconds]
ccasin has quit [Ping timeout: 245 seconds]
<osa1> orbitz: ocamlfind ocamlc -package sexplib,sexplib.syntax -syntax camlp4o sexptest.ml doesn't work for compiling files with sexplib
<osa1> Error: Unbound value int_of_sexp
<osa1> and I think that function is in core
<osa1> so sexplib is actually dependent on core
<orbitz> int_of_sexp wouldn't be a core file
<orbitz> no sexplib is not dependent on core AFAIK
<orbitz> it's a dpeendency of core
<osa1> ok so how can I use it
<orbitz> core function i mean*
<orbitz> what is sexptest.ml? did you install via opam?
<osa1> cat sexptest.ml > type test = Test of int | Test2 of string with sexp
<osa1> sexptest.ml is input file
<adrien> open Sexp
<adrien> dot something
<adrien> open Sexplib.Conv / open Sexplib.Sexp
<adrien> I think Conv holds the value your after
<adrien> and Sexp holds the from/to string function
<adrien> s
<adrien> osa1: ^
<adrien> -linkpkg
<orbitz> yeah linkpkg
<adrien> as for the warning it's probably because you have to installations of sexplib
<osa1> what does linkpkg do
<orbitz> it links the packages
<osa1> do we have documentations for sexplib ?
<fasta> What causes this? Fatal error: unknown C primitive `lwt_libev_init'
<fasta> It's an opam created version.
<orbitz> do you have libev installed (just a guess)
<osa1> ok now if I want to print a data type I just 'print_stirng (string_of_sexp (sexp_of_mydatatype ...))' right ?
<fasta> I have libev-dev installed and libev4.
<orbitz> fasta: i don't know
<osa1> and how can I load sexplib in toplevel ?
<adrien> #use "topfind";;
<adrien> #require "sexplib";;
<adrien> #require "sexplib.syntax";;
<fasta> opam builds lwt with ./configure --disable-libev
<fasta> What do I need to do such that it builds it in the right way?
osa1 has quit [Ping timeout: 240 seconds]
osa1 has joined #ocaml
<fasta> The plot thickens. If I unpack lwt*.tar.gz, and configure it, I do get libev :/
<fasta> In the same shell
<fasta> So, opam likely has some configuration somewhere that it disables it, but why would it do that?
ttamttam has joined #ocaml
ttamttam has quit [Client Quit]
milosn has joined #ocaml
mattrepl has joined #ocaml
elixey has quit [Remote host closed the connection]
elixey has joined #ocaml
lopex_ has joined #ocaml
bobry has joined #ocaml
<osa1> and how can I tell ocamlbuild to use sexplib parser ?
lopex has quit []
lopex_ is now known as lopex
ben_zen has quit [Ping timeout: 240 seconds]
lopex is now known as Guest15662
Guest15662 has quit []
Guest15662 has joined #ocaml
Guest15662 has quit [Client Quit]
mattrepl has quit [Quit: mattrepl]
<osa1> is there a way to #use multiple files ? my ocamlop can't find a module that is in same folder with file I'm #using
<adrien> compiling foo.ml to foo.cm* defines a module "Foo"
<adrien> #use doesn't do that
<adrien> #use is like copy-pasting
* orbitz never usees #use beyond topfind
lopexx has joined #ocaml
lopexx has quit [Client Quit]
ben_zen has joined #ocaml
lopex has joined #ocaml
lopex has quit [Client Quit]
lopex has joined #ocaml
<mfp> fasta: IIRC you have to install conf-libev via OPAM (and also IIRC it would re-compile lwt as needed automatically)
wmeyer has joined #ocaml
Cyanure has joined #ocaml
<fasta> mfp: what a horrible system that it works like that.
<fasta> mfp: thanks for the help
<fasta> A more 'proper
<fasta> ' system would allow all possible library versions to be installed without conflict.
<mfp> np
<fasta> orbitz: how did your Nix experiments go?
<orbitz> Fine. I have the Core Suite installed via it
<fasta> orbitz: do you run the OS or just the prefix?
<orbitz> OS on a VM
<fasta> orbitz: and where are your real development tools (on your real OS)?
<mfp> fasta: I guess OPAM's ability to have multiple "OCaml environments" (and to clone an existing one) installed at once and to switch easily is meant to address that
<osa1> after compiling my sources to multiple .cmo files, how can I load them in toplevel ?
<fasta> mfp: yes, but that quickly becomes unmanageable.
<fasta> mfp: exponential blowups for example.
<mfp> I can picture that
<Armael> osa1: you can #load "your.cmo" iirc
<orbitz> fasta: what do you mean?
<mfp> how do you specify which "lib combination" you want to link against in Nix?
<fasta> orbitz: I assume that in the end you want to run a program on your real OS, not on the VM.
<orbitz> mfp: you have to define a package nme based on thecombination
<fasta> orbitz: and regarding my earlier comment, I meant tools like an editor, etc.
<orbitz> fasta: nope, generally no
<orbitz> i edit remotely
<fasta> orbitz: because there is some fast server on which you compile?
<orbitz> no i just dont't write softwar that needs to be run on my local machine
<fasta> orbitz: ok, so how do you deploy now with nix?
<fasta> orbitz: do you use those makedeb targets, etc.?
<orbitz> The stuff I write is all for personal consumption so ther eis no real deploy step
<fasta> orbitz: so, you run it on the VM then?
<fasta> orbitz: i.e. the programs you are interested in.
<orbitz> Although every lib I depend on exists in opam, so leaving my little environment isn't much more than either installing them via opam and compiling my package or adding my package to nix
<orbitz> fasta: yep
<orbitz> seems to work well so far
<fasta> orbitz: yeah, I suppose with the right hardware it's not really noticable.
<orbitz> All the sfotware I write has been compilable on a 500meg NixOS VM without issue
<orbitz> fasta: but like I said, my Nix packages is really just mirror what I want from Opam, so not much of a big deal
<fasta> I see opam as an inferior tool which just has gotten more traction.
<orbitz> inferior to what?
<fasta> It's the same thing with 'popular' programming languages.
<fasta> orbitz: nix.
<orbitz> They are not attacking the same problem
<fasta> orbitz: nix is a superset of opam, unless I don't understand opam.
<orbitz> fasta: Almost. The main distinction is that opam can't install all of its dpendenceis
<orbitz> so it's an incomplete univers
<orbitz> but it's also meant to integrate with other peoples package management
<fasta> orbitz: yes, that's true, but long term that's just a bad idea.
<fasta> In the short-term it's something that 'works'.
<orbitz> maybe
<orbitz> from an ocaml perspective it makes signfiicantly more sense
<fasta> How so?
<orbitz> because a lot less people are goingto adop an entirely new package manager to use your language than are going to install a little program that manages its own ocaml packages
RagingDave has joined #ocaml
<fasta> Technically one could build a compiler which would take opam input and translate it to nix.
<fasta> It could even potentially build the packages in the exact same way.
<fasta> (even the native C ones)
<fasta> (At least when they are distribution packages_
leoncamel has quit [Ping timeout: 264 seconds]
<fasta> Now, that would probably go quite far, but it's not impossible.
leoncamel has joined #ocaml
ontologiae has quit [Ping timeout: 252 seconds]
<orbitz> fasta: yes i'll probaly write opam->nix eventually
<orbitz> fasta: i dont' think opam contains dep informtio nfor non-ocaml deps
<thelema> orbitz: from what I see, opam integrates with other peoples package management very poorly
<avsm> hm? OPAM is a source-based package manager
<avsm> it's not meant to integrate with other people's package managers. That's why it keeps everything in its own area
<avsm> (for things like compiler switches, custom pins, and so forth. It's for development)
<thelema> exactly
ttamttam has joined #ocaml
<avsm> so does anyone actually use Nix regularly here (aside from fasta's useless rant)
<avsm> i used Nix for some time after reading their excellent paper on NixOS, but the constraints weren't quite powerful enough for ocaml
<orbitz> avsm: I run NixOS on a VM
<orbitz> I like it, but you have to be pretty hands on with it (which is good for me, bad for my grandmother)
<orbitz> I find it significantly easier to do experiments with than othe rpackage managers, it's trivial to go backto a pre-experiment state
<avsm> orbitz: it seems ideal for cloud-y image construction indeed. I'll take it for a drive again soon, thanks!
<wmeyer> orbitz: the question the practical value - I found simple apt is most of the time good - so Nix is maybe step forward from the perspective of adding/developing new packages
<orbitz> avsm: yeah def. There is also a chef/puppet thing built on top called Charon i think, I haven't used it
<orbitz> I've always found apt difficult to reason about
<orbitz> but nix comes with its own host of issues
* orbitz shrugs
<wmeyer> I'd like to try Nix
<avsm> the NixOS paper is quite nice; they covered a lot of the UNIX-specific problems they encountered
ttamttam has quit [Quit: ttamttam]
<Armael> do you have a link to this paper ?
<Armael> thanks
mye has quit [Ping timeout: 248 seconds]
<avsm> jfp paper is most complete; http://nixos.org/~eelco/pubs/nixos-jfp-final.pdf
justdit has joined #ocaml
hto has joined #ocaml
wormphlegm has quit [Ping timeout: 240 seconds]
wormphlegm has joined #ocaml
mye has joined #ocaml
iZsh has quit [Quit: Coyote finally caught me]
Playground has quit [Ping timeout: 256 seconds]
iZsh has joined #ocaml
mye has quit [Ping timeout: 264 seconds]
justdit has quit [Ping timeout: 240 seconds]
mye has joined #ocaml
slash^ has joined #ocaml
slash^ has left #ocaml []
Demitar has quit [Ping timeout: 265 seconds]
justdit has joined #ocaml
Playground has joined #ocaml
hongboz has joined #ocaml
hongboz has quit [Remote host closed the connection]
pygmalion has joined #ocaml
hongboz has joined #ocaml
gour_ has quit [Remote host closed the connection]
gour has joined #ocaml
Anarchos has joined #ocaml
Demitar has joined #ocaml
lolcathost has joined #ocaml
Playground has quit [Read error: Connection reset by peer]
Yoric has quit [Quit: Instantbird 1.4a1pre -- http://www.instantbird.com]
Yoric has joined #ocaml
justdit has quit [Ping timeout: 252 seconds]
lolcathost has quit [Ping timeout: 276 seconds]
ematsen has joined #ocaml
Playground has joined #ocaml
osa1 has quit [Ping timeout: 252 seconds]
cdidd has quit [Remote host closed the connection]
<emias> n
cdidd has joined #ocaml
cdidd has quit [Read error: Connection reset by peer]
cdidd has joined #ocaml
jamii has joined #ocaml
weie has quit [Quit: Leaving...]
Playground has quit [Ping timeout: 260 seconds]
Playground has joined #ocaml
xavierm02 has quit [Quit: Leaving]
gour has quit [Quit: WeeChat 0.3.8]
mattrepl has joined #ocaml
Snark has quit [Quit: Quitte]
Anarchos has quit [Quit: Vision[0.9.7-H-090423]: i've been blurred!]
mye has quit [Quit: mye]
xavierm02 has joined #ocaml
mye has joined #ocaml
hongboz has quit [Ping timeout: 264 seconds]
HalfMadDad has joined #ocaml
mattrepl has quit [Quit: mattrepl]
jamii has quit [Read error: No route to host]
Yoric has quit [Ping timeout: 256 seconds]
brendan has quit [Remote host closed the connection]
ematsen has quit [Ping timeout: 245 seconds]
Demitar has quit [Ping timeout: 255 seconds]
tani has joined #ocaml
tane has quit [Ping timeout: 248 seconds]
mgodshal` has joined #ocaml
mgodshall has quit [Read error: Connection reset by peer]
Playground has quit [Read error: Connection reset by peer]
adotbrown has joined #ocaml
Reventlov has joined #ocaml
Cyanure has quit [Remote host closed the connection]
Demitar has joined #ocaml
adotbrown has quit [Ping timeout: 256 seconds]
Anarchos has joined #ocaml
xavierm02 has quit [Quit: Leaving]
RagingDave has quit [Quit: Ex-Chat]
brendan has joined #ocaml
cdidd has quit [Ping timeout: 255 seconds]
cdidd has joined #ocaml
namdak_tonpa has joined #ocaml
<namdak_tonpa> hello I have problem reach 5K RPS on ocsginen static page
<namdak_tonpa> could you help me ?
Demitar has quit [Ping timeout: 264 seconds]
mye has quit [Quit: mye]
mye_ has joined #ocaml