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
jerme_ has quit [Quit: Connection closed for inactivity]
yomimono has quit [Ping timeout: 245 seconds]
silver has quit [Read error: Connection reset by peer]
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 264 seconds]
agarwal1975 has joined #ocaml
orbifx1 has quit [Quit: WeeChat 1.6]
agarwal1975 has quit [Client Quit]
annoymouse has quit [Quit: Connection closed for inactivity]
agarwal1975 has joined #ocaml
struktured has joined #ocaml
<struktured> anyone attending that jane street tech talk tommorow?
mesiviah has joined #ocaml
sh0t has quit [Remote host closed the connection]
john51 has joined #ocaml
john51_ has quit [Ping timeout: 256 seconds]
mfp has quit [Ping timeout: 260 seconds]
Onemorenickname has quit [Read error: Connection reset by peer]
mesiviah has quit [Remote host closed the connection]
nahra has joined #ocaml
infinity0 is now known as Guest34258
infinity0 has joined #ocaml
infinity0 has joined #ocaml
Guest34258 has quit [Killed (rajaniemi.freenode.net (Nickname regained by services))]
infinity0 has quit [Remote host closed the connection]
infinity0 has joined #ocaml
infinity0 has quit [Remote host closed the connection]
infinity0 has joined #ocaml
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
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]
nomicflux has joined #ocaml
binobi has quit []
binobi has joined #ocaml
mengu_ has joined #ocaml
mengu has quit [Ping timeout: 264 seconds]
nomicflux has quit [Quit: nomicflux]
nicoo has quit [Ping timeout: 240 seconds]
obadz has quit [Ping timeout: 248 seconds]
nomicflux has joined #ocaml
P4Titan has joined #ocaml
<P4Titan> Hi all. When I do "module type of", that doesn't fully export variant types. It only exports that that type exists, but not its constructors
<P4Titan> is there a way to export the constructors as well?
obadz has joined #ocaml
copy` has quit [Quit: Connection closed for inactivity]
<P4Titan> I figured it out, and off, it's a bit ugly
<P4Titan> include (module type of RPCType
<P4Titan> with type rpc_req = RPCType.rpc_req
<P4Titan> with type rpc_resp = RPCType.rpc_resp
<P4Titan> with type packet = RPCType.packet)
<P4Titan>
nicoo has joined #ocaml
nicoo has quit [Remote host closed the connection]
nicoo has joined #ocaml
<struktured> P4Titan: yeah that's it, I find it verbose as well. was always wondering if there should be a ppx extension or something for it (sort of like ppx_import maybe)
<struktured> with implementations you have to do something similar but using ":="
<P4Titan> that's if u want to hide the type
nomicflux has quit [Quit: nomicflux]
binobi has quit [Remote host closed the connection]
govg has joined #ocaml
<cheater> does ocaml have some sort of stream fusion implementation?
<cheater> i often see code that, in order to filter a list, wraps matching elements in Some, and returns None for others, and then unopt_list is applied to that list of option values.
<cheater> is this going to create all those throwaway constructors or will they be fused away?
<cheater> also ... why doesn't ocaml have a "where" keyword :'(
<cheater> worst thing about ocaml. imo
nomicflux has joined #ocaml
nomicflux has quit [Quit: nomicflux]
<P4Titan> Have you check out how BatList.filter works?
<P4Titan> also, isn't "where" (from Haskell) just a "let", but at the end, tbh?
oschwald has quit [Quit: Leaving.]
<cheater> P4Titan: yes, it is, and it's awesomely useful.
<cheater> it makes no sense. until you need it! then it makes all sense in the world.
f[x] has quit [Ping timeout: 240 seconds]
<P4Titan> umm, I've used it before, but I don't miss it that much
mengu_ has quit [Remote host closed the connection]
<cheater> i have here an example of code where it seems a developer created technically inferior code because he didn't have the option of using where
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 240 seconds]
ygrek has joined #ocaml
<P4Titan> cheater: could you send it
<P4Titan> I would like to peek
P4Titan has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
sz0 has joined #ocaml
govg has quit [Ping timeout: 240 seconds]
infinity0 has joined #ocaml
mrnugget has joined #ocaml
mengu has joined #ocaml
mengu has quit [Remote host closed the connection]
MercurialAlchemi has joined #ocaml
snhmib has quit [Ping timeout: 264 seconds]
<mrnugget> Is ocaml.org broken somehow? I get 403 status codes on a lot of pages like https://ocaml.org/learn/tutorials/
obadz has quit [Ping timeout: 264 seconds]
zv has quit [Ping timeout: 264 seconds]
emias has quit [Ping timeout: 264 seconds]
spion has quit [Ping timeout: 264 seconds]
qmm has quit [Ping timeout: 264 seconds]
mrnugget has quit [Remote host closed the connection]
wagle has quit [Ping timeout: 264 seconds]
wagle_ has joined #ocaml
qmm has joined #ocaml
spion has joined #ocaml
jao has quit [Ping timeout: 255 seconds]
snhmib has joined #ocaml
zv has joined #ocaml
emias has joined #ocaml
obadz has joined #ocaml
chetshah has joined #ocaml
ziyourenxiang has joined #ocaml
wagle_ is now known as wagle
FreeBirdLjj has quit [Remote host closed the connection]
<chetshah> Hello all, Ocaml beginner here, Just came across the concept of value restriction.
<chetshah> It says functiona applications are not polymorphic. Although it seems value restriction is a problem only for function applications where functions themselves are polymorphic right?
<chetshah> And the trick to get around it is eta expansion, which basically puts it in a thunk?
Mercuria1Alchemi has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 276 seconds]
snhmib has quit [Ping timeout: 240 seconds]
octachron has joined #ocaml
<octachron> chetshah, eta expansion does not always create a thunk: consider for instance "let id x = x and compose f g x = f (g x)"
<octachron> then "let id2 = compose id id" is not polymorphic contrarily to the eta expanded version "let id3 x = (compose id id) x"
snhmib has joined #ocaml
shinnya has quit [Ping timeout: 240 seconds]
chetshah has quit [Ping timeout: 260 seconds]
mengu has joined #ocaml
mengu has quit [Ping timeout: 256 seconds]
alfredo has joined #ocaml
jnavila has joined #ocaml
wolfcore has quit [Ping timeout: 260 seconds]
zpe has joined #ocaml
orbifx-m has joined #ocaml
wolfcore has joined #ocaml
raphinou has joined #ocaml
AltGr has joined #ocaml
raphinou has quit [Client Quit]
raphinou has joined #ocaml
orbifx-m has quit [Remote host closed the connection]
binobi has joined #ocaml
chetshah has joined #ocaml
Simn has joined #ocaml
mrnugget has joined #ocaml
Mercuria1Alchemi has quit [Remote host closed the connection]
mrnugget has quit [Remote host closed the connection]
MercurialAlchemi has joined #ocaml
chetshah has quit [Ping timeout: 260 seconds]
govg has joined #ocaml
ygrek has quit [Ping timeout: 248 seconds]
larhat has joined #ocaml
<Leonidas> cheater: I kinda like that there is no let/where but just one of them.
<Leonidas> I would've wished for a more lightweight let but oh well.
sz0 has quit [Quit: Connection closed for inactivity]
sz0 has joined #ocaml
mfp has joined #ocaml
FreeBirdLjj has joined #ocaml
xyproto has joined #ocaml
shinnya has joined #ocaml
Sim_n has joined #ocaml
Simn has quit [Ping timeout: 258 seconds]
freyr has joined #ocaml
<freyr> Sup, i'm trying to install coq with ocaml on a quite weak hardware, one of the compiler instances eats all memory and swap and goes to the eternal disk sleep
<companion_cube> do you use flambda?
<freyr> How could i bypass this issue&
<freyr> Yes, i do
<companion_cube> use a non-flambda switch
<companion_cube> I have the same issue :/
<freyr> God, i did't even found related bug in their bugtracker. Seems something should be fixed, it is quite annoying to switch every time i want to use coq
<freyr> Thank you
<companion_cube> it might be a good idea to open a bug indeed
_andre has joined #ocaml
<freyr> Done
jnavila has quit [Quit: It was time]
mengu has joined #ocaml
sz0 has quit [Quit: Connection closed for inactivity]
balod has quit [Remote host closed the connection]
snowcrshd has joined #ocaml
balod has joined #ocaml
mattg has left #ocaml [#ocaml]
silver has joined #ocaml
`micro has quit [Read error: Connection reset by peer]
sepp2k has joined #ocaml
<n4323> hi, what's a quick way to install a printer for Bigarray.Array1 in c-layout in the toplevel?
<n4323> lacaml has nice printers but those are fortran layout
<n4323> i guess i could do some conversion to array and then to lacaml f-layout?
<n4323> is that the easiest?
<n4323> actually, getting an array or list out of Array1 is also kind of a pain. do i really have to write a loop for that?
noddy has joined #ocaml
<n4323> ok, i now wrote a loop that copies a c-layout to an f-layout Array1.t. a bit annoying but it works. sorry for the noise.
sz0 has joined #ocaml
dhil has joined #ocaml
freusque has joined #ocaml
<companion_cube> this kind of helper might be contributed to Lacaml, maybe?
<n4323> not sure lacaml is the place - they use consistently f-layout. actually i was thinking Array1 could maybe use something like that?
StatelessCat has quit [Ping timeout: 260 seconds]
<companion_cube> maybe
<companion_cube> wait, for Array1, does the layount really make a difference?
<n4323> no, it's just the offset!
<n4323> for the index
StatelessCat has joined #ocaml
<companion_cube> oh, fortran is 1-indexed??
<n4323> yuo
<n4323> s/o/p
<companion_cube> oh :o
jnavila has joined #ocaml
agarwal1975 has quit [Quit: agarwal1975]
freusque has quit [Ping timeout: 255 seconds]
freusque has joined #ocaml
nomicflux has joined #ocaml
mrnugget has joined #ocaml
dhil has quit [Ping timeout: 245 seconds]
agarwal1975 has joined #ocaml
pon1980 is now known as calculemus
nomicflux has quit [Quit: nomicflux]
zpe has quit [Remote host closed the connection]
zpe has joined #ocaml
edwin has quit [Quit: ZNC - http://znc.in]
edwin has joined #ocaml
oschwald has joined #ocaml
dhil has joined #ocaml
<larhat> is it possible to hide record fields mutability in the interface? I've tried obvious solution, but it didn't work: Type declarations do not match:
<larhat> The mutability of field field is different.
<larhat> type t = { field : string; }
<larhat> is not included in
<larhat> type t = { mutable field : string; }
<zozozo> larhat: if you use type t = private { mutable field : string }, then field will not be mutable
<zozozo> also, if you could paste your code somewhere rather than in the channel, it would be appreciated
<flux> I use a script xsel | tr '\t' ' ' | tr '\n' ' ' | sed 's/ */ /g' | xsel -i for pasting very short fragments of code ;)
<flux> and sometimes longer..
ohama has quit [Ping timeout: 258 seconds]
zpe has quit [Remote host closed the connection]
freusque has quit [Ping timeout: 255 seconds]
mengu has quit [Remote host closed the connection]
mengu has joined #ocaml
noddy has quit [Ping timeout: 240 seconds]
mengu has quit [Ping timeout: 255 seconds]
ohama has joined #ocaml
sh0t has joined #ocaml
stux|RC has joined #ocaml
al-damiri has joined #ocaml
sz0 has quit [Quit: Connection closed for inactivity]
MercurialAlchemi has quit [Ping timeout: 264 seconds]
MercurialAlchemi has joined #ocaml
freusque has joined #ocaml
handlex has joined #ocaml
shinnya has quit [Ping timeout: 245 seconds]
snowcrshd has quit [Remote host closed the connection]
jnavila has quit [Quit: It was time]
jnavila has joined #ocaml
yomimono has joined #ocaml
Flerex has joined #ocaml
yomimono has quit [Ping timeout: 258 seconds]
orbifx-m has joined #ocaml
handlex has quit [Quit: handlex]
<orbifx-m> is it possible for a function to have a parameter which accepts only one constructor of a variant?
freusque has quit [Read error: No route to host]
<thizanne> you could probably do that with gadt, but you also probably wouldnt want to do that
<flux> with polymorphic variants that is pretty straight forward
<orbifx-m> yeah, seems like a violation
<orbifx-m> flux indeed, don't need to go that far though
freusque has joined #ocaml
struktured has quit [Ping timeout: 240 seconds]
ciniglio has joined #ocaml
handlex has joined #ocaml
snowcrshd has joined #ocaml
yomimono has joined #ocaml
Flerex has quit [Quit: Textual IRC Client: www.textualapp.com]
mrnugget has quit [Remote host closed the connection]
raphinou has quit [Quit: WeeChat 1.6]
alfredo has quit [Quit: Textual IRC Client: www.textualapp.com]
handlex has quit [Quit: handlex]
dhil has quit [Ping timeout: 240 seconds]
govg has quit [Ping timeout: 264 seconds]
vramana1 has joined #ocaml
vramana has quit [Ping timeout: 276 seconds]
vramana1 is now known as vramana
ryanartecona has joined #ocaml
pierpa has joined #ocaml
govg has joined #ocaml
dhil has joined #ocaml
copy` has joined #ocaml
ryanartecona has quit [Quit: ryanartecona]
pierpa has quit [Ping timeout: 258 seconds]
FreeBirdLjj has quit [Remote host closed the connection]
freyr has quit [Remote host closed the connection]
ollehar has joined #ocaml
mengu has joined #ocaml
stux|RC has quit [Ping timeout: 240 seconds]
mengu has quit [Ping timeout: 276 seconds]
jnavila has quit [Quit: It was time]
stux|RC has joined #ocaml
tane has joined #ocaml
handlex has joined #ocaml
handlex has quit [Client Quit]
ziyourenxiang has quit [Quit: Leaving]
ollehar has quit [Quit: ollehar]
_andre has quit [Read error: Connection reset by peer]
_andre has joined #ocaml
mengu has joined #ocaml
mengu has quit [Ping timeout: 240 seconds]
pierpa has joined #ocaml
sepp2k has quit [Quit: Leaving.]
ygrek has joined #ocaml
ygrek has quit [Ping timeout: 258 seconds]
yomimono has quit [Ping timeout: 240 seconds]
orbifx-m has quit [Remote host closed the connection]
ygrek has joined #ocaml
stux|RC-only has quit [Quit: Aloha!]
handlex has joined #ocaml
TarVanimelde has joined #ocaml
handlex has quit [Client Quit]
noddy has joined #ocaml
noddy has quit [Ping timeout: 255 seconds]
jao has joined #ocaml
jao has quit [Remote host closed the connection]
yomimono has joined #ocaml
jao has joined #ocaml
ocalm has quit [Ping timeout: 276 seconds]
slash^ has joined #ocaml
nahra has quit [Ping timeout: 240 seconds]
dave_tucker has quit [Ping timeout: 256 seconds]
grandy_ has quit [Ping timeout: 248 seconds]
dave_tucker has joined #ocaml
justin_smith has quit [Quit: leaving]
jnavila has joined #ocaml
ocalm has joined #ocaml
grandy_ has joined #ocaml
kakadu has joined #ocaml
jnavila has quit [Ping timeout: 240 seconds]
snowcrshd has quit [Remote host closed the connection]
jnavila has joined #ocaml
jnavila_ has joined #ocaml
jnavila has quit [Read error: No route to host]
ryanartecona has joined #ocaml
jnavila_ has quit [Ping timeout: 260 seconds]
jnavila_ has joined #ocaml
zpe has joined #ocaml
<infinity0> is there a sexplib function to convert a Map.S (from the standard library)
<infinity0> er, Map.S.t rather
zpe has quit [Remote host closed the connection]
ryanartecona has quit [Quit: ryanartecona]
jnavila has joined #ocaml
jnavila_ has quit [Ping timeout: 240 seconds]
zpe has joined #ocaml
zpe has quit [Remote host closed the connection]
dhil has quit [Ping timeout: 260 seconds]
jnavila_ has joined #ocaml
jnavila has quit [Ping timeout: 252 seconds]
jnavila_ has quit [Ping timeout: 240 seconds]
yomimono has quit [Ping timeout: 255 seconds]
_andre has quit [Quit: leaving]
slash^ has quit [Read error: Connection reset by peer]
<infinity0> alright fuck it i guess i'll have to write my own :(
Soni has quit [Ping timeout: 256 seconds]
TheLemonMan has joined #ocaml
<thizanne> infinity0: you could use Map.bindings and sexp_of_list, that doesn't seem very long
<infinity0> yeah it's like 20 lines to augment Set.S with t_of_sexp and elt_of_sexp, etc, not too bad
<infinity0> i should probably push it upstream to jane street at some point
Soni has joined #ocaml
Soni has quit [Changing host]
Soni has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 256 seconds]
ryanartecona has joined #ocaml
mengu has joined #ocaml
noddy has joined #ocaml
kakadu has quit [Remote host closed the connection]
AlexDenisov has joined #ocaml
ryanartecona has quit [Quit: ryanartecona]
tane has quit [Ping timeout: 252 seconds]
yomimono has joined #ocaml
tane has joined #ocaml
noddy has quit [Ping timeout: 258 seconds]
octachron has quit [Quit: Leaving]
<Leonidas> is there a way to match on a constructor value in a record pattern? I just realized that I never used such a thing
noddy has joined #ocaml
<infinity0> Leonidas: like "match x with { f1: Constructor a } -> f a" ?
<Drup> s/:/=/
<Drup> (and then it's correct)
<Leonidas> match {a = Wot;b=Mate} with {a=Wot;b} -> a;;
<Leonidas> doesn't seem to work
<Leonidas> x=y matches a field x and names it y
<Leonidas> oh, I'm stupid, sorry
<Leonidas> misread the error
<Leonidas> infinity0: thanks!
TheLemonMan has quit [Quit: "It's now safe to turn off your computer."]
ollehar has joined #ocaml
<infinity0> :)
larhat has quit [Quit: Leaving.]
ocalm_ has joined #ocaml
ocalm has quit [Ping timeout: 240 seconds]
ocalm_ has quit [Ping timeout: 255 seconds]
vramana1 has joined #ocaml
vramana has quit [Ping timeout: 258 seconds]
vramana1 is now known as vramana
ollehar has quit [Quit: ollehar]
AlexDenisov has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cdidd has quit [Ping timeout: 248 seconds]
hannes has quit [Quit: Coyote finally caught me]
hannes has joined #ocaml
tane has quit [Quit: Leaving]
Sim_n has quit [Quit: Leaving]
yomimono has quit [Ping timeout: 245 seconds]
AltGr has left #ocaml [#ocaml]
vramana1 has joined #ocaml
vramana has quit [Ping timeout: 252 seconds]
vramana1 is now known as vramana
nahra has joined #ocaml
agarwal1975 has quit [Quit: agarwal1975]
orbifx has joined #ocaml