Re:Why is Idris 2 so much faster than Idris 1?
by cflewis on Monday May 25, 2020 @07:51PM
(#23306092)
Hmm. My interest is piqued but this book is from 2017 and I am wondering if it is not horribly out of date at this point. WDYT?
[ Parent
| on HN ]
Re:Why is Idris 2 so much faster than Idris 1?
by mx00s on Tuesday May 26, 2020 @01:10AM
(#23307621)
There are some minor changes, but they are documented in detail [1]. The Idris2 repository maintains tests to detect any further divergence from the book [2].
I highly recommend the book. Typing in examples and getting experience collaborating with the compiler on edits is worthwhile. Even if you never use Idris(2) again after reading it, the demos on creating state machine DSLs with contextual invariants will leave a lasting impression.
[1] https://idris2.readthedocs.io/en/latest/typedd/typedd.html
[2] https://github.com/idris-lang/Idris2/tree/master/tests/typed...
Re:Why is Idris 2 so much faster than Idris 1?
by schr0dinger on Tuesday May 26, 2020 @02:59AM
(#23308204)
Well minor including the switch to use of so called “quantitative type theory” where you can include use counts for variables that inform the compiler how long variables will stick around. Also the compiler switch to Chez Scheme yields a pretty big performance boost.
Re:Why is Idris 2 so much faster than Idris 1?
by zelphirkalt on Tuesday May 26, 2020 @03:21AM
(#23308311)
The Idris 2 compiler is build with Chez Scheme? That's pretty cool in my opinion, didn't know that.
Re:Why is Idris 2 so much faster than Idris 1?
by mjepronk on Tuesday May 26, 2020 @03:48AM
(#23308464)
It compiles to Chez Scheme. It's written in Idris 2 (self-hosted).
It is written with Idris2 as the article mentions.
It produces/translates to Chez Scheme code.
Re:Why is Idris 2 so much faster than Idris 1?
by mx00s on Tuesday May 26, 2020 @11:52AM
(#23312690)
You're right, there are several notable improvements in Idris2. I was mainly referring to the amount of code from the book that must be adapted. The QTT features, as you say, are opt-in; by default no new constraints are imposed.