Hacker Newsnew | past | comments | ask | show | jobs | submit | jcfields's commentslogin

Next week: making a tic-tac-toe game look decent using JavaScript.


The main mistake with the Sega CD was adding a bunch of expensive new hardware to it. It gave the Genesis a second, faster Motorola 68k and a special ASIC to handle sprite scaling and rotation effects (to compete with the SNES), but these inclusions effectively doubled the price of the add-on and were seldom used by developers. The Turbo-Grafx CD, on the other hand, just added a CD-ROM drive to the Turbo and cost half as much. The Turbo CD was also much more necessary since the console used HuCards that were much more limited in space than the cartridge ROMs used by the Genesis.

That said, the Sega CD was reasonably successful for what it was, and I don't think it contributed much to Sega's downfall (if anything, it helped Sega foster an impression with customers of being on the cutting edge of things back then). Far more egregious were the 32X, since it confused customers about the company's direction after the Genesis and was abandoned so quickly, and the Saturn's architecture being so much more expensive and complicated than the PlayStation, especially for 3D games. The cost let Sony undercut them because they knew Sega couldn't match them without losing money on each console, and the complexity was such a hurdle that even Sega's first-party developers had trouble figuring it out (they had to release "do-over" ports of Virtua Fighter and Daytona USA because the first versions were so rushed and buggy). Sega of America also pulled the plug on the Saturn way too early (because of Bernie Stolar's infamous interview where he said the console wasn't the company's future, which caused third parties to immediately cancel their releases for it), which left the company with basically no presence in their biggest market for about two years.


It didn’t help that Sega America and Sega Japan were in constant disagreement, fracturing the company and confusing consumers.


I made a few simple Mac apps in Objective-C during the pandemic in 2020, and I was struck by how hard it was to find tutorials and examples on how to do anything in Objective-C. It's possible I was looking in all the wrong places, but it seems like everyone assumes you're using Swift at this point. I would advise against learning Mac development with Objective-C except to people who have a specific interest in it or need for it. I also think most people accustomed to newer programming languages would probably find it arcane in some areas and tedious in many others (although I personally like it for what it is and don't regret the time I spent with it, I definitely felt like I was making things harder on myself by using it).


There are three reasons for using Objective-C:

- Performance: Sometimes the automatic conversion between Objective C and Swift types causes performance issues. Using Objective-C for some hot paths can be a lot faster. Sometimes just using NSString instead of String in Swift can also do the trick.

- Legacy code: For most projects, there is no point in converting 100s of legacy Objective C classes to Swift. Just leave the old parts in Objective C, and call them from Swift. Rewriting just risks breaking stuff.

- Interface with C/C++ code. Swift has some nice bridging that make calling C code easy (such as automatic conversion of swift strings), but some APIs like socket() are close to unusable in Swift, because they require complicated casts that are impossible to understand. Easier to write those parts in Objective C.


What’s so hard to understand about Edge pretending to be Chrome pretending to be Safari, using Blink pretending to be WebKit pretending to be KHTML pretending to be Gecko, all pretending to be Netscape Navigator? I’m the dude playing the dude disguised as another dude.


The article quotes a Stack Overflow post with the conditions under which V8 will optimize the switch statement:

> @LGB actually in V8 (JS engine used by google chrome) you need to jump through a lot of hoops to get switch case optimized: All the cases must be of same type. All the cases must either be string literals or 31-bit signed integer literals. And there must be less than 128 cases. And even after all those hoops, all you get is what you would have gotten with if-elses anyway (I.E. no jump tables or sth like that). True story.

In the case of this emulator, it wasn’t being optimized because it had more than 128 cases.


> In the case of this emulator, it wasn’t being optimized because it had more than 128 cases.

Now that makes sense. Thank you.


There’s a Japan-only game for the Sega Game Gear called Kinetic Connection that plays similarly but involves rearranging a scrambled picture rather than moving colored blocks into a pattern.

https://segaretro.org/Kinetic_Connection

“Game 3” is the mode that rotates rows and columns like a Rubik’s Cube.

There are probably earlier examples, but that’s the one that I’m familiar with. I imagine a clever person could adapt it into a simple word game as well. Old computer and console games are a gold mine for ideas for simple puzzle games.


You can we we advocate for this position in a less snobbish way. It’s times like this I feel like a real idiot for expecting more from this site than the average Reddit trainwreck comment thread.

Guess what, you’re not that much better than everyone who disagrees with you.


"And yet death is the destination we all share. No one has ever escaped it. And that is as it should be, because death is very likely the single best invention of life. It is life's change agent. It clears out the old to make way for the new. Right now the new is you, but someday not too long from now, you will gradually become the old and be cleared away."


This sounds like a desperate attempt to cope with death. We can find better ways to encourage change than literally dying.

If people lived indefinitely but society was a bit stagnant, and you pressed a button to kill 100M random people a year to "encourage change", you'd be regarded as insane, and rightfully so.

Death is not the solution to our problems, just like throwing your computer in the trash isn't a solution to a crashing program.


Death is the only working solution we've got.

Once you've solved the other problems, you can work on death


My example

> If people lived indefinitely but society was a bit stagnant, and you pressed a button to kill 100M random people a year to "encourage change", you'd be regarded as insane, and rightfully so.

highlights that it's baseless to put off solving death or even using it as a solution.


The YouTube channel 3Blue1Brown has an "Essence of Linear Algebra" series that I found helpful (along with an Essence of Calculus series and videos on other tricky subjects such as differential equations and Fourier transforms). I found that the visual approach of the videos helped make the concepts more intuitive.


I have a script that changes the Terminal to the directory of the frontmost Finder window. Then I use touch to create empty new files.

The script, for whoever's curious: https://gitlab.com/jcfields/shell-scripts/-/blob/master/cdf

Back when I used Windows, I actually used the New > Text Document item discussed in the article all the time. It created an empty, 0-byte file, so I'd rename it to whatever file extension I needed. There was a folder that contained the templates for this menu so you could add or remove blank files for any type, but I only ever used the .txt file one.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: