Discover and read the best of Twitter Threads about #ocaml

Most recents (6)

Is type checking #Erlang hard? Or #Elixir, by the way? Let's think... Image
There are only structural types in Erlang. No types are compared for equality just based on their names. Not even records, as they're tuples, and tuples differ structurally by arity.
Apart from opaque types which by definition hide the structure. So they can only be nominal! And maybe also user-defined types (also known as user types), since these do have names... But at runtime types don't exist anymore, so it's the structure that matters. Always. Almost ;)
Read 24 tweets
1/ Octrians, ahead of the whitepaper release later this year, we are sharing some details about the project.
We are building a new decentralized ecosystem with a strong focus on the P2P economy. Our mission is to turn the attention back to the original problem of crypto.

👇🧵
2/ In their 2008 bitcoin paper, Satoshi Nakamoto outlined a vision of "A purely peer-to-peer version of electronic cash", further noting "What is needed is an electronic payment system", and putting additional emphasis on its usability for "Commerce on the Internet".
3/ While modern crypto offers great store-of-value and investing opportunities, convenience in online payments and everyday transactions between entities, in our view, is still limited. In this sense, the UX of wallets and dApps is lagging behind conventional fintech companies.
Read 12 tweets
A simple #OCaml "Hello World" for a #RPi4 as a bare-metal Operating System with #MirageOS (in 4 days)
At this stage, I'm only able to boot the "caml runtime" on RPi4. But, in MirageOS, we did everything in OCaml, so it's perfect to start IoT in OCaml.
The next step will be the integration in MirageOS 4 where I specially pay my attention into how we orchestrate the compilation from the boot.S to the "caml_startup" function. UART is our serial port to be able to print something: en.wikipedia.org/wiki/Universal…
Read 14 tweets
We’re excited to contribute an important feature to the next #Tezos protocol proposal: first-class _sub-trees_ of the blockchain context. 🌲

This feature has an interesting #OpenSource #OCaml history, dating back to before Tezos was born. A thread 🧵. (1 / N)
The Tezos protocol runs on top of a versioned tree called the “context”, which holds the chain state (balances, contracts etc.).

Ever since pre-Alpha, the context has been implemented using Irmin – a Merkle tree database written for OCaml #MirageOS kernels. (2 / N)
For MirageOS, Irmin’s key strength is flexibility: it can run over arbitrary backends. A perfect fit for Tezos, which must be agile & widely-deployable.

Tezos has already leveraged this many times, all the way from initial prototypes using a Git backend to irmin-pack. (3 / N)
Read 17 tweets
Let's talk about one of the most old program I ever see! The file command.
A small research about this command brings us to 1986-1987 - I was not born - so it's a really old project. But it still is updated (last release is 5.38 - 2020-06-27).
But the official mirror repository seems not really accurate (where the Changelog started from 2003). The first "commit" is dated 1987 (according to the website).

darwinsys.com/file/
Read 24 tweets
I'm a lisper who has spend a little over six months getting up to speed in OCaml, and it's been really interesting. It's been unlike anything I've used before. Thread.
OCaml's syntax is pretty exotic, even if you've done some Haskell.

[1,2] is legal but it's not a list of numbers. Precedence (esp , and ;) is surprising [let y = 2 in y; 3]. Nesting match statements (common) can end up with a type error on bad usage.
Fortunately, the #ocaml channel on Freenode is really helpful when you get stuck. Another great trick is to run ocamlformat on your code: it often adds parentheses to examples that are harder to parse, e.g. (x, y as z).
Read 12 tweets

Related hashtags

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3.00/month or $30.00/year) and get exclusive features!

Become Premium

Too expensive? Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal Become our Patreon

Thank you for your support!