Re:Notes on Idris (2017)
by iainmerrick on Thursday June 07, 2018 @02:01PM
(#17258440)
I was nodding along until I hit that point too. 25 seconds for a simple program??!? That would be a complete dealbreaker.
Re:Notes on Idris (2017)
by fiddlerwoaroof on Thursday June 07, 2018 @02:33PM
(#17258756)
It’s not as bad as it sounds because you don’t have to compile your program while you write it. Rather, you send the program to a repl and the type checker tells you about problems. You can even run the total parts pretty quickly in the repl.
The only issue is that the language server seems to have a memory leak or something that leads to it taking a huge amount of memory and getting sluggish over the course of an extended development session.
Re:Notes on Idris (2017)
by gameswithgo on Thursday June 07, 2018 @02:51PM
(#17258942)
>The only issue is that the language server seems to have a memory leak or something that leads to it taking a huge amount of memory and getting sluggish over the course of an extended development session.
that is not good advertising!
Re:Notes on Idris (2017)
by fiddlerwoaroof on Thursday June 07, 2018 @02:53PM
(#17258961)
I'm sort of hoping someone here will tell me that I'm doing it wrong. Because, this has always been the showstopper for me.
Re:Notes on Idris (2017)
by iainmerrick on Thursday June 07, 2018 @03:33PM
(#17259411)
The language sounds very interesting otherwise, so I’d like to hear of any fixes or workarounds too.
There are various reasons why Idris is slow, but it generally comes down to it being because the current system is the result of lots of experimentation about how to even implement a dependently typed language in the first place, and what it should look like. It needs quite a bit of re-engineering - I prioritised ease of playing with features over efficiency.
The good news is that I'm working on a new version, taking into account the many things I know now that I didn't when starting on version 1. Don't hold your breath though, it might take a while...
In the end, it's a research project, and our job isn't so much to make a good product as to get people excited about the ideas. Mostly we do this by trying to be obviously having lots of fun. But I'd still like a better implementation, because then we can have even more fun.
Re:Notes on Idris (2017)
by moistoreos on Thursday June 07, 2018 @07:03PM
(#17261147)
Does Haskell do this?
Re:Notes on Idris (2017)
by fiddlerwoaroof on Thursday June 07, 2018 @10:06PM
(#17262001)
Do what? The memory leaks? No, GHC is an extremely solid system. There are various editor integrations for Haskell that make it easy to bounce between coding and experimenting in the REPL, though.
Re:Notes on Idris (2017)
by moistoreos on Wednesday June 13, 2018 @06:05PM
(#17307394)
yes, memory leaks. thanks for answering my question my dude.
Re:Notes on Idris (2017)
by star-castle on Thursday June 07, 2018 @02:27PM
(#17258696)
2015 MacBook Pro, compiling his 'first cut at it' example:
# time idris -o Foo Foo.idr
real 0m31.683s
user 0m30.646s
sys 0m0.876s
This is surprising, I haven't had that experience, although I've been using the JavaScript backend instead, maybe it's much faster? It takes a few seconds, but not that much, and I'm on mere X220.
Like the author, I also struggle to write clean code in it. I've been writing a personal project to learn functional programming, Idris, Lambda and DynamoDB, and it's been going slowly. Reading the book, and embracing the suggested development method (type, define, refine) has been helpful, and I'm enjoying the whole process, despite a couple of snags with the JS interface.