Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
MrJohz
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
33 ms
·
451.
▲
by
MrJohz
2y ago
I think when trying to understand SSR, it's worth remembering what actually was happening with older systems like PHP. You say that outputting HTML in PHP is `view = f(state)`, and this is to a certain extent true, but it meant that an
452.
▲
by
MrJohz
2y ago
> The pro-web-component folks argue that WCs are standardised and will continue to work basically indefinitely regardless of the ebbs and flows of popular libraries, and because it's easier to progressively enhance and therefore mor
453.
▲
by
MrJohz
2y ago
Out of interest, why not move those lines into a separate configuration file and put the whole thing in gitignore? With environment variables this is usually pretty trivial.
454.
▲
by
MrJohz
2y ago
I second the comment made by the sibling poster that you should generally see the head commit in jj as your staging area, but treated like a real commit instead of the pseudo-commit that it is in git. That said, I've ran into the same
455.
▲
by
MrJohz
2y ago
I think you might be talking about a different thing to the other poster. The dialog element behaves exactly how you'd want it to behave for a company with their own design language — you can style every part of it exactly how you need
456.
▲
by
MrJohz
2y ago
I think this is too simplistic a theological approach, though. Remember that Jesus was not above direct action himself, ranging from property damage to literally whipping people to get them in line. While Jesus' ultimate mission is hea
457.
▲
by
MrJohz
2y ago
This is definitely a problem that can occur, but for the one I was thinking of originally when writing the comment, we had pretty much all the resources available: the company sold internationally, so already had plenty of access to high-qu
458.
▲
by
MrJohz
2y ago
I don't think localisation should be forced on anyone, but we had enough people using our software who couldn't speak English that getting it right would have made a lot of people's lives easier. At one place I worked, they e
459.
▲
by
MrJohz
2y ago
Neither of the test libraries are specific to unit tests, so I don't quite understand that comment. That said, there are a lot more issues than just the differences between JSC and V8 - the Bun and NodeJS runtimes, while theoretically
460.
▲
by
MrJohz
2y ago
I worked with an office of Germans who insisted that ASCII was sufficient. The German language uses letters that cannot be represented in ASCII. In fairness, they mostly wanted stuff to be in English, and when necessary, to transliterate Ge
461.
▲
by
MrJohz
2y ago
This is true for NodeJS as well - dependencies on NPM cannot be removed, so at long as NPM keeps running, and as long as you've got a lockfile that precisely specifies all dependencies, you shouldn't run into problems running olde
462.
▲
by
MrJohz
2y ago
It's not an explicit feature, but a combination of arbitrary records, sum types, and type narrowing: type Animal = | { species: "dog", name: string, catsChased: number } | { species: "cat", name: s
463.
▲
by
MrJohz
2y ago
I'm not sure that's true. There's lots of ways to use and manipulate the DOM. But React is particularly special because it turns out to be a simpler way to think about UI components. A TUI has nothing to do with the DOM, but
464.
▲
by
MrJohz
2y ago
You can get a lot of mileage out of ESLint + typescript-ESLint + various other plugins. It's more of a "choose your own adventure" kind of experience, but the defaults are a good start, and if you're looking for cyclomat
465.
▲
by
MrJohz
2y ago
> -m` means to run the code as a module, i.e., to figure out what package it's in (by importing its ancestors first) and to set its `__name__` to the actual name of the module (so that code inside `if __name__ == '__main__'
466.
▲
by
MrJohz
2y ago
I'd also add to this that people often end up with very different ideas of what a unit test is, which confuses things further. I've seen people who write separate tests for each function in their codebase, with the idea that each
467.
▲
by
MrJohz
2y ago
Hmm, I think we have different definitions of a semantic line wrap. To me, semantic line breaks means that line breaks are used to separate clauses and sentences, such that at least every sentence is on its own line, and every line break re
468.
▲
by
MrJohz
2y ago
I think this a valid approach to semantic wrapping, but I don't think this is the only one, and specifically I think it has significant flaws: (1) We've lost grepability unless I write rather complex regexes to handle the possible
469.
▲
by
MrJohz
2y ago
> This is a sentence that includes the word "Lopadotemachoselachogaleokranioleipsanodrimhypotrimmatosilphiokarabomelitokatakechymenokichlepikossyphophattoperisteralektryonoptekephalliokigklopeleiolagoi
470.
▲
by
MrJohz
2y ago
One of the rules I teach people when they're starting using promises is never ever to write `new Promise(...)`. That's not because it's bad - it's a useful tool if you're connecting event or callback-based systems t
471.
▲
by
MrJohz
2y ago
That doesn't sound like soft or hard wrapping, though, that sounds like semantic wrapping, which is a separate concept entirely. With semantic wrapping you put each sentence (or similar) on a new line, which helps with diffing. But if
472.
▲
by
MrJohz
2y ago
Which is why you use a type checker to ensure that it never happens in the codebase. If there is no line of code that ever does something like int_field: int = "string" or self.int_field = "string" Then
473.
▲
by
MrJohz
2y ago
Counter argument: this is actually a myth that gets repeated far too often, and misses the point of what static types do. If your input data is the correct type (big if #1), and if your types are sounds and consistent with each other (big i
474.
▲
by
MrJohz
2y ago
Maybe we have different understandings of REPLs. For me, a REPL is a tool that I can use to try out some portion of my code, see how it responds to various inputs, see how it handles certain cases, and explore the internals of it via debug
475.
▲
by
MrJohz
2y ago
Thanks for pointing the typo out! I've fixed the comment. In fairness, I think a lot of this comes down to familiarity. I'm fairly familiar with `.clone()` and Arcs at this point, so they don't really change much in terms o
476.
▲
by
MrJohz
2y ago
Do they really have better economics? (EDIT: ergonomics!) Last time I looked into OCaml, I struggled to find a way to interact with the database in a type-safe way, I never figured out which standard library I was meant to install, I was b
477.
▲
by
MrJohz
2y ago
If I'm coming into the office, I'd rather be around other people than locked in my own room (otherwise I might as well be working from home), so I prefer small open-plan offices - maybe 3-8 people in a room. More than that starts
478.
▲
by
MrJohz
2y ago
It's very common in the UK to just call them jigsaws, as most people are more likely to interact with the puzzle than the tool. Interestingly, in Germany, they tend to just be called puzzles, so they went in the other direction.
479.
▲
by
MrJohz
2y ago
You could possibly fix this mechanically using three 7-day clocks (and wheels) and a mechanism that switches which one is being powered whenever a wheel reaches a certain point. But at that point I might be more tempted to reach for a micro
480.
▲
by
MrJohz
2y ago
I use Cloudflare Pages, and having heard these sorts of stories from HN and other places, I did spend some time exploring the settings to ensure the largest number of people could access the site. My impression was that the default settings
More ›