<reltuk>
I'm trying to compile a small program on windows that uses big_int, but I'm not too familiar with ocamlopt...
<reltuk>
what would be the command to compile test.ml and link in the big_int library?
<Smerdyakov>
ocamlopt nums.cmxa yourfile.ml
<Smerdyakov>
Maybe. I hope that works. :)
<reltuk>
thx
<reltuk>
'ml' is not recognized as an internal or external command,
<reltuk>
operable program or batch file.
<reltuk>
Assembler error, input left in file C:\DOCUME~1\AARONS~1\LOCALS~1\Temp\camlasm40
<reltuk>
1401.asm
<reltuk>
works bytecoded though...and about twice as fast as ruby, in bytecode... (just 2 ^ 400000)
<pattern>
i'm guessing you've found a bug
<pattern>
i hear ocaml for windows isn't particularly well supported
<Smerdyakov>
There's a chance MS will be silently distributing OCaml programs (developed by people in my research group) with the Windows Device Driver Kit in the future. :)
<pattern>
ocaml or f# ?
<Smerdyakov>
OCaml
<pattern>
cool
<Smerdyakov>
It would be CCured. Ever heard of it?
<pattern>
i've heard of it
<pattern>
so they'd be distributing a program written in ocaml, not the ocaml compiler?
<Smerdyakov>
Correct.
<pattern>
i see
<pattern>
well, that's cool too
<pattern>
would be better if they started distributing the ocaml compiler, though :)
Nutssh has joined #ocaml
<reltuk>
stupid bug :-p
Nutssh has quit ["Client exiting"]
wazze has quit ["--- reality is that which, when you stop believing in it, doesn't go away ---"]
reltuk has quit [Read error: 54 (Connection reset by peer)]
Godeke has joined #ocaml
Banana has quit [Read error: 60 (Operation timed out)]
Godeke has quit [Client Quit]
kinners has quit ["leaving"]
mlh has quit ["ni!"]
ptolomy has quit [Remote closed the connection]
<pattern>
anyone know if ocaml will work on a zarus pda?
<teratorn>
I would guess so
<teratorn>
buy me a zaurus and I shall investigate it for you!
<pattern>
deal :)
<pattern>
free pda's for everyone!
<teratorn>
awsome.
<teratorn>
no just me :/
<pattern>
well, you can have the first
<pattern>
i'm in the market for a pda... i was this close -> <- to buying a regular palm
<pattern>
then i just happened to see the linux os link in epinions and remembered that there were linux pda's
<teratorn>
whew
<pattern>
yeah, close call
<pattern>
will be so much fun to program ocaml apps to run on my pda
<teratorn>
zauruses don't have integrated wifi though, like the newer palms
<pattern>
i wasn't going to get a pda with wifi anyway
<pattern>
i really only needed the basic features
<pattern>
and actually the zaurus will take cf cards, while the palm i was thinking of would only take sd cards, so it's a win already
<pattern>
it's more expensive than the palm, but i get linux (and ocaml) :)
<teratorn>
yeah. I want a zaurus, or something like it, so badly.
<pattern>
they're under $300 at amazon.com
<teratorn>
but I have to use up the slot for the wifi, not to mention buy a wifi card
<teratorn>
it's something that I want integrated, and preferably wifi-g
<pattern>
i think the zaurus also has an sd slot
<pattern>
so you'll have a slot free
<teratorn>
*nod*
<pattern>
which is pretty cool...
<pattern>
and when you're not using wifi then you'll have that slot free too
<pattern>
thre's supposedly a new zaurus in the works... but it'll probably be expensive
<teratorn>
and I need something that will sync it's data with some good desktop app on my unix desktop/laptop
<teratorn>
maybe Evolution or something
<pattern>
yeah, i don't know anything about how well it syncs with third-party apps
<pattern>
it's supposed to do fine with most it's own apps, though
<pattern>
i personally wonder if it's possible to just sync the whole thing, including the OS
<pattern>
so i can unload one OS and install another, and then go back if need-be
<pattern>
well, what do you know... there's a #zaurus here :)
<teratorn>
wow
<pattern>
it's bigger than this channel :)
<pattern>
they're kind of quiet
SpookRijder has joined #ocaml
kinners has joined #ocaml
mimosa has joined #ocaml
Bakka has joined #ocaml
<Bakka>
hi
<pattern>
hello
gim has joined #ocaml
yangsx has joined #ocaml
yangsx has quit ["离开"]
__DL__ has joined #ocaml
kinners has quit ["leaving"]
whiskas has joined #ocaml
Kinners has joined #ocaml
Lemmih has quit [Remote closed the connection]
Kinners has left #ocaml []
DomC has joined #ocaml
Bakka has quit [Read error: 110 (Connection timed out)]
SpookRijder has quit ["ni!"]
cjohnson has quit ["Drawn beyond the lines of reason"]
Godeke has joined #ocaml
whiskas has quit ["Pa / Bye."]
Lemmih has joined #ocaml
shawn_ has joined #ocaml
gim has quit []
shawn has quit [Read error: 110 (Connection timed out)]
shawn_ has quit [Read error: 110 (Connection timed out)]
Banana has joined #ocaml
phj has joined #ocaml
__DL__ has quit [kornbluth.freenode.net irc.freenode.net]
srv has quit [kornbluth.freenode.net irc.freenode.net]
whee has quit [kornbluth.freenode.net irc.freenode.net]
slashvar[lri] has quit [kornbluth.freenode.net irc.freenode.net]
__DL__ has joined #ocaml
srv has joined #ocaml
whee has joined #ocaml
slashvar[lri] has joined #ocaml
<phj>
How to set elements of an array created by function Array.make_matrix ?
<phj>
Array.fill arr x y a ,right ?
<Smerdyakov>
If a is another array of the correct type, then that should work.
<phj>
here , a is just an integer.
<Smerdyakov>
make_matrix makes an array of arrays.
<Smerdyakov>
There is nothing special about the result.
<phj>
whether Array.fill arr 3 4 5 will work or not ?
<Smerdyakov>
Look at the types and it should be clear.
<Smerdyakov>
If you don't understand any of the types involved, just ask.
<Smerdyakov>
But your question is the kind a good OCaml programmer can always answer for himself just by looking at types in the documentation or by evaluating expressions in the toplevel.
<phj>
let arr = Array.make_matrix 5 5 in
<phj>
Array.fill arr 3 4 5 ;;
<phj>
This expression has type 'a -> 'a array array but is here used with type 'b
<phj>
what's wrong with these two lines progarm ?
<phj>
Is the first arr different from the second arr ?
<Smerdyakov>
Look at the type of Array.make_matrix.
<Smerdyakov>
Then look at how you called it.
<phj>
it's 'a array array
<Smerdyakov>
No, Array.make_matrix is a function, so it can't have an array type.
<phj>
oh, I missed one array!
<phj>
val make_matrix : int -> int -> 'a -> 'a array array
<phj>
val fill : 'a array -> int -> int -> 'a -> unit
<Smerdyakov>
OK. So what is the type of (Array.make_matrix 5 5)?
<phj>
'a array array
<Smerdyakov>
How do you get that?
<phj>
val make_matrix : int -> int -> 'a -> 'a array array
<Smerdyakov>
What is the type (Array.make_matrix 5)?
<phj>
'a array
<Smerdyakov>
No.
<phj>
wait
<Smerdyakov>
You are just saying random stuff now. :D
<phj>
I'm thinking...
<Smerdyakov>
Can you explain to me what it means for any value to have the type int -> int -> int?
<phj>
Array.make_matrix 5 is a function which can make 5 array,(sorry,I don't know how to express it clearly.)
<Smerdyakov>
OK, so if I have a function f : int -> int -> int -> int, what is the type of (f 0)?
<phj>
fun of int->int->int,right ?
<Smerdyakov>
The "fun of" is just printed by the toplevel to help you. The type is just int -> int -> int.
<Smerdyakov>
So now what is the type (f 0 1)?
<phj>
int->int
<Smerdyakov>
Good. Now, using that same reasoning, what is the type of (Array.make_matrix 5 5)?
<phj>
oh,'a->'a array array
<Smerdyakov>
Yup!
<Smerdyakov>
So, you see, it's not an array at all. :)
<phj>
yeh
<phj>
Where can I found some examples on manuiplate matrix?
<Smerdyakov>
You shouldn't need any. The types give it all away.
<Smerdyakov>
Are you saying you don't know how to create a matrix?
<phj>
I'm not familiar with ocaml
<Smerdyakov>
Then the thing to do is learn OCaml, maybe from the tutorial in the manual.
<Smerdyakov>
Guessing will get you nowhere with OCaml. :)