AernaLingus
I'll preface this by saying I'm working my way through the Rust book, too--just a bit further along--so don't take my word as gospel.
This exact scenario is what the ?
operator was designed for: returning early with the Err
if one is received^[There's also some type coercion, but that's beyond the scope of your question], otherwise unpacking the Ok
. As you've discovered, it's a common pattern, so using the ?
operator greatly cuts down on the boilerplate code. If you wanted to do the equivalent of you have here (panicking instead of returning the Err
for it to potentially be handled in calling code, albeit without your custom panic messages^[edit: you can use expect
to get the custom messages as covered in another comment--not sure how I forgot that]) you could achieve this with unwrap()
instead of ?
:
let html_content_text = reqwest::blocking::get(&permalink).unwrap().text().unwrap();
Both of these will be covered in chapter 9.
If you want to avoid those constructs until later, the only thing I'd say is that some of the intermediate variables seem unnecessary since you can match on the function call directly:
fn get_document(permalink: String) -> Html {
let html_content = match reqwest::blocking::get(&permalink) {
Ok(response) => response,
Err(error) => panic!("There was an error making the request: {:?}", error),
};
let html_content_text = match html_content.text() {
Ok(text) => text,
Err(error) =>
panic!(
"There was an error getting the html text from the content of response: :{:?}",
error
),
};
let document = Html::parse_document(&html_content_text);
document
}
You could also eliminate the final let
statement and just stick the parse_document
call at the end, but that's a matter of preference--I know having an intermediate variable before a return can sometimes make debugging easier.
As for whether you should build something now or wait till you learn more--go with your gut! The most important thing is that you stay actively engaged with the material, and many people find diving into projects as soon as possible helps them learn and stay motivated. You could also use rustlings and/or Rust by Example as you go through the book, which is what I've been doing (specifically rustlings). It's not as stimulating as writing a project from scratch, but it does let you write some relevant code. And if you're not already, I highly recommend using the Brown version of the Rust Book which includes interactive quizzes sprinkled throughout. I've found them particularly helpful for understanding the quirks of the borrow checker, which is a topic it continues to revist throughout the book.
...is that the Skyrim UI font?
I just use a fuck-off massive case
LET'S GOOOOOOOOO
The fact that they beat the US in the semis and then Japan in the finals is just
One thing I'm confused about is why even the Japanese article referenced is just speculating, albeit in a more reasoned fashion--they use the fact that it's a joint lawsuit from Nintendo and The Pokémon Company to narrow their focus to jointly-held patents in a relevant time range. I did a bit of Googling and one result said that you can only request court records if you know the case number, which is pretty wack if that's the case. Like, PACER sucks and all (always check RECAP first and use their extension to upload documents for everyone!) but I've been following a random-ass civil court case in the US for about a year now and that's shit is all online. Seems wild to me that even an intrepid reporter who marched on down to the courthouse wouldn't be able to get their hands on the complaint. Big cases like this have ramifications far beyond the involved parties, so it's important for the public to be able to see the arguments being made in detail.
DeepL translation of Japanese article
Nintendo and Pokémon Inc. filed a lawsuit against Pocket Pair, developer of Palworld, for patent infringement (Nintendo press release). As you know, there was some opinion that the modeling of the monsters in Palworld was similar to that of Pokemon, but it was difficult to question copyright infringement (they were close, but just barely avoided it). So Nintendo exercised its rights not by copyright but by patent right. An injunction and damages are being sought.
Palworld is not free to play, so I guess from the introduction videos on YouTube, etc., but aside from the monster sculpting, the game system does not seem to be that similar to Pokemon, and it seems to be an open-world game similar to Ark, etc. If there are similarities, it seems to be Balls. If there is a similarity, it is in the part where you capture monsters by throwing a ball-like object at them. If there is any similarity, it is the part where you throw a ball-like object at the monster to capture it.
Since Pokémon and Nintendo are jointly suing, we can naturally narrow the number of patents down to 28 if we assume that the patents are also jointly filed by the two companies. Of those 28, four were filed as divisional applications after PAL World went into service (January 19, 2024).
The one with the most recent filing date is patent 7545191. It was filed on July 30 of this year, requested for examination on August 6, requested for accelerated examination, and was already granted a patent on August 22. It is believed that the Super Accelerated Examination system was used.
The following patents follow: Patent No. 7528390 (filed on March 5 and registered on July 26), Patent No. 7493117 (filed on February 26 and registered on May 30), and Patent No. 7505854 (filed on February 6 and registered on June 17). All have requested accelerated examination (possibly super accelerated examination).
All are divisional applications of the December 22, 2021 application, so the effective filing date is December 22, 2021, and they are enforceable against Palworld, which entered service on January 19, 2024. It is believed that the scope of rights of the divisional application of the existing patent was amended to "pull in" the composition of the allegedly infringing property for use in litigation, a technique commonly referred to as "fitting in" (we wrote an explanatory article on this in the case of Konami's lawsuit against Cygames "Uma Musume"). In terms of timing, it seems natural to assume that the lawsuit was filed pending the grant of these patents.
Let's take a look at the contents of Patent No. 7493117, which is easy to understand and seems to have a broad scope of rights among these patents. Claim 1 reads as follows
Claim 1.
To a computer of an information processing apparatus,
In a first mode,
determine a aiming direction in the virtual space based on a first operation input, which is a directional input; and
When a second operation input is made, having the aiming direction be directed toward a field character positioned on a field in the virtual space, and having the first indicator displayed,
In accordance with the third operation input, the player character is made to perform a movement of releasing a capture item for capturing the field character in the aiming direction,
When the capturing item hits the field character, the player character is made to make a determination as to whether the capture is successful or not,
If the capture success judgment is positive, the player character is set to own the field character that was hit by the captured item,
The first indicator is information indicating how easy it is to make a positive judgment of the capture success judgment.
In the end, what it is saying is that a ball (capture item) is thrown at a monster (field character), a successful capture decision is made, and if the capture is successful, the monster can be set to be owned, in which case the ease of successful capture is indicated by some indicator (not a number, but a color or design is also acceptable, according to the specification). This is all. If you want to make a Pokémon-like game, it may be difficult to avoid it, and if you are not aware of it, it may conflict with it. I feel that this is a killer patent. Other patents will be explained later.
Of course, there is no proof that these patents are used, and there is a possibility that other patents are used as well. It is also possible that Nintendo or Pokémon is filing another lawsuit using patents of which it is the sole owner. Nintendo is also known for its incredibly powerful patents, such as the patent used in the lawsuit against Coroplast (see related article), which restricts users to play games only with mutually registered users in communication games.
As was said during the lawsuit against Coroplast, it seems that Nintendo's corporate policy is that even though they have a super-powerful patent portfolio, they do not actively enforce their rights themselves, but only fight thoroughly when their IP is about to be eroded.
Beat me to it.
Israel does not control the US the US controls Israel.
May 4 fell on a Thursday most recently in 2023, 2017, and 2006. That build screams 2006, but both the Core 2 Duo and the x1950 Pro wouldn't be out until later that year, and there wouldn't actually be a Core 2 Duo with those specs until 2008 (the E8500 with 3.2 GHz--as far as I can tell there was never a Core 2 Duo with a precisely 3.2 GHz base clock). So this would have been a build that was quite long in the tooth when this was made (assuming it was made through texting a buddy and not a janky meme generator).
Since the archive link didn't help in getting the full article:
Full text
In the golden years of Japan’s economic boom, its men would venture to foreign shores, seeking the thrill of illicit encounters offered by women from poorer nations. But today, the tables have turned, with foreign men now flocking to Tokyo for “sex tourism” as the yen weakens and poverty rises.Yoshihide Tanaka, secretary general of the Liaison Council Protecting Youths (Seiboren), painted a grim picture of the current landscape.
“Japan has become a poor country,” he told This Week in Asia at the organisation’s offices. Nearby, in a park that’s become synonymous with the city’s sex trade, young women wait for customers before the sun has even set.
Tanaka’s organisation noticed an increasing number of foreigners frequenting the park as soon as pandemic-era travel restrictions were dropped.
“But now we are seeing a lot more foreign men,” he said. “They come from many countries. They are white, Asian, black – but the majority are Chinese.”
This influx has coincided with a troubling rise in teenagers and women in their early twenties turning to the sex industry to survive, Tanaka said, alongside an alarming increase in violence.
“It’s getting worse. Much worse,” he said, shaking his head. “There are more kids here and more violence, but our organisation cannot do anything more than we are already doing.”
Tanaka’s frustration is palpable as he reflects on his decade-long struggle to support the young Japanese women who wash up in Tokyo’s notorious Kabukicho district – a maze of bars, love hotels, and host clubs where the vulnerable are often preyed upon.
Among them is Rua*, a 19-year-old who felt out of place in her high school in neighbouring Kanagawa prefecture. Arriving in Kabukicho in February with hopes of finding a cafe job, she quickly found herself overwhelmed by expenses.
“I owed a lot of money to a host, so from April I went to the park,” she said, using a euphemism for standing on the narrow streets around Okubo Park, waiting to be approached by a potential customer.
“I needed to pay off my debts and wanted to buy nice things, like clothes,” said Rua, her youthful features accentuated by a chic bob and a flair for “Gothic Lolita” fashion.
To finance her visits to her favourite host at a local club every few days, she has also dabbled in what’s known as papa katsu – finding sugar daddies to help cover her expenses.
She speaks of her work with startling nonchalance, detailing prices for an hour in a love hotel – between 15,000 yen and 30,000 yen (US$100-US$200) – like menu items. On slow days, she will meet around five men; on weekends, that number can double. Rua recently had her second abortion, a grim reality of her lifestyle.
“There are all different types of men who come to the park, but I would say that about half are foreigners,” she said. “I’ve talked to girls who have been here longer and they say that is different, that it used to be mainly Japanese men, but this place has become famous.”
Rua mentions “one English man” who is a regular customer, as well as others from Taiwan, mainland China and Hong Kong. “I’m popular because of the way I look so I am always busy,” she said.
But the risks are ever-present. “One of my friends was attacked by a Chinese man on the street a few weeks ago,” Rua said, her voice steady but laced with fear. “They were talking about the price and he suddenly got angry and hit and kicked her. She hit her head on something and had a bad injury. It happens quite often, but I have been lucky so far.”
Tanaka corroborated Rua’s experience. When she called him after her friend was assaulted, he rushed to help, taking the injured woman to the hospital. He said she was angry and wanted to file an official police complaint.
But when it came time to confront her attacker, the police were far more interested in labelling her a prostitute than pursuing justice for her assault. Faced with the reality that reporting the crime could lead to her own arrest, she withdrew her complaint.
“That is always what happens,” Tanaka said, his frustration evident. “The girls are assaulted because the customers know they will not go to the police … The men know this. They think they can do anything.”
Tanaka remains cautiously optimistic about Rua’s future, though he is acutely aware of the toll that her work will take on her mental and physical health – he has seen it countless times before. Few who frequent Okubo Park emerge from the experience unscathed.
As local police and government authorities turn a blind eye, Tanaka fears the spiral of young lives caught in a web of desperation and exploitation will only worsen, while the world watches in silence.
“I think someone is going to get killed, sooner or later,” he said. “It’s inevitable. Right now, no one cares about these girls. One of them being killed by a customer might get their attention briefly, but I expect they will soon forget again.”
*Name changed to protect interviewee’s identity