adrien changed the topic of #ocaml to: Discussions about the OCaml programming language | http://www.ocaml.org | Current MOOC: https://huit.re/ocamlmooc | OCaml 4.04.0 release notes: http://ocaml.org/releases/4.04.html | Try OCaml in your browser: http://try.ocamlpro.com | Public channel logs at http://irclog.whitequark.org/ocaml
infinity0 has joined #ocaml
Fistine has joined #ocaml
infinity0 has quit [Remote host closed the connection]
infinity0 has joined #ocaml
infinity0 has quit [Remote host closed the connection]
infinity0 has joined #ocaml
infinity0 has quit [Remote host closed the connection]
infinity0 has joined #ocaml
infinity0 has quit [Remote host closed the connection]
infinity0 has joined #ocaml
infinity0 has quit [Remote host closed the connection]
infinity0 has joined #ocaml
jack5638 has quit [Ping timeout: 258 seconds]
jack5638 has joined #ocaml
lambda-11235 has joined #ocaml
jao has joined #ocaml
kernelj_arch has joined #ocaml
nullcatxxx_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mfp has quit [Ping timeout: 264 seconds]
al-damiri has quit [Quit: Connection closed for inactivity]
rpg has joined #ocaml
richi235 has quit [Ping timeout: 240 seconds]
kernelj_arch has quit [Quit: Lost terminal]
rpg_ has joined #ocaml
rpg has quit [Ping timeout: 240 seconds]
agravier has joined #ocaml
Aruseus has joined #ocaml
Aruseus has quit [Client Quit]
Aruseus has joined #ocaml
nullcatxxx_ has joined #ocaml
rpg_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Aruseus has quit [Quit: Leaving]
Aruseus has joined #ocaml
agravier is now known as agravier[away]
agravier[away] is now known as agravier
agravier is now known as agravier[away]
agravier[away] is now known as agravier
rpg has joined #ocaml
Aruseus has quit [Quit: Leaving]
copy` has quit [Quit: Connection closed for inactivity]
struk|desk has quit [Quit: Konversation terminated!]
rpg has quit [Ping timeout: 268 seconds]
BitPuffin|osx has quit [Ping timeout: 264 seconds]
agravier is now known as agravier[away]
nomicflux has joined #ocaml
agravier[away] is now known as agravier
MercurialAlchemi has joined #ocaml
agravier is now known as agravier[away]
agravier[away] is now known as agravier
agravier is now known as agravier[away]
mengu has quit [Remote host closed the connection]
jao has quit [Ping timeout: 240 seconds]
nomicflux has quit [Quit: nomicflux]
spew has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 240 seconds]
spew has quit [Ping timeout: 268 seconds]
psacrifice has joined #ocaml
psacrifice has quit [Ping timeout: 260 seconds]
spew has joined #ocaml
jack5638 has quit [Ping timeout: 268 seconds]
jack5638 has joined #ocaml
aekdl has joined #ocaml
<aekdl> Does anyone know if it is possible to define two vals in a module as mutually recursive functions?
psacrifice has joined #ocaml
MercurialAlchemi has joined #ocaml
jack5638 has quit [Ping timeout: 240 seconds]
jack5638 has joined #ocaml
<aekdl> Never mind, I think I figured it out. Seems to work just like outside of a module with "let rec f1 = ... and f2 = ..." syntax.
psacrifice has quit [Read error: No route to host]
aekdl has left #ocaml [#ocaml]
spew has quit [Quit: foobar]
psacrifice has joined #ocaml
alfredo has joined #ocaml
freusque has joined #ocaml
Simn has joined #ocaml
jack5638 has quit [Ping timeout: 240 seconds]
AltGr has joined #ocaml
jack5638 has joined #ocaml
lambda-11235 has quit [Quit: WeeChat 1.7.1]
Cheery has left #ocaml [#ocaml]
argent_smith has joined #ocaml
agravier[away] is now known as agravier
agravier is now known as agravier[away]
agravier[away] has quit [Remote host closed the connection]
agravier has joined #ocaml
agravier is now known as agravier[away]
Algebr has joined #ocaml
agravier[away] is now known as agravier
<orbifx[m]> :)
<orbifx[m]> aekdl: that is the point of `and`
alqatari has joined #ocaml
mfp has joined #ocaml
zpe has joined #ocaml
agravier is now known as agravier[away]
agravier[away] is now known as agravier
agravier is now known as agravier[away]
agravier[away] is now known as agravier
kakadu has joined #ocaml
maattdd has quit [Read error: Connection reset by peer]
agravier has quit [Quit: agravier]
richi235 has joined #ocaml
Aruseus has joined #ocaml
Aruseus has quit [Quit: Leaving]
govg has joined #ocaml
yota_ has joined #ocaml
<yota_> Hi everyone
<yota_> Quick question, how do you build a custom type empty list ?
<yota_> Cause when I do [], ocaml tells me I'm building a 'unit list' :/
<asmanur_> how do you mean?
<orbifx[m]> type l = x list ?
<yota_> I want to call a function with an empty list
<yota_> let rec loop acc = match try_read () with
<yota_> | Some s -> loop (s :: acc)
<yota_> | None -> close_in ic; List.rev acc in
<yota_> loop []
<yota_> I'm unable to replace by [] by a custom type list ?
psacrifice has quit [Remote host closed the connection]
psacrifice has joined #ocaml
<zozozo> yota_: could you please paste the full code (including try_read) somewhere ?
agravier has joined #ocaml
orbitz has quit [Read error: Connection reset by peer]
orbitz_ has joined #ocaml
<yota_> @zozozo https://pastebin.com/qTe6RyW4 thanks a lot
<rks`> that's not the full code.
<zozozo> the 'matcher' function is missing
<zozozo> also, you open a channel using a filename, and then read from stdin, completely forgetting the newly opened channel, which seems not intentional
<yota_> full code here : https://pastebin.com/Fv12MfLY
<yota_> Well i'm trying to read from stdin and store the parsed result in a list
<zozozo> ok, so basically, your 'matcher' function has type string -> unit, so since you read from stdin and create a list of the results of the matcher function, it's logical that your list has type unit list, and not trip list
<zozozo> also, since you read from stdin, what's the use of line 44 where you open the given filename ?
<yota_> okay, it's just printing for debug purpose, in the future it will return from other functions, so create will return from create_trip
<yota_> Yeah right
<zozozo> still, the code as is cannot compile since the type annotations don't match the actual types
agravier has quit [Quit: agravier]
<orbifx[m]> yota_: on the rare occasion that a type can not be inferred, or you want to enforce it, write its signature in a parameter
<yota_> Ok, thanks a lot everyone
agravier has joined #ocaml
zpe has quit [Remote host closed the connection]
TheLemonMan has joined #ocaml
<orbifx[m]> vbmithr: here?
<vbmithr> yep
<vbmithr> need anything?
_andre has joined #ocaml
<orbifx[m]> Got a question about msgpck. Would you accept code that extends the library by adding more functionality, or do you wish to keep it bare bones and have seperate packages offer additional functionality?
<vbmithr> depends on the code…
<vbmithr> You can always submit a PR if you develop code around it
<vbmithr> It don't know in advance, I don't have a dogmatic approach, it depends what functionality, etc.
Simn has quit [Ping timeout: 268 seconds]
<orbifx[m]> Utility functions for deconstructing msgpck messages in a type safe way and various higher order functions
<vbmithr> Just push a PR if you do this and I'll see how to integrate them
agravier has quit [Quit: agravier]
agravier has joined #ocaml
<orbifx[m]> It's done already. Used in production
nomicflux has joined #ocaml
sepp2k has joined #ocaml
alqatari has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
psacrifice has quit [Remote host closed the connection]
psacrifice has joined #ocaml
psacrifice has quit [Client Quit]
yota_ has quit [Quit: Page closed]
agravier has quit [Quit: agravier]
agarwal1975 has quit [Quit: agarwal1975]
<infinity0> i asked a question about whether (=) shortcuts by checking (==) first a few weeks ago, well here is the answer for polymorphic (=) anyways:
<infinity0> a bit of a shame that floating point has to ruin it :(
orbitz_ has quit [Quit: Reconnecting]
orbitz has joined #ocaml
nomicflux has quit [Quit: nomicflux]
<orbifx[m]> :(
argent_smith1 has joined #ocaml
jao has joined #ocaml
<def`> that's a mistake in the design imho
_andre_ has joined #ocaml
<Drup> you mean, floating points ? :p
<def`> first yes :)
<def`> but specifically in OCaml, that structural equality should be affected but the fact that equality is not well behaved in some values
<def`> but/by
<def`> I would prefer that (x,x) = (x,x) is always true, even if x = x can be false for some floats
sepp2k has quit [*.net *.split]
_andre has quit [*.net *.split]
argent_smith has quit [*.net *.split]
jack5638 has quit [*.net *.split]
freusque has quit [*.net *.split]
jcloud has quit [*.net *.split]
chenglou has quit [*.net *.split]
toolslive has quit [*.net *.split]
<flux> well wouldn't that be strange :)
jack5638 has joined #ocaml
<flux> (a, ()) = (a, ()) would be true but (a = a) would be false?
<flux> the only solution I see is a custom comparison operator for floats
<def`> yes
<flux> operatorS
<def`> What is strange is a = a is false.
<flux> they could be called <. =. etc :)
<def`> redefine
<def`> everything using compare
<flux> and not break a single thing :-)
<def`> let (=.) = (=) and (<.) = (<) and (=) x y = compare x y = 0 and ...
<flux> you could do that now. maybe Jane Street could do it first for Core ;)
<flux> but the standard library is a more difficult one..
<def`> ah yes, there are many mistakes which can't be solved anymore, it is too late
sepp2k has joined #ocaml
chenglou has joined #ocaml
toolslive has joined #ocaml
freusque has joined #ocaml
jcloud has joined #ocaml
jcloud has quit [Max SendQ exceeded]
jcloud has joined #ocaml
agarwal1975 has joined #ocaml
rpg has joined #ocaml
rpg has quit [*.net *.split]
freusque has quit [*.net *.split]
chenglou has quit [*.net *.split]
toolslive has quit [*.net *.split]
freusque has joined #ocaml
toolslive has joined #ocaml
rpg has joined #ocaml
chenglou has joined #ocaml
Algebr has quit [Ping timeout: 260 seconds]
rpg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mengu has joined #ocaml
sh0t has joined #ocaml
jabroney has joined #ocaml
zpe has joined #ocaml
richi235 has quit [Ping timeout: 258 seconds]
MercurialAlchemi has quit [Ping timeout: 240 seconds]
spew has joined #ocaml
olio has joined #ocaml
jimt has joined #ocaml
<olio> hey guys
<olio> I'm having some trouble in OCAML :/
<olio> Can you include a custom type in a tuple ?
<olio> Somethin like this:
<olio> module Trip : TRIP =
<olio> functor (Tchou: TRAIN) ->
<olio> struct
<olio> type trip = (int * int * int * TRAIN);;
<olio> end;;
BitPuffin|osx has joined #ocaml
<toolslive> types need to start with lowercase. trip = int * int * int * TRAIN.t
<toolslive> and the module signature TRAIN needs to declare a type t of course.
<reynir> alternatively, type trip = int * int * int * (module TRAIN)
<reynir> (if you really want to use first class modules)
<thizanne> (you don't)
<Drup> toolslive: Tchoo.t*
<toolslive> right.
<olio> thansk tooltive, it works ;-)
bungoman_ has quit [Ping timeout: 258 seconds]
nullcatxxx_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
lur has joined #ocaml
TheLemonMan has quit [Quit: "It's now safe to turn off your computer."]
MercurialAlchemi has joined #ocaml
ryanartecona has joined #ocaml
lur has quit [Quit: Page closed]
<Leonidas> you can have modules im tuples? TIL
<Drup> You can have modules anywhere
<Drup> The real question is: do you really want that? ;)
<olio> you can't call a function belonging to a functor ? :/
<olio> Error: The module Trip is a functor, not a structure
<olio> wot is happening
alqatari has joined #ocaml
<Drup> you need to apply the functor before using it
<olio> how ? :/
<orbifx[m]> olio: in very simple terms, a functor is something to give you the function you want to use. Until then the function you wish doesn't exist.
<orbifx[m]> A functor needs some parameters to "build" the appropriate functions and then make them available.
<olio> how do you do this ?
freusque has quit [Quit: WeeChat 1.7]
<olio> I'm struggling to find a good and easy explanation of functors :/
zpe has quit [Remote host closed the connection]
BitPuffin|osx has quit [Ping timeout: 240 seconds]
alqatari has quit [Quit: Textual IRC Client: www.textualapp.com]
MercurialAlchemi has quit [Ping timeout: 260 seconds]
BitPuffin|osx has joined #ocaml
olio has quit [Ping timeout: 260 seconds]
nullcatxxx_ has joined #ocaml
ryanartecona has quit [Quit: ryanartecona]
slash^ has joined #ocaml
slash^ has quit [Read error: Connection reset by peer]
mengu has quit [Remote host closed the connection]
BitPuffin|osx has quit [Ping timeout: 240 seconds]
fraggle-boate has joined #ocaml
agravier has joined #ocaml
MercurialAlchemi has joined #ocaml
alfredo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ryanartecona has joined #ocaml
octachron has joined #ocaml
bungoman has joined #ocaml
clockish_ has joined #ocaml
AltGr has left #ocaml [#ocaml]
clockish has quit [Quit: bye]
clockish_ is now known as clockish
Simn has joined #ocaml
ziyourenxiang has joined #ocaml
ziyourenxiang has joined #ocaml
ziyourenxiang has quit [Client Quit]
ziyourenxiang has joined #ocaml
nullcatxxx_ has quit [Ping timeout: 240 seconds]
mengu has joined #ocaml
hashpuppy has joined #ocaml
<hashpuppy> i often hear about how great the ocaml module system is, but is there a resource that goes into detail for why it's so great? i'm new to ocaml and think this would be a good first step in "getting" it
<Drup> I don't know of a good article on the subject. It's a bit delicate to demonstrate in a concise manner, unfortunately.
mengu has quit [Ping timeout: 240 seconds]
emias has quit [Quit: Reboot.]
nullcatxxx_ has joined #ocaml
nullcatxxx_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
nullcatxxx_ has joined #ocaml
emias has joined #ocaml
emias has quit [Client Quit]
emias has joined #ocaml
freusque has joined #ocaml
sz0 has quit [Quit: Connection closed for inactivity]
average has joined #ocaml
ziyourenxiang has quit [Quit: Leaving]
freusque has quit [Ping timeout: 246 seconds]
ryanartecona has quit [Quit: ryanartecona]
Harzilein has joined #ocaml
<Harzilein> hi
freusque has joined #ocaml
alfredo has joined #ocaml
nullcatxxx_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mengu has joined #ocaml
freusque has quit [Ping timeout: 260 seconds]
mengu has quit [Ping timeout: 268 seconds]
kakadu has quit [Quit: Konversation terminated!]
agarwal1975 has quit [Quit: agarwal1975]
eikke has joined #ocaml
SpiceGuid has joined #ocaml
tizoc has quit [Quit: Coyote finally caught me]
tizoc has joined #ocaml
freusque has joined #ocaml
tizoc has quit [Client Quit]
tizoc has joined #ocaml
tizoc has quit [Changing host]
tizoc has joined #ocaml
nullcatxxx_ has joined #ocaml
sepp2k has quit [Ping timeout: 260 seconds]
nullcatxxx_ has quit [Client Quit]
rpg has joined #ocaml
nullcatxxx_ has joined #ocaml
nullcatxxx_ has quit [Client Quit]
hashpuppy has quit [Quit: Connection closed for inactivity]
nullcatxxx_ has joined #ocaml
kakadu has joined #ocaml
freusque has quit [Ping timeout: 258 seconds]
agarwal1975 has joined #ocaml
freusque has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 240 seconds]
MercurialAlchemi has joined #ocaml
freusque has quit [Ping timeout: 260 seconds]
_andre_ has quit [Quit: leaving]
rpg has quit [Ping timeout: 240 seconds]
MercurialAlchemi has quit [Ping timeout: 240 seconds]
octachron has quit [Quit: Leaving]
nomicflux has joined #ocaml
argent_smith1 has quit [Ping timeout: 260 seconds]
sillyotter has joined #ocaml
sillyotter has quit [Client Quit]
sh0t has quit [Ping timeout: 246 seconds]
<orbifx[m]> Hey
alfredo has quit [Quit: Textual IRC Client: www.textualapp.com]
SpiceGuid has quit [Quit: ChatZilla 0.9.93 [SeaMonkey 2.46/20161213183751]]
strykerkkd has joined #ocaml
argent_smith has joined #ocaml
argent_smith has quit [Client Quit]
jack5638 has quit [Ping timeout: 255 seconds]
mengu has joined #ocaml
jack5638 has joined #ocaml
rpg has joined #ocaml
larhat has joined #ocaml
rpg_ has joined #ocaml
rpg has quit [Ping timeout: 240 seconds]
rpg_ has quit [Ping timeout: 260 seconds]
jabroney has quit [Quit: Leaving.]
sh0t has joined #ocaml
sh0t has quit [Ping timeout: 260 seconds]
nullcatxxx_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
nullcatxxx_ has joined #ocaml
rpg has joined #ocaml
sh0t has joined #ocaml
nullcatxxx_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
strykerkkd has quit [Quit: Leaving]
freusque has joined #ocaml
nomicflux has quit [Quit: nomicflux]
rpg has quit [Read error: Connection reset by peer]
rpg_ has joined #ocaml
rpg has joined #ocaml
rpg_ has quit [Read error: Connection reset by peer]
rpg has quit [Client Quit]
infinity0 has quit [Ping timeout: 240 seconds]
infinity0_ has joined #ocaml
infinity0_ has quit [Changing host]
infinity0 has joined #ocaml
infinity0 has quit [Remote host closed the connection]