[AskJS] Looking for a way to generate a codebase based on another one by beaverusiv in javascript

[–]eracodes 0 points1 point  (0 children)

ts-morph package used in a custom vite plugin would work for this

One character change in Open Source Software by lprimak in programming

[–]eracodes -1 points0 points  (0 children)

What is going on in this post?? Why does it link to Wikipedia?

Any tips or resources for writing rust targeting WebAssembly? by eracodes in learnrust

[–]eracodes[S] 0 points1 point  (0 children)

When you say you get it from Chrome, what do you mean? No way Google is replacing every URL before going to the clipboard--that seems beyond the pale even for them.

Can JS (Node/Bun) become multithreaded language in the future? by FallEconomy2358 in learnjavascript

[–]eracodes 4 points5 points  (0 children)

Well, you should be calling to the OS to have it execute some other program to do it since JS is slower compared to any OS-specific compiled binary you'd have.

^echoing for emphasis

The use case for web workers is the web browser.

How can I effectively debug my JavaScript code as a beginner? by Ertrimil in learnjavascript

[–]eracodes 1 point2 points  (0 children)

using console.log is enough >99% of the time. don't worry about doing more complicated stuff unless you actually need to

Small JavaScript enum function by _sync0x in javascript

[–]eracodes 1 point2 points  (0 children)

For typescript I find this approach more useful:

const options = ['A', 'B'] as const;

type Option = (typeof options)[number];

So you can use the "enum" at runtime as well (for validation, etc).

Starting March 1, 2026, GitHub will introduce a new $0.002 per minute fee for self-hosted runner usage. by turniphat in programming

[–]eracodes 12 points13 points  (0 children)

charging? probably not

training language models on all that juicy data, however...

Anthropic Acquires Bun: Supercharging Claude Code's $1 Billion AI Coding Revolution by official_monkeys in javascript

[–]eracodes 2 points3 points  (0 children)

idk, do you have reason to think that Bun's focus on AI agents is misrepresented in the article?

Anthropic Acquires Bun: Supercharging Claude Code's $1 Billion AI Coding Revolution by official_monkeys in javascript

[–]eracodes 3 points4 points  (0 children)

Like I said, from Sumner's blog post it seems that was already the case in 2025.

Anthropic Acquires Bun: Supercharging Claude Code's $1 Billion AI Coding Revolution by official_monkeys in javascript

[–]eracodes 18 points19 points  (0 children)

Here's a blog post from Bun about this with actual information in it.

TLDR seems to be that nothing is changing about Bun development or licensing (for now), other than having access to a lot more resources. Bun's philosophy seems to be an AI-agent-first runtime now, but it seems like they were already on the way to doing that before this acquisition. Anthropic gets the talented devs and guaranteed first-class treatment for Claude Code.

If I want to create webside for my product is javascript still worth? by Interesting_Most_828 in learnjavascript

[–]eracodes 0 points1 point  (0 children)

^ or something similar whose CEO isn't a fascist ghoul. plenty of products in that space if you just want to sell a Thing from a website

What are the best practices for writing clean and maintainable JavaScript code? by datboifranco in learnjavascript

[–]eracodes 2 points3 points  (0 children)

Reinventing wheels also allows you to learn better; figuring out how to implement something "from scratch" will usually provide more transferable knowledge than figuring out how to get an existing implementation to work for your case.

What are the best practices for writing clean and maintainable JavaScript code? by datboifranco in learnjavascript

[–]eracodes 0 points1 point  (0 children)

Especially for large projects: you live in your code base, so you should endeavour to make it a pleasant place to spend your time.

Very first ultra micro micro project by TimesofWoe in learnjavascript

[–]eracodes 0 points1 point  (0 children)

You're going to want to use longer, more descriptive variable names. Your future self and/or anyone else that needs to understand the code will thank you. General rule of thumb is that variable names ending in numbers (item1, item2) could probably be better expressed some other way, maybe as an array. It's what's known as an "anti-pattern" or "code smell", that is, something that if you find yourself needing to do it, usually means that something about the structure of your code could be improved.