Sign in

Andrea Giammarchi

@webreflection.bsky.social
943 followers 32 following 201 posts
PostsRepliesMedia
Andrea Giammarchi @webreflection.bsky.social · 02/06/2026
new in DS4 Chat: * bootstrap with your own system prompt * highlight out of the box for code * auto scrolling when images or other transformations happen as answer, right after the answer ends (load event for images) github.com/WebReflectio...
120
Andrea Giammarchi @webreflection.bsky.social · 29/01/2026
live demo on codepen: codepen.io/WebReflectio... try to compare its code with the original one 😉
000
Andrea Giammarchi @webreflection.bsky.social · 14/10/2025
in which I've found a way to have "protected" properties only the class owner can handle. these can also be orchestrated as accessor: static a(self, ..._) { if (_.length) [self.#a] = _; return self.#a; }
class A {
  #a;
  constructor(a) {
    this.#a = a;
  }

  // allowed to reach #a
  static a(self) {
    return self.#a;
  }
}

const a = A.a;

// removed to avoid reaching #a
// outside this module scope
delete A.a;

const ref = new A('secret');

// in here we can reach #a
a(ref); // 'secret'
240
Andrea Giammarchi @webreflection.bsky.social · 10/06/2025
I am factoring out coincident/window (soon to be updated) to fully separate concerns and provide a standalone sub-project to nail that part of the stack. If interested, I started explaining what's behind the scene here 👋 github.com/WebReflectio...
000
Andrea Giammarchi @webreflection.bsky.social · 21/05/2025
nice and clean via Explicit Resource Management 🥳 v8.dev/features/exp...
using timeout = {
  $: setTimeout(() => controller.abort('timeout'), 5000),
  [Symbol.dispose]() {
    clearTimeout(this.$);
  }
};
050
Andrea Giammarchi @webreflection.bsky.social · 14/03/2025
I did mention that if your laptop is not connected, JIT/TurboFan behave very differently ... the good news is that my latest buffered-clone (jspack in the image) is still faster than cbor-x which became my reference for performance 🥳
110
Andrea Giammarchi @webreflection.bsky.social · 14/03/2025
it's happening ... my next version of buffered-clone has been fully rewritten after studying MessagePack and CBOR implementations and the good news is that it's going to be faster as general purpose binary serializer. Not standards based, abstraction killed perf to me, yet great!
240
Andrea Giammarchi @webreflection.bsky.social · 14/03/2025
This is going to change forever the Python landscape for many purposes, including Server, Front End (PyScript) & DB related libraries I am super glad I was involved in shaping the next templating adventure in Python + I am very thankful to them too pep-previews--4124.org.readthedocs.build/pep-0750/
000
Andrea Giammarchi @webreflection.bsky.social · 10/02/2025
clickbait specialists asking clickbait questions on socials? sure thing, I just wonder though:
120
Andrea Giammarchi @webreflection.bsky.social · 20/01/2025
I was hoping for performance benefits around buffered clone but I couldn't expect it being up to 100X faster on complex postMessage round-trips 😱 github.com/WebReflectio...
2111
Andrea Giammarchi @webreflection.bsky.social · 19/12/2024
my "xmas fun week" project, hacking on a SPIKE Prime device via BT and managing to represent its axis and matrix display state "real-time" through ThreeJS? 😱 experiment succeeded 🥳
010
Andrea Giammarchi @webreflection.bsky.social · 21/03/2024
the terser Python like range function you'll probably find online? for (const i of range(1)) console.log(i); // 0 for (const i of range(0, 2)) console.log(i); // 0, 1 for (const i of range(0, 4, 2)) console.log(i); // 0, 2
function* range(start, ...rest) {
  let stop = start, steps = 1;
  if (rest.length) [stop, steps] = [...rest, 1];
  else start = 0;
  while (start < stop) {
    yield start;
    start += steps;
  }
}
140