6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Fri May 10, 2024 6:48 pm

All times are UTC




Post new topic Reply to topic  [ 37 posts ]  Go to page Previous  1, 2, 3
Author Message
 Post subject: Re: vino816 Forth design
PostPosted: Wed May 02, 2018 10:43 am 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10800
Location: England
Very good point John!


Top
 Profile  
Reply with quote  
 Post subject: Re: vino816 Forth design
PostPosted: Thu May 03, 2018 2:44 am 
Offline

Joined: Fri Jun 03, 2016 3:42 am
Posts: 158
John West wrote:
Dr Jefyll wrote:
"Most computer applications boil down to searching and sorting."

BigEd wrote:
"I believe that virtually every important aspect of programming arises somewhere in the context of sorting or searching!" (Donald Knuth, The Art of Computer Programming, Volume 3, "Sorting and Searching")

It's worth noting that these two quotes are saying opposite things. The first is the one that people often think Knuth was saying, but if you read the preface to Vol. 3, it is clear that he was not. A bit more context makes it clear:
Knuth wrote:
The title “Sorting and Searching” may sound as if this book is only for those systems programmers who are concerned with the preparation of general-purpose sorting routines or applications to information retrieval. But in fact the area of sorting and searching provides an ideal framework for discussing a wide variety of important general issues:

    How are good algorithms discovered?
    How can given algorithms and programs be improved?
    How can the efficiency of algorithms be analyzed mathematically?
    How can a person choose rationally between different algorithms for the same task?
    In what senses can algorithms be proved “best possible”?
    How does the theory of computing interact with practical considerations?
    How can external memories like tapes, drums, or disks be used efficiently with large databases?

Indeed, I believe that virtually every important aspect of programming arises somewhere in the context of sorting or searching!

A full exploration of sorting and searching will cover virtually everything that is important. None of those things are themselves sorting or searching.

Interesting point! This actually makes more sense
I had never understood the idea of all programs involving searching and sorting --- as I said above, this is not true for micro-controllers --- it is somewhat more plausible for desktop-computers, but still a pretty gross simplification.
So Donald Knuth was saying that studying searching and sorting allows the student to encounter most of the important aspects of programming --- that is more reasonable --- it is still not totally true though, as Donald Knuth takes a much more mathematical approach to programming than most people do (I would expect most high-school students are interested in writing a video game and have little or no interest in algorithmics).

Anyway, this thread has gone way OT. Why are we discussing Pascal?
I designed vino816 as a Forth system for the 65c816. I am not going to support quotations (anonymous nested functions) because the 65c816 lacks enough registers to have a local-frame pointer (as I said, a zero-page pointer could be used, but it would be slow). I am unlikely to implement vino816 because the chance of having any users is zilch --- if I did implement it, I would focus on supporting micro-controllers (as I said, accessing I/O ports, doing logic on data going in and out, and circular buffers) --- none of this has anything to do with Pascal, which is a desktop-computer language.

All of this discussion of Pascal seems to have started because I said that William Mensch may have been thinking of Pascal, but it would have to be a crippled version of Pascal without nested functions --- he may have been thinking of C, which is like a crippled Pascal (plus you get ugly syntax!) --- he definitely wasn't thinking about Forth.
Forth needs two stacks: a data-stack and a return-stack --- the 65c816 lacks support for a data-stack --- the X register can be used, but there is no pre-decrement or post-increment addressing-mode, so you get a lot of DEX DEX and INX INX code-sequences (as I said though; with peephole-optimization this can be reduced to some extent).


Top
 Profile  
Reply with quote  
 Post subject: Re: vino816 Forth design
PostPosted: Thu May 03, 2018 5:04 am 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10800
Location: England
Yep, threads will follow topics which are mentioned, especially if mentioned in an overstated or controversial way. It is to some extent under your control.


Top
 Profile  
Reply with quote  
 Post subject: Re: vino816 Forth design
PostPosted: Thu May 03, 2018 1:37 pm 
Offline
User avatar

Joined: Fri Dec 11, 2009 3:50 pm
Posts: 3354
Location: Ontario, Canada
Hugh Aguilar wrote:
William Mensch may have been thinking of Pascal
Is it important what Mensch (or any chip designer) was thinking? I mean, it's interesting, just as a matter of speculation. I get that -- don't have a problem with it.

But let's remember it's just fluff -- it has no practical value when it comes to working with the chip. The chip is what it is. If we have a job to do then let's get on with it!

Rather than Mensch's thoughts from decades ago, I'd rather read a thread focusing on a new Forth being created today :)

_________________
In 1988 my 65C02 got six new registers and 44 new full-speed instructions!
https://laughtonelectronics.com/Arcana/ ... mmary.html


Top
 Profile  
Reply with quote  
 Post subject: Re: vino816 Forth design
PostPosted: Thu May 03, 2018 4:30 pm 
Offline

Joined: Tue Nov 10, 2015 5:46 am
Posts: 215
Location: Kent, UK
Hugh Aguilar wrote:
I am unlikely to implement vino816 because the chance of having any users is zilch
I've noticed that Forth enthusiasts around here spend more effort (and I'd suspect take more pleasure) in discussing Forth internals and building their own versions than in using an existing implementation or just using the language to do stuff. I get the feeling that it's somehow "Forth's way" to tinker, to get down in the mechanics, to tweak and experiment.

It also occurs to me (and this is pure speculation) that many if not all of these hobby implementations have zero users outside of the author. That's not a bad thing... like building your own computer, or any personal endeavor in the field, doing it is its own reward, and then you share it so that others might see that it's possible, or that it can be done this way vs. that way, or just because it's cool.

Point being: I think it's unfortunate that you'd not proceed with this simply because (a) nobody is paying you, and (b) nobody will use it. Seeing the number of posts you make it's clear that you have opinions on these things. Some garner support, some don't, but it's a subject you seem passionate about. Why not follow through... just for you?


Top
 Profile  
Reply with quote  
 Post subject: Re: vino816 Forth design
PostPosted: Thu May 03, 2018 10:50 pm 
Offline
User avatar

Joined: Wed Mar 01, 2017 8:54 pm
Posts: 660
Location: North-Germany
sark02 wrote:
Hugh Aguilar wrote:
I am unlikely to implement vino816 because the chance of having any users is zilch
I've noticed that Forth enthusiasts around here spend more effort (and I'd suspect take more pleasure) in discussing Forth internals and building their own versions than in using an existing implementation or just using the language to do stuff. I get the feeling that it's somehow "Forth's way" to tinker, to get down in the mechanics, to tweak and experiment.

It also occurs to me (and this is pure speculation) that many if not all of these hobby implementations have zero users outside of the author. That's not a bad thing... like building your own computer, or any personal endeavor in the field, doing it is its own reward, and then you share it so that others might see that it's possible, or that it can be done this way vs. that way, or just because it's cool.

Point being: I think it's unfortunate that you'd not proceed with this simply because (a) nobody is paying you, and (b) nobody will use it. Seeing the number of posts you make it's clear that you have opinions on these things. Some garner support, some don't, but it's a subject you seem passionate about. Why not follow through... just for you?


100% ACK


Top
 Profile  
Reply with quote  
 Post subject: Re: vino816 Forth design
PostPosted: Fri Sep 14, 2018 11:29 pm 
Offline

Joined: Fri May 05, 2017 9:27 pm
Posts: 858
sark02 wrote:
Hugh Aguilar wrote:
I am unlikely to implement vino816 because the chance of having any users is zilch
I've noticed that Forth enthusiasts around here spend more effort (and I'd suspect take more pleasure) in discussing Forth internals and building their own versions than in using an existing implementation or just using the language to do stuff. I get the feeling that it's somehow "Forth's way" to tinker, to get down in the mechanics, to tweak and experiment.

It also occurs to me (and this is pure speculation) that many if not all of these hobby implementations have zero users outside of the author. That's not a bad thing... like building your own computer, or any personal endeavor in the field, doing it is its own reward, and then you share it so that others might see that it's possible, or that it can be done this way vs. that way, or just because it's cool.

Point being: I think it's unfortunate that you'd not proceed with this simply because (a) nobody is paying you, and (b) nobody will use it. Seeing the number of posts you make it's clear that you have opinions on these things. Some garner support, some don't, but it's a subject you seem passionate about. Why not follow through... just for you?

If you don't implement it, you will not really know how sound your design is. By implementing vino816 you will be able to see how fast it really is, how much memory it consumes with a certain level of functionality, and confirm that it is a fully functional Forth. In short, implementing it is the one sure way to work out, or be certain you have worked out, any bugs in the design and see your speed vs. size tradeoffs.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 37 posts ]  Go to page Previous  1, 2, 3

All times are UTC


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: