julm has quit [Read error: 104 (Connection reset by peer)]
hkBst has quit ["Konversation terminated!"]
julm has joined #ocaml
ita has quit [Remote closed the connection]
ben___ has joined #ocaml
ben___ is now known as ziph
musicallyut has joined #ocaml
|Catch22| has joined #ocaml
musically has joined #ocaml
mwc has joined #ocaml
musically_ut has quit [Remote closed the connection]
musically_ut has joined #ocaml
musicallyut has quit [Remote closed the connection]
musicallyut has joined #ocaml
musically has quit [Remote closed the connection]
<coucou747>
bonne nuit
coucou747 has quit ["bye ca veut dire tchao en anglais"]
musically has joined #ocaml
pango has quit [Remote closed the connection]
pango has joined #ocaml
musically_ut has quit [Remote closed the connection]
monde has left #ocaml []
musicallyut has quit [Remote closed the connection]
musically_ut has joined #ocaml
olleolleolle has quit []
musically has quit [Remote closed the connection]
jlouis has joined #ocaml
evn_ has quit []
jlouis_ has quit [Read error: 110 (Connection timed out)]
AxleLonghorn has joined #ocaml
^authentic has joined #ocaml
authentic has quit [No route to host]
^authentic is now known as authentic
TheArthur has quit [Read error: 113 (No route to host)]
jlouis_ has joined #ocaml
m3ga has joined #ocaml
jlouis has quit [Read error: 110 (Connection timed out)]
Mr_Awesome has joined #ocaml
jlouis has joined #ocaml
musicallyut has joined #ocaml
jlouis__ has joined #ocaml
jlouis_ has quit [Read error: 110 (Connection timed out)]
evn has joined #ocaml
goalieca has joined #ocaml
jlouis_ has joined #ocaml
musically_ut has quit [Remote closed the connection]
jlouis has quit [Read error: 110 (Connection timed out)]
jlouis__ has quit [Read error: 110 (Connection timed out)]
jlouis has joined #ocaml
AxleLonghorn has left #ocaml []
jlouis_ has quit [Read error: 110 (Connection timed out)]
m3ga has quit ["disappearing into the sunset"]
det has joined #ocaml
cygnus_ has joined #ocaml
jlouis_ has joined #ocaml
erickt_ has joined #ocaml
musicallyut has quit [Remote closed the connection]
jlouis has quit [Read error: 110 (Connection timed out)]
jderque has joined #ocaml
erickt__ has joined #ocaml
erickt_ has quit [Read error: 104 (Connection reset by peer)]
<erickt__>
can anyone help me with a problem with -cclib
<erickt__>
?
evn has quit []
<thelema>
probably not, but I'll listen to your description and give it my best guess
<erickt__>
:)
<erickt__>
It's baking into the .cma the path to a .o file, but the path is in the build directory
authentic has quit [Read error: 113 (No route to host)]
<thelema>
I thought the .cma files were standalone
<erickt__>
I would have thought that too
<thelema>
why do you conclude they aren't?
<erickt__>
I'm trying to figure out a build problem with llvm's ocaml bindings
* thelema
waits for more information
<erickt__>
for instance with this command: ocamlc -g -cc g++ -I `llvm-config --libdir` -o toy llvm.cma llvm_analysis.cma llvm_executionengine.cma lexer.cmo parser.cmo codegen.cmo main.ml
<goalieca>
what other stuff than my own code is in a caml executable
<goalieca>
is there a static runtime lib?
<erickt__>
i686-apple-darwin8-g++-4.0.1: /opt/local/var/macports/build/_Users_Shared_erickt_Projects_macports_dports.git_lang_llvm/work/build/Release/lib/LLVMX86.o: No such file or directory
<goalieca>
makes for a fat binary
<erickt__>
and etc
<erickt__>
goalieca: bytecode or native?
<goalieca>
native
<thelema>
bytecode files are usually tiny
<goalieca>
something ocamlopt produces
<erickt__>
well, the native code doesn't link against anything, so I guess it has to have the ocaml runtime
<goalieca>
:(
<goalieca>
that's what i was thinking
<thelema>
159K for "hello world"
<thelema>
(112K stripped)
thermoplyae has quit ["daddy's in space"]
<goalieca>
gcc 4592 stripped
<goalieca>
i mean. 112kb is no big deal for a single app or two
<goalieca>
but it does add up
mwc has quit ["Leaving"]
<erickt__>
maybe when 3.11 and native dynamic loading I guess they could do shared libraries
<goalieca>
maybe even a shared runtime or something
<thelema>
"OCaml native code libraries are always statically linked, which does not prevent from using C dynamically-linked libraries."
<thelema>
why do you want a ton of natively compiled apps?
<goalieca>
well.. how much penalty does the bytecode have
<thelema>
erickt__: the llvm-config --libdir doesn't introduce the dependency on LLVMX86.o?
<thelema>
goalieca: it's much faster than perl or python
<goalieca>
well ya.
<goalieca>
python can't get much slower some days
<erickt__>
thelema: nope, that's actually in llvm_executionengine.cma
<thelema>
goalieca: you want a number like "the bytecode is always 42% slower than a native exeutable"?
<erickt__>
although i don't know how to really examine cma files, if I open it up i can see the path in it
<goalieca>
well.. i would suspect 5 or 10% plus startup penalty
<thelema>
erickt__: bytecode libraries end in .cma...
<erickt__>
oh sorry, I'm doing this with the bytecode
<thelema>
goalieca: sometimes the bytecode works faster than native. sometimes it's much slower
<goalieca>
well.. you're saying the JIT can be faster than native?
<thelema>
O'Caml programs compiled with the native-code compiler run 6 times faster (on an average) than the same programs compiled with the O'Caml bytecode compiler. The speedup depends a lot on the type of program, and ranges from 2 (test program: a lexer generator) to 15 (test program: FFT). (from http://caml.inria.fr/pub/old_caml_site/ocaml/speed.html)
<erickt__>
well, you'd first need to write an ocaml frontend
<erickt__>
but that sure would be nice
<goalieca>
if i was doing grad research into languages than medical imaging i would love to play with llvm
<erickt__>
it's pretty neat. Chris Lattner wrote a nice c++ tutorial for llvm 2.2 and I'm porting it to ocaml
<erickt__>
but I can't get the jit part to work
<erickt__>
it's already 1/3 smaller than the c++ code though :)
<erickt__>
I wonder if I remove the "-cclib" from "-cclib .../LLVMX86.o" it'll link it in statically
jderque has quit [kornbluth.freenode.net irc.freenode.net]
Jedai has quit [kornbluth.freenode.net irc.freenode.net]
dibblego has quit [kornbluth.freenode.net irc.freenode.net]
thelema has quit [kornbluth.freenode.net irc.freenode.net]
revax has quit [kornbluth.freenode.net irc.freenode.net]
jderque has joined #ocaml
Jedai has joined #ocaml
dibblego has joined #ocaml
thelema has joined #ocaml
revax has joined #ocaml
thelema is now known as thelema|away
jderque has quit ["leaving"]
noige has joined #ocaml
<noige>
hi
<noige>
I am interested in functional programming and I have some previous programing experience, although I do not have a CS degree and I am not a professional programmer. Would you recommend ocaml as a first fpl?
<noige>
I have checked out lisp but I do not like how the format string syntax is
<noige>
~12`1`~!@!~@~~!~@#!# blah etc
<noige>
adfasd
<noige>
oops
noige has left #ocaml []
erickt__ has quit []
|Catch22| has quit []
l_a_m has joined #ocaml
evn has joined #ocaml
filp has joined #ocaml
noige has joined #ocaml
<noige>
hi
noige has left #ocaml []
middayc has quit [Read error: 110 (Connection timed out)]
Linktim has joined #ocaml
goalieca has quit [Remote closed the connection]
<Linktim>
hum
<ziph>
zzzz
mrsolo has quit ["This computer has gone to sleep"]
coucou747 has joined #ocaml
<coucou747>
salut all
noige has joined #ocaml
<noige>
hi
<ziph>
Hi noige.
<noige>
:)
<ziph>
Do you want to learn functional programming to learn about functional programming, or to be able to do useful things? :)
<Linktim>
hello
<Linktim>
i've a problem with Ocaml-Sdl and Sdlttf
<Linktim>
because this line « let font = Sdlttf.open_font "police.tff" 24 in »
<Linktim>
my program segfault ...
<ziph>
Does it work with any other font?
<Linktim>
no
<noige>
hi sorry I am having connection problems
<noige>
this old g4 sucks
<noige>
well the airport card does
<ziph>
Maybe try running it under gdb (if you're using something unixy). It might tell you roughly where it was when it crashed.
<noige>
I am interested in learning fp because I would like to become a better programmer. I am not a professional programmer and I do not have formal training as a programmer. I have writted lots of python, ruby and perl programs though
<noige>
written*
<noige>
I am trying to find a fpl that will "jive" well with what I am looking for since I am a complete novice and newcomer to fp
<ziph>
It might be worth checking out a pure functional language (like Haskell) quickly first, since it forces you to do purely functional coding.
<noige>
ok
<noige>
I will take a look at that
<noige>
thank you
noige has left #ocaml []
<ziph>
I was going to say then switch to Ocaml in a couple of weeks when you actually want to write something, but never mind. ;)
<evn>
haha
<ziph>
I was lucky enough that my freshman CS course was Haskell from day one.
OChameau has joined #ocaml
slipstream has joined #ocaml
slipstream has left #ocaml []
Yoric[DT] has joined #ocaml
authentic has joined #ocaml
bla_ has joined #ocaml
bla has quit [Read error: 110 (Connection timed out)]
tsuyoshi has joined #ocaml
hkBst has joined #ocaml
petchema has joined #ocaml
LordMetroid has joined #ocaml
linktim_ has joined #ocaml
linktim__ has joined #ocaml
Linktim has quit [Read error: 110 (Connection timed out)]
musically_ut has joined #ocaml
evn has quit []
linktim_ has quit [Read error: 110 (Connection timed out)]
linktim_ has joined #ocaml
musicallyut has joined #ocaml
musically has joined #ocaml
musically_ut has quit [Remote closed the connection]
musically_ut has joined #ocaml
musically_ut has quit [Remote closed the connection]
linktim__ has quit [Read error: 110 (Connection timed out)]
musicallyut has quit [Remote closed the connection]
musically has quit [Remote closed the connection]
bongy has joined #ocaml
|Catch22| has joined #ocaml
bongy has quit ["Leaving"]
ziph has quit []
Yoric[DT] has quit ["Ex-Chat"]
RobertFischer has joined #ocaml
thelema|away is now known as thelema
<thelema>
hcarty: one semi-solution - List.fold_left min max_int l
<thelema>
oops.
ben__ has joined #ocaml
ben__ is now known as ziph
<ecc>
linktim_: you need to do both of these first: Sdl.init [`VIDEO]; Sdlttf.init ()
<linktim_>
yes
<linktim_>
i found
olleolleolle has joined #ocaml
rwmjones has joined #ocaml
middayc has joined #ocaml
olleolleolle has quit []
AxleLonghorn has joined #ocaml
bongy has joined #ocaml
AxleLonghorn has quit ["Leaving."]
bluestorm has joined #ocaml
revax has quit [Read error: 113 (No route to host)]
|Catch22| has quit [Read error: 113 (No route to host)]
pango has quit [Remote closed the connection]
Morphous has joined #ocaml
pango has joined #ocaml
RobertFischer has left #ocaml []
<hcarty>
thelema: I settled on http://ocaml.pastewith.us/34 - In this case it's for an array. I would go with fold_left for a list though
<thelema>
hcarty: good.
Morphous_ has quit [Connection timed out]
jlouis has joined #ocaml
<bluestorm>
hcarty: don't you check the [| |] case ?
<thelema>
bla_: exception raised in that case is desirable
<bluestorm>
ok
middayc has left #ocaml []
<thelema>
it could be caught and raised with a different name (Empty_array) or something, but why bother atm?
<hcarty>
Yes, this an empty array would definitely be an exception here
<hcarty>
s/this//
jlouis_ has quit [Read error: 110 (Connection timed out)]
Yoric[DT] has joined #ocaml
<Yoric[DT]>
hi again
ziph has quit []
ben__ has joined #ocaml
ben__ is now known as ziph
jlouis_ has joined #ocaml
authentic has quit [No route to host]
ziph has quit []
filp has quit ["Bye"]
jlouis has quit [Read error: 110 (Connection timed out)]
LordMetroid has quit ["Leaving"]
bla_ is now known as bla
jlouis has joined #ocaml
jlouis_ has quit [Read error: 110 (Connection timed out)]
monde has joined #ocaml
postalchris has joined #ocaml
<jonafan>
I wrote a CPS style List.map last night
<bluestorm>
does it have any advantage over non-CPS List.map ?
<jonafan>
it doesn't use any stack space
<bluestorm>
(i don't know anything about CPS and CPS transformations)
<bluestorm>
(do you have the code somewhere ?)
<jonafan>
so that i guess is one advantage of CPSing code
<jonafan>
however, it's a little bti slower than just using rev_map and then reversing it
<pango>
computing is less efficient than no computing at all then
<ita>
now that's an idea :-)
<pango>
I agree that in some cases (like regexp above) avoiding backtracking altogether (by building the deterministic automata) is more efficient, if you can factorize the initial cost
<pango>
but I don't think it's always possible to avoid backtracking
<bluestorm>
for a single use regexp, you still have a complexity problem
mrmr has joined #ocaml
zmdkrbou has quit [Read error: 113 (No route to host)]
pango has quit [Remote closed the connection]
goalieca has quit [Remote closed the connection]
pango has joined #ocaml
mrmr has left #ocaml []
jlouis_ has joined #ocaml
<Yoric[DT]>
Has anyone around here used OCamlSDL ?
<flux>
I have
<flux>
goba uses it ;)
jlouis has quit [Read error: 110 (Connection timed out)]
<Yoric[DT]>
I can draw alright but I can't manage to display any text.
<Yoric[DT]>
Can you give me a hand ?
<flux>
I recall earlier discussion about doing the sdl initializations properly
<flux>
were you part of that?
<flux>
[discussion]
<Yoric[DT]>
Nope.
<flux>
to164606 < ecc> linktim_: you need to do both of these first: Sdl.init [`VIDEO]; Sdlttf.init ()
<flux>
I do this: Sdl.init [`EVERYTHING]; Sdlttf.init ();
<flux>
anyway, Sdlttf.init is crucial
<Yoric[DT]>
I did both `VIDEO and Sdlttf.init .
<flux>
which rendering function are you using?
<flux>
do you call Sdlvideo.update_rect surface () after drawing text?
<flux>
this appears to work for me: Sdlvideo.display_format ~alpha:true (Sdlttf.render_text_blended (font size) str color)
<Yoric[DT]>
No, I was trying to use flip.
<flux>
I suppose it might do that updating also, but perhaps trying update_rect is worth a shot
<Yoric[DT]>
Now, I'm not completely sure I understand how flip is supposed to work.
<Yoric[DT]>
I mean, I know what double-buffering is all about, I just don't understand the semantics of this function.
<flux>
I apparently don't use it at all
<flux>
actually I do, in another piece of software..
<Yoric[DT]>
Mmhhh....
<Yoric[DT]>
I didn't do display_format.
<Yoric[DT]>
Actually, I did.
<Yoric[DT]>
So what was your next operation after display_format ?
ygrek has quit [Remote closed the connection]
ygrek has joined #ocaml
<flux>
I just blit that result to the display with Sdlvideo.blit
<flux>
let blit ?(sync=false) (x, y) bitmap = let si = Sdlvideo.surface_info bitmap in let rect = Sdlvideo.rect ~x ~y ~w:si.Sdlvideo.w ~h:si.Sdlvideo.h in Sdlvideo.blit_surface ~src:bitmap ~dst:surface ~dst_rect:rect (); if sync then Sdlvideo.update_rect ~rect surface
<Yoric[DT]>
I'll try and add the update_rect.
<Yoric[DT]>
Everything else seems identical.
<Yoric[DT]>
Okay, it works.
<Yoric[DT]>
Thanks.
<flux>
nice to be of help, happy hacking ;)
<Yoric[DT]>
:)
psnively has joined #ocaml
jstanley has joined #ocaml
<jstanley>
I have an ocaml source file that does an open Time at the start of it; how can I load this into the toplevel? I keep getting 'Error: Reference to undefined global `Time''
<bluestorm>
ocaml time.cmo
<bluestorm>
or inside the toploop
<bluestorm>
#load time.cmo
<bluestorm>
hm, it may be time.cma actually, depends on where your Time module come from jstanley
<jstanley>
Well, there's a time.ml in the same directory actually, looks like it's a local module. But doing a #use "time.ml";; doesn't work.
<jstanley>
Well, it *works* -- I get the type descriptions, but an attempt to load the original file after that still results in the same error.
<bluestorm>
the easier way may be to compile your time.ml as a .cmo, and then load it
<bluestorm>
ocamlc -c time.ml
<bluestorm>
ocaml time.cmo ...
linktim_ has quit [Remote closed the connection]
jderque has quit ["leaving"]
<jstanley>
ah, i got it -- thanks ;)
<bluestorm>
you're welcome
jstanley has left #ocaml []
psnively has quit []
bluestorm has quit ["Konversation terminated!"]
evn has joined #ocaml
hkBst has quit [Read error: 110 (Connection timed out)]
ygrek has quit [Remote closed the connection]
ita has quit ["Hasta luego!"]
zmdkrbou has joined #ocaml
thermoplyae has joined #ocaml
authentic has left #ocaml []
bla has quit [kornbluth.freenode.net irc.freenode.net]
Mr_Awesome has quit [kornbluth.freenode.net irc.freenode.net]
Demitar has quit [kornbluth.freenode.net irc.freenode.net]
Oatschool has quit [kornbluth.freenode.net irc.freenode.net]
_W_ has quit [kornbluth.freenode.net irc.freenode.net]
_W_ has joined #ocaml
bla has joined #ocaml
Mr_Awesome has joined #ocaml
Demitar has joined #ocaml
Oatschool has joined #ocaml
bla has quit [kornbluth.freenode.net irc.freenode.net]
Oatschool has quit [kornbluth.freenode.net irc.freenode.net]
Mr_Awesome has quit [kornbluth.freenode.net irc.freenode.net]
Demitar has quit [kornbluth.freenode.net irc.freenode.net]