Alpounet 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
ttamttam has joined #ocaml
valross has quit ["Ex-Chat"]
ulfdoz has quit [Read error: 110 (Connection timed out)]
ttamttam1 has joined #ocaml
jonafan_ has quit [Read error: 104 (Connection reset by peer)]
albacker has joined #ocaml
ttamttam has quit [Read error: 110 (Connection timed out)]
tmaedaZ is now known as tmaeda
noisetonepause has quit [Read error: 145 (Connection timed out)]
_zack has joined #ocaml
_zack has quit ["Leaving."]
munga_ has joined #ocaml
sramsay has joined #ocaml
sramsay has quit [Success]
Yoric has joined #ocaml
Associat0r has joined #ocaml
rwmjones has quit [Read error: 110 (Connection timed out)]
rwmjones has joined #ocaml
Yoric_ has joined #ocaml
Yoric__ has joined #ocaml
Yoric has quit [Read error: 104 (Connection reset by peer)]
Yoric__ is now known as Yoric
Yoric has quit [Client Quit]
Yoric_ has quit [Read error: 110 (Connection timed out)]
Pimm has joined #ocaml
tmaeda is now known as tmaedaZ
ikaros has joined #ocaml
je has joined #ocaml
smimou has quit [Read error: 104 (Connection reset by peer)]
rwmjones_lptp has joined #ocaml
je has quit ["On the move"]
smimou has joined #ocaml
munga_ has quit [Read error: 148 (No route to host)]
rwmjones_lptp has quit ["Leaving"]
ski_ has quit ["Lost terminal"]
ski_ has joined #ocaml
_zack has joined #ocaml
rwmjones_lptp has joined #ocaml
ttamttam1 has quit ["Leaving."]
ttamttam has joined #ocaml
subito has joined #ocaml
<subito> hi, is there something in ocaml to multiply matrices efficiently or even exponentiate one?
<Camarade_Tux> there are bindings to fortran libraries, lapack for instance I think (/me a bit in a hurry)
<thelema> subito: if you don't need high-performance, it's easy to write yourself.
<subito> thelema: i need something better than n^3 to multiply 10,000*10,000 matrices
<subito> is there an ubuntu package for lacaml (i can't find any using apt-cache search) or do i have to install blas/lapack and then compile myself lacaml?
<thelema> probably the second.
<subito> ok it's done :)
<thelema> I dunno if libgmp does matrix multiply or not, but there might be already packaged versions of its ocaml bindings
Yoric has joined #ocaml
<subito> thelema: i have gmp i should have checked that
<subito> the word 'matrix' or 'matri' is not in gmp.mli
<thelema> ok, apparently it doesn't do that.
<thelema> I just know it as the first math library I turn to.
<subito> i can't figure out how to use it; i did #use "topfind"; #require "lacaml"; open Lacaml; but then how can i access a function defined in, for instance, ocaml/lacaml/mat_SDCZ.mli?
<thelema> I dunno - the docs say you should open open Lacaml.Impl.<X>
<thelema> where <X> = S, D, C, or Z
<subito> where can i see the doc?
<thelema> I'm guessing S=Single, D=Double, C=Single-Complex, Z=Double-complex
<subito> ok thanks
<subito> opening Lacaml.Impl.S works, but then i still can't access the of_array function of mat_SDCZ.mli
<thelema> Mat.of_array?
<subito> yes :)
<thelema> Does Mat.of_array work?
<subito> yes
<subito> i can't find the multiplication in mat_SDCZ.mli
zaa has joined #ocaml
<thelema> hmm, maybe you really want BLAS
<subito> but i don't understand, i thought lacaml was already a "BLAS/LAPACK-interface for OCaml"
<thelema> yes, you want the BLAS part of this, which isn't in mat_*, but in impl_*
<subito> oh
<thelema> probably sgemm
<thelema> filesgemm.f
<thelema> formatrix matrix multiply
<thelema> * SGEMM performs one of the matrix-matrix operations
<thelema> *
<thelema> * C := alpha*op( A )*op( B ) + beta*C,
zaa has quit []
<subito> yes i was just looking at it, what an intuitive name :D
<thelema> I totally would have guessed it... not.
ikato has joined #ocaml
<subito> i'll assume all the arguments are useless
<thelema> for a straight matrix multiply, yes
munga has quit [Read error: 110 (Connection timed out)]
ikato has quit []
jimmyb2187 has left #ocaml []
kaustuv has joined #ocaml
jimmyb2187 has joined #ocaml
<HaskellLove> What do you start with when u design a language?... I thought i will research whole 2010 and 2011 start bnf design, but i was told that is wrong it is just "syntax"...
HaskellLove has quit [Read error: 104 (Connection reset by peer)]
<mrvn> You should start with defining what you want.
<subito> too late
HaskellLove_ has joined #ocaml
tmaedaZ is now known as tmaeda
<orbitz> YOu should start by using a bunch of languages
<HaskellLove_> yeah i plan whole 2010 to be just learning languages and research and start implementation in 2011
<schme> HaskellLove_: What is this language you are implementing?
tmaeda is now known as tmaedaZ
<HaskellLove_> doing research now no implementation yet... multi paradigm general solver
tmaedaZ is now known as tmaeda
<schme> HaskellLove_: general solver of what? (:
<orbitz> HaskellLove_: it might be beneficial to spend your time contributing to another language you like, GHC for instance
tmaeda is now known as tmaedaZ
joewilliams has joined #ocaml
Pimm has quit [Read error: 110 (Connection timed out)]
Yoric has quit []
Yoric has joined #ocaml
ikaros has quit [Read error: 110 (Connection timed out)]
ikaros has joined #ocaml
ikato has joined #ocaml
<kaustuv> HaskellLove_: do you have a problem that is cumbersome to implement or difficult to reason about in an existing language? Do you think that it cannot be solved with better libraries but is a fundamental limitation of the language? If so, you might have a good idea for a new language. If not, you are wasting your time which would be better spent solving interesting problems.
ikato has quit [Client Quit]
_andre has joined #ocaml
Waleee has joined #ocaml
joewilliams has quit [Remote closed the connection]
_andre has quit ["Lost terminal"]
<HaskellLove_> Guys what is this Unlambda language, is it worth wasting time there? Seems like useless language?
_unK has joined #ocaml
<mrvn> Lambda calculus? That is the theoretical basis for all functional languages.
<HaskellLove_> the language Unlambda
<HaskellLove_> you can study lambda calculus without it
<schme> HaskellLove_: it sure looks a waste of time.
<mrvn> Never heard of it. Can't be important.
Snark has joined #ocaml
* schme looked at the webpage. seems like complete waste of time.
<Leonidas> mfp: is the source code of R2 available somewhere?
<Leonidas> http://github.com/mfp/ocsiblog <- i guess I found it
<Leonidas> is there any key/value storage like tokyo cabinet or redis or something that has ocaml-bindings?
smimou has left #ocaml []
smimou has joined #ocaml
<HaskellLove_> If u are a compiler engineer what is like the best dream job place where you want to get an internship as student and steal some knowledge?
<schme> HaskellLove_: I'd like intel.
<schme> (if I was a compiler engineer)
Yoric has quit []
Narrenschiff has joined #ocaml
ttamttam has quit ["Leaving."]
suricator has joined #ocaml
<suricator> hi everyone
<suricator> i'm having trouble with using make in ocaide (eclipse plugin for ocaml)... anyone can help? thanks!
_zack has quit ["Leaving."]
<HaskellLove_> The most mind blowing coolest programming in general book ever?
Submarine has joined #ocaml
WuJiang has joined #ocaml
<HaskellLove_> anyone has made a function compiler i want to talk about it... i am reading lambda calculus and func languages implementation?
Narrenschiff has quit []
ulfdoz has joined #ocaml
RSchulz has joined #ocaml
Amorphous has quit [Read error: 110 (Connection timed out)]
Amorphous has joined #ocaml
eldragon has joined #ocaml
jonafan has joined #ocaml
Smerdyakov has joined #ocaml
ttamttam has joined #ocaml
HaskellLove_ has left #ocaml []
myst has left #ocaml []
zarvok has joined #ocaml
ski_ has quit ["Lost terminal"]
ulfdoz has quit ["deprecated"]
Yoric has joined #ocaml
Smerdyakov has quit ["Leaving"]
Narrenschiff has joined #ocaml
Submarine_ has joined #ocaml
Submarine has quit [Remote closed the connection]
<Camarade_Tux> mfp: currently if I want to distribute binaries for an ocaml program, I only have to distribute a single file, how is it with ld-ocaml? how many files to redistrbute? any path or directory structure to preserve? any environment variable to set?
<Yoric> mfp: nice job with ld, btw.
subito has quit [Read error: 110 (Connection timed out)]
* Camarade_Tux /win 14
<Camarade_Tux> bah ^^
<Camarade_Tux> I haz lag...
ofaurax has joined #ocaml
Yoric has quit []
<Camarade_Tux> anyway, I just sent two binaries to someone, they were really big (3MB combined) while the code is like 150 lines without anything special
demitar has joined #ocaml
ttamttam has quit ["Leaving."]
<mrvn> Camarade_Tux: we seem to have different notions of really big
<Camarade_Tux> mrvn: really big considering I had only written a hundred lines of code
<gildor> [#459] no more mails from mailinglist
<gildor> thelema: for which mailing-list you have problems ?
* mrvn wonders if upstream will include Bigarray.int31 soon.
thelema has quit [Read error: 104 (Connection reset by peer)]
thelema has joined #ocaml
Snark has quit ["Ex-Chat"]
kaustuv has quit [Read error: 113 (No route to host)]
slash_ has joined #ocaml
Pimm has joined #ocaml
zarvok has quit ["Leaving"]
Narrenschiff has quit []
Yoric has joined #ocaml
Pimm has quit [Read error: 110 (Connection timed out)]
ulfdoz has joined #ocaml
Waleee has quit []
albacker has quit [".."]
Yoric has quit []
rwmjones_lptp has left #ocaml []
<thelema> gildor: as far as I can tell, no problems with any mailing list - I seem to be auto-monitoring all bugs.
<gildor> thelema: is it what you want or a kind of problem ?
<thelema> I don't mind it as long as you don't have too many problems.
<thelema> I probably signed up for it sometime in the past.
<gildor> well not everybody is monitoring all bugs
<thelema> I don't know how to remove myself, but I'll bother you if it becomes a problem.
<gildor> so maybe it is a kind of bug
<gildor> when has it started ?
slash_ has quit [Client Quit]
<thelema> long long time ago - back when I first submitted a request for something...
<gildor> thelema: ok tell me when you want to remove it
<thelema> gildor: ok.
suricator has quit []
munga_ has joined #ocaml
suricator has joined #ocaml
ofaurax has quit ["Leaving"]
Submarine_ has quit [Read error: 110 (Connection timed out)]
tmaedaZ is now known as tmaeda
<mfp> Camarade_Tux: you can choose how you can to distribute it
<mfp> Camarade_Tux: ld_ocaml + a single cmx with everything, or ld_ocaml + a .cmxs for your program + one per lib, or the program + a runtime in a cmxs...
<mfp> erm s/how you can/how you want/ above
<mfp> Camarade_Tux: as for the env var, it depends on where the .cmxs are placed; atm. ld_ocaml looks for .cmxs libs in /usr/lib/ocaml, /usr/local/lib/ocaml, and all their subdirs
<mfp> if the required lib(s) are in those dirs, no env. vars are required, you can run your program with ld_ocaml foo.cmxs
<mfp> otherwise, you can set LD_OCAML_SYS_LIBRARY_PATH and/or LD_OCAML_EXTRA_SYS_LIBRARY_PATH / LD_OCAML_LIBRARY_PATH (see README)
<thelema> mfp: is ld_ocaml licensed so people can use it as their main program?
<mfp> thelema: MIT license
<thelema> sounds good.
<thelema> What about not even requiring that - the only data it needs is the name of the .cmxs, no?
<mfp> what do you mean?
<thelema> what about checking argv.(0) and if it's not ld_ocaml, run argv.(0) ^ ".cmxs"
<thelema> so you can rename ld_ocaml and just use it straight
<mfp> I see
<mfp> would need some extra logic as you can load several .cmxs and the last one becomes Sys.argv.(0)
<mfp> sounds great
<thelema> no problem - this is just a different way to use the program
<thelema> common use case is just one cmxs, right?
<mfp> yes
<mfp> multiple .cmxs are only required when there are no refs to the extra cmxs in the "main" one and you want them for their side effects
<thelema> then definitely can use the 'renamed exe' mode.
<thelema> It might need some code for windows to strip off .exe
<mfp> (e.g. extensions in Ocsigen, which are registered in some hashtbl)
<mfp> it's not guaranteed to work always since argv[0] being the actual path is just a convention, but if you're playing with argv[0] you should be able to figure it out
<mfp> Camarade_Tux: going back to your use case, you'll be better off size-wise w/ cmxs if the required cmxs libs are already installed, or you are distributing several executables that link against the same libs (so you don't link them statically N times)
trav has joined #ocaml
ikaros has quit [Read error: 104 (Connection reset by peer)]
<mfp> for example, an AAA-powered dynamic hello world takes like 10 KB, but aaa.cmxs and camomile.cmxs take over 1 MB --- if you ship them all, it's not any smaller than a static binary
tmaeda is now known as tmaedaZ
<trav> I have a type defined in a module of a package and a record type defined in the package user. OCaml complains that Foo.bar does not match Package.Foo.bar. How do I convince it to unify the types?
<mfp> in fact aaa.cmxs + camomile.cmxs take around 3 MB, and a static hello world took 1.5 MB IIRC, because while the former includes everything in AAA and camomile, the latter only carries the AAA code actually used
<mfp> trav: should be similar to this > type a = { a : int };; type b = a = { a : int };;
<thelema> mfp: any reason not to have a bunch of batFoo.cmxs files?
<thelema> mfp: why declare the type twice?
<thelema> trav: why declare the type twice?
<mfp> it'd work (in fact, I recently tried that with a largish lib of mine with some 50 modules or so)
<mfp> it makes symbol resolution somewhat slower, but it's not too bad I guess (~40ms IIRC)
<thelema> mfp: startup cost, or runtime?
<mfp> startup only
<trav> thelema: the type is only declared once... the package module exports a value of the type and the user module has a record of the type but the package has the type of the value as Foo.bar and the user module has the type as Package.Foo.bar
<mfp> at runtime, there might be a diff in locality and hence cache hit rate, but there's not much you can do about it
<thelema> trav: functors?
<mfp> it'd be the same way for static vs. dynamic linking in C
<trav> thelema: no functors involved though these types are closed polymorphic variants
* thelema was thinking a bit about using lots of little dynamic libraries for aaa, but n/m
ulfdoz has quit [Read error: 110 (Connection timed out)]
<thelema> trav: is Foo.bar abstract?
<trav> thelema: how do you mean?
<mfp> thelema: what would we gain anyway by having one cmxs per module?
<thelema> or Package.Foo.bar
<mfp> (in my case, it was to make binary diffs between builds smaller)
<trav> It's not opaque
<thelema> mfp: apparently nothing.
<mfp> hmm
<thelema> trav: And there's only one type definition?
<mfp> it might allow to use libs linked against diff versions of the same lib at a time
<mfp> if you don't use the AAA module that refers to it
<trav> thelema: Foo has both an interface and an implementation file but they are identical for this type
<mfp> if AAA is a single .cmxs, you have to load everything at once, and there'll be a conflict
<thelema> trav: sure.
<mfp> w/ smaller .cmxs, the conflicting one might not be loaded (if not used by the program)
<mfp> but it's all quite convoluted
<thelema> bah, not worth the trouble, I think.
<mfp> I was thinking about having a aaa.inlining (or maybe aaa-inlining, since the former might not be doable with findlib) package
<thelema> inlining? Isn't that done later?
<mfp> which would make the .cmx visible and thus allow AAA routines to be inlined
<mfp> only if ocamlopt can find the cmx files
<mfp> -package aaa-inlining would just add a dir holding all the cmx to the compiler's include path
<trav> thelema: perhaps it is in my build options? Is there something special I need to do to get package types to include the package module?
<mfp> one reason not to install the cmx by default (= not enable inlining) is that it makes separate compilation easier (no need to recompile if the interface doesn't change)
<mfp> in particular, it'd allow to update AAA (if the interface for the used modules doesn't change) w/o having to recompile executables with dynamic linking executed with ld_ocaml
<mfp> Debian, Fedora & friends like that, as it makes security updates easier
<thelema> we can just recommend people build their own aaa if they want inlining.
munga_ has quit [Read error: 113 (No route to host)]
<mfp> they'll have to install the cmx files by hand too, then
<mfp> could add a install-inlining target
<thelema> trav: I don't know what your problem is - I can't see how build options would cause that, and package types... wait, your foo is inside a module inside Package?
<trav> thelema: yes
<thelema> trav: and you have an interface for that submodule?
<mfp> ah, I found a way to make aaa.inlining work
<trav> thelema: I do... and I just found it
<trav> the interface has the type Foo.bar
<trav> i am using OCamlMakefile which calls ocamlopt with -for-pack Package
<thelema> trav: does your interface for Package specify that Package.Foo.bar = Foo.bar?
<thelema> oh, hmmmm...
<trav> thelema: no... where would I do that?
<thelema> Do you have an interface for Package?
<trav> thelema: not an explicit one... but a cmi is generated
<thelema> it's probably ok, then.
<thelema> hmmm...
<thelema> How are you getting values of type Foo.bar when you're packing Foo inside Package?
_unK has quit [Remote closed the connection]
<trav> I open Package and then open Foo
<trav> and Foo has default_bar
<trav> of type bar
<trav> I just changed the Foo interface to [> `Baz ] instead of Foo.bar
<trav> and it works fine
<thelema> you had "type bar = Foo.bar" in Foo's interface?
<trav> Foo's interface has val default_bar = Foo2.bar
<trav> s/=/:/
<trav> aha! it is the ordering of compilation and sequencing of mli and ml files
suricator has quit []
noisetonepause has joined #ocaml
q[mrw] has left #ocaml []
poseidon has joined #ocaml
poseidon has left #ocaml []
noisetonepause has quit [Read error: 60 (Operation timed out)]
valross has joined #ocaml
eldragon has left #ocaml []
thrasibule has joined #ocaml
lutter has quit ["Leaving."]
struktured_ is now known as struktured
thrasibule has quit [Read error: 110 (Connection timed out)]
tensorpudding has quit [Remote closed the connection]
ulfdoz has joined #ocaml
<palomer> oh lord, haskell has overtaken us in the shootout
ttamttam has joined #ocaml
<Leonidas> palomer: yep, I was really surprised how well GHC has developed
<Leonidas> I just don't know how idiomatic the haskell-solutions are.
<Leonidas> I wonder, why is this happening: http://paste.pocoo.org/show/156282/ ?
<Leonidas> s1 and s2 are equal and yet the guard passes
<mrvn> Leonidas: != != <>
<Leonidas> eeek
<mrvn> Since strings are mutable the compiler can not optimize string literals into the same value.
<Leonidas> ok, at least it wasn't my question originally ;)
* Leonidas posted the answer into our student forum
<Leonidas> thanks
ttamttam has quit ["Leaving."]
ulfdoz has quit [Read error: 110 (Connection timed out)]
Submarine_ has joined #ocaml
minddog has joined #ocaml
tmaedaZ is now known as tmaeda