RSSAmplifier

Blog

Mizuki's Blog

Posts about functional programming languages

minoki.github.ioRSS feed ↗6 posts

Latest posts

Low-level Haskell: The cursed way to emulate inline assembly in Haskell/GHC, or how to return multiple values from a foreign function

This article is an English version of my earlier post “ 【低レベルHaskell】Haskell (GHC) でもインラインアセンブリに肉薄したい! ” (in Japanese). The translation was assisted by AI (if you don’t like reading AI-generated content, please read the Japanese version!). Modern CPUs have many instructions specialized for particular purposes. Examples include SIMD, instructions useful for hashing and cryptography, and a variety…

An Unofficial Guide to What's New in GHC 9.14

I’ve been writing posts in Japanese over the past few years introducing new features in GHC. I thought such posts might also be useful for readers in the English-speaking community, so with some help from tools like ChatGPT, I’ve translated the latest one into English. I hope this will be helpful when you try out the new GHC. The original Japanese article can be found at GHC 9.14の新機能 . GHC…

Some thoughts on GHC's SIMD primitives

The use of parallelization is essential to exploit the performance of modern computers. In particular, we want to take advantage of SIMD, multi-core, and GPUs. This article will focus on SIMD — single instruction, multiple data. GHC has provided primitives for SIMD for years, but they have not been effectively utilized. In this article, I’d like to discuss what can be done to promote the…

How to use GHC's LLVM backend

Japanese version: GHCのLLVMバックエンドの使い方 This article was translated from Japanese with help of AI. Of course, the translation was checked and corrected by the human. GHC is a compiler capable of generating native code. It provides three methods for generating native code: its own NCG (Native Code Generator) backend, the LLVM backend, and the via-C backend that generates code via C sources. Typically,…

Playing with Visible Forall in GHC 9.10

Japanese version : GHC 9.10で実装された可視なforallで遊ぶ Today, GHC 9.10.1 is released. One of the new features is “visible forall”, or RequiredTypeArguments extension. In this article, I will play with this new feature. The official documents of this feature are these: ghc-proposals/proposals/0281-visible-forall.rst at master · ghc-proposals/ghc-proposals 6.4.18. Required type arguments — Glasgow Haskell…

Introducing LunarML: The Standard ML compiler that produces Lua/JavaScript

Today I would like to announce the initial release of LunarML, the new Standard ML compiler I have been developing for several years. minoki/LunarML: The Standard ML compiler that produces Lua/JavaScript Introduction It is hard to create large software in an untyped language. However, there are situations where the use of untyped languages is unavoidable due to the constraints of the runtime…