Readit News logoReadit News
bakkoting commented on Node.js is able to execute TypeScript files without additional configuration   nodejs.org/en/blog/releas... · Posted by u/steren
bakkoting · 14 days ago
It also exposes a function which does type stripping (as `import { stripTypeScriptTypes } from 'node:module'`).

This lets you build simple web apps (i.e., those with no frontend dependencies) as pure TypeScript, including the frontend, by stripping the types out from your frontend scripts as you serve them: https://github.com/bakkot/buildless-ts-webapp

bakkoting commented on Steve Wozniak: Life to me was never about accomplishment, but about happiness   yro.slashdot.org/comments... · Posted by u/MilnerRoute
dkural · 17 days ago
I agree with this directionally, however I think you'll make more like 7.2% per year, and inflation will be about 2.5% per year. You'll also likely pay about 30% in federal and local taxes in the USA on it since you're actually selling it to live on it (more on taxes later). So you'll pay 2.2% in taxes. So on average you'll get 7.2 - (2.5 + 2.2) = 2.5% of income. If you have $10M, you can withdraw about 250K a year in today's dollars every year. i.e next year you can withdraw 256.3K or so, and keep doing this to keep your current standard of living. In down years you may want to adjust / tighten belt a tiny bit to not veer off track too much. And you can get cute with taxes but not recommended. That loan interest will add up over time, and when it's time to actually pay those loans, you'll still sell stock and pay taxes on it, unless your offspring inherit both.. and who knows what the laws will be then.
bakkoting · 17 days ago
The 7.2% number is already adjusted for inflation. Historically the stock market has gotten about 10% nominal return, 6.5-7% real.
bakkoting commented on Software Rot   permacomputing.net/softwa... · Posted by u/pabs3
mook · a month ago
Things like E4X, sharp variables, and array comprehensions have already been removed; it's just that the mass of newer developers mean the average doesn't know about them. Unfortunately it's not like they never remove things.
bakkoting · 25 days ago
As far as I'm aware none of those were ever supported in more than one engine (specifically Firefox) and so cannot reasonably be considered to have been part of JavaScript. JS really does make a point of not removing things.

There are some _very_ rare exceptions, but they're things like "support for subclassing TypedArrays", and even then this is only considered after careful analysis to ensure it's not breaking anyone.

bakkoting commented on Modern Node.js Patterns   kashw1n.com/blog/nodejs-2... · Posted by u/eustoria
bikeshaving · a month ago
The fact that CJS/ESM compatibility issues are going away indicates it was always a design choice and never a technical limitation (most CJS format code can consume ESM and vice versa). So much lost time to this problem.
bakkoting · a month ago
It was neither a design choice nor a technical limitation. It was a big complicated thing which necessarily involved fiddly internal work and coordination between relatively isolated groups. It got done when someone (Joyee Cheung) actually made the fairly heroic effort to push through all of that.

Joyee has a nice post going into details. Reading this gives a much more accurate picture of why things do and don't happen in big projects like Node: https://joyeecheung.github.io/blog/2024/03/18/require-esm-in...

Deleted Comment

bakkoting commented on Mistral Releases Deep Research, Voice, Projects in Le Chat   mistral.ai/news/le-chat-d... · Posted by u/pember
M4v3R · a month ago
I think they've buried the lede with their image editing capabilities, which seem to be very good! OpenAI's model will change the whole image while editing messing up details in unrelated areas. This seems to perfectly preserve parts of the image unrelated to your query and selectively apply the edits, which is very impressive! The only downside is the output resolution (the resulting image is 1184px wide even though the input image was much larger).

For a quick test I've uploaded a photo of my home office and asked the following prompt: "Retouch this photo to fix the gray panels at the bottom that are slightly ripped, make them look brand new"

Input image (rescaled): https://i.imgur.com/t0WCKAu.jpeg

Output image: https://i.imgur.com/xb99lmC.png

I think it did a fantastic job. The output image quality is ever so slightly worse than the original but that's something they'll improve with time I'm sure.

bakkoting · a month ago
Kontext is probably better at this specific task, if that's what Mistral is using. Certainly faster and cheaper. But:

OpenAI just yesterday added the ability to do higher fidelity image edits with their model [1], though I'm not sure if the functionality is only in the API or if their chat UI will make use of this feature too. Same prompt and input image: [2]

[1] https://x.com/OpenAIDevs/status/1945538534884135132

[2] https://i.imgur.com/w5Q0UQm.png

bakkoting commented on New Date("wtf") – How well do you know JavaScript's Date class?   jsdate.wtf... · Posted by u/OuterVale
actinium226 · 2 months ago
They're certainly taking their sweet time with it. Reading the last progress update is mildly entertaining though: https://github.com/tc39/notes/blob/HEAD/meetings/2024-07/jul...
bakkoting · 2 months ago
That's not the last progress update. Most recent is https://github.com/tc39/notes/blob/d5b5db6969359fad11b6898b7....

Implementations are ongoing and open source, so you can contribute if you want it to come faster! V8 is currently aiming to use https://github.com/boa-dev/temporal IIRC.

bakkoting commented on Left-Pad (2024)   azerkoculu.com/posts/left... · Posted by u/oeitho
xnorswap · 3 months ago
There used to be the general wisdom of, "Don't re-invent the wheel. Let the hive-mind craft utility functions and use those because they'll be battle-hardened, well tested, and you can focus on your core business".

I think the left-pad incident helped shatter that myth. He we had huge packages depending on a package which padded a string in an inefficient manner.

It turns out that the many eyeballs of the bazaar had averted their gaze from what was actually happening, which is a system of impossible to audit dependency chains.

I think it also shows the impact of using a language with a poor standard library.

Padding is absolutely something that should be available as an extension over String.

If JavaScript were controlled in the same manner that Go, Rust, Java, .NET, python etc, then it would have been added years ago.

Apparently it has now finally arrived in ES2026: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...

bakkoting · 3 months ago
> Apparently it has now finally arrived in ES2026

ES2017 [1]. The MDN docs always link the latest version of the spec; the year in the link doesn't correspond to the version where it was added. The proposal was already mostly done at the time of the incident [2]

[1] https://tc39.es/ecma262/2017/#sec-string.prototype.padstart [2] https://github.com/tc39/proposal-string-pad-start-end

bakkoting commented on Why agents are bad pair programmers   justin.searls.co/posts/wh... · Posted by u/sh_tomer
Traster · 3 months ago
I think this has put into words a reason why I bounced off using AI this way, when I need something done I often have a rough idea of how I want it done, and how AI does it often doesn't match what I want, but because it's gone off and written a 2,000 lines of code it's suddenly more work for me to go through and say "Ok, so first off, strip all these comments out, you're doubling the file with trivial explanations of simple code. I don't want X to be abstracted this way, I want that...." etc. And then when I give it feedback 2,000 lines of code suddenly switch to 700 lines of completely different code and I can't keep up. And I don't want my codebase full of disjoint scripts that I don't really understand and all have weirdly different approaches to the problem. I want an AI that I have similar opinions to, which is obviously tough. It's like working with someone on their first day.

I don't know if it's giving the tools less self-confidence per se, but I think it's exposing more the design process. Like ideally you want your designer to go "Ok, I'm thinking of this approach, i'll probably have these sorts of functions or classes, this state will be owned here" and we can approve that first, rather than going straight from prompt -> implementation.

bakkoting · 3 months ago
Anthropic's guide to using Claude Code [1] is worth reading.

Specifically, their recommended workflow is "first ask it to read the code, then ask it to make a plan to implement your change, then tell it to execute". That sounds like the workflow you're asking for - you can read its plan and make adjustments before it writes a single line of code.

One of the weird things about using agents is that if they're doing things in a way you don't like, including things like writing code without first running the design by you, you can simply ask them to do things a different way.

[1] https://www.anthropic.com/engineering/claude-code-best-pract...

bakkoting commented on Covert web-to-app tracking via localhost on Android   localmess.github.io/... · Posted by u/sebastian_z
JimDabell · 3 months ago
There is a specification for blocking this:

https://wicg.github.io/private-network-access/

It gained support from WebKit:

https://github.com/WebKit/standards-positions/issues/163

…and Mozilla:

https://github.com/mozilla/standards-positions/issues/143

…and it was trialled in Blink:

https://developer.chrome.com/blog/private-network-access-upd...

Unfortunately, it’s now on hold due to compatibility problems:

https://developer.chrome.com/blog/pna-on-hold

bakkoting · 3 months ago
Both Firefox [0] and Chrome [1] are working on successors which rely on permissions prompts instead of preflight requests.

[0] https://groups.google.com/a/mozilla.org/g/dev-platform/c/B8o...

[1] https://groups.google.com/a/chromium.org/g/blink-dev/c/CDy8L...

u/bakkoting

KarmaCake day256March 8, 2016
About
TC39.
View Original