kaustuv changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | 3.11.1 out now! Get yours from http://caml.inria.fr/ocaml/release.html
Skolem has quit ["Connection reset by pear"]
m3ga has quit [Remote closed the connection]
Jedai has quit [Read error: 110 (Connection timed out)]
NyNix has joined #ocaml
m3ga has joined #ocaml
<NyNix> anyone here tell my how to use Array.iter properly?
<m3ga> NyNix: whats the problem?
<NyNix> I have a function (a test) that is giving me the following error when I try to use Array.iter 'function' array
<NyNix> I am trying to do smthing simple
<NyNix> array of ints
<NyNix> and want to operate on each
<NyNix> so I have:
<NyNix> let test a = a + 1 ;;
<NyNix> and have my array 'array'
<NyNix> and when I try : Array.iter test array;;
<NyNix> I get :
<m3ga> function needs to have an function sig of : a' -> unit
<m3ga> test has a signature of : int -> int
<NyNix> right, so I am not sure hw to create the functioon so it has that type
<NyNix> I can create a function 'test' like this: let a = ();;
<NyNix> but of course it doesn't perform any operation
<m3ga> i suspect you want to use a Fold instead, either fold_left or fold_right.
<NyNix> oh
<NyNix> I am very new to Ocaml
<m3ga> let result = Array.fold_left test 0 array ;;
<NyNix> and am trying to work on some basics, so I can understand what's happening.
<NyNix> ok
<NyNix> and in that case I can use a function with a type int?
<NyNix> (sig)
<m3ga> yes
<NyNix> great
<NyNix> thanks very much!
<m3ga> sorry test needs to be changed a litte too.
<NyNix> that's finid
<NyNix> fine !
<m3ga> let test accum array_value = accum + array_value ;;
<NyNix> I have _no_ requirements other than to begin to learn ..
<NyNix> will do
* m3ga -> lunch. back soon.
<NyNix> thanks for the pointer
<m3ga> that was me learning about fold :-)
<NyNix> cool
* NyNix reads
<NyNix> sbok --> thanks..
<m3ga> imperatice languages don't have fold. that means its a new concept for people coming to functional langauges
<brendan> I think just writing iter and map via fold helps make it sink in.
Jedai has joined #ocaml
ramenboy has joined #ocaml
Mr_Awesome has quit [Read error: 110 (Connection timed out)]
kaustuv has joined #ocaml
Jedai has quit [Read error: 110 (Connection timed out)]
jeddhaberstro has quit [Client Quit]
naufraghi has joined #ocaml
m3ga has quit ["disappearing into the sunset"]
Modius has joined #ocaml
eevar2 has joined #ocaml
^authent1c is now known as authentic
authentic has quit ["leaving"]
authentic has joined #ocaml
wysek has quit [Remote closed the connection]
<kaustuv> Does anyone know if the project to build a concurrent collector for ocaml was abandoned or if it is still being worked on?
komar_ has joined #ocaml
Mr_Awesome has joined #ocaml
BiDOrD has quit [Read error: 110 (Connection timed out)]
BiDOrD has joined #ocaml
maxote has quit [Read error: 110 (Connection timed out)]
maxote has joined #ocaml
<flux> good question, I'd like to know too
<flux> I think they should've had something out by now..
komar_ has quit [Read error: 113 (No route to host)]
hkBst has joined #ocaml
youscef has joined #ocaml
TaXules has quit [Read error: 110 (Connection timed out)]
TaXules has joined #ocaml
LeCamarade|Away is now known as LeCamarade
LeCamarade has quit ["Gone."]
_andre has joined #ocaml
Associat0r has joined #ocaml
gazoline has joined #ocaml
Associat0r has quit [Client Quit]
komar_ has joined #ocaml
thelema has joined #ocaml
Narrenschiff has joined #ocaml
bombshelter13_ has joined #ocaml
Amorphous has quit [Read error: 110 (Connection timed out)]
Amorphous has joined #ocaml
Anarchos has joined #ocaml
_schulte_ has joined #ocaml
gazoline has quit [Remote closed the connection]
<_schulte_> hi, I'm new to ocaml, and I need to parallelize an existing GP application so it can take advantage of multiple cpus, hopefully with as little change as possible
<Anarchos> _schulte_ it is not feasible on ocaml, unless you can fork yoru processes
<_schulte_> It looks like cothreads or OCamlP3L are both options, does anyone have advice
<thelema> ocaml threads stay on one CPU
<_schulte_> Anarchos: I was scared of that... thanks
stan_ has joined #ocaml
kaustuv has quit [Read error: 104 (Connection reset by peer)]
eevar2 has quit ["This computer has gone to sleep"]
Narrenschiff has quit []
gim has quit []
gim has joined #ocaml
_schulte_ has quit [Read error: 110 (Connection timed out)]
jeddhaberstro has joined #ocaml
_schulte_ has joined #ocaml
rwmjones is now known as rwmjones-afk
stan_ has quit [Client Quit]
stan_ has joined #ocaml
stan_ has quit [Client Quit]
Submarine has quit [Read error: 110 (Connection timed out)]
Submarine has joined #ocaml
stan_ has joined #ocaml
malc_ has joined #ocaml
stan_ has quit [Client Quit]
stan_ has joined #ocaml
rwmjones-afk is now known as rwmjones
slash_ has joined #ocaml
ulfdoz has joined #ocaml
_schulte_ has quit [Read error: 110 (Connection timed out)]
sunnyday has joined #ocaml
_schulte_ has joined #ocaml
naufraghi has quit []
malc_ has quit ["leaving"]
<Anarchos> how to get more information on a Parsing.parse_error in ocamlyacc ? I just need the last symbol read
sunnyday has quit [Read error: 110 (Connection timed out)]
_andre has quit ["leaving"]
<_schulte_> Hi, I'm new to ocaml and have a debugging question...
<_schulte_> every time I try to run my program with ocameldebug I get the folowing error "../modify is not a bytecode file.", even though program is set to point to the executable, and I compiled using the "-g" flag
<_schulte_> any suggestions?
<brendan> did you link with -g too?
<brendan> I use ocamlbuild -cflag -g -lflag -g
<_schulte_> brendan: thanks, maybe I'm not understanding the compile process... could you point me towards instructions? I'm building with a makefile, and it uses -g every time camlc is called, not sure if that's sufficient
<brendan> I've forgotten how to do anything without ocamlbuild :)
<_schulte_> hmm, trying to use ocamlbuild "ocamlbuild -cflag -g -lflag -g modify.ml", but it doesn't do anything "Finished, 0 targets (0 cached) in 00:00:00."
<brendan> try modify.byte
Submarine has quit [Read error: 110 (Connection timed out)]
<_schulte_> brendan: thanks, that's closer, now I'm getting a "Included or excluded directories must be implicit" error trying to include CLI
<brendan> don't know about that one I'm afraid
<_schulte_> brendan: thanks anyways
Narrenschiff has joined #ocaml
Jedai has joined #ocaml
youscef has quit ["KVIrc 3.4.0 Virgo http://www.kvirc.net/"]
NyNix has quit ["Lost terminal"]
stan_ has quit [Client Quit]
Anarchos has quit ["Vision[0.9.7-H-090423]: i've been blurred!"]
bombshelter13_ has quit []
Narrenschiff has quit []
hkBst has quit [Connection reset by peer]
peddie has quit [Read error: 110 (Connection timed out)]
peddie has joined #ocaml
naufraghi has joined #ocaml
slash_ has quit [Client Quit]
<_schulte_> can anyone point me towards a simple example of using the Unix.fork function?
<brendan> if fork () = 0 then execv "foo" [| "foo" |] ?