by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Feb 18 2019 12:42
    xaverdh opened #9
  • Jan 20 2019 05:05
    bradparker opened #8
  • Jun 24 2018 18:38

    ChrisPenner on master

    Add research paper (compare)

  • Nov 04 2017 18:17

    ChrisPenner on master

    Fix documentation markup (#7) … (compare)

  • Nov 04 2017 18:17
    ChrisPenner closed #7
  • Nov 04 2017 16:37
    janpath synchronize #7
  • Nov 04 2017 16:29
    janpath opened #7
  • Apr 15 2017 23:44

    ChrisPenner on master

    Add Action Monoid instance (compare)

  • Apr 15 2017 23:36
    ChrisPenner closed #6
Chris Penner
@ChrisPenner
@/all Hey everyone, Eve is pretty much ready to go! There's also a tutorial which walks through an example application; I'd appreciate some feedback on the Tutorial if you have a chance to take a look at it; i.e. whether you can follow each step, whether it makes sense, etc. Check it out here: https://github.com/ChrisPenner/eve And the guide here: https://github.com/ChrisPenner/eve/blob/master/examples/tunnel-crawler/README.md
Robin
@robinvd
So i have a data type Settings. Now in an App () how can i set the state of Settings. The tutorial only handles modifying of item of a data type.
Chris Penner
@ChrisPenner
Good point! Eve exports stateLens which magically focuses any type, so you can do stateLens .= Settings ...
Alternatively you can do:
runAction (put newSettings)
It will infer a type of Action Settings () and run it as a state monad over Settings, then put replaces the state
Let me know if you have other questions @robinvd , I'll try to answer them and update the README where I can!
Robin
@robinvd
thanks that worked
Chris Penner
@ChrisPenner
Cool, I'll make a few more changes yet this afternoon and then probably will post on Reddit.
Robin
@robinvd
Is the type dispachter in asyncActionProvider gone?
Chris Penner
@ChrisPenner
Dispatcher is only necessary for asyncEventProvider, but I imagine that it's a bit tough to write signatures for asyncActionProvider as is;
Signature should be myActionProvider :: (App () -> IO ()) -> IO ()
Robin
@robinvd
Yea i meant asyncEventProvider
Chris Penner
@ChrisPenner
Oh, yeah it's still there
Robin
@robinvd
Was confusing asyncEventProvider with asyncActionProvider
Solve a lot of my type errors
Chris Penner
@ChrisPenner
Hrmm, gotcha.
Which one did you end up using?
Also, I'm going through now and changing Dispatcher to EventDispatcher and I'm adding an ActionDispatcher type too.
Robin
@robinvd
Both would work, trying to make a small Timer extension as a test. Where you can execute things after x sec or every x sec. Decided to go for Event.
more Dispatchers types sounds like a good idea
Chris Penner
@ChrisPenner
I think I'm going to split the docs into 'simple' and 'advanced' sections
Robin
@robinvd
Good idea some of the types are a lot easier if you think of them as App
Chris Penner
@ChrisPenner
Yup, You should be able to build a full app just using App, but I provide the complexity if you need it
ActionT let's you do some pretty crazy stuff! It's a Monad transformer so you can specify a custom base monad for your whole app if you want
Chris Penner
@ChrisPenner
I just pushed a new version, you can keep up with changes in the CHANGELOG: https://github.com/ChrisPenner/eve/blob/master/CHANGELOG.md
I renamed a few functions; you may need to wait 10 or 15 minutes for the lib to be available on hackage
Robin
@robinvd
can we still use eve_ with a different monad? since its type is now eve_ :: App () -> IO ()
Chris Penner
@ChrisPenner
No, I decided to simplify the simple case as much as possible :smile:, but you can if you use eve
Robin
@robinvd
okay
Chris Penner
@ChrisPenner
If you don't need the final state, just use void $ eve setup
Are you planning on using a custom base monad? And if so, which one? I'm curious :grin:
Robin
@robinvd
I really like the idea but have not found a use case for it
Chris Penner
@ChrisPenner
Yeah, I'm thinking it could be handy for ReaderT or WriterT
Not really sure of the use-cases, but I didn't want to artificially limit it if I didn't have to.
Robin
@robinvd
Yea could be. I feel like the state/events only make sense in an IO environment
Chris Penner
@ChrisPenner
I also built everything so that you CAN use a custom base state (instead of AppState), but haven't exposed that ability yet since it does make the external types a bit tougher
You end up writing ActionT MyBaseState MyCurrentState IO a, which is something most people shouldn't have to do haha
Robin
@robinvd
haha yea
Chris Penner
@ChrisPenner
I have an inkling that it'll be more performant in certain cases, but we'll need benchmarks to know for sure
I also think it would be really fun to implement a simple http-server in Eve, mostly as a proof of concept
Robin
@robinvd
Yea GET request could be events. Only problem is multiple actions could respond
Chris Penner
@ChrisPenner
There'd be a whole bunch of problems to solve there I'm sure, I'm definitely not suggesting it's a good idea, just that it'd be fun :smirk:
It's also on my list to rebuild https://github.com/ChrisPenner/LumberJack in Eve or Rasa
So many things to do though. I'm hoping that by splitting Eve off I can build up a larger community around it which by-proxy benefits Rasa as well.
Marwan Rabbâa
@waghanza
Hi,
I want to introduce eve in https://github.com/the-benchmarker/web-frameworks (a benchmarking project)
do you consent of such thing ?
Chris Penner
@ChrisPenner
It's not really a Web framework but go ahead 👍
Marwan Rabbâa
@waghanza
what is eve then ?
A sorry, my fault I was not talking about https://github.com/ChrisPenner/eve but https://github.com/pyeve/eve