Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Project Euler (projecteuler.net)
97 points by ottbot on April 13, 2010 | hide | past | favorite | 20 comments


One of the best ways to get started with a new programming language.


I did question 1 in Wolfram Alpha (spoiler alert): http://www.wolframalpha.com/input/?i=sum+3n+for+n%3D1..333+%...

Started on problem 2, but it got hard...

None the less - I was quite impressed that Alpha could handle questions that hard.


Upvoted in agreement. Without Project Euler, I probably wouldn't have been able to wrap my head around Scheme, and subsequently, I wouldn't have learned how to program without mutable state. The early problems are general enough that you don't usually need some specific abstraction or language feature to solve them, and the later problems are hard enough that you can't let the language itself take too large a share of your thoughts.


How does that work? Scheme vectors are all about mutable state and a lot of the list functions are, too. Did you get a better Scheme collections library than the rest of us?


As you have said, it is practically impossible to use vectors without mutating their contents with (vector-set! ...), but purely list-based Scheme is actually quite easy to write without resorting to some variant of (set! ...). When practicing on the early problems on Project Euler, vectors and mutation were language features I simply didn't need for some time, so I didn't learn them until later. The building and traversal of lists through recursion got me at least 80% of most problems I solved. Maybe the standard Scheme libraries just do a good job of making mutation operations look like something one needs to avoid whenever possible.


Same here....knew about it and assumed everyone else knows about it too. I think a lot of good stuff remains hidden because people never really 'reach' them. And the ones who know about it, don't care to keep reminding people, since repetition sounds weird and is frowned upon amongst us hackers. (On a sidenote) Interestingly enough, revision/ repitition is how our minds remember things too. So, in some cases, things we know exist, are bound to be forgotten by us, if we don't spread the news, regularly. I know I have definitely forgotten many of these "interesting, i gotta read it sometime later" websites.

Hey, maybe we should make a Bot that keeps sending others info about these kind of sites that we know, and dont share much, so that once someone else knows about it....slowly it still keeps spreading , instead of just dying and never reaching a lot of audience, until way later....


Well how about a weekend project for someone here: scan the HN db for constantly reposted links, cull the ones which have low votes and put up a FLA (frequently linked article) page for new users, or old users to check the required reading list for HN. I'll give it a shot, but I do have a full workload at the moment, but hell, I'll give it a shot. (maybe the guys at searchyc can give me a pointer or two? hint hint)


Besides links, there are also a bunch of topics that come up periodically, such as nootropics and polyphasic sleep.


While good for practice or a warm-up, I've found it a particularly good way to learn algorithms, compare implementations across languages, etc. The forums are great. (It's humbling to see so many solved a line or two of J, too.)

I haven't been there in a few months, but I did the first fifty (and a few others) in Lua and OCaml.


Upvoted, project euler is really great for learning (or relearning) techniques in languages you are interested in using, but good tutorials / books may not exist -- lua I'm looking at you.


While there aren't a whole lot of books about Lua, the official one (Ierusalimschy's _Programming in Lua_, 2nd ed., AKA, "the blue PiL") is excellent. That, the wiki, and mailing list archives (http://lua-users.org/) should pretty much cover things.

The reference manual is also helpful, particularly for the C API. It's available online, but I like having a printed copy. (I also find its brevity re-assuring.)

There's another book by that publisher that makes big red tree stumps, but I can't recommend it. (The _Lua Programming Gems_ has some good bits, though.)


Yeah, we know it exists...


You may know it exists; that doesn't mean "we" know it exists. In particular, I didn't know it exists, and am grateful to the person who submitted the link.


Project Euler gets reposted every couple months. This is because new people keep discovering it, and it's really cool.

I don't mind the repost. It will sink off the front page again soon enough, and hopefully the discussion will be good this time.

By the way, if you're excited about Project Euler, you may like _Mathematics: From the Birth of Numbers_.


And if you finish the challenges, there's also programmingpraxis.com


pythonchallenge.com is also good, though some of the questions are Python-specific.


Here are more (with many language-specific discussions): http://www.google.com/search?q=site:news.ycombinator.com+pro...


I've been cranking through some problems when I have a little bit of time in Python ... Done 66 so far, and mess with it whenever I have a few free minutes.

Great way to learn a new language or rediscover one you already know


For python you can try : http://www.pythonchallenge.com/ (purely fun), http://www.spoj.pl/ (algorithmic), http://www.codechef.com/ (competitive) and of course there is project euler (mathematically oriented)





Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: