nerdlor has joined #ocaml
merriam has quit ["Client Exiting"]
nerdlor has quit ["Changing server..."]
merriam_ has joined #ocaml
merriam_ is now known as merriam
revanthn has joined #ocaml
caringi has joined #ocaml
revanthn has quit []
caringi has quit ["x"]
ChrisJ has joined #ocaml
gl has joined #ocaml
malc has joined #ocaml
malc has quit ["no reason"]
gl has quit [Read error: 113 (No route to host)]
gl has joined #ocaml
systems has joined #ocaml
systems has quit ["Client Exiting"]
two-face has joined #ocaml
ChrisJ has quit ["Client Exiting"]
two-face has quit ["Client Exiting"]
malc has joined #ocaml
systems has joined #ocaml
RichiH has joined #ocaml
<
RichiH>
phew, i'm glad there is such a channel :)
<
RichiH>
so, i would want to press the up key or anything to call back formerly typed lines, so i can edit them
<
RichiH>
also, i qould want to be able to go back and forth in my code so i can change typos and such
<
RichiH>
any hints?
<
smkl>
try ledit from ftp://ftp.inria.fr/INRIA/Projects/cristal/Daniel.de_Rauglaudre/Tools/
<
smkl>
for more complex stuff you should keep the program in a file and load it in with #use
<
RichiH>
i can load complete text files into ocaml?
<
RichiH>
(me has to add that he just heard about ocaml for the first timwe, but needs it for university)
<
RichiH>
so i gotta have a rather steep learning curve
<
smkl>
sure. just use .ml postfix for the source files
<
RichiH>
".ml postfix"?
<
RichiH>
and tehn i just do use foobar.ml ?
<
smkl>
#use "foobar.ml";;
<
RichiH>
one other question, then:
<
RichiH>
(minor flood of like 4-6 lines following, ok?)
<
RichiH>
# let quadrat (x) = x * x;;
<
RichiH>
val quadrat : int -> int = <fun>
<
RichiH>
# let pi = 3.14;;
<
RichiH>
val pi : float = 3.14
<
RichiH>
# let flaeche (x) = pi * quadrat (x);;
<
RichiH>
This expression has type float but is here used with type int
<
RichiH>
where "pi" is underlined
<
RichiH>
in the last line, that is
<
smkl>
ocaml has different operators for integer and floating point values. use *. instead of *
<
RichiH>
now it complains about quadrat (x) being int, but being used as float
<
smkl>
you didn't redefine quadrat
systems has quit [Killed (NickServ (Nickname Enforcement))]
<
RichiH>
heh, they stole that for out homework :)
SYStems has joined #ocaml
malc has quit [Read error: 110 (Connection timed out)]
<
RichiH>
smkl: sorry for asking this stupid, but why would i want to distinguish between integer and flaoting point?
<
smkl>
RichiH: because they have different kind of properties. even in maths it's always specified what kind of numbers are used
<
RichiH>
hmm, you are right there
<
smkl>
it would be good if same operators could be used, but that would make the type system more complex
<
RichiH>
but this means i have to redine each integer function if i want to use just one float value once
<
smkl>
you can convert integer to float like: "float 1"
<
RichiH>
so it would be best to do everything if float and just type 2.0 instead of 2, etc, right?
<
SYStems>
what is this ledit program good for , it is like an ocaml interactive shell
<
smkl>
SYStems: it's like readline, but a stand-alone application, not library
SYStems has left #ocaml []
<
RichiH>
so much for a "thank you"
<
RichiH>
oups, /me forgot to say thx, also :/
<
RichiH>
thx, smkl :)
<
RichiH>
# let cylinder_area x y = ( 2.0 *. circ_area x ) + ( 2.0 *. pi *. x *. y);;
<
RichiH>
This expression has type float but is here used with type int
<
RichiH>
where is the integer in the last bracket?
<
RichiH>
or does it take x and y as integer?
<
smkl>
you have to use +. just like *.
<
RichiH>
ocml doesn't save any defined funtions or anything when i do ctrl -d, right?
<
RichiH>
can i let it save everything (at least the definitions) into a file with some hotkey?
<
smkl>
RichiH: nope. but ledit can save everything
RichiH has quit ["Elmo is alive and god damn it, he'll get you, too!"]
malc has joined #ocaml
two-face has joined #ocaml
systems has joined #ocaml
two-face has left #ocaml []
malc has quit [Read error: 110 (Connection timed out)]
systems has quit [Read error: 104 (Connection reset by peer)]
mrvn has joined #ocaml
mrvn_ has quit [Read error: 110 (Connection timed out)]
gl has quit [Read error: 104 (Connection reset by peer)]
gl has joined #ocaml
jao has joined #ocaml
skylan has quit ["Reconnecting"]
skylan has joined #ocaml