enhance load_string return result of last eval
My mistake, it does allocate cells the sizeof(cell), not size ADJ. So it is NOT using excessive memory for cell structs. But I would still like to understand why it uses ADJ.
Memory allocation for struct cell is excessive
Potential uninitialized read problem (_EOF_OBJ)
r131 | kcozens | 2023-06-20 12:08:59 -0400 (Tue, 20 Jun 2023) | 2 lines Oops... The EOF_OBJ cell wasn't being initialized. Fixes bug #47. Thank you for the report. Apologies that it took so long for me to address this issue. I will be checking the code to see if there are any other cells that are not getting initialized.
Oops... The EOF_OBJ cell wasn't being initialized. Fixes bug #47.
Enhance error messages for mismatched parens
(quit 1) does not write an error message
#f is atom
compliance of quotient, modulo, remainder to r5rs
Potential uninitialized read problem (_EOF_OBJ)
Hm. rev77 is where the bug was introduced. Sorry, I poorly explained. Bug is due to overflow in multiplication, which may give negative with two positive numbers, for example.
Kevin, sorry, but there is some mystery. I think I see this in current trunk: https://sourceforge.net/p/tinyscheme/code/HEAD/tree/trunk/scheme.c#l475
You must be using an old version of TinyScheme and/or GIMP. This was fixed in TinyScheme around 9 years ago in r77. The num_mod() routine in both the SF version of TinyScheme and the version included with GIMP are the same. That gitlab commit is wrong in that the R5RS clearly states the sign of the result is the sign of the second operand.
Modulo bug due to internal multiplication (from GIMP repo)
OP_ROUND: Use nearbyint
Bugfix: load: Don't set inport
Eliminated possible compiler warning.
Handle "else" in cond-expand.
Test suite
mk_atom: set has_fp_exp
mk_atom: set has_fp_exp
Good catch. r129 | kcozens | 2020-09-27 17:18:22 -0400 (Sun, 27 Sep 2020) | 2 lines mk_atom forgot to set has_fp_exp. From patch #21 by Jesse Rosenstock.
mk_atom forgot to set has_fp_exp. From patch #21 by Jesse Rosenstock.
truncate: Use C99 trunc
Good point, Jesse. Thanks for the patch. r128 | kcozens | 2020-09-27 16:26:54 -0400 (Sun, 27 Sep 2020) | 2 lines Use trunc() from C99. From patch #20 by Jesse Rosenstock.
Use trunc() from C99. From patch #20 by Jesse Rosenstock.
Use x and y declared at top of opexe_2 to save repeating some car() and
Seemingly is duplicated by https://sourceforge.net/p/tinyscheme/patches/26/ but in current version just removing two lines (as suggested there) looks enough (works correctly in both interpreted and script mode).
This seems to be severe! It prevents ./scheme reading from console when program is run from file. Would be good to merge the suggested patch unless it breaks anything :) E.g. if we create the file test.scm: (display "Enter something:") (display (read)) (newline) and try running it with ./scheme test.scm, it won't stop to wait for user input, instead printing literally Enter something:(newline).
current-input-port should be stdin
string-ref / vector-ref should negate is_integer check
string-ref / vector-ref should negate is_integer check
Thanks for catching this. r126 | kcozens | 2020-09-22 19:31:57 -0400 (Tue, 22 Sep 2020) | 3 lines Oops. The is_integer checks needed to be negated. Fixes bug #45. From a patch by Rodion Gorkovenko.
Oops. The is_integer checks needed to be negated.
string-ref / vector-ref should negate is_integer check
+1 to adding spaces around the minus operator :-) Would be great to see this and other old patches in the queue eventually land in official upstream TinyScheme 1.43.
Use strcasecmp on OS X
r125 | kcozens | 2020-08-02 14:38:06 -0400 (Sun, 02 Aug 2020) | 2 lines Don't define APPLE in the makefile. From patch #17 by Jesse Rosenstock.
Don't define APPLE in the makefile. From patch #17 by Jesse Rosenstock.
Eliminated compiler warning.
Eliminated a compiler warning. Corrected a comment about remainder.
num_rem, num_mod: Fix bug with flonum args
Thanks for the report and the patch. When I looked at R5RS and TinyScheme I also discovered a problem with quotient. I have applied the patch and made a couple of other related changes. r122 | kcozens | 2020-06-25 13:07:35 -0400 (Thu, 25 Jun 2020) | 6 lines R5RS compatibility fix. Return proper type for remainder and modulo. The changes include the patch from patch #24 by Jesse Rosentstock. Additional changes include quotient only taking two arguments, and a minor optimization in execution of quotient,...
R5RS compatibility fix. Return proper type for remainder and modulo.
Bugfix: load: Don't set inport
Here's a new version with less special case code.
OP_ROUND: Use nearbyint
num_rem, num_mod: Fix bug with flonum args
OP_DIV: Allow zero divisor
Read and display +inf.0, -inf.0, +nan.0, -nan.0
mk_atom: set has_fp_exp
truncate: Use C99 trunc
Here's an updated version where I could also move port_srfi6 and realloc_port_string under the ifdef.
Oops, that patch file was empty. Trying again.
Define some functions only when USE_STRING_PORTS
reserve_cells: define only if USE_INTERFACE
makefile: Don't #define __APPLE__
Thanks for the patch. I am unable to test building on an Apple but I have gone ahead and applied your change. Fixed in revision r121 (2020-06-13 13:55:50).
Don't define APPLE in makefile. From patch #16 by Jesse Rosenstock.
Use strcasecmp on OS X
makefile: Don't #define __APPLE__
Eliminated last compiler warning when compiled with -Wall.
Another change from 2004 to quiet more compiler warnings.
Finally applied a patch from 2004 that quiets some compiler warnings.
TinyScheme 1.42 has been released
Inexact integers permitted as indices
Thanks for the report, Saul. I added checks for exact indexes to string-ref, string-set!, vector-ref, and vector-set!. I can't change list-ref as that is implemented in Scheme in the init.scm file. Fixed in revision 117 (2020-05-29 22:56:11).
String-ref, string-set!, vector-ref, and vector-set! index must be integer.
Removed branch created by mistake.
Really tagged the 1.42 version this time. Previous "tag" was a branch.
Forgot to update version number in scheme.c file.
I just ran a test of calling scheme_load_named_file() four times in a row and it worked without crashing. Can you still reproduce the problem? If not, this bug can be closed as obsolete.
wrongly defined macro crashes instead of signalling error
Fixed in revision r113 (2020-05-27 20:39:22 -0400).
Prevent seg fault if scheme_load_named_file is passed NULL for file pointer.
Tagging the 1.42 release of Tinyscheme.
Bumped the version number for the 1.42 release.
wrongly defined macro crashes instead of signalling error
Fixed segfault in atom2str due to some break st...
Make various limits configurable. From a patch...
I'd like to see this patch merged. My workaround was to make that limit configurable,...
Fix function prototype for scheme_init_new().
Ticket moved from /p/tinyscheme/bugs/40/
Have 'number->string' comply with R5RS
Thank you for the patch. Support for optional radix was implemented in revision 92....
scons file to build tinyscheme
Thank you for the file. FYI, it was missing 'dl' from LIBS. Added in version 107...
Added simple file to allow building via scons. ...
Ticket moved from /p/tinyscheme/patches/9/
Warnings cleanup
Closing this report as no attachment was been provided.
Add tinyscheme to *features*
Patch applied in SVN version #106.
Added "tinyscheme" to the features list. From p...
Removed redundant 'break;' statements.
Forgot to commit the updated CHANGES file as pa...