Smerdyakov has quit [Read error: 110 (Connection timed out)]
<youknow365>
anyone up
<Smerdy>
Just ask your question.
Smerdy is now known as Smerdyakov
<Smerdyakov>
I, for one, won't reply again if you ask if anyone is here.
<Eelis>
i concur, such inquiries are only annoying
<youknow365>
i have a connection established using TCP but if the port is not open it will return Exception: Unix.Unix_error (ECONNREFUSED, "connect", ""). << that how do i make it so i can set that up in an IF statement
<TSC>
Does it really return the exception, or raise it?
* zmdkrbou
shakes the ocaml manuel under youknow365's nose
<youknow365>
yea i know
<youknow365>
i get that back and it crashes the program
<zmdkrbou>
exceptions are not handled through if-then-else expressions
<zmdkrbou>
you have to use try ... with
<zmdkrbou>
but you would know that if you had looked at the manual :)
<youknow365>
actually no it doesnt crash the program
youpi has joined #ocaml
gonnet has joined #ocaml
<youknow365>
it just throws back an exception
<youknow365>
zmdkrbou: how can I catch the exception ?
<youknow365>
if i cant do if else stuff
<zmdkrbou>
M
<zmdkrbou>
A
<zmdkrbou>
N
<zmdkrbou>
U
<zmdkrbou>
A
<zmdkrbou>
L
<youpi>
try <your code that throws an exception> with Unix.error etc...
<Smerdyakov>
Bad youpi, encouraging people to program by guessing.
<youpi>
youknow365: see manual about "try ... with" structure
piggybox has quit [Connection timed out]
piggybox has joined #ocaml
<youknow365>
zmdkrbou: im going to MANUALLLLLLLL
<youknow365>
:)
<youpi>
that's the fastest way to learn, yeah
jcreigh has joined #ocaml
youpi has quit ["Bonne nuit ! Good night! ☄"]
<youknow365>
zmdkrbou: where in the manual here is try with structure
jcreigh has quit ["Cuius rei demonstrationem mirabilem sane detexi. Hanc marginis exiguitas non caperet."]
dark_light has quit [Read error: 104 (Connection reset by peer)]
dark_light has joined #ocaml
Svrog has joined #ocaml
<Svrog>
does anyone here use f#?
<zmdkrbou>
* cough cough *
<Svrog>
hmm
<zmdkrbou>
why do you ask ?
<Svrog>
because i think i may have found a bug but im not sure if im doing something wrong
<Svrog>
type t = class
<Svrog>
val i : int
<Svrog>
new () = { i = 0 }
<Svrog>
end;;
<Svrog>
let a = new t() in
<Svrog>
let (b:t) = { a with i = 5 } in
<Svrog>
print_int a.i;
<Svrog>
print_int b.i
<Svrog>
that compiles fine in release mode but fails to compile in debug mode
<Svrog>
thought id check here before posting on forums..
<zmdkrbou>
and i suppose "microsoft sucks polar bears" is not enough of an answer for you ? :)
* Smerdyakov
slaps zmdkrbou with a Don Syme Fan Club mug.
<Svrog>
no it isnt enough of an answer
* zmdkrbou
doesn't know what/who Don Syme is but doesn't like to be slapped
<Smerdyakov>
Don Syme is the primary F# author.
<zmdkrbou>
so what ?
<Svrog>
its not my fault that the management think everything that has .net in it is great - using f# is the only way i can push caml and functional programming at work..
<zmdkrbou>
microsoft hired great scientists, but it sucks anyway
<zmdkrbou>
Svrog: sounds better when you tell it this way :)
<Smerdyakov>
Svrog, I don't know how this F# class stuff works, but it seems like it must be a bug if debug/release mode affects compilation success. You can use whatever bug reporting mechanism the F# team wants.
<Svrog>
thats what i thought - thanks
<Smerdyakov>
In any case, Don is friendly and won't mind if your question turns out to be stupid. :)
<Svrog>
cool
<Smerdyakov>
There's also an F# wiki somewhere.
<Svrog>
i know - i already checked the wiki
<Smerdyakov>
You can post questions on wikis.
<Svrog>
i dont usually use classes when using caml but having something like records with inheritance would come in handy for what im doing right now - i have about a dozen structures all of which are very similar and differ in about 1 or 2 fields from each other - dont really have a choice there as this needs to be backwards compatible with our existing c++ and java code base
<Svrog>
if anyone has any alternative suggestions for a more functional approach im listening :)
<Smerdyakov>
We'd need to know more about your fundamental problem statement to suggest that.
pango_ has joined #ocaml
<Svrog>
well basically im reading data out of ldap attributes and there is about a dozen different entry types all of which are very similar - something like this { entry: string; timestamp: string; user_object: string; entry_type: EntryType.t; } something like that - then each entry type also has a few fields unique to that type
<Svrog>
i could just have a type with all the different possible entries (something like type elem = Key of string | Timestamp of string |... ) and then build a list of those elements for each entry
<Svrog>
but that feels a bit clumsy
<Smerdyakov>
You can create new record types that contain the base fields in a single member of record type.
<Svrog>
a type with the base fields and then have the other types use a field of that type?
<Svrog>
ooh - base fields in a single member
<Svrog>
got it
<Svrog>
hmm.. i dunno - there are more base fields then there are unique fields
<Smerdyakov>
Seems what you really want is row polymorphism, which OCaml certainly has these days.
<Svrog>
row polymorphism?
<Smerdyakov>
You'll have to find documentation on the web. It's rather new.
<Svrog>
yeah im googling for it now
pango has quit [Remote closed the connection]
<Svrog>
i just came across OCamlIL while looking for info on row polymorphism - has anyone used that? unlike f# it aims to be completely compatible with ocaml 3.06
<Svrog>
oh well - im off
<Svrog>
thanks Smerdyakov
Svrog has quit []
shekmalhen has joined #ocaml
dark_light has quit [Remote closed the connection]
Revision17 has quit [Read error: 110 (Connection timed out)]
shekmalhen has quit ["leaving"]
Snark has joined #ocaml
pango_ has quit [Remote closed the connection]
slipstream-- has joined #ocaml
slipstream has quit [Read error: 110 (Connection timed out)]
pango has joined #ocaml
shawn has quit [Read error: 110 (Connection timed out)]
descender has quit [Remote closed the connection]
shawn has joined #ocaml
smimou has joined #ocaml
finelemo1 has joined #ocaml
descender has joined #ocaml
finelemon has quit [Read error: 110 (Connection timed out)]
_jol_ has joined #ocaml
pango has quit ["Leaving"]
pango has joined #ocaml
love-pingoo has joined #ocaml
Revision17 has joined #ocaml
_jol_ has quit ["leaving"]
Boojum has joined #ocaml
Snark has quit [Read error: 110 (Connection timed out)]
Boojum is now known as Snark
_jol_ has joined #ocaml
descender has quit [Read error: 60 (Operation timed out)]
_jol_ has quit ["leaving"]
pango has quit [Remote closed the connection]
pango has joined #ocaml
descender has joined #ocaml
WiSmErHi| has joined #ocaml
<WiSmErHi|>
someone is french here ?
<WiSmErHi|>
^^
<Smerdyakov>
You don't speak English?
<WiSmErHi|>
yes but maybe some french are here i think ;)
<WiSmErHi|>
i have a little pb in a stupid algo in ocaml
<Smerdyakov>
It would be best if you ask about it in English.
<zmdkrbou>
WiSmErHi|: lots of people are french here, but you should speak english
<zmdkrbou>
(not doing so is not really nice for people who don't understand)
<WiSmErHi|>
yes
<WiSmErHi|>
maybe here there some professor of jussieu ? ;)
<Smerdyakov>
Ask your question or leave.
<WiSmErHi|>
so i have a list [1;1;1;2;2;3]
<WiSmErHi|>
i must have an algo return 3 because there is an occurence of 1
<zmdkrbou>
gni ?
<WiSmErHi|>
hum my english is not perfect
<zmdkrbou>
you mean you must get 3 because there is 3 occurrences of '1' ?
<WiSmErHi|>
yes
<zmdkrbou>
ok, so you want to count
<gonnet>
too hard to code ?
<zmdkrbou>
what's your problem ?
<WiSmErHi|>
let prefixe l = let x = List.hd l in
<WiSmErHi|>
let rec analyze l = match l with
<WiSmErHi|>
[] -> 0
<WiSmErHi|>
| x::q -> 1 + analyze q ;;
<zmdkrbou>
gonnet: shut up and write your intro
<gonnet>
lol
<zmdkrbou>
:p
<smimou>
:D
<gonnet>
zmdkrbou: already sent
<WiSmErHi|>
yes to hard for beginner
<WiSmErHi|>
;)
<WiSmErHi|>
and i have an error i can't fixe it
<Smerdyakov>
WiSmErHi|, why don't you ask your teacher or read a book? It seems you have basic misunderstandings on how OCaml works.
<WiSmErHi|>
yes
<WiSmErHi|>
i know
<zmdkrbou>
hem Smerdyakov, maybe we can help him anyway ...
<gonnet>
there is nothing like an equality test here no ?
<zmdkrbou>
yes
<gonnet>
counting the number of 1 is hard whithout checking this :/
<zmdkrbou>
WiSmErHi|: you have to count the occurrences of the first element of your list ?
<WiSmErHi|>
yes
<zmdkrbou>
so your problem is x::q
<Smerdyakov>
WiSmErHi|, does your class have a web page?
<zmdkrbou>
in a pattern matching, names are unbound
<zmdkrbou>
meaning you should write : k::q -> if k = x then bla else bli
<WiSmErHi|>
oki
<zmdkrbou>
or, you can use guards
<WiSmErHi|>
i will try conditionnal forms
<zmdkrbou>
so that you would write : k::q where x = k -> bla
<WiSmErHi|>
yess
<WiSmErHi|>
:D
<zmdkrbou>
btw, you should learn to use List.fold_left
<Smerdyakov>
WiSmErHi|, does your instructor consider it cheating to get such detailed help on specific problems on the Internet?
<zmdkrbou>
Smerdyakov: he learned here that variable names are unbound in pattern matching, so no, it's not cheating
<WiSmErHi|>
no cheating , i just work for my exams
<zmdkrbou>
he learned something and that's the point
<Smerdyakov>
zmdkrbou, under many course policies, it would be.
<zmdkrbou>
well, at least in france, no its not :)
<Smerdyakov>
zmdkrbou, if this is a homework problem and your advice is based on seeing the exact problem statement.
<Smerdyakov>
I also feel that it _should_ be considered cheating anywhere in that scenario. If he is just reviewing for an exam, then that's a different matter.
<gonnet>
we are in august
<gonnet>
then this should not be a problem yet
<gonnet>
s/then/thus/
<Smerdyakov>
gonnet, I don't know world educational schedules well enough to conclude that.
<gonnet>
rusty english :}
<zmdkrbou>
in august there's holidays in france
<WiSmErHi|>
yes and exams in september
<zmdkrbou>
Smerdyakov: homework is meaningless, it's just intended to help you learn things that you have to know (for the exams)
<Smerdyakov>
I see. Often, homeworks account for significant grade components in the USA. (Often enough, they are the largest part of the final grade.)
<Smerdyakov>
And, counter to my usual attitudes on US education, I think this is a way in which it is superior to French education.
<Smerdyakov>
Since you can learn better with plenty of time to work on problems
<Smerdyakov>
And performance under time pressure isn't very good at measuring real progress.
<gonnet>
Smerdyakov: depends on the thing you want to evaluate
<Smerdyakov>
BTW, are you talking about universities, Ecoles Normales, or both?
* nattfodd
points out that the US educational system is generally not considered as the best one
<nattfodd>
</euphemism>
<gonnet>
hehe
<zmdkrbou>
Smerdyakov: universities (and in ecoles normales, it's the same)
<Smerdyakov>
OK. I have recently heard that French universities are nasty places to be. :)
<zmdkrbou>
that's not really true
<gonnet>
Smerdyakov: where ?
<zmdkrbou>
at least you shouldn't consider "universities ranking" as valid things
<Smerdyakov>
gonnet, oh, from some French person at a conference.
<Smerdyakov>
I heard that French unis must admit anyone who wants in.
<nattfodd>
yes
<Smerdyakov>
Which is sure to lower the quality of education.
<nattfodd>
and that is great
<gonnet>
Smerdyakov: no !
<zmdkrbou>
Smerdyakov: that's the point
<nattfodd>
education should be free and open to everyone
_jol_ has joined #ocaml
<Smerdyakov>
I'm only interested in education that challenges me.
<nattfodd>
who in the US can really afford to go to a decent uni?
<zmdkrbou>
ahah
<Smerdyakov>
And I could never get that anywhere where courses have to target ANYOEN.
<zmdkrbou>
very american style
<Smerdyakov>
nattfodd, most everyone, if loans are OK.
<nattfodd>
Smerdyakov: so you begin active life with a huuuuuuuge debt
<nattfodd>
great start in life
<zmdkrbou>
Smerdyakov: courses doen't target ENYONE, they target students who want to learn
<zmdkrbou>
(-e)
<gonnet>
Smerdyakov: so when to decide who is to get offered the possibily to study ?
<nattfodd>
Smerdyakov: at any rate, the criterium for being able to study should never be financial
<Smerdyakov>
gonnet, filtering processes early in life, through primary & secondary school or equivalents.
<nattfodd>
and if you don't want to learn in a french uni, then you just don't, fail your year and do something else
<gonnet>
omg
<gonnet>
Smerdyakov: and if you realize you are interested in a very special thing
<Smerdyakov>
But I think there is really no problem here in France, thanks to those ecoles normales.
<zmdkrbou>
plus you have to know that education before university is much better in france than in the US, so that you don't get into university without some important base knowledge
<Smerdyakov>
I'm mostly just saying that the universities sound like horrible places to be for any smart person.
<gonnet>
you have not learn it in primary education and so on ...
<gonnet>
Smerdyakov: the ecole normale are not really that important so it should enter in consideration
<gonnet>
not representative at all
<nattfodd>
Smerdyakov: ENS are actually *not* ok, even if I am happy to be in one
<nattfodd>
the whole system of "grandes ecoles" just plain suck
<nattfodd>
it's way too elitist
<nattfodd>
especially with the two stupid years of preparatory classes
<zmdkrbou>
Smerdyakov: ecoles normales offer great studying conditions but can do so for only a few people
<gonnet>
nattfodd: for the admission only no ?
<Smerdyakov>
zmdkrbou, only a few people matter to the future of the society to a significant degree.
<zmdkrbou>
if your in the happy few it's ok, if you're not ... you got pwnd
<zmdkrbou>
Smerdyakov: AHAHAHAHAHAHA
<zmdkrbou>
Smerdyakov: you don't matter to the future of the society
<nattfodd>
Smerdyakov: excuse me, but that is just plain bullshit
<zmdkrbou>
and nobody can tell who will "matter" in the sense you're talking of
<nattfodd>
gonnet: well, yes, but that is enough to make the whole system suck
<Smerdyakov>
zmdkrbou, I believe that I do, since I am involved in serious scientific research.
<zmdkrbou>
huhuhuhu
<zmdkrbou>
and your research will change the world !
<zmdkrbou>
stop wars !
<smimou>
please, someone fortune that
<Smerdyakov>
Yes, it will.
<zmdkrbou>
make the world a better palce !
<zmdkrbou>
^t
* zmdkrbou
laughs
<Smerdyakov>
Sure. I make software easier to write, which helps everyone.
<zmdkrbou>
"everyone"
<zmdkrbou>
yeeessss
<zmdkrbou>
oooof course
<zmdkrbou>
people in south sudan will be happy of your results ! :)
<nattfodd>
Smerdyakov: not to forget your big contribution to trolls on IRC
<nattfodd>
which will undoubtly enter history
<Smerdyakov>
They will. Everyone benefits from improvements in methods for constructing tools that can be used to solve all variety of problems.
<zmdkrbou>
no
<nattfodd>
Smerdyakov: with your reasoning, everyone who makes a contribution to any tool matters to the future of the society
<nattfodd>
which contradicts what you just said
<Smerdyakov>
nattfodd, no. I'm working on "fundamental" contributions of sufficient importance to qualify.
* nattfodd
is impressed
<nattfodd>
are you porting vim on windows?
<Smerdyakov>
Nope. Tools for effective compiler construction with correctness proofs.
<zmdkrbou>
Smerdyakov: you're just a phd student, the world doesn't care for you
<Eelis>
pff, who cares about "the future of society" anyway
<Smerdyakov>
zmdkrbou, then how come it pays me so much? :)
<zmdkrbou>
...
<zmdkrbou>
you are incredibly stupid
<zmdkrbou>
Smerdyakov: how come ossama bin laden is so rich ?
<zmdkrbou>
because he makes the world a better place, as you said ?
<Smerdyakov>
zmdkrbou, according to the interests of the people around him, yes.
* Eelis
feels Godwin's law approaching
<nattfodd>
Smerdyakov: you nazi
<Eelis>
there we go
<nattfodd>
(just for Eelis)
<zmdkrbou>
Smerdyakov: you are paid so much because companies put a lot of money in your work, because they know they can use it to make a lot of money, that's all
<Smerdyakov>
I will restate my position to help extricate us from the mire of rampant discussion.
<Smerdyakov>
The success of human societies depends on the activities of small elites of very qualified people.
<Smerdyakov>
It is important to expend extreme amounts of energy on making sure we always have elites of this nature.
<Smerdyakov>
<END>
<zmdkrbou>
Smerdyakov: and low workers shouldn't even be paid, they should be slaves :)
<Smerdyakov>
[And, as a personal footnote, I'm usually only interested in educational issues related to these elites or candidates for membership in them.]
<zmdkrbou>
that doesn't change to discussion
<zmdkrbou>
you just confirmed that you think stupid things
<Smerdyakov>
At least you know exactly what stupid things I think, and we can stop if you already disagree with my premises.
<zmdkrbou>
well sometimes it's interesting to try helping people quitting this kind of idea
<Smerdyakov>
I think it's the case that almost everyone will learn what he needs to know without any formal schooling, just going about his life, seeing what knowledge would be helpful, and using the available public resources to acquire it.
<zmdkrbou>
but you seem to be a little too deep in your dirty ideas
<Smerdyakov>
On the other hand, people who will be scientists need to dig deeper and have some more structure.
<Smerdyakov>
This second kind of education is much more expensive to run, and so should be selective.
<zmdkrbou>
everybody doesn't want to study as much as scientists
<zmdkrbou>
so that you can just let each people decide for himself
<zmdkrbou>
and accept him if he wants to try
<Smerdyakov>
Maybe at a lower level where he will fail if he isn't really qualified.
<zmdkrbou>
you know what ? the problem is maybe that you are overpaid
<nattfodd>
zmdkrbou: stop being personal
<zmdkrbou>
everybody in france doesn't want to go for a phd
<zmdkrbou>
nattfodd: ?
<nattfodd>
that doesn't bring weight to your ideas
<zmdkrbou>
nattfodd: i don't get your point
<nattfodd>
zmdkrbou: that you should stop personal attacks on Smerdyakov and concentrate instead on his arguments
<nattfodd>
otherwise it's just flaming
<zmdkrbou>
my point is that only a few people wawnt to do a phd, so that you don't have to be so selective because you won't have to pay lots of people
<Smerdyakov>
Lots of people want to do PhD's in the USA, but only a few get enough funding for it to be pleasant.
<zmdkrbou>
the "you are overpaid" is part of the idea, that's not personal
<Smerdyakov>
I don't think _I_ am overpaid. I might agree that some colleagues are. ;)
<nattfodd>
the "[19:16] ( zmdkrbou) you just confirmed that you think stupid things" definitely was
<zmdkrbou>
yes, that was
<zmdkrbou>
but i just give my opinion between parts of the debate :)
<zmdkrbou>
(plus there's no need to avoid flaming, as Smerdyakov said we don't agree on premises so there is no "real" debate)
<Smerdyakov>
I might try to convince you that supporting elites is worthwhile from lower-level assumptions, but I don't expect it would go well.
<zmdkrbou>
neither do i :)
<mellum>
Smerdyakov: The problem with your approach is that it's not really the people that count, it's the ideas. Even "elite" people often have only a handful of ideas that *really* matter in their life. And many important ideas actually come from some random patent clerk. By funding only the elite, you miss the ideas of the patent clerks.
<Smerdyakov>
mellum, I think that some people are more likely to contribute than others, and that this likelihood can be approximated by effective measurement.
<zmdkrbou>
(like measuring the size of their cranium)
<mellum>
Smerdyakov: But only very little likely. And it's almost impossible to tell in advance.
<mellum>
Of course there has to be some balance, one can't fund everybody.
<mellum>
But giving huge funding to a very small group is the wrony way, IMHO.
<Smerdyakov>
I don't agree. Anyone who is able to use Coq effectively before age 18 should be flagged as special, for instance. :)
<zmdkrbou>
that's just a matter of education, take anybody and prepare him right and he'll be able to do this
<Smerdyakov>
Maybe... but there are levels of effectiveness that I believe require exceptional characteristics to achieve.
<zmdkrbou>
you believe in genes magic
<Smerdyakov>
I certainly do.
<zmdkrbou>
some famous people do :)
<Smerdyakov>
I don't see any other explanation for the vast differences I see in how well people take to intellectual tasks.
<zmdkrbou>
(though in their opinion being worthy generally implies being white, and blond haired)
<Smerdyakov>
Are you telling me you don't believe in any genetic influences on intelligence?
<mellum>
Smerdyakov: "Chance" and "Education" are good candidates.
<zmdkrbou>
Smerdyakov: yes i am
<Smerdyakov>
zmdkrbou, do you think some people's genes give them better memories than others?
<zmdkrbou>
memory has nothing to do with "intellectual ability" as a general idea
<Eelis>
i think that's precisely why Smerdyakov brought it up
<zmdkrbou>
the "importants ideas" you were talking about don't come from huge memory
<Smerdyakov>
In fact, memory is one of the supporting players that are critical for success in academia/research.
<zmdkrbou>
everybody has enough memory
<Smerdyakov>
Honestly, I look better under assumptions that genetic factors don't influence intelligence.
<Smerdyakov>
I must have just _worked_really_hard_ to get where I am.
<zmdkrbou>
some people have more, but you can do as well as them
<Smerdyakov>
That's not the case.
<mellum>
I don't have the impression that I needed memory much yet.
* zmdkrbou
has a damn bad memory
<zmdkrbou>
plus memory is something that you can change by training
<zmdkrbou>
if you were raised in an "educated" environment, you are given more training
<Smerdyakov>
I also think the fundamental competences behind programming are genetically determined to a large degree.
<zmdkrbou>
and you can afford education if you're rich
<zmdkrbou>
huhu
<zmdkrbou>
"natural born programmer"
<zmdkrbou>
Smerdyakov: do you realise that "genetical determinism" is a very dangerous idea ?
<Smerdyakov>
zmdkrbou, that kind of "dangerousness" is not a refutation.
<zmdkrbou>
that was not a refutation
<Smerdyakov>
I realize that the idea bothers a lot of people.
<zmdkrbou>
for good reasons
<zmdkrbou>
you are talking about selecting people carefully so that each person ends up at the place that "genes told" he should be
<Eelis>
Smerdyakov: do your ideas extend to qualifying/disqualifying entire races or genders?
<Eelis>
or other ethnic groups
<Smerdyakov>
No.
<Eelis>
ok.
<Smerdyakov>
I see no evidence for racial or sexual correlation.
<Smerdyakov>
Or at least none for "disqualifying" someone based solely on such a characteristic
<zmdkrbou>
if you consider "people with a good memory" as a group, then you think something really close to this
<Smerdyakov>
zmdkrbou, you don't seem to be arguing that what I'm saying is not true, but rather that you think its truth would have undesirable consequences.
<zmdkrbou>
i don't think we can discuss of what is true or not, because of our little "premises" problem
<Smerdyakov>
That doesn't seem related to "is there a serious genetic basis for ability in programming/math?".
<zmdkrbou>
imo there is no genetic basis at all for this kind of abilities
<zmdkrbou>
moreover, searching evidence of genetic predisposition/impairement is wrong
<zmdkrbou>
(for this kind of thing)
<Smerdyakov>
"Wrong" in what sense?
<zmdkrbou>
imo, it's a dangerous idea which can have disastrous consequences
<Smerdyakov>
I think not acknowledging it has disastrous consequences.
<mellum>
Not if we find that there is some predisposition, but not enough to be relevant for any real-life decisions. Which would seem to me the most likely outcome
<Smerdyakov>
I think that there are enough genetically-disposed uber-hackers out there whose disappearance would seriously set back the field of software engineering.
<zmdkrbou>
mellum: the fact is, there is probably genetic predisposition for let's say, huge memory ... but memory is one thing and someone has plenty of other ways to achieve what some other would do using his memory
<mellum>
zmdkrbou: yes... so?
<zmdkrbou>
so yes, one can search for predisposition ... but it's meaningless
<mellum>
zmdkrbou: that's what I'm saying.
<zmdkrbou>
yes, and i agree :)
<mellum>
zmdkrbou: Oh. I didn't expect that on IRC ;)
<zmdkrbou>
heh
<zmdkrbou>
Smerdyakov: programming ... that's not something natural which you get at birth
<Smerdyakov>
I think genetics determines programming ability to a significant degree.
Eelis has quit [" "]
<zmdkrbou>
it involves some "scientific" way of seeing things, but this is a matter of education
Eelis has joined #ocaml
<mellum>
Smerdyakov: if I consider my sister, I'd have to disagree ;)
<Smerdyakov>
Why?
<zmdkrbou>
heh good point (and me too)
_jol_ has quit ["leaving"]
<zmdkrbou>
Smerdyakov: when nobody in a programmer's family has programming skills ...
<Smerdyakov>
Either those others didn't get the genes or they haven't had the opportunity or inclination to use them.
<mellum>
well, that assumption kinda makes your statement unfalsifiable.
jcreigh has joined #ocaml
<youknow365>
anyone here ever use that mod ocaml ??
love-pingoo has quit ["Connection reset by pear"]
jcreigh has quit ["Cuius rei demonstrationem mirabilem sane detexi. Hanc marginis exiguitas non caperet."]
Snark has quit ["Leaving"]
<youknow365>
anyone up pango ??
mnemonic has joined #ocaml
<mnemonic>
hi
<youknow365>
hi
<WiSmErHi|>
can we use list in a label of a record ? i know i can use a label with int*int*int... but i want a list
<nattfodd>
well, just use int list then
<WiSmErHi|>
mylabal:int list; ?
<WiSmErHi|>
yeah ;)
<WiSmErHi|>
thx :D
<nattfodd>
yes
<nattfodd>
there are no restrictions at all on the types of labels
<WiSmErHi|>
sure , but i try [] and other stuff but my book didn't explains me that ;) thx ;)
ookk has joined #ocaml
shekmalhen has joined #ocaml
<ookk>
why does this function result in a Segmentation fault for n larger then 522408:
<ookk>
let rec sum n =
<ookk>
if n == 0
<ookk>
then (Int 0)
<ookk>
else (Int n) +/ (sum (n-1))
<ookk>
i guess it has something to do with the recursive depth?
<Smerdyakov>
Your function is not tail recursive, so it uses stack space proportional to recursion depth.
<Smerdyakov>
Apparently the constant of proportionality is such that you exhaust available memory for that depth.
<ookk>
i thought that would be tail-recursive?
<TSC>
No, because it has to do something to the return value of the recursive call
<TSC>
(It has to add it to something else)
<TSC>
It can be made tail-recursive
<Smerdyakov>
As can any function ;)
<TSC>
... with constant space
<ookk>
then i have to add another parameter to the function?
<Smerdyakov>
Now we're talking.
<ookk>
let rec sum n current_sum = ...
<TSC>
That's a good start
<TSC>
I guess this is some learning exercise?
<pango>
also, == is physical equality, which make no sense on ints... It's silentedly converted to structural equality, but still...
<pango>
(always wondered if that silent conversion was a good thing, and for what)
<youknow365>
im reading this exception stuff but i dont get it
ookk has quit ["This computer has gone to sleep"]
<youknow365>
im reading this manual on exceptions but its not making since