<discocaml>
<otini_> unless you mean parallel programming in general
<discocaml>
<otini_> although, this chapter is not a bad introduction per se
troydm has joined #ocaml
Guest36 has joined #ocaml
<Guest36>
Hey, bloody beginner here. I'm stumped by something in the very tutorial. To my understanding this should work:
<Guest36>
let a = [|1;2;3|]
<Guest36>
Array.length a
<Guest36>
Expecting the program to return 3, but this instead produces an error: "This expression has type int array. This is not a function; it cannot be applied." What basic concept am I missing?
olle has left #ocaml [#ocaml]
<companion_cube>
`let a = … in Array.length a`
<companion_cube>
the `in` is important
<Guest36>
Does that mean the declaration (expression in OCaml?) is not "let ... = ..." but actually "let ... = ... in ..."?
<companion_cube>
inside a scope, yes
<companion_cube>
`let … = …` is only for toplevel declarations (ie defining functions)
<discocaml>
<deepspacejohn> whitespace is not significant in ocaml. in your first code is equivalent to [|1;2;3|] Array.length a (interpreted as Array.length being applied to [|...|] as if it was a function).
<Guest36>
Oh, wow. Not used to "white space" actually meaning all of it including line breaks. But this already helps me understand that the tutorial works because ";;" apparently breaks up the code. Thanks for the succinct help, I feel back on track.
<discocaml>
<._null._> There are two lets in OCaml; the one for toplevel definitions (let a = expr) and the one for local definitions (let a = expr in expr).
<discocaml>
<._null._> A toplevel expression needs a ;; to separate it from the previous toplevel definition (which is why we prefer to only work with definitions, using let () = expr if needed for a toplevel expression)
gdiazlo_caml has quit [Remote host closed the connection]
gdiazlo_caml has joined #ocaml
gdiazlo_caml has quit [Ping timeout: 252 seconds]
alexherbo2 has quit [Remote host closed the connection]
alexherbo2 has joined #ocaml
alexherbo2 has quit [Remote host closed the connection]
dawids has joined #ocaml
gdiazlo_caml has joined #ocaml
user__ has joined #ocaml
chiselfuse has quit [Ping timeout: 260 seconds]
f[x] has quit [Ping timeout: 260 seconds]
Guest36 has quit [Quit: Client closed]
chiselfuse has joined #ocaml
bhoot has joined #ocaml
infinity0 has quit [Ping timeout: 246 seconds]
dawids has quit [Quit: Leaving]
bhoot has quit [Remote host closed the connection]
bhoot has joined #ocaml
infinity0 has joined #ocaml
Tuplanolla has joined #ocaml
mbuf has quit [Quit: Leaving]
gdiazlo_caml has quit [Ping timeout: 248 seconds]
bhoot has quit [Remote host closed the connection]
bhoot has joined #ocaml
bibi_ has joined #ocaml
bhoot has quit [Ping timeout: 252 seconds]
bibi_ has quit [Quit: Konversation terminated!]
dawids has joined #ocaml
bibi_ has joined #ocaml
neuroevolutus has joined #ocaml
troydm has quit [Ping timeout: 255 seconds]
<discocaml>
<lukstafi> How do people get around this CI error? For me it happens for `macos-latest` and I'm using `ocaml/setup-ocaml@v2`. `[ERROR] The compilation of uunf.15.0.0 failed at "ocaml pkg/pkg.ml build --dev-pkg false --with-uutf true --with-cmdliner true".`
gdiazlo_caml has joined #ocaml
<discocaml>
<lukstafi> I guess it only happens for the OCaml 4.13 CI target.
gdiazlo_caml has quit [Ping timeout: 252 seconds]
torretto has quit [Ping timeout: 260 seconds]
torretto has joined #ocaml
waleee has quit [Ping timeout: 265 seconds]
gdiazlo_caml has joined #ocaml
gdiazlo_caml has quit [Ping timeout: 272 seconds]
waleee has joined #ocaml
<discocaml>
<yawaramin> upgrading OCaml version is not an option?
gdiazlo_caml has joined #ocaml
waleee has quit [Ping timeout: 246 seconds]
waleee has joined #ocaml
<discocaml>
<anmonteiro> is this on your release of ppx_minidebug to opam-repo?