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