spartanatreyu

joined 1 year ago
[–] spartanatreyu 5 points 3 months ago (4 children)

What standard library?

JS has only had package/library hell

[–] spartanatreyu 5 points 3 months ago

Who is this article for?

Firstly, it's basically just a repost of existing info from the mozilla article but now with ads.

Secondly, the puppeteer team left years ago to work on playwright which is now the better product, which also supports firefox through the webdriver-bidi standard...

So now I'm wondering... just who was this article for?

[–] spartanatreyu 1 points 3 months ago

None of what you mentioned is actually about politics, it's just a list of outrage-bait

[–] spartanatreyu 2 points 4 months ago

I use git log --graph --all --remotes --oneline whenever I need to shell into another computer, but it's still too barebones for regular use.

[–] spartanatreyu 2 points 4 months ago

What specifically do you think is legacy in that comparison? The coloring? The horizontal layout? The whitespace?

Note: I've changed the first link from https://github.com/cxli233/FriendsDontLetFriends/network to https://github.com/zed-industries/zed/network. Still the same view, but just a different repo to highlight the problems

  1. It's in a small non-responsive box
  2. Ridiculous spacing
  • If you want to see the commit messages, you either need to hover over a dot which increases visual scanning durations or you need to go to the commits view which only shows the commits on a single branch
  1. It doesn't show commit messages
  2. It's scrolling horizontally
  3. Branches cannot be collapsed
  4. Branches cannot be hidden/ignored
  5. No way to search for commits
  6. No way to select multiple commits
  • Which also means no way to diff any specific commits together
  • And there's also no way to perform an action over a range of commits
  • And there's also no way to start a merge/merge-request/pull-request/etc... between two commits
  1. No way to sort by date/topologically
  2. Keyboard controls only moves view instead of selecting commits

I'll stop here at 10 reasons (or more if you count the dot points), otherwise I'll be here all day.


The network view lays out forks and their branches, not only [local]/[local+1-remote] branches.

Yes, but the others can do that while still being usable.

I don’t know what IDE that miro screenshot is from. [...]

It's gitkraken

[...] But I see it as wasteful and confusing. The author initials are useless and wasteful, picking away focus. The branch labels are far off from the branch heads. [...]

The picture doesn't do it justice, it's not a picture, it's an interactive view.

You can resize things, show/hide columns, filter values in columns to only show commits with certain info (e.g. Ignore all dependabot commits), etc... Here's an example video.

[...]The coloring seems confusing.

You can customise all that if you want.

[–] spartanatreyu 1 points 4 months ago

The first link is a totally different purpose than the second two.

The first link is going to there because that's the only graph view that github has.

[–] spartanatreyu 11 points 4 months ago* (last edited 4 months ago) (9 children)

I've got to say, seeing this:

https://github.com/zed-industries/zed/network

instead of something like this:

https://fork.dev/blog/posts/collapsible-graph/

or this:

https://miro.medium.com/v2/resize:fit:4800/format:webp/0*60NIVdYj2f5vETt2.png

feels pretty damn legacy to me.

[–] spartanatreyu 2 points 4 months ago (1 children)

I'd recommend removing as many variables as possible.

Try getting a single html page to work (no mongoose, no preact, no vite, no tailwind).

If you can't get that to work, then no amount of tinking in preact/vite/tailwind/mongoose will help you.

Once you have a single page running, you can look at the next steps:

For scripting: try plain js, then js + mongoose, then preact + mongoose. If a step fails, rely on the step before it.

For styling: try plain css, then a micro css framework that doesn't require a build step (e.g. https://purecss.io/, https://picocss.com/), then tailwind if you really want to try messing around with vite again.

[–] spartanatreyu 1 points 4 months ago* (last edited 4 months ago) (1 children)

Ubuntu is great.

The company that supports it (Canonical) usually makes an annoying decision that goes against the community's preferences every 3 years or so, but they always eventually rescind it.

The last decade of annoying decisions is changing which desktop environment is considered "default", and a bunch of developers time wasted on an ubuntu for phones which never released.

Their current "annoying decision" is pushing Snaps which are just a way to package apps. They're okayish, but they run apps slower than the other standards (Flatpak, Appimage, or just installing through a package manager) and Canonical is in charge of the place where Snaps are downloaded.

Most people just download Ubuntu, uninstall Snaps then install what they want.

So yeah, ubuntu is great, the company that supports them usually puts one annoying thing in at a time every few years that the community turns off and ignores.

[–] spartanatreyu 1 points 4 months ago* (last edited 4 months ago) (3 children)

Mint is based on Ubuntu, so you could try Ubuntu itself without the Mint stuff bolted on.

Ubuntu asks you what you want pre-installed when you're setting it up.

And since Ubuntu has all the same flavours that mint does (and more), it'll look like what you expect it to. Modern Mint uses Cinnamon whereas old Mint uses Mate, so just choose the one you're already familiar with.

[–] spartanatreyu 1 points 4 months ago

There are some tools/libraries that act as a front-layer over regex.

They basically follow the same logic as ORMs for databases:

  1. Get rid of the bottom layer to make some hidden footguns harder to trigger
  2. Make the used layer closer to the way the surrounding language is used.

But there's no common standard, and it's always language specific.

Personally I think using linters is the best option since it will highlight the footguns and recommend simpler regexes. (e.g. Swapping [0-9] for \d)

[–] spartanatreyu 8 points 4 months ago* (last edited 4 months ago)

At least once every few days while coding, usually to do one of the following:

  1. Select multiple things in the same file at the same time without needing to click all over the place

    Normally I use multicursor keyboard shortcuts to select what I want and for the trickier scenarios there are also commands to go through selections one at a time so you can skip certain matches to end up with only what you want.

    But sometimes there are too many false matches that you don't want to select by hand and that's where regex comes in handy.

    For instance, finding:

    • parent but not apparent, transparent, parentheses, apparently, transparently
    • test but not latest, fastest, testing, greatest, shortest
    • trie but not entries, retries, countries, retrieve
    • http but not https

    ... which can be easily done by searching for a word that doesn't include a letter immediately before or immediately after: e.g. \Wtest\W.

  2. Search for things across all files that come back with too many results that aren't relevant

    Basically using the same things above.

  3. Finding something I already know makes a pattern. Like finding all years: \d{4}, finding all versions: \d+\.\d+\.\d+, finding random things that a linter may have missed such as two empty lines touching each other: \n\s*\n\s*\n, etc...

view more: ‹ prev next ›