reflex-dom without obelisk/reflex-platform - Haskell

Welcome to the Functional Programming Zulip Chat Archive. You can join the chat here.

Rizary

I want to integrate reflex-dom as a frontend project in my monorepo. Since I have to use Obelisk/Reflex-Platform, I have 2 nixpkgs set in my entire project. What I want to have is only 1 nixpkgs (20.09) and then build reflex/reflex-dom using the existence ghcjs in 20.09.

I have heard that there is a little changes made by reflex-platform wrt to GHCJS. Iirc it is regarding JsString. Is that all?

Sridhar Ratnakumar

if frontend == ghcjs, no - you are better off staying with reflex-platform. if frontend == ghc (jsaddle-warp or gtk+), then just use the one in nixpkgs.

Rizary

Sridhar Ratnakumar said:

if frontend == ghcjs, no - you are better off staying with reflex-platform. if frontend == ghc (jsaddle-warp or gtk+), then just use the one in nixpkgs.

Yeah after diving into obelisk + reflex-platform, I'll stick to them. It's too much goodies in there that are worthy for the project.

Sridhar Ratnakumar

There is also https://github.com/srid/reflex-stone if you want only "ob run" (and full build) workflow from obelisk, but not the rest including backend.

Template repository for writing GHCJS/Reflex apps targeting static sites without a backend. - srid/reflex-stone
Rizary

I've seen that and also your rhyolite template (I also have project with JupyterWith combined with rhyolite using the same way you did).

Matthias Putz

Uh, can you @Rizary elaborate on the JupyterWith thing? You mean Jupyter Notebooks, what is your project doing? (sounds veery interesting)

Rizary

Matthias Putz said:

Uh, can you Rizary elaborate on the JupyterWith thing? You mean Jupyter Notebooks, what is your project doing? (sounds veery interesting)

It's an old project. I attempt to integrate JupyterWith with obelisk platform. So we can code reflex-dom inside jupyter (the first aim is that) also include hasktorch in it.

My first idea is I want to create minimum example (like the one in pytorch tutorial) that creates flask based app with pytorch. Instead, I want to have fullstack haskell with hasktorch in it. my current state is only able to run jupyterWith, but I haven't got the time to continue developing obelisk + hasktorch part.

Rizary

jupyterWith refers to tweag's project here https://github.com/tweag/jupyterWith

declarative and reproducible Jupyter environments - powered by Nix - tweag/jupyterWith