sponge45 changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/
mbishop has joined #ocaml
mbishop has quit [Remote closed the connection]
mbishop has joined #ocaml
mbishop has quit [Remote closed the connection]
b00t has joined #ocaml
sponge45 has joined #ocaml
Smerdyakov has joined #ocaml
piggybox has joined #ocaml
b00t has quit [Remote closed the connection]
david_koontz has quit [Read error: 110 (Connection timed out)]
Smerdyakov has quit ["Leaving"]
Mr_Awesome has joined #ocaml
<Mr_Awesome> does tuareg mode for emacs not support syntax highlighting in file buffers, or am i insane?
<sponge45> you must be insane :-)
<Mr_Awesome> is there a way to turn it on, or something?
<sponge45> I don't know. I can send you my .emacs if you want.
<Mr_Awesome> that would be awesome
<sponge45> It's very complicated, and I am not the original author, you are warned.
<sponge45> Did you get it?
<Mr_Awesome> yeah, thanks :)
<sponge45> good luck then!
<sponge45> bye
sponge45 has quit ["zzzzzzzzzz"]
johnnowak has joined #ocaml
b00t has joined #ocaml
rillig has quit ["exit(EXIT_SUCCESS)"]
stevan_ has joined #ocaml
stevan has quit [Read error: 113 (No route to host)]
johnnowak has quit []
gim has quit [Remote closed the connection]
Mr_Awesome has quit ["...and the Awesome level drops"]
Z4rd0Z has quit []
pstickne_ is now known as pstickne
david_koontz has joined #ocaml
shawn has quit [Remote closed the connection]
_velco has joined #ocaml
shawn has joined #ocaml
shawn has quit [Remote closed the connection]
pango is now known as pangoafk
jlouis has quit [Remote closed the connection]
asmanian has joined #ocaml
love-pingoo has joined #ocaml
velco has joined #ocaml
david_koontz has quit ["Leaving"]
Smerdyakov has joined #ocaml
lmbdwr has joined #ocaml
piggybox has quit [Connection reset by peer]
piggybox has joined #ocaml
Submarine has quit [Remote closed the connection]
Smerdyakov has quit ["Leaving"]
johnnowak has joined #ocaml
b00t has quit [Remote closed the connection]
Z4rd0Z has joined #ocaml
hmmmmmm has joined #ocaml
johnnowak has quit []
love-pingoo has quit ["Leaving"]
<lmbdwr> what means the _ label in ocaml ?
<stevan_> lmbdwr: it tells Ocaml that you don't care about that variable
stevan_ is now known as stevan
<lmbdwr> stevan, but then what does it mean to have a : let _ = ...
<lmbdwr> and many of that in a single file
<lmbdwr> (after the let beeing code of func)
<lmbdwr> beeing a subprogram, basicaly
<stevan> lmbdwr: I don't know the exact reason or origin for that idiom, but basically it is saying that you don't care about capturing the return value of the let block
asmanian has quit ["Verlassend"]
<lmbdwr> stevan, ok thanks :)
<flux-> methinks it's to avoid an extra level of indentation with for example emacs :-)
<flux-> however, it's also useful if you don't wan't to use ';;', ever
<flux-> the idiom I follow is let main args = .. let _ = main (List.tail (Array.to_list Sys.argv))
ikaros has quit [Read error: 110 (Connection timed out)]
ikaros has joined #ocaml
love-pingoo has joined #ocaml
asmanian has joined #ocaml
love-pingoo has quit ["Connection reset by pear"]
asmanian has quit [Remote closed the connection]
<lmbdwr> what is the best way to do a List.map using a function that takes extra parameters ?
<lmbdwr> (not only the list of elements to apply the function on)
<haelix> lmbdwr: curry that function, so the extra parameters are set
<haelix> and pass the resulting function to List.map
slipstream-- has joined #ocaml
velco has quit ["Ex-Chat"]
<lmbdwr> haelix, can you give an example of map using currified function in ocaml syntax ? I dont find it in ocaml manual/google
<haelix> there's the function:
<haelix> let add x y = x + y;;
<haelix> we will map it:
<haelix> List.map (add 2) [1;2;3];;
<haelix> - : int list = [3; 4; 5]
<haelix> or
<haelix> let add_2 = add 2;;
<haelix> List.map add_2 [1;2;3];;
<haelix> add_2 _is_ a function
slipstream has quit [Connection timed out]
bluestorm has joined #ocaml
<lmbdwr> haelix, hum :) ok, very nice
<lmbdwr> the problem is that I dont have such constants '2' as my extra parameter is an environment
<lmbdwr> and I cannot obviously have as much curryfied functions as I have environments
<lmbdwr> I guess I have to do a recursive function instead of using a map
<haelix> List.map (use_environment_and_param environment) list_of_params;;
smimou has joined #ocaml
<lmbdwr> List.map (eval_env env) elist
<lmbdwr> This expression is not a function, it cannot be applied
<lmbdwr> I declared eval_env in a : [...] and eval_env env expr = eval env expr
descender has quit [zelazny.freenode.net irc.freenode.net]
lmbdwr has quit [zelazny.freenode.net irc.freenode.net]
eradman has quit [zelazny.freenode.net irc.freenode.net]
Oatmeat|umn has quit [zelazny.freenode.net irc.freenode.net]
mellum has quit [zelazny.freenode.net irc.freenode.net]
jdev has quit [zelazny.freenode.net irc.freenode.net]
_velco is now known as velco
lmbdwr has joined #ocaml
descender has joined #ocaml
eradman has joined #ocaml
Oatmeat|umn has joined #ocaml
jdev has joined #ocaml
mellum has joined #ocaml
Smerdyakov has joined #ocaml
pango_ has joined #ocaml
<pango_> lmbdwr: eval_env env expr = eval env expr ? so now eval_env and eval are synonyms ;)
piggybox has left #ocaml []
shawn has joined #ocaml
pangoafk has quit [Remote closed the connection]
<lmbdwr> pango_ : indeed, I can replace eval_env by eval
<lmbdwr> (eval env)
<Smerdyakov> No, you could only replace eval_env with (eval).
<pango_> lmbdwr: I'm not sure to understand what you're trying to do
<lmbdwr> well, my goal was simply to map a function that takes more than one param on a list, using additional fixed params
<pango_> and what's wrong with haelix answer ?
<lmbdwr> I did this, not sure yet if its good : provided a function 'eval env expr', I do List.map (eval env) elist
<lmbdwr> elist beeing a list of expr
<pango_> from your description of the problem, that looks ok
<lmbdwr> so there was no problem in his answer
<lmbdwr> :)
Submarine has joined #ocaml
<pango_> Lisp.map (eval env) elist is the same thing as List.map (fun x -> eval env x) elist ... just less typing ;)
<pango_> (well, almost)
<pango_> evaluation order may be different... http://nopaste.tshw.de/11697536247a912/
<lmbdwr> hum
<lmbdwr> how come I was here is just printed once in the first example
<pango_> because I defined eval as a function of one parameter that returns a function
<pango_> so (eval env) can be fully evaluated instead of building a closure
olegfink has joined #ocaml
<olegfink> hi
<olegfink> found one more ocaml OS
<olegfink> funk
<olegfink> can anyone compile it?
<olegfink> or any hints for:
<olegfink> File "mk/funk.ml", line 1, characters 0-1:
<olegfink> Could not find the .cmi file for interface mk/funk.mli.
ikaros has quit ["Leaving"]
ikaros has joined #ocaml
<lmbdwr> pango_, okay, very interresting
Amorphous has quit [Read error: 110 (Connection timed out)]
olegfink has quit ["Konversation terminated!"]
smimou has quit [Read error: 110 (Connection timed out)]
stevan_ has joined #ocaml
romanoffi has joined #ocaml
stevan has quit [Read error: 110 (Connection timed out)]
Z4rd0Z has quit []
freakazoid has joined #ocaml
bluestorm has quit ["Konversation terminated!"]
velco has quit ["I'm outta here ..."]
piggybox has joined #ocaml
smimp has quit [Read error: 110 (Connection timed out)]
ikaros has quit ["Leaving"]