Project Euler
91–100 of 172 posts
Re: Project Euler
#92Re: Project Euler
#93Earlier quoted context omitted.
I don't think it's unreasonable to expect it. E.g. clang -O1 ( https://godbolt.org/g/7qzSF9 ) is able to use the closed form for a sum on a simple C++ loop. It's not unreasonable that a language with deeper introspection could identify more closed forms. I agree that I don't think the Haskell maintainers would put this specific example in, but I wonder whether they could build it up from simpler primitives.
Haskell optimizer does not feature an arithmetic Oracle nor polynomial optimizer. It cannot even optimize Peano arithmetic much less a series. This might be fixed some time or never. There is little push for ultimate performance and actually identifying arithmetic forms in recursive loops in the front-end is hard. (Heck it sometimes fails to tail optimize.)
Re: Project Euler
#94I guess I'm becoming an old fart. I used to like programming puzzles, challenges, things like this. But as time marches on, I realize that the real-world problems I have to solve are already so challenging and require enough critical thinking, that I'm best served just focusing on them. Between family life, doing real-world challenges for income, downtime to breathe, diverse hobbies for the spiritual good of my perso…
Also as a liberal arts in programming, Euler, is fun in the sense of a well done proof is fun in math. If that is your thing you'll enjoy Euler, otherwise as in most programming you will brute force your way to a solution.
Re: Project Euler
#95I guess I'm becoming an old fart. I used to like programming puzzles, challenges, things like this. But as time marches on, I realize that the real-world problems I have to solve are already so challenging and require enough critical thinking, that I'm best served just focusing on them. Between family life, doing real-world challenges for income, downtime to breathe, diverse hobbies for the spiritual good of my perso…
Re: Project Euler
#96I really like to use project euler when I want to learn a new language. Exercises are sorted more or less by difficulty, at least for the first 50-100, and are completely langage agnostic (you just need to answer a question in a text input). It's also very good to learn algorithm and maths. Some problems can even be solved without any programming. And for some, a certain amount of math is necessary to have a efficien…
(They do ask not to share the solutions.) But nice job translating them :-)
Re: Project Euler
#97I guess I'm becoming an old fart. I used to like programming puzzles, challenges, things like this. But as time marches on, I realize that the real-world problems I have to solve are already so challenging and require enough critical thinking, that I'm best served just focusing on them. Between family life, doing real-world challenges for income, downtime to breathe, diverse hobbies for the spiritual good of my perso…
Re: Project Euler
#98Earlier quoted context omitted.
I really like the book “Concrete Mathematics”. It might be a little hard going without much maths background, but it is filled with these kinds of tricks.
Author(s)?
Re: Project Euler
#99Re: Project Euler
#100I guess I'm becoming an old fart. I used to like programming puzzles, challenges, things like this. But as time marches on, I realize that the real-world problems I have to solve are already so challenging and require enough critical thinking, that I'm best served just focusing on them. Between family life, doing real-world challenges for income, downtime to breathe, diverse hobbies for the spiritual good of my perso…