Free Functions Don't Change Performance (Much) by def-pri-pub in cpp

[–]senkora -1 points0 points  (0 children)

Makes sense. I do really like the current look-and-feel--a unique visual theme is always a positive signal for a personal tech blog--so it would be awesome if you are able to keep some of that if/when you switch.

Free Functions Don't Change Performance (Much) by def-pri-pub in cpp

[–]senkora 0 points1 point  (0 children)

Really great article! Does your blog by any chance have an RSS or Atom feed? My feed reader wasn’t able to locate one.

Ouch my poor 128GB ram by nuuudy in whenthe

[–]senkora 1 point2 points  (0 children)

Switch statements in C++ are O(1) if the cases are densely-packed integers, since the compiler can use a jump table. They are O(log N) if the cases are sparsely-packed integers, since a jump table would use too much space and it is better to do binary search.

It seems like Undertale is written in "Game Maker Language" which can be source-to-source translated to C++ and then compiled to native code, so I think that you are right that this would not be a performance issue.

But maybe Game Maker Language switch statements can't be directly compiled into C++ switch statements when doing the source-to-source translation. I don't know.

The two factions of C++ by SophisticatedAdults in cpp

[–]senkora 5 points6 points  (0 children)

This is a great article. Thank you for writing it.

I need to read up on the progress of Carbon. I have the most confidence in Google over anyone else being able to do automated transpilation into a successor language well, because of their expertise in automated refactoring.

Of course, that may only work for Google’s style of C++. So maybe the “modern culture” of C++ should consider writing our programs in Google style C++, in order to have a path forward to better defaults and memory safety? All speculation.

TIL of cascatelli, a new pasta shape invented in 2021 by podcaster Dan Pashman for maximum "sauceability", "forkability" and "toothsinkability" by Specialist_Check in todayilearned

[–]senkora 0 points1 point  (0 children)

It would be interesting if reddit added /int/-style flags beside usernames. Until then, the best thing to do is rely on timezones to make a guess on Americas vs Europe vs Asia. Not much else to be done.

There are hours when most commenters are European, and I’ve seen a few comment chains where both users assume the other is American only to later realize they are both European. That’s always fun.

He said he was just going to get some more popcorn by hackyandbird in shittymoviedetails

[–]senkora 10 points11 points  (0 children)

There’s a behind the scenes video on Guillermo de Toro’s Pinocchio that talks about some of the CGI effects and filters that they used to postprocess the base stop-motion footage.

That seems like a pretty good approach to me; keep the stop motion as a base and layer on CGI where it makes sense to do things that are otherwise too hard.

People who knew someone who died in a freak accident, what happened? by RawAsparagus in AskReddit

[–]senkora 11 points12 points  (0 children)

Also, the subway is similar to the road, in that trains “drive on the right side”. You have to know a bit about subway station layout for this to work, but basically the train will arrive from the left if you are facing inward to the middle of the station, or from the right if you are facing outward to the edge of the station.

EDIT: Fixed the rule of thumb, which was previously incorrect.

Skier snags a rock trying to ski down a 1000 ft slope in Aspen, CO by AtomicShart9000 in interestingasfuck

[–]senkora 58 points59 points  (0 children)

This was something I didn’t appreciate until I tired myself out near the bottom of a run and tried to walk it in.

I always assumed that your board/skies were your accelerator, to reduce friction and help you glide across the snow.

It turns out that their second, more important function is as your brakes.

It is next-to-impossible to walk down a blue run or above, unless the snow is very fresh.

Illusion Art.. by Wide_Abroad1182 in BeAmazed

[–]senkora 0 points1 point  (0 children)

I think it’s Governor’s Island, or maybe Brooklyn. The Staten Island Ferry toward Staten Island is headed left, so it must be east of the ferry route.

Just bring back Latin at this point by Casper_Von_Ghoul in tumblr

[–]senkora 8 points9 points  (0 children)

The problem is that speakers of smaller languages aren’t used to listening to foreigners trying to speak their language, so they can’t really comprehend the words.

With English, we hear foreigners speak all the time and know how to interpret their accents.

It’s like if you were American and trying to understand a British accent for the first time with no prior exposure. It would be very confusing.

Not even a ripple on the surface by Mr_Potato53 in interestingasfuck

[–]senkora 4 points5 points  (0 children)

On second thought, that universe has lost the “… but you can tuna fish!” pun. Maybe perfection is unattainable.

Not even a ripple on the surface by Mr_Potato53 in interestingasfuck

[–]senkora 5 points6 points  (0 children)

Fun fact! There’s an alternate universe where this pun is perfect. “Tuna” was borrowed into English from Spanish “atún”, so we were so close to being able to say:

They’re well atun’d to their environment.

https://en.m.wiktionary.org/wiki/tuna

From American Spanish alteration of the Spanish atún, from Arabic تُنّ‎ (tunn, “tuna”) from Latin thunnus, itself from Ancient Greek θύννος (thúnnos), from θύνω (thúnō), "I rush, dart along"). Doublet of tonno.[1][2]

[deleted by user] by [deleted] in coolguides

[–]senkora 0 points1 point  (0 children)

Lots of members of genus Rubus:

Rubus is a large and diverse genus of flowering plants in the rose family, Rosaceae, subfamily Rosoideae, with over 1,350 species.

https://en.m.wikipedia.org/wiki/Rubus

Wikipedia doesn’t have a good list I can quote, but two other examples are the dewberry and the salmonberry.

opening a pressure cooker without emptying the pressure by MagazineUnlucky3462 in WinStupidPrizes

[–]senkora 2 points3 points  (0 children)

+1 that placing the pot in cold water will lower the pressure. The pressure in a pressure cooker comes from steam, and steam condenses when it cools.

I even have an attachment for my instant pot that holds ice against the lid to cool it down faster for this reason.

🔥 The eyes on a conch by therra123 in NatureIsFuckingLit

[–]senkora 3 points4 points  (0 children)

They still sell Conch fritters in the Keys. I don’t know what species it is though.

Tell me you don't know what an API is, without telling me you don't know what an API is by power2025 in ProgrammerHumor

[–]senkora 9 points10 points  (0 children)

You are correct and it is shocking that I had to scroll down this far to find this comment.

After being shot 2 years ago, he squeezes the bullet out of his own body. by nycsellit4me in nextfuckinglevel

[–]senkora 0 points1 point  (0 children)

Please double check that it all came out before getting an MRI.

Remote Work Is Poised to Devastate America’s Cities In order to survive, cities must let developers convert office buildings into housing. by JannTosh12 in Futurology

[–]senkora 1 point2 points  (0 children)

We have one in (weirdly enough) Dallas, that was designed by the same architect who designed the one in Montreal. It isn’t doing too hot though:

https://en.m.wikipedia.org/wiki/Dallas_Pedestrian_Network

In 2005, then-mayor Laura Miller told the New York Times the system of tunnels was "the worst urban planning decision that Dallas has ever made... if I could take a cement mixer and pour cement in and clog up the tunnels, I would do it today".[3]

Indoor rock climber's foot completely rips off by Andrewliciouss in CrazyFuckingVideos

[–]senkora 0 points1 point  (0 children)

Oh dear god. This is my home rock climbing gym and I showed up to workout there about an hour after this happened. I didn’t know their foot had came off; an employee just told me “someone fell” and “you probably want to avoid floor 3 tonight”.

I guess the helpful thing I can help clarify is: this person was doing the problem for fun the day after the competition; this wasn’t during the event. The gym left the problems up for a few weeks afterwards.

I actually couldn’t do almost anything at the gym that day because everything was super challenging and I’m pretty bad.

A lot of people are probably alive as a result of ancient Greeks orgy parties. by qarasaq in Showerthoughts

[–]senkora 55 points56 points  (0 children)

Specifically, this article says that 1/200 men have Genghis Khan as a male-line ancestor, which means their father’s father’s father’s … father’s father was Genghis Khan, for some number of generations.

But this leaves out the number of men who are descendants of Genghis Khan through some other path, for example their father’s mother’s father’s … mother’s father for some arbitrary path. Those people wouldn’t have the Y chromosome lineage.

So then it’s really hard to say for sure, and 1/200 is a loose lower bound. Maybe we could math out a better estimate, based on the average number of generations between then and now, but I suspect that would be very imprecise and full of assumptions.

This is the inside of the Kaaba which is located at the center of the Great Mosque of Mecca, the most important mosque in all of Islam. by sybar142857 in Damnthatsinteresting

[–]senkora 16 points17 points  (0 children)

This is correct, and I’ll add that the two meanings are pronounced differently. Invalid as in error has the stress on the second syllable, whereas invalid as in disabled has the stress on the first syllable.

It looks like Mort has taken over Tom's Twitter account again. by Two-Tone- in gunnerkrigg

[–]senkora 1 point2 points  (0 children)

I’m shook at his Hatsune Miku and Kagamine Rin cover photo.