kaustuv changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | 3.11.1 out now! Get yours from http://caml.inria.fr/ocaml/release.html
sramsay has quit [Remote closed the connection]
rhar has joined #ocaml
_zack has quit ["Leaving."]
travisbrady has quit []
travisbrady has joined #ocaml
verte has joined #ocaml
rhar has quit [Read error: 110 (Connection timed out)]
caligula_ has joined #ocaml
caligula__ has quit [Read error: 110 (Connection timed out)]
psnively has joined #ocaml
psnively has left #ocaml []
rhar has joined #ocaml
malc_ has joined #ocaml
jeddhaberstro has quit [Client Quit]
holmak has joined #ocaml
rhar has quit ["This computer has gone to sleep"]
malc_ has quit ["leaving"]
verte has quit [Read error: 60 (Operation timed out)]
mishok13 has quit [Read error: 145 (Connection timed out)]
rhar has joined #ocaml
verte has joined #ocaml
holmak has quit ["Leaving"]
Jedai has joined #ocaml
travisbrady has quit [Read error: 60 (Operation timed out)]
rhar has quit ["Leaving"]
angerman has joined #ocaml
angerman has quit []
smimou has joined #ocaml
Cafuneba has joined #ocaml
verte_ has joined #ocaml
verte has quit [Nick collision from services.]
verte_ is now known as verte
slash_ has joined #ocaml
flux has joined #ocaml
flx_ has quit [Read error: 104 (Connection reset by peer)]
angerman has joined #ocaml
angerman has quit []
<wysek> hey, is there a function joining strings with a string between them?
<wysek> like string.join in Python
seafood_ has joined #ocaml
_zack has joined #ocaml
<flux> String.concat ", " ["1"; "2"]
hkBst has joined #ocaml
<wysek> oh, I looked only in Str. thanks!
<flux> even though Str comes with O'Caml, I'd suggest to prefer the Pcre-module over it :)
seafood has quit [Read error: 60 (Operation timed out)]
lutter has joined #ocaml
<wysek> thx, I'll keep that in mind
sramsay has joined #ocaml
lutter1 has joined #ocaml
lutter has quit [Read error: 113 (No route to host)]
sramsay has quit [Remote closed the connection]
verte_ has joined #ocaml
verte has quit [Nick collision from services.]
verte_ is now known as verte
marmottine has joined #ocaml
seafood_ has quit []
LeCamarade|Away is now known as LeCamarade
verte_ has joined #ocaml
verte_ has quit [Read error: 60 (Operation timed out)]
verte_ has joined #ocaml
verte has quit [Nick collision from services.]
verte_ is now known as verte
pokey2 has joined #ocaml
<pokey2> So...
<pokey2> trying to install camlfloat or lapack on os x
<pokey2> i mean lacaml
<pokey2> I have the developer toolkit, which includes veclib
<pokey2> which is supposed to include lapack, blas, atlas
<pokey2> can't get camlfloat or lacaml to work
<kaustuv> pokey2: what exact error message(s) do you get?
<pokey2> on which?
<pokey2> make install
<pokey2> Installing library with ocamlfind
<pokey2> ocamlfind install lacaml META io.mli impl.ml common.mli impl_SDCZ.mli impl_SD.mli impl_CZ.mli vec_SDCZ.mli vec_SD.mli vec_CZ.mli mat_SDCZ.mli mat_SD.mli mat_CZ.mli float32.ml float64.ml complex32.ml complex64.ml io.cmi utils.cmi common.cmi lacaml.cmi lacaml.cma lacaml_top.cma lacaml.cmxa lacaml.a liblacaml_stubs.a dlllacaml_stubs.so
<pokey2> ocamlfind: Package lacaml is already installed
<pokey2> - (file /usr/local/lib/ocaml/site-lib/lacaml/META already exists)
<pokey2> make[1]: *** [libinstall] Error 2
<pokey2> make: *** [install] Error 2
<pokey2> but it doesn't work when I try to open it...
<pokey2> # open Lacaml.Impl.S;;
<pokey2> Characters 0-18:
<pokey2> open Lacaml.Impl.S;;
<pokey2> ^^^^^^^^^^^^^^^^^^
<pokey2> Error: Unbound module Lacaml.Impl.S
<kaustuv> run ocaml with ocaml -I +lacaml
<kaustuv> alternatively,
<kaustuv> # #use "topfind" ;;
<kaustuv> # #require "lacaml" ;;
<pokey2> ocaml -I +lacaml
<pokey2> Objective Caml version 3.11.0
<pokey2> # open Lacaml.Impl.S;;
<pokey2> Error: Unbound module Lacaml.Impl.S
<kaustuv> without topfind you'd have to also #load "lacaml.cma", I believe.
<pokey2> # #use topfind;;
<pokey2> Wrong type of argument for directive `use'.
<kaustuv> quotes are important
<pokey2> ok
<pokey2> thank you very much!
<pokey2> the problem with camlfloat was probably me editing the makefile wrong
seafood has joined #ocaml
<pokey2> it's not clear how to do it with OS X veclib, though
<pokey2> lacaml works too though
<kaustuv> I think lacaml is better maintained. Markus generally writes high quality stuff
<pokey2> Camlfloat seemed more elegant, but lacaml was updated more recently.
<pokey2> I just started using ocaml recently; I wanted something fast for numerical computations.
<pokey2> but not c
<pokey2> So, lacaml was key.
<kaustuv> do you not have access to something like Matlab?
<kaustuv> ocaml is not always the best for lots of floating point work
<pokey2> What is wrong with ocaml for that?
<kaustuv> If you're running on a 64 bit platform, probably nothing. On 32 bits ocaml does a dismal job with the FP stack
<pokey2> I use 64bit os x. On a hackintosh actually.
<pokey2> I don't think many people who do heavy numerical computation still have 32bit computers.
<pokey2> er, I don't need to do anything to get ocaml to be 64 bit, do I?
<kaustuv> # Sys.word_size ;;
<kaustuv> if that says 64, you're fine
<pokey2> int = 32
<pokey2> hmm
<kaustuv> That's strange. Do you have a 64bit compiler toolchain and did you compile ocaml with it?
<pokey2> it's the gcc in apple developer toolkit
<Camarade_Tux> iirc mac os x 64bit isn't 64bit for everything, they have the kernel as 64bit and the userland as 32bit or the other way-round
<kaustuv> Ah, yes, Camarade_Tux is right.
<Camarade_Tux> also, with apple products, I wouldn't be surprised the default is 32bit, for better compatibility
<pokey2> gcc -m64 ?
<Camarade_Tux> pokey2: just make a dummy a.c file, compile it with gcc -m64 and use 'file' to check if it's 32 or 64bit
<pokey2> To answer your question, I am not satisfied with matlab for the kinds of higher level stuff I do.
<kaustuv> according to apple.com/macosx/technology the userland is 64bit in Snow Leopard
<pokey2> not out yet
<pokey2> well, private beta
<Camarade_Tux> or, does 'gcc -v' list --enable-multilib (no, you can't pipe to grep, it outputs on stderr, not stdout)
<kaustuv> 2>&1
Amorphous has quit [Read error: 110 (Connection timed out)]
Snark has joined #ocaml
<pokey2> ???
<Camarade_Tux> kaustuv: he, right, I always forget that one, don't know why ;)
<Camarade_Tux> pokey2: run 'gcc -v 2&>1 |grep multilib', does it output anything?
<pokey2> on a file?
<Camarade_Tux> pokey2: no, run that in a terminal
<pokey2> oh, made a file called 1
<pokey2> i686-apple-darwin9-gcc-4.0.1: 2: No such file or directory
<pokey2> Using built-in specs.
<pokey2> Target: i686-apple-darwin9
<pokey2> Configured with: /var/tmp/gcc/gcc-5493~1/src/configure --disable-checking -enable-werror --prefix=/usr --mandir=/share/man --enable-languages=c,objc,c++,obj-c++ --program-transform-name=/^[cg][^.-]*$/s/$/-4.0/ --with-gxx-include-dir=/include/c++/4.0.0 --with-slibdir=/usr/lib --build=i686-apple-darwin9 --with-arch=apple --with-tune=generic --host=i686-apple-darwin9 --target=i686-apple-darwin9
<pokey2> Thread model: posix
<pokey2> gcc version 4.0.1 (Apple Inc. build 5493)
<Camarade_Tux> it shouldn't have made a file but anyway, I think you won't get 64bit, you probably need to compile a 64bit compiler for that
<pokey2> So i need to download a different gcc?
<Camarade_Tux> if you find one to download, yes
<Camarade_Tux> otherwise you can compile one (two actually), it isn't hard but it's longer
<kaustuv> and yeah, you'll need a full 64bit toolchain (gcc, linker, etc.)
Amorphous has joined #ocaml
<pokey2> os x goes not use ld
<pokey2> *does not use
<Camarade_Tux> if you have to compile gcc yourself, you'll have to compile a 32bit -> 64bit compiler first and then use it to cross-compile gcc
<pokey2> I need 64 bit anyway, I need lots of stuff in ram
<Camarade_Tux> s/32bit -> 64bit compiler/32bit -> 64bit cross-compiler/
<pokey2> The ease of use of OS X over linux is rapidly diminishing :-(
<Camarade_Tux> hehe :P
<pokey2> Which is what I assume you use....
<pokey2> debian?
<kaustuv> I've been using Linux since 95 and Debian since 97. Ain't nothing ever come close to convincing me to switch
<Camarade_Tux> that's what I do, that's not what everybody does ;)
<pokey2> I have a dual boot with X and XP, might add debian sometime
<Camarade_Tux> there are several people using mac os x actually
<pokey2> Of course linux has no applications....
<pokey2> So here I am on OS X
<kaustuv> I think you should still go ahead with the 32 bit stuff and wait for Snow Leopard
<pokey2> using ocaml, and firefox, and tremulous
<pokey2> and emacs
* Camarade_Tux is currently happily reencoding videos in h264 with x264 and mplayer/mencoder
<pokey2> and vlc...
<pokey2> oh shit, I'm going to end up using linux
<kaustuv> On 32 bits ocaml also has an annoying 16MB size limit for arrays, unless you use bigarrays
<pokey2> Yeah, expected to need bigarray
<Camarade_Tux> even though, bigarrays are maybe better, regular arrays use 1.8 times the memory you'd expect them to (because of the 80% setting in the Gc module)
<Camarade_Tux> 80% for Gc.space_overhead that is
<pokey2> Yeah. I'm going to need to make suffix array stuff, too bad there's no compressed suffix array libraries.
<pokey2> Just want straight up arrays. No pointers.
<kaustuv> well you can't really point inside an array in ocaml without cheating the type system
<kaustuv> and even if you could, you shouldn't because the GC will hate you
<pokey2> Bigarrays have indexing...
<pokey2> ?
<kaustuv> Sure, but they always dereference the array header
<pokey2> What, bigarrays are broken? :-(
<kaustuv> no, they don't dereference the WHOLE array, just the header page and the page you're indexing into
<kaustuv> which if you think about it is kind of unavoidable
<pokey2> Oh, you mean for multidimensional arrays.
<kaustuv> No, I mean that in a single dimensional array that spans several pages, indexing the ith element will dereference the array header to see if you are inside bounds. In C, to contrast, you can happily dereference any offset from the start of the array.
<pokey2> augh, why must my tools try to be smart
<pokey2> I guess that shouldn't be too slow though.
<pokey2> eh
<kaustuv> there are some unsafe_ operations, and you can compile with -unsafe, but I think there are some runtime checks that can't be eliminated
<kaustuv> Not entirely sure, though.
<pokey2> Well, ocaml is philosphically somewhat functional
verte_ has joined #ocaml
<pokey2> Yes, I have a big project I am working on...big enough to justify learning a new language...
verte has quit [Nick collision from services.]
<pokey2> and getting a new computer...
<kaustuv> one possibility is: http://bioscreencastwiki.com/Page_Title
<pokey2> What, ubuntu? Not debian?
<kaustuv> well, if you can find a suitable debian image, go for it.
verte_ is now known as verte
<pokey2> Also, virtual is going to be too slow for me.
<pokey2> I would just install debian as a third boot if I needed to.
<pokey2> Would really rather get 64 bit compilation on os x working though, reading documentation which is why this probably has typos
<pokey2> inconsistent errors, weird
<Camarade_Tux> unrelated but I wanted to mention a few things about xz/lzma2: 7zip 9 (because it was released in 2009) can extract xz files, a.k.a. lzma2 and tukaani's xz and 7zip will remain compatible
<pokey2> I guess I will try 3.11.1 ocaml with -m64 and -arch x86_64
<pokey2> I used the binary before.
<pokey2> Anyway, thanks for all the help.
smimou has quit ["bli"]
smimou has joined #ocaml
<pokey2> Wow, do I feel silly. I just installed from source using instructions for 64 bit on os x, and bootstrap, and sys.word_size says 64 bit
<pokey2> that was easy
<pokey2> Stupid me for being lazy and using the binary.
verte_ has joined #ocaml
verte has quit [Nick collision from services.]
verte_ is now known as verte
verte_ has joined #ocaml
verte has quit [Nick collision from services.]
verte_ is now known as verte
<Camarade_Tux> :)
<pokey2> and now, # #use "topfind" ;;
<pokey2> File /usr/local/lib/ocaml/site-lib/findlib/findlib.cma is not a bytecode object file.
<pokey2> File /usr/local/lib/ocaml/site-lib/findlib/findlib_top.cma is not a bytecode object file.
<pokey2> - : unit = ()
<pokey2> File "/usr/local/lib/ocaml/topfind", line 1, characters 0-1:
<pokey2> Error: Reference to undefined global `Topfind'
authentic has quit [".."]
authentic has joined #ocaml
<Camarade_Tux> pokey2: have you recompiled everything? if you've changed the ocaml bin, you have to change all the libs too
<pokey2> yeah, but it gives the same error trying to reinstall findlib
<pokey2> not a bytecode object file
verte has quit [Read error: 145 (Connection timed out)]
verte has joined #ocaml
<Camarade_Tux> reinstall or recompile?
<pokey2> recompile, right
<pokey2> make all
<pokey2> for p in findlib; do ( cd src/$p; make all ); done
<pokey2> ocamldep *.ml *.mli >depend
<pokey2> ocamlc -g -c ocaml_args.ml
<pokey2> ocamlc -g -c frontend.ml
<pokey2> File "frontend.ml", line 235, characters 6-13:
<pokey2> Warning Y: unused variable pkgpath.
<pokey2> File "frontend.ml", line 843, characters 6-18:
<pokey2> Warning Y: unused variable eff_dontlink.
<pokey2> File "frontend.ml", line 666, characters 6-13:
<pokey2> Warning Y: unused variable destdir.
<pokey2> File "frontend.ml", line 1351, characters 6-14:
<pokey2> Warning Y: unused variable add_spec.
<pokey2> File "frontend.ml", line 1345, characters 6-16:
<pokey2> Warning Y: unused variable add_switch.
<pokey2> ocamlc -custom -o ocamlfind findlib.cma unix.cma \
<pokey2> ocaml_args.cmo frontend.cmo
<pokey2> File "_none_", line 1, characters 0-1:
<pokey2> Error: The file findlib.cma is not a bytecode object file
<pokey2> make[1]: *** [ocamlfind] Error 2
<pokey2> make: *** [all] Error 2
<Camarade_Tux> you could try godi actually, it will be better than compiling every package by hand ;)
<pokey2> Yeah, but I half expect to need to do a custom configuration every time I compile something. Maybe I'm just unlucky.
<Camarade_Tux> afaik godi works well enough on darwin but I'm not using so I can't guarantee that
Jedai has quit [Read error: 113 (No route to host)]
<pokey2> Ah, you should have seen the look on the face of my friend who uses a macintosh from apple when I booted up my black monolith, went through the bios screen, entered verbose mode in the bootloader, and up came OS X.
<pokey2> Can linux do THAT?
<Camarade_Tux> hahaha :p
marmottine has quit [Read error: 110 (Connection timed out)]
marmottine has joined #ocaml
Cafuneba has quit ["Leaving."]
pokey2 has quit []
Associat0r has joined #ocaml
Associat0r has quit []
seafood has quit []
angerman has joined #ocaml
verte_ has joined #ocaml
verte has quit [Nick collision from services.]
verte_ is now known as verte
angerman has quit []
amuck_ has joined #ocaml
marmottine has quit [Read error: 110 (Connection timed out)]
_zack has quit ["Leaving."]
Jedai has joined #ocaml
marmottine has joined #ocaml
_zack has joined #ocaml
marmottine has quit [Read error: 110 (Connection timed out)]
verte has quit ["~~~ Crash in JIT!"]
lutter1 has quit [No route to host]
marmottine has joined #ocaml
_zack has quit ["Leaving."]
LeCamarade is now known as LeCamarade|Away
sramsay has joined #ocaml
marmottine has quit [Read error: 104 (Connection reset by peer)]
willb has joined #ocaml
angerman has joined #ocaml
smimou has quit ["bli"]
smimou has joined #ocaml
willb has quit [Read error: 110 (Connection timed out)]
willb has joined #ocaml
travisbrady has joined #ocaml
_zack has joined #ocaml
_zack has quit [Client Quit]
jimmyb2187 has quit [Read error: 104 (Connection reset by peer)]
jimmyb21871 has joined #ocaml
anders^^ has quit [Read error: 110 (Connection timed out)]
Snark has quit ["Ex-Chat"]
anders^^ has joined #ocaml
travisbrady has quit [Read error: 104 (Connection reset by peer)]
travisbrady has joined #ocaml
Jedai has quit [Read error: 113 (No route to host)]
smimou has quit ["bli"]
bombshelter13_ has quit []
slash_ has quit [Read error: 110 (Connection timed out)]
svenl has quit [Remote closed the connection]
svenl has joined #ocaml
hkBst has quit [Read error: 104 (Connection reset by peer)]
_zack has joined #ocaml
aklt has joined #ocaml
slash_ has joined #ocaml
angerman has quit [Read error: 110 (Connection timed out)]
sramsay has quit ["Leaving"]
seafood has joined #ocaml
psnively has joined #ocaml
psnively has left #ocaml []
seafood has quit []
travisbrady has quit [Read error: 104 (Connection reset by peer)]
travisbrady has joined #ocaml
willb has quit [Read error: 110 (Connection timed out)]
travisbrady has quit []
slash_ has quit [Client Quit]
amuck_ has quit []