Creează un cont pentru a te abona la acest blog și a-i urmări articolele pe pagina Lectură.
-
Futamura Projections are usually described with a lot of words, but they are much simpler to understand in types.
-
Here is a fun little exercise: show that any two perfectly correlated Bernoulli random variables \(X\) and \(Y\) must be equal.
-
The phrase “Make Illegal States Unrepresentable” has caught fire in the functional programming world after being coined by Yaron Minsky in 2011.
-
The comonad reader has a lovely article about the proper definition of free monoids in the category of Haskell types.
-
Currently, most popular approaches to software testing used by developers consist of unit-testing frameworks such as NUnit/JUnit and the like.
-
The other day I was trying to find if joining two Map k structures together fell under a suitable abstraction.
-
I’ve been doing some coding in Scala just to get some experience with functional programming on the JVM, and part of this has involved bringing in useful abstractions from Haskell as I needed them (scalaz notwithstanding).
-
Michael Snoyman has observed that Set is not a functor.
-
The polymorphic list type [a] can be modeled as List a = Empty | Cons a (List a) which looks an awfully lot like \(L = 1 + X\cdot L\).
-
Just recently I discovered a simple solution to an issue I encountered when developing parts of my directed-cubical library.
-
If you import Data.Function, you’ll find that the function fix has a funny type: fix :: (a -> a) -> a Given a function f, the value fix f will be “the” fixed point of f.
-
If we think of a “personName” as a possible name for a person, then semantically it carries more information than just being an arbitrary String.
-
We are told by the documentation of Data.Foldable that, at a minimum, a foldable instance must implement the foldMap function, whose signature is foldMap :: Monoid m => (a -> m) -> t a -> m The fact that m is an arbitrary monoid allows us to determine the…
-
An aperiodic semigroup is a semigroup \(S\) such that for every element \(x \in S\) there exists some \(n \in \mathbb{N}\) such that \(x^n = x^{n+1}\).
-
Finite semigroups are important in computer science in particular because they can represent composition of state transitions of deterministic automata, including non-invertible transitions.
-
The term ETL stands for Extract, Transform, and Load.
-
There is an interesting monoid instance for Maybe a types whenever a is a monoid, which ignores Nothing and applies the underlying monoid under the Just.
-
Suppose I want to write a function that takes a list together with one of its elements, and produces a new list of the same type.
-
So, a modern way to do the natural numbers at the type level is to take advantage of the relatively recent DataKinds extension to GHC, which automatically promotes (many) types to kinds and their type constructors to constructors for these kinds. {-# LANG…
-
I recently found this post about dealing with Renderable objects in the context of game design.
-
In imperative programming circles (particularly C++) there has been debate over whether it is better to use return values or exceptions to propagate information about exceptional conditions.
-
The Maybe monad is a certain endofunctor on the category of types.
-
I recently read the paper on extensible effects in Haskell.
-
Today I decided to have a go at installing Yesod for the first time.
-
I finally got around to writing some code to output finite directed cubical complexes in VTK format.
-
As an oddball way of “updating” my skills, I decided some 6 months ago to learn Vim.
-
I’ve just released a new Haskell library on GitHub which I intend to get onto Hackage real soon now.
-
Coming from imperative languages, one of the biggest initial shocks with Haskell has to be the lack of loops (or more accurately, the lack of special syntactic sugar for them).
-
I am working on my first significant little project in Haskell; some code should appear on Github in the not-too-distant future.
-
FizzBuzz is a fun little exercise for thinking about conditional statements.
-
Today I got my first true taste of dependency hell in Haskell, via cabal install (as expected).
-
List processing and functional programming style have now come up more than once as a solution to my database programming woes, although by “list processing” I often just mean “set processing” (ordering only matters for the final resultset).
-
I was recently inspired by Lipton’s blog to have a look at a fun little problem about finite strings.
-
My current job involves coding a lot of SQL queries and has had me thinking about relational database concepts in general.