Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Julian Didier
    @theredfish
    Hello @trezm :) just a little message to say hi! I keep an eye on Thruster ! I'm currently lauching my own company so I'm very very busy ! But as soon as i have more time I come back with some contributions ;)
    Julian Didier
    @theredfish
    And happy new year !
    Peter Mertz
    @trezm
    I've merged in some really awesome/interesting changes recently :)
    Peter Mertz
    @trezm
    for what you've said above -- I'm not sure we handle that at all right now, I'll have to dig in/think about what that means exactly
    Also, happy new year! It's been so long!
    Julian Didier
    @theredfish
    Yes I seen your commits :) ! you used some HOFs stuff :p
    Peter Mertz
    @trezm
    Yes indeed! This way you can use multiple different contexts as long as they implement into/from the context before it in the chain
    pretty powerful in terms of composing apps in the future!
    Tommaso Allevi
    @allevo
    Hi!
    I have cloned the repo but I don't found how to run the examples
    Could someone help me?
    Peter Mertz
    @trezm
    Hey Tommaso, you bet, what have you tried so far? Are you familiar with rust and cargo?
    @allevo , sorry realized I didn't tag you directly
    Tommaso Allevi
    @allevo
    a bit. I've run cargo build. cargo run fails error: a bin target must be available forcargo run``
    Peter Mertz
    @trezm
    Sure, so cargo build will build to repo, cargo run will attempt to run a binary project. The thruster repo is a library not a binary, so cargo run doesn't have a main function to look to.
    That being said, there are examples that you can run, the way those are run in most rust projects, this one included is, cargo run --example <example name>, so in this case cargo run --example most_basic
    Or cargo run --example hello_world
    Tommaso Allevi
    @allevo
    Thanks! I've sent a PR for that
    Tommaso Allevi
    @allevo
    Is there a way to share a state between request? I didn't found any documentation about that.
    Thanks again
    Peter Mertz
    @trezm
    Hmm share state between separate requests or within the middleware of a single request?
    Tommaso Allevi
    @allevo
    Share state between different request. For example a request counter.
    App::create accepts a function. A closure is not possibile.
    Peter Mertz
    @trezm
    Peter Mertz
    @trezm
    The cli* not client, sorry, autocorrect!
    Tommaso Allevi
    @allevo
    thanks. But currently the state is unknown on the start up.
    It's like a prompt is shown to the user, the user inserts a number which the count start from and then the server starts up.
    In this kind of scenario, lazy-static could not be used, I think.
    Peter Mertz
    @trezm
    Lazy static doesn't necessarily mean immutable -- but that also sounds like something that should be stored in a database. Do you expect the value to be the same for different users? Is the value expected to be the same on different machines?
    These might be more questions than necessary if it's just a toy/example app :-p
    Tommaso Allevi
    @allevo
    if oki, I might send a PR in order to change this line
    maybe an interface allow you to share the state easily.
    Peter Mertz
    @trezm
    change it to accept a shared state?
    Tommaso Allevi
    @allevo
    yep
    the PR should not so difficult, I hope
    Peter Mertz
    @trezm
    definitely not, do you mind putting up an issue with the proposed new format?
    Tommaso Allevi
    @allevo
    Oki I'll do
    Lionel Sambuc
    @sambuc
    Hello, I have a been trying out thruster, and so far so good. I am hitting a small hitch though. I am implementing a web service, with the goal of it being more or less a drop in replacement for an other system. That systems accepts GET queries where the same parameter appears multiple times, in order to pass a list of values for that parameter.
    for example:
    var="X"&var="y"
    from the context, I can retrieve parameter with context.query_params, but as this is a hash map, var only gets one value, the last one.
    Before I go on and re-parse myself the request.path, is there a way to retrieve that as a vector or some kind of collection per parameter?
    Lionel Sambuc
    @sambuc
    Nevermind, I found the implementation of query_params, I will duplicate it and adapt it for my use-case.
    Peter Mertz
    @trezm
    hello! that's what I would suggest :) feel free to make a PR with your adapted use case as well!
    Lionel Sambuc
    @sambuc
    I'll try to come up with something clean and do so. I am still learning Rust as well.
    Peter Mertz
    @trezm
    sounds good! Let me know if you need any help, this should (hopefully) be a pretty straightforward implementation :)
    also, if I fail to respond quickly, it's because for some reason push notifications aren't working on my phone for gitter :cry:, but I'll usually see the email by the next day.
    it's not that I don't want to talk
    Lionel Sambuc
    @sambuc
    No problem at all.
    I have been on IRC as well, I don't except people to be around on call all day ;)
    Peter Mertz
    @trezm
    what a healthy attitude! love it!