brian

joined 2 years ago
[–] brian@programming.dev 1 points 10 hours ago (1 children)

they are the first thing that comes up when searching "cursor" in both ddg and google, so I think they're doing ok

[–] brian@programming.dev 1 points 1 week ago

idk if 2 users is fair, it may just be my circles but I see nixos mentioned more than almost anything else on lemmy/hn/etc in the past couple years

[–] brian@programming.dev 1 points 1 week ago (2 children)

not sure what you're talking about but there's two things here.

TRAMP is great and you can run the lsp on the remote machine without installing anything assuming the linters and lsp are already installed. for comparison, vscode remote downloads and runs a shim thing when you connect.

I use doom emacs at work for large codebases all the time and haven't run into any problems. why does it only work for really small projects?

[–] brian@programming.dev 1 points 1 week ago* (last edited 1 week ago)

the instructions for installing on not nixos https://nixos.org/download/

[–] brian@programming.dev 5 points 1 week ago (2 children)

plenty of package managers have.

flatpak doesn't require any admin to install a new app

nixos doesn't run any code at all on your machine for just adding a package assuming it's already been cached. if it hasn't been cached it's run in a sandbox. the cases other package managers use post install configuration scripts for are a different mechanism which possibly has root access depending on what it is.

[–] brian@programming.dev 2 points 1 week ago (1 children)

yeah there isn't really a general purpose react way to do that.

if order didn't matter then you could just have a Header component that registers itself in a context but there's no way to know where each component is relative to its siblings.

the other way is to break out of react and just walk the dom. pass a ref to your component and use that as the root to walk. only works assuming normal react dom renderer and no portals.

you can combine those two options too, use context for registration so you can attach extra info, then dom for position.

there are some libs that let you walk a component tree, but they're all focused on ssr and idk how they work in a browser. wouldn't go this route for anything prod.

last option is just store your content as data. have md/mdx/json/whatever files that are the content for your page, then as you parse them build up the tree. probably the most robust if it fits your use case. if you use MDX it seems like they already have some solutions

[–] brian@programming.dev 2 points 1 week ago (3 children)

there's sort of ways to achieve this but none of them good react. what's the actual goal?

[–] brian@programming.dev 3 points 1 week ago

yeah that should just be a pip package instead, then install it any normal way

[–] brian@programming.dev 11 points 1 week ago (1 children)

the social pressure of other kids

[–] brian@programming.dev 2 points 4 weeks ago

alpine fits that, or derivatives like postmarketos

[–] brian@programming.dev 3 points 4 weeks ago

have you considered https://github.com/a-schaefers/systemE plus https://github.com/emacs-exwm/exwm ? that's basically an entire emacs userland

[–] brian@programming.dev 1 points 1 month ago* (last edited 1 month ago)

json is fine as a serialization format for things that need to be text, but it's not great as something that gets edited by hand.

not that I enjoy xml, but writing long strings in json is even worse. xml I can write multiline strings as a first class entity.

I can add a comment to an xml document, json I have to write something hacky like "//": "my comment" and hope whatever is consuming it doesn't care.

there's just as many problems with json parsers, since most but not all of them treat numbers as js numbers, which are basically floats. you can't rely on an arbitrary consumer having support to parse ints above a certain size so you just have to make everything a string and hope.

json allows duplicate keys, but they get overridden by the last occurrence. you can't round trip json without losing something. you can't rely on just seeing a key value in json text and that being correct since there could be another later. doesn't come up often but it's there.

view more: next ›