-2
\$\begingroup\$

BBC micro:bit is a piece of hardware wich allows to to run code, such as Python or Javascript, that is custom made for the micro:bit chip. However, it in itself is not a programming language.

Instead, it allows people to use 4 different coding languages to manipulate it:

Obviously, as all of these languages are Turing complete, they can compete here. So how do we submit solutions in them?

For example, a Hello, World! program can be written in 4 different languages with the BBC micro:bit, all with different scores and with different code, but that all work the same way.

A Python micro:bit answer for Hello, World! would be

import microbit
microbit.display.scroll("Hello, World!")

which scores 56 bytes. However, if I wrote the same program in Microsoft Touch Developer, it would

a) Use a different encoding, similar to TIBasic

b) Be shorter, because of this encoding.

This is what the program in Microsoft Touch Editor looks like:

Microsoft Hello, World! program

Now this brings up a whole separate issue of how to count these bytes but for now, we'll stick with bytes like this

[script ][a][newline]
[function main()][newline]
[tab][basic][-> show string][(]["Hello, World!"][,][1][)][newline]
[end function]

which comes out as 15 bytes (I'll explain why in the post about counting bytes).

So the competition doesn't become about language tricks, but rather what language you choose to use, which isn't fair.

Therefore, what should be do about submissions in BBC micro:bit programs? How should answers in them be formatted/answered?

\$\endgroup\$
  • \$\begingroup\$ Why would you use a microbit on PPCG in the first place? \$\endgroup\$ – Beta Decay Jun 18 '17 at 17:13
  • \$\begingroup\$ @BetaDecay for the fun of it :) \$\endgroup\$ – caird coinheringaahing Jun 18 '17 at 19:50
  • 8
    \$\begingroup\$ On my Linux PC I can write answers in hundreds of programming languages, but that doesn't cause confusion about how to submit answers in those languages. Why does having four languages on a microbit cause confusion? I don't understand what the problem is for which you're seeking a solution with this question. \$\endgroup\$ – Peter Taylor Jun 19 '17 at 10:14
4
\$\begingroup\$

Use the compiled file size

All these different editors compile to a .hex file. We should use the size of that as a measure of the byte count.

\$\endgroup\$
  • \$\begingroup\$ I explain why this isn't a great solution here \$\endgroup\$ – caird coinheringaahing Jun 18 '17 at 15:26
  • 1
    \$\begingroup\$ @caird What you're forgetting is that getting the shortest overall solution isn't the point of PPCG anymore. Instead, it's about competition between submissions in the same language or similar languages. \$\endgroup\$ – Beta Decay Jun 21 '17 at 7:38

You must log in to answer this question.

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