skysight-inc/HackerNews huggingface dataset:
LiveStateDB leverages React Hooks, WebSocket API, and MongoDB change streams to build responsive front-end and back-end libraries that allow developers to dynamically alter state as it is updated in the database. Most importantly, multiple clients can subscribe to the same source of truth, allowing for cross-client updating of state. Instead of needing a query for each client, any changes to the requested documents in a database will be pushed to every subscribed client. Let’s go over how it all works and how easy it is to implement LiveStateDB into your next project!

Wait, really?
Yes, really! LiveStateDB’s lightweight library is extremely easy to implement and will instantly add dynamic state to your project. LiveStateDB can be useful in countless instances where real-time updates to state are needed; a stock tracker, storefront, or auction site are easy-to-imagine examples. To understand more clearly, let’s walk through the flow of data.

1) LiveStateDB’s custom React Hook, useSubscribe, contains the lightweight code to set up a subscription from a front end client to requested documents in a database by ‘hooking’ into MongoDB’s, change streams feature. This also initializes an open line of communication between the server and client via WebSockets.

2) The client id and the database document id are stored in a developer-provided Redis instance and used to track subscriptions.

3) When documents with subscriptions are updated, Redis is checked for subscribers.

4) All clients subscribed to that document are broadcast the updated data.

Add LiveStateDB to your toolkit
LiveStateDB is available as both an npm and yarn package. You’ll need to install the front end library to have access to the custom React Hook, useSubscribe. The back end library contains the logic for connecting to your MongoDB and Redis databases for streaming database updates back to the proper clients.

Once you’ve installed and imported the package, it’s as simple as collecting the options for the Hook into an object and invoking the function to open up WebSockets.

{
database: ‘inventory’
collection: ‘bestSellers’
query: {}
}

You’ll also want to declare an object in the back end to pass along your database details.

const changeStreamOptions =
{
mongoDbOptions:
{
uri: “mongodb+srv://rickAstley:yZ3K@cluster0.cf7qs2t.mongodb.net/? retryWrites=true&w=majority”
},
redisDbOptions:
{ host: ‘redis-421.c841.us-west-1–2.ec2.cloud.redislabs.com’,
port: 15711,
password: ‘sOmeP@$$w0rd’,
family: 4
},
}

You can implement LiveStateDB in a pre-existing project or a new project. LiveStateDB currently works with MongoDB databases only and utilizes the native change streams feature. If your project does not already include a Redis, you’ll need to add one, as this is how your subscribers are tracked and updated with the proper database updates.

How to Contribute
LiveStateDB will continue to be a work in progress. If the functionality built out in these libraries is of any interest to you, please feel free to contribute or reach out to us about contributing!

If you like the project or think it is interesting, please star it on GitHub
Sometimes it's fine, sometimes it's not. And PHP has VERY FEW breaking changes in general.

Think about something like WordPress, it powers so much of the internet, they're not going to be doing massive rewrites so that PHP can fix some legacy issues.
Who is “everyone” and what are they porting it from?
I think it's performative. The "activists" do something random and useless, but that lets them feel like they're doing something. So from their perspective, it's worthwhile, because it lets them feel better about themselves.
Russia Says It Could Target U.S. Commercial Satellites in Ukraine War
>The good answer: They can't verify the integrity of alternative clients and that they don't leak info

The good answer isn't even a good argument.

The client is open source. People have forked it and used the Signal network. Signal asked them to stop and they did, but there is nothing stopping people from ignoring Signal's request in the future.

This has nothing to do with federation. Signal could federate their network and still request everybody use the official client.
Best Practices for Ticketing/Sprints etc.?
Backstory: I worked as a software developer for 2 years before starting a computer science PhD. I left to start my own startup, but it never grew beyond me, my co-founder, and the odd contractor. I have a lot of experience coding, and would even say I am a pretty good software dev for being in academia. That said, I recently got a day job to help ease the cost of running the startup (we'd rather wait till next year to raise a round).

So I was hired by a hardware company to help them automate their testing infrastructure. My manager is in charge of the the automation group, but he has more of a hardware background and is better with coding than the other hardware people, but it isnt his specialty, so a lot of the responsibility to adopt good software development principals is mine, but the last time I really had any kind of exposure to a ticketing system or testing philosophy was my first 2 years out of undergrad and that was a while ago, but even then I remember it being much more organized than what we have currently.

Could you point me to resources for best practices for these sorts of things? Books? Videos? Anything would be so helpful.
Similar posts:

- Ants: https://news.ycombinator.com/item?id=17555842

- Smiling faces: https://grouplens.org/blog/investigating-the-potential-for-m...

- Butterflies: http://emilydamstra.com/news/please-enough-dead-butterflies/

- Trains: https://mobile.twitter.com/BisTheFairy/status/11925577307096...

- Horses: https://twitter.com/jelenawoehr/status/1191872816372600832?l...

- Planets: https://mobile.twitter.com/physicsJ/status/12326622114383708...

- Telescopes: https://mobile.twitter.com/BeckePhysics/status/1233414553607...

- Parachutes: https://darekkay.com/blog/parachute-emoji/

- Chickens: https://www.tumblr.com/ub-notactive/176663342440/reviewing-a...

- Snakes: https://anothertiredmonster.tumblr.com/post/156610510939/sna...
It's always seemed funny to me that El Paso is closer to Los Angeles (802 miles; 3 states away) than to Beaumont (840 miles; same state).
Heh, how's Brexit working out for them? BTW has Nigel Farage paid for his lies?
Have a look at Framework X (https://framework-x.org). It's barebones, but provides routing and basic request/response handling to build your own stuff upon. It's based on ReactPHP so you can use it as standalone service or use it in shared hosting with FPM, whichever suits you.
An actual cryptocurrency that's not controlled by Facebook of course.
Same in Berlin
Re: Constructor property promotion

Class Access Modifiers (mixin selectors) are now potentially/usually going to be in 2 places. The object level and the constructor level. Property promotion will land somewhere in PHP-FIG eventually as recommended or not, and then you'll have to know it regardless of how often you use it. Ironically, PHP is feeling (and looking!) more and more like Perl.

Java has inspired auto getter/setter support in the IDE (even PHP IDEs), so why does this need to be a feature instead of an IDE extension to type it for you at the class level? To be fair, @AllArgsConstructor is a thing and it's been great for Java, which is meaningfully different and more succinct. I guess I can give a minimal kudos for not making it an annotation. shrug

Re: Union Types, Unpacking, Enums, et al aren't bad, although I have smaller issues with some of it. What I think doesn't matter that much as I don't think I'll ever go back to PHP, despite decades of experience with it.
> There was so much hardware that was now incompatible

Huh? There's a 30-pin-to-lightning dongle that, AFAIK, works for everything. (Or nearly everything?)

I use one still, to connect my ~2010 Zeppelin speaker (30-pin) to an old 2016 iPhone SE (Lightning) I use exclusively for Spotify. Works like a charm.

The idea that the transition to Lightning somehow turned all of this old stuff to junk is silly.
100% agree:

> But keeping mortgage rates artificially low isn't the answer

I don't know what the solution is for the housing issue, on one hand you have people (like myself) who bought at high prices(and at low interest rates). My house will be a money loser if I try to sell, and this includes the thousands/millions? of people also in my boat(we are essentially trapped in our house and unable to move). On the other hand houses that will need to be built and houses on the market now are not selling, the cost to build a house and interest rates are too high in terms of affordability given current prices of houses. This leads to less mobility for Americans, and for those that are locked in their low rates right now(and bought in the past 7 years or so, and at lower levels pre-pandemic) would be crazy to sell which is another factor driving down supply.
> are not, by definition, a podcast because they don't have a valid rss feed

Does a podcast need to have a rss feed? All I see in definitions is that its an audio format made available over the internet.

> And of course there's zero chance they will embrace podcast 2.0 features

What is Podcasting 2.0? All I see is a bunch of people doing podcasting differently, namely adding ads and crypto.
I'm not using it because I still have to write getters and setters like a caveman.
About the clicks in firefox:

I've dealt with this problem in a MIDI webapp I've developed a couple of years ago (midiano.com). If I remember correctly, firefox had some issue when samples were scheduled to immediately start with a gain value above 0. I believe the solution was to schedule them slightly earlier with a gain value of 0 and using "gainNode.setValueAtTime" to make the sound appear at the desired time.

Not entirely sure if that was the exact solution but I do remember firefox causing some problems in that regard. I just recall it being a hacky solution and that I couldn't find a documented explanation of why it happened.
They are playing the attention game now and are beholden to the rules of the game and the organisations that control the playing field.

In terms of climate change the media organisations support these activists. However where the media do not support the cause the attention game is the wrong thing to play.

It's all spectacle now. No actual change of a person's heart just ideology mediated through images. It does indeed get people thinking about it but only until the next news item is shown.
We started off hand rolling the parser and had that fully implemented and then wrote the tree-sitter grammar. If I were to do it again I would probably use tree-sitter for the actual repo so that the implementations were the same for sure.
> The posix shell spec is missing a lot of reality. It’s not very actively maintained, unfortunately

POSIX was primarily intended a descriptive specification, rather than a prescriptive.

That is, it attempted to document and standardize the common behaviour found on many platforms during the Great Unix Wars, rather than say "hey we thought of this great new thing and released a spec, go implement it!", which is more how, say, web standards work. I does/did have some of that, but it was never the main goal.

These days "whatever Linux does" is the de-facto standard, for better or worse, and the need for POSIX is much less.
Looks like I was wrong!

This report puts current usage to 20%:

https://web.archive.org/web/20170329132409/http://www.iea.or...
The worst part is that they are showing these ads to paying customers.
Perhaps the housing market is obese from low interest rates, and will be healthier after a bit of dieting.

Society would be healthier if the housing market wasn't managed to be a retirement fund. Would likely end homelessness.
Coal pollution kills more people every year and noone cares. Estimated mortality is between half a million to two million per year.

Thats more people dead in one year, that all people ever killed by all alternative fuel sources combined over entirety of human history- hydro, nuclear, geothermal, solar and wind.

If something happena daily, its uninteresting. If one person dies in a freak accident, its all over the news.
React monkeypatches fetch()
It feels like anything labeled "Pro" got USB-C faster, except the AirPods Pro gen 2 :(
> what in the world would anyone need chromium for?

Perhaps rendering an xterm.js canvas? (I don't know, it's just a guess)
This is actually really cool. Thanks for sharing this!
Everyone forgot the denominator. In terms of GDP/kWh of energy or GDP/calorie of food, we are still seeing sharp decline. Instead, we are measuring in dollars.

When inflation starts to hit salaries and debt needs to be rolled, we will start to see more business contraction. That is what business leaders are planning for.
I know you said no Windows — and I haven't used Windows in over a decade.

But back when I did use it, it had a nifty feature where if you create a new empty text file in notepad and save it as .LOG, then each time you open that file it'll append the timestamp. Something like that (my memory about it is a little hazy).
I think you are under thinking how much effort there is to "make it an immersive experience." The /vast/ majority of game travel time is always with characters that are running. It is a bit of a gag in games. Try using the characters at walking speed.

And then think of transferring that to "we want you to feel like you are in a vast world.... that you can physically traverse in less than a day. Probably less than an hour."
If you liked this, you may be interested in the Monte Albán Virtual Reality Laboratory (MAVRL) project. (https://montealban.oucreate.com/virtual-reality-2/). The site was scanned and put in Unity, allowing them to experiment with different positions of the sun, etc.

From the site:

In the summer of 2017, a DJI Phantom 4 Pro+ drone was used to take over 15,000 photos of the Main Plaza of Monte Albán. These photos were processed using Agisoft PhotoScan Professional software to digitally reconstruct the Main Plaza and surrounding Architecture producing a photorealistic 3D representation, and other highly accurate maps for archaeological study. A year later, Dr. Alex Elvis Badillo and Dr. Marc N. Levine developed the project MARVL to push the digital data captured in 2017 further beyond mere maps and 3D renderings.
I wonder how many nuclear bombs it would take to raise global temperature by an average of 1.2C? I'm sure a physicist could tell you, but I bet the number would be best expressed in exponential notation at least.

And if we were setting off that many bombs every day, I bet people would be a bit concerned.
https://www.tweaktown.com/reviews/8231/wd-red-10tb-nas-hdd-r... has the drive power consumption at 0.5W when "sleeping", which is hopefully most of the time. You'd hope a Synoplogy would put the disks to sleep. All in all, surprisingly high power for something that's meant to be on 24/7.
This is terrible news. Without a recession to curb inflation, the fed will have to get far more extreme with interest rates to get inflation back down. I thought that rates might top out around the end of the year, but now the fed may have to keep raising aggressively well into next year. Mortgages and the housing market are going to get slammed. This is going to get much worse than I previously expected.
The only thing I use AWK for is getting at columns from output, (possibly processing or conditionally doing something on each) what would be the next big use-case?
I've never really understood why they hadn't done it yet. The iPad has used a USB-C connections for a few iterations now, they got a lot of criticism for switching only to USB-C style connectors on their Mac line years ago, yet they've resisted bringing the iPhone into the same ecosystem. There's a lot of third party peripherals that are reliant on lightning, but that doesn't really seem like something that would hold Apple back.
> Not even that but every country and it's industries that have been transitioning from coal to nat. gas are fudging the numbers to pretend it's better?

It's quite clear the numbers are fudged for methane production at every level from the field to the PR office - I honestly didn't know that was a controversial statement. You don't get data added to a report on what you don't measure, to begin with.

I'm mostly responding to you since I had similar arguments about 20 or so years ago when the transition to natural gas (and off of nuclear btw, not just coal!) was being discussed while being massively subsidized. I felt it was a foolish decision then, and still do now.

Why? Society will not act unless there is an emergency. They will then focus on a single solitary solution. If you decide natural gas is going to be built while we build out our nuclear (or other) capacity, you'll find out that 30 years later you will have a whole lot of natural gas generation and be left with no nuclear industry whatsoever and very little capability to quickly restart it. Seems that prediction is playing out.

So now we get to burn all the cheap natural gas before we finally get into a big enough of an emergency to perhaps find something somewhat sustainable long-term. We'll see what short-term solutions present themselves in the meantime, unfortunately I think those short term political solutions may lie in a mountaintop in eastern Kentucky.

So to answer your overall question - yes, I can fully believe transitioning from coal to natural gas while we effectively ignored all other energy investments (at scale) was a stupid move in a long-term environmental lense. In 100 years I think it will be obvious that if fracking had not been invented it would have been better overall for the environment. Time will tell!

I also am a natural pessimist :)
Slim is really nice. We've used it with great success in several production systems.
There never was a real recession - it's an artifact of year-over-year numbers that were so skewed from pandemic effects.

Pent-up consumer demand shifted much activity from 2020 into 2021. This is the source of all the apparent weirdness. Every yearly number in 2021 looked great thanks to comparing an artificially high number to an artificially low 2020 baseline. Then every yearly number from 2022 looks terrible, because it's comparing to 2021's number that was artificially high from time-shifted demand.

Remember the "great resignation"? That was an illusion - it was just normal pent-up demand for job switching that didn't happen during the pandemic. The inflation of 2022 is also largely an illusion - it's really just that a few percentage points of what should have been normal inflation in 2020 and first-half 2021 was time-shifted into 2022. (The inflation is real, but the timing is an illusion - it's not really 8% per year, it's a fairly normal 12% over three years.)

If you believe any year-over-year number from 2021 or 2022, you're falling for headline click-bait without considering the underlying irregularities.
McKinsey reaches deal with U.S. local governments over opioids
A Beginner’s Guide to 3D Printer Filaments
I couldn’t agree more; Obsidian is just a fantastic tool for this. I’d like to add that the calendar plugin has been really helpful to quickly navigate between and create notes for each day or week. Keeping notes both on a daily basis and weekly basis has helped me to better plan and evaluate what I’ve been doing.
Agree here - learn a declarative infra description language like terraform, or cdk, or pulumi, or something. Infra-as-code will put you on the right side of things for cloud infra.

I say that as a person who is not super bullish on big cloud architectures. So, also learn a more 'imperative' tool like ansible (even with its sucky syntax), for repeatably provisioning hosts.

Orgs that don't use tools like that are, in my opinion, strictly of a lower level of maturity and having-shit-together-ness than ones that do.
Good grief, that URL.

These companies are ridiculous. Leave us out of your corporate drama.
Sure you can. They are expecting the tightening to be short lived. As they said, the companies can survive a few years but if rates stay high longer than that and don't come down it'll be bad.
Thanks to 3-D Secure it doesn't really matter who has your credit card details. Relying on the secrecy of a few numbers is silly anyway.
Is there any indication that ad spending LEADS consumer spending?

I can't imagine why anyone would turn down ads while ROAS is blazing.

Marketers / ad people - is this common? If so, why?
This is kind of what I was expecting. I tried saving the gif to see what happened, and it's empty! It's a pretty neat trick!
> Feel free to share your experience and beliefs, but please don't act like this is science and you're some kind of authority.

I’d suspect there’s a correlation between this behavior and quick IC SWE promotion at big companies.
The doom and gloom makes more sense when considering who benefits from pushing that narrative.
In the US and the Americas it won't have a severe impact. Most countries in America should hold up, and Canada has relatively high immigration levels, so there's that.

Much of Europe and large parts of Asia (China! Japan. Korea.) will face jaw dropping population collapses, happening now and in the near future.
Noted! Although we wanted to charge a standard fee per event extracted, this would have tied our hands to deliver tougher-to-build connectors. So most of our connectors are charged at $0.00004 per event, but some which include scraping are charged higher (we want to be very explicit about which connectors are charged differently).
>Of course, there are arguments around the externalities of all of these things. I view most of those arguments as society contextual (people don't like others smoking, so it is an externality) as opposed to something like carbon which would have a negative externality regardless of this societal/cultural context.

I agree with you here and find the obsession many people here have with advertising weird. Still, alcohol pretty clearly has a negative externality "regardless of societal/cultural context." The consistently high percentage of vehicular deaths, assaults, rapes, damage to developing babies through FAS, and so on are all largely borne by people besides the drinker themselves.
I've had good luck with LL Bean's Double L jeans. I do wear them out, but I wash after every wear and with that the service life seems pretty good, much happier than the last several pairs of Levi's 505 I bought. I've got one pair of a higher line which will hold together for a long time, because I don't like the cut of the pockets so I only rarely wear them.
> It's sad that it took legislation to make this happen, but I can see why.

Did it? Apple moved their last Lightning product (outside of iPhones & their accessories) earlier this week.

It seemed pretty clear they were going all USB-C, just on their own timeline. It was already widely expected next year.

I bet it would have happened within 2 years if the law wasn’t passed.

If all the iPads, or even most of them, were still Lightning I’d agree. But when even the cheapest model moved, the writing was on the wall.
>The Amazon Labor Union, which filed an unfair-labor-practice charge with the NLRB over Jassy’s comments

Hm, it seems nothing has been debated so we don't know if and what's wrong specifically.

In another article:

>To resolve the complaint, Amazon can settle with the union or take the case before an administrative law judge in February.
Making an SSH client the hard way
> This seems like such an obvious thing to do for various reasons. It allows the (increasingly irrelevant) natural diamond industry to easily distinguish between their product and synthetic products.

Surely we would want the opposite? I..e for someone to unload a ton of lab-grown diamonds indistinguishable from "natural" ones, to once and for all kill the racket run by De Beers and friend.
If by consumer you mean only residential households then yes I agree.
But if you enjoy consuming the products of or enjoy the benefits from the many wonders of German industry and manufacturing then underestimate no more.