[HN Gopher] 2021 at OCamlPro ___________________________________________________________________ 2021 at OCamlPro Author : gjadi Score : 79 points Date : 2022-02-18 14:49 UTC (8 hours ago) (HTM) web link (www.ocamlpro.com) (TXT) w3m dump (www.ocamlpro.com) | gjadi wrote: | Learn OCaml is a cool platform to play with OCaml and I'm excited | about their work on TLA+ ! | baby wrote: | It's great to hear that Opam is making progress! I just wished | that it would be more deeply integrated with Dune. A package | manager that doesn't build is not very useful to be honest. | Currently the only way to not have to care about switches and be | able to clearly specify dependencies is to use the esy package | manager[1] (which had lock files a while ago). With their work on | Rust I can only hope they get inspired by Cargo. | | It's also interesting to see that they're working a lot with | Rust. I've seen a lot of OCaml people switching to Rust or | getting more and more into Rust, I'm wondering what this means | for OCaml. | | [1]: https://github.com/esy/esy/ | mro_name wrote: | being able to pipe dune through opam would be cool - write | human stuff to stderr and opam input to stdout. And then run | e.g. $ dune runtest | opam | | dune and opam would have to agree on how to talk with each | other, however. | mseri wrote: | They do, they are developing drom[1], a wrapper over opam and | dune to provide a cargo-like experience. | | [1]: https://ocamlpro.github.io/drom/ | | What's wrong with opam? Since version 2 it also supports local | switches and locking, and the opam repository has become much | more stable than in the past. Full disclosure: I am biased | here, since I am one of the opam-repository maintainers and I | am quite happy with opam itself. | andreypopp wrote: | > What's wrong with opam? | | I'd say the main problem is that local switches and lock | files are still not the default mode of operation. | | Also opam lacks a global cache of built packages which esy | provides (esy's cache is modelled after Nix package manager). | So every new opam local switch effectively compiles | everything from scratch. Though, as I understand this aspect | is going to be addressed by dune at some point (though esy | caches not just OCaml built artefacts but also C/C++). | | (Full disclosure: I'm biased as I'm one of the original | developers of esy) | UncleOxidant wrote: | Rust at OCamlPro? | mirekrusin wrote: | They specialize in both, they should probably change name from | "OCamlPro SAS" to something like "R&D SAS" or whatever. | adamnemecek wrote: | Rust is heavily influenced by OCaml. The first Rust compiler | was written in Rust. | O_H_E wrote: | > The first Rust compiler was written in Rust | | I think you meant "was written in OCaml" | adamnemecek wrote: | I did, haha. | LAC-Tech wrote: | I think Rust and Ocaml are very different languages. | | I went into Rust thinking I could use it like a kind of curly | brace Ocaml, and that's totally off. It's much more like a | very strict modern C++ with a lot of historical cruft | removed. | | OCaml is much more concise and higher level. It also doesn't | let you reason about memory layout really well. Plus Ocaml | has parametric polymorphism and higher order modules, | compared with rusts ad-hoc polymorphism and traits. In Ocaml | the idiomatic solution is often recursion but that will blow | the rust stack. | | (full disclaimer, I'm much better at Ocaml than I am Rust, | and I'm really not great at Ocaml) | riwsky wrote: | rust has parametric polymorphism, it just calls it generics | --and traits correspond to ocaml signatures. These aren't | useful juxtapositions. | speed_spread wrote: | > The first Rust compiler was written in Rust. | | That's impressive! | | (yeah, it could have been interpreted) | adamnemecek wrote: | Fuck I meant OCaml. | UncleOxidant wrote: | Yes, I know this, but this is going the other direction and | seems kind of noteworthy: OCamlPro exists to promote OCaml, | and it looks like they're making some forays into Rust? | mirekrusin wrote: | OCaml - Rust interop would be very cool, whatever low-level | stuff you can throw into Rust while being able to use it | from OCaml would be interesting. | mseri wrote: | There are a number of interesting projects already doing | this, either doing it manually via the c FFI or using | projects like ocaml-rs [1] or ocaml-interop [2] for | example | | [1]: https://github.com/zshipko/ocaml-rs [2]: | https://github.com/tezedge/ocaml-interop | LAC-Tech wrote: | OCaml is one of my favourite languages. It's such a sweet spot in | terms of conciseness and performance - yes there are a few | language more concise and a few that have faster implementations | but I can't think of any that are both as fast and as concise. | | Tooling has come a long way too - very impressed by dune, it lets | me do my favourite thing in the world which is hit save and run | my tests automatically. | | I'd use it a lot more if the ecosystem was bigger. Just can't | justify a better language when I'd have to implement my own, idk, | mutable ordered dictionary. ___________________________________________________________________ (page generated 2022-02-18 23:00 UTC)