adrien changed the topic of #ocaml to: Discussions about the OCaml programming language | http://www.ocaml.org | OCaml 4.07.0 release notes: https://caml.inria.fr/pub/distrib/ocaml-4.07/notes/Changes | Try OCaml in your browser: http://try.ocamlpro.com | Public channel logs at http://irclog.whitequark.org/ocaml | Due to ongoing spam, you must register your nickname to talk on the channel
BitPuffin has quit [Remote host closed the connection]
Fare has quit [Ping timeout: 240 seconds]
wagle has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
wagle has joined #ocaml
spew has joined #ocaml
ben_ has quit [Remote host closed the connection]
ben_ has joined #ocaml
e-mail has joined #ocaml
e-mail has quit [Killed (Sigyn (Spam is off topic on freenode.))]
silver has joined #ocaml
Schroeder18 has joined #ocaml
Schroeder18 has quit [Killed (Sigyn (Spam is off topic on freenode.))]
spew has quit [Read error: Connection reset by peer]
ben_ has quit [Ping timeout: 244 seconds]
wagle has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
stephen8715 has joined #ocaml
stephen8715 has quit [Killed (Sigyn (Spam is off topic on freenode.))]
wagle has joined #ocaml
Haudegen has quit [Read error: Connection reset by peer]
wagle has quit [Client Quit]
wagle has joined #ocaml
wagle has quit [Client Quit]
wagle has joined #ocaml
mfp has quit [Ping timeout: 240 seconds]
silver has quit [Read error: Connection reset by peer]
loli has quit [Quit: WeeChat 2.2]
loli has joined #ocaml
Fare has joined #ocaml
usrX has joined #ocaml
usrX has quit [Killed (Sigyn (Spam is off topic on freenode.))]
__idiot__ has joined #ocaml
__idiot__ has quit [Killed (Sigyn (Spam is off topic on freenode.))]
pmn has joined #ocaml
pmn has quit [Killed (Sigyn (Spam is off topic on freenode.))]
tormen_ has joined #ocaml
caltelt has joined #ocaml
tormen has quit [Ping timeout: 240 seconds]
quipa has quit [Quit: Leaving]
beaky25 has joined #ocaml
beaky25 has quit [Killed (Sigyn (Spam is off topic on freenode.))]
cobreadmonster has joined #ocaml
ygrek has quit [Ping timeout: 244 seconds]
clog has quit [Ping timeout: 256 seconds]
jbrown has quit [Ping timeout: 240 seconds]
moei has quit [Quit: Leaving...]
bacam has quit [Quit: Lost terminal]
ben_ has joined #ocaml
banzaikitten5 has joined #ocaml
banzaikitten5 has quit [Killed (Sigyn (Spam is off topic on freenode.))]
ben_ has quit [Ping timeout: 240 seconds]
mbuf has joined #ocaml
L23512 has joined #ocaml
L23512 has quit [Killed (Sigyn (Spam is off topic on freenode.))]
caltelt has quit [Ping timeout: 240 seconds]
clog has joined #ocaml
cobreadmonster has quit [Quit: Connection closed for inactivity]
Fare has quit [Ping timeout: 240 seconds]
moei has joined #ocaml
noitakom1 has joined #ocaml
dakk has joined #ocaml
dakk has quit [K-Lined]
Khady has quit [Ping timeout: 248 seconds]
hph^ has joined #ocaml
sagotch has joined #ocaml
Khady has joined #ocaml
Khady has quit [Changing host]
Khady has joined #ocaml
ben_ has joined #ocaml
noitakom1 has quit [Ping timeout: 250 seconds]
ben_ has quit [Ping timeout: 256 seconds]
ben_ has joined #ocaml
ben_ has quit [Remote host closed the connection]
ben_ has joined #ocaml
channels has joined #ocaml
channels has quit [Killed (Sigyn (Spam is off topic on freenode.))]
<Ulrar> Hey, in case I have more luck here I'll try asking. I have this : "let module Store = Store(StoreConfig) in" which works fine in the function it's defined in, but I can't find any way to pass Store to another function or module, I always get "The module Store is a functor, not a structure"
<Ulrar> I can pass StoreConfig around and re-make Store everywhere, but that's annoying and it looks like I end up with a new store, not the same one so it doesn't really work
<Ulrar> What would be the correct way to pass Store to other functions or modules ?
zolk3ri has joined #ocaml
<octachron> the easiest way would be to stay at the module level. If you cannot, you need to use packed (aka "first-class") modules
ziyourenxiang has joined #ocaml
steenuil_ has left #ocaml [#ocaml]
steenuil has joined #ocaml
<steenuil> Ulrar: you should use the (module Store) syntax (with the parenthesis) to pass the locally bound Store module to another function
<steenuil> also I'd recommend renaming the Store functor to something more obvious like MakeStore, so you get better error messages
<Ulrar> I do use (module Store) to pass it, but the error I get is on the receiving function
<Ulrar> How would I write a function that wants a module Store ?
<steenuil> maybe you're using the wrong type signature
<Ulrar> I tried "let foo (module Store) () = ..."
<octachron> let f (module MakeStore: moduletype with ...) = ()
<steenuil> you shouldn't use module type of Store, you need the signature of the output of store
<Ulrar> Well Store is my own wrapper around another module
<Ulrar> It's just what's in store.ml
<octachron> you need to precise the packed module signature. Note that you can use type abbreviation to make it more ligthweight: "type mkstore = (module store)"
<Ulrar> I don't understand, what would mkstore be ?
<Ulrar> And how do I figure out what the signature is, if it's not what I called it in the ml file ?
<steenuil> ok, a functor should need three signatures
<steenuil> one for its input (the signature of StoreConfig in your case), one for its output, and one for the functor itself
<steenuil> you need the signature of its output
<Ulrar> Store is just "module Store (CFG : StoreConfig) = struct ...", how would I figure out what the output is ?
<ruffy_> Should we in general use ;; to end a function or not?
<steenuil> well if it's not defined you should probably write it yourself
<reynir> Is it type nonrec foo = Foo for the non-recursive version?
<octachron> ruffy_, no
<octachron> reynir, yes?
<Ulrar> steenuil: How ?
<reynir> Thanks
<ruffy_> octachron: So when do I use ;;?
<octachron> ruffy_, in the toplevel
<steenuil> Ulrar: it should be the signature of the "struct ... end" part in your example
<ruffy_> Okay, so I never use them in an ml file?
<reynir> Oh, seems ppx_deriving_yojson can't handle type nonrec :|
<steenuil> I don't know if there's a way to address it with "module type"
<octachron> Ulrar, if you want a basic example of first-class modules: https://gist.github.com/Octachron/ca5bc810452640c7b3f5cbc929661027
<Ulrar> steenuil: That sounds complicated, there's a lot of stuff in there, and most of those are other modules depending on other types and so on
<Ulrar> I actually made the Store module, with StoreConfig, to avoid having to pass tons of modules everywhere
<steenuil> yeah, but if you want to pass the module as a first-class module to other functions there's no other way
<octachron> ruffy_, you never need to use `;;` in a ml or mli file indeed
<Ulrar> That's a nightmare
<ruffy_> octachron, okay thx
<steenuil> you could always just copy the signature from utop and slap it in there
johnelse is now known as johnel_away
ollehar has joined #ocaml
johnel_away is now known as johnelse
Bronsa has joined #ocaml
<reynir> argh, I seem to get warning 39 (unused rec flag) for functions generated by ppx_deriving_yojson ?!
bacam has joined #ocaml
mfp has joined #ocaml
<Ulrar> Well that's silly, the signature from utop is so big it doesn't fit in my console
<Ulrar> those signatures must have names already
Dan_Bennett has joined #ocaml
Dan_Bennett has quit [Killed (Sigyn (Spam is off topic on freenode.))]
k6ka5 has joined #ocaml
k6ka5 has quit [Killed (Sigyn (Spam is off topic on freenode.))]
<octachron> Ulrar, (most?) Irmin signatures are already named indeed
<Ulrar> Yeah, but everytime I try to use the names I get an error about long identifiers
<Ulrar> guess I must not be using the correct ones
<octachron> What is your error precisely? Substitution (the "with ..." part) is quite limited for packed module signatures
ArsenArsen26 has joined #ocaml
ArsenArsen26 has quit [Killed (Sigyn (Spam is off topic on freenode.))]
TheoM has joined #ocaml
TheoM has quit [Killed (Sigyn (Spam is off topic on freenode.))]
TheLemonMan has joined #ocaml
CeBe29 has joined #ocaml
CeBe29 has quit [Killed (Sigyn (Spam is off topic on freenode.))]
<Ulrar> octachron: Okay, I got it actually
<Ulrar> Finally understood, at least enough
<Ulrar> I don't have to provide a complete signature for it, I just need to describe the functions I actually use, and that's fine
<Ulrar> I ignored all the Irmin stuff from the signature, since they're abstracted in the module, and now it works just fine
<Ulrar> Just took me a while to realise, it's basically writing a .h file
<Ulrar> Now on to figure out this "contains type variables that cannot be generalized" problem from graphql-server
noitakom1 has joined #ocaml
Maxdamantus has quit [Ping timeout: 268 seconds]
Maxdamantus has joined #ocaml
leastbit has joined #ocaml
leastbit has quit [Ping timeout: 256 seconds]
noitakom1 has quit [Quit: WeeChat 2.0.1]
noitakomentaja has joined #ocaml
sagotch has quit [Quit: Leaving.]
neo-cool22 has joined #ocaml
neo-cool22 has quit [Killed (Sigyn (Spam is off topic on freenode.))]
<discord> <companion_cube> hmmmm
Louis9 has joined #ocaml
Louis9 has quit [Killed (Sigyn (Spam is off topic on freenode.))]
steenuil has quit [Ping timeout: 240 seconds]
steenuil has joined #ocaml
Guest72300 has joined #ocaml
Guest72300 has quit [Killed (Sigyn (Spam is off topic on freenode.))]
TheLemonMan has quit [Quit: "It's now safe to turn off your computer."]
Haudegen has joined #ocaml
monstasat has joined #ocaml
monstasat has quit [Client Quit]
monstasat has joined #ocaml
monstasat has quit [Client Quit]
annieslmaos has joined #ocaml
annieslmaos has quit [Killed (Sigyn (Spam is off topic on freenode.))]
silver has joined #ocaml
BitPuffin has joined #ocaml
sagotch has joined #ocaml
of has joined #ocaml
of has quit [Killed (Sigyn (Spam is off topic on freenode.))]
weq20 has joined #ocaml
weq20 has quit [Killed (Sigyn (Spam is off topic on freenode.))]
mbuf has quit [Quit: Leaving]
change has joined #ocaml
change has quit [Killed (Sigyn (Spam is off topic on freenode.))]
spew has joined #ocaml
<reynir> o hai, discord
jbrown has joined #ocaml
RalfJ has joined #ocaml
RalfJ has quit [Client Quit]
mbuf has joined #ocaml
<discord> <Perry> o, hai.
wagle_ has joined #ocaml
<companion_cube> o/
wagle has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
wagle_ is now known as wagle
ben_ has quit [Remote host closed the connection]
ben_ has joined #ocaml
_andre has joined #ocaml
wagle is now known as wagle__
wagle__ is now known as wagle-temp
Denommus has joined #ocaml
wagle-temp is now known as wagle
FreeBirdLjj has joined #ocaml
noitakomentaja has quit [Ping timeout: 250 seconds]
FreeBirdLjj has quit [Ping timeout: 256 seconds]
wagle has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
talisein has joined #ocaml
talisein has quit [Killed (Sigyn (Spam is off topic on freenode.))]
wagle has joined #ocaml
wagle has quit [Client Quit]
wagle has joined #ocaml
sulvone10 has joined #ocaml
sulvone10 has quit [Killed (Sigyn (Spam is off topic on freenode.))]
wagle is now known as wagle_
wagle_ is now known as wagle__
wagle__ is now known as wagle
MetaNova25 has joined #ocaml
MetaNova25 has quit [Killed (Sigyn (Spam is off topic on freenode.))]
mbuf has quit [Quit: Leaving]
ilbelkyr8 has joined #ocaml
ilbelkyr8 has quit [Killed (Sigyn (Spam is off topic on freenode.))]
ben_ has quit [Remote host closed the connection]
ben_ has joined #ocaml
wagle has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
Fare has joined #ocaml
nb11 has joined #ocaml
nb11 has quit [Killed (Sigyn (Spam is off topic on freenode.))]
wagle has joined #ocaml
nullifidian__ has joined #ocaml
pierpal has quit [Quit: Poof]
pierpal has joined #ocaml
nullifidian_ has quit [Ping timeout: 244 seconds]
pilottage has joined #ocaml
pilottage has quit [Killed (Sigyn (Spam is off topic on freenode.))]
pierpal has quit [Quit: Poof]
<discord> <Bluddy> the bridge is working now?
pierpal has joined #ocaml
<companion_cube> yep, adrien removed the mandatory auth for now
<discord> <Bluddy> thank you adrien!
<discord> <Perry> Couldn't we just authenticate the bridge? 😃
<companion_cube> you can still do it
<companion_cube> but I argued that beginners that try to connect to #ocaml would also have a frustrating time if auth is required
<discord> <Perry> Indeed.
<discord> <Perry> Long run the answer to the nutty racist spam problem is probably at the freenode layer and not at the individual channel layer.
<companion_cube> anyway, +S seemed to be sufficient
jbrown has quit [Ping timeout: 256 seconds]
quipa has joined #ocaml
AnLog has joined #ocaml
chek20 has joined #ocaml
FreeBirdLjj has joined #ocaml
jbrown has joined #ocaml
chek20 has quit [Remote host closed the connection]
jbrown has quit [Read error: Connection reset by peer]
TheLemonMan has joined #ocaml
TheLemonMan has quit [Client Quit]
jbrown has joined #ocaml
Haudegen has quit [Ping timeout: 248 seconds]
<flux[m]> authenticated bridge works fine in matrix :)
neatonk has joined #ocaml
dilettante has quit [Ping timeout: 260 seconds]
steenuil has quit [Remote host closed the connection]
steenuil has joined #ocaml
sagotch has quit [Quit: Leaving.]
mbuf has joined #ocaml
Haudegen has joined #ocaml
<discord> <Kakadu> Folks, where should I look for an issue if you get SSL : error:1408F10B:SSL routines:ssl3_get_record:wrong version number when connectin gto IRC using a desktop client?
mbuf has left #ocaml ["Leaving"]
<companion_cube> report an issue to your IRC client I guess
jbrown has quit [Ping timeout: 256 seconds]
<reynir> You could try connecting with openssl s_client and see if your openssl version and the servers ssl/tls support are compatible
<companion_cube> for the record, ocaml-tls seems to work since it's what ocabot_ uses
ollehar has quit [Quit: Lost terminal]
pierpal has quit [Quit: Poof]
<reynir> Works even with client certs \o/
pierpal has joined #ocaml
<discord> <Kakadu> this is output of s_client: https://paste.in.ua/3502/raw/
<reynir> port 8001 is for plaintext on freenode
<reynir> 6697, 7000 & 7070 is ssl/tls
<reynir> (on freenode)
Jesin has quit [Remote host closed the connection]
FreeBirdLjj has quit [Ping timeout: 244 seconds]
kakadu has joined #ocaml
ziyourenxiang has quit [Ping timeout: 268 seconds]
<kakadu> reynir: many thanks
<reynir> You're welcome!
FreeBirdLjj has joined #ocaml
Jesin has joined #ocaml
roygbiv has joined #ocaml
tsp23 has joined #ocaml
tsp23 has quit [Killed (Sigyn (Spam is off topic on freenode.))]
FreeBirdLjj has quit [Remote host closed the connection]
cryptocat1094 has joined #ocaml
quipa has quit [Ping timeout: 240 seconds]
Bronsa has quit [Ping timeout: 240 seconds]
roygbiv has quit [Quit: ™]
eir3 has joined #ocaml
eir3 has quit [Killed (Sigyn (Spam is off topic on freenode.))]
silver has quit [Read error: Connection reset by peer]
silver_ has joined #ocaml
andreas___ has joined #ocaml
ben_ has quit [Remote host closed the connection]
ben_ has joined #ocaml
Haudegen has quit [Ping timeout: 244 seconds]
kakadu has quit [Quit: Konversation terminated!]
Jesin has quit [Read error: Connection reset by peer]
Jesin has joined #ocaml
andreas___ has left #ocaml [#ocaml]
JuanDaugherty has joined #ocaml
cuvius has joined #ocaml
quipa has joined #ocaml
<cuvius> Is it possible to define an empty polymorphic variant type?
<octachron> in 4.07
<octachron> no, a polymorphic variant. Then the answer is not really.
<cuvius> That's a shame..
<octachron> You can define it, but with a ppx; and it cannot really be used in a useful way
<theblatte> what about `type t = []`?
<octachron> [] is the list constructor in this case
<theblatte> ah, I was wondering :)
<theblatte> let x : t = [];;
<theblatte> t/1630
<theblatte> Error: This expression has type t/1606 but an expression was expected of type
<theblatte> ah, sorry, I redefined t in between...
<octachron> (e.g. type intlist = [] | (::) of int * intlist )
neatonk has quit [Ping timeout: 240 seconds]
<cuvius> octachron, in what sense can't it be useful?
kakadu has joined #ocaml
pierpal has quit [Quit: Poof]
pierpal has joined #ocaml
<octachron> cuvius, well, an empty polymorphic variant does not give you a polymorphic variant kind. And you cannot use in functor to merge unknown polymorphic variants.
neatonk has joined #ocaml
<octachron> In short, with an empty polymorphic variant, you have a description of a uninhabited type and that's it.
<cuvius> My idea was to use a polymorphic variant as a phantom type, and in this scenario it seems to me it could make sense the polymorphic variant could be empty.
pierpal has quit [Quit: Poof]
pierpal has joined #ocaml
<octachron> maybe, but you can replace [] t with [`Empty] t
<cuvius> Yeah, that's the workaround I'm using right now... It would just be prettier without :)
ygrek has joined #ocaml
pierpal has quit [Quit: Poof]
pierpal has joined #ocaml
ben_ has quit [Remote host closed the connection]
ben_ has joined #ocaml
kamog has quit [Quit: Leaving.]
<kakadu> Folks, I have library A and library B that depends on A. I tell dune to compile A and B and it compiles them concurrently, finishes A after getting an error while compiling B which lead to an error
<kakadu> Does it have a special syntax for local libraries?
cryptocat1094 has quit [Quit: WeeChat 2.2]
neatonk has quit [Ping timeout: 240 seconds]
pierpa has joined #ocaml
<kakadu> weird stuff is happening: I compiled a library with dune but there are no any cmi files.
<kakadu> in _build/default/libraryname
Haudegen has joined #ocaml
<kakadu> okay, it was namespace thing
JuanDaugherty has quit [Quit: Exeunt]
hph^ has quit [Ping timeout: 264 seconds]
neatonk has joined #ocaml
jnavila has joined #ocaml
Fare has quit [Ping timeout: 240 seconds]
spew has quit [Quit: going home]
bacam has quit [Quit: leaving]
jnavila has quit [Remote host closed the connection]
bacam has joined #ocaml
Fare has joined #ocaml
quipa has quit [Quit: Leaving]
neatonk1 has joined #ocaml
neatonk has quit [Ping timeout: 265 seconds]
neatonk1 has quit [Ping timeout: 240 seconds]
RyZum has joined #ocaml
RyZum has quit [Killed (Sigyn (Spam is off topic on freenode.))]
cuvius has quit [Quit: Connection closed for inactivity]
ecks9 has joined #ocaml
ecks9 has quit [Killed (Sigyn (Spam is off topic on freenode.))]
jao has joined #ocaml
_andre has quit [Quit: leaving]
Fare has quit [Ping timeout: 256 seconds]
Fare has joined #ocaml
ZirconiumY has joined #ocaml
ZirconiumX has quit [Ping timeout: 264 seconds]
nullifidian_ has joined #ocaml
ZirconiumY has left #ocaml [#ocaml]
nullifidian__ has quit [Ping timeout: 244 seconds]
ZirconiumX has joined #ocaml
fredcy has joined #ocaml
Pando_ has joined #ocaml
xaimus_ has joined #ocaml
jerith_ has joined #ocaml
Haudegen has quit [Ping timeout: 244 seconds]
Haudegen has joined #ocaml
jave_ has joined #ocaml
fredcy_ has quit [*.net *.split]
shakalaka has quit [*.net *.split]
Exagone313 has quit [*.net *.split]
jerith has quit [*.net *.split]
jave has quit [*.net *.split]
Pando has quit [*.net *.split]
ehirdoy has quit [*.net *.split]
xaimus has quit [*.net *.split]
Exagone313 has joined #ocaml
Denommus has quit [Remote host closed the connection]
zolk3ri has quit [Quit: leaving]
ehirdoy has joined #ocaml
Haudegen has quit [Ping timeout: 244 seconds]
Haudegen has joined #ocaml
kakadu has quit [Remote host closed the connection]
Deusdeorum16 has joined #ocaml
Deusdeorum16 has quit [Killed (Sigyn (Spam is off topic on freenode.))]
Fare has quit [Ping timeout: 256 seconds]
neatonk has joined #ocaml
neatonk has quit [Ping timeout: 240 seconds]
Jesin has quit [Read error: Connection reset by peer]
ziyourenxiang has joined #ocaml
pierpa has quit [Quit: Page closed]
Jesin has joined #ocaml