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


Groups > comp.lang.forth > #50820

Re: Implementing lisp in Forth. Chapter 4.

Path csiph.com!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From Paul Rubin <no.email@nospam.invalid>
Newsgroups comp.lang.forth
Subject Re: Implementing lisp in Forth. Chapter 4.
Date Sat, 10 Sep 2016 12:01:10 -0700
Organization A noiseless patient Spider
Lines 36
Message-ID <87d1kbk2a1.fsf@jester.gateway.pace.com> (permalink)
References <nq1ojd$rvh$1@cherry.spenarnc.xs4all.nl> <8737lkpr8n.fsf@jester.gateway.pace.com> <nq7rv3$lhl$1@cherry.spenarnc.xs4all.nl> <87twdznhhz.fsf@jester.gateway.pace.com> <nqbhus$4fp$1@cherry.spenarnc.xs4all.nl> <87fupfo6xl.fsf@jester.gateway.pace.com> <7d7764ab-19e2-44f2-a0e1-66f92798b03f@googlegroups.com>
Mime-Version 1.0
Content-Type text/plain; charset=utf-8
Content-Transfer-Encoding 8bit
Injection-Info mx02.eternal-september.org; posting-host="590ea01354cf4bcbcd857d7ebbd88128"; logging-data="18158"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1//oWLqZOUghbU/yF0wHYIn"
User-Agent Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)
Cancel-Lock sha1:1XhzWMSndInplu0N9ARuQyRxPfs= sha1:7CCO5AK9qu+7Z9MW4Ir+TJum4Bg=
Xref csiph.com comp.lang.forth:50820

Show key headers only | View raw


lawrencedo99@gmail.com writes:
>> ... ALLOC notices if you're running low on memory
> How does it decide when you are “running low on memory”?

"running low on memory" was a poor choice of words.  In the case of
gc.fs, I believe it gc's after every N bytes of allocations, where N is
a parameter you can set.  That is typical of simple gc's.  But I don't
have it in front of me.   Fancier GC's use more complicated schemes to
decide when and how to gc.

> Does it limit your heap size, like Java does?

You can set the gc.fs heap size to your liking when you initialize the
gc, but once you do, it can't be changed.

Java allows you to limit the heap size with the -Xmx option but doesn't
require you to, I thought.

> Why not use reference-counting as a first resort, only falling back to
> GC when you need to, like Perl and Python do?

I can't speak for Perl but I think refcounting was a poor design
decision in CPython.  It had a period of usefulness because before the
addition of the "with" statement, people relied on its undocumented
behaviour of finalizing objects as soon as the last reference went away
as a poor man's RAII.  But "with" and context managers are the right way
to do that in Python.  Refcounting clutters up the C API, misses
reclaiming cyclic data (so a gc had to be added after the fact), is
slower than decent gc even in a single thread, mandates the notorious
GIL when multiple threads are running, etc.

I don't know of any other Python implementations besides CPython that
use refcounting.  PyPy, MicroPython, IronPython, Jython, and another one
whose name I've forgotten all use gc.  Afaict, refcounting is a simple
and easily understood method that tempts naive programmers but gc is
better in most situations.

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


Thread

Implementing lisp in Forth. Chapter 4. albert@cherry.spenarnc.xs4all.nl (Albert van der Horst) - 2016-08-29 18:41 +0200
  Re: Implementing lisp in Forth. Chapter 4. Paul Rubin <no.email@nospam.invalid> - 2016-08-29 09:39 -0700
    Re: Implementing lisp in Forth. Chapter 4. albert@cherry.spenarnc.xs4all.nl (Albert van der Horst) - 2016-08-30 10:49 +0200
  Re: Implementing lisp in Forth. Chapter 4. Paul Rubin <no.email@nospam.invalid> - 2016-08-29 09:46 -0700
    Re: Implementing lisp in Forth. Chapter 4. albert@cherry.spenarnc.xs4all.nl (Albert van der Horst) - 2016-08-30 11:07 +0200
      Re: Implementing lisp in Forth. Chapter 4. Rod Pemberton <NoHaveNotOne@zxdehrnyya.cam> - 2016-08-30 08:00 -0400
        Re: Implementing lisp in Forth. Chapter 4. albert@cherry.spenarnc.xs4all.nl (Albert van der Horst) - 2016-09-02 12:34 +0200
      Re: Implementing lisp in Forth. Chapter 4. Paul Rubin <no.email@nospam.invalid> - 2016-08-31 14:23 -0700
        Re: Implementing lisp in Forth. Chapter 4. albert@cherry.spenarnc.xs4all.nl (Albert van der Horst) - 2016-09-01 02:15 +0200
          Re: Implementing lisp in Forth. Chapter 4. Paul Rubin <no.email@nospam.invalid> - 2016-09-01 19:49 -0700
            Re: Implementing lisp in Forth. Chapter 4. albert@cherry.spenarnc.xs4all.nl (Albert van der Horst) - 2016-09-02 11:49 +0200
              Re: Implementing lisp in Forth. Chapter 4. Paul Rubin <no.email@nospam.invalid> - 2016-09-04 11:28 -0700
                Re: Implementing lisp in Forth. Chapter 4. albert@cherry.spenarnc.xs4all.nl (Albert van der Horst) - 2016-09-05 03:31 +0200
                Re: Implementing lisp in Forth. Chapter 4. Paul Rubin <no.email@nospam.invalid> - 2016-09-04 21:03 -0700
                Re: Implementing lisp in Forth. Chapter 4. Spiros Bousbouras <spibou@gmail.com> - 2016-09-05 07:47 +0000
                Re: Implementing lisp in Forth. Chapter 4. albert@cherry.spenarnc.xs4all.nl (Albert van der Horst) - 2016-09-05 12:05 +0200
                Re: Implementing lisp in Forth. Chapter 4. Paul Rubin <no.email@nospam.invalid> - 2016-09-05 12:04 -0700
                Re: Implementing lisp in Forth. Chapter 4. albert@cherry.spenarnc.xs4all.nl (Albert van der Horst) - 2016-09-06 11:48 +0200
                Re: Implementing lisp in Forth. Chapter 4. Spiros Bousbouras <spibou@gmail.com> - 2016-09-06 15:32 +0000
                Re: Implementing lisp in Forth. Chapter 4. albert@cherry.spenarnc.xs4all.nl (Albert van der Horst) - 2016-09-06 21:27 +0200
                Re: Implementing lisp in Forth. Chapter 4. anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2016-09-06 19:50 +0000
                Re: Implementing lisp in Forth. Chapter 4. Stefan Monnier <monnier@iro.umontreal.ca> - 2016-09-08 12:15 -0400
                Re: Implementing lisp in Forth. Chapter 4. albert@cherry.spenarnc.xs4all.nl (Albert van der Horst) - 2016-09-08 20:09 +0200
                Re: Implementing lisp in Forth. Chapter 4. Paul Rubin <no.email@nospam.invalid> - 2016-09-08 12:34 -0700
                Re: Implementing lisp in Forth. Chapter 4. anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2016-09-12 10:17 +0000
                Re: Implementing lisp in Forth. Chapter 4. Stefan Monnier <monnier@iro.umontreal.ca> - 2016-09-12 11:50 -0400
                Re: Implementing lisp in Forth. Chapter 4. anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2016-09-12 16:48 +0000
                Re: Implementing lisp in Forth. Chapter 4. Stefan Monnier <monnier@iro.umontreal.ca> - 2016-09-12 13:41 -0400
                Re: Implementing lisp in Forth. Chapter 4. Paul Rubin <no.email@nospam.invalid> - 2016-09-06 22:03 -0700
                Re: Implementing lisp in Forth. Chapter 4. George Neuner <gneuner2@comcast.net> - 2016-09-08 16:50 -0400
                Re: Implementing lisp in Forth. Chapter 4. Paul Rubin <no.email@nospam.invalid> - 2016-09-08 16:34 -0700
                Re: Implementing lisp in Forth. Chapter 4. George Neuner <gneuner2@comcast.net> - 2016-09-09 00:12 -0400
                Re: Implementing lisp in Forth. Chapter 4. Paul Rubin <no.email@nospam.invalid> - 2016-09-08 22:22 -0700
                Re: Implementing lisp in Forth. Chapter 4. Lars Brinkhoff <lars.spam@nocrew.org> - 2016-09-27 08:51 +0200
                Re: Implementing lisp in Forth. Chapter 4. Paul Rubin <no.email@nospam.invalid> - 2016-09-27 00:47 -0700
                Re: Implementing lisp in Forth. Chapter 4. Spiros Bousbouras <spibou@gmail.com> - 2016-09-06 13:18 +0000
                Re: Implementing lisp in Forth. Chapter 4. "WJ" <w_a_x_man@yahoo.com> - 2016-09-06 20:52 +0000
                Re: Implementing lisp in Forth. Chapter 4. albert@cherry.spenarnc.xs4all.nl (Albert van der Horst) - 2016-11-02 19:15 +0100
                Re: Implementing lisp in Forth. Chapter 4. Lars Brinkhoff <lars.spam@nocrew.org> - 2016-09-09 10:05 +0200
                Re: Implementing lisp in Forth. Chapter 4. anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2016-09-12 10:11 +0000
                Re: Implementing lisp in Forth. Chapter 4. Lars Brinkhoff <lars.spam@nocrew.org> - 2016-09-12 13:15 +0200
                Re: Implementing lisp in Forth. Chapter 4. anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2016-09-12 17:25 +0000
                Re: Implementing lisp in Forth. Chapter 4. albert@cherry.spenarnc.xs4all.nl (Albert van der Horst) - 2016-09-09 16:19 +0200
                Re: Implementing lisp in Forth. Chapter 4. Paul Rubin <no.email@nospam.invalid> - 2016-09-09 10:55 -0700
                Re: Implementing lisp in Forth. Chapter 4. albert@cherry.spenarnc.xs4all.nl (Albert van der Horst) - 2016-09-09 21:39 +0200
                Re: Implementing lisp in Forth. Chapter 4. Paul Rubin <no.email@nospam.invalid> - 2016-09-09 13:06 -0700
                Re: Implementing lisp in Forth. Chapter 4. franck.bensusan@gmail.com - 2016-09-10 07:23 -0700
                Re: Implementing lisp in Forth. Chapter 4. Paul Rubin <no.email@nospam.invalid> - 2016-09-11 01:28 -0700
                Re: Implementing lisp in Forth. Chapter 4. Spiros Bousbouras <spibou@gmail.com> - 2016-09-13 21:37 +0000
                Re: Implementing lisp in Forth. Chapter 4. albert@cherry.spenarnc.xs4all.nl (Albert van der Horst) - 2016-09-14 09:55 +0200
                Re: Implementing lisp in Forth. Chapter 4. franck.bensusan@gmail.com - 2016-09-14 01:04 -0700
                Re: Implementing lisp in Forth. Chapter 4. Paul Rubin <no.email@nospam.invalid> - 2016-09-13 14:40 -0700
                Re: Implementing lisp in Forth. Chapter 4. franck.bensusan@gmail.com - 2016-09-14 03:37 -0700
                Re: Implementing lisp in Forth. Chapter 4. lawrencedo99@gmail.com - 2016-09-10 01:17 -0700
                Re: Implementing lisp in Forth. Chapter 4. Paul Rubin <no.email@nospam.invalid> - 2016-09-10 12:01 -0700
                Re: Implementing lisp in Forth. Chapter 4. lawrencedo99@gmail.com - 2016-09-10 21:57 -0700
                Re: Implementing lisp in Forth. Chapter 4. Paul Rubin <no.email@nospam.invalid> - 2016-09-10 22:12 -0700
                Re: Implementing lisp in Forth. Chapter 4. lawrencedo99@gmail.com - 2016-09-10 23:30 -0700
                Re: Implementing lisp in Forth. Chapter 4. Paul Rubin <no.email@nospam.invalid> - 2016-09-10 23:48 -0700
                Re: Implementing lisp in Forth. Chapter 4. Andrew Haley <andrew29@littlepinkcloud.invalid> - 2016-09-11 02:59 -0500
                Re: Implementing lisp in Forth. Chapter 4. Paul Rubin <no.email@nospam.invalid> - 2016-09-11 01:16 -0700
                Re: Implementing lisp in Forth. Chapter 4. lawrencedo99@gmail.com - 2016-09-11 19:02 -0700
                Re: Implementing lisp in Forth. Chapter 4. lawrencedo99@gmail.com - 2016-09-11 19:00 -0700
                Re: Implementing lisp in Forth. Chapter 4. Paul Rubin <no.email@nospam.invalid> - 2016-09-10 12:08 -0700
                Re: Implementing lisp in Forth. Chapter 4. anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2016-09-12 09:43 +0000
                Re: Implementing lisp in Forth. Chapter 4. albert@cherry.spenarnc.xs4all.nl (Albert van der Horst) - 2016-09-12 13:42 +0200
                Re: Implementing lisp in Forth. Chapter 4. anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2016-09-12 17:26 +0000
                Re: Implementing lisp in Forth. Chapter 4. albert@cherry.spenarnc.xs4all.nl (Albert van der Horst) - 2016-09-12 20:56 +0200
                Re: Implementing lisp in Forth. Chapter 4. Paul Rubin <no.email@nospam.invalid> - 2016-09-12 13:08 -0700
                Re: Implementing lisp in Forth. Chapter 4. anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2016-09-14 07:38 +0000
    Re: Implementing lisp in Forth. Chapter 4. Gerry Jackson <gerry@jackson9000.fsnet.co.uk> - 2016-09-30 07:48 +0100
      Re: Implementing lisp in Forth. Chapter 4. albert@cherry.spenarnc.xs4all.nl (Albert van der Horst) - 2016-09-30 11:22 +0200
      Re: Implementing lisp in Forth. Chapter 4. Paul Rubin <no.email@nospam.invalid> - 2016-09-30 18:36 -0700
        Re: Implementing lisp in Forth. Chapter 4. albert@cherry.spenarnc.xs4all.nl (Albert van der Horst) - 2016-10-01 11:19 +0200
          Re: Implementing lisp in Forth. Chapter 4. luser droog <mijoryx@yahoo.com> - 2016-10-01 19:34 -0700
  Implementing lisp in Forth. Garbage collection. albert@cherry.spenarnc.xs4all.nl (Albert van der Horst) - 2016-09-06 12:30 +0200
    Re: Implementing lisp in Forth. Garbage collection. Spiros Bousbouras <spibou@gmail.com> - 2016-09-06 15:34 +0000
      Re: Implementing lisp in Forth. Garbage collection. albert@cherry.spenarnc.xs4all.nl (Albert van der Horst) - 2016-09-06 21:12 +0200
    Re: Implementing lisp in Forth. Garbage collection. Paul Rubin <no.email@nospam.invalid> - 2016-09-06 14:52 -0700
      Re: Implementing lisp in Forth. Garbage collection. albert@cherry.spenarnc.xs4all.nl (Albert van der Horst) - 2016-09-07 01:50 +0200
        Re: Implementing lisp in Forth. Garbage collection. Paul Rubin <no.email@nospam.invalid> - 2016-09-06 17:49 -0700
  Re: Implementing lisp in Forth. Chapter 4. luser droog <mijoryx@yahoo.com> - 2016-10-21 17:02 -0700
    Re: Implementing lisp in Forth. Chapter 4. albert@cherry.spenarnc.xs4all.nl (Albert van der Horst) - 2016-10-22 02:43 +0200

csiph-web