Hacker Newsnew | past | comments | ask | show | jobs | submit | realPubkey's commentslogin

This is likely done with the WebLocks API


That doesn't allow signaling another tab, does it?


> The Web Locks API allows scripts running in one tab or worker to asynchronously acquire a lock, hold it while work is performed, then release it. While held, no other script executing in the same origin can acquire the same lock, *which allows a web app running in multiple tabs or workers to coordinate work and the use of resources.*

source: https://developer.mozilla.org/en-US/docs/Web/API/Web_Locks_A...


I read that, but how can that API be used to notify the original tab to stop playing?


It has the ability to "steal" lock from another tab. Once tab loses a lock, it can pause the playback.


As far as I can tell, the original tab isn't notified when its lock is stolen. So again, how would the original tab be notified?


By buildings small things, you will find ideas for bigger things that people actually need.


Yes, and by building small things, you can more easily try out different techniques and tools with less risk than doing the same with something big.

I think it's optimizing for learning versus revenue, which don't have to be mutually exclusive. Sometimes you need to start with one to get to the other.


When MicroSoft BASIC came out, you couldn't see Windows, Azure, or even Word. But there was a path to here from there.


So build small things to get to big things? (I guess you can decide at that point)? This maybe successful as a strategy to find "big" ideas ...


Yes most servers support websockets. But unfortunately most proxies and firewalls do not, especially in big company networks. Suggesting my users to use SSEs for my database replication stream solved most of their problems. Also setting up a SSE endpoint is like 5 lines of code. WebSockets instead require much more and you also have to do things like pings etc to ensure that it automatically reconnects. SEEs with the JavaScript EventSource API have all you need build in:

https://rxdb.info/articles/websockets-sse-polling-webrtc-web...


SSE also works well on HTTP/3 whereas web sockets still don’t.


I don't see much point in WebSockets for HTTP/3. WebTransport will cover everything you would need it for an more.


That might very well be but the future is not today.


But why add it to HTTP/3 at all? HTTP/1.1 hijacking is a pretty simple process. I suspect HTTP/3 would be significantly more complicated. I'm not sure that effort is worth it when WebTransport will make it obselete.


It was added to HTTP/2 as well and there is an RFC. (Though a lot of servers don’t support it even on HTTP/2)

My point is mostly that SSE works well and is supported and that has A meaningful benefit today.


To have multiple independent websocket streams, without ordering requirements between streams.


going slightly off the tangent here, does FaaS cloud providers like AWS, CloudFlare, and etc support SSEs?

Last time I checked, they don't really support it.


No. The title is the title, not the context. If people do not read the first 5 sentences of the introduction, you cannot help anyway.


You have to quit THC for at least two weeks until you start dreaming again.


I had 2.5mg of thc every day for ~7 years. I couldn't remember the last dream I had when I quit thc in August. After not sleeping for 2-3 weeks I started having vivid nightmares every night for about a week. I'm still having extremely vivid dreams since, but they're no longer all terrifying. Sleeping better than ever and my anxiety is also better than ever.


I just read your comment after posting mine and it sounds like you've had a similar (but unfortunately opposite!) experience. The vivid dreams stop for me a few weeks after they start. Are your vivid dreams "permanent", or has it only been a short while since you started experiencing them?


Indeed, and IME, the dreams I have after taking a break from daily THC use are extremely vivid - to the point that I can remember them in detail for days afterwards. I enjoy that a lot.


I'm a regular user and I dream if I take a nap and haven't smoked


Imagine what you could dream about if you stopped THC.


That implies I want to dream


You do, maybe. I’m a heavy user and have and recall plenty of dreams.


Wow. This should be fixed. Which browser/OS are you using? Are you in dark mode?


The page appears in dark mode (I use light mode)

OS: Windows 11 22H2 / Browser: Opera, FireFox, Edge

Screen: 1366x720 (32in TV)

If I move it to 1440x900 27in monitor, it doesn't do it.


Red on black is hard to read, especially whatever vibrant fuchsia color this is.


Yet another site that requires JS enabled to view.


Half-life of DNS bondings is about 10k years.


Even at cryogenic temperatures? Some lunar pole craters have regions of permanent shadow, with temperatures close to -200C.


Same experience for me but with west africa.


I've found Ghana to be the only country in West Africa where you can reliably outsource and get quality work back with no headaches. Maybe if I did business in French, Senegal would be reliable as well. But the rest of West Africa has a long way to go even getting reliable rule of law. (Which is weird, because you would think Nigeria would have its act together.)

But yes, Kenya is the star out in East Africa. Even among a lot of other scrappy nations in the EAC, Kenya stands out. No question.

For African outsourcing, I can't recommend Ghana and Kenya enough. Only problem right now is that, you kind of have to know someone to get access to the really good guys. Demand is high relative to the guys available with known track records.


Very cool, thanks for sharing! I have writing work on the side for engineers, if you know any. Great way to get your writing skills going while getting paid to play with tech.


Most of the time you should not even check for the runtime. Instead you should check for the specific feature support that you want to use.


+1, though sometimes it's useful to know the runtime variant & version to implement workarounds for implementation quirks or polyfills.


Or to aid recreating problems were, for instance, you've accidentally relied on undefined behaviour that happens to be consistent in most places.


Looks great. How does it behave on conflicts when 2 offline users write to the same rows and then go online?


It's a server authoritative system, so the final state is determined by the server. There's a single global order of changes (basically the order the changes were processed by the server), so any conflicts are basically resolved by the server, but are applied optimistically on the clients when online or offline.

I can't tell exactly from your question if you're asking about the client going offline before or after making the change, or before or after recieving the server's version of the change, but either way the servers version wins and the client will have to catch up after it's back online.


You nailed it! In SQLSync, conflict handling happens in a WebAssembly module provided by the developer (for now). This module is free to handle conflicts in any way you see fit. You could even embed CRDT state into a table cell if you wanted to do rich collaborative text editing for example. My goal is to solve replication/durability and leave the specifics of conflicts up to the developer.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: