* scheme-modules.texi (Compiled Code Modules): replace
[bpt/guile.git] / NEWS
diff --git a/NEWS b/NEWS
index 75987bf..25a0810 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -6,6 +6,80 @@ Please send Guile bug reports to bug-guile@gnu.org.
 \f
 Changes since the stable branch:
 
+* Changes to the standalone interpreter
+
+** New command line option `--no-debug'.
+
+Specifying `--no-debug' on the command line will keep the debugging
+evaluator turned off, even for interactive sessions.
+
+** User-init file ~/.guile is now loaded with the debugging evaluator.
+
+Previously, the normal evaluator would have been used.  Using the
+debugging evaluator gives better error messages.
+
+* Changes to Scheme functions and syntax
+
+** New function 'unsetenv'.
+
+** There is support for Infinity and NaNs.
+
+Following PLT Scheme, Guile can now work with infinite numbers, and
+'not-a-numbers'.
+
+There is new syntax for numbers: "+inf.0" (infinity), "-inf.0"
+(negative infinity), "+nan.0" (not-a-number), and "-nan.0" (same as
+"+nan.0").  These numbers are inexact and have no exact counterpart.
+
+Dividing by an inexact zero returns +inf.0 or -inf.0, depending on the
+sign of the dividend.  The infinities are integers, and they answer #t
+for both 'even?' and 'odd?'. The +nan.0 value is not an integer and is
+not '=' to itself, but '+nan.0' is 'eqv?' to itself.
+
+For example
+
+    (/ 1 0.0)
+    => +inf.0
+
+    (/ 0 0.0)
+    => +nan.0
+
+    (/ 0)
+    ERROR: Numerical overflow
+
+Two new predicates 'inf?' and 'nan?' can be used to test for the
+special values.
+
+** Inexact zero can have a sign.
+
+Guile can now distinguish between plus and minus inexact zero, if your
+platform supports this, too.  The two zeros are equal according to
+'=', but not according to 'eqv?'.  For example
+
+    (- 0.0)
+    => -0.0
+
+    (= 0.0 (- 0.0))
+    => #t
+
+    (eqv? 0.0 (- 0.0))
+    => #f
+
+** We now have uninterned symbols.
+
+The new function 'make-symbol' will return a uninterned symbol.  This
+is a symbol that is unique and is guaranteed to remain unique.
+However, uninterned symbols can not yet be read back in.
+
+Use the new function 'symbol-interned?' to check whether a symbol is
+interned or not.
+
+** pretty-print has more options.
+
+The function pretty-print from the (ice-9 pretty-print) module can now
+also be invoked with keyword arguments that control things like
+maximum output width.  See its online documentation.
+
 ** Variables have no longer a special behavior for `equal?'.
 
 Previously, comparing two variables with `equal?' would recursivly
@@ -17,8 +91,67 @@ compare their values.  This is no longer done.  Variables are now only
 You can now use an empty `begin' form.  It will yield #<unspecified>
 when evaluated and simply be ignored in a definition context.
 
+** Removed: substring-move-left!, substring-move-right!
+
+Use `substring-move!' instead.
+
+** Deprecated: procedure->macro
+
+Change your code to use either procedure->memoizing-macro or, probably better,
+to use r5rs macros.  Also, be aware that macro expansion will not be done
+during evaluation, but prior to evaluation.
+
 * Changes to the C interface
 
+** The SCM_VELTS macros now returns a read-only vector. For writing,
+use the new macros SCM_WRITABLE_VELTS, SCM_SET_VECTOR_LENGTH.  The use
+of SCM_WRITABLE_VELTS is discouraged, though.
+
+** Garbage collector rewrite.
+
+The garbage collector is cleaned up a lot, and now uses lazy
+sweeping. This is reflected in the output of (gc-stats); since cells
+are being freed when they are allocated, the cells-allocated field
+stays roughly constant.
+
+For malloc related triggers, the behavior is changed. It uses the same
+heuristic as the cell-triggered collections.  It may be tuned with the
+environment variables GUILE_MIN_YIELD_MALLOC.  This is the percentage
+for minimum yield of malloc related triggers. The default is 40.
+GUILE_INIT_MALLOC_LIMIT sets the initial trigger for doing a GC. The
+default is 200 kb.
+
+Debugging operations for the freelist have been deprecated, along with
+the C variables that control garbage collection.  The environment
+variables GUILE_MAX_SEGMENT_SIZE, GUILE_INIT_SEGMENT_SIZE_2,
+GUILE_INIT_SEGMENT_SIZE_1, and GUILE_MIN_YIELD_2 should be used.
+
+** The struct scm_cell has been renamed to scm_t_cell
+
+This is in accordance to Guile's naming scheme for types.  Note that
+the name scm_cell is now used for a function that allocates and
+initializes a new cell (see below).
+
+** New functions for memory management
+
+A new set of functions for memory management has been added since the
+old way (scm_must_malloc, scm_must_free, etc) was error prone and
+indeed, Guile itself contained some long standing bugs that could
+cause aborts in long running programs.
+
+The new functions are more symmetrical and do not need cooperation
+from smob free routines, among other improvements.
+
+The new functions are scm_malloc, scm_realloc, scm_calloc, scm_strdup,
+scm_strndup, scm_gc_malloc, scm_gc_calloc, scm_gc_realloc,
+scm_gc_free, scm_gc_register_collectable_memory, and
+scm_gc_unregister_collectable_memory.  Refer to the manual for more
+details and for upgrading instructions.
+
+The old functions for memory management have been deprecated.  They
+are: scm_must_malloc, scm_must_realloc, scm_must_free,
+scm_must_strdup, scm_must_strndup, scm_done_malloc, scm_done_free.
+
 ** New function: scm_str2string
 
 This function creates a scheme string from a 0-terminated C string.  The input
@@ -32,12 +165,120 @@ declaration.  This macro can expand into different things, the most
 common of which is just "extern" for Unix platforms.  On Win32, it can
 be used to control which symbols are exported from a DLL.
 
-If you `#define __SCM_IMPORT__' before including <libguile.h>, SCM_API
+If you `#define SCM_IMPORT' before including <libguile.h>, SCM_API
 will expand into "__declspec (dllimport) extern", which is needed for
 linking to the Guile DLL in Windows.
 
-There are also __SCM_RL_IMPORT__, __SCM_SRFI1314_IMPORT__, and
-__SCM_SRFI4_IMPORT__, for the corresponding libraries.
+There are also SCM_RL_IMPORT, QT_IMPORT, SCM_SRFI1314_IMPORT, and
+SCM_SRFI4_IMPORT, for the corresponding libraries.
+
+** SCM_NEWCELL and SCM_NEWCELL2 have been deprecated.
+
+Use the new functions scm_cell and scm_double_cell instead.  The old macros
+had problems because with them allocation and initialization was separated and
+the GC could sometimes observe half initialized cells.  Only careful coding by
+the user of SCM_NEWCELL and SCM_NEWCELL2 could make this safe and efficient.
+
+** CHECK_ENTRY, CHECK_APPLY and CHECK_EXIT have been deprecated.
+
+Use the variables scm_check_entry_p, scm_check_apply_p and scm_check_exit_p
+instead.
+
+** SRCBRKP has been deprecated.
+
+Use scm_c_source_property_breakpoint_p instead.
+
+** Deprecated: scm_makmacro
+
+Change your code to use either scm_makmmacro or, probably better, to use r5rs
+macros.  Also, be aware that macro expansion will not be done during
+evaluation, but prior to evaluation.
+
+** Removed from scm_root_state: def_inp, def_outp, def_errp, together
+with corresponding macros scm_def_inp, scm_def_outp and scm_def_errp.
+These were undocumented and unused copies of the standard ports at the
+time that Guile was initialised.  Normally the current ports should be
+used instead, obtained from scm_current_input_port () etc.  If an
+application needs to retain earlier ports, it should save them in a
+gc-protected location.
+
+** Removed compile time option MEMOIZE_LOCALS
+
+Now, caching of local variable positions during memoization is mandatory.
+However, the option to disable the caching has most probably not been used
+anyway.
+
+** Removed compile time option SCM_RECKLESS
+
+Full number of arguments checking of closures is mandatory now.  However, the
+option to disable the checking has most probably not been used anyway.
+
+** Removed compile time option SCM_CAUTIOUS
+
+Full number of arguments checking of closures is mandatory now.  However, the
+option to disable the checking has most probably not been used anyway.
+
+** Removed definitions:  scm_lisp_nil, scm_lisp_t, s_nil_ify, scm_m_nil_ify,
+s_t_ify, scm_m_t_ify, s_0_cond, scm_m_0_cond, s_0_ify, scm_m_0_ify, s_1_ify,
+scm_m_1_ify, scm_debug_newcell,        scm_debug_newcell2, scm_tc16_allocated,
+SCM_SET_SYMBOL_HASH, SCM_IM_NIL_IFY, SCM_IM_T_IFY, SCM_IM_0_COND,
+SCM_IM_0_IFY, SCM_IM_1_IFY, SCM_GC_SET_ALLOCATED, scm_debug_newcell,
+scm_debug_newcell2, scm_substring_move_left_x, scm_substring_move_right_x,
+long_long, ulong_long, scm_sizet, SCM_WNA, SCM_OUTOFRANGE, SCM_NALLOC,
+SCM_HUP_SIGNAL, SCM_INT_SIGNAL, SCM_FPE_SIGNAL,        SCM_BUS_SIGNAL,
+SCM_SEGV_SIGNAL, SCM_ALRM_SIGNAL, SCM_GC_SIGNAL, SCM_TICK_SIGNAL,
+SCM_SIG_ORD, SCM_ORD_SIG, SCM_NUM_SIGS, moddata, registered_mods,
+scm_register_module_xxx, scm_registered_modules,
+scm_clear_registered_modules, scm_wta, *top-level-lookup-closure*,
+scm_top_level_lookup_closure_var, scm_system_transformer, scm_eval_3,
+scm_eval2, SCM_SETAND_CAR, SCM_SETOR_CAR, SCM_SETAND_CDR, SCM_SETOR_CDR,
+SCM_FREEP, SCM_NFREEP, SCM_GC8MARKP, SCM_SETGC8MARK, SCM_CLRGC8MARK,
+SCM_GCTYP16, SCM_GCCDR, scm_remember, scm_protect_object,
+scm_unprotect_object, root_module_lookup_closure, scm_sym_app,
+scm_sym_modules, module_prefix, make_modules_in_var,
+beautify_user_module_x_var, try_module_autoload_var, scm_module_full_name,
+scm_the_root_module, scm_make_module, scm_ensure_user_module,
+scm_load_scheme_module, scm_port, scm_ptob_descriptor, scm_port_rw_active,
+scm_close_all_ports_except, scm_rstate, scm_rng, scm_i_rstate,
+SCM_SLOPPY_STRINGP, SCM_RWSTRINGP, SCM_STRING_UCHARS, SCM_STRING_CHARS,
+scm_read_only_string_p, scm_makstr, scm_makfromstr,
+scm_make_shared_substring, scm_tc7_substring, SCM_SLOPPY_CONSP,
+SCM_SLOPPY_NCONSP, scm_tc7_ssymbol, scm_tc7_msymbol, scm_tcs_symbols,
+sym_huh, scm_variable_set_name_hint, scm_builtin_variable, SCM_VARVCELL,
+SCM_UDVARIABLEP, SCM_DEFVARIABLEP, scm_internal_with_fluids,
+scm_make_gsubr, scm_make_gsubr_with_generic, scm_create_hook, list*,
+SCM_LIST0, SCM_LIST1, SCM_LIST2, SCM_LIST3, SCM_LIST4, SCM_LIST5,
+SCM_LIST6, SCM_LIST7, SCM_LIST8, SCM_LIST9, scm_listify, scm_sloppy_memq,
+scm_sloppy_memv, scm_sloppy_member, scm_end_of_file_key,
+scm_read_and_eval_x, scm_mkbig, scm_big2inum, scm_adjbig, scm_normbig,
+scm_copybig, scm_2ulong2big, scm_dbl2big, scm_big2dbl, SCM_FIXNUM_BIT,
+scm_subr_entry, SCM_SUBR_DOC, scm_make_subr_opt, scm_make_subr,
+scm_make_subr_with_generic, setjmp_type, setjmp_type,
+scm_call_catching_errors, scm_make_smob_type_mfpe, scm_set_smob_mfpe,
+scm_strprint_obj, scm_read_0str, scm_eval_0str, SCM_CHARS, SCM_UCHARS,
+SCM_SETCHARS, SCM_SLOPPY_SUBSTRP, SCM_SUBSTR_STR, SCM_SUBSTR_OFFSET,
+SCM_LENGTH_MAX, SCM_LENGTH, SCM_SETLENGTH, SCM_ROSTRINGP, SCM_ROLENGTH,
+SCM_ROCHARS, SCM_ROUCHARS, SCM_SUBSTRP, SCM_COERCE_SUBSTR, scm_strhash,
+scm_sym2vcell, scm_sym2ovcell_soft, scm_sym2ovcell,
+scm_intern_obarray_soft, scm_intern_obarray, scm_intern, scm_intern0,
+scm_sysintern, scm_sysintern0, scm_sysintern0_no_module_lookup,
+scm_symbol_value0, scm_string_to_obarray_symbol, scm_intern_symbol,
+scm_unintern_symbol, scm_symbol_binding, scm_symbol_interned_p,
+scm_symbol_bound_p, scm_symbol_set_x, scm_gentemp,
+scm_init_symbols_deprecated, s_vector_set_length_x, scm_vector_set_length_x,
+scm_contregs, scm_debug_info, scm_debug_frame, SCM_DSIDEVAL, SCM_OPDIRP,
+scm_fport, scm_option, SCM_CONST_LONG, SCM_VCELL, SCM_GLOBAL_VCELL,
+SCM_VCELL_INIT, SCM_GLOBAL_VCELL_INIT, scm_srcprops, scm_srcprops_chunk,
+scm_info_frame, scm_stack, scm_array, scm_array_dim, SCM_ARRAY_CONTIGUOUS,
+SCM_HUGE_LENGTH, SCM_FUNC_NAME, SCM_WTA, RETURN_SCM_WTA,
+SCM_VALIDATE_NUMBER_COPY, SCM_VALIDATE_NUMBER_DEF_COPY,
+SCM_VALIDATE_STRINGORSUBSTR, SCM_VALIDATE_ROSTRING,
+SCM_VALIDATE_ROSTRING_COPY, SCM_VALIDATE_NULLORROSTRING_COPY,
+SCM_VALIDATE_RWSTRING, SCM_VALIDATE_OPDIR, DIGITS, scm_small_istr2int,
+scm_istr2int, scm_istr2flo, scm_istring2number, scm_istr2int,
+scm_istr2flo, scm_istring2number, scm_vtable_index_vcell, scm_si_vcell,
+SCM_ECONSP, SCM_NECONSP, SCM_GLOC_VAR, SCM_GLOC_VAL, SCM_GLOC_SET_VAL,
+SCM_GLOC_VAL_LOC, scm_make_gloc, scm_gloc_p, scm_tc16_variable
 
 Changes since Guile 1.4:
 
@@ -66,6 +307,11 @@ micro version number.
 
 In addition, ./GUILE-VERSION now defines GUILE_MICRO_VERSION.
 
+** New preprocessor definitions are available for checking versions.
+
+version.h now #defines SCM_MAJOR_VERSION, SCM_MINOR_VERSION, and
+SCM_MICRO_VERSION to the appropriate integer values.
+
 ** Guile now actively warns about deprecated features.
 
 The new configure option `--enable-deprecated=LEVEL' and the