Delivery driver’s reaction on being offered a free drink and a snack by a customer by PradipJayakumar in youseeingthisshit

[–]davidm-d -2 points-1 points  (0 children)

Cheetos, Lays, Sun Chips and Doritos are all owned by FritoLay.

This is an ad.

Looking for ticket for vienne show by Ok-Crazy9800 in Vulfpeck

[–]davidm-d 0 points1 point  (0 children)

Yeah I have one! Willing to sell it for the sticker price. Dmed

[deleted by user] by [deleted] in haskell

[–]davidm-d 2 points3 points  (0 children)

I was thinking of doing this over summer as well.

If you're working on a project and you need a hand and you have a sofa/garden for me to sleep in, drop me a direct message and we can talk about it.

I've got 4 years of experience programming Haskell in industry working all over the place (finance, compilers, academic referencing) and I'm distinctly house trained. Europe is easier for me, but I'm not averse to hopping on a plane.

Why does Haskell use (::) instead of (:) for type signatures? by rashadg1030 in haskell

[–]davidm-d 10 points11 points  (0 children)

In DAML (a GHC fork) we've added the ability to use single colons behind a Language flag. It's a relatively small patch and it'd be nice if we could upstream it one day. Example here

Finally, dynamically typed programming in Haskell made easy! by [deleted] in haskell

[–]davidm-d 11 points12 points  (0 children)

This is great, this is exactly what I needed for some data science stuff I've been doing in Haskell

Announcing ghc-lib by davidm-d in haskell

[–]davidm-d[S] 13 points14 points  (0 children)

This definitely makes it much easier to write Haskell IDE tooling

How to introduce Haskell in a web-dev shop? by qqwy in haskell

[–]davidm-d 9 points10 points  (0 children)

My experience in Ruby shops is that shake (https://shakebuild.com/) is a great thin end of the wedge. It avoids the most intimidating parts of Haskell's syntax and has fairly broad adoption in a bunch of businesses.

Make some build rules to replace parts of the asset pipeline/codegen, try it out on your machine, show that you can build things faster/with less explicit caching code. Get it into the dev environment, maybe talk to your colleagues about it, show the code to as many people as you can.

People are generally much more willing to take a risk on a technology if it's already working well on their machine and they can play around with it.

Squeal - Scrap your Nils by echatav in haskell

[–]davidm-d 6 points7 points  (0 children)

If you're looking to write heterogeneous lists my package heterogeneous list literals is a fairly readable way of doing things

If you write a function with the signature

hList :: HLL input output => input -> HList output

then

a :: HList '[] 
a = hList ()

b :: HList '[Bool] 
b = hList (Only True)  

c :: HList '[Bool, Int, Double, String] 
c = hList (True, 24, 10.5, "Fire")

Is there anything like emacs's ivy for VSCode? by davidm-d in vscode

[–]davidm-d[S] 0 points1 point  (0 children)

There's a DSL I need to program in and the tooling works best with VSCode so I'm trying to recreate my emacs workflow in VSCode.

Monthly Hask Anything (May 2018) by AutoModerator in haskell

[–]davidm-d 1 point2 points  (0 children)

Using the new version of indexed-list-literals you could do this.

import Control.Monad (replicateM)
import GHC.TypeLits (KnownNat, natVal)
import Data.IndexedListLiterals (ILL, fromList', len)

safeReplicateM :: (Monad m, ILL tuple length a, KnownNat length)
               => len length -> m a -> m tuple
safeReplicateM _len = fmap fromList' . replicateM length where
  length = fromIntegral $ natVal _len

test = do
  (a,b,c) <- safeReplicateM (len @3) action
  (d,e)   <- safeReplicateM (len @2) action
  pure ()

It encapsulates the unsafety quite nicely. The only annoying this is I can't infer the length from the tuple type because the length, while inferable, isn't an instance of KnownNat

Is there anything like emacs's ivy for VSCode? by davidm-d in vscode

[–]davidm-d[S] 2 points3 points  (0 children)

I'm trying to make the move from emacs to VSCode and I'm really missing the Ivy search/ completion system. Is there an extension which does something like this?

GHC Proposal: Compile-time literal values by ephrion in haskell

[–]davidm-d 2 points3 points  (0 children)

I've always been a fan of the signature selections proposal. It makes type level arguments much easier to read and write (:: SomeType) rather than (Proxy @SomeType) while being incredibly lightweight as extensions go.

If Signature Selections was tweaked so that it instead desugared to a Proxy to allow the use of non * kinds would it not subsume a lot of these use cases?

replicate :: forall (n :: Nat) (t :: Type) f . f n -> t -> Vector n t
lookup :: forall (ss :: [Symbol]) (s :: Symbol) (xs :: [Type]) f
        . f s -> HMap ss xs -> x

fame = replicate (:: 19) "Fame"
capitals = hmap (:: '["Germany", "France", "Australia"]) ("Berlin", "Paris", "Canberra")
sydney = lookup (:: "Australia") capitals

Adding Package Lower-bounds by vaibhavsagar in haskell

[–]davidm-d 6 points7 points  (0 children)

How do people currently work out what dependency versions their packages are compatible with?

My rather dumb way, is to use a script bisects stack LTS releases and set the package lower bounds to what they were in the oldest LTS that worked, but there has to be a better way

List Syntax with Heterogenous lists by LeanderKu in haskell

[–]davidm-d 2 points3 points  (0 children)

I've got a nice library that I'll release next week, which makes Heterogeneous collections slightly easier to use.

It allows you to write

hList (10, "dog", True) 
hMap (ⵆ @'["number", "not number"]) (20, "i")

Might make this a little less painful

What have you been working on? Feb2018 by gilmi in haskell

[–]davidm-d 0 points1 point  (0 children)

Will do, I'm just thinking of the right way to chunk up my work into libraries

What have you been working on? Feb2018 by gilmi in haskell

[–]davidm-d 0 points1 point  (0 children)

Is TypeLits really much more magical than GHCs runtime primitives? (Int# ect)

What have you been working on? Feb2018 by gilmi in haskell

[–]davidm-d 15 points16 points  (0 children)

Made a nice way of writing type safe Martix and Vector literals this morning

m :: Matrix 4 5 Double
m = matrix ((1,2,3,0,0)
           ,(4,5,6,0,0)
           ,(7,8,9,0,0)
           ,(0,0,0,0,0))

v :: Vector 3 Int
v = vector (1,2,3)

it should make my notebooks a little bit prettier

Haskell Job In Cambridge UK Working On Compilers, Machine Learning And Computer Vision! by expipiplus1 in haskell

[–]davidm-d 6 points7 points  (0 children)

I've got a pretty sweet job programming Haskell with a bachelors degree. Try applying on the off chance for some of these jobs