dylan changed the topic of #ocaml to: OCaml 3.09.1 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/
snake has joined #ocaml
<snake> hi all
<zmdkrbou> lo alone
<snake> i have a little problem with let keywords = ref []
<snake> i want to be able to add elements to the keywords list
<snake> ( i am very new to ocaml, i just started twi hours ago)
<snake> hi zmdkrbou :)
<snake> can someone help me please ?
<zmdkrbou> yup
<zmdkrbou> is it a type problem ?
<snake> yes i think
<snake> it complains about type
<zmdkrbou> i mean what are you trying to add to this list ?
<zmdkrbou> (and what's the exact error message ?)
<snake> This expression has type string list ref but is here used with type
<snake> string list
<snake> (fun kwd -> keywords := kwd::keywords)
<zmdkrbou> ah ok, just a little syntax problem
<snake> it's is an anounymous function called by Arg.parse
<zmdkrbou> you should write kwd::(!keywords)
<snake> oO
<snake> could you explain the meaning please ?
<snake> or should i rtffm ?
<zmdkrbou> nope : keywords has type string list ref because you defined it as ref []
<zmdkrbou> but :: applies on element + list
<zmdkrbou> not list ref
<zmdkrbou> see what i mean ?
<zmdkrbou> ! is the operator that dereferences references
<zmdkrbou> it's the * in C
<snake> ah okey
<snake> i see
<snake> :)
<snake> thank you very much
<zmdkrbou> and btw
<snake> yes ?
<zmdkrbou> references are not really "good" when you can avoid it
<snake> i need to parse command lien arguments
<zmdkrbou> (ok, i'm a functional addict)
<snake> i don't see solutions for Arg.parse()
<zmdkrbou> mmh yes, indeed
* zmdkrbou slaps the Arg module
<snake> can i bind new values to the same name ?
<snake> let's say :
<snake> let kewords = []
<snake> in let add_keyword kwd =
<snake> keywords := kwd::keywords;;
<snake> ??
<zmdkrbou> you can't do "bla :⁼ something" when bla is not a ref
<snake> okey
<zmdkrbou> the functional style is to pass arguments
<snake> then there is no solution :/
<mellum> You can use a ref.
<snake> mellum, already using one
<zmdkrbou> mellum: i was just explaining him ref weren't good, but module Arg pwned me
* zmdkrbou slaps bla -> unit functions
<snake> thank you very much for you help (ocaml is a very nice language )
<snake> good night all :)
snake has quit ["Leaving"]
TaXules has quit [Read error: 110 (Connection timed out)]
JosephRivers has joined #ocaml
<JosephRivers> Why is it that entering #load "threads.cma" in the toplevel generates a Cannot find file error when threads.cma is in the root ocaml library directory?
<dylan> isn't in a threads sub directory
<JosephRivers> In my installation the threads.cma file is int /usr/lib/ocaml/3.08.3 along with all of the other standard library files like unix.cma.
<JosephRivers> I can load all of the other libraries but threads.cma produces that error message.
<dylan> try it with -threads
<dylan> (switch for ocaml toplevel)
<JosephRivers> How do you activate the threads option for the toplevel? Neither ocaml nor ocamlmktop take the -thread option.
<dylan> ... hmm
<dylan> I dunno
mikeX has joined #ocaml
Mister_C has joined #ocaml
Skal has quit [Read error: 110 (Connection timed out)]
JosephRivers has quit [Remote closed the connection]
<flux__> my ocamlmktop claims to accept the -thread -option
<Smerdyakov> 3.08.3 is a pretty old version.
<Smerdyakov> Are you reading 3.09 documentation?
<flux__> no, but I'm running it
<flux__> (ocamlmktop -help)
<Smerdyakov> I'm talking to JosephRivers.
<flux__> oh, but he left?
twobitsprite has joined #ocaml
weel has quit [Remote closed the connection]
Smerdyakov has quit ["Leaving"]
ppsmimou has joined #ocaml
love-pingoo has joined #ocaml
ppsmimou has quit [Read error: 110 (Connection timed out)]
gim has quit [Read error: 110 (Connection timed out)]
gim has joined #ocaml
ppsmimou has joined #ocaml
Snark has joined #ocaml
Mister_C has quit [Remote closed the connection]
Skal has joined #ocaml
PierreTramo has quit ["Ex-Chat"]
Snark has quit ["Leaving"]
bzzbzz has quit ["leaving"]
vincenz has joined #ocaml
<vincenz> anyone around
<love-pingoo> yup..
<vincenz> oh
<vincenz> hi
<vincenz> for some reason my friend
<vincenz> is getting a lot of compile errors
<vincenz> in code that works fine for me
<vincenz> he's 3.08.3
<vincenz> erm
<vincenz> I'm 3.08.3
<vincenz> he's 3.09.1
<vincenz> linking errors
<vincenz> like undefined reference .L100033 and stuff as that
<vincenz> is this an incompatibility?
<love-pingoo> could be a lot of things
<vincenz> for instance?
<vincenz> I use str.cmxa
<vincenz> extlib
<love-pingoo> does he compile your code from scratch or did you give him object code of any kind ?
<vincenz> and the rest is my code
<vincenz> scratch
<love-pingoo> wow.. no idea then :(
<love-pingoo> an OCaml incompatibility would show up earlier and in a more understandable way
<love-pingoo> at least I'd expect that
<vincenz> well he gets a lot of linking errors
<love-pingoo> does he manage to compiler other ocaml code ?
<vincenz> well he can compile extlib just fine
<love-pingoo> vincenz: if the code isn't too big or confidential, I could take a look (I'm 3.09.1 too)
<vincenz> it applies to both
<love-pingoo> well.. sorry
<vincenz> :/
<vincenz> he's in vmware
<vincenz> or I would've logged into his box to check myself
pauldia has joined #ocaml
dark_light has quit [Remote closed the connection]
mikeX has quit ["22,ligo akoma ithele :P"]
pauldia has quit [Remote closed the connection]
pauldia has joined #ocaml
twobitsprite has left #ocaml []
exa has quit [Read error: 110 (Connection timed out)]
<vincenz> Seems the linker is messing up on his platform
<vincenz> with oo code
exa has joined #ocaml
Smerdyakov has joined #ocaml
Revision17 has joined #ocaml
Skal has quit [Read error: 104 (Connection reset by peer)]
Skal has joined #ocaml
PierreTramo has joined #ocaml
smimou has joined #ocaml
exa has quit [Read error: 110 (Connection timed out)]
meren has joined #ocaml
meren has left #ocaml []
PierreTramo has quit ["Ex-Chat"]
benedikt_ has joined #ocaml
<vincenz> l
Poopsmith is now known as KrispyKringle
bluestorm has joined #ocaml
shawn has quit ["This computer has gone to sleep"]
shawn has joined #ocaml
Snark has joined #ocaml
thresh has joined #ocaml
<thresh> hi, i've got strange generated binaries when using ocaml under linux with pax-patched kernel
KrispyKringle has quit ["leaving"]
<thresh> ocamlc doesn't generate valid code, ld says:
<thresh> trace failed on that binaries
benedikt_ has quit ["Download Gaim: http://gaim.sourceforge.net/"]
Snark has quit ["Leaving"]
pauldia has quit ["Leaving"]
bluestorm has quit [Remote closed the connection]
Skal has quit [Remote closed the connection]
smimou has quit ["bli"]
love-pingoo has quit ["Connection reset by by pear"]
Sysop_fb has joined #ocaml
khaladan has joined #ocaml
slipstream has joined #ocaml
slipstream-- has quit [Read error: 110 (Connection timed out)]
HatchBack176 has joined #ocaml
Submarine has joined #ocaml