HackerTube
HomeLongsLikedHistoryWatch laterCategoriesPlaylistsSettings

Edwin Brady - Idris 2: Type-driven development of Idris | Code Mesh LDN 18

Code Sync5 HN recommenders · recommended in 4 months, 2018-2024
YouTube
20K views · 7 years ago · talk · dated

Edwin Brady presents Idris 2, a rewrite of the Idris dependently typed language, and shows type-driven development in practice. The demos show the compiler filling in whole functions from their types.

HN points to it as a good introduction to Idris 2 and a striking demonstration of what dependent types enable.

Programming language designFunctional programmingLogic & formal methods#idris#type-drivendevelopment#dependenttypes#programsynthesis#functionalprogramming

11 comments from Hacker News

@dietr1ch2024 · in “What would it take to add refinement types to Rust?”

Refinements embed a predicate that elements of the new type must pass. def Nat = Int: (|x| -> x >= 0) Dependent types allow types to be computed from functions (and depend on arguments, otherwise it seems they become just weird constants), def Five(as_type: String) -> NumericType(as_type): match as_type: "string" => "five" "int" => 5 "float" => 5.0f "double" => 5.0d _ => panic() // Unnecessary if you refine `as_type` from a String to an enum or a fixed set of strings. Dependent types seem weird, but they help making types first-class ( ▶ this video ) and gaining types like `Array<T, N>` that allow ensuring things are the right length, and define append/extend properly.

CitesView on HN
@jbjohns2024 · in “Hazel: A live functional programming environment featuring typed holes”

Interesting. I didn't notice any reference to Idris [1] but that was the first place I saw this style of development. [1] ▶ this video

CitesView on HN
@sourceless2021 · in “What will programming look like in 2020? (2012)”

I don't know, some of that is at least starting to happen with Idris 2, though not in the exact way predicted: ▶ this video (Type Driven Development with Idris 2) Short summary of linked video: when your type system is powerful enough you can restrict the set of possible implementations to the point that the compiler can make a decent guess as to what the program should be to satisfy the type signature.

RecommendsView on HN
@still_grokking2021 · in “Fun and dystopia with AI-based code generation using GPT-J-6B”

You don't need the tests. You need only the types. And especially you don't need "artificial dumbness", which does not understand code, and therefore won't produce correct results, but just an advanced programming language. Say hello to Idris! :-) ▶ this video

RecommendsView on HN
@T-R2019 · in “Modern SAT solvers: fast, neat and underused”

SAT solvers are starting to be used as tooling for functional languages - Liquid Haskell uses one for refinement types[1], and Djinn uses one for suggesting functions given a type[2]. Similarly to Djinn, Edwin Brady gave a presentation on using an SMT solver to do live code suggestions/implementation inference in the successor to Idris[3]. [1] link [2] link [3] ▶ this video

CitesView on HN
@resoluteteeth2019 · in “Idris 2 programming language announced”

Until yesterday it was officially called "Blodwen" a "prototype successor to Idris", so I assume the fact that it's now officially being called a "pre-alpha implementation of Idris 2" means it's somewhat closer to being ready, but is there some specific announcement about the exact significance of it being officially called Idris 2 now? Edit: Never mind, I found the official announcement on the Idris mailing list: link He says "No doubt I'll say more about this over the next few weeks," so it sounds like he's planning on making a more detailed announcement later. Edit 2: Also, as someone who hasn't been following Blodwen or how it's different from Idris 1, this looks like a good introduction: ▶ this video

RecommendsView on HN
@pezo19192019 · in “Ask HN: What is your favorite non-generic or semi-obscure programming language?”

Idris lang seems awesome with the atom plugin. :) Did not use it yet but I hope it will get more attention. ▶ this video

RecommendsView on HN
@rossng2019 · in “What I Want from a Type System (2016)”

Hoogle is pretty nice, and few other languages had an equivalent until quite recently. I'm hopeful that cool type-powered IDE features will start to arrive once haskell-ide-engine is a bit more stable. It's getting there! There are some pretty awesome IDE ideas in Haskell-ish languages like Idris [1], too. There is some movement towards dependent types in Haskell, so it might get similar features one day. [1] ▶ this video

CitesView on HN
@nathcd2019 · in “Compiling Knowledge into Probabilistic Models”

> In the general-purpose programming context, imagine if you could give examples of a program output (domain data) along with a skeleton of a program (source file with incomplete parts) and ask a system to fill in the holes. This part reminds me of some of capabilities of the Idris compiler [1]. In an Idris program you can leave "holes" to stand in for incomplete parts of a program [2], and the compiler can infer various bits of code from types and holes. In a demo of the in-progress Idris 2 compiler [3], Edwin Brady refers to it as a "lab assistant" and shows it writing a whole function when given a function type. [1] link [2] link [3] ▶ this video

CitesView on HN
@Jeff_Brown2019 · in “Reltron: a GUI for exploring relational databases”

I agree about its availability. I think it's far more useful than you seem to, though. Reducing the problem space is huge. It's why macro programming (ala Lisp) is so dangerous. It's why I left Haskell for Python, and why I often wish I was using Idris[1], which pretty much reads your mind and writes what you meant. It's true of coding generally, but SQL programming especially, that there's a conceptually obvious, small space of reasonable programs, but because we're writing in text, we're free to roam over an enormous superspace of (occasionally) wrong or (usually) meaningless programs. [1] ▶ this video

CitesView on HN
@huntie2018 · in “Dependent Haskell”

Dependent types are types which depend on values. As an example, think of the cons procedure: (List A, A) -> List A. It takes a List of A's and an A and returns a List of A's. With dependent types you can write this as (List n A, A) -> List n+1 A. This tells us that cons takes a List of A's with length n and an A returns a List of A's with length n+1. Edwin Brady shows off some examples in Idris here[1]. I thought the matrix example was really impressive. [1] ▶ this video

RecommendsView on HN
Edwin Brady - Idris 2 - Type-driven Development of Idris40:39

Edwin Brady - Idris 2 - Type-driven Development of Idris

Curry On!
19K views • 7 years ago
Type-Driven Development in Idris — Edwin Brady46:36

Type-Driven Development in Idris — Edwin Brady

Scala World
26K views • 11 years ago
"A Little Taste of Dependent Types" by David Christiansen38:36

"A Little Taste of Dependent Types" by David Christiansen

Strange Loop Conference
48K views • 8 years ago
Domain Modeling Made Functional - Scott Wlaschin - KanDDDinsky 201950:49

Domain Modeling Made Functional - Scott Wlaschin - KanDDDinsky 2019

KanDDDinsky
74K views • 6 years ago
Bringing Types to Elixir by Giuseppe Castagna and Guillaume Duboc | ElixirConf EU 202340:15

Bringing Types to Elixir by Giuseppe Castagna and Guillaume Duboc | ElixirConf EU 2023

Code Sync
7K views • 3 years ago
"Type-Driven Program Synthesis" by Nadia Polikarpova39:40

"Type-Driven Program Synthesis" by Nadia Polikarpova

Strange Loop Conference
15K views • 8 years ago
Effective ML1:09:24

Effective ML

Jane Street
30K views • 10 years ago
Philip Wadler  - Propositions as Types (Lambda Days 2016)56:58

Philip Wadler - Propositions as Types (Lambda Days 2016)

Erlang Solutions
20K views • 10 years ago
Edward Kmett - Type Classes vs. the World1:42:53

Edward Kmett - Type Classes vs. the World

Boston Haskell
36K views • 11 years ago
The Algebra of Algebraic Data Types1:04:35

The Algebra of Algebraic Data Types

London Haskell
27K views • 13 years ago
ElixirConf 2023 - José Valim - The foundations of the Elixir type system1:11:42

ElixirConf 2023 - José Valim - The foundations of the Elixir type system

ElixirConf
38K views • 3 years ago
Effective Programs - 10 Years of Clojure - Rich Hickey1:14:52

Effective Programs - 10 Years of Clojure - Rich Hickey

ClojureTV
176K views • 9 years ago
Over the Shoulder 1 - Text Preprocessing in Forth1:06:26

Over the Shoulder 1 - Text Preprocessing in Forth

Andreas Wagner
25K views • 12 years ago
Clojure for Lisp Programmers Part 1 - Rich Hickey1:28:59

Clojure for Lisp Programmers Part 1 - Rich Hickey

ClojureTV
25K views • 13 years ago
The Next Five Years of ClojureScript - David Nolen1:00:58

The Next Five Years of ClojureScript - David Nolen

Metosin
19K views • 10 years ago
Adventure with Types in Haskell - Simon Peyton Jones (Lecture 1)1:33:37

Adventure with Types in Haskell - Simon Peyton Jones (Lecture 1)

jasonofthel33t
69K views • 12 years ago
Practical Common Lisp1:12:10

Practical Common Lisp

Google TechTalks
98K views • 19 years ago
Domain Modeling Made Functional - Scott Wlaschin51:40

Domain Modeling Made Functional - Scott Wlaschin

NDC Conferences
71K views • 9 years ago
Simon Peyton-Jones: Escape from the ivory tower: the Haskell journey1:04:16

Simon Peyton-Jones: Escape from the ivory tower: the Haskell journey

Churchill College, University of Cambridge
170K views • 9 years ago
Clojure in a nutshell by James Trunk32:44

Clojure in a nutshell by James Trunk

Func Prog Sweden
104K views • 5 years ago