Csongor Kiss

474 posts

Csongor Kiss banner
Csongor Kiss

Csongor Kiss

@Lowert

pick the right job for the tool (he/him)

London Katılım Ocak 2009
150 Takip Edilen760 Takipçiler
Nintendo .DS_Store
Nintendo .DS_Store@sliminality·
I can't find anything written about the relationship between React contexts and the Reader monad. To me, they solve identical problems in structurally similar ways (modulo the React runtime). I am surely not the first person to make this connection. Anyone have pointers?
English
9
6
48
0
Csongor Kiss
Csongor Kiss@Lowert·
@evie_fp don't the built in 'gf' and 'gx' commands work for you? (for (1) and (2) respectively)
English
1
0
1
0
Evie
Evie@evie_fp·
Anyone got some (neo)vim plugins that: - recognise (relative) paths and allow me to open said file? - recognise (web) URLs and allow me to open them in my browser?
English
2
0
1
0
Csongor Kiss retweetledi
Tweag by Modus Create
Tweag by Modus Create@tweagio·
Can the compiler handle linear state for us? Yes, by teaching linear logic to type class constraints. Written up in an #ICFP 2021 submission by Jean-Philippe Bernardy, @RaeHaskell, @Lowert, @aspiwack, and @nicolasgwu (3/5) arxiv.org/abs/2103.06127
Tweag by Modus Create@tweagio

Fancy types might get a lot easier with inference for existentials! Read why in this #ICFP 2021 submission by @RaeHaskell, intern Guillaume Duboc, @fancytypes, and Daniel Lee. (2/5) richarde.dev/papers/2021/ex…

English
0
3
12
0
Csongor Kiss
Csongor Kiss@Lowert·
@mpeytonjones @tweagio The main issue with implicit params is that you have to name them, such as "?x". If you want to use them to represent an "open file" capability for example, then maybe you call this capability "?open". But now you can't have multiple open files, as their tokens' name would clash!
English
1
0
0
0
Michael Peyton-Lebed 🔸
Michael Peyton-Lebed 🔸@mpeytonjones·
@tweagio Of course, constraints give you implicit evidence so it's not so different in the end, but if it's the evidence that's used linearly, it's perhaps nicer to talk about that directly rather than the type-level thing...
English
1
0
0
0
Csongor Kiss retweetledi
Tweag by Modus Create
Tweag by Modus Create@tweagio·
Linear types in Haskell, research phase 2: arxiv.org/abs/2103.06127. This time we're focusing on much improved developer experience. Linear type class constraints are the secret sauce.
English
4
27
80
0
Arnaud Spiwack
Arnaud Spiwack@aspiwack·
@Lowert @GMorrisett @tweagio I'd add that Linear Constraints builds up on Linear Haskell, which is a somewhat different system than Clamp. But I don't see any reason why we couldn't build the same on top of Clamp. Though I don't see what it would look like out of the top of my head.
English
2
0
0
0
0ch4rl3s.nfo
0ch4rl3s.nfo@acid2·
@Lowert I think I erased way too much information from my tweet, but got it working with gist.github.com/ocharles/351ad…. The problem was I originally had: DecodeNotNull :: Hasql.Value a -> HasqlDecoder a Yoneda to the rescue!
English
1
0
4
0
0ch4rl3s.nfo
0ch4rl3s.nfo@acid2·
I have a 'data Foo a = Foo ... (F a)', and data Foo a where MkFoo :: Bar x -> (Maybe x -> Either String a) -> Foo a Is all hope lost to think that I can coerce a 'Foo a' into a 'Foo b'? I want this because 'Foo' is part of a type class I want to use with GND.
English
1
1
1
0
Arnaud Spiwack
Arnaud Spiwack@aspiwack·
You know what? I'm starting to think that page limits on conference article don't encourage the healthiest writing habits.
English
1
1
9
0
Csongor Kiss
Csongor Kiss@Lowert·
@mattoflambda Great trick! With the next version of GHC (9 I think?) it will also be possible to write: gross :: forall {k} (a :: k) b. C a b => b -> String
English
0
0
2
0
Matt Parsons
Matt Parsons@mattoflambda·
Now, we can write: gross :: forall a b k. (KindOf k a, C a b) => b -> String And it works out fine!
English
1
0
6
0
Matt Parsons
Matt Parsons@mattoflambda·
You may have a class with a polykinded type index, and you want to use type-applications: class C (a :: k) b where gross_ :: b -> String Unfortunately, the explicit type of `gross_` is: gross_ :: forall k (a :: k) b. b -> String `k` must come before `a`.
English
1
0
3
0
Joe
Joe@alpha_convert·
I have a TA session tonight where I'm talking about unification. Usually would be fine, but this class has been using x/e substitution notation instead of e/x, and so I'm bound to mess it up and confuse everyone
English
4
0
9
0
Csongor Kiss
Csongor Kiss@Lowert·
@taylorfausak @googleson78 Ah. That's because you don't have PolyKinds turned on in your ghci session, so the kinds get defaulted to Type. Try `:set -XPolyKinds` first!
English
1
0
1
0
Taylor Fausak
Taylor Fausak@taylorfausak·
@Lowert @googleson78 Wait, hmm. This works without a type application: > class From a b where from :: Ambiguous a -> b > instance From Char Int where from = fromEnum > from ('a' :: Char) :: Int > -- 97
English
3
0
0
0
Taylor Fausak
Taylor Fausak@taylorfausak·
Is it possible to write a polymorphic Haskell function that *requires* a type application, even if it's not ambiguous? For example: > into :: forall b a . From a b => a -> b > yFun (into xVal) -- broke > yFun (into @‌Y xVal) -- woke
English
7
0
7
0