[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Sudoku puzzle solver for Apple II
In article <1152715460.757037.151750@h48g2000cwc.googlegroups.com>,
BLuRry <brendan.robert@gmail.com> wrote:
>> I don't believe that! Check out this Sudoku solver:
>> http://homepage.ntlworld.com/valleyway/solver.html
>>
>> It's written in Javascript, which of course is a quite inefficient
>> programming language - yet it needs less than half a second to solve
>> a sudoku, on a 4+ year old PC running at a moderate 1.8 GHz clock speed.
>
> Javascript isn't all that bad. :-P Sure, it's not exactly suited for
> realtime applications, but once the code has been interpreted and all
> data structures are created, it's pretty decent actually.
...you mean when the program has reached the end of execution?
Interpretation doesn't stop until the program reaches its end -- unless
the "interpreter" actually is a semi-compiler....
> I've found it to be not much slower than, say, Perl.
It probably won't be much slower than interpreted BASIC either....
> Some things in the language are actually a lot faster than you think!
> Dynamically-created data structures are not a strong-point of javascript
> when speed is concerned though.
Interesting --- because dynamically created data structures must be
handled at runtime, even in compiled languages.
> http://www.jorendorff.com/articles/javascript/speed-test.html
>
> I don't see enough people rag on the speed of, say, Ruby or Python.
> :-D
>
>> ...but why does it require a 65C02 ? Couldn't it have been written
>> in plain 6502 assembly language?
>
> *sigh* Why are there so many anti-65c02 enthusiasts out there?
I'm not anti-65C02, but my good ol' Apple II+ is. And there's little
I can do about that, unfortunately.
> Can't you afford a free emulator that can handle the opcodes
I can afford a modern computer, but I see little point in using it
for running some "lobotomy software", such as emulators for older,
less capable, computers.
> or shell out $6 for a new 65c02 processor?
In the early 1980's I shelled out $50 for a 65C02! That's probably
some $250 in today's money .... however I had little use for it.
I tried it in my Apple II+, which just locked up. I also tried it on
some Apple IIe's, and there it worked fine. So the CPU worked OK.
I still have it.....
> But, seriously, I have a strong preference for 65c02 opcodes in my
> code as well becase it's a slight bit more convienent. Why limp
> when you can walk? (or use 65816 and go for a jog ;-)
...if so, why not fly with a modern 32-bit or 64-bit CPU ? ;-)
> -B
OK, you program for your own enjoyment, not for the utility of others.
All fine and well, we all choose why we do what we do -- but it's good
to know that it's no use trying your software on Apple II's earlier
than the IIe....
--
----------------------------------------------------------------
Paul Schlyter, Grev Turegatan 40, SE-114 38 Stockholm, SWEDEN
e-mail: pausch at stockholm dot bostream dot se
WWW: http://stjarnhimlen.se/