-
Notifications
You must be signed in to change notification settings - Fork 11
GHC JS browser introduction blog post/tutorial #24
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks good, thanks Josh!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just a few minor things, no big restructuring! Good Job!
As discussed in the GHC call, we should probably document clearly that the JS backend isn't feature complete yet to lower expectations (mentioning missing TH, etc.). |
Is this appropriate for the conclusion section? |
At the end of the introduction perhaps to be sure that most people read it? |
Hey, is this possible to also add a small example of passing Haskell callback into foreign code? Something along the lines of
(is it possible yet in the alpha?) |
Hey, I was planning to answer your original comments about this (https://discourse.haskell.org/t/ghc-js-backend-calling-haskell-callback-in-a-foreign-function/5591) :) I don't think this is supported yet. We've only ported basic foreign imports, not foreign exports nor magical foreign imports ( |
Oh sorry, I thought you may have not seen it. Sorry then for polluting the PR. |
No problem! Thanks for trying the backend and for the nudge! :-) We'll try to prioritize foreign exports and to publish a blog post about them as soon as they are supported. |
Co-authored-by: Jeffrey Young <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've left a few more comments.
Some of @doyougnu's comments don't appear anymore in the "changes" view afaict. For example I remember him asking for a screenshot of the result. That would be nice to have. I've re-added a comment about this.
Also the path of the md file isn't correct: it must be directly in the blog
directly for it to be found by the blog engine (I think).
I don't think we have a static asset folder defined in and I bet that's why docusaurus looks at |
Thanks for finding the setting! Hopefully it’s enough that I’ve added that now. |
just pushed a bunch of fixes. The conclusion needs to be fixed to not repeat (almost verbatim) the introduction. The conclusion should recite the entire post, but inside out (that is, started from the last thing in the post and work its way back to the introduction). Other than that LGTM! |
Added a conclusion rewording |
I've added a few changes. LGTM |
<script language="javascript" src="all.js" defer></script> | ||
``` | ||
|
||
As the JS backend still lacks support for some FFI features (foreign exports, foreign "wrapper" imports...), JavaScript codes can't easily interact with Haskell codes. It reduces the amount of advanced/interesting examples we can present for now. We'll publish new blog posts illustrating these features when they will be implemented. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if the createCallback
API has been merged, if it's the case then we might link to it for people who are a bit more adventurous. Now it looks like it's more limited than it actually is.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know either. Let's keep this for a future blog post IMHO
No description provided.