@indutny@fosstodon.org
@indutny@fosstodon.org avatar

indutny

@indutny@fosstodon.org

He/him, io.js forker, Emeritus Node.js TSC Member, Software Engineer at https://mastodon.world/@signalapp. My interests are OpenSource software, modern metal, and reading books/watching movies.

(Expressed views are my own)

This profile is from a federated server and may be incomplete. Browse more on the original instance.

reconbot, to random
@reconbot@toot.cafe avatar

It's probably a net benefit but async/await killed promise chaining and sometimes it is really intuitive and beautiful.

I think it's because .then isn't a horrible pipeline operator and It lets you treat errors like data instead of exceptions.

indutny,
@indutny@fosstodon.org avatar

@reconbot you could kind of get the same management with Promise.allSettled. Although creating and destructuring array is pain

indutny, to random
@indutny@fosstodon.org avatar

TIL: You can sprint+jump in Elden Ring. (This is my second playthrough!)

indutny, (edited ) to random
@indutny@fosstodon.org avatar

Having some fun time playing with react-reconciler. Not sure if this idea will come to fruition, but I'm hoping to at least get it into a demo-able shape.

indutny,
@indutny@fosstodon.org avatar

Here's the end result: https://github.com/indutny/electron-ssr

I don't know if I have energy or desire to finish it given the limitations (I realized really late that you can't marshal ReactSyntheticEvent), but it was super fun!

The demo looks a bit plain, but all the fun stuff happens under the hood. The UI is translated to real DOM nodes in the renderer (UI process of Electron), but the state (callbacks, count) is actually managed by the main process (aka backend of Electron).

Demo of React rendering between Main and Renderer process n Electron.

indutny, (edited )
@indutny@fosstodon.org avatar

My extended goal with this exercise was to do something like Server-Side Rendering between Electron's Main and Renderer processes. For that to be complete I would need to introduce some sort of boundary class that would let me wrap the components on the server-side (main process), and let client-side (renderer process) actually hydrate them.

I might give it a go a bit later, but I'm quite satisfied with what I got so far!

indutny,
@indutny@fosstodon.org avatar

Aha! It was actually easier than I thought and I managed to do a simplified version that doesn't yet support syntactic sugar of 'use client’. Check this demo out!

The red area is pre-rendered in the main process (server), and the green one is a client component that lives in the renderer process (client). The most important bit is that the main process state (useState and such) is preserved on the refresh, while the renderer process starts afresh!

This is so fun 🤩

Electron React SSR demo

indutny,
@indutny@fosstodon.org avatar

Here is the component's source. As advertised the boundary between client/server components is a bit raw, but that can be polished away given further interest!

Source code:

If you like what I'm doing with this and think that I should keep it up - maybe encourage me a bit with stars and boosts? 🤗

[// Renderer component import { useState, useCallback } from 'react'; export default function Renderer(props) { const { count, addOne, removeOne } = props; const [local, setLocal] = useState(0); const addLocal = useCallback(() => { setLocal((n) => n + 1); }, []); const removeLocal = useCallback(() => { setLocal((n) => Math.max(0, n - 1)); }, []); const reload = useCallback(() => { window.location.reload(); }, []); return ( ### This runs in renderer process

Add globally Remove globally Add locally Remove locally {local + count > 5 ? ( You clicked so much

) : null} Global Count: {count}

Local Count: {local}

Reload Window

); }](https://cdn.fosstodon.org/media_attachments/files/112/070/309/288/395/372/original/ab50aace1d3b6b68.png)

indutny, to Metal
@indutny@fosstodon.org avatar
indutny, to skateboarding
@indutny@fosstodon.org avatar

TIL Not only what wheel bite is by definition, but what it actually is in reality. Not fun!

I need to get myself smaller wheels.

indutny,
@indutny@fosstodon.org avatar

Retrospective:

  • Changing wheels from 78a 56mm to 92a 52mm (smaller diameter and harder wheels)
  • Getting harder bearings

Hopefully that will be the end of it, because I'd really love to avoid wheel bite again. This time I was thankfully riding pretty slow, but still ended up rolling on the ground. (Too much Elden Ring lately?!)

indutny,
@indutny@fosstodon.org avatar

Hmm… bones hard bushings are somehow incompatible with my indie trucks. When I put them on - both trucks make clicking sound when turning, but when I swapped back the original bushings - the sound is gone. Wtf?

indutny,
@indutny@fosstodon.org avatar

Hah, put it back together with bones, but original top and bottom washers and the click is gone?

indutny,
@indutny@fosstodon.org avatar

These wheels are LOUD! Like I can’t hear myself talking if I’m riding on asphalt. Will give a try to 52mm Rictas later this week.

Also the nut on to of the washer almost went off twice today 😅 I managed to notice before it happened, but for now I’m back on the stock indy bushings. I think indy washer and bones bushings didn’t leave enough space for nut to stay on the kingpin.

indutny,
@indutny@fosstodon.org avatar

Ordered myself these bad boys in 54mm. I also got risers while I was at it, but I'll see if I need them at 54mm. Maybe not yet?

After all 1/8'' riser is 3mm so if I planned to go with 56mm and risers it is almost exactly the same distance to the wheel.

indutny,
@indutny@fosstodon.org avatar

@trode awesome! Well, I'll be looking forward for them then!

jensimmons, to random
@jensimmons@front-end.social avatar

Dear people who make websites,

Do you ever block your users from being able to paste into a text field?

Why?

Do you need this ability for a good reason? What’s that reason?

Or, as a user, would you like to see it go away? Perhaps you encounter sites that prevent you from pasting your super complex password from your password manager into a password field, and wonder why they can do so?

What might be the downside of removing support of disallowing pasting from the web?

indutny,
@indutny@fosstodon.org avatar

@jensimmons I would love to see it go away as a user.

indutny, to random
@indutny@fosstodon.org avatar

Oooh, there is some movement on my Apple Feedback Assistant ticket. Too early to tell, but maybe someone is going to look into it?

indutny, (edited ) to music
@indutny@fosstodon.org avatar

8 string guitars do have their uses if you are into heavier music: https://soundcloud.com/samebird/thump . I didn't polish this too much, but it was very fun to record!

indutny, to guitar
@indutny@fosstodon.org avatar

Thinking about replacing my guitar with a headless one yet again. Any recommendations?

So far I wonder whether to go on a lower end with Ibanez Q, or go with Kiesel/Strandberg. Maybe there are better brands?

indutny,
@indutny@fosstodon.org avatar

@James ICHI10 is almost perfect, but 3 single pickups are not for me. In fact I just sold it 🤣

I might try 7-string Q with humbucker if Sweetwater will get more color variety.

wingo, to random

i want a terminal wired up to an LLM, with a sidebar that fills itself with links and information based on the recent output of the terminal, and AI autofill for terminal commands based on output, the prompt, and your .bash_history

indutny,
@indutny@fosstodon.org avatar

@wingo …I stopped watch right when I saw "AI" 🤖

indutny, to gaming
@indutny@fosstodon.org avatar

It is kind of nice to play Elden Ring again after a couple of years. Last time I chose Astrologer and... took the easy way out of melee, so for this run I'm trying out the Confessor and it is already so much more fun!

indutny, to Signal
@indutny@fosstodon.org avatar

It is so exciting to finally release Signal 7.0.0-beta.1. This release was literally years in making. So much of my colleagues and my work are finally getting into the hands of our users!

https://signal.org/blog/phone-number-privacy-usernames/

indutny,
@indutny@fosstodon.org avatar

@ti great question! This operation isn't currently supported in Desktop, but will be possible to perform once the Android/iOS update will become available. Please stay tuned, and thanks for using Signal!

indutny, to random
@indutny@fosstodon.org avatar

Level 13 of !

I'm about to get my first burned items (radicals from Level 1), so technically I should be around the peak of number things that I need to keep in short term memory at the same time! With that in mind, I had what I think of as, a "restructuring" week. A lot of kanji/vocabulary has similar pronunciation so had to slow down to 10 new lessons per day and make a lot of mistakes, but all to get a more solid picture of kanjis!

image/png

indutny,
@indutny@fosstodon.org avatar

Level 27 of !

I'll be honest, this level was a bit tough. I think it might be 12 reviews per day versus 10 that I had previously, but it remains to be seen. Lots and lots of useful words and kanji, and slow, but steady progress towards the goal! (Immediate goal - level 40)

The SRS buckets are roughly where they were, and I can’t believe that I got almost 100 items burned in past couple of weeks!

On grammar front I got 14 new points!

WaniKani level up email
SRS Buckets on WaniKani: - Apprentice: 60 - Guru: 441 - Master: 463 - Enlightened: 1405 - Burned: 1925
Buckets on BunPro.jp - N5: 100% - N4: 100% - N3: 91/217 - N2: 2/210 - N1: 0%

indutny,
@indutny@fosstodon.org avatar

Hard to believe it, but I'm at 2k burned items in !

  • All
  • Subscribed
  • Moderated
  • Favorites
  • JUstTest
  • everett
  • magazineikmin
  • Youngstown
  • khanakhh
  • InstantRegret
  • slotface
  • mdbf
  • osvaldo12
  • rosin
  • kavyap
  • cubers
  • ngwrru68w68
  • thenastyranch
  • megavids
  • DreamBathrooms
  • ethstaker
  • Durango
  • modclub
  • GTA5RPClips
  • tester
  • normalnudes
  • cisconetworking
  • tacticalgear
  • Leos
  • anitta
  • provamag3
  • lostlight
  • All magazines