Live data from Hacker News

Edison Bulb Night Mode

petemillspaugh.com

11–20 of 34 posts

Re: Edison Bulb Night Mode

#11
Two improvements that could be made:

1. My dark mode preferences change throughout the day. Caching the value in localStorage means that it will require manual updates twice a day. Add a behavior that automatically unsets the localStorage key whenever it would set it to the currently system-preferred value.

2. Apply the override using a CSS class on the body element calculated from a synchronous JavaScript block to avoid the flash.

Re: Edison Bulb Night Mode

#13
What if there was a real Edison bulb having a night mode?

I imagined it having a circuit to dim it during the night, like a night light. For example having a few filaments inside a bulb and switching between parallel for more light and serial for less light.

Our home was not well insulated and in a corner of our sleeping room we had condensing moisture (it was unavoidable because in the corner the temperature was way too low,the lowest I had was 9°C or 48°F). I thought about putting some nichrome wire (for example terrarium heating wires) in the corners and having a switch between parallel and serial as a means for two different power levels. The idea is a parallel switch. If you turn the switch, multiple contacts are connected and disconnected. If you connect the wires cleverly, you can switch between parallel and serial. Luckily our landlord found a permanent solution for this problem after I showed him the measurement I made, so I didn't need to build this.

So that's why I started to get a picture of an Edison bulb that has such a switch inside its base.

Re: Edison Bulb Night Mode

#14
post #13

What if there was a real Edison bulb having a night mode? I imagined it having a circuit to dim it during the night, like a night light. For example having a few filaments inside a bulb and switching between parallel for more light and serial for less light. Our home was not well insulated and in a corner of our sleeping room we had condensing moisture (it was unavoidable because in the corner the temperature was way…

It sounds like you're trying to backport the LED smart bulb to a 19th century platform.

Re: Edison Bulb Night Mode

#15
post #14
post #13

What if there was a real Edison bulb having a night mode? I imagined it having a circuit to dim it during the night, like a night light. For example having a few filaments inside a bulb and switching between parallel for more light and serial for less light. Our home was not well insulated and in a corner of our sleeping room we had condensing moisture (it was unavoidable because in the corner the temperature was way…

It sounds like you're trying to backport the LED smart bulb to a 19th century platform.

Maybe that's not needed. Do 19th century light bulbs support docker?

Re: Edison Bulb Night Mode

#17

Regarding the local storage Vs server side defaults I don't understand why you wouldn't use a web cookie to store the on/off state? Am I missing something

A lot of people have forgotten that cookies aren't just for session id and can store anything. The browser also sends them all in the initial GET request. So yes you're right, it could have been done server-side for the 2nd visit.

Also, because of cookie banners, they got a bad reputation even though most countries allow you to store non personal data. Even just data that is necessary for the functionality of the website doesn't need permission.

Re: Edison Bulb Night Mode

#18
post #17

Regarding the local storage Vs server side defaults I don't understand why you wouldn't use a web cookie to store the on/off state? Am I missing something

A lot of people have forgotten that cookies aren't just for session id and can store anything. The browser also sends them all in the initial GET request. So yes you're right, it could have been done server-side for the 2nd visit. Also, because of cookie banners, they got a bad reputation even though most countries allow you to store non personal data. Even just data that is necessary for the functionality of the web…

That requires a dynamic backend, though. A lot of people use static site generators for their blogs these days. Otherwise you're absolutely right and this is a perfect use for a cookie.

Re: Edison Bulb Night Mode

#19
post #14

Earlier quoted context omitted.

It sounds like you're trying to backport the LED smart bulb to a 19th century platform.

Maybe that's not needed. Do 19th century light bulbs support docker?

Yes, if you can get the sockets and 2° bulbs small enough to fit within the glass envelope of the 1° bulb.

Capable bulbs have VT-x (vitrification technology).

Re: Edison Bulb Night Mode

#20
post #13

What if there was a real Edison bulb having a night mode? I imagined it having a circuit to dim it during the night, like a night light. For example having a few filaments inside a bulb and switching between parallel for more light and serial for less light. Our home was not well insulated and in a corner of our sleeping room we had condensing moisture (it was unavoidable because in the corner the temperature was way…

Look up the so called three way bulb. It had two filaments and could have one, the other, or both on.
Post reply on HN