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

Various code changes #9

Merged
merged 9 commits into from Dec 29, 2020
Merged

Various code changes #9

merged 9 commits into from Dec 29, 2020

Conversation

schierlm
Copy link
Contributor

This started with fixing symbol->string and string->symbol, but got a few more fixes that came up once module loading worked.

At the moment when trying to load mes/module/mes/boot.scm, it does not segfault, but probably is stuck again in a macro expansion bug.

My suggested readme change comes in a separate pull request, as it may bring up more controversy.

Feel free to cherry-pick what you like and drop what you don't like.

append can take any number of chars, and there is already a Scheme
implementation in mes that uses append2 to implement append.

Also, fix the require statement in builtin_append to what it probably
should have been.
The former did not correctly determine the length of the symbol name,
resulting in "" all the time. The latter did not properly intern the new
symbol (in case it was not known yet), resulting in

    (equal? (string->symbol "newfoo") (string->symbol "newfoo"))

to return #f, and in consequence resulting in the same module being
loaded multiple times.
Used as "page separators" in some scheme files
And override getenv accordingly.
It now dies when trying to load srfi-13 (due to a segfault in the macro
let handling code)
For example:

    (define-macro (foo1 q)
      (let ((qq 0))
        (list '+ q qq)))

    (define (foo2)
       (foo1 0))
Probably could be reverted if someone finds the actual bug. For now, I
like the expression without quasiquotes better anyway.
I don't make any claim whether the code should work now, as to be honest
I don't understand why things are done how they are done. At least this
should reduce segfaults considerably.
@oriansj oriansj merged commit 89c1649 into oriansj:master Dec 29, 2020
@schierlm schierlm deleted the symbols branch December 29, 2020 20:10
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.

None yet

2 participants