30 Matching Annotations
  1. Jul 2020
  2. May 2020
    1. function (or in the case of type classes, we call these methods)
    2. If you can tell that two types are equal or not equal, that type belongs in the Eq type class.

      two types or rather two things of the same type?

    1. Programming languages These will probably expose my ignorance pretty nicely.

      When to use different programming languages (advice from an Amazon employee):

      • Java - enterprise applications
      • C# - Microsoft's spin on Java (useful in the Microsoft's ecosystem)
      • Ruby - when speed is more important then legibility or debugging
      • Python - same as Ruby but also for ML/AI (don't forget to use type hinting to make life a little saner)
      • Go/Rust - fresh web service where latency and performance were more important than community/library support
      • Haskell/Erlang - for very elegant/mathematical functional approach without a lot of business logic
      • Clojure - in situation when you love Lisp (?)
      • Kotlin/Scala - languages compiling to JVM bytecode (preferable over Clojure). Kotlin works with Java and has great IntelliJ support
      • C - classes of applications (operating systems, language design, low-level programming and hardware)
      • C++ - robotics, video games and high frequency trading where the performance gains from no garbage collection make it preferable to Java
      • PHP/Hack - testing server changes without rebuilding. PHP is banned at Amazon due to security reasons, but its successor, Hack, runs a lot of Facebook and Slack's backends
  3. Apr 2020
  4. Mar 2020
  5. Feb 2020
    1. Nix is a purely functional package manager. This means that it treats packages like values in purely functional programming languages such as Haskell — they are built by functions that don’t have side-effects, and they never change after they have been built.
  6. Nov 2019
    1. haskell-overridez is a tool and library of nix functions that simplify the use of overrides while developing haskell projects with nixpkgs.

  7. Jun 2019
    1. This package takes a more declarative approach, and talks about events rather than signals. Widgets emit event values, and these values can be mapped and transformed into other values as the event propagates up the tree of widgets.

      So this is a bit more elm-y than it would otherwise be

  8. Apr 2019
  9. Mar 2019
  10. Feb 2019
    1. Haskell

      Haskell, Keep it simple, stupid.

      -- FizzBuzz
      module Main where
      
      import Control.Monad
      
      main :: IO ()
      main = forM_ [1..100] $ \n -> putStrLn . concat . take 2 $
          ["Fizz" | n `mod` 3 == 0] ++ 
          ["Buzz" | n `mod` 5 == 0] ++ 
          ["", show n]
      
  11. Jan 2019
  12. Oct 2018
  13. Sep 2018
  14. Apr 2018
    1. (== 10)

      This confused me. I'm relatively new to Haskell and did not know about sectioning. After learning that detail, this makes sense as a (right) partial application of the (==) function.

  15. Jan 2018
    1. Whereas normal type classes represent predicates on types (each type is either an instance of a type class or it isn’t), multi-parameter type classes represent relations on types
  16. Oct 2017
  17. Apr 2017
  18. Dec 2016
  19. Oct 2016
  20. Jul 2016
    1. Saw this recommended on a Quora answer whilst looking for book and article recommendations for a newcomer to Haskell

  21. Jun 2016
  22. May 2016
  23. Oct 2014
    1. foldMap :: Monoid m -> (a -> m) -> t a -> m

      I'm not sure, but I think what he meant here was foldMap :: Monoid m => (a -> m) -> t a -> m.

    2. The notion behind it was that one could decompose, e.g., Applicative into an instance of the Pointed typeclass and an instance of the Apply typeclass (giving apply :: f (a -> b) -> f a -> f b) and an instance of Pointed, such that the two interact properly.

      There's more on Applicative (and Functor) here, in case you're unfamiliar with it.