From UBC Wiki

Project Link


Hunter Wang, Nelson Yim, Elizabeth Hnatiuk

What is the problem?

Noact is a minimum implementation of a DOM rendering engine (React like), complete with a virtual DOM diffing process to optimize performance by eliminating unnecessary re-draws.

We will implement the Noact rendering engine in two languages, Purescript (Haskell derived), and Typescript (Javascript derived). Both the Typescript and the Purescript variant will make use of some automatic code generation.

The Typescript Noact will include a mixture of functional and imperative paradigms with a heavy emphasis on the functional, while the Purescript Noact will be pure functional with possible uses of the Foreign Function Interface.

What is the something extra?

-- The use of partial application and higher order functions is core to how Noact works

-- The use of FFI to communicate between languages

-- Contrast of the type system in two languages that have high levels of support for functional paradigms

Oh, and the Typescript version only have 50 lines of rendering code

What did we learn from doing this?

Turns out, the type system in Haskell like languages is way more restrictive than multi-paradigm / semi functional languages like Typescript, which considerately slowed down our progress.

However, we did end up with lots of knowledge on the inner workings of Monads in particular , since that is how we can handle the effects.

Links to code etc




DEMO Examples contains the compiled output and you can see it run in action by opening the two index.html files