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

Adding xeus-cpp in the docs #162

Merged
merged 5 commits into from
Jan 27, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions docs/environment-cpp.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
name: xeus-cpp-kernel-docs
channels:
- https://repo.mamba.pm/emscripten-forge
- conda-forge
dependencies:
- xeus-cpp
31 changes: 29 additions & 2 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,10 @@ Currently supported kernels are:
- [xeus-python](https://github.com/jupyter-xeus/xeus-python)
- [xeus-lua](https://github.com/jupyter-xeus/xeus-lua)
- [xeus-r](https://github.com/jupyter-xeus/xeus-r)
- [xeus-cpp](https://github.com/compiler-research/xeus-cpp)
- [xeus-nelson](https://github.com/jupyter-xeus/xeus-nelson)
- [xeus-javascript](https://github.com/jupyter-xeus/xeus-javascript)

We are also working on bringing [xeus-cpp](https://github.com/compiler-research/xeus-cpp) and [xeus-r](https://github.com/jupyter-xeus/xeus-r) into jupyterlite, stay tuned!
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I guess we're in a decent spot to get rid of this line now ;) ?!


Try it here!

::::{tab-set}
Expand Down Expand Up @@ -71,6 +70,34 @@ Try it here!
print(eigen_result$vectors)
```

:::
:::{tab-item} C++

```{eval-rst}
.. replite::
:kernel: xcpp20
:height: 600px

#include <stdio.h>
#include <math.h>

void funky_sin_wave(int length) {
for (int y = 0; y < 20; y++) {
for (int x = 0; x < length; x++) {
double wave = sin(x * 0.1);
if ((int)(10 + 10 * wave) == y) {
printf("*");
} else {
printf(" ");
}
}
printf("\n");
}
}

funky_sin_wave(80);
```
Copy link
Contributor Author

@anutosh491 anutosh491 Jan 23, 2025

Choose a reason for hiding this comment

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

I ran out of ideas hence simply added a funky sine wave function 😅
Hope that is okay !

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Should look something like this

image


:::
::::

Expand Down
3 changes: 2 additions & 1 deletion docs/jupyter_lite_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
"environment_file": [
"environment-python.yml",
"environment-other.yml",
"environment-r.yml"
"environment-r.yml",
"environment-cpp.yml"
]
}
}
1 change: 1 addition & 0 deletions ui-tests/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@ dependencies:
- xeus-python
- xeus-lua
- xeus-r
- xeus-cpp
- pandas
- bqplot
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading