<discocaml>
<dubious245> I do wish there was more ocaml youtube content.
<discocaml>
<nothisisjohn> What sort of OCaml content are you (or anyone) interested in? I had a moderately successful channel a few years ago and have been toying with posting videos over the summer. I think that I would enjoy making / watching ~10 minute videos of implementing a small fun program. the first two that come to mind are 2048 and a wordle solver.
<discocaml>
<dubious245> :bThoughtful:
<discocaml>
<cod1r> janestrreet youtube is pretty good
<discocaml>
<dubious245> I'd just like to see stuff being used. Not tutorials. Just here a thing this is how I solved it using ocaml.
euphores1 has quit [Quit: Leaving.]
<discocaml>
<tornato> whoa
<discocaml>
<tornato> my friend is #5 in the US on hackerrank
euphores has joined #ocaml
pi3ce has quit [Remote host closed the connection]
pi3ce has joined #ocaml
semarie has quit [Quit: quit]
ridcully_ has joined #ocaml
semarie has joined #ocaml
patrick_ is now known as patrick
troydm has quit [Ping timeout: 252 seconds]
germ_ has quit [Ping timeout: 252 seconds]
ridcully has quit [Ping timeout: 252 seconds]
germ- has joined #ocaml
patrick has quit [Changing host]
patrick_ has joined #ocaml
CalimeroTeknik has quit [Ping timeout: 252 seconds]
Duns_Scrotus has quit [Ping timeout: 252 seconds]
Duns_Scrotus has joined #ocaml
mercxry has quit [Read error: Connection reset by peer]
mercxry has joined #ocaml
troydm has joined #ocaml
CalimeroTeknik has joined #ocaml
<discocaml>
<.pseud.> Using stuff. Coming in, knowing a bit of the syntax and underlying theory. Getting started with ocaml is still quite difficult.
<discocaml>
<.pseud.> Broken(?), severely undocumented libraries like caqti getting recommended is not helping.
<discocaml>
<.pseud.> Dune and co is cool, but getting it all up and running is a bit hard, it is a bit alien to most.
<discocaml>
<.pseud.> I would definitely spend time on getting going (dune, opam, maybe wrap in nix) then good editor plugins. Then maybe showcase other cool stuff like utop.
<discocaml>
<.pseud.> From there, small, concise "building xyz in ocaml" 🙂
<discocaml>
<.pseud.> CLI app, (arc parsing etc), maybe a telegram bot (http requests etc), database interaction. Something showing how to handle JSON and mapping into well defined types etc etc.
<discocaml>
<regularspatula> Caqti is broken for you?
<discocaml>
<.pseud.> Wrote in the beginner channel about it. 🙂
<discocaml>
<.pseud.> Fwiw not alone, saw another blog post where caqti was also problematic for a person starting out with Dream .
<discocaml>
<.pseud.> Yea. I would never recommend it, tbh.
dhil has joined #ocaml
<discocaml>
<scope9247> functors define parametrized modules (compile-time), method calls happen via dynamic dispatch, so modules in this case for sure?
bartholin has joined #ocaml
<discocaml>
<regularspatula> Can you link the blog post?
<discocaml>
<.pseud.> It's as much an issue of the API churn as anything. He just got caught out by one library using caqti needing the 2.x api while Dream at the time supported 1.x
<discocaml>
<.pseud.> My issue was that LLMs recommend what I assume was the earlier 1.x API. Not the library author's fault, I know.
<discocaml>
<.pseud.>
<discocaml>
<.pseud.> but then it's compounded by https://github.com/paurkedal/ocaml-caqti?tab=readme-ov-file#running-under-utop not actually working (you should `#require "caqti-lwt.unix"` - I saw mentions of `caqti-lwt-unix` around.. But had to guess why I could not get things working and why my LSP complained of unbound modules).
<discocaml>
<.pseud.>
<discocaml>
<.pseud.> Then I finally looked at their example since I could not, for the life of me, find examples anywhere else and since the https://ocaml.org/p/caqti-lwt/1.9.0/doc/Caqti_lwt/index.html was what I found and when I selected 2.2.4 I saw nothing (turns out 2.1.1 has an entry). And so on and so on and so on.
<discocaml>
<.pseud.>
<discocaml>
<.pseud.> If one is well-acquainted with the ecosystem and language, maybe reading the source is enough, maybe you'll know if there's API docs elsewhere and how to build them. Maybe you'll quickly guess that you should require `caqti-lwt.unix` and so on.. But it's just unfortunate that the library one is lead toward is also incidentally a much more difficult-to-use and under-documented thing.
<discocaml>
<.pseud.>
<discocaml>
<.pseud.> ((I get why, in the abstract.. I am assuming the author is trying to leverage the type-system to provide checks and guarantees beyond what e.g. the base sqlite3 library does. But the point still stands.))
<discocaml>
<regularspatula> Yeah I understand where you’re coming from. I’m not sure how to turn your critique into actionable things though. Potentially posting on the discus forum?
<discocaml>
<regularspatula> At least more people could see the issues there
<discocaml>
<.pseud.> I guess for me it's more of a getting it off my chest thing 😄
<discocaml>
<.pseud.> Yea.. I do understand, it's not that helpful if not turned actionable.
<discocaml>
<.pseud.>
<discocaml>
<.pseud.> I kind of expect a parade of people dismissing it and calling it "skill issue" though. And I get it, I'm not the PM of whoever writes caqti. I, and anyone else stumbling across that library, is owed nothing.
<discocaml>
<.pseud.> So it feels useless to raise, really.
<discocaml>
<regularspatula> I don’t think it’s useless. There have been posts like this before. But of course it takes some activation energy to write up a post which isn’t trivial to overcome either
<discocaml>
<regularspatula> You mention building api docs on your own, there is odig for that. It will give you local docs for the versions in your switch
<discocaml>
<.pseud.> Yea. I suspected there would be. But when you're just spinning your wheels and trying to write something small to see if you can actually make ocaml do something for you (so.. investigating the worth of investigating further), it's already a lot.
<discocaml>
<.pseud.>
<discocaml>
<.pseud.> Like I said, this is not unique to ocaml. It can be a pain to figure out how to do "modern" .NET/F# projects, or getting started with Clojure (which project management tool should I use) etc etc etc.
<discocaml>
<.pseud.> So by the time I had finally wrapped ocaml up in a nix development shell (to provide system libraries) and, sort of (ish) figured out how to make dune do what I wanted.. a lot of time was spent and I was more interested in writing some code 😄
<discocaml>
<.pseud.> .
<discocaml>
<.pseud.> But it's all good. I'll use the "dumb person" sqlite library. It maps closely to what I'm used to and I won't know why I'm missing out anyway, so it's all good 😄
<discocaml>
<regularspatula> Yeah it’s unfortunate it’s not a ln easier path to coding
<discocaml>
<regularspatula> Caqti uses that one if I recall
<discocaml>
<regularspatula> It’s good
<discocaml>
<.pseud.> it seems simple enough that I can read the type-defs and API docs and have SOME notion of how to put the lego pieces together to actually do stuff. So that's a plus 🙂
Tuplanolla has joined #ocaml
Serpent7776 has joined #ocaml
steenuil has quit [Remote host closed the connection]
steenuil has joined #ocaml
infinity0 has joined #ocaml
infinity0 has quit [Remote host closed the connection]
infinity0 has joined #ocaml
infinity0 has quit [Client Quit]
infinity0 has joined #ocaml
infinity0 has quit [Client Quit]
infinity0 has joined #ocaml
infinity0 has quit [Client Quit]
infinity0 has joined #ocaml
infinity0 has quit [Client Quit]
infinity0 has joined #ocaml
infinity0 has quit [Quit: WeeChat 4.5.1]
infinity0 has joined #ocaml
YuGiOhJCJ has quit [Quit: YuGiOhJCJ]
infinity0 has quit [Remote host closed the connection]
infinity0 has joined #ocaml
infinity0 has quit [Client Quit]
infinity0 has joined #ocaml
infinity0 has quit [Quit: WeeChat 4.5.1]
infinity0 has joined #ocaml
infinity0 has quit [Client Quit]
infinity0 has joined #ocaml
infinity0 has quit [Client Quit]
infinity0 has joined #ocaml
Haudegen has joined #ocaml
infinity0 has quit [Remote host closed the connection]
<discocaml>
<contificate> Honestly, there's so little that any idea would effectively be the first tutorial-esque video about that topic.
<discocaml>
<contificate> You can connect a bunch of stuff together as well, anything using Lwt may be a networked program requiring incremental (buffered) parsing of some format (say, using Angstrom.Buffered), maybe even using JSON at some point as well (Yojson, maybe even derived with ppxes).
casastorta has joined #ocaml
infinity0 has joined #ocaml
<discocaml>
<dubious245> The only decent Ocaml content is the Cornell 3110 videos. Which are frankly great.
<discocaml>
<dubious245> But thats covers a limited range of ocaml.
<discocaml>
<dubious245> Everything else is 50 minutes conference talks where they waffle for an hour.
mange has quit [Quit: Zzz...]
dhil has quit [Ping timeout: 252 seconds]
dhil has joined #ocaml
Haudegen has quit [Ping timeout: 260 seconds]
Haudegen has joined #ocaml
Haudegen has quit [Ping timeout: 252 seconds]
Haudegen has joined #ocaml
Serpent7776 has quit [Ping timeout: 260 seconds]
<discocaml>
<gabyfle> Hello, is there a particular reason that could lead `caml_ba_alloc` to block ?
<discocaml>
<gabyfle> I have a code where using FFI, I read/write to/from bigarrays. "read then write" don't cause any blocking but "write -> read" cause caml_ba_alloc to block and I can't find one. In my write function, I don't do anything that alter OCaml heap since I'm just reading values from the memory and writing them into an audio file
<discocaml>
<gabyfle> Here is my code for the writing <https://pastebin.com/cEKBKANZ> (it's quite very simple code actually, it doesn't do anything fancy)
DerTeufel has joined #ocaml
Der_Teufel has quit [Ping timeout: 272 seconds]
<discocaml>
<youngkhalid> I really enjoyed this one, I wish Tsoding did more OCaml videos :