Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
MrJohz
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
29 ms
·
421.
▲
by
MrJohz
2y ago
> Are you sure about that? Git reset doesn't need s chapter to explain. But it gets one — as they pointed out, Chapter 2.4 of the Git book ( https://git-scm.com/book/id/v2/Git-Basics-Undoing-Things ) is
422.
▲
by
MrJohz
2y ago
I'm not sure that's a given. Lots of things have reached worldwide adoption and don't have the reputation that Git has. Bash, for example, is quirks and chaos galore, and I don't think even that has the same level of i
423.
▲
by
MrJohz
2y ago
JJ should be compatible with any existing Git server. The project is currently maintained on Github, and I believe all the maintainers use JJ to work on the project itself. At work, I use JJ a lot with repositories hosted on Azure Devops,
424.
▲
by
MrJohz
2y ago
I think that's actually one of the nice things about JJ in comparison to many others (such as hg or Pijul): it uses Git essentially like a protocol or standard by which it communicates with other systems (and as a file-system standard,
425.
▲
by
MrJohz
2y ago
See the documentation here: https://jj-vcs.github.io/jj/latest/config/#filesystem-monito... The default behaviour (i.e. `core.fsmonitor = "watchman"`) is to only use the file watcher as an optimisat
426.
▲
by
MrJohz
2y ago
You can always undo the most recent action using `jj undo`. To undo older actions, the easiest solution is to look for the state you want to get back to in the operations log `jj op log`, and then restore that state directly using `jj op re
427.
▲
by
MrJohz
2y ago
I agree that you probably want to keep staging, but one of the advantages of JJ is that staging is just a change* like any other change in your history. There are a couple of different ways that people use JJ, but I normally use the "s
428.
▲
by
MrJohz
2y ago
As others have pointed out there's `jj undo` and other tools, but they all rely on the fact that JJ is less mutable than it seems. Internally, JJ is still backed by an append-only tree of commits. You don't normally get to see the
429.
▲
by
MrJohz
2y ago
> but AFAICT they will not do anything visible or useful They are very useful for people using reader mode. I wouldn't worry about sections, though, they're not really used by many tools, as far as I'm aware. > Viewport
430.
▲
by
MrJohz
2y ago
It's a very common mistake! No worries, I always enjoy getting to explain these details to people, I find them really interesting.
431.
▲
by
MrJohz
2y ago
By shadow DOM do you mean the virtual DOM? The shadow DOM is also a thing, but it's largely unrelated to web frameworks. The idea behind the virtual DOM is that it's usually easier to render everything in a functional sort of way
432.
▲
by
MrJohz
2y ago
One thing that I've learned over time is that if I can't understand why people are taking some particularly obtuse or circuitous route, then that's probably because I don't yet understand what they're doing properly
433.
▲
by
MrJohz
2y ago
> The linux kernel is like a house where everyone is a vegan. Marcan believes that incorporating some meat in the diet is important, and better that being a vegan. He may even be right. But so what? He makes his pitch, the family says th
434.
▲
by
MrJohz
2y ago
In addition, the two cases can be toggled on and off using CSS alone, because `display:inline`, `display:block`, and `display:inline-block` all do different things to the two pieces of whitespace: * `display:inline` allows the trailing spac
435.
▲
by
MrJohz
2y ago
I did not know you could check them out! But yeah, that really emphasises what I'm saying: there are too many things that are mostly commits but handled in a different way. And I completely agree that this is about the CLI more than t
436.
▲
by
MrJohz
2y ago
I'm going to cheat and say I use a different VCS, but I do really like Jujutsu's approach here. It has this idea of mutable commits, so essentially you can check out a commit, and then whenever you change a file, the commit is upd
437.
▲
by
MrJohz
2y ago
> Literally every one of those questions can be trivially googled. (In previous generations and fora, this is where you'd be mocked with LMGTFY links). You just, to continue to embrace the frame, don't want to do the work. I
438.
▲
by
MrJohz
2y ago
> Although true, it isn't a very useful observation. "How do I find someone impartial to this matter?" is one of the great unsolved questions that the lawyers have to deal with. Up there with "what is true?". Alt
439.
▲
by
MrJohz
2y ago
Really, can you give a more specific example? I have never had a node upgrade break my code, and would be fairly surprised if I were to run into that situation! I also don't quite understand your other points - runtime environments ar
440.
▲
by
MrJohz
2y ago
And there are patterns for that, that allow you to convert a static exclusivity check into a dynamic exclusivity check - something like a mutex, where multiple threads can simultaneously hold a mutex, but only one thread at a time can gain
441.
▲
by
MrJohz
2y ago
Unless you encode ownership into the type system, and then you kind of have the best of both worlds: you don't have functions mutating things unexpectedly or by accident, but you can explicitly opt into mutation when it would be benefi
442.
▲
by
MrJohz
2y ago
Namespaces are already pretty rarely used - mostly in older codebases in development as modern JS modules were still being developed and worked out. The Typescript compiler, for example, recently put a lot of work into getting rid of namesp
443.
▲
by
MrJohz
2y ago
I've started recommending jj as a (git compatible) alternative to git, and one of the things I like about it is that the default action if you run `jj` with no arguments shows the relevant parts of the commit tree and where you are in
444.
▲
by
MrJohz
2y ago
All the different configuration you need for Webpack is built-in to Vite. This includes built-in support for a lot of stuff that would come as separate plugins in Webpack (CSS loading, Typescript support, asset bundling, minification, auto
445.
▲
by
MrJohz
2y ago
This is incorrect on several points. Firstly, Node's `require` syntax predates the modern JS `import` syntax. It is related to some attempts at the time to create tools that could act like a module system for the browser (in particula
446.
▲
by
MrJohz
2y ago
Birmingham also had a grammar school system that is state funded, although most are supported by a charitable foundation as well. This all became more complex again with the introduction of academies (twice, with different goals and subtly
447.
▲
by
MrJohz
2y ago
It's worth noting that Node allows two packages to have the same dependency at different versions, which means that `npm i -g` is typically a lot safer than a global `pip install`, because each package will essentially create its own d
448.
▲
by
MrJohz
2y ago
> I reviewed many code written by junior people, and very often I see people adding code in random places that later may let the application to be hard to follow and everything "seems fine" to them. But is that because they
449.
▲
by
MrJohz
2y ago
A number of countries use this when giving your pin for a credit card or similar (I've noticed it in both Greece and India). I can't help but feel like it's less secure than the default layout - I'm quite good at hiding
450.
▲
by
MrJohz
2y ago
Can you describe some of those basics? In my experience, the JS ecosystem is surprisingly good, and most of the issues tend to be due to a lack of experience rather than directly tooling issues. For example, NPM is one of the better package
More ›