-
Notifications
You must be signed in to change notification settings - Fork 2
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
visualization blog edits #66
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.
Looks good to me. Sentences are smoother now.
Lots more quotes, some sentences now have a bit to many quotes for me. Feels like every odd word is quoted. Especially line 22, 50, 126, 127
Can you correct the links on the plot images so they point to renamed directory?
@@ -4,8 +4,8 @@ | |||
#include "newtonraphson.hpp" | |||
|
|||
int main() { | |||
double initial_guess = -4; | |||
double tolerance = 0.001; | |||
float initial_guess = -4; |
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.
Nice inconsistency find
Emscripten can handle simple types like float and int, but needs help exposing more complex types to JavaScript like the iterations property. | ||
We need to use [value_object](https://emscripten.org/docs/porting/connecting_cpp_and_javascript/embind.html#value-types) to expose the Iteration struct and [register_vector](https://emscripten.org/docs/porting/connecting_cpp_and_javascript/embind.html#built-in-type-conversions) as the iterations property type. | ||
Emscripten can handle simple types like `float` and `int`, but needs help exposing more complex types to JavaScript like the `iterations` property. | ||
We need to use [`value_object`](https://emscripten.org/docs/porting/connecting_cpp_and_javascript/embind.html#value-types) to expose the `Iteration` `struct` and [`register_vector`](https://emscripten.org/docs/porting/connecting_cpp_and_javascript/embind.html#built-in-type-conversions) as the `iterations` property type. |
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.
Links are already rendered differently, they do not need more highlighting
We need to use [`value_object`](https://emscripten.org/docs/porting/connecting_cpp_and_javascript/embind.html#value-types) to expose the `Iteration` `struct` and [`register_vector`](https://emscripten.org/docs/porting/connecting_cpp_and_javascript/embind.html#built-in-type-conversions) as the `iterations` property type. | |
We need to use [value_object](https://emscripten.org/docs/porting/connecting_cpp_and_javascript/embind.html#value-types) to expose the `Iteration` `struct` and [register_vector](https://emscripten.org/docs/porting/connecting_cpp_and_javascript/embind.html#built-in-type-conversions) as the `iterations` property type. |
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.
strictly speaking I don't care to highlight them, but I want to emphasize that I'm referring to something in the code. It's your call though.
|
||
```shell | ||
emcc -I. -o newtonraphson.js -Oz -s MODULARIZE=1 \ | ||
-s EXPORT_NAME=createModule --bind newtonraphson.cpp bindings.cpp | ||
``` | ||
|
||
<!-- |
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.
Ah, I forgot about that one, nice to see #65
…C-JCER/run-cpp-on-web into jspaaks-visualization-edits
Agree, but not quoting them is not the right solution to me |
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 can not think of another way to tell the string is part of a code snippet.
Lets keep the quotes for consistencies sake.
This PR adds a couple of edits on the visualization blog, mostly style and rephrase and such.