Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
bvrmn
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
9 ms
·
91.
▲
by
bvrmn
1y ago
It's literally stated in the PEP: https://peps.python.org/pep-0681/ Also: https://github.com/python/mypy/blob/501a07b45af8e44eda665e53... Also did you know mypy ignores typing of cl
92.
▲
by
bvrmn
1y ago
It's not mypy issue. Comparing to TS python typehints (spec wise) are a joke. It's started as bolted on adhoc solution and evolved quite chaotically. For example [1]. TS doesn't require a special decorator (sic!) to make your
93.
▲
by
bvrmn
1y ago
450W is ~£100 monthly. It's a luxury budget to host hobby stuff in a cloud.
94.
▲
by
bvrmn
1y ago
My wording is bad, I agree. Original thought was: complicated edit makes TPSV adoption as nearly impossible.
95.
▲
by
bvrmn
1y ago
I think spec tries and fails to translate code implementation into human language. In code cell separator is `\t|`.
96.
▲
by
bvrmn
1y ago
1. It's quite easy to miss a tab and use only `|`. 2. Generated TPSV would look like an unreadable hard to edit mess. I doubt any tool would calculate max column length to adjust tab count for all cells. It basically kills any streamin
97.
▲
by
bvrmn
1y ago
Strict YAML has only strings, lists and maps. TBH it has much more nicer syntax as well.
98.
▲
by
bvrmn
1y ago
According to spec it's nearly impossible to correctly edit files in this format by hand.
99.
▲
by
bvrmn
2y ago
> No hidden control-flows It's so much fun to `return err` through every layer. Explicit no-op attached to every call, yeah! > No unexpected uncaught exception logs blowing up your terminal (aside from actual program crashes via
100.
▲
by
bvrmn
2y ago
Yep. I prefer Vue myself — no need to stay on toe tips full time. It's really a question of available ecosystem and quite phenomenal React's backward compatibility which ties very agile in other circumstances FE devs to the framew
101.
▲
by
bvrmn
2y ago
It's React thing. In maintenance context it's always better to not extract component instantiation. They could start to use hooks or they could be wrapped in conditions in a parent component and it would lead to severe quite hard
102.
▲
by
bvrmn
2y ago
This approach is a classic footgun for beginners in the context of "hook rules". In general it's quite fragile.
103.
▲
by
bvrmn
2y ago
> That is the code. Good code consists of easy to use abstractions. In general Chris's blog is dedicated to poking bad abstractions and giving good examples. `substring` is objectively bad. You (and other commentators) literally arg
104.
▲
by
bvrmn
2y ago
> It is called in one (1) place in a small program.
105.
▲
by
bvrmn
2y ago
> This isn't some 100k line long program It could use `str*` functions without any issues then. Nul-terminated strings are perfectly safe with assumptions to follow. Anecdote: I fixed 3 reported segfaults and another 2 after fuzz-te
106.
▲
by
bvrmn
2y ago
It would reduce number of assumptions, especially ones laying only in your head. Generally it's a good thing, isn't it? Literally large portion of C code bugs is due to broken assumptions. WTF man?
107.
▲
by
bvrmn
2y ago
For this particular case it's trivial to fix substring function and extend possible inputs. It seems your proposition: "do nothing because it's futile". It's simply wrong.
108.
▲
by
bvrmn
2y ago
> Still, this function is called only once, and in that call, its i argument is always <= length, so it's perfectly fine (it's only UB if you actually pass it a bad argument). This very mindset is a source of bugs and vulner
109.
▲
by
bvrmn
2y ago
> Str substring(Str s, ptrdiff_t i) The function has quite questionable implementation. It fails miserably for strings with length < i.
110.
▲
by
bvrmn
2y ago
Returning static "hello world" response for slowest python framework is easily not bigger than 1ms (for fast frameworks it's 0.1ms or lower). Good luck to make the rest of your app to make something comparably fast if db or n
111.
▲
by
bvrmn
2y ago
Actual bottleneck in examples is sqlalchemy, like 10x overhead easily. I find it quite funny. There is no real difference in web frameworks for real apps in terms of overhead.
112.
▲
by
bvrmn
2y ago
> The elections aren't known to be broken yet Sweet summer child. Let me unfold a very precise prediction: * By the end of 2nd-3rd year. Trump/congress/republican party would propose an amendment that president could rule
113.
▲
by
bvrmn
2y ago
> the most powerful person in the country can do literally whatever they want with little to no pushback "President is the main person end has exceptional power". That's the mental model for most people. There is no any in
114.
▲
by
bvrmn
2y ago
Bless compilers able to catch wrong format specifiers.
115.
▲
by
bvrmn
2y ago
Amazing project! > I built this mainly around the habit of budget tracking at the end of the day. I've built 3 personal financial trackers. 2 CLI based and last a web-based to be able to serve it in termux as a local android app. An
116.
▲
by
bvrmn
2y ago
I clearly don't understand something about implications. Could you please elaborate or give a link to read about it? What is branch correctness? How could it be exploited? How does sanitization prevent it? sqlx looks like a usual build
117.
▲
by
bvrmn
2y ago
In this case it's hard to make something fancy :) from sqlbind import WHERE, FIELDS, join_fragments q = Q() # a QueryParams factory fields = [] joins = [] filters = [] if some_condition: fields.appe
118.
▲
by
bvrmn
2y ago
BTW, if you are interested there is an application of sqlbind in a non reporting context ( https://github.com/baverman/wadwise/blob/main/wadwise/model.... ) It's a small app with an attempt (and
119.
▲
by
bvrmn
2y ago
> but sanitization is completely ignored in the post, and should at least be mentioned Why do you need a sanitization for bind parameters?
120.
▲
by
bvrmn
2y ago
Writing AST or an abstract plan/execution tree is not a bad idea. mongodb and elasticsearch are extremely friendly for programmatic query builders.
More ›