|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Mueen Nawaz wrote:
>> (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.
6 is not an amicable number because it's only amciable with itself. This
was not made clear anywhere, and it took an absurd amount of time to
figure out why my working program was producing the "wrong" answer.
There were several others like that... I don't remember which now.
> 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 wouldn't use Telnet if you paid me. SSH though... (And presumably SSH
means you can use SFTP too? I wonder if there are tools to synchronise
folders over SFTP...)
>> 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.
...or that, yes. ;-)
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
> 6 is not an amicable number because it's only amciable with itself. This
> was not made clear anywhere,
Ermm, it says in the question that:
If d(a) = b and d(b) = a, where a (doesn't equal) b, then a and b are an
amicable pair and each of a and b are called amicable numbers.
Seems pretty clear that 6 is not an amicable number to me...
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
scott wrote:
>> 6 is not an amicable number because it's only amciable with itself.
>> This was not made clear anywhere,
>
> Ermm, it says in the question that:
>
> If d(a) = b and d(b) = a, where a (doesn't equal) b, then a and b are an
> amicable pair and each of a and b are called amicable numbers.
>
> Seems pretty clear that 6 is not an amicable number to me...
Interesting. I don't remember that being there... (And the comments in
the forum indicated that I wasn't the only person to get this wrong.)
Maybe they changed it or something...
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Invisible wrote:
> I wouldn't use Telnet if you paid me. SSH though... (And presumably SSH
> means you can use SFTP too? I wonder if there are tools to synchronise
> folders over SFTP...)
Yes, generally SSH implies SFTP.
And I'd be surprised if you can't synchronize using SFTP. I don't
really do that, though - I just use Subversion (which they provide...).
You don't HAVE to use SSH - but I think if you can use UNIX, you should
get it - much easier editing files that way.
--
Do Not Attempt to Traverse a Chasm in Two Leaps...
/\ /\ /\ /
/ \/ \ u e e n / \/ a w a z
>>>>>>mue### [at] nawazorg<<<<<<
anl
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Mueen Nawaz wrote:
> Invisible wrote:
>> I wouldn't use Telnet if you paid me. SSH though... (And presumably SSH
>> means you can use SFTP too? I wonder if there are tools to synchronise
>> folders over SFTP...)
>
> Yes, generally SSH implies SFTP.
>
> And I'd be surprised if you can't synchronize using SFTP. I don't
> really do that, though - I just use Subversion (which they provide...).
>
> You don't HAVE to use SSH - but I think if you can use UNIX, you should
> get it - much easier editing files that way.
Most of my HTML is machine-generated. ;-)
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Mueen Nawaz <m.n### [at] ieeeorg> wrote:
> And I'd be surprised if you can't synchronize using SFTP.
I think the most common tool for synchronization (if we don't go to
versioning systems) in unix is rsync. It can copy files using ssh, so it
should be as secure.
--
- Warp
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Invisible wrote:
...
> I wouldn't use Telnet if you paid me. SSH though... (And presumably SSH
> means you can use SFTP too? I wonder if there are tools to synchronise
> folders over SFTP...)
...
I think that should be possible with sshfs and rsync:
http://en.wikipedia.org/wiki/SSHFS
http://en.wikipedia.org/wiki/Rsync
--
Tor Olav
http://subcube.com
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Tor Olav Kristensen <tor### [at] TOBEREMOVEDgmailcom> wrote:
> Invisible wrote:
> ...
> > I wouldn't use Telnet if you paid me. SSH though... (And presumably SSH
> > means you can use SFTP too? I wonder if there are tools to synchronise
> > folders over SFTP...)
> ...
>
> I think that should be possible with sshfs and rsync:
It seems that ssh and rsync are sufficient.
"rsync Tips & Tricks":
http://sial.org/howto/rsync/
"Using rsync over ssh":
http://www.oreilly.com/pub/h/38
rsync manual:
http://samba.anu.edu.au/ftp/rsync/rsync.html
Here's an excerpt from that manual:
"Once installed, you can use rsync to any machine that you can
access via a remote shell (as well as some that you can access
using the rsync daemon-mode protocol). For remote transfers, a
modern rsync uses ssh for its communications, but it may have
been configured to use a different remote shell by default,
such as rsh or remsh.
You can also specify any remote shell you like, either by
using the -e command line option, or by setting the RSYNC_RSH
environment variable.
Note that rsync must be installed on both the source and
destination machines."
--
Tor Olav
http://subcube.com
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Damnit, this Project Euler metadiscussion isn't even a metadiscussion
about Project Euler! o_O
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |