rgrinberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
waleee has quit [Ping timeout: 240 seconds]
waleee has joined #ocaml
perrierjouet has quit [Quit: WeeChat 3.4]
perrierjouet has joined #ocaml
azimut_ has joined #ocaml
azimut has quit [Ping timeout: 276 seconds]
rgrinberg has joined #ocaml
waleee has quit [Ping timeout: 268 seconds]
perrierjouet has quit [Quit: WeeChat 3.4]
perrierjouet has joined #ocaml
perrierjouet has quit [Remote host closed the connection]
perrierjouet has joined #ocaml
kaph has quit [Read error: Connection reset by peer]
<d_bot>
<RegularSpatula> Anyone running into random failures of github actions CI when building on macOS? Like 1/2 the time a different package will randomly fail...I "fixed" this in the past by passing `-j 1` to dune (idk why that would have any effect, but I didn't get the random failures again until today)
<d_bot>
<RegularSpatula> Sorry, a random dependency of my package will cause a dependency build failure is what i mean...but only on MacOS of the github actions
wyrd has quit [Ping timeout: 276 seconds]
rgrinberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rgrinberg has joined #ocaml
kaph has joined #ocaml
brettgilio has joined #ocaml
namkeleser has quit [Ping timeout: 256 seconds]
mbuf has joined #ocaml
chrisz has quit [Ping timeout: 268 seconds]
chrisz has joined #ocaml
spip has quit [Read error: Connection reset by peer]
bobo_ has joined #ocaml
zebrag has quit [Quit: Konversation terminated!]
Haudegen has joined #ocaml
gravicappa has joined #ocaml
<d_bot>
<Sp4ce_Navigator> Im a JS/Pyrhon dev that *really* wants to finally learn functional programming. Im debating between Haskell and OCaml. If I'm going to invest a lot of time and energy into learning this language and new paradigm I want to make sure I choose correctly. I mainly do/intend to do backend web dev if that makes a difference. What would you all suggest?
<d_bot>
<monk> @Sp4ce_Navigator if you want a general introduction to FP (ie, from scratch introduction, no assumptions for both language and FP experience) with OCaml, nothing will probably beat the online hosted CS3110 course + video lectures
<d_bot>
<monk> it's a very nice online class that is basically an integrated online textbook with video lectures of code/materials combined in a jupyter-like workspace
<d_bot>
<monk> the cover page also gives you links to the current edition of the class as taught/hosted at Cornell University + YT Playlist.
<d_bot>
<monk> It also provides instructions for setting up your OCaml environment as used for the class ***and*** a virtual machine with OCaml setup in case you don't want to deal with that:
rgrinberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<d_bot>
<monk> I have read through ~80% of the material myself and consider it one of the best introductory texts I've read across both topics of CS and "learn to program".
<d_bot>
<monk>
<d_bot>
<monk> Each chapter also has exercises at the end that reinforce what you learned and are very approachable.
<d_bot>
<monk> that is my 2cents lol
shawnw has joined #ocaml
<d_bot>
<darrenldl> my suspicion is not too many will recommend haskell over ocaml in this server
<d_bot>
<let Butanium = raise Not_found;;> I think you can't make imperative programming style in Haskell as you can in OCaml right ?
<d_bot>
<monk> as someone who actively chose ocaml over haskell despite previous exposure to haskell, i guess it goes without saying that ocaml is much smaller ecosystem/user-base wise than haskell. this passes on to documentation and tooling. that said, i think it is a pragmatic FP language with a lot less magic (okay, it's not magic, it's not having to pull in a dozen extensions that you don't understand as compared to a few basic ppx's at worst
<d_bot>
<monk> i also think the compile times are very nice!
<d_bot>
<monk> i know a lot of people who love haskell. if you want an intro to FP from haskell, i made it about halfway through haskellbook.com and can recommend it as very solid.
<d_bot>
<monk> as beginner/from scratch material, cc: Sp4ce_Navigator
<d_bot>
<monk> the authors go out of their way to avoid the weird/painful aspects of haskell, like (at the time of publishing) its confusing build tooling.
<d_bot>
<monk> `{#- LANGUAGE THING OTHER_THING -#}` is the general format i think
<d_bot>
<monk> lol i got the pound and dash sign reversed, `{-# LANGUAGE <Extension>, <Extension> #-} `
<ns12>
Why don't they write code in pure Haskell 98 or Haskell 2010? In OCaml, I can program without using any ppx.
<d_bot>
<monk> i am going to guess they have very good reasons but i do agree that you can go pretty far without ppx's in ocaml whereas lang extensions in haskell are pretty ubiquitous ime
<d_bot>
<monk> i honestly think compile time/resources is actually underrated imo
<d_bot>
<monk> i have yet to compile an ocaml program that OOM'd my computer. I did this more than once by accident with haskell after > 30min of compiling lol.
<d_bot>
<monk> miss type classes tho
<humasect>
yeah... but modules though =)
<d_bot>
<PureFunctor> Compile times are definitely a breath of fresh air, coming from Haskell
sleepydog has quit [Ping timeout: 256 seconds]
sleepydog has joined #ocaml
humasect has quit [Remote host closed the connection]
humasect has joined #ocaml
jlrnick has quit [Remote host closed the connection]
jlrnick has joined #ocaml
Haudegen has quit [Quit: Bin weg.]
<d_bot>
<cemerick> Haskell is a quite challenging medium to learn FP IMO. Its type theory and laziness are completely orthogonal to FP, but you can't do much without grokking them
humasect has quit [Remote host closed the connection]
humasect has joined #ocaml
humasect has quit [Ping timeout: 256 seconds]
gravicappa has quit [Ping timeout: 240 seconds]
<companion_cube>
hmmm, we don't have a Int63.t? kind of weird in retrospect
<leah2>
aha :)
<leah2>
wrong window
Haudegen has joined #ocaml
<d_bot>
<NULL> Regular ints?
<companion_cube>
well, it'd be regular ints on 64 bits architectures
<companion_cube>
and boxed ints on 32 bits architectures
<d_bot>
<NULL> Oh yeah, forgot that 32bit still existed
shawnw has quit [Ping timeout: 240 seconds]
mro has joined #ocaml
kaph has quit [Ping timeout: 256 seconds]
Haudegen has quit [Ping timeout: 240 seconds]
mro has quit [Remote host closed the connection]
Haudegen has joined #ocaml
rgrinberg has joined #ocaml
kaph has joined #ocaml
gdd has quit [Ping timeout: 256 seconds]
gdd has joined #ocaml
spoofer has quit [Quit: Lost terminal]
gravicappa has joined #ocaml
OCamlPro[m] has joined #ocaml
mro has joined #ocaml
azimut_ has quit [Ping timeout: 276 seconds]
waleee has joined #ocaml
rgrinberg has quit [Ping timeout: 240 seconds]
bobo_ has joined #ocaml
spip has quit [Ping timeout: 240 seconds]
<d_bot>
<leviroth> There’s one in base fwiw
<companion_cube>
yeah but it should be a primitive type
Haudegen has quit [Quit: Bin weg.]
troydm has quit [Ping timeout: 240 seconds]
vicfred has joined #ocaml
dalek-caan has joined #ocaml
<d_bot>
<monk> i was holding back from saying as much directly, but i agree
<d_bot>
<monk> it basically throws you into every concept of FP at once whether you want to or not lol
<d_bot>
<monk> very powerful language that is less pragmatic wrt purity and abstraction, huge upsides and downsides to that.
mro has quit [Remote host closed the connection]
kakadu has quit [Quit: Konversation terminated!]
<d_bot>
<monk> TIL that Sir Tony Hoare was a student of Kolmogorov which... which explains so much
<d_bot>
<monk> really don't know how i missed that lol
<d_bot>
<monk> my thesis that there are 200 people in the world at any given moment continues to hold true
<d_bot>
<cemerick> for sure this is going to become an intrusive thought for me 🙃
mbuf has quit [Quit: Leaving]
rgrinberg has joined #ocaml
humasect has joined #ocaml
humasect has quit [Remote host closed the connection]
humasect has joined #ocaml
humasect has quit [Remote host closed the connection]
ns12 has quit [Quit: bye]
ns12 has joined #ocaml
Haudegen has joined #ocaml
bartholin has quit [Quit: Leaving]
<d_bot>
<monk> is there a "currently hiring"/jobs listing for OCaml aggregated somewhere?
mro has joined #ocaml
dalek-caan has quit [Quit: dalek-caan]
<d_bot>
<RegularSpatula> There’s a job openings channel in reasonml discord
jlrnick has quit [Ping timeout: 268 seconds]
cedric has joined #ocaml
<d_bot>
<monk> neat-o
<d_bot>
<monk> is it considered good practice to install utop on its own switch?
<d_bot>
<monk> doing so would probably require exporting an env (or creating a bash alias?) to specify which one to use at that point, right?
zebrag has joined #ocaml
<d_bot>
<VPhantom> There's talk of something coming up on the `v3.ocaml.org` site soon but I don't think it'll be a comprehensive postings thing, more of a wiki page to list positions we know of.
<d_bot>
<VPhantom> A "Jobs" category (covering anything from one-time bounties to full-time positions) on `discuss.ocaml.org` could be nice. I was surprised there wasn't already one.
<d_bot>
<monk> yeah i gaslit myself into thinking one existed and was momentarily confused haha
<d_bot>
<VPhantom> What would be the benefit?
<d_bot>
<VPhantom> (Sorry I forgot about the IRC proxy and used the "reply" feature.)
<d_bot>
<monk> i think a weekly/monthly posting in a similar vein of what you see on hackernews (forgive me for invoking the orange website) would be a good compromise if someone/entity could be put in charge of it. could be less of an overall liability than a static page since any given listing is liable to become out of date.
<d_bot>
<monk> re: switch, isolating utop entirely from any other version of ocaml used for a project and its installed packages
<d_bot>
<VPhantom> (Ah there's a Jobs _tag_ on Discuss, just not a root category as far as I can tell. I stand corrected.)
<d_bot>
<VPhantom> Yeah I'm not sold on the wiki page idea either; I like that the forums have a tag. It's a good start.
<d_bot>
<monk> i haven't used python seriously in years but i am finally getting around to regularizing my ocaml workflow and despite not being 1:1, the pain of bad python installs and package version mismatches has me asking questions i probably don't need to worry about for my scale of development lol
<d_bot>
<VPhantom> On `utop`, as far as I know it doesn't load any libraries by default (unlike `dune utop`) so I'm not sure a distinct switch with the same compiler version would be useful.
<d_bot>
<monk> yeah i think this is probably a better approach than a static page
<d_bot>
<VPhantom> Ah yes, pip, poetry, virtualenv, venv, etc. I had to dabble in Python and I came out unimpressed. Long live static, easy to share binaries.
<d_bot>
<monk> alerting & coordinating people to post on a pinned job listing every once in awhile, ie the hackernews approach, would probably go a long way
<d_bot>
<monk> and limits the effort to someone making the top level posting every X interval of time
<d_bot>
<VPhantom> I'm not sure threads are removed when positions are filled, however. 😕
<d_bot>
<monk> yeah, they should only be closed to comments at most
<d_bot>
<monk> still serve a good historical archive of places that /did/ hire OCaml and might in the future etc
<d_bot>
<monk> reconfiguring emacs to use lsp, isolated version of ocamlformat, and trying to leverage local opam switches on a per-project basis to make working on more complicated projects less messy. about to find out if i have any clue what i'm actually doing lol.
rgrinberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ado has joined #ocaml
<d_bot>
<VPhantom> `ocamlformat` reads the project's `.ocamlformat` file so you can easily work on multiple projects with different configurations with the same compiler. I really don't see why you'd want to have one switch per project if you're using the same compiler version.
<d_bot>
<VPhantom> Each project's `*.opam` file specifies which OPAM packages it depends on, and I think nowadays that's even handled by Dune in the `dune-project` file but I haven't played with that yet.
Haudegen has quit [Remote host closed the connection]
mro has quit [Quit: Leaving...]
Haudegen has joined #ocaml
gravicappa has quit [Ping timeout: 256 seconds]
<d_bot>
<Anurag> separate switches for projects can be useful if you need to use different version of the same dependencies in different projects.
troydm has joined #ocaml
<d_bot>
<VPhantom> Good point.
<d_bot>
<Anurag> I believe the OCaml compiler will gain relocation support in the future, so creating new switches with the same compiler version should become a lot cheaper in the future.
<d_bot>
<VPhantom> I wouldn't do it as a general practice though, because that's pretty darn heavy, compiling a new compiler and OPAM dependencies for each project, then keeping each one updated.
<d_bot>
<VPhantom> Oh good to hear.
<d_bot>
<Anurag> I've recently started using global switches combined with `opam switch link` so instead of 1 switch per project, I just create as many global switches as I need to satisfy my versioning needs, and then in individual projects i just link a global switch via `opam switch link <name> .` so get a similar workflow as a local switch, but i can have multiple projects share a common switch behind the scenes
<d_bot>
<VPhantom> Doesn't that get you shared dependencies though?
<d_bot>
<Anurag> It does, but in many cases I'm usually working with a core set of dependencies that I want to be replicated across some of my projects (usually async, development versions of some my own libraries, and these days the development version of cohttp, ) so that's worked out well for me so far!
<d_bot>
<Anurag> That said, these days i'm mosty working with dependencies that all build with dune, so I should try the opam monorepo plugin at some point 🤔
sagax has quit [Ping timeout: 240 seconds]
pippijn has quit [Quit: Segmentation fault]
Serpent7776 has quit [Quit: leaving]
pippijn has joined #ocaml
pippijn has quit [Client Quit]
rgrinberg has joined #ocaml
pippijn has joined #ocaml
pippijn has quit [Client Quit]
pippijn has joined #ocaml
pippijn has quit [Client Quit]
pippijn has joined #ocaml
<d_bot>
<monk> think i can say that the tuneup to my emacs setup for ocaml was a success