Giter VIP home page Giter VIP logo

frp-guides's People

Contributors

cubuspl42 avatar heinrichapfelmus avatar zereraz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

frp-guides's Issues

Custom Widget Code

I have written a number of custom widgets for threepenny-gui and reactive-banana as part of various projects, and was wondering whether these would be at all useful for this repository. It would be helpful to get some feedback on my designs and any improvements/alternatives for them, as well as help others by providing examples of patterns that I have found useful.

Question: advice on holding a widget state

Hi!

I am not sure if this is a proper place, but I wanted to ask you a question knowing you as an frp-expert :)
I'm rather new to FRP and haskell, but already familiar with basic concepts (am trying to write more and more functional code).

What I got interested in is to try to build a small UI-toolkit like app, which will render some widgets from ground up. I'm using a nanovg-hs library to do painting in OpenGL.

All FRP libraries I see, rely on some existing UI toolkit (for example threpenny-gui, reflex-dom use browser for this (html elements), reactive-banana gets hooked up to either wx or gtk or sdl)... so things like pushed state, click animations, focused rectangle etc are handled not by these libraries, but by lower level (and imperative-language) library.

In my case I want to do everything in Haskell and this is where I got confused. Mainly I am not sure where to put state related to animation? For example, consider user pressing a button. I want to draw it pressed, then, after user released it, I want to play some fade animation of button's background for example.
And if all I have is a function which draws a button and accepts current time (or dt between frames), it would also need to know a time at which click has happened and store the current fade value etc etc. Where should this be stored? Should I create some typeclass where I would store this state and draw-function will read/modify it?

Perhaps this is a rather generic question, but I'm trying to at least figure out a direction in which to do my reasearch/googling :) I'd be glad to dive deep in some existing libraries for an answers or examples, but none of them does this kind of stuff by itself (if I'm not mistaken).

If you would give me some advice, or if you know some existing work I could use to learn from, it would be much appreciated.
Also I guess you should immediately close this issue, because I've used it as a means to simply ask a question, it's not a real issue :)

[Request]: comparison, purposes, examples, and caveats for Combinators and Frameworks functions

Hello @HeinrichApfelmus,

I would really appreciate a guide on the more opaque/arcane functions in Reactive.Banana.Combinators and Reactive.Banana.Frameworks (e.g. self-referential stepper vs accumB, reactimate vs execute vs mapEventIO), along with examples and caveats so that when it's unclear as to what function to use, or whether one would need to write a custom helper function to achieve a certain functionality, it is easier to figure out where to go. I would be more than happy to provide help (for what it is worth), as I am a novice Haskeller with FRP experience confined almost exclusively to threepenny-gui and reactive-banana. Also, a translation guide between the paradigms and patterns of those libraries would be immensely helpful as well, but that might be a more ambitious endeavor. Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.