← Înapoi la Urmăritori

Cel mai recent articol

Ultima verificare

Urmăritori 0 urmăritori
Articole: 34
  1. Futamura Projections in a Nutshell

    Futamura Projections are usually described with a lot of words, but they are much simpler to understand in types.

  2. Here is a fun little exercise: show that any two perfectly correlated Bernoulli random variables \(X\) and \(Y\) must be equal.

  3. The phrase “Make Illegal States Unrepresentable” has caught fire in the functional programming world after being coined by Yaron Minsky in 2011.

  4. Continuations and Free Algebras

    The comonad reader has a lovely article about the proper definition of free monoids in the category of Haskell types.

  5. Tests as Data

    Currently, most popular approaches to software testing used by developers consist of unit-testing frameworks such as NUnit/JUnit and the like.

  6. uncurry id == uncurry ($)

    The other day I was trying to find if joining two Map k structures together fell under a suitable abstraction.

  7. Maybe [a]?

    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).

  8. Set is not a Functor (redux)

    Michael Snoyman has observed that Set is not a functor.

  9. Deriving Type Derivatives

    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\).

  10. Stabilizing Values

    Just recently I discovered a simple solution to an issue I encountered when developing parts of my directed-cubical library.

  11. Fun with fixed points

    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.

  12. Types and semantics

    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.

  13. A Law for Foldable

    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…

  14. 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}\).

  15. Fun with Monogenic Semigroups

    Finite semigroups are important in computer science in particular because they can represent composition of state transitions of deterministic automata, including non-invertible transitions.

  16. My ETL philosophy

    The term ETL stands for Extract, Transform, and Load.

  17. Fizzbuzz Redux

    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.

  18. Statically Typed Substructures

    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.

  19. Type-level modular arithmetic

    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…

  20. Adventures in Existential Quantification

    I recently found this post about dealing with Renderable objects in the context of game design.

  21. Return values vs. Exceptions

    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.

  22. The commutative monoid of the Maybe monad

    The Maybe monad is a certain endofunctor on the category of types.

  23. I recently read the paper on extensible effects in Haskell.

  24. Yesod and cabal hell

    Today I decided to have a go at installing Yesod for the first time.

  25. directed-cubical 0.1.2.0

    I finally got around to writing some code to output finite directed cubical complexes in VTK format.

  26. Vim, Forth, and Emergent Behavior

    As an oddball way of “updating” my skills, I decided some 6 months ago to learn Vim.

  27. Announcing directed-cubical 0.1.0.0

    I’ve just released a new Haskell library on GitHub which I intend to get onto Hackage real soon now.

  28. Loops and Haskell's "iterate"

    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).

  29. Haskell: The Good, the Bad, and the Ugly

    I am working on my first significant little project in Haskell; some code should appear on Github in the not-too-distant future.

  30. FizzBuzz via the string monoid

    FizzBuzz is a fun little exercise for thinking about conditional statements.

  31. Dependency Hell with Cabal

    Today I got my first true taste of dependency hell in Haskell, via cabal install (as expected).

  32. List Processing in Databases, again...

    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).

  33. Fun with finite strings

    I was recently inspired by Lipton’s blog to have a look at a fun little problem about finite strings.

  34. Thoughts on SQL

    My current job involves coding a lot of SQL queries and has had me thinking about relational database concepts in general.