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
mjs22 has left #ocaml []
mlak has left #ocaml []
modec_ has joined #ocaml
modec_ has quit [Client Quit]
jmou has joined #ocaml
julm has quit [Nick collision from services.]
jmou is now known as julm
modec has quit [Read error: 113 (No route to host)]
hkBst has quit [Read error: 104 (Connection reset by peer)]
Amorphous has quit [Read error: 110 (Connection timed out)]
modec has joined #ocaml
Amorphous has joined #ocaml
verte has joined #ocaml
seafood has joined #ocaml
seafood__ has joined #ocaml
seafood_ has quit [Read error: 104 (Connection reset by peer)]
seafood has quit [Read error: 60 (Operation timed out)]
willb has quit [Read error: 110 (Connection timed out)]
willb has joined #ocaml
jeddhaberstro has joined #ocaml
Submarine has quit [Read error: 110 (Connection timed out)]
ski__ has quit [Remote closed the connection]
ski__ has joined #ocaml
schmx has quit [Remote closed the connection]
schmx has joined #ocaml
julm has quit [Read error: 60 (Operation timed out)]
bluestorm has quit [Remote closed the connection]
julm has joined #ocaml
seafood has joined #ocaml
seafood_ has joined #ocaml
seafood__ has quit [Remote closed the connection]
seafood_ has quit [Client Quit]
qwr has joined #ocaml
seafood has quit [Read error: 60 (Operation timed out)]
seafood has joined #ocaml
mlak has joined #ocaml
cmeme has joined #ocaml
aldebrn has quit [Read error: 110 (Connection timed out)]
sporkmonger has joined #ocaml
<sporkmonger> what's the most convenient way to tokenize a string such as "123340:netzpirat/radiant-scoped-admin-extension,2009-02-27,53611" in OCaml? In this particular case, the final integer is optional, so it may or may not be present (IE, string might also be "123340:netzpirat/radiant-scoped-admin-extension,2009-02-27")
<sporkmonger> because i've basically been making a bunch of calls to String.index and i can't help but suspect there's a cleaner way of doing it
modec_ has joined #ocaml
modec has quit [Read error: 104 (Connection reset by peer)]
mlak has left #ocaml []
mlak has joined #ocaml
verte_ has joined #ocaml
verte has quit [Nick collision from services.]
verte_ is now known as verte
seafood has quit []
<qwr> sporkmonger: Str.split (Str.regexp "[:,]")?
<sporkmonger> hmm, honestly, that hadn't occurred to me, but yeah, that could work because the "netzpirat/radiant-scoped-admin-extension" bit has a restricted character set
<sporkmonger> man, type errors are so much harder to debug when you're tired
modec_ has quit []
BiDOrD has quit [Read error: 110 (Connection timed out)]
mlak has left #ocaml []
seafood_ has joined #ocaml
seafood__ has joined #ocaml
seafood_ has quit [Read error: 110 (Connection timed out)]
jeddhaberstro has quit [Client Quit]
modec has joined #ocaml
modec_ has joined #ocaml
modec has quit [Read error: 104 (Connection reset by peer)]
Submarine has joined #ocaml
Lomono has joined #ocaml
bmoll8 has joined #ocaml
bmoll8 has left #ocaml []
bmoll8 has joined #ocaml
<bmoll8> is anyone here using ocaml for scientific computing
lutter has joined #ocaml
bluestorm has joined #ocaml
julm has quit [Read error: 110 (Connection timed out)]
<tsuyoshi> bmoll8: yes, I am
bmoll8 has quit ["leaving"]
modec_ has quit []
modec has joined #ocaml
julm has joined #ocaml
kaustuv has joined #ocaml
julm has quit [Read error: 110 (Connection timed out)]
hkBst has joined #ocaml
julm has joined #ocaml
lutter has quit [bartol.freenode.net irc.freenode.net]
seafood__ has quit [bartol.freenode.net irc.freenode.net]
wysek has quit [bartol.freenode.net irc.freenode.net]
bohanlon has quit [bartol.freenode.net irc.freenode.net]
Camarade_Tux has quit [bartol.freenode.net irc.freenode.net]
LeCamarade|Away is now known as LeCamarade
marteo has joined #ocaml
lutter has joined #ocaml
wysek has joined #ocaml
Camarade_Tux has joined #ocaml
bohanlon has joined #ocaml
rwmjones has joined #ocaml
<sporkmonger> if you have a list, [1;2;3], what's the simplest way to get the string "1,2,3"?
<sporkmonger> List.join "," [1;2;3] sure would be nice :-/
<sporkmonger> though i'm sure that'd cause type issues
<kaustuv> String.concat ";" (List.map string_of_int [1 ; 2 ; 3])
<sporkmonger> ah, nice
<sporkmonger> and sure enough, the int bit is the problem :-)
julm has quit [Read error: 110 (Connection timed out)]
kaustuv_ has joined #ocaml
kaustuv has quit [Nick collision from services.]
kaustuv_ is now known as kaustuv
bluestorm has quit [Remote closed the connection]
schmx has quit ["leaving"]
schme has joined #ocaml
julm has joined #ocaml
Lomono has quit []
sramsay has joined #ocaml
filp has joined #ocaml
Lomono has joined #ocaml
Lomono has left #ocaml []
modec_ has joined #ocaml
modec__ has joined #ocaml
modec_ has quit [Read error: 54 (Connection reset by peer)]
modec has quit [Read error: 60 (Operation timed out)]
lutter has quit ["Leaving."]
modec__ has quit [Read error: 110 (Connection timed out)]
Jedai has joined #ocaml
smimou has joined #ocaml
<Camarade_Tux> hmmm, I noticed the benchmarks on the programming languages shootout used default Gc parameters, I set the minor_heap_size of the binary trees benchmark to 1MB instead of 32KB and got a 33% improvement (50s before and 33s now)
<Camarade_Tux> anyone know why this isn't used
<Camarade_Tux> ?
<flx_> maybe it's considered cheating?
<Camarade_Tux> that would be strange
<Camarade_Tux> iirc it should be as big as the L2 cache (maybe L3+L2 when you have L3), having something to automatically find that size would be nice
palomer has joined #ocaml
<palomer> hello
<palomer> I've got a bunch of .ml files and some .mli files. How do I compile my .mli files into .cmi files?
<flx_> I'd use make *.mli(#q:s/\.mli/.cmi/)
<flx_> (with zsh and extended glob)
<flx_> possible make `ls *.mli | sed 's/mli$/cmi/'` as a more portable solution
<flx_> s/le/ly/
<palomer> err, what does that do?
<flx_> given files foo.mli and bar.mli invokes make foo.cmi bar.cmi
<flx_> and the Makefile should handle the rest
<palomer> my makefile doesn't handle anything at the moment
<flx_> well, make use of ocamlc -c directly then
<flx_> it will compilcate things a bit, you need to use a for-loop
<flx_> too bad make rules for .cmi-files aren't that simple, given the possibility of a .mli-file not being there..
<palomer> a for loop?
<palomer> why?
<flx_> for a in *.mli; do ocamlc -c $a; done
<palomer> and the mli file has to have the same name as the .ml file, right?
<flx_> yes
<palomer> how does ocaml associate a .cmi to a .cmx ?
<palomer> it simply checks at compile time?
<palomer> so you could extract a .cmi from a .cmx?
<flx_> well, you don't need either of the files at compile time, so it must be.. ?
<flx_> hm, I don't think so
<flx_> I think you can compile them both separately
<flx_> but if an .cmi-file exists, it will be checked when compiling the .ml
<flx_> well, except if you compile .ml with the .cmi, you will get a .cmi
<flx_> actually it might be that you get it when you compile it without the .mli an .cmi gets generated
<flx_> but in principle if an .mli-file exists, plain .ml/.cmo/.cmx is not enough to create a .cmi; after all, the .cmi-file might limit the visibility of some sybols
<palomer> my mli files are just public interfaces, I don't want them to be used when compiling my .ml file. This is a problem because ocaml will use them when compiling my .ml files, right?
<flx_> I just compiled foo.mli and foo.ml separately and copied the .cmi and .cmo-files into the same directory, and atleast I could #load them from the toplevel
<palomer> but you could create the most general .cmi from a .cmx
<flx_> perhaps
<flx_> but you get the .cmi file anyway during compilation
<flx_> if you don't have a .mli-file
<palomer> can you specifically tell ocamlc not to use foo.mli ?
<flx_> I don't think so
<palomer> so I need to compile them in different directories?
<flx_> so are you wanting to do this for debugging purposes?
<palomer> I'm doing this to produce ocamldocs
<flx_> hmm
<palomer> and have my users be able to browse the .mli files
<flx_> you want a separate set of .mli-files for ocamldocs?
<palomer> yeah
<palomer> and so my users can browse them
<flx_> why not just use the same .mli-files all the time?
<palomer> because there are some functions which are used in my .ml files
<palomer> which I don't want to be visible
<flx_> you don't want them to apears in the generated documentation?
<palomer> Foo.ml can contain functions foo and foo2 and Bar.ml has a function bar which uses foo and foo2 but I don't want foo2 to be visible to my users
<palomer> so Foo.mli will only contain foo
LeCamarade is now known as LeCamarade|Away
<palomer> however, if I do this, I won't be able to compile Bar.ml
<flx_> I don't think you can really limit intermodule visibility atleast in that way..
<flx_> the user can simply extract the signature from your .cmi-files if he so wishes
<flx_> because in the end I think you must provide the 'real' .cmi-files which have been used to compile your modules
<flx_> otherwise the compiler will complain
<flx_> you know about cmigrep, right?
<palomer> nope
<palomer> but the signature of my .cmi file has too much stuff
<flx_> what may be possible is to provide only the .cmo-files of a module.. but during compiling your own project you've had access to the .cmi-files
<flx_> that should effectively limit the module out of user's access
<flx_> not sure if it's worth the trouble though
<flx_> perhaps easier just to document that function foo is for private use only, don't touch. also it may be possible to tell ocamldocs not to document the function.
<flx_> or maybe you can use a preprocessor with your .mli-files: cpp foo.mli.template -DPRIVATE or -DPUBLIC > foo.mli
<palomer> cpp ?
<flx_> cpp, the c preprocessor: #ifdef PUBLIC .. #else.. #endif.. #ifndef PUBLIC.. etc
<palomer> but...I thought it was possible to compile the .mli seperately
<flx_> yes.. but I thought the concern was what the user sees when he's browsing the documentation
verte has quit [Read error: 110 (Connection timed out)]
<palomer> yeah, so I can just compile my modules with one set of .mli and then present my users with another set, no?
<flx_> yes
verte has joined #ocaml
<flx_> the user doesn't need to compile the .mli files ever
<flx_> well, during the installation perhaps
<flx_> but not after that
<palomer> and then as a safety precaution I can compile the other set of .mli files with my .ml files to make sure they match
<palomer> how do I check if a .mli matches a .ml file?
<flx_> compile them?
<palomer> with ocamlc -c?
<flx_> yes
<palomer> won't that compile the .ml file too?
<flx_> what harm is in that?
<palomer> takes a lot of time
<palomer> I wonder how other projects grapple with this problem
<flx_> I think you are just making a problem of it ;-)
<palomer> another solution is to have another set of .ml and .mli files
<flx_> module Private = struct (** don't use these *) end
<palomer> are you telling me that other projects publish their helper functions?
<flx_> besides, the generated documentation can be useful for the developers too
<flx_> which will want to see the private parts
<palomer> in my case the public functions are about 10% of all functions
bombshelter13_ has joined #ocaml
<palomer> so it would be 90% ugly noise
<palomer> I'm sure other projects are similar
LeCamarade|Away has quit [Read error: 104 (Connection reset by peer)]
<palomer> I don't see any private functions in extlib's documentation, for example
<flx_> does it have intermodule private functions then?
<flx_> maybe the helper functions are in a single module that's invisible
<flx_> or otherwise in the same module, invisible also
<palomer> good point
<palomer> I'll have to ask thelema when he gets online
<Camarade_Tux> using a minor_heap_size of 1MB for the shootout is a clear improvement on regex-dna and binary-tree (between 25 and 35%)
<flx_> camarade_tux, btw, are the problems big enough that they just don't avoid doing GC with that setting?
<Camarade_Tux> I tried setting that param for binary-trees (160MB), k-nucleotide (570MB) and regex* (400MB)
<Camarade_Tux> and minor_heap_size helps allocation afaik
palomer has quit [Remote closed the connection]
mishok13 has quit ["Stopping IRC chat... [OK]"]
palomer has joined #ocaml
<palomer> so...who wants to try OSET?
<palomer> it's fun AND exciting
willb has quit [Remote closed the connection]
willb has joined #ocaml
LeCamarade has joined #ocaml
jeddhaberstro has joined #ocaml
* palomer eyes LeCamarade
amuck_ has joined #ocaml
<LeCamarade> palomer, Why?
<LeCamarade> :o)
<Camarade_Tux> :)
<palomer> need someone to check out the OSET manual before I present to the world
<LeCamarade> :-o
<palomer> just to make sure I don't make a fool of myself
LeCamarade has quit [Client Quit]
* palomer also eyes Camarade_Tux
<Camarade_Tux> I'm slacking, on holidays at last :)
<palomer> should I interpret that as "I have free time" or "I just want to relax!"
<Camarade_Tux> as "I'm taking some free time now but I actually have things to do"
<Camarade_Tux> finding a place to sleep in next month being one :D
<palomer> pick one of the 2 choices!
<Camarade_Tux> third! :p
<palomer> ok, pick one of these two: a. want; b. don't want
LeCamarade has joined #ocaml
<Camarade_Tux> c. later
<Camarade_Tux> :D
<LeCamarade> palomer, How is it now?
<palomer> how is what now?
<LeCamarade> Oh, so it wasn't about my chat profile? ... Cool! Nothing!
<LeCamarade> So, about the manual ... ?
<palomer> wanna try it out?
<palomer> it'll be fun!
<LeCamarade> Hmm ...
<palomer> watch the video (in HD) before deciding
<LeCamarade> palomer, This stuff looks quite cool!
<LeCamarade> But I doubt it is "rather easy", as the username says ... :o0
<palomer> it really is!
<palomer> http://code.google.com/p/oset/ <-- just download it
<LeCamarade> Damn it, this new system is hard to install. I'll be right back.
LeCamarade has left #ocaml []
verte has quit ["~~~ Crash in JIT!"]
<maxote> what's oset?
<palomer> http://sites.google.com/site/rathereasy/oset/manual <-- let's you build graphical user interfaces like in the video
<palomer> so called "structure editors"
<palomer> interested in learning more?
modec has joined #ocaml
filp has quit ["Bye"]
<palomer> well, I'm off
<palomer> chao!
palomer has quit [Remote closed the connection]
rwmjones has quit [Read error: 60 (Operation timed out)]
modec_ has joined #ocaml
modec has quit [Read error: 104 (Connection reset by peer)]
travisbrady has joined #ocaml
amuck_ has quit [Client Quit]
modec_ has quit [Read error: 110 (Connection timed out)]
amuck_ has joined #ocaml
Modius has quit [Read error: 60 (Operation timed out)]
Modius has joined #ocaml
modec has joined #ocaml
amuck_ has quit []
aldebrn has joined #ocaml
bluestorm has joined #ocaml
amuck_ has joined #ocaml
smimou has quit [Read error: 110 (Connection timed out)]
ulfdoz has joined #ocaml
smimou has joined #ocaml
smimou has quit ["bli"]
modec_ has joined #ocaml
jli has quit ["leaving"]
LeCamarade has joined #ocaml
modec has quit [Read error: 113 (No route to host)]
LeCamarade is now known as LeCamarade|Away
amuck_ has quit [Client Quit]
amuck_ has joined #ocaml
r0bby has quit [Client Quit]
r0bby has joined #ocaml
ofaurax has joined #ocaml
jeddhaberstro has quit [Client Quit]
julm has quit [Success]
julm has joined #ocaml
jeddhaberstro has joined #ocaml
Associat0r has joined #ocaml
modec_ has quit []
ofaurax has quit ["Leaving"]
jeddhaberstro has quit [Client Quit]
<Camarade_Tux> hmm, the cross-compiler wasn't likely to succeed running a win32 executable on linux
sramsay has quit [Remote closed the connection]
sporkmonger_ has joined #ocaml
bombshelter13_ has quit []
<Camarade_Tux> what annoys me most for a cross-compiling ocaml is flexdll/flextool
<Camarade_Tux> (for windows)
sporkmonger has quit [Read error: 110 (Connection timed out)]
animist has quit [Remote closed the connection]
schme is now known as schmx
Associat0r has quit []
cmeme has quit [Read error: 104 (Connection reset by peer)]
bombshelter13_ has joined #ocaml
bombshelter13_ has quit [Client Quit]
cmeme has joined #ocaml
hkBst has quit [Read error: 104 (Connection reset by peer)]
bluestorm has quit [Remote closed the connection]
marteo has quit [Remote closed the connection]
Submarine has quit [Read error: 110 (Connection timed out)]
rwmjones-afk has quit [Remote closed the connection]
amuck_ has quit [Client Quit]
jeddhaberstro has joined #ocaml
modec has joined #ocaml