skysight-inc/HackerNews huggingface dataset:
Any SQL wrapper worth its salt provides some mechanism to specify positional (or even named) parameters within that string (without resorting to string interpolation or concatenation) and pass them in when executing the query. Usually it'll be something like

foos = execute_sql("SELECT * FROM foo WHERE bar = ? AND baz = ?", [bar, baz])

If you're resorting to concatenating strings, then you're almost certainly opening yourself up to SQL injections (and rather needlessly, I might add!).
DEQ has floating starting index. When you push or pop, you just changing this index. The implementation in the repository also have custom implementation of DEQs which is even more optimized for this structure.
A political system has to survive the reality that some voters are stupid. Which voters are stupid is surely a point of contention, but in the climate where everyone is convinced of their righteousness, everyone thinks someone is stupid.

You cannot helicopter parent your voting populace. Otherwise votes just don't matter. If you feel that way, don't give people the right to vote in the first place.

Your political system has to provide an environment where the government (as in the will of the people) can safely fail at doing something important.

IMO, regardless of what is correct, a handful of insane politicians in the UK played a stupid game thinking they could avert a minor crisis and instead created a catastrophe. Those responsible should be pilloried and everyone should learn a great lesson from this. That said, I think that if the UK wants to remain intact, it is forced to take it on the chin and follow through with this.

Afterwards, the country can unite and pick up the pieces and fix it. The EU should also realize the opportunity it has here and be lenient.

The problem is that France and Germany can't stand the threat to their Union and will throw their weight around like the bullies they are. The Scandinavians will be convinced as always that they're just better than everyone else and let the UK suffer. The smaller EU countries simultaneously don't give a shit and also await the conclusion of this so they can see which way the wind blows.

I think if it goes up for referendum again, we'll actually see only 60% of the voter turnout of the last one. Could still go either way. In either case, the UK won't survive it. The only way forward is through.
I've had to put up several services throughout the years that performed exactly one or two queries, and a few more that performed less than five.

It was a matter of setting up the database, writing a prepared statement, and calling that prepared statement with the relevant arguments. Bringing in an ORM for these cases is absolutely overkill.

As your requirements constantly balloon, perhaps adding an ORM (or just a simple query builder) is appropriate. But none of the services I mentioned above have grown in that manner, and most are still up and have been running (and modified) for several years now.

I've been on projects where an ORM and/or query builder was likely the right answer, especially for automated migration and rollback scripts. But the way you're presenting it seems to be all or nothing, and I couldn't disagree more.
Ah sorry this was way too long ago for my memory!
Reach Robotics is closing
Stomach ulcers were thought to be caused by "stress," and increased acidity in the stomach caused by stress, and diet.

It wasn't until 1982 that the bacterial cause was found, and it took years for the medical community to abandon the "caused by stress" explanation and apply real treatment.

partly explained here:
https://en.wikipedia.org/wiki/Helicobacter_pylori
Exploit Market ‘Flooded’ with iOS Vulnerabilities
Did anyone else notice the reframing the article ends on? It spends every paragraph on 7-figure donations, then concludes with a quote that no one cares about families that make $100k donations.

Clearly Mr. Brunold wants people to focus on the $50k to $100k donation range that doesn't grant an admissions advantage, but no one seems to care about those other than him (and maybe the WSJ).
It's intended as a replacement...
It's a privacy violation because it leaks who's in your contact's contact list to you.
2016-04-20: initial request to rename or delete "Account renaming is something we plan to implement but haven't yet. You're welcome to email back in the future and check if it's done yet."

2016-07-26: check up "Not yet, sorry. There are some technical difficulties because YC uses HN IDs in its internal systems, which are separate, so we need to be extra careful not to make a breaking change. But we'll get there."

2017-02-20: me (falsely) claiming it's a matter of national security "That does sound urgent, so I'm sorry to have to reply this way, but we don't actually have the ability to do this. At some point we will have the ability to rename accounts to something anonymous, but unfortunately we don't have that yet either."

2018-02-22: another check up "Not yet, sorry, but it is coming. Do you want to be on an email list to get notified when it's ready?"

2018-09-06: no email. another check up after a small stalker scenario, and also a business associate mentioning they saw my HN profile while doing a Windows search for my contact info (thanks Cortana /s) "Yes—we can do account renaming now. Haven't announced it yet, but that's coming." rejoice

2019-04-18: check up on deleting "Hacker News doesn’t delete entire posting histories, and we don’t plan to because that would gut the threads others participated in. The intention is to address privacy concerns with account renaming or redacting personal information. "
> but requires you to contribute source code for changes, additions, and software that you build with it, other than applications.

What does this part mean? Would you please dumb it down for me, perhaps with an example?
Yes, it’s correct to say that they “perform burnouts,” because “burnout” is being used there as a noun.
I like TDRs and they have a lot of uses in characterizing channels (especially with time gating). I think you could get away with much less expensive and much more friendly hardware in this case, since all you need is RL or VSWR.
"chronic fatigue syndrome" is what it was called before it was better understood.

It is unfortunate and a bit weird that the author referred to the condition with that phrase; doctors and patients are trying to deprecate the term, as it leads to the whole thing not being taken seriously.

The preferred term is "myalgic encephalitis." My girlfriend has it. Roughly put, it's an ongoing brain chronic brain inflammation that leaves her incapacitated for roughly 17 hours a day. She's not "sleepy" or "lazy," she has a fever in her brain and it can't be cured and it's a horrid situation.
Correct, it's one of the largest warning signs I've learnt to look out for when fixing a restaurant.
5 and 6 do need to move. 7 and 8 can stay where they are. In R2 you'd change the variable that stores where the front of the DEQ is to point to 7, but 7 and 8 themselves stay put.
Correct. I need to add automatic restructuring. Currently structure sensitive and benefits a lot from using reserve() method
It would be if the different protocols didn’t have the same baseline power specifications and require negotiation between controllers to supply anything else. This is generally the case across everything sharing the type-C connector, though occasionally you will see a company make the terrible decision of trying to pass off their out-of-spec implementation as a “proprietary port,” as Nintendo did with the Switch.
I often wonder, why are people so bored? I'm fighting off doing my typical "old man rant" but I often hear people dream of a life where they have no responsibilities, but then I notice that most people fill their time with fluff -- because they are bored. I do it myself, even!

Fun fact: I'm on HN posting this post, not because this is what I want to do, but because it was the easiest thing I could think of starting to do after I finished up some work. If only it were easier to aim at stuff that I actually want to do... Hmmm...
Two people don't share the exact same view of a tree.
> This is, at least in part, a result of MINIX using a highly permissive license.

Not at all. MINIX was actually Intel's second choice, they tried first to fit Linux into their new x86 based ME. But the maintainers were uncooperative:

https://www.phoronix.com/scan.php?page=news_item&px=MTY4MzM

Intel then submitted similar patches to the MINIX kernel, which subsequently got accepted.

https://www.cs.vu.nl/~ast/intel/
That is neat and all but do we want that?
Let's do hard gamma lithography already.
Full interview: https://www.youtube.com/watch?v=sDrRvrh16ws

One of the things the Linux kernel developer says in the interview is that researchers are going through Intel patents to find "security bugs".

He says this is "fun". Twice. He seems pretty nonchalant about these issues. Like it is great to fix them, but not like it is too important or anything to worry about. He says what is most important to him is that Linux "succeeds". The attitude is reminiscient of Microsoft in their heyday. Drunk on success. He even calls out a Microsoft employee he is working with. He says the companies contribute "selfishly". This is no different from BSD. Users do not determine how much security is prioritized, the contributors do. However, what happens when the biggest kernel contributors are companies?

He also indicates he does not agree with Stallman philosophically on technology issues. We do not get any details of the specifics of their disagreement.

As a user, I think is it somewhat easier to keep track of Net/OpenBSD kernel contributions than it is to keep track of Linux kernel contributions. I might be wrong on that. As far as I can tell, the biggest contributors to Net/OpenBSD kernels are still individuals and are not acting directly on behalf of corporations.
> The idealistic answer is good DB design from the start.

The problem with this statement is that DB schemas like code can evolve badly over time, even if they're maintained by a DBA sometimes (since they're human afterall too).

And then the DBA starts to suggest that you use things like triggers in your DB, which may or may not be good, but often surprise developers. "I just wrote 0 into the DB, why did it turn into NULL? What line of code did that? Ohhhh... there's a trigger."
Ask HN: What's your secret to programming fast?
Outside of being very familiar with your language, editor, programming environment, libraries, and knowing how to search for existing solutions.

What's your secret to programming fast when confronted with developing a new software that's not the same as something you have worked on in the past?
We're using Oracle, and it's solid there too.
The postgres wire protocol sends queries and parameters separately, the variables are bound on the server side.
Exactly! I really like this stuff, little clever ways to skip effort. Data structures and algos don't get enough love :)
We saw this over the past couple weeks. It freaked me out and google's g suite support was useless. I did report the IAM it looked like these invites came from (to both the cloud fraud form and gsuite support) but maybe that listed IAM is actually google's auto-add-to-calendar bot? I didn't think it made sense to contact cloud enterprise support which tends to have awesome responses.

I was concerned because:

* we received more sophisticated than usual SPAM/phishing to our employees 'from' one of our partners around the same time
* we work in politics
* the timezone on the calendar spam was Russia and multiple staff received the spam invites
So? If their code is of low quality, they can be filtered out based on that by the not-so-potential employer. Employers do not have to hire you, and not everyone knows how to write "good" code. If you cannot write code "properly", it will show one way or another. If you can, that is good, that will show, too!
I have been using Firefox Developer for about 6 months, but after two incidents of week-long bugs that caused my browser to crash after a variable number of minutes, no matter what I had open, I've decided to swap back to the release version.

Yeah, you get a few cool features a bit early, but I just can't stand the instability anymore. Pluis, I'm not actually using any of the "Developer" features, so there's really no reason for me to not just run release.
Trucking Company Shutdowns Grow
I'd love to give feedback, but I signed up and all I got was: "We'll be in contact soon".
The 2.2 specs are better, with exception of RAM which is equivalent. I've never had any performance issues surfing, watching videos, or using apps. I couldn't recommend this phone enough. The review over at ars was good and that's what put it in my radar.
But underscores also work for numbers that don't have lot of zeros. Compare:

12_345_678
1.2345678e7
Information Technology has baffled...?
It’s not about why you don’t want it. It’s about why someone else does. Some people get their dead pets stuffed and keep them in their house. Maybe someone might do the same digitally with their loved ones. Maybe a couple will add in their son who died of a heroin overdose in 2016 to Mom’s 70th birthday video. Maybe you won’t. Both are fine.
Checking for the existence of the files could take time since they are in a different directory, but checking for the existence of the chrome directory (which doesn't seem to be used for anything else) should not require disk access since the directory contents are already cached due to accessing other files in that directory. One person mentioned checking for the directory in the bug report but the answer made it sound like they actually checked the speed of testing for the existence of the files in an empty directory rather than checking for the existence of the directory.
Haha, if Mozilla ever hid a "better" experience browser behind a paywall I bet you would be here excoriating them for that move. The general feeling of entitlement that some people in the open source side of things have is quite astounding. They want everything possible, but absolutely for free and then justify how absurd it all is by saying people will pay in droves if only Mozilla made this magical, perfect, privacy-first browser. It's just tragic and I feel so bad for Mozilla in general given the total apathy that most technical minded people have towards their plight and long term financial sustainability.
Is there a reason you didn’t just use std::deque? You’re already in C++.
All car makers put asterisk when talk about performance and mileage - it didn't help VW from being fined and prosecuted.

We were given certain benchmark numbers and performance target and it all went to shit with a single microcode update.

Somehow most people expect CPU not to give random javascript in the Internets a private key from encrypted file system.

Intel got off so easy from that drama. Imagine a car marker selling you a car 4 seats, but when backseats are used you might lose steering? Would that be okay? No where it says you get 4 usable seats.
On the other end you can often build better UI's to reduce the amount of dynamic query building required. Dynamic queries are most heavily needed when you give users a data table and let them sort/filter as they wish, more often than not this is a complete failure of the UI to understand users workflow and build around it.
So many people in this thread seem to think that your options are ORM or string concatenation. It explains a lot about why both ORMs and SQL injection are still so prevalent.

Does no one teach prepared statements in schools/online classes/textbooks? Does no one go digging underneath their abstractions to learn what they're providing of value and what is easily available without that abstraction?

> ORM protections against SQL injection attacks are worth the clunky syntax. Change my mind.

You can create what's called a prepared statement in most databases. This is a statement that contains placeholders for parts of the query that you want to change at runtime. You then query against this prepared statement, providing arguments for each placeholder. These arguments are typically typechecked and protected against SQL injection.

(I only say "typically" because I'm sure someone out there can provide a database/driver combo that does the wrong thing, but I'm equally sure you can find a misbehaving ORM that does the wrong thing as well.)
One data point doesn't change the fact that HN hasn't mass converted the world to use DDG. They may also be telling you they use DDG while they use !g or Google.
The OVH IPMI access is pretty cool - needs to be initiated from the web console, no longer requires JNLP, just straight browser access and the web console supports three different two factor authentication methods.

My only regret is that it took us so long to discover and switch to OVH - there are a few wrinkles but it’s such fantastic value compared with colo, let alone AWS/GCP/azure
I agree. Don’t know why you’ve been downvoted. Your experience directly mirrors mine.

What I did find interesting was the pushback I got from my team when I told them that I wanted to drop the Java ORM (JPA). One guy, who I respect, was super critical of the decision. He was telling me that SQL was the reason we had a performance problem, but when I investigated I was astounded by how fast SQL was, even over JDBC. It was clearly the ORM that was slowing us down.

In his defence, when I was able to show him literally 100x performance improvement after moving a service to PL/PGSQL and MyBatis (Java), he changed his mind.
“China drone attack” gets more attention than “random Company inc uses drones to spray pesticides”
Except lock buyers still go the door lock and in case of intel you lost threads.
Its still not actually on by default and you can't use encrypted chat synced between your desktop and phone. Group chats also don't have encryption and (last I checked) count be run e2e encrypted.

Probably 99%+ of conversation on Telegram are visible to the Telegram company.
This is very similar to what std::deque does under the covers already. It's a chunked array. The main difference AFAICT from std::deque is that this offers n^1/2 insertion and deletion within the body of the array. This guarantee is provided by allowing for the possibility of significant overallocation in the chunks themselves, if many modifications happen in the middle of the array. On the other hand, std::deque does not overallocate by as much -- just a chunk at the beginning and a chunk at the end. But as a consequence it has to move trailing elements when an element is inserted or deleted in the middle.

Interesting!
I've used Sequel in Ruby for that, and... it worked pretty well, to be honest. But it was for a service that did some complicated DB shenanigans, and not any user API. I wouldn't skip out on ActiveRecord when running a public facing Ruby app.
On another note, human intelligence is limited by the width of the birth canal.
Who cares why they are doing it? There could be more than one reasons. One of those reasons could be showing it to their potential employer. It may increase their chances of getting hired. Of course it may also decrease.
That's going to break textural videos too, isn't it? :(

Kind of silly that animated gifs will continue to work fine, but as soon as you try to use a format that doesn't take up a ridiculous amount of bandwidth...
I was in India last month, and ordered food with Zomato and Uber Eats many times.

Both Uber and Zomato have a lot of promotions and the food price is often 60% of what it would have costed if I were to fine-in (I walked into same restaurants a few times to see myself).

The amount of plastic still being used today is unbelievable! Some restaurants send decomposable bags but the majority of the food is Inna plastic container, with plastic cutlery, and in a plastic bag. Zomato has an option to request not to send cutlery, but the environment is also taking a massive toll on this. The streets are full of motorbikes honking for 20 seconds straights every 5 seconds, and the delivery people looked exhausted too, whom I think should be well paid too, while costing the customer more.

Another point here is that the restaurants registered tend to be more cleaner and follow hygienist ways to prepare food. This sounds like a small point in other countries, but I had a bad stomach for a few days and I would gladly take someone else's word over how far I can judge a restaurant how clean it is.

For me, the best balance is placing an order through the app (with discounts, full menu, reviews, etc), walk in, and decide if I would like to return (this time without the app). This way, I get to check the restaurant without spending a lot of time, and the restaurant owner doesn't have to pay the apps for my subsequent orders. I can also try and help reduce plastic usage .
While you're not technically wrong at the SQL level, I believe there's a higher level of business problem that ORMs like ActiveRecord solve for that's being overlooked. (aka ActiveRecord got Airbnb and Shopify a long way in scaling both developers and product).

CPU time building a query is rarely the business bottleneck until you're at a huge scale - scaling up the engineering team uniformly and having business logic at abstraction level closer to the rapidly evolving Product specs is the bottleneck that ActiveRecord solves for, and does pretty well.

If you'd like something that avoids object/hidden state - check out how Elixir/Phoenix's Ecto[1] was designed - it avoids many of the shortcomings of ActiveRecord and SLQAlchemy:

1: https://hexdocs.pm/ecto/Ecto.html
Satellite disaster averted after SpaceX refuses to move
Mozilla really needs to get that if they compete with Google on Google’s terms, they’re rapidly heading toward extinction.

Mozilla ought to be the browser for a private and usable web, but it seems they have occasional sneezes where you question what they’re doing (this, pocket in recent memory).
Slow-crawling Dorian a new kind of threat
They could have chosen "Quince pudding".
The problem is prepared statements aren't composable. So saying i want this query but also with this extra where in there and a limit and an offset means you have to write a whole new prepared statement. Or concatenate strings!

With an ORM you can construct the prepared statements programmatically.
I believe this data structure is called Tiered vectors, and is described in:
https://www.ics.uci.edu/~goodrich/pubs/wads99.pdf
Probably because the spec started all the way back in 2008, and you could revise it yet again, even though almost nobody is currently supporting it, or you can get it out and improve the situation for many people, even though it's not perfect. I imagine pushing for an extension to support encryption might be a lot easier if there's actual uses to call for it.

Given that Google has started rolling it out with a fallback to Google servers if the network provider doesn't supply one, and Google has said they understand encryption is important and they will push for it, we might actually see some progress soon (on both the adoption and encryption fronts) if we're very lucky.

You can see references to that info in some of my other comments on this article, since I looked it up again today after mentioning it earlier.
std::deque has O(n) insertion/deletion in the middle. Or do you mean replacing the internal deques with std::deque?
that's odd. does the whole site not load, or just certain features don't work?

i use firefox with all kinds of privacy/blocking extensions and can access linkedin just fine (as long as first-party javascript can execute).
Well, perhaps it makes them feel good. Why is it weird? Some people volunteer at hospitals. I do not find it weird. In fact, I wish there were more people like them. :) Maybe the world would be a better place, who knows.