adrien changed the topic of #ocaml to: Discussions about the OCaml programming language | http://www.ocaml.org | OCaml 4.08 release notes: https://caml.inria.fr/pub/distrib/ocaml-4.08/notes/Changes | Try OCaml in your browser: http://try.ocamlpro.com | Public channel logs at http://irclog.whitequark.org/ocaml
averell has joined #ocaml
mfp has quit [Ping timeout: 246 seconds]
kvda has joined #ocaml
kvda has quit [Client Quit]
kvda has joined #ocaml
keep_learning_M has quit [Quit: This computer has gone to sleep]
kvda has quit [Read error: Connection reset by peer]
hio has quit [Quit: Connection closed for inactivity]
AtumT_ has quit [Quit: AtumT_]
ygrek has quit [Ping timeout: 272 seconds]
kvda has joined #ocaml
kvda has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
andreas303 has quit [Ping timeout: 260 seconds]
andreas303 has joined #ocaml
jao has quit [Ping timeout: 244 seconds]
kvda has joined #ocaml
kvda has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
nicooo has joined #ocaml
nicoo has quit [Ping timeout: 260 seconds]
kvda has joined #ocaml
gravicappa has joined #ocaml
kvda has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
kvda has joined #ocaml
kvda has quit [Client Quit]
kvda has joined #ocaml
sagax has joined #ocaml
kvda has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
kvda has joined #ocaml
narimiran has joined #ocaml
PenultimateUnuse has joined #ocaml
PenultimateUnuse has quit [Remote host closed the connection]
readyready15728 has joined #ocaml
<readyready15728> Hi there. I used to use OCaml for Project Euler solutions and crappy (but high-performance) fractal code. I was impressed with the speed and expressiveness. I'd like to return to the OCaml world because Scala, while having similar performance and expressiveness, annoys me with its lack of a package manager. What's hot in the OCaml world these days?
<xvilka> readyready15728: in what meaning "hot"
<readyready15728> Popular, widely used
<readyready15728> I remember Batteries and made some use of that
<readyready15728> It looks like ReasonML is also hot these days
Jeanne-Kamikaze has quit [Quit: Leaving]
_whitelogger has joined #ocaml
keep_learning_M has joined #ocaml
<dmbaturin> Well, Reason is just an alternative syntax.
<dmbaturin> readyready15728: You may want to check out Containers as an alternative to batteries.
<readyready15728> dmbaturin, thx
<dmbaturin> readyready15728: What's the issue with using maven as a scala package manager? Just curious, I've been out of touch with the JVM world for a long time.
<readyready15728> dmbaturin, Well I think most people use sbt but it just annoys me because especially for pedagogic purposes as I'm rusty on FP so I want to minimize the amount of stuff I have to learn
<readyready15728> Perhaps I will get more into Scala after relearning more FP
<readyready15728> Another thing I noticed is that the Scala REPL is kind of sluggish
<dmbaturin> readyready15728: Also, BuckleScript the cross-compiler to JS is quite cool (Facebook Messenger is made with it), though working with existing libs is far from seamless yet. JSOO is simpler to use for JSifying existing projects, but it works on bycode so the JS it makes is unreadable.
<readyready15728> dmbaturin, That's nice because I still hate JS and think it's a bit of joke even as of ES6 and later
<readyready15728> It looks like ReasonML can do React
<dmbaturin> There are also https://github.com/ocaml-cross/opam-cross-windows and -cross-android/-cross-ios toolchains for automatic cross-compiling.
<dmbaturin> Well, it's ReasonML + BuckleScript stack. You can take ReasonML out of the equation if you don't like its syntax (I don't, for example).
ggole has joined #ocaml
Haudegen has joined #ocaml
barockobamo has joined #ocaml
<xvilka> note that BuckleScript is behind OCaml recent developments
<xvilka> so I wouldn't call it "hot"
<xvilka> (disclosure: I hate JS and everything related)
<dmbaturin> Yeah, that too. It's kinda doomed to be behinf the recent developments since it's a fork.
<dmbaturin> You have to keep forks in sync.
amiloradovsky has quit [Remote host closed the connection]
amiloradovsky has joined #ocaml
Vikfret has quit [Quit: Leaving]
freyr69 has joined #ocaml
bartholin has quit [Remote host closed the connection]
kvda has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<Leonidas> readyready15728: Batteries is not hot, it is barely maintained. Gasche keeps it alive these days to avoid breaking a lot of software.
<readyready15728> Leonidas, I'm out of the loop then
<sagax> hi all!
mfp has joined #ocaml
<xvilka> readyready15728: today's hottest hot is OCaml 4.08 migration, ppx (https://github.com/ocaml-ppx), dropping ulex&camlp4&camlp5, migrating to dune buildsystem (from oasis, ocamlbuild, etc), improving https://github.com/owlbarn/owl, improving the
<xvilka> duniverse and community-developed packages: https://github.com/ocaml-community
<readyready15728> I feel like a dumbass ... couldn't install utop and it turned out it was because I didn't do eval `opam config env`
<readyready15728> I thought that having the scripts set up in ~/.opam was good enough for some reason
<readyready15728> Opinions on F# here?
<xvilka> IMHO: A bleak and cheap copy of OCaml
<readyready15728> I like the idea of operator overloading
<readyready15728> I did fractal code in OCaml years ago involving Big_int and it was torture
<readyready15728> But that's from Batteries ... idk what's in vogue these days
<Leonidas> readyready15728: You can have Big_int.(a + b) in OCaml as well.
<xvilka> readyready15728: you can visit also https://discuss.ocaml.org to check the discussions in a bit more modern format
keep_learning_M has quit [Quit: This computer has gone to sleep]
<Armael> nowadays you should use zarith for arbitrary precision integers
<Leonidas> readyready15728: So apparently there is tooling for F# but it seems geared more towards people coming from C# and wishing to use a functional language. Whereas OCaml is more interesting for people coming from Haskell or SML.
<readyready15728> Leonidas, wait so I can use + for any arbitrary-precision integers?
<readyready15728> Armael, yeah I saw that
<Leonidas> readyready15728: sure, if you open the (+) operator for it.
<readyready15728> Leonidas, I never used anything on .NET
<Leonidas> I talked to F# users and they were not amazed by how well the .NET open source stuff worked at that time.
<readyready15728> Leonidas, never did much of anything with Haskell either. The thing I like about OCaml and others like it is the impure approach. I think pure FP is silly.
<Leonidas> with .NET framework, core clr and all of this stuff in flux
<readyready15728> No idea personally
<Leonidas> I think pure FP is amazing.
<readyready15728> I use pure FP when it's convenient and chuck it out otherwise
<readyready15728> Haskell forces you; OCaml doesn't
<flux[m]> I bet F# would feel amazing if a project required me to work on the .NET environment..
<readyready15728> The trifecta of imperative, OO and functional is the best way to go about things for my part
<readyready15728> F# seems to stack up nicely against OCaml in the benchmarks game which strikes me funny because .NET is based on bytecode and OCaml compiles to an actual binary but even the benchmarks game people advise taking their results with a grain of salt so idk
<Leonidas> that "native" binaries are faster than VM is a myth that hasn't been true for a long, long time by now.
<readyready15728> Leonidas, true with JIT and whatever other optimizations out there that exist I can believe that. Counterintuitive though.
<Leonidas> but I assume F# has the same problem as Clojure: the underlying ecosystem is predominantly imperative so a lot of the libraries and APIs are imperative so they feel absolutely awful and out of place. Which is why Clojure has a lot of small "wrapping libraries" which make the APIs more functional.
<readyready15728> Oh this is nice. Not quite as good as proper overloading but should probably save my wrists a lot of strain: https://stackoverflow.com/questions/10498456/overloading-in-ocaml
<dmbaturin> F# had no proper modules last I checked, not sure if anything had changed.
<Leonidas> readyready15728: "as good as proper overloading", I sort of disagree that overloading is good
<dmbaturin> Which is why modular implicits still aren't there I guess. Who actually wants overloading? ;)
<Leonidas> modular implicits might get you closer to a disciplined variant of "overloading" though.
<dmbaturin> Functors do it better.
<Leonidas> modular implicits aren't there because we haven't had the tech to clone leo white 5x yet :p
<readyready15728> Leonidas, I think it can be abused. I remember that the late Terry A. Davis really didn't like the use of bit-shift operators for I/O. But generally I think it is a good option to have.
<Leonidas> "Functors do it better." sounds like a slogan for an OCaml themed shirt :D
<readyready15728> Be careful where you play this because of Terry's penchant for profanity / racism: https://www.youtube.com/watch?v=Ov1ygUMOBIs
<xvilka> readyready15728: also there is a work in progress OCaml port of the Category Theory for Programmers book: https://github.com/hmemcpy/milewski-ctfp-pdf/issues/169 + https://github.com/hmemcpy/milewski-ctfp-pdf/pull/201
<readyready15728> xvilka, Interesting, but if I am required to use category theory to get something done I'm being asked too much. I like the fact that in OCaml I can just use references instead mucking about with category theory.
<Drup> Still think this is like trying to fold origami with a screwdriver
<xvilka> Drup: what are you talking about? Category theory?
<Drup> doing category theory in OCaml.
<xvilka> Drup: why?
<dmbaturin> Wait, folding origami with a screwdriver is not how it's supposed to be done?
<readyready15728> If I want to force myself to jump through hoops to get something done, I solve math and logic puzzles. (Raymond Smullyan is my favorite.) If I want to solve a programming task I want every approach possible without any artificial restrictions.
<Drup> All the language properties are wrong. This is simply not the right language for this. You don't have typeclasses, you don't have theorem for frees, your compiler ensures neither totally nor terminaison
<Drup> OCaml is not made to write math
<Drup> anyway, don't have the time for this debate. But if you are going to learn "math for programming", you might as well use a language where it's appropriate and beneficial (Haskell/Agda/Idris, in that instance)
<readyready15728> A friend of mine used to use Haskell and ultimately found it impractical but thought that the approach required was an interesting mental exercise
<Drup> (I also think the utility of category theory for programming is extremely highly overblown, and most of the "style of thinking" come from plain algebra, without all the "highly abstract nonsense"™ of cat theory, but that ship has sailed)
<readyready15728> Like I said earlier, the more paradigms, the better
<Drup> dmbaturin: I could see a case for hammers, but not so much for screwdrivers :p
<readyready15728> It's like the idea of combined arms: in principle any medieval battle could have been won by committing enough infantry, cavalry or archers to the fray but when they all work together things are much easier
<dmbaturin> Drup: I haven't tried yet. ;)
<dmbaturin> readyready15728: You may want to look at Coq, Agda and other dependently-typed languages/proof assistants.
<dmbaturin> Coq generates OCaml or Haskell code. There's a verified C compiler written in it.
<readyready15728> dmbaturin, That's true but Drup might still be right about OCaml's unsuitability for expressing some mathematical concepts. The situation could be analogous to a higher-level language transpiling to unreadable JavaScript. But I don't know personally.
<Drup> Well, Coq certainly doesn't generate readable OCaml :D
<Leonidas> hmm, note/brr sound really interesting.
<dmbaturin> It even uses Obj.magic!
<readyready15728> Drup, lmao but what about Haskell?
<Drup> No idea
<Leonidas> dmbaturin: As long as it is not ~~impure~~ :p
<readyready15728> impure, adj.: doing something useful
<dmbaturin> Leonidas: When is Obj.magic impure? :)
<xvilka> dmbaturin: it is pure magic
<octarin> Obj.magic : 'a -> 'b
<octarin> I should make tshirts out of this
<dmbaturin> xvilka: That's what I mean, it has no observable side effects... until it's too late. :)
jaar has joined #ocaml
jaar_ has joined #ocaml
<Drup> I have an Obj.magic tshirt
<Drup> from ahrefs :p
<dmbaturin> Drup: I magine an Obj.magic shirt as one that may turn into a hat after you put it on.
troydm has quit [Ping timeout: 272 seconds]
Haudegen has quit [Quit: Bin weg.]
troydm has joined #ocaml
hio has joined #ocaml
troydm has quit [Ping timeout: 272 seconds]
troydm has joined #ocaml
troydm has quit [Ping timeout: 248 seconds]
troydm has joined #ocaml
troydm has quit [Ping timeout: 245 seconds]
troydm has joined #ocaml
troydm has quit [Ping timeout: 268 seconds]
troydm has joined #ocaml
Haudegen has joined #ocaml
troydm has quit [Ping timeout: 258 seconds]
troydm has joined #ocaml
jao has joined #ocaml
troydm has quit [Ping timeout: 245 seconds]
troydm has joined #ocaml
ygrek has joined #ocaml
zolk3ri has joined #ocaml
troydm has quit [Ping timeout: 258 seconds]
jao has quit [Ping timeout: 246 seconds]
spew has joined #ocaml
ygrek has quit [Ping timeout: 245 seconds]
troydm has joined #ocaml
troydm has quit [Ping timeout: 245 seconds]
ygrek has joined #ocaml
ygrek has quit [Ping timeout: 245 seconds]
AtumT has joined #ocaml
mk__ has joined #ocaml
<mk__> What are the use-cases of Functoria (https://github.com/mirage/functoria) other than Mirage?
Vikfret has joined #ocaml
<Drup> So, keep in mind it was built for Mirage first. That being said, 1) we had an experiment with Owl 2) https://github.com/Drup/functoria-lua
<Drup> I also have https://github.com/Drup/functoria-lwt , which is "functoria for lwt-based apps" which is not mirage-bound
<mk__> Is Functoria used for writing configuration files?
<Drup> Functoria is the DSL that powers the Mirage config files, yes
<Drup> (well, and the tooling around)
<mk__> That Lua interpreted is interesting. Is it like a Lua Jit, which loads/interprets Lua code in runtime?
<Drup> The lua example uses https://github.com/lindig/lua-ml, which is a modular lua interpreter. It's main fancyness is the fact that its lego-ified
<Drup> the paper that describes lua-ml: https://www.cs.tufts.edu/~nr/pubs/maniaws-abstract.html
<dmbaturin> cminusminus.org is a dead link.
<Drup> lot's of things are dead about the lua-ml project, I'm not responsable for it, It was just an amusing application case for functoria :3
<companion_cube> in practice, it's probably best to use bindings to the actual lua interpreter or luajit :p
<mk__> That is useful, Lua interpereter is a good extension to have in many configurable applications
<companion_cube> I wish someone would write as good a gradual type system for lua as typescript for JS :p
<Drup> companion_cube: lua-ml has some interesting advantages if you need embedding into an OCaml app
<Drup> But it's definitely more of a tech showcase, at least until someone puts lot's of work into it.
<companion_cube> and the drawback of being separately maintained 🤷
<Drup> companion_cube: well, luajit has that problem as well, and at least, lua-ml's code might be understandable, unlike lua-jit :p
<companion_cube> the standard lua interpreter doesn't have these
<companion_cube> luajit also has the advantage of being damn fast
<Drup> Anyway, that was really not the point. It's simply a good demonstration of interesting things you can do with functoria
<companion_cube> sure
<companion_cube> you should do the same with my datalog lib ;)
<companion_cube> apparently it's of interest to people, for reasons that escape me
<Drup> is it lego-ified with lot's of functors ?
<companion_cube> no, it could be though? :p
<companion_cube> although 4.08 has once again made me wary of using functors -_-
<Drup> if it isn't, no point to use functoria
<dmbaturin> companion_cube: What broke in 4.08?
<companion_cube> oh, they removed module aliases in some cases
<Drup> oh come on!
<companion_cube> so my tower of functorized stuff doesn't compile anymore
<companion_cube> and I have no idea how to fix it 😒
<Drup> dmbaturin: We fixed a soundness bug
<Drup> companion_cube: remind me in 3.5 days, I'll take a look
<companion_cube> deal
iovec has joined #ocaml
<Drup> dmbaturin: basically, you are not allowed anymore to have module aliases from inside the body of a functor which points to the argument *and which are exported*
<Drup> It's a pretty specific situation, and it was really easy to break soudness with that
<Drup> The fact that it affects neither mirage nor tyxml should tell you quite a lot about how weird it is to have that in your code
<Drup> (also, for the non initiated: break soudness = make segfaults)
<companion_cube> pretty specific, meh
amiloradovsky has quit [Ping timeout: 245 seconds]
* Drup is kink-shaming companion_cube's functor code.
<companion_cube> seriously the fact I ran into that while trying to keep my code as simple as possible, worries me, is all
<dmbaturin> If you did what Drup describes, is it really as simple as possible. :)
<Drup> Well, it just means you failed at keeping your code simple :D
<companion_cube> also I think the error message pops up in the wrong place, but well.
andreas303 has quit [Remote host closed the connection]
<Armael> it's an error message involving modules after all :^)
<dmbaturin> ...now all is left to make fileutils win32-compatible again is a strange cp bug.
<dmbaturin> Or so I hope. :)
andreas303 has joined #ocaml
freyr69 has quit [Remote host closed the connection]
webshinra has quit [Remote host closed the connection]
zolk3ri has quit [Remote host closed the connection]
webshinra has joined #ocaml
oni-on-ion has quit [Remote host closed the connection]
oni-on-ion has joined #ocaml
khodzha has quit [Remote host closed the connection]
andreas303 has quit [Remote host closed the connection]
SpiceGuid has joined #ocaml
gareppa has joined #ocaml
gareppa has quit [Client Quit]
andreas303 has joined #ocaml
jaar_ has quit [Quit: Leaving]
jaar has quit [Quit: Leaving]
tane has joined #ocaml
ziyourenxiang_ has quit [Ping timeout: 245 seconds]
SpiceGuid has quit [Quit: ChatZilla 0.9.93 [SeaMonkey 2.49.4/20180713174829]]
ygrek has joined #ocaml
barockobamo has quit [Remote host closed the connection]
dtornabene has joined #ocaml
Serpent7776 has joined #ocaml
mk__ has quit [Ping timeout: 260 seconds]
iovec has quit [Quit: Connection closed for inactivity]
<Leonidas> count on companion_cube to write code that is affected by it :p
<companion_cube> well module aliases help a lot, so… :/
<Leonidas> I agree, most of my code starts with lots of aliases
<companion_cube> the thing here is that I tried to have functors like `module Foo(A:ARG) : S with module A = A` and similar things
<companion_cube> so as to have one big functor instead of 5 every time
<Leonidas> I actually want `import module as foo` and `from module import (...)` to not have to deal with names like Cohttp_lwt_unix
<companion_cube> module CU = Cohttp_lwt_unix, yeah ^^'
<Leonidas> inb4 someone says "there's an ppx for that"
uzuki has quit [Quit: Reboot, pyon~]
Haudegen has quit [Quit: Bin weg.]
<Drup> Leonidas: well, the "as" is really just a module alias
<Drup> (we do not have anything for selective module hiding ... but we might)
<companion_cube> Leonidas: "why don't you add another fragile dependency for a bit of convenience?"
<Drup> Such a negative outlook on (OCaml) things.
Wooble has left #ocaml ["WeeChat 2.5"]
dtornabene has quit [Quit: Leaving]
dtornabene has joined #ocaml
_whitelogger has joined #ocaml
jao has joined #ocaml
ggole has quit [Quit: Leaving]
tane has quit [Quit: Leaving]
jao has quit [Ping timeout: 245 seconds]
vicfred has joined #ocaml
jrslepak has quit [Quit: leaving]
gravicappa has quit [Ping timeout: 268 seconds]
jrslepak has joined #ocaml
jnavila has joined #ocaml
rosterok has joined #ocaml
<Leonidas> I hope the new ppx lib finally stabilizes the ppx situation somewhat.
<rosterok> are algebraic effects still something being considered? it's been a while since i last looked at ocaml.
Algebr has joined #ocaml
dtornabene has quit [Quit: Leaving]
Jesin has joined #ocaml
uzuki has joined #ocaml
Haudegen has joined #ocaml
dedgrant has joined #ocaml
dedgrant_ has joined #ocaml
dedgrant_ has quit [Remote host closed the connection]
narimiran has quit [Ping timeout: 245 seconds]
Jesin has quit [Quit: Leaving]
themsay has joined #ocaml
<Leonidas> yes
jnavila has quit [Ping timeout: 246 seconds]
Serpent7776 has quit [Quit: leaving]
Jesin has joined #ocaml
mk__ has joined #ocaml
Algebr has quit [Ping timeout: 248 seconds]
jao has joined #ocaml
wagle has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
wagle has joined #ocaml
ygrek has quit [Ping timeout: 248 seconds]
Algebr has joined #ocaml
Algebr is now known as Guest32464
<dmbaturin> If anyone here told me about opam-cross-windows rather than I found it on my own, you are responsible for the night I spent researching windows API docs to fix a bug in win32unix.c ;)
dhil has joined #ocaml
mk__ has quit [Ping timeout: 260 seconds]
Guest32464 has quit [Ping timeout: 245 seconds]
Haudegen has quit [Ping timeout: 268 seconds]
jao has quit [Ping timeout: 246 seconds]
micro has quit [Ping timeout: 245 seconds]
micro has joined #ocaml
spew has quit [Quit: Connection closed for inactivity]
Jesin has quit [Quit: Leaving]
Jesin has joined #ocaml
Jesin has quit [Excess Flood]
Jesin has joined #ocaml