• 0 Posts
  • 1.15K Comments
Joined 3 年前
cake
Cake day: 2023年6月21日

help-circle
  • At work? Do what they want you to do I guess. If they are mandating you mass produce slop, do exactly that. I’ve tried fighting against it. There’s nothing you can do when your coworker opens a 785 file PR (not an exaggeration) and it needs to be reviewed today. Your carefully crafted code can never keep up with the constant waterfall of whatever the fuck Claude/ChatGPT/whatever calls acceptable these days.

    Your best bet at work is to direct the agents others will use. Use a strict linter. Mandate a strict formatter. Add to the instructions that tests must be written and must pass. Do what you can to force it to emit semi-acceptable code (or fail if it can’t).

    Outside of work? What’s a coding agent?


  • JavaScript takes yet another approach. It doesn’t have an equivalent of the Character.isWhitespace() method, but we can use the \s character class in a regular expression

    \s might be the most obvious whitespace test, but the expectations are a bit more ambiguous when it comes to regex. Every regex runtime is different, so without looking it up, you’re going to end up with behavior you might not expect.

    Instead, if you want to match Unicode whitespace, you should use \p{White_Space} in Unicode-aware mode (u or v flag).

    I haven’t looked through any other runtimes, but something tells me the inconsistencies won’t stop at these three.

    According to the docs, Rust’s char::is_whitespace checks if the value has the White_Space property, and regex does the same in Unicode mode (which is the default).


  • I liked Zed a bit, but I ran into some bugs that made me switch back to my previous editor. I think I’ll give it more of a shot in the future once it’s a bit more mature. Otherwise, I enjoyed how responsive it felt, and having a single toggle to completely turn off AI features was nice.

    For Kate, I view it as an alternative to Notepad++. It’s quite a bit more powerful than N++, but to me feels like it fits in around the same place you described between simple text editor and advanced coding IDE. It’s a great default for people who tend to modify a lot of config files.




  • The main problem I have with the bulk of Anti-AI opinions is that they are simply that: opinions, backed up with parroted “facts” many of which are baseless, untrue, blown out of realistic proportion, etc.

    This is, to an unbelievabe extent, true of the “Pro-AI” crowd (in particular those selling AI). It’s to the extent that the economy is inevitably fucked once investors start pulling out. AI CEOs lie regularly about the capabilities of their products.

    In any case, “pro-AI”/“anti-AI” is a political approach to AI, and politics revolves entirely around opinion. If you truly want “facts” then you have to be willing to accept facts that you disagree with as well.

    It is a fact that many bugs have been found with AI, yes. It has provided value to a lot of people.

    It is also a fact that for all the good AI has done for people, it is also an unregulated bullshit emitter. Shit, just the other day, I tried asking Kagi Assistant a question, and it gave me an answer in Chinese. My question was in English. It had nothing to do with languages. But if you want numbers, these AI companies publish their benchmarks publicly, so go look at those and consider whether “correct 80% of the time in a benchmark the model was optimized for” is good enough to always trust.

    Finally, it is a fact that AI companies have done irreparable harm to the world on an enormous scale, socially, ecologically, politically, and so on.


  • Am I the only person that thinks fixing kernel bugs discovered with AI is a good thing?

    No. A bug is a bug.

    Even everyone saying Linus went full AI… Like… What? IMO he’s being practical. It IS a tool, and there ARE a lot of things it should not be used for, but using it to patch things before human verification happens is a pretty sensible thing to do.

    Using AI to fix a bug is different than fixing a bug found by AI. Even in Torvald’s vibecoded patch, he introduced a new bug, then asked the reviewer to take over the patch and went on vacation.

    Would love to hear from someone who has been programming for a long time and isn’t all just “AI bad because AI bad”.

    While I get where this is coming from, being dismissive of people who you disagree with doesn’t exactly inspire healthy discussion. If you want genuine opposing opinions, those will only come from those you disagree with.










  • I also think the attitude toward it would be more positive if those in the spotlight for training these models weren’t actively creating global economic crises, bringing down random websites with sustained high-volume traffic, filibustering collaboration with low quality issues and PRs, and completely disregarding the licenses for the code they’re using.

    In fact, were these models only used to better the world, I’m sure that many developers would be more than happy to support the effort even if it meant licensing the code for training under more permissive licenses (assuming they could get their contributors on board as well).

    Instead, we all get to hear about how some egotistical billionaire is trying to become a trillionaire, or how the prices of everything skyrocketing is a good thing because some rich people got more rich.





  • How are you accessing the website? Are you using a web server like miniserve or are you just opening the HTML files in a browser?

    Beginning a path with / makes the path absolute for that origin. An origin is basically the URL’s scheme, domain, subdomains, and port (so https://www.example.com/foo/bar has the origin https://www.example.com/ - ignore the trailing slash, Lemmy keeps adding it…). If your URL begins with file:// then absolute paths will likely be absolute to your filesystem, not relative to your project’s directory.

    If you can, try serving the directory with something like miniserve and see if it works. It’ll give you a better picture of what the website would look like if it were published for real. Otherwise, you can make the path relative to solve the problem without doing that.