adrien changed the topic of #ocaml to: Discussions about the OCaml programming language | http://www.ocaml.org | OCaml 4.02.2 announced http://ocaml.org/releases/4.02.html | Try OCaml in your browser: http://try.ocamlpro.com | Public channel logs at http://irclog.whitequark.org/ocaml
tennix has quit [Ping timeout: 250 seconds]
<zozozo> haesbaert: it has to be a module, but that module can have only one value which is a list
<zozozo> or you can simmply make a function which take a list as argument, and returns a record of functions
<haesbaert> hmm that would do, I'm struggling with something else actually, I thought of that as a work around
<haesbaert> basically I have a module SERVER, which takes a module INTERFACE
<haesbaert> leme paste
<haesbaert> is there anyway to pass an "INTERFACE.t" list to create ?
<haesbaert> leme paste the rest
<zozozo> don't think so, if you have a concrete module M that implements Interface, then you can use M.t
<haesbaert> but can I pass the type ?
<zozozo> otherwise, what you need is in the interface of server, define a type 'interface', use that in the type of create
<zozozo> and then build a functor that takes a module of type INTERFACE to return a module of type Server with Server.interface = Interface.t
<haesbaert> I think I'm missing that last step
<haesbaert> let me paste it all
<zozozo> actually, the signatures as they are are fine (sorry I read a bit too fast before)
<haesbaert> something like this: http://codepad.org/rPL0qYdW
<haesbaert> Error: This expression has type I.t list
<haesbaert> but an expression was expected of type D.interface list
<haesbaert> Type I.t is not compatible with type
<haesbaert> D.interface = Dhcp_server.Make(I).interface
<haesbaert> this is what I ge
<zozozo> what does Dhcp_server.Make look like ?
<haesbaert> module Make (I : S.INTERFACE) : S.SERVER = struct
<haesbaert> module C = Config.Make (I) open C open Lwt open Dhcp
<haesbaert> type interface = I.t
<haesbaert> ...
<haesbaert> I think this type interface = I.t doesn't do what I want
<zozozo> in the signature of Dhcp_server.Make, you should have something that looks like : module Make(I : INTERFACE) : S.SERVER with type interface = I.t
<zozozo> if you don't specify in the interface that there is some relation between I.t and S.interface, then the compiler does not know anything about S.interface
<haesbaert> ok it builds if I still keep the type interface = I.t
<haesbaert> I have this now:
<haesbaert> module Make (I : S.INTERFACE) : S.SERVER with type interface = I.t = struct module C = Config.Make (I) open C open Lwt open Dhcp
<haesbaert> type interface = I.t
<haesbaert> is it normal to have both "with type interface" and "type interface = I.t" ?
<haesbaert> Error: This expression has type I.t list
<haesbaert> but an expression was expected of type D.interface list
<haesbaert> Type I.t is not compatible with type
<haesbaert> D.interface = Dhcp_server.Make(I).interface
<haesbaert> still no luck, but the error changed, so something happened
<zozozo> yes : one the one hand, in the body of the module you have to declare the interface type, then in the signature of the module (which is all that is visible from the outside), you have to specify that interface is not juste some abstract type but that there is a relation between it and the type I.t
<haesbaert> I see
<zozozo> could you paste the entire code ?
<haesbaert> sure, it's a bit messy, 1s
Algebr` has quit [Remote host closed the connection]
claudiuc_ has joined #ocaml
<haesbaert> the call is in line 135
<haesbaert> module D gets created at line 127
claudiuc has quit [Ping timeout: 244 seconds]
<zozozo> hm.. strange, is there is dhcp_server.mli somewhere ?
<haesbaert> arghh my bad, forgot to paste
sgnb`` has joined #ocaml
<haesbaert> module Make (I : S.INTERFACE) : S.SERVER
sgnb` has quit [Read error: Connection reset by peer]
<haesbaert> that's all it has in dhcp_server.mli
<haesbaert> module Make (I : S.INTERFACE) : S.SERVER
<zozozo> well there's the problem
<haesbaert> I need the same annotation ?
<zozozo> actually, you only need it in the mli, in the ml file you can simply write : module Make(I : INTERFACE) = struct ... end
<haesbaert> OMG IT WORKS
<haesbaert> thank you so much :D
<zozozo> np
<haesbaert> I'm on my 6th hour trying to figure this out
<haesbaert> just so that I get this, the "with type x = y"
agocorona has quit [Ping timeout: 246 seconds]
<haesbaert> what does it mean exactly ? type x behaves like y ?
<haesbaert> or x is compatible with y
<haesbaert> ?
<zozozo> it specifies that the two types are equal
<zozozo> and so, when you type check, says a function application, you have on the one hand, an argument of type x (for instance), and a function which takes an argument of type y, and you want to chekc that x and y are the same type, well that equation, x = y helps
<zozozo> sorry for the typos
<haesbaert> I think I get it, I can't digest it all to be honest
<haesbaert> I was reading the manual and I actually tried the with type interface = I.t, but I missed the type interface = I.t on the body
<zozozo> then, ocaml should have complained that some declaration was missing, no ?
<haesbaert> it did, but then I assumed I was doing something wrong with the with type
<haesbaert> as in, "with..." is not what I wanted
<zozozo> i see
<zozozo> by the way, in dhcp_server.Make, doing open C open Lwt .. is, well not bad, but not as clean as one could expect, particularly if you only use some values from these modules
<haesbaert> the file is much bigger actually and I was using in every function
<zozozo> ok, but still, opening modules like that is considered bad pratice from some people in the community, with preference to local opens, or even fully qualifying every value you use
<zozozo> s/from/by
<haesbaert> ack, I can change, the Lwt should be totally fine, the C is a bit painfull
<zozozo> as it may shadow identifiers that you did not expect to be shadowed, but then again, it's actually juste a question of coding style
<zozozo> *just
<haesbaert> that's important to know actually, I'll change it back
<haesbaert> I still don't have the feeling for most idioms
<haesbaert> been doing ocaml for 4months now
thomasga has joined #ocaml
<zozozo> well, I'd say your code is already much more complex than what I was writing after 4 months of ocaml, :p
<haesbaert> oh well, I broke my bike, so nothing to do :P
<zozozo> ^^
claudiuc_ has quit [Remote host closed the connection]
struktured has joined #ocaml
Guest38 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Guest38 has joined #ocaml
Guest38 has quit [Client Quit]
Guest38 has joined #ocaml
claudiuc has joined #ocaml
claudiuc_ has joined #ocaml
claudiuc has quit [Ping timeout: 244 seconds]
claudiuc_ has quit [Client Quit]
tennix has joined #ocaml
tibor has quit [Ping timeout: 246 seconds]
tennix has quit [Ping timeout: 264 seconds]
igoroliveira has quit [Quit: Connection closed for inactivity]
tennix has joined #ocaml
thomasga has quit [Quit: Leaving.]
MrScout has joined #ocaml
<Enjolras> haesbaert: you here ? nice !
<Enjolras> (if you are the same haesbaert as the ex openbsd dev luking on #dragonflybsd sometimes :))
bendiken has quit [Ping timeout: 250 seconds]
tennix has quit [Ping timeout: 265 seconds]
samrat has joined #ocaml
BitPuffin|osx has quit [Ping timeout: 250 seconds]
Algebr has joined #ocaml
Dzyan has joined #ocaml
sous-chef has joined #ocaml
sous-chef has quit []
Rebelion has quit [Ping timeout: 260 seconds]
ygrek_ has quit [Ping timeout: 260 seconds]
Algebr has quit [Ping timeout: 244 seconds]
psy_ has quit [Ping timeout: 240 seconds]
Algebr has joined #ocaml
samrat has quit [Ping timeout: 245 seconds]
nullcatxxx_ has joined #ocaml
Algebr has quit [Ping timeout: 244 seconds]
ygrek has joined #ocaml
darkf has joined #ocaml
ygrek has quit [Ping timeout: 255 seconds]
samrat has joined #ocaml
nullcatxxx_ has quit [Max SendQ exceeded]
nullcatxxx_ has joined #ocaml
MrScout has quit [Ping timeout: 246 seconds]
Guest38 has quit [Ping timeout: 250 seconds]
psy has joined #ocaml
ggole has joined #ocaml
Dzyan has quit [Ping timeout: 250 seconds]
Dzyan has joined #ocaml
Dzyan has quit [Client Quit]
nullcatxxx_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
samrat has quit [Ping timeout: 264 seconds]
tmtwd has joined #ocaml
psy has quit [Disconnected by services]
keen___________6 has quit [Read error: Connection reset by peer]
keen___________6 has joined #ocaml
samrat has joined #ocaml
Submarine has quit [Remote host closed the connection]
shinnya has quit [Ping timeout: 250 seconds]
samrat has quit [Ping timeout: 265 seconds]
samrat has joined #ocaml
Simn has joined #ocaml
tmtwd has quit [Ping timeout: 252 seconds]
ygrek has joined #ocaml
igitoor has quit [Ping timeout: 244 seconds]
kolko has quit [Ping timeout: 265 seconds]
kolko has joined #ocaml
igitoor has joined #ocaml
igitoor has joined #ocaml
igitoor has quit [Changing host]
grouzen has joined #ocaml
grouzen has quit [Ping timeout: 255 seconds]
samrat has quit [Ping timeout: 272 seconds]
MercurialAlchemi has joined #ocaml
kolko has quit [Quit: ZNC - http://znc.in]
samrat has joined #ocaml
kolko has joined #ocaml
tennix has joined #ocaml
sqweek has quit [Read error: Connection reset by peer]
sqweek has joined #ocaml
jteg has quit [Quit: Page closed]
contempt has quit [Ping timeout: 256 seconds]
contempt has joined #ocaml
xificurC has joined #ocaml
xificurC has quit [Remote host closed the connection]
psy_ has joined #ocaml
samrat has quit [Ping timeout: 264 seconds]
MercurialAlchemi has quit [Ping timeout: 250 seconds]
yaewa has joined #ocaml
moei has quit [Ping timeout: 246 seconds]
ggole has quit [Read error: Connection reset by peer]
sqweek has quit [Read error: Connection reset by peer]
mort___ has joined #ocaml
sqweek has joined #ocaml
jpdeplaix has quit [Ping timeout: 246 seconds]
ggole has joined #ocaml
ollehar has joined #ocaml
thomasga has joined #ocaml
mort___ has quit [Quit: Leaving.]
raichoo has joined #ocaml
samrat has joined #ocaml
samrat has quit [Ping timeout: 240 seconds]
ollehar1 has joined #ocaml
samrat has joined #ocaml
ollehar has quit [Ping timeout: 272 seconds]
ollehar1 is now known as ollehar
tane has joined #ocaml
ollehar1 has joined #ocaml
ygrek has quit [Ping timeout: 246 seconds]
ollehar has quit [Ping timeout: 260 seconds]
ollehar1 is now known as ollehar
jbrown has joined #ocaml
ollehar1 has joined #ocaml
ollehar has quit [Ping timeout: 250 seconds]
ollehar1 is now known as ollehar
kakadu has joined #ocaml
ollehar has quit [Read error: Connection reset by peer]
ollehar has joined #ocaml
ollehar has quit [Ping timeout: 245 seconds]
samrat has quit [Ping timeout: 240 seconds]
samrat has joined #ocaml
samrat has quit [Ping timeout: 245 seconds]
Anarchos has joined #ocaml
Anarchos has quit [Quit: Vision[0.9.7-H-20140108]: i've been blurred!]
yomimono has joined #ocaml
Anarchos has joined #ocaml
samrat has joined #ocaml
keen___________7 has joined #ocaml
keen___________6 has quit [Ping timeout: 260 seconds]
jbrown has quit [Remote host closed the connection]
grouzen has joined #ocaml
ollehar has joined #ocaml
ollehar has quit [Ping timeout: 272 seconds]
ollehar has joined #ocaml
Haudegen has quit [Ping timeout: 260 seconds]
johnf_ has quit [Read error: Connection reset by peer]
ollehar has quit [Ping timeout: 240 seconds]
Haudegen has joined #ocaml
yaewa has quit [Quit: Leaving...]
moei has joined #ocaml
larhat has joined #ocaml
ollehar has joined #ocaml
Anarchos has quit [Quit: Vision[0.9.7-H-20140108]: i've been blurred!]
ollehar has quit [Read error: Connection reset by peer]
ollehar has joined #ocaml
klj has quit [Read error: Connection reset by peer]
yomimono has quit [Ping timeout: 260 seconds]
lobo has joined #ocaml
ollehar1 has joined #ocaml
ollehar has quit [Ping timeout: 246 seconds]
ollehar1 is now known as ollehar
ollehar1 has joined #ocaml
ollehar has quit [Ping timeout: 256 seconds]
ollehar1 is now known as ollehar
theblatte has quit [Ping timeout: 250 seconds]
ollehar1 has joined #ocaml
ollehar has quit [Ping timeout: 246 seconds]
BitPuffin|osx has joined #ocaml
ollehar1 has quit [Ping timeout: 264 seconds]
samrat has quit [Ping timeout: 244 seconds]
ollehar has joined #ocaml
raichoo has quit [Ping timeout: 246 seconds]
samrat has joined #ocaml
samrat has quit [Ping timeout: 260 seconds]
raichoo has joined #ocaml
BitPuffin|osx has quit [*.net *.split]
contempt has quit [*.net *.split]
jerith has quit [*.net *.split]
jerith has joined #ocaml
grouzen has quit [Ping timeout: 240 seconds]
contempt has joined #ocaml
BitPuffin|osx has joined #ocaml
cross has quit [*.net *.split]
lambdahands has quit [*.net *.split]
jave has quit [*.net *.split]
chris2 has quit [*.net *.split]
companion_cube has quit [*.net *.split]
Cypi has quit [*.net *.split]
flx has quit [*.net *.split]
vishesh has quit [*.net *.split]
Cypi has joined #ocaml
companion_cube has joined #ocaml
flxx has joined #ocaml
vishesh has joined #ocaml
chris2 has joined #ocaml
Anarchos has joined #ocaml
jave has joined #ocaml
ollehar has quit [Ping timeout: 265 seconds]
ollehar has joined #ocaml
lambdahands has joined #ocaml
cross has joined #ocaml
tane has quit [Quit: Verlassend]
zpe has joined #ocaml
raichoo1 has joined #ocaml
raichoo has quit [Ping timeout: 240 seconds]
ollehar1 has joined #ocaml
ollehar has quit [Ping timeout: 246 seconds]
ollehar1 is now known as ollehar
Anarchos has quit [Quit: Vision[0.9.7-H-20140108]: i've been blurred!]
ollehar1 has joined #ocaml
ollehar1 has quit [Client Quit]
ollehar has quit [Ping timeout: 260 seconds]
mcclurmc_ has joined #ocaml
mcclurmc has quit [Ping timeout: 250 seconds]
kushal has joined #ocaml
thomasga has quit [Quit: Leaving.]
zpe has quit [Remote host closed the connection]
raichoo1 has quit [Ping timeout: 240 seconds]
mort___ has joined #ocaml
creichert has joined #ocaml
MercurialAlchemi has joined #ocaml
raichoo has joined #ocaml
zaquest has quit [Quit: Leaving]
contempt has quit [Ping timeout: 252 seconds]
contempt has joined #ocaml
mort___ has quit [Quit: Leaving.]
zaquest has joined #ocaml
mcclurmc_ has quit [Remote host closed the connection]
pyon has quit [Quit: brb]
pyon has joined #ocaml
Algebr has joined #ocaml
pyon has quit [Quit: brb]
pyon has joined #ocaml
tmtwd has joined #ocaml
lolisa has joined #ocaml
pyx has joined #ocaml
pyx has quit [Client Quit]
mcclurmc has joined #ocaml
johnf has joined #ocaml
Algebr has quit [Ping timeout: 244 seconds]
larhat has quit [Quit: Leaving.]
samrat has joined #ocaml
Algebr has joined #ocaml
tane has joined #ocaml
ingsoc has joined #ocaml
smtb has joined #ocaml
* smtb slaps smtb around a bit with a large fishbot
<Algebr> Are there any extra concerns if you use Lwt on a C binding based library
jpdeplaix1 has joined #ocaml
jpdeplaix1 is now known as jpdeplaix
grouzen has joined #ocaml
johnf has quit [Read error: Connection reset by peer]
MrScout has joined #ocaml
kakadu has quit [Quit: Page closed]
<Enjolras> Algebr: not really, but if you make blocking calls from C, it will block all the threads
jpdeplaix has quit [Quit: WeeChat 1.2]
Haudegen has quit [Ping timeout: 272 seconds]
Haudegen has joined #ocaml
samrat has quit [Ping timeout: 240 seconds]
johnf has joined #ocaml
tmtwd has quit [Ping timeout: 256 seconds]
samrat has joined #ocaml
<smtb> Any Eliom users here that are familiar with eref scope?
MrScout has quit [Ping timeout: 246 seconds]
mcclurmc has quit [Remote host closed the connection]
jpdeplaix has joined #ocaml
kushal has quit [Quit: Leaving]
johnf has quit [Read error: Connection reset by peer]
lolisa has quit [Ping timeout: 246 seconds]
smtb has quit [Quit: Page closed]
lolisa has joined #ocaml
rand000 has joined #ocaml
<Algebr> I want to change an option that is usually in _tags but I want to keep oasis setup dynamic usage, are these mutally exclusive
Anarchos has joined #ocaml
<companion_cube> you can write a _tags file with # OASIS_START # OASIS_STOP lines at the beginnin
<companion_cube> g
lolisa has quit [Ping timeout: 272 seconds]
rgrinberg has joined #ocaml
<MercurialAlchemi> this makes me think, how usable is assemblage these days?
<companion_cube> not yet ready, I think
<companion_cube> look at the list of open issues
kakadu has joined #ocaml
<Algebr> What do you put in the _tags file to say don't worry about leftover build files in a directory
<companion_cube> no_hygiene, I think
sqweek has quit [Ping timeout: 250 seconds]
sqweek has joined #ocaml
tane has quit [Ping timeout: 244 seconds]
pyon has quit [Quit: fix config]
ingsoc has quit [Read error: Connection reset by peer]
hbar has quit [Ping timeout: 240 seconds]
<Algebr> How do you tell oasis/_tags to statically link?
pyon has joined #ocaml
<companion_cube> I'm not sure you can totally link statically
<companion_cube> there is -static somewhere in OCaml
<Algebr> I am writing c bindings and I want the C library completely statically linked..
<companion_cube> :s
pyon has quit [Quit: fix config]
<dsheets> ... use the .a?
pyon has joined #ocaml
tane has joined #ocaml
mort___ has joined #ocaml
samrat has quit [Ping timeout: 255 seconds]
Submarine has joined #ocaml
<adrien> boooooo static linking
<adrien> bad bad
darkf has quit [Quit: Leaving]
<Enjolras> Algebr: do you use ctypes or plain old stubs ?
<Algebr> I guess my problem is orthogonal to the issue, I'm getting undefined symbols errors when I'm trying to use my package invoked via ocamlfind ocamlopt
<Algebr> plain old stubs
<adrien> show the code
<Algebr> but it works fine via ocamlfind ocamlc
<Enjolras> i don't know then
<adrien> hmpf, my firefox is still being unswapped back to RAM =/
<adrien> (compiled boost...)
<adrien> btw, nicoo ^
<adrien> mac os x ='(
<adrien> Algebr: can you pastebin a log of the build?
MrScout has joined #ocaml
ggole has quit []
<adrien> Algebr: and does a bytecode test program work?
<adrien> in any case it seems fine to me =/
<Algebr> bytecode works
<Algebr> okay I'm an idiot, I named the package the same as the c library.
<Algebr> fixed.
sz0 has joined #ocaml
Algebr has quit [Ping timeout: 252 seconds]
darius93 has quit [Quit: Bye bye now :)]
darius93 has joined #ocaml
mcclurmc has joined #ocaml
mcclurmc has quit [Remote host closed the connection]
mcclurmc has joined #ocaml
sz0_ has joined #ocaml
sz0_ has quit [Client Quit]
mcclurmc has quit [Remote host closed the connection]
Anarchos has quit [Quit: Vision[0.9.7-H-20140108]: i've been blurred!]
sz0 has quit [Quit: Bye.]
sz0_ has joined #ocaml
sz0_ has quit [Client Quit]
sz0 has joined #ocaml
Algebr has joined #ocaml
ygrek has joined #ocaml
mcclurmc has joined #ocaml
Submarine has quit [Remote host closed the connection]
tmtwd has joined #ocaml
MrScout has quit [Remote host closed the connection]
mcclurmc has quit [Remote host closed the connection]
mcclurmc has joined #ocaml
shinnya has joined #ocaml
rgrinberg has quit [Quit: Connection closed for inactivity]
MercurialAlchemi has quit [Ping timeout: 256 seconds]
tane has quit [Quit: Verlassend]
ygrek has quit [Ping timeout: 250 seconds]
mcc has joined #ocaml
<mcc> So, I have a question. I am implementing a profiler in my programming language interpreter. It is easy for me to gather information. However, I then have to write it out somehow.
ygrek has joined #ocaml
<mcc> I expect if I write to a file, that this will change the performance characteristics of the program and probably also implicitly generate garbage. If I simply store the data until program exit, on the other hand, this will mean constant allocations and will trigger collections. Collections are one of the things I'd like my simple profiler to check.
<mcc> What would you imagine to be the lowest-impact way to record this information?
mort___ has quit [Quit: Leaving.]
Simn has quit [Read error: Connection reset by peer]
lolisa has joined #ocaml
<dsheets> mcc, write a ctypes interface to a minimal set of malloc'ing c routines
<mcc> hm. that does make sense
<Algebr> writing c stubs, trying to free a C pointer that OCaml side also knows about, was created with Abtract_tag, then back in C side its not a null pointer but when I try to free it I get a seg fault....does this mean GC issues?
<dsheets> or pre-allocate a huge bigarray
<dsheets> and then mutate it
<mcc> Bigarray is different from array?
<dsheets> you could also check out how libraries like core_bench avoid gc in their statistics code
<dsheets> err statistics collection
larhat has joined #ocaml
<mcc> dsheets thank you very much
* mcc stares blankly
<mcc> Gc.stat.major_words and Gc.stat.minor_words are floats
<mcc> ...how
<mcc> ...byte allocations…?
cdidd has quit [Ping timeout: 264 seconds]
<adrien> mcc: larger values this way
Kwhy_Not has joined #ocaml
<mcc> oh. i see *_*
Kwhy_Not has left #ocaml [#ocaml]
apache2_ is now known as apache2
Algebr has quit [Ping timeout: 256 seconds]
cdidd has joined #ocaml
nullcatxxx_ has joined #ocaml
nullcatxxx_ has quit [Client Quit]
mcclurmc has quit [Remote host closed the connection]
nullcatxxx_ has joined #ocaml
Algebr has joined #ocaml
nullcatxxx_ has quit [Client Quit]
mcclurmc has joined #ocaml
mea-culp` is now known as mea-culpa
mcclurmc has quit [Ping timeout: 265 seconds]
larhat has quit [Quit: Leaving.]
rand000 has quit [Quit: leaving]
madroach has quit [Ping timeout: 264 seconds]
mcclurmc has joined #ocaml
mea-culp` has joined #ocaml
madroach has joined #ocaml
mea-culpa has quit [Ping timeout: 246 seconds]
mcclurmc has quit [Ping timeout: 256 seconds]
mea-culp` has quit [Remote host closed the connection]
moei has quit [Read error: Connection reset by peer]
moei has joined #ocaml