Path: news.cs.au.dk!news.net.uni-c.dk!howland.erols.net!news.maxwell.syr.edu!skynet.be!poster!not-for-mail From: Atle Newsgroups: comp.lang.beta Subject: Turbo Beta? Date: Tue, 20 Jun 2000 13:14:14 -0100 Organization: Belgacom Skynet SA/NV Lines: 56 Message-ID: <394F7C35.432BE7FF@skynet.be> NNTP-Posting-Host: dialup212.charleroi.skynet.be Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: news1.skynet.be 961499374 16613 195.238.7.212 (20 Jun 2000 11:09:34 GMT) X-Complaints-To: abuse@skynet.be NNTP-Posting-Date: 20 Jun 2000 11:09:34 GMT X-Mailer: Mozilla 4.51 [en] (X11; I; Linux 2.2.5-15 i686) X-Accept-Language: en Xref: news.cs.au.dk comp.lang.beta:12454 Hello, again! Now I have an entirely different question: Do any of you remember UCSD Pascal? Or Turbo Pascal for CPM? They even continued with them Turbo C for DOS, then Windows - until it got too big and 'tungrodd'(?) Have any of you written a simple programming environment like that? ----------------------------- Can any of you give me an idea about how to program something like that an at the same time gain some insight in the concept of coroutines and generators? ----------------------------- If you want an idea from me on how to play with generators yourselves, I have a good one: Databases. A SELECT could be implemented as a generator (of course, it wouldn't be an SQL SELCT anymore, so it would need another name). In Icon, the keyword EVERY returns all the values, as in EVERY s := ['atle', 'Beta', 'Concurrency', 'Delta', 'every', 'fork', 'generator'] DO write (s) So each element of the list in [] will be assigned to s in turn and written. To program a generator, you have to call SUSPEND s with the value of s (in the list that is the 'next' element). So, a generator in Icon is one that is used like this to print all its values every elm := mygenerator() do write elm And the way in Turbo C for DOS was like the famous (?) findfirst(filespec, &ffblk); while(findnext(&ffblk)) printf("%s\n", ffblk.ff_name); /* Or something like that (long time ago)*/ If struct ffblk was 'static', it would remember its state between calls to whatever function called findnext(). Like the FILE is poor man's object, well, this would be Yes, folks, a generator programmed in Turbo C :-) It seems to be that these things would have gotten the most elegant implementation thinkable in Beta. I will be looking at the SQL interface with a lot of interest soon ... i hope there is something built on top of that. It would be a piece of cake for someone who knew Beta well to build a RAS - Relational Algebra System on top of SQL - I think. At least I know it would be fun. But I need to learn more, and more ... Atle