adrien changed the topic of #ocaml to: Discussions about the OCaml programming language | http://www.ocaml.org | OCaml 4.09 release notes: https://caml.inria.fr/pub/distrib/ocaml-4.09/notes/Changes | Try OCaml in your browser: http://try.ocamlpro.com | Public channel logs at http://irclog.whitequark.org/ocaml
AtumT_ has quit [Quit: AtumT_]
toppler has quit [Ping timeout: 268 seconds]
toppler has joined #ocaml
sillyotter has joined #ocaml
toppler has quit [Ping timeout: 268 seconds]
sillyotter has quit [Client Quit]
toppler has joined #ocaml
Niamkik has quit [Ping timeout: 240 seconds]
toppler has quit [Ping timeout: 240 seconds]
toppler has joined #ocaml
ziyourenxiang_ has quit [Remote host closed the connection]
ziyourenxiang_ has joined #ocaml
Niamkik has joined #ocaml
nullifidian has quit [Read error: Connection reset by peer]
nullifidian has joined #ocaml
toppler has quit [Ping timeout: 276 seconds]
mfp has quit [Ping timeout: 240 seconds]
tormen_ has joined #ocaml
toppler has joined #ocaml
tormen has quit [Ping timeout: 276 seconds]
q9929t has joined #ocaml
toppler has quit [Ping timeout: 240 seconds]
toppler has joined #ocaml
mbuf has joined #ocaml
purpleeyelids has joined #ocaml
q9929t has quit [Quit: q9929t]
toppler has quit [Ping timeout: 240 seconds]
toppler has joined #ocaml
toppler has quit [Ping timeout: 268 seconds]
toppler has joined #ocaml
purpleeyelids has quit [Remote host closed the connection]
toppler has quit [Ping timeout: 250 seconds]
_whitelogger has joined #ocaml
toppler has joined #ocaml
vicfred has joined #ocaml
toppler has quit [Ping timeout: 240 seconds]
jao- has quit [Ping timeout: 250 seconds]
traviss has joined #ocaml
_whitelogger has joined #ocaml
gravicappa has joined #ocaml
toppler has quit [Ping timeout: 268 seconds]
toppler has joined #ocaml
toppler has quit [Ping timeout: 240 seconds]
warriors has quit [Quit: Connection closed for inactivity]
toppler has joined #ocaml
_whitelogger has joined #ocaml
ggole has joined #ocaml
toppler has quit [Ping timeout: 250 seconds]
toppler has joined #ocaml
_whitelogger has joined #ocaml
nullifidian_ has joined #ocaml
toppler has quit [Ping timeout: 265 seconds]
nullifidian has quit [Ping timeout: 276 seconds]
toppler has joined #ocaml
toppler has quit [Ping timeout: 265 seconds]
toppler has joined #ocaml
toppler has quit [Ping timeout: 240 seconds]
toppler has joined #ocaml
tane has joined #ocaml
toppler has quit [Ping timeout: 265 seconds]
bitwinery has quit [Quit: Leaving]
toppler has joined #ocaml
narimiran has joined #ocaml
toppler has quit [Ping timeout: 240 seconds]
kakadu has joined #ocaml
toppler has joined #ocaml
Serpent7776 has joined #ocaml
analogue has quit [Read error: Connection reset by peer]
analogue has joined #ocaml
bartholin has quit [Ping timeout: 250 seconds]
bartholin has joined #ocaml
_habnabit has quit [Ping timeout: 250 seconds]
_habnabit has joined #ocaml
toppler has quit [Ping timeout: 268 seconds]
Jesin has quit [Ping timeout: 250 seconds]
kjak has quit [Ping timeout: 250 seconds]
toppler has joined #ocaml
kjak has joined #ocaml
mfp has joined #ocaml
nullifidian_ is now known as nullifidian
kakadu has quit [Ping timeout: 276 seconds]
toppler has quit [Ping timeout: 240 seconds]
Haudegen has joined #ocaml
toppler has joined #ocaml
smazga has joined #ocaml
smazga has quit [Ping timeout: 240 seconds]
toppler has quit [Ping timeout: 268 seconds]
narimiran has quit [Ping timeout: 240 seconds]
toppler has joined #ocaml
toppler has quit [Ping timeout: 265 seconds]
AtumT has joined #ocaml
toppler has joined #ocaml
kakadu_ has joined #ocaml
_whitelogger has joined #ocaml
toppler has quit [Ping timeout: 265 seconds]
toppler has joined #ocaml
FreeBirdLjj has joined #ocaml
Anarchos has joined #ocaml
smazga has joined #ocaml
smazga has quit [Ping timeout: 240 seconds]
toppler has quit [Ping timeout: 250 seconds]
picolino has joined #ocaml
toppler has joined #ocaml
narimiran has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
traviss has quit [Quit: Leaving]
toppler has quit [Ping timeout: 250 seconds]
analogue_ has joined #ocaml
analogue has quit [Disconnected by services]
analogue_ is now known as analogue
picolino has quit [Ping timeout: 240 seconds]
toppler has joined #ocaml
warriors has joined #ocaml
toppler has quit [Ping timeout: 250 seconds]
toppler has joined #ocaml
jao has joined #ocaml
Anarchos has quit [Quit: Vision[0.10.3]: i've been blurred!]
toppler has quit [Ping timeout: 265 seconds]
mbuf has quit [Quit: Leaving]
smazga has joined #ocaml
jao has quit [Ping timeout: 250 seconds]
toppler has joined #ocaml
Haudegen has quit [Ping timeout: 240 seconds]
smazga has quit [Ping timeout: 240 seconds]
toppler has quit [Ping timeout: 250 seconds]
assemblyman has joined #ocaml
<narimiran> is there some rule/preference when you declare two independent variables in a function: should you use `let a = .... and b = ....` or `let a = ... in let b = ...`?
toppler has joined #ocaml
<sim642> I'm not sure I have seen "and" used with a non-rec let
<narimiran> the reason why i'm asking is because technically `a` is not used *in* `b`, so the second example feels wrong. but i'm just ocaml beginner :)
<sim642> The (let b = ... in ...) is a complete expresion in itself so it would still be used inside that, even when not in the definition of b
<sim642> From a very practical aspect, using a chain of let...in-s makes it easy to comment out or delete individual definitions
<sim642> If you used "and" that would be more difficult if you want to change the first one or reorder them
<narimiran> sim642: believe it or not, the (un)easy commenting out is the real reason why i'm asking :)
<narimiran> i thought `and` version is idiomatic, but it is difficult to comment out, so i'd like to switch to `let ... in`
Haudegen has joined #ocaml
toppler has quit [Ping timeout: 250 seconds]
<Leonidas> I think `end` is only idiomatic in cases where it can't be expressed with 2 separate binds.
<Leonidas> that is multually recursive binds
<Leonidas> otherwise, at least for me, `and` signifies that there is something going on, that isn't.
<Leonidas> similarly to defining functions `let rec` that don't need it
toppler has joined #ocaml
<narimiran> ok, `let ... in` clearly wins :) thanks sim642 and Leonidas!
sarahzrf has joined #ocaml
<sarahzrf> hey
<sarahzrf> i made a new opam switch in order to test out an upgraded package setup
<sarahzrf> can i just copy it over somehow?
<sarahzrf> i cant remember; will the build artifacts get cached if i do a plain install in the real switch or something
<sarahzrf> evidently no
toppler has quit [Ping timeout: 240 seconds]
assemblyman has quit [Quit: ™]
<Leonidas> only once dune 2 rolls out
toppler has joined #ocaml
toppler has quit [Ping timeout: 276 seconds]
smazga has joined #ocaml
Haudegen has quit [Ping timeout: 268 seconds]
toppler has joined #ocaml
smazga has quit [Ping timeout: 268 seconds]
<narimiran> another noob question: i'm using dune (as per general recommendation here), and i have multiple executables in the same directory plus one library i created in a `lib` subfolder. i'm trying to generate .mli file for one of my executables. i created a mli profile in my dune file for which i have `(ocamlopt_flags (:standard -i))`
<narimiran> the problem is, when i try to do `dune exec --profile mli filename.exe`, it prints mli of my lib (not my executable), and then "Error: Rule failed to generate the following targets:" with some/path/to/lib.cmx and some/path/to/lib.o
<narimiran> on the other hand, if i just do `ocamlopt -i filename.ml`, then i get "Error: Unbound module <external lib>"
Haudegen has joined #ocaml
ziyourenxiang_ has quit [Ping timeout: 240 seconds]
toppler has quit [Ping timeout: 246 seconds]
<narimiran> so i guess the question is: how to generate .mli file when you have various dependencies? (preferably with dune, if possible)
jao has joined #ocaml
toppler has joined #ocaml
<Leonidas> I just generate the signatures with merlin, paste them into an mli and fix whatever weird type aliases it has come up with.
<Leonidas> mli for executables is pretty much useless though, I would recommend to not bother at all
<Leonidas> also, put each library and each executable into its own folder. that makes it easier to generate correct merlin files and is also nicer from a code organisation point of view
Anarchos has joined #ocaml
toppler has quit [Ping timeout: 250 seconds]
<narimiran> Leonidas: i'm just using this to quickly go through the files and see where i have unneeded generic types for proc parameters (i've read that might make executables slower)
<narimiran> i'm using merlin quite frequently when i'm writing stuff, but (unless there is a way i don't know about) merlin cannot produce types for the whole file, only for stuff under my cursor
<narimiran> regarding folder organization: i've seen projects with layout like you recommend, but for this simple case (AoC tasks) it seemed like an overkill. this way i only have one dune file for the whole project, instead of one per sub-folder
toppler has joined #ocaml
smazga has joined #ocaml
smazga has quit [Ping timeout: 240 seconds]
Haudegen has quit [Ping timeout: 240 seconds]
toppler has quit [Ping timeout: 265 seconds]
toppler has joined #ocaml
<Leonidas> narimiran: you should not worry about potential issues before you run into them. it makes more sense to actually profile instead of preemptively guessing.
<Leonidas> narimiran: the trick is to wrap module M = struct (your file) end, and then ask merlin for the type of M.
<narimiran> Leonidas: oooh, i never thought about `module M = ....` idea. nice trick, thanks!
<narimiran> Leonidas: to profile if there are differences between two versions - i need to have another version in the first place ;) and that's why i went on this "lets discover generic types" trip
Haudegen has joined #ocaml
toppler has quit [Ping timeout: 240 seconds]
toppler has joined #ocaml
Jesin has joined #ocaml
Jesin has quit [Remote host closed the connection]
nullifidian_ has joined #ocaml
toppler has quit [Ping timeout: 240 seconds]
nullifidian has quit [Ping timeout: 240 seconds]
Anarchos has quit [Quit: Vision[0.10.3]: i've been blurred!]
toppler has joined #ocaml
ggole has quit [Quit: Leaving]
toppler has quit [Ping timeout: 250 seconds]
smazga has joined #ocaml
toppler has joined #ocaml
smazga has quit [Ping timeout: 240 seconds]
Serpent7776 has quit [Quit: leaving]
toppler has quit [Ping timeout: 268 seconds]
toppler has joined #ocaml
tane has quit [Quit: Leaving]
smazga has joined #ocaml
gravicappa has quit [Ping timeout: 240 seconds]
smazga has quit [Ping timeout: 268 seconds]
toppler has quit [Ping timeout: 240 seconds]
narimiran has quit [Remote host closed the connection]
silver has joined #ocaml
toppler has joined #ocaml
toppler has quit [Ping timeout: 240 seconds]
vicfred has quit [Quit: Leaving]
toppler has joined #ocaml
Haudegen has quit [Quit: Bin weg.]
iovec has joined #ocaml
toppler has quit [Ping timeout: 250 seconds]
toppler has joined #ocaml
sagax has quit [Ping timeout: 240 seconds]
bitwinery has joined #ocaml
bitwinery has quit [Remote host closed the connection]
bitwinery has joined #ocaml
toppler has quit [Ping timeout: 250 seconds]
kakadu_ has quit [Remote host closed the connection]
slice has quit [Ping timeout: 268 seconds]
toppler has joined #ocaml
silver has quit [Read error: Connection reset by peer]
silver has joined #ocaml
Haudegen has joined #ocaml
toppler has quit [Ping timeout: 240 seconds]
porchetta has quit [Ping timeout: 268 seconds]
porchetta has joined #ocaml
Haudegen has quit [Ping timeout: 268 seconds]
toppler has joined #ocaml
ziyourenxiang_ has joined #ocaml
toppler has quit [Ping timeout: 276 seconds]
nullifidian__ has joined #ocaml
nullifidian_ has quit [Ping timeout: 265 seconds]
toppler has joined #ocaml