<src>
I have a folder with a few .ml source files (mainly very tiny learning programs), one of which is called `15_zarith.ml` https://dpaste.com/DBEQ9TM3B I can't compile this because no matter what I do I get a `Error: Unbound module Zarith` even though zarith is installed (I did so via `opam`. `zarith` shows up when doing `opam list`, it's in `~/.opam/default/lib` (zarith folder with .cmxa .cma files etc)...
<src>
can anyone give ma hint how to compile this?
waleee has quit [Ping timeout: 246 seconds]
<discocaml>
<Kali> are you linking zarith when compiling?
waleee has joined #ocaml
Techcable has quit [Remote host closed the connection]
<discocaml>
<hockletock> what purpose is served by their being in unpopular languages?
dhil has joined #ocaml
Johann has quit [Ping timeout: 246 seconds]
adrien has joined #ocaml
adrien has quit [Ping timeout: 246 seconds]
chrisz has joined #ocaml
chrisz has quit [Ping timeout: 255 seconds]
jumpnbrownweasel has quit [Ping timeout: 252 seconds]
Johann_ has joined #ocaml
Serpent7776 has joined #ocaml
rgrinberg has joined #ocaml
mro has joined #ocaml
rgrinberg has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
dhil has quit [Ping timeout: 246 seconds]
bacam has quit [Server closed connection]
bacam has joined #ocaml
azimut has joined #ocaml
bartholin has quit [Quit: Leaving]
mro has quit [Quit: Leaving]
ursa-major has quit [Ping timeout: 255 seconds]
Guest97 has joined #ocaml
bibi_ has joined #ocaml
Guest97 has quit [Quit: Client closed]
Hammdist has quit [Quit: Client closed]
Hammdist has joined #ocaml
Hammdist has quit [Quit: Client closed]
mro has joined #ocaml
bibi_ has quit [Ping timeout: 255 seconds]
dnh has joined #ocaml
Hammdist has joined #ocaml
rgrinberg has joined #ocaml
<discocaml>
<contextfreebeer> Even though SICP has been translated into many different languages, and it aims to be a book about learning how to think like a programmer rather than how to use a particular language, I would still call it inherently a Lisp book, so the fact that it uses Scheme is certainly not an arbitrary decision
<discocaml>
<Kali> thinking forth is nice
<discocaml>
<contextfreebeer> really couldn't imagine it using any non-lisp language
rgrinberg has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
rgrinberg has joined #ocaml
<discocaml>
<mwzm> ```ocaml
<discocaml>
<mwzm> type token_data =
<discocaml>
<mwzm> { line : int
<discocaml>
<mwzm> ; lexeme : string
<discocaml>
<mwzm> }
<discocaml>
<mwzm> [@@deriving show]
<discocaml>
<mwzm>
<discocaml>
<mwzm> exception LoxError of string
<discocaml>
<mwzm>
<discocaml>
<mwzm> type token =
<discocaml>
<mwzm> | LeftParen of token_data
<discocaml>
<mwzm> | RightParen of token_data
<discocaml>
<mwzm> | LeftBrace of token_data
<discocaml>
<mwzm> | RightBrace of token_data
<discocaml>
<mwzm> | Comma of token_data
<discocaml>
<mwzm> .
<discocaml>
<mwzm> .
<discocaml>
<mwzm> .
<discocaml>
<mwzm> | Eof of token_data
<discocaml>
<mwzm> [@@deriving show]
<discocaml>
<mwzm>
<discocaml>
<mwzm> type token_list = token list [@@deriving show]
<discocaml>
<mwzm>
<discocaml>
<mwzm> type scanner =
<discocaml>
<mwzm> { tokens : token_list
<discocaml>
<mwzm> ; line : int
<discocaml>
<mwzm> ; current : int
<discocaml>
<mwzm> ; ch : char
<discocaml>
<mwzm> ; str : string
<discocaml>
<mwzm> }
<discocaml>
<mwzm> [@@deriving show]
<discocaml>
<mwzm> ```ocaml
<discocaml>
<mwzm> type token_data =
<discocaml>
<mwzm> { line : int
<discocaml>
<mwzm> ; lexeme : string
<discocaml>
<mwzm> }
<discocaml>
<mwzm> [@@deriving show]
<discocaml>
<mwzm>
<discocaml>
<mwzm> type token =
<discocaml>
<mwzm> | LeftParen of token_data
<discocaml>
<mwzm> | RightParen of token_data
<discocaml>
<mwzm> | LeftBrace of token_data
<discocaml>
<mwzm> | RightBrace of token_data
<discocaml>
<mwzm> | Comma of token_data
<discocaml>
<mwzm> .
<discocaml>
<mwzm> .
<discocaml>
<mwzm> .
<discocaml>
<mwzm> | Eof of token_data
<discocaml>
<mwzm> [@@deriving show]
<discocaml>
<mwzm>
<discocaml>
<mwzm> type token_list = token list [@@deriving show]
<discocaml>
<mwzm>
<discocaml>
<mwzm> type scanner =
<discocaml>
<mwzm> { tokens : token_list
<discocaml>
<mwzm> ; line : int
<discocaml>
<mwzm> ; current : int
<discocaml>
<mwzm> ; ch : char
<discocaml>
<mwzm> ; str : string
<discocaml>
<mwzm> }
<discocaml>
<mwzm> [@@deriving show]
<discocaml>
<mwzm> ```
<discocaml>
<octachron> ppx are syntactic, so you can replace the show_token in scope at the definition of token_list.
rgrinberg has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<discocaml>
<mwzm> do you mind writing a quick example of how that might go?
waleee has quit [Remote host closed the connection]
waleee has joined #ocaml
johnel has quit [Server closed connection]
johnel has joined #ocaml
rgrinberg has joined #ocaml
<discocaml>
<JM> So weird that they are convinced we will all jump to Bazel once they've stabilise their solution...
<discocaml>
<JM> I mean, I do Java for a living, Bazel is written in Java and has top Java support and I wouldn't touch it with barge-pole.
<discocaml>
<JM> I don't personally know anybody using Bazel for their builds.
waleee has quit [Ping timeout: 245 seconds]
waleee has joined #ocaml
MarvelousWololo has joined #ocaml
Hammdist has quit [Quit: Client closed]
rgrinberg has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
waleee has quit [Ping timeout: 240 seconds]
<companion_cube>
if anything, something like buck2 (I think?) in rust is more appealing to me
jumpnbrownweasel has joined #ocaml
ec has quit [Ping timeout: 246 seconds]
<discocaml>
<bluddy5> I think we'll just stick with what works.
<companion_cube>
apparently dune is not usable, heh
<companion_cube>
damn does Bunzli get on my nerves sometimes
rgrinberg has joined #ocaml
MarvelousWololo has quit [Quit: MarvelousWololo]
ec has joined #ocaml
mro has quit [Ping timeout: 246 seconds]
myrkraverk_ has quit [Quit: Leaving]
<discocaml>
<jumpnbrownweasel> if Dune's doc was better the issue may be lessened
<discocaml>
<jumpnbrownweasel> i find it difficult to figure out all the things Dune is capable of doing by reading the docs
masterbuilder has quit [Quit: Lost terminal]
masterbuilder has joined #ocaml
rgrinberg has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<companion_cube>
yeah I agree, the docs are the weakest point
<discocaml>
<regularspatula> maybe it would be better to call "the ocaml platform" something else? haskell had a "haskell platform" too then it got deprecated in favor of something else, which is confusing
<companion_cube>
just suggested "the dune platform"
<discocaml>
<regularspatula> yeah that would make more sense to me
<discocaml>
<regularspatula> its dune-centric workflow to build ocaml programs after all right?
<discocaml>
<geoff> They always say cross-language is a big problem, but I haven't had much trouble with running cmake from dune and using the outputs
<companion_cube>
maybe it's ex-googlers and they just want their fancy big build system, idk
<discocaml>
<jumpnbrownweasel> what about combining Rust and OCaml?
<companion_cube>
yeah more or less… I only have one project doing this tho
masterbuilder has joined #ocaml
xmachina has quit [Quit: WeeChat 4.0.4]
pie_ has quit [Server closed connection]
pie_ has joined #ocaml
rgrinberg has joined #ocaml
<discocaml>
<geoff> Maybe should replace the sh with direct run / dunes copy etc
<discocaml>
<jumpnbrownweasel> ok, i may try that
<discocaml>
<regularspatula> i do something similar with javascript tools + ocaml
<discocaml>
<regularspatula> @jumpnbrownweasel are you currently using rust+ocaml?
Hammdist has joined #ocaml
<discocaml>
<jumpnbrownweasel> i'm just starting something, nothing yet
<discocaml>
<regularspatula> i see. it seems like it could be a nice pairing
daimrod1 has quit [Server closed connection]
daimrod1 has joined #ocaml
<discocaml>
<geoff> Going the other way, what is it that makes dune so bad as a sub project in a project that using another build system?
<discocaml>
<bluddy5> The dune devs have been extremely receptive to almost any request from the community. If there's demand for this feature, they will very likely put it on their roadmap.
<discocaml>
<bluddy5> Which means that the people complaining are generally searching for a reason to complain.
dhil has joined #ocaml
xmachina has joined #ocaml
<discocaml>
<regularspatula> Did something like this: https://github.com/ocaml/dune/issues/1046#issuecomment-408855571, ever make it into dune? (basically looks like `(using myconf 1.0)` or something similar to be able to set flags and other such things across your projects)
m5zs7k has joined #ocaml
myrkraverk has joined #ocaml
Serpent7776 has quit [Quit: leaving]
xmachina has quit [Quit: WeeChat 4.0.4]
yziquel has joined #ocaml
Hammdist has quit [Quit: Client closed]
xmachina has joined #ocaml
Hammdist has joined #ocaml
rgrinberg has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<discocaml>
<gar6872> @geoff Please don't spread that kind of nonsense. I do not and never have hated Dune.
bibi_ has joined #ocaml
<discocaml>
<geoff> sorry, it just seems that every time you mention it, it is to say that it is not good
<src>
jumpnbrownweasel: ty I got it working
<src>
your command worked, had an error message due to using OCaml 5.0.0 but installed 4.14.1 as well and there it works (after having installed ocamlfind and Zarith etc)
<discocaml>
<geoff> obazl: also, the phrasing is meant to read like those silly clickbait blogs/ads
<discocaml>
<geoff> > Doctors *HATE* this one weird trick
<discocaml>
<geoff> Not meant to be some kind of slander against you
TrillionEuroNote has joined #ocaml
<discocaml>
<gar6872> Haha, "World reacts to ..." is another one.
dnh has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bartholin has joined #ocaml
<discocaml>
<jumpnbrownweasel> src: I used ocaml 5.0.0 for those commands. I did `opam update` and then installed `zarith`, so maybe I got a more recent zarith than you did.
Hammdist has quit [Quit: Client closed]
yziquel has joined #ocaml
yziquel has quit [Quit: Client closed]
yziquel has joined #ocaml
lilata has quit [Quit: Ping timeout (120 seconds)]
lilata has joined #ocaml
slothby has quit [Ping timeout: 255 seconds]
<discocaml>
<cemerick> citing Clojure history as a counterpoint to the platform's existence is *hilarious*
<discocaml>
<cemerick> or, "The Platform", I should say
<discocaml>
<rikamg> Kismet indeed! I actually got into that thread again becuase I was lurking this room (I gotta change my forum username if possible)
<discocaml>
<cemerick> > I don't personally know anybody using Bazel for their builds.
<discocaml>
<cemerick> > d
<discocaml>
<cemerick> I'm only aware of bazel usage in very large orgs, with all the attendant griping
waleee has joined #ocaml
<discocaml>
<rikamg> Kismet indeed! I actually got into that thread again because I was lurking this room (I gotta change my forum username if possible)
rgrinberg has joined #ocaml
dhil has quit [Ping timeout: 246 seconds]
xmachina has quit [Quit: WeeChat 4.0.4]
xmachina has joined #ocaml
rgrinberg has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
slothby has joined #ocaml
rgrinberg has joined #ocaml
myrkraverk has quit [Read error: Connection reset by peer]
myrkraverk has joined #ocaml
random-jellyfish has joined #ocaml
dh` has quit [Ping timeout: 255 seconds]
dh2` has joined #ocaml
wingsorc has joined #ocaml
yziquel has quit [Ping timeout: 245 seconds]
dnh has joined #ocaml
bartholin has quit [Quit: Leaving]
Tuplanolla has quit [Ping timeout: 255 seconds]
nore has quit [Server closed connection]
nore has joined #ocaml
wingsorc has quit [Remote host closed the connection]
dnh has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dnh has joined #ocaml
wingsorc has joined #ocaml
rgrinberg has quit [Quit: My Mac has gone to sleep. ZZZzzz…]