silver_ has quit [Read error: Connection reset by peer]
manizzle has quit [Ping timeout: 264 seconds]
manizzle has joined #ocaml
kamog has quit [Quit: ERC (IRC client for Emacs 25.1.1)]
mengu has quit [Remote host closed the connection]
<sveit>
is there any recent information or timeline on modular implicits? i remember reading in a thread about a year ago that it was supposed to be in 4.0.2/3
camelxcore has joined #ocaml
<copy`>
sveit: I think you're confusing it with multicore, which was announced to be released in 4.03
<copy`>
That said, I don't have any more infos about implicits, maybe you can employ the search functionality on irclog.whitequark.org/ocaml to gain some more infos
wu_ng has joined #ocaml
infinity0 has quit [Ping timeout: 240 seconds]
camelxcore has quit [Quit: Lost terminal]
infinity0 has joined #ocaml
infinity0 has quit [Remote host closed the connection]
<sveit>
the chat logs are pretty ambiguous. no one seems to be particularly anxious to get them though. i was under the impression implicits are a pretty important feature. do people just not care?
<sveit>
i thought it was implicits. anyway we're on 4.04 now :)
<copy`>
I think everybody would love to have implicits, it's just very hard to prove they preserve certain properties of the type system
Throwaway has joined #ocaml
infinity0 has joined #ocaml
infinity0 has quit [Remote host closed the connection]
<Throwaway>
Any night owls willing to help me with a small code example?
infinity0 has joined #ocaml
<Throwaway>
Any night owls willing to help me with a small code example?
<Throwaway>
Nevermind ...
Throwaway has quit [Quit: Page closed]
nomicflux has joined #ocaml
shinnya has quit [Ping timeout: 260 seconds]
pyx has joined #ocaml
pyx has quit [Client Quit]
nomicflux has quit [Quit: nomicflux]
MercurialAlchemi has joined #ocaml
micro__ has joined #ocaml
chindy_ has joined #ocaml
micro__ is now known as Guest95992
micro_ has quit [*.net *.split]
chindy has quit [*.net *.split]
_whitelogger has joined #ocaml
moei has quit [Read error: Connection reset by peer]
jao has quit [Ping timeout: 240 seconds]
moei has joined #ocaml
newbie83 has joined #ocaml
newbie83 has quit [Client Quit]
MercurialAlchemi has quit [Ping timeout: 240 seconds]
copy` has quit [Quit: Connection closed for inactivity]
MercurialAlchemi has joined #ocaml
maattdd has joined #ocaml
jimt has quit [Ping timeout: 256 seconds]
jimt has joined #ocaml
maattdd_ has quit [Ping timeout: 240 seconds]
AlexDenisov has joined #ocaml
Simn has joined #ocaml
maattdd has quit [Read error: Connection reset by peer]
alfredo has joined #ocaml
maattdd has joined #ocaml
AlexDenisov has quit [Ping timeout: 240 seconds]
AlexDenisov has joined #ocaml
orbifx has joined #ocaml
jnavila has joined #ocaml
orbifx has quit [Ping timeout: 268 seconds]
jnavila has quit [Quit: It was time]
ia0 has quit [Quit: reboot]
jnavila has joined #ocaml
govg has quit [Ping timeout: 264 seconds]
ia0 has joined #ocaml
richi235 has joined #ocaml
jnavila has quit [Ping timeout: 240 seconds]
argent_smith has joined #ocaml
govg has joined #ocaml
<n4323>
hi, does anyone know it it's possible to pass bigarrays to a ctypes foreign function?
<n4323>
concretely, i have a shared fortran library and the subroutine to be called accepts a REAL array
<sspi>
Drup: awesome, exactly what I was looking for :) once again: thank you
mengu has joined #ocaml
mfp has joined #ocaml
<n4323>
update: it seems to work using this approach (pointers to the start). however Ctypes only contains functions that work with c_layout, so i have to convert tediously.
wu_ng has quit [Ping timeout: 264 seconds]
<n4323>
actually, why does Bigarray not have functions to reinterpret a bigarray from c_layout to f_layout and vice versa?
<n4323>
this seems like an ommission. it could be done without copying, if the array is effectively transposed in the reinterpretation. and for 1d-arrays its extra trivial and annoying if one has to copy for that?!
mengu_ has joined #ocaml
mengu has quit [Ping timeout: 240 seconds]
al-damiri has joined #ocaml
sepp2k has joined #ocaml
octachron has joined #ocaml
<octachron>
n4323, Biggarray.Genarray.change_layout does exactly that (since 4.04)
snhmib has joined #ocaml
<n4323>
oh cool! must have missed it!
<n4323>
but nothing for Array{1,2,3}?
trapz has joined #ocaml
<n4323>
this is probably why i did not find it. one could probably convert to genarray, do the layout change and convert back. fair enough.
<octachron>
n4323, ah yes, arrayN → genarray → change_layout → arrayN is the only way to change layout for arrayN ; at least for now
<octachron>
n4323, this should probably be fixed
<n4323>
the conversion with the detour works for me for the moment, way better than what i had. i think i agree on adding it to the arrayN modules as well
<n4323>
or maybe just mention the detour conversion in the docs of each arrayN?
trapz has quit [Quit: trapz]
<n4323>
not sure about efficiency, maybe avoiding the intermediate step could be better.
zpe has joined #ocaml
lucasem has left #ocaml [#ocaml]
<octachron>
since layout conversion preserves the order/dimension of the array, which is a property broken by the genarray detour; I would say it is better to add a specialized change_layout function to each ArrayN submodule
trapz has joined #ocaml
<n4323>
not sure i understand: i get a genarray with dims = [|12;12|] for example when i convert from an Array2.t
<n4323>
then i convert back with array2_of_genarray?
<octachron>
n4323, note that the conversion function between genarray and arrayN costs nothing (the concrete type of all bigarray is the same)
<n4323>
yes this is what i tried just now and works fine
silver has joined #ocaml
<n4323>
so i'm not sure if more is required at all in Bigarray.ArrayN?
<n4323>
other than convenience?
<octachron>
mostly convenience, but also encoding in the type system that change_layout does not change the order of the bigarray
<n4323>
i see. so would this be a polymorphic function that takes any ArrayN.t and gives the same ArrayN.t back but with changed layout?
mpenet has left #ocaml [#ocaml]
<n4323>
probably that's not possible though?
trapz has quit [Quit: trapz]
<octachron>
indeed, this is not possible; contrarily simply adding a change_layout function to each ArrayN submodule works
<n4323>
ok. i guess what i don't see is if that function would have a more meaningful type than the chained function you wrote before...
richi235 has quit [Ping timeout: 240 seconds]
<n4323>
i think i get it now. the chained function's type is exactly the same as the type of the new proposed functions. so while one can get the same functionality by writing the chained functions by hand, the provided ArrayN.change_layout would show in their type that the same rank comes out as goes in. this latter property is not true for genarray, where the rank is only known at runtime.
trapz has joined #ocaml
<leah2>
does ocaml have a mechanism to compile different code according to the ocaml version?
<theblatt1>
leah2: no
theblatt1 is now known as theblatte
<octachron>
n4323, precisely: the functions arrayN_of_genarray can raise an Invalid_argument exception in the general case, but this exception never happens for change_layout_N
<octachron>
leah2, however there are preprocessors that implements conditional compilation
<leah2>
yeah, i think i dont want to complicate this more. thx :)
trapz has quit [Quit: trapz]
trapz has joined #ocaml
zpe has quit [Remote host closed the connection]
zpe has joined #ocaml
zpe has quit [Read error: Connection reset by peer]
zpe has joined #ocaml
taostein has quit [Quit: taostein]
_andre has quit [Ping timeout: 240 seconds]
_andre has joined #ocaml
Sim_n has joined #ocaml
dhil has joined #ocaml
dhil_ has joined #ocaml
dhil_ has quit [Remote host closed the connection]
Simn has quit [Ping timeout: 264 seconds]
StatelessCat has quit [Quit: WeeChat 1.7]
BitPuffin|osx has joined #ocaml
StatelessCat has joined #ocaml
jao has joined #ocaml
jnavila has quit [Quit: It was time]
sh0t has joined #ocaml
jabroney has joined #ocaml
shinnya has joined #ocaml
sz0 has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 268 seconds]
flx has joined #ocaml
mattg_ has joined #ocaml
flux has quit [Read error: Connection reset by peer]
mattg has quit [Ping timeout: 255 seconds]
lopex has quit [Ping timeout: 255 seconds]
mattg_ is now known as mattg
flx is now known as flux
jeffmo has quit [Ping timeout: 255 seconds]
stephe_ has joined #ocaml
stephe has quit [Ping timeout: 255 seconds]
stephe_ is now known as stephe
lopex has joined #ocaml
jeffmo has joined #ocaml
cheater2 has joined #ocaml
cheater2_ has quit [Ping timeout: 255 seconds]
arcetera has quit [Ping timeout: 255 seconds]
arc- has joined #ocaml
taostein has joined #ocaml
MorTal1ty has quit [Ping timeout: 255 seconds]
cartwright has quit [Ping timeout: 255 seconds]
MorTal1ty has joined #ocaml
silver has quit [Read error: Connection reset by peer]
cartwright has joined #ocaml
govg has joined #ocaml
zpe has quit [Remote host closed the connection]
ygrek_ has quit [Ping timeout: 240 seconds]
sh0t has quit [Quit: Leaving]
marsam has joined #ocaml
trapz has quit [Quit: trapz]
trapz has joined #ocaml
mengu_ has quit [Remote host closed the connection]
mengu has joined #ocaml
mengu has quit [Ping timeout: 260 seconds]
kakadu has joined #ocaml
MercurialAlchemi has joined #ocaml
BitPuffin|osx has quit [Ping timeout: 240 seconds]
ygrek has quit [Remote host closed the connection]
frefity has joined #ocaml
ygrek has joined #ocaml
rand__ has joined #ocaml
<Sim_n>
https://realworldocaml.org/v1/en/html/classes.html mentions how to use "object types as interfaces" and how flexible it ought to be, but when my actual class declares a method that is not on the "interface" type, the compiler complains. What am I missing here?
Sim_n is now known as Simn
<Drup>
Simn: I'm not sure I understand, can you show an example ?
dhil has quit [Ping timeout: 256 seconds]
<Simn>
Ah, it works if I make the extra methods private.