adrien changed the topic of #ocaml to: Discussions about the OCaml programming language | http://www.ocaml.org | OCaml 4.09 release notes: https://caml.inria.fr/pub/distrib/ocaml-4.09/notes/Changes | Try OCaml in your browser: http://try.ocamlpro.com | Public channel logs at http://irclog.whitequark.org/ocaml
smazga has quit [Quit: leaving]
oni-on-ion has joined #ocaml
jao has quit [Remote host closed the connection]
spew has quit [Quit: Connection closed for inactivity]
jao has joined #ocaml
tianon has quit [Ping timeout: 245 seconds]
sagax has joined #ocaml
tianon has joined #ocaml
tormen has joined #ocaml
tormen_ has quit [Ping timeout: 240 seconds]
jao has quit [Ping timeout: 276 seconds]
mfp has quit [Ping timeout: 265 seconds]
<rgrinberg> companion_cube: things that work on dune 1 generally work on dune 2
sagax has quit [Remote host closed the connection]
<companion_cube> well for now, I fixed 2 travis builds by adding `< "2.0"` to the dune item of their opam file :/
<companion_cube> might not be directly dune, but opam, mind you
<companion_cube> (or deps)
oxford has quit [Remote host closed the connection]
gravicappa has joined #ocaml
oxford has joined #ocaml
Jesin has quit [Ping timeout: 265 seconds]
mbuf has joined #ocaml
<rgrinberg> there are some packages that only work on 1.x, but it should be easy enough to fix them to work on 1.x and 2.x
sagax has joined #ocaml
narimiran has joined #ocaml
Haudegen has joined #ocaml
Serpent7776 has joined #ocaml
barockobamo has joined #ocaml
brettgilio has joined #ocaml
kjak has quit [Ping timeout: 240 seconds]
dborisog has joined #ocaml
bitwinery has quit [Quit: Leaving]
<Nikkel> Is it not possible to include Hashtbl with both type key and type 'a constrained?
<Nikkel> I know how to `include Hashtbl.S with type key = My_Key.t`, but I'd love constrain the contents 'a as well, so the resulting type t from the include does not need a type parameter. Currently I have to do type t' = My_Val.t t
<Nikkel> Nvm
zapashcanon[m] has quit [Remote host closed the connection]
flux has quit [Read error: Connection reset by peer]
keep-learning[m] has quit [Read error: Connection reset by peer]
rgr[m] has quit [Read error: Connection reset by peer]
prsafont[m] has quit [Remote host closed the connection]
cgenie[m] has quit [Remote host closed the connection]
peddie has quit [Write error: Connection reset by peer]
aspiwack[m] has quit [Remote host closed the connection]
otini has quit [Remote host closed the connection]
dl3br[m] has quit [Write error: Connection reset by peer]
stan[m] has quit [Remote host closed the connection]
bglm[m] has quit [Read error: Connection reset by peer]
Virgile[m] has quit [Remote host closed the connection]
aecepoglu[m] has quit [Remote host closed the connection]
regnat[m] has quit [Write error: Connection reset by peer]
smondet[m] has quit [Remote host closed the connection]
flx_ is now known as flux
hdurer[m] has quit [Remote host closed the connection]
copy` has quit [Read error: Connection reset by peer]
isaachodes[m] has quit [Remote host closed the connection]
Haudegen[m] has quit [Remote host closed the connection]
oni-on-ion has quit [Remote host closed the connection]
oni-on-ion has joined #ocaml
hdurer[m] has joined #ocaml
aspiwack[m] has joined #ocaml
flux1 has joined #ocaml
keep-learning[m] has joined #ocaml
smondet[m] has joined #ocaml
Haudegen[m] has joined #ocaml
peddie has joined #ocaml
zapashcanon[m] has joined #ocaml
copy` has joined #ocaml
bglm[m] has joined #ocaml
jimt[m] has joined #ocaml
dl3br[m] has joined #ocaml
cgenie[m] has joined #ocaml
Virgile[m] has joined #ocaml
sepp2k has joined #ocaml
prsafont[m] has joined #ocaml
otini has joined #ocaml
stan[m] has joined #ocaml
aecepoglu[m] has joined #ocaml
regnat[m] has joined #ocaml
isaachodes[m] has joined #ocaml
rgr[m] has joined #ocaml
<Leonidas> companion_cube: for me it was packages that were using jbuilder that dune 2 doesn't play well with anymore (unsurprisingly)
madroach has quit [Ping timeout: 264 seconds]
mfp has joined #ocaml
bartholin has quit [Remote host closed the connection]
Haudegen has quit [Ping timeout: 240 seconds]
madroach has joined #ocaml
_5HT has joined #ocaml
_5HT has quit []
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 245 seconds]
<porchetta> in ocaml can I define a new type inside a function? I need to restrict the type to a scope
ggole has joined #ocaml
<reynir> porchetta: You can make a local module ?
nicoo has quit [Remote host closed the connection]
nicoo has joined #ocaml
sarna has joined #ocaml
<sarna> hi, what's the state of windows support for ocaml? it's hard to google for it
jim7j1ajh is now known as jimt
<sarna> ocpwin looks pretty dead, is opam-cross-windows or fdopen's thing usable?
Haudegen has joined #ocaml
mononote is now known as monoxmpp
monoxmpp is now known as mononote
<Leonidas> oh, pfff is dead now
Haudegen has quit [Ping timeout: 265 seconds]
bartholin has joined #ocaml
spew has joined #ocaml
mbuf has quit [Quit: Leaving]
Vikfret has joined #ocaml
jao has joined #ocaml
jao has quit [Ping timeout: 276 seconds]
silver has joined #ocaml
FreeBirdLjj has joined #ocaml
Vikfret has quit [Quit: Leaving]
Serpent7776 has quit [Quit: Leaving]
Haudegen has joined #ocaml
Nahra has joined #ocaml
Nahra has quit [Changing host]
Nahra has joined #ocaml
Haudegen has quit [Ping timeout: 268 seconds]
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
stux|RC has quit [Ping timeout: 245 seconds]
jao has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 240 seconds]
iovec has joined #ocaml
Nahra has quit [Ping timeout: 265 seconds]
stux|RC has joined #ocaml
mfp has quit [Ping timeout: 246 seconds]
gareppa has joined #ocaml
Jesin has joined #ocaml
ziyourenxiang has quit [Ping timeout: 246 seconds]
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
ggole has quit [Quit: Leaving]
<oni-on-ion> sarna, ocaml has good windows support
<oni-on-ion> sarna, except Unix module (which are unix-specific of course )
<companion_cube> s/windows/cygwin/? :p
<oni-on-ion> nah. mingw compiled from source
<oni-on-ion> nowadays probably works great in WSL
<oni-on-ion> it also works in web browser, so why not =)
mfp has joined #ocaml
<Armael> I think the ocaml compiler itself has fairly good windows support, but some other parts of the ecosystem (opam?) can be lacking
<companion_cube> and many libraries, I think
<haesbaert> heya, what am I doing wrong ?
<haesbaert> module type Test = sig type t val make : unit -> t end;;
<haesbaert> module TestInt : Test = struct type t = int let make () = 5 end;;
<haesbaert> module TestStr : Test = struct type t = string let make () = "foo" end;;
<haesbaert> let l = [ TestInt.make() ; TestStr.make() ];;
<haesbaert> I basically want a module interface, then modules that implement that type, and want to mix them on a list
<haesbaert> I wanted the list to be of Test.t
<oni-on-ion> use monadic let ?
<haesbaert> what's that ? I'm under the impression what I'm trying to do is just not possible
<haesbaert> do I need to fiddle with "with type t = blabala"
<companion_cube> [ (module TestInt:Test); (module TestStr)]
<companion_cube> try that
<oni-on-ion> personally i am accustomed to using .Make as parametric module
<haesbaert> ok that works, but that is a list of modules, ont the return of make from each module
<companion_cube> ah that's different, you can't
<companion_cube> since they are distinct types
<haesbaert> ok so how do I have a type that especializes another type and they can be called from a common interface ?
<oni-on-ion> if it were parametric (Test) then i think it would be ok.
<companion_cube> `type test = T : (module Test with type t='a) * 'a -> test`
<companion_cube> ^ a GADT can be used to hide the type
<companion_cube> do we have an executable paste bin? I forgot
<haesbaert> is that a GADT ?
<companion_cube> yes
<haesbaert> lemetry to parse that
<companion_cube> give me a sec
<haesbaert> ok
<oni-on-ion> module Make(S: S) = struct ... end ;; Test.Make(..)
<haesbaert> oni-on-ion: but then each module cannot have a different definition of type t, or I read it wrong ?
<oni-on-ion> haesbaert, module type S has the type t in there, like sig type t ;; val init: string -> t end
<oni-on-ion> sry its been a couple months since i code
<haesbaert> but that gives me a module as a return
<oni-on-ion> yea modules as values. GADT might be nicer or cleaner i dont know, only famliar with haskell useage there (ive only just upgraded to 4.08)
<companion_cube> fuuu sketch.sh destroyed my code :((
<oni-on-ion> =
<oni-on-ion> o
<companion_cube> @ haesbaert
<companion_cube> !sketch = https://sketch.sh/
<ocabot> OK.
<companion_cube> !first_class_module = https://sketch.sh/s/vtkwkVyNeIhWlPkerYtIJX/
<ocabot> done.
<haesbaert> reading
<haesbaert> jesus that's complicated AF
<companion_cube> :D
<companion_cube> might be a bit overkill
<haesbaert> that's why in the end my code looks like a banch of variants and infinite matches
<haesbaert> *bunch
<companion_cube> it's complicated because you want each module to *expose* a different type
<companion_cube> you could also havea list of `unit -> unit`
<haesbaert> basically I'm writing a roguelike, and I had a module interface Actor
<oni-on-ion> so now i personally think modules may be simpler and cleaner. its a kind of pattern that shows up often too anyway
<haesbaert> then Player would be an implementatoin of Actor, Evilfoo another and so on
<oni-on-ion> this is just about the same setup i have done.
<haesbaert> but I could make Actor.t be the same type
<companion_cube> I updated it to show the simpler version with closures
<companion_cube> simpler, but less flexible
<oni-on-ion> it is good to keep Actor.t the same type because then they can all shared the actor-code. where you can have Player or Monster or etc specific code after that
<oni-on-ion> for the items its simpler, i do: type t = { kind: kind } (* and type kind = Material | Equip | Food etc *)
<haesbaert> ok but now I have to write specialized code together, think about this: is_undead : Actor.t -> bool
<haesbaert> so basically now I have need to have a huge match, right ?
<haesbaert> I wanted to write each attribute on a module specific to itself
<haesbaert> companion_cube: I appreciate but my brain cannot cope
<companion_cube> :D
<companion_cube> too much at once…
<haesbaert> I'll try to write with keeping a common Actor.t type, see how it goes
barockobamo has quit [Remote host closed the connection]
oni_on_ion has joined #ocaml
oni-on-ion has quit [Ping timeout: 250 seconds]
TC01 has quit [Ping timeout: 250 seconds]
TC01 has joined #ocaml
Haudegen has joined #ocaml
narimiran has quit [Ping timeout: 250 seconds]
kini has quit [Ping timeout: 250 seconds]
narimiran has joined #ocaml
asm89 has quit [Ping timeout: 250 seconds]
kini has joined #ocaml
asm89 has joined #ocaml
narimiran has quit [Ping timeout: 245 seconds]
<sarna> oki_on_ion: I see, thanks
gareppa has quit [Quit: Leaving]
narimiran has joined #ocaml
dborisog has quit [Ping timeout: 276 seconds]
iovec has quit [Quit: Connection closed for inactivity]
gravicappa has quit [Ping timeout: 268 seconds]
jnavila has joined #ocaml
kakadu_ has joined #ocaml
tane has joined #ocaml
jao has quit [Remote host closed the connection]
tane has quit [Quit: Leaving]
jao has joined #ocaml
jao has quit [Changing host]
jao has joined #ocaml
narimiran has quit [Ping timeout: 268 seconds]
kjak has joined #ocaml
jao has quit [Quit: ERC (IRC client for Emacs 27.0.50)]
jao has joined #ocaml
brettgilio has quit [Ping timeout: 246 seconds]
oni_on_ion has quit [Ping timeout: 250 seconds]
iovec has joined #ocaml
Haudegen has quit [Quit: Bin weg.]
vicfred has quit [Quit: Leaving]
Haudegen has joined #ocaml
kakadu_ has quit [Remote host closed the connection]
jnavila has quit [Remote host closed the connection]
ziyourenxiang has joined #ocaml
pyx has joined #ocaml
pyx has quit [Client Quit]
Haudegen has quit [Ping timeout: 265 seconds]