<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_>
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
<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]
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]