Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
MrJohz
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
21 ms
·
151.
▲
by
MrJohz
1y ago
Decorators don't work for functions, unfortunately, so wouldn't work in this case. You'd need to add a bunch of class boilerplate to make it work. JavaScript didn't have a lot of great options for this kind of statically
152.
▲
by
MrJohz
1y ago
You can make the code open source without accepting pull requests or contributions from other people. You might still get pull requests or patches, but you can set expectations up front and then ignore/auto-close any contributions you
153.
▲
by
MrJohz
1y ago
To egotistically comment on my own comment (unfortunately I can't edit any more): This is all specific to frontend stuff, i.e. how do you build an application that mostly lives on the client. Generally, the answer to that seems to be
154.
▲
by
MrJohz
1y ago
> [...] we'd arrive at stability and consensus. Honestly, that's basically happened, but just a generation later. Most modern frameworks are doing very similar things under the hood. Svelte, SolidJS, and modern Vue (i.e. with V
155.
▲
by
MrJohz
1y ago
I think you're mixing some things up there. The history of making HTTP requests in the browser has only been two APIs: XMLHttpRequest -> fetch. Fetch is an upgraded version of XMLHttpRequest with a promise-based API and better async
156.
▲
by
MrJohz
1y ago
Is that persistent? As in, if I select a style sheet for a website, will it use that same style sheet if I reload the website or navigate back at a later date? Browsers do this all the time with zoom levels, but it would be really useful fo
157.
▲
by
MrJohz
1y ago
This isn't quite the whole picture. If called in a nested context, `setTimeout` callbacks get executed in the next execution window, or at least 4ms after the initial call , whichever is earlier. Similarly, I believe `setInterval` has
158.
▲
by
MrJohz
1y ago
Can you explain why the `p` example is unmergeable whereas the `b` one isn't? I can't see any difference between the two examples other than the tag used.
159.
▲
by
MrJohz
1y ago
Is there any scale of paint chucking that can realistically represent a terrorist threat? Is there any scale of paint chucking that should lead to proscription? Because that's the key point here. It's not "can they be prosecu
160.
▲
by
MrJohz
1y ago
Is that inaccurate? Unless the goal was to strike terror into the hearts of some insurance companies, in what way does the scale of the damages affect whether this organisation should be proscribed? Should we be proscribing Bernie Madoff
161.
▲
by
MrJohz
1y ago
That's an argument for arresting and imprisoning a bunch of people for criminal damage, not an argument for proscribing an entire organisation and limiting their free speech. The argument here is not the PA should be let off scot free.
162.
▲
by
MrJohz
1y ago
I guess that's the difference between the Python and the TypeScript approach here. In general, if something is possible, valid, and idiomatic in JavaScript, then TypeScript attempts to model it in the type system. That's how you g
163.
▲
by
MrJohz
1y ago
Huh, I would have said almost the opposite to that last paragraph. Recognising that I am the person who produced some bit of work, and therefore I am responsible for its quality (and in this case timeliness) is the heart of self-reflection.
164.
▲
by
MrJohz
1y ago
Doesn't that go both ways? If we're "really engineers", we don't need to use hyperbole to communicate simple ideas like "this isn't on time, nor is it up to the right quality standards, and I'm tired
165.
▲
by
MrJohz
1y ago
How is "responds to the `__add__` method" anywhere close to equivalent to `Any`?
166.
▲
by
MrJohz
1y ago
> Typescript is unsound: since it just erases types, an untyped library that a typed component is using might return something the typed component isn’t expecting leading you to get a type error in typed code. Gradually typed python vari
167.
▲
by
MrJohz
1y ago
The common people are responsible for the actions of their government in a democracy, are they not? The issue is that Iran isn't a democracy, it's a theocratic dictatorship — the people are explicitly not able to be responsible f
168.
▲
by
MrJohz
1y ago
I think the issue is that most DSA curriculums do go super deep on things like sort algorithms or linked lists or whatever else. Whereas testing is usually barely taught in universities or colleges, and when it is taught, it's usually
169.
▲
by
MrJohz
1y ago
> Anyways, now I’m a full-time lecturer teaching undergraduate CS courses (long story) I would love to hear that story if you're willing to tell it. It sounds like you're a great lecturer, though, giving the students exactly th
170.
▲
by
MrJohz
1y ago
I think the point Norvig is making there broadly agrees with this post though. In the Sudoku affair, Norvig had the DSA knowledge there, sure, but his point is more that you need to be willing to look up other people's answers, rather
171.
▲
by
MrJohz
1y ago
I'm not talking about whether Germany's rail network is better or worse than other people's rail networks, but rather whether it embodies the supposed national characteristic of being methodical and precise. The problem with
172.
▲
by
MrJohz
1y ago
Maybe a better phrasing is "don't make me think about inconsequential details". If I need to figure out your particular idiom of writing a for-loop, then that takes time away from thinking about what the code is actually doin
173.
▲
by
MrJohz
1y ago
Eh, I think that's a bit overblown. In theory, Germans are famously methodical and precise, in practice the rail network is falling apart, a major bridge in my city recently collapsed due to lack of proper maintenance, and "made i
174.
▲
by
MrJohz
1y ago
A lot of monorepo strategies that I've seen involve maintaining a DAG of dependencies so that you don't need to run CI over the entire system (which is wasteful if most of the code hasn't changed), but only a specific subset.
175.
▲
by
MrJohz
1y ago
First off, thanks for sharing this, because I've seen a lot of your comments on these sorts of threads about web development, and it's helpful to see what your approach looks like in practice. There are a bunch of amber flags that
176.
▲
by
MrJohz
1y ago
Lit is a framework, that's the whole point of it. Lit is a framework that happens to generate web components, but the goal of Lit is to provide the rendering and state management necessary to actually write those components. That
177.
▲
by
MrJohz
1y ago
Except the problem with compatibility is almost always the reactivity element, right? Getting, say, Vue's reactivity system to compose properly with Svelte's, or React's with Angular's. And that's not going to wor
178.
▲
by
MrJohz
1y ago
Doesn't Erlang/Elixir solve this by having every function do its own parsing (via pattern matching) and then failing fast if something goes wrong? That seems intuitively like a good approach to take — you can't make any real
179.
▲
by
MrJohz
1y ago
Gleam is really interesting to me, because it's built on top of the BEAM runtime, but as far as I can tell, it does very little with the actor model that is the star attraction of BEAM/Erlang. There's a (non-built-in?) packag
180.
▲
by
MrJohz
1y ago
Yes, it was pure accident! I surely had the helix homepage and documentation most of the time while writing this, but only thought to link that one bit of documentation! When I get to a computer next I'll update it with a link, because
More ›