zolk3ri has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
mk9 has quit [Remote host closed the connection]
Chargen_ has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 276 seconds]
FreeBirdLjj has joined #ocaml
mk9 has joined #ocaml
<reynir>
Maybe the universe will find a way to delay multicore somehow ;)
FreeBirdLjj has quit [Ping timeout: 264 seconds]
<Leonidas>
reynir: there is a strugatzky story called "Definitely Maybe" in english that is about a mysterious force interfering with the discovery of some monumental scientific advance. This is how I feel about multicore and mudular implicits :D
Chargen_ has quit [Quit: Leaving]
<Leonidas>
companion_cube: what is curly?
FreeBirdLjj has joined #ocaml
<Leonidas>
ShalokShalom2: we use ppx_let from JST, it is not entirely do notation but similar in some ways.
<Leonidas>
tizoc: I get the exact error in merlin. Not in the compiler though.
<Leonidas>
(cannot locate deriver X for every X I try)
<orbifx>
companion_cube: is it possible to pin the latest alpha of containers?
FreeBirdLjj has quit [Ping timeout: 246 seconds]
<orbifx>
I should rephrase, I presume it is, wondering what the URL is
whoman has quit [Remote host closed the connection]
whoman has joined #ocaml
FreeBirdLjj has joined #ocaml
_andre has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 240 seconds]
xfbs has joined #ocaml
kerrhau has quit [Ping timeout: 240 seconds]
ziyourenxiang has joined #ocaml
whoman has quit [Remote host closed the connection]
whoman has joined #ocaml
sz0 has joined #ocaml
kakadu has joined #ocaml
Orion3k has joined #ocaml
zpe has quit [Remote host closed the connection]
zpe has joined #ocaml
reynir has joined #ocaml
reynir has quit [Client Quit]
zpe has quit [Ping timeout: 256 seconds]
<xfbs>
Newcomer here. What do I do when opam can't install merlin? I'm getting the error "[ERROR] The compilation of cppo failed at "jbuilder build -p cppo -j 4"."
BitPuffin has joined #ocaml
<kakadu>
you can run opam with -v and see the full log what has gone wrong
zpe has joined #ocaml
zpe_ has joined #ocaml
zpe has quit [Read error: Connection reset by peer]
<kakadu>
should it be `-predicate custom_ppx` the same as in _tags below?
baboum has joined #ocaml
reynir has quit [Client Quit]
reynir has joined #ocaml
webshinra has quit [Remote host closed the connection]
Orion3k has quit [Quit: Leaving]
FreeBirdLjj has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 264 seconds]
FreeBirdLjj has quit [Ping timeout: 265 seconds]
TarVanimelde has joined #ocaml
whoman has quit [Remote host closed the connection]
whoman has joined #ocaml
dhil has joined #ocaml
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 246 seconds]
FreeBirdLjj has joined #ocaml
silver has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 268 seconds]
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 248 seconds]
Haudegen has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 240 seconds]
TarVanimelde has quit [Quit: TarVanimelde]
FreeBirdLjj has joined #ocaml
Haudegen has joined #ocaml
orbifx1 has joined #ocaml
Haudegen has quit [Read error: Connection reset by peer]
FreeBirdLjj has quit [Ping timeout: 240 seconds]
sz0 has quit [Quit: Connection closed for inactivity]
spew has joined #ocaml
FreeBirdLjj has joined #ocaml
dhil has quit [Ping timeout: 268 seconds]
FreeBirdLjj has quit [Ping timeout: 256 seconds]
spew has quit [Read error: Connection reset by peer]
FreeBirdLjj has joined #ocaml
<tizoc>
Leonidas: something I noticed is that I only have this problem when using jbuilder, I can compile my program fine using ocamlbuild
<tizoc>
(I started updating dependencies on my project and upgrading the build process to use jbuilder, thats when I started having this problem)
FreeBirdLjj has quit [Ping timeout: 246 seconds]
zpe_ has quit [Remote host closed the connection]
<Leonidas>
tizoc: oh, that's excellent to know. Could you maybe post the .merlin PPX line that works and the PPX line from jbuilder that doesn't for comparison?
sh0t has joined #ocaml
<Leonidas>
maybe it is not a merlin bug but a jbuilder bug. or merlin not running the PPX for some reason.
xfbs has quit []
<Leonidas>
(thanks for posting in the ticket)
<tizoc>
Leonidas: the main difference between the two files is that in the original one I have entryes like "PKG ppx_deriving.std", "PKG cconv.ppx", etc, while in the one generated by jbuilder I have a single entry for ppx that points to the binary generated by jbuilder using ppx_driver
xfbs has joined #ocaml
<Leonidas>
ah, right, jbuilder links them together :|
FreeBirdLjj has joined #ocaml
<tizoc>
FLG -ppx '<path to combined ppx binary/ppx.exe --as-ppx'
webshinra has joined #ocaml
ShalokShalom has joined #ocaml
ShalokShalom2 has quit [Quit: Konversation terminated!]
mk9 has quit [Quit: mk9]
xfbs has quit [Client Quit]
mk9 has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 248 seconds]
<tizoc>
Leonidas: yojson works fine here, is your version up to date?
<Leonidas>
tizoc: 4.2.1 afaik
<tizoc>
I'm only having this issue with cconv.ppx and I think it is related to the -linkall thing, I just haven't tried changing that (it uses oasis for building and it makes me dizzy)
<tizoc>
Leonidas: try upgrading (if it is not the latest) and deleting _build/default/.ppx
<tizoc>
then run jbuilder again
<Leonidas>
uhh, both ppx_deriving and ppx_deriving_yojson are latest versions
<Leonidas>
otherwise it does not work at all because ppx_deriving and type_conv don't work at all together
mk9_ has joined #ocaml
mk9 has quit [Ping timeout: 276 seconds]
mk9_ is now known as mk9
dhil has joined #ocaml
shinnya has joined #ocaml
zpe has joined #ocaml
mk9 has quit [Quit: mk9]
mk9 has joined #ocaml
govg has quit [Ping timeout: 260 seconds]
jbrown has joined #ocaml
baboum has quit [Quit: WeeChat 2.0.1]
<companion_cube>
Leonidas: curly is a dead simple wrapper around curl
<companion_cube>
orbifx: you should be able to pin it, yeah?
xfbs has joined #ocaml
<orbifx>
companion_cube: I upgraded to it
<xfbs>
Possibly a #DumbQuestion but what is the difference between List and ListLabels? I saw that they have similar (same?) functions and so I checked the source, and ListLabels just opens List. https://github.com/ocaml/ocaml/blob/trunk/stdlib/listLabels.ml
<companion_cube>
xfbs: well, ListLabels exposes functions with labels in their signature
<companion_cube>
look at the .mli
<companion_cube>
always look at the mli
<xfbs>
Gotcha. #RookieMistake. So a label is like a tag for a type?
<companion_cube>
it's a label on a function parameter
<companion_cube>
like `move point ~x ~y`
<companion_cube>
that you could write `move ~y ~x point ` and it would still work
<companion_cube>
whereas positional arguments are not very clear in this case
cow-orker has joined #ocaml
<xfbs>
Ohhhhh so basically a named parameter
sillyotter has joined #ocaml
<companion_cube>
yes!
FreeBirdLjj has joined #ocaml
sillyotter has quit [Quit: WeeChat 1.4]
FreeBirdLjj has quit [Ping timeout: 248 seconds]
<xfbs>
Damn. 30 minutes into OCaml, liking it a lost thus far. I'm guessing that the `|>` syntax in Elixir was copied from OCaml, and rust borrowed the Some x / None stuff?
<xfbs>
s/lost/lot
<companion_cube>
|> comes from F# originally, I think (or SML)
<companion_cube>
but it's quite standard in OCaml too now
<companion_cube>
Some/None is probably borrowed from OCaml, yes
orbifx has quit [Quit: WeeChat 2.0.1]
<xfbs>
Well, I was kinda expecting the OCaml syntax to be a bit obscure but I was surprised by the fact that it's not that new after all.. I guess a lot of languages are influenced by ML/OCaml..
FreeBirdLjj has joined #ocaml
<companion_cube>
yes, in a way
<Leonidas>
yeah, there is also let in JS
FreeBirdLjj has quit [Ping timeout: 246 seconds]
sepp2k has joined #ocaml
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 248 seconds]
orbifx has joined #ocaml
shinnya has quit [Ping timeout: 255 seconds]
moei has joined #ocaml
sz0 has joined #ocaml
aciniglio has joined #ocaml
mbuf has quit [Quit: Leaving]
<tizoc>
Leonidas: companion_cube: ok, "linkall" was the issue (in the case of cconv.ppx at least, ppx_deriving_yojson works just fine here, couldn't reproduce your problem)
<tizoc>
I just have to figure out how to make oasis build cconv fine with linkall enabled for the cmxa file without breaking other parts
<tizoc>
also, damn, jbuilder is much faster than what I had before
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Client Quit]
orbifx1 has quit [Quit: Quit]
<companion_cube>
I have no idea :/
dhil has quit [Ping timeout: 268 seconds]
dhil has joined #ocaml
FreeBirdLjj has joined #ocaml
jbrown has quit [Ping timeout: 246 seconds]
<tizoc>
companion_cube: fixed, will submit a PR soon
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 246 seconds]
zpe has quit [Remote host closed the connection]
baboum has joined #ocaml
Denommus has joined #ocaml
Denommus has quit [Client Quit]
<ShalokShalom>
xfbs: the functional world is quite compact
<ShalokShalom>
same as in the imperative languages, where most is from C
Denommus has joined #ocaml
<ShalokShalom>
Haskell as an examples, shares so much with ML, that some people often count it to the family
<ShalokShalom>
*example
Denommus has quit [Client Quit]
<ShalokShalom>
Both, F# and Haskell share the same type system (System-F) which is a superset of the HM type system here in OCaml.
<ShalokShalom>
And the devs in Haskell and F# shared the same company for a while. F# and OCaml are anyway very deeply connected.
Denommus has joined #ocaml
<xfbs>
I did notice that OCaml look a little similar, but I don't know haskell well enough, kinda just starting to get into things.. :)
<ShalokShalom>
I asked for more in the Slack channel
jnavila has joined #ocaml
<Drup>
ShalokShalom: the only "systemF" in this github thread is a pun on a system programing lib for F# :3
Denommus has quit [Ping timeout: 268 seconds]
<xfbs>
Can someone help me mentally model how I can use OCaml to solve a (numerical) problem?
<Drup>
ShalokShalom: one simple way to know if your system contains systemF is the ability to write a function that like that: let mapTupPoly : 'b 'c . ('a . 'a -> 'a) -> 'b * 'c -> 'b * 'c = fun f (x,y) -> (f x, f y)
<Drup>
(the notation "'a ." is ocaml's version of ∀)
<Drup>
xfbs: don't ask to ask, just ask your question directly :)
<Trel>
I noticed that using opam, a number of things wouldn't build/install because they check to make sure you're not root. (Which is fine until you do it in a docker container). I found a way around it myself, but is there an official way?
zolk3ri has joined #ocaml
<kakadu>
Folks, does HOPE have published proceedings in the same manner as ML workshop has?
ygrek has joined #ocaml
kakadu_ has joined #ocaml
kakadu has quit [Ping timeout: 268 seconds]
cranmax has quit [Quit: Connection closed for inactivity]
_andre has quit [Quit: leaving]
Misha_B has joined #ocaml
<Misha_B>
is it possible to have a function that converts a int to a float if it's a int, but does nothing if it's a float
<Misha_B>
something like
<Misha_B>
let to_float i : 'a =
<Misha_B>
match i with
<Misha_B>
| int -> float_of_int i
<Misha_B>
| float -> float i;;
<ShalokShalom>
xfbs: I just heard by Yaron that OCaml had the operator |! for the functionality of |> and simply changed it to line up with F#
<Misha_B>
have a function that get's the area of a circle from it's radius
<Misha_B>
but can be input with int and float
<Drup>
Right
<Drup>
so the only way in ocaml to have inputs that are "either int of float" is to create a new sum types
<Misha_B>
ok thanks
Misha_B has quit [Quit: WeeChat 1.4]
<flux>
in that case you will also need to return either int, float, or an instance of that sum type. there is a solutions for doing this properly (modules) and then a tricky solution (gadts) and then an OO solution ;). but, most likely, if the function is small, you might end up writing it twice; or just always using (say) floats.
<Drup>
flux: he's gone :D
<flux>
oh. twas a fast one.
ShalokShalom2 has joined #ocaml
JeanMax has quit [Remote host closed the connection]
ShalokShalom has quit [Ping timeout: 276 seconds]
Jesin has quit [Quit: Leaving]
<ShalokShalom2>
Leonidas: Drup: The ppx for monad do notations is meant some days ago is ppx_lwt - is it used a lot in the OCaml world?
<ShalokShalom2>
reynir: you were also interested ^
<Drup>
ShalokShalom2: that's only for lwt, not for all monads, and it's not really a do notation
<Drup>
I hope it's used, I wrote most of it :>
<ShalokShalom2>
haha
<xfbs>
I think I finally got ocaml working on travis :p
<ShalokShalom2>
Drup: Would you compare them to computation expressions?
<ShalokShalom2>
xfbs: Congratulations :D
<Drup>
ShalokShalom2: it's a bit similar, yeah
Jesin has joined #ocaml
<Drup>
companion_cube has a library thing that are sort of like computational expressions too
<companion_cube>
hmmm?
<ShalokShalom2>
oh?
<ShalokShalom2>
Drup: quite similar, while only for lwt, yes?
<ShalokShalom2>
and there are other libs for other Monads?
kerrhau has joined #ocaml
Trel has left #ocaml [#ocaml]
cbot has joined #ocaml
david4 has joined #ocaml
Haudegen has quit [Read error: Connection reset by peer]
<david4>
hi
<david4>
I'm new here
<simpson>
No worries. I think that everybody is new at some point.
<david4>
cool
<xfbs>
Btw, I'm new here to. :)
<xfbs>
*too
<david4>
I'm a lisp (clojure) developer studying ml through ocaml. Does anyone recommend source for me to study?
<thizanne>
real world ocaml isnt bad
<thizanne>
you can find it on google
<david4>
I'm reading through Jane Street's Dune/JBuilder, at the moment
<thizanne>
(get the new version, with ppx instead of camlp4, ask if you have no idea)
<thizanne>
(you'll probably go quickly through the first chapters, but after that there are some more advanced topics)
<david4>
Yes, I love that text, but I was looking specifically for complete projects
jnavila has quit [Quit: Konversation terminated!]
jnavila has joined #ocaml
<ianconnolly>
what sort of background do you have, project-wise?
argent_smith has quit [Quit: Leaving.]
<ianconnolly>
there's a bunch of facebook OSS ocaml, but it's all static analysis/compiler/PL-y, which wouldn't be much use to you if you mainly have a web-y background
noplamodo_ has joined #ocaml
pierpa has joined #ocaml
noplamodo has quit [Ping timeout: 248 seconds]
<david4>
ian, I'm interested in build and testing systems
<david4>
my background is mostly writing testing infrastructure and tools
jnavila has quit [Ping timeout: 252 seconds]
<david4>
I don't have a web-y background
<ianconnolly>
oh cool! unfortunately i don't know of anything particularly interesting in that space
<david4>
how about you?
<david4>
I think static analysis is super cool, but unfortunately I'm a self taught programmer missing core knowledge necessary to make good in that sort of area