companion_cube changed the topic of #ocaml to: Discussion about the OCaml programming language | http://www.ocaml.org | OCaml 5.3.0 released: https://ocaml.org/releases/5.3.0 | Try OCaml in your browser: https://try.ocamlpro.com | Public channel logs at https://libera.irclog.whitequark.org/ocaml/
luc4 has joined #ocaml
Tuplanolla has quit [Quit: Leaving.]
luc4 has quit [Quit: Konversation terminated!]
polykernel has quit [Remote host closed the connection]
polykernel has joined #ocaml
Haudegen has quit [Quit: Bin weg.]
Frostillicus has joined #ocaml
Frostillicus has quit [Ping timeout: 276 seconds]
infinity0 has quit [Ping timeout: 248 seconds]
casastortaAway has quit [Ping timeout: 252 seconds]
casastortaAway has joined #ocaml
infinity0 has joined #ocaml
Frostillicus has joined #ocaml
Frostillicus has quit [Ping timeout: 248 seconds]
Lycurgus has joined #ocaml
euphores has joined #ocaml
toastal has joined #ocaml
_whitelogger has joined #ocaml
<discocaml> <shalokshalom> Exactly. I guess caching is a thing, C++ has distributed caching with sscache, I guess Rust and Swift might have too?
amadaluzia has quit [Ping timeout: 276 seconds]
<discocaml> <aurelian5014> I use ccache with rust
agentcasey_ has joined #ocaml
agentcasey has quit [Ping timeout: 252 seconds]
casastortaAway has quit [Ping timeout: 260 seconds]
casastortaAway has joined #ocaml
YuGiOhJCJ has joined #ocaml
Lycurgus has quit [Quit: irc.renjuan.org (juan@acm.org)]
_whitelogger has joined #ocaml
companion_cube has quit [Ping timeout: 240 seconds]
rak has quit [Ping timeout: 240 seconds]
rak has joined #ocaml
companion_cube has joined #ocaml
casastortaAway has quit [Ping timeout: 245 seconds]
casastortaAway has joined #ocaml
toastal has left #ocaml [#ocaml]
toastal has joined #ocaml
Tuplanolla has joined #ocaml
itszor has joined #ocaml
zor has quit [Ping timeout: 265 seconds]
bartholin has quit [Read error: Connection reset by peer]
bartholin has joined #ocaml
casastortaAway has quit [Ping timeout: 260 seconds]
casastortaAway has joined #ocaml
Frostillicus has joined #ocaml
Frostillicus has quit [Ping timeout: 260 seconds]
Frostillicus has joined #ocaml
toastal has quit [Ping timeout: 272 seconds]
casastorta has quit [Ping timeout: 244 seconds]
casastorta has joined #ocaml
casastorta has quit [Remote host closed the connection]
casastortaAway has quit [Quit: ZNC 1.10.1 - https://znc.in]
casastorta has joined #ocaml
casastortaAway has joined #ocaml
Frostillicus has quit [Ping timeout: 248 seconds]
toastal has joined #ocaml
Haudegen has joined #ocaml
Frostillicus has joined #ocaml
casastortaAway has quit [Ping timeout: 276 seconds]
casastortaAway has joined #ocaml
bartholin_ has joined #ocaml
bartholin has quit [Read error: Connection reset by peer]
inline has quit [Remote host closed the connection]
inline has joined #ocaml
Frostillicus has quit [Ping timeout: 252 seconds]
amadaluzia has joined #ocaml
<discocaml> <asadun5771> i really want to like OCAML, but maaaan some of the minute stuff really puts me off
<discocaml> <asadun5771> the variable shadowing, the lack of braces (or at least pretend to look imperative), the `=` operator having multiple meanings
<discocaml> <asadun5771> i guess i am going to have to keep looking or write my own 😭
<discocaml> <asadun5771> what i love: type inference, GC, REPL support, not sure what i think about modules...
<discocaml> <asadun5771> i like Rust but it is a very, very ambitious project and very big language as well ( i never really understood async) and the compile time is coutner productive at times
Frostillicus has joined #ocaml
casastortaAway has quit [Ping timeout: 276 seconds]
amadaluzia has quit [Quit: ZNC 1.10.1 - https://znc.in]
Frostillicus has quit [Ping timeout: 276 seconds]
casastortaAway has joined #ocaml
casastorta has quit [Quit: ZNC 1.10.1 - https://znc.in]
casastortaAway has quit [Remote host closed the connection]
casastorta has joined #ocaml
casastortaAway has joined #ocaml
Frostillicus has joined #ocaml
Frostillicus has quit [Ping timeout: 245 seconds]
<discocaml> <noahtheduke> thanks!
<discocaml> <froyo> Rust is following OCaml's school of thought in lexical conventions though. Shadowing is allowed everywhere. For braces, anywhere you want to introduce a block, you could just use `( ... )` or `begin ... end`.
<discocaml> <noahtheduke> it's a bummer ocaml can't access variables defined in dynamically loaded modules
<discocaml> <froyo> `(<>)`, `(=)` operators have only one meaning in stdlib, structural (in)equality (respectively). You're free to redefine them or to redefine`(==)` and `(!=)` if you wish to use more conventional syntax. Although I personally discourage both actions because it breaks assumptions the readers of your code might have when they look at an operator conventionally used for something else. though I do agree it can be a little confusing at first the fact
bartholin_ has quit [Read error: Connection reset by peer]
<discocaml> <jaydub3621> If you want an ocaml-like language that is smaller and more of a Rust syntax, take a look at Gleam
<discocaml> <froyo> you could always just avoid using an operator altogether and instead opt for `Mod.equal`
<discocaml> <froyo> (it's better anyway because structural equality has a gotcha when two different structures could mean the same thing in an equality relation, e.g. sets)
<discocaml> <yawaramin> you can, see https://x.com/_anmonteiro/status/1761307756315730317
<discocaml> <yawaramin> you can adapt that to have some other desired properties eg multicore thread safety by using an Eio promise to hold the 'plugin' instead of using a ref
casastortaAway has quit [Ping timeout: 248 seconds]
bartholin_ has joined #ocaml
casastortaAway has joined #ocaml
<discocaml> <noahtheduke> that's interesting
<discocaml> <froyo> > it's a bummer ocaml can't access variables defined in dynamically loaded modules
<discocaml> <froyo> wdym by "variables"? refs? both refs and normal bindings can be read from plugins
<discocaml> <noahtheduke> i love clojure and love how clojure can just load a given file and access whatever is inside, because clojure's top level bindings attach to the namespace and the namespaces are tracked globally
<discocaml> <noahtheduke> i've been wondering if that's possible in ocaml, as it would simplify finding tests in testo or equivalent
<discocaml> <noahtheduke> finding and running tests, i mean
troydm has quit [Quit: What is Hope? That all of your wishes and all of your dreams come true? To turn back time because things were not supposed to happen like that (C) Rau Le Creuset]
troydm has joined #ocaml
bartholin__ has joined #ocaml
<discocaml> <yawaramin> test discovery seems like a solution in search of a problem to me. we can easily have an API like `suite "Addition" [case "positive number" (fun ctx -> ...); case ...;...]` and so on where the suite is packaged together with all its tests so there's nothing to 'find'
bartholin_ has quit [Ping timeout: 248 seconds]
<discocaml> <yawaramin> or rather `let () = suite ...` ie `suite` is the 'test runner'. declaring the module as a `test` component in the `dune` file is enough to tell dune where to find all the test suites anyway so...
YuGiOhJCJ has quit [Quit: YuGiOhJCJ]
Serpent7776 has joined #ocaml
Guest3298 has joined #ocaml
Guest3298 has quit [Quit: Client closed]
<discocaml> <noahtheduke> if a test has to be manually included in a call to a test running function, then it's possible for it to be missed and not run (i've done this). if a file has to be included in a list of files to be run, then it's possible for it to be missed and not run (i've done this).
<discocaml> <yawaramin> yeah that's why i'm saying we can just define the test inline, we don't have to define it separately and then include it in the list manually just because the examples show that
<discocaml> <yawaramin> if test files are defined in dune `(test ...)` stanzas, dune will automatically run them when running the `dune test` command. no need to include files in a list
<discocaml> <yawaramin> eg in a traditional Python test suite, the definition is a class named `SomethingTest` and the cases are methods named `testFoo()` and so on. would you just 'forget' to include a test case in such a suite? no, because you're defining them all inline
<discocaml> <noahtheduke> right
<discocaml> <noahtheduke> but with pytest you can just say "pytest" and it'll discover the right files to execute
bartholin__ has quit [Read error: Connection reset by peer]
Frostillicus has joined #ocaml
Frostillicus has quit [Ping timeout: 245 seconds]
bartholin__ has joined #ocaml
<discocaml> <yawaramin> fair point, in dune you need to declare each test in its stanza. so i guess it's possible to forget to declare it
Frostillicus has joined #ocaml
casastortaAway has quit [Quit: ZNC 1.10.1 - https://znc.in]
casastorta has quit [Quit: ZNC 1.10.1 - https://znc.in]
casastorta has joined #ocaml
Frostillicus has quit [Remote host closed the connection]
Frostillicus has joined #ocaml
casastortaAway has joined #ocaml
Frostillicus has quit [Ping timeout: 248 seconds]
Frostillicus has joined #ocaml
Frostillicus has quit [Ping timeout: 252 seconds]
Frostillicus has joined #ocaml
amadaluzia has joined #ocaml
Serpent7776 has quit [Ping timeout: 276 seconds]
Frostillicus has quit [Ping timeout: 248 seconds]
bartholin__ has quit [Quit: Leaving]
delyan_ has joined #ocaml
YuGiOhJCJ has joined #ocaml
_jbrown_ has joined #ocaml
habnabit_ has quit [Changing host]
habnabit_ has joined #ocaml
itszor has quit [Ping timeout: 260 seconds]
habnabit_ has quit [Quit: testing certfp]
habnabit_ has joined #ocaml
habnabit_ has quit [Client Quit]
habnabit_ has joined #ocaml
habnabit_ has quit [Quit: ZNC - http://znc.sourceforge.net]
habnabit_ has joined #ocaml
habnabit_ has quit [Remote host closed the connection]
habnabit_ has joined #ocaml