-11
\$\begingroup\$

This is my 12th question, so I thought of this idea.

Goal:

Your score is \$\Large{\frac{\text{Bytes}}{\text{Languages}^2}}\$. Obviously the lowest score wins. This means that you can't submit something that runs in no languages (wink).

\$\endgroup\$
7
  • 2
    \$\begingroup\$ Come on, give me a reason for these downvotes... \$\endgroup\$ Jun 16 at 13:41
  • 2
    \$\begingroup\$ The downvotes may be related to: "Note that the restricted-source tag should be used with caution -- adding restricted-source to an otherwise trivial challenge does not necessarily make it interesting. Generally, a restricted-source challenge should be a task of moderate complexity along with a clear, simple and relevant restriction." (From: codegolf.stackexchange.com/tags/restricted-source/info) \$\endgroup\$
    – pajonk
    Jun 16 at 16:06
  • \$\begingroup\$ I don't think this isn't interesting; for example the output 2014? 2016? without numbers one is quite interesting... \$\endgroup\$ Jun 17 at 0:15
  • 1
    \$\begingroup\$ In addition to the restricted source issue, having "most languages wins" makes it tedious to compete. It's all about whoever is willing to put in lots of time to dig up lots of languages and do this (easy) task in all of them. \$\endgroup\$
    – xnor
    Jun 17 at 7:33
  • \$\begingroup\$ Maybe I can change the scoring rubric. \$\endgroup\$ Jun 17 at 7:55

5 Answers 5

3
\$\begingroup\$

5 Languages - Keg, Vyxal, Python 3, 05AB1E and Curlyfrick, 114 bytes

"""
!+._\PC\DC-\CC\CC- [|,]#`"""
''' TT__D++,q'''
print(ord("P")-ord("D"))
'''
...{}   ({}+{}+{}+{})*({}+{}+{})
''' 

100% ascii too

Try Keg online!

Try Python 3 online!

Try 05AB1E online!

Try Curlyfrick online!

Try Vyxal Online!

Explanation coming soon. Soon here means a time that isn't 21 minutes past midnight.

\$\endgroup\$
3
\$\begingroup\$

7+ languages, 24 bytes, score < 0.49

Haskell, OCaml, Coq, Common Lisp, Erlang, Octave/Matlab, PARI/GP, and many other functional languages

(length("twelvetwelve"))

\$\endgroup\$
3
  • \$\begingroup\$ Exactly how many languages, though? \$\endgroup\$ Jun 17 at 0:14
  • \$\begingroup\$ @Nobody Needs Names I don't know exactly how many. If you want to calculate the score, use the current number of languages \$\endgroup\$
    – Matteo C.
    Jun 17 at 9:29
  • 1
    \$\begingroup\$ You can add PARI/GP to the list. \$\endgroup\$
    – alephalpha
    Jun 27 at 7:01
2
\$\begingroup\$

brainfuck, Headass, Javascript; 3 languages, 52 bytes

print("+++++++^[>D+++++P++<-]>:".length/"+?".length)

Three cussword titled languages

Javascript: Try it online!

brainfuck: Try it online!

Headass: Do stuff online

Javascript:

                  /             Divide
           .length     .length  The lengths
      "..."        "+?"         Of these strings (24/2)
print(                        ) Output the result

brainfuck (ignored characters removed)

+++++++[>+++++++<-]>    7*7 (canonical)
                    .+. print charcodes 49 and 50

Headass (ignored characters removed)

(        [>       ++<-]>:      nothing important
 +++++++^  D+++++P             print 12
                         .     halt
                          +?.) inaccessible code

Not sure what else I can add without drastically changing my approach. Just wanted to get a score up to start with for now.

\$\endgroup\$
2
  • 1
    \$\begingroup\$ print("++++++++++++"/*P[>++++<-]>+*/.length)+"." is 48 bytes. \$\endgroup\$
    – tsh
    Jun 17 at 2:19
  • \$\begingroup\$ @tsh i did not know you could insert comments like that mid thingy. i probably wouldnt have thought to shoot for 48 afterward anyway :D great golfing! \$\endgroup\$ Jun 17 at 3:36
1
\$\begingroup\$

JavaScript (jsshell), Python 3, bash (core utils)?, brainfuck, 109 bytes

#!/usr/bin/env -S grep -c ^
e=">+++++++[->+"
print(True//True*len(e));"""++++++<]>
=e.length)//+."""








I'm not quite sure if this should be count as bash as it actually runs grep from its shebang. It does not work on TIO version of jsshell, as support shebang as comment requires a newer version.

\$\endgroup\$
0
\$\begingroup\$

Example Submission, \$1\$ Language(s), \$26\$ Byte(s), Score \$\frac{26}{1^2}=26\$.

Language(s):

  • Python
print(len('aaaaaaaaaaaa'))

Explanation

Need I say more...?

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.