Hacker Newsnew | past | comments | ask | show | jobs | submit | more MapleWalnut's commentslogin

Mypy is the most correct and flexible type checker I’ve found. Pyright is great for auto complete in VSCode though, so I use both.

The Google and Facebook options aren’t well supported.


I pay for Feedly even though I had access to a very generous free plan. Their product is reliable and I use it every day, so it only seems fair to pay.


With the new GitHub code search, the first result is the DeleteView class: https://github.com/django/django/blob/bd366ca2aeffa869b7dbc0...


One of the engineering leaders at my company was big on Retool and it was pushed out as a way for backend developers to write frontend code.

Now 6 months later that leader is gone, developers realized applications in Retool are harder to maintain because it’s just spaghetti code with no type safety or proper code review and teams are moving back to internal React applications.

You could build a much nicer user experience with react and make a maintainable codebase.

I think the promise of no-code making it easier for users to contribute is not reality.


WAL is reliable, but Publish/Notify isn't. You'll lose messages with Publish/Notify if you aren't listening for them.


If you just use notify to tell listeners “there is work in the queue to grab” can you still lose messages? I’ve always seen it implemented where workers have to go and claim items (transactionally), not just wait to be pushed them.


No, that way is safe. Just make sure that your workers also check for items in the queue when they start.


this is exactly what I meant - WAL is your friend.


Your Python example has unnecessary type annotations. Python type checkers like mypy and Pylance can infer the type of `words` automatically.

    def main() -> None:
        words = ["Hello", "World"]
        for word in words:
            print(word)

    if __name__ == '__main__':
        main()


Yes and no. That particular example can indeed be type-checked without extra annotations (unless I want to indicate that the use-case of the variable is actually immutable). But consider I slightly modify the script:

    def main() -> None:
        words = []
        for word in (words + ["Hello"]):
            print(word)

        if __name__ == '__main__':
            main()
MyPy rejects to infer the type of the iterable. Here's an equivalent Haskell version that does infer the type without manual annotations:

    import Data.Foldable (for_)

    main = do
        let words = []
        for_ (words ++ ["Hello"]) (\word -> print word)


typescript can infer it too:

  function main() {
      let words = [];
      for (const word of [...words, 'Hello']) {
          console.log(word);
      }
  }


TIL that ContextVars can work in place of thread locals too. Thanks for pointing that out!

I had mistakenly assumed ContextVars only worked for async code.


Prettier itself would feel much faster if it supported caching like other code formatters (Python's Black, Rust's rust-fmt)


Prettier does support that, in the sense that you can achieve it using an official solution. https://prettier.io/docs/en/precommit.html

It's the Unix mentality of chaining things rather than building it in to the package.


Yeah, precommit isn’t my favorite thing out of personal preference. So it’s a shame prettier doesn’t have built in caching like other tools in the space.


Dropbox support can rollback your Dropbox account to a previous point in time too.


What about https://github.com/Roblox/luau? It gives Typescript-like annotations.


With roblox behind it, I'd indeed consider it for my game. I'm guessing no support for LuaJIT, though?


It's a custom fork of plain Lua, not LuaJIT, so indeed there's no LuaJIT support. They first open sourced it this November and supposedly they're planning to implement their own JIT. There's no timeframe or estimate for that though, just mentions of plans to here and there.


Sounds good. I won't cycle back to finish Lanarts for a while so I look forward to a JIT in this space. LuaJIT was a marvel but it probably needed a few more years of Mike Pall's time to smooth out difficult to anticipate optimization


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: