[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-72863":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":17,"stars7d":18,"stars30d":19,"stars90d":16,"forks30d":16,"starsTrendScore":20,"compositeScore":21,"rankGlobal":10,"rankLanguage":10,"license":22,"archived":23,"fork":23,"defaultBranch":24,"hasWiki":25,"hasPages":23,"topics":26,"createdAt":10,"pushedAt":10,"updatedAt":27,"readmeContent":28,"aiSummary":29,"trendingCount":16,"starSnapshotCount":16,"syncStatus":17,"lastSyncTime":30,"discoverSource":31},72863,"HVM2","HigherOrderCO\u002FHVM2","HigherOrderCO","A massively parallel, optimal functional runtime in Rust","https:\u002F\u002Fhigherorderco.com",null,"Cuda",11255,432,104,44,0,2,8,12,6,42.91,"Apache License 2.0",false,"main",true,[],"2026-06-12 02:03:08","Higher-order Virtual Machine 2 (HVM2)\n=====================================\n\n**Higher-order Virtual Machine 2 (HVM2)** is a massively parallel [Interaction\nCombinator](https:\u002F\u002Fwww.semanticscholar.org\u002Fpaper\u002FInteraction-Combinators-Lafont\u002F6cfe09aa6e5da6ce98077b7a048cb1badd78cc76)\nevaluator.\n\nBy compiling programs from high-level languages (such as Python and Haskell) to\nHVM, one can run these languages directly on massively parallel hardware, like\nGPUs, with near-ideal speedup.\n\nHVM2 is the successor to [HVM1](https:\u002F\u002Fgithub.com\u002FHigherOrderCO\u002FHVM1), a 2022\nprototype of this concept. Compared to its predecessor, HVM2 is simpler, faster\nand, most importantly, more correct. [HOC](https:\u002F\u002FHigherOrderCO.com\u002F) provides\nlong-term support for all features listed on its [PAPER](.\u002Fpaper\u002FHVM2.pdf).\n\nThis repository provides a low-level IR language for specifying the HVM2 nets\nand a compiler from that language to C and CUDA. It is not meant for direct\nhuman usage. If you're looking for a high-level language to interface with HVM2,\ncheck [Bend](https:\u002F\u002Fgithub.com\u002FHigherOrderCO\u002FBend) instead.\n\nUsage\n-----\n\n> DISCLAIMER: Windows is currently not supported, please use [WSL](https:\u002F\u002Flearn.microsoft.com\u002Fen-us\u002Fwindows\u002Fwsl\u002Finstall) for now as a workaround.\n\nFirst install the dependencies:\n* If you want to use the C runtime, install a C-11 compatible compiler like GCC or Clang.\n* If you want to use the CUDA runtime, install CUDA and nvcc (the CUDA compiler).\n  - _HVM requires CUDA 12.x and currently only works on Nvidia GPUs._\n\nInstall HVM2:\n\n```sh\ncargo install hvm\n```\n\nThere are multiple ways to run an HVM program:\n\n```sh\nhvm run    \u003Cfile.hvm> # interpret via Rust\nhvm run-c  \u003Cfile.hvm> # interpret via C\nhvm run-cu \u003Cfile.hvm> # interpret via CUDA\nhvm gen-c  \u003Cfile.hvm> # compile to standalone C\nhvm gen-cu \u003Cfile.hvm> # compile to standalone CUDA\n```\n\nAll modes produce the same output. The compiled modes require you to compile the\ngenerated file (with `gcc file.c -o file`, for example), but are faster to run.\nThe CUDA versions have much higher peak performance but are less stable. As a\nrule of thumb, `gen-c` should be used in production.\n\nLanguage\n--------\n\nHVM is a low-level compile target for high-level languages. It provides a raw\nsyntax for wiring interaction nets. For example:\n\n```javascript\n@main = a\n  & @sum ~ (28 (0 a))\n\n@sum = (?(((a a) @sum__C0) b) b)\n\n@sum__C0 = ({c a} ({$([*2] $([+1] d)) $([*2] $([+0] b))} f))\n  &! @sum ~ (a (b $([+] $(e f))))\n  &! @sum ~ (c (d e))\n```\n\nThe file above implements a recursive sum. If that looks unreadable to you -\ndon't worry, it isn't meant to. [Bend](https:\u002F\u002Fgithub.com\u002FHigherOrderCO\u002FBend) is\nthe human-readable language and should be used both by end users and by languages\naiming to target the HVM. If you're looking to learn more about the core\nsyntax and tech, though, please check the [PAPER](.\u002Fpaper\u002FHVM2.pdf).\n","Higher-order Virtual Machine 2 (HVM2) 是一个用 Rust 编写的、支持大规模并行计算的功能性运行时。它通过将高级语言（如 Python 和 Haskell）编译成 HVM，使得这些语言可以直接在 GPU 等并行硬件上以接近理想的加速比运行。HVM2 相较于其前身 HVM1 更加简洁、快速且正确，支持从低级中间表示语言编译到 C 和 CUDA。此项目适用于需要利用 GPU 并行处理能力来加速计算密集型任务的场景，特别是在科学计算、机器学习等领域。需要注意的是，目前仅支持 Nvidia GPU，并且不直接支持 Windows 系统。对于希望使用更易读的语言与 HVM2 交互的用户，推荐使用 Bend 语言。","2026-06-11 03:43:50","high_star"]