Leonidas changed the topic of #ocaml to: Discussion about the OCaml programming language | http://www.ocaml.org | OCaml 4.13.0 released: https://ocaml.org/releases/4.13.0.html | Try OCaml in your browser: https://try.ocamlpro.com | Public channel logs at https://libera.irclog.whitequark.org/ocaml/
Soni has quit [Ping timeout: 240 seconds]
Haudegen has quit [Ping timeout: 256 seconds]
Tuplanolla has quit [Quit: Leaving.]
Soni has joined #ocaml
wagle has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
rgrinberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
wagle has joined #ocaml
<dh`> in ocamlyacc, is it a bug if accidentally pasting two copies of a rule breaks the world? or is this a consequence of some undocumented "feature"?
hackinghorn has joined #ocaml
mbuf has joined #ocaml
waleee has quit [Ping timeout: 240 seconds]
waleee has joined #ocaml
wyrd has quit [Ping timeout: 276 seconds]
wyrd has joined #ocaml
Serpent7776 has quit [Read error: Connection reset by peer]
Serpent7776 has joined #ocaml
rgrinberg has joined #ocaml
wyrd has quit [Ping timeout: 276 seconds]
wyrd has joined #ocaml
x88x88x_ has joined #ocaml
x88x88x_ has quit [Client Quit]
x88x88x_ has joined #ocaml
rgrinberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
waleee has quit [Ping timeout: 256 seconds]
perrierjouet has quit [Quit: WeeChat 3.4]
gravicappa has joined #ocaml
x88x88x_ has quit [Quit: leaving]
x88x88x_ has joined #ocaml
x88x88x_ has quit [Client Quit]
x88x88x_ has joined #ocaml
x88x88x_ has quit [Client Quit]
x88x88x_ has joined #ocaml
x88x88x_ has quit [Quit: leaving]
x88x88x_ has joined #ocaml
x88x88x_ has quit [Client Quit]
x88x88x_ has joined #ocaml
x88x88x_ has quit [Client Quit]
x88x88x_ has joined #ocaml
x88x88x_ has quit [Client Quit]
Corbin has joined #ocaml
olle has joined #ocaml
azimut_ has joined #ocaml
sagax has joined #ocaml
Haudegen has joined #ocaml
<d_bot> <rbjorklin> Has this been merged and/or released?
_whitelogger has joined #ocaml
jlrnick has quit [Ping timeout: 268 seconds]
<d_bot> <mseri> There is still some work to do, but it will be in the next release. You can already try it out by pinning the master branch
Corbin has quit [*.net *.split]
mbuf has quit [*.net *.split]
wagle has quit [*.net *.split]
Soni has quit [*.net *.split]
kaph has quit [*.net *.split]
x88x88x has quit [*.net *.split]
greenbagels has quit [*.net *.split]
sadiq has quit [*.net *.split]
notnotdan has quit [*.net *.split]
shawnw has quit [*.net *.split]
nerdypepper has quit [*.net *.split]
d_bot has quit [*.net *.split]
_tjr_ has quit [*.net *.split]
jsoo has quit [*.net *.split]
bgs has quit [*.net *.split]
rom1504 has quit [*.net *.split]
leah2 has quit [*.net *.split]
SquidDev has quit [*.net *.split]
nfc_ has quit [*.net *.split]
unyu has quit [*.net *.split]
wyrd has quit [*.net *.split]
azimut_ has quit [*.net *.split]
theblatt1 has quit [*.net *.split]
troydm has quit [*.net *.split]
pieguy12- has quit [*.net *.split]
Putonlalla has quit [*.net *.split]
Absalom has quit [*.net *.split]
grobe0ba has quit [*.net *.split]
Enjolras has quit [*.net *.split]
kurfen has quit [*.net *.split]
haesbaert has quit [*.net *.split]
conjunctive has quit [*.net *.split]
v0idpwn has quit [*.net *.split]
chiastre has quit [*.net *.split]
nore has quit [*.net *.split]
copy has quit [*.net *.split]
klu has quit [*.net *.split]
pippijn has quit [*.net *.split]
Haudegen has quit [*.net *.split]
olle has quit [*.net *.split]
hackinghorn has quit [*.net *.split]
sagax has quit [*.net *.split]
qwr has quit [*.net *.split]
johnel has quit [*.net *.split]
ralu has quit [*.net *.split]
gahr has quit [*.net *.split]
tomku has quit [*.net *.split]
lobo has quit [*.net *.split]
kandu has quit [*.net *.split]
arg__ has quit [*.net *.split]
andreypopp has quit [*.net *.split]
omni has quit [*.net *.split]
dstein64 has quit [*.net *.split]
drewolson has quit [*.net *.split]
companion_cube has quit [*.net *.split]
habnabit_ has quit [*.net *.split]
ocabot has quit [*.net *.split]
wingsorc has quit [*.net *.split]
Sofi[m] has quit [*.net *.split]
dwt_ has quit [*.net *.split]
Exa has quit [*.net *.split]
bronsen has quit [*.net *.split]
zozozo has quit [*.net *.split]
ejones has quit [*.net *.split]
fds has quit [*.net *.split]
mclovin has quit [*.net *.split]
gdd has quit [*.net *.split]
b0o has quit [*.net *.split]
rustyne has quit [*.net *.split]
chrisz has quit [*.net *.split]
epony has quit [*.net *.split]
lisq has quit [*.net *.split]
beise has quit [*.net *.split]
ccx has quit [*.net *.split]
dmbaturin has quit [*.net *.split]
dh` has quit [*.net *.split]
adibsaad[m] has quit [*.net *.split]
mal`` has quit [*.net *.split]
rks` has quit [*.net *.split]
slothby has quit [*.net *.split]
Johann has quit [*.net *.split]
nimaje has quit [*.net *.split]
Armael has quit [*.net *.split]
dinosaure has quit [*.net *.split]
CalimeroTeknik has quit [*.net *.split]
octachron has quit [*.net *.split]
CodeBitCookie[m] has quit [*.net *.split]
saltrocklamp[m] has quit [*.net *.split]
smondet[m] has quit [*.net *.split]
Geekingfrog has quit [*.net *.split]
jonasbits has quit [*.net *.split]
thizanne has quit [*.net *.split]
asm has quit [*.net *.split]
jakzale has quit [*.net *.split]
Leonidas has quit [*.net *.split]
dy has quit [*.net *.split]
sim642 has quit [*.net *.split]
johnel has joined #ocaml
qwr has joined #ocaml
Haudegen has joined #ocaml
mro has joined #ocaml
sagax has joined #ocaml
azimut_ has joined #ocaml
hackinghorn has joined #ocaml
wagle has joined #ocaml
Soni has joined #ocaml
kaph has joined #ocaml
greenbagels has joined #ocaml
notnotdan has joined #ocaml
x88x88x has joined #ocaml
wingsorc has joined #ocaml
sadiq has joined #ocaml
shawnw has joined #ocaml
nerdypepper has joined #ocaml
chrisz has joined #ocaml
mclovin has joined #ocaml
epony has joined #ocaml
gahr has joined #ocaml
ralu has joined #ocaml
tomku has joined #ocaml
adibsaad[m] has joined #ocaml
smondet[m] has joined #ocaml
saltrocklamp[m] has joined #ocaml
CodeBitCookie[m] has joined #ocaml
Sofi[m] has joined #ocaml
ocabot has joined #ocaml
companion_cube has joined #ocaml
habnabit_ has joined #ocaml
drewolson has joined #ocaml
dstein64 has joined #ocaml
arg__ has joined #ocaml
andreypopp has joined #ocaml
kandu has joined #ocaml
omni has joined #ocaml
lobo has joined #ocaml
conjunctive has joined #ocaml
haesbaert has joined #ocaml
Enjolras has joined #ocaml
v0idpwn has joined #ocaml
grobe0ba has joined #ocaml
troydm has joined #ocaml
kurfen has joined #ocaml
Putonlalla has joined #ocaml
Absalom has joined #ocaml
theblatt1 has joined #ocaml
d_bot has joined #ocaml
pippijn has joined #ocaml
pieguy12- has joined #ocaml
klu has joined #ocaml
copy has joined #ocaml
chiastre has joined #ocaml
nore has joined #ocaml
ejones has joined #ocaml
zozozo has joined #ocaml
bronsen has joined #ocaml
Exa has joined #ocaml
fds has joined #ocaml
dwt_ has joined #ocaml
b0o has joined #ocaml
rustyne has joined #ocaml
gdd has joined #ocaml
dinosaure has joined #ocaml
octachron has joined #ocaml
Armael has joined #ocaml
nimaje has joined #ocaml
Johann has joined #ocaml
CalimeroTeknik has joined #ocaml
slothby has joined #ocaml
rks` has joined #ocaml
beise has joined #ocaml
mal`` has joined #ocaml
dh` has joined #ocaml
lisq has joined #ocaml
ccx has joined #ocaml
dmbaturin has joined #ocaml
sim642 has joined #ocaml
dy has joined #ocaml
Leonidas has joined #ocaml
asm has joined #ocaml
thizanne has joined #ocaml
jakzale has joined #ocaml
jonasbits has joined #ocaml
Geekingfrog has joined #ocaml
SquidDev has joined #ocaml
nfc_ has joined #ocaml
mbuf has joined #ocaml
Corbin has joined #ocaml
olle has joined #ocaml
wyrd has joined #ocaml
rom1504 has joined #ocaml
leah2 has joined #ocaml
unyu has joined #ocaml
bgs has joined #ocaml
jsoo has joined #ocaml
_tjr_ has joined #ocaml
epony has quit [Max SendQ exceeded]
d_bot has quit [Excess Flood]
d_bot has joined #ocaml
epony has joined #ocaml
kaph has quit [Ping timeout: 240 seconds]
qwr has quit [Ping timeout: 256 seconds]
qwr has joined #ocaml
azimut_ has quit [Remote host closed the connection]
azimut has joined #ocaml
bartholin has joined #ocaml
olle_ has joined #ocaml
olle_ has quit [Ping timeout: 256 seconds]
kaph has joined #ocaml
wingsorc has quit [Quit: Leaving]
<ns12> What is this ocaml-cohttp? Is it a HTTP server?
<d_bot> <undu> it's a library for making http servers and clients
<ns12> Why not make a HTTP server instead of a library for making HTTP servers? Isn't it a bit unusual to make a library for making HTTP servers. Apache HTTPd and NGINX are not built using an existing library for making HTTP servers ...
<d_bot> <undu> allows sharing code between unix servers and unikernel-based servers
<d_bot> <undu> in any case it also allows you to do http clients
<ns12> cohttp and httpaf do the same thing?
kakadu has joined #ocaml
<Leonidas> ns12: I am not sure httpaf has a client library
jlrnick has joined #ocaml
<d_bot> <mseri> Indeed, there is piaf that uses httpaf: https://github.com/anmonteiro/piaf
<d_bot> <mseri> (or a fork of httpaf)
Haudegen has quit [Quit: Bin weg.]
spip has joined #ocaml
bobo_ has quit [Ping timeout: 256 seconds]
mro has quit [Remote host closed the connection]
<d_bot> <leviroth> It’s entirely normal to have libraries for writing HTTP servers. For example, the people who made Twitter or Facebook had to use such libraries. It’s not as if those sites are just configurations of nginx.
Haudegen has joined #ocaml
jlrnick has quit [Ping timeout: 240 seconds]
<d_bot> <VPhantom> Even behind Nginx, it can be easier to serve HTTP vs FastCGI. I'm rusty with the latter but I think it's easier to deal with custom headers in the former.
kaph has quit [Ping timeout: 256 seconds]
perrierjouet has joined #ocaml
<Leonidas> Yes, for the most part it is just easier to integrate with HTTP than other protocols like FCGI or SCGI or CGI.
Guest17 has joined #ocaml
mro has joined #ocaml
xiongxin has joined #ocaml
perrierjouet has quit [Quit: WeeChat 3.4]
perrierjouet has joined #ocaml
olle has quit [Remote host closed the connection]
Guest17 has quit [Quit: Client closed]
olle has joined #ocaml
perrierjouet has quit [Quit: WeeChat 3.4]
mro has quit [Remote host closed the connection]
azimut has quit [Remote host closed the connection]
mro has joined #ocaml
azimut has joined #ocaml
mro has quit [Ping timeout: 256 seconds]
mro has joined #ocaml
mro has quit [Remote host closed the connection]
mro has joined #ocaml
<companion_cube> :o :o
<companion_cube> congrats
mro has quit [Remote host closed the connection]
<d_bot> <VPhantom> Yay!!
xiongxin has quit [Remote host closed the connection]
xiongxin has joined #ocaml
<theblatt1> insane! <3
theblatt1 is now known as theblatte
gravicappa has quit [Ping timeout: 240 seconds]
<d_bot> <undu> yuss!!
<ns12> OCaml now supports multicore?
<octachron> OCaml 5.0 (which is expected to be released around March/April) will.
<companion_cube> time to work on multicore containers :-°
<ns12> How long have people been waiting for this?
<companion_cube> my wet finger says 15 years
<ns12> This must be such a happy day.
<olle> woa
<olle> another circle jerk dies :(
<olle> (after go got generics too)
<ns12> octachron: What's going to happen between now and OCaml 5.0? Mostly bugfixes?
<olle> typed effects, duh
xiongxin1 has joined #ocaml
<d_bot> <undu> and modular implicits
<octachron> OCaml 4.14 which is essentially 5.0 twin without the multicore bells and whistles will be released around February.
xiongxin has quit [Ping timeout: 256 seconds]
xiongxin1 is now known as xiongxin
<olle> and affine types
<companion_cube> not going to happen
<companion_cube> (afaik)
<olle> :D
<olle> jk
<octachron> Otherwise, it would be essentially bug fixes and maybe some porst to few more architectures or OSs.
<octachron> Not going to happen, except if you are thinking of plutonian months.
<ns12> Do you think there will be a resurgence of interest in OCaml?
<olle> Only if it has really impressive benchmarks
<companion_cube> not necessarily, it serves to remove the knee-jerk "but Ocaml is a toy, it's not multicore"
<olle> mm
<octachron> There is also the effect system that might attract some interest.
<olle> So who's doing the language benchmark games? :D
<d_bot> <Et7f3> I remember another site but can't find URL
<d_bot> <Et7f3> maybe it is the same and they changed the css and host
<ns12> Aren't there some benchmarks in the pull request itself? https://github.com/ocaml/ocaml/pull/10831
<d_bot> <Et7f3> I remember orange website maybe it is this one https://benchmarksgame-team.pages.debian.net/benchmarksgame/index.html 🤷
mro has joined #ocaml
<d_bot> <mseri> Multicore is merged to ocaml trunk 🥳🥳🥳
mro has quit [Remote host closed the connection]
<d_bot> <mseri> Yes the benchmarks come from https://github.com/ocaml-bench/sandmark
xiongxin has quit [Ping timeout: 256 seconds]
xiongxin has joined #ocaml
<d_bot> <VPhantom> It'll be interesting to see something Eio-based in Techempower benchmarks eventually. There seems to be real potential to rival Rust and friends now.
<d_bot> <hcarty> Congratulations @sadiq and everyone involved in the multicore work over the past several years! It was an enormous effort
<d_bot> <mseri> Indeed. The numbers here look promising: https://github.com/ocaml-multicore/retro-httpaf-bench/pull/16
<d_bot> <mseri> Maybe better to wait for 5.0 to actually be released though
<d_bot> <VPhantom> Of course.
xiongxin has quit [Remote host closed the connection]
<sadiq> hcarty: thanks!
mro has joined #ocaml
gravicappa has joined #ocaml
mro has quit [Remote host closed the connection]
mro has joined #ocaml
cedric has joined #ocaml
Everything has joined #ocaml
Haudegen has quit [Quit: Bin weg.]
motherfsck has quit [Quit: quit]
motherfsck has joined #ocaml
bartholin has quit [Quit: Leaving]
mro has quit [Remote host closed the connection]
dalek-caan has joined #ocaml
<d_bot> <rgrinberg> There was always that potential with trivial multi process arch.
<olle> In particular, numbers should look good compared to F#, Scala, Haskell
kaph has joined #ocaml
<d_bot> <RegularSpatula> Could you explain a bit why that would be?
olle has quit [Ping timeout: 240 seconds]
quernd has quit [Quit: The Lounge - https://thelounge.chat]
mbuf has quit [Quit: Leaving]
quernd has joined #ocaml
<d_bot> <VPhantom> My understanding was that the benchmarks were already multi-process. I didn't dig into the source to find out though. That could explain why the initial benchmarks were so average. I expected OCaml higher up out of the gate (vs for example NodeJS which is also single-process).
<companion_cube> a lot of core node.js functions are in C++
<d_bot> <VPhantom> True, libuv or something like that.
<d_bot> <VPhantom> I've seen bindings for it in OCaml, 1-2 projects, but I'm rooting for Eio since it's native.
<d_bot> <Anurag> the reason to use libuv with OCaml was most likely not performance. It won't give you that much if you were already using epoll, kqueue etc either directly (like async does), or via libev like lwt does. What libuv might provide is a better tested IO loop that's tested on all major platforms.
infinity0 has quit [Ping timeout: 240 seconds]
infinity0_ has joined #ocaml
infinity0_ is now known as infinity0
<Corbin> Yeah, libuv is portable but not especially fast. It's fast enough internally, but its default event loop is pretty bad at throughput and you'll need to write a small scheduler on top.
dalek-caan has quit [Quit: dalek-caan]
mbuf has joined #ocaml
Haudegen has joined #ocaml
rgrinberg has joined #ocaml
<d_bot> <rgrinberg> nginx uses multiple processes to scale across cores. Nobody would claim that it is slow
<d_bot> <rgrinberg> Web servers are embarrassingly parallel mostly. Especially the trivial ones in benchmarks. The issue lies elsewhere
<d_bot> <Anurag> I don't particularly consider the techempower benchmarks to be the best source for presenting how useful a server library is, but FWIW there are multiple submissions for OCaml server libraries and some of them are using multi-processing, and some aren't.
<d_bot> <VPhantom> I certainly never have.
mbuf has quit [Quit: Leaving]
<d_bot> <VPhantom> That's actually why I never saw the need for built-in multicore support in OCaml (any more than in NodeJS) to achieve good performance for web-type services. Just spread requests across processes, like I did in my old C days and like NodeJS does to this day with its Cluster. — Now OCaml Multicore's effects however, and hence Eio, doing async I/O without promise monads, now _that_ is really intriguing to me. 😉
<sadiq> where a multicore runtime is super useful is shared mutable state
<d_bot> <VPhantom> It's not great, but TechEmpower is by far the most thorough benchmark for web services I could find to get a feel of a language-library combo. Basic service, JSON codec, PostgreSQL I/O.
<sadiq> when I used to write high throughput stuff on the JVM we made really aggressive use of large in-memory caches
<d_bot> <VPhantom> The kind of web services I deal with don't really have shared mutable state, I guess. We cache stuff in Redis and in per-connection memory, not much survives across connections beyond general configuration.
<d_bot> <VPhantom> Although you're reminding me that I did have plans for in-process caches for things like exchange rate history and ACL rights, things that change rarely and that don't take too much space.
<d_bot> <rgrinberg> I think in these trivial benchmarks there's no opportunity to cache much.
<sadiq> for reference we were carrying out an auction (which involve a bit of ml as well) and getting the request out of the door in less than a single round-trip across AWS' network to our Redis.
<d_bot> <VPhantom> I can't wait to see our ecommerce site fly on OCaml vs the current mod_perl stuff but I'm doing this solo, probably at least 2 years away from a decent prototype.
<sadiq> even putting redis or memcache on the box, serializing back and forward starts to get expensive
waleee has joined #ocaml
<d_bot> <rgrinberg> If this information isn't classified, what's the site?
<d_bot> <VPhantom> Yeah that's seriously quick. Protobuf codecs are a drop in the ocean for us. 😛
<sadiq> rgrindberg: I used to work in adtech.
<companion_cube> in theory, empower benchmarks have some more elaborate sections that test dynamic queries
<rgrinberg> sadiq the question was for VPhantom, but you cannot see this in IRC :)
<sadiq> aah
<companion_cube> not just returning a constant string or json
<d_bot> <VPhantom> https://www.gxd.ca/ — It looks simple enough, but on the corporate side the pricing is extremely dynamic, depends on a lot of variables. Not visible from the outside is also where 80% of my work is: the ERP behind it. Instead of jumping on something like Odoo we're going to try to rewrite our homebrew Perl ERP in OCaml, to fine-tune it to our needs.
<d_bot> <VPhantom> Argh, gotcha.
<rgrinberg> sadiq btw, it's typically hard to replace a redis cache with an in memory shared cache. How would you do failover or graceful upgrades without redis/memcache?
motherfsck has quit [Quit: quit]
<d_bot> <rgrinberg> @VPhantom how much traffic does that site get?
motherfsck has joined #ocaml
<d_bot> <VPhantom> On GXD: part of our problem with Perl, aside from it being dynamic (lots of surprises in production months after the offending commit!) was lack of staff in Québec. That said I more or less convinced them that ReasonML was a gateway drug to OCaml to get help when we'll need it and that OCaml's type system would be key to having an extremely reliable end result. (They had been with a PHP based company for a couple of years and t
<companion_cube> rgrinberg: is there a downside to wiping the cache when you restart your server?
<d_bot> <VPhantom> @rgrinberg On a typical day, not that much. Maybe 10 requests per second at most. However there's the occasional promotions that can spike to… I'm not sure but we had close to 1000 orders per hour in a peak two years ago and it completely saturated our system; had to rework how it connects to their accounting back-end, etc. For my rewrite my personal benchmark is 10x the current scale so I want to be able to generate pages wit
<companion_cube> 1000/hr is still less than 1/s
<d_bot> <VPhantom> Those are orders, not page views.
<companion_cube> so apples to oranges? :)
<d_bot> <VPhantom> They have to register, confirm their e-mail, search for products, fool around in their shopping carts, enter payment info, etc.
<rgrinberg> companion_cube if your service is slow without the cache, it seem pretty bad. especially if this will generate a massive load spike on the db.
<d_bot> <VPhantom> Yeah it's because I don't have actual pages/hour from that period; we were too swamped to notice. 😉
<companion_cube> heh, fair enough
<companion_cube> I imagine you use redis with some persistence then
<d_bot> <VPhantom> Some of our internal report pages cause 30K+ database requests. The site is _begging_ for a rewrite and it's on crutches until I can deliver it.
<rgrinberg> companion_cube you would still need redis for sessions at least. it's very rare that your use case allows you to flush all user sessions down the drain on an upgrade
<d_bot> <VPhantom> The old site doesn't even use Redis; this is for the upcoming one. The old site is… made of good intentions that didn't scale at all.
<rgrinberg> VPhantom, without knowing much about the site, I would guess it's essentially bottlenecked by the db and the question of frameworks, protobufs, etc aren't even relevant
<companion_cube> is there a reason why sessions can't be in the DB?
<companion_cube> (I imagine the queries for that would be trivial)
<rgrinberg> companion_cube depends on your db.
vicfred has joined #ocaml
<d_bot> <VPhantom> @rgrinberg Our typical web page delivery will spend about 25% of its time waiting for MySQL and 75% with Perl doing something itself. (This is now that I added in-process caching all over the place over the years.)
<companion_cube> rgrinberg: sorry for all the questions. Are there DBs that are bad at such basic key/value queries?
Spawns has joined #ocaml
<d_bot> <VPhantom> @rgrinberg For sure rewriting things would be good, even in Perl, but the mere fact of choosing OCaml will cut CPU time by 20x or so. Combine that with better caching, judicious use of Redis for what it's best at (RPC queues, web session data) and better use of PostgreSQL and I think we'll have a real winner. (Our current system doesn't let MySQL do enough of what it does well, and often greps client-side. Ugh.)
<rgrinberg> companion_cube If it's a write + read heavy load, I don't think any SQL will perform particularly well.
<rgrinberg> not to mention they'd be a pain to scale in a cluster
<companion_cube> so I hear
<companion_cube> the alternative is to scale vertically, apparently :)
<rgrinberg> VPhantom what are you doing in perl that is so cpu intensive?
<d_bot> <VPhantom> It's the sum of a _lot_ of small parts. The low-hanging fruit have been picked. For example the style of query building that my predecessor chose involves a _lot_ of calling functions back and forth between modules (circular dependencies aplenty, even). A final query might involve bits generated by 25 different functions calling each other. For example getting a list of products a user can see is a pretty big SQL query, and then
<d_bot> <VPhantom> Displaying any of our pages involves between 200 and 2000 distinct SQL queries, and there's rarely any query sent multiple times (now that I cache aggressively).
<rgrinberg> doesn't seem like it is perl that's at fault :)
<rgrinberg> but in any case, rewriting in OCaml is a lot of fun and there will be plenty of other benefits
olle has joined #ocaml
<d_bot> <VPhantom> Nah like I said, Perl consumes 75% of our waiting time and for sure a full rewrite in Perl would already be massively better, but I am incredibly fed up with Perl's dynamic types. Whenever I have to dive into his code to address a bug or change something, I inevitably am stuck with wondering "`$item`? What the heck does `$item` contain there?" …usually in a bit that I can't test on my own (long story for later, sync with our a
Guest46 has joined #ocaml
Guest46 has left #ocaml [#ocaml]
<d_bot> <VPhantom> At least with OCaml I can just hit `\t` in Vim and Merlin tells me what my cursor is.
<d_bot> <VPhantom> Of note: our Perl stuff was built under tight budgetary constraints in 2003-2012. Lots undocumented, poor test suite coverage. It's nicely OO but to the point of being very heavy. Now I've been given a "take as long as it takes" budget for the OCaml rewrite, which makes all the difference in the world.
mro has joined #ocaml
<rgrinberg> sadiq is there a C api for effects?
mro has quit [Remote host closed the connection]
mro has joined #ocaml
<sadiq> rgrinberg: no, not as far as I'm aware.
<rgrinberg> :'(
<sadiq> rgrinberg: re: caches withour redis. We had a database that stored canonical data and a pub-sub which informed the app servers they needed to refresh some particular bit of data (this was triggered by anything that updated info in the database).
<sadiq> when a new app server came up it needed to pull in everything from scratch. We had read replicas set aside for this (but it took about ten minutes to bring up a new app server).
<sadiq> we had a strategy for speeding that up but it never proved to be an issue, we only did rolling upgrades anyway.
<sadiq> so basically each app server always had all the data it needed to service a request available in memory.
jlrnick has joined #ocaml
Tuplanolla has joined #ocaml
<rgrinberg> that's a sophisticated way to do it
mro has quit [Quit: Leaving...]
<rgrinberg> companion_cube some bed time reading for you https://arxiv.org/abs/2201.02089
<companion_cube> 100 pages :o
<companion_cube> > BSON treats arrays as JSON objects [18] with stringified integral keys.
<companion_cube> welp
<rgrinberg> bson is a mongodb special right? i don't think it's used anywhere else
<companion_cube> yeah I think that's the idea
<companion_cube> there's not point in using it over msgpack or cbor anyway
rgrinberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rgrinberg has joined #ocaml
gravicappa has quit [Ping timeout: 256 seconds]
rgrinberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<companion_cube> it's long but it's a nice overview I think
<d_bot> <VPhantom> I liked the CBOR spec. Nice and small.
<companion_cube> I like the msgpack spec (the online one)
<companion_cube> very readable
<d_bot> <VPhantom> In either case since it spells out field names with strings everywhere I never saw a real appeal to it vs text JSON. Size is only marginally smaller, it's still free-form, it just represents some types a bit more compactly. On the plus side, CBOR allows integers as keys, so one could kinda do as compact as Protobuf with it, with the upside of not having to know the size of nested structures ahead of serializing them.
jlrnick has quit [Ping timeout: 268 seconds]
gdd has quit [Ping timeout: 250 seconds]
rgrinberg has joined #ocaml
gdd has joined #ocaml
<companion_cube> well strings can still be s bit smaller
<companion_cube> a*
<companion_cube> and faster to encode/decode
<d_bot> <VPhantom> CBOR doesn't use Varint though so its integers are straight-through I/O.
<Leonidas> companion_cube: I remember something about the Msgpack spec that strings are terribly encoded
<Leonidas> and there was a new encoding added later
<companion_cube> I don't know, the current spec is ok
<Leonidas> Ah, I think it was fixstr vs str 8/16/32 or something, don't remember anymore
<Leonidas> we used it at work and I thought it was a terrible choice because it is neither compact nor human readable so all the downsides of protobuf with none of the upsides
<companion_cube> well you certainly need a decoder
<Leonidas> Yes, and our structure was always fixed
<d_bot> <cemerick> Is anyone aware of an OCaml take on the liveview/hotwire/blazor concept?
rgrinberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Everything has quit [Quit: leaving]
wyrd has quit [Ping timeout: 276 seconds]
infinity0 has quit [Ping timeout: 256 seconds]
infinity0 has joined #ocaml
wyrd has joined #ocaml
wyrd has quit [Ping timeout: 276 seconds]
wyrd has joined #ocaml
rgrinberg has joined #ocaml
<rgrinberg> server side rendering?
wyrd has quit [Ping timeout: 276 seconds]
wyrd has joined #ocaml
wyrd has quit [Client Quit]
rgrinberg has quit [Remote host closed the connection]
rgrinberg has joined #ocaml
infinity0 is now known as Guest9673
Guest9673 has quit [Killed (zirconium.libera.chat (Nickname regained by services))]
infinity0 has joined #ocaml
wyrd has joined #ocaml
cedric has quit [Quit: Konversation terminated!]
Tuplanolla has quit [Quit: Leaving.]
vijon has joined #ocaml
vijon has quit [Client Quit]
rks` has quit [Ping timeout: 268 seconds]
rks` has joined #ocaml
bobo_ has joined #ocaml
spip has quit [Ping timeout: 256 seconds]
Haudegen has quit [Ping timeout: 240 seconds]