HackerTrans
TopNewTrendsCommentsPastAskShowJobs

nsdarren

no profile record

Submissions

Improving Posting's startup time by 40%

darren.codes
2 points·by nsdarren·last year·0 comments

Show HN: Posting v1 – The modern HTTP client that lives in your terminal

github.com
184 points·by nsdarren·2 years ago·51 comments

comments

nsdarren
·2 years ago·discuss
It doesn't support OAuth2 yet, but I do plan to add more auth schemes in the future.
nsdarren
·2 years ago·discuss
There's an experimental OpenAPI import function.
nsdarren
·2 years ago·discuss
Thanks for your kind words!
nsdarren
·2 years ago·discuss
Great feedback, thank you. I agree “Info” is probably clearer.

There are a couple of UX sharp edges to clear up for sure - a bit more validation, confirmations, etc to be added.
nsdarren
·2 years ago·discuss
I agree that could be improved! The extra Vim keys you suggested should be simple enough to add.
nsdarren
·2 years ago·discuss
Thanks for the feedback! It is actually intended that you create the collection yourself first, but I should perhaps make that clearer.

Hiding how to quit the app was just another attempt to win over the Vim crowd!

(Yes ctrl+c is the intended way, it’s in the docs now and I’ll add it to the app footer)
nsdarren
·2 years ago·discuss
It’s iTerm 2
nsdarren
·2 years ago·discuss
Thank you!
nsdarren
·2 years ago·discuss
Thank you very much! It's definitely not feature complete yet - but I hope it can be a solid competitor in the space.
nsdarren
·2 years ago·discuss
You'll be able to add custom themes pretty soon. Hopefully within the next couple of weeks.

There's no fallback to the ANSI theme of the terminal as it breaks a lot of Textual's features.

There is a PR open at the moment relating to detecting the terminal background colour I believe, so in the future we could probably use that to choose a reasonable fallback.
nsdarren
·2 years ago·discuss
I'm going to explore integration with other formats in the future. Right now there's experimental (incomplete) support for importing from OpenAPI v3. I'd like to add Postman and Insomnia collection importing too. Some kind of integration with Hurl could be very nice too, but would likely come further down the line.
nsdarren
·2 years ago·discuss
Thank you!

I had a look at the Bruno website for the first time a few weeks ago, although I haven't tried it for myself yet. I'm definitely inspired by and agree with a lot of the principles behind Bruno: local first, developer friendly, readable/Git-friendly collections and so on.

I think I share a lot of the same motivations as Bruno's creator - I feel the landscape of HTTP API testing clients may actually have regressed in recent years from a developer's perspective, as the companies behind Postman/Insomnia etc. figure out how to monetise them.
nsdarren
·4 years ago·discuss
What's the point of this comment other than being snarky/attempting to show off? You should reflect on it, because this would be a better place if people like you just didn't bother replying.

Maybe you don't find it valuable because your setup and mad vi skills offer you an alternative (which I'm very sure is just as feature-rich as what is described in the post, which you didn't read). Isn't it obvious how a more accessible solution might be useful to some people?

I for one welcome the efforts of the Warp team to improve terminal UX.
nsdarren
·5 years ago·discuss
Probably the closest thing would be to add a unique tag to each instance of the test:

  for lhs, rhs, res, tag in [
        (1, 1, 2, "thing1"),
        (2, 3, 5, "thing2"),
        (3, 4, 7, "thing3"),
  ]:
      @test("simple addition", tags=[tag])
        def _(left=lhs, right=rhs, result=res):
          assert left + right == result
You can then select individual tests using something like `ward --tags thing2` to only run tests with that tag (in my example, the 2nd of 3 tests).

Since multiple tests can share the same tag in Ward, if you wanted to narrow things down to ensure you're only selecting from the tests generated in this loop you could do something like `ward --search 'simple addition' --tags thing2`.

You can also select multiple instances at once with `ward --tags 'thing1 or thing3'`.
nsdarren
·5 years ago·discuss
Thanks :) That's one of my biggest gripes with pytest too, and was one of the main things I was looking to solve.
nsdarren
·5 years ago·discuss
I built Ward (https://github.com/darrenburns/ward), a Python test framework.

I have issues with the way the pytest fixture system works (parameter names matching function names), the readibility of the output, and some other things.

It started as a little learning experiment and has turned into something I've been building into what I hope will (and already is in some aspects) be a viable contender to pytest.
nsdarren
·5 years ago·discuss
Author of Ward here! Thanks for the feedback. It's a common piece of feedback I hear and I do agree.

I haven't documented this yet, but due to the way Ward works you can actually write your tests inside a loop in order to parameterise them (see below). This is a little more explicit, and lets you build up your test data using things like itertools (if you like):

  for lhs, rhs, res in [
      (1, 1, 2),
      (2, 3, 5),
  ]:
      @test("simple addition")
      def _(left=lhs, right=rhs, result=res):
          assert left + right == result

I'm considering how/whether to add a pytest style decorator for parameterisation too.

If you give Ward a try or just have any other general feedback, please let me know if you have any issues/suggestions on GitHub.