<simon->
hrm. I feel like it's time that I write an IRC bot in ocaml
mimosa has joined #ocaml
mimosa has quit [Client Quit]
<Defcon7>
hehe
gim has quit ["pioup zZzz.."]
ez4 has joined #ocaml
<ez4>
anyone know of an ocaml nntp library?
<ez4>
maybe i'll write one
<Defcon7>
look at ocaml hump
<Defcon7>
i've found that archive one of the more complete
<Defcon7>
most ?
<Defcon7>
more/most
brwill_zzz is now known as brwill
buggs is now known as buggs|afk
<ez4>
i found ocamlnet, but it seems to have been abandoned
malc has quit ["no reason"]
GreyLensmen has joined #ocaml
brwill has quit [Read error: 104 (Connection reset by peer)]
brwill has joined #ocaml
ez4 has quit []
GreyLensmen has quit ["Client Exiting"]
Herrchen_ has joined #ocaml
Herrchen has quit [Read error: 60 (Operation timed out)]
ayrnieu has quit [Remote closed the connection]
lus|wazze has joined #ocaml
Herrchen_ is now known as Herrchen
gim_ has joined #ocaml
mimosa has joined #ocaml
<Defcon7>
someone was able to build ocamlnet on debian ?
karryall has joined #ocaml
Hipo has joined #ocaml
Kinners has joined #ocaml
jmarant has joined #ocaml
<jmarant>
salut
<Defcon7>
hi :)
<Defcon7>
someone was able to build ocamlnet on debian ?
buggs|afk is now known as buggs
<jmarant>
i didn't try
<Defcon7>
ill import something from a C program like fetchmail
<Defcon7>
ocamlnet is too experimental
<Defcon7>
it wont build on linux nor bsd
__DL__ has joined #ocaml
<karryall>
jmarant: salut
<jmarant>
salut
The-Fixer has quit ["Goodbye"]
<karryall>
ca va ?
The-Fixer has joined #ocaml
__DL__ has quit [Read error: 110 (Connection timed out)]
__DL__ has joined #ocaml
Demitar has joined #ocaml
buggs is now known as buggs|afk
<jmarant>
karryall: tu as reçu nos échanges de mails?
__DL__ has quit [Read error: 60 (Operation timed out)]
KAeL[N7] has joined #ocaml
<karryall>
jmarant: je suis en train de les lire
__DL__ has joined #ocaml
Kinners has left #ocaml []
owll has joined #ocaml
owll has left #ocaml []
KAeL[N7] is now known as Kael[N7]
karryall has quit ["ERC vVersion 3.0 $Revision: 1.328 $ (IRC client for Emacs)"]
Kael[N7] has left #ocaml []
jmarant has left #ocaml []
jmarant has joined #ocaml
malc has joined #ocaml
jmarant has left #ocaml []
karryall has joined #ocaml
jmarant has joined #ocaml
<jmarant>
re
malc has quit ["no reason"]
Riastrad1 has joined #ocaml
Riastradh has quit [Nick collision from services.]
Riastrad1 is now known as Riastradh
simon- has quit ["*frowns at irssi*"]
jmarant has left #ocaml []
lam_ has quit ["Lost terminal"]
lam has joined #ocaml
det has quit ["I used to have a drinking problem. Now I love the stuff."]
det has joined #ocaml
maihem has joined #ocaml
karryall has quit ["maison"]
carm|afk has quit ["Client Exiting"]
gim_ is now known as gim
Etaoin has quit ["Client exiting"]
__buggs has joined #ocaml
asqui has joined #ocaml
maihem has quit [Read error: 104 (Connection reset by peer)]
<asqui>
Is there any way to redefine a global variable from within a function (in camllight specifically).
<Smerdyakov>
There is no way to change the value of a variable in any way in any part of OCaml.
<Demitar>
It's not a variable, it's a binding.
buggs|afk has quit [Read error: 60 (Operation timed out)]
<asqui>
Well, is there any way to re-bind a global identifier from within a function?
<Demitar>
A reference is what you'd consider a variable.
<Demitar>
asqui, what are you trying to do?
<Demitar>
You probably want to define a new reference, use that and then change i from the function.
<lus|wazze>
[21:12:37] <asqui> Well, is there any way to re-bind a global identifier from within a function? <--- that doesn't even make any sense, do you know what the word "binding" even means in this context? :)
<asqui>
lus|wazze: Apparently not. Care to enlighten me?
<lus|wazze>
well a binding is when you assign a name to a value
<lus|wazze>
so when you re-bind something, you actually begin a new enclosing structure around the following statements
<asqui>
Demitar: I have an int -> bool function that tells me if an int is prime, it does this by calling another function to generate a list of primes between 1 and sqrt(n), then tests if n is divisible by any of the numbers in this list. I would like to cache this list so that it doesn't need to be re-calculated all the time, but instead expanded as needed.
<asqui>
lus|wazze: "A new enclosing structure"?
<Demitar>
asqui, use a reference.
<lus|wazze>
ie a binding of a value to a name refers to the process of, saying "the name 'x' is supposed to mean 'y' inside of the following expression"
<lus|wazze>
let me put it this way asqui
<lus|wazze>
you have an expression
<lus|wazze>
say, 2 * x
<lus|wazze>
a binding of the name x to a value makes this expression represent a particular value as well
<lus|wazze>
you can BIND the name x to, say, the value 3, making "2 * x" mean "2 * 3"
<lus|wazze>
but you always require an expression or expression within which the binding is meant to be valid
<asqui>
So if I do let foo = 1;; let bar () = foo;; bar () will always return 1 regardless of future values of foo?
<lus|wazze>
yes
<lus|wazze>
or rather
<lus|wazze>
foo IS 1 inside of bar
<lus|wazze>
its just a binding - that is, you said that with the identifier "foo", what you actually meant (that is, what it refers to) is hte value "1"
<asqui>
So at the top level, let foo = 1 is just a big "let foo = 1 in ...everything from here on..."?
<lus|wazze>
then later, when you do another "let foo = ...", what you are actually saying is that from NOW on, in all expressions that FOLLOW, foo should be taken to mean ... instead
<lus|wazze>
yes
<asqui>
Gotcha.
<asqui>
No global variables... woo hoo :)
<lus|wazze>
well you CAN bind a name to a value which is mutable
<lus|wazze>
like an array, or a structure, or ... a reference , which has already been mentioned
<Demitar>
Yes, only mutable types are what can be considered "variables" at all.
<lus|wazze>
then you don't change which value the name refers to, but instead the value itself
<asqui>
Yeah, I understand.
<asqui>
I can't find anything on "references" in the camllight docs though.
<asqui>
What's a quick statement to check if it supports references?
<lus|wazze>
hm I don't know much about caml light ... in ocaml you would write (e.g.) let x = ref 1
<asqui>
And to change the value of x+
<lus|wazze>
x := 2
<lus|wazze>
and to get the value out of the reference, you use !x
<asqui>
Okay, that all seems to work. Thank you.
<lus|wazze>
ie x is the reference, !x is it's value and x := 2 changes the value contained in the reference
__buggs is now known as buggs
<lus|wazze>
you're welcome :)
gim has quit ["++"]
maihem has joined #ocaml
ita has joined #ocaml
<ita>
hi all
lus|wazze has quit ["If we don't believe in freedom of expression for people we despise, we don't believe in it at all -- Noam Chomsky"]
<ita>
is someone using Facile here ?
GreyLensmen has joined #ocaml
avn has quit [Read error: 110 (Connection timed out)]