-7
\$\begingroup\$

I am a programmer, and know many programming languages, as everyone here does. Those languages have a productive purpose, a real-world application.

Python and Ruby have a clean syntax and are good for web server applications and simple infrastructure and maintenance scripts. There are many applications built with those languages for many unix distr0s (in particular with Python).

Javascript is the browser scripting language, and with server side javascript (e.g. asp, node.js) you can code certain behaviors once and, when suitable, have them both in the browser and the server.

vb.net, C#, C/C++, Java and Delphi are suitable when you need native or high-performance-but-not-native development.

Other languages are better suitable for special processing (R, Matlab).

So those languages have a purpose, a goal. And I thought the spirit of the site was to use such languages to make a smallest-as-possible program satisfying the problem.

So assume I invent a language (and make the interpreter available) and use it all for my future challenges (this means: I don't invent the language for an already existing challenge). Then a new challenge comes:

Write a program that takes as input a graph as a list of integers being the nodes, and a list of integers that takes a list of connections, and resolves finding a hamiltonian loop in the graph.

Then I write my aswsome script in my awesome language (without still finding it being in P):

MyStrangeLang, 2 bytes

Ń

Wow! And I... won.

What's the fun about winning that way? Perhaps I didn't understand the site's spirit since this is my first time (these days) of being active in this site, but a good explanation would help.

\$\endgroup\$
7
  • 1
    \$\begingroup\$ Related, also related, and another one. \$\endgroup\$ Apr 8, 2016 at 15:29
  • 1
    \$\begingroup\$ Remember that these have to be created before the challenge, so it isn't just slapping down a 2/1 byte solution. \$\endgroup\$
    – Riker
    Apr 8, 2016 at 15:32
  • 17
    \$\begingroup\$ This started as a constructive discussion I might actually have participated in, right until MyStrangeShittyLang [...] I released when I was high. \$\endgroup\$
    – Dennis
    Apr 8, 2016 at 15:32
  • \$\begingroup\$ @EasterlyIrk I know. That's why I clarified referring to "future" challenges \$\endgroup\$ Apr 8, 2016 at 15:36
  • \$\begingroup\$ How do you make a builtin 1 or 2 bytes long when you don't even know what the challenge is? If you can, it just shows that it's a simple challenge (or one that get's asked enough) \$\endgroup\$
    – Blue
    Apr 8, 2016 at 17:11
  • 1
    \$\begingroup\$ There are many built ins like this. One example is g for GCD in a golfing lang i cannot recall right now \$\endgroup\$ Apr 8, 2016 at 17:15
  • 5
    \$\begingroup\$ @LuisMasuelli Hi. That's Seriously. It's designed to have a lot of 1-byte commands. GCD is a very common and useful operation in math. If you don't like it, you don't have to use it. \$\endgroup\$
    – user45941
    Apr 8, 2016 at 17:53

1 Answer 1

9
\$\begingroup\$

Is it fun to use golfing languages? That depends on whether you like to use golfing languages. Not sure? Try it and find out. As is evidence by their prevalence on the site, a lot of people do like using golfing languages.

Is it fun when other people use golfing languages? That depends on whether you care about winning in the sense of receiving the coveted green check mark. Spoiler alert: It's not often that a "regular" language will beat a golfing language in code golf. Most of the folks who have been around for a while recognize this and choose to participate anyway. Why? Because code golf is fun, even if you don't "win." If all you care about is getting the green check mark, then yeah, your best bet will be to learn the golfing language du jour.

We like to think of code golf challenges as competitions within each language, or within classes of languages. So if you post a JavaScript solution that beats another JavaScript solution, nice work! If you post a JavaScript solution that's longer than a Pyth solution, who cares that it's longer? People love seeing golfed JavaScript. Pyth is shorter because it's designed to be shorter. Often making a short solution in "regular" languages requires more ingenuity to use and abuse language features, while a golfing language can be competitive with a straightforward algorithm. Don't let that ruin your fun.

While most golfing languages feature one- or two-byte built-in functions for common tasks, we require that submissions that use a version of the language published after the challenge was posted be marked "non-competing." This ensures that someone can't always win with a single byte solution that was added to the language specifically for that challenge. And of course, if you don't find a particular post interesting, you don't have to upvote it.

Don't discount golfing languages entirely; they're quite honestly a feat of engineering and a lot of users have put a lot of time and effort into making them. Calling them "shitty" or assuming that the language authors were using drugs when they built the interpreters is going to offend a whole lot of people here. This is an inclusive community; the users of all languages here coexist and have fun together. We just ask that everyone be respectful of one another.

Code golf is about fun. We have rules and guidelines for our community, but in general, do what you enjoy doing and let others do what they enjoy doing. That way everyone wins.

\$\endgroup\$

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