Demitar has quit ["There are bubbles in the air..."]
Kinners has joined #ocaml
docelic is now known as docelic|sleepo
<
async>
is there any high-level interactive debugger for ocaml?
<
Kinners>
higher than ocamldebug?
rhil is now known as rhil_zzz
Kinners has quit [asimov.freenode.net irc.freenode.net]
Slackwarrior has quit [asimov.freenode.net irc.freenode.net]
mattam_ has quit [asimov.freenode.net irc.freenode.net]
themus has quit [asimov.freenode.net irc.freenode.net]
asqui has quit [asimov.freenode.net irc.freenode.net]
Kinners has joined #ocaml
Slackwarrior has joined #ocaml
mattam_ has joined #ocaml
themus has joined #ocaml
asqui has joined #ocaml
asqui has quit [Excess Flood]
asquii has joined #ocaml
asquii is now known as asqui
Kinners has left #ocaml []
* Riastradh
smacks caml.inria.fr.
<
async>
Riastradh: my sentiments exactly
lus|wazze has quit ["Quidquid latine dictum sit, altum sonatur."]
lament has joined #ocaml
lament has quit ["I AM NOT THE REINCARNATION OF SAMMY DAVIS JR."]
mattam_ is now known as mattam
Smerdyakov has quit ["sleep"]
themus has quit [Remote closed the connection]
wax has quit [Remote closed the connection]
wax has joined #ocaml
Slackwarrior has quit [Read error: 60 (Operation timed out)]
lament has joined #ocaml
reltuk has joined #ocaml
TachYon has joined #ocaml
docelic|sleepo is now known as docelic
themus has joined #ocaml
TachYon26 has joined #ocaml
lament has quit ["TEACHER IS NOT A LEPER"]
TachYon26 has quit ["bez ki³y nie ma zaliczenia (z prawd studentek AM)"]
asqui has quit [Read error: 104 (Connection reset by peer)]
asqui has joined #ocaml
asqui has quit [Connection reset by peer]
gt2 has joined #ocaml
asqui has joined #ocaml
gt2 has quit ["Client Exiting"]
gt2 has joined #ocaml
TachYon has quit [Remote closed the connection]
owll has joined #ocaml
TimFreeman has joined #ocaml
TimFreeman has left #ocaml []
TheDD has joined #ocaml
TimFreeman has joined #ocaml
<
TimFreeman>
Testing: Am I banned from this channel?
TimFreeman has left #ocaml []
TimFreeman has joined #ocaml
TimFreeman has left #ocaml []
Slackwarrior has joined #ocaml
<
Slackwarrior>
hello
<
TheDD>
i have a question :)
<
TheDD>
if a function return a couple (a, b), how do you get the a with writing a match f with ... ?
Slackwarrior has quit ["X-Chat 2.0.0 for Linux"]
<
TheDD>
(a, b) = f , thx :))
owll has quit ["Client Exiting"]
d-bug has joined #ocaml
d-bug has left #ocaml []
amak has joined #ocaml
amak has left #ocaml []
TachYon26 has joined #ocaml
gene9 has joined #ocaml
taw has joined #ocaml
<
taw>
how can i read floats and ints from binary stream ?
<
taw>
something like c's read (0, &f, sizeof(double)) etc. ?
<
mrvn_>
input_value or something.
<
mrvn_>
but better marschal them.
<
taw>
of course not
<
taw>
they must be normal ints and floats
<
taw>
not any ocaml magic
<
mrvn_>
Then they are not tagged.
<
taw>
input_binary_int says it's going to do some magic
<
mrvn_>
you might have to read them in manually.
<
taw>
sure they aren't
<
taw>
manually like how ?
<
mrvn_>
For ints read in an Int32 or Int64
<
mrvn_>
or read in an BigArray
<
mrvn_>
or look for the right input function or write a c wraper.
<
mrvn_>
don't forget about little/big endian systems
<
taw>
yeah, but ints are pretty trivial
<
taw>
how to read floats
<
taw>
i don't care about endianness, it's going to be normal intel stuff
<
mrvn_>
just read in doubles.
<
mrvn_>
and then you have to box them
<
taw>
mmm, Int32 doesn't say anything about binary input
<
mrvn_>
Never used bigarray myself but it should be easy to read the data into one.
<
taw>
yeah but i have nice mix of floats and ints
<
mrvn_>
If you can't figure it out in 5-10 minutes just write a C function tio read in binary ints/floats and convert them to ocaml values in C.
<
taw>
not very likely bigarray will like it
<
taw>
now linking with c is exactly the thing that i'd like to avoid
<
taw>
i'm doing stuff in binary for purpose of not havinf to link with c ;)
<
mrvn_>
taw: using marshaling or ascii is much simpler
<
taw>
i can't marshal in c++
<
taw>
well, i probably could reverse engineer that marshaling stuff but it's not trivial
<
taw>
and transfering floats in ascii is really not a good idea
wrunt has quit ["leaving"]
<
mrvn_>
I don't see any functions to read in C binary data. Looks like you realy have to write C stubs.
<
taw>
that would be the first language i've ever seen not to have them
<
mrvn_>
You could read in a string and obj magic it into a native_int or double but thats pretty dirty.
<
mrvn_>
taw: I didn't find any when I looked for reading in binary data from network. Haven't even seen ntoh functions yet.
<
mrvn_>
Luckily I only had 16 Bit ints to read so that was easy to read as 2 chars.
<
taw>
yeah, i could read ints that way, but floats ...
<
mrvn_>
Too bad Bigarray has no input/output function.
<
taw>
but there simply has to be some way
<
mrvn_>
You could of cause look at marschaled ints/floats and emmit the same patterns from C++
<
mrvn_>
the marshaling module isn't that much code so it should be easy to copy the relevant parts.
<
mrvn_>
Strange. I realy do see nothing in the docs to read in native floats.
<
taw>
is Marshal documented anywhere ?
docelic has quit [Read error: 60 (Operation timed out)]
lus|wazze has joined #ocaml
<
taw>
No implementations provided for the following modules:
<
taw>
Unix referenced from mgf.cmx
<
taw>
Bigarray referenced from mgf.cmx
<
taw>
what was the compilation option again ?
gene9 has joined #ocaml
<
lus|wazze>
simply pass the library you want on the command line
<
lus|wazze>
e.g. ocamlc foo.ml unix.cmx
Smerdyakov has joined #ocaml
<
lus|wazze>
or ocamlopt foo.ml unix.cmxa for the native-code compiler
docelic has joined #ocaml
gene9 has quit [Read error: 60 (Operation timed out)]
taw has quit ["bye"]
d-bug has joined #ocaml
d-bug has left #ocaml []
smklsmkl is now known as smkl
mrvn has joined #ocaml
mrvn_ has quit [Read error: 60 (Operation timed out)]
<
async>
i'm having problems building cameleon
gt2 has quit ["Client Exiting"]
rhil_zzz is now known as rhil_work
docelic has quit [Read error: 113 (No route to host)]
TachYon26 has quit ["bez ki³y nie ma zaliczenia (z prawd studentek AM)"]
<
TheDD>
is there a way to export caml code to C ?
<
mattam>
there is, check the manual
docelic has joined #ocaml
docelic has quit [Client Quit]
docelic has joined #ocaml
docelic has left #ocaml []
Smerdyakov has quit ["driving somewhere else"]
Demitar has joined #ocaml
mattam_ has joined #ocaml
mattam has quit [Read error: 60 (Operation timed out)]
mattam_ is now known as mattam
Smerdyakov has joined #ocaml
<
reltuk>
is there a way to make an expression lazy in ocaml?
<
reltuk>
like...be lazily evaluated?
<
TheDD>
look for Lazy Module
<
TheDD>
i just know the name :/
<
Riastradh>
'lazy expr'
Demitar has quit ["There are bubbles in the air..."]
<
reltuk>
can you nest lazy expressions?
<
Riastradh>
Certainly.
<
reltuk>
and last silly question...how do you group expressions into one lazy...
<
Riastradh>
lazy (expr; expr; expr) (* ? *)
<
reltuk>
awesome...thanks :)
<
reltuk>
will using lazy screw up tail recurssion stack space?
<
Riastradh>
Er, why would it?
<
reltuk>
*shrug*, I made a cool function...
<
reltuk>
let mult x y = lazy ( print_string "mult"; print_newline (); Lazy.force x * Lazy.force y );;
<
reltuk>
and then I got a prodlist that returns 0 without any multiplications if there's a 0 in the list
<
reltuk>
let prodlist2 lst = let rec aux lst acc =
<
reltuk>
match lst with [] -> acc; | (x::xs) -> if x = 0 then lazy 0; else
<
reltuk>
aux xs (mult (lazy x) acc) in Lazy.force (aux lst (lazy 1));;
<
reltuk>
pretty cool, eh? before I had to do a List.mem checking for 0, which meant traversing the list twice
<
reltuk>
this probably comes out to be more overhead...but it's a kinda neat example
<
Riastradh>
...and if you use Haskell, then you get that automatically!
<
reltuk>
lol, it's for a class I'm taking :-p
docelic has joined #ocaml
docelic has left #ocaml []
asqui has quit [Connection reset by peer]
<
Riastradh>
ARGH! caml.inria.fr works fine now but ocaml.org doesn't!
jdrake has joined #ocaml
<
jdrake>
when I run the configure script I get "The "labltk" library: not found" even after giving --tkdefs -I/sw/include
<
Riastradh>
You have installed Tcl and Tk with fink, right?
<
jdrake>
according to fink commander they are current yesa
<
jdrake>
tcltk, tcltk-dev, tcltk-shlibs all say current
<
Riastradh>
Er, isn't it '-tkdefs' and not '--tkdefs'?
<
jdrake>
let me check, I thought that I copied it striaght off the page
<
Riastradh>
It's -tkdefs in INSTALL.
<
Riastradh>
And you may need to also specify -tklibs -- '-tklibs -L/sw/lib' or something, perhaps.
<
jdrake>
at least this isn't a autoconf script
<
jdrake>
those are just sadistic
<
Riastradh>
Sadistic? How so?
<
jdrake>
convuluted
<
jdrake>
is this normal for configure: shared libraries not supported
<
jdrake>
under the bytecode compiler
Kinners has joined #ocaml
TheDD has left #ocaml []
Smerdyakov has quit ["eat"]
asqui has joined #ocaml
asqui has quit [Read error: 104 (Connection reset by peer)]
asquii has joined #ocaml
asquii is now known as asqui
asqui has quit [Connection reset by peer]
asqui has joined #ocaml
cDlm has joined #ocaml
Smerdyakov has joined #ocaml
cDlm_ has joined #ocaml
cDlm has quit [Killed (NickServ (Ghost: cDlm_!cdlm@lns-th2-7-82-64-102-3.adsl.proxad.net))]
cDlm_ is now known as cDlm
asqui has quit [Read error: 54 (Connection reset by peer)]
asqui has joined #ocaml