companion_cube changed the topic of #ocaml to: Discussion about the OCaml programming language | http://www.ocaml.org | OCaml 5.2.0 released: https://ocaml.org/releases/5.2.0 | Try OCaml in your browser: https://try.ocamlpro.com | Public channel logs at https://libera.irclog.whitequark.org/ocaml/
YuGiOhJCJ has joined #ocaml
Johann has quit [Server closed connection]
YuGiOhJCJ has quit [Remote host closed the connection]
YuGiOhJCJ has joined #ocaml
Johann has joined #ocaml
<discocaml> <witty_91> Hello everyone
<discocaml> <witty_91> I'm looking for someone who can lend me a real account.
<discocaml> <witty_91> If anyone is interested please contact me.
dreadedfrog has quit [Ping timeout: 265 seconds]
dreadedfrog has joined #ocaml
<discocaml> <ada2k> why target the ocaml discord of all places?
lisq has quit [Server closed connection]
lisq has joined #ocaml
welterde has quit [Server closed connection]
welterde has joined #ocaml
adrien has quit [Server closed connection]
adrien has joined #ocaml
torretto has quit [Remote host closed the connection]
torretto has joined #ocaml
farn_ has quit [Server closed connection]
farn_ has joined #ocaml
oisota has quit [Server closed connection]
oisota has joined #ocaml
tomku has quit [Ping timeout: 258 seconds]
tomku has joined #ocaml
mbuf has joined #ocaml
buoy49__ has quit [Server closed connection]
buoy49__ has joined #ocaml
myrkraverk__ has joined #ocaml
myrkraverk_ has quit [Read error: Connection reset by peer]
CalimeroTeknik has quit [Server closed connection]
gahr has quit [Server closed connection]
gahr has joined #ocaml
CalimeroTeknik has joined #ocaml
lane has quit [Server closed connection]
lane has joined #ocaml
quernd80 has quit [Server closed connection]
quernd80 has joined #ocaml
tomku has quit [Ping timeout: 255 seconds]
tomku has joined #ocaml
trillion_exabyte has quit [Ping timeout: 245 seconds]
trillion_exabyte has joined #ocaml
<discocaml> <mark_trader1> I’ll be teaching first 10 persons how to earn $30k or more within a week. But you will have to give me 10% of your profit when you receive it. Note only interested people should apply, Drop a message let's get started by asking (HOW) via telegram username below ⬇️
<discocaml> <mark_trader1> WhatsApp: ‪+1 (520) 269‑1719‬
<discocaml> <mark_trader1>
<discocaml> <mark_trader1> Telegram @https://t.me/Mark_Pro247
immutable has quit [Server closed connection]
immutable has joined #ocaml
ymherklotz has quit [Server closed connection]
ymherklotz has joined #ocaml
dmbaturin has quit [Server closed connection]
dmbaturin has joined #ocaml
rustyne has quit [Server closed connection]
rustyne has joined #ocaml
jyc has quit [Server closed connection]
jyc has joined #ocaml
xvilka has quit [Server closed connection]
xvilka has joined #ocaml
henrytill has quit [Server closed connection]
henrytill has joined #ocaml
noddy has quit [Server closed connection]
noddy has joined #ocaml
Ankhers has quit [Server closed connection]
Ankhers has joined #ocaml
Serpent7776 has joined #ocaml
sleepydog has quit [Server closed connection]
sleepydog has joined #ocaml
berberman has quit [Server closed connection]
berberman has joined #ocaml
delyan_ has quit [Server closed connection]
delyan_ has joined #ocaml
YuGiOhJCJ has quit [Quit: YuGiOhJCJ]
Geekingfrog has quit [Server closed connection]
Geekingfrog has joined #ocaml
bartholin has joined #ocaml
<discocaml> <barconstruction> Never seen a discord bio that just looks like the objective section on a resume
Techcable has quit [Server closed connection]
Techcable has joined #ocaml
Tuplanolla has joined #ocaml
<discocaml> <zux_k1llian> Hey guys quick question I'm very new to ocaml like just started yesterday lmao.
<discocaml> <zux_k1llian>
<discocaml> <zux_k1llian> In the docs the section your first ocaml program ... It says to run ocaml projects with opam exec -- dune the whole building a dune project then running it using opam exec dune exec . It's not even mentioned about the ocamlc to compile single file into obj file then ocamlrun like I have seen others do before. I was just curious any reason that it's preferred to using the opam exec instead of ocamlc ? I mean I'm just trying to know the lang
habnabit_ has quit [Server closed connection]
habnabit_ has joined #ocaml
<bartholin> zux_killian: the build tools of ocaml are wild and have changed a lot over the years
drakonis has quit [Server closed connection]
drakonis has joined #ocaml
lobo has quit [Server closed connection]
lobo has joined #ocaml
octachron has quit [Server closed connection]
octachron has joined #ocaml
cbarrett has quit [Server closed connection]
cbarrett has joined #ocaml
landonf has quit [Server closed connection]
landonf has joined #ocaml
nore has quit [Server closed connection]
nore has joined #ocaml
end has quit [Server closed connection]
end has joined #ocaml
<discocaml> <holmdunc> It's even possible to get started without manually calling any compiler, by writing an executable script with `#!/usr/bin/env ocaml` at the top
johnel has quit [Server closed connection]
johnel has joined #ocaml
GreaseMonkey has quit [Server closed connection]
greaser|q has joined #ocaml
pie_ has quit []
pie_ has joined #ocaml
meritamen has joined #ocaml
meritamen has quit [Client Quit]
<rustyne> leah2: ouch. is it a sign that the build is eating up all the heap available in a 32-bit memory space?
meritamen has joined #ocaml
meritamen has quit [Client Quit]
palainp_ has joined #ocaml
palainp has quit [Ping timeout: 258 seconds]
<leah2> it only happened on github ci. i think that's what it means, but it builds fine on another machine, and doesn't use that much ram either...
<leah2> perhaps some other glitch
<discocaml> <zux_k1llian> oh waa that's cool let ocaml replace all of them bash and lua scripts haha
<discocaml> <zux_k1llian> is there any such os.execute for ocaml ? like how we get bash commands to run in lua
<discocaml> <Kali> Sys.command
<discocaml> <zux_k1llian> alright imma try this
patrick_ is now known as patrick
patrick has quit [Killed (lithium.libera.chat (Nickname regained by services))]
patrick_ has joined #ocaml
<discocaml> <zux_k1llian> haha got something to work lmao
<discocaml> <zux_k1llian> ```ocaml
<discocaml> <zux_k1llian> #!/usr/bin/env ocaml
<discocaml> <zux_k1llian>
<discocaml> <zux_k1llian> let inp = read_line ()
<discocaml> <zux_k1llian> let _ =
<discocaml> <zux_k1llian> Sys.command ("dunstify 'Test successfull' " ^ inp ^ " -i $HOME/.local/share/icons/custom/bell-solid.svg")
<discocaml> <zux_k1llian> ```
<discocaml> <Kali> very nice
philipwhite_ has quit [Server closed connection]
philipwhite has joined #ocaml
kuruczgy has quit [Server closed connection]
kuruczgy has joined #ocaml
077AA4Q2Y has quit [Server closed connection]
soni_ has joined #ocaml
arya_elfren has quit [Server closed connection]
arya_elfren has joined #ocaml
b0o has quit [Server closed connection]
b0o has joined #ocaml
Serpent7776 has quit [Ping timeout: 255 seconds]
Serpent7776 has joined #ocaml
cr1901 has quit [Read error: Connection reset by peer]
cr1901 has joined #ocaml
malte has quit [Ping timeout: 265 seconds]
jmcantrell has quit [Server closed connection]
jmcantrell has joined #ocaml
malte has joined #ocaml
malte has quit [Ping timeout: 252 seconds]
malte has joined #ocaml
lain` has quit [Server closed connection]
lain` has joined #ocaml
torretto has quit [Remote host closed the connection]
torretto has joined #ocaml
tomku has quit [Ping timeout: 260 seconds]
tomku has joined #ocaml
Armael has quit [Server closed connection]
Armael has joined #ocaml
<discocaml> <yawaramin> `opam exec --` is a way to set up a build environment with all the environment variables needed to run the build system correctly. this approach is preferred because it works cross-platform. `dune` is the build system which takes care of the low-level details of calling `ocamlc`/`ocamlopt`. if you are a beginner, you have basically no reason to be dealing with the latter compiler invocations directly, and should just use dune to build your p
dreadedfrog has quit [Ping timeout: 255 seconds]
<discocaml> <zux_k1llian> Alright this does make sense it's just unless it's a full multi file project rather there's just one file it's more convinent to directly use ocamlc instead of having to use a full build system for just one file
<discocaml> <yawaramin> sure, if it's just a couple of files
slothby has quit [Server closed connection]
slothby has joined #ocaml
lain` has quit [Remote host closed the connection]
lain` has joined #ocaml
<discocaml> <deepspacejohn> I tend to have a folder with just a `dune` and `dune-project` file that I can easily drop in one-off ml files when I need to test something
<discocaml> <yawaramin> yeah and also i don't hear Rust people trying to bargain like this, so i wonder if it's really that much more difficult to use dune 🙂
<discocaml> <deepspacejohn> I think the default dune project template tends to confuse newcomers
<discocaml> <yawaramin> fair, it does set up a bunch of things all together. `cargo new foo` creates only `Cargo.toml` and `src/main.rs`
tomku has quit [Ping timeout: 265 seconds]
tomku has joined #ocaml
Serpent7776 has quit [Ping timeout: 255 seconds]
gzar has joined #ocaml
<discocaml> <ada2k> i’ve always written my dune files by hand
<discocaml> <ada2k> the ocaml platform plugin for vscode has language support for common stanzas
mbuf has quit [Quit: Leaving]
leah2 has quit [Ping timeout: 248 seconds]
leah2 has joined #ocaml
<dh`> I don't use dune and would only do so with arm-twisting
<dh`> (don't approve of cargo either, fwiw)
<dh`> too automated, too much magic, not enough visibility when things don't do what you want
<dh`> also too constrained, though this is a much bigger problem for cargo
<companion_cube> the alternative to dune is makefiles, and… it sucks
<companion_cube> just sayin'
<dh`> depends on make dialect and whether you know how to use make
<dh`> but, yes, not ideal for the beginner
<dh`> it seems like there ought to be room for something in between, but nobody's managed it
Anarchos has joined #ocaml
<companion_cube> ocamlbuild? :p
<companion_cube> (sucked a lot more than dune, ngl)
<dh`> gods no :-)
<companion_cube> I've heard good things (?) about BSD make
<companion_cube> but in the land of GNU make I know it's just a terrible tool to build OCaml
<dh`> some years back a coworker insisted on switching everything to ocamlbuild and one of the programs just stopped working, and remained not working until I moved it to another repo and gave it a real build again
<dh`> i've probably been telling you that :-)
<dh`> bsd make has plenty of issues but it's markedly less grungy than gmake
<dh`> and in particular it's capable of dealing with interfaces more or less adequately
<companion_cube> ha!
<dh`> (re ocamlbuild, never did figure out what the problem is, best guess in retrospect was that for some reason it was building only some of the sources)
<dh`> s/is/was/
<Anarchos> hello
<discocaml> <yawaramin> experts can obviously use whatever, i was talking about beginners and typical users for dune
<dh`> I did eventually figure out at least one of the weird ocamldep problems I was having; it seems that if you have a .mli file and an .mll file, and you're building into a separate object directory, you have to copy the .mli file into the output directory before building the ocamllex output or the compiler gets confused
<dh`> yawaramin: sure, but it's problematic to have the recommended tool be inadequate for complex projects
<dh`> or to have problems integrating into a larger project as a component
<dh`> both of which seem at least mildly problematic with dune
<companion_cube> huuuu
<companion_cube> dune is extremely adequate for large projects
<companion_cube> like, having a vendor/ dir with multiple libraries in it? works really well
<companion_cube> having multiple libraries in the same project, also relying on vendor/ and on one another? check
<companion_cube> having advanced rules for generating code? oh yeah
<companion_cube> I don't even want to imagine the nightmares it'd take to do these things with make
<dh`> my problems usually arise from the second point (integrating into larger projects)
<companion_cube> oh you mean projects with multiple languages?
<dh`> (complex is not the same as large, fwiw)
<dh`> among other things yeah
<dh`> I have a bunch of projects where I have a compiler for something that's written in ocaml, and then there's everything else
<companion_cube> I think integration into polyglot projects is the weakness of dune _and_ cargo, for sure
<companion_cube> the rest, meh
Anarchos has quit [Ping timeout: 255 seconds]
<dh`> I've yet to try writing a self-hosting tool in ocaml but I expect dune to have some trouble with that
<dh`> s/I expect/I'd expect/
<dh`> obviously a self-hosting compiler written in itself isn't written in ocaml, thinking more of things like parser generators
<dh`> the self-hosting compiler written in itself problem is beyond any simple build tool
<companion_cube> I think you can probably do it in two steps
<companion_cube> a single step is too hard because it'd have to know about fixpoints, but two steps?
<dh`> there's more to it than that, you want to store last-known-good bins and other stuff
<dh`> plus if you aren't rustc you want to be able to do a bootstrap build
<dh`> something like a parser generator is a lot easier because you can just store known-good output in version control
greaser|q has quit [Changing host]
greaser|q has joined #ocaml
greaser|q is now known as GreaseMonkey
<dh`> I also doubt dune's ability to cope with a whole operating system, but that's not really in it or ocaml's mission statement so w/e
<companion_cube> for sure
<companion_cube> the promote system of dune should be good for "last known-good version", btw
<discocaml> <ada2k> companion_cube: the only issue i’ve had with dune vendor is trying to vendor something that’s already installed in the switch
<discocaml> <ada2k> annoying to have a relatively small change to a lib and have to create a new switch with nothing depending on the unpatched version, although i’m probably missing something and local switches solve it anyway
<companion_cube> I always use local switches
<companion_cube> (not sure if I tried what you describe, but yeah, this stuf can be tricky — more ocamlfind's issue than dune's imho)
<discocaml> <ada2k> i just use global switches for the sake of time. if i had an absolutely huge project with lots of pins/vendoring id use local
<discocaml> <ada2k> i wish there was a way to share ocaml binaries between switches
<discocaml> <ada2k> might be one and i haven’t found it
<dh`> vendoring is bad anyway :-)
<discocaml> <ada2k> i just want transient pin depends
dawids has joined #ocaml
dawids has quit [Remote host closed the connection]
bartholin has quit [Quit: Leaving]
tomku has quit [Ping timeout: 255 seconds]
tomku has joined #ocaml
<discocaml> <yawaramin> at that point you have few choices other than, like, Nix and Bazel 🙂
<discocaml> <ada2k> is bazel a real option for ocaml?
<companion_cube> You misspelled buck2 but yeah
<discocaml> <ada2k> never heard of it
<companion_cube> It's bazel but in rust and without special treatment for java and C++
<discocaml> <yawaramin> somewhat, it's being worked on https://obazl.github.io/docs_obazl/
Anarchos has joined #ocaml
Anarchos has quit [Client Quit]
tomku has quit [Ping timeout: 276 seconds]
tomku has joined #ocaml
Tuplanolla has quit [Quit: Leaving.]