dbaynard

u/dbaynard


r/crossword•

Hello r/crossword

I saw a recommendation here for squares.io. I uploaded an in-progress .puz file and then tried it out, but I see no way to delete it. There is a way to delete a puzzle, right?

Also there appears to be no contact information (the contact link doesn't work). How can one get in touch with the developer?

Happy solving.

00

r/haskell•

I saw this great tweet earlier:

https://twitter.com/polikarn/status/1392945152965021697

I'd never thought of the :q command's similarity to vim (possibly because I default to <Ctrl-D> in REPLs). Cool!

But… that's not how I exit vim. I use ZZ.

The following incantation (which requires unix and process packages) is here to save the day.

import System.Exit
import System.IO.Unsafe
import System.Posix.Process
import System.Process

data ExitVim = ZZ | ZQ

exitSigTERM :: IO ProcessHandle
exitSigTERM = spawnProcess "kill" . (:[]) 
151

r/haskell•

Occasionally there are competing definitions for functions with certain names. This is understandable in a large ecosystem, and we have tools (such as qualified imports) with which to select which function with a certain name a fragment of code means.

It seems there is some disagreement on what the type of optional should be.

For example, Control.Applicative defines it as

optional :: Alternative f => f a -> f (Maybe a)

By contrast, Text.ParserCombinators.ReadP defines it as

154

r/haskell•

The basic implementation is a single, simple type family, but with a little extra work it is possible to produce an interface with a concept of identity.

So after some boilerplate, we reach the main implementation.

{-# LANGUAGE TypeInType #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators #-}

module Identity
  ( type ($)
  , IdK(Id)
  ) where

import Data.Kind

-- | Used as a promoted type
data IdK = Id

The key is the type family, $.

In the second line of the closed type family definition, it simply applies a type of kind Type -> Type — such as Maybe. The first line ensures the symbol 'Id is treated as an identity type, i.e. t

33

r/cocktails•

Greetings r/cocktails,

Thanks to the existence of Drinks by the dram I have some 3 cl samples of a number of spirits and liqueurs. So before buying full bottles, I’d like to make some suitable drinks to test them out.

For example, a Tommy’s margarita to compare tequila, or a martini and G&T for gin (different drinks for different aspect).

Currently on the shelf:

  • Genever — Bols Oude, Bols 6yo Corenwyn, Filliers’ 50° 8yo oude graanjenever
  • Absinthe — St. George, Prof. Cornelius Ampleforth’s cold distilled, Quaglia Assenzio del Professore
  • R[h]um — Wray & Nephew overproof, Smith & Cross, Bielle Rhum Agricole
  • Maraschino — Maraska, Luxardo
74

You've reached the end of this feed.