skysight-inc/HackerNews huggingface dataset:
Since we're being pedantic, all mainstream languages (even Rust) have a runtime, so your "managed vs unmanaged" language distinction is completely meaningless. :)

If there is a salient distinction, it's whether the runtime is easily and practically distributed as part of the compiled artifact, which is true for C, Rust, Go, etc but not so much for Python or JS (nor probably Java or C#, although there are efforts for static, native compilation for those platforms which probably come with significant caveats).
For me, the problem isn't `unwrap` vs. `expect`, it's that I can't statically guarantee that particularly mission-critical code never panics.

I can be as careful as I want in writing panic-safe code, but there's no ergonomic and non-hacky way to ensure that I don't use third-party crates in a way that can possibly panic either.
This should have a "(2004)" suffix on the title. I thought this was current and only accidently noticed the date later.
> while I sort-of like C# I'm constantly aware that it's MS's property and shit is going to change and break

You can say the same about Sun.

There's also the Mono project, which is kind of the analog of OpenJDK.
Also before anyone talks about fuel: Australia is right here. We have a bonkers amount of Uranium in the ground, to the point that our coal is actually pretty dang radioactive.
It could be named .ordie() like php idiom from olden times.
The article mentions a new LPG terminal by the end of the year.

This are the gas future prices from tomputer's comment [1],[2]:

Q4 22 166.570

Q4 23 114.925

Q4 24 74.050

The industry doesn't seem to expect continuously high prices.

[1] https://news.ycombinator.com/item?id=32109948

[2] https://www.theice.com/products/27996665/Dutch-TTF-Gas-Futur...
>the poor are willing accept privations and duties in the name of patriotism

Not everyone agrees on what patriotism means or what actions are patriotic or good for the nation. Tolerating a few abstract points off your GDP because people you don't like voted your country out of the EU easy enough so people put up with it. You are not going to get a nation to put up with serious hardship like what the energy situation is shaping up to do unless everyone is on the same page about what the end goal is.
You have set up a terrifically easy strawman to knock down[1]. Nice job. But you are "unequivocally and objectively wrong" about what I think.

[1]: https://en.wikipedia.org/wiki/Straw_man
This is a really great guide! Nice to have something official and in-depth.

I have two tips I can share based on my experience optimizing OctoSQL[0].

First, some applications might have a fairly constant live heap size at any given point in time, but do a lot of allocations (like OctoSQL, where each processed record is a new allocation, but they might be consumed by a very-slowly-growing group by). In that case the GC threshold (which is based on the last live heap size) can be low and result in very frequent garbage collection runs, even though your application is using just megabytes of memory. In that case, using debug.SetGCPercent to modify that threshold at startup to be closer to 10x the live heap size will yield enormous performance benefits, while sacrificing very little memory.

Second, even if the CPU profiler tells you the GC is consuming a lot of time, that doesn't mean it's taking it away from your app, if it's single-threaded. `go tool trace` can give you a much better overview of how computationally intensive and problematic the GC really is, even though reading it takes some getting used to.

[0]: https://github.com/cube2222/octosql
Meth lab? That’ll help lose weight
vinyl and plastic degradation is a many years-long process before it has any real impact on the performance of the parts. Failure or yellowing of the non-automotive grade screen in a model 3 has been seen in just a few weeks or months.
So you're saying there's not that much mining power that could "switch over" to Bitcoin or ETH, because hardware is optimized for a specific network and would lose significant efficiency if switched to a different network?

That makes sense to me thanks!
What about extremely trivial expected conditions that occur all over the program? "expect()" would get tiring pretty quickly.

Regex::new(r"\bstruct\b").unwrap()
// vs.
Regex::new(r"\bstruct\b").expect("bad regex string literal")
Yeah in this case his son’s life
Neither fully human-editable nor really compact, but an interesting experiment nonetheless.
I tend to agree with preferring alternatives (?, Expect, unwrap_or_else) to unwrap in most cases, but I do still find myself using unwrap in cases where it's basically impossible for it to fail. e.g. imagine a parse method that returns a Result in case the input is not a valid whatever, but I've just called it with a literal value.

At the same time, looking at one of my codebase, 90% of such cases are in my test code
We should all be worried when the war goal is Lebensraum. It was the leading motivation for world war 2, and there can never really be an end to the ambition of colonialism through war.
Discussed here:

A CIA hacker’s revenge - https://news.ycombinator.com/item?id=31639354 - June 2022 (252 comments)
some are vocal in claiming others do not know a thing, when it is in fact the vocal person who does not know, so thank you for not claiming others don't know and admitting you don't.

what cost:benefit analysis leads you to believe that your approach is cautious, rather than incautious, as those with a different cost:benefit analysis might consider it?
Sometimes you don't want to use `?` though, not every function is made to return a Result / Option.
BMI is useful for screening and population studies, but it's (mostly) bullshit for individuals. For most people it's body composition that really matters. Excess adipose tissue, especially visceral fat, has a wide range of negative health effects. Anyone who cares about their health should get a DXA scan at least every few years; it will give a highly accurate reading on body composition including fat distribution.
Another day, another HN thread where everyone becomes a labor law expert in order to find a way that it’s justified and legal and cool for a giant multinational surveillance capitalism conglomerate to treat workers poorly
Because they lack taste for quality and efficiency, they don't want to invest in R&D and they don't know how to retain talents

So you get companies that stagnate and higher ups are too focused on building a huge wealth and work hard to secure a golden parachute, maintaining their position and salary is higher priority

https://www.youtube.com/watch?v=upzKj-1HaKw

This summarize it very well, lack of taste and lack of vision, it's that simple and has huge impact on the products you release as a result

Pigeons too busy eating random shit in this particular parking lot, they don't know any better

This also shows why

https://www.youtube.com/watch?v=juA12hkDB5w

Pure lack of taste

It translates to:

"They are stupid for trying to do better, you should hate them too"
Hamlet would graph as a straight line along the Beginning-Entropy axis.
It does introduce another layer of nesting in the code, which can be undesirable from a readability perspective at times
I see cutting off the EU's has supply as very similar to war, and they started doing that last November. So they will again, the moment the EU doesn't do exactly what Russia says.
We invested more in oil and gas than in renewables so I think you should blame oil and gas more than environmentalists
They are already running out of Kalibr and Iskander missiles. Why would they started using S300 in Groun 2 Ground role?

https://www.thedrive.com/the-war-zone/russia-now-firing-s-30...
> The RISC-V base is small. It contains just 47 instructions that everyone has to implement. This compares to 1,503 for an x86 and about 500 for Arm.

I don't think so? https://developer.arm.com/documentation/ddi0432/c/programmer...
Why does game dev take so long? I assume most of the physics, game dynamics etc are standardized. Artwork, building a story, designing the game etc sure require work per game. I ask as a noob, not expressing an opinion at all.
I'd use a 'if let' for something so short.
Thanks, but I'm from Finland and like the rest of Europe we had enough of Germany's bullshit.
Jack off, I'm afraid.
> worried that I'll be "ruined" forever.

You will be. And that's OK. It's a good thing: nothing else can compete with New York, so you're relieved of the pressure of equalling/one-upping it.

What do you do when you've summited the highest mountain? You take up scuba diving.
Orange DAO Selects Near Foundation as Web3 Startup Partner
Ah that makes sense wrt the story arc for cinderella. Thanks. I instinctively ignore everything that looks like a video when reading articles.
In the Objections section the author concedes that some API calls most commonly fail on logic errors, like creating a regex, and writing an error message for each of these would be unnecessarily verbose. Their counter to this argument is that there should be two versions of that function, one that panics automatically (and that you're going to use 95% of the time) and another that returns a Result (e.g. for user-supplied regex).

I get that argument, but imo that would be an even greater mess than having unwrap. It creates a burden for every library author to figure out how to handle errors, and to provide multiple options if necessary. The standard library goes this way sometimes, like with array access (foo[i] panics, foo.get(i) returns result) or println (println! panics, writeln! returns result). But the latter often catches people off guard because they don't expect it to panic. Propagating implicit panics to more places in the ecosystem in the name of getting rid of explicit panics with bad error messages (using unwrap) seems like a terrible tradeoff.
I don't think you will find a Windows laptop "better than an M1 Macbook". You'll have to rid yourself of that urge to compare them.

Just find the Windows laptop you can tolerate best. Or stick with the M1.
Wrong - Savings accounts, treasury bills, and CDs are all ways to invest dollars and make returns in kind.

The dollar itself though will not appreciate, it will continue to deflate due to unstoppable money printing.

Bitcoin doesn't have this problem, so you can hold it and long term there is a good chance it will appreciate. Again, the dollar has zero chance.
> also worth mentioning is that this is why people build projects like TinyGo and MicroPython – they love the language, but can't work with the trade-offs that the designers chose

It's not like small runtimes are fundamentally better in this regard. They work better for constrained environments, but they often make tradeoffs which are inappropriate for other use cases. It's hard to make a runtime that works for everything, and it's not necessarily even a worthwhile goal--you can use TinyGo when you're working in a constrained environment, use Go when you're not.
Same for me with the burping. I don't even know how to force one. Instead I just feel bloated and miserable for an hour or two, so it's an incentive to not eat much or drink anything carbonated.
Just to get ideas, what custom reports are users looking for that can not be built by Jira.
I am not convinced that propagation is massively superior to unwrap in example code. Unwraps are nice because they give you error messages with line numbers, but line numbers don't seem to come for free with propagation.

Consider this code[1]:

fn main() {
let _my_num: u32 = "not a number".parse().unwrap();
}

Running this gives a slightly noisy/verbose message, but to my eyes it's pretty useful:

thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: ParseIntError { kind: InvalidDigit }', src/main.rs:2:47

Compare this to similar code with propagation[2]:

fn main() -> Result<(), Box<dyn std::error::Error>> {
let _my_num: u32 = "not a number".parse()?;

Ok(())
}

Not only do I find the extra boilerplate distracting for this example code, but if I wanted to run this code in a playground, the error message seems worse as it omits the line number:

Error: ParseIntError { kind: InvalidDigit }

It's true that crates like anyhow[3] have robust support for producing backtraces (and I use them all the time in non-example code). But I'm not inclined to add an external crate to my examples just to avoid calling an unwrap().

[1] https://play.rust-lang.org/?version=stable&mode=debug&editio...
[2] https://play.rust-lang.org/?version=stable&mode=debug&editio...
[3] https://crates.io/crates/anyhow
I think, as a society, we're having trouble grappling with the implications of the hormonal changes that happen due to fat set points increasing over time. It seems to make it nearly impossible for some people to lose weight over a long run of time. Whatever they lose, their body will try very hard, apparently for the rest of their lives, to put it back on.

But what I think we're having trouble in understanding what this means is that it doesn't mean obesity as a social problem can't be solved. It might mean some amount of people who are already obese will never be able to sustainably change that fact, but it's not like people are being born with naturally higher fat set points. That is a hormonal change that happens when you become obese and stay that way for a long time. Interventions that focus on younger people who have not yet become obese can still work. But this is contrary and different to how the entire obesity industrial complex works. It is focused on treating overweight and obese people, not on preventing new people from ever getting that way in the first place. Even with children, we focus the interventions on trying to help fat kids lose weight. We should probably expect that to work at least a little bit better than trying to intervene in adults, but even better still is to work with the kids who aren't obese, which at an early enough age is all of them, and figure out how to keep them that way.
what? are you on the wrong thread?

RH publishes all their sources (including the MIT/BSD/etc ones that they don't have to publish). They're the very opposite of "closed source". I don't know of them suing anybody. And nobody is complaining about people using the code, or about the existence of Rocky or Alma or any other rebuild distros.
Of course, but I think this approach signals intent a bit more clearly: we want to get error handling out of the way and then just proceed with the happy path. It’s also a tad less verbose.
> don't like where this is going

I do. Worst case, we wind up with Russia under China’s thumb. Not ideal. But Pyongyang isn’t rolling tanks over its borders.

Best case: a disassembly of the Russian empire. Why Moscow tells Siberians and Tatars what to do is an anachronism, start to finish. It sort of made sense when the Kremlin had its head screwed on straight. Now, it doesn’t.
> the apartment buildings could also have a similar solution (their own solar panel/wind turbine/geothermal)

They can’t, though. Apartment buildings are too efficient at packing people together to have enough per capita roof square metrage for panels. Practical wind turbines are huge. A typical wind turbine blade is longer than the height of a 10 story building. Geothermal is also rather impractical as a source of energy, due to low thermal conductivity of the rock.

> In the end I see it as having multiple independent energy-generating clusters (each building, or each city, or each country) and sharing excess energy outside the cluster only when needed.

You are describing here exactly the current status quo. That how energy works right now.
Ugh.

The basic argument is something like "all functions should be total", but the problem is that proving that a function is total is really annoying, so we live with two other consequences instead:

1. Some functions are not total, and you just have to know the preconditions.

2. Some functions are total, but the type system is not powerful enough to prove this (possibly because they call functions in category #1).

The same discussion has been going on for decades in Haskell-land, and there's no definitive consensus, but my sense is that we'd rather tolerate a panic here and there rather than try and deal with the fuss of propagating errors or proving that our functions are total in the first place. For example, take a look at this function. I ask,

> Is this a reasonable way to write this?

struct IVec2(i32, i32);

impl IVec2 {
fn parse(d: [u8; 8]) -> Self {
Vec2(i32::from_le_bytes(d[0..4].try_into().unwrap()),
i32::from_le_bytes(d[4..8].try_into().unwrap()))
}
}

Someone from the Rust community will come in and say,

> Arguably, unwrap() is unreasonable.

...but why? The function is total. It won't panic. The response is,

> ... an error should be properly handled ...

There is no error, the code can't fail. I don't know of another way to write the function without a panic hidden somewhere, either in an unwrap() or inside an indexing operation. For some reason, some members of the Rust community think of this as a problem to be solved.

It's not a problem. The unwrap() method is just too damn useful. It's too damn useful to be able to write functions that are not total. I'd say that the key here is coming up with a sensible style for when you are okay with panicking in your code, and then accepting the consequences of that decision.

("Total" means that the function returns a result for all inputs. Unwrap is not total. In Haskell, "head" is not total--it returns the first element of a list, but throws an exception if the list is empty.)
If program/project managers having coding love/passion, a lots of innovation could come around Jira
Great call out. I was confused why Madden 2005 was being referenced but it makes more sense (note: madden 2005 launched in 2004)
Nevermind readable
People keep reinventing JSON trying to beat gzip, and it never beats the simplicity of gzipping JSON...
No. Absolutely not.

You can't understand anything Russia does until you understand that it has a bully's mindset. Anything you negotiate with them just emboldens them to do more to you later. When confronted, they escalate but there is a lot less muscle behind that than it seems.

Therefore any negotiation of the kind that you describe will embolden them to reach for more as soon as they think they can. Appeasing Russia will no more prevent further aggression than giving Czechoslovakia to Hitler avoided WW 2.

Also you completely misunderstand the war situation. The current phase has been a war of attrition with a slow retreat. The Ukrainian counteroffensive will come in August or September, once Russia's ability to wage war has been exhausted. From projects that I've seen, it is an even bet whether there will be a COMPLETE Russian collapse before the end of the year. (Yes, they won't even get to keep Crimea.)

If you want to understand the military situation in detail, I recommend https://www.understandingwar.org/publications. You don't have to follow it in detail. For example if you'd read https://www.understandingwar.org/backgrounder/russian-offens... a couple of months ago, you'd understand everything you need to understand to realize that Russia won't be able to hold the territory that they have taken.
Powerful insight! You are correct. I think the Open Web is in grave danger because in the future majority of the new data, information and content will be generated inside walled gardens like Facebook, Twitter, Instagram, Snapchat, WhatsApp, Reddit, Discord, LinkedIn, YouTube, TikTok etc. But I'm glad Google is at least trying to pierce into some of those but at what success and quality is questionable and yet to be seen. Btw these walled gardens are the real "Deep Web" and not some illegal and shady things that people think.

P.S.

>in the future majority of the new data, information and content will be generated inside walled gardens like Facebook, Twitter, Instagram, Snapchat, WhatsApp, Reddit, Discord, LinkedIn, YouTube, TikTok etc.

If not already.
I don't see anything explicitly calling out what to download in nonethewiser's link. How did you end up grabbing these things for offline learning?
given that even you, someone who has decided not to receive a vaccination, are thusfar unable to articulate any significant downsides, it is unlikely that the average person would believe there to be any
I'm not familiar with Rust, but it sounds like a similar story to `?`, `!`, `rethrows`, and `fatalError` in Swift. I.e.:

- Handle nil cases with ? or propagate errors with rethrows.

- If you really, seriously can't recover, use fatalError with a descriptive message.

- ! is strictly for non-production code. It is just a hyper-short way of fatally failing with no message. Yes, maybe you can use it if you just checked for nil, but almost always you can refactor that to omit the !. Because of its convenience, people tend to abuse it.
I've been looking for something like this for a long time. IS there a demo or screenshots to see what it looks like in use?
Except that it's not. The ruble is the best performing currency in 2022, inflation is not as bad as predicted, shelves in Russia are full and Russian state tax revenue is way up (they raised pensions and mimimum wage by 10%).

Sure, there is some pain - but there's this little thing called import substitution. The Chinese and Turks are happy to oblige (machines, vehicles). The sanctions are just making Russia more independent and resilient.

If anything, people have underestimated Russia in a big way. Well, those who weren't paying attention.
> I think he was good manager

Oh, probably that's why in Russia he's known as 'Undertaker of space industry'. It makes sense.
The whole point of exit is that there are too many people, such as yourself apparently, who consider their underdeveloped and underinformed notions of society to be universally applicable -- under force of law if necessary.

Put bluntly, I don't want a world where you can tell others whom they should value more than others. That strikes me as an incredibly arrogant proposition and I'm sorry if that hurts your feelings.
> I saw very few regime collapses unless an army steps into the capital. That's not going to happen to Russia (Mutual Assured Destruction.)

The reference to MAD makes sense only in the context of foreign armies (and with the M only those of major nuclear powers), but if you look at the two immediate predecessors of the modern Russian Federation (the USSR and the Russian Empire), both fell without a foreign army entering the capital, and are hardly unique in history in doing so. And to the extent status as a major nuclear power is relevant to that, the USSR had it just as much as the Russian Federation does.
TBF if the world is extremely scenic and not a micro-transaction cash grab the walking part could switch from bad to cool for me.
Couldn't German industry produce more of them? Heat pumps seems like a technology which isn't import dependent in the way that natural gas is, especially if the government were there to help with funding.
Germany sees peak exports during winter months. You have no idea what you are talking about.
Sanctions will be lifted or eased long before tech embargo hits.

Putin has too many points to cause pain for European politicians.

For example grain shortage caused by his naval operations will cause hunger in North Africa. Revolts and refugee influx to Europe will follow.

It’s enough for Europeans to put pressure on Ukraine to surrender. If it doesn’t they will spoon-feed it arms so it will surrender by fall.
I agree with you. My general rule of thumb is that I use `unwrap()` for cases where the panic should be unreachable, and is at least reasonably easy to prove it's unreachable.

Otherwise, `?` in 90% of code, with panics far up the stack, e.g. in `main()`
Or to take the shapes and generate stories that fit.

Visual character arcs, plotlines, mood, pacing, tension, etc.
This.

For those who haven't watched the video, his whole talk is tongue-in-cheek. The flavor of the talk is the same as the flavor of his writing; both worthwhile.