Skip to content

deepchem/diffstruct

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

diffstruct

This repo holds some simple experiments with differentiation. For now, I'm using this to hold a few simple haskell intepreter scripts I've been playing with in hopes of understanding autodifferentiation and language design better.

Simple interpreters are implemented using Haskell. To install GHC (the haskell compiler), I recommend using ghcup.

To run the code in this repo, I suggest using GHCi to interactively run the code. Here's an example of how to load an interpreter into GHCi:

(base) bharath@Bharaths-MBP diffstruct % ghci                         
GHCi, version 8.8.3: https://www.haskell.org/ghc/  :? for help
Prelude> :load minimal.hs
[1 of 1] Compiling Main             ( minimal.hs, interpreted )
Ok, one module loaded.
*Main> 

minimal.hs

This intepreter follows this stackoverflow answer. It implements an intepreter for a simple imperative language.

minimal_monadic.hs

This interpreter follows this stackoverflow answer. It implements an intepreter for a simple imperative language using a simple Interp monad to do error handling.

About

Experimenting with differentiation

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published