struktured has quit [Remote host closed the connection]
tmaedaZ has quit [Ping timeout: 276 seconds]
eb4890 has left #ocaml []
eb4890 has joined #ocaml
* eb4890
wonders if he is still banned, and apologises for the spam if he isn't
<derdon>
eb4890: I can hear you :)
tmaedaZ has joined #ocaml
<derdon>
eb4890: so you're probably not banned
<eb4890>
derdon: Thanks. I found out that I needed to register my nickname so I could speak in #ocaml.
ygrek has quit [Ping timeout: 245 seconds]
<derdon>
eb4890: a good idea of the moderators of #ocaml
<eb4890>
So my question is, how would people go about making an array or list of functions, when each function is different? I am somewhat new to ocaml.
<eb4890>
I'm not currently using batteries included, so can't use list comprehensions.
<derdon>
eb4890: you could use tuples
<eb4890>
derdon: Hmm. I'll go and have a look.
<derdon>
but I'm not sure if it's good style. I am new to ocaml like you are
tmaedaZ has quit [Ping timeout: 260 seconds]
<eb4890>
I think arrays should be okay. All the functions are the same type. They are just partially applied to different arguments. It seems to be a matter of initialising the array.
<derdon>
eb4890: you didn't say that they're all of the same type
<derdon>
so I assumed that they are not
<eb4890>
derdon: Fair enough, I should have been clearer.
<derdon>
good, problem solved :)
tmaedaZ has joined #ocaml
<eb4890>
My trouble is I am creating an array of threads, but I don't want to initialise the array with a single function. I'm trying crazy stuff with obj.magic but getting type errors.
<eb4890>
I'll pastebin it in a bit, once I have commented it.
<mfp>
eb4890: by all means stay away from Obj.magic, especially if you're new to OCaml :-)
<eb4890>
mfp: It wasn't my first choice. I trusted in google telling me stuff.
<derdon>
mfp: good thing that I don't know it yet :)
<thelema>
eb4890: each function is different in type?
timbermaw has joined #ocaml
timbermaw has left #ocaml []
Amorphous has quit [Ping timeout: 260 seconds]
<eb4890>
thelema: Nope same type. But applied to different arguments e.g. (foo x) and (foo (x+1))
<thelema>
then you can use a list or array. Do you have a list or array of the arguments?
<thelema>
what should go there is what's in your for loop
<thelema>
fun i -> let min = i*n1/numthreads and max = (i+1) * n1 / numthreads in (fun _ -> Thread.create ...)
<eb4890>
But I get my i from the for loop....
<derdon>
eb4890: your indentations and linebreakings are rather odd, not to say shocking
<thelema>
yes, you will get i from Array.init instead
<derdon>
eb4890: and please use EOL79 or EOL80
<derdon>
eb4890: and what's that f in parentheses? it's useless to put a single name into parens
<derdon>
eb4890: and for the lines 27-42 I recommend writing a seperate function
<eb4890>
derdon: it is a function of type a->a->a and should be commutative.
<derdon>
eb4890: and don't forget: inline comments suck!
<derdon>
eb4890: so what? ``a (b) c`` is equivalent to ``a b c``
<eb4890>
thelema:Let me have a look at Array.init.
<eb4890>
derdon: I started ocaml a couple of days ago. My reasoning was this f is a function. How does the compiler know whether myfunc f a means apply f to a and then myfunc to whatever f returns or myfunc to f and then the function that returns to a. I was being safe rather than sorry.
_unK has quit [Read error: Connection reset by peer]
Amorphous has joined #ocaml
_unK has joined #ocaml
<derdon>
eb4890: ``myfunc f a`` applies the function myfunc with the arguments f and a
<derdon>
eb4890: ``myfunc (f a)`` is different. is applies the function f with the argument a and gives this return to myfunc as a parameter
<derdon>
eb4890: the first attempt is equal to ``(print_int 1) + 3``
<derdon>
which is ``() + 3`` after the first step of evaluation
<derdon>
and unit + int cannot be calculated
eb4890 has quit [Read error: Operation timed out]
eb4890 has joined #ocaml
thieusoai has quit [Remote host closed the connection]
<eb4890>
Thelema: Thanks I somehow was reading the wrong function.
<thelema>
no problem. Array.init is exactly what you want for this situation.
<thelema>
you probably don't want the (fun _ -> ) around your Thread.create, I think.
<eb4890>
I borrowed that off something else I found that was working on the manycore variant of haskell. Which is what I want to go to eventually. It seemed to work on an earlier broken version.
struktured has joined #ocaml
<eb4890>
thelema: Well I did need to get rid of it. Now I have a bug somewhere else. Thanks for your help.
<thelema>
you're welcome.
SEcki has quit [Quit: cu]
sepp2k1 has quit [Quit: Leaving.]
tmaedaZ has quit [Ping timeout: 245 seconds]
tmaedaZ has joined #ocaml
sepp2k has joined #ocaml
boscop_ has joined #ocaml
boscop has quit [Ping timeout: 258 seconds]
boscop_ has left #ocaml []
boscop has joined #ocaml
<eb4890>
Hmm, with large arrays my code takes significantly longer in oc4mc. So long I don't think it will halt...
<thelema>
try forking
<thelema>
how big of arrays?
maskd has joined #ocaml
<eb4890>
Thelema: It is not my code. Even doing a normal fold_left seems to make it hang. An array of 1000000, which normal ocaml deals with in a handful of secs.
<eb4890>
Sorry 10000000. Counting 0s is not easy this late, which means I should probably sleep on it.
<eb4890>
Thelema: Actually turns out it doesn't like creating a 10 million sized array. I'll file a bug report or question tomorrow.
struktured has quit [Ping timeout: 264 seconds]
<thelema>
32-bit ocaml?
<eb4890>
I'm running on 64bit. And I'm using max as my test function, so I should be going into bignum territory.
<eb4890>
shouldn't*
<eb4890>
Anyway sleep.
eb4890 has quit [Remote host closed the connection]
sepp2k has quit [Quit: Leaving.]
humasect has quit [Quit: Leaving...]
bzzbzz has quit [Quit: leaving]
maskd has quit [Quit: leaving]
enthymeme has quit [Quit: rcirc on GNU Emacs 23.1.1]
yakischloba has quit [Quit: Leaving.]
yakischloba has joined #ocaml
yakischloba has quit [Ping timeout: 260 seconds]
boscop_ has joined #ocaml
boscop has quit [Read error: Connection reset by peer]
drk-sd has quit [Ping timeout: 252 seconds]
drk-sd has joined #ocaml
jeddhaberstro has joined #ocaml
enthymeme has joined #ocaml
jeddhaberstro has quit [Read error: Connection reset by peer]
jeddhaberstro has joined #ocaml
derdon has quit [Quit: derdon]
drk-sd has quit [Quit: {'EXIT', drk-sd, "bye"}]
tmaedaZ is now known as tmaeda
mrvn has quit [Ping timeout: 246 seconds]
mrvn has joined #ocaml
_unK has quit [Remote host closed the connection]
yakischloba has joined #ocaml
oc13 has joined #ocaml
eldragon has quit [Read error: Connection reset by peer]
tmaeda is now known as tmaedaZ
fabjan has joined #ocaml
mrvn has quit [Ping timeout: 268 seconds]
mrvn has joined #ocaml
yakischloba has quit [Quit: Leaving.]
enthymeme has quit [Ping timeout: 248 seconds]
jeddhaberstro has quit [Read error: Connection reset by peer]
jeddhaberstro has joined #ocaml
enthymeme has joined #ocaml
tmaedaZ is now known as tmaeda
jeddhaberstro has quit [Quit: jeddhaberstro]
Associ8or has joined #ocaml
Associat0r has quit [Ping timeout: 245 seconds]
Submarine has joined #ocaml
krankkatze has joined #ocaml
ygrek has joined #ocaml
ulfdoz has joined #ocaml
Associ8or has quit [Quit: Associ8or]
|Jedai| has joined #ocaml
_Jedai_ has quit [Ping timeout: 264 seconds]
boscop_ has left #ocaml []
boscop has joined #ocaml
tmaeda is now known as tmaedaZ
enthymeme has quit [Quit: sleep!]
ikaros has joined #ocaml
smimou has quit [Ping timeout: 260 seconds]
oc131 has joined #ocaml
oc13 has quit [Read error: Connection reset by peer]
oc131 has quit [Ping timeout: 258 seconds]
oc13 has joined #ocaml
fraggle_ has quit [Read error: Connection reset by peer]
sepp2k has joined #ocaml
oc13 has quit [Ping timeout: 258 seconds]
inkbottle has joined #ocaml
inkbottle has left #ocaml []
struktured has joined #ocaml
oc13 has joined #ocaml
spearalot has joined #ocaml
ch077179 has joined #ocaml
spearalot has quit [Ping timeout: 264 seconds]
Demitar has quit [Quit: Bubbles!]
spearalot has joined #ocaml
spearalot has quit [Read error: Connection reset by peer]
SEcki has joined #ocaml
Demitar has joined #ocaml
struktured has quit [Ping timeout: 264 seconds]
Drk-Sd has joined #ocaml
ikaros has quit [Quit: Leave the magic to Houdini]
smimou has joined #ocaml
Drk-Sd has quit [Quit: foo]
drk-sd has joined #ocaml
fraggle_ has joined #ocaml
Yoric has joined #ocaml
struktured has joined #ocaml
smimou has quit [Ping timeout: 246 seconds]
smimou has joined #ocaml
Alpounet has joined #ocaml
Yoric has quit [Quit: Yoric]
struktured has quit [Ping timeout: 246 seconds]
rwmjones has quit [Ping timeout: 245 seconds]
struktured has joined #ocaml
ulfdoz has quit [Ping timeout: 260 seconds]
derdon has joined #ocaml
ulfdoz has joined #ocaml
eb4890 has joined #ocaml
inkbottle has joined #ocaml
inkbottle has left #ocaml []
Yoric has joined #ocaml
Yoric has quit [Client Quit]
yakischloba has joined #ocaml
Yoric has joined #ocaml
ReachingFarr has left #ocaml []
grettke has joined #ocaml
eb4890 has quit [*.net *.split]
drk-sd has quit [*.net *.split]
tmaedaZ has quit [*.net *.split]
willb1 has quit [*.net *.split]
mfp has quit [*.net *.split]
mbishop has quit [*.net *.split]
Camarade_Tux has quit [*.net *.split]
sfuentes has quit [*.net *.split]
TaXules has quit [*.net *.split]
Amorphous has quit [*.net *.split]
bacam has quit [*.net *.split]
olegfink has quit [*.net *.split]
Asmadeus has quit [*.net *.split]
ski has quit [*.net *.split]
yakischloba has quit [*.net *.split]
SEcki has quit [*.net *.split]
thelema has quit [*.net *.split]
Pepe_ has quit [*.net *.split]
infoe has quit [*.net *.split]
|Jedai| has quit [*.net *.split]
mjonsson has quit [*.net *.split]
pcao has quit [*.net *.split]
joewilliams_away has quit [*.net *.split]
orbitz has quit [*.net *.split]
Chile has quit [*.net *.split]
peper has quit [*.net *.split]
Demitar has quit [*.net *.split]
sepp2k has quit [*.net *.split]
ygrek has quit [*.net *.split]
linus5 has quit [*.net *.split]
Mr_Awesome has quit [*.net *.split]
mal`` has quit [*.net *.split]
CodeBlock has quit [*.net *.split]
javax_ has quit [*.net *.split]
derdon has quit [*.net *.split]
smimou has quit [*.net *.split]
ch077179 has quit [*.net *.split]
Submarine has quit [*.net *.split]
srcerer has quit [*.net *.split]
Leonidas has quit [*.net *.split]
julm has quit [*.net *.split]
diml has quit [*.net *.split]
noj has quit [*.net *.split]
gildor has quit [*.net *.split]
brendan has quit [*.net *.split]
ftrvxmtrx has quit [*.net *.split]
patronus has quit [*.net *.split]
fremo_ has quit [*.net *.split]
nimred has quit [*.net *.split]
Yoric has quit [*.net *.split]
oc13 has quit [*.net *.split]
boscop has quit [*.net *.split]
dark has quit [*.net *.split]
jlouis has quit [*.net *.split]
flux has quit [*.net *.split]
ulfdoz has quit [*.net *.split]
Alpounet has quit [*.net *.split]
haelix has quit [*.net *.split]
svenl_ has quit [*.net *.split]
npouillard has quit [*.net *.split]
krankkatze has quit [Read error: Connection reset by peer]
sshc has quit [Ping timeout: 255 seconds]
msteele_ has joined #ocaml
msteele has quit [Ping timeout: 240 seconds]
mrvn has quit [Ping timeout: 240 seconds]
hyperboreean has quit [Ping timeout: 240 seconds]
maskd has joined #ocaml
hyperboreean has joined #ocaml
mrvn has joined #ocaml
sshc has joined #ocaml
krankkatze has joined #ocaml
Yoric has joined #ocaml
yakischloba has joined #ocaml
eb4890 has joined #ocaml
ulfdoz has joined #ocaml
derdon has joined #ocaml
Alpounet has joined #ocaml
smimou has joined #ocaml
drk-sd has joined #ocaml
Demitar has joined #ocaml
SEcki has joined #ocaml
ch077179 has joined #ocaml
oc13 has joined #ocaml
sepp2k has joined #ocaml
boscop has joined #ocaml
|Jedai| has joined #ocaml
ygrek has joined #ocaml
Submarine has joined #ocaml
tmaedaZ has joined #ocaml
Amorphous has joined #ocaml
thelema has joined #ocaml
linus5 has joined #ocaml
brendan has joined #ocaml
mjonsson has joined #ocaml
willb1 has joined #ocaml
Mr_Awesome has joined #ocaml
olegfink has joined #ocaml
dark has joined #ocaml
ftrvxmtrx has joined #ocaml
jlouis has joined #ocaml
pcao has joined #ocaml
patronus has joined #ocaml
joewilliams_away has joined #ocaml
orbitz has joined #ocaml
TaXules has joined #ocaml
sfuentes has joined #ocaml
Camarade_Tux has joined #ocaml
mbishop has joined #ocaml
mfp has joined #ocaml
ski has joined #ocaml
Asmadeus has joined #ocaml
Chile has joined #ocaml
peper has joined #ocaml
infoe has joined #ocaml
javax_ has joined #ocaml
mal`` has joined #ocaml
CodeBlock has joined #ocaml
Pepe_ has joined #ocaml
bacam has joined #ocaml
haelix has joined #ocaml
svenl_ has joined #ocaml
srcerer has joined #ocaml
Leonidas has joined #ocaml
julm has joined #ocaml
flux has joined #ocaml
fremo_ has joined #ocaml
diml has joined #ocaml
nimred has joined #ocaml
noj has joined #ocaml
gildor has joined #ocaml
npouillard has joined #ocaml
Anarchos has joined #ocaml
sshc has quit [Ping timeout: 258 seconds]
sshc has joined #ocaml
orbitz_ has joined #ocaml
diml has quit [Ping timeout: 258 seconds]
Pengzhen has joined #ocaml
smimram has joined #ocaml
npouilla1d has joined #ocaml
svenl has joined #ocaml
ppr has joined #ocaml
Leonidas has quit [Ping timeout: 258 seconds]
noj has quit [Ping timeout: 258 seconds]
npouillard has quit [Write error: Broken pipe]
diml has joined #ocaml
orbitz has quit [Read error: Connection reset by peer]
|Jedai| has quit [Ping timeout: 246 seconds]
derdon has quit [Ping timeout: 246 seconds]
smimou has quit [Ping timeout: 246 seconds]
Submarine has quit [Ping timeout: 246 seconds]
mjonsson has quit [Ping timeout: 246 seconds]
pcao has quit [Ping timeout: 246 seconds]
peper has quit [Ping timeout: 246 seconds]
ch077179 has quit [Ping timeout: 246 seconds]
joewilliams_away has quit [Ping timeout: 246 seconds]
Chile has quit [Ping timeout: 246 seconds]
noj has joined #ocaml
Chile has joined #ocaml
mjonsson has joined #ocaml
Submarine has joined #ocaml
Leonidas_ has joined #ocaml
Leonidas_ has quit [Changing host]
Leonidas_ has joined #ocaml
ppr has left #ocaml []
sshc has quit [Changing host]
sshc has joined #ocaml
Submarine has quit [Changing host]
Submarine has joined #ocaml
ch077179 has joined #ocaml
olegfink has quit [*.net *.split]
Asmadeus has quit [*.net *.split]
ski has quit [*.net *.split]
jonafan_ has joined #ocaml
orbitz_ has quit [Quit: Reconnecting]
orbitz has joined #ocaml
haelix_ has joined #ocaml
ski has joined #ocaml
ulfdoz has quit [Ping timeout: 260 seconds]
haelix has quit [Ping timeout: 260 seconds]
svenl_ has quit [Ping timeout: 260 seconds]
joewilliams_away has joined #ocaml
olegfink has joined #ocaml
Asmadeus has joined #ocaml
Asmadeus has quit [Ping timeout: 240 seconds]
Asmadeus has joined #ocaml
msteele has joined #ocaml
orbitz has quit [*.net *.split]
svenl has quit [*.net *.split]
smimram has quit [*.net *.split]
brendan has quit [*.net *.split]
ftrvxmtrx has quit [*.net *.split]
patronus has quit [*.net *.split]
fremo_ has quit [*.net *.split]
nimred has quit [*.net *.split]
grettke has quit []
diml has quit [Ping timeout: 264 seconds]
msteele_ has quit [Ping timeout: 264 seconds]
jonafan has quit [Ping timeout: 264 seconds]
diml has joined #ocaml
boscop_ has joined #ocaml
flx_ has joined #ocaml
ulfdoz has joined #ocaml
flx_ is now known as Guest62262
flux has quit [Remote host closed the connection]
Guest62262 is now known as flux
patronus has joined #ocaml
thelema_ has joined #ocaml
boscop has quit [Ping timeout: 268 seconds]
thelema has quit [Write error: Broken pipe]
orbitz has joined #ocaml
svenl has joined #ocaml
smimram has joined #ocaml
brendan has joined #ocaml
ftrvxmtrx has joined #ocaml
fremo_ has joined #ocaml
nimred has joined #ocaml
Yoric has quit [Quit: Yoric]
Camarade1Tux has joined #ocaml
mbishop_ has joined #ocaml
ulfdoz has quit [*.net *.split]
mfp has quit [*.net *.split]
mbishop has quit [*.net *.split]
Camarade_Tux has quit [*.net *.split]
sfuentes has quit [*.net *.split]
TaXules has quit [*.net *.split]
TaXules has joined #ocaml
enthymeme has joined #ocaml
mfp has joined #ocaml
sfuentes has joined #ocaml
boscop_ has left #ocaml []
ulfdoz has joined #ocaml
boscop has joined #ocaml
linus5` has joined #ocaml
javax has joined #ocaml
ygrek has quit [Ping timeout: 245 seconds]
javax_ has quit [Ping timeout: 245 seconds]
Mr_Awesome has quit [Ping timeout: 245 seconds]
linus5 has quit [Ping timeout: 245 seconds]
ygrek has joined #ocaml
Mr_Awesome has joined #ocaml
caligula__ has joined #ocaml
caligula_ has quit [Write error: Connection reset by peer]
jonafan has joined #ocaml
smimram has quit [Ping timeout: 276 seconds]
jonafan_ has quit [Ping timeout: 260 seconds]
matthieu has joined #ocaml
maattd has quit [Ping timeout: 260 seconds]
smimram has joined #ocaml
krankkatze has quit [Remote host closed the connection]
krankkatze has joined #ocaml
smimram has quit [Ping timeout: 268 seconds]
sgnb` has quit [Read error: Connection reset by peer]
smimram has joined #ocaml
ygrek has quit [Remote host closed the connection]
Associat0r has joined #ocaml
ygrek has joined #ocaml
* Anarchos
is idle: BRB
Camarade1Tux has left #ocaml []
Camarade_Tux has joined #ocaml
mbishop_ is now known as mbishop
sgnb` has joined #ocaml
_unK has joined #ocaml
derdon has joined #ocaml
Yoric has joined #ocaml
Yoric has quit [Client Quit]
itewsh has joined #ocaml
ofaurax has joined #ocaml
Demitar has quit [Quit: Bubbles!]
drunK has joined #ocaml
_unK has quit [Ping timeout: 276 seconds]
slash_ has joined #ocaml
jeddhaberstro has joined #ocaml
Submarine has quit [Quit: Leaving]
M| has quit [Ping timeout: 260 seconds]
poincare101 has joined #ocaml
tmaedaZ has quit [Ping timeout: 276 seconds]
tmaedaZ has joined #ocaml
M| has joined #ocaml
tmaedaZ has quit [Ping timeout: 246 seconds]
struktured has quit [Remote host closed the connection]
tmaedaZ has joined #ocaml
Demitar has joined #ocaml
smimram has quit [Quit: bli]
ch077179 has quit [Quit: Verlassend]
itewsh has quit [Quit: Quitte]
M| has quit [Read error: Connection reset by peer]
M| has joined #ocaml
enthymeme has quit [Quit: router hop!]
M| has quit [Read error: Connection reset by peer]
M| has joined #ocaml
oc13 has quit [Read error: Operation timed out]
virtuoussin13 has joined #ocaml
drunK is now known as _unK
enthymeme has joined #ocaml
virtuoussin13 has quit [Quit: ChatZilla 0.9.86 [Firefox 3.6.2/20100323193731]]
smimou has joined #ocaml
eb4890 has quit [Ping timeout: 276 seconds]
ygrek has quit [Remote host closed the connection]
ygrek has joined #ocaml
matthieu has quit [Remote host closed the connection]
ulfdoz has quit [Ping timeout: 264 seconds]
Anarchos has quit [Ping timeout: 268 seconds]
inkbottle has joined #ocaml
inkbottle has left #ocaml []
ofaurax has quit [Quit: Leaving]
eb4890 has joined #ocaml
Leonidas_ is now known as Leonidas
ygrek has quit [Ping timeout: 245 seconds]
krankkatze has quit [Remote host closed the connection]
slash_ has quit [Quit: leaving]
javax has quit [Read error: Connection reset by peer]