All the side effects were never mentioned to me
I am innocent of uncontrolled abuse
That’s odd. This latest episode is indeed not mentioned on there: https://feeds.buzzsprout.com/1817535.rss. I’d guess it is something on buzzsprout’s side.
The symbolic rewriting is interesting.
I do wonder what “modern-style” functional programming means.
Also their FAQ says:
But considering other FPLs like Haskell and ML, Pure’s library support isn’t bad
Clicking that link reveals a list of about 34 libraries. In comparison, Haskell’s current curated Stackage snapshot has 3340 packages in it (the total number of packages is probably more than 10x that). So, I think it is odd to claim its ecosystem is anywhere near Haskell’s.
Actually, if you combine network
with network-run
then it is the right level of abstraction:
{- cabal:
build-depends: base, network, network-run, monad-loops
-}
import Network.Run.TCP
import Network.Socket
import System.IO
import Control.Monad.Loops
main = runTCPServer (Just "127.0.0.1") "9999" talk where
talk s = do
h <- socketToHandle s ReadWriteMode
l <- hGetLine h
case words l of
["GET", resource, "HTTP/1.1"] -> do
whileM_ (("\r" /=) <$> hGetLine h) (pure ())
let path = concat
[ "htdocs/"
, dropWhile (== '/') resource
, if last resource == '/' then "index.html" else ""
]
hPutStr h "HTTP/1.1 200 OK\r\n\r\n"
hPutStr h =<< readFile path
hClose h
_ -> error "todo"
@kosmikus @mangoiv I’m not really the right person to ask, having spent exactly zero time in industry. But I can imagine most industrial users have little interest in the main ICFP program and the other co-hosted workshops. So hosting the event separately at a smaller venue for just two days could make it possible to substantially lower the fees (and individual accommodation costs) which naturally makes the event more accessible. And I expect that the fees are generally a bigger problem outside of academia, so it cater more to industrial users and hobbyists.
This was a fun episode. I was introduced to breadth first labeling and attribute grammars by Doaitse Swierstra at the Applied Functional Programming summer school in Utrecht. He was an inspiring figure.
The biggest disadvantage of circular programs is that it is very easy to get into infinite loops when you make mistakes. I wish there was an easy way to guarantee statically that circular programs are terminating (perhaps using types).
There is also a recent paper about implementing breadth-first traversals without relying on laziness: https://www.cs.ox.ac.uk/people/jeremy.gibbons/publications/traversals.pdf. Unfortunately, that does not contain any benchmarks.
Maybe the symposium should start catering more to industrial users, now that Haskell itself also seems to be moving more in that direction (e.g. more backwards compatibility). The symposium already allows experience reports and demos.
Sadly, it seems things are not going so well for the Symposium: https://discourse.haskell.org/t/rfc-changes-to-the-haskell-symposium/8359?u=jaror
I think Idris’ bang notation for performing effects in a do-block is pretty, it could look like this:
main = do putStrLn ("You said: " ++ !getLine)
Today, you’d have to come up with a new variable name or figure out the right combinator names:
main = do line <- getLine; putStrLn ("You said: " ++ line)
main = putStrLn . ("You said: " ++) =<< getLine
But unfortunately there are more complicated cases:
main = do print (True || !getLine == "foo")
In a strict language with built-in short-circuiting logical operations the getLine
would never be performed, but in Haskell ||
is just a normal function that happens to be lazy in its second argument. The only reasonable way to implement it seems to be to treat every function as if it was strict and always perform the getLine
:
main = do line <- getLine; print (True || line == "foo")
Do you think this is confusing? Or is the bang notation useful enough that you can live with these odd cases? I’m not very happy with this naive desugaring.
The changes seem pretty modest as the costs and drawbacks section also says. But I wouldn’t know how complicated it is to combine normal constraints with dependent types, let alone linear constraints.
Djot looks very cool: https://www.djot.net/.
It’s great to see windows TUI support so soon after the vty release! Especially since Windows users are not known for their fondness of command lines. I hope this has lowered one barrier to entry to Haskell and will give a more pleasant experience to many Windows users.
It’s still going strong. It’s a pretty unique language. I use it among many other hobbyists and academics. Some well known companies like GitHub, Meta, and Tesla and of course many smaller companies use it too. Why aren’t you using it?
There are so many options to work around type classes. As you say, we could be looser with our types and have one general number type that includes integers and floats. (And I don’t even think array indexing is much of a problem, it could just throw an error or automatically round to an integer.)
Another option is to just have separate number types with separate functions for addition and multiplication etc. For example OCaml has +
and +.
.
Perhaps more of a stepping stone towards full type classes would be a limited system where only a few pre-defined classes and instances exist. Then you’ll never run into the dreadful could not deduce Num (a -> b)
error message, but you can still use a nice overloaded +
for both Int
and Double
.
I’m not suggesting you should never explain type classes. I simply want to avoid having to explain type classes before I can explain how to add two integers. And more importantly, I don’t want error messages to mention type classes until they have been understood.
Type classes are a big cause of confusion among newcomers, and even parametric polymorphism.
If you want to see how simple a language can really get you should check out Hedy: https://www.hedycode.com/. It even removes string quotes (let alone variables) at the simplest level. Although it is too imperative for my taste.
Great point about Haskell seemingly becoming less and less easy to learn for beginners around 15:00. I hope some day we get a language levels system where you can start with a very simple subset and slowly expand to the full language.
Oh, I meant to just link the blog post directly: https://well-typed.com/blog/2023/10/ghc-activities-report-august-september-2023/
Ah, that’s interesting. Although I can imagine not many people would want to write code in that style. And I also wonder how many languages support higher rank polymorphism in the first place.
I disagree. Assembly languages for modern architectures are a complexity hell. You need books with thousands of pages to explain how they work. In comparison the lambda calculus is much simpler.