gildor changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | OCaml 3.12.0 http://bit.ly/aNZBUp
avsm has joined #ocaml
avsm1 has quit [Read error: Connection reset by peer]
philtor has quit [Read error: Operation timed out]
ymasory has joined #ocaml
rixed has joined #ocaml
Tianon has quit [Ping timeout: 252 seconds]
emmanuelux has quit [Quit: Ex-Chat]
avsm1 has joined #ocaml
avsm has quit [Read error: Connection reset by peer]
rwmjones has quit [Read error: Operation timed out]
rwmjones has joined #ocaml
Tianon has joined #ocaml
Tianon has quit [Changing host]
Tianon has joined #ocaml
avsm1 has quit [Quit: Leaving.]
boscop_ has joined #ocaml
boscop has quit [Ping timeout: 246 seconds]
ymasory has quit [Quit: Leaving]
lopex has quit []
olauzon has quit [Quit: olauzon]
lamawithonel has joined #ocaml
dnolen has joined #ocaml
mjonsson has joined #ocaml
joewilliams is now known as joewilliams_away
elehack has joined #ocaml
elehack has quit [Quit: Farewell, programs.]
everyonemines has left #ocaml []
vivanov has joined #ocaml
mlh has joined #ocaml
wormphlegm has joined #ocaml
hnrgrgr_ has joined #ocaml
Derander has quit [*.net *.split]
hnrgrgr has quit [*.net *.split]
mjonsson has quit [Remote host closed the connection]
Derander has joined #ocaml
dnolen has quit [Quit: dnolen]
joewilliams_away is now known as joewilliams
smrz has joined #ocaml
ankit9 has joined #ocaml
ulfdoz has joined #ocaml
lamawithonel has quit [Remote host closed the connection]
smrz has quit [Quit: Computer has gone to sleep.]
wormphlegm has quit [Ping timeout: 252 seconds]
jderque has joined #ocaml
joewilliams is now known as joewilliams_away
Rolands has joined #ocaml
ulfdoz has quit [Read error: Operation timed out]
Snark has joined #ocaml
hto_ has quit [Read error: Operation timed out]
ankit9 has quit [Quit: Leaving]
ygrek has joined #ocaml
Rolands has quit [Read error: Operation timed out]
Rolands has joined #ocaml
vivanov has quit [Quit: Lost terminal]
mcclurmc_ has joined #ocaml
ygrek has quit [Ping timeout: 246 seconds]
ftrvxmtrx has quit [Quit: This computer has gone to sleep]
ankit9 has joined #ocaml
Rolands has quit [Ping timeout: 276 seconds]
ikaros has joined #ocaml
vivanov has joined #ocaml
jderque has quit [Quit: leaving]
impy has quit [Ping timeout: 248 seconds]
impy has joined #ocaml
ikaros has quit [Quit: Ex-Chat]
ftrvxmtrx has joined #ocaml
larhat has joined #ocaml
Rolands has joined #ocaml
edwin has joined #ocaml
ankit9 has quit [Remote host closed the connection]
boscop_ has quit [Ping timeout: 246 seconds]
boscop_ has joined #ocaml
ankit9 has joined #ocaml
ankit9_ has joined #ocaml
ankit9_ has quit [Client Quit]
Rolands has quit [Ping timeout: 240 seconds]
ankit9 has quit [Quit: Leaving]
jderque has joined #ocaml
ankit9 has joined #ocaml
Cyanure has joined #ocaml
ygrek has joined #ocaml
hto has joined #ocaml
Rolands has joined #ocaml
munga has joined #ocaml
hto has quit [Read error: Operation timed out]
hto has joined #ocaml
ygrek has quit [Ping timeout: 246 seconds]
vivanov has quit [Ping timeout: 240 seconds]
lopex has joined #ocaml
_andre has joined #ocaml
joelr has joined #ocaml
<joelr> good day
<joelr> does anybody know what this refers to? happens when a camlp4 syntax tag is added to _tags
<joelr> ocamlfind: When using -syntax, the META variable 'preprocessor' must be set
<joelr> e.g. after <src/doc_upload/*.ml>: syntax_camlp4o
<joelr> gildor: ^
<joelr> ah, this is because a package is missing
vivanov has joined #ocaml
hto has quit [Ping timeout: 250 seconds]
alexgordon has left #ocaml []
jderque has quit [Quit: leaving]
avysk has quit [Read error: Operation timed out]
emmanuelux has joined #ocaml
emmanuelux has quit [Remote host closed the connection]
avysk has joined #ocaml
emmanuelux has joined #ocaml
<flux> one of the most annoying misfeatures of ocamlbuild
hto has joined #ocaml
<flux> missing packages result in obscure errors
<adrien> that one was from ocamlfind actually, it's not very clear but it can't be worse than ocamlbuild silently skipping non-existing packages
hnrgrgr_ has quit [Remote host closed the connection]
ftrvxmtrx has quit [Ping timeout: 260 seconds]
petebu has left #ocaml []
hnrgrgr has joined #ocaml
ftrvxmtrx has joined #ocaml
ankit9 has quit [Quit: Leaving]
ankit9 has joined #ocaml
_andre has quit [Quit: leaving]
_andre has joined #ocaml
jamii has quit [Ping timeout: 246 seconds]
ankit9 has quit [Quit: Leaving]
ankit9 has joined #ocaml
ankit9 has quit [Quit: Leaving]
dnolen has joined #ocaml
rby has joined #ocaml
smerz has joined #ocaml
dnolen has quit [Quit: dnolen]
larhat has quit [Quit: Leaving.]
ikaros has joined #ocaml
Rolands has quit [Ping timeout: 260 seconds]
ankit9 has joined #ocaml
ymasory has joined #ocaml
lopex has quit []
joelr has quit [Quit: joelr]
jderque has joined #ocaml
joewilliams_away is now known as joewilliams
lopex has joined #ocaml
joelr has joined #ocaml
joelr has quit [Client Quit]
<NaCl> how could I go about making mutually recursive modules and get ocamlbuild to be happy about them?
<hcarty> NaCl: I haven't used recursive modules before, but I think they need to be defined in a single .ml file
<NaCl> It's more like I have two files that reference each other
<hcarty> I don't think that it is possible to compile that, but I may be wrong.
<NaCl> tricky
* NaCl is relatively new to ocaml and was hoping not to get down into the guts like this
mal`` has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
<thelema> NaCl: you can have mutually recursive modules within one file, but separate compilation + mutual recursion = error
<thelema> try to change your design so the two files don't reference each other.
<NaCl> hmmmm
<NaCl> I'm going to have to think on this
mal`` has joined #ocaml
<NaCl> I know how I could do it, but it wouldn't make too much sense
<NaCl> or...
<thelema> what are you trying to do?
<NaCl> Well, the first problem I had I think I could fix by moving some type declarations to a separate file.
<thelema> yes, usually you should put the common type declarations in its own file
<NaCl> Actually, that may solve the problem.
* NaCl is translating C into ocam
<NaCl> l
avsm has joined #ocaml
<NaCl> thelema: yeah, I think the solution is spreading some stuff out. Let's see if that works
mlh has quit [Ping timeout: 250 seconds]
mlh has joined #ocaml
philtor has joined #ocaml
oriba has joined #ocaml
oriba has left #ocaml []
<NaCl> Just when I'm about to complain about a difficulty I'm having, I find a solution for it
<thelema> the task of trying to explain your problem to complain about it helps a lot in terms of realizing what the solution to the problem is.
<NaCl> indeed
<NaCl> the problem is: I am making a Ray Tracer. Scene specifications contain Lights. Lights need to call the scene "intersect with the primitive list" routine
<NaCl> both are in two files, and call each other.
<thelema> put the types for both in one file, and have lights depend on scene.
<NaCl> and looking at my C++ implementation of this thing, that list is supposed to be a tree, and not even called from this file.
<thelema> or realize that the "lights calling the scene" code can be in the scene file
<NaCl> yeah, it can
<NaCl> I haven't gotten to shadows yet, but they're going to pop up eventually
<thelema> you're thinking OO, where code that works on lights *must* be in the lights class
ygrek has joined #ocaml
<NaCl> yeah
<NaCl> I'm trying to learn functional programming. Unfortunately, I may not be able to use it much.
thieusoai has joined #ocaml
alexgordon has joined #ocaml
alexgordon has left #ocaml []
hto has quit [Quit: Lost terminal]
hto has joined #ocaml
mfp has quit [Read error: Connection reset by peer]
mfp has joined #ocaml
lpereira has joined #ocaml
ftrvxmtrx has quit [Quit: This computer has gone to sleep]
olauzon has joined #ocaml
strlen has quit [Quit: switching to erc]
strlen has joined #ocaml
Associat0r has joined #ocaml
Associat0r has quit [Changing host]
Associat0r has joined #ocaml
ulfdoz has joined #ocaml
sepp2k has joined #ocaml
ygrek has quit [Ping timeout: 246 seconds]
lpereira has quit [Quit: Leaving.]
ftrvxmtrx has joined #ocaml
hto_ has joined #ocaml
lamawithonel has joined #ocaml
hto has quit [Ping timeout: 260 seconds]
munga has quit [Read error: Operation timed out]
joelr has joined #ocaml
<joelr> folks, how do i get ocamlopt to show me the assembly code?
<thelema> -S
<joelr> thelema: this is after all optimizations are applied, right? by ocamlopt
<thelema> yes, it's the final assembly
<joelr> thelema: thanks
<joelr> thelema: trying to optimize math here
<thelema> there's no intermediate assembly generated, all optimizations are done to a different representation
<adrien> "after all optimizations are applied": yeah, after all 3 of them :P
<joelr> hehe
<joelr> thelema: is there unsafe array access?
<thelema> Array.unsafe_get arr idx
<thelema> you can turn all array access unsafe with -unsafe
<joelr> aha!
<thelema> -unsafe No bounds checking on array and string access
<joelr> awesome, thanks
<joelr> trying to optimize this http://pastie.org/1922909
<joelr> by looking at the output from ocamlopt -dcmm
<joelr> haven't looked at the assembly yet
<thelema> acc := +. d1 +. d2
<thelema> does this even compile?
<joelr> err
<joelr> it does :D
<thelema> I thought the patches to add unary + were just added to the devel branch
<joelr> it drops that first plus, though
<joelr> the truly interesting part is that the second version i have does not allocate on every loop iteration
<joelr> thelema: check it out
<joelr> same pastie, just edited
<thelema> try comparing your function with [let rec js_div1 v1 v2 acc i = if i >= Array.length v1 then ((L4-L8)) in js_div1 v1 v2 (acc +. d1 +. d2) (i+1) else acc]
<thelema> err, i < Array.length v1
<thelema> yes, there's some wierd rules on float boxing, maybe if you change L11 to (!acc + 0.) it'll avoid allocation in the first implementation
<joelr> thelema: loops are faster than recursive functions, e.g. there's no boxing
DimitryKakadu has joined #ocaml
<joelr> thelema: is there an unsafe length function?
<thelema> huh?
<thelema> what would that do differently?
<joelr> :D
<joelr> never mind, my bad
sepp2k has quit [Quit: Leaving.]
<flux> maybe it could unsafely work on any data type.. ;)
yezariaely has joined #ocaml
hto_ has quit [Ping timeout: 260 seconds]
yezariaely has left #ocaml []
<thelema> with an array size of 500K instead of 500, the differences between 1a, 2 and 3 disappear
mcclurmc_home has joined #ocaml
Snark has quit [Quit: Ex-Chat]
jderque has quit [Quit: leaving]
ankit9 is now known as ankit9|zzz
<joelr> thelema: looking
<joelr> thelema: we use arrays of 150 elements
<joelr> thelema: i didn't know about the benchmark package, thanks a lot!
Associat0r has quit [Quit: Associat0r]
<joelr> thelema: this gives me some fine ideas for benchmarking, actually
<joelr> thelema: because in the code that uses this the arrays v2 are stored in a record in a hash table so memory access should be all over the place
<joelr> i would like to try to stick the floats into a memory-mapped float file instead, and get hold of them via Bigarray.Array1.map_file + unsafe_get
avsm has quit [Quit: Leaving.]
Associat0r has joined #ocaml
hto has joined #ocaml
vivanov has quit [Read error: Connection reset by peer]
elehack has joined #ocaml
lamawithonel_ has joined #ocaml
lamawithonel has quit [Ping timeout: 264 seconds]
avsm has joined #ocaml
ulfdoz_ has joined #ocaml
ulfdoz has quit [Ping timeout: 240 seconds]
ulfdoz_ is now known as ulfdoz
joelr has quit [Quit: joelr]
Associat0r has quit [Quit: Associat0r]
ymasory has quit [Quit: Leaving]
_andre has quit [Quit: leaving]
edwin has quit [Remote host closed the connection]
joelr_ has joined #ocaml
joelr_ has quit [Client Quit]
mcclurmc_home has left #ocaml []
DimitryKakadu has quit [Remote host closed the connection]
smerz has quit [Quit: Ex-Chat]
Tianon has quit [Read error: Operation timed out]
ymasory has joined #ocaml
alpounet has quit [Read error: Operation timed out]
alpounet has joined #ocaml
avsm has quit [Quit: Leaving.]
boscop_ is now known as boscop
waern has joined #ocaml
ikaros has quit [Quit: Ex-Chat]
elehack has quit [Quit: Farewell, programs.]
jonafan has quit [Ping timeout: 252 seconds]
lamawithonel_ has quit [Ping timeout: 246 seconds]
lopex has quit []
lamawithonel_ has joined #ocaml
lopex has joined #ocaml
ymasory has quit [Quit: Leaving]
Amorphous has quit [Ping timeout: 240 seconds]
bzzbzz_ has joined #ocaml
alp_ has joined #ocaml
__mattam__ has joined #ocaml
jonafan has joined #ocaml
alpounet has quit [*.net *.split]
bzzbzz has quit [*.net *.split]
mattam has quit [*.net *.split]
alp_ is now known as alpounet
Amorphous has joined #ocaml
dnolen has joined #ocaml
joewilliams is now known as joewilliams_away
jonafan has quit [Quit: leaving]
mjonsson has joined #ocaml
ymasory has joined #ocaml