Nicolรฒ Ribaudo's Avatar

Nicolรฒ Ribaudo

@nicr.dev.bsky.social

โค๏ธ Maths and JavaScript ๐Ÿง‘โ€๐Ÿ’ป Maintaining @babel.dev, tc39.es delegate, working at @igalia.com ๐Ÿ”— https://nicr.dev ๐ŸŒˆ๐Ÿ‡ช๐Ÿ‡บ

2,299 Followers  |  197 Following  |  631 Posts  |  Joined: 26.04.2023  |  2.0086

Latest posts by nicr.dev on Bluesky

The US tariffs on pharmaceutical products are funny because it's not like the US has a problem of prices being driven down due to cheap foreign medicines

05.08.2025 13:08 โ€” ๐Ÿ‘ 7    ๐Ÿ” 0    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0

Are those toilet paper holders? ๐Ÿ‘€

05.08.2025 10:45 โ€” ๐Ÿ‘ 0    ๐Ÿ” 0    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0

- place nodes in the same column as the first edge that discovers them

03.08.2025 19:09 โ€” ๐Ÿ‘ 1    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0

What I'm doing is:
- assign a direction to all edges so that it's a DAG
- sort the nodes topologically
- we'll draw on a grid, where each node is a row
- traverse the DAG, drawing all the edges in the leftmost column where all the cells needed for the edge don't already have a vertical line

03.08.2025 19:06 โ€” ๐Ÿ‘ 1    ๐Ÿ” 0    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0
A graph with, on the left, a line with three nodes: (bottom to top)
- A
- s1 (A -> B)
- B

There is a second branch on the right, starting from A and arriving to B, with a node in the middle labeled as s2 (A -> B)

A graph with, on the left, a line with three nodes: (bottom to top) - A - s1 (A -> B) - B There is a second branch on the right, starting from A and arriving to B, with a node in the middle labeled as s2 (A -> B)

And it also has a plain text renderer for testing!

This means "I planned to take train s1 from A to B, but due to reasons I instead had to take s2"

03.08.2025 16:32 โ€” ๐Ÿ‘ 6    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0
Post image

Building a little graph rendering library for my train travel log app, and oh rendering graph is difficult

03.08.2025 16:30 โ€” ๐Ÿ‘ 9    ๐Ÿ” 0    ๐Ÿ’ฌ 2    ๐Ÿ“Œ 0

:/ I guess I'll use JS

02.08.2025 21:31 โ€” ๐Ÿ‘ 0    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0

Can I do this in CSS?

"When I hover over an element with a data-foo attribute, make all the elements that have data-foo _set to the same value_ red"

where the values of data-foo are arbitrary

02.08.2025 20:32 โ€” ๐Ÿ‘ 2    ๐Ÿ” 0    ๐Ÿ’ฌ 5    ๐Ÿ“Œ 0

There is a typo in the English version of the EU common form for train compensation requests (europa.eu/youreurope/c...), which in section 4 says "rrecurrent" instead of "recurrent". Anybody knows how to get it fixed? Maybe @ec.europa.eu?

01.08.2025 21:37 โ€” ๐Ÿ‘ 1    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0

50 days to go till SquiggleConf 2025! 5๏ธโƒฃ0๏ธโƒฃ

30.07.2025 16:59 โ€” ๐Ÿ‘ 5    ๐Ÿ” 1    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0

Proposals waiting on tests. Implementations happen in stage 3.

30.07.2025 14:49 โ€” ๐Ÿ‘ 3    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0
let arr = new Uint8Array([72, 101, 108, 108, 111, 32, 87, 111, 114, 108, 100]);
console.log(arr.toBase64());
// 'SGVsbG8gV29ybGQ='
console.log(arr.toHex());
// '48656c6c6f20576f726c64'
let string = 'SGVsbG8gV29ybGQ=';
console.log(Uint8Array.fromBase64(string));
// Uint8Array([72, 101, 108, 108, 111, 32, 87, 111, 114, 108, 100])

string = '48656c6c6f20576f726c64';
console.log(Uint8Array.fromHex(string));
// Uint8Array([72, 101, 108, 108, 111, 32, 87, 111, 114, 108, 100])

let arr = new Uint8Array([72, 101, 108, 108, 111, 32, 87, 111, 114, 108, 100]); console.log(arr.toBase64()); // 'SGVsbG8gV29ybGQ=' console.log(arr.toHex()); // '48656c6c6f20576f726c64' let string = 'SGVsbG8gV29ybGQ='; console.log(Uint8Array.fromBase64(string)); // Uint8Array([72, 101, 108, 108, 111, 32, 87, 111, 114, 108, 100]) string = '48656c6c6f20576f726c64'; console.log(Uint8Array.fromHex(string)); // Uint8Array([72, 101, 108, 108, 111, 32, 87, 111, 114, 108, 100])

ECMAScript excitement ๐Ÿ˜‰

Congrats to @bakkot.com on advancing UInt8Array โ†”๏ธ Base64/Hex to Stage 4 at TC39 this week ๐ŸŽ‰

UInt8Array.prototype.
toBase64
toHex

UInt8Array.
fromBase64
fromHex

It lets you convert directly between binary data and Base64/Hex strings ๐Ÿ‘

30.07.2025 06:56 โ€” ๐Ÿ‘ 31    ๐Ÿ” 6    ๐Ÿ’ฌ 2    ๐Ÿ“Œ 0

Nope, NL :)

27.07.2025 15:16 โ€” ๐Ÿ‘ 1    ๐Ÿ” 0    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0

Thank you!

27.07.2025 13:14 โ€” ๐Ÿ‘ 1    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0

Unfortunately it's not compatible with how much I travel ๐Ÿ˜ญ

26.07.2025 19:13 โ€” ๐Ÿ‘ 3    ๐Ÿ” 0    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0

Uh, where? ๐Ÿ‘€

26.07.2025 19:12 โ€” ๐Ÿ‘ 0    ๐Ÿ” 0    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0
A container full of bright pink fresh ice cream

A container full of bright pink fresh ice cream

After moving to a country where ice cream is generally bad and super expensive... We finally got an ice cream machine!

(raspberries :))

26.07.2025 18:22 โ€” ๐Ÿ‘ 41    ๐Ÿ” 1    ๐Ÿ’ฌ 4    ๐Ÿ“Œ 0

Oh also, because due to the self-inflicted problem of mandatory seat reservations you'd need to actually regenerate tickets for all passengers and make sure that they actually know what's their new seat.

25.07.2025 20:43 โ€” ๐Ÿ‘ 2    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0

Because the whole like between Paris and Lyon had to be closed for a couple hours!

25.07.2025 20:36 โ€” ๐Ÿ‘ 0    ๐Ÿ” 0    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0
Picture of a departure board, with all trains delayed ranging between 3:10 and 4:40 hours

Picture of a departure board, with all trains delayed ranging between 3:10 and 4:40 hours

Terrible day for French trains (and obviously, I always end up traveling on the worst days possible)

25.07.2025 19:58 โ€” ๐Ÿ‘ 4    ๐Ÿ” 0    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0
Preview
[Pinned] Stylus was accidentally banned by npmjs and is currently waiting for npmjs to restore access to Stylus. ยท Issue #2938 ยท stylus/stylus thanks for github advisory report , @Banegasn github/advisory-database#5846 workaround for everyone with any package manager big thanks to @DulanWirajith Let's wait for the official response from n...

3.6M downloads/week, and it's completely gone (including old versions)

github.com/stylus/stylu...

23.07.2025 11:30 โ€” ๐Ÿ‘ 10    ๐Ÿ” 2    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 1

So... now that npm is causing left-pad problems by itself, what is the solution?

23.07.2025 11:21 โ€” ๐Ÿ‘ 9    ๐Ÿ” 1    ๐Ÿ’ฌ 3    ๐Ÿ“Œ 3

It's like USB-A, just click both sides

21.07.2025 14:03 โ€” ๐Ÿ‘ 3    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0
Commit Graph Drawing Algorithms This article is one chapter of my master thesis entitled โ€œDesign and implementation of a graphical user interface for gitโ€. It describes the algorithm I designed to draw the commit graph in my own pro...

Nice article

pvigier.github.io/2019/05/06/c...

20.07.2025 20:15 โ€” ๐Ÿ‘ 5    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0

๐Ÿ‘‹

14.07.2025 15:56 โ€” ๐Ÿ‘ 18    ๐Ÿ” 3    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0

I got 16/28 questions (wrong)!

11.07.2025 19:28 โ€” ๐Ÿ‘ 13    ๐Ÿ” 0    ๐Ÿ’ฌ 2    ๐Ÿ“Œ 0

The 129th Ecma GA in Geneva on 25th June approved new recognition awards to people for their contributions and services. We at Igalia would like to congratulate our friends and collaborators @robpalmer.bsky.social and Michael Saboff for being awarded and thank them for their diligent work in TC39.

04.07.2025 15:31 โ€” ๐Ÿ‘ 23    ๐Ÿ” 6    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0

Yep

04.07.2025 17:12 โ€” ๐Ÿ‘ 1    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0

I mean you can also do it with if/else:

if (A) {
/* do the A stuff */
}
if (A || B) {
/* do the A or B stuff */
}

or

if (A) {
/* do the A stuff */
if (B) {
/* do the A or B stuff */
}
} else if (B) {
/* do the A or B stuff */
}

the problem is that they cause duplication

04.07.2025 14:19 โ€” ๐Ÿ‘ 1    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0

One could write it with switch/case in some languages, but it's incredibly confusing:

switch (true) {
case A:
// to this when A is true
case B:
// to this when A or B is true
}

04.07.2025 13:51 โ€” ๐Ÿ‘ 0    ๐Ÿ” 0    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0

@nicr.dev is following 20 prominent accounts