Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Demonstrate reputation calculation over Holochain data #4

Closed
pospi opened this issue Jan 28, 2021 · 1 comment
Closed

Demonstrate reputation calculation over Holochain data #4

pospi opened this issue Jan 28, 2021 · 1 comment
Assignees

Comments

@pospi
Copy link

pospi commented Jan 28, 2021

Integrate the reputation DSL with some REA event data coming from a Holo-REA module and make calculation execution workable

mhuesch added a commit that referenced this issue Apr 12, 2021
* add types module

* beginnings of type inference!

* add `env` module for typing environment

sdiehl has a module which presents a subset of (the wrapped)
`Data.Map` API.

this is my take on that. it doesn't seems strictly necessary - we can
probably just use `HashMap` directly, and perhaps it would be nicer to
just do that, because it implements so many handy traits.

I thought this would teach me a bit about API design and also about
Rust trait stuff.

we can rewrite later if we feel it's not worth its maintenance cost.

* more on `infer`

finish implementing the analogue of `Substitutable`. still seems like
this approach is pretty good. I am getting schooled on Rust a bit which
is fun.

* cargo fmt

this was long overdue because I was working on my Mac and it doesn't
have `rustfmt` through the nix install for some reason...

* eschew (zero cost) indirection: turn `Subst` into a type synonym

seems cleaner - we don't get much from the newtype.

* cargo fmt

* wip: start on infer

* wip 2: more `infer`, before realizing we need a diff approach

pr#89 on the repo demonstrates that inference was broken. the new
approach should work, which is excellent.

* pivot: return `Vec<Constraint>` from `infer`

as documented in pr#89

sdiehl/write-you-a-haskell#89

the original approach of the tutorial had an issue with `let` inference.
the PR implemented a new approach which resolves the issue.

this commit adapts the code to take that approach.

* flesh out the body of `infer` for all match cases

seems to be going smoothly ⛵

* implement `generalize`

* implement most of the solver

we are now only missing `unify_many`.

* implement `unify_many`

* finish type inference??

I have now implemented all the functions of `poly`'s `Infer` module.

* example of inference - it fails to propagate constraints

* rename `Decl` to `Defn` (lisp/scheme style) & define a parser for it

had to lift out a bunch of common sub-parsers. turns out the type sigs
are verbose but almost entirely the same from one to the next - only the
arguments and return type really differ.

* make a repl which parses & typechecks `Expr`s

* setup for demo asciinema

* fix bug in `App` type inferece

I forgot to perform the substitution from the first unification.

d'oh 🤦‍♂️

* repl: pretty print the scheme

* fix import in test

broken by adding `util::pretty` module.
@mhuesch
Copy link
Contributor

mhuesch commented Nov 9, 2021

this is subsumed by neighbour-hoods/social_sensemaker#8, although that will only demonstrate calculations over simple types.

however, we are already tracking user-defined types in #54, and implementing that, plus neighbour-hoods/social_sensemaker#8 above, should subsume the entire issue here. closing.

@mhuesch mhuesch closed this as completed Nov 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants