There doesn't seem to be a standard meta post for assuming architecture or hardware, recently while writing an answer for This Challenge I ran into an issue with the mode windows utility.

By default mode will output information on any COM ports on the system as well as the current CLI, in the above situation only the information for the cli was required, and it was a penalty of 4 bytes (using mode con instead of mode) to ensure consistent output on systems which have multiple com ports.

in this situation is it correct to assume that since a "plain" system or VM with only basic hardware and software can run this correctly, that omitting the four bytes is correct? is there a cutoff point for things we're able to assume about the environment?

  • 7
    \$\begingroup\$ I agree that there needs to be a cutoff point. Otherwise, languages could be created that change how every command is interpreted based on hardware available. This should be a loophole, imho. Golfing the code is more important than golfing a language. \$\endgroup\$
    – mbomb007
    May 3, 2017 at 15:58
  • \$\begingroup\$ For me one reasonable hardware it is a Pentium x32 bit cpu with 2 Gb of ram and disk of 500Gb no Internet connection; all above of that it is for me one mainframe or supercomputer or one AI, perhaps it comprehend this cellphone... \$\endgroup\$
    – user58988
    May 4, 2017 at 12:25

3 Answers 3


Any hardware setup may be assumed or required, within reason

Assuming that the computer has a graphics card is reasonable. Assuming that it has 2 SLI'd GTX Titans is not[1]. Requiring that only one COM port is connected is reasonable. Requiring that the computer has 1 PB of RAM is not.

There isn't a hard-and-fast rule for what constitutes "reasonable" on purpose - what may be infeasible or prohibitively expensive now could very easily be standard in 10 years.

Additionally, taking advantage of this rule with a language that acts differently for the same code depending on the hardware configuration (e.g. outputting Hello, World! if the CPU has 2 or fewer cores, and performing a primality test if the CPU has more than 2 cores) should be considered loophole abuse.

[1]: also your computer would catch on fire

  • \$\begingroup\$ So do you mean to say that one may submit answers that only work on precise set of hardware, as long as that setup is "normal" at the time of posting? \$\endgroup\$
    – Adám
    May 3, 2017 at 20:15
  • 1
    \$\begingroup\$ @Adám Correct. It's really not any different than requiring a specific library or OS, except that hardware can't be downloaded or virtualized as easily. \$\endgroup\$
    – user45941
    May 3, 2017 at 21:22
  • \$\begingroup\$ I disagree. The hardware setup has to be general enough that a large percentage of computers would get the desired result. Having exactly 3 hard disks of exactly 1TB, 250GB and 128GB is oddly specific, and shouldn't be allowed, even those components are normal today, and having three disks is normal today too. \$\endgroup\$
    – Adám
    May 3, 2017 at 21:25
  • \$\begingroup\$ @Adám I would consider such specificity to be unreasonable. However, having > 1 TB of hard drive space would be a reasonable (though questionable) requirement. \$\endgroup\$
    – user45941
    May 3, 2017 at 21:26
  • \$\begingroup\$ It turns out a mere 45 minutes before you wrote this answer I suggested this unrelated loophole that covers that last part. \$\endgroup\$
    – Wheat Wizard Mod
    May 7, 2017 at 2:11
  • \$\begingroup\$ I've tried to look up GTX Titan. I'm ... not a fan of the design. Though their SLI bridge surely looks better than a ribbon cable. \$\endgroup\$ May 12, 2017 at 13:38
  • \$\begingroup\$ @JanDvorak I chose GTX Titans as an example because they're very high-end graphics cards, and two of them SLI'd without liquid cooling would probably result in a fire. \$\endgroup\$
    – user45941
    May 12, 2017 at 13:39
  • \$\begingroup\$ Don't they have thermometers built in? ... \$\endgroup\$ May 12, 2017 at 13:40

The hardware requirements must be broad enough that each requirement separately is fulfilled by a large number of computers

Examples of reasonable hardware requirements:

  • 1 TB available hard disk space

  • internet connection

  • printer attached

  • touch screen

  • RAID

Examples of unreasonable hardware requirements:

  • exact model of a computer

  • specific multi-hard drive setup

  • 5.25" floppy disk drive

  • exact amount of available space

  • 14
    \$\begingroup\$ Honestly, a lot of these don't seem like reasonable requirements to me. Most computers that I have don't have a touch screen, and I don't have any with a printer connected. I have a few RAID arrays, but why should code ever depend on that? And a 1 TB hard disk? Jeez. \$\endgroup\$ May 5, 2017 at 11:05
  • \$\begingroup\$ @CodyGray I don't think raid should be needed, but I agree with touch screen. A good many answers on this site are in OS specific languages, so it's not that far off from existing rules. \$\endgroup\$
    – Riker
    May 6, 2017 at 15:11
  • \$\begingroup\$ @CodyGray I wasn't clear about the 1TB; I meant free, not exactly present. \$\endgroup\$
    – Adám
    May 6, 2017 at 21:47
  • 1
    \$\begingroup\$ Lemme check my specs: "1TB disk space" - just shy. Oh, you meant free. Nvm. internet connection: Yes. Well, most of the time. Printer attached: I could attach the thing that's been gathering dust for five years now but good luck printing anything from it. It should work if you buy a fresh cartridge. Touch screen: Nope. My phone has one, but it's lacking in disk space. RAID: Nope. But I can setup an automated backup between my two partitions if you wish. \$\endgroup\$ May 12, 2017 at 13:34
  • \$\begingroup\$ 1TB of available space is a lot more than many laptops sell now-a-days! Specially the ultra-cheapo ones! I don't have a single printer connected to my computer, my motherboard doesn't even support RAID and I don't have a touch screen. And don't need to on a desktop. The only really reasonable requirement there is an internet connection. \$\endgroup\$ May 12, 2017 at 13:36

A memory/storage lowerbound is fine

Requiring at least \$10^{100}\$ bytes of RAM or hard disk is fine even if no computer would ever reach this amount of storage. Lots of brute force program do this.

Requiring exactly 1826680 byte of space left on hard disk is not allowed, even if some computer that satisfy this condition exist


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .