Skip to content
0:00 / 0:00

#idris#dependenttypes#type-drivendevelopment

Type-Driven Development in Idris — Edwin Brady

Scala World

5.9K subscribers • 8 videos on Hallway

YouTube
  • Recommended by 2 people: 1 on Hacker News and 1 on Lobsters.
  • A classic. People kept recommending it from 2016 to 2023.
  • Presented by Edwin Brady, creator of Idris

Advanced. Deep dive for people who know the field.

25K views11 years ago2 recommendations

Programming languagesComputer scienceLanguage design and type systemsFunctional programmingComputation and complexity

Edwin Brady demonstrates how to use Idris's dependent types and interactive editing with typed holes to design and verify software.

Idris is a general purpose pure functional programming language with dependent types. In Idris, types are a first class language construct, meaning that they can be manipulated and computed like any other language construct. It encourages a type-driven style of development, in which programmers give types first and use interactive editing tools to derive programs. Introductory examples typically involve length-preserving operations on lists, or ordering invariants on sorting. Realistically, though, programming is not so simple: programs interact with users, communicate over networks, manipulate state, deal with erroneous input, and so on. In this talk I will show how advanced type systems allow us to express such interactions precisely, and how they support verification of stateful systems as a result. The talk will include several examples, leading to a verified implementation of a word game (Hangman). I will show how Type-driven Development allows programmers to specify the game rules in a direct and concise style, and how it leads to an implementation, guaranteed to correctly follow the rules by typechecking.

Why it's here

2 people recommend this, 1 disputes it

What people say. Engineers point to this talk as a prime demonstration of interactive type-driven development and the power of dependent types.

copyon Lobsters • Recommends

Type-Driven Development in Idris — Edwin Brady

still_grokkingon Hacker News • Recommends

On “C++ at the End of 2022”

> Basically, your IDE writes more of the code for you. I think this was, in general, a dead end in language research for various reasons, … I think language researchers would strongly disagree. Something like that is likely the future of programming! For example: link to this video From the video description: > In Idris, types are a first class language construct, meaning that they can be manipulated and computed like any other language construct. It encourages a type-driven style of development, in which programmers give types first and use interactive editing tools to derive programs.

vlaaadon Hacker News • Disputes

On “In Further Praise of Dependent Types”

Damn, this area of programming sounds very interesting, but I'm so so lost in these type compositions... Is it this Idris video you are talking about? link to this video I'm already having troubles following it after 8 lines of type definitions, while matrix transposition in the language of my choice is just `#(apply mapv vector %)` Sorry, I'm not trying to be dismissive, I just want the ergonomics of expressing my intentions to the computer be free of all this boilerplate while leaving compiler a possibility to give me some useful feedback when something might be wrong, are we really not there yet or are there languages aiming to make dependent types practical? You mentioned Coq, but I'm still not bei…

programming-talkscurated list on GitHubMentions

Under “Idris”

Type-Driven Development in Idris 00:46:35 by **Edwin Brady** (2015)

mrgriffinon Hacker News • Mentions

On “Type inference has usability problems”

Not OP, but my understanding is that it's a common approach in Idris. Here's the creator of the language deriving the implementation of zipWith without writing any code: link to this video Some other examples include: - Haskell: link - Scala: link - Agda: link I was under the impression that justDoIt comes from Scala, but I can't find a reference for that.

nequoon Hacker News • Mentions

On “Type-Signature.com”

Thinking in types and type relations sounds to me like Rule 5 taken to its logical conclusion. Types are your data structures, and they guide how you write your functions. Agda1 and Idris2 turn this idea into interactive editing with typed holes. You put a "?" in the code and the compiler fills the hole in for you based on the type that it infers for it. Haskell has a less expressive type system but it also has typed holes and Wingman3 extends the Haskell Language Server to use them for interactive editing. 1 link 2 link to this video 3 link

dietr1chon Hacker News • Mentions

On “Hazel: A live functional programming environment featuring typed holes”

Brady has a presentation about Idris where he shows Type-Driven development (where you write code that could typecheck with some holes and you get the compiler to help you figure out the missing types for your "whatever/something" untyped variables) link to this video

u/sullyj3in r/ProgrammingLanguages • Mentions

On “What's a good general-purpose programming language?”

Some languages allow you to manipulate types as values. This is used to prove various properties about your program (for example, proving that a list is never indexed out of range) Here's relevant talk on the Idris programming language link to this video