gl changed the topic of #ocaml to: OCaml 3.07 ! -- Archive of Caml Weekly News: http://pauillac.inria.fr/~aschmitt/cwn , A tutorial: http://merjis.com/richj/computers/ocaml/tutorial/ , A free book: http://cristal.inria.fr/~remy/cours/appsem, Mailing List (best ml ever for any computer language): http://caml.inria.fr/bin/wilma/caml-list | http://icfpcontest.org/ !!
<arnowa_> how do i tweak this: ??
<arnowa_> $ ocamlopt.opt -I /e/programme/ocaml/lib -inline 10 -linkall -o mlnet unix.cmxa str.cmxa -cclib -lws2_32 -cclib resfile.o -I build build/cdk.cmxa build/common.cmxa build/client.
<arnowa_> cmxa build/core.cmxa build/driver.cmxa src/daemon/common/commonMain.cmx -verbose
<arnowa_> + as -o "E:/DOKUME~1/Arno/LOKALE~1/Temp\camlstartup76a5de.o" "E:/DOKUME~1/Arno/LOKALE~1/Temp\camlstartup484650.s"
<arnowa_> + gcc -mno-cygwin -o "mlnet" -I"c:\ocamlmgw\lib" "E:/DOKUME~1/Arno/LOKALE~1/Temp\camlstartup76a5de.o" "e:/programme/ocaml/lib\std_exit.o" "src/daemon/common/commonMain.o" "build/driver.a" "build/core.a" "build/client.a" "build/common.a" "build/cdk.a" "e:/programme/ocaml/lib\str.a" "e:/programme/ocaml/lib\unix.a" "e:/programme/ocaml/lib\stdlib.a" "-Le:/programme/ocaml/lib" "-Lbuild" "-Lc:\ocamlmgw\lib" @E:/DOKUME~1/Arno/LOKALE~1/Temp\camlresp1a
<arnowa_> gcc: @E:/DOKUME~1/Arno/LOKALE~1/Temp\camlresp1a5ccb: Invalid argument
<arnowa_> Error during linking
<arnowa_> Thank you for any help! that @ looks wrong, no?
<Axioplase> no idea :/
<arnowa_> how exactly does this ocamlopt.opt generate that long gcc line?
Phreaze has joined #ocaml
Axioplase has quit [Nick collision from services.]
Phreaze is now known as Axioplase
Riastradh has quit [Read error: 60 (Operation timed out)]
segphault has joined #ocaml
gim has quit ["gloup"]
Riastradh has joined #ocaml
JPL-Justin_ has joined #ocaml
<Axioplase> ++
Axioplase has quit [Remote closed the connection]
kinners has joined #ocaml
cjohnson has quit [Read error: 54 (Connection reset by peer)]
ne1 has quit ["To understand recursion, you must first understand recursion."]
vezenchio has quit ["look at you, hacker, a pathetic creature of meat and bone, panting and sweating as you run through my corridors; how can you ]
DamnSmall has joined #ocaml
<DamnSmall> @5f40
<DamnSmall> ............
DamnSmall has quit [Client Quit]
sproctor has joined #ocaml
segphault is now known as seg|sleep
Anvil_Vapre has quit [Client Quit]
mrsolo_ has joined #ocaml
mrsolo has quit [Read error: 104 (Connection reset by peer)]
sproctor has quit ["Download Gaim: http://gaim.sourceforge.net/"]
sproctor has joined #ocaml
sproctor has quit ["Download Gaim: http://gaim.sourceforge.net/"]
kinners has quit [Read error: 113 (No route to host)]
mrsolo_ has quit [Read error: 60 (Operation timed out)]
bk_ has joined #ocaml
shawn has joined #ocaml
Demitar has quit [Read error: 104 (Connection reset by peer)]
Demitar has joined #ocaml
noss has joined #ocaml
tyler has joined #ocaml
sundeep has joined #ocaml
Snark has joined #ocaml
<Snark> slt
urz has joined #ocaml
<urz> hi
<urz> i need help
<Snark> urz: you're on irc: don't ask to ask
<urz> i want to use a varient type in another module but it says "Unbound constructor"
<urz> do i need to use some kind of "import" or "use" or "include" or something?
<urz> he constructor is Welcome
<urz> should i say module.Welcome
<urz> ?
<mellum> urz: yes
<urz> is there away to put it into the current namespace?
<mellum> or rather, Module.Welcome
<mellum> urz: probably, but I'd advise against that. It helps a lot if you always know unqualified identifiers must be from the current module.
sundeep has quit [Client Quit]
sundeep has joined #ocaml
sdf223 has joined #ocaml
sdf223 has quit [Client Quit]
gim has joined #ocaml
<Demitar> urz, you could "open Module" but that puts all identifiers in the current namespace and is generally bad practice. If it is really a hassle you might want to consider using polymorphic variants.
<urz> thanks
<urz> theres no open Module.blah eh?
<urz> heh
urz has quit ["No windows for this server"]
bk_ has quit ["Leaving IRC - dircproxy 1.1.0"]
trch has quit ["Client exiting"]
__DL__ has joined #ocaml
Riastradh has quit [Read error: 60 (Operation timed out)]
mattam_ has joined #ocaml
mattam has quit [Read error: 110 (Connection timed out)]
kosmikus|away is now known as kosmikus
Axioplase has joined #ocaml
<Axioplase> Chat Lu!
Riastradh has joined #ocaml
arnowa__ has joined #ocaml
arnowa_ has quit [Read error: 110 (Connection timed out)]
__DL__ has quit ["Bye Bye"]
lowks has joined #ocaml
<lowks> can i do a 'open Tk;;' from the interactive ?
phj has joined #ocaml
<phj> Which development tools of cygwin should be installed for ocaml windows developing envrioment?
<phj> I'm using native win32 port built with Mingw.
<sundeep> phj: there is a 'native windows port based on microsoft tool chain' at http://caml.inria.fr/ocaml/distrib.html
<phj> sundeep: but it need ms VC compiler to compile files into *.exe file
<phj> that's the reason why I use Mingw port
<sundeep> ok
bk_ has joined #ocaml
<Demitar> lowks, yes, but remember to -I the tk lib and #load and #use the relevant .cma
<lowks> Demitar: load ?
<lowks> Demitar: load #lablgtk ?
<lowks> Cannot load required shared library: dynamic loading not supported on this platform.
<lowks> oh man
<bk_> not sure what you're trying to do but #load "lablgtk/lablgtk.cma" works here
<bk_> i suggest using findlib though
<lowks> bk_: findlib ?
<bk_> yes
<bk_> "findlib: O'Caml package manager"
cjohnson has joined #ocaml
demitar_ has joined #ocaml
Demitar has quit [Read error: 104 (Connection reset by peer)]
mattam_ is now known as mattam
Axioplase is now known as Axio|Fac
sproctor has joined #ocaml
seg|sleep is now known as segphault
JaffaCake has joined #ocaml
<JaffaCake> is there anyone here who can answer a couple of questions about calling C from ocaml, in particular with respect to threads?
<Banana> JaffaCake: yes ? (at least I can try to answer :) )
<JaffaCake> right, here goes... so if I want to call a foreign function that might block, I have to wrap it in enter_blocking_section()/leave_blocking_section(), right?
<Banana> yes.
<JaffaCake> and this only works when using native threads
<Banana> you mean your enter/leave_blocking_section are on the C side ?
<JaffaCake> yes
<Banana> so they acquire a lock on entering and release it on leaving.
<Banana> and the lock is a data in the C world.
<JaffaCake> the other way around, I think: enter_blocking_section() releases the lock on the caml system
<JaffaCake> so that another thread can run while the call is in progress
<Banana> imho you should handle thread only in one side.
<Banana> (the ocaml would be the best).
<Banana> you can lock in the ocaml code then call your C function.
<JaffaCake> no, I have a multithreaded caml program that needs to call a C function that blocks
<Banana> yes.
<JaffaCake> and the other caml threads have to continue
<Banana> then call this function in a separate thread.
<JaffaCake> yes... but it looks like in order to release the lock, you have to call enter/leave_blocking_section() around the call
<JaffaCake> otherwise all the other threads are blocked during the call
<Banana> hum...
<JaffaCake> looking at the source code for Unix.read and friends
<JaffaCake> that's what they do
<JaffaCake> anyway, you don't have to tell me, I'm a Haskell spy after all ;)
<Banana> ha ha.
<Banana> does your C function blocks because of eg waiting for an input or because it has to wait for another lock to be released by another thread ?
<JaffaCake> blocks on IO
<Banana> then you start it in a separate thread, other threads that needs the input data are of course waiting and threads that have nothing to do with it run concurrently...
<Banana> i don't see the problem.
<Banana> when you call leave_blocking_section(), threads waiting for the data will go on.
<JaffaCake> yes, I get that bit
<JaffaCake> but you *must* call enter_blocking_section() before calling the C function
<JaffaCake> and leave_blocking_section() afterward
<Banana> yes of course.
<JaffaCake> right, now what if the C function makes a callback to ocaml?
<JaffaCake> it needs to call leave_blocking_section() first, right/
<JaffaCake> ?
<Banana> i don't see why.
<mellum> JaffaCake: you are *really* desperate for debugging nightmares, aren't you?
<JaffaCake> mmm, not really, just wondering how ocaml handles this stuff
<Banana> i guess your enter_blocking section is just an Mutex.lock m where m is global variable containing a mutex.
<JaffaCake> it's not *my* enter_blocking_section(), it's part of the ocaml runtime
<Banana> ?
<Banana> where is it defined ?
<JaffaCake> otherlibs/systhreads/posix.c
<JaffaCake> and asmrun/signals.c
<JaffaCake> and look for an example of its use in otherlibs/unix/read.c
<Banana> I don't think you are supposed to call them.
<JaffaCake> ok... so my question is then how do I make a call to a blocking C function, without blocking the other ocaml threads?
<Banana> your C function (blocking or not) is defined in the Ocaml side by an external definition right ?
<JaffaCake> yep
<Banana> then juste create a thread with it.
<Banana> let mythread =Thread.create (f) (data)
<JaffaCake> hmm, I don't think that works
<Banana> why not ?
<JaffaCake> I'll get back to you
* JaffaCake thinks he better actually try it, rather than just read the ocaml source code :)
<Banana> JaffaCake: just a thing...
<Banana> if you need to guard your function then uses the Mutex module.
<Banana> in the ocaml side.
<JaffaCake> ok, thanks
<Banana> bbl.
* Banana is out buying a new keyboard.
lowks has quit [Read error: 104 (Connection reset by peer)]
sproctor has quit ["Download Gaim: http://gaim.sourceforge.net/"]
<phj> where can I download ocamlodbc ?
<mattam> haven't checked though
phj has quit [Read error: 104 (Connection reset by peer)]
vezenchio has joined #ocaml
bk_ has quit ["Leaving IRC - dircproxy 1.1.0"]
bk_ has joined #ocaml
kosmikus is now known as kosmikus|away
monotonom has joined #ocaml
Submarine has joined #ocaml
dobrek has joined #ocaml
Hipo has quit ["leaving"]
gzl has quit [Read error: 60 (Operation timed out)]
gzl has joined #ocaml
<Snark> good night
Snark has left #ocaml []
Axio|Fac is now known as Axioplase
dobrek has quit [Read error: 54 (Connection reset by peer)]
dobrek has joined #ocaml
dobrek has left #ocaml []
dobrek has joined #ocaml
bk_ has quit ["Leaving IRC - dircproxy 1.1.0"]
sproctor has joined #ocaml
demitar_ has quit [Read error: 104 (Connection reset by peer)]
demitar_ has joined #ocaml
rox has quit [Connection timed out]
<dobrek> hi:
<dobrek> why this two :
<dobrek> let module ColAccAlgs = ( Acc.Algorithms )( ColAccImpl ) in
<dobrek> ColAccAlgs.fold_right sqAcc print 0;;
<dobrek> (Acc.Algorithms)(ColAccImpl).fold_right sqAcc print 0 ;;
<dobrek> are not interchengable ?
Lemmih has joined #ocaml
monotonom has quit ["Don't talk to those who talk to themselves."]
ne1 has joined #ocaml
<Submarine> what do you mean "not interchangeable"?
<Submarine> ah, the second is illegal syntax?
<Submarine> OCaml has a somewhat simplistic view of modules whereas all symbols should be mapped to absolute paths, if I'm not mistaken.
<Riastradh> Because (Acc.Algorithms)(CoreAccImpl) is not a normal OCaml expression.
<dobrek> Submarine: I would like not to have to define this ColAccAlgs
<Submarine> So any type or term should be mappable to a unique path.
<dobrek> Riastradh: I know I cannot compile it :))
<Submarine> That's because, for instance, OCaml distinguishes two distinct abstract types by their paths.
<Submarine> If you do:
<Submarine> module M1 = A(B)
<Submarine> module M2=A(B)
<Submarine> and A(X) contains some abstract type t
<Submarine> then I suspect that M1.t and M2.t are distinct.
<Submarine> You may consider using the let module ... in construct.
<dobrek> Submarine: I know I read this modular moduel system paper of Xavier. But I was trying not to use this let module ... in. Now I think I get why I have to but I am not quite shure.
<dobrek> I mean I think I know why I have to "use let... in construct ". And don't bother I am not quite shure :))
<Submarine> dobrek: Well, you now understand why Judicael Courant was unhappy about this module system.
rox has joined #ocaml
<Submarine> There are other reasons why there cannot be transparential reference to modules.
<Submarine> For instance, module instanciating has side effects.
<dobrek> Submarine: Do you know any paper where it is disscussed in more detailes. I mean mainly the drawbacks of this system ?
<Submarine> Not off the top of my hand. I suspect that Xavier has a bibliography online.
<Submarine> head, not hand
Submarine has left #ocaml []
<dobrek> I am pretty new to ocaml anyway. I see I have to read a bit more. Thanks anyway.
noss has left #ocaml []
dobrek has quit ["( (point * ) dobrek ) ++"]
Bunny_351 has joined #ocaml
Bunny_351 has quit ["ChatZilla 0.9.52B [Mozilla rv:1.6/20040113]"]