`Jake` has quit [Remote host closed the connection]
datkin has quit [Read error: Connection reset by peer]
iago has quit [Quit: Leaving]
lucesco has joined #ocaml
lucesco has left #ocaml []
lucesco has joined #ocaml
lucesco has left #ocaml []
Tobu has quit [Ping timeout: 272 seconds]
Tobu has joined #ocaml
michael_alex has quit [Ping timeout: 246 seconds]
Tobu has quit [Remote host closed the connection]
Tobu has joined #ocaml
Xizor has quit []
Tobu has quit [Remote host closed the connection]
Tobu has joined #ocaml
yezariaely has quit [Quit: leaving]
cdidd has joined #ocaml
yroeht has quit [Ping timeout: 244 seconds]
yroeht has joined #ocaml
jimmyrcom has quit [Ping timeout: 260 seconds]
ulfdoz has joined #ocaml
Tobu has quit [Ping timeout: 260 seconds]
Tobu has joined #ocaml
ulfdoz has quit [Ping timeout: 264 seconds]
Submarine has joined #ocaml
Submarine has quit [Changing host]
Submarine has joined #ocaml
andreypo_ has quit [Quit: Quit]
Tobu has quit [Ping timeout: 260 seconds]
pango is now known as pangoafk
Tobu has joined #ocaml
silver has joined #ocaml
albacker has joined #ocaml
albacker has quit [Changing host]
albacker has joined #ocaml
albacker has quit [Quit: Leaving]
ftrvxmtrx has quit [Quit: Leaving]
tomprince has quit [Read error: Operation timed out]
<adrien>
hi
tomprince has joined #ocaml
Tobu has quit [Ping timeout: 260 seconds]
ftrvxmtrx has joined #ocaml
osa1 has joined #ocaml
osa1 has left #ocaml []
djcoin has joined #ocaml
jonathandav has quit [Read error: Connection reset by peer]
mcclurmc_ has quit [Read error: Connection reset by peer]
jonathandav has joined #ocaml
cago has joined #ocaml
rixed has quit [Quit: "box crashed"]
rby has quit [Read error: Connection reset by peer]
rby has joined #ocaml
Kakadu has joined #ocaml
protz has joined #ocaml
Tobu has joined #ocaml
<larsrh>
I have a 'module type' which requires some values in the signature. Now I want to implement a function using a module of such a type, and this function can be used by implementing modules. Is this possible?
<larsrh>
the problem is that I have multiple modules implementing a module type which require a certain utility function which is exactly the same for all modules
zcero has joined #ocaml
zcero has left #ocaml []
KDr2 has quit [Remote host closed the connection]
avsm has joined #ocaml
Tobu has quit [Ping timeout: 260 seconds]
Cyanure has joined #ocaml
<Kakadu>
larsrh: I think ot is possible but I can't generate good syntax now
<Kakadu>
try to look at the manual about first-class modules
|Lupin| has joined #ocaml
<|Lupin|>
Goodmorning, everybody.
<|Lupin|>
I have to write stub code to call from Caml a C function that takes as an argument a wchar_t *.
<|Lupin|>
I'm wondering which type could be used for encapsulaing this in Caml ?
<|Lupin|>
I realise that perhaps a tpe from Batteries would be good, but I'd like to know whether a type provided with the language could be used, so that the bindings do not depend on Batteries... ?
beckerb has quit [Read error: Operation timed out]
benozol has quit [Ping timeout: 260 seconds]
snearch has joined #ocaml
emmanuelux has joined #ocaml
zcero has joined #ocaml
zcero has left #ocaml []
jimmyrcom has joined #ocaml
emmanuelux has quit [Remote host closed the connection]
husten has quit [Remote host closed the connection]
husten has joined #ocaml
osa1 has joined #ocaml
osa1 has left #ocaml []
Submarine has joined #ocaml
Xizor has quit []
avsm has joined #ocaml
emmanuelux has joined #ocaml
Kakadu has quit [Quit: Page closed]
bjorkintosh has joined #ocaml
Submarine has quit [Ping timeout: 246 seconds]
<thelema_>
larsrh: module Utility = struct let common_f = ... end module M1 : T = struct include Util (* other stuff *) end
snearch has quit [Quit: Verlassend]
wicko has joined #ocaml
<wicko>
Hi all. Why can't constructors have labelled parameters, like functions can? I want to write something like: "type blah = Foo of ~a:int * ~b:int * ~c:int * ~d:int".
<thelema_>
wicko: type blah_foo = {a:int; b:int; c:int; d:int}
<thelema_>
wicko: type blah = Foo of blah_foo
<wicko>
hm. But then I can't use a,b,c or d anywhere else in my program, right?
<thelema_>
you can't use them as record names
<thelema_>
you can use them as identifiers
<wicko>
i see.
<wicko>
ok, thanks for your help.
wicko has quit [Quit: Page closed]
ftrvxmtrx has quit [Remote host closed the connection]
andreypopp has quit [Quit: Computer has gone to sleep.]
<pippijn>
jonafan: why grossed out?
<mrvn>
type ('a, 'b, 'c) cfl = NilF
<mrvn>
| ConsF of ('a -> 'e) * (('e, 'f, 'c) cfl) constraint 'b = 'e -> 'f;;
<mrvn>
Error: Constraints are not satisfied in this type.
<mrvn>
Type ('a, 'b, 'c) cfl should be an instance of ('d, 'e -> 'f, 'g) cfl
<mrvn>
Why doesn't that work?
lclark has joined #ocaml
<jonafan>
Well, I'm grossed out because debugging a complex js_of_ocaml script seems like it could be impossible
snearch has joined #ocaml
<pippijn>
jonafan: which is why you develop your application logic outside JS and just use JS for the frontend
<jonafan>
When I have to write javascript, I strive to make it readable, and this gives you 10k of crazy
<pippijn>
you could use -pretty
<pippijn>
but I doubt it helps
<jonafan>
But, I also think javascript is basically the worst thing ever and this seems like a good way to get away from it
<jonafan>
I'm not sure if javascript intentionally tries to pretend your broken code is fine or if that's just a consequence of poor design
<jonafan>
I think a language/interpreter should try to report problems as close to where they are in code as possible, and javascript utterly fails at this
<jonafan>
and ocaml does very well, which is really probably the main reason I like it
snearch has quit [Quit: Verlassend]
silver has quit [Remote host closed the connection]
Submarine has joined #ocaml
<hcarty>
Is it possible to replace ocamlbuild's -use-ocamlfind flag with something in _tags?
<pippijn>
you can make a myocamlbuild.ml and call ocamlfind in it
ftrvxmtrx has quit [Quit: Leaving]
<avsm>
which is what OASIS does
<hcarty>
pippijn: I was hoping to avoid a custom myocamlbuild.ml file. I can do everything else I need from _tags.
<hcarty>
Oh well, I suppose a few extra typed characters isn't that bad. Or a few extra characters in a Makefile
<pippijn>
hcarty: try oasis
krktz has quit [Ping timeout: 272 seconds]
krktz has joined #ocaml
cdidd has quit [Remote host closed the connection]
andreypopp has joined #ocaml
djcoin has quit [Quit: WeeChat 0.3.2]
ulfdoz has joined #ocaml
iago has quit [Ping timeout: 245 seconds]
Snark has joined #ocaml
mcclurmc_ has joined #ocaml
husten has quit [Quit: Konversation terminated!]
<thomasga>
anyone got a pure OCaml implementation of wget ?
albacker has joined #ocaml
albacker has quit [Changing host]
albacker has joined #ocaml
pangoafk is now known as pango
djcoin has joined #ocaml
ftrvxmtrx has joined #ocaml
<hcarty>
pippijn: This project is simple enough that a one-line _tags file is otherwise sufficient
Tobu has quit [Ping timeout: 272 seconds]
<hcarty>
Given that, I would like to avoid the added (admittedly minor) complication oasis adds until it would offer a sifnificant benefit
<pippijn>
I would add a makefile containing all: ; ocamlbuild -use-findlib foo.native
<pippijn>
because I'M used to typing "make"
metasyntax has quit [Quit: WeeChat [quit]]
<hcarty>
pippijn: That's likely what I will do, along with a clean target
<pippijn>
yes
<hcarty>
I could get away with a Makefile and no _tags if ocamlbuild supported findlib'd syntax extensions on the command line
<pippijn>
how does that look?
<hcarty>
In _tags: syntax(camlp4o), package(some-syntax)
<pippijn>
interesting
<pippijn>
you can do ocamlbuild -pp 'camlp4o some-syntax'
<pippijn>
which is what I did before I used _tags files
<pippijn>
hcarty: how does that syntax() package() stuff work?
<pippijn>
for sexplib?
<pippijn>
I tried this: <{ast,attributes,constant,platform}.ml>: syntax(camlp4o), package(type-conv/pa_type_conv.cma sexplib/pa_sexp_conv.cma)
<pippijn>
Warning: tag "syntax" does not expect a parameter, but is used with parameter "camlp4o"
<pippijn>
Warning: tag "package" does not expect a parameter, but is used with parameter "sexplib/pa_sexp_conv.cma"
<_andre>
is there anything special i need to do in _oasis to correctly create a package that has functions implemented in C?
<_andre>
i can use my uint library fine from the toplevel
<_andre>
# Uint64.to_int (Uint64.of_int 10);;
<_andre>
- : int = 10
<_andre>
but if i try to use a library that uses it i get "The external function `uint64_to_int' is not available"
<pippijn>
_andre: you just need to put the C files in CSources
<_andre>
i have that
<pippijn>
oh, and maybe you need to load the .dll or .so into the interpreter
<pippijn>
I don't know much about bytecode, I usually use native code
<hcarty>
_andre: I run into this sometimes and I can never remember the specifics of how to fix it... but I can use ZeroMQ + bitbucket's branch of uint from the toplevel.
<_andre>
hcarty: i can use uint fine from the toplevel too
<_andre>
this only happens when trying to use some other library that uses uint
<hcarty>
_andre: But I can use ZeroMQ directly, without referencing uint
<hcarty>
And the ZeroMQ bindings use uint
<_andre>
but it has a copy of the uint .c files in its sources
<_andre>
if i remove them and recompile i ge this:
<mrvn>
One problem I have with GADTs is that the type isn't interfered right a lot of the time. You have to write a type for get but print can be interfered.
<xenocons>
ah
<xenocons>
hmmm
<mrvn>
The thing is that the type of l depends on the type of k and that can't be interefred.
<xenocons>
what is the reason the type system sturggles to infer its type?
<xenocons>
ah
<mrvn>
don#t know why
<xenocons>
it seems (to me) to be something that should be infered
<mrvn>
one should at least be able to just type the variable, e.g. let rec get l (k : _ kind) = ...
<Drakken>
The constructors should be something like IntList of (int list) and FloatList of (float list)
<mrvn>
or (k : 'a . 'a kind) or something
<mrvn>
Drakken: That wouldn't be a GADT
<mrvn>
and not universal
<mrvn>
Drakken: The list is a list of ints and floats mixed together.
<xenocons>
. is an interesting choice for the operator
<mrvn>
xenocons: just like in 'a . 'a -> int
<mrvn>
# type r = { fn : 'a . 'a -> int; };;
<mrvn>
type r = { fn : 'a. 'a -> int; }
<mrvn>
Used to declare a polymorphic function in a record and a few other places.
<xenocons>
so not ('b -> 'c) -> ('a -> 'b) -> 'a -> 'c heh
<Drakken>
What's 4.0?
<mrvn>
Drakken: the next ocaml version that will come out
<xenocons>
actually, it should probably be more like (('a -> 'b) -> ('b -> 'c) -> 'a -> 'c) i guess