sponge45 changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/
<tsuyoshi> whenever it sees a capitalized name, it uncapitalizes that and searches for the name + .cmi
<tsuyoshi> er.. not whenever
<tsuyoshi> but whenever it see a capitalized name that is undefined
<tsuyoshi> sees
<mtomczak> Ah! Excellent.
<mtomczak> So the statement "GlDraw.viewport" implicitly references a module named GlDraw...
<mtomczak> ... which means if it isn't working, it's because for some bizarre reason, my lablgl directory isn't in the searchspace.
mnemonic has quit ["leaving"]
<tsuyoshi> right
<mtomczak> (Oh, I'm sorry. Specifically, GlDraw.viewport attempts to reference 'vieport' in 'glDraw.cmi')
<mtomczak> Ah, that moved it ahead a bit.
<mtomczak> For some reason, specifying in the META file that the 'directory' is "+lablgl" didn't work... that seemed to mean /opt/local/lib/ocaml/lablgl
<mtomczak> Specifying "+site-lib/lablgl" instead worked correctly.
bluestorm has quit ["Konversation terminated!"]
<mtomczak> Ah, I see. "directory" should be an override if the files aren't relative-path to the META file, it seems.
<mtomczak> Omitting "directory" from the META does the right thing.
ikaros has quit ["Leaving"]
<mtomczak> Good! Almost there. The only thing I'm stuck on now is some OS X junk... Undefined symbol, ___cxa_pure_virtual
johnnowak has joined #ocaml
<mtomczak> Google tells me that's crazy ZeroLink garbage. Oh MacOSX, why must you be so wacky? ;)
<tsuyoshi> what is zerolink
<mtomczak> It speeds up the development cycle by playing musical-chairs with your development object file.
<mtomczak> The problem is... it's the default behavior for gcc under OSX. Which means I have to find the switch to turn it OFF :-p
<tsuyoshi> development cycle? you mean it speeds up compilation?
<mtomczak> The documentation says it eliminates the linking step from compilation. I have a very poor understanding of its method.
<mtomczak> Looks like -ccopt "-lstdc++" gets around it.
<tsuyoshi> what's the best way to read an xml file in ocaml?
<tsuyoshi> I've used the expat library before but it's pretty tedious.. there must be a better library
johnnowak has quit []
<tsuyoshi> oh xml-light seems to do the job
johnnowak has joined #ocaml
johnnowak has quit []
<tsuyoshi> only, it won't parse the xml I need to parse
<tsuyoshi> gah.. doesn't work with utf-8
<tsuyoshi> oh maybe this cduce will work
oscarh has quit [Remote closed the connection]
johnnowak has joined #ocaml
mtomczak has quit ["BitchX-1.0c19 -- just do it."]
dark_light has quit [Remote closed the connection]
khaladan_ has quit [Success]
Oatmeat has joined #ocaml
bzzbzz has joined #ocaml
<Oatmeat> is there a way to specify an output directory for the ocaml compiler? I'm try to avoid having cmi and cmo files clutter up my source tree
Lovebug has joined #ocaml
Lovebug has left #ocaml []
ulfdoz has quit [Read error: 110 (Connection timed out)]
OatTop has quit [Read error: 110 (Connection timed out)]
<gmh33> Oatmeat: by the looks of man ocamlopt/ocamlc, that'd be a no
Smerdyakov has quit ["Leaving"]
diffbavis has joined #ocaml
oscarh has joined #ocaml
pstickne has quit [Read error: 104 (Connection reset by peer)]
pstickne has joined #ocaml
johnnowak has quit [Read error: 145 (Connection timed out)]
johnnowak has joined #ocaml
diffbavis has quit [Read error: 54 (Connection reset by peer)]
johnnowak has left #ocaml []
chi11 has joined #ocaml
johnnowak has joined #ocaml
ulfdoz has joined #ocaml
descender has quit [Read error: 104 (Connection reset by peer)]
desc has joined #ocaml
desc is now known as descender
johnnowak has quit [Read error: 145 (Connection timed out)]
johnnowak has joined #ocaml
johnnowak has quit [Read error: 145 (Connection timed out)]
johnnowak has joined #ocaml
pstickne has quit ["Leaving"]
johnnowak has quit [Read error: 145 (Connection timed out)]
johnnowak has joined #ocaml
johnnowak has quit [Read error: 145 (Connection timed out)]
johnnowak has joined #ocaml
descender has quit [Remote closed the connection]
johnnowak has quit [Read error: 145 (Connection timed out)]
johnnowak has joined #ocaml
johnnowak has quit [Read error: 145 (Connection timed out)]
johnnowak has joined #ocaml
johnnowak has quit [Read error: 145 (Connection timed out)]
love-pingoo has joined #ocaml
johnnowak has joined #ocaml
johnnowak has quit [Read error: 145 (Connection timed out)]
johnnowak has joined #ocaml
johnnowak has quit [Read error: 145 (Connection timed out)]
johnnowak has joined #ocaml
johnnowak has quit [Read error: 145 (Connection timed out)]
joelr1 has joined #ocaml
<joelr1> good morning
johnnowak has joined #ocaml
<joelr1> folks, how does algokit sound for a product name?
<mattam> fine
<joelr1> awesome!
johnnowak has quit [Read error: 145 (Connection timed out)]
johnnowak has joined #ocaml
johnnowak has quit [Read error: 145 (Connection timed out)]
johnnowak has joined #ocaml
velco has joined #ocaml
johnnowak has quit [Read error: 145 (Connection timed out)]
johnnowak has joined #ocaml
johnnowak has quit [Read error: 145 (Connection timed out)]
johnnowak has joined #ocaml
johnnowak has quit [Client Quit]
velco has quit [Read error: 110 (Connection timed out)]
joelr1 has left #ocaml []
bzzbzz has quit ["leaving"]
descender has joined #ocaml
ikaros has joined #ocaml
ikaros has quit [Read error: 104 (Connection reset by peer)]
ikaros has joined #ocaml
bluestorm has joined #ocaml
joelr1 has joined #ocaml
joelr1 has quit [Client Quit]
velco has joined #ocaml
velco has quit [Read error: 110 (Connection timed out)]
diffbavis has joined #ocaml
Smerdyakov has joined #ocaml
Bee has joined #ocaml
Bee has left #ocaml []
Oatly has joined #ocaml
Aradorn has joined #ocaml
kral has joined #ocaml
Aradorn_ has joined #ocaml
Oatmeat has quit [Read error: 110 (Connection timed out)]
Aradorn has quit [Read error: 60 (Operation timed out)]
mnemonic has joined #ocaml
<mnemonic> hi
johnnowak has joined #ocaml
pango has quit [Remote closed the connection]
pango has joined #ocaml
johnnowak has quit []
love-pingoo has quit ["Leaving"]
Aradorn_ has quit [Client Quit]
Aradorn has joined #ocaml
kral has quit [Remote closed the connection]
malc_ has joined #ocaml
er has joined #ocaml
<er> how does one read a file into an integer buffer without having to copy via Pervasives.input?
<malc_> er: what's an integer buffer?
<er> malc_, an array of integers, or a bigarray maybe
<savanni> Is that related to, say, reading a binary file directly into memory? Because if so, I was about to ask about that.
<malc_> er: BigarrayX.map_file
<er> savanni, yes, you read a binary file into memory by opening using read_in_bin and then reading using input or input_value...
<malc_> if your file consists of marshaled values (and judging by reference to input_value it is) then bigarray will be of no help
<er> malc_, thanks.
<er> exactly what i needed
{MSX} has joined #ocaml
<{MSX}> hi, i've a question: if i have a tuple with n fields, how can i access them?
<malc_> {MSX}: let (a,b,c,d) = tuple in ...
<tsuyoshi> you don't know the size?
<{MSX}> ok, now how can i get c, for example?
<{MSX}> ah wait
<malc_> {MSX}: let (_,_,c,_) = tuple in ...
<{MSX}> i see
<malc_> if you want generic selector, then there's no such thing in ocaml (unlike SML)
<{MSX}> ah ok, that's exacly what i was searching
<tsuyoshi> what's a generic selector
<malc_> something like(pseudo SML): fun getc tup = #c (tup)
<tsuyoshi> how is that different?
<malc_> erm.. make that #3 (tup)
<tsuyoshi> oh.. that just turns it into an array
<malc_> no
<tsuyoshi> no? it's indexed access
<{MSX}> marc: are tuple very used? or it's better to use records ?
<malc_> {MSX}: for one thing i'm not marc, for another, the question is somewhat vague and contextless
<{MSX}> ah ok, sorry for the name
<{MSX}> well i read the tutorial and it mentions tuples very briefly, so i guessed they was kind of unused
<malc_> they are not
Oatly has quit []
Aradorn_ has joined #ocaml
{MSX} has quit ["Download Gaim: http://gaim.sourceforge.net/"]
Aradorn has quit [Read error: 104 (Connection reset by peer)]
SegFault7 has joined #ocaml
SegFault7 has quit [Client Quit]
Aradorn has joined #ocaml
Aradorn_ has quit [Read error: 104 (Connection reset by peer)]
diffbavis has quit [Read error: 54 (Connection reset by peer)]
_JusSx_ has joined #ocaml
_JusSx_ has quit [Client Quit]
_JusSx_ has joined #ocaml
Axioplase has joined #ocaml
<Axioplase> Hi !
<Axioplase> I have to write down some recursive objec,t but I don't succeed in doing it..
<Axioplase> I want to write something like 'let rec x = Foo [x]'
<malc_> ~$ ocaml -rectypes Objective Caml version 3.09.3
<malc_> # let rec x = `Foo [x];;
<malc_> val x : [> `Foo of 'a list ] as 'a = ...
<malc_> but that's shooting yourself in the foot
<Axioplase> hum.. without variant types :)
<malc_> (..most of the time)
<malc_> # type t = Foo of t list;;
<malc_> type t = Foo of t list
<malc_> # let rec x = Foo [x];;
<malc_> val x : t =
<malc_> ...
<bluestorm> # type truc = truc list;;
<bluestorm> type truc = truc list
<Axioplase> hum... in fact, I have this :
<bluestorm> # let rec (x:truc) = [x];;
<bluestorm> val x : truc =
<bluestorm> [[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[...]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]
<bluestorm>
<bluestorm> ( -rectypes, of course )
<malc_> bluestorm: 21:31 < malc_> ~$ ocaml -rectypes was there a point in repeating what i just posted?
<bluestorm> hum
<bluestorm> i maybe tought it would be useful to show that a constructor wasn't needed to achieve this
<Axioplase> I need to compile recursive closures... Therefore, I need the closure to be in its own env. here's what I have : µf.\x.e : ERecFun(f,x,e) -> (let clos = tailaux (x::f::l) e in let rec k = [IRecClosure (k@clos)] in k
<Axioplase> I always get those "This kind of expression is not allowed as right-hand side of `let rec'
<malc_> Axioplase: once again -rectypes
<Axioplase> malc_: I'm sure it can be done without rectypes :/
<malc_> fine
Submarine has joined #ocaml
<bluestorm> (i'm a little bit off-topic, but i recently had some fun with the "type truc = truc list" type : for example you can write a nice natural integers library on the top of that, it's very near of the mathematical definition of sets)
<Axioplase> bluestorm: yes. Neumann's integers..
love-pingoo has joined #ocaml
<bluestorm> yes
<bluestorm> altought you could use a different representation
<bluestorm> ...
<bluestorm> 3 = {{{}}}
<bluestorm> but the neumann's one is more practial even in caml
<bluestorm> and let succ n = n::n is sooo cool :-°
malc_ has left #ocaml []
_JusSx__ has joined #ocaml
jacobian_ has joined #ocaml
<jacobian_> Is there a way to use ocaml as an embedded scripting language in an ocaml executable?
<love-pingoo> not really but you can dynamically load code
mtomczak has joined #ocaml
_JusSx___ has joined #ocaml
smimou has joined #ocaml
_JusSx_ has quit [Read error: 110 (Connection timed out)]
_JusSx__ has quit [Read error: 110 (Connection timed out)]
pango has quit [Remote closed the connection]
diffbavis has joined #ocaml
<jacobian_> how does it do type checking if you dynamically load code?
<jacobian_> the interface must not have type erasure
<jacobian_> and you would have to add typing data at the interface
Submarine has quit [Remote closed the connection]
_JusSx_ has joined #ocaml
<tsuyoshi> never seen anyone actually use dynamically loaded code in ocaml
<er> what is the length of a native ocaml integer?
_JusSx__ has joined #ocaml
_JusSx___ has quit [Read error: 113 (No route to host)]
<mtomczak> er: System-specific.
<mtomczak> That might help.
_JusSx_ has quit [Read error: 110 (Connection timed out)]
benny has joined #ocaml
Aradorn_ has joined #ocaml
Aradorn has quit [Read error: 104 (Connection reset by peer)]
benny_ has quit [Read error: 110 (Connection timed out)]
_JusSx_ has joined #ocaml
_JusSx___ has joined #ocaml
_JusSx__ has quit [Read error: 113 (No route to host)]
pango has joined #ocaml
slipstream has quit [Read error: 110 (Connection timed out)]
<Axioplase> 31bits
<Axioplase> plus 1 bit for the GC
_JusSx_ has quit [Read error: 110 (Connection timed out)]
slipstream has joined #ocaml
<er> mtomczak, thanks for that.
<er> I should have used nativeints in this 3k line implementation rather than ints
<bluestorm> actually it may be possible to change it
<bluestorm> let ( + ) = Nativeint.add
<bluestorm> and so on
<er> that's what i'm doing
jacobian_ has quit [Remote closed the connection]
<er> btw, how do we differentiate between a binary and unary -?
<er> (-)
<bluestorm> one is ~- and the other is -
<bluestorm> hmm
<bluestorm> but it seems ~- doesn't affect the (-2) behavior
<er> bluestorm, i tried that too
<bluestorm> hm
<bluestorm> you may have to come to regular expressions :-°
Aradorn_ has quit [Client Quit]
Aradorn has joined #ocaml
Mr_Awesome has joined #ocaml
<Aradorn> are there any really good published ocaml books?
<Aradorn> i know theres all kinds of web resoruces
<bluestorm> i know a good, out of print french book
<bluestorm> (the original version of "Developping applications with Objective Caml")
Axioplas1 has joined #ocaml
love-pingoo has quit ["Connection reset by pear"]
mtomczak has quit ["IceChat - Keeping PC's cool since 2000"]
chi11 has quit [Read error: 145 (Connection timed out)]
Aradorn has quit []
Axioplase has quit [Read error: 110 (Connection timed out)]
shawn has quit ["This computer has gone to sleep"]
shawn has joined #ocaml
er has quit ["Leaving"]
shawn has quit ["This computer has gone to sleep"]
shawn has joined #ocaml
smimou has quit ["bli"]
mnemonic has quit ["leaving"]
_JusSx___ has quit [Client Quit]
DoctorMach has joined #ocaml