Skip to content

Commit 783bcd7

Browse files
author
Steve Krouse
committed
## p4 thinking for JE meeting
* TOC {: toc } ### Theme of my work A fun question on Twitter yesterday encouraged me to think a bit broader as to an underlying theme to my work that would encompass this project, as well as other outside of "improving programming" (namely, LogicHub). I'm proud of what I came up with: <blockquote class="twitter-tweet" data-lang="en"><p lang="en" dir="ltr">Offloading mental tasks better done by computers to computers, so humans are freed up to think creative thoughts</p>&mdash; Steven Krouse (@stevekrouse) <a href="https://twitter.com/stevekrouse/status/1065039348649918464?ref_src=twsrc%5Etfw">November 21, 2018</a></blockquote> <script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script> ### Some responses about fluid Haskell Sean McDirmid suggested Haskell for Mac, which is very cool and close to what I want so I installed it, but I wasn't able to see an easy way to get Reflex to work with it... Luke Iannini apparently worked on a [live recompiler for Haskell](https://github.com/lukexi/halive). The monadfix people shocked me when they said: > None of us have been able to achieve the "fluid, live Haskell programming experience" that you're yearning for, even without "has to work GHCJS" as an additional constraint. My new thesis is that this fluid Haskell doesn't really exist - at least for most Haskell developers. Artyom from monadfix was also very kind and commented on my issue about installing intero. Too bad they can't help here! ### Biggest experience problems with Haskell/Reflex I made a full day's effort of trying to steelman Haskell/Reflex and make the experience as good as possible before trying to improve it - yet I just have such distaste for installing and debugging shit in the terminal (as well as using the existing Reflex setup I have) that I wonder if I can simply pull on my memory for the key issues... #### 1. Speed of feedback loop The main thing was that speed of feedback on all fronts (syntax, types, output) was so slow and required so many keystrokes. In particular there were times that I could point to places in my code where I just wanted to know the type of something but did not know how to ask Haskell for that information. #### 2. API Discoverability In other words, "I have some things. I want some other things. What blocks can I use to go from what I have to what I want?" In Scratch, all the "legos are on the floor" to help with this. I find that the lodash JS library also does a superb job of this. I found the Reflex documentation and the Haskell autocomplete tooling to feel like I'm basically guess and checking. #### 3. Plumbing code Such as converting `Int` or `String` to `Text` and back, or worst of all, collapsing higher-order streams. I was very excited to find this extremely helpful video, [Real World Reflex](https://www.youtube.com/watch?v=dNBUDAU9sv4) last night which has a really wonderful slide to help with this: ![image](https://user-images.githubusercontent.com/2288939/48842176-78ef8400-ed8b-11e8-8996-307d841f9ac5.png) #### 4. Visualize streams This includes seeing the "shape" of streams and how streams make up other streams as in rxmarbles.com, as well as watching the live data flow through streams. #### 5. Direct manipulation This whole thing won't feel natural without direct or bi-directional manipulation of the output because why not? ### Next step ideas #### 1. Stay in Haskell Continue working towards a fluid experience in Haskell/Reflex. 1. Find someone to help me setup a better experience and plow through. 2. Make better documentation for Reflex 3. Make better utility functions on top of Reflex so I don't have to do as much type conversion/plumbing 4. Make a devtool for Haskell/Reflex to visualize the streams 5. [I'd probably never get here] Use some of the bi-directional sketch-n-sketch work #### 2. Build/use JS library/framework 1. Investigate CycleJS 2. Look for another stream framework with higher-level and cyclic streams. 3. See if I can only allow consts and no object modifications while still getting cycles (maybe use a fix-like thing?) #### 3. Build/use JS Haskell interpreter 1. Investigate the two I already found [here](https://github.com/johang88/haskellinjavascript) and [here](https://github.com/evilcandybag/JSHC), the first of which comes with [an online REPL](http://hiji.tinyrocket.se/) 2. Experiment with them to see if I can achieve a fast feedback loop 3. Build a Reflex-like library on top of them #### 4. Build a higher-level system that compiles to JS 1. Sketch out what it would look like, pulling inspiration from Facebook Origami, the rx visualization tools, the animation tools such as Principle For Mac, Josh Horowitz's [Pane](http://joshuahhh.com/projects/pane/) and what it references including [Aprt.us](http://aprt.us/). 2. Prototype what "format" it would compile to in JS, be it a CycleJS data structure or something else 3. Build it... I'm going to spend the next ~30 min doing the sketching discussed above in preparation for my meeting in a few hours with JE. ### Todos 11/20/18 * p4 next steps * read the first 6 chapters of TaPL * draw out what a better time would look like * [regroup projects](https://futureofcoding.org/log#possible-dec-2018-re-group-projects) * schedule JE podcast * edit Katherine podcast * prep for Tudor podcast
1 parent 717c4a6 commit 783bcd7

File tree

0 file changed

+0
-0
lines changed

    0 file changed

    +0
    -0
    lines changed

    0 commit comments

    Comments
     (0)