dark_light changed the topic of #ocaml to: OCaml 3.09.2 available! Archive of Caml Weekly News: http://sardes.inrialpes.fr/~aschmitt/cwn/ | A free book: http://cristal.inria.fr/~remy/cours/appsem/ | Mailing List: http://caml.inria.fr/bin/wilma/caml-list/ | Cookbook: http://pleac.sourceforge.net/
dark_light has joined #ocaml
MisterC has quit [Remote closed the connection]
mariano_ has quit [Read error: 145 (Connection timed out)]
_fab has quit []
danly has quit ["Leaving"]
bmiller has quit []
sponge45 has joined #ocaml
chessguy has quit [" HydraIRC -> http://www.hydrairc.com <- Try something fresh"]
jordan has joined #ocaml
<jordan> is there a way to use fold_left but make it override the accumulator? so apply the function such that its result replaces the accumulator at every iteration
batdog is now known as batdog|gone
<sponge45> jordan, I don't understand.
<sponge45> List.fold_left (fun acc x -> acc + x) 0 [1;2;3];;
<sponge45> gives 6
<sponge45> What would you like instead?
<jordan> so that's good - i get that - but i am trying to do it with lists
<jordan> and i dont want to append to the accumulator list; i just want to overwrite it
<sponge45> do you have an example?
<jordan> it's similar to doing: List.map (fun x -> some_list) my_list;; and then taking the last element of that
<sponge45> let result = ref [] in List.iter (fun x -> result := some_list) my_list; !result;;
<sponge45> is it what you mean?
<tsuyoshi> that sounds like you just want the tail
<tsuyoshi> but are you calling a function with side effects?
pango has quit [Remote closed the connection]
pango has joined #ocaml
danly has joined #ocaml
Mr_Awesome has joined #ocaml
mariano_ has joined #ocaml
danly has quit [Remote closed the connection]
mikeX has quit ["leaving"]
johnnowak has joined #ocaml
trrkkkkkk has joined #ocaml
chessguy has joined #ocaml
trrkkkkk has quit [Read error: 113 (No route to host)]
khaladan_ has joined #ocaml
danly has joined #ocaml
khaladan has quit [Read error: 145 (Connection timed out)]
ramkrsna has joined #ocaml
danly has quit ["Leaving"]
johnnowak has quit []
mariano_ has quit [Read error: 110 (Connection timed out)]
joshcryer has joined #ocaml
ramkrsna has quit [Read error: 104 (Connection reset by peer)]
shawn__ has joined #ocaml
falconair has joined #ocaml
chessguy has quit [" Like VS.net's GUI? Then try HydraIRC -> http://www.hydrairc.com <-"]
ramkrsna has joined #ocaml
Mr_Awesome has quit ["and the Awesome Level drops"]
_shawn has joined #ocaml
Skal has joined #ocaml
ramkrsna has quit [Remote closed the connection]
pango_ has joined #ocaml
sponge45 has quit ["zzzzzzzzzz"]
pango has quit [Remote closed the connection]
Smerdyakov has quit ["Leaving"]
ramkrsna has joined #ocaml
falconair has quit [Client Quit]
ramkrsna has quit ["Leaving"]
dark_light has quit [Read error: 110 (Connection timed out)]
trrkkkkk has joined #ocaml
_fab has joined #ocaml
trrkkkkkk has quit [Read error: 113 (No route to host)]
_velco has joined #ocaml
iZZy`` has joined #ocaml
ikaros_ has quit [Read error: 110 (Connection timed out)]
pango_ has quit [Remote closed the connection]
velco has joined #ocaml
pango has joined #ocaml
love-pingoo has joined #ocaml
kral has joined #ocaml
ramkrsna has joined #ocaml
<flux__> hmh.. there should be a tool for reordering functions so that the module compiles..
<flux__> it's really boring to refactor stuff into functions, because you need to move the functions the code depends on before the new function
<flux__> and that may lead to moving other functions
<flux__> actually a function dependency graph could be useful for this
<pango> that's an example of topological sorting
<pango> ocamldsort does it for modules, it must be doable for functions ;)
<flux__> I wonder if some data produced by standard ocaml tools would be suitable for generating that graph
<flux__> that would really be useful in determining functions that are used by a single function, or a group of functions
<pango> standard tools usually require the module to compile, however
Snark has joined #ocaml
<flux__> yes
<flux__> but there are all funky parameters
<flux__> like -dtypes
<flux__> or maybe it would require using camlp4
<pango> yup
unfo- has quit [Read error: 113 (No route to host)]
slipstream has joined #ocaml
slipstream-- has quit [Operation timed out]
<flux__> is there a native version of .cmi? I find that if I make an .mli-file for my module, the depending modules don't need to be recompiled if I modify my .ml, however the .cmx files do
<flux__> maybe that's just the way it is
<flux__> ocamldep writes dependency on module.cmx, but doesn't write dependency on module.cmo anymore
<pango> native compiler may have stricter requirements (cross-module functions inlining ?)
<flux__> yeah.. I suppose that would be a difficult bug to have in ocamldep anyway.
<flux__> if it handles the .cmo-case correctly
<flux__> funny, I feed only *.ml to ocamldep, yet it works correctly
<flux__> smart :)
<flux__> even in the absence of the .ml-file.. (I auto-generate version.ml, but now provided version.mli)
<flux__> hm, not very correctly, I need to include *.mli too to have make -j work properly
trrkkkkkk has joined #ocaml
trrkkkkk has quit [Read error: 113 (No route to host)]
unfo- has joined #ocaml
buluca has quit [Read error: 104 (Connection reset by peer)]
MisterC has joined #ocaml
Skal has quit [Read error: 60 (Operation timed out)]
unfo- has quit [Read error: 110 (Connection timed out)]
jordan has quit ["This computer has gone to sleep"]
mariano_ has joined #ocaml
unfo- has joined #ocaml
buluca has joined #ocaml
mariano_ has quit [Remote closed the connection]
buluca is now known as bulucanerd
chessguy has joined #ocaml
chessguy has quit [" HydraIRC -> http://www.hydrairc.com <- IRC with a difference"]
unfo-ninja has joined #ocaml
unfo- has quit [Read error: 104 (Connection reset by peer)]
khaladan has joined #ocaml
khaladan_ has quit [Connection timed out]
chessguy has joined #ocaml
unfo-ninja has quit [Read error: 110 (Connection timed out)]
chessguy has quit [" HydraIRC -> http://www.hydrairc.com <- The dawn of a new IRC era"]
jajs has joined #ocaml
unfo- has joined #ocaml
trrkkkkk has joined #ocaml
cmeme has quit [Read error: 104 (Connection reset by peer)]
cmeme has joined #ocaml
cmeme has quit [Remote closed the connection]
cmeme has joined #ocaml
bmiller has joined #ocaml
trrkkkkkk has quit [Read error: 113 (No route to host)]
<gunark> can someone suggest a quick way to read input from a pipe?
<gunark> i'm a bit confused about what you're supposed to do with the result of Unix.pipe ....
<love-pingoo> close one end and read from the other
<love-pingoo> in other words, what you'd do in C
<love-pingoo> what's your exact goal ?
<gunark> right now...
<gunark> cat something | ocaml unix.cam test.ml
<gunark> should print out whateve ris coming in from cat something
<love-pingoo> you don't need to create a pipe, then
<gunark> no?
<love-pingoo> the | operator sends stuff on the stdin filedescription
<love-pingoo> s/description/descriptor/
<gunark> ah ok good
<love-pingoo> you can just read it by using standard input functions, from Unix or even Pervasives
<gunark> stdin is a pervesive right?
<love-pingoo> yup
<love-pingoo> stdin : in_channel
<love-pingoo> Unix.stdin : Unix.file_descr
<gunark> ok cool, that seems to have worked..
Smerdyakov has joined #ocaml
<gunark> Unix.read Unix.stdin .... etc.
<gunark> thanks!
<love-pingoo> everything works today ^^
<gunark> :)
love-pingoo has quit ["Leaving"]
danly has joined #ocaml
bulucanerd has quit [Read error: 131 (Connection reset by peer)]
chessguy has joined #ocaml
kral has quit [Remote closed the connection]
velco has quit ["Ex-Chat"]
bluestorm has joined #ocaml
pango_ has joined #ocaml
pango has quit [Dead socket]
_velco has quit ["I'm outta here ..."]
postalchris has joined #ocaml
love-pingoo has joined #ocaml
_JusSx_ has joined #ocaml
danly has quit ["Leaving"]
slipstream has quit [Remote closed the connection]
jajs has quit [Remote closed the connection]
slipstream has joined #ocaml
trrkkkkkk has joined #ocaml
trrkkkkk has quit [Read error: 113 (No route to host)]
chessguy has quit [" HydraIRC -> http://www.hydrairc.com <- IRC with a difference"]
Snark has quit [Read error: 54 (Connection reset by peer)]
_fab has quit [Read error: 145 (Connection timed out)]
_fab has joined #ocaml
chessguy has joined #ocaml
love-pingoo has quit ["Connection reset by pear"]
danly has joined #ocaml
zamez_ has joined #ocaml
zames has quit [Read error: 110 (Connection timed out)]
zamez_ has quit [Read error: 110 (Connection timed out)]
zamez_ has joined #ocaml
zamez_ is now known as zamez
_JusSx_ has quit [Client Quit]
chessguy has quit [" HydraIRC -> http://www.hydrairc.com <- Leading Edge IRC"]
bluestorm has quit ["Konversation terminated!"]
jordan- has joined #ocaml
chessguy has joined #ocaml
MisterC has quit [Read error: 54 (Connection reset by peer)]
jajs has joined #ocaml
david_koontz has joined #ocaml
trrkkkkk has joined #ocaml
jajs has quit ["Quitte"]
trrkkkkkk has quit [Read error: 145 (Connection timed out)]
love-pingoo has joined #ocaml
_shawn has quit [Read error: 104 (Connection reset by peer)]
_shawn has joined #ocaml