pango__ has quit [Read error: 110 (Connection timed out)]
pango has joined #ocaml
MirrorLynx__ has joined #ocaml
MirrorLynx is now known as dan2_
pango_ has quit [Read error: 145 (Connection timed out)]
dan2_ has quit [Nick collision from services.]
MirrorLynx__ has quit [Client Quit]
MirrorLynx_ has quit []
dan2 has joined #ocaml
dan2 has quit [Client Quit]
dan2 has joined #ocaml
dan2 is now known as dan2__
dan2__ is now known as dan2
cjohnson has quit ["Leaving"]
tsume has quit [Remote closed the connection]
hangman4 has joined #ocaml
<vincenz>
any good live isos?
<vincenz>
for 64bit
zzorn_afk has quit ["They are coming to take me away, ha ha"]
<picard>
is there a way to create a block around a for loop? I want to make a local variable and manipulate it inside the for loop, then return it... but the return type of the for loop is ()
<Smerdyakov>
I think most of consider for loops highly deprecated.
<Smerdyakov>
s/most of/most of us
<picard>
what is wrong with them?
<Smerdyakov>
They're imperative.
<Smerdyakov>
Which means harder to understand.
<vincenz>
besides
<vincenz>
that's easily done with a ref
<vincenz>
let x = ref 0 in for loop; !x
<picard>
ok thanks
<Smerdyakov>
picard, I'd encourage you to consider how to do this better with higher-order functions and no use of "for."
<vincenz>
tail-recursion
<Smerdyakov>
vincenz, naturally, you'd like to avoid writing your own recursive functions whenever library functions can do the recursion for you.
<vincenz>
how so?
<vincenz>
oh
<vincenz>
foldl and such
<picard>
Smerdyakov: I will look into that, I am just trying to multiply to matrices, and I always did it with for loops before
pango has quit [Remote closed the connection]
<Smerdyakov>
You can do slightly better with iter functions over arrays.
<picard>
is it faster?
<Smerdyakov>
It's more compact. It makes little difference in this case.
<picard>
well I will definitely check it out, thanks
picard has quit ["Leaving"]
hangman4 has quit [Read error: 110 (Connection timed out)]
vezenchio has joined #ocaml
blackbishop has joined #ocaml
hangman4 has joined #ocaml
__DL__ has quit ["Bye Bye"]
__DL__ has joined #ocaml
Submarine has joined #ocaml
__DL__ has quit [Remote closed the connection]
__DL__ has joined #ocaml
pango has joined #ocaml
Herrchen has joined #ocaml
shawn_ has joined #ocaml
_shawn has quit [Read error: 110 (Connection timed out)]
Snark has joined #ocaml
Banana_ is now known as Banana
elthariel has joined #ocaml
hangman4 has quit ["Lost terminal"]
<Nutssh>
Use whichever is more clear.
smimou has joined #ocaml
<det>
vincenz, Ubuntu has an AMD64 live cd
<det>
vincenz, and it is basicly debian sid
zzorn has joined #ocaml
smimou has quit [Read error: 110 (Connection timed out)]
smimou has joined #ocaml
_JusSx_ has joined #ocaml
_JusSx__ has joined #ocaml
_JusSx_ has quit [Read error: 110 (Connection timed out)]
Submarine has quit ["Leaving"]
ejt has joined #ocaml
mrvn_ has quit [Read error: 104 (Connection reset by peer)]
mrvn has joined #ocaml
ejt has quit [Read error: 60 (Operation timed out)]
elthariel has quit [Remote closed the connection]
tintin has quit [Read error: 54 (Connection reset by peer)]
hum has joined #ocaml
<hum>
hello
<hum>
I've a complety off-topic question: Is there an (ex-)student from the ENS's MMFAI (a french master degree in Paris) here ?
<hum>
(i think it is a good place to find one !)
<gl>
hum : parfois il y a pnou qui passe
<hum>
je suis étudiant en province, j'espère être admis (sur dossier) au MMFAI, c'est pourquoi je cherche un logement sur Paris.
<hum>
Je me demande donc s'il y a des facilités d'accès au logement pour les "auditeurs" (les non-normaliens, ou je dois simplement passer par le crous ...)
<gl>
aucune idée
<hum>
:/
* gl
&
tintin has joined #ocaml
<Snark>
hum: le mieux est probablement de téléphoner au secrétariat de l'École...
<hum>
C'est ce que gl m'a conseillé, je vais faire ça demain, merci !
vezenchio has quit [""I would kill, with my bare hands, every chimp in the world, if it would save one street junkie with AIDS""]
Msandin has joined #ocaml
picard has joined #ocaml
<picard>
I need to work with matrices for a program that I am writing. I am new to OCaml so I'dd like to know whether I should make a class or use a module
<Smerdyakov>
Most of us never use classes.
<picard>
any reason why?
<picard>
the problem that I am having is that I would like to be able to use floats and ints interchangably as elements of the matrix, but then I would have to switch between using + and +., how should I take care of that?
<picard>
I'm sorry if these questions seem really stupid, but I am new to using OCaml
<Smerdyakov>
Functors
<Smerdyakov>
Even better, grab a matrix library that's already written.
<picard>
well that would be easier, but since I am still getting comfortable with OCaml, I think I should write my own anyway
picard has quit ["Leaving"]
pango has quit ["Client exiting"]
pango has joined #ocaml
hum has quit ["Leaving"]
mrvn_ has joined #ocaml
pango_ has joined #ocaml
Submarine has joined #ocaml
mrvn has quit [Read error: 60 (Operation timed out)]
__mattam__ has joined #ocaml
__mattam__ has quit [Client Quit]
pango has quit [Read error: 60 (Operation timed out)]
picard has joined #ocaml
Sonarman has joined #ocaml
<Nutssh>
Classes in other languages are used to handle scoping, modularity, encapsulation, recursive types, and other duties. OCaml has an excellent module and sum-type functionality, making classes unnecessary for those purposes. I have used classes, but only when I wanted dynamic dispatch based on the runtime type. (and occasionally for very complicated fold-over-AST functions)
Msandin has quit [Read error: 110 (Connection timed out)]
mrvn has joined #ocaml
mrvn_ has quit [Read error: 110 (Connection timed out)]
tintin has quit [Read error: 60 (Operation timed out)]
Snark has quit ["Leaving"]
Submarine has quit ["Leaving"]
picard has quit [Remote closed the connection]
cjohnson has joined #ocaml
Herrchen has quit ["bye"]
mlh has joined #ocaml
ooo has quit [Read error: 110 (Connection timed out)]
ulfdoz has joined #ocaml
<ulfdoz>
good eveninng.
<ulfdoz>
Is there a way to specify a finalizer for an object. I want to close some filedescriptors, when an object isn't needed anymore.
<Smerdyakov>
I think if you look at the standard library documentation, you will find it.
<ulfdoz>
Gc.finalise sounds good. Sorry, if this was a stupid question, I'm probably thinking to much in java, where a finalizer belongs to the object.
<ulfdoz>
thx
picard has joined #ocaml
cjohnson has quit [Connection timed out]
mr_pengy has joined #ocaml
<ulfdoz>
The strange thing is, that it seems to register the finalizer, i.e. it runs the initializer without any errors, but it seems not to apply the finalizer-function, or i've a bug in my debug output.
<Smerdyakov>
You're sure a GC is occurring and that the object is really unreachable?
<ulfdoz>
It's at program exit. I wrote a really simple test-app.
<ulfdoz>
It opens a networking-connection, sends a string and terminates
<Smerdyakov>
Did you interpret the documentation as saying that all finalizers are called at program exit?
<ulfdoz>
No, I just assumed, because it seemed logical to clean up on exit.
<Smerdyakov>
Now that I think of it, I'm surprised that OCaml supports finalizers at all, since I thought the GC never explicitly deallocated anything.
<Smerdyakov>
I guess they need an extra mechanism to figure out when an object is unreachable.
<ulfdoz>
But programm-termination would be safe point, I think.
<Smerdyakov>
Just because it's safe doesn't mean that it is cost-free to implement it.
<Hadaka>
Smerdyakov: yeah, finalizers and their ordering is kind of a special case - and is not really related to actually deallocating the objects
<Smerdyakov>
They need a special case to run finalizers at GC time, and maybe they didn't want to also implement a special case for program exit time.
<ulfdoz>
I tried to register the finalizer in the initializer of the object, so it's not definitely the program exit time it is called, but I can do a call to the Gc in main for now.
_JusSx__ has quit ["leaving"]
monochrom has joined #ocaml
mr_pengy has quit ["ERC Version 5.0.1 $Revision: 1.726.2.3 $ (IRC client for Emacs)"]