@cairdcoinheringaahing Yeah, I decided not to golf it because code-golf is not at all integral to the challenge
Thanks! :)
The challenge says as much: > I think this is probably enough of a challenge as it is, but let's make it [tag:code-golf] just to spice it up a bit more.
@tjjfvi Then I've downvoted. Regardless of how much of a challenge the challenge is, or how impressive the answer is, if it doesn't even make an effort to meet the winning criteria, I'll downvote it
Even if the code used single character variable names, and removed unnecessary whitespace, it shows some golfing effort. Otherwise, it's not a serious contender to the winning criteria
Even so, downvoting is totally a dick move, it doesn't reward the effort. Even if you think it should be golfed, fair enough, but don't downvote, that's just mean
Downvoting is absolutely not a dick move (granted, I'm biased but still)
If tjjfvi included a golfed version, I'd remove my downvote. I'm simply expressing my displeasure that the answer makes no effort to meet the scoring criteria
I think it's an incredible piece of coding, and clearly took a lot of hard work. If I were on any other site that was just about showing off code, I'd upvote/bounty/whatever to reward that effort. But here, we require some basic golfing effort. That's the absolute baseline, and it's not difficult to achieve
^ It's like a Stack Overflow answer with an ingenious wall of code that solves the OP's problem but doesn't explain how it's supposed to be used or what the OP is doing wrong in any way
Moving away from this answer, because I think I've made it clear what I think, downvoting an post is meant to express that there is something you dislike about it. Often, that's something temporary that, when fixed, will result in you removing your downvote. But, ultimately, a downvote isn't a "dick move", it's saying "I think this post can be better, and I'd like to express that through a vote"
I think one thing all SE sites need is for people to be told every time the first few times they're downvoted: "This isn't anything personal, it just means you might need to improve your answer if it's salvageable"
This is a whole lot of re-exports... and if this works without name collisions, it looks trivial to collect all definitions into one file and apply some trivial golfs from there
Background
K functions have a feature called projection, which is essentially partial application of values to a function. The syntax for projections is a natural extension of the regular function call syntax:
f[1;2;3] / call a ternary function f with three arguments 1, 2, 3
f[1;2;] / the ...
proposal for the pinned CMP - we can create a "mod office" (or just smokey) room first and add the bot there so we can see how things turn out and decide to move it here if we want, and that way we get to try the proposed alternative without any risk / committment (since we can remove it anytime and TNB remainds unaffected, or just ignore it). thoughts?
since it seems not many people actually want it in TNB itself but a few people are still somewhat interested. or if we decide to not, i think we can unpin the message
I think if we had/have a mod office, then it'd make sense. Don't think it's worth having a separate room just for smokey (cause that's basically just CHQ)
i don't think so... y'all can always find all of us here anyway, lol.
i mean, how many people even care, really? you could just sign up to have smokey ping you in CHQ when it detects something on CGCC, lol. then we don't need to do anything
Might make sense if the mods have problems browsing TNB due to accumulated pings (like, you ping multiple mods for something, one of them handles it, and then the rest have a useless ping to be cleared which they need to read the transcript to dismiss)
And we have (relatively frequent) room access request
I'm a big fan of silly challenges, but I'm afraid we're going to have to get serious. It's time to get rid of the lols.
Or rather, the 101s, which look quite a bit like lols.
Task:
Take an integer as input. You'll make this number serious by removing the 101s from the number's binary representati...
CMQ: There once was a golfing language (stack based I think) and it used overloads for commands. In it's README.md (or some markdown documentation), it made a comparison to 05AB1E, saying something like "you don't need the ceiling of a letter nor the uppercase of a number". What language is it? I can't remember what it was.
Should it be a single regex? Also, are you really intending to use " \1 " (prepend and append a space for each matched char, so you get two spaces between two matched chars)?
fwiw, dzaima/BQN has some formatting for high-rank arrays https://dzaima.github.io/paste/#05Za9jtNAEMd7P8VfoqTxftvSlbzICUF7UkBIdMaRUhxInIhPiQQdXAUddIfEA/AWfhLGdjZrb7xZnxNokFbyZHdm1pn5zXgAiLr4Jeq763p1myd19b6u3gzXmnaXKRg4PRtZQELtZA2DrJM3B5YfE1j/3R3sMd3C0vaa1YcDfVrfxzajR@0rjr57YD9@1Hlc0r@mf9CKzS8bhm7laDY6eadPkYHeK8CGqlsczcZAn6KH3OnbcHZLodno64/EOLAfP0oCZ7Tuw6E@ctRL9931BSOB0x3v2kwX7fpmBU@@SerVujWoq9J/ko9PPd2fAflLMmJ7Zh9VT/dHQN4Ood8XV8aOYD8F8okK6yaWo7VA7xVmPloUB6Vha8G6XaKrB@bKJQPLwdMB8bYk9maMgwkw6cqE/HJwMTCzleHMFJgGM85MgitwHakX62BzBOQpCnTB50gubt@eqlB9Tc6Ssqk55QY8A3cdSWgIA@F6klSQGtIMc5pCMAjXGUUOmU…
@pVCaecidiosporeadduced Kinda yeah, but I mean if your arrays are only numeric and do not contain circular references, it's much much simpler than that
def astr(array):
if not isinstance(array, list):
return repr(array)
s = ''
spaces = ' ' * max([len(astr(a)) for a in array])
i = 0
for e in array:
s += astr(e) + spaces
i += 1
s += '\n'
return s
print(astr([
[1, 2],
[3, 4]]))
@pVCaecidiosporeadduced Yes, separate by one empty line to separate matrices (2d arrays), two empty lines between 3d arrays, etc
1. go through all 1d arrays in your input, keeping track of the width of each column, and format each 1d array accordingly to get an array of strings. Also calculate the number of dimensions of your array 2. recurse through your new array with "current dimension" as a 2nd arg, adding that many newlines between items
A minor opinion: anyone trying to write something serious should go through uni-level algorithms course first (or alternatively, reach purple on codeforces)
Basically you need to split your function into three functions: one that computes column widths, another that recursively joins by newlines, and the third that calls the other two
> noun. > douche l'endroit > douche l·'·en·droit > > a songwriter's song, especially a man's song, that contains or contains a combination of rhyming beats and baroque lyrics > "some of our main tracks have a rather douche l'endroit style, with two guitar-driven keys juxtaposed like guitar bass"
This challenge is currently under beta release. If given enough positivity, it will remain here and stand as a fully released challenge. Otherwise, it will be deleted and put back ...
Dragoons originally were a class of mounted infantry, who used horses for mobility, but dismounted to fight on foot. From the early 17th century onward, dragoons were increasingly also employed as conventional cavalry and trained for combat with swords and firearms from horseback. While their use goes back to the late 16th century, dragoon regiments were established in most European armies during the 17th and early 18th centuries; they provided greater mobility than regular infantry but were far less expensive than cavalry.
The name reputedly derives from a type of firearm, called a dragon, which...
Which is more useful: Overwriting the top of the stack with the second value in the stack, or overwriting the second value in the stack with the top of the stack?
@AaronMiller You can't just duplicate physical objects, you have to transmute one into another, but I'm not sure which value should be transmuted into which value.
I want to unpin this soon so - mod office and put smokey there, or do nothing? I don't really care about whether or not we have a mod office; it might avoid having mod pings all the way up the transcript for us to handle but i don't really mind anyway; not sure about ww and joking
I think we should have one, and if it turns out that noone uses it and everything ends up still in TNB or whatever, we can just switch back and there's no loss
I don't think it's especially interesting. There are two main points that I took away from that discussion: all answers on this site should make some effort to meet the winning criteria, rather than just being a place to demonstrate code; and that downvoting is overly vilified here, and that people feel obligated to an explanation for every downvote on their posts
@cairdcoinheringaahing there is a certain kind of challenge for which this absolutist behaviour does absolutely no good. Ungolfed answer to Fizz Buzz? Sure, downvote and flag. This question? If I'm honest, downvoting a working answer to that type of question is just ridiculous
> all answers on this site should make some effort to meet the winning criteria, rather than just being a place to demonstrate code
@pxeger If I'm honest, probably the only thing I hate about this site is how vilified downvoting is. Downvoting should never be considered ridiculous. You may not agree with the reasons behind why the user cast their vote that way, but they're absolutely free to do so, and criticising people for downvoting for legitimate reasons is just being overly concerned about some number on a website
Why all? I understand we don't want to encourage questions that are "just solve this code problem" and nothing else, because we're Code Golf, but for these few unanswered big questions, an implicit community consensus is typically reached that the scoring criterion is no longer important
Because it doesn't take much effort to meet a scoring criteria, and bey requiring it in all cases, we avoid people saying "Well, this answer wasn't golfed, so why does mine have to be?"
Seriously, removing whitespace and using single letter variable names is essentially no effort, and it's enough. If you can't be bothered to put in that final bit of effort, why should I upvote your answer, regardless of how impressive it is?
@cairdcoinheringaahing Maybe it is "just being overly concerned about some number on a website", but my immediate reaction to the fact you [would?] have downvoted it is "wow, that's a bit mean", not because "big number make happy chemical", but much more importantly: downvoting, as a tool for criticism, heavily lacks nuance, and equating your responses to "this answer lacks a trivial piece of effort that I want it to have put in" and "this answer is offensive", and everything in between, is ridiculous.
No, but I do downvote answers by new users that don't show any effort to golf their answer
There's a huge difference between missing a golf and outright saying in your answer "I know that it's a code-golf challenge, but I'm just going to ignore that"
@cairdcoinheringaahing the typical answer by a new user is never such an interesting one as that one. If the Totally Cubular answer was posted by a new user, I think you shouldn't downvote it, because its value comes from the fact it was done at all
If it was posted by a new user, I'd leave a comment letting them know that answers here should make a basic effort to golf. If they then didn't fix that later on, I'd downvote. tjjfvi already knows that, so I skipped that comment
Whereas most actual posts where new users don't golf their answers are not very interesting even when golfed: they often also don't add anything to the other answers
@cairdcoinheringaahing on such a complex answer as this, it only makes me dislike it more because it obscures the main part I care about: reading the code
@user41805 Unfortunately, and as much as we hate it, the HNQ is our lifeblood. Without it, on a separate site, we'd never have the same amount of activity
I'm not exactly sure where I stand on this topic, but I will say that my Vim BF and GoL answers were initially completely ungolfed, as I initially did them just for the fun of doing them, and then later golfed them.
(not that anybody noticed that they were ungolfed (for obvious reasons (Vim answers are hard to read (especially when they're really long (like mine are)))))
@pxeger Idk, I've never taken a downvote to be mean, more that something in my post isn't good / needs to improve. What annoys me is when people downvote and don't bother explaining why (which is why I try to always explain my downvotes)
Create a program or function to unjumble a 9x9x9 cube of digits by rotating individual 3x3 cubes within it.
This is similar to (but, I suspect, a bit harder than) my Flippin' Squares question.
Input
Input will be a 9x9x9 cube. I'm not going to be as strict over the input as I was last time, 3d...