const f = o => { const q = {}; for (const k of Object.keys(o)) q[eval(k)] = o[k]; return q; };
and now just do f({ variable: value });
3
@Ginger I can maybe think of cases where it might be fine depending on your philosophy / what exactly your design / purpose is, but in general, I'm going to say no it isn't.
i know of some discord servers that have public ban logs and i've seen mixed opinions on it
It's time for CGCC to demonstrate our musical talent! In this challenge, you're going to compose songs while keeping your byte count as small as possible.
On Day 0, multiple answerers will post a function or program that outputs nothing/an empty string. They will also give a single line that next...
Like, pxeger has Zsh, user has Scala, learn an uncommon language you like, you'll get a lot more rep with ten praclang answers a month than a week of learning Vyxal or 05AB1E and then never using it (or forcing yourself to use it for rep and losing interest in answering)
I don't think a "how to get rep" post is good if that's what it's actually purely about, because we don't want to encourage participating for the sake of rep. It needs to be a "hook" to get people to read about how they can participate on CGCC in fun and new ways, and get rep in the process
Like learning a new language they're not used to, or trying to get bounties
@emanresuA we have to define "interesting" and "language" first. But in order to do that we need to define "int", "er", "est", "ing", and every single definition of "language".
@RadvylfPrograms ya this is good point, i find a lot of golfing langs just seem too outlandish and weird for me to learn, and im not particularly interested in learning them anyways
I'd make the section about learning a new language, that's not what you're used to (or is what you're used to, and isn't commonly used here), then have golflangs as a subset since that's what you're used to
but if you're working in something weird then it'll probably take you longer than most praclangs, which you then want to offset by fluently explaining how you wrangled the weirdness
maybe note that that's a good way to get rep (and an actual reputation) that doesn't rely on new challenges at all--you may not get the hnq drivebys but if you dredge something up with an answer in mornington crescent or fractran the community will appreciate it
come to think of it maybe move the section on deadlineless bounties to the top
Honestly a good conclusion might be that rep shouldn't really come from some particular strategy to grind for the green bubbles, just do what you enjoy and use the tricks above to maximize your rep potential from it
like "there's always a better answer in my language already" or "i almost never get upvotes on what i do post" or "i can't find challenges worth answering"
maybe also note some with mid-sized communities of the sort where you have a good chance of getting an answer in before they do but there's still enough people who can help you improve
not related to what u guys talking about, but could someone explain what turing complete means ? on wiki it says it need to emulate a universal turing machine but i cant make sense of what that is either
@emanresuA I'd suggest adding in a section just discussing "Participate more". While it's not the first thing in earning rep, you can do all the suggested things in the post, but once every month, and earn much less than someone who posts one answer per day
E.g., a language that only has if statements and for loops that do a finite number of iterations, for example, can never do an infinite loop, or a calculation that requires some sufficiently complex looping strucutre.
@AidenChow No, it's broader than that. A TC language can do any computation that any other TC language can do.
That includes anything from prime checking, to infinite loops, to interpreting brainfuck
Brainfuck is an example of a very minimal TC language. You could write a Python interpreter in BF if you spent long enough, whereas you could never do it in, e.g., dotcomma
And likewise, you can write a BF interpreter in bitcycle, or a JS interpreter in C++, or a C++ interpreter in JS. Any TC language can be used to run any other TC language, but no non-TC one can run another TC one.
@RadvylfPrograms (Excluding non-computation-based aspects of the language, like external I/O, internal representation of things like arrays, and more practical functionality like telling the OS to do things)
the average bf interpreter couldn't possibly host an implementation of js because js has features for doing things that bf doesn't, but anything js can compute given an input bf can compute too
@RadvylfPrograms And this is a pretty useless definition on its own, but basically every praclang is Turing Complete when you ignore things like pointer sizes (technically a TC language needs unbounded storage space), so "can this implement BF/BCT/waterfall machine" is the easiest way to get an idea of what the requirements are