<ReachingFarr>
OK, I was having a problem with the 'longest match' principle. Fixed it now.
ReachingFarr has left #ocaml []
avsm1 has quit [Quit: Leaving.]
leino has quit [Quit: leaving]
sepp2k has quit [Quit: Leaving.]
jakedouglas has quit [Quit: Leaving.]
travisbrady has quit [Quit: travisbrady]
neorab has quit [Quit: WeeChat 0.3.2]
schmx has quit [Ping timeout: 240 seconds]
schmx has joined #ocaml
schmx has quit [Changing host]
schmx has joined #ocaml
alpounet has quit [Quit: Bye.]
alpounet has joined #ocaml
kg4qxk has joined #ocaml
hugin has quit [Ping timeout: 260 seconds]
pad has quit [Read error: Connection reset by peer]
hugin has joined #ocaml
runnig has joined #ocaml
runnig has quit [Client Quit]
ccasin has quit [Quit: Leaving]
runnig has joined #ocaml
jeddhaberstro has quit [Quit: jeddhaberstro]
enthymeme has quit [Quit: rcirc on GNU Emacs 23.1.1]
runnig has quit [Quit: Page closed]
runnie has joined #ocaml
runnie has quit [Client Quit]
_unK has quit [Remote host closed the connection]
seafood has joined #ocaml
jakedouglas1 has joined #ocaml
jakedouglas1 has quit [Ping timeout: 240 seconds]
enthymeme has joined #ocaml
mehdid has quit [Ping timeout: 240 seconds]
linus5 has joined #ocaml
linus5 has quit [Remote host closed the connection]
SEcki has quit [Remote host closed the connection]
Associat0r has joined #ocaml
ttamttam has joined #ocaml
ttamttam has quit [Quit: Leaving.]
ttamttam has joined #ocaml
aja has joined #ocaml
spahn has joined #ocaml
spahn has left #ocaml []
oc13 has joined #ocaml
enthymeme has quit [Quit: rcirc on GNU Emacs 23.1.1]
aja has quit [Read error: Connection reset by peer]
mehdid has joined #ocaml
mehdid has quit [Client Quit]
mehdid has joined #ocaml
caligula_ has joined #ocaml
caligula__ has quit [Ping timeout: 264 seconds]
ulfdoz has joined #ocaml
derdon has joined #ocaml
Shoggoth has joined #ocaml
Jedai has joined #ocaml
sdschulze has joined #ocaml
ygrek has joined #ocaml
oriba has joined #ocaml
sepp2k has joined #ocaml
Shoggoth has quit [Read error: Connection reset by peer]
marchdown has joined #ocaml
marchdown has quit [Excess Flood]
eelte is now known as coucou747
marchdown has joined #ocaml
marchdown has quit [Excess Flood]
marchdown has joined #ocaml
oriba has quit [Remote host closed the connection]
fschwidom has joined #ocaml
marchdown has quit [Quit: marchdown]
Smerdyakov has joined #ocaml
pimmhogeling has joined #ocaml
fraggle_ has quit [Quit: -ENOBRAIN]
boscop has quit [Read error: Connection reset by peer]
boscop has joined #ocaml
fraggle_ has joined #ocaml
fschwidom has quit [Remote host closed the connection]
ikaros has joined #ocaml
itewsh has joined #ocaml
fschwidom has joined #ocaml
seanmcl has joined #ocaml
gbucher has joined #ocaml
csc` has joined #ocaml
csc` has left #ocaml []
marchdown has joined #ocaml
gbucher has left #ocaml []
neorab has joined #ocaml
Associat0r has quit [Quit: Associat0r]
npouillard has quit [Ping timeout: 260 seconds]
npouillard has joined #ocaml
ikaros has quit [Remote host closed the connection]
Associat0r has joined #ocaml
gildor has quit [Ping timeout: 240 seconds]
neorab has quit [Quit: WeeChat 0.3.2]
gildor has joined #ocaml
<gildor>
all: if nobody objects, I will fill a request to replace the channel founder (gl) that has not appeared since quite a long time
<Smerdyakov>
I'll back that up, if such a thing would be of any help.
<gildor>
Smerdyakov: thanks, I'll begin to ask #freenode that they give you the +s flag (as you talk in your mail) but they asked me to ask for a replacement
ccasin has joined #ocaml
bzzbzz has quit [Quit: leaving]
Yoric has joined #ocaml
<alpounet>
agreed
fschwidom has quit [Remote host closed the connection]
oriba has joined #ocaml
seanmcl has quit [Quit: seanmcl]
seafood has quit [Quit: seafood]
sdschulz` has joined #ocaml
sdschulze has quit [Ping timeout: 260 seconds]
sdschulz` has quit [*.net *.split]
oc13 has quit [*.net *.split]
oc13 has joined #ocaml
sdschulz` has joined #ocaml
Yoric has quit [Quit: Yoric]
pimmhogeling has quit [Ping timeout: 265 seconds]
bluestorm has joined #ocaml
sepp2k has quit [Quit: Leaving.]
_unK has joined #ocaml
joewilliams_away is now known as joewilliams
Submarine has joined #ocaml
seanmcl has joined #ocaml
joewilliams is now known as joewilliams_away
Yoric has joined #ocaml
ulfdoz_ has joined #ocaml
jimi_hendrix has joined #ocaml
ulfdoz has quit [Ping timeout: 248 seconds]
<jimi_hendrix>
with pattern matching, is there a way to match for two conditions (execute this block if a or b)
<bluestorm>
your question is ambiguous but "yes"
<bluestorm>
match foo with [] | _::[] -> "one element or less" | _::_::[] -> "more than one element"
<bluestorm>
err, the last pattern should read _::_::_
<jimi_hendrix>
that looks like greek to me
<bluestorm>
if (a) and (b) are patterns, then (a | b) is a pattern matching either one or the other pattern
<bluestorm>
(both patterns must bind the same variables)
oriba has quit [Quit: Verlassend]
<bluestorm>
well, ([] | _ :: []) is a pattern that matches if the parameter is the empty list [], or a one-element list _ :: []
<jimi_hendrix>
i see
<bluestorm>
(I used this example because it is the first useful disjunctive pattern I could think of : you use it when recursively sorting a list)
<jimi_hendrix>
ok
<bluestorm>
another classical use it the simplification of two-element functions when a "halting case" may happen on both sides
<bluestorm>
let add = function (0, n) | (n, 0) -> n | a, b -> a + b
ulfdoz_ has quit [Quit: Reconnecting]
ulfdoz has joined #ocaml
jeddhaberstro has joined #ocaml
Yoric has quit [Quit: Yoric]
Yoric has joined #ocaml
<jimi_hendrix>
i see
<jimi_hendrix>
bluestorm, one more beginner question, what does the ~ do?
<bluestorm>
you mean foo ~bar ~baz ?
<bluestorm>
it's a label (a way to give function parameters by name, instead of by position)
<jimi_hendrix>
ah
<bluestorm>
( ~- is also a syntax for the unary minus operator )
<jimi_hendrix>
and i assume the syntax for calling a function with labels is ~label:value
<bluestorm>
if you're a beginner, you shouldn't waste mental effort understanding labels now, it's not a prominent part of the language
<bluestorm>
jimi_hendrix: yes, and there is a syntaxic shortcut, if you have a variable with name "label", you can use ~label directly
<bluestorm>
let bar = .... in foo ~bar
<jimi_hendrix>
bluestorm, i have seen it pop up in a few places in other API's
<jimi_hendrix>
oh cool
<bluestorm>
(you can find more detailed documentation on labels in the caml manual)
<jimi_hendrix>
and then what might a "Error: Unbound type constructor foo" error mean
<thelema>
means you've not defined a type foo
<thelema>
# let (x : foo) = 10;;
<thelema>
Error: Unbound type constructor foo
<bluestorm>
jimi_hendrix: if you want help for a specific code, do not hesitate to publish it on a pastebin somewhere
<bluestorm>
it's easier to help when looking at code than out of thin air
<jimi_hendrix>
found my error
<jimi_hendrix>
thanks
<derdon>
is it possible to generate *.exe files for ocaml projects so that my software is even useful for "Lusers"?
<thelema>
ocamlopt compiles to .exe on windows, no?
<derdon>
I don't know ^^
<thelema>
yes
<derdon>
ok, good to know
<bluestorm>
you probably need to throw the "-custom" parameter somewhere if your user don't have the ocaml runtime installed
<derdon>
and these exe files are even executable if no ocaml is installed?
<bluestorm>
I think so
<bluestorm>
I haven't compiled an ocaml program on windows for years
<derdon>
I see
<adrien>
ocamlopt wouldn't need -custom ;-)
<bluestorm>
hm
<bluestorm>
doesn't ocamlopt-generated program also use a shared runtime library ?
<adrien>
-custom embeds the bytecode interpreter inside the output file, so if you have native code...
<adrien>
gah
<adrien>
(completely unrelated to the current topic, well, almost: need to decide how to handle different prefixes for yypkg and the package build scripts)
sepp2k has joined #ocaml
hcarty has joined #ocaml
Yoric has quit [Quit: Yoric]
rovar has joined #ocaml
itewsh has quit [Ping timeout: 276 seconds]
seanmcl has quit [Quit: seanmcl]
ikaros has joined #ocaml
rovar has quit [Ping timeout: 245 seconds]
boscop_ has joined #ocaml
boscop has quit [Ping timeout: 265 seconds]
rovar has joined #ocaml
jeddhaberstro has quit [Ping timeout: 258 seconds]
jeddhaberstro has joined #ocaml
orbitz has quit [Ping timeout: 264 seconds]
orbitz has joined #ocaml
seanmcl has joined #ocaml
ttamttam has quit [Quit: Leaving.]
Anarchos has joined #ocaml
sepp2k has quit [Quit: Leaving.]
pimmhogeling has joined #ocaml
Anarchos has quit [Quit: Vision[0.9.7-H-090423]: i've been blurred!]
<jimi_hendrix>
one more small question: what does `foo mean?
<Smerdyakov>
jimi_hendrix, you should read the full tutorial from the OCaml manual, before asking any more questions.
rovar has left #ocaml []
<coucou747>
and jimi_hendrix I think it's not important for a beginner to know that...
<coucou747>
I never use this kind of expression, and I work everyday with ocaml
<coucou747>
jimi_hendrix, you should start by writing your own code, because sometimes you will see something like that, ant it's not important to make good ocaml code
<derdon>
coucou747: but this is used in the gtk binding of ocaml
<coucou747>
derdon, and ?
<derdon>
coucou747: so one should at least know how to use them
<jimi_hendrix>
coucou747, well i saw it used with no context, but some ctrl+f of the manual for the ` gave it to me. i was looking for what it is called so i could google its name
<coucou747>
yes derdon sometimes, you must write a variant, but it's just call functions with variants as parameters... it's not hard and using gtk is not for beginners
<coucou747>
bindings are not for beginners...
<coucou747>
jimi_hendrix, it's variant
<coucou747>
derdon, people use variant where I work, but I never write a module wich use some variants
<coucou747>
it's not an important feature of ocaml
<derdon>
coucou747: ok. How long have you been working with OCaml?
<coucou747>
my work is to make some softwares in ML since few months, and I program with ocaml the weekend since few years
<coucou747>
why ?
<flux>
jimi_hendrix, polymorphic variant is probably a decent keyword
<jimi_hendrix>
thanks
leino has joined #ocaml
Yoric has joined #ocaml
Yoric has quit [Client Quit]
Yoric has joined #ocaml
ygrek has quit [Ping timeout: 245 seconds]
seanmcl has quit [Quit: seanmcl]
jcaose has joined #ocaml
jcaose has quit [Client Quit]
oc13 has quit [Ping timeout: 245 seconds]
msteele has quit [Ping timeout: 264 seconds]
msteele has joined #ocaml
Smerdyakov has quit [Quit: Leaving]
pimmhogeling has quit [Remote host closed the connection]
Submarine has quit [Quit: Leaving]
bluestorm has quit [Ping timeout: 276 seconds]
coucou747 is now known as president_prolo_
president_prolo_ is now known as presprolo2011
leino has quit [Quit: leaving]
seanmcl has joined #ocaml
brooksbp has joined #ocaml
neorab has joined #ocaml
ikaros has quit [Quit: Leave the magic to Houdini]