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
assemblyman has quit [Quit: ™]
themsay has quit [Remote host closed the connection]
themsay has joined #ocaml
AnAverageHuman has quit [Ping timeout: 256 seconds]
Niamkik has quit [Ping timeout: 244 seconds]
Niamkik has joined #ocaml
al-damiri has quit [Quit: Connection closed for inactivity]
kini has quit [Quit: No Ping reply in 180 seconds.]
kini has joined #ocaml
kurtis has quit [Ping timeout: 246 seconds]
kurtis has joined #ocaml
kurtis has quit [Ping timeout: 250 seconds]
ygrek has joined #ocaml
mfp has quit [Ping timeout: 250 seconds]
jimt has quit [Quit: WeeChat 1.9.1]
silver has quit [Read error: Connection reset by peer]
AnAverageHuman has joined #ocaml
kurtis has joined #ocaml
ygrek has quit [Ping timeout: 268 seconds]
kurtis has quit [Ping timeout: 246 seconds]
jao has quit [Ping timeout: 246 seconds]
jimt has joined #ocaml
tormen_ has joined #ocaml
tormen has quit [Ping timeout: 245 seconds]
gravicappa has joined #ocaml
kurtis has joined #ocaml
kvda has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
kvda has joined #ocaml
caltelt_ has joined #ocaml
AnAverageHuman has quit [Ping timeout: 256 seconds]
jimt has quit [Read error: Connection reset by peer]
kurtis has quit [Ping timeout: 250 seconds]
nullifidian__ has joined #ocaml
nullifidian_ has quit [Ping timeout: 250 seconds]
xpika has quit [Ping timeout: 268 seconds]
caltelt_ has quit [Ping timeout: 250 seconds]
kurtis has joined #ocaml
xpika has joined #ocaml
kvda has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
nullifidian__ is now known as nullifidian
kurtis has quit [Ping timeout: 250 seconds]
Birdface has joined #ocaml
dimitarvp has joined #ocaml
kurtis has joined #ocaml
kvda has joined #ocaml
freyr69 has joined #ocaml
<freyr69> Why doesn't OCaml raise an exception on integer overflow?
dimitarvp has quit [Read error: Connection reset by peer]
barockobamo has joined #ocaml
kurtis has quit [Ping timeout: 245 seconds]
kvda has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<Leonidas> freyr69: because that would require checking for overflow on integer operations
sagotch has joined #ocaml
<Leonidas> there are times where ocaml omits correctness in favour of speed and that is especially common on numbers. e.g. unlike Python OCaml does not promote integers to bigints
zolk3ri has joined #ocaml
Guest75977 has joined #ocaml
<def`> though you can implement the right behavior in user-land
<def`> (there are various flavours of integers available)
amiloradovsky has joined #ocaml
kurtis has joined #ocaml
Guest75977 has quit [Remote host closed the connection]
cmk_zzz has joined #ocaml
<Leonidas> yes, definitely.
<cmk_zzz> I'm on Ubuntu 16.04. I've installed opam 2.0.3 using the instal.sh script. I've manually compiled and installed bubblewrap. Then I do opam init but I get: "bwrap: Can't bind mount /oldroot/var on /newroot/var: Operation not permitted" and the installation failed.
<def`> cmk_zzz: I don't know how to fix bwrap, but just be aware that you can disable bwrap
freyr69 has quit [Ping timeout: 250 seconds]
<cmk_zzz> My first approach was to use `asdf`. But then I couldn't install cohttp (No package matches cohttp). This seemed to be a problem with `conduit` which doesn't support ocaml 4.06.1 which I was running. Somewhere it said that the `master` branch of `cohttp` don't rely on `conduit` any longer so I tried to pin it. Then it complained about the opam format (which I assume is because asdf install Opam 1.2.2 and
<cmk_zzz> later versions require Opam 2.0.3).
<cmk_zzz> def`: There is a --disable-sandboxing flag but opam itself says. If you do not won't to risk wiping your harddrive don't do this
<cmk_zzz> I really would like to use ocaml but it seems I run into these sort of problems all the time which stops me from even getting going
<def`> hmm. I doubt that opam --disable-sandboxing is any more risky that using any other unix program.
<cmk_zzz> anyway rm -rf .opam && opam init --disable-sandboxing at least seems to be getting further
kurtis has quit [Ping timeout: 246 seconds]
<cmk_zzz> The other question. What Ocaml version and Opam version should I be running? Basically I want to be able to use an http client, a JSON parser, a MySQL driver and that is about it
<def`> opam 2.0.3 and any ocaml version >= 4.06.1
<def`> These days I think 4.07.1 is the most common
<cmk_zzz> I will give that ago. Disabling sandboxing worked by the way (although I will hold you personally accountable when my files go missing ;D))
xpika has left #ocaml [#ocaml]
<vsiles> cmk_zzz: can't you install bwrap using a more recent ppa ?
<cmk_zzz> vsiles: I guess I could. I just cloned it from their git repo, compiled and installed it. Still I got the "bwrap: Can't bind mount /oldroot/var on /newroot/var: Operation not permitted" from opam init
<Leonidas> maybe the kernel is too old for what bwrap is trying to do
<Leonidas> I run into this issue a lot on these single-board computers which use kernels from the stone age so systemd fails with odd problems sometimes.
<cmk_zzz> could be. I've continued without the sandboxing hoping it won't be too much of a problem.
<vsiles> Leonidas: yes, I had the same issue in my previous job, that was really a pain ...
<cmk_zzz> anyway. finally after months of procrastination and other things I managed to do an http request in ocaml!
<cmk_zzz> thanks guys
<vsiles> :D gg
<def`> the problem was a shell script in camlp5 package (that you only need if you work with Coq)
<def`> the problem is exactly the same if you use any other non-sandboxed unix tool
<def`> (that includes javascript, perl, php, python, etc ecosystems)
<def`> so the problem is not related to opam nor ocaml (though they try to provide workarounds by limiting the permissions of scripts) and you should not worry in general :P
<cmk_zzz> def`: cool! Still scary though :D but I would allow rm -rf / in any case. I just hope I can get further with ocaml this time around before giving it up
<cmk_zzz> I *wouldn't* allow (obviously)
freyr69 has joined #ocaml
<cmk_zzz> I must say ocaml seems to have picked up pace lately though so I have high hopes. When multicore arrives in 2025 I will be very ready
<def`> :DDD
kurtis has joined #ocaml
themsay has quit [Ping timeout: 250 seconds]
<freyr69> Leonidas: but there are hardware traps for overflows, and they are (presumably) faster than a user space implementation. Besides, SML behaves correctly.
mfp has joined #ocaml
themsay has joined #ocaml
kurtis has quit [Ping timeout: 246 seconds]
<Leonidas> freyr69: maybe for the same reason as Rust, Go and D? https://blog.regehr.org/archives/1154
xuib has joined #ocaml
<Leonidas> does SML have unboxed integers?
<def`> SML is a spec not an implementation.
<Leonidas> yeah, I have http://sml-family.org/sml97-defn.pdf open and there is suspiciously little on integers
<def`> And since some SML targets the OCaml toolchain (modulo makeup), a lot of OCaml behaviors can be replicated on SML :D
<Leonidas> I mean, the spec could declare that integers have to be 31 bit or be unbounded or so
<def`> primitive types are not very interesting to specify :P
<freyr69> Leonidas: smlnj has 30 bit integers, yes. MLton has unboxed native integer I suppose
<freyr69> We have hardware traps, don't we?
<freyr69> Go is a bad example, Ada has overflow checking
<Leonidas> doesn't look like "mainstream" platforms have overflow traps
xuib has quit [Quit: xuib]
<Leonidas> Ada is designed for a different purpose than Go, so no surprise the integers are implemented differently
<freyr69> x86 is mainstream enough
<Leonidas> freyr69: https://news.ycombinator.com/item?id=7847980 INTO is invalid in amd64
<freyr69> Well, Ada emits branch on overflow flag after operation
<freyr69> So could OCaml
<freyr69> It's slow in arithmetic anyway, could be correct at least
<Leonidas> yeah, but that would be slower and putting more trust on branch prediction to be fast.
amiloradovsky has quit [Quit: amiloradovsky]
sagotch has quit [Quit: Leaving.]
kurtis has joined #ocaml
silver has joined #ocaml
Birdface has quit [Remote host closed the connection]
Birdface has joined #ocaml
ec has quit [Ping timeout: 258 seconds]
webshinra has quit [Remote host closed the connection]
webshinra has joined #ocaml
ec has joined #ocaml
kurtis has quit [Ping timeout: 246 seconds]
ollehar_ has joined #ocaml
sagotch has joined #ocaml
kurtis has joined #ocaml
themsay has quit [Read error: Connection reset by peer]
themsay has joined #ocaml
themsay has quit [Read error: Connection reset by peer]
themsay has joined #ocaml
Birdfacee has joined #ocaml
<Birdfacee> Is there an easy way to print a list of tuples containing different types? I.e. (int * float * int) list
<zozozo> Birdfacee: I think libraries such as Fmt and containers provide combinators to easily create printers for lists, tuples, etc...
spew has joined #ocaml
<Birdfacee> I guess that's a no for the "easy" then. Alternatively; does anyone know how to get the debugger to work in Visual Studio Code?
<theblatte> `type t = (int * float * int) list [@@deriving show]` will generate `pp` and `show` functions for `t`
jao has joined #ocaml
jaar has joined #ocaml
bitonic is now known as ex_falso
ex_falso is now known as bitonic
kurtis has quit [Quit: WeeChat 2.4]
<_y> previously on Opam Stories: “let’s install Multicore OCaml!” “easy enough, there is an opam repo” “we have a problem” “our experts say this is a md5 mismatch” “we just had Beijing and the Kremlin on line: they do not see the bug” “we are on our own” “initiate the emergency override” “please confirm order” “override md5 checking, NOW!” “… it’s… still (…
<_y> …) failing” “ow no!”
<_y> post-mortem: https://zero.crans.org/?5fdb61b3474d2d45#PgK5+cNvMfxooj4PSFA9TrMpr1a/Q+QQ9g05T28dw9w=
<_y> and now for the conclusion.
<def`> :D
<_y> five days later… “let’s update system and try again” “md5 issue still” “override again” “… it’s not failing… i think” “please confirm?” “installation process went through!”
al-damiri has joined #ocaml
<def`> "https://github.com/ocamllabs/ocaml-multicore/archive/master.tar.gz"... It is healthy that the checksum changes regularly
<_y> so it “worked” but i had to ask --no-checksums
<_y> (i followed the exact same procedure as in the paste above, except that the last step worked)
<_y> and i cannot understand where the MD5 sums which appear in this paste (both the expected one and the obtained one) come from
<_y> i downloaded the archive/XXX.tar.gz (from the url you give) for master, 4.06.1, and the last 7 commits https://github.com/ocamllabs/ocaml-multicore/commits/master
<def`> ... No idea
<_y> none have the same md5 than those in the log
<_y> where does opam gets the expected md5 sum? it is not mentioned there: https://github.com/ocamllabs/multicore-opam/blob/master/compilers/4.06.1+multicore/4.06.1+multicore.comp
q9929t has joined #ocaml
q9929t has quit [Client Quit]
gareppa has joined #ocaml
gareppa has quit [Remote host closed the connection]
assemblyman has joined #ocaml
FreeBirdLjj has joined #ocaml
freyr69 has quit [Remote host closed the connection]
themsay has quit [Ping timeout: 245 seconds]
themsay has joined #ocaml
ggole has joined #ocaml
themsay has quit [Read error: Connection reset by peer]
assemblyman has quit [Quit: ™]
themsay has joined #ocaml
ygrek has joined #ocaml
ollehar_ has quit [Ping timeout: 250 seconds]
jaar has quit [Ping timeout: 250 seconds]
ollehar has joined #ocaml
ollehar has quit [Ping timeout: 250 seconds]
barockobamo has quit [Remote host closed the connection]
barockobamo has joined #ocaml
jao has quit [Remote host closed the connection]
jao has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
barockobamo has quit [Remote host closed the connection]
barockobamo has joined #ocaml
sagotch has quit [Quit: Leaving.]
AtumT has joined #ocaml
barockobamo has quit [Remote host closed the connection]
barockobamo has joined #ocaml
barockobamo has quit [Remote host closed the connection]
barockobamo has joined #ocaml
barockobamo has quit [Remote host closed the connection]
barockobamo has joined #ocaml
barockobamo has quit [Read error: Connection reset by peer]
barockobamo has joined #ocaml
barockobamo2 has joined #ocaml
amiloradovsky has joined #ocaml
barockobamo has quit [Ping timeout: 250 seconds]
<Leonidas> Birdfacee: deriving show is pretty easy
barockobamo2 has quit [Ping timeout: 244 seconds]
okuu has joined #ocaml
barockobamo has joined #ocaml
ggole has quit [Quit: Leaving]
barockobamo2 has joined #ocaml
barockobamo has quit [Ping timeout: 246 seconds]
ohama has quit [Remote host closed the connection]
Birdfacee has quit [Quit: Leaving]
Serpent7776 has joined #ocaml
amiloradovsky has quit [Ping timeout: 246 seconds]
barockobamo2 has quit [Remote host closed the connection]
gravicappa has quit [Ping timeout: 246 seconds]
ohama has joined #ocaml
sz0 has quit [Quit: Connection closed for inactivity]
ohama has quit [Ping timeout: 244 seconds]
unyu has quit [Ping timeout: 258 seconds]
ohama has joined #ocaml
ohama has quit [Remote host closed the connection]
jnavila has joined #ocaml
kakadu_ has joined #ocaml
okuu has quit [Ping timeout: 250 seconds]
jack5638 has quit [Ping timeout: 246 seconds]
jbrown has quit [Ping timeout: 258 seconds]
jack5638 has joined #ocaml
bartholin has quit [Remote host closed the connection]
okuu has joined #ocaml
okuu has quit [Remote host closed the connection]
unyu has joined #ocaml
ohama has joined #ocaml
Xizor has joined #ocaml
zolk3ri has quit [Remote host closed the connection]
Serpent7776 has quit [Quit: leaving]
crowley95 has quit [Ping timeout: 250 seconds]
crowley95 has joined #ocaml
crowley95 has quit [Ping timeout: 250 seconds]
crowley95 has joined #ocaml
ohama has quit [Ping timeout: 246 seconds]
jnavila has quit [Remote host closed the connection]
unyu has quit [Ping timeout: 250 seconds]
ohama has joined #ocaml
Birdface has quit [Ping timeout: 245 seconds]
Netsu has joined #ocaml
<Netsu> Hello. Can such inheritance be properly constrained? https://gist.github.com/Pitometsu/dd3111b1d54578afa6eed94d2b4dc217
<Netsu> I want to have there a module type with abstract open variants, and another one that implement it with concrete variants.
<Netsu> Or did I doing OCaml wrong?)
ygrek has quit [Ping timeout: 255 seconds]
spew has quit [Quit: Connection closed for inactivity]
sillyotter has joined #ocaml
sillyotter has quit [Quit: WeeChat 2.2]
kvda has joined #ocaml