Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.forth > #60267 > unrolled thread
| Started by | Brad Eckert <hwfwguy@gmail.com> |
|---|---|
| First post | 2017-06-03 20:31 -0700 |
| Last post | 2017-06-05 07:35 -0700 |
| Articles | 20 on this page of 63 — 15 participants |
Back to article view | Back to comp.lang.forth
What is Forth anyway? Brad Eckert <hwfwguy@gmail.com> - 2017-06-03 20:31 -0700
Re: What is Forth anyway? lehs <skydda.barnen@gmail.com> - 2017-06-03 23:05 -0700
Re: What is Forth anyway? Howerd <howerdo@yahoo.co.uk> - 2017-06-04 03:23 -0700
Re: What is Forth anyway? lehs <skydda.barnen@gmail.com> - 2017-06-04 03:39 -0700
Re: What is Forth anyway? Howerd <howerdo@yahoo.co.uk> - 2017-06-04 03:17 -0700
Re: What is Forth anyway? Howerd <howerdo@yahoo.co.uk> - 2017-06-04 03:18 -0700
What is Forth anyway? Ilya Tarasov <ilya74.tarasov@gmail.com> - 2017-06-04 05:17 -0700
Re: What is Forth anyway? Howerd <howerdo@yahoo.co.uk> - 2017-06-04 07:13 -0700
Re: What is Forth anyway? Andrew Haley <andrew29@littlepinkcloud.invalid> - 2017-06-05 02:38 -0500
Re: What is Forth anyway? NN <november.nihal@gmail.com> - 2017-06-04 05:27 -0700
Re: What is Forth anyway? "HAA" <someone@microsoft.com> - 2017-06-04 23:07 +1000
Re: What is Forth anyway? Alex <alex@rivadpm.com> - 2017-06-04 19:12 +0100
Re: What is Forth anyway? Howerd <howerdo@yahoo.co.uk> - 2017-06-04 12:55 -0700
Re: What is Forth anyway? Alex <alex@rivadpm.com> - 2017-06-04 21:41 +0100
Re: What is Forth anyway? "HAA" <someone@microsoft.com> - 2017-06-05 15:54 +1000
Re: What is Forth anyway? Howerd <howerdo@yahoo.co.uk> - 2017-06-05 02:05 -0700
Re: What is Forth anyway? Ilya Tarasov <ilya74.tarasov@gmail.com> - 2017-06-04 17:33 -0700
Re: What is Forth anyway? "Rudy Velthuis" <newsgroups@rvelthuis.de> - 2017-06-05 12:54 +0000
Re: What is Forth anyway? "Rudy Velthuis" <newsgroups@rvelthuis.de> - 2017-06-04 22:14 +0000
Re: What is Forth anyway? hughaguilar96@gmail.com - 2017-06-04 16:39 -0700
Re: What is Forth anyway? "Rudy Velthuis" <newsgroups@rvelthuis.de> - 2017-06-05 12:44 +0000
Re: What is Forth anyway? hughaguilar96@gmail.com - 2017-06-05 08:10 -0700
Re: What is Forth anyway? gavino himself <jackvanc3@gmail.com> - 2017-06-05 10:01 -0700
Re: What is Forth anyway? "Rudy Velthuis" <newsgroups@rvelthuis.de> - 2017-06-05 19:29 +0000
Re: What is Forth anyway? Andrew Haley <andrew29@littlepinkcloud.invalid> - 2017-06-06 03:44 -0500
Re: What is Forth anyway? "Rudy Velthuis" <newsgroups@rvelthuis.de> - 2017-06-07 19:26 +0000
Re: What is Forth anyway? Andrew Haley <andrew29@littlepinkcloud.invalid> - 2017-06-08 02:06 -0500
Re: What is Forth anyway? "Rudy Velthuis" <newsgroups@rvelthuis.de> - 2017-06-09 17:09 +0000
Re: What is Forth anyway? "Rudy Velthuis" <newsgroups@rvelthuis.de> - 2017-06-05 19:41 +0000
Re: What is Forth anyway? lehs <skydda.barnen@gmail.com> - 2017-06-06 02:19 -0700
Re: What is Forth anyway? Alex <alex@rivadpm.com> - 2017-06-06 10:41 +0100
Re: What is Forth anyway? Ron Aaron <rambamist@gmail.com> - 2017-06-06 12:45 +0300
Re: What is Forth anyway? Alex <alex@rivadpm.com> - 2017-06-06 11:23 +0100
Re: What is Forth anyway? Ron Aaron <rambamist@gmail.com> - 2017-06-06 13:30 +0300
Re: What is Forth anyway? Alex <alex@rivadpm.com> - 2017-06-06 12:55 +0100
Re: What is Forth anyway? Ron Aaron <rambamist@gmail.com> - 2017-06-06 14:57 +0300
Re: What is Forth anyway? anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2017-06-06 13:34 +0000
Re: What is Forth anyway? Ron Aaron <rambamist@gmail.com> - 2017-06-06 17:07 +0300
Re: What is Forth anyway? Coos Haak <htrofhc@gmail.com> - 2017-06-06 16:51 +0200
Re: What is Forth anyway? anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2017-06-06 16:32 +0000
Re: What is Forth anyway? Coos Haak <htrofhc@gmail.com> - 2017-06-07 01:37 +0200
Re: What is Forth anyway? "Rudy Velthuis" <newsgroups@rvelthuis.de> - 2017-06-07 19:29 +0000
Re: What is Forth anyway? Cecil Bayona <cbayona@cbayona.com> - 2017-06-07 14:56 -0500
Re: What is Forth anyway? Andrew Haley <andrew29@littlepinkcloud.invalid> - 2017-06-06 04:48 -0500
Re: What is Forth anyway? anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2017-06-06 10:10 +0000
Re: What is Forth anyway? "Rudy Velthuis" <newsgroups@rvelthuis.de> - 2017-06-07 19:28 +0000
Re: What is Forth anyway? Cecil Bayona <cbayona@cbayona.com> - 2017-06-07 14:54 -0500
Re: What is Forth anyway? lehs <skydda.barnen@gmail.com> - 2017-06-07 19:42 -0700
Re: What is Forth anyway? "Rudy Velthuis" <newsgroups@rvelthuis.de> - 2017-06-09 17:12 +0000
Re: What is Forth anyway? Ilya Tarasov <ilya74.tarasov@gmail.com> - 2017-06-04 17:40 -0700
Re: What is Forth anyway? "Rudy Velthuis" <newsgroups@rvelthuis.de> - 2017-06-05 12:51 +0000
Re: What is Forth anyway? Ilya Tarasov <ilya74.tarasov@gmail.com> - 2017-06-05 17:19 -0700
Re: What is Forth anyway? "Rudy Velthuis" <newsgroups@rvelthuis.de> - 2017-06-07 19:32 +0000
Re: What is Forth anyway? Ilya Tarasov <ilya74.tarasov@gmail.com> - 2017-06-07 16:50 -0700
Re: What is Forth anyway? "Rudy Velthuis" <newsgroups@rvelthuis.de> - 2017-06-09 17:15 +0000
Re: What is Forth anyway? Ilya Tarasov <ilya74.tarasov@gmail.com> - 2017-06-09 13:04 -0700
Re: What is Forth anyway? "Rudy Velthuis" <newsgroups@rvelthuis.de> - 2017-06-09 21:27 +0000
Re: What is Forth anyway? anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2017-06-06 10:19 +0000
Re: What is Forth anyway? "Rudy Velthuis" <newsgroups@rvelthuis.de> - 2017-06-07 19:38 +0000
Re: What is Forth anyway? anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2017-06-08 11:52 +0000
Re: What is Forth anyway? "Rudy Velthuis" <newsgroups@rvelthuis.de> - 2017-06-09 17:23 +0000
Re: What is Forth anyway? gavino himself <jackvanc3@gmail.com> - 2017-06-05 07:16 -0700
Re: What is Forth anyway? gavino himself <jackvanc3@gmail.com> - 2017-06-05 07:35 -0700
Page 3 of 4 — ← Prev page 1 2 [3] 4 Next page →
| From | Coos Haak <htrofhc@gmail.com> |
|---|---|
| Date | 2017-06-07 01:37 +0200 |
| Message-ID | <k0f61r4tx19b.1wwztkj5kftrr$.dlg@40tude.net> |
| In reply to | #60401 |
Op Tue, 06 Jun 2017 16:32:14 GMT schreef Anton Ertl: <snip> > It requires an OS that supports mmap() and mprotect(), typically any > modern Unix. > > - anton I used gforth on Windows 10 and under Cygwin on that machine, sorry. Ubuntu 16.04 32 and 64 bit do as you wrote. groet Coos
[toc] | [prev] | [next] | [standalone]
| From | "Rudy Velthuis" <newsgroups@rvelthuis.de> |
|---|---|
| Date | 2017-06-07 19:29 +0000 |
| Message-ID | <xn0kqyf8rawxplf009@nntp.aioe.org> |
| In reply to | #60372 |
Ron Aaron wrote: > > > On 06/06/17 12:41, Alex wrote: > > > Although the word optimize > > tends to generate a "it's not what the programmer wrote" reaction > > from some here. > > I suppose I'm in that camp. > > Even though (for example) eliminating "DUP DROP" would normally be > considered a "safe optimization", how is the compiler to know if the > programmer intended that due to side-effects? What side effects do "DUP DROP" have? -- Rudy Velthuis http://www.rvelthuis.de "If there were in the world today any large number of people who desired their own happiness more than they desired the unhappiness of others, we could have a paradise in a few years." -- Bertrand Russell
[toc] | [prev] | [next] | [standalone]
| From | Cecil Bayona <cbayona@cbayona.com> |
|---|---|
| Date | 2017-06-07 14:56 -0500 |
| Message-ID | <oh9li3$q8q$2@dont-email.me> |
| In reply to | #60435 |
On 6/7/2017 2:29 PM, Rudy Velthuis wrote: > Ron Aaron wrote: > >> >> >> On 06/06/17 12:41, Alex wrote: >> >>> Although the word optimize >>> tends to generate a "it's not what the programmer wrote" reaction >>> from some here. >> >> I suppose I'm in that camp. >> >> Even though (for example) eliminating "DUP DROP" would normally be >> considered a "safe optimization", how is the compiler to know if the >> programmer intended that due to side-effects? > > What side effects do "DUP DROP" have? > It wastes time so it can be used inside delays, but that can be handled with the ability to turn on and off optimization so when it's needed it will not be optimized away. -- Cecil - k5nwa
[toc] | [prev] | [next] | [standalone]
| From | Andrew Haley <andrew29@littlepinkcloud.invalid> |
|---|---|
| Date | 2017-06-06 04:48 -0500 |
| Message-ID | <GOadnYzvx73t56vEnZ2dnUU7-TednZ2d@supernews.com> |
| In reply to | #60369 |
lehs <skydda.barnen@gmail.com> wrote: > > How much faster would Forth become with maybe hundreds of highly > optimized stack juggling words, like under+, over+, tuck+, underdup, > underswap,....... which almost made juggling word combinations > unnecessary? Not at all, I wouldn't have thought. If you really care about that, it's better IMO to use a peephole optimizer. A string of stack ops is no more than a bunch of moves, and you can concatenate them and generate the best sequence of instructions. Andrew.
[toc] | [prev] | [next] | [standalone]
| From | anton@mips.complang.tuwien.ac.at (Anton Ertl) |
|---|---|
| Date | 2017-06-06 10:10 +0000 |
| Message-ID | <2017Jun6.121032@mips.complang.tuwien.ac.at> |
| In reply to | #60369 |
lehs <skydda.barnen@gmail.com> writes:
>How much faster would Forth become with maybe hundreds of highly optimized =
>stack juggling words, like under+, over+, tuck+, underdup, underswap,......=
>. which almost made juggling word combinations unnecessary?
A Forth compiler like VFX will not become any faster at all (indeed, I
have seen a case where a primitive resulted in slower code than what
VFX synthesized out of equivalent Forth code (of course, I would not
call that primitive "highly optimized"). Even in Gforth, if we want
to combine "OVER +" into a superinstruction, we just do it, and a
separate word will not help.
- anton
--
M. Anton Ertl http://www.complang.tuwien.ac.at/anton/home.html
comp.lang.forth FAQs: http://www.complang.tuwien.ac.at/forth/faq/toc.html
New standard: http://www.forth200x.org/forth200x.html
EuroForth 2017: http://www.euroforth.org/ef17/
[toc] | [prev] | [next] | [standalone]
| From | "Rudy Velthuis" <newsgroups@rvelthuis.de> |
|---|---|
| Date | 2017-06-07 19:28 +0000 |
| Message-ID | <xn0kqyf7uawwdbr008@nntp.aioe.org> |
| In reply to | #60369 |
lehs wrote: > How much faster would Forth become with maybe hundreds of highly > optimized stack juggling words, Probably not at all. The current words are probably optimized already, and I don't see why more words would make things faster. They could make certain things easier, sure, but faster? I doubt it. -- Rudy Velthuis http://www.rvelthuis.de "He has the attention span of a lightning bolt." -- Robert Redford
[toc] | [prev] | [next] | [standalone]
| From | Cecil Bayona <cbayona@cbayona.com> |
|---|---|
| Date | 2017-06-07 14:54 -0500 |
| Message-ID | <oh9len$q8q$1@dont-email.me> |
| In reply to | #60434 |
On 6/7/2017 2:28 PM, Rudy Velthuis wrote: > lehs wrote: > >> How much faster would Forth become with maybe hundreds of highly >> optimized stack juggling words, > > Probably not at all. The current words are probably optimized already, > and I don't see why more words would make things faster. They could > make certain things easier, sure, but faster? I doubt it. > I once wrote an optimizing Forth compiler and it used a variety of stack manipulation words to help in optimizing so many primitives were broken in extra pieces. But they were not available to write applications with, they were used internally to help optimize the code, the standard stack manipulation words were all one needed. -- Cecil - k5nwa
[toc] | [prev] | [next] | [standalone]
| From | lehs <skydda.barnen@gmail.com> |
|---|---|
| Date | 2017-06-07 19:42 -0700 |
| Message-ID | <1505aa2d-957f-4512-be70-ece57bd2174a@googlegroups.com> |
| In reply to | #60434 |
You have probably right. From your site it seems that you use a lot of languages and specially Delphi, but obviously you also use Forth. What is your opinion of Forth - what made you interested?
[toc] | [prev] | [next] | [standalone]
| From | "Rudy Velthuis" <newsgroups@rvelthuis.de> |
|---|---|
| Date | 2017-06-09 17:12 +0000 |
| Message-ID | <xn0kr14subbwnuw00c@nntp.aioe.org> |
| In reply to | #60452 |
lehs wrote: > You have probably right. > > From your site it seems that you use a lot of languages and specially > Delphi, but obviously you also use Forth. What is your opinion of > Forth - what made you interested? Acornsoft Forth on the Beeb. I always wanted to write my own Forth, completely in assembler and, of course, Forth. I started realizing that, and it works, more or less, but now I must find some time to finish and improve it. I did find out it is not as easy as I expected it to be. I particularly like the idea that Forth is (can be) both interpreter and compiler. -- Rudy Velthuis http://www.rvelthuis.de "... Somehow we find it hard to sell our values, namely that the rich should plunder the poor." -- John Foster Dulles
[toc] | [prev] | [next] | [standalone]
| From | Ilya Tarasov <ilya74.tarasov@gmail.com> |
|---|---|
| Date | 2017-06-04 17:40 -0700 |
| Message-ID | <e900b016-7c5a-4eac-aa3d-23b0fc4aabab@googlegroups.com> |
| In reply to | #60305 |
понедельник, 5 июня 2017 г., 1:14:31 UTC+3 пользователь Rudy Velthuis написал: > HAA wrote: > > > Brad Eckert wrote: > > > ... > > > Where to go with Forth? You might as well ask where to go with > > > religion. You don't need one true religion any more than you need > > > one true computer language. I'd say fork the hell out of ANS and > > > make it yours. Screw compatibility. If your dialect can be arrived > > > at (however tortuously) by 2012x, you're golden. > > > > Chuck might agree: > > > > "Portability is not important. Portability is not possible. Real > > applications are closely coupled to hardware. Change the platform and > > all the code changes. If it didn't, you wouldn't have changed the > > platform. To abstract the problem from the hardware requires massive > > software like Windows, that's a permanent tax on all applications to > > save some one-time programming." > > Yeah, just rewrite everything (and re-invent the wheel) all the time. > > Pfft! > > -- > Rudy Velthuis http://www.rvelthuis.de > > "A witty saying proves nothing." > -- Voltaire (1694-1778) Don't write another wheels. If you will count all new programs as wheels already invented, why many programs appears every day? Why even software designer profession still exist? While Forth is very easy to write, it may be re-implemented with desired features or for desired platform.
[toc] | [prev] | [next] | [standalone]
| From | "Rudy Velthuis" <newsgroups@rvelthuis.de> |
|---|---|
| Date | 2017-06-05 12:51 +0000 |
| Message-ID | <xn0kqvblo93wo7j005@nntp.aioe.org> |
| In reply to | #60314 |
Ilya Tarasov wrote: > > > "Portability is not important. Portability is not possible. Real > > > applications are closely coupled to hardware. Change the platform > > > and all the code changes. If it didn't, you wouldn't have changed > > > the platform. To abstract the problem from the hardware requires > > > massive software like Windows, that's a permanent tax on all > > > applications to save some one-time programming." > > > > Yeah, just rewrite everything (and re-invent the wheel) all the > > time. > > > > Pfft! > > Don't write another wheels. If you will count all new programs as > wheels already invented, why many programs appears every day? Many (apparently non-Forth) programs use libraries and only have to code the stuff that can not be put in a library and which distinguishes them from other programs. I really don't understand the aversion against existing, well tested, actively developed and often used libraries here. Yes, they may contain stuff you don't need. Don't use it. The argument that libraries contain too many dependencies and that if you need one feature, you must pull in a lot of other code, doesn't hold either. Well written libraries don't have such heavy dependencies. Badly written libraries seldom become popular. -- Rudy Velthuis http://www.rvelthuis.de "All I need to make a comedy is a park, a policeman and a pretty girl." -- Charlie Chaplin (1889-1977), in My Autobiography (1964)
[toc] | [prev] | [next] | [standalone]
| From | Ilya Tarasov <ilya74.tarasov@gmail.com> |
|---|---|
| Date | 2017-06-05 17:19 -0700 |
| Message-ID | <1c91177c-0035-4766-8509-ef0ffcdb9876@googlegroups.com> |
| In reply to | #60338 |
понедельник, 5 июня 2017 г., 15:51:59 UTC+3 пользователь Rudy Velthuis написал: > Ilya Tarasov wrote: > > > > > "Portability is not important. Portability is not possible. Real > > > > applications are closely coupled to hardware. Change the platform > > > > and all the code changes. If it didn't, you wouldn't have changed > > > > the platform. To abstract the problem from the hardware requires > > > > massive software like Windows, that's a permanent tax on all > > > > applications to save some one-time programming." > > > > > > Yeah, just rewrite everything (and re-invent the wheel) all the > > > time. > > > > > > Pfft! > > > > Don't write another wheels. If you will count all new programs as > > wheels already invented, why many programs appears every day? > > Many (apparently non-Forth) programs use libraries and only have to > code the stuff that can not be put in a library and which distinguishes > them from other programs. > > I really don't understand the aversion against existing, well tested, > actively developed and often used libraries here. Yes, they may contain > stuff you don't need. Don't use it. > > The argument that libraries contain too many dependencies and that if > you need one feature, you must pull in a lot of other code, doesn't > hold either. Well written libraries don't have such heavy dependencies. > Badly written libraries seldom become popular. > -- > Rudy Velthuis http://www.rvelthuis.de > > "All I need to make a comedy is a park, a policeman and a pretty > girl." -- Charlie Chaplin (1889-1977), in My Autobiography (1964) The fact is there are not a lot of Forth applications heavily based on libraries. Indeed, there are very small Forth projects. Playing a game like big boys will lead to failire, because libraries are required when we have many projects, need to make them compatible and want to bring then to market faster. There are so many projects? Also, what about function for adding two numbers, like a = b + c? Will you suggest to not to write such kind of code and use only existing, well tested adding functions? :) The question is what is Forth for programmers. For me, it is like b + c, it is easy and looks like code easier to rebuild rather than study what exactly already written and tested. There are many ideas about research, algorithm building and investigation, ad hoc automatization and scripting. All of these can be done with Forth very effective. This should be supported, instead of blaming.
[toc] | [prev] | [next] | [standalone]
| From | "Rudy Velthuis" <newsgroups@rvelthuis.de> |
|---|---|
| Date | 2017-06-07 19:32 +0000 |
| Message-ID | <xn0kqyfbrax233m00a@nntp.aioe.org> |
| In reply to | #60361 |
Ilya Tarasov wrote: > The fact is there are not a lot of Forth applications heavily based > on libraries. That is news to me. I was told that libraries contain a lot of cruft (especially a lot of code to make the application of the libraries more general) people don't need, so they rather write their own implementations, tailored to (optimized for) the specific goal. -- Rudy Velthuis http://www.rvelthuis.de "Prohibition goes beyond reason in that it attempts to control a man's appetite through legislation. A prohibition law strikes a blow at the very principles this country was founded upon." -- Abraham Lincoln
[toc] | [prev] | [next] | [standalone]
| From | Ilya Tarasov <ilya74.tarasov@gmail.com> |
|---|---|
| Date | 2017-06-07 16:50 -0700 |
| Message-ID | <e5911411-0145-4463-9149-6a3029b381b1@googlegroups.com> |
| In reply to | #60436 |
среда, 7 июня 2017 г., 22:32:48 UTC+3 пользователь Rudy Velthuis написал: > Ilya Tarasov wrote: > > > The fact is there are not a lot of Forth applications heavily based > > on libraries. > > That is news to me. I was told that libraries contain a lot of cruft > (especially a lot of code to make the application of the libraries more > general) people don't need, so they rather write their own > implementations, tailored to (optimized for) the specific goal. Declaring a pice of code as a library don't made it a library automatically. What exactly module written in Forth is well-known and widely used? I don't count things like 'strings345.f' and 'matrix78.f'. Also, Forth is more glue tool and can be based on other languages libraries.
[toc] | [prev] | [next] | [standalone]
| From | "Rudy Velthuis" <newsgroups@rvelthuis.de> |
|---|---|
| Date | 2017-06-09 17:15 +0000 |
| Message-ID | <xn0kr14vfbc0dcl00d@nntp.aioe.org> |
| In reply to | #60449 |
Ilya Tarasov wrote: > Declaring a pice of code as a library don't made it a library > automatically. What exactly module written in Forth is well-known and > widely used? You wrote that "there are not a lot of Forth applications heavily based on libraries." Which libraries are that? Now you say you don't know of any modules writte in Forth that are well-known and widely used. Doesn't that contradict what you wrote before? -- Rudy Velthuis http://www.rvelthuis.de "There's a fine line between being on the leading edge and being in the lunatic fringe." -- Frank Armstrong
[toc] | [prev] | [next] | [standalone]
| From | Ilya Tarasov <ilya74.tarasov@gmail.com> |
|---|---|
| Date | 2017-06-09 13:04 -0700 |
| Message-ID | <8752cc16-4e7f-432c-a94c-ab683f987918@googlegroups.com> |
| In reply to | #60510 |
пятница, 9 июня 2017 г., 20:15:23 UTC+3 пользователь Rudy Velthuis написал: > Ilya Tarasov wrote: > > > Declaring a pice of code as a library don't made it a library > > automatically. What exactly module written in Forth is well-known and > > widely used? > > You wrote that "there are not a lot of Forth applications heavily based > on libraries." Which libraries are that? > > Now you say you don't know of any modules writte in Forth that are > well-known and widely used. Doesn't that contradict what you wrote > before? > Indeed I don't know a single Forth application with well-known libraries :)
[toc] | [prev] | [next] | [standalone]
| From | "Rudy Velthuis" <newsgroups@rvelthuis.de> |
|---|---|
| Date | 2017-06-09 21:27 +0000 |
| Message-ID | <xn0kr1bhwbl0uvj002@nntp.aioe.org> |
| In reply to | #60529 |
Ilya Tarasov wrote: > пятница, 9 июня 2017 г., 20:15:23 UTC+3 пользователь Rudy Velthuis > написал: > > Ilya Tarasov wrote: > > > > > Declaring a pice of code as a library don't made it a library > > > automatically. What exactly module written in Forth is well-known > > > and widely used? > > > > You wrote that "there are not a lot of Forth applications heavily > > based on libraries." Which libraries are that? > > > > Now you say you don't know of any modules writte in Forth that are > > well-known and widely used. Doesn't that contradict what you wrote > > before? > > > > Indeed I don't know a single Forth application with well-known > libraries :) So, in other words, there are not a lot of Forth applications heavily based on libraries, unless you mean non-Forth libraries. I think it is sad that there are no well known and widely used libraries in Forth. OTOH, there are many many libraries for the currently popular languages. Perhaps that is one of the reasons they are popular. -- Rudy Velthuis http://www.rvelthuis.de "There is enough for man's need but not for man's greed." --Mohandas Gandhi
[toc] | [prev] | [next] | [standalone]
| From | anton@mips.complang.tuwien.ac.at (Anton Ertl) |
|---|---|
| Date | 2017-06-06 10:19 +0000 |
| Message-ID | <2017Jun6.121912@mips.complang.tuwien.ac.at> |
| In reply to | #60338 |
"Rudy Velthuis" <newsgroups@rvelthuis.de> writes:
>The argument that libraries contain too many dependencies and that if
>you need one feature, you must pull in a lot of other code, doesn't
>hold either. Well written libraries don't have such heavy dependencies.
Why not? When writing a library, you certainly have the same issue of
using a library for some of the stuff you need, or doing it yourself.
And if you are not a librarophobe (in which case you would not write a
library), you will tend to make use of a library, unless other
considerations speak against it. E.g., in the matmul library I made
use of Forth2012 words that some systems do not have yet, so I
included a copy of the reference implementation of these words.
Ideally I would just specify a dependency on the reference
implementation, but the dependency resolution mechanism of f is not
yet established enough for that.
Anyway, yes, if you depend on other stuff, the files of that other
stuff may contain parts you don't need. In memory-constrained systems
you will want to avoid loading unused words (and there is support for
that in many the Forth systems), but another issue is that you may
want to configure the library to leave away some features that you
don't need for the application. It's the library writer's task to
allow such configuration the library if the library is intended to run
on such systems.
But on big systems, what do I care if I load some unused code, even if
it's MBs in size?
And coming back to dependencies, if the dependency mechanism works,
it's better if the library L specifies a dependency on another library
S than just copying it or writing equivalent functionality. If
another library or the main application also uses S, that
functionality is loaded only once instead of several times.
It becomes tricky, though, if one library L1 depends on a newer
version of S, while L2 depends on an older version of S. One
workaround is to depend on an older version of L1 that also depended
on the older S.
- anton
--
M. Anton Ertl http://www.complang.tuwien.ac.at/anton/home.html
comp.lang.forth FAQs: http://www.complang.tuwien.ac.at/forth/faq/toc.html
New standard: http://www.forth200x.org/forth200x.html
EuroForth 2017: http://www.euroforth.org/ef17/
[toc] | [prev] | [next] | [standalone]
| From | "Rudy Velthuis" <newsgroups@rvelthuis.de> |
|---|---|
| Date | 2017-06-07 19:38 +0000 |
| Message-ID | <xn0kqyfghax8ur700b@nntp.aioe.org> |
| In reply to | #60379 |
Anton Ertl wrote: > "Rudy Velthuis" <newsgroups@rvelthuis.de> writes: > > The argument that libraries contain too many dependencies and that > > if you need one feature, you must pull in a lot of other code, > > doesn't hold either. Well written libraries don't have such heavy > > dependencies. > > Why not? Because they are well written. That is part of designing a good library (or of writing good code for any purpose): remove dependencies as much as you can. And I am not particularly talking about memory-constrained systems. There, you may need to get rid of anything but the bare metal, sure. And I agree, I don't mind loading unused code (although with a good incremental linker and good optimizing compiler), I won't even have to do that. Of course one library can depend on another, but it should only link in what it needs. -- Rudy Velthuis http://www.rvelthuis.de "Sometimes a scream is better than a thesis." -- Ralph Waldo Emerson
[toc] | [prev] | [next] | [standalone]
| From | anton@mips.complang.tuwien.ac.at (Anton Ertl) |
|---|---|
| Date | 2017-06-08 11:52 +0000 |
| Message-ID | <2017Jun8.135217@mips.complang.tuwien.ac.at> |
| In reply to | #60437 |
"Rudy Velthuis" <newsgroups@rvelthuis.de> writes:
>Anton Ertl wrote:
>
>> "Rudy Velthuis" <newsgroups@rvelthuis.de> writes:
>> > The argument that libraries contain too many dependencies and that
>> > if you need one feature, you must pull in a lot of other code,
>> > doesn't hold either. Well written libraries don't have such heavy
>> > dependencies.
>>
>> Why not?
>
>Because they are well written. That is part of designing a good library
>(or of writing good code for any purpose): remove dependencies as much
>as you can.
This is just a repetition of the statement that I questioned. Again:
Why do you consider that good?
>Of course one library can depend on another, but it should
>only link in what it needs.
Well, of course. And it should only depend on things it needs. But
we often have the choice to add a dependency on some other library
because we want some function of that library, or to have a copy of
that function in our library or application, or to reimplement that
functionality in our library or application. In my view each approach
has advantages and disadvantages, and we have to balance them based on
the concrete situation. Unconditionally removing "dependencies as
much as you can" means always using copying or reimplementation, and
foregoes the advantages of dependences.
- anton
--
M. Anton Ertl http://www.complang.tuwien.ac.at/anton/home.html
comp.lang.forth FAQs: http://www.complang.tuwien.ac.at/forth/faq/toc.html
New standard: http://www.forth200x.org/forth200x.html
EuroForth 2017: http://www.euroforth.org/ef17/
[toc] | [prev] | [next] | [standalone]
Page 3 of 4 — ← Prev page 1 2 [3] 4 Next page →
Back to top | Article view | comp.lang.forth
csiph-web