Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.forth > #60379

Re: What is Forth anyway?

From anton@mips.complang.tuwien.ac.at (Anton Ertl)
Newsgroups comp.lang.forth
Subject Re: What is Forth anyway?
Date 2017-06-06 10:19 +0000
Organization Institut fuer Computersprachen, Technische Universitaet Wien
Message-ID <2017Jun6.121912@mips.complang.tuwien.ac.at> (permalink)
References <c6575998-6325-4a53-8b1c-8435d9c1c3dd@googlegroups.com> <oh10m5$jnn$1@gioia.aioe.org> <xn0kquojy8frp4t003@nntp.aioe.org> <e900b016-7c5a-4eac-aa3d-23b0fc4aabab@googlegroups.com> <xn0kqvblo93wo7j005@nntp.aioe.org>

Show all headers | View raw


"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/

Back to comp.lang.forth | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

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

csiph-web