Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
bvrmn
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
7 ms
·
61.
▲
by
bvrmn
1y ago
A valid type for server and port should be a single value. Stop parse it separately please. ":3000" -> use port 3000 with a default host. "some-host" -> use host with a default port. "some-host:3000" ->
62.
▲
by
bvrmn
1y ago
maps and filters maybe. Other stuff is a wild west.
63.
▲
by
bvrmn
1y ago
Author picked up a quite convenient example to show methods/lambda superiority. I prefer list/set/dict comprehensions any day. It's more general, doesn't require to know a myriad of different methods (which could no
64.
▲
by
bvrmn
1y ago
QR has trivial format and code is easily extractable.
65.
▲
by
bvrmn
1y ago
Let me guess. To somehow patch iteration on associative arrays? And instead of bringing pairs or tuples as first class citizens it extends iterators with `key` and `value`. And now any Iterator implementation should track own sequentially i
66.
▲
by
bvrmn
1y ago
I consider built-in buffering as a huge win. * For example python gives you buffered by default streams. It's an amazing DX. * In case of Zig you as a developer should be explicit about buffer sizes. * You could opt-out to unbuffered a
67.
▲
by
bvrmn
1y ago
Defenders of PHP's iterators clearly tasted only carrots.
68.
▲
by
bvrmn
1y ago
> Iterating over something requires knowing where you are in the sequence, so of course you would need to implement a method to get the current position of the iteration. No you don't. Other languages don't require it. There is
69.
▲
by
bvrmn
1y ago
BTW: https://www.php.net/manual/en/iterator.key.php It's literally in the interface.
70.
▲
by
bvrmn
1y ago
What's idiomatic way to get index (0, n-1) with the value? Parent example shows you could not use $key as a generic solution.
71.
▲
by
bvrmn
1y ago
PHP generators/iterators is a hot mess. I don't know any other language which forces iterators to output a key for `foreach(... as $key => ...)`.
72.
▲
by
bvrmn
1y ago
Nah. Tests could be run in N processes each with own database configured to skip full fsync. It resolves most of the issues and makes testing much much simpler.
73.
▲
by
bvrmn
1y ago
blood
74.
▲
by
bvrmn
1y ago
I don't understand what's tricky about converting callback-style to promise-style. Even writing a decorator is trivial.
75.
▲
by
bvrmn
1y ago
Odin's IO is quite messy. I have strong feeling it evolved as an adhoc solution to tackle development requirements without much thought. I'm happy Andy wants to fix high level (and very important) interfaces while being in pre 1.0
76.
▲
by
bvrmn
1y ago
But underscore is literally a bunch of functions taking lambdas. Python also has functions and lambdas. [1] shows it could provide the same interface. I don't get what composable primitives JS has. [1]: https://pydash.readth
77.
▲
by
bvrmn
1y ago
> But in general Python devs seem to prefer "explicit" ad-hoc syntax for each use case instead of composable "primitives". I hope you don't consider JS having "composable primitives". To backup my point
78.
▲
by
bvrmn
1y ago
For my case it insisted to getting crazy 48kcal/kg of LEA. However I stated specifically I'm not a sportsman and don't strife to be.
79.
▲
by
bvrmn
1y ago
It's a "wisdom of the crowd" and mantra to follow established crypto standards.
80.
▲
by
bvrmn
1y ago
Thank you for recommendation. My tinnitus become quite severe now. For past three years it's almost impossible to sleep after waking up in the middle of the night. Overwhelming ringing is hard to ignore.
81.
▲
by
bvrmn
1y ago
Tell me more about scratch's purpose, please. I believe it's to teach programming. GoboScript seems a natural extension of already conventional environment to more "real" textual programming tasks.
82.
▲
by
bvrmn
1y ago
And I didn't use it because there was no need. Resource scoping is important feature. Context managers (in python) are literally bread and butter for everyday tasks. It's awkward not because of Symbol, it introduces new syntax tie
83.
▲
by
bvrmn
1y ago
Context managers: exist. JS: drop but we couldn't occupy a possibly taken name, Symbol for the win! It's hilariously awkward.
84.
▲
by
bvrmn
1y ago
I'm author of sqlbind[1] and since t-strings announce have been thinking really hard how to incorporate it. Like obvious cases `t"select * from table where id = {id}"` are tempting only at first glance. But simple queries cou
85.
▲
by
bvrmn
1y ago
For TLA it's even worse. Increasing node counts makes the spec immediately more "correct", at least it feels like that xdd.
86.
▲
by
bvrmn
1y ago
I agree, latexisms in TLA are on eye brow level of weirdness. Lesser punctuation syntax is always better.
87.
▲
by
bvrmn
1y ago
I did an eval of Quint about year ago and did not find it compelling. It constantly refers to TLA+ and doesn't bring much benefits except typing. Syntax tries to cover underlying fact that state machine is expressed in terms of logic
88.
▲
by
bvrmn
1y ago
Even 10x speedup would be amazing. Just imagine current 1min check would be performed in 6s.
89.
▲
by
bvrmn
1y ago
TLA+ has its own quirks, you could add sugar here and there, but from semantic standpoint you couldn't do much. It's "unreadable" because requires some mental model most of developers don't have. My point: you eithe
90.
▲
by
bvrmn
1y ago
Sticking to an library style is a way to go. It's so much friction to use python library wrappers which try to hammer original style into a snake_case.
More ›