adrien changed the topic of #ocaml to: Discussions about the OCaml programming language | http://www.ocaml.org | OCaml 4.07.1 release notes: https://caml.inria.fr/pub/distrib/ocaml-4.07/notes/Changes | Try OCaml in your browser: http://try.ocamlpro.com | Public channel logs at http://irclog.whitequark.org/ocaml | Due to ongoing spam, you must register your nickname to talk on the channel
<cmk_zzz> if i look at older versions of lwt they do change the version in lwt.opam file. But the latest releases do not.
<cmk_zzz> downgrading lwt to 4.1.0 works. Now I can install stog. I wonder if there is a bug in the 4.2.0 lwt package
pyon has quit [Remote host closed the connection]
okuu has joined #ocaml
mfp has quit [Ping timeout: 244 seconds]
spew has quit [Quit: Connection closed for inactivity]
silver has quit [Read error: Connection reset by peer]
<oni-on-ion> ah! you know what, i got the same error now
<oni-on-ion> "Package lwt.unix found with version dev, but wanted >= 2.5"
<oni-on-ion> my immediate assumption is that dev would be a higher version than 2.5
<oni-on-ion> but then i upgraded opam just yesterday to 2.0.4 - before i was at 2.0.0~beta3 or so
okuu has quit [Quit: ERC (IRC client for Emacs 26.2)]
<oni-on-ion> and opam says "Former state can be restored with <cmd>" - but i do <cmd> and then opam says "There is nothing to do." worried now =)
<amosbird> try Some (Unix.openfile path [Unix.O_NONBLOCK; Unix.O_RDONLY] 0o0)
<amosbird> ..., how can I read this statement?
<amosbird> 0o0 ?
<amosbird> isn't that an emoji??
zapashcanon_ has quit [Quit: Cheers !]
<cmk_zzz> it is also an octal integer
<amosbird> why not just 0 then?
louisg has quit [Quit: WeeChat 1.6]
louis1 has joined #ocaml
louis1 has left #ocaml [#ocaml]
louisg has joined #ocaml
<cmk_zzz> it is representing the file permissions which are generally given in octal form. I.e. 0o660 for example
<amosbird> ok. thanks
ygrek has joined #ocaml
jao has quit [Ping timeout: 258 seconds]
zapashcanon has joined #ocaml
zapashcanon has quit [Changing host]
zapashcanon has joined #ocaml
xuib is now known as ShutUpHoff
ShutUpHoff is now known as xuib
tormen_ has joined #ocaml
tormen has quit [Ping timeout: 245 seconds]
pierpal has joined #ocaml
gravicappa has joined #ocaml
al-damiri has quit [Quit: Connection closed for inactivity]
Trinket has joined #ocaml
Birdface has joined #ocaml
Trinket has quit [Quit: Page closed]
<oni-on-ion> dune sux
<oni-on-ion> what is 'bc' in "dune build something.bc" -- is it bytecode ? whats native ? opt?
<oni-on-ion> cant find anything in docs , everything is scattered all over git anyhow
kandu_ has left #ocaml [#ocaml]
kandu has joined #ocaml
kandu is now known as Guest6346
ygrek has quit [Ping timeout: 276 seconds]
Guest6346 is now known as kandu
Birdface has quit [Ping timeout: 264 seconds]
AnAverageHuman has quit [Ping timeout: 256 seconds]
xuib has quit [Quit: xuib]
crowley95 has quit [Read error: Connection reset by peer]
crowley95 has joined #ocaml
crowley95 has quit [Read error: Connection reset by peer]
crowley95 has joined #ocaml
crowley95 has quit [Read error: Connection reset by peer]
crowley95 has joined #ocaml
crowley95 has quit [Read error: Connection reset by peer]
crowley95 has joined #ocaml
jave has quit [Ping timeout: 245 seconds]
crowley95 has quit [Read error: Connection reset by peer]
crowley95 has joined #ocaml
crowley95 has quit [Read error: Connection reset by peer]
crowley95 has joined #ocaml
crowley95 has quit [Read error: Connection reset by peer]
jave has joined #ocaml
crowley95 has joined #ocaml
crowley95 has quit [Read error: Connection reset by peer]
crowley95 has joined #ocaml
crowley95 has quit [Quit: Bye bye~]
Haudegen has joined #ocaml
<amosbird> what's opaque?
<amosbird> opaque -> int -> int -> (int * int) option
<amosbird> and what's that option..
Birdface has joined #ocaml
<oni-on-ion> got merlin ?
<vsiles> merlin would help :D option is a standard type, `type 'a option = None | Some of 'a`. Either nothing, or an element of type (int * int) in your case
<vsiles> opaque I don't have any clue without more context
freyr69 has joined #ocaml
oni-on-ion has quit [Quit: Leaving]
mfp has joined #ocaml
silver has joined #ocaml
Redfoxmoon has quit [Ping timeout: 255 seconds]
vinoski has quit [Ping timeout: 264 seconds]
vinoski has joined #ocaml
dhil has joined #ocaml
ygrek has joined #ocaml
Haudegen has quit [Read error: Connection reset by peer]
Birdface has quit [Ping timeout: 264 seconds]
Redfoxmoon has joined #ocaml
Guest11648 has joined #ocaml
ansiwen_ is now known as ansiwen
FliiFe has quit [Quit: The Lounge - https://thelounge.chat]
Redfoxmoon has quit [Changing host]
Redfoxmoon has joined #ocaml
carlosdagos has quit [Quit: WeeChat 2.4]
madroach has quit [Ping timeout: 264 seconds]
ShalokShalom has joined #ocaml
<ShalokShalom> hi there
<ShalokShalom> is there a let it crash for ocaml?
<zozozo> ShalokShalom: what's a let it crash ?
<ShalokShalom> How Erlang does it
<zozozo> I don't know Erlang, :p
<ShalokShalom> Respectively its library, OTP :)
<ShalokShalom> Its simply restarting processes, faulth tolerance
<ShalokShalom> Instead of error handling them
<Drup> ShalokShalom: small advice, if you ask questions, don't assume that people can guess the context. Provide the needed informations.
<ShalokShalom> let it crash is a quite unique name
<ShalokShalom> if you dont know it, chances are huge that you cant answer anyway
<ShalokShalom> thanks
<Drup> my advice was more general
<ShalokShalom> some friend told me, you can use it with the new MC-OCaml
<ShalokShalom> i see
<ShalokShalom> this actually describes it quite nice, I think: https://ninenines.eu/articles/dont-let-it-crash/
<Drup> I do know what let-it-crash is, but since I don't know your context (distributed ? multi-process ? using OTP ?) I can't answer you, and given your attitude, I'm not particularly encouraged to
<ShalokShalom> In general.
<ShalokShalom> And how can you use OTP in OCaml?
<ShalokShalom> I simply meant, can I use "let it crash" in Ocaml.
<Drup> there are experimental libraries to disguise an OCaml program as an OTP actor.
<ShalokShalom> Fine, thanks.
<ShalokShalom> As one single actor?
<Drup> but that's probably not what you want. There are not many libraries for distributed systems in OCaml
<ShalokShalom> I was more searching into something that can replace Erlang.
<ShalokShalom> I like the benefits of OCaml, combined with that one of Erlang.
<Drup> There is no general answer to your question
<ShalokShalom> I see.
<ShalokShalom> I hope for some library that simply implements that for OCaml. At least, it seems like MC-OCaml do that.
<Drup> ocaml multicore doesn't provide any high level distributed libraries
<ShalokShalom> He said that user code can implement it in MC-OCaml.
<ShalokShalom> I will ask him for further information.
<Drup> I don't see how multicore is connected to distributed, especially single-process multicore
<ShalokShalom> No sorry, this is just about something else he meant.
<flux[m]> well, it would allow "natural" expression of concurrent code, ie. without monads or cps, which would be a key in implementing an Erlang-like environment? of course there's no true isolation between them, that would need to be implemented by a library and style-guide-forbidding of global variables.
<flux[m]> maybe not key but nice :)
<flux[m]> the most difficult property might be implementing on-the-fly updates, so your code would need to be able to update its state, probably via serialization/deserialization.. but I have never written Erlang, just going off by what I've read about it ;)
<ShalokShalom> thanks a lot
ggole has joined #ocaml
Niamkik has quit [Quit: WeeChat 2.0.1]
jao has joined #ocaml
Guest11648 has quit [Remote host closed the connection]
Haudegen has joined #ocaml
spew has joined #ocaml
Birdface has joined #ocaml
FreeBirdLjj has joined #ocaml
mildtaste has quit [Remote host closed the connection]
AnAverageHuman has joined #ocaml
AtumT has joined #ocaml
jestabro has joined #ocaml
jestabro has quit [Client Quit]
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 245 seconds]
dhil has quit [Ping timeout: 258 seconds]
barockobamo has joined #ocaml
<amosbird> hmm, does ocaml have arbitrary precision int?
dhil has joined #ocaml
<octachron> as library, there is zarith.
<Drup> (which is very good)
ziyourenxiang has quit [Ping timeout: 276 seconds]
Haudegen has quit [Read error: Connection reset by peer]
freyr69 has quit [Remote host closed the connection]
<amosbird> heh, search anything related to ocaml or haskell, the jane street ad
<amosbird> still worth reading?
ibuj has joined #ocaml
ibuj has left #ocaml [#ocaml]
<amosbird> let x = 1 let y = 2;; is let somehow act as an expression terminator?
Jesin has quit [Quit: Leaving]
Jesin has joined #ocaml
<Drup> Sort of, yeah. You don't really need terminators in OCaml
<companion_cube> except in the toplevel
Jesin has quit [Quit: Leaving]
Haudegen has joined #ocaml
Jesin has joined #ocaml
oni-on-ion has joined #ocaml
<amosbird> Drup: well, let x = 1 + y = 2;; won't work
<amosbird> I guess keywords that start a expression is a terminator? but function names don't?
<amosbird> as function names can also be an argument
barockobamo has quit [Remote host closed the connection]
al-damiri has joined #ocaml
dhil has quit [Ping timeout: 258 seconds]
jgkamat is now known as JayMarsh
ShalokShalom has quit [Remote host closed the connection]
apaul1729 has joined #ocaml
ShalokShalom has joined #ocaml
<ShalokShalom> Drup flux[m] This is probably the thing which can be used to implement an auto healing mechanism, right?
<apaul1729> stab in the dark here - i'm trying to install opam and a specific switch (4.07.1+flambda) in a script, but I don't want X11 deps on the machine so `make world` is failing during `switch create`. Is there a way to pass `--no-graph` down to the configure script that ocaml-4.07.1+flambda is using somehow? or some way to disable using the graph dep?
JayMarsh is now known as jgkamat
ShalokShalom has quit [Remote host closed the connection]
<Drup> apaul1729: provide your own ocaml-variant.opam file which provide the appropriate option and pin it
<Drup> you can experiment by doing `opam pin -e ocaml-variant.4.07.1+flambda`
<Drup> (do that in an empty switch, so `opam switch create --empty my_flambda_switch`
<apaul1729> oh interesting
<apaul1729> @Drup: `opam pin` is giving me a 'could not retrieve' error
<apaul1729> ah my bad
<apaul1729> needed the full path
<apaul1729> very cool. thanks @Drup
Jesin has quit [Quit: Leaving]
dhil has joined #ocaml
Jesin has joined #ocaml
Haudegen has quit [Remote host closed the connection]
kakadu_ has joined #ocaml
sodastab has quit [Quit: ZNC - https://znc.in]
gravicappa has quit [Ping timeout: 258 seconds]
sodastab has joined #ocaml
unyu has quit [Quit: Reboot.]
unyu has joined #ocaml
Serpent7776 has joined #ocaml
<apaul1729> Drup so I can `pin add -e` some compiler, but after I do that I have no clue how to install the edited version as the compiler to the switch
<Drup> unless you passed --no-install, opam pin will install
<Drup> in any case, `opam install <thepackagepinned>` will also install it
<apaul1729> install doesn't work - `opam install` fails out saying it couldn't find the `./configure` command?
<apaul1729> when i run `pin add -e -n ../ocaml-variants.4.07.1+flambda`, i add the `"-no-graph"` flag and a `version` string so opam is fine with the package validation. then I run `opam install ocaml-variants.4.07.1+flambda+nograph` (that's what I named it)
<apaul1729> i also tried copying the `opamroot/repo/default/packages/ocaml-variants/ocaml-variants.4.07.1+flambda/opam` file into a different folder, adding the flag there, and calling `opam install .`, but that failed because of dependency mismatches (?)
<apaul1729> i feel like i'm going down a weird rabbit hole - is there an accepted way to simply create a switch from say a local `opam` file? all i need is to add one flag to the current build of `ocaml-variants.4.07.1+flambda`
<Drup> switches are packages, so creating a switch is jsut a matter of pinning the right package and installing it
<Drup> ... I've never seen that particular error before, it sounds like a bug :/
kakadu_ has quit [Remote host closed the connection]
kakadu_ has joined #ocaml
<Drup> apaul1729: it's very weird, all the pieces are there, but the CLI doesn't allow you to tell opam "here's the opam file, just take that"
<Drup> either you
<Drup> - use some shenanigans with `opam edit`
<Drup> - create an opam remote (with one package)
<Drup> - put the sources of the compiler somewhere with the modified opam file in them, then you can just pin that.
<Drup> I feel like this deserves a bug report :/
<Drup> apaul1729: in any case, using `opam pin edit` works fine for me.
<apaul1729> cool. thanks for the help!
<apaul1729> hopefully can figure this out without too much hassle D:
ggole has quit [Quit: Leaving]
Haudegen has joined #ocaml
pierpal has quit [Ping timeout: 276 seconds]
Serpent7776 has quit [Quit: leaving]
dhil has quit [Ping timeout: 276 seconds]
nikivi has quit [Read error: Connection reset by peer]
nikivi has joined #ocaml
apaul1729 has quit [Remote host closed the connection]
Birdface has quit [Ping timeout: 264 seconds]
<adrianbrink> How does this piece of code work?
<adrianbrink> ```
<adrianbrink> total_balance = balance ;
<adrianbrink> return @@ PkhMap.add manager
<adrianbrink> max_delegate = delegate ;
<adrianbrink> { max_balance = balance ;
<adrianbrink> } accum
<adrianbrink> ```
<adrianbrink> What is being concatenated here?
<adrianbrink> ```
<adrianbrink> val (@@) : ('a ->'b) ->'a ->'bApplication operator:g @@ f @@ xis exactly equivalent tog (f (x)). Right-associativeoperator at precedence level 5/11.Since:4.01
<adrianbrink> ```
Haudegen has quit [Remote host closed the connection]
xuib has joined #ocaml
kakadu_ has quit [Remote host closed the connection]
spew has quit [Quit: going home]
<oni-on-ion> adrianbrink, i think it is just instead of saying "return (PkhMap.add manager { ... }) accum)
<oni-on-ion> but i am a newbie and could be wrong
<adrianbrink> damn, that was correct
<adrianbrink> Can you explain why this is the case?
<thizanne> adrianbrink: you quoted it yourself
<thizanne> Application operator: g @@ f @@ x is exactly equivalent to g (f (x)).
<thizanne> (and f @@ x is exactly equivalent to f x)
<adrianbrink> Yes that makes sense. But is `return` a function?
<thizanne> it's not a keyword in ocaml
<thizanne> so yes, here it's a function
ygrek has quit [Ping timeout: 276 seconds]
nikivi has quit [Quit: ZNC is awesome]
pierpal has joined #ocaml
pierpal has quit [Read error: Connection reset by peer]
Jesin has quit [Quit: Leaving]
shw` has quit [Ping timeout: 268 seconds]
oni-on-ion has quit [Quit: Leaving]
Jesin has joined #ocaml
xuib has quit [Ping timeout: 276 seconds]
xuib has joined #ocaml
xuib has quit [Ping timeout: 250 seconds]
xuib has joined #ocaml
okuu has joined #ocaml