skysight-inc/HackerNews huggingface dataset:
There are memory safety bugs that won't cause a segmentation fault or create a buffer overflow exploit, but result in logical errors. For example:

void inner (const T& t1, T& t2);
void outer (T* t, int i, int j) {
inner(t[i], t[j]);
}

There are three memory safety bugs in that code:

- the pointer `t` is not checked for null
- the indices `i` and `j` are not checked to see if they are outside the bounds of `i` and `j`
- the indices `i` and `j` are not checked to see if they are the same.

The first bug will cause a segfault and crash. The second is a potential buffer exploit. The third is a logical bug that can be exploited depending on what inner() is supposed to do. Most people know to check the first two, the third one is subtle and isn't necessarily a bug. But it may become a bug that can be exploited inside `inner`, especially over the lifetime of the code.

Rust will prevent all three, or force you to perform the checks before using an `unsafe` block.

But more than that, this kind of issue crops up due to an inherent weakness of code review - it catches errors in blocks of logic, but not in logic below it and logic above it. Since C/C++ don't have idiomatic error handling worth a damn (the only "idiomatic" errors in C++ are debug assertions, ime) you can't defend against silent logic bugs due to violating invariants of callers or callees that are expressed through Option/Result types in Rust (I mentioned this in a comment above). That's the real benefit of writing code in Rust, in addition to the absence of footguns.
I invest in SPACs regularly and have made a killing off investing in them. Plain and simple, SPACs are all about hype in terms of how much hype the target company can garner. I only buy pre-LOI SPACs and then consider selling them on the merger announcement or right before the merger completes.

This strategy works because of social media. People go around social media to hype up the company so to a certain extent it is a giant pump and dump scheme but the pumping is done by the collective internet communities on social media.

Typical aspects of the company don't matter. What matters is being able to hype the company. That's why stuff like electric vehicle makers, fintech and clean energy is stuff that everyone focuses on. Right now the average joe strongly believes that electric cars and clean energy are the future so they're more likely to buy into these SPAC companies because they're sold as "the next big thing" even though the reality could be that they're very risky but no one cares about that long-term because we all dump the SPAC shares before the merger completes anyways.
"But Facebook did it too" isn't a great argument for Parler. If anything, you're arguing for more legal pressure on Facebook, not for getting Parler their AWS account back.
But if the extreme measure of cutting people off at the ISP level were to occur (heaven forbid), wouldn't such rules be broken in the name of civil disobedience? I'm curious about what's technically feasible. Do "preppers" have a plan for such an event?
Developers complain about GitHub scraping: inaccuracy, judgement
In some situations, sure.

In Jeffersons? He didn't just fall a little short. He fell way short in ways that both he and his contemporaries knew were monstrous. Jefferson himself wrote that it was too dangerous to support abolition, even if slavery was a moral evil. In comparison, Lincoln wrote that ending slavery was worth the total destruction of the entire wealth of the nation. Jefferson wasn't even willing to personally sacrifice. Ending slavery was absolutely within reach during Jefferson's lifetime. And he personally had the ability to free his own slaves even if broader abolition didn't come quickly.

Jefferson also betrayed his own ideals by failing to support the french revolution (a revolution that was actually about granting power to the people, though it had its own problems).
The cheapest WGS I can find for consumers is $299 (30x WGS from Nebula). Do you know a cheaper alternative? I'd much rather get a whole genome that I can download rather than the handful of little snips from 23 and me... At $100 I would buy in a sec. Would be a nice motivator for bioinformatics hobby/learning projects too.
>There's a lot of fake gains showing up in bank accounts

Being able to afford a house, or giving your kids a start in life without having any student load debt to pay off are definitely not "fake" gains.

>reasonably sized homes at inflated prices

How do you know they're inflated? Maybe that's just how much homes in economically productive areas are going to cost from now on.

>Obviously each of the new tech millionaires with 50+% gains COULD cash out and buy, I dunno, a semi-truck full of flatscreen TVs.

The ones that have sense will buy multiple homes, take exotic vacations, and retire early.
Anyone know how this works with React? The old version has a wrapper, but it's pretty crude.
Smaller companies might not have as much commercial exposure in Pakistan - i.e. if they have no formal business presence there, what would be the consequences for them not complying? For example, if these "apps" were traditional Windows executables instead who would the government on Pakistan lean on to get them blocked? The best they could do is attempt a "great firewall of China" style block on internet traffic itself.
> Should the assaulted be happy with the fact that the inmate will get a job?

Would the assaulted be happier having to work to support the attacker for the rest of their life?
Biden cancels Elon Musk's adventures in space
Your complaints seem to boil down to "get off my lawn" and it's rather tedious. what do you get out of it other than a feeling of superiority?
For the sake of argument, assume I agree with you.

Next, would you be willing to talk about the complexities of gathering places, free speech, and who funds those gathering places? Would you be able to formulate one, two, or three basic theories (or models) of how these factors relate? Could you test them?

The reason I ask is this: I think there are some recurring patterns that connect these factors. I won't claim these patterns are universal, but I would expect to find useful patterns across many regions and many periods of time.

Having a tested, applicable model of how these are connected can help find the leverage points to target with regulation to achieve particular goals.

Caveat: what I've stated above is, more or less, a compact statement of how I think public policy should be made, at least for the most significant issues that we face.

And, if an issue is not deemed significant enough to warrant this kind of analysis, that's understandable. However, I don't think anyone should fool themselves into thinking that some 'obvious' action will also be verifiable *solution*. It might happen to seem effective to some people, but that doesn't make it an effective policy or decision -- very few of us are provably good at separating association from cause and effect.
Often the failures are more illuminating than the actual solutions: you will see how different approaches can fail, and become better able to appreciate the solution.

It's very easy to write out a finished blog post with recipe-like instructions, but you will be throwing the baby out with the bathwater, as the reader might miss out on crucial insights into why the solution is the way it is.
What is the gameplay like?
Excellent suggestion; thank you.
I am _entirely_ uninterested in my reading being crowdsourced and "social". I'll talk about the thing somewhere else, after I've read it and had time to think. This attempt to inject an attention-stealer in the middle of one of the last things we do without interruption is an enormous turn-off.
Yes it would be ethical to abandon their customers over this. Apparently religious freedom isn’t where you draw the line. What other rights are you willing to abandon?
Any particular strategies for making them aware of this? I find that if I submit a job application online, I will say I require a VISA (a TN in my case) and that produces less positive outcomes usually. So I've started to say I don't require a Visa which even if it leads to a conversation with HR, and I clarify my situation ends up resulting in an immediate rejection anyway.
Like watching a magic show and thinking the secret is just to have a deck of cards.
J. Presper Eckert Talks on Eniac
Reimagining the Platform Economy
Ultimately "refusing to comply" means exiting the Pakistan market (and accepting arbitrarily harsh fines and criminal punishments for their employees until they do).

> One certainly shouldn't help enforce an unjust law.

The law is being enforce on them. Your moral responsibility for a situation is proportionate to your power over that situation. Apple and Google have some sway due to their size, but it seems to me it's limited. I suspect that in a direct sense they largely suck money out of the Pakistani economy rather than pump money in, which really blunts their influence.

> Our laws govern those companies.

In Pakistan, Pakistani laws govern those companies. The US (and other nations) could impose economic sanctions on Pakistan for this (which would affect the business Apple, Google and others from do there). If that's what you want then you need to be lobbying your politicians.
Strike 3 Holdings wins $108,750 default judgement against IP Address [video]
In my opinion, it really is gambling for the vast majority of participants. The same millenial peers of mine who talk about sports betting endlessly seamlessly talk about crypto and stock options within the same sentence. They are all just more things to bet on when there isn't a game on TV. It's the same crowd of people who wouldn't hesitate paying for UFC pay per view to live bet, or ending the night at the nearest casino in any city they are currently binge drinking in. There is a whole subset of millennials who follow the words of David Portnoy and/or Joe Rogan and others like some sage prophets, echoing their rhetoric and chasing their bets.

These people aren't sticking it to the man. They are looking for their next bet to hit, and taking fools and the resulting media circus with them. The celebration of hedge fund losses is rooted mainly in memes rather than an actual coherent class struggle, since if you have enough money to blow on dumb bets constantly without going broke, chances are you are living somewhat comfortably to begin with.
I've been using it with React for a couple months now. In my experience it's been a little awkward but overall fairly usable. It seems like it would be easy to write a wrapper for.
Amazing! In the past I used Ace, Monaco, and CM, and CM was always the best. But the API was a bit behind a couple years ago (typescript was wanting), so very excited about this and can’t wait to check it out.
Well how much were you all paying?
Do you know how to directly 'talk' to the CPU or GPU? Do you build everything from source? Are you comfortable writing assembly? Have you recently soldered shit or built a PC from scratch?
You say that, but have you driven one?
Well if you're already happy using IntelliJ, I'm not sure there's much reason to switch. It's more that you're not forced to switch in the other direction.

I'm happy with my Emacs setup, and in particular I spend a lot of time editing code in other languages as well as text docs like markdown or org. In the past, while this workflow was great for most things, I'd usually have to switch over to IntelliJ for serious scala editing. But now I don't have to any more!
Where Rust really shines compared to other languages IMO is when software grows beyond a certain scale. The way the language forces and encourages you to "do it properly" really prevents a lot of lazy decisions that would come back to haunt you later in unexpected ways.

The magical part about Rust really is how accurately (compared to other languages) you know which little gear in the big machine is failing. Often you even know precisely why and how it is failing.

Precondition for this is of course that you really grok Rusts ownership and type system.
I am not doubting your story, but saying that KSP is the stepping stone to a balsa model sim would have been opposite to what I would have thought. But if their goal is accurate flight model simming I can see how that's quite a different thing than what Kerbal is.

I like Kerbal because of the scale of the systems that are possible, and because of the challenge of planning out the logistics of a cross-solar-system flight. Setting up a scientific "colony" on a far flung planet is just a cool thing. I certainly don't come to Kerbal for its flight mechanics - not saying they're bad for what they are. It's just that the game's physics are built around the requirements of time accel.

Also, I've heard the broad strokes of that story about Squad before and always wished I knew the specifics. Getting an ad agency to financially support a video game to get an employee to stay - that's gotta be an interesting story.
Feature request is also useful when you want to create and contribute some new feature to existing OSS, the response from maintainer makes you know if it will be accepted in mainstream version or not, hence in my opinion its not always asking for others to put efforts, though mostly it may.
This isn't a law class, so let's not apply those standards. The 1st amendment itself refers to "freedom of speech" so there is absolutely a principle that exists outside of the 1st amendment. There is absolutely an argument to be made that the scope of the 1st is too narrow to protect freedom of speech in the US.
You make a great argument for Governments that support religious freedom. Not sure I follow your logic to a conclusion that makes Apple and Google the villains here though.

A&G have a binary choice - serve users in (Oppressive Country X) or not. There is no choice that involves serving those users but not following the oppressive laws of said country.
What do you think they should do?
Introduction to Google Anthos
Now that's not too shitty an outcome!
I would argue the gains are "fake" if the inflation of spending of the investor class tracks the market.

In other words, we see inflation in private school tuition, homes, etc, that is correlated with this bull market.
I like to think of stories as data in actionable form. Just knowing the facts doesn't tell you what to do. Those facts need to be embedded in some larger framework of meaning that enables you to make correct choices based on it. That's what a narrative is.
What supplement/brand/company do you use?
"Even a $3B purchase of BTC might appreciate to be on par with India's gold reserves given another 10X appreciation in the Bitcoin price."

So, India should speculate on BTC, because it might go up. Got it.
>Flash was banned to protect the Google, Apple, Microsoft ap ecosystems.

No. There was always a lot of Flash hate around, but it was tolerated because prior to HTML5 set of standards and the massive investment in JS performance, there was no way to do certain things in HTML/JS, so there was space for Flash. Post 2010 it became hard to justify Flash because you could now replicate everything Flash could do (though maybe in a more clunky way).

>10 years on now and still nowhere near what was available 10 years ago.

I wouldn't say that. There is no good reason for Flash to exist anymore. The culture also changed. The younguns who were writing browser-based Flash games in 2004, are writing mobile games today, and the browser is not a popular gaming target anymore (with some exceptions here and there).
Managing your boss: adjusting to narcissists, 'ghosts,' gaslighters
When I was primarily developing in Python I hated using languages with braces, and especially Lua with is then...end blocks, but I think I've come around now.

I appreciate the ability to format things on the next line without worry about how the system will handle it. It's more of a formatting edge case but it comes up enough to be useful.

In the end, I feel like it doesn't matter to me nearly as much as other syntax choices in languages, as I've done a lot of Python with no braces and a lot of other stuff with them. I don't even notice anymore (although maybe counterintuitively I find braces a bit more readable now).
"Don't be snarky."

"Please don't post shallow dismissals, especially of other people's work. A good critical comment teaches us something."

https://news.ycombinator.com/newsguidelines.html

You've unfortunately been posting quite a few comments that break the site guidelines. Would you mind reviewing them and taking the intended spirit of this site more to heart? We'd be grateful; we're trying for something a bit different than internet default here.
I feel like this similar to what Spore promised, but only achieved a sliver of.

I think the challenge is that there's a tension that comes from having lots of optional, interacting systems that the player both a) can make meaningful improvements to a system that contribute to the rest of their game experience ("If i make farming better, my town will have less food") and b) can ignore systems they aren't interested in without crippling their gameplay (or, conversely, improving one system making the rest of the game too easy).

The tension is almost tangible in games like the Paradox grand strategy games: if you pick up something like EUIV as a novice now, it's very difficult to figure out which systems are actually important to moving the game forward in a meaningful way.

Edit to add: this does sound like an awesome idea though
That's pretty bonkers since in most European countries, your crime record is only relevant for certain jobs where money or sensitive data is at stake and nothing else.

How does society expect ex-cons to become functioning members again if they're denied housing and employment?
This is such a great library, you should definitely donate to it if you use it or even do a support contract with the maintainer if it's a part of your core business (i.e. if you use it for some repl.it or leetcode style service where coding is central to the product). This is developed and maintained by a single person.
Building companies that aren't Unicorns and getting comfortable with that
Active Learning to Counter Diminishing Returns in ML Model Performance
I've never used CodeMirror, but I'm using ProseMirror by the same author and it relies a lot on having control of the DOM.

I'm guessing the integration will be basically a wrapper component with a ref of a DOM node where CodeMirror will do its thing.
That would require nuanced discussion. We can't have that! (Kidding aside, I happily use Brave because I find Firefox borderline unusable, but also find Google's tactics unpalatable.)

The larger issue is there shouldn't be a war. There should be as many browsers as people have the hearts desire to create, and it shouldn't matter because they all follow the same standards.

However, in the real world, we've seen the noble goal of open standards get tarnished by the same bullying corporatist tactics. What we need is open and democratic standards, not just a few voices in the room running the show.
C > L

https://en.wikipedia.org/wiki/Capital_in_the_Twenty-First_Ce...
One of the things I was hoping to see in this release was first-class LSP (language server protocol) support.

VS Code's editor is actually available as a separate NPM package as Monaco[0], which is great because it means that you can trivially get LSP support. For example:

https://sorbet.run

^ Sorbet (Ruby type checker) implements the LSP protocol and can be compiled to WASM. So by using Monaco in the browser, we get a playground that supports all the same features as you'd get in VS Code.

It's the same for the TypeScript Playground[1].

There's a lot of great work in this release of CodeMirror. I'm especially excited to see mobile support as a headline feature, because that's completely lacking in Monaco. Maybe LSP support can be a future improvement.

[0] https://microsoft.github.io/monaco-editor/index.html

[1] https://www.typescriptlang.org/play
First Ever Measurements of Einsteinium
Rapeseed -> Canola
so what standard did it not met?
Strange TypeScript Behavior
At Codesphere, we code mostly in Typescript, not necessarily because it is our favorite language, but because we found out that it made us the most productive.

However, recently I came across two very strange behaviors, (I know, they are common in the JavaScript Bubble) and I felt the urge to share them!

1: ['1', '2', '10'].map(parseInt);
I came across this when I wanted to format some user input, convert it into numbers and put them in a chart.

Alt Text

['1', '2', '10'].map(parseInt);

This does not work, because map passes three arguments into parseInt() on each iteration. The second argument index is passed into parseInt as a radix parameter. So each string in the array is parsed using a different radix. '2' is parsed as radix 1, which results in NaN, '10' is parsed as radix 2, which is 3, and '1' is parsed as the default radix 10 because its index 0 is falsy.

2: Inheritance of 'readonly' in Typescript
During a code review we came across the idea to make methods readonly. What happened next left us a little confused.

It's actually not possible to make a method readonly, but it is possible to make a readonly property with a function type, which has the same effect.

Interestingly enough, it is not possible to assign the property again for instances of the same class, but it is possible to inherit a class and override the property, as well as, assign the property on an instance of a subclass.

class Roman {
readonly jonas: () => void = () => console.log("huh?");
}

class Elias extends Roman {
jonas: () => void = () => console.log("oh no, override works!");
}

const elias = new Elias();
elias.jonas(); // oh no, override works!
elias.jonas = () => console.log("oh no, assignment works too!");
elias.jonas(); // oh no, assignment works too!

What is your experience with Typescript? What do you find most confusing in Typescript?
Not if you're vegetarians. Or Hindus.
The Perils of Fame: Sylvia Plath and Seamus Heaney
Repository of Programming Language Design Projects
I would just like to remind here that if your goal is to create the wealth for the long term then being lazy and investing in good-old (boring) index funds is a better way. NYT has a nice article published recently on this: https://www.nytimes.com/2021/02/04/upshot/stock-market-winni...
> It is massively easier and better in TeX.

Obviously depends on where along the learning curve, and preformed command
line literacy, which on a venue like HN is always assumed to be native.

As a hypothetical, consider a Rip Van Winkle situation in which a
mathematician wakes from a coma he's been in since the 1970s. Now force him
to typeset one of his monographs. He'll do it in MS Word.
Can you provide more details about this? That sounds intriguing, but I think I’m missing something to fully understand what you’re talking about
> I'm worried this would codify fine power for whatever way the political wind blows

It depends on how the legislation is written, which will determine who makes various decisions and how the decisions are made.

Can you tell me about examples of legislation that you think have been done well? And what is your idea of 'well done'? Should I interpret your comment as meaning that you don't like arbitrary changes in political opinion -- that you think legislation should have deeper standards or principles? In the case of social media and speech, what do you think the standards should be?

Can you also give an example of legislation that has not been done well.
When you want to do voting, moderation, new/hot/etc, handle potentially large loads, it can get to be a lot. Also, if you don't want anonymous commenters (because that contributes to spam and bad community) you get into the entire user/password management mess. Particularly if you're just some guy that wanted to blog stuff, rather than a content-centric media corporation. Plus there's some potential benefit to having a consistent identity across different sites.

FWIW, Facebook was doing the exact same thing. I think they still do, though I don't see it as much.