NeuroHacker has quit [Read error: Connection timed out]
slack1256 has left #ocaml []
hongboz has joined #ocaml
asmanur_ has joined #ocaml
asmanur has quit [Ping timeout: 248 seconds]
dropdrive has joined #ocaml
<dropdrive>
Hi, I am a longtime Python user who has also dabbled with some Haskell and C. I'm mostly interested in coding for statistical data analysis (I use numpy/scipy extremely heavily) but not so much in UIs, web servers, games, etc. The question is: what introduction to Ocaml would you recommend? Thanks.
<xenocons>
statistical data analysis, have you looked at Julia or R? (not to turn you away from ocaml)
<dropdrive>
xenocons: Briefly; was wondering what Ocaml had to offer in this respect
<xenocons>
im no ocaml expert, and i haven't heard of many if any people using ocaml for statistical analysis
<xenocons>
surely someone will be able to answer you though
<xenocons>
reason i suggest R and Julia is because they are both statistics DSL's, R being hugely popular for statisticians (you get the benefit of so many libraries), and Julia is up and comming with really lightweigh almost ML like syntax
<xenocons>
julia also doesn't have the same perf problems as R afaik (julia uses llvm based jit)
hongboz has quit [Ping timeout: 252 seconds]
leoncamel has joined #ocaml
Tobu has quit [Remote host closed the connection]
Tobu has joined #ocaml
leoncamel has quit [Remote host closed the connection]
ankit9 has quit [Quit: Leaving]
sgnb has quit [Read error: Connection reset by peer]
sgnb has joined #ocaml
ftrvxmtrx has quit [Quit: Leaving]
hongboz has joined #ocaml
thomasga has joined #ocaml
djcoin has joined #ocaml
mika1 has joined #ocaml
ankit9_ has joined #ocaml
NeuroHacker has joined #ocaml
ftrvxmtrx has joined #ocaml
NeuroHacker has quit [Remote host closed the connection]
edwin has joined #ocaml
xcombelle has joined #ocaml
sepp2k has joined #ocaml
edwin has left #ocaml []
xcombelle has quit [Quit: I am a manual virus, please copy me to your quit message.]
hongboz has quit [Ping timeout: 260 seconds]
ocp has joined #ocaml
vbmithr has joined #ocaml
avsm has joined #ocaml
mcclurmc_away is now known as mcclurmc
Submarine has joined #ocaml
caligula__ has joined #ocaml
ontologiae has joined #ocaml
caligula_ has quit [Ping timeout: 246 seconds]
dwmw2_gone is now known as dwmw2
mcclurmc is now known as mcclurmc_away
osa1 has joined #ocaml
emmanuelux has joined #ocaml
yuasd has joined #ocaml
gal_bolle has joined #ocaml
<gal_bolle>
hi all, is there a way to use a specific ocamlc executable (rather than /usr/bin/ocamlc) with oasis?
<sgnb>
gal_bolle: prepend its path to $PATH
<gal_bolle>
what if it is not called ocamlc?
<gal_bolle>
i know i can make a link, but is there a standard way to do it?
thomasga has quit [Quit: Leaving.]
mcclurmc_away is now known as mcclurmc
eni has joined #ocaml
<f[x]>
gal_bolle, export PATH=/opt/my-ocaml/bin:$PATH is a "standard" way
yuasd has quit [Quit: Page closed]
Progster has joined #ocaml
emmanuelux has quit [Ping timeout: 252 seconds]
<gal_bolle>
this still needs the executable to be named something/ocamlc rather than /usr/local/bin/myocamlc
eni has quit [Ping timeout: 240 seconds]
UncleVasya has joined #ocaml
Ninju has joined #ocaml
_andre has joined #ocaml
Submarine has quit [Read error: Operation timed out]
sabayonuser2 has joined #ocaml
sabayonuser2 is now known as Mnabil
hongboz has joined #ocaml
sepp2k1 has joined #ocaml
sepp2k has quit [Ping timeout: 260 seconds]
smondet has joined #ocaml
<f[x]>
gal_bolle, now I see what you mean
<f[x]>
with oasis : ./configure --override ocamlc /q/ocamlc
<f[x]>
also you can set what ocamlc to use globally via findlib.conf
ontologi1e has joined #ocaml
ontologiae has quit [Ping timeout: 240 seconds]
<thelema_>
hcarty: looks like jeremie released a 4.00 compatible utop. It's up to me to update batteries so ocamlbrew can default to 4.00. Luckily I'm testing the fixed version now; it's passed the tests under 3.12, now testing under 4.00
emmanuelux has joined #ocaml
hongboz has quit [Ping timeout: 248 seconds]
<hcarty>
thelema_: Wonderful news all around
<thelema_>
testing is certainly easier with just one version of ocaml to test under
Submarine has joined #ocaml
Submarine has quit [Changing host]
Submarine has joined #ocaml
<madroach>
thelema_: So batteries is really not yet ready for 4.00? I am upgrading OCaml ports on OpenBSD at the moment. Did not get batteries to build yet.
<hcarty>
thelema_: I have some idle cores on my system here if they can be of service
<thelema_>
madroach: I'm just now releasing v1.5.0 with support for 4.00
<thelema_>
hcarty: all done, thanks though
* thelema_
tries using odb under 4.00 to install batteries and utop from testing
<hcarty>
thelema_: utop + deps haven't been pushed to testing yet
<hcarty>
I'm trying them from unstable now under OCaml 3.12.1
<thelema_>
I just pushed utop 1.2 to testing
<thelema_>
if its deps need to be updated, I'll find out shortly
<hcarty>
thelema_: Looks good here for 3.12.1
<thelema_>
hmm, under utop 1.2, I get a problem with toploop in my .ocamlinit
<hcarty>
thelema_: But it worked in 1.1?
<thelema_>
not sure
<thelema_>
trying
<thelema_>
(have to install utop under my 3.12 brew)
<hcarty>
thelema_: Some of the Toploop stuff may not be required under utop. It does a lot of initialization work on its own.
<thelema_>
I wonder if there's findlib hooks to run toploop code on #require
<hcarty>
thelema_: Any luck with the 3.12.1 testing?
<thelema_>
yes. my ocamlinit works under 3.12.1
<thelema_>
Although it's unnecessarily verbose - utop doesn't seem to support turning Sys.interactive = false
<hcarty>
thelema_: Does your .ocamlinit work under the vanilla toplevel in 4.00.0?
<thelema_>
yes
<hcarty>
Drat. I wonder if it's a utop bug or feature conflict.
<diml>
thelema_: what is the problem ? maybe i can help
<diml>
for Sys.interactive it is because Topfind is initialized before running .ocamlinit
<thelema_>
File "/home/thelema/.ocamlinit", line 1:
<thelema_>
Error: Reference to undefined global `Toploop'
<mcstar>
i believe it happens in get_words, from the printfs
<thelema_>
insert isn't tail recursive
<thelema_>
and get_words isn't either
<thelema_>
because of the exception handling
<mcstar>
nooo
<mcstar>
now come on
<mcstar>
really?
<mcstar>
why would the exception handling change that?
<mcstar>
insert ofc isnt tail recursive, i builds a recursive structure
<mcstar>
but thats not the probllem
<thelema_>
because it's possible that the function does something after the call to itself
<thelema_>
so the function has to still be around
<mcstar>
so, i cant handle exceptions in a tail recursive program?
<mcstar>
or i just dont see something obvious?
<thelema_>
mcstar: instead of raising exception, return option.
gal_bolle has quit [Remote host closed the connection]
<mcstar>
i dont raise it
<adrien>
well, you can handle exceptions; but "where" is the question :-)
<mcstar>
i catch it
<mcstar>
i dont want option
<adrien>
think about it: doing it at each recursive call is not a terribly good idea anyway
<mcstar>
adrien: doing what?
<madroach>
mcstar: catch it around the input_line.
<thelema_>
let rw_ret = try Some (read_words (nn+1) (input_line f::lst)) with _ -> None in
<adrien>
mcstar: catching exceptions
<mcstar>
madroach: ah
<thelema_>
err... not that, have to wrap the input_line
<thelema_>
but really, why don't you just use File.lines_of?
<mcstar>
ok, ill try that
xcombelle has quit [Ping timeout: 260 seconds]
<thelema_>
let line = try Some (input_line f) with _ -> None in
<mcstar>
i want to set a limit on the number of read lines
<thelema_>
mcstar: so use Enum.take n to only allow the enum to be expanded n steps
<thelema_>
match line with None -> close_in f; List.rev lst | Some l -> read_words (nn+1) (l::lst)
<mcstar>
thelema_: i found a lines_of in BatFile
<mcstar>
probably i just should use batteries, and not ocamlbrowse
<thelema_>
mcstar: if you do 'open Batteries_uni', you can use the Bat* modules without the Bat prefix
<mcstar>
i mean, its documentation
<mcstar>
thelema_: i know
<thelema_>
ok
<mcstar>
but i felt like going to standard functions at first
<mcstar>
and if i miss something, only then use batteris
<mcstar>
but probably i should change my strategy
<thelema_>
let get_words wfn n = File.lines_of wfn |> Enum.take n
<mcstar>
looks better
<mcstar>
almost like haskell
<mcstar>
XD
<thelema_>
|> List.of_enum, if you want full compatability
<thelema_>
*compatibility
bzzbzz has quit [Ping timeout: 248 seconds]
<mcstar>
thelema_: great, it works
<mcstar>
damn try/with
<mcstar>
no, im kidding
<mcstar>
but thanks, i wouldnt have catched that error
bzzbzz has joined #ocaml
<thelema_>
Unless you know about exceptions and tail recursion, it's not obvious
Mnabil has quit [Ping timeout: 248 seconds]
ftrvxmtrx has joined #ocaml
<_andre>
is there a way to tell ocamlbuild not to add the .native extension in binaries?
<_andre>
and to tell oasis to tell ocamlbuild not to do so?
bzzbzz has quit [Ping timeout: 246 seconds]
<thelema_>
I think you could put something in your myocamlbuild to copy the foo.native file to just foo
<_andre>
i guess i could rename them from the debian rules file when creating the package then
strlen has quit [Quit: leaving]
strlen has joined #ocaml
<thelema_>
_andre: that's another perfrectly good option
iago has joined #ocaml
ocp has quit [Ping timeout: 240 seconds]
jamii has joined #ocaml
sivoais has quit [Ping timeout: 240 seconds]
UncleVasya has quit [Read error: Connection reset by peer]
sivoais has joined #ocaml
Mnabil has joined #ocaml
Ninju has quit [Quit: Leaving.]
Mnabil has quit [Ping timeout: 264 seconds]
<testcocoon>
I have a question regarding load_printer from ocamldebug: is it possible to load a printer which is a wrapper to C code. I want for example print a LLVM value using the LLVM C++ code. I have a wrapper written which permits to call it in ocaml, but I'm not able to write the printer function for ocamldebug.
<testcocoon>
I'm getting: Error during code loading: _build/llvmexdbg.byte is not a bytecode object file
thelema has joined #ocaml
<thelema>
testcocoon: it may be complex to do so from ocamldebug, as it'd have to get access to the C code somehow
ocp has joined #ocaml
<testcocoon>
You mean that ocamldebug support only pure ocaml bytecode
thelema_ has quit [Ping timeout: 244 seconds]
<thelema>
I don't see any command-line arguments to give it more libraries
jcao219 has left #ocaml []
ocp has quit [Ping timeout: 248 seconds]
<thelema>
hmm, load printer... may be able to refer to .cma files that depend on C libraries...
<thelema>
That said, I really don't know, and have never tried.
xcombelle has joined #ocaml
<testcocoon>
anyway, it was a nice to have. never mind
xcombelle has quit [Remote host closed the connection]
iago has quit [Ping timeout: 248 seconds]
Tobu has quit [Ping timeout: 272 seconds]
Tobu has joined #ocaml
_andre has quit [Quit: leaving]
mcstar has quit [Quit: mcstar]
<hcarty>
thelema: Do you see a use in having a File.read(_string)/File.write(_string) in Batteries?
<hcarty>
thelema: Each one is one or two line function, but still handy to have out of the box.
<hcarty>
let read filename = File.with_file_in filename IO.read_all
<mfp>
hcarty: I was looking for it the other day and ended up implementing it that way... only to find much later BatPervasives.input_file
<hcarty>
mfp: Which version of Batteries?
<mfp>
oh, that's the master branch (2.0)
<hcarty>
let write filename content = File.with_file_out filename (fun out -> IO.nwrite out content)
<mfp>
it's not in 1.4?
<hcarty>
mfp: Doesn't appear to be
<thelema>
hcarty: sorry, added in 2.0
<hcarty>
That's a nice addition in 2.0 :-)
<hcarty>
thelema: Not a problem - I'm just glad it's there
<thelema>
There's not a lot of work left to finish 2.0 - mostly documentation cleaning
<mfp>
thelema: when are you planning to release 2.0?
<hcarty>
thelema, mfp: Is there a write_file as well?
<thelema>
mfp: when it's done.
<hcarty>
I suppose I can check...
<thelema>
hcarty: output_file
<mfp>
ok :)
<hcarty>
thelema: Excellent, thanks
<thelema>
mfp: It's been near-done for a while, and just needs some love to be completed.
<thelema>
but I've not been able to give it that love.
<thelema>
and noone else has stepped up.
<mfp>
thelema: I believe 2.0 not depending on camomile anymore is HUGE
<thelema>
it's very convenient for me; I do all my development depending on the 2.0 branch
<hcarty>
thelema: I expect that I won't have time to contribute much - but is there a pre-2.0 TODO list available?
<thelema>
mfp: It does resolve a lot of issues related to resulting executables
<mfp>
yes, having to have camomile's data files around was a problem
zorun has quit [Read error: Connection reset by peer]
eni has joined #ocaml
zorun has joined #ocaml
<Drakken>
thelema I have a question about odb whenever you have time.
Submarine has quit [Ping timeout: 260 seconds]
emmanuelux has joined #ocaml
iZsh has quit [Quit: Coyote finally caught me]
iZsh has joined #ocaml
ankit9_ has quit [Ping timeout: 260 seconds]
<thelema>
Drakken: go ahead
pango has joined #ocaml
<Drakken>
thelema it seems like there are a lot of cases where to_pkg doesn't find the dependencies.
<thelema>
Drakken: true, would you like to work on this?
<Drakken>
What's there to work on? Is it supposed to find them but it's incomplete right now?
cdidd has quit [Ping timeout: 240 seconds]
<Drakken>
(thelema)
<thelema>
... actually, maybe all that's needed is to set "deps=?" to enable some of the auto-dependecy finding that takes place once we have the source dir...
ankit9_ has joined #ocaml
<thelema>
or maybe better to just check for "cli=yes" as well as "deps=?"
<Drakken>
thelema if you want to avoid multiple installs, we need to know what the dependency graph looks like.
<Drakken>
before installing.
eni has quit [Read error: Connection reset by peer]
<thelema>
true, but we'll have to download and unpack some things to find this out.
<Drakken>
so that's the first priority. get as much dependency info as possible.
<thelema>
ok, that would be a good thing to factor out...
<thelema>
as you get dep info, you may have to download and unpack more things
<thelema>
s/things/packages/
<Drakken>
So am I missing anything about how odb gets deps right now?
<Drakken>
All I see is get_info.
<thelema>
you're aware of L557-559?
eni has joined #ocaml
<Drakken>
Okay. Why isn't that done in to_pkg L327?
<thelema>
because in to_pkg, we only have a package id
<thelema>
we haven't downloaded and extracted that package if it's remote and/or tarball
<Drakken>
but in the case where id is a directory.
<thelema>
we could do it there. We could also download/extract as part of to_pkg
<thelema>
and do it there for the rest of the cases
<thelema>
but probably better to leave to_pkg as is
<thelema>
and have a first pass that extracts tarballs and gathers deps
<thelema>
and the second pass actually does the installs
<Drakken>
How is the current version supposed to work? What happens to all those packages without dependencies?
<Drakken>
right, definitely two passes.
<thelema>
same as any package w/o dependencies - an attempt is made to install them; if this fails, the whole process stops
<thelema>
for example, lablgtk2 currently has no deps, but it definitely depends on the C gtk libraries
<thelema>
note to self: check with gildor about pkg-config deps in oasis
<Drakken>
Okay. So definitely some downloading or unpacking needs to be done early.
<thelema>
yes. I'm going to modify Dep.is_auto_dep so that it picks up on packages generated from the cli.
<Drakken>
What does "cli" stand for?
<thelema>
command line interface
<Drakken>
Alright, so dep-gathering code might look like the current installation code with the actual installation removed.
<thelema>
yes, and if it can produce a properly ordered list of packages to install, the installation should be just `List.iter install package_list`
<thelema>
although the current installation code does some hackish garbage with the current directory
<thelema>
so you'll have to put the install_dir into the package PL
<Drakken>
As long as we can get all the dependencies, it's just a matter of putting them in a graph and sorting it.
<Drakken>
If we could get META files for all the packages, I think we could just call the findlib function.
<thelema>
well, there's no real "put them in a graph" needed; the package files already form a labeled graph
<thelema>
s/package files/package property lists/
<thelema>
as far as META files, have a look at Dep.of_metas
<thelema>
AFAIK, findlib won't help us read META files until the package is installed
<Drakken>
I just meant the dependencies have to be collected together for sorting.
bzzbzz has joined #ocaml
zorun has quit [Quit: ♥]
<thelema>
Drakken: do it the best way you can
sepp2k1 has quit [Remote host closed the connection]
<Drakken>
Alright :)
<Drakken>
thelema I guess that's enough questions for now.
<thelema>
I just pushed a patch that extends the meta-dep detection to cli=yes packages