HNHacker News
TopNewBestAskShowJobs

emptysea

534 karma · joined June 23, 2018

submissionscomments
emptysea··on Sentry.io outage
Yeah they use GCP for most of their stuff.

Not sure if their POP ingest servers are on it though.

emptysea··on Show HN: CookTime – Recipe index
Looks interesting! Nit with the sign up flow: password requirements like one uppercase character aren’t that useful and provide unnecessary friction
emptysea··on Show HN: Prevent your computer sleeping with just a webpage
Doesn’t seem to work on iOS 15.4.1
emptysea··on Real World Recommendation System
Yeah it was a source graph episode from a bit ago: https://about.sourcegraph.com/podcast/sugu-sougoumarane/
emptysea··on Real World Recommendation System
YouTube has since migrated to Spanner, there’s a podcast episode with one of the Vitess creators that covers the politics of the switch
emptysea··on Show HN: PyIng – Ingredient parser
Do you have any comparisons to other parsers in terms of accuracy?
emptysea··on Ask HN: How do you not keep track of what you did yesterday (and this morning)?
I have a slack reminder to write down what I did before I get off each day. Works great!
emptysea··on My Stripe Tax Story
Somewhere it says the first million is free, so if you're small time it's effectively free
emptysea··on Ask HN: How do you implement audit trail for a product?
How would CDC include information like the user making the change?
emptysea··on Words known better by males than females, and vice versa
I think yakuza, katana, and bushido have less to do with weeb/anime culture than video games and movies.

I bet yakuza, katana, and bushido could all be picked up watching Kill Bill & playing some Call of Duty set in WW2.

emptysea··on Some mistakes Rust doesn't catch
Something to note about the JS examples, if you throw them into TypeScript you'll get similar error messages to go vet and rustc.

The first example: https://www.typescriptlang.org/play?#code/GYVwdgxgLglg9mABMO...

    Unreachable code detected
Along with some typos since `i` isn't declared.
emptysea··on Procrastinate: PostgreSQL-Based Task Queue for Python
Not parent but in my experience celery has a number of long standing bugs / poor defaults, like prefetching tasks so they can get stuck behind long running tasks. Next project id probably try a simplistic project that’s easier to understand like arq / rq.
emptysea··on A small guide for naming stuff in front-end code
TypeScript will produce an error when using a function inside and if stmt without calling it:

    function f() {}
    if (f) {}
produces:

    This condition will always return true since this function is always defined. Did you mean to call it instead?(2774)
https://www.typescriptlang.org/play?#code/GYVwdgxgLglg9mABMA...
emptysea··on The State of Web Scraping 2022
Is the “pretty optimized headless browser” an off the shelf thing, or something custom? Are you using playwright/puppeteer to drive it?
emptysea··on Fixing the Unfixable: Story of a Google Cloud SSRF
Is smokescreen an alternative to Squid? Seems like they cover similar ground, but I’ve never heard of smokescreen before.

https://github.com/squid-cache/squid

emptysea··on A routine gem update ended up creating $73k worth of subscriptions
Why doesn’t test mode work for testing?
emptysea··on Beating the tradeoff between developer velocity and scalability
Never seen that before, looks good!
emptysea··on Beating the tradeoff between developer velocity and scalability
Also used DRF in prod, the serialization in particular is super slow.

Also no asyncio isn’t great in this day and age.

Plain django, without DRF, just using JsonResponse is pretty great TBH, has all the batteries for things like auth and testing. Although having it be async would be a huge plus.

I recommend checking out pydantic and using that to enforce a schema for endpoint responses. Also much easier to understand (imho) than DRF’s serializers and you get static typing for free!

emptysea··on I took a job at Amazon, only to leave after 10 months
What does CDO mean in the context of Amazon?
emptysea··on Fastmail reminded me when I forgot an attachment
Interesting! I'm also surprised thunderbird's written in JS and not C++.
emptysea··on The argument against clearing the database between tests (2020)
Ultimately what matters is the entire application, database queries and all, works. I think calling out to the DB in tests is important for ensuring the entire app works.

And tests hitting the database can be fast: https://www.brandur.org/nanoglyphs/029-path-of-madness

emptysea··on Tailwind CSS v3.0
I'm curious how that would work with typescript since it's adding extra props like `css` and `tw` to components which don't exist in the types
emptysea··on Homebase
I'm curious how this system handles permissioning aka preventing a random user from querying the rest of the DB.

Firebase has some bespoke config that is dependent on all your data being in a key value mapping. I wonder how that would translate to a relational store.

Also building on clojure / datalog seems interesting and maybe risky.

emptysea··on New language features since Java 8 to 17
Not the parent, but presumably it would allow for fancy monad stuff like Scala's Cats Effects[0] and Zio[1] which can make async programming easier to follow without having to introduce async/await

[0]: https://typelevel.org/cats-effect/ [1]: https://zio.dev

emptysea··on Facebook-owned sites were down
Interesting, even some open source sites like: https://fbinfer.com are down

but https://glean.software and https://reactjs.org aren't

emptysea··on Get rid of those boolean function parameters (2015)
Linters can check for this sort of thing, for example Error Prone[0] has a lint[1] for this.

Totally agree this is better to be in the language proper so we don't need this extra tooling.

[0]: https://errorprone.info

[1]: https://errorprone.info/bugpattern/ParameterName

emptysea··on Gap acquires 3D fitting room startup Drapr
Crunchbase says they only raised $125k so even if they were acquired for a few million, they likely made out okay.
emptysea··on How Discord Stores Billions of Messages (2017)
Interesting, trying it out on Discord the default max msg size is 2000 chars and with Discord Nitro the max is raised to 4000 chars.

Testing with Postgres, a 2000 char random sequence doesn't result in TOASTing, but a 4000 random sequence does get TOASTed

And for kicks, 4000 chars that aren't random compress well enough that they don't end up in TOAST.

emptysea··on How Discord Stores Billions of Messages (2017)
Why would the text data be stored in TOAST?

My understanding was PG only uses TOAST when the data is too large to fit in the row, and since PG compresses data before inserting wouldn't user messages be fine?

emptysea··on SQLModel – SQL Databases in FastAPI
I'm curious how the type hints for the `__init__` method are derived from the properties in the class without a type checking plugin

Nothing stuck out to me when perusing through the code

Edit: seems pylance can figure it out but mypy can't, maybe pylance is special casing something?

    from typing import Optional
    from sqlmodel import Field, SQLModel
    
    class Hero(SQLModel, table=True):
        id: Optional[int] = Field(default=None, primary_key=True)
        name: str
        secret_name: str
        age: Optional[int] = None
    
    reveal_type(Hero.__init__)
    # pylance: Type of "Hero.__init__" is "(self: Hero, *, id: int | None = Field(default=None, primary_key=True), name: str, secret_name: str, age: int | None = None) -> None"
    # mypy: main.py:18:13: note: Revealed type is "def (__pydantic_self__: sqlmodel.main.SQLModel, **data: Any)"
← PreviousPage 5 of 8Next →