Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
hk__2
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
12 ms
·
301.
▲
by
hk__2
1y ago
Try: def f(i=0) -> None: reveal_type(i) The inferred type is not `float` nor `int`, but `Any`. Mypy will happily let you call `f("some string")`.
302.
▲
by
hk__2
1y ago
I don’t really see "smart tricks" here, just features of the language that you may not be aware of. I use most of them in my daily work without thinking about it: `@overload` and other typing features are useful to document the co
303.
▲
by
hk__2
1y ago
What about this? for server in servers: if server.check_availability(): primary_server = server break else: logger.warning("Cannot find a valid server") # <--- primar
304.
▲
by
hk__2
1y ago
Same experience here, Python’s typing experience is awful compared to TypeScript, even post-3.12. Mypy’s type inference is so dumb you have to write arguments like `i: int = 0`; `TypedDict`s seems promisable at first and then end up as a ni
305.
▲
by
hk__2
1y ago
The Wikipedia example seems totally irrelevant: there’s nothing "designed to disorient you upon visiting", it’s just a normal interesting website with links between its pages.
306.
▲
by
hk__2
1y ago
It’s on a meta level: instead of formatting the string, it returns an object that contains both the format string and its argument. Library author can then implement whatever format function they want, for example one that escapes the inter
307.
▲
by
hk__2
2y ago
I’m French and this is the first time I hear about it.
308.
▲
by
hk__2
2y ago
(2023)
309.
▲
by
hk__2
2y ago
Don’t miss the Châtelet one in Paris!
310.
▲
by
hk__2
2y ago
From what I read [1] this habit of eating cheese as part of the meal is a tradition in France since at least the Middle Age, although until the end of the XIXth century it was eaten after the dessert instead of before. However I can’t find
311.
▲
by
hk__2
2y ago
I can’t really rate cheeses on a scale; A 36-months comté or emmental has very different flavours from a 36-months Parmigiano and I wouldn’t rate one "better" than the other. Like any good cheese, I agree that Parmigiano Reggiano
312.
▲
by
hk__2
2y ago
Right, I misunderstood the meaning of "guess" here.
313.
▲
by
hk__2
2y ago
The best programmers I know don’t use cheap hosting that rate-limit your static blog.
314.
▲
by
hk__2
2y ago
I don’t get this one: > Don’t Guess If you work with anything but a very simple program, you often must guess what could be the cause(s) of your issue in order to know where to look. The more experienced you are, the more accurate your g
315.
▲
by
hk__2
2y ago
"Reality" is subjective and not always so easy to observe. What about political debates, economy, social issues? I don’t want to read a journal that tell me "this politician said that", but one that tells me _why_ they s
316.
▲
by
hk__2
2y ago
> Sadly a lot of what calls itself jouranlism today is the exact opposite I don’t think this is something new, I feel that most of "journalism" has always been like this with few medias making the effort to show the whole pictu
317.
▲
by
hk__2
2y ago
> ... a wealthy person placing their money in a charitable trust - that actually does valuable work, rather than handing it to their children Isn’t it money that should have gone to the State here, rather than the children? They didn’t d
318.
▲
by
hk__2
2y ago
I tried an exercise with Italian, but for some reason one of the words is not in the list to drag and drop ("qualcuno"), so I’m stuck: https://app.fluentsubs.com/exercises/cm8y1r2cv004m8v1pr775ko... Edit: als
319.
▲
What Does Intellectual Humility Look Like? (2021)
(greatergood.berkeley.edu)
1 points
by
hk__2
2y ago
|
0 comments
320.
▲
by
hk__2
2y ago
> Look at how many apps require permission to see you contacts. It is so annoying that it’s either "give access to ALL my contacts and ALL their information (yes, even the notes I took on their favorite things for next Christmas)&qu
321.
▲
by
hk__2
2y ago
> I have zero non-functioning apps on my iphone due to denied access to contacts. You don’t have WhatsApp then.
322.
▲
by
hk__2
2y ago
OP talks about apps in general, of course there will always be anecdotic cases like this one (see also https://xkcd.com/1172/ ).
323.
▲
by
hk__2
2y ago
> Much like what I am doing here to what I assume is a group exceeding 100+ members. This is not a group, we’re not all receiving a notification because of your message.
324.
▲
by
hk__2
2y ago
We should build some sort of global network where all websites would be accessible to everyone. It would be an interconnection of networks, we could call it Inter-net.
325.
▲
by
hk__2
2y ago
> The opposite of spam is machine-generated content. Spam is not machine-generated content?
326.
▲
by
hk__2
2y ago
And this is why we see our logs overloaded with ABot BBot CBot etc, every single "AI" company makes their own bot and they all crawl the same pages over and over.
327.
▲
by
hk__2
2y ago
This design reminds me of something… [1] [1]: https://twominutereports.com/
328.
▲
No Best Practices (2006)
(satisfice.com)
3 points
by
hk__2
2y ago
|
0 comments
329.
▲
by
hk__2
2y ago
Please go on because nothing that you mentioned can send you in jail.
330.
▲
by
hk__2
2y ago
I tried various solutions but I still haven’t found a chat tool that allows me to navigate a large monorepo. I’d like to be able to say "open the file where there is the function to do <xyz>", but current tools don’t underst
More ›