<mrvn>
module Foo : bar with type a = int and type b = int = struct type a = int type b = int end;;
<mrvn>
module Foo : sig type a = int type b = int end
<AxleLonghorn>
er, nevermind. what mrvn just posted
<kaustuv>
huh, you need: S with type t = u with type t' = u'
<palomer>
ahh, righto
<palomer>
any other fancy module stuff I should know?
<AxleLonghorn>
the ocaml manual has a lot of stuff in it related to modules
<AxleLonghorn>
functors are apparently higher-order
<AxleLonghorn>
and can be recursive
<AxleLonghorn>
though I've never seen one in practice
xerxes has quit [Read error: 110 (Connection timed out)]
<palomer>
I would use them if it wasn't for the fact that recursive modules have to be in the same file
<mrvn>
That I hate too.
<AxleLonghorn>
just gonna give a shout out to Ocamlgraph. I wouldn't have bothered to learn functors if it weren't for that library
pants2 has quit [Read error: 113 (No route to host)]
pants1 has quit [Connection timed out]
<palomer>
im off to bed...night!
pants3 has quit [No route to host]
rjack has joined #ocaml
alexyk has quit []
ozzloy has quit [Read error: 60 (Operation timed out)]
ozzloy has joined #ocaml
alexyk has joined #ocaml
seafood has joined #ocaml
pants1 has joined #ocaml
xerxes_ has quit ["Ex-Chat"]
pants4 has quit [Read error: 113 (No route to host)]
bohanlon has quit [lindbohm.freenode.net irc.freenode.net]
gildor has quit [lindbohm.freenode.net irc.freenode.net]
hto has quit [lindbohm.freenode.net irc.freenode.net]
patronus has quit [lindbohm.freenode.net irc.freenode.net]
authentic has quit [lindbohm.freenode.net irc.freenode.net]
Mr_Awesome has quit [lindbohm.freenode.net irc.freenode.net]
Asmadeus has quit [lindbohm.freenode.net irc.freenode.net]
maskd has quit [lindbohm.freenode.net irc.freenode.net]
kaustuv has quit [lindbohm.freenode.net irc.freenode.net]
lanaer has quit [lindbohm.freenode.net irc.freenode.net]
munga_ has quit [lindbohm.freenode.net irc.freenode.net]
nimred has quit [lindbohm.freenode.net irc.freenode.net]
jonafan has quit [lindbohm.freenode.net irc.freenode.net]
javax has quit [lindbohm.freenode.net irc.freenode.net]
gl has quit [lindbohm.freenode.net irc.freenode.net]
brendan has quit [lindbohm.freenode.net irc.freenode.net]
aij has quit [lindbohm.freenode.net irc.freenode.net]
r0bby has quit [lindbohm.freenode.net irc.freenode.net]
ozzloy has quit [lindbohm.freenode.net irc.freenode.net]
Associat0r has quit [lindbohm.freenode.net irc.freenode.net]
palomer has quit [lindbohm.freenode.net irc.freenode.net]
bebui has quit [lindbohm.freenode.net irc.freenode.net]
ozzloy has joined #ocaml
palomer has joined #ocaml
Associat0r has joined #ocaml
bebui has joined #ocaml
kaustuv has joined #ocaml
lanaer has joined #ocaml
munga_ has joined #ocaml
gildor has joined #ocaml
maskd has joined #ocaml
hto has joined #ocaml
r0bby has joined #ocaml
patronus has joined #ocaml
nimred has joined #ocaml
jonafan has joined #ocaml
authentic has joined #ocaml
Mr_Awesome has joined #ocaml
bohanlon has joined #ocaml
Asmadeus has joined #ocaml
javax has joined #ocaml
brendan has joined #ocaml
aij has joined #ocaml
gl has joined #ocaml
alexyk has quit []
alexyk has joined #ocaml
alexyk has quit []
alexyk has joined #ocaml
alf has joined #ocaml
alf has quit ["Another good night not to sleep in a eucalyptus tree."]
AxleLonghorn has left #ocaml []
Camarade_Tux has joined #ocaml
alexyk has quit []
alexyk has joined #ocaml
Camarade_Tux has quit ["Leaving"]
erikl has quit [Read error: 110 (Connection timed out)]
Yoric[DT] has joined #ocaml
angerman has joined #ocaml
rwmjones has joined #ocaml
m3ga has quit ["disappearing into the sunset"]
Yoric[DT] has quit ["Ex-Chat"]
alexyk has quit []
seafood has quit []
hkBst has joined #ocaml
Yoric[DT] has joined #ocaml
Associat0r has quit []
s4tan has joined #ocaml
angerman has quit []
rwmjones has quit [Read error: 104 (Connection reset by peer)]
_zack has joined #ocaml
<Yoric[DT]>
Mmmmhhh.....
<Yoric[DT]>
I'm currently reviewing some code using Set with a [compare] function which does not define a proper order.
<Yoric[DT]>
I suspect that's going to cause bugs.
<Yoric[DT]>
(i.e. the function returns [0] if items are equal, [1] otherwise)
<Yoric[DT]>
Has anyone met that case?
<mrvn>
That should totaly throw of sets.
<mrvn>
You need a "<" relation for the set.
<Yoric[DT]>
That's what I suspected.
* Yoric[DT]
wonders how I can represent a partial order.
<mrvn>
only as heap
ulfdoz has joined #ocaml
<Yoric[DT]>
Mmmhhhh....
<Yoric[DT]>
That would probably be the right way of solving this.
<Yoric[DT]>
For the moment, I'm using a hack.
<Yoric[DT]>
(I'm extending the partial order into a total order using [compare])
<Yoric[DT]>
ertai: ping
<ertai>
Yoric[DT]: pong
ScrumMaster has joined #ocaml
<Yoric[DT]>
One second, I was pinging on behalf of ScrumMaster.
<Yoric[DT]>
(who's sitting right behind me)
<ScrumMaster>
Hello there
<ScrumMaster>
ertai: I was wondering, how is the order of the libraries on the command line decided by ocamlbuild ?
<ertai>
the linker command line you mean ?
<ScrumMaster>
yes
<ScrumMaster>
because I have one library depending on another, so if they end up in the wrong order, it complains about undefined modules
<ScrumMaster>
s/undefined/unimplemented/
<ertai>
their is a topological sort done using the known dependencies
<ertai>
if you get this error you probably need to add some dependencies
<ScrumMaster>
I guess so: one of these libraries is built outside of ocamlbuild's scope and I am guessing it is causing the problem
<ScrumMaster>
how can I add these dependencies ?
LeCamarade has joined #ocaml
<ertai>
ScrumMaster: the lib built outside of ocamlbuild, is built before running ocamlbuild ?
<ScrumMaster>
err, actually it is built by ocamlbuild launching a script in a sub-directory
<Yoric[DT]>
(evil, evil)
<ScrumMaster>
and has to be built in the middle of the process
<ScrumMaster>
(Yoric: yes, I know=
<ertai>
so ocamlbuild run a script that produce something in or out the project directory ?
<ScrumMaster>
it does a cp of the subtree to _build and then runs the script
<ScrumMaster>
which gives the dir/mylib.{a,cma,cmxa}
_zack has quit ["Leaving."]
_zack has joined #ocaml
rwmjones has joined #ocaml
seafood has joined #ocaml
Kerris7 has joined #ocaml
<ertai>
ScrumMaster: I have to go, don't hesitate to ping me again
hkBst has quit [Remote closed the connection]
angerman has joined #ocaml
* Yoric[DT]
just likes it when ertai gives complete answers :)
angerman has quit []
ScrumMaster has quit [Read error: 104 (Connection reset by peer)]
jamii has joined #ocaml
jonafan_ has joined #ocaml
jonafan has quit [Read error: 60 (Operation timed out)]
jonafan has joined #ocaml
* ertai
is back
delroth has quit [Read error: 60 (Operation timed out)]
ScrumMaster has joined #ocaml
jonafan_ has quit [Read error: 113 (No route to host)]
Ariens_Hyperion has joined #ocaml
_andre has joined #ocaml
delroth has joined #ocaml
ulfdoz_ has joined #ocaml
ulfdoz has quit [Read error: 110 (Connection timed out)]
ulfdoz_ is now known as ulfdoz
seafood has quit []
munga has joined #ocaml
munga has quit ["Coyote finally caught me"]
noj has quit ["Changing server"]
noj has joined #ocaml
_andre has quit ["leaving"]
AxleLonghorn has joined #ocaml
kaustuv_ has joined #ocaml
bombshelter13_ has joined #ocaml
Ariens_Hyperion has quit [Read error: 110 (Connection timed out)]
_andre has joined #ocaml
peddie has quit [Remote closed the connection]
peddie has joined #ocaml
th5 has joined #ocaml
th5 has quit []
erikl has joined #ocaml
Snark has joined #ocaml
rjack has quit ["leaving"]
rjack has joined #ocaml
jeanbon has joined #ocaml
itewsh has joined #ocaml
erikl has quit [Read error: 60 (Operation timed out)]
erikl has joined #ocaml
itewsh has quit [Read error: 110 (Connection timed out)]
Camarade_Tux has joined #ocaml
itewsh has joined #ocaml
ulfdoz_ has joined #ocaml
LeCamarade has quit [Remote closed the connection]
ulfdoz__ has joined #ocaml
AxleLonghorn has quit [Read error: 110 (Connection timed out)]
rjack_ has joined #ocaml
rjack_ has quit [Client Quit]
ulfdoz has quit [Read error: 110 (Connection timed out)]
ulfdoz__ is now known as ulfdoz
s4tan has quit [Read error: 110 (Connection timed out)]
ulfdoz_ has quit [Read error: 110 (Connection timed out)]
itewsh has quit [Connection timed out]
itewsh has joined #ocaml
robocop has joined #ocaml
<robocop>
hello.
<robocop>
How I can simplify this code ?
<robocop>
if if_f then try Hashtbl.find h a with _ -> Helper.found_h var_list a ("Unknow values "^a) err else Helper.found_h var_list a ("Unknow values "^a) err
<robocop>
( if a then (try b with _ -> c) else c )
<hcarty>
It seems like something of an odd selection
<hcarty>
Ocamlviz seems like it could be a useful tool though
<hcarty>
I'm rather surprised that they chose another "from the ground up" plotting library
<hcarty>
It is, of course, their money to fund what projects they see fit :-)
erikl has quit [Read error: 110 (Connection timed out)]
ulfdoz has quit [Read error: 110 (Connection timed out)]
ulfdoz_ is now known as ulfdoz
sporkmonger has joined #ocaml
<Alpounet>
yeah
<Alpounet>
but there's a binding of GnuPlot
<Alpounet>
Moreover, that's not worth 3 months of work
<flux>
I can easily see something nicer to use than GnuPlot could be around..
<Alpounet>
but the selection has been made...
<Alpounet>
flux, it was an example
<Alpounet>
binding a plotting library isn't a 3 month work
<flux>
I'm actually happy, because I could use an ocaml plotting library
<flux>
depends on its capabilities
<flux>
there must be more than 3 months work behind GnuPlot, after all :)
ScrumMaster has quit ["Lost terminal"]
<flux>
in three months one should expect quite a complete and kick-ass plotting library, though..
<flux>
..too bad such libraries often turn out to be huge and unwieldy for the (small) task at hand
rjack has quit [Read error: 104 (Connection reset by peer)]
itewsh has quit [Read error: 110 (Connection timed out)]
itewsh has joined #ocaml
erikl has joined #ocaml
alexyk has joined #ocaml
rwmjones has quit ["Closed connection"]
jeanb-- has joined #ocaml
_zack has quit ["Leaving."]
fschwidom has joined #ocaml
itewsh has quit [Read error: 110 (Connection timed out)]
<aij>
robocop: how about (try if a then b else raise Not_found with _ -> c) (* probably slower for the else case, but I'm guessing that's not a common path *)
<aij>
robocop: also, it's generally bad style to catch all exceptions and assume they are the one you are expecting
itewsh has joined #ocaml
<robocop>
okey, thanks aij.
<aij>
for example, I expect you will get bewildering results if that is handling a Stack_overflow
jeanbon has quit [Success]
alexyk has quit []
<palomer>
anyone know where the ocamldoc for type_conv is?
jeanb-- is now known as jeanbon
<hcarty>
Alpounet: There's the gnuplot binding, PLplot which I wrote the bindings for, another PS/latex-based library which I don't remember the name of...
<hcarty>
flux: I'd recommend the PLplot bindings for a start, if you want to make some plots :-)
<palomer>
hrmph
<flux>
hcarty, I've actually used a small piece of software I've written myself
<jli>
flux: what are the hour plots supposed to be?
<flux>
the statistics how the door of a local computer club is open
<flux>
in the 12-hour clock-face charts the white lines are day time, dark lines night time
<hcarty>
Alpounet: One could definitely use up 3 months creating a nice OCaml'd plot interface to a plotting library. But I think, if plotting is the intent, then a focus on making a very nice interface to something which already exists would be a better use of time
<palomer>
how do I use type_conv with omake?
<palomer>
or, rather, how do I use camlp4 with omake?
itewsh has quit ["There are only 10 kinds of people: those who understand binary and those who don't"]
komar___ has joined #ocaml
marmottine has joined #ocaml
<Alpounet>
hcarty, moreover I don't understand why this one was far better than rejected propositions
<flux>
maybe this one suited their needs better?
<Alpounet>
that's the only reasonable explanation
<palomer>
sexplib uses make, OCamlMakefile and omake
<palomer>
nuts!
<jli>
functions that take no useful argument have to be passed unit. is this because there's basically no syntax for function calls?
<mfp>
k, didn't know that values were valid str_items in revised syn
* mfp
gtg
<jli>
flux: thanks
* palomer
still can't compile his test2.ml file with omake
Smerdyakov has joined #ocaml
kaustuv_ has quit [Read error: 113 (No route to host)]
Camarade_Tux has quit ["Leaving"]
alexyk has quit []
marmottine has quit [Read error: 110 (Connection timed out)]
vithos has joined #ocaml
kaustuv_ has joined #ocaml
alexyk has joined #ocaml
monadic_kid has joined #ocaml
Ched has quit ["Ex-Chat"]
Ched has joined #ocaml
jeanb-- has joined #ocaml
Ched has quit [Client Quit]
Ched has joined #ocaml
Snark has quit ["Ex-Chat"]
jeanbon has quit [Success]
Yoric[DT] has joined #ocaml
_zack has joined #ocaml
Associat0r has quit []
itewsh has joined #ocaml
rwmjones has joined #ocaml
<chahibi>
Hello
<chahibi>
what does type foo = {op:char;right: int; left:int}?
<chahibi>
hmm sorry
<chahibi>
too trivial to bother you
jeanb-- is now known as jeanbon
<Smerdyakov>
Was that a real question?
ulfdoz_ has joined #ocaml
<jonafan>
why would you represent a math expression that way
ulfdoz has quit [Read error: 60 (Operation timed out)]
ulfdoz_ is now known as ulfdoz
<Smerdyakov>
jonafan, why would you ask a question without a question mark?
<jonafan>
we've had this discussion before
<jonafan>
it has to do with informality, nuance, and english syntax
<monadic_kid>
is any of this helping anyone?
<jonafan>
sentences that begin with "why" are questions, and sometimes you can turn a statement into a question by using a question mark instead of a period
<monadic_kid>
chahibi: foo is a record type, like a stuct value-type
<chahibi>
monadic_kid, yes, like a struct in c
<Smerdyakov>
monadic_kid, that is not a helpful answer. The right helpful answer is that he should read an OCaml tutorial.
<chahibi>
Smerdyakov, not necessarily
<Smerdyakov>
monadic_kid, but the original question seemed to be missing some words for it to make sense as English, so who knows what he was really asking.
<chahibi>
we are humans
<monadic_kid>
chahibi: what was your question? what kind of type it is?
<chahibi>
not stupid compilers
<chahibi>
we can guess the mistakes
<Smerdyakov>
chahibi, it's rude to expect other people to analyze your messages to understand them.
<kaustuv_>
Smerdyakov: "what does foo?" is a common mistake for non-native speakers of English. He means "what does foo do?"
<chahibi>
Smerdyakov, it is ruder to insist on that
<Smerdyakov>
chahibi, there we must disagree.
<chahibi>
Smerdyakov, we do
<monadic_kid>
so anyways did you mean what kind of type it is?
<chahibi>
monadic_kid, well, I am just discovering ocaml, and came through this type definition
<chahibi>
monadic_kid, and dared to ask in this friendly channel
<chahibi>
monadic_kid, but I got the answer when I searched a bit more :)
<chahibi>
monadic_kid, yes, I understand it is the equivalent of the C "struct"
<chahibi>
monadic_kid, the only strange thing is the "mutable" thing
<chahibi>
monadic_kid, once we define something as "mutable", how can we modify it?
<kaustuv_>
chahibi: it is best not to think in terms of C. Think of it more as a tuple whose components you can project by name.
<chahibi>
monadic_kid, do we need to define a prefix like "->" ?
<chahibi>
kaustuv_, yeah, a tuple indexed by names
<kaustuv_>
chahibi: if you want mutable fields, such as: type foo = { mutable f : int }
<kaustuv_>
Then to assign to the field f you would use foo.f <- 42 instead of foo->f = 42
<monadic_kid>
you wanna tone down the use of mutables
<monadic_kid>
i mean not use it much
<chahibi>
yep
<chahibi>
thanks kaustuv_
<chahibi>
what is the use of these structures if they are not mutable?
<chahibi>
in real life
<monadic_kid>
grouping of data
<kaustuv_>
chahibi: in real life, constants are not mutable. The value of pi does not change for the lifetime of the universe. Functional programming is kind of like programming with constants.
<chahibi>
so they are just multi dimensional constants
<chahibi>
I see that
<kaustuv_>
The trick is to see that what you commonly think of as mutation can just be thought of as creating a new constant with a slightly different structure. Then a "sufficiently smart compiler and runtime" can remove the overhead of this abstraction.
<kaustuv_>
The benefit of the abstraction being, mainly, that you don't lose your past work and can reuse it, ship it to other processors, etc.
<chahibi>
What is wrong with this " > begin let a =5; let b =6; a+b ; end;;
<chahibi>
" ?
<kaustuv_>
I think you should follow Smerdyakov's advice and read an OCaml tutorial until you get the basic syntax.
<hcarty>
chahibi: Smerdyakov's suggestions are both better for really learning the language though.
* palomer
thinks noone needs to pay to get answers
* palomer
also thinks that the tutorials are a little hard at times
<palomer>
chahibi, do you have a specific purpose for using ocaml?
<hcarty>
palomer: The tutorials are, for some purposes, lacking. But there isn't a lot of point to walking someone through the basics of the language over IRC when there are existing sources which do it better.
<chahibi>
palomer, just trying to learn functional programming, and one particular computer exam I want to take
<chahibi>
it might be just the hard day I had, but I feel I am missing something
<palomer>
chahibi, oh, then the tutorial is fine
<palomer>
to answer your question: let <varname> = <expression> in <expression> is the correct syntax to use
<palomer>
I see nothing wrong about asking small questions like chahibi is doing
<chahibi>
yes, and I verified that before
<palomer>
except in the toplevel, in which case let <varname> = <expression> is fine
<chahibi>
so can I say that I can't declare global variables in a begin .. end
<chahibi>
?
<palomer>
chahibi, there is no concept of global variables in haskell
<palomer>
only of bindings
<Smerdyakov>
palomer, you're free to set your own rules for when you answer questions. I have mine, and many others here follow similar rules. I do think you're doing him more harm than good by answering questions when it's clear he's spent minimal time reading an introduction to the language.
<palomer>
Smerdyakov, and I think you're doing more harm than good by being so brusque, so we're even
<chahibi>
I read an introduction to the language
<chahibi>
I did, with the needed time and concetration
<Smerdyakov>
palomer, I think a vote of the channel would lead to siding with me, unusually enough. :)
<chahibi>
and doing the examples
<Smerdyakov>
chahibi, you read what [let] is in that introduction?
<palomer>
chahibi, err, you have to forget about global variables, think of let as giving a name to an expression
<Smerdyakov>
palomer, there is no way you will be able to explain that concept on IRC to someone who doesn't already get it, or at least not with a single line.
<palomer>
I can at least be a little encouraging and help him head in the right direction. I think "forget about global variables" to be a very useful thing to know
<Smerdyakov>
No one will understand and follow that advice without a clear understanding of what to use instead, and that understanding can only come from reading a thoughtfully-written document.
<chahibi>
it says that let name = expression in gives a name to an expression to be used in the following till ;;
<chahibi>
and that global variable are defined using
<chahibi>
let name = expressing ;;
<Smerdyakov>
I hate learning materials that advise to use [;;]. >:[
<palomer>
not everyone learns by reading documents, and not everyone who reads documents can absorb the material without a little helping hand
<chahibi>
well, what I was trying to learn
<chahibi>
is to see how begin ... end works
<chahibi>
its exceptions
<chahibi>
playing with it
<Smerdyakov>
Anyone who can't learn by reading documents needs more help than you will be able to provide over IRC.
<chahibi>
I read no where that you can't define global variables inside a begin end
<Smerdyakov>
(And probably shouldn't be trying to learn OCaml, but sometimes it's worth learning anyway for social reasons.)
<palomer>
let name = expression ;; binds name to expression at the toplevel. inside a begin...end, you cannot bind a name to an expression at the toplevel
<chahibi>
palomer, ok, clear answer :)
<chahibi>
palomer, now, fixing my apparently wrong learning method
<chahibi>
palomer, how am I supposed to know that
<palomer>
so let name = expression1 in expression2 binds name to expression1 in expression2
<Smerdyakov>
chahibi, the OCaml manual includes a complete grammar of the language.
<Smerdyakov>
chahibi, given that grammar, you can tell exactly which syntax is valid.
<chahibi>
Smerdyakov, so are the channel users here supposed to know the complete reference manual before asking anything
<chahibi>
?
<Smerdyakov>
chahibi, you should know how to check the manual to find an answer. That doesn't mean you ever memorize the manual.
<chahibi>
Smerdyakov, this isn't what you were saying before, you said my questions implies I didn't read an ocaml tutoriam
<chahibi>
Smerdyakov, and that it is a very basic principle, at least this is how I understood your reaction
rjack has quit ["leaving"]
<chahibi>
I need to go now
<Smerdyakov>
chahibi, yes. Every channel user is expected to know the basics of the language, and also how to check the manual for more specific answers.
<chahibi>
Thanks all for the help and advices
<palomer>
np
<chahibi>
Smerdyakov, my question wasn't basic
<Smerdyakov>
chahibi, yes, it was.
<Smerdyakov>
chahibi, any question about syntax is basic, since context-free grammars define syntax unambiguously.
<Smerdyakov>
(And CFGs are simple)
<palomer>
I find reading context free grammars a little hard sometimes
<palomer>
and if I didn't have a CS degree, I wouldn't be able to read them at all
<palomer>
anyways, I don't think that everyone here should know the basics of the language; we accept enthusiastic beginners as well
<chahibi>
Smerdyakov, is "let a = 4" an expression?
<Smerdyakov>
I don't think anyone who finds it hard to learn to read CFGs shouldn't try to learn OCaml.
kaustuv_ has quit [Remote closed the connection]
<Smerdyakov>
s/shouldn't/should
hkBst has joined #ocaml
kaustuv_ has joined #ocaml
<Smerdyakov>
chahibi, you can check that for yourself with the grammar in the manual.
<Smerdyakov>
chahibi, there's a section labeled "expressions."
<Smerdyakov>
chahibi, and it gives the complete definition of that syntax.
<gl>
but ocaml users are not human, just ubermensch
<chahibi>
Is this channel for the ocaml language development
<palomer>
anyways, I don't think anyone should set limits on who should or should not learn ocaml
<chahibi>
haha, ubermensch
<Smerdyakov>
palomer, consulting the grammar is the best way to answer questions about syntax.
<Smerdyakov>
palomer, do you know any happy OCaml user who finds CFGs tricky?
<hcarty>
chahibi: What is so odd about being told "Your question is answered in any of these tutorials"?
<chahibi>
add clearly in the channel topic "no ocaml syntax questions"
<chahibi>
and for algorithmics, see elsewhere
<palomer>
CFGs aren't conceptually tricky, but reading the CFG of a completely foreign language is.
<hcarty>
chahibi: Lots of syntax and alogithm questions are asked and answered here
esope has joined #ocaml
<Smerdyakov>
palomer, I don't agree, for a person who understands the formalism.
<hcarty>
chahibi: But when the question is about getting started in the language, the tutorials will do a better job than just about anyone here has time to.
<gl>
many ocaml users don't even bother to understand the formalism of bfg, anyway
<gl>
cfg :)
<palomer>
for example, chahibi has no concept of what an expression is or does. He'll learn by following tutorials, writing his own code and asking questions here. He certainly won't learn from reading a formal document.
<palomer>
the CFG for Oz would certainly baffle me
<palomer>
similarly, the PEG for lojban would baffle you
<Smerdyakov>
palomer, it shouldn't after I read an introduction to the language.
cloudhead has joined #ocaml
<palomer>
you'll have to read chapters and chapters before it starts making sense
<chahibi>
hcarty, I am not completely getting started
<chahibi>
hcarty, I read a manual, and solved many exercices
<chahibi>
hcarty, like threads
esope has left #ocaml []
<chahibi>
hcarty, and their thread balancement
<chahibi>
hcarty, as well as a implementing operation on polynoms as lists
<chahibi>
hcarty, and quickly!
<Smerdyakov>
palomer, some things worth doing require a lot of reading.
<chahibi>
hcarty, my mistakes was that I supposed let a = 5;; is an expression, which wasn't
<palomer>
anyways, all I'm saying is that asking small questions is totally cool, pointing people to reference documents is also cool, but assuming that people haven't read any tutorials or telling people that you won't help them because they're not helping themselves is uncool
<chahibi>
hcarty, and was in no way confronted to know that
<chahibi>
hcarty, and I asked just out of curiosity about begin ... end
<palomer>
not everyone has the patience, and you shouldn't assume that everyone should
<chahibi>
hcarty, I don't usually use begin .. end in my code
<chahibi>
Smerdyakov, did you learn english from a reference manual?
<chahibi>
Smerdyakov, as if you started learning linguistics before human language
<palomer>
I know some chinese and japanese people who learned english from books; they speak terribly (but can read/write)
<chahibi>
Smerdyakov, that is the formal way, and in real life, it isn't the way people learn languages
* palomer
was an english teacher
_zack has quit [Read error: 113 (No route to host)]
<Smerdyakov>
chahibi, natural and computer languages are very different. The latter are designed to be learned relatively quickly by reading.
<chahibi>
Smerdyakov, my point is that formality is not the only way to learn things, and not possible the most adapted to human mind
<hcarty>
chahibi: begin .. end is something which would be covered in a good tutorial. And rules of scope seem to be fairly consistent across most commonly used languages.
<chahibi>
Smerdyakov, perhaps to a machine
<Smerdyakov>
chahibi, it is the best way to learn programming languages.
* palomer
finds that the best way to learn programming languages is to write a project and ask questions along the way, assuming there are people to answer them
<gl>
the best way when your iq is over 160; it's sad, but the mean is about 100.
<hcarty>
palomer: That may be true, but sometimes the best "people" to ask are the documentation.
<chahibi>
gl, proof?
<chahibi>
gl, iq is a terrible intelligence estimator
<gl>
i know
<chahibi>
gl, define intelligence first
<palomer>
hcarty, the documentation can be hard for a beginner
<gl>
it was an analogy
<hcarty>
palomer: I agree. But Hickey's book is less so, and Harrop's tutorial is VERY simple and direct.
<chahibi>
gl, I am trying to be formal :p
<gl>
i'm saying that the best way to many people is to try first, then read the doc; for super-smart people, the best way is to read the full standard/tutorial/whatever, then directly code an operating system
<chahibi>
hcarty, should you really assume that people should know THE right tutorial? Really?
<chahibi>
gl, yes, that is true
<gl>
it would be cool if everyone was in the second category, but it's not real life
<chahibi>
gl, some can learn languages using books
<hcarty>
chahibi: No, which is why several people here suggested "THE right tutorial" to you.
<palomer>
hcarty, try asking a question to a tutorial
seafood has joined #ocaml
<chahibi>
gl, and others cassettes and interactive stuff
<hcarty>
palomer: I do often quite often.
<palomer>
hrmph, this debate is getting too vague
<palomer>
but it just makes me so mad when people get put down for asking questions!
<hcarty>
palomer: Interaction with other humans is important at times as well (otherwise why have #ocaml?), but search will generally find the answer rather quickly in a digital source.
<hcarty>
palomer: It's not about asking questions
<hcarty>
palomer: It's about ignoring the answers
<chahibi>
palomer, the conclusion is that #ocaml is not for fanboys :)
<hcarty>
palomer: I agree that "baby speak" should be as acceptable in OCaml (and #ocaml) as it is in the Perl community
<kaustuv_>
fanboys? This is a programming language, not your latest pop idol sensation.
<chahibi>
hcarty, when can ask ignoring the answer, there is no contradiction
<gl>
xavier is my pop idol
<hcarty>
palomer: However, some effort should be made by the user to follow advice from others.
<chahibi>
"rtfm!" is clear
<chahibi>
it is about the Manual :)
<kaustuv_>
gl: Xavier might be worth idolizing, but he is so so so not pop
<hcarty>
chahibi: I don't understand what you mean.
<palomer>
hcarty, "follow these tutorials and you'll understand your the answer to your small question" can be quite discouraging
<palomer>
s/your/
<hcarty>
chahibi: RTFM may be useless, but RthisFM is generally not.
<chahibi>
hcarty,* you can ask ignoring the answer, there is no contradiction
Ariens_Hyperion has joined #ocaml
<hcarty>
chahibi: But why keep asking if the answers are going to be ignored?
<kaustuv_>
congrats on your ICFP paper, btw, Smerdyakov.
<chahibi>
hcarty, are you sure they are going to be ignored?
<chahibi>
hcarty, how can you assume that
<hcarty>
chahibi: No, I sincerely hope that they won't be ignored.
<Smerdyakov>
kaustuv, thanks. Are you going?
<kaustuv_>
I wish I had the time, but it conflicts with a job talk I have to give.
<Smerdyakov>
kaustuv, bummer.
<hcarty>
chahibi: But you continued to ask after being told "your questions are answered here."
<chahibi>
hcarty, it depends on the person
<kaustuv_>
But I am curious how Ynot++ (or whatever you call it) relates to the stuff Aleks Nanevski et al are doing in Cambridge
<chahibi>
hcarty, I searched (read where begin .. end was defined, and where let was defined)
<hcarty>
chahibi: And the questions illustrated misunderstanding of areas outside of the question itself.
<chahibi>
hcarty, I had to read what statements are and what expressions are
<chahibi>
hcarty, so the pointers were still quite vague
<palomer>
gotta run
<gl>
well, can we stop talking about that?
<chahibi>
yes :)
<Smerdyakov>
kaustuv, it's actually usable for real work. :P
<gl>
thank you
<chahibi>
gl, ah, I feel better now :)
Camarade_Tux has joined #ocaml
<gl>
did someone use the (how is it called...:) c/ocaml bindings? i mean, i want to write to specific code in ocaml then call it from my main c program; i read some documentations about that but i don't get how painful it is to use in a big project
<kaustuv_>
gl: the only real pain (and it's a big one) is that there can be only one instance of the ocaml runtime because it is full of crazy global variables
<kaustuv_>
But there is a serious effort to fix that and make it reentrant soon-ish