3
\$\begingroup\$

During a conversation in my proposed challenge in sandbox, there had been some objections about requirements in the challenge.

I want to entirely ban a usage of floating-point numbers in the challenge, but as turned out in the discussion, that must be only if the inputs are arbitrary-length integers.

Do major golfing languages such as 05AB1E, Jelly, APL, and Charcoal natively support arbitrary-length integers like Haskell's Integer? Otherwise, my challenge will be very different from what I intended.

\$\endgroup\$
6
  • \$\begingroup\$ Brachylog does, but I wouldn’t call it a major golfing language. \$\endgroup\$
    – Fatalize
    Feb 13, 2020 at 7:49
  • 14
    \$\begingroup\$ (Expect @Adám to cry about APL being in a list of golfing languages) \$\endgroup\$
    – Fatalize
    Feb 13, 2020 at 7:49
  • 2
    \$\begingroup\$ I won't call Charcoal a major golfing language just because only Neil is currently using it. \$\endgroup\$
    – user92069
    Feb 13, 2020 at 8:02
  • 2
    \$\begingroup\$ natively support arbitrary-length integers I see 3 options, rather than 2: (a) They don't; (b) They do, and arbitrary-length integer is a default type; (c) The do, but an explicit data type conversion or declaration is needed, which costs bytes \$\endgroup\$
    – Luis Mendo
    Feb 13, 2020 at 15:59
  • \$\begingroup\$ Pyth natively supports arbitrary length integers, because Python does. \$\endgroup\$
    – isaacg
    Feb 14, 2020 at 19:35
  • \$\begingroup\$ for me it depend from library… if a Language can have extern function in a library and exist one bignum library for that Language… all is possible... \$\endgroup\$
    – user58988
    Mar 10, 2020 at 22:00

2 Answers 2

8
\$\begingroup\$

APL

… is not a golfing language.

That said, some APL implementations, like NARS2000, feature arbitrary-length integers. Others, like Dyalog APL, have a library that provides this functionality. Additionally, some APL derivatives, like J, do too.

\$\endgroup\$
3
  • 1
    \$\begingroup\$ APL isn't a dedicated golfing language, but I'd be hard-pressed to show it isn't a golfing language at all - it is prime for golfing. It's not dedicated like OSABIE, but it's a language of one-character functions - I'd definitely call it golf-forward. \$\endgroup\$
    – Mathgeek
    Feb 20, 2020 at 20:58
  • \$\begingroup\$ @Mathgeek Some languages lend themselves well to golfing, but some were created specifically for golfing. For instance, APL's keywords and system names can have quite verbose syntax and names. Also, how would you regard J which features both one, two, and three character built-ins, but doesn't use Unicode at all, this "wasting" a bit of every byte? \$\endgroup\$
    – Adám
    Feb 20, 2020 at 21:03
  • \$\begingroup\$ J is what I call "a waste of golfing opportunity". Jelly is peak golf. \$\endgroup\$
    – Mathgeek
    Feb 21, 2020 at 13:22
2
\$\begingroup\$

Some non-golfing languages do not have builtin support for arbitrary-length integers, including but not limited to:

  • C
  • C++
  • Assembly/machine code
  • Probably some others

Don't tell me about any third-party libraries that provide support for these.

I can't see your sandbox post so I don't know if this challenge is possible in these languages.

\$\endgroup\$
3
  • 1
    \$\begingroup\$ Assembly language / machine code doesn't either, and a few of us golf in machine code. (Most ISAs have some instructions that make it easier to implement arbitrary precision than in C, e.g. a carry flag and widening multiply, but you still have to write everything yourself and it takes much more code size than plain add). So yes, totally agreed that requiring arbitrary precision has a lot of collateral damage if you really just want to ban usage of FP. Also very unequal costs across languages; e.g. some non-Python languages will require you to type BigInteger or something. \$\endgroup\$ Feb 18, 2020 at 8:47
  • \$\begingroup\$ C and C++ and assembly with some bignum library are fine for support bounded from memory, arbitrary-length integers \$\endgroup\$
    – user58988
    Mar 10, 2020 at 21:58
  • \$\begingroup\$ @S.S.Anne i know in C exist library for all not only bignum... \$\endgroup\$
    – user58988
    Mar 11, 2020 at 20:14

You must log in to answer this question.

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