edwintorok.eurosky.social

@edwintorok.eurosky.social

I’m looking for beta-testers for the next opam release in exchange for a free ~30x speedup on opam update (on Windows, busy VPSs or for hard-drive/sdcard/emmc/cacheless-filesystems/etc. users). Anyone interested? discuss.ocaml.org/t/ann-opam-2...

[ANN] opam 2.6.0~alpha1

Hi everyone, We are happy to announce the first alpha release of opam 2.6.0. This is the culmination of 2 years of team work requiring large internal changes, we hope you’ll enjoy it. This version i...

discuss.ocaml.org

Release of OCaml 5.5.0

We have the pleasure of celebrating the birthday of Blaise Pascal by announcing the release of OCaml version 5.5.0. Release Highlights Some of the highlights of OCaml 5.5.0 are: Module-dependent Functions Modules can now be used as function arguments in a form of lightweight functors. For instance, we can define a function for printing a map generated by the Map.Make functor: let pp_map (module M: Map.S) pp_key pp_v ppf set = if M.is_empty set then Format.fprintf ppf "ø" else let pp_sep ppf () = Format.fprintf ppf ",@ " in let pp_binding ppf (k,v) = Format.fprintf ppf "@[%a@ =@ %a@]" pp_key k pp_v v in Format.fprintf ppf "@[{@ %a@ }@]" (Format.pp_print_seq ~pp_sep pp_binding) (M.to_seq set) We can then apply this function on a string map module String_map = Map.Make(String) with let () = let m = String_map.of_list ["Zero", "Zero"; "One", "Un"] in let pp_str = Format.pp_print_string in Format.printf "%a@." (pp_map (module String_map) pp_str pp_str) m Compared to first-class modules, the type of the function pp_map type 'a printer = Format.formatter -> 'a -> unit val pp_map: (module M: Map.S) -> M.key printer -> 'a printer -> 'a M.t printer is dependent over the value of the module S, and thus the function can only applied over a statically known module: let f (): (module Map.S) = if Random.bool () then (module Map.Make(Int)) else (module Map.Make(Float)) let fail = pp_map (f ()) Error: This expression has type (module M : Map.S) -> (Format.formatter -> M.key -> unit) -> (Format.formatter -> 'a -> unit) -> Format.formatter -> 'a M.t -> unit but an expression was expected of type (module Map.S) -> 'b The module M would escape its scope This function is module-dependent. The dependency is preserved when the function is passed a static module argument (module M : S) or (module M). Its argument here is not static, so the type-checker tried instead to change the function type to be non-dependent. Relocatable Compiler A compiler installation can now be moved or copied with no risk of hard-to-debug errors due to mixing incompatible bytecode runtime interpreters. In practice, this means that creating a local switch when there is a global switch with the same compiler version and configuration available can be done by cloning the global switch rather than recompiling the whole compiler. This should considerably reduce the time required to create new local opam switches out-of-the-box. Polymorphic Functions as Function Arguments Higher-rank polymorphic functions can now be defined directly by using an explicit type annotation in a function argument let apply_map (map: 'a 'b. ('a -> 'b) -> 'a list -> 'b list) = map string_of_int [1;2;3], map List.singleton ["x"; "y"] let _ = apply_map List.map Previously defining such a function required going through either a record or an object with a polymorphic field or methods type map = { map: 'a 'b. ('a -> 'b) -> 'a list -> 'b list } let apply_map {map} = map string_of_int [1;2;3], map List.singleton ["x"; "y"] Search and Replace Substring Functions The String module has been extended with many functions for searching and replacing substrings inside a string. let _true = String.includes ~affix:"aba" "abbaba" let sentence = String.replace_all ~sub:"𝄽" ~by:"word" "A 𝄽 is re𝄽ed" The substring search is using the 2-way string matching algorithm which has the advantage of requiring constant space memory overhead independently of the needle size. Generalised Local Definitions It is now always possible to define locally a type, a class, a module type or any kind of item that can be defined globally: let mandelbrot n x = let type t = Converge | Escape of int in ... match orbit n x with | Converge -> 0 | Exit_at n -> colorize n External Types When interfacing with foreign function libraries, it is now possible to define external type type int_gmp = external "mpz_t" type float_gmp = external "mpf_t" Compared to an abstract type definition, the external type name "mpz_t" (resp. mpf_t) makes the type distinguishable from any non-abstract types or external types with a different name. In particular, this makes FFI types better behaved when combined with Generalised Abstract Data Types (GADTs). For instance, The typechecker is able to prove that let ok: (int_gmp,[` A] ) Type.eq -> _ = function _ -> . is a total function because the external type int_gmp is not compatible with a polymorphic variant type. Warning: Abstract types in the current module The astute reader has probably noticed in the definition above that, in OCaml 5.4.0, the typechecker does accept type int_gmp let ok: (int_gmp, [` A] ) Type.eq -> _ = function _ -> . as total. Indeed until OCaml 5.5.0, abstract types defined in the current module type a type b were considered as unique and provably different let f: 'x. (a,b) Type.eq -> 'x = function _ -> . However, this special rule for local definition of abstract types was very brittle. As soon as one moved outside of the current module, it was no longer possible to prove that the types were different. module M = struct type a type b end let fail: 'x. (M.a,M.b) Type.eq -> 'x = function _ -> . Error: This match case could not be refuted. Here is an example of a value that would reach it: Equal This special typechecking rule has been removed in OCaml 5.5.0. If you were relying on it, for instance, because you used an abstract type as type-level label in a GADTs, you can change your abstract type definition to a possibly private abbreviation of a polymorphic variant type a = private [`A] type b = [`B] or a (possibly private) sum type type a = A type b = private B If you were using an abstract type as both a type-level label and a FFI type, you can now use an external type definition which will give you a provably distinct type even outside of the current module. GC improvements Some of the ongoing work to improve the pacing of the garbage collector has been integrated in OCaml 5.5.0, two of the important changes in OCaml 5.5 GC are * the addition of a sweep-only phase at the start of major GC * the addition of an idle phase to smooth the behaviour of the GC at the start. Many incremental changes * The Windows implementation is no more reliant on Winpthreads * Around 60 new standard library functions * Around 90 various improvements * A dozen of documentation updates * Around 40 bug fixes Please report any unexpected behaviours on the OCaml issue tracker and post any questions or comments you might have on our discussion forums. The full list of changes can be found in the full changelog. --- Installation Instructions The base compiler can be installed as an opam switch with the following commands: opam update opam switch create 5.5.0 The source code for the release is also directly available on: * GitHub * OCaml archives at Inria Fine-Tuned Compiler Configuration If you want to tweak the configuration of the compiler, you can switch to the option variant with: opam update opam switch create ocaml-variants.5.5.0+options where is a space separated list of ocaml-option-* packages. For instance, for a flambda and no-flat-float-array switch: opam switch create 5.5.0+flambda+nffa ocaml-variants.5.5.0+options ocaml-option-flambda ocaml-option-no-flat-float-array

dlvr.it

How we've hosted our email "the hard way", by registering our own IPv4 block allocation with RIPE and then going through everything involved in receiving, delivering and accessing email on the modern public Internet. anil.recoil.org/notes/recoil... with @nick.recoil.org and @gazagnaire.org

Self-hosting email the hard way from your own routable IPv4 block up

How we refreshed self-hosted Recoil email with our own RIPE-allocated IPv4 block, and deployed Postfix/rspamd/Dovecot to get full SPF/DKIM/DMARC deliverability.

anil.recoil.org

Do you know that using GitHub CLI (gh) may expose you to supply-chain attacks? It stores a long-lived GitHub token on your machine, which can be stolen by any malicious scripts. This is what happened in the recent Nx supply-chain compromise, which led to GitHub’s source code being leaked.

Bild

✨ Atmosphere devs ✨ Bluesky is integrating Standard Site, and our initial work should be released in the next few days. Here's what that means for publishers and apps in the ecosystem: github.com/bluesky-soci... If you have questions or comments, please leave them on the GitHub Discussion thread!

Integrating Standard Site Into Bluesky · bluesky-social atproto · Discussion #4978

The Bluesky team is working on integrating site.standard.* lexicons. For people using the Bluesky app, this means that when they come across a link published with a Standard.site record, they’ll ge...

github.com

Fresh out of @rug.nl University Council. The improvements in sustainability since 2012, with recycling effors, cutting our CO2 emissions (already in half!), reducing heat, water and electricity waste, ended up resulting in 18 millions in savings. Sustainable ≠ more expensive

I'm suing Grammarly over its paid AI feature that presented editing suggestions as if they came from me - and many other writers and journalists - without consent. State law requires consent before someone's name can be used for commercial purposes. www.wired.com/story/gramma...

Grammarly Is Facing a Class Action Lawsuit Over Its AI ‘Expert Review’ Feature

The feature, which Grammarly shut down Wednesday, presented editing suggestions as if they came from established authors and academics—without their consent.

wired.com

The Mathematical Society of France will not be at the 2026 International Congress of Mathematicians, to be held in Philadelphia. This is great news. I hope other mathematical societies pull out as well. It would help if the @amermathsoc.bsky.social also declined to participate, in solidarity.

Société Mathématique de France@socmathfrance.bsky.social · 6mo ago

La SMF ne tiendra pas de stand au Congrès International des Mathématiciens (ICM) de Philadelphie en 2026. (1/3) (Motion du Conseil d'Administration du 16 janvier 2026) smf.emath.fr/actualites-s...

I can’t even keep up with this talk, they just showed two different(?) PoCs that spoof perfectly credible signatures from Satoshi and Angela Merkel. The talk started with them booting a spoofed Fedora ISO after checking the signature. 14 vulns, 9 unpatched.

Bild