dark_light changed the topic of #ocaml to: OCaml 3.09.2 available! Archive of Caml Weekly News: http://sardes.inrialpes.fr/~aschmitt/cwn/ | A free book: http://cristal.inria.fr/~remy/cours/appsem/ | Mailing List: http://caml.inria.fr/bin/wilma/caml-list/ | Cookbook: http://pleac.sourceforge.net/
chessguy has joined #ocaml
jacobolus has quit []
smimou has quit ["bli"]
chessguy2 has quit [Connection timed out]
chessguy is now known as chessguy2
chessguy2 is now known as chessguy
asbeta has quit []
sponge45 has joined #ocaml
hikozaemon has joined #ocaml
jcreigh has joined #ocaml
<AI_coder> Ok, why is [@];; not a syntax error but [::];; is?
<sponge45> Hi. You mean (@) vs. (::) I guess.
<sponge45> This prevents you from redefining ::
<dylan> well, the real issue is :: is not first class.
<sponge45> Note that you can easily define your own cons function: let (@@) hd tl = hd :: tl
<dylan> I think in caml-light, constructors were like functions.
<sponge45> I heard that in SML it's like that too
<dylan> anyway, it's best to think of :: like:
<dylan> type 'a list = Cons of 'a * 'a cons
<dylan> err
<dylan> type 'a list = Cons of 'a * 'a cons | Empty
<dylan> Cons("foo", Cons("bar", Empty))
<dylan> is like "foo" :: "bar" :: []
<dylan> you can't use Cons (without arguments) as a value, and thus you can't take :: as a value.
pango has quit [Remote closed the connection]
pango has joined #ocaml
jacobolus has joined #ocaml
jcreigh has quit ["Cuius rei demonstrationem mirabilem sane detexi. Hanc marginis exiguitas non caperet."]
hikozaemon has quit ["Leaving..."]
hikozaemon has joined #ocaml
joshcryer has joined #ocaml
sponge45 has quit ["zzzzzzzz"]
chessguy has quit [" HydraIRC -> http://www.hydrairc.com <- IRC for those that like to be different"]
AI_coder has quit ["QuIRC for *nix - http://quirc.org/"]
woggle has quit [Connection timed out]
jcreigh has joined #ocaml
hikozaemon has quit [Read error: 110 (Connection timed out)]
edmund has joined #ocaml
jcreigh has quit ["Cuius rei demonstrationem mirabilem sane detexi. Hanc marginis exiguitas non caperet."]
pango has quit [Remote closed the connection]
pango has joined #ocaml
sponge45 has joined #ocaml
tristram has joined #ocaml
sponge45 has quit ["zzzzzzzz"]
edmund has quit ["Chatzilla 0.9.69.1 [Firefox 1.5.0.4/2006050817]"]
pango has quit ["Client exiting"]
Revision17 has quit [Read error: 110 (Connection timed out)]
pango has joined #ocaml
joshcryer has quit [Read error: 104 (Connection reset by peer)]
smimou has joined #ocaml
andreas_1 has joined #ocaml
<andreas_1> hi all
<andreas_1> I am developing a bioinformatics sequence analysis suite which contains several modules, one of which containing a record of parameters needed throughout the application. The params record is mostly static but some values can be overwritten by command-line options. Is there a way to make the (possibly modified) params record globally accessable throughout all Modules? This would be much more convenient than passing it as the last an argument to
Oatmeat|cs has joined #ocaml
Oatmeat|umn has quit [Read error: 110 (Connection timed out)]
<dylan> err, just qualify it with the module it is in
<andreas_1> but then I get the static params, that is command-line changes are not reflected
mnemonic has joined #ocaml
<mnemonic> yo
<aref> g'day
<smimou> andreas_1: could we see the code of the module containing the command-line options ?
<smimou> also you have to fetch the parameters *after* they are updated
<smimou> this means that you obviously cannot fetch them in a let _ = ...
<smimou> a better coding style would be
<smimou> let set_indexfile cf s = cf.indexfile <- s
<smimou> also I don't understand the use of the cf argument
<smimou> I thing the right thing to do is
<andreas_1> you may be right, I took those setter functions from the "Developing Applications...." book
<smimou> let set_indexfile = default_config.indexfile <- s
<andreas_1> the cf is a ref to a default_config record
<andreas_1> the module works just fine
<smimou> and access the params via Par.default_config
<smimou> well it does not, else you wouldn't have come here :)
<smimou> you don't need a ref on default_config since it parameters are mutable
<andreas_1> the problem is, that if in some other module I put "let par = Par.default_config" I get just the default_config without any changes caused by the commandline args
<smimou> what you do here is taht you modify what cf points to
<smimou> you don't modify the contents of the value pointed by cf
<smimou> andreas_1: if you don't want to modify extensively your Par module, a quick fix is
<smimou> let set_indexfile cf s = (!cf).indexfile <- s
<smimou> but really you don't need the cf argument
<smimou> {!cf with indexfile = s} creates a *new* record
<smimou> it does not modify it
<andreas_1> I see, you mean everytime I change a parameter I dont change the cf but create a new one
<smimou> yes
<andreas_1> you are right, I should change that
<andreas_1> but lets say I did as you said, then I could write "let par = Par.default_config" in all modules and par would relfect the command line changes?
<smimou> yes
<smimou> a better coding style would be to simply use Par.default_config (no need for the let par)
<smimou> (IMHO)
<andreas_1> thx for helping I will try
<avlondono> this is strange, but, it is always so hard to find an ocaml programmer ...
<avlondono> anyone looking for an ocaml programming job?
<avlondono> this would be in New York, at the American Museum of Natural History, bioinformatics stuff, in C and OCaml (the core parts are in C).
<avlondono> but 99% is in Ocaml
<avlondono> if someone is interested, let me know.
<smimou> avlondono: why don't you post your job offer on the caml-list ?
<avlondono> we will. it was done in the past with very few results (only one person responded!)
<avlondono> of course that's better than nothing
jacobolus has left #ocaml []
asbeta has joined #ocaml
Revision17 has joined #ocaml
<asbeta> anyone familiar with f#?
<pango> asbeta: Smerdyakov I think, but he's not here
chessguy has joined #ocaml
<asbeta> looks like i have to wait...
love-pingoo has joined #ocaml
Demitar has quit [Read error: 131 (Connection reset by peer)]
Demitar has joined #ocaml
finelemon has joined #ocaml
mattam has quit ["leaving"]
finelemo2 has joined #ocaml
pango has quit ["brb"]
love-pingoo has quit ["Connection reset by pear"]
pango has joined #ocaml
finelemo1 has quit [Read error: 110 (Connection timed out)]
finelemon has quit [Read error: 110 (Connection timed out)]
mattam has joined #ocaml
_fab has joined #ocaml
mnemonic has quit ["leaving"]
mnemonic has joined #ocaml
ita has joined #ocaml
slipstream has joined #ocaml
chessguy2 has joined #ocaml
slipstream-- has quit [Read error: 145 (Connection timed out)]
chessguy has quit [Connection timed out]
chessguy2 is now known as chessguy
malc_ has joined #ocaml
mnemonic has quit [Connection timed out]
chessguy2 has joined #ocaml
chessguy has quit [Connection timed out]
chessguy2 is now known as chessguy
mrsolo has joined #ocaml
Smerdyakov has joined #ocaml
ita is now known as ita|zzz
_fab has quit [Remote closed the connection]
smimou has quit ["bli"]
jer has joined #ocaml
<jer> anyone have a resource for lightweight records? the link on the caml hump is dead
<Smerdyakov> What are those?