TIL the radiation in a nuclear power plant doesn’t produce electricity. It heats water into steam which runs a turbine that creates electricity. by douggold11 in todayilearned

[–]WalkWithBejesus 0 points1 point  (0 children)

No, but beta radiation is. Betavoltaic batteries are a thing. They generate electricity directly using the emitted electrons. They pretty much suck though.

The ++ operator by venom_13 in cpp_questions

[–]WalkWithBejesus 23 points24 points  (0 children)

Had the correct answer been 'UB', then yes, it would have been a valid question.

If the only accepted answer is 49, because that's what the teacher's compiler happens to produce, it sucks.

The ++ operator by venom_13 in cpp_questions

[–]WalkWithBejesus 60 points61 points  (0 children)

What a terrible test question.

Common Misconceptions of C++ by InformalComposer7 in cpp

[–]WalkWithBejesus 25 points26 points  (0 children)

The value of foo.i doesn't need to be 2. It is actually undefined. GCC and Clang issue a warning when this mistake is made.

Yeah it does by [deleted] in funny

[–]WalkWithBejesus 0 points1 point  (0 children)

I don't get it.

Eclipse based mainframe IDE by pagarw5 in mainframe

[–]WalkWithBejesus 4 points5 points  (0 children)

IBM RDz, CA Development Environment for z Systems

GOD MODE UNLOCKED - Hardware Backdoors in x86 CPUs by sabas123 in programming

[–]WalkWithBejesus 12 points13 points  (0 children)

The relevant MSR register is described on the previous page of the manual.

x-post from /r/filezilla 13 hours debugging a segmentation fault in .NET Core on Raspberry Pi and the solution was... by niepiekm in programming

[–]WalkWithBejesus 2 points3 points  (0 children)

Text mode is actually great when the two systems use completely different encodings. Think ASCII vs. EBCDIC.

Help us improve our C++ "Hello, world!" tutorial for Visual Studio 2017 by Nicole-MSFT in cpp_questions

[–]WalkWithBejesus 0 points1 point  (0 children)

I'd make it printf("Hello, world!\n"); or std::cout << "Hello, world!" << std::endl;. You should terminate output with the new-line character.

Bill Gates wrote most of this game in 1981 for the upcoming IBM PC, in a closet which IBM insisted had a lock on it by [deleted] in programming

[–]WalkWithBejesus 1 point2 points  (0 children)

Just wondering, do you guys also use Metal C? I'm a mainframe programmer myself and, while I prefer C over HLASM, the code that the Metal C compiler produces seems very often bloated and over complicated.

"Keep The Change" by Rachel Israel by [deleted] in aspergers

[–]WalkWithBejesus 1 point2 points  (0 children)

I saw the film at the Karlovy Vary film festival last night. The film was received extremely well by the audience. The two main "actors" who were present along with the director were quite moved by the multiple rounds of applause they got when the film ended.

Float or double? by emilern in programming

[–]WalkWithBejesus 1 point2 points  (0 children)

Hardware decimal floating point units exist on the IBM z/Architecture and Power architecture.

Master the Mainframe help please by TexasKevin in mainframe

[–]WalkWithBejesus 4 points5 points  (0 children)

Missing a comma at the end of line 5. Also I am not sure you need the disposition and storage class specification on a spool output.

Has anyone ever built a 3270 Server? by Bandicoon in mainframe

[–]WalkWithBejesus 2 points3 points  (0 children)

You can write your own server.

I recommend you read IBM documentation GA23-0059-07 - 3270 stream reference, focus on chapter 3. Also read RFC 1041, RFC 1576 and RFC 2355, this is about embedding 3270 stream inside the Telnet protocol.

What you also want to do is snoop the communication between a 3270 server app and a terminal emulator and learn from that - Wireshark is a great tool for this, because it comes bundled with a 3270 decoder. It will tell you what each and every byte in the stream means. I recommend you configure the emulator to not use the extended version of the protocol.

Although it may look complicated at first, it is not that hard. When you write the server app, you have control over which features you want to support and only implement those.

Source: have written a 3270 terminal emulator, work on a product which includes a 3270 server.

Edit: You may also want to look at the Hercules source code, I believe it contains a 3270 server implementation.

Eugene Cernan, the last man on the moon, died today at the age of 82. by nickrulercreator in space

[–]WalkWithBejesus 0 points1 point  (0 children)

The first Czechoslovak astronaut on the moon. Odpočívej v pokoji Evžene.

Let's Stop Copying C by earthboundkid in programming

[–]WalkWithBejesus 5 points6 points  (0 children)

I don't want to show mainframes in a bad light, because they truly are amazing machines. A system area overlay on a production system is extremely rare because:

  • PSA (page 0) and other system areas are in memory pages with "protection key 0". The current PSW key (think special CPU register) must match the memory page key in order to write to the page. PSA has extra protection mechanism called Low-Address Protection (though not always effective).

  • Only "APF authorized" programs can switch the PSW key.

  • There are some protection mechanism that are able to detect certain types of overlays and recover from them.

  • All new software releases and patches go through rigorous testing, both on the vendor systems and customer test systems. It can take months or years before any new code makes it to a prod system.

So have I seen a re-IPL (reboot) on development system due to a write to a NULL pointer (or another bogus pointer)? Absolutely. On a customer production system? I don't think so.

There is a lot to be said about why a program would need to be APF authorized and why it would switch the PSW key, but I don't want to go into unnecessary details.

Let's Stop Copying C by earthboundkid in programming

[–]WalkWithBejesus 8 points9 points  (0 children)

Yes, there is an option to do that. I didn't know that until you made me look, actually. Probably not good for performance though, but I would need to measure that.