Manuel Chakravarty
@tacticalgrace.justtesting.org
820 followers
690 following
1.1K posts
🔥 Lambda Scientist
💡 Functional programming
💡 Programming languages
💡 Cryptography
👨🏽💻 Swift, Haskell & Agda
💜 Volt 🇪🇺 policy: digital rights & economy
📍 Utrecht 🇳🇱🇩🇪🇪🇺
• Twitter: @TacticalGrace
Posts
Media
Videos
Starter Packs
Reposted by Manuel Chakravarty
Reposted by Manuel Chakravarty
Reposted by Manuel Chakravarty
Reposted by Manuel Chakravarty
Reposted by Manuel Chakravarty
Reposted by Manuel Chakravarty
Reposted by Manuel Chakravarty
Reposted by Manuel Chakravarty
Reposted by Manuel Chakravarty
Reposted by Manuel Chakravarty
Reposted by Manuel Chakravarty
Reposted by Manuel Chakravarty
OCaml
@ocaml.org
· 2d
Release of OCaml 5.4.0
We have the pleasure of celebrating the birthdays of Camille Saint-Saëns and
Karl Schwarzschild by announcing the release of OCaml version 5.4.0.
Some of the highlights of OCaml 5.4.0 are:
Labelled tuples
It is now possible to put labels on tuple fields
let ( * ) (x,~dx) (y,~dx:dy) = x*.y, ~dx:(x *. dy +. y *. dx )
Those labeled tuples are equivalent to SML records: they are an order-dependent and structurally-typed variants of records. They are mostly intended for local types.
Array literal syntax support for immutable arrays and floatarrays
The array literal syntax is now shared by array-like primitive datatypes,
like 'a array, floatarray and immutable array iarray.
For instance, this code
let x =
let x = Array.Flotarray.create 3 in
Array.Flotarray.set x 0 1.;
Array.Flotarray.set x 1 2.;
Array.Flotarray.set x 2 3.;
x
can now be written
let x : floatarray = [|0.; 1.; 2.|]
This also supported in patterns
let one = match x with
| [|_;y;_|] -> Some y
| _ -> None
However array indexing still needs to go through user-defined indexing operator
let (.$()) = Array.Floatarray.get
let (.$()
dlvr.it
Reposted by Manuel Chakravarty
Reposted by Manuel Chakravarty
Reposted by Manuel Chakravarty
Reposted by Manuel Chakravarty
Reposted by Manuel Chakravarty
Reposted by Manuel Chakravarty