adrien changed the topic of #ocaml to: Discussions about the OCaml programming language | http://www.ocaml.org | OCaml 4.06.0 release notes: https://caml.inria.fr/pub/distrib/ocaml-4.06/notes/Changes | Try OCaml in your browser: http://try.ocamlpro.com | Public channel logs at http://irclog.whitequark.org/ocaml
baboum has joined #ocaml
clog has joined #ocaml
mk9 has quit [Ping timeout: 248 seconds]
kakadu has quit [Remote host closed the connection]
clog has quit [Ping timeout: 240 seconds]
sh0t has quit [Remote host closed the connection]
nomicflux has joined #ocaml
mfp has quit [Ping timeout: 252 seconds]
cmk_zzz_ has joined #ocaml
nomicflux has quit [Quit: nomicflux]
isd has quit [Quit: Leaving.]
baboum has quit [Quit: WeeChat 2.0.1]
zolk3ri has quit [Quit: leaving]
mbuf has joined #ocaml
shinnya has quit [Ping timeout: 268 seconds]
lopex has quit [Quit: Connection closed for inactivity]
ygrek has joined #ocaml
clog has joined #ocaml
nomicflux has joined #ocaml
clog has quit [Ping timeout: 265 seconds]
nomicflux has quit [Client Quit]
clog has joined #ocaml
nomicflux has joined #ocaml
govg has joined #ocaml
zv has quit [Ping timeout: 256 seconds]
opios has quit [Ping timeout: 256 seconds]
nomicflux has quit [Quit: nomicflux]
mbuf has quit [Quit: Leaving]
ome has quit [Quit: Connection closed for inactivity]
pierpa has quit [Quit: Page closed]
keep_learning has joined #ocaml
letoh has quit [Read error: Connection reset by peer]
zv has joined #ocaml
groovy2shoes has quit [Quit: moritura te salutat]
groovy2shoes has joined #ocaml
jimmyrcom has quit [Ping timeout: 248 seconds]
MercurialAlchemi has joined #ocaml
spew has joined #ocaml
nahra has quit [Remote host closed the connection]
mengu has joined #ocaml
letoh has joined #ocaml
mengu_ has joined #ocaml
mengu has quit [Ping timeout: 240 seconds]
spew has quit [Ping timeout: 276 seconds]
mk9 has joined #ocaml
cbot has quit [Quit: Leaving]
Haudegen has joined #ocaml
mk9 has quit [Quit: mk9]
AltGr has joined #ocaml
cuicui has joined #ocaml
lopex has joined #ocaml
mfp has joined #ocaml
andreas_ has joined #ocaml
dhil has joined #ocaml
argent_smith has joined #ocaml
jnavila has joined #ocaml
mk9 has joined #ocaml
dhil has quit [Ping timeout: 276 seconds]
mk9 has quit [Remote host closed the connection]
mk9 has joined #ocaml
dhil has joined #ocaml
ygrek has quit [Ping timeout: 256 seconds]
ziyourenxiang has joined #ocaml
infinity0 has quit [Ping timeout: 256 seconds]
infinity0_ has joined #ocaml
infinity0_ has quit [Changing host]
infinity0 has joined #ocaml
pyx has joined #ocaml
pyx has quit [Client Quit]
zolk3ri has joined #ocaml
jnavila has quit [Quit: Konversation terminated!]
jnavila has joined #ocaml
demonimin has joined #ocaml
mengu_ has quit [Remote host closed the connection]
tarptaeya has joined #ocaml
reynir is now known as _reynir
TarVanimelde has joined #ocaml
_reynir is now known as reynir
tarptaeya has quit [Ping timeout: 268 seconds]
webshinra has quit [Ping timeout: 256 seconds]
mk9_ has joined #ocaml
webshinra has joined #ocaml
mk9 has quit [Ping timeout: 256 seconds]
mk9_ has quit [Client Quit]
_andre has joined #ocaml
mk9 has joined #ocaml
mk9_ has joined #ocaml
mk9 has quit [Ping timeout: 248 seconds]
mk9_ is now known as mk9
mk9 has quit [Quit: mk9]
Haudegen has quit [Remote host closed the connection]
malc_ has joined #ocaml
mk9 has joined #ocaml
TarVanimelde has quit [Quit: TarVanimelde]
tarptaeya has joined #ocaml
cuicui has quit [Read error: Connection reset by peer]
cuicui has joined #ocaml
mk9 has quit [Quit: mk9]
mk9 has joined #ocaml
shinnya has joined #ocaml
tarptaeya has quit [Quit: Leaving]
tarptaeya has joined #ocaml
Haudegen has joined #ocaml
remix2000 has joined #ocaml
<remix2000> Hiyas! What's the best introductory book (MOBI/EPUB) for learning OCaml? I have some basic knowledge of functional programming and I'm good at imperative/OO programming.
nomicflux has joined #ocaml
rwmjones is now known as rwmjones|meeting
maattdd_ has joined #ocaml
dhil has quit [Ping timeout: 256 seconds]
nomicflux has quit [Quit: nomicflux]
shinnya has quit [Ping timeout: 256 seconds]
<remix2000> Armael: Which one would you recommend?
<Armael> Real World OCaml is good and freely available online; I have also heard very good things about OCaml from the Very Beginning, but it is not free
<Armael> note that there's a new version of real world ocaml in preparation, with updates regarding the ecosystem & libraries
<Armael> you may want to have a look, although it's still in beta
gem has joined #ocaml
<gem> Hey!
ontologiae has joined #ocaml
webshinra has quit [Ping timeout: 256 seconds]
<reynir> Hi gem
<AltGr> is caml.inria.fr down ?
dhil has joined #ocaml
<reynir> Ah, noticed the docs seemed down <https://caml.inria.fr/pub/docs/manual-ocaml/libref/>
Haudegen has quit [Remote host closed the connection]
webshinra has joined #ocaml
Haudegen has joined #ocaml
sapristi has joined #ocaml
spew has joined #ocaml
sh0t has joined #ocaml
spew has quit [Ping timeout: 256 seconds]
<sapristi> hello
<sapristi> I'm trying to use a functor that would output a module with a type defined as abstract in the signature, but when applied the type would be known
<sapristi> I think that's what is done e.g in Batteries.Set with the lines
<sapristi> (*Breaking the abstraction*)
<sapristi> external t_of_impl : implementation -> t = "%identity"
<sapristi> external impl_of_t : t -> implementation = "%identity"
<sapristi> type implementation = elt Concrete.set
<sapristi> but I don't understand how that's supposed to work nor do I manage to replicate this so that it would work
<sapristi> can anyone give me a hand ?
<sapristi> oh
<sapristi> I guess I should have read module declarations further
MercurialAlchemi has quit [Ping timeout: 256 seconds]
<sapristi> ok so I'm still stuck
<companion_cube> "%identity" is dark magic, you shouldn't use it unless you really know what you're doing
<companion_cube> look at the standard Map module?
<companion_cube> Map.S.t is abstract
<companion_cube> hmmm wait
<companion_cube> you could have `module Make(X:Foo): S with type t = X.t list` (if `S.t` is normally abstract)
tarptaeya has quit [Remote host closed the connection]
nullifidian__ has joined #ocaml
nullifidian_ has quit [Read error: Connection reset by peer]
rwmjones|meeting is now known as rwmjones
<sapristi> hmm yes companion_cube
<sapristi> I'm then trying to use higher order modules with sets of different elements, but that seems out of reach
zolk3ri has quit [Remote host closed the connection]
zolk3ri has joined #ocaml
<Drup> sapristi: can you show what you have tried ?
mk9_ has joined #ocaml
<sapristi> well it's a bit messy drup
mk9 has quit [Ping timeout: 256 seconds]
mk9_ is now known as mk9
<Drup> that's alright
mk9 has quit [Client Quit]
<sapristi> https://pastebin.com/U625ZKTj here's what I'm working on
<sapristi> I'm somehow trying to reproduce the example in https://realworldocaml.org/v1/en/html/first-class-modules.html
<sapristi> he's using a function let build_instance
<sapristi> config
<sapristi> (module Q : Query_handler with type config = a)
<sapristi> (type a)
<sapristi> =
<sapristi> but I can't do that exactly since when I create an instancce I don't have a witness of an element of the set, since the set is created empty
<sapristi> oh
dhil has quit [Ping timeout: 256 seconds]
tarptaeya has joined #ocaml
dhil has joined #ocaml
spew has joined #ocaml
<sapristi> hmm ok it can't work the same way the example does
<sapristi> since the types of the elements needs to be apparent and so the types of my modules are not the same
<Drup> sapristi: Could you paste the module type Reaction.REAC ?
<sapristi> you can find the full source here : https://github.com/sapristi/alife/tree/adv_reacs/src/bacterie
<Drup> Grmbl, I would have prefer a self contained example that shows your problem, not the whole application. ^^
<Drup> If I can decipher your code correctly, you are trying to dynamically select a module depending on some (runtime, I suppose) parameter
<sapristi> yeah I guess that ^^
BitPuffin has joined #ocaml
<sapristi> I think I have found a way, I cannot put the modules in an array but the number of modules is fixed so that's not much a problem
<Drup> And you still want the modules to have distinct (and exposed!) type qualities after you have done your selection
<Drup> equalities*
<sapristi> yes, because I need to remove elements from them
<Drup> How do you intend to select which module to use, is the parameter provided by the programmer or by something external, like a command line argument ?
<sapristi> I have a set with elements of different types unified with a sum type
<sapristi> I'll make a dummy example
<Drup> Yes, please do, it'll make things easier. :)
<sapristi> there might be some mistakes, but I have now something like this that typechecks
<sapristi> waut
<sapristi> https://pastebin.com/p0wnwdeh without comment fuckup
<Drup> And so, what do you want more on that example ?
malc_ has left #ocaml ["ERC (IRC client for Emacs 25.0.50.2)"]
<sapristi> now it's ok ^^'
voglerr has joined #ocaml
<sapristi> I was also trying to get a function such as
voglerr has quit [Remote host closed the connection]
<sapristi> fun (e : r) -> (module MYSET)
<sapristi> but that's not helpfull since the type MYSET.elt would need to be hidden
<Drup> Yes, you can do that with GADTs
<sapristi> oh ok
<Drup> hence my question on where the parameters comes from
<Drup> if it's purely runtime, GADTs do not really help
<ahf> :q!
<sapristi> hmm yes so I could define e.g ASET : MYSET with type elt = a r (and type _ r = | A : a -> a r | B : b -> b r) ?
<gem> #JOIN haskell
<Drup> Yes, that's the idea
AltGr has left #ocaml [#ocaml]
cuicui has quit [Quit: leaving]
nomicflux has joined #ocaml
nomicflux has quit [Client Quit]
maattdd_ has quit [Ping timeout: 256 seconds]
jimmyrcom has joined #ocaml
dmtd has joined #ocaml
allm7ght has joined #ocaml
jonh has joined #ocaml
Haudegen has quit [Remote host closed the connection]
dedgrant has joined #ocaml
dhil has quit [Ping timeout: 255 seconds]
cbot has joined #ocaml
bbear has quit [Remote host closed the connection]
BitPuffin has quit [Remote host closed the connection]
dhil has joined #ocaml
reynir is now known as JJAbrams
JJAbrams is now known as reynir
allm7ght has quit [Ping timeout: 260 seconds]
dhil has quit [Ping timeout: 268 seconds]
kakadu has joined #ocaml
ygrek has joined #ocaml
sapristi has quit [Quit: Leaving]
tarptaeya has quit [Quit: Leaving]
argent_smith1 has joined #ocaml
argent_smith has quit [Ping timeout: 276 seconds]
spew has quit [Read error: Connection reset by peer]
jonh has left #ocaml ["WeeChat 0.4.2"]
sz0 has joined #ocaml
barcabuona has quit [Quit: WeeChat 2.0.1]
_andre has quit [Quit: leaving]
dmtd has quit [Quit: Connection closed for inactivity]
ontologiae has quit [Ping timeout: 252 seconds]
orbifx1 has joined #ocaml
mengu has joined #ocaml
<orbifx1> heyo
xfbs has joined #ocaml
isd has joined #ocaml
jmiven_ has joined #ocaml
jmiven has quit [Ping timeout: 264 seconds]
jmiven_ is now known as jmiven
allm7ght has joined #ocaml
shinnya has joined #ocaml
argent_smith1 has quit [Quit: Leaving.]
<octachron> TIL: how to make the compiler disagree with itself: https://paste.isomorphis.me/rQM (the last two lines are … interesting)
<Drup> well done, you found a soundness bug :D
baboum has joined #ocaml
<orbifx1> Is anyone running a build server for ocaml packages?
jnavila has quit [Ping timeout: 248 seconds]
<allm7ght> hey I am trying to follow this https://janestreet.github.io/installation.html and I am getting this warning: "Warning 3: deprecated: module Core.Std [since 2017-02] Use Core. The Std sub-module is no longer needed"
<octachron> Drup, is this really a soundess bug if a valid program is rejected?
<Drup> octachron: well, sort of
jnavila has joined #ocaml
<Armael> octachron: damn, how did you find this?
<octachron> At least, the example is somehow reducible to a palatable size
<Armael> yumm
<octachron> ^ one more proof that cross product is evil
<thizanne> according to your indentation, I believe you follow some unwritten guidelines from the compiler ? :)
ygrek has quit [Ping timeout: 240 seconds]
<octachron> ypu mean chaotic indentation for chaotic times?
<orbifx1> octachron: cross product?
<octachron> orbifx1, you may know it as vector product?
<orbifx1> Ok, suspected so. So what's wrong about it?
<octachron> the strange operation that maps two 3d vectors to a vector orthogonal to the first two (if they are not colinear)
<octachron> Why do you think it only works in dimension 3?
<orbifx1> Thought you were referring to Caml's tuples.
<orbifx1> And their use.
<Drup> thizanne: witches do not embarass themselves with indentation. The void is calling, and the void does not care about your syntax.
<octachron> orbifx1, Why is it dependent on a choice of orientation of the whole space?
<orbifx1> because it's relative?! 0o
<orbifx1> Not I'm sure I'm on the same page, but rolling with it.
<Armael> >But if the product is limited to non-trivial binary products with vector results, it exists only in three and seven dimensions.
<Armael> :^) damn
andreas_ has quit [Quit: Connection closed for inactivity]
<octachron> yes, the left-hand rule could be replace with the right-hand rule and nothing would change, except the orientation of the magnetic *vector* field
<orbifx1> octachron: is there a background to all this? Some blog post, paper or something?
<octachron> orbifx1, if you have a lot of time on your hand you could read on formulations of electromagnetism in Clifford algebra
<octachron> the basic idea is that the return type of the cross product is not really a vector but a pseudo-vector (or 2-form) and those happen to be representable as vector in dimension 3
<octachron> but they follow different rules with respect to symmetry for instance
<orbifx1> This is interesting. Have been getting attracted to space & force due to quantum mechanics.
<Leonidas> ohh, ocamllex is sort of supposed to be stateless. oops.
<orbifx1> I'll start with Wikipedia's entry
<orbifx1> octachron: how or why did you get into this?
<octachron> orbifx1, a Ph.D in theoretical physics?
<orbifx1> Are you asking me? :P
<orbifx1> cool. Is it ongoing or done?
<octachron> Done, several years ago
cbot has quit [Ping timeout: 240 seconds]
<orbifx1> octachron: are you currently working on something relevant to theoretical physics?
<octachron> Hm, the bug is in fact triggered by jbuilder passing '-intf-suffix .ml' to the compiler
<octachron> orbifx1, nope
<orbifx1> octachron: good or a bad thing for you?
jnavila has quit [Remote host closed the connection]
<octachron> orbifx1, I would like to know
<octachron> it myself
<orbifx1> :)
<orbifx1> I guess (A) do you miss it and (B) do you do anything on your own?
ziyourenxiang has quit [Ping timeout: 240 seconds]
<octachron> orbifx1, not currently
moei has quit [Quit: Leaving...]
ygrek has joined #ocaml
kakadu has quit [Remote host closed the connection]
<allm7ght> is anyone here using vim with ale and merlin?
<octachron> ok, similar issue tracked at https://caml.inria.fr/mantis/view.php?id=7629
<companion_cube> allm7ght: yeah
xfbs has quit []
gem has quit [Remote host closed the connection]
gem has joined #ocaml
baboum has quit [Quit: WeeChat 2.0.1]