companion_cube changed the topic of #ocaml to: Discussion about the OCaml programming language | http://www.ocaml.org | OCaml 4.14.0 released: https://ocaml.org/releases/4.14.0.html | Try OCaml in your browser: https://try.ocamlpro.com | Public channel logs at https://libera.irclog.whitequark.org/ocaml/
<sleepydog> wpcarro: i think you might need to specify ./hello_world.exe, or otherwise fully qualify the path
<sleepydog> and you don't install libraries with dune, you use a package manager like opam, or your OS package manager. in most cases you should have an "ocamlfind" command and "ocamlfind query PACKAGE" will tell you if you have PACKAGE installed in a place that dune can find it.
zebrag has joined #ocaml
Tuplanolla has quit [Quit: Leaving.]
Stoffel has quit [Ping timeout: 260 seconds]
<wpcarro> ah okay
<wpcarro> I guess it's time for me to learn how the ocaml compiler resolves dependencies
<wpcarro> i'm using nixos, so things are slightly different here
xd1le has joined #ocaml
<wpcarro> qwr do you have an example of how to invoke `ocaml ./script.ml` where `./script.ml` depends on (e.g.) Yojson?
<wpcarro> `ocamlfind list` reports yojson@2.0.2, and I see some yojson path on my $OCAMLPATH
<wpcarro> managed to resolve it in `utop` with `#require "yojson";;`
waleee has quit [Ping timeout: 250 seconds]
waleee has joined #ocaml
<wpcarro> is there a more ergonomic way to update an alist in ocaml?
<sleepydog> the first one looks fine to me. but the assoc function in the List module returns the leftmost item, so you could just add the new binding without removing the old one
jao has quit [Ping timeout: 260 seconds]
waleee has quit [Ping timeout: 248 seconds]
jao has joined #ocaml
theblatte has quit [Ping timeout: 248 seconds]
terrorjack has quit [Quit: The Lounge - https://thelounge.chat]
terrorjack has joined #ocaml
theblatte has joined #ocaml
chrisz has quit [Ping timeout: 248 seconds]
chrisz has joined #ocaml
jao has quit [Ping timeout: 268 seconds]
jao has joined #ocaml
theblatte has quit [Ping timeout: 252 seconds]
spip has joined #ocaml
bobo_ has quit [Ping timeout: 248 seconds]
theblatte has joined #ocaml
azimut has joined #ocaml
jao has quit [Ping timeout: 260 seconds]
bartholin has joined #ocaml
bartholin has quit [Quit: Leaving]
azimut has quit [Quit: ZNC - https://znc.in]
azimut has joined #ocaml
mbuf has joined #ocaml
<ski> wpcarro : if you're going to be keeping the old versions around, going back to them, then it's probably better not to remove the old pairs (sharing the tails to not generate as much intermediate space to be GCed). if you're otoh going forward adding new and new ones (with little to no backtracking / persistence needed), for a long time, you'll probably be wanting to clean up the old to remove space leaks
Haudegen has joined #ocaml
Serpent7776 has joined #ocaml
zebrag has quit [Quit: Konversation terminated!]
Serpent7776 has quit [Ping timeout: 260 seconds]
Serpent7776 has joined #ocaml
mro has joined #ocaml
Serpent7776 has quit [Ping timeout: 252 seconds]
mro has quit [Remote host closed the connection]
mro has joined #ocaml
Serpent7776 has joined #ocaml
wingsorc has quit [Ping timeout: 260 seconds]
Anarchos has joined #ocaml
olle has joined #ocaml
mbuf has quit [Quit: Leaving]
adanwan has quit [Remote host closed the connection]
adanwan has joined #ocaml
genpaku has quit [Remote host closed the connection]
genpaku has joined #ocaml
sagax has joined #ocaml
mro has quit [Remote host closed the connection]
mro has joined #ocaml
mro has quit [Quit: Leaving...]
wonko has joined #ocaml
Stoffel has joined #ocaml
Everything has joined #ocaml
Haudegen has quit [Quit: Bin weg.]
Anarchos has quit [Ping timeout: 260 seconds]
Anarchos has joined #ocaml
xd1le has quit [Quit: xd1le]
Anarchos has quit [Ping timeout: 248 seconds]
Anarchos has joined #ocaml
Haudegen has joined #ocaml
gwizon has joined #ocaml
wonko has quit [Ping timeout: 246 seconds]
Anarchos has quit [Ping timeout: 268 seconds]
Anarchos has joined #ocaml
Anarchos has quit [Client Quit]
Anarchos has joined #ocaml
jao has joined #ocaml
azimut has quit [Remote host closed the connection]
azimut has joined #ocaml
azimut has quit [Remote host closed the connection]
azimut has joined #ocaml
Anarchos has quit [Ping timeout: 260 seconds]
rgrinberg has joined #ocaml
gwizon has quit [Ping timeout: 260 seconds]
Anarchos has joined #ocaml
Anarchos has quit [Ping timeout: 268 seconds]
bobo_ has joined #ocaml
spip has quit [Read error: Connection reset by peer]
Anarchos has joined #ocaml
Anarchos has quit [Ping timeout: 268 seconds]
xgqt has quit [Ping timeout: 268 seconds]
Serpent7776 has quit [Quit: WeeChat 1.9.1]
xgqt has joined #ocaml
Haudegen has quit [Quit: Bin weg.]
Anarchos has joined #ocaml
gwizon has joined #ocaml
gwizon has quit [Ping timeout: 248 seconds]
Anarchos has quit [Ping timeout: 246 seconds]
Everything has quit [Quit: leaving]
Serpent7776 has joined #ocaml
Serpent7776 has quit [Ping timeout: 268 seconds]
adanwan has quit [Ping timeout: 258 seconds]
adanwan has joined #ocaml
zebrag has joined #ocaml
azimut has quit [Ping timeout: 258 seconds]
azimut has joined #ocaml
waleee has joined #ocaml
rgrinberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
justHaunted is now known as ffffffradiofree
ffffffradiofree is now known as jusFffffffradiof
bartholin has joined #ocaml
wingsorc has joined #ocaml
jusFffffffradiof is now known as justThumbs
justThumbs is now known as justVain
gwizon has joined #ocaml
wonko has joined #ocaml
Serpent7776 has joined #ocaml
Anarchos has joined #ocaml
saji has joined #ocaml
rgrinberg has joined #ocaml
<saji> i am running into rather narrow opam version constraints for depext ... is there some replacement/alternative or should i just specify deps in a makefile?
wonko has quit [Ping timeout: 264 seconds]
gwizon has quit [Ping timeout: 268 seconds]
<saji> hannes: someone just tossed https://github.com/mirage/qubes-mirage-firewall/issues/130 at me ... and after the usual "briefly getting stuck in opam dependency hell" i have a flambda build ... and now wondering how to properly benchmark this ...
gwizon has joined #ocaml
<saji> hannes: tangent ... mirage-firewall should just stop checking checksums entirely, see lengthy "why ipv6 dropped the ip header checksum field" for reasons ...
Serpent7776 has quit [Ping timeout: 252 seconds]
bartholin has quit [Quit: Leaving]
wonko has joined #ocaml
<haesbaert> saji: you want a firewall to stop checking tcp checksums ?
<olle> Hmmm
<olle> Can Menhir do "not this token"?
<saji> haesbaert: that would be a sideshow, but yes.
<haesbaert> so I'm missing, what is the main show ?
<saji> haesbaert: #qubes thread about mirage-firewall cpu usage. which revealed two ways (+flambda and --allocation-policy=best-fit) "without" functional changes, but also reminded me of checksum checks on intermediate devices being useless.
wonko has quit [Ping timeout: 264 seconds]
<haesbaert> why are they useless ?
<saji> haesbaert: for all the reasons laid out around IPv6 not _having_ checksums. (mainly "bandwidth" being a much smaller problem than "cpu" these days)
<saji> layer 4/5 checksums _are_ still useful ... but only need to be checked by the layer 4/5 endpoints. this is about layer 3 checksums.
<haesbaert> so basically I have an endpoint with a slightly broken network stack that fails to do proper ip checksuming, so Iremove it from my firewall ?
<haesbaert> assume the other side is also sending udp without csum (which is still valid)
<saji> yes/no/mebbe? (i am not sure about your scenario there) ... the main point around the removal of l3 checksums when designing ipv6 (afair) was that accidental corruptions are rare, and just forwarding these rare packets and have them discarded by the endpoints is overall a whole lot easier than having every intermediate node do a check.
<haesbaert> (not even counted the plethora of network cards that produce a broken checksum)
<haesbaert> I just find it weird to be permissive in a firewall with sightly corrupt packets :D
<saji> (the "broken checksums" you see when using tcpdump on modern HW is an artifact that is not actualy a bad checksum.)
<haesbaert> no, it's actualy broken
<haesbaert> ix(4) with every model before x540 for anything other than IP and UDP
<haesbaert> say OSPF packets get a broken computed checksum and we have to fix it in the driver
<haesbaert> I mean other than TCP and UDP
<haesbaert> mistyped
<saji> "sniff on involved host is bad" is an unrelated pet-peeve of mine. :D
<haesbaert> realtek8139 produces broken checksums on scathered gathered segments also
<saji> 8139 is rather ... basic afair? does that even have checksum offloading?
<haesbaert> yeah, 39 is the gigabit right ? or 69 ? whatever the gigabit was called
<haesbaert> the gigabit was not as bad as the fast one
<saji> 39 is FE, 69 is GE
<haesbaert> ah ! yes, 69 then
<haesbaert> it even does udp and tcp
<haesbaert> ifp->if_capabilities = IFCAP_VLAN_MTU | IFCAP_CSUM_TCPv4 |
<haesbaert> IFCAP_CSUM_UDPv4;
<saji> otoh, i have also seen "server grade" intel nics causing on-receive corruption. (because it did the checksum-checks (correctly), and then dma-wrote things in the wrong places...)
zebrag has quit [Ping timeout: 268 seconds]
<haesbaert> I wrote drivers for ixl(4), for a couple of years, it was the most bugged device I've ever seen
zebrag has joined #ocaml
<haesbaert> like the big 50gbit ones
<haesbaert> ixl = intel 700
<saji> for which my executive summary still is ... yeah, its a shitshow, just do app level checks where you can, trust no one, but we shouldnt bog down every node in the path by doing very redundant math on each packet.
<haesbaert> half the fixes were "put a delay here"
<haesbaert> used to be much better, now it's a shit show, welcome to the future
<saji> on the not qubes/mirage/ocaml side of things, i am currently writing low-level code for xl710 (40G) and e810 (100g) that is used in production. :D
<haesbaert> oh nice, I wrote xl710
<haesbaert> GOOD LUCK, terrible chip :D
gwizon has quit [Ping timeout: 268 seconds]
<saji> but the main reason for showing up here is really "wth is with depext opam version limits" and general barking at hannes for mirage-firewall reasons. :D
<haesbaert> can you link the qubes thread though ?
<saji> for the "performance" part, pretty much just the one i linked earlier: https://github.com/mirage/qubes-mirage-firewall/issues/130
<haesbaert> pierre alain did some tests a couple of weeks ago and he was getting 6kpps :/
<saji> which suggests +flmabda and --allocation-policy=best-fit ... managed to build with +flambda (after the above-mentioned opam/depext wrangling)
<saji> but i am still unsure how to properly benchmark this.
<saji> (as in, i can confirm it builds and passes functional testing, but i am unsure if it had any changes wrt performance)
<hannes> saji: so we did benchmarks with iperf3 on either side of the firewall...
<hannes> and the build was with 4.14 and no flambda (and the allocation-policy=best-fit is the default these days (since 4.12 or 4.13)
<saji> hannes: so just two linux vms with a mirage-fw between them and see what througput i get?
<hannes> saji: yes
<hannes> I'm all for not doing ip-level checksum computations, IIRC the receiving side always ignored mismatches anyways...
<hannes> but I've had enough computer for today... will take a look maybe tomorrow...
<saji> hannes: thanks for the reply, i will try some "man iperf3" this weekend. fly safe!
Tuplanolla has joined #ocaml
azimut has quit [Ping timeout: 258 seconds]
olle has quit [Ping timeout: 246 seconds]
wonko has joined #ocaml
<saji> hannes: only minor diff between 20220527 no-flambda build (699 Mbps) vs 20221014 with-flambda (729 Mbps)
Anarchos has quit [Quit: Vision[]: i've been blurred!]
Tuplanolla has quit [Quit: Leaving.]
noddy has joined #ocaml
noddy has quit [Client Quit]
noddy has joined #ocaml
wonko has quit [Ping timeout: 260 seconds]