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

I don't believe you gained any performance by declaring them as integers. They were converted to floats for all calculations, then converted back when stored. I think the only advantage was reduced storage space.

In QBASIC, putting DEFINT A-Z at the beginning of your program did indeed speed it up. That's "DEFault variable type is INTeger (16-bit signed) for all variables with names beginning with A-Z".

Yep. QB veterans remember that you get significant performance gains by setting `DEFINT A-Z` so that variables without type suffixes auto-default to integers. Granted you could still do this by properly affixing a '%' but it was easy to forget.

In QBASIC, untyped variables default to single-precision floating-point values, so arithmetic operations use floating-point math. Assuming you can do everything with integer math, using `DEFINT` is a good way to make sure your calculations run entirely as integer math (very useful for things like basic arithmetic, indexes, loop counters, etc).

The QBASIC.EXE intrepreter doesn't even take advantage of a x87 floating-point coprocessor (even if the machine has one), making floating-point operations slower. I'm actually working on a pretty accurate QBasic virtual IDE, and ended up doing a pretty deep dive into this to ensure that its performance was on par with machines of the era.


I saw your reply was deleted, so I'm responding here just for future interesting info:

QuickBASIC 4.5 is not QBASIC. QB 4.5 will use a real x87 if it finds one.

On builds where DOSBox's FPU is only 64-bit (MSVC builds, ARM builds too), you'll get that drift you were describing describing. (X# 50, 49.99999999999)

I ran into the same thing when I was working on this a few months ago.

QBASIC.EXE is different. Its math is written as x87 code, but the linker swaps every FPU opcode for an INT 34h down to Microsoft's software emulator which is built into the interpreter.


It's tough. I'm very conservative in some ways, but hate to be associated with the nuts on the far right. I'm very liberal in some ways, but hate to be associated with the nuts on the far left.

By nature, I'm very sympathetic to the Libertarian party, but hate to be associated with the nuts making up a big chunk of them (maybe just a loud minority). By its nature, any 3rd party is going to be populated with lots of extremists, but geez. I'm in favor of drug legalization, for instance, but that issue is not my WHOLE LIFE and I don't mind going slowly.


It sounds like my own opinions are probably pretty close to yours. Yeah, I get it. The Libertarian tag line of “socially liberal, fiscally conservative” is probably as good a summary as any of my politics. And yet… it seems like I should have a lot to talk about with the LP, but I find that I really don’t.

Teachers can, in some areas. One of my son's teachers in high school got into a legal dispute with the school administration about concealed carry. The end result was that she got to bring her gun with her every day into classroom.

In this case, she wanted the gun because of a restraining order and a potentially violent ex-husband, who coincidentally lived in the same apartment complex as my son and I. But I certainly didn't feel any less safe sending my son to school.


"Young, warm, wet Venus" was one common trope that was thought to be likely at one time.

The solar system was thought to have formed from the outside in. Mars is older, drier, colder, deader, with an attenuated atmosphere... Earth is in the sweet spot... Venus is younger, wetter, and too much atmosphere...

Makes sense that old lost civilizations would be on Mars, and dinosaurs and cavepeople on Venus.


So a letter "D" is an extreme rounded rectangle with different radii on the left and right side? That makes some sense.

"Masculine hubris." I don't know Huang and I have no idea if he possesses that or not. However, I suspect that if he does, it's a part of why he was successful.

My problem is with the simplistic perception of “success”. It isn’t once and done.

He succeeded in growing a company into a global behemoth.

He succeeded in amassing great wealth.

He succeeded in destroying his marriage.

He succeeded in getting himself fired.

He succeeded in creating a significant leadership void and much uncertainty at his company.

Some of these successes are not like the others. People and situations are complex, and things that may be positive attributes in one sense may result in failures in another.


And CEOs, politicians, etc.

If I found two CEOs in my kitchen, I probably wouldn't be suspicious that there was a third hiding somewhere.

Don't live in Silicon Valley though.


Live in Silicon Valley. If I found two CEOs in my kitchen I would definitely be suspicious that there's a third hiding somewhere.

Can't confirm; replaced all my CEOs with AI

Lucky you. Probably better overall.

That is a big deal.

https://fred.stlouisfed.org/series/CIVPART

Peaked in 2000 at 67.3%. It's now around 61.8%. That's over an 8% decrease. Hadn't realized it was that significant.

I recommend everybody spend some time poking around FRED occasionally. It's a good reality check.


Heavy metal music. Television. Comic books. It's amazing children have lived through a century or two of new products that are so clearly out to destroy them.

Remember when shoes were invented? Our kids have such weak feet now. Truly technology is destroying their soles.


Did Hideo Kojima code a single line of Death Stranding? I don't know, but I wouldn't be surprised if he didn't. Yet it is still clearly his artistic creation.

Is there a reason that creating a game with AI can't parallel that process?


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

Search: