<mrvn>
ahh right, I was thinking partition, not filter.
<mrvn>
same reason though
hay207__ has quit [Ping timeout: 240 seconds]
<pierpa>
partition can be done in the same way
<mrvn>
yeah, just needs 2 counts
<mrvn>
or count and len-count
<pierpa>
yes, can be tuned in several way
<mrvn>
you should make 2 passes over the array to make it tail recursive
<pierpa>
and call the function 2 times for each element. No way! :D
<mrvn>
pierpa: no, first pass call f a.(i), store the result in an array and count the trues. Second pass copy the trues in one array (and the false in a second for partition).
<pierpa>
storing the result in an array kind of defeats the whole machinery, no?
<mrvn>
pierpa: only way to make it tail recursive without calling f twice I think
<pierpa>
well, yes. In the end the most practical way is to build a list
<pierpa>
and maybe convert to an array if one really really really wants an array in the end
<pierpa>
(This is just for the sake of a fun exercise. If one has fun with this kind of things :)
<pierpa>
then if there could be a way to not use Array.make count a.(0), which I don't like, that would be super
walter|r has quit [Remote host closed the connection]
walter|r has joined #ocaml
walter|r has quit [Ping timeout: 265 seconds]
Reshi has joined #ocaml
Reshi has quit [Ping timeout: 276 seconds]
walter|r has joined #ocaml
dsheets has joined #ocaml
hay207__ has joined #ocaml
dsheets has quit [Ping timeout: 276 seconds]
<Algebr>
okay lwt...lwt(timeout): uncaught exception after timeout:
Reshi has joined #ocaml
hay207 has joined #ocaml
hay207__ has quit [Ping timeout: 260 seconds]
dsheets has joined #ocaml
dsheets has quit [Ping timeout: 276 seconds]
silver has quit [Read error: Connection reset by peer]
clog has quit [Ping timeout: 250 seconds]
_habnabit has quit [Ping timeout: 250 seconds]
ril has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
dsheets has joined #ocaml
dsheets has quit [Ping timeout: 244 seconds]
_habnabit has joined #ocaml
mistermetaphor has joined #ocaml
scarygelatin has quit [Remote host closed the connection]
misterme_ has quit [Ping timeout: 260 seconds]
darkf has joined #ocaml
pierpa has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
mistermetaphor has quit [Remote host closed the connection]
toomuchtvrotsurb has joined #ocaml
Algebr has quit [Remote host closed the connection]
Algebr has joined #ocaml
butts_butts has joined #ocaml
dsheets has joined #ocaml
unbalanced has joined #ocaml
hay207_ has joined #ocaml
dsheets has quit [Ping timeout: 276 seconds]
hay207 has quit [Ping timeout: 276 seconds]
walter|r has quit [Remote host closed the connection]
walter|r has joined #ocaml
walter|r has quit [Ping timeout: 265 seconds]
walter|r has joined #ocaml
walter|r has quit [Remote host closed the connection]
walter|r has joined #ocaml
unbalanced has quit [Quit: WeeChat 1.4]
unbalanced has joined #ocaml
unbalanced has quit [Client Quit]
walter|r has quit [Ping timeout: 240 seconds]
unbalanced has joined #ocaml
dexterph has quit [Ping timeout: 250 seconds]
butts_butts has quit [Ping timeout: 252 seconds]
johnelse has quit [Ping timeout: 276 seconds]
clog has joined #ocaml
hay207__ has joined #ocaml
hay207_ has quit [Ping timeout: 260 seconds]
unbalanced has quit [Quit: WeeChat 1.4]
unbalanced has joined #ocaml
unbalanced has quit [Quit: WeeChat 1.4]
unbalanced has joined #ocaml
johnelse has joined #ocaml
tennix has quit [Ping timeout: 240 seconds]
dsheets has joined #ocaml
slash^ has joined #ocaml
dsheets has quit [Ping timeout: 276 seconds]
unbalanced has quit [Ping timeout: 252 seconds]
dsheets has joined #ocaml
dsheets has quit [Ping timeout: 276 seconds]
sh0t has quit [Ping timeout: 276 seconds]
toomuchtvrotsurb has quit [Remote host closed the connection]
dsheets has joined #ocaml
dsheets has quit [Ping timeout: 276 seconds]
g4143 has joined #ocaml
lostman_ has joined #ocaml
g4143 has quit [Quit: Ex-Chat]
mistermetaphor has joined #ocaml
Ravana has quit [Ping timeout: 260 seconds]
Ravana has joined #ocaml
toomuchtvrotsurb has joined #ocaml
dsheets has joined #ocaml
toomuchtvrotsurb has quit [Remote host closed the connection]
dsheets has quit [Ping timeout: 260 seconds]
Bahman_ has joined #ocaml
Bahman_ has quit [Remote host closed the connection]
Bahman has joined #ocaml
<Bahman>
Greetings.
tennix has joined #ocaml
tmtwd has joined #ocaml
<Algebr>
hi
tennix has quit [Quit: WeeChat 1.4]
wolfcore has quit [Ping timeout: 252 seconds]
dsheets has joined #ocaml
mistermetaphor has quit [Remote host closed the connection]
zaquest has joined #ocaml
wolfcore has joined #ocaml
tmtwd has quit [Ping timeout: 265 seconds]
dsheets has quit [Ping timeout: 276 seconds]
A1977494 has joined #ocaml
mistermetaphor has joined #ocaml
unbalancedparen has quit [Quit: WeeChat 1.5]
butts_butts has joined #ocaml
tane has joined #ocaml
butts_butts has quit [Ping timeout: 244 seconds]
A1977494 has quit [Quit: Leaving.]
hay207 has joined #ocaml
hay207__ has quit [Ping timeout: 252 seconds]
toomuchtvrotsurb has joined #ocaml
mistermetaphor has quit [Remote host closed the connection]
leyyin has joined #ocaml
MercurialAlchemi has joined #ocaml
ygrek has joined #ocaml
struk|desk has quit [Read error: Connection reset by peer]
struk|desk has joined #ocaml
sfri has quit [Remote host closed the connection]
lindig has joined #ocaml
ygrek has quit [Ping timeout: 276 seconds]
sfri has joined #ocaml
Bahman has quit [Quit: ave atque vale]
lindig has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
FreeBirdLjj has joined #ocaml
silver has joined #ocaml
ygrek has joined #ocaml
lindig has joined #ocaml
lindig has quit [Client Quit]
Stalkr has joined #ocaml
Stalkr has left #ocaml [#ocaml]
ygrek has quit [Ping timeout: 276 seconds]
StatelessCat has quit [Quit: WeeChat 1.4]
StatelessCat has joined #ocaml
butts_butts has joined #ocaml
shinnya has joined #ocaml
d0nn1e has quit [Ping timeout: 265 seconds]
d0nn1e has joined #ocaml
xyproto has joined #ocaml
butts_butts has quit [Ping timeout: 240 seconds]
lindig has joined #ocaml
scarygelatin has joined #ocaml
<companion_cube>
Algebr: of course there is CCArray.filter ;)
darkf_ has joined #ocaml
darkf has quit [Ping timeout: 276 seconds]
picolino has quit [Remote host closed the connection]
darkf has joined #ocaml
darkf_ has quit [Ping timeout: 250 seconds]
darkf_ has joined #ocaml
darkf has quit [Ping timeout: 276 seconds]
dsheets has joined #ocaml
Maxdamantus has quit [Ping timeout: 276 seconds]
Maxdamantus has joined #ocaml
dsheets has quit [Remote host closed the connection]
dsheets has joined #ocaml
bba has joined #ocaml
darkf_ is now known as darkf
kolko has quit [Ping timeout: 244 seconds]
kolko has joined #ocaml
shinnya has quit [Ping timeout: 276 seconds]
lindig has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ggole has joined #ocaml
lindig has joined #ocaml
pierpa has joined #ocaml
Guest93688 is now known as kandu
Functor has joined #ocaml
darkf_ has joined #ocaml
Functor is now known as Guest44374
darkf has quit [Ping timeout: 250 seconds]
A1977494 has joined #ocaml
darkf has joined #ocaml
darkf_ has quit [Ping timeout: 276 seconds]
lindig has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
toomuchtvrotsurb has quit [Remote host closed the connection]
leyyin has quit [Ping timeout: 246 seconds]
dsheets has quit [Remote host closed the connection]
walter|r has joined #ocaml
vbmithr has quit [Quit: leaving]
vbmithr has joined #ocaml
AlexRussia has joined #ocaml
lindig has joined #ocaml
butts_butts has joined #ocaml
dsheets has joined #ocaml
hay207_ has joined #ocaml
hay207 has quit [Ping timeout: 276 seconds]
lindig has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
lindig has joined #ocaml
hay207_ has quit [Ping timeout: 252 seconds]
lindig has quit [Client Quit]
toomuchtvrotsurb has joined #ocaml
butts_butts has quit [Ping timeout: 244 seconds]
rgrinberg has joined #ocaml
Simn has joined #ocaml
sh0t has joined #ocaml
Reshi has quit [Ping timeout: 244 seconds]
Reshi has joined #ocaml
AlexRussia has quit [Ping timeout: 276 seconds]
rgrinberg has quit [Ping timeout: 240 seconds]
mistermetaphor has joined #ocaml
Reshi has quit [Quit: WeeChat 1.4]
infinity0 has quit [Remote host closed the connection]
infinity0 has joined #ocaml
intTree123 has left #ocaml ["Ex-Chat"]
intTree123 has joined #ocaml
unbalancedparen has joined #ocaml
dsheets has quit [Remote host closed the connection]
dsheets has joined #ocaml
dexterph has joined #ocaml
shinnya has joined #ocaml
dexterph has quit [Remote host closed the connection]
dexterph has joined #ocaml
Algebr has quit [Read error: Connection reset by peer]
tmtwd has joined #ocaml
Algebr has joined #ocaml
AlexRussia has joined #ocaml
dexterph has quit [Remote host closed the connection]
dexterph has joined #ocaml
Guest44374 has quit [Ping timeout: 250 seconds]
unbalancedparen has quit [Quit: WeeChat 1.5]
unbalancedparen has joined #ocaml
unbalancedparen has quit [Quit: WeeChat 1.5]
dexterph has quit [Remote host closed the connection]
unbalancedparen has joined #ocaml
dexterph has joined #ocaml
rgrinberg has joined #ocaml
scarygelatin has quit [Quit: Leaving]
hay207_ has joined #ocaml
unbalancedparen has quit [Quit: WeeChat 1.5]
unbalancedparen has joined #ocaml
unbalancedparen has quit [Client Quit]
unbalancedparen has joined #ocaml
rgrinberg has quit [Ping timeout: 246 seconds]
funct_ has joined #ocaml
lindig has joined #ocaml
hay207__ has joined #ocaml
hay207_ has quit [Ping timeout: 246 seconds]
FreeBird_ has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 246 seconds]
dexterph has quit [Remote host closed the connection]
Stalkr^ has joined #ocaml
A19774941 has joined #ocaml
cyc has joined #ocaml
A1977494 has quit [Ping timeout: 246 seconds]
<cyc>
Hi, is there recently (like with 4.03) a change in the behavior of linking with C code?
<cyc>
I have a program that refuse to compile, and it failed to find the module implemented by my C code
<Algebr>
like linking?
<cyc>
Algebr, exactly
<Algebr>
Is there a small example?
<cyc>
wait a minute, I will provide
<adrien>
which architecture? what are the compialtion calls and linking calls?
unbalancedparen has quit [Quit: WeeChat 1.5]
<cyc>
adrien, linux 64bits (arch)
struktured has joined #ocaml
<flux>
cyc, do you have an .mli file that defines the externals without a matching .ml file?
<cyc>
flux, yes
<flux>
I believe this case is then different with 4.03
<flux>
I'm not sure how it is fixed, though. perhaps you need to replicate the definitions in the .ml
<flux>
(I mean I don't know if there's a shorter solution)
<cyc>
flux, you mean declare them as external in a new .ml and not just in .mli?
unbalancedparen has joined #ocaml
unbalancedparen has quit [Remote host closed the connection]
<flux>
well, if you don't have anything else in the .mli why not just rename it to .ml
<flux>
but otherwise an .ml must provide whatever the .mli provides
<adrien>
or symlink
unbalancedparen has joined #ocaml
<adrien>
(although that's bad for sources)
<flux>
.ml and .mli format are not the same in general..
<adrien>
yeah, that only works in limited cases :)
<flux>
alternatively you can just provide only the signature (val foo : int -> int) in the .mli and then the external part in the .ml file for implementation
Simn has quit [Read error: Connection reset by peer]
<Algebr>
I read there is a small runtime penalty for that but makes the abstraction cleaner.
<cyc>
flux, i try to create a .ml with the external definitions, and just the val declaration .mli
<cyc>
sorry, it works
<cyc>
thx you
<cyc>
But why does it change?
<flux>
I imagine it's a by-product of some other change, not something that was explicitly planned..
AlexRussia has quit [Ping timeout: 252 seconds]
<flux>
and I do wonder if the old functionality will ever be brought back
Stalkr^ has quit [Ping timeout: 265 seconds]
tmtwd has quit [Remote host closed the connection]
butts_butts has joined #ocaml
tmtwd has joined #ocaml
rgrinberg has joined #ocaml
unbalancedparen has quit [Quit: WeeChat 1.5]
cyc has quit [Quit: Leaving]
govg has joined #ocaml
tmtwd has quit [Ping timeout: 265 seconds]
pecan has quit [Ping timeout: 250 seconds]
dsheets has quit [Remote host closed the connection]
FreeBird_ has quit [Remote host closed the connection]
dsheets has joined #ocaml
lindig has quit [Quit: My Mac has gone to sleep. ZZZzzz…]