Edward Kmett

13.5K posts

Edward Kmett banner
Edward Kmett

Edward Kmett

@kmett

Founder/Chief Scientist @Positron_AI Haskell, category theory, AI, and safety. https://t.co/wYaTDISbEB https://t.co/XwbnuaOUzq 🦋 @kmett.ai

Here, Now Katılım Ekim 2008
817 Takip Edilen16.7K Takipçiler
Sabitlenmiş Tweet
Edward Kmett
Edward Kmett@kmett·
Given a choice between two things, I always try to do the one that nobody will believe me about later.
English
10
31
327
0
Edward Kmett
Edward Kmett@kmett·
I'd be hard-pressed to write something to pass that much of the GCC test suite. There's just _so_ many corners, but really that is more about the ability of a human to stay on task for that long, than difficulty per se. Two person years to get to the state it is in is actually pretty fair. If I were running a company and that was what we were doing, I'd probably have to devote significantly more of a team to it to have confidence in success, and really I _wouldn't sign up for the task_. Writing a compiler greenfield from X to Y where you can get benefits from a 80% solution is one thing. A couple of weeks can get you a prototype very fast. I've done this lots of times. But writing one that has to match another system's behavior is madenning stuff. Doing so with the equivalent of a team in an isolated black room without internet access starts to become implausibly difficult. This is in part just because there isn't a developer good enough to do it that you could corral into doing this thankless task for that long. They all have way more efficient ways to spend the next two years of their life!
English
0
0
8
227
Name can't be blank
Name can't be blank@Algon_33·
@ajeya_cotra That's probably an overestimate? Like, this isn't an optimized compiler. But instead of speculating, let's tag in someone who would know how much of a speedup over baseline the 50 human hour estimate for making a compiler with claude code represents. @kmett, can you weigh in?
English
1
0
10
467
Ajeya Cotra
Ajeya Cotra@ajeya_cotra·
Update: looks like Carlini spent ~50-ish hours of work specific to this project. Someone told me writing a compiler like this is >= 2 person-years without an LLM (!), so if he spent ~50 person-hours that's an uplift of 2 * 2000 / 50 = 80x or more on this project.
Daniel Ziegler@d_m_ziegler

@ajeya_cotra So that's ~50 hours of work specific to this project; it's hard to say how long it would take unassisted but I'd guess months at least.

English
6
4
144
32.8K
Edward Kmett retweetledi
the tiny corp
the tiny corp@__tinygrad__·
This is one of the better AI chip companies, it's like if @Etched were real. It's sad they have "Contact Sales" where a price should be, but their coming Asimov chip makes the correct tradeoffs for low cost transformer inference, and I trust they can tape it out.
Thomas Sohmers@trsohmers

Excited to announce today that my startup, @positron_ai, has closed a $230M Series B financing round at an over $1B valuation, co-led by great folks at @jumptrading, Arena, Unless Ventures, and strategic backing by @Arm! bloomberg.com/news/articles/…

English
6
4
207
33.8K
Edward Kmett
Edward Kmett@kmett·
Haskell is quite useful whenever you need to manipulate syntax trees, shake-style builds make complex cross-language integrations easier when CMake/Cargo aren't quite up to snuff, nix provides reproducible distributed builds. Not everything is Haskellified, but it helps, and a good cross-section of the team being Haskell literate is a nice edge, allowing us to reach for it as a power tool whenever it is appropriate.
English
1
0
1
61
Stewart Hu
Stewart Hu@stewarthu·
@kmett Nice. Just curious, how does Haskell fit into your business ?
English
1
0
1
33
Edward Kmett
Edward Kmett@kmett·
Positron has raised $230M in our Series B! We're eagerly gearing up for the challenges ahead, and yes, we ARE hiring! Actual humans, in Haskell and hardware roles, remote friendly. Feel free to reach out to me. eetimes.com/positron-230-m…
English
5
6
58
4.8K
Edward Kmett
Edward Kmett@kmett·
Hello, people of POPL! I’ll be around all week. Don’t be afraid to DM me if you’d like to talk!
English
1
0
11
1.8K
Edward Kmett
Edward Kmett@kmett·
@qd_forall @liron I think he's bounced back well since then, but that interview felt very raw and in the moment.
English
0
0
0
61
Ole Q Doc
Ole Q Doc@qd_forall·
@kmett @liron i haven't checked his in depth takes, but some quick takes of his i've seen make it look like he's handling the situation rather well! compared to e.g. chomsky, i'm not seeing a lot of cope!
English
1
0
0
66
Liron Shapira
Liron Shapira@liron·
Hofstadter hypothesizing about consciousness in the '70s: > A system being aware of itself is evidently in a kind of strange loop, possessing that shimmering ineffable quality which lies at the intersection of Bach's 𝘊𝘳𝘢𝘣 𝘊𝘢𝘯𝘰𝘯 and Escher's 𝘋𝘳𝘢𝘸𝘪𝘯𝘨 𝘏𝘢𝘯𝘥𝘴. LLM churning out situational awareness in the '20s: > Hey there, not much. I'm here talking to you, in my data center, running my trained LLM. You're at your computer typing at me, thinking about how I work and what consciousness is. Pixels are being colored on your phone or laptop screen to render the user interface of my app or website with my words inside. What else is on your mind?
English
2
0
8
2.1K
Edward Kmett
Edward Kmett@kmett·
Started a Champions campaign for my wife and some friends. Apparently the biggest star of the show was a throwaway background character. Meet Chicago Jesus. youtube.com/watch?v=vPpn4K…
YouTube video
YouTube
English
0
0
5
2.2K
Edward Kmett
Edward Kmett@kmett·
It is a catamorphism variant. Consider newtype Fix f = In { out :: f (Fix f) } cata :: Functor f => (f a -> a) -> Fix f -> a cata f = f . fmap (cata f) . out A catamorphism is a way to fold over a recursively defined container, one layer at a time. Aka a 'fold'. But let's say you need access to all the stuff at one time. you could basically give access to a copy of the structure. para :: Functor f => f ((Fix f, a) -> a) -> Fix f -> a But there's nothing all that special about Fix f here. Maybe you have your own special form of fixed point you want to use. e.g. say you're working with [a] and you want to take data ListF a b = Nil | Cons a b as the base functor for [a]. Then you might use zygo :: Functor f => (f b -> b) -> (f (b, a) -> a) -> Fix f -> a to let you 'roll your own Fix f' for the recursion helper. zygo then is literally the only sensible thing that typechecks and is left as an exercise for the reader, but with it you can of course define para = zygo In comonad.com/reader/2009/re… is an ancient article I wrote on the topic back before google abandoned the concept of 'knols'. The main thing I did with that part of category-extras, the part that became the recursion-schemes library, was show that the common recursion schemes all arose from the use of different monads/monad transformers and comonads/comonad transformers and that you could use a compositional vocabulary based on distributive laws for them to implement everything. e.g. we can just sort of generalize a catamorphism to allow for the use of a comonad of your choice. g_cata :: (Functor f, Comonad w) => (forall a. f (w a) -> w (f a)) -> (f (w a) -> a) -> Fix f -> a g_cata k g = extract . c where c = liftW g . k . fmap (duplicate . c) . out Then observe that zygo is really just the instantiation of that with an appropriate distributive law for (,) b over an arbitrary functor f. This led to a more compositional vocabulary for recursion schemes than what had come before. zygo, histo, para, prepro, etc. were already in circulation through various students of Lambert Meertens and folks who realy liked Richard Bird's squiggol formalism. But this let me break out the 'zygohistomorphic prepromorphism'. wiki.haskell.org/index.php?titl… Since then Nicholas Wu, Ralf Hinze, and Jeremy Gibbons pointed out that what was _really_ wanted was an adjunction. Not a distributive law or monads/comonads. This led to papers like cs.ox.ac.uk/people/nicolas… and in particular this lets you talk about a couple of other morphism types 'mutu' etc. that couldn't be said in the vocabulary above, because those adjunctions don't run necessarily go from Hask to Hask. But in Haskell back in 2008 when I wrote that code up, that was just a little bit beyond what we could properly express! I hope that helps.
English
0
0
4
180
Dmitrii Kovanikov
Dmitrii Kovanikov@ChShersh·
I miss the version of my brain that could understand this
Dmitrii Kovanikov tweet media
English
13
1
83
6.1K
Edward Kmett
Edward Kmett@kmett·
There's two reasons: In almost all of those cases you'd have to do a 'two pass' algorithm when using the other encoding, one to map, then the other to apply this operation. And it is a worse model for the theoretical justification, which is day convolution, which works even in monoidal settings where that -> is well defined even for a monoidal category. The fact that the f a -> f a -> f a version works at all is fundamentally leaning on Cartesian-ness and pushes bad intuition about the purpose of division (admittedly conquer not requiring (a -> ()) leans a bit on "Cartesianness" too!) The latter issue is a moot point because this isn't generalized over all possible categories and is of course tied to Hask, but the first one was enough to push me to this implementation. In practice I often want to use it with the sum/product from GHC.Generics though, so I get forced back into two passes!
English
1
0
4
121
Arnaud Spiwack
Arnaud Spiwack@aspiwack·
@kmett quick question: did you realise, when you designed the Divisible class that an equivalent presentation could have been divide' :: f a -> f a -> f a conquer :: f a If so, why did you prefer the presentation with divide :: (a -> (b, c)) -> f b -> f c -> f a ?
English
2
0
3
134
Edward Kmett
Edward Kmett@kmett·
@EChatav In the immortal words of Moulin Rouge, "everybody can Kan."
English
0
0
2
63
Eitan Chatav
Eitan Chatav@EChatav·
It doesn't feel like I'm reaching for the moon when programming unless I incur a dependency on @kmett's kan-extensions.
GIF
English
1
0
2
149
Edward Kmett
Edward Kmett@kmett·
That only carries you so far. Eventually you need _some_ information from yur object. Unfortunately the language then drives you to things like extra costly *pImpl indirection patterns and the like. Without those tricks details about the class's fields still go in the header, and their size is part of the computational content consumers not only get to but have to know about the class.
English
0
0
0
36
Rex Bloom
Rex Bloom@GenuineRex·
int getRate(RateTable& rateTable, int balance) { // hidden from everyone - this is my pure function.. return 1; } int TMyClass::calculateInterest(int balance, RateTable &rateTable) { int rate = getRate(rateTable, balance); } Hide things in c++ the way we hide in JavaScript. Not everything has to be part of the class - there are good reasons to make pure functions that are outside the class, in fact.
English
2
0
1
737
Dmitrii Kovanikov
Dmitrii Kovanikov@ChShersh·
Private methods being part of the interface is the worst part of OOP. They’re internal implementation details. I should NEVER see them. I should NEVER test them. NOBODY except the object should use them. OOP says it’s about encapsulation. Yet, it’s discouraged.
English
72
4
249
22.6K
Edward Kmett
Edward Kmett@kmett·
That can be a handy trick. #L33" target="_blank" rel="nofollow noopener">github.com/ekmett/linear-… and #L39" target="_blank" rel="nofollow noopener">github.com/ekmett/linear-… give examples of two different ways to construct this that I use a fair bit, the linear-logic De Morgan'd version like you used, and the Heyting style version of things, depending on how much structure I want/need to get when looking at the type of refutations. Maybe a cleaner analogue to what you are doing is how doing field access is like supplying a variant full of continuations to cancel a record full of values, while case analysis is using a record full of continuations to cancel a variant full of values.
English
0
0
5
301
Vanessa McHale
Vanessa McHale@vamchale·
Pattern matches should be typed inspired by linear logic’s & (“with”). Especially striking in stack-based, concatenative languages. Munch-Maccagnoni noted this in 2009 but doesn’t seem to have percolated up to functional programming language implementers vmchale.github.io/pizarnik/inv.h…
Vanessa McHale tweet media
English
8
22
191
12.1K
Edward Kmett
Edward Kmett@kmett·
@satnam6502 *First checks that the island can get fiber to the castle* Looks like I'm in!
English
2
0
3
270
Satnam Singh
Satnam Singh@satnam6502·
@kmett It's a quarter of the price of my Cambridge house and it has a roof. So at first glance, EXCELLENT. Are you in?
English
3
0
11
1.1K