A world to win - WebAssembly for the rest of us
https://www.wingolog.org/archives/2023/03/20/a-world-to-win-webassembly-for-the-rest-of-us [www.wingolog.org]
2023-03-20 22:09
tags:
functional
garbage-collection
lisp
programming
transcript
wasm
As it turns out, there is a reason that there is no good Scheme implementation on WebAssembly: the initial version of WebAssembly is a terrible target if your language relies on the presence of a garbage collector. There have been some advances but this observation still applies to the current standardized and deployed versions of WebAssembly. To better understand this issue, let’s dig into the guts of the system to see what the limitations are.
source: HN
React as a UI Runtime
https://overreacted.io/react-as-a-ui-runtime/ [overreacted.io]
2019-02-21 21:02
tags:
functional
javascript
library
programming
ux
web
In this post, I’m describing most of the React programming model from first principles. I don’t explain how to use it — just how it works.
It’s aimed at experienced programmers and folks working on other UI libraries who asked about some tradeoffs chosen in React. I hope you’ll find it useful!
Interesting read, even if I don’t use react.
Oneliner-izer: An Exercise in Constrained Coding
https://www.youtube.com/watch?v=DsUxuz_Rt8g [www.youtube.com]
2019-02-06 00:39
tags:
compiler
functional
programming
python
video
We’ll describe the ideas and implementation behind Oneliner-izer, a “”compiler“” which can convert most Python 2 programs into one line of code. As we discuss how to construct each language feature within this unorthodox constraint, we’ll explore the boundaries of what Python permits and encounter some gems of functional programming – lambda calculus, continuations, and the Y combinator.
Open Season on Hylomorphisms
https://bartoszmilewski.com/2018/12/20/open-season-on-hylomorphisms/ [bartoszmilewski.com]
2018-12-23 20:00
tags:
cxx
functional
haskell
programming
This piece of code is probably unreadable to a regular C++ programmer, but makes perfect sense to a Haskell programmer.
Here’s the description of the problem: You are given a list of equal-length strings. Every string is different, but two of these strings differ only by one character. Find these two strings and return their matching part. For instance, if the two strings were “abcd” and “abxd”, you would return “abd”.
What makes this problem particularly interesting is its potential application to a much more practical task of matching strands of DNA while looking for mutations. I decided to explore the problem a little beyond the brute force approach. And, of course, I had a hunch that I might encounter my favorite wild beast–the hylomorphism.
C++ Standard Ranges
http://ericniebler.com/2018/12/05/standard-ranges/ [ericniebler.com]
2018-12-23 03:26
tags:
cxx
functional
library
programming
standard
type-system
As you may have heard by now, Ranges got merged and will be part of C++20. This is huge news and represents probably the biggest shift the Standard Library has seen since it was first standardized way back in 1998.
Future blog posts will discuss how we got here and the gritty details of how the old stuff and the new stuff play together (we’re C++ programmers, we love gritty details), but this post is strictly about the what.
source: HN
Running from the past
http://blog.sigfpe.com/2018/10/running-from-past.html [blog.sigfpe.com]
2018-11-15 17:36
tags:
compsci
functional
haskell
math
random
Functional programming encourages us to program without mutable state. Instead we compose functions that can be viewed as state transformers. It’s a change of perspective that can have a big impact on how we reason about our code. But it’s also a change of perspective that can be useful in mathematics and I’d like to give an example: a really beautiful technique that alows you to sample from the infinite limit of a probability distribution without needing an infinite number of operations.
source: trivium
Announcing F# 4.5
https://blogs.msdn.microsoft.com/dotnet/2018/08/14/announcing-f-4-5/ [blogs.msdn.microsoft.com]
2018-08-15 03:52
tags:
dotnet
fsharp
functional
release
The first thing you may notice about F# 4.5 is that it’s higher than F# 4.1.
Are functional programs easier to verify than imperative programs?
http://semantic-domain.blogspot.com/2018/04/are-functional-programs-easier-to.html [semantic-domain.blogspot.com]
2018-06-04 17:58
tags:
compsci
functional
programming
The difficulty of imperative programming arises from the combination of state, aliasing and procedure calls. Any two of these features can be handled without that much difficulty, but the combination of all three effectively makes reasoning (nearly) as difficult as correct concurrent programming.
Writing complex macros in Rust: Reverse Polish Notation
https://blog.cloudflare.com/writing-complex-macros-in-rust-reverse-polish-notation/ [blog.cloudflare.com]
2018-02-05 07:53
tags:
functional
programming
rust
So, here is my take on describing the principles behind writing such macros. It assumes you have read the Macros section from The Book and are familiar with basic macros definitions and token types. I’ll take a Reverse Polish Notation as an example for this tutorial. It’s interesting because it’s simple enough, you might be already familiar with it from school, and yet to implement it statically at compile time, you already need to use a recursive macros approach.
Curry Your Calls, Uncurry Your Returns
http://chriswarbo.net/blog/2018-01-24-curry_your_calls_uncurry_your_returns.html [chriswarbo.net]
2018-01-24 16:15
tags:
functional
javascript
programming
Currying is widely used in functional programming. Some languages, like ML and Haskell, curry everything by default; in others, like Scheme and Javascript, we can implement currying as a transformation (either a higher-order function or a macro), and call it explicitly wherever we want to use it.
source: L
Stalking a Hylomorphism in the Wild
https://bartoszmilewski.com/2017/12/29/stalking-a-hylomorphism-in-the-wild/ [bartoszmilewski.com]
2018-01-02 22:34
tags:
functional
haskell
programming
type-system
Trying to improve my Haskell coding skills, I decided to test myself at solving the 2017 Advent of Code problems. It’s been a lot of fun and a great learning experience. One problem in particular stood out for me because, for the first time, it let me apply, in anger, the ideas I learned from category theory. But I’m not going to talk about category theory this time, just about programming.
Although saying “just programming” may be a bit modest.
Simplicity: A New Language for Blockchains
https://blockstream.com/simplicity.pdf [blockstream.com]
2017-11-16 17:21
tags:
blockchain
compiler
compsci
functional
paper
pdf
programming
type-system
Simplicity is a typed, combinator-based, functional language without loops and recursion, designed to be used for crypto-currencies and blockchain applications. It aims to improve upon existing crypto-currency languages, such as Bitcoin Script and Ethereum’s EVM, while avoiding some of the problems they face. Simplicity comes with formal denotational semantics defined in Coq, a popular, general purpose software proof assistant. Simplicity also includes operational semantics that are defined with an abstract machine that we call the Bit Machine.
ML for the Working Programmer
https://www.cl.cam.ac.uk/~lp15/MLbook/pub-details.html [www.cl.cam.ac.uk]
2017-09-13 01:10
tags:
book
functional
ml
pdf
programming
I have decided to make the full text of the book available in PDF.
1996, but I don’t think much has changed.
source: L
Monads, Monoids, and Categories
https://bartoszmilewski.com/2017/09/06/monads-monoids-and-categories/ [bartoszmilewski.com]
2017-09-11 00:52
tags:
compsci
functional
math
series
type-system
There is no good place to end a book on category theory. There’s always more to learn. Category theory is a vast subject.
Time to back and read everything for real...
Writing a Formally-Verified Porn Browser in Coq and Haskell
http://www.michaelburge.us/2017/08/25/writing-a-formally-verified-porn-browser-in-coq.html [www.michaelburge.us]
2017-08-27 01:12
tags:
compsci
development
functional
haskell
programming
type-system
Hopefully this example shows that there’s nothing really stopping anyone from using Coq in their Haskell programs today.
source: L
Get Started with F# as a C# developer
https://blogs.msdn.microsoft.com/dotnet/2017/07/24/get-started-with-f-as-a-c-developer/ [blogs.msdn.microsoft.com]
2017-07-25 16:44
tags:
csharp
fsharp
functional
intro-programming
It’s the same, but different.
Project Springfield: a Cloud Service Built Entirely in F#
https://blogs.msdn.microsoft.com/dotnet/2016/12/13/project-springfield-a-cloud-service-built-entirely-in-f/ [blogs.msdn.microsoft.com]
2016-12-14 20:26
tags:
cloud
concurrency
fsharp
functional
fuzzing
programming
type-system
web
Project Springfield is Microsoft’s unique fuzz testing service for finding security critical bugs in software.
Fairly long post about all the hows and whys.
F# Pain Points
http://www.colinbellmore.work/post/fsharp-pain/ [www.colinbellmore.work]
2016-12-07 19:38
tags:
dotnet
fsharp
functional
programming
type-system
Some well reasoned gripes.
Disadvantages of purely functional programming
http://flyingfrogblog.blogspot.com/2016/05/disadvantages-of-purely-functional.html [flyingfrogblog.blogspot.com]
2016-12-05 21:54
tags:
functional
programming
Where the rubber meets the road. Or in some cases, doesn’t.
Monads: Programmer's Definition
https://bartoszmilewski.com/2016/11/21/monads-programmers-definition/ [bartoszmilewski.com]
2016-11-23 00:53
tags:
functional
haskell
programming
series
type-system
Programmers have developed a whole mythology around monads.
What they do vs what they are.