Live data from Hacker News

The Little Typer

mitpress.mit.edu

31–40 of 138 posts

Re: The Little Typer

#31
post #27

Sad to say the book isn't on Library Genesis, so you'll have to drop $40 if you want the knowledge. http://libgen.io/search.php?req=little+typer Also Library Genesis is amazing: http://libgen.io/search.php?req=knuth It's everything I dreamed of when I was a kid. I used to spend hours at the local library scouring through crummy "Learn C++ in 24 hours" type books. http://custodians.online/ is worth a read too.

Seems like libgen is blocked in the UK. I get redirected to http://www.ukispcourtorders.co.uk/

http://gen.lib.rus.ec/ seems to work fine

Re: The Little Typer

#32

Sad to say the book isn't on Library Genesis, so you'll have to drop $40 if you want the knowledge. http://libgen.io/search.php?req=little+typer Also Library Genesis is amazing: http://libgen.io/search.php?req=knuth It's everything I dreamed of when I was a kid. I used to spend hours at the local library scouring through crummy "Learn C++ in 24 hours" type books. http://custodians.online/ is worth a read too.

The knowledge is freely available, here's Dan Licata giving an introduction to Dependent Types for functional programmers https://youtu.be/LXvP1A97oAM

Even though watching that, I probably think I understand Dependent Types then I'll read the Little Typer and discover my intuition was wrong like when I read the Seasoned Schemer and thought I already knew everything there was to know about the concept of higher order functions.

Re: The Little Typer

#33

Is there a reason dependent types are not more common?

They can make libraries a pain. Like imagine if someone write a library in C#2025 with dependent types where functions took parameters like [i: i%2 == 0] or whatever. And your big project has no existing dependent types. There's no way to adopt this library unless you pull dependent types all the way in.

Or even if you did, but your types were [i: i%4 == 0] or [i: (i+1)%2 == 1] or whatever, you'd have to write proofs that they types were compatible. Even some simple things are just not worth it.

Re: The Little Typer

#34
post #18
post #12

Earlier quoted context omitted.

My guess is because OP has been burned by the "LEARN THIS NEW THING, IT'S REALLY COOL AND POWERFUL AND ALL OF THE COOL KIDS ARE DOING IT (and oh by the way many of the simple things you do all the time are incredibly inconvenient...)" narrative one too many times. Adopting something purely on it's merits is a bad idea, but nobody ever writes the book about a language/paradigm's downsides. I'm pretty sure that was the…

nobody ever writes the book about a language/paradigm's downsides Indeed. One can argue that books like "optimizing X" or "secure X" are about ways to easily write slow or insecure code in X, but this is somewhat narrow. Is there never enough demand for a broader book on downsides of X?

Bertrand Meyer's book on Eiffel was all about the downsides of C++.

And then there's the Unix-Hater's Handbook...

https://en.wikipedia.org/wiki/The_Unix-Haters_Handbook

I wrote a whole chapter about the downsides of X -- do you think there's a need for a broader book? ;)

https://medium.com/@donhopkins/the-x-windows-disaster-128d39...

Re: The Little Typer

#35

Sad to say the book isn't on Library Genesis, so you'll have to drop $40 if you want the knowledge. http://libgen.io/search.php?req=little+typer Also Library Genesis is amazing: http://libgen.io/search.php?req=knuth It's everything I dreamed of when I was a kid. I used to spend hours at the local library scouring through crummy "Learn C++ in 24 hours" type books. http://custodians.online/ is worth a read too.

It'll happen.

Re: The Little Typer

#36

Sad to say the book isn't on Library Genesis, so you'll have to drop $40 if you want the knowledge. http://libgen.io/search.php?req=little+typer Also Library Genesis is amazing: http://libgen.io/search.php?req=knuth It's everything I dreamed of when I was a kid. I used to spend hours at the local library scouring through crummy "Learn C++ in 24 hours" type books. http://custodians.online/ is worth a read too.

The book didn't materialize from thin air, the authors are even named on its cover.

Re: The Little Typer

#37

I know that typescript doesn't have advanced types, but can a book like this be adapted to use typescript ?

This book does not talk about static typing, but about dependent types. Dependent types are more powerful and expressive than simple types because they convey more information. For example you could have [Int] to represent a list of numbers, but you could also have [x: Int, x > 20 && x < 50]. Or you could have an ordered array and know this fact by the type associated to the array. Moreover, you need to use a theorem…

So dependent types aren't static?

How does Idris solve this problem when compiling to JavaScript?

Re: The Little Typer

#38

Is there a reason dependent types are not more common?

Wondered that myself. It’s surprising there’s not more languages with dependent types (and the associated requisite libraries).

I suspect it’s taken a while for the theory behind dependent types to become widespread enough for some enterprising hacker or grad student to make a useable language for them (e.g. Idris). Even if a new theory comes along it takes time for appropriate metaphors and methods of using them to be created and disseminated.

Though does computing the dependent types at compile time take more process.

Re: The Little Typer

#39

Sad to say the book isn't on Library Genesis, so you'll have to drop $40 if you want the knowledge. http://libgen.io/search.php?req=little+typer Also Library Genesis is amazing: http://libgen.io/search.php?req=knuth It's everything I dreamed of when I was a kid. I used to spend hours at the local library scouring through crummy "Learn C++ in 24 hours" type books. http://custodians.online/ is worth a read too.

[deleted]

Re: The Little Typer

#40
post #37

Earlier quoted context omitted.

This book does not talk about static typing, but about dependent types. Dependent types are more powerful and expressive than simple types because they convey more information. For example you could have [Int] to represent a list of numbers, but you could also have [x: Int, x > 20 && x < 50]. Or you could have an ordered array and know this fact by the type associated to the array. Moreover, you need to use a theorem…

So dependent types aren't static? How does Idris solve this problem when compiling to JavaScript?

Dependent types are static. GP was trying to say that this book is about more than just normal static typing (of the kind that TypeScript adds to JavaScript).

There is no problem compiling dependent (or static) types to JaveScript, as the type checks are done at compile time, and don’t require any support from the JavaScript runtime.

Post reply on HN