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

WIP: tool migration to Chibi-scheme #6

Closed
wants to merge 12 commits into from
Closed

WIP: tool migration to Chibi-scheme #6

wants to merge 12 commits into from

Conversation

ekaitz-zarraga
Copy link

Migration of all the tools to chibi scheme.
Pull request for discussion and development

Ekaitz Zárraga and others added 4 commits October 29, 2019 23:03
    - Externs created and fully tested
    - Clean structure
    - Prepare for wrappers but still TODO

(define (default_syscall_ret-wrapper wrapper)
(joined displayed
`( "\tcase" ,(hash-table-ref wrapper 'id) ":" ,nl
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use (indent N) function

Copy link
Author

@ekaitz-zarraga ekaitz-zarraga left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Added some support for elegant indentation not based on tabs and fixed to 4 spaces.
    • Have to make it coherent in the whole file
  • Still not really sure about the use of joined displayed pair all the time. There should be a simpler way to solve it.
  • Thinking about making a macro/function that creates simple codeblocks line by line from a list of lines to avoid having to use indent and nl so much. Just send lines in a list and let the func join everything together.

    - Replace `joined displayed` with `each` which fits better the job
    sometimes
    - Add some extra templates
    - Replace `case` with `cond` in the broken cases
@ekaitz-zarraga
Copy link
Author

First working version of ksyscalls in chibi-scheme, tested against an output c file generated by the go tools and has a 100% match in the output.

Please @Shamar take a look to this.

@Shamar
Copy link
Member

Shamar commented Jan 6, 2020

Looks fine to me.

As for indentation, C code in Jehanne is indented with tabs (as in Plan 9). Feel free to indent scheme as you like, but I'd prefer to have all C code we are responsible for that follows the same conventions.

Also, please wait before attacking usyscalls: I've modified it in the process of porting GCC (because of... reasons...) and if you port the current version in master it would requires some adjustments later. I hope to complete the port in few weeks, so I hope it won't be a huge issue.

@ekaitz-zarraga
Copy link
Author

As for indentation, C code in Jehanne is indented with tabs (as in Plan 9). Feel free to indent scheme as you like, but I'd prefer to have all C code we are responsible for that follows the same conventions.

UGH TABS ;)

Anyway I prepared the code to be able to work on that easily.
Just added a commit that solves that.

@Shamar
Copy link
Member

Shamar commented Jan 6, 2022

Hi @ekaitz-zarraga I finally moved Jehanne out of GitHub.

I close this issue, as I've also replaced Go with rc scripts.

Thanks for your help and support!

@Shamar Shamar closed this Jan 6, 2022
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.

2 participants