00:17
postalchris has quit ["Leaving."]
00:36
mbishop has quit ["Leaving"]
00:44
mikeX has quit ["leaving"]
01:01
david_koontz has quit ["Leaving"]
01:36
metaperl has joined #ocaml
01:36
<
metaperl >
anyone have alink to ICFP 2007 programming contest?
01:38
Z4rd0Z has joined #ocaml
01:42
<
metaperl >
scruffie: thanks
03:18
metaperl has left #ocaml []
04:06
pants1 has quit [Read error: 110 (Connection timed out)]
05:10
Smerdyakov has quit ["Leaving"]
05:34
Mr_Awesome has quit ["...and the Awesome level drops"]
05:39
dark_light has quit [Connection timed out]
06:05
Z4rd0Z has joined #ocaml
06:05
Z4rd0Z has quit [Client Quit]
06:09
mbishop has joined #ocaml
06:12
alkoma has joined #ocaml
06:12
alkoma has left #ocaml []
06:34
Submarine has quit [Remote closed the connection]
06:39
benny_ has joined #ocaml
06:47
benny has quit [Read error: 145 (Connection timed out)]
07:02
smimou has joined #ocaml
07:18
pstickne_ has quit [Connection timed out]
07:20
pstickne_ has joined #ocaml
07:35
scruffie has quit []
07:47
bluestorm_ has joined #ocaml
08:10
love-pingoo has joined #ocaml
08:53
bluestorm_ has quit ["Konversation terminated!"]
09:18
bluestorm_ has joined #ocaml
09:26
rickardg has joined #ocaml
09:29
rickardg has left #ocaml []
09:31
bluestorm_ has quit [Remote closed the connection]
09:45
MarcWeber has joined #ocaml
09:49
<
MarcWeber >
Is there a cross-platform gui library (binding) for ocaml ?
10:24
<
mattam >
lablgtk is cross-platform
10:26
zhllg has quit [Read error: 110 (Connection timed out)]
10:44
danly has joined #ocaml
10:46
danly_ has quit [Read error: 60 (Operation timed out)]
10:46
<
MarcWeber >
Hi mattam. Thanks. Then I missunderstood another post. only open gl is unmantained, not the whole lablgtk. All right.
11:34
malc_ has joined #ocaml
11:58
yangsx has joined #ocaml
12:06
slipstream has joined #ocaml
12:09
slipstream-- has quit [Read error: 145 (Connection timed out)]
12:34
junis has joined #ocaml
12:34
<
junis >
how does one concatenate strings in ocaml
12:35
yangsx has left #ocaml []
12:36
<
junis >
is there a F# forum on freenode network?
12:36
<
junis >
i cannot find one
12:39
<
junis >
is there a F# channel on freenode...
12:47
Z4rd0Z has joined #ocaml
12:51
<
junis >
what is its name.. i cannot find it
12:54
<
junis >
why!.. there is none there...
12:55
<
malc_ >
there's a chanbot there, be positive
12:55
<
junis >
hehe... .o)
12:55
<
malc_ >
saceni >B) /ctcp malc_ version
13:05
<
junis >
what is the type of printf;; in ocaml... i have not ocaml installed here... can someone help me...
13:06
<
flux >
printf is magic in ocaml
13:06
<
flux >
its type is ('a, out_channel, unit) format -> 'a
13:06
<
flux >
and no, you can't really do a printf-like-function yourself
13:06
<
flux >
but you can use the pre-existing to write your own printf-redirections with ksprintf
13:08
<
junis >
how does one print a string in ocaml?...
13:09
<
flux >
print_endline "hello world" is one option, although I usually use Printf.printf "hello world\n%!"
13:36
malc__ has joined #ocaml
13:39
<
junis >
is there not a print_string : string -> unit = <fun:clo@0_3> in ocaml
13:40
<
gim >
# print_string;;
13:40
<
gim >
- : string -> unit = <fun>
13:48
malc_ has quit [Read error: 110 (Connection timed out)]
14:08
gim has quit [Remote closed the connection]
14:21
zhllg has joined #ocaml
14:30
<
fremo >
funny: val (*) : int -> int -> int
14:30
<
fremo >
(to me at least :)
14:31
<
flux >
it is, infact, a bit funny
14:31
<
flux >
because you can't type (*) in ocaml and get the same result
14:31
<
flux >
but the amusement value is limited ;)
14:33
<
junis >
let unt_1 = fun x -> ();;
14:33
<
junis >
woops... i'm sorry
14:52
zhllg has quit [Read error: 110 (Connection timed out)]
14:53
zhllg has joined #ocaml
15:04
cjeris has joined #ocaml
15:18
gim has joined #ocaml
15:22
pango has quit [Remote closed the connection]
15:26
Smerdyakov has joined #ocaml
15:29
pango has joined #ocaml
15:44
bluestorm_ has joined #ocaml
16:20
love-pingoo has quit ["Leaving"]
16:59
Submarine has joined #ocaml
17:39
love-pingoo has joined #ocaml
18:14
jacobian has quit [Remote closed the connection]
18:16
jacobian has joined #ocaml
19:16
Mr_Awesome has joined #ocaml
19:18
mnemonic has joined #ocaml
19:24
vital303 has joined #ocaml
19:27
gim has quit [Remote closed the connection]
19:33
mikeX has joined #ocaml
19:48
<
love-pingoo >
my app spends 20% of its time in Array.blits ...
19:48
<
love-pingoo >
the overall perf is not too bad, but that's a sad figure
19:48
<
love-pingoo >
the next line in the profiling result is 16% for vorbis encoding
19:48
<
love-pingoo >
that should be the most costly thing
19:49
<
flux >
what does the app do?-o
19:49
<
love-pingoo >
it's liquidsoap, on a conf that reads a mp3 and outputs vorbis to icecast
19:49
<
flux >
so where does it need Array.blit? it copies audio buffers around?
19:49
<
flux >
don't do that ;)
19:50
<
love-pingoo >
I wish I could, but that doesn't seem that simple.
19:50
<
love-pingoo >
liquidsoap internally works on fixed-length buffers
19:51
<
flux >
so why are the audio buffers copied around?
19:51
<
love-pingoo >
but I can't tell libmad that I want a fixed amount of output data
19:51
<
flux >
are they postprocessed?
19:51
<
love-pingoo >
so I have to have an intermediate structure for filling my internal buffers from the chunks that mad gives me
19:51
<
flux >
are the array contents modified?
19:52
<
love-pingoo >
they can be, yes
19:52
<
flux >
would it be a big change to support (fixed size) array slices where it now supports whole (fixed size) arrays?
19:52
<
love-pingoo >
it'd be nice to get exactly the amount I want from mad.. they may have an internal buffer anyway
19:53
<
flux >
I think it's quite possible libmad also gets 'some' amount of data
19:53
<
flux >
with compression it might be difficult to see how much data you get before decoding the data
19:54
<
love-pingoo >
that'd be a non-trivial change indeed, with lots of possible interference
19:54
<
love-pingoo >
how copying a range of floats can be slower than encoding them in vorbis ?
19:54
<
flux >
maybe you should check how many bytes per second you are copying
19:54
<
love-pingoo >
I wish blit was memcpy
19:55
<
flux >
is it really much different?-o
19:55
<
flux >
how about using bigarrays?
19:55
<
love-pingoo >
flux: 44100*32
19:55
<
flux >
atleast with them it should be..
19:55
<
flux >
so it's 8 intermediate copies?
19:56
<
love-pingoo >
more specifically I'm blitting 44100*2 floats per second
19:56
<
love-pingoo >
it's not 16bit samples, sorry
19:56
<
flux >
I forgot that already
19:56
<
flux >
you're getting float data from libmad?
19:57
<
love-pingoo >
yes, converted to float array array by libmad
19:57
<
malc__ >
ocaml's float is Cs double
19:57
<
malc__ >
so it should be *64
19:58
<
love-pingoo >
I was thinking of the underlying 16bit samples, which was wrong
19:58
<
love-pingoo >
anyway, there is clearly a caml overhead here, I doubt that it's a bandwidth problem
19:59
<
flux >
love-pingoo, btw, how much does gc take?
19:59
jlouis has quit [Remote closed the connection]
19:59
<
love-pingoo >
not much, but the memory consumption is a bit high
19:59
MarcWeber has quit [Read error: 110 (Connection timed out)]
19:59
<
love-pingoo >
it was better with the string output of mad concerning the memory
20:00
jlouis has joined #ocaml
20:00
<
flux >
hmm.. so libmad is creating float which something is converting to doubles?
20:01
<
flux >
does that show in the profiling somewhere?
20:01
<
love-pingoo >
not immediately
20:02
<
flux >
but yeah, a single copy of 88200 doubles maybe shouldn't consume that much
20:02
<
flux >
that is, assuming vorbis is atleast somewhat heavy operation :)
20:02
<
flux >
how about compared to actual mp3 decodoing?
20:02
<
flux >
decoding, even
20:03
<
love-pingoo >
I also have a function that outputs that much data to strings (doing float -> int), in C code, and it's "only" 16% of the time
20:03
<
love-pingoo >
so it's converting
_and_ copying
20:03
<
flux >
well, it writes less
20:04
<
love-pingoo >
agreed
20:04
<
love-pingoo >
what did you want to compare ?
20:04
<
flux >
decoding mp3 and duplicating the double-buffer
20:04
<
love-pingoo >
ocaml_vorbis_encode is 16%, ocaml_mad_decode is 9%
20:04
<
flux >
and copying 20%
20:05
<
flux >
maybe you're accidentally doing more copying than you think?-)
20:05
<
love-pingoo >
I feel that you're getting my (disa)point(ment)
20:05
<
love-pingoo >
that'd be a good explaination.. but that's not very likely
20:05
<
malc__ >
comment it out
20:05
<
flux >
you could throw in a test-copy if dummy double array, and then a similar with Bigarray of doubles
20:05
<
love-pingoo >
Bigarray sounds like it could help
20:05
<
malc__ >
anyhow 44100*2*64 is peanuts
20:06
<
love-pingoo >
I'm a bit reluctant to move (again) everything from Array to Bigarray but well..
20:06
<
flux >
love-pingoo, did you check that the number of calls to Array.blit is something sane
20:06
<
malc__ >
i have to move 60825600 per second around
20:07
<
love-pingoo >
float are not boxed in my arrays, so it must be possible to just memcpy, right ?
20:08
<
love-pingoo >
blit does a for-loop, taking advantage of the individual unboxing but not copying the whole thing as a whole
20:09
<
flux >
I just benchmarked by ocamlopt binary
20:10
<
flux >
it copies 41724037 doubles per second
20:10
<
malc__ >
$PREFIX/lib/ocaml/array.ml:blit
20:10
<
love-pingoo >
hey, I'm gonna try -unsafe
20:10
<
malc__ >
blit already does unsafe stuff
20:10
<
malc__ >
it's just terribly inefficient
20:11
<
malc__ >
half decent memcpy implementation will outperform it by an order of magnitude
20:12
<
flux >
but it's not quite trivial to specialize an Array.blit implementation for floats/ints/other non-boxed types?
20:12
<
flux >
hm, maybe it could detect it somehow at runtime
20:12
<
love-pingoo >
doesn't matter
20:12
<
flux >
infact, why can't it just always do memcpy?
20:12
<
love-pingoo >
I don't mind throwing a bit of C code for my own use
20:12
<
love-pingoo >
flux: mutable stuff ? garbage collection ?
20:12
<
flux >
do they matter?
20:13
<
love-pingoo >
memcpying boxed values might be rude
20:13
<
love-pingoo >
I'm not very comfortable here, but I'd be careful
20:13
<
flux >
what else does copying a boxed value do than just copy the value?
20:13
<
flux >
it doesn't do a deep copy anyway
20:13
<
love-pingoo >
however I do feel that an unboxed float array is a float* and shoud admit memcpy
20:13
<
flux >
maybe I just don't understand how it works, though
20:14
<
flux >
well, atleast Bigarray should have the floats unboxed
20:14
<
malc__ >
double Arrays are always unboxed in OCaml
20:14
<
love-pingoo >
flux: I don't know (for memcpy)
20:14
<
malc__ >
they are special
20:14
<
malc__ >
ditto for records
20:14
<
malc__ >
which created some confusion in the past (this fact mixed with functors)
20:15
<
love-pingoo >
ok I'm writing blit_float in C
20:15
<
flux >
if that works and boosts the performance, post something to the caml mailing list ;-)
20:15
<
love-pingoo >
I should search the list first, actually :)
20:17
<
love-pingoo >
Alain writes that blit tests that the array contains floats for every cell
20:18
<
love-pingoo >
and says that one could avoid the call to modify for every cell and call memmove when the copy is not from the new generation to the old one
20:18
<
love-pingoo >
the bug is old but marked as open
20:19
* malc__
discovers that he can read french
20:26
<
love-pingoo >
WOW IT WORKS
20:27
<
love-pingoo >
let's profile this crazy blind hack
20:31
<
love-pingoo >
20.10 0.42 0.42 caml_float_pcm_to_s16le
20:31
<
love-pingoo >
14.83 0.73 0.31 ocaml_vorbis_encode_buffer
20:31
<
love-pingoo >
10.53 0.95 0.22 camlFloat_pcm__rms_204
20:31
<
love-pingoo >
9.09 1.14 0.19 caml_float_array_blit
20:31
<
love-pingoo >
yesss
20:31
<
love-pingoo >
that's more reasonable
20:34
<
malc__ >
what was the time before?
20:35
<
love-pingoo >
20% for Array.blit (absolute times are pointless, I don't time the whole process)
20:36
<
love-pingoo >
pcm_to_s16le is the conversion from float array to a string representing 16bit samples
20:36
<
love-pingoo >
we know how to optimize it
20:36
<
love-pingoo >
(a bit)
20:36
<
malc__ >
so only a 2x increase..
20:36
<
love-pingoo >
that's not wonderful
20:37
<
malc__ >
that's downright pathetic
20:38
<
love-pingoo >
worse, I'll have to do resampling and not only blit.. if I don't do it in C the perfs will be really bad again
20:38
<
love-pingoo >
I should never have thought of moving liq from string to float arrays
20:40
<
love-pingoo >
liquidsoap, the audio streamer
20:42
mrchebas has joined #ocaml
20:42
Mr_Awesome has quit ["...and the Awesome level drops"]
20:51
<
mrchebas >
where can i find some info about ocaml's garbage collector?
20:54
<
love-pingoo >
scholar.google.com ?
20:55
<
mrchebas >
i hoped for a more precise pointer but thanks anyway :)
20:56
<
mrchebas >
i would like to find out how the GC finds the pointers
20:57
jlouis has quit [Remote closed the connection]
21:00
jlouis has joined #ocaml
21:06
<
mrchebas >
thanks guys
21:06
* mrchebas
checks the links
21:13
mrchebas has quit []
21:14
love-pingoo has quit ["Connection reset by pear"]
21:20
<
jacobian >
I'm getting an error that netstring and pcre make inconsistent assumptions while compiling ocsigen on ubuntu
21:20
<
jacobian >
anyone seen that before?
21:23
<
jacobian >
Bug #83944 in ocamlnet (Ubuntu)
21:23
<
jacobian >
found it
21:26
david_koontz has joined #ocaml
21:31
Submarine has quit ["Leaving"]
21:35
love-pingoo has joined #ocaml
21:47
david_koontz has quit [Read error: 110 (Connection timed out)]
21:49
shafire has joined #ocaml
21:49
<
shafire >
can i use fastcgi with ocaml?
21:51
<
mbishop >
and ocamlnet has some cgi stuff too
21:51
david_koontz has joined #ocaml
21:53
<
shafire >
and fastcgi=
22:18
malc__ has quit ["leaving"]
22:19
shafire has quit ["Verlassend"]
22:24
mnemonic has quit ["leaving"]
22:39
chealer has joined #ocaml
22:40
<
chealer >
hi. is there an equivalent of - use "foo.sml"; in ocaml, and if so, what is it?
22:42
<
mikeX >
what does that do?
22:43
<
mikeX >
there's #use "foo.ml";; in the toplevel
22:43
<
chealer >
mikeX: hum, really. I get
22:43
<
chealer >
# use "tp2.ml";;
22:43
<
chealer >
Unbound value use
22:44
<
chealer >
thank you
22:44
<
mikeX >
there's also #load
22:44
<
mikeX >
for loading .cmo/.cmx files
22:56
_chris has joined #ocaml
23:04
cjeris has quit [Read error: 54 (Connection reset by peer)]
23:13
smimou has quit ["bli"]
23:13
love-pingoo has quit ["Connection reset by pear"]
23:15
bluestorm_ has quit ["Konversation terminated!"]
23:22
schlumpf_mac has joined #ocaml
23:25
forestbuyer has joined #ocaml
23:29
forestbuyer has left #ocaml []
23:30
schlumpf_mac has left #ocaml []
23:40
bluestorm_ has joined #ocaml
23:51
bluestorm_ has quit ["Konversation terminated!"]