Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes issue #51 #53

Closed
wants to merge 2 commits into from
Closed

Conversation

mparlaktuna
Copy link
Contributor

Signed-off-by: Mustafa Parlaktuna mparlaktuna@gmail.com
Fixes #51
0 was not counted during length calculation for arange. I added a calculate-range function to check the signs of start, stop and difference. Tested with the arange function calls inside example.lisp

… stop

Signed-off-by: Mustafa Parlaktuna <mparlaktuna@gmail.com>
@mparlaktuna
Copy link
Contributor Author

mparlaktuna commented Feb 15, 2021

By the way I had to remove file 5reduce to be able to compile locally. It crashes with
fatal error encountered in SBCL pid 7860(tid 0x7f7109b532c0): Heap exhausted, game over.
That might be the reason Travis CI is failing.

@guicho271828
Copy link
Contributor

hi, thanks for the patch.

fatal error encountered in SBCL pid 7860(tid 0x7f7109b532c0): Heap exhausted, game over.

This is related to the default sbcl heap size. Give dynamic-space-size=8000 when you launch sbcl.

@guicho271828
Copy link
Contributor

The patch does not seem to account for the cases where start/stop are floats or other number types.
this might be the cause of these regressions:
https://travis-ci.org/github/numcl/numcl/jobs/759123203#L444
https://travis-ci.org/github/numcl/numcl/jobs/759123202#L543

@guicho271828
Copy link
Contributor

if it is fixed, then please consider making calculate-range inline.

@guicho271828
Copy link
Contributor

another thing I can think of is to add failure cases to the tests.

Signed-off-by: Mustafa Parlaktuna <mparlaktuna@gmail.com>
@mparlaktuna
Copy link
Contributor Author

Thanks for the suggestions. I think I got it fixed. What type of failure cases were you thinking about?

@mparlaktuna
Copy link
Contributor Author

I started writing some tests and realized it is not fixed yet. I will continue working on it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

(arange -10 10 3) => #(-10 -7 -4 -1 2 5) ?
2 participants