Add ability to use files from git#134
Merged
Merged
Conversation
Contributor
|
Thanks! I merged it, let's see if it works. Note that LFortran at this webpage is using its experimental direct WASM backend, which has limitations. Our LLVM backend can now compile almost any Fortran, but doesn't run well in the browser, so we'll have to improve the browser experience. We'll do that after we reach beta quality, hopefully later this year. |
Contributor
|
I think it works! This loads the code. It doesn't compile due to the WASM prototype backend, but otherwise everything works. |
Contributor
Author
|
Great! It should be very useful for introductory courses already. Thanks |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Really cool project!
Related to #81 and #114, this enables you to load a fortran file from github. The querystring format is very simple, it's everything that comes after raw.githubusercontent.com basically. So
?github=carpentries-incubator/intro-to-modern-fortran/refs/heads/main/exercises/03-maths/solutions/lennard_jones_potential.f90, for example to open https://github.com/carpentries-incubator/intro-to-modern-fortran/blob/main/exercises/03-maths/solutions/lennard_jones_potential.f90You could in theory split the query up into user+repo (or have these also separate), path to file within repo, and branch (default to HEAD), but this won't really save any space in the URL (should remain well under any limits) and there are no defaults for all of it except branch.
This would be quite helpful for us (well, not me because I don't know any fortran, but some nice people who I am working with today) to develop accessible lessons for fortran :)