apecs-hint-demo
hint
apecs-hint-demo | hint | |
---|---|---|
1 | 10 | |
5 | 260 | |
- | -0.4% | |
0.0 | 2.7 | |
over 2 years ago | about 2 months ago | |
Haskell | Haskell | |
- | BSD 3-clause "New" or "Revised" License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
apecs-hint-demo
-
hint: Runtime Haskell interpreter
Assuming you've succeeded this far, the real challenge is going to be to give the interpreted code access to your game's types. It is imperative to define those in a separate library from the package which calls hint. With stack and cabal, it then suffices to point hint to the package database in which that library is installed. I just created an example repo demonstrating how to use this inside a small apecs program: https://github.com/gelisam/apecs-hint-demo
hint
-
I am looking for a new maintainer for Mueval
Mueval is based on hint, which is in turn based on the ghc library.
-
Interactive animations
Yeah, that project is pretty much at the bottom of my list, unfortunately. My top projects these days are mgmt, klister, recursion-schemes, and hint... And that's already too much!
-
Can GHCi be run like PDB?
You can try using hint (instead of ghci) though I'm not sure it has the breakpoint functionality.
-
Dynamic loading of modules
Have you tried hint?
-
hint: Runtime Haskell interpreter
with haskell.nix, well, you've found the github issue, you need to put the apecs package in the right nix incantation.
-
How to catch "Variable not in scope" error
But the use case for that is for using a Haskell program A to catch errors in that same Haskell program A. For your use case, using a Haskell program A to automatically grade a Haskell program B, I recommend using the hint library instead, as it allows you to load code from external source files, run tests on them, and manipulate the error messages produced by ghc. (full disclosure: I am the maintainer of that library)
-
Does a function that takes as input a function and return its porgram text exist?
I am thinking of giving hint the ability to evaluate TemplateHaskell expressions. It would indeed be quite difficult to write an interpreter for all of Haskell, so my plan is to use the Exp's Show instance to produce a program which constructs and then splices that Exp, e.g. $(pure (InfixE (Just (LitE (IntegerL 1))) (VarE GHC.Num.+) (Just (LitE (IntegerL 1))))) is a Haskell expression which is equivalent to 1 + 1, so I should be able to ask hint to evaluate that to get 2 without having to write my own Haskell interpreter.
-
Seeking a Project Lead for Matchmaker - Haskell Foundation
Yes please! Right now all of my open-source projects (most notably hint and recursion-schemes) are about to drop into barely-updated mode, and while I knew this would happen and have been working towards finding co-maintainers, I am now realizing that it wasn't enough. I think such a website would definitely have helped, and I am hoping that once it launches, I'll be able to use it to find some co-maintainers to tide over my projects until I become available again.
-
Deep embedding of Haskell in Haskell
hint's API takes a string, not an AST (I plan to fix this). Internally, hint delegates to the ghc library, which does expose a parser which you can use if you want. hint exists to provide a friendlier API than the ghc library for interpreting Haskell code, but it does not expose a friendlier API for parsing Haskell code.
What are some alternatives?
deploy-hint - Demonstrating that you don't need to install ghc in order to use the hint library.
ghci-pretty - tiny hack for colored pretty-printing within ghci
binaryen - DEPRECATED in favor of ghc wasm backend, see https://www.tweag.io/blog/2022-11-22-wasm-backend-merged-in-ghc
winter - Haskell port of the WebAssembly OCaml reference interpreter
Tidal - Pattern language
reflex-ghci - Run GHCi from within a Reflex FRP application and interact with it using a functional reactive interface.
ghc-dump - A GHC plugin and library for analysing GHC Core
matchmaker - Find your open-soulmate <💜>
recursion-schemes - Generalized bananas, lenses and barbed wire
ghc-whole-program-compiler-project - GHC Whole Program Compiler and External STG IR tooling