POV-Ray : Newsgroups : povray.off-topic : Project Euler : Re: Project Euler metadiscussion Server Time
11 Oct 2024 11:11:19 EDT (-0400)
  Re: Project Euler metadiscussion  
From: Mueen Nawaz
Date: 30 Nov 2007 20:42:33
Message: <4750bc09@news.povray.org>
Invisible wrote:
>>> Well, for "find the millionth prime number" or something, there's not
>>> much to check. But when the problem is "sum all the primes below 1
>>> million", it might be nice to know, for example, how many primes there
>>> are. (Or rather, be able to ask "are there 722 primes?" and get a yes/no
>>> answer.)
>>
>>     That'd make it easier to solve, though.
> 
> Well yes - but do you have any idea how frustrating it is to spend hours
> trying to make your program work when you don't even know what part is
> broken? Knowing which part is broken doesn't tell you how to fix it, it
> just tells you which part needs fixing...

	I don't see it being an issue for this problem.

	Write a program that sums all primes below n. You can test it for n=100
by hand. Unless you're using a weird algorithm, it should work for any
n, unless you have overflow, which I suspect you don't worry about in
Haskell, anyway.

	There's a reason most problems come with at least one example: To test
your code. It helps, but do you realize how difficult it is to implement
what you're asking? How is the site owner supposed to guess what
questions are useful for you?

> (Also, a number of questions give insufficient detail to figure out what
> the correct answer is.)

	Can you give me an example? I haven't come across any thus far.

> I've asked many times. Nobody ever recommends anything.

	Well, Scott's friend recommended one. Looks fine, but I'll point out
that the $4.99/mo is only for the first year. I already said I use
Dreamhost. You have to pay a year in advance, but they give you over 90
days to cancel.

	My recommendation about features (I actually have many, but this is
often overlooked): Make sure they provide you SSH/Telnet access.
Midnight Commander installed would be a bonus (must for me).

> (I hate Perl, and PHP would probably be the same. I'd probably want to
> do my CGI scripting in Haskell - and by the looks of it, the only way to
> do *that* is to go for a virtual server package rather than a simple web
> hosting package. That's A LOT of extra complexity, and it's expensive.)

	You may want to try Django (Python) or Ruby on Rails. In which case
make sure the hosting company allows it (as opposed to "supporting" it).

	I don't want to code PHP either. However, having a webserver allows me
to install PHP web software (gallery, blog, wiki, CMS, and much more).
Which I use very frequently.

> [BTW, I find it interesting that all hosting packages offer MySQL or SQL
> Server, but none offer PostgreSQL...]

	Some do. A number of web software you may want to install may still
require MySQL, though.

>>     That's sort of the point. Take Problem 43:
> 
> Actually I didn't - mainly because I don't know what "pandigital" means.

	Google it.

	They actually explain it (albeit poorly) in the first problem they use it.

> Personally, I find that as you come up with better algorithms it gets
> *easier* to code, not harder. ;-) Maybe that's just because I use
> Haskell... The Mathematica solutions are similarly easy.

	For me, that happens after more thought. Initially any advanced idea I
come up with after a first attempt is ugly. Then I abstract a little and
it gets nicer.


-- 
As a child my family's menu consisted of two choices: "Take it, or leave
it."


                    /\  /\               /\  /
                   /  \/  \ u e e n     /  \/  a w a z
                       >>>>>>mue### [at] nawazorg<<<<<<
                                   anl


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.