The best use case I know of for these kinds of things is as a way to prevent sql injection. SQL injection is a really annoying attack because the "obvious" way to insert dynamic data into your queries is exactly the wrong way. With a template string you can present a nice API for your sql library where you just pass it "a string" but it can decompose that string into query and arguments for proper parameterization itself without the caller having to think about it.
How do you know that reality does not collapse immediately? At any given instant you could be a fresh brain that just came into existence, all your previous memories which imply a life lived up to this point also formed in that same instant.
Indeed the bigger issue as I see it is that the only "sensible reality" that can exist is the one you subjectively experience. Since that one is the only sensible one, it's the only one you perceptually would be able to hang around for - even if it's actually a conincidental series of flickers of sapience across trillions and trillions of years.
i.e. a time stepped simulation, absent external reference, doesn't know how long it's been between the actual steps - could be seconds, could be hours, could be years.
EDIT: Like the real issue with "death" is that it's not "eons on darkness" - which is why I think people get afraid of it (or one of the reasons) - but that actual, literal non-existence is inconceivable even though we all did it - 13 billion years of not-existing in the universe, then suddenly you.
So after you die the same problem re-emerges: the conscious experience of "you" ends...but then from the subjective blink of an eye if something happens to restart that information process just right, suddenly again, you - and it has to be you, and no one else, because if it wasn't then well, it would be someone else - i.e. why am I me, and not my wife or son for example?
What if it was someone who just happened to be extremely similar to you? There's a decent probability that someone extremely similar to you will come into existence during the finite lifespan of the universe. Would that person be likely to be "you"? By comparison, would they be more "you" than a version of yourself that woke up with brain damage?
I don't see anything in the comment guidelines banning humor. I do however see that it asks us to be kind, not sneer at the rest of the community here, and to stop the tired comparisons to Reddit.
The voting and flagging systems, along with the work of the moderators, are perfectly capable at managing the comments. No need to try to police them yourself.
You've clearly read the guidelines attentively so I'm surprised that your take is that if shallow jokes are not explicitly banned then they are welcome?
> Avoid generic tangents. Omit internet tropes.
I interpret that part as saying that generic jokes and boring puns should be avoided. (The trope being a long chain of commenters trying to one up the previous pun, with zero substance)
Personally I'm neutral when it comes to puns in child comments.
But I really don't like top comments that consist of only a pun. Make an insightful comment and conclude with your pun, if you really must.
My favourite solution to this problem was going all in on analyzing the input. Instead of just assuming the set of modules must have cyclic behaviour and running the simulation until you find the periods, look at the input and _really_ understand what its doing.
What you will find is that the modules form a set of binary counters (chains of flip flops), with a number encoded into them via whether they are connected to a "hub" node of the chain (a conjunction).
You can parse the module structure and traverse the graph to extract that number. The connections to the hub are the bits of the number (1 if module is connected, 0 if not). Do that for all the counters and LCM (or multiply since they are all coincidentally co-prime) them together to get your answer.
Yup. This is a rare pen and paper solution for me. I ran simulations to confirm the first two cycles and that I was reading the binary right, but I got the solution directly from the input by hand.
It is my favorite problem of AoC as well this year mostly because it was the first problem in many years where when part 2 popped I didn't immediately mostly know what algorithm they were going for.
For those unaware, Shopify already has platform wide search. You can use https://shop.app/ (or the app), and it also has some chatbot thing that can offer suggestions
Yes, this has been available for a few years now. Initially, they only indexed a very small number of shops, so it was less useful. Based on a few queries, it seems like the are still using some form of text-based search with rank boosting. Seems like they still aren't searching their entire base of shops, but they have increased the number of shops for sure, and they seem to be continuing to invest in the product, which is nice. It seems more useful now than it did the last time I checked!
I think that dismissing it out of hand as useless is unproductive.
From my understanding Roy Fieldings dissertation was a description and formalization of the web as it has been built, not just prescriptive advice on software architecture. To say it's not useful is to ignore how humans browse the web.
my memory is hazy but aren't semantic web, ontology and all that HATEOAS stuff for bots instead of humans? Now that LLM is here, what use do they have?
I haven't really thoughy about REST in relation to all the recent ML advancements. REST (With HATEOAS) might actually be a good way to expose APIs to these agents since they now have some ability to "reason" about responses beyond a hardcoded set of handlers
Structured data doesn't magically go away because you have better interpretation of unstructured data that doesn't blow goats; it's still orders of magnitude easier to manage, store, and retrieve structured data.
the web is not data, this is the fundamental thing that's problematic about that way of thinking. We already have structured data, it's called database
I haven't worked there for years, so not sure what has changed since I was there but at least at the time it was decent. It could reliably detect movement, but was getting triggered by pets and such. They were working on solutions to that when I left.
reply