├── .github ├── FUNDING.yml ├── ISSUE_TEMPLATE │ ├── bug_report.md │ ├── custom.md │ └── feature_request.md └── workflows │ ├── aws-s3-upload.yml │ ├── nodejs.yml │ ├── release-s3.yml │ └── release.yml ├── .gitignore ├── CONTRIBUTING.md ├── LICENSE ├── README.md ├── docker ├── Dockerfile └── example_launch_linux.sh ├── docs ├── .gitignore ├── HedgehogScript │ ├── array.md │ ├── class.md │ ├── control-flow.md │ ├── function.md │ ├── hedgehog-script.md │ ├── hello-world.md │ ├── string.md │ └── variables.md ├── LICENSE ├── README.md ├── SUMMARY.md ├── book.json ├── contribute.md ├── overview.md └── tutorials │ ├── README.md │ ├── basic-syntax.md │ ├── data-preparation.md │ ├── data-visualization.md │ ├── gpu-acceleration.md │ ├── markdown.md │ ├── matrix-operations.md │ ├── module-management.md │ ├── share-code-via-url.md │ ├── symbolic-computation.md │ └── tex.md ├── hedgehog-docs ├── Hedgehog-Lab │ ├── Advanced Topics │ │ ├── Data Visualization.mdx │ │ ├── GPU acceleration.mdx │ │ ├── Markdown.mdx │ │ ├── Symbolic Computation.mdx │ │ ├── Table.mdx │ │ └── TeX.mdx │ ├── Browser Requirements.mdx │ ├── Execution Results.mdx │ ├── Features.mdx │ ├── Programming Language.mdx │ ├── Registering.mdx │ ├── Resources.mdx │ ├── The Environment.mdx │ ├── intro-hedgehog-lab.md │ └── package-management.mdx ├── Hedgehog-Script │ ├── 1. intro-hedgehog-script.md │ ├── 2. Expressions & Operators │ │ ├── Expressions & Operators.md │ │ ├── Null.mdx │ │ ├── Regular Expression.mdx │ │ ├── Variables.mdx │ │ └── this.mdx │ ├── 3. Statements and Declarations │ │ ├── Conditional Statements.mdx │ │ ├── Declarations.mdx │ │ ├── Exception Handling.mdx │ │ └── Loop Statements.mdx │ ├── 4. Built-In Objects │ │ ├── Array.mdx │ │ ├── Basic Types.mdx │ │ ├── Data Structures │ │ │ ├── Data Structures.draft │ │ │ └── Extra Useful Data Structures.draft │ │ ├── JSON.mdx │ │ ├── Maps.mdx │ │ ├── Mat.mdx │ │ ├── NaN.mdx │ │ ├── Object.mdx │ │ ├── Output.mdx │ │ ├── Promises.draft │ │ ├── Set.mdx │ │ └── String.mdx │ ├── 5. Matrix and Tensor │ │ ├── Mat Object.mdx___ │ │ ├── Matrix.mdx │ │ ├── Symbol.mdx_ │ │ └── Tensor.mdx │ ├── 6. Functions │ │ ├── Arguments Object.mdx │ │ ├── Arrow Functions.mdx │ │ ├── Functions.mdx │ │ ├── HTTP requests and responses.draft │ │ ├── Method definitions.mdx │ │ └── Parameters.mdx │ ├── 7. Classes │ │ ├── Classes.mdx │ │ ├── Constructors.mdx │ │ ├── Private Class Features.md │ │ ├── Public Class Fields.md │ │ └── Static.draft │ ├── 8. Errors │ │ └── Errors.draft │ └── 9. Reference │ │ ├── Built-in Objects.draft │ │ ├── OpsAndExpressions.draft │ │ ├── Reference.draft │ │ ├── SetExamples.draft │ │ └── StringExamples.draft ├── Modules │ └── Modules.md ├── Quickbook │ └── intro-quickbook.md ├── README.md ├── babel.config.js ├── blog │ ├── 2019-05-28-first-blog-post.md │ ├── 2019-05-29-long-blog-post.md │ ├── 2021-08-01-mdx-blog-post.mdx │ ├── 2021-08-26-welcome │ │ ├── docusaurus-plushie-banner.jpeg │ │ └── index.md │ └── authors.yml ├── contribution │ ├── hedgehog-website.md │ └── intro-contribution.md ├── developer │ ├── hedgehog-canvas-components.md │ ├── hedgehog-core-components.md │ └── hedgehog-lab-components.md ├── docs │ ├── intro.md │ ├── tutorial-basics │ │ ├── _category_.json │ │ ├── congratulations.md │ │ ├── create-a-blog-post.md │ │ ├── create-a-document.md │ │ ├── create-a-page.md │ │ ├── deploy-your-site.md │ │ └── markdown-features.mdx │ └── tutorial-extras │ │ ├── _category_.json │ │ ├── img │ │ ├── docsVersionDropdown.png │ │ └── localeDropdown.png │ │ ├── manage-docs-versions.md │ │ └── translate-your-site.md ├── docusaurus.config.js ├── math │ ├── Basic Operations │ │ ├── Dot Divide.draft │ │ ├── Dot Multiply.draft │ │ ├── bounds.mdx │ │ ├── ceil.draft │ │ ├── check_input.draft │ │ ├── factorial.mdx │ │ ├── floor.mdx │ │ ├── gcd.mdx │ │ └── sum.mdx │ ├── Data │ │ ├── any_missing.mdx │ │ ├── fill_missing.mdx │ │ ├── is_local_max.mdx │ │ ├── is_local_min.mdx │ │ ├── is_missing.mdx │ │ ├── missing.mdx │ │ ├── normalize.mdx │ │ ├── rm_missing.mdx │ │ └── smooth.mdx │ ├── Decompositions │ │ ├── QR.mdx │ │ ├── cholesky.mdx │ │ └── lup.mdx │ ├── Linear Equation Systems │ │ ├── lsolve.mdx │ │ ├── lusolve.mdx │ │ └── usolve.mdx │ ├── Misc │ │ ├── all.mdx │ │ ├── deep_copy.mdx │ │ └── test.mdx │ ├── Probability and Statistics │ │ ├── Quantiles.mdx │ │ ├── correcoef.mdx │ │ ├── cov.mdx │ │ ├── iqr.mdx │ │ ├── max.mdx │ │ ├── mean.mdx │ │ ├── median.mdx │ │ ├── min.mdx │ │ ├── mink.mdx │ │ ├── multinomial.mdx │ │ ├── percentile.mdx │ │ └── rms.mdx │ ├── Properties │ │ ├── det.mdx │ │ ├── is_diag.mdx │ │ ├── is_number.mdx │ │ ├── is_symmetric.mdx │ │ ├── is_tril.mdx │ │ ├── is_triu.mdx │ │ ├── ndim.mdx │ │ ├── shape.mdx │ │ └── trace.mdx │ ├── Transformations and creations │ │ ├── flatten.mdx │ │ ├── hankel.mdx │ │ ├── identity.mdx │ │ ├── inv.mdx │ │ ├── magic.mdx │ │ ├── pascal.mdx │ │ ├── reshape.mdx │ │ ├── resize.mdx │ │ ├── toeplitz.draft │ │ ├── transpose.mdx │ │ └── vander.mdx │ └── intro-math.md ├── package-lock.json ├── package.json ├── sidebars.js ├── src │ ├── components │ │ └── HomepageFeatures │ │ │ ├── index.js │ │ │ └── styles.module.css │ ├── css │ │ └── custom.css │ └── pages │ │ ├── index.js │ │ ├── index.module.css │ │ └── markdown-page.md ├── static │ ├── .nojekyll │ └── img │ │ ├── browser_requirements_webgl.jpg │ │ ├── community.png │ │ ├── docusaurus.png │ │ ├── environment.png │ │ ├── execresults.png │ │ ├── execresults2.png │ │ ├── favicon.ico │ │ ├── features.png │ │ ├── githubIcon.png │ │ ├── githubIcon_32x32.png │ │ ├── googleIcon.png │ │ ├── googleIcon_32x32.png │ │ ├── hedgehog_1f994 copy.png │ │ ├── hedgehog_1f994.ico │ │ ├── hedgehog_1f994.png │ │ ├── linkedinIcon.png │ │ ├── linkedinIcon_16x16.png │ │ ├── linkedinIcon_32x32.png │ │ ├── logo.svg │ │ ├── profilearea.png │ │ ├── promises.png │ │ ├── register3.png │ │ ├── registerHHL.png │ │ ├── resources.png │ │ ├── timeline2.png │ │ ├── undraw_docusaurus_mountain.svg │ │ ├── undraw_docusaurus_react.svg │ │ ├── undraw_docusaurus_tree.svg │ │ ├── yourscript3.png │ │ ├── yourscripts.png │ │ └── yourscripts2.png └── yarn.lock ├── hedgehog-libs ├── README.md └── math │ ├── LICENSE │ ├── QR.hhs │ ├── QR_test.hhs │ ├── README.md │ ├── all.hhs │ ├── any_missing.hhs │ ├── any_missing_test.hhs │ ├── bounds.hhs │ ├── bounds_test.hhs │ ├── ceil.hhs │ ├── ceil_test.hhs │ ├── check_input.hhs │ ├── check_input_test.hhs │ ├── cholesky.hhs │ ├── cholesky_test.hhs │ ├── correcoef.hhs │ ├── correcoef_test.hhs │ ├── cov.hhs │ ├── cov_test.hhs │ ├── cubic_equation.hhs │ ├── cubic_equation_test │ ├── deep_copy.hhs │ ├── det.hhs │ ├── det_test.hhs │ ├── dot_divide.hhs │ ├── dot_divide_test.hhs │ ├── dot_multiply.hhs │ ├── dot_multiply_test.hhs │ ├── factorial.hhs │ ├── factorial_test.hhs │ ├── fillmissing.hhs │ ├── fillmissing_test.hhs │ ├── flatten.hhs │ ├── floor.hhs │ ├── floor_test.hhs │ ├── gcd.hhs │ ├── gcd_test.hhs │ ├── hankel.hhs │ ├── hankel_test.hhs │ ├── hedgehog-package.json │ ├── identity.hhs │ ├── identity_test.hhs │ ├── inv.hhs │ ├── iqr.hhs │ ├── iqr_test.hhs │ ├── is_diag.hhs │ ├── is_diag_test.hhs │ ├── is_local_max.hhs │ ├── is_local_max_test.hhs │ ├── is_local_min.hhs │ ├── is_local_min_test.hhs │ ├── is_missing.hhs │ ├── is_missing_test.hhs │ ├── is_number.hhs │ ├── is_symmetric.hhs │ ├── is_symmetric_test.hhs │ ├── is_tril.hhs │ ├── is_tril_test.hhs │ ├── is_triu.hhs │ ├── is_triu_test.hhs │ ├── lsolve.hhs │ ├── lsolve_test.hhs │ ├── lu.hhs │ ├── lu_test.hhs │ ├── lusolve.hhs │ ├── lusolve_test.hhs │ ├── magic.hhs │ ├── magic_test.hhs │ ├── max.hhs │ ├── mean.hhs │ ├── mean_test.hhs │ ├── median.hhs │ ├── median_test.hhs │ ├── min.hhs │ ├── mink.hhs │ ├── mink_test.hhs │ ├── missing.hhs │ ├── missing_test.hhs │ ├── multinomial.hhs │ ├── multinomial_test.hhs │ ├── ndim.hhs │ ├── ndim_test.hhs │ ├── normalize.hhs │ ├── normalize_test.hhs │ ├── package-lock.json │ ├── pascal.hhs │ ├── pascal_test.hhs │ ├── percentile.hhs │ ├── percentile_test.hhs │ ├── quadratic_equation.hhs │ ├── quadratic_equation_test.hhs │ ├── quantile.hhs │ ├── quantile_test.hhs │ ├── quartic_equation.hhs │ ├── quartic_equation_test.hhs │ ├── reshape.hhs │ ├── reshape_test.hhs │ ├── resize.hhs │ ├── resize_test.hhs │ ├── rmmissing.hhs │ ├── rmmissing_test.hhs │ ├── rms.hhs │ ├── rms_test.hhs │ ├── shape.hhs │ ├── smooth.hhs │ ├── smooth_test.hhs │ ├── standard_missing.hhs │ ├── standard_missing_test.hhs │ ├── sum.hhs │ ├── test.hhs │ ├── toeplitz.hhs │ ├── trace.hhs │ ├── trace_test.hhs │ ├── transpose.hhs │ ├── transpose_test.hhs │ ├── usolve.hhs │ ├── usolve_test.hhs │ ├── vander.hhs │ └── vander_test.hhs ├── hedgehog-package-manager ├── LICENSE ├── README.md └── hedgehog-packages.json ├── lerna.json ├── package.json ├── packages ├── hedgehog-canvas │ ├── .gitignore │ ├── README.md │ ├── package.json │ ├── public │ │ ├── favicon.ico │ │ ├── index.html │ │ ├── logo192.png │ │ ├── logo512.png │ │ ├── manifest.json │ │ └── robots.txt │ ├── src │ │ ├── App.css │ │ ├── App.test.tsx │ │ ├── App.tsx │ │ ├── Output │ │ │ ├── Output.tsx │ │ │ └── index.ts │ │ ├── index.css │ │ ├── index.tsx │ │ ├── logo.svg │ │ ├── react-app-env.d.ts │ │ ├── reportWebVitals.ts │ │ └── setupTests.ts │ └── tsconfig.json ├── hedgehog-core │ ├── .eslintrc │ ├── package-lock.json │ ├── package.json │ ├── readme.md │ ├── src │ │ ├── index.ts │ │ ├── lib │ │ │ ├── mathlib.ts │ │ │ ├── matrix.ts │ │ │ ├── symbolic.ts │ │ │ ├── table.ts │ │ │ └── tensor.ts │ │ ├── output │ │ │ └── output-item.ts │ │ ├── runtime │ │ │ ├── globalConfigVars.ts │ │ │ ├── index.ts │ │ │ ├── prelude.ts │ │ │ └── vars.ts │ │ ├── transpiler │ │ │ ├── CodeSnippetObject.ts │ │ │ ├── FetchURL │ │ │ │ ├── fetchApi.ts │ │ │ │ └── fetchURL.ts │ │ │ ├── GithubDependency │ │ │ │ └── githubDependency.ts │ │ │ ├── operator-overload.ts │ │ │ ├── preprocessor.ts │ │ │ ├── splitSourceCodeIntoJSandHHSSnippetList.ts │ │ │ └── transpiler-core.ts │ │ └── utilites │ │ │ ├── fetch-library.ts │ │ │ └── process-raw-inputs.ts │ ├── test │ │ ├── basicTest │ │ │ └── test.ts │ │ ├── js-embedded-test │ │ │ ├── complexTest.ts │ │ │ └── simpleTest.ts │ │ ├── matrixTest │ │ │ └── matrixOperatorTest.ts │ │ └── test.ts │ ├── tsconfig.json │ └── webpack.config.js ├── hedgehog-lab │ ├── .eslintrc │ ├── .gitignore │ ├── config-overrides.js │ ├── package.json │ ├── public │ │ ├── cat.png │ │ ├── favicon.ico │ │ ├── index.html │ │ ├── logo192.png │ │ ├── logo512.png │ │ ├── manifest.json │ │ └── robots.txt │ ├── readme.md │ ├── src │ │ ├── App.css │ │ ├── App.tsx │ │ ├── HedgehogLab.tsx │ │ ├── index.css │ │ ├── index.tsx │ │ └── react-app-env.d.ts │ └── tsconfig.json └── hedgehog-website │ ├── .eslintrc │ ├── .gitignore │ ├── config-overrides.js │ ├── package.json │ ├── public │ ├── cat.png │ ├── favicon.ico │ ├── index.html │ ├── logo192.png │ ├── logo512.png │ ├── manifest.json │ └── robots.txt │ ├── src │ ├── App.css │ ├── App.tsx │ ├── compiler.ts │ ├── compiler.worker.ts │ ├── components │ │ ├── Auth │ │ │ ├── Account │ │ │ │ └── AccountMenu.tsx │ │ │ ├── Action │ │ │ │ └── AuthAction.tsx │ │ │ └── Dialog │ │ │ │ └── AuthDialog.tsx │ │ ├── Base │ │ │ ├── Editor │ │ │ │ ├── Editor.tsx │ │ │ │ └── Loading.tsx │ │ │ ├── Input │ │ │ │ ├── BaseOutlinedInput │ │ │ │ │ └── BaseOutlinedInput.tsx │ │ │ │ ├── Copy │ │ │ │ │ └── CopyInput.tsx │ │ │ │ ├── Description │ │ │ │ │ └── UserDescriptionInput.tsx │ │ │ │ ├── Email │ │ │ │ │ └── EmailInput.tsx │ │ │ │ ├── Password │ │ │ │ │ └── PasswordInput.tsx │ │ │ │ ├── Snippet │ │ │ │ │ ├── Description │ │ │ │ │ │ └── SnippetDescriptionInput.tsx │ │ │ │ │ └── Name │ │ │ │ │ │ └── SnippetNameInput.tsx │ │ │ │ └── UserName │ │ │ │ │ └── UserNameInput.tsx │ │ │ ├── Popup │ │ │ │ ├── BasePopupButton.tsx │ │ │ │ └── BasePopupText.tsx │ │ │ └── Theme │ │ │ │ └── SwitchThemeButton.tsx │ │ ├── Layout │ │ │ ├── ContainerLayout.tsx │ │ │ ├── Layout.tsx │ │ │ ├── ResizableColumn │ │ │ │ └── ResizableColumn.tsx │ │ │ ├── SideBar │ │ │ │ ├── SideBar.tsx │ │ │ │ ├── _sideList.tsx │ │ │ │ └── _sideListItem.tsx │ │ │ ├── SnippetsLayout │ │ │ │ └── SnippetsLayout.tsx │ │ │ └── TopBar │ │ │ │ ├── DevModeAlert.tsx │ │ │ │ ├── RightButton.tsx │ │ │ │ ├── TopBar.tsx │ │ │ │ ├── _communityButtons.tsx │ │ │ │ ├── _compilerButton.tsx │ │ │ │ ├── _fullScreenButton.tsx │ │ │ │ └── _gitHubButton.tsx │ │ ├── Meta │ │ │ ├── Meta.tsx │ │ │ └── types.ts │ │ ├── Results │ │ │ ├── OutputItemCompoments │ │ │ │ └── TableComponent.tsx │ │ │ └── Results.tsx │ │ ├── Share │ │ │ ├── ShareDialog.tsx │ │ │ └── SharePopup.tsx │ │ ├── Snippet │ │ │ ├── CreateSnippetDialog.tsx │ │ │ ├── Delete │ │ │ │ ├── DeleteAlert.tsx │ │ │ │ └── DeletePopup.tsx │ │ │ ├── List │ │ │ │ └── SnippetList.tsx │ │ │ ├── Rename │ │ │ │ └── RenameDialog.tsx │ │ │ ├── Save │ │ │ │ ├── SaveDialog.tsx │ │ │ │ └── SaveState.tsx │ │ │ ├── Search │ │ │ │ └── SearchSnippet.tsx │ │ │ ├── Snippet.tsx │ │ │ └── UpdatedSnippet.tsx │ │ ├── YourCode │ │ │ ├── Config │ │ │ │ └── SideBar.ts │ │ │ ├── Header │ │ │ │ └── YourCodeHeader.tsx │ │ │ └── YourCode.tsx │ │ └── styled.ts │ ├── config.tsx │ ├── hooks │ │ ├── useApp.tsx │ │ ├── useAuth.tsx │ │ ├── useCompilier.ts │ │ ├── useCurrentRoute.ts │ │ ├── useEditor.ts │ │ ├── useEditorMeta.ts │ │ ├── useSnippet.ts │ │ └── useSystemTheme.ts │ ├── index.css │ ├── index.tsx │ ├── interfaces │ │ ├── IFormInput.ts │ │ └── ISnippetName.ts │ ├── logo.svg │ ├── models │ │ ├── account │ │ │ └── accountModal.ts │ │ ├── forget │ │ │ └── forgetModal.ts │ │ ├── login │ │ │ └── loginModal.ts │ │ ├── sign │ │ │ └── signModel.ts │ │ └── snippet │ │ │ └── renameModal.ts │ ├── network │ │ ├── fetcher.ts │ │ └── http.ts │ ├── output.worker.ts │ ├── pages │ │ ├── Auth │ │ │ ├── Auth.tsx │ │ │ ├── Forget.tsx │ │ │ ├── Login.tsx │ │ │ └── Sign.tsx │ │ ├── Draft │ │ │ └── Draft.tsx │ │ ├── Email │ │ │ └── EmailVerification.tsx │ │ ├── Example │ │ │ └── Example.tsx │ │ ├── Explore │ │ │ └── Explore.tsx │ │ ├── Home │ │ │ ├── Home.tsx │ │ │ ├── _community.tsx │ │ │ ├── _draft.tsx │ │ │ ├── _gettingStarted.tsx │ │ │ ├── _gridItem.tsx │ │ │ └── _title.tsx │ │ ├── Settings │ │ │ └── Account.tsx │ │ ├── Snippets │ │ │ ├── Editor.tsx │ │ │ └── Snippets.tsx │ │ └── Timeline │ │ │ └── Timeline.tsx │ ├── react-app-env.d.ts │ ├── route │ │ └── route.tsx │ ├── service-worker.ts │ ├── serviceWorkerRegistration.ts │ ├── states │ │ ├── RCompilerStates.ts │ │ ├── RLayoutStates.ts │ │ ├── RSnippetStates.ts │ │ ├── RUserStates.ts │ │ └── RYourCodeStates.ts │ ├── themes │ │ ├── RThemeStates.ts │ │ ├── labTheme.ts │ │ ├── monacoTheme.ts │ │ └── theme.tsx │ ├── tutorials.ts │ └── utils │ │ ├── deepmerge.ts │ │ ├── ga4.js │ │ ├── kFormatter.ts │ │ └── toCapitalize.ts │ └── tsconfig.json ├── patches └── gpu.js+2.11.4.patch ├── scripts └── publish-to-github.sh ├── tsconfig.json ├── vercel.json └── yarn.lock /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] 4 | patreon: # Replace with a single Patreon username 5 | open_collective: # Replace with a single Open Collective username 6 | ko_fi: # Replace with a single Ko-fi username 7 | tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel 8 | community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry 9 | liberapay: # Replace with a single Liberapay username 10 | issuehunt: # Replace with a single IssueHunt username 11 | otechie: # Replace with a single Otechie username 12 | custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] 13 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Describe the bug** 11 | A clear and concise description of what the bug is. 12 | 13 | **To Reproduce** 14 | Steps to reproduce the behavior: 15 | 1. Go to '...' 16 | 2. Click on '....' 17 | 3. Scroll down to '....' 18 | 4. See error 19 | 20 | **Expected behavior** 21 | A clear and concise description of what you expected to happen. 22 | 23 | **Screenshots** 24 | If applicable, add screenshots to help explain your problem. 25 | 26 | **Desktop (please complete the following information):** 27 | - OS: [e.g. iOS] 28 | - Browser [e.g. chrome, safari] 29 | - Version [e.g. 22] 30 | 31 | **Smartphone (please complete the following information):** 32 | - Device: [e.g. iPhone6] 33 | - OS: [e.g. iOS8.1] 34 | - Browser [e.g. stock browser, safari] 35 | - Version [e.g. 22] 36 | 37 | **Additional context** 38 | Add any other context about the problem here. 39 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/custom.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Custom issue template 3 | about: Describe this issue template's purpose here. 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | 11 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Is your feature request related to a problem? Please describe.** 11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 12 | 13 | **Describe the solution you'd like** 14 | A clear and concise description of what you want to happen. 15 | 16 | **Describe alternatives you've considered** 17 | A clear and concise description of any alternative solutions or features you've considered. 18 | 19 | **Additional context** 20 | Add any other context or screenshots about the feature request here. 21 | -------------------------------------------------------------------------------- /.github/workflows/nodejs.yml: -------------------------------------------------------------------------------- 1 | name: CI runner 2 | 3 | on: [push, pull_request] 4 | 5 | jobs: 6 | build: 7 | runs-on: ubuntu-latest 8 | steps: 9 | - uses: actions/checkout@v1 10 | 11 | - name: Use Node.js 16.x 12 | uses: actions/setup-node@v1 13 | with: 14 | node-version: '16.x' 15 | 16 | - name: Install Dependencies 17 | run: | 18 | yarn 19 | 20 | - name: Build 21 | run: yarn build 22 | env: 23 | CI: true 24 | -------------------------------------------------------------------------------- /docker/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM debian:11 2 | 3 | # prepare the system and dependencies 4 | RUN apt-get update && \ 5 | apt-get upgrade -y && \ 6 | apt-get install -y yarnpkg git python3 pkg-config npm && \ 7 | apt-get autoremove && \ 8 | apt-get autoclean && \ 9 | apt-get clean && \ 10 | rm -rf /var/lib/apt/lists/* 11 | 12 | # add user 13 | RUN useradd -m usr && echo "usr:usr" | chpasswd 14 | 15 | # prepare the repo and build 16 | RUN cd /home/usr && \ 17 | runuser -u usr -- git clone https://github.com/Hedgehog-Computing/hedgehog-lab.git 18 | RUN cd /home/usr/hedgehog-lab && runuser -u usr -- sh -c "git checkout dev && /usr/share/nodejs/yarn/bin/yarn install && /usr/share/nodejs/yarn/bin/yarn build" 19 | 20 | # create the starter 21 | RUN echo "#!/bin/sh" > /opt/run.sh && \ 22 | echo "cd /home/usr/hedgehog-lab && /usr/share/nodejs/yarn/bin/yarn watch" >> /opt/run.sh && \ 23 | chmod +x /opt/run.sh 24 | 25 | ENTRYPOINT ["/bin/sh"] 26 | CMD ["/opt/run.sh"] 27 | USER usr 28 | 29 | -------------------------------------------------------------------------------- /docker/example_launch_linux.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | docker run -p 3000:3000 hedgehog-lab 4 | 5 | -------------------------------------------------------------------------------- /docs/.gitignore: -------------------------------------------------------------------------------- 1 | # Node rules: 2 | ## Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) 3 | .grunt 4 | 5 | ## Dependency directory 6 | ## Commenting this out is preferred by some people, see 7 | ## https://docs.npmjs.com/misc/faq#should-i-check-my-node_modules-folder-into-git 8 | node_modules 9 | 10 | # Book build output 11 | _book 12 | 13 | # eBook build output 14 | *.epub 15 | *.mobi 16 | *.pdf -------------------------------------------------------------------------------- /docs/HedgehogScript/class.md: -------------------------------------------------------------------------------- 1 | # Class -------------------------------------------------------------------------------- /docs/HedgehogScript/function.md: -------------------------------------------------------------------------------- 1 | # Function -------------------------------------------------------------------------------- /docs/HedgehogScript/hello-world.md: -------------------------------------------------------------------------------- 1 | # Hello World 2 | 3 | Use `print()` function to print `"hello world"` string in Hedgehog Lab: 4 | 5 | 6 | 7 | Do you see the output `hello world` on the right? Congratulations! Your first Hedgehog Script runs successfully! 8 | -------------------------------------------------------------------------------- /docs/HedgehogScript/string.md: -------------------------------------------------------------------------------- 1 | # String 2 | 3 | All properties and features from ```String``` object in JavaScript are available at Hedgehog Script. 4 | 5 | -------------------------------------------------------------------------------- /docs/HedgehogScript/variables.md: -------------------------------------------------------------------------------- 1 | # Variables 2 | 3 | You can define variable and constant in this way: 4 | 5 | - Use keyword `let` for a variable, for example, `let x = 10`; 6 | - Define a variable without a keyword, for example, `x = 10`; 7 | - Use keyword `const` for a constant, for example, `const x = 10`. 8 | 9 | -------------------------------------------------------------------------------- /docs/SUMMARY.md: -------------------------------------------------------------------------------- 1 | # Table of contents 2 | 3 | * [About Hedgehog Book](README.md) 4 | * [A Quick Overview](overview.md) 5 | * [Hedgehog Script](HedgehogScript/hedgehog-script.md) 6 | * [Hello World](HedgehogScript/hello-world.md) 7 | * [Variables](HedgehogScript/variables.md) 8 | * [String](HedgehogScript/string.md) 9 | * [Array](HedgehogScript/array.md) 10 | * [Control Flow](HedgehogScript/control-flow.md) 11 | * [Functiobn](HedgehogScript/function.md) 12 | * [Class](HedgehogScript/class.md) 13 | * [Tutorials](tutorials/README.md) 14 | * [Basic Syntax](tutorials/basic-syntax.md) 15 | * [Matrix operations](tutorials/matrix-operations.md) 16 | * [Data preparation](tutorials/data-preparation.md) 17 | * [Data Visualization](tutorials/data-visualization.md) 18 | * [Symbolic Computation](tutorials/symbolic-computation.md) 19 | * [Markdown](tutorials/markdown.md) 20 | * [TeX](tutorials/tex.md) 21 | * [Module Management](tutorials/module-management.md) 22 | * [GPU Acceleration](tutorials/gpu-acceleration.md) 23 | * [Share code via URL](tutorials/share-code-via-url.md) 24 | * [Contribute to this book](contribute.md) 25 | 26 | -------------------------------------------------------------------------------- /docs/book.json: -------------------------------------------------------------------------------- 1 | { "title": "Hedgehog Book", 2 | "plugins": ["responsive-iframes", "wide-page", "katex"] , 3 | "pluginsConfig": { 4 | "fontsettings": { 5 | "theme": "white", 6 | "family": "sans", 7 | "size": 2 8 | } 9 | } 10 | } -------------------------------------------------------------------------------- /docs/overview.md: -------------------------------------------------------------------------------- 1 | # A Quick Overview of Hedgehog Script and Hedgehog Lab 2 | 3 | Hedgehog Script supports most features and syntax from JavaScript, which is also quite similar as Java, C and C++. Each statement can be seperated with new-line with or without semicolons(;), for example: 4 | 5 | 6 | 7 | Hedgehog Script support types, objects and -------------------------------------------------------------------------------- /docs/tutorials/README.md: -------------------------------------------------------------------------------- 1 | # Tutorials 2 | 3 | -------------------------------------------------------------------------------- /docs/tutorials/basic-syntax.md: -------------------------------------------------------------------------------- 1 | # Basic Syntax 2 | 3 | -------------------------------------------------------------------------------- /docs/tutorials/data-preparation.md: -------------------------------------------------------------------------------- 1 | # Data preparation 2 | 3 | -------------------------------------------------------------------------------- /docs/tutorials/data-visualization.md: -------------------------------------------------------------------------------- 1 | # Data Visualization 2 | 3 | -------------------------------------------------------------------------------- /docs/tutorials/gpu-acceleration.md: -------------------------------------------------------------------------------- 1 | # GPU Acceleration 2 | 3 | -------------------------------------------------------------------------------- /docs/tutorials/markdown.md: -------------------------------------------------------------------------------- 1 | # Markdown 2 | 3 | -------------------------------------------------------------------------------- /docs/tutorials/module-management.md: -------------------------------------------------------------------------------- 1 | # Module Management 2 | 3 | -------------------------------------------------------------------------------- /docs/tutorials/share-code-via-url.md: -------------------------------------------------------------------------------- 1 | # Share code via URL 2 | 3 | -------------------------------------------------------------------------------- /docs/tutorials/symbolic-computation.md: -------------------------------------------------------------------------------- 1 | # Symbolic Computation 2 | 3 | -------------------------------------------------------------------------------- /docs/tutorials/tex.md: -------------------------------------------------------------------------------- 1 | # TeX 2 | 3 | -------------------------------------------------------------------------------- /hedgehog-docs/Hedgehog-Lab/Advanced Topics/Data Visualization.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | sidebar_position: 1 3 | --- 4 | 5 | # Data Visualization 6 | 7 | 1. **PlotlyJS** and **E-Charts** are used to implement data visualization. 8 | 9 | 2. We have some built-in functions for making and viewing figures: 10 | 11 | - `plot2D(setX, setY)` - A scatter plot 12 | 13 | - `plot2DLine(setX, setY )` - A line 14 | 15 | - `plot3D(setX, setY, setZ)` - A 3-D scatter plot 16 | 17 | - `plot3DMesh(setX, setY, setZ)` - A 3-D mesh 18 | 19 | Here is an example: 20 | 21 | -------------------------------------------------------------------------------- /hedgehog-docs/math/Basic Operations/Dot Multiply.draft: -------------------------------------------------------------------------------- 1 | 2 | import { MathJax, MathJaxContext } from 'better-react-mathjax' 3 | 4 | #### `dot_multiply(input1: any[] | Mat | Tensor, input2: any[] | Mat | Tensor) : any[] | Mat | Tensor` 5 | 6 | **param** `input1` first input, the first multiplicand 7 | 8 | **param** `input2` second input, the second multiplicand 9 | 10 | **returns:** `any[] | Mat | Tensor` - A copy of the structure multiplied **element-wise** (Note: this is not a standard multiplication of matrices), similar to dot_divide 11 | 12 | This function, similar to dot_divide, takes two structures of the same sizes, divides the elements element-wise, and returns it: 13 | 14 | -------------------------------------------------------------------------------- /hedgehog-docs/math/Basic Operations/bounds.mdx: -------------------------------------------------------------------------------- 1 | import { MathJax, MathJaxContext } from 'better-react-mathjax' 2 | 3 | #### `bounds(dataIn: any[] | Mat | Tensor, dim: number) : Mat | any[]` 4 | 5 | **param** `dataIn` - series of `number`s, an `Array`, matrix/`Mat` or `Tensor` to get the min and max of 6 | 7 | **param** `dim` (optional, default=0), '0'-(bound of all), '1'-(bound of column), '2'-(bound of row) 8 | 9 | **returns:** `Mat | any[]` - 1-D array or 2-D matrix - [min, max] or [[min1, min2], [max1, max2]], [[min1, max1], [min2, max2]] 10 | 11 | This function finds the minimum and maximum value of the given `dataIn`, which is a series of `number`s, an `Array`, a matrix/`Mat` or `Tensor`. 12 | 13 | For 2-D `Arrays`/`Mat` objects, you can use the `dim` parameter to determine if you get the bounds of all values or according to a row or column. 14 | 15 | 18 | -------------------------------------------------------------------------------- /hedgehog-docs/math/Basic Operations/check_input.draft: -------------------------------------------------------------------------------- 1 | import { MathJax, MathJaxContext } from 'better-react-mathjax' 2 | 3 | #### `check_input(input: JS array)` 4 | 5 | **param** `input` JS array 6 | 7 | **returns** - true if input is 1-d or 2-d 8 | 9 | 10 | 14 | -------------------------------------------------------------------------------- /hedgehog-docs/math/Basic Operations/factorial.mdx: -------------------------------------------------------------------------------- 1 | import { MathJax, MathJaxContext } from 'better-react-mathjax' 2 | 3 | #### `factorial(dataIn: number[] | number[][] | Mat | Tensor | number) : number | any[] | Mat | Tensor` 4 | 5 | **param** `dataIn` The structure to find the factorial of (element-wise manner). Can be a `number`, `Mat`, `Array` or `Tensor` 6 | 7 | **returns:** `any[] | Mat | Tensor | number` - In the case of a `number` it returns the standard `dataIn!`. In the case of a different structure, it returns a copy of the matrix with each element replaced by its factorial, i.e. **element-wise** factorial. Recall that a factorial of a `number` is `number!=number*number-1*number-2*...*2*1` 8 | 9 | 10 |