Repository navigation
Conversation
The sort and shuffle code now also builds with Emscripten. AnotherFunc.hpp leaves out the SFML parts when __EMSCRIPTEN__ or SORTVIS_NO_SFML is defined. The native build does not change. web/shim.cpp replaces Main.cpp and the menu. Its drawing() records the steps into a log, like record mode. It has the glibc rand(), so a seed gives the same shuffle as the Linux program. build_web.sh builds web/dist/sortvis.js and sortvis.wasm. The CI has a new web job, and releases attach the two files. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_012G3kWcaMBo7MSwGBgwXaju
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.
What
A WebAssembly build of the sort and shuffle algorithms. The portfolio page at https://ilyaeis.github.io/apps/sorting/ will use it. The drawing there is a JavaScript port of
ArrayDrawer.cpp.Code/AnotherFunc.hpp: the SFML include and allsf::declarations are left out when__EMSCRIPTEN__orSORTVIS_NO_SFMLis defined. The native build does not change.SortAlgorithms.cppandShuffleAlgorithms.cppdo not change.web/shim.cpp: replacesMain.cppand the menu in the web build.drawing()records the steps, like record mode: a dry run counts the steps, then the real run saves every n-th step.rand()andsrand()work like glibc (TYPE_3), so a seed gives the same shuffle as the Linux program.sv_srand,sv_rand,sv_fill,sv_gen_shuffle,sv_shuffle,sv_sort,sv_log,sv_array,sv_length.build_web.sh: buildsweb/dist/sortvis.jsandweb/dist/sortvis.wasm(ES module,createSortVis). About 16 KB gzip for both files.webjob uploads the artifactsortvis-web. A release also attaches the two files.web/dist/is in.gitignore.Checks
rand()gives the same 16,000 numbers as glibcrand()(8 seeds, 2,000 numbers each).🤖 Generated with Claude Code
https://claude.ai/code/session_012G3kWcaMBo7MSwGBgwXaju