Live data from Hacker News

Simon Peyton Jones interview

haskell.foundation

31–40 of 49 posts

Re: Simon Peyton Jones interview

#31
post #12

Earlier quoted context omitted.

The usual argument is that purity and the type system help you write correct code and finance is a domain where correctness is important. The applications I’ve heard for Idris also have to do with finance (although not blockchain stuff).

Part of my confusion is also the social/community aspect, especially with Haskell hackers' frequent and negative attitude toward the enterprise, like Stephen Diehl who has become a sort of spokesperson for the "web3 is a farce (and worse)" narrative. It seems like such a stark juxtaposition, especially with SPJ and Lennart Augustsson, two research giants of the community, taking part in it in a serious capacity. (To…

I reckon SPJ is sufficiently "researchy" that it doesn't really matter how it's applied, it's the research that matters. Also, he seems perpetually delighted that he gets to do what he does, and is paid to do so.

He's one of my heroes, long may he lang

Re: Simon Peyton Jones interview

#32
post #3

Around 7:50 in Jones says this: “So, one of the great things about Haskell actually, that is spoken about and I think it’s the sort of killer app for Haskell, is that it’s so refactorable, right? You can do a heart or lung transplant on GHC and make truly major changes and the type checker just guides you to do all the right things.” Freely refactoring the code with worrying about unit tests, etc seems quite appealin…

> You can do a heart or lung transplant on GHC and make truly major changes and the type checker just guides you to do all the right things. I thought GHC was famously a nightmare to work in? > GHC is not exemplary of good large scale system design in a pure function language. Rather ironically, it violates the properties that draw people to functional programming in the first place: immutability, modularity, and com…

> I thought GHC was famously a nightmare to work in?

That's not my experience. I did small changes in GHC when I had less then 6 months of Haskell experience. I felt the code was pretty straightforward.

Re: Simon Peyton Jones interview

#33
post #18

Earlier quoted context omitted.

> Because side effects are controlled, you are forced by the type checker to handle runtime errors (or crash). This is generally true in idiomatic Haskell code, but in fact even pure functions in Haskell can throw runtime exceptions, and you are not forced to handle these.

correct me if I'm wrong, but can't you add a compiler flag to prohibit using functions that can panic like "error" and "head"? aside from that, you'd just need to worry about OOMs and faults in native code.

I guess that would be nice, but no, I’ve never heard of anything like that.

“error” is simply bottom. Bottom is an inhabitant of every Haskell type. There’s no straightforward way to just turn it off.

Re: Simon Peyton Jones interview

#34
Any tips on other professors like SPJ? He seems like a super human even after the 10 years Ive followed him. Never angry, always happy, always engaged, always teaching things with depth, not dumbing things down to make it easier, not pandering…

Re: Simon Peyton Jones interview

#35

Earlier quoted context omitted.

I guess I wonder if it's easy to refactor then why haven't people done it when they added things in the past?

I don't know. But - and this is my interpretation, not some summary of another talk - it sounds like Simon Peyton Jones, who is one of the people who are responsible for the poor state of the code, already answered that: "The difficult stuff is envisioning and being very clear about what you’re trying to do." Presumably, wherever his skills lie, they don't lie in envisioning a better state and refactoring the code to…

> Presumably, wherever his skills lie, they don't lie in envisioning a better state

This is possibly the single best example ever of how Computer Scientist and Software Engineer are different jobs with different skill sets.

Re: Simon Peyton Jones interview

#36

Earlier quoted context omitted.

> You can do a heart or lung transplant on GHC and make truly major changes and the type checker just guides you to do all the right things. I thought GHC was famously a nightmare to work in? > GHC is not exemplary of good large scale system design in a pure function language. Rather ironically, it violates the properties that draw people to functional programming in the first place: immutability, modularity, and com…

I guess that's two different things. One person says "You can give GHC a heart transplant" and the other says "GHC needs a heart transplant: Here is our proposal". In fact, the very text you quote as saying GHC was famously a nightmare says: > On the bright side, GHC is written in Haskell, and this language is particularly well suited to performing massive refactorings with confidence that nothing breaks. Thus, it sh…

Hi coauthor here!

Work has been steady the master project plan is tracked in this ticket: https://gitlab.haskell.org/ghc/ghc/-/issues/17957

Almost all the recent work has been performed by Dominik Peteler (@mmhat) during Google summer of code, which John supervised. We've primarily been focused on landing !8341[0] which makes huge strides in Core w.r.t. modularity (see https://gitlab.haskell.org/ghc/ghc/-/issues/21872), but are on hold until schedules agree and some vacations end.

So the modularity project is far from dead. In fact Sylvain and I are planning on returning to it after we upstream the new Javascript backend (slated for 9.6, see MR!9133[1], tracking ticket[2]) hopefully this week.

PS: That patch is actually a good example of a gnarly lung transplant for GHC's Core IR (and done by a new contributor!).

[0]: https://gitlab.haskell.org/ghc/ghc/-/merge_requests/8341

[1]: https://gitlab.haskell.org/ghc/ghc/-/merge_requests/9133

[2]: https://gitlab.haskell.org/ghc/ghc/-/issues/21078

Re: Simon Peyton Jones interview

#37

Why is Haskell, a comparatively obscure language (to Python, C++, etc.), so popular with topics in the orbit of "web3" (blockchain, crypto, metaverse, etc.)?

I think I operate in those orbits, but I haven't come across much Haskell (plenty of TS, Golang, Rust). Where Haskell has cropped up it was typically in the context of "we want to prove this code is correct" (plausibly important if money is being transacted), plus a bit of "we like Haskell so we used it".

Re: Simon Peyton Jones interview

#38

Why is Haskell, a comparatively obscure language (to Python, C++, etc.), so popular with topics in the orbit of "web3" (blockchain, crypto, metaverse, etc.)?

Mainly because using monadic I/O trivially encourages you to write pure (deterministic) code for most of your programs, which makes it easy to write tests for them. Besides that, it's easy to write great libraries, which then makes the language very expressive. The downside is that the cognitive load for using it can be very high, but looking at C++ it seems clear that high cognitive loads are a feature across the industry, and here to stay.

Re: Simon Peyton Jones interview

#39
post #3

Around 7:50 in Jones says this: “So, one of the great things about Haskell actually, that is spoken about and I think it’s the sort of killer app for Haskell, is that it’s so refactorable, right? You can do a heart or lung transplant on GHC and make truly major changes and the type checker just guides you to do all the right things.” Freely refactoring the code with worrying about unit tests, etc seems quite appealin…

Could someone explain why refactoring is so much easier in functional languages?

Perhaps it is easier because Peyton Jones is a world class expert in Haskell and have 30 years experience refactoring it?

In my experience the ease of refactoring is more depending on the quality of the code you are refactoring than the language. That said, a strong type system helps avoiding stupid mistakes and Haskell have a very strong type system.

Re: Simon Peyton Jones interview

#40
post #39

Earlier quoted context omitted.

Could someone explain why refactoring is so much easier in functional languages?

Perhaps it is easier because Peyton Jones is a world class expert in Haskell and have 30 years experience refactoring it? In my experience the ease of refactoring is more depending on the quality of the code you are refactoring than the language. That said, a strong type system helps avoiding stupid mistakes and Haskell have a very strong type system.

I guess it is a bit if both. You can of course write fast and loose Haskell code, but best practices will probably prevent you from doing that.
Post reply on HN