NicolΓ² Ribaudo's Avatar

NicolΓ² Ribaudo

@nicr.dev

❀️ Maths and JavaScript πŸ§‘β€πŸ’» Maintaining @babel.dev, @tc39.es delegate, working at @igalia.com πŸ”— https://nicr.dev 🌈πŸ‡ͺπŸ‡Ί

2,523
Followers
255
Following
999
Posts
26.04.2023
Joined
Posts Following

Latest posts by NicolΓ² Ribaudo @nicr.dev

Now, to think about the other options, let's assume the variable in the loop was `const` instead of `let`:

```
let vals = [];
const makeArr = v => [() => v, () => v];
for (const x of makeArr(() => x)) vals.push(x);
```

What constant value would vals[0]()() and vals[1]()() see?

11.03.2026 16:59 πŸ‘ 1 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0

Some hints:

`let x; for (let x of ...expr...)...` follows similar shadowing rules as `let x; { let x = ...expr... }`

This excludes one of the options.

11.03.2026 16:50 πŸ‘ 1 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0

ECMAScript EXTRA-SPECIAL excitement πŸ˜‰

🚨🚨🚨 IT'S ABOUT TIME! 🚨🚨🚨

Congrats to @ptomato.name on advancing Temporal to Stage 4 at @tc39.es today πŸŽ‰

Temporal is the replacement for the JavaScript Date API πŸ‘

11.03.2026 15:26 πŸ‘ 94 πŸ” 27 πŸ’¬ 7 πŸ“Œ 7

Exciting things happening in TC39 right now

11.03.2026 15:17 πŸ‘ 21 πŸ” 2 πŸ’¬ 0 πŸ“Œ 1

What data would you store on atproto?

11.03.2026 14:09 πŸ‘ 0 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0

You compute total spend and receive per person (they already do that), and subtract the two numbers

11.03.2026 12:49 πŸ‘ 2 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0

πŸ˜›

11.03.2026 12:41 πŸ‘ 2 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0

Well I know for sure that the full amount for @patak.cat is getting out of my bank account!

11.03.2026 12:36 πŸ‘ 2 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0

I wonder whether any of those is correct

11.03.2026 12:24 πŸ‘ 5 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0

Is your expected answer the same you would get if you delete the first line, or the other one?

11.03.2026 12:23 πŸ‘ 0 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0

Apparently I sponsor @patak.cat on GitHub, @patak.cat sponsors @danielroe.dev, and @danielroe.dev sponsors both @patak.cat and me.

I feel like there is an optimization opportunity here πŸ€”

11.03.2026 12:06 πŸ‘ 79 πŸ” 5 πŸ’¬ 11 πŸ“Œ 0

Ah yes, the for-of combinator

11.03.2026 11:52 πŸ‘ 7 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0

let x = () => x;
for (let x of [() => x]) {
  console.log(x === x());
}

let x = () => x; for (let x of [() => x]) { console.log(x === x()); }

JavaScript quiz: what is the output of this code?

(code in the alt text for copy&pasting)

11.03.2026 11:10 πŸ‘ 23 πŸ” 1 πŸ’¬ 10 πŸ“Œ 0

Emptying the Nutella jar and then putting it back in the cabinet making me believe I can have some must be a crime.

10.03.2026 17:05 πŸ‘ 10 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0
Preview
Introducing Moonforge: A Yocto-Based Linux OS | Igalia Igalia is an open source consulting firm specialised in the development of innovative projects and solutions. Our engineers have expertise in a wide range of technological areas, including browsers an...

πŸš€ We've released Moonforge, a brand new fully open-source Linux distribution based on Yocto. We aim to provide a production-ready foundation for building embedded operating systems! Read more: www.igalia.com/2026/03/09/I...

10.03.2026 13:26 πŸ‘ 30 πŸ” 16 πŸ’¬ 1 πŸ“Œ 0
Preview
Bloomberg JS Blog The official Bloomberg JavaScript blog - insights, tutorials, and best practices from Bloomberg's JavaScript engineering team.

Some time ago, @jonkuperman.com & @tchetwin.bsky.social had a dream for the JS engineers at Bloomberg to be more public about the cool JS work we have going on.

That dream has come true - now we have a blog platform πŸŽ‰

(You'll see more articles over the next few days)

bloomberg.github.io/js-blog/

09.03.2026 19:08 πŸ‘ 70 πŸ” 14 πŸ’¬ 4 πŸ“Œ 0

You are saying that you will absolutely need this in 6 weeks to deal with all baby-related tasks, so better start working on it soon?

06.03.2026 12:33 πŸ‘ 2 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0

πŸ‘€ this looks nice!

06.03.2026 12:32 πŸ‘ 3 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0

Ohhhhhhh πŸ‘€

06.03.2026 11:41 πŸ‘ 0 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0

Step 1. Get hired by Discord
Step 2. Implement background updates for their desktop app rather than forcing me to update when I want to open it
Step 3. Quit Discord

06.03.2026 10:28 πŸ‘ 89 πŸ” 6 πŸ’¬ 3 πŸ“Œ 1

Wow so many typos

06.03.2026 08:33 πŸ‘ 2 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0

Give the use case it'd be cool to make hardware for it, like an e-ink display that you can hang in the living room for people to check what's to be done. It needs to work well I'm grayscale.

06.03.2026 08:32 πŸ‘ 7 πŸ” 0 πŸ’¬ 3 πŸ“Œ 0

"It's one side project, Michael. How much time could it require, 10 hours per day?"

06.03.2026 08:31 πŸ‘ 7 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0

Oh, is our 10am call still happening? I have tea to spill.

06.03.2026 08:19 πŸ‘ 2 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0

Reinstalling the Nvidia drivers from recovery mode fixed it

06.03.2026 00:12 πŸ‘ 2 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0

It was not a good sign

06.03.2026 00:08 πŸ‘ 2 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0

The screen has been black for the last 3 minutes after asking to reboot, is it a good sign?

05.03.2026 23:33 πŸ‘ 3 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0

Updating my Ubuntu version feels scarier than migrating across PDSes.

05.03.2026 23:32 πŸ‘ 10 πŸ” 0 πŸ’¬ 3 πŸ“Œ 0

Atproto Amsterdam happened!

We solved private data AND payments, and also digital credentials trust chains and also moderation and games too.

Wait, no we just had a great three hours of chatting about atproto (mostly).

Thanks @internetarchive.eu for hosting us!

05.03.2026 20:56 πŸ‘ 93 πŸ” 8 πŸ’¬ 4 πŸ“Œ 2

Oh yes that's what I was thinking

05.03.2026 11:56 πŸ‘ 2 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0