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
Haudegen has quit [Remote host closed the connection]
dtornabene has quit [Ping timeout: 240 seconds]
troydm1 has quit [Quit: What is Hope? That all of your wishes and all of your dreams come true? To turn back time because things were not supposed to happen like that (C) Rau Le Creuset]
FreeBirdLjj has joined #ocaml
BitPuffin has quit [Remote host closed the connection]
isd has joined #ocaml
troydm has joined #ocaml
<orbifx> Renamed to Bijection. Documented exceptions, `add` behaviour`, changed to OrderedType.compare. Renamed main signature to S.
gtrak has joined #ocaml
<orbifx> Basically all things discussed on the mailing list, except the rest of the interface.
FreeBirdLjj has quit [Ping timeout: 248 seconds]
FreeBirdLjj has joined #ocaml
zolk3ri has quit [Quit: leaving]
FreeBirdLjj has quit [Ping timeout: 260 seconds]
orbifx has quit [Ping timeout: 256 seconds]
FreeBirdLjj has joined #ocaml
gtrak has quit [Ping timeout: 240 seconds]
gtrak has joined #ocaml
pierpa has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 248 seconds]
shinnya has quit [Ping timeout: 252 seconds]
FreeBirdLjj has joined #ocaml
mfp has quit [Ping timeout: 252 seconds]
<companion_cube> ✔
keep_learning has joined #ocaml
Chobbes has quit [Ping timeout: 240 seconds]
FreeBirdLjj has quit [Ping timeout: 248 seconds]
FreeBirdLjj has joined #ocaml
gentauro has quit [Ping timeout: 245 seconds]
FreeBirdLjj has quit [Ping timeout: 256 seconds]
gentauro has joined #ocaml
isd has quit [Ping timeout: 245 seconds]
isd has joined #ocaml
FreeBirdLjj has joined #ocaml
sh0t has quit [Remote host closed the connection]
Chobbes has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 256 seconds]
baboum has quit [Ping timeout: 252 seconds]
baboum has joined #ocaml
zmt00 has quit [Quit: Leaving]
zmt00 has joined #ocaml
isd has quit [Quit: Leaving.]
shinnya has joined #ocaml
gtrak has quit [Ping timeout: 245 seconds]
baboum has quit [Quit: WeeChat 2.0.1]
govg has joined #ocaml
jao has quit [Ping timeout: 260 seconds]
groovy2shoes has joined #ocaml
shinnya has quit [Ping timeout: 240 seconds]
mbuf has joined #ocaml
pierpa has quit [Quit: Page closed]
spew has joined #ocaml
sapristi has quit [Remote host closed the connection]
sapristi has joined #ocaml
gentauro has quit [Ping timeout: 240 seconds]
spew has quit [Remote host closed the connection]
spew has joined #ocaml
gentauro has joined #ocaml
spew has quit [Ping timeout: 256 seconds]
sapristi_ has joined #ocaml
sapristi has quit [Remote host closed the connection]
bartholin has quit [Ping timeout: 256 seconds]
nullifidian_ has quit [Ping timeout: 260 seconds]
sapristi_ has quit [Ping timeout: 240 seconds]
nullifidian_ has joined #ocaml
nullifidian_ has quit [Ping timeout: 248 seconds]
nullifidian_ has joined #ocaml
MercurialAlchemi has joined #ocaml
mrgrieves has joined #ocaml
nullifidian_ has quit [Ping timeout: 252 seconds]
jimmyrcom has quit [Ping timeout: 248 seconds]
Guest23076 has joined #ocaml
nullifidian_ has joined #ocaml
andreas_ has joined #ocaml
bartholin has joined #ocaml
cuicui has joined #ocaml
Guest23076 is now known as Haudegen
AltGr has joined #ocaml
cbot_ has quit [Quit: Leaving]
sapristi has joined #ocaml
mfp has joined #ocaml
argent_smith has joined #ocaml
zpe has joined #ocaml
zpe_ has joined #ocaml
zpe has quit [Read error: Connection reset by peer]
kini has quit [Quit: No Ping reply in 180 seconds.]
gikiam1 is now known as gikiam
<_xvilka_> hi
<_xvilka_> what line should I add in jbuilder jbuild file to link my application with Lwt_preemptive?
<_xvilka_> by default it gives error "No implementations provided for the following modules: Lwt_preemptive referenced in ..."
kini has joined #ocaml
mk9 has joined #ocaml
mk9 has quit [Remote host closed the connection]
<_xvilka_> oh, nevermind
<_xvilka_> just lwt.preemptive
<orbifx[m]> xvilka: added lwt in libraries?
mk9 has joined #ocaml
mengu has joined #ocaml
infinity0_ has joined #ocaml
infinity0_ has quit [Changing host]
infinity0 is now known as Guest75619
infinity0 has joined #ocaml
zolk3ri has joined #ocaml
<remix2000> Hi! How to map nested lists properly? Like `List.map (fun x -> (fun y -> Fn.id) x) xs`, but without that whole mess :P
<reynir> List.map (List.map (fun x -> ...)) xss ?
orbifx1 has joined #ocaml
mk9_ has joined #ocaml
<zozozo> hey guys, what's the situation of opam for windows currently ?
mk9_ has quit [Client Quit]
mk9 has quit [Read error: Connection reset by peer]
mk9 has joined #ocaml
_andre has joined #ocaml
mk9_ has joined #ocaml
Haudegen has quit [Remote host closed the connection]
mk9 has quit [Ping timeout: 268 seconds]
mk9_ is now known as mk9
mengu has quit [Read error: Connection reset by peer]
mengu has joined #ocaml
rgrinberg has quit [Quit: Connection closed for inactivity]
mk9 has quit [Quit: mk9]
jao has joined #ocaml
kakadu has joined #ocaml
kakadu has quit [Remote host closed the connection]
kakadu has joined #ocaml
zpe_ has quit [Remote host closed the connection]
zpe has joined #ocaml
zpe has quit [Remote host closed the connection]
zpe has joined #ocaml
<_xvilka_> orbifx[m]: added lwt.preemptive
<remix2000> What's the best easy-to-use library for 3D graphics + input handling library at the moment? Should I go with previously mentioned TSDL... plus some kind of OpenGL wrapper? Is there something like GLUT in OPAM?
<octachron> tsdl + tgl should work
<octachron> ( If you want to write hundred of lines of code to display a triangle, I also have an Ocaml vulkan binding )
zolk3ri has quit [Remote host closed the connection]
zolk3ri has joined #ocaml
nore_ has joined #ocaml
gtrak has joined #ocaml
<remix2000> octachron: tgls in OPAM?
<octachron> yes
nore has quit [Quit: WeeChat 1.8]
nore_ is now known as nore
Haudegen has joined #ocaml
orbifx1 has quit [Quit: coming back]
mbuf has quit [Quit: Leaving]
orbifx has joined #ocaml
zpe has quit [Remote host closed the connection]
zpe has joined #ocaml
zpe has quit [Ping timeout: 268 seconds]
mk9 has joined #ocaml
<remix2000> octachron: Is there an easier solution? I don't need to deal with low-level things… :(
gtrak has quit [Ping timeout: 240 seconds]
gtrak has joined #ocaml
jao has quit [Ping timeout: 252 seconds]
gentauro has quit [Ping timeout: 240 seconds]
mengu has quit [Read error: Connection reset by peer]
mengu has joined #ocaml
letoh has quit [Ping timeout: 248 seconds]
gentauro has joined #ocaml
zpe has joined #ocaml
<octachron> remix2000, which low-level thing? If tlgs is too low-level, there is also lablgl which is opengl 1, so no shader but also no vbo, no fbo and thus an easier to use API
zpe has quit [Remote host closed the connection]
zpe has joined #ocaml
mbuf has joined #ocaml
<remix2000> octachron: I found some code that draws a colored triangle. Too many boilerplate I think… https://github.com/dbuenzli/tgls/blob/master/test/trigl4.ml
<zolk3ri> minimal xD
<octachron> This looks like the normal amount of boilerplate when using opengl ≥ 3.0
zpe has quit [Ping timeout: 248 seconds]
<octachron> OpenGl/Vulkan tends to become more and more biased towards advanced uses on each iteration
<octachron> example at hand, this is the equivalent Vulkan code: https://github.com/Octachron/olivine/blob/master/examples/triangle.ml
BitPuffin has joined #ocaml
<remix2000> octachron: This code is intended to hack American nuclear weaponry?
<octachron> Note that this is mostly setting up opengl/vulkan which takes a large amount of code, after the initial boilerplate using simple feature is much more reasonable
<octachron> remix2000, like I said, lablgl is far easier to use if you don't need any modern opengl features (and if your performance need are low/moderate)
gtrak has quit [Quit: WeeChat 2.0.1]
<ansiwen[m]> I have a question that seems like having an obvious answer, but I'm unable to see it: It's about partial evaluation of functors. I have a functor Make2(XX:Xx)(YY:Yy) and I want a functor Make(XX:Xx) that is an alias for Make2(XX)(My_yy). How is the correct syntax for expressing that?
<ansiwen[m]> Basically I want Make() to use a "default" YY.
<octachron> module Make(X: sx) = Make2(X)(My_yy) ?
<orbifx> ansiwen[m]: why not define `module Default = Make2(XX)(YY)` ?
<orbifx> or what octachron said if you want to keep X as a variant.
<ansiwen[m]> Yes, XX must stay a variant...
Jesin has quit [Quit: Leaving]
<ansiwen[m]> Make(XX) already exists, but I want to extend the interface in a backwards compatible way, with a second functor parameter, and if you use the old functor, it should use the old module for YY that it used, befor I made it a parameter...
<ansiwen[m]> octachron: hmm... I though I tried that... let's try again
<ansiwen[m]> octachron: it complains, that instead of "=" it expects a ":"
<ansiwen[m]> octachron: important to note probably, that's in an .mli file.
dogui_ has quit [Ping timeout: 256 seconds]
<octachron> yes, in a mli file,you need to indicate the signature. Did you define a module type for the result of the functor?
dogui has joined #ocaml
zpe has joined #ocaml
<octachron> If yes, what you want is something like module type s = sig module F(X:Xx): "Result_type with … " where `…` corresponds to all constraints added by the My_yy module.
<ansiwen[m]> well, the result of the two functors would be the same, right? so I would just copy it from the old Make()
<ansiwen[m]> and I have to define the actiual relation between Make and Make2 in the corresponding .ml file, although it is so trivial? so your line "module Make(X: sx) = Make2(X)(My_yy)" would have to go into the .ml file?
<ansiwen[m]> octachron: ^^^
<octachron> ansiwen[m], it depends you could have a functor with type "Make2(X:sx)(Y:sy): s with type t = X.t and type r = Y.t"
<octachron> then you need to be substitute Y by My_yy in the with constraints
<octachron> and yes, my previous answer was for at the module level (aka the ml file)
<ansiwen[m]> octachron: hmm... not sure I understand... how can I substitute Y in the with constraints?
<ansiwen[m]> octachron: ok, let me show you the actual code, on sec...
mbuf has quit [Quit: Leaving]
zpe has quit [Remote host closed the connection]
<ansiwen[m]> octachron: so, I want to parameterize this module definition here: https://github.com/inhabitedtype/ocaml-webmachine/blob/master/lib/webmachine.ml#L36 as a parameter in this functor: https://github.com/inhabitedtype/ocaml-webmachine/blob/master/lib/webmachine.ml#L174
<ansiwen[m]> octachron: I already defined a module type "Date_sig" for that.
<ansiwen[m]> octachron: so, now I want to extend that functor to Make2(IO:IO)(DATE:Date_sig)
gtrak has joined #ocaml
<octachron> And you have a default date implementation, well you should first write the Make2 functor and its result signature
<ansiwen[m]> octachron: and add a functor Make(IO:IO) that will evaluate to Make2(IO)(Util.Date), while Util.Date is the old (default) module
<octachron> You will probably end up with something like "Make2(IO:IO)(Date:Date_sig): S with type +'a io = 'a IO.t and type date = Date.t"
spew has joined #ocaml
mk9 has quit [Read error: Connection reset by peer]
<octachron> then the specialized module type would be something like 'Make(IO:IO): S with +'a io = 'a IO.t and type date = Utils.Date.t"
Nazral has quit [Quit: leaving]
<ansiwen[m]> octachron: https://pastebin.com/yrHcSTGC
shinnya has joined #ocaml
gtrak has quit [Quit: WeeChat 2.0.1]
gtrak has joined #ocaml
FreeBirdLjj has joined #ocaml
<ansiwen[m]> octachron: ok, I seem to have it working!
ski has joined #ocaml
letoh has joined #ocaml
<octachron> ansiwen[m], great
* ansiwen[m] sent a long message: ansiwen[m]_2018-02-26_14:31:49.txt <https://matrix.org/_matrix/media/v1/download/matrix.org/OjJNKLHDMkMslTOPwHMpaBPw>
<ansiwen[m]> octachron: in the ml file I have:
<ansiwen[m]> module Make2(IO:IO)(DATE:Util.Date_sig) = struct ... end
<ansiwen[m]> module Make(IO:IO) = Make2(IO)(Util.Date_default)
<ansiwen[m]> octachron: thanks a lot!
<ansiwen[m]> octachron: and if you think I can simplify that, I'm happy to hear that
Haudegen has quit [Read error: Connection reset by peer]
Jesin has joined #ocaml
maattdd_ has joined #ocaml
Haudegen has joined #ocaml
Khady has quit [Ping timeout: 248 seconds]
Khady has joined #ocaml
sh0t has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 245 seconds]
mengu has quit [Remote host closed the connection]
maattdd_ has quit [Ping timeout: 256 seconds]
shinnya has quit [Ping timeout: 252 seconds]
malc_ has joined #ocaml
jao has joined #ocaml
rwmjones|AFK is now known as rwmjones
orbifx has quit [Ping timeout: 252 seconds]
orbifx has joined #ocaml
orbifx1 has joined #ocaml
orbifx has quit [Ping timeout: 240 seconds]
al-damiri has joined #ocaml
orbifx1 has quit [Ping timeout: 240 seconds]
Jesin has quit [Quit: Leaving]
TC04 is now known as TC01
sapristi has quit [Ping timeout: 248 seconds]
govg has quit [Ping timeout: 245 seconds]
Haudegen has quit [Remote host closed the connection]
gentauro has quit [Ping timeout: 265 seconds]
gentauro has joined #ocaml
TheLemonMan has joined #ocaml
zpe has joined #ocaml
zpe has quit [Ping timeout: 252 seconds]
mk9 has joined #ocaml
mk9 has quit [Client Quit]
orbifx1 has joined #ocaml
cuicui has quit [Quit: leaving]
orbifx1 has quit [Ping timeout: 256 seconds]
Haudegen has joined #ocaml
jmiven has quit [Quit: co'o]
jmiven has joined #ocaml
dedgrant has joined #ocaml
kakadu has quit [Quit: Konversation terminated!]
orbifx1 has joined #ocaml
nicoo has quit [Remote host closed the connection]
nicoo has joined #ocaml
kakadu has joined #ocaml
jack5638 has quit [Ping timeout: 248 seconds]
orbifx1 has quit [Ping timeout: 240 seconds]
jack5638 has joined #ocaml
TheLemonMan has quit [Quit: "It's now safe to turn off your computer."]
jao has quit [Remote host closed the connection]
pierpa has joined #ocaml
mk9 has joined #ocaml
mk9 has quit [Quit: mk9]
mk9 has joined #ocaml
mengu has joined #ocaml
nicoo has quit [Ping timeout: 255 seconds]
nicoo has joined #ocaml
jnavila has joined #ocaml
sapristi has joined #ocaml
mm_ has joined #ocaml
<mm_> Hi. I have some problems with merlin. Merlin is showing me a lots of bugs in my file (mostly "unbound variable") but I can compile that project without any problems. Can it be some bugs in merlin ?
mengu has quit [Remote host closed the connection]
zpe has joined #ocaml
<Fardale> mm_: did you use multiple file, or external library ?
<mm_> Fardale: external library in oasis project. But I've put everyting into _oasis file
argent_smith has quit [Quit: Leaving.]
mk9 has quit [Quit: mk9]
<Fardale> And you have a .merlin file too ?
shinnya has joined #ocaml
<mm_> Fardale: oh...no I don't have. Can I generate it somehow ?
<Fardale> I don't use oasis, but maybe it can generate the file
<Fardale> jbuilder do it for you for exemple
<companion_cube> oasis can't
<companion_cube> no one wrote the corresponding plugin afaik
<mm_> what are the main differences between jbulder and oasis?
<mm_> Maybe I should move from oasis to jbulder
<companion_cube> jbuilder is much more modern… but still a bit unstable
<companion_cube> well if you don't have too much myocamlbuild.ml magic it should be reasonably easy
<mm_> I must say that starting with Ocaml is not as easy as it should be. I've choose Ocaml as a additional language to my Elixir...and it should be easyer.
zpe has quit [Remote host closed the connection]
zpe has joined #ocaml
zpe has quit [Ping timeout: 240 seconds]
<companion_cube> Elixir is much, much younger
<mm_> and more advanced in terms of tools, usability and libs :D
<mm_> Can I generate new project from jbuild (with .merlin file) ?
<companion_cube> yes, jbuilder generates .merlin files properly
<companion_cube> mm_: younger languages usually have an edge for this
<companion_cube> 30 years of hindsight
<companion_cube> (but merlin doesn't have an equivalent in the elixir world, does it?)
<mm_> Elixir have Credo and Alchemy so it does.
<mm_> It would be easyer with F# but last time I've seen windows on my screen over 10 years ago.
jimmyrcom has joined #ocaml
<companion_cube> wait, isn't Elixir dynamically typed?
orbifx has joined #ocaml
<mm_> yes it is. It have spec almost like a Clojure but it is dynamically typed...which is not as big problem as in (for example) Python. Elixir have very powerfull pattern matching system.
<mm_> This is the reason why I need somethin like a Ocaml. I've tried Rust but for me it is not as functional as I like.
<orbifx> mm_: interesting to hear. Some days, I wonder if I'm missing out with Rust. They hype it a lot. But hopefully it will save us from C++ :P
<mm_> Rust is still better then Go. I've worked with Go when Python was not enought... It there any job market for Ocaml? Or it is complelty dead :)
Denommus has joined #ocaml
jnavila has quit [Remote host closed the connection]
AltGr has left #ocaml [#ocaml]
xfbs has joined #ocaml
spew has quit []
<orbifx> mm_: wouldn't say completely dead. Heard of jobs in London and New York.
<gtrak> mm_: we hire in NYC and Baltimore: https://www.arena.io/about/careers.html
<mm_> how about Ocaml future? There is a ReasonML so maybe that will be the new spark of life. I need it for data processing maybe with a pinch of AI.
<gtrak> We ended up going straight react (plus flow after a few months) because the initial Reason experiment wasn't straightforward enough /shrug
<gtrak> hope to circle back around if that project grows in complexity
<gtrak> bucklescript is still early days, it doesn't support opam, and we use Jane St Core/Async, which it also doesn't support.
<Drup> gtrak: js_of_ocaml supports reason, core, async and is stable
<gtrak> maybe we'll try that first, then :-), haven't seen any experience reports
mk9 has joined #ocaml
<Drup> gtrak: you haven't seen any because it's been used in production by a lot of people for more than 5 years.
<gtrak> yea, but we're more interested in leveraging JS libraries than writing all our own stuff.
<Drup> what do you need, specifically ?
<gtrak> To write commodity frontend code the least painful way possible right now.
<Drup> No, I meant, do you have specific libraries that you really want ?
<gtrak> React is the most important one at the moment. We have a node.js passwordless auth lib that's probably more trouble than it's worth but we haven't gotten around to rewriting in ocaml yet.
dh_work has joined #ocaml
<Drup> I wonder at which point the project to write an OCaml version of React is. Not that it's really needed to write frontend code in OCaml, but I guess it would convince many people.
<gtrak> I think having a middleware-style http lib would make that a lot easier.
xfbs has quit []
<Drup> gtrak: that's not frontend :p
<gtrak> oh yea, I couldn't care less about it being an ocaml implementation, but I like leveraging 3rd party react components. (well, we use node.js and would rather not, since the rest of our backend is ocaml and python ;)
mk9 has quit [Quit: mk9]
<Drup> Your setup looks ... interesting. For lovecrathian values of interesting
<gtrak> microservices? /shrug
gtrak has quit [Ping timeout: 252 seconds]
mm__ has joined #ocaml
mm__ is now known as Guest41968
mm_ has quit [Ping timeout: 240 seconds]
sapristi has quit [Quit: Leaving]
spew has joined #ocaml
gtrak has joined #ocaml
RomanZ5 has joined #ocaml
Rome has quit [Read error: Connection reset by peer]
<gtrak> yea, but you can't really get away from node for frontend, and you can't really get away from python for data-science.
<dh_work> yes you can, there's matlab
* dh_work hides
<gtrak> but that's just java :D
<dh_work> matlab's far worse than java
<gtrak> ah I guess it's C++ too. True, it's good for matrix stuff but not much else.
<dh_work> until you want to have some code that's polymorphic over matrix size
<dh_work> or at least, that was my first and last major experience with matlab, though it was a while aog
rwmjones is now known as rwmjones|AFK
nullifidian_ has quit [Ping timeout: 248 seconds]
kakadu has quit [Remote host closed the connection]
gtrak has quit [Ping timeout: 245 seconds]
malc_ has quit [Quit: ERC (IRC client for Emacs 25.0.50.2)]
Guest41968 has quit [Ping timeout: 240 seconds]
nullifidian_ has joined #ocaml
<orbifx> the activities involved in making the so-called web-apps make my palm want to meet my forehead.
<orbifx> And it seems with every day that passes, new excuses are found to entrench these activities deeper and deepr.
* orbifx sighs
cbot has joined #ocaml
johnelse has quit [Ping timeout: 240 seconds]
johnelse has joined #ocaml
andreas_ has quit [Quit: Connection closed for inactivity]