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

Import and export Pharo source from the image to support V3 #434

Open
samWson opened this issue Jan 17, 2021 · 1 comment
Open

Import and export Pharo source from the image to support V3 #434

samWson opened this issue Jan 17, 2021 · 1 comment
Assignees
Labels
v3 Exercism version 3

Comments

@samWson
Copy link
Contributor

samWson commented Jan 17, 2021

Rationale

In Pharo everything is done in the image, a file that is a snapshot of object memory. This means that Pharo source code is written inside the IDE. It is not written in text files like almost every other programming language in existence. Exercism requires plain text source code files for exercises.

How we did this in V2

It is possible to export source code from Pharo already. There serialization format called Tonel that was made for versioning code with Git and is also human readable. It is not a suitable format for editing text outside of the Pharo IDE. In V2 our code would serialize source as strings in Tonel format and use its own HTTP client to send the exercises directly to Exercism. This also bypassed the need to use the exercism command line client.

The problem

I had attempted to refactor the existing V2 code to support V3 exercises. This proved too difficult a task given that the code was not in a state that readily supported quick extension and my time for working on Exercism is very limited. For these reasons I want to do a fresh start writing a new V3 import/export tool from zero code.

Requirements

Assuming a student is working on their personal computer:

  • an exercise can be fetched from Exercism and imported into the image
  • an exercise can be exported from the image and pushed to Exercism

Supporting online editing is out of scope for this issue.

Given how little time I have to spend on this I am deliberately choosing a more modest feature set for V3 support. If things can be done outside the IDE (such as Markdown) then they will. For now I'm happy to depend on the exercism command line client. Doing HTTP requests inside the image can be considered later.

@ErikSchierboom
Copy link
Member

For now I'm happy to depend on the exercism command line client.

That seems like a great plan.

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

No branches or pull requests

2 participants