Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
Iceland_jack
searching Neon…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
8 ms
·
1.
▲
by
Iceland_jack
8mo ago
This is to say that (length-indexed) "Arrays" are Representable functors[1]. A `Vec n a` is isomorphic to (Fin n -> a), where Fin n = { x :: Nat | x < n }. instance pi n. Representable (Vec n) where type Rep (Vec n)
2.
▲
by
Iceland_jack
9mo ago
To your point, but lispers like the author of Let Over Lambda specifically called Lisp non-functional.
3.
▲
by
Iceland_jack
2y ago
Maybe you meant to write (??) :: Functor f => f (a -> b) -> a -> f b funs ?? a = fmap ($ a) funs from lens: https://hackage.haskell.org/package/lens-5.3.2/docs/Control-... This is val
4.
▲
by
Iceland_jack
2y ago
> As far as I know it's not possible to get this functionality in Haskell even with clever instance magic It is possible to fill in basic function bodies based on their type, using ghc-justdoit ( https://hackage.haskell.or
5.
▲
by
Iceland_jack
2y ago
lift = sequenceA @[] @(a ->)
6.
▲
by
Iceland_jack
2y ago
I appreciate the link to https://dl.acm.org/doi/10.1145/3236774
7.
▲
by
Iceland_jack
2y ago
Haskell focuses on both, but prioritizes research. I have had several Haskell jobs and highly recommend it for the personal enjoyment.
8.
▲
by
Iceland_jack
2y ago
Any function matching the type St -> (a, St) can viewed as `State St' parameterized over `a'. There are several behaviors that organize such functions, such as Monad which "overloads the semicolon" to work on
9.
▲
by
Iceland_jack
2y ago
Applicative is n-ary lifting, Functor is a special unary case of Applicative: liftA0 :: Applicative f => (a) -> (f a) liftF1 :: Functor f => (a -> b) -> (f a -> f b) liftA2 :: App
10.
▲
by
Iceland_jack
2y ago
Monads don't have anything to do with laziness but historically the need for them arose because of laziness. It's the first thing explained in the introduction of Tackling the Awkward Squad: " Call-by-need (or lazy) languag
11.
▲
by
Iceland_jack
2y ago
In Haskell behavour is type-directed (type classes) and they describe both.
12.
▲
by
Iceland_jack
2y ago
What does that mean?
13.
▲
by
Iceland_jack
2y ago
I met Sam Derbyshire at ZuriHac who told me all the difficult architectural work had been done for SIMD support. + https://gitlab.haskell.org/ghc/ghc/-/issues/7741 It might make it for GHC 9.12 (for 128
14.
▲
by
Iceland_jack
2y ago
I write this in my Haskell day job every day.
15.
▲
by
Iceland_jack
2y ago
That reminds me, I should write a Monad tutorial.
16.
▲
by
Iceland_jack
2y ago
By floating the forall., we get another representation type for Void (forall a. a) and `absurd' is one half of that isomorphism :) absurd :: Void -> (forall a. a) drusba :: (forall a. a) -> Void drusba void = void
17.
▲
by
Iceland_jack
3y ago
With https://ucsd-progsys.github.io/liquidhaskell/ , but as a separate checker. I think there are talks of integrating it into the compiler
18.
▲
by
Iceland_jack
3y ago
See "Tackling the Awkward Squad: monadic input/output, concurrency, exceptions, and foreign-language calls in Haskell" by Simon Peyton Jones https://www.microsoft.com/en-us/research/wp-content/u
19.
▲
by
Iceland_jack
3y ago
IO distinguishes execution (of actions) from evaluation (of expressions). To execute an `action :: IO Ty' for a value of `a :: Ty', you use <- do (a :: Ty) <- (action :: IO Ty) .. The 'function' rand i
20.
▲
by
Iceland_jack
3y ago
The abstract concepts give you the tools to quickly classify a datatype. They are not limited to Haskell and let you ask the right questions of datatypes in any language. The foundational concept is functoriality, i.e. mapping over the argu
21.
▲
by
Iceland_jack
4y ago
Either a :: Type -> Type is a Haskell Functor (endofunctor), mapping (->) to (->). Either :: Type -> (Type -> Type) is not an endofunctor, it maps a type to a type constructor and thus maps (->) to (~>) (
22.
▲
by
Iceland_jack
4y ago
What's the big deal, using a font outside of its narrowly designed purpose is certainly not it. Some people venture outside the box
23.
▲
by
Iceland_jack
4y ago
I always write existential quantification data Showable = forall a. Show a => Showable a with GADT syntax because it can be confusing for people to infer the type of `Showable' from the above definition when you can write it
24.
▲
by
Iceland_jack
4y ago
algebra of typed composition, a discipline for making definitions, study of universal properties, theory of duality, formal theory of analogy, mathematical model of mathematical models, inherently computational, science of analogy, mathem
25.
▲
by
Iceland_jack
4y ago
Notions of Computation as Monoids https://www.fceia.unr.edu.ar/~mauro/pubs/Notions_of_Computat...
26.
▲
by
Iceland_jack
4y ago
You would be surprised how much Haskell is practical for boring stuff, try it out http://learnyouahaskell.com/
27.
▲
by
Iceland_jack
4y ago
What do you mean by 'open ended', are you talking about literals for data structures or something deeper?
28.
▲
by
Iceland_jack
4y ago
In the definitional sense it is underwhelming, like with many algebraic structures the diversity of instances leads to interesting results. The behaviour of these instantiations have a completely different character even though they instant
29.
▲
by
Iceland_jack
4y ago
Don't learn it from HN (clueless)
30.
▲
by
Iceland_jack
4y ago
Separating IO is kind of the killer feature, something like `rand()` is not an int unless you're reading dilbert[1] or xkcd[2]. Basic equations break down in the face of an Int-valued IO-action being conflated with an Int [1] https:&#
More ›