12:09 AM
How to get 10 upvotes on an answer: See a new code golf challenge popping up, solve it quickly in APL, and post as first answer with some fancy MathJax.

@Bubbler love me some Mathjax :P

@cairdcoinheringaahing do you have a link to that specific challenge? IMO i think it might somewhat depend on the challenge but in general I'd say that if a challenge doesn't explicitly allow something that isn't by default permitted, even if it makes sense, it shouldn't be used

13

In the Thai calendar the year 2017 corresponds to 2560. The Thai calendar is always 543 years ahead of the Gregorian calendar. Observant coders will note that 2560 is equal to \$2^9 \times 5\$, in other words it has 10 prime factors. This will not happen again for another 896 years! We call a yea...

if the challenge is particularly active, then it's probably best to follow the pattern the other answers have; if half of the answers use that ambiguous method, and the OP has never responded, I think it's fair to just accept that that's become part of the challenge, but if like 1 out of 20 answers uses it, it should probably be removed
if the challenge is dead and the OP is completely inactive it might be worth recreating the challenge and dupehammering the old one into it
probably best to get a meta consensus on this though. i do think old challenges have been dupemerged into newer challenges before? maybe only a few times

Well, I have a tab open with my fully explained Jelly answer, that assumes the comment question is allowed, I'm just kinda waiting for something to give me the go ahead
Probably the meta post I'll post tomorrow (or technically later today), but ¯\_(ツ)_/¯

12:14 AM
Probably post to meta. For now I'd personally say no; the challenge and all answers adhere to "use the current year", so posting an answer using input would easily beat all other existing answers on a technicality that isn't even allowed in the challenge
I think using current-year or using input doesn't really add or remove much from the challenge in terms of being interesting either way, and so since the challenge is "use current year", I think it's best to keep it that way.

I'll post a meta about it tomorrow when I'm not sleep-deprived
@xnor Regarding this, I can't really answer beyond "I think it's harder and more interesting with the restriction on \$n\$, so I prefer it that way" I know it's probably not the best reasoning for such a restriction, but I reckon that will make it a boring challenge, but I have no backup to that beyond my experience on the site
Overall, I guess my reasoning is ¯\_(ツ)_/¯ it makes it slightly more difficult

@cairdcoinheringaahing Is it asking for full program, or is a function allowed?
Btw, I think there's an easy way to circumvent the n-byte restriction in many languages: reduce any list by cantor pairing function.

12:43 AM
@Bubbler As is standard, either’s fine

@Bubbler Good point that answers can just solve the generic challenge.
I think that's gonna be shorter that anything that used the code length unless your language is ultra-golfy and can do like n=2 in 2 bytes. @cairdcoinheringaahing What do you think if answers don't use n?

Exactly. IMO the generic algorithm will work in many esolangs as well as practical ones, as you just need some arithmetic, two (+ a couple more) units of storage of integers, and any kind of loop.

1:00 AM
@cairdcoinheringaahing You might also want to specify n>=2. Unless you did in the post and I'm just blind. Otherwise any golflang's 1-byte identity func just wins :p
oh never mind you put n>1 at the top. i am indeed blind

1:19 AM
0

Since we have a full moderation team now and the load isn't all on one person, some of you may have noticed that flags are being handled a lot faster now. However, this has resulted in the problem that sometimes flags could be addressed before a user may have even had a chance to see the comment ...

2:17 AM
CMQ: What's your favourite golfing language?

Jelly :P

brainfuck

unary
(it always takes me at least like 4 tries to remember how to strikethrough in SE chat)

APL, except that it isn't a golfing language. I do know how to use Jelly (which is a remote descendant of APL) and Japt though

The only one I've tried to use is Jelly, at some point I might try to use it again.

2:21 AM
I always say: "If you want to learn Jelly, learn APL first!"

Do they work the same way, or are Jelly's monad/dyad rules more complicated than APL's?

Jelly is more complicated, but it is all for the conciseness.

I guess I'll add "learn some APL" to my list of things to work on

I tried learning APL after Jelly :P didn't get to spend much time on it, so I might revisit it, but it does seem a bit simpler (though since I'm used to Jelly I struggle more with it than I probably should)

Often APL and J suffer from needing to place monads at tacit-unfriendly locations, adding bytes just for syntax. Also it is common to mention the argument (or one of the arguments) as-is, which is like losing half a byte

2:34 AM
I feel dumb. I just spent half an hour trying to figure out why my controller for Political Simulator was randomly giving out votes to people. Turns out the issue was that I used the same variable for three different loops, all nested within each other.

Lol, that happens.

Does anyone else feel like the hardest part of code golfing (at least in high level languages) is keeping track of all the one letter variable names?

I use somewhat descriptive names before getting a valid solution, and then I shorten them (or remove them).
In APL, I don't need names for easy tasks because the arguments are always ⍺ and ⍵ (or not mentioned at all), and I use ^ for harder ones.

3:14 AM
@Lyxal Still Pip
@RedwolfPrograms Always keep a separate readable version, then golf it down

Hm, yeah maybe I should do that. I made sure to keep a readable copy for Hexasweep, but I never really thought about doing that for normal challenges

3:32 AM
It definitely helps in easier ones too, especially when it involves multiple major steps to get the answer

1 hour later…
4:34 AM
@RedwolfPrograms I can help with that. (Also, we are working on various self-study courses.)

@Adám Is there any recommended tutorial/explanation for beginners? Seems like a really interesting language.

@RedwolfPrograms Check out APL Wiki's Learning resources

Thanks! I'll take a look at that.

@RedwolfPrograms Sure thing. Just remember that you're always welcome in The APL Orchard where myself and others are happy to answer questions. And you can always ping me if you want tutoring that is customised for you.

5:11 AM
29

Please excuse the punny title. This is a question is inspired by A Curious Property of 82000. In it, the author points out that the number 82000 is binary in base 2, 3, 4, and 5. The post then poses the question "is there a number that is binary in bases 2, 3, 4, 5, and 6"? (For those curio...

6

If you want to build a fence and have different length boards available, there are many different ways to set up your posts. So, given a minimum and maximum board length, a number of boards, and the total length, count how many ways you can arrange them. Input Input is four positive integers: ...

24

The goal of this code golf is to draw a regular polygon (one with equal side lengths) given the number of sides and radius (distance from center to vertex). The number of sides and the radius can be entered via a file, STDIN, or just a plain old variable. Use whatever is shorter in your languag...

5:26 AM
@RedwolfPrograms my god that is a behemoth of an answer

Any tag lol

Including ?

Yep

lol same question

5:32 AM

@Lyxal Probably one of my processing answers

5:44 AM
How does one find one's longest answer?

SEDE?
Or catalog everything

I found it only because I knew the respective challenges

One could extract the bytes header, but there are many s that make the header not "bytes", so I don't think SEDE will work either
And I think it's really rare to see a answer of over 2000 bytes, except for Lenguage/Unary answers

5 hours later…
10:36 AM
0

Is a coincident point in a pair of rotated hexagonal lattices closest to the origin? code-golf I've deleted from here because I agree it is takes too much time to understand at the moment. Preface This is a code-golf question where the technique must search or exclude from search all possibilitie...

@Lyxal oh boy
probably a 6MB malbolge one lol

11:26 AM
0

Count the Collatz survivors mod 2^n code-golfnumbernumber-theory Introduction We have 22 Collatz conjecture-related challenges as of October 2020, but none of which cares about the restrictions on counter-examples, if any exists, of the conjecture. Considering a variant of the operation defined i...

12:11 PM
@Lyxal only, 1106 but that's golfed down from 1558
TBH I could beat that by breaking out Verbosity and finding a semi-difficult challenge
@xnor You and @Bubbler do make a good point. I gave it a shot in Jelly and it was basically just reducing a list by the cantor pairing function, n had no relevance to the code itself :/

12:31 PM
@cairdcoinheringaahing let me guess, your cube question?

@Razetime Yep :P

knew it

CMQ: What's the longest amount of time you've spent on an answer on this site?

@RedwolfPrograms If you count the time spent on an answer to be latest_edit - post_time, probably ^ that one for me

I'd count it as the time golfing/writing the answer before posting, in which case the longest I've spent is half a week

12:41 PM
In that case, probably a couple of weeks

not more than a day

1 hour later…
1:45 PM
@Lyxal 3773 bytes, and that's after someone golfed my original 7394 bytes in half
@RedwolfPrograms see above

2:00 PM
@RedwolfPrograms I spent ages on that random maze solver one

2:13 PM
I like how you solve challenges in charcoal because you can

2:59 PM
-1

The challenge is to write a JavaScript / TypeScript class, named SelfReproducingClass below, which satisfy the following criteria. The aim is to make new SelfReproducingClass having the expected behaviour of class extends SelfReproducingClass {} We can optionally pass a spy function into the con...

2 hours later…
5:12 PM
CMQ: What badge do you have the most?
Main: Nice Question, Meta: Necromancer for me

0

Get the Systematic Chemical Symbol code-golfchemistry Write a function or full program that takes an integer \$n > 118\$ and returns or prints the corresponding chemical symbol. The systematic symbol is defined as such for \$118 < n < 1000 \$: The first letter corresponds to the first digit, ca...

@cairdcoinheringaahing Main: Nice Question × 76, Meta: Nice Answer × 32

5:28 PM
@cairdcoinheringaahing autobiographer :P

@cairdcoinheringaahing Main: Nice Question x 49, Meta: Nice Answer x 10
hey same categories as adam :D just with strictly a lot fewer lol

@HyperNeutrino I've been here for 5 years, you've been here for 3½.

@Adám Well technically longer because of that weird account deletion event some time ago (3y5m to be specific) but you've definitely been more active and for longer than me

5:44 PM

I'm like, 99% sure I did
Yeah, I got a huge amount of badges on June 21st 2017 specifically, so I think I got my badges restored when my account was merged.

5:59 PM
@Razetime no, I solve challenges in Charcoal because I can't solve them in Retina!
@cairdcoinheringaahing Main: Nice Answer (157), Meta: Necromancer (7)

For me it's Nice Question, with 18. Closely followed by Popular/Notable. I really don't have that many badges...
Same with meta, Nice Question × 3

6:57 PM
0

As a Web Frontend developer, I feel out of place most of the time coming here. And that is despite the existence of established challenges like One Div in the field of web development. But they aren't here, because objective criteria are hard to do. (Sparing more unkind reasons.) Maybe the follow...

7:08 PM
@ngn Do you use npm?

1 hour later…
8:13 PM
0

Can I print my picture on {A,B,C}{0-10} paper? The task is to find the smallest paper size on which it is possible to print a picture of the dimensions given in milimetres. The image will be printed without margins. Input: Two numbers, bigger than zero, and a letter a, b, or c, for example: 290 ...

Are there any vanilla OCR challenges?

@RedwolfPrograms How can they be vanilla? It isn't an exact science.

As in, just text. Not license plates or handwriting or anything else.
I guess "generic" would be a better term to use

What exactly is "text"? What would the input look like? How would scoring go?

Probably something like either a screenshot of a document with text in varying (similar) fonts, or scanned documents

8:21 PM
Better would be either a Boolean or an intensity matrix. (That eliminates the input conversion.)

@Adám depends on the language - other langs might actually prefer working with images than some abstract arrays

@RedwolfPrograms ^ is true, so you see, making a generic/vanilla OCR challenge is not really doable.

I'd make the rules for input very loose, as long as it's an image or grid/matrix with darkness values or something similar

Another issue would be if the solutions only have to deal with a known input set, or be tested against an unknown one.

@Adám you can still say "input is B&W image in a reasonable format, i.e. matrix, array of arrays, image, etc"; I/O rules are definitely not the biggest problem

8:26 PM

you'd probably want a question - some list of images to check against that you're not allowed to fit to

@ngn You know Microsoft owns npm, right?
@dzaima Another possibility is being fed training data and then the test battery, so you can implement a NN.

@dzaima That's what I'd do, yeah. Either that or 100-1000 that I don't release until afterward, maybe with a different set for training/example purposes

Yeah, really any image processing challenge should be in some way, because there's just too much variety in input

@Adám i'd assume it'd be the answerers job to train a NN with whatever methods they choose to, taking however long they can deal with

8:29 PM
@dzaima Possibly, but then the learned knowledge has to be stored and counted towards the solution length.

@ngn Just as little as you should be worried about MS owning GH.

@Adám would you even score by bytecount, if you have a test battery?

@Adám npm is such an chaotic insecure mess, being owned by M\$ would actually be good for it :)

@dzaima Dunno. Surely, byte count should factor in, as one could otherwise hardcode 100% handling.

8:33 PM
@Adám that's why I said "that you're not allowed to fit to"

@dzaima But that's unobservable.

Couldn't it be accidentally fitted to, though? Some sort of bias in the text chosen or the fonts used could make the program perform much better with the chosen set than a completely random one

@RedwolfPrograms Exactly. Hence my claim to it being unobservable.

@Adám if hardcoding is really that big of a worry for you, you could publish a hash of the dataset and test against it after some time

I think it's a good rule, but it can't be relied on entirely. I'd still make code length important, maybe just not a major part of the score.

8:36 PM
@Adám that's gonna be a problem regardless of anything you can ever ever do

@dzaima Well, at least scoring (partially or if 100% correctness is required: entirely) by code length is important.

how big are OCR NNs anyways?
@Adám requiring 100% correctness would rarely work (if you're checking >10000 characters, one will probably break).

@dzaima RGS just ran a workshop on creating one. Code.
@dzaima Depends on the input quality and the valid character range. I think you can get 100% with high-res digits in Courier font.

@Adám oh, if the images are generated with a known font with no artifacts and high quality, you might not even need a NN

@dzaima Even with some artefacts (e.g. pixel misalignments) and some font variability (e.g. various typewriter-style fonts), I think you can get 100%

8:44 PM
Yeah, seems like that could be done pretty easily by just finding a character to determine the offsets locations of the characters, then use a big map. It'd just be a "golf the consolas font" challenge
Actually that might be kind of fun, especially if you chose a really simple monospace font

@Adám 11.6MB compressed, for just digits and 89% accuracy. So you'd need >11MB of test data to prevent hard-coding, all clear enough to be gotten with 100% accuracy
@dzaima tesseract appears to be 14.7MB, and it's failed on me quite often (though i am dealing with phone-taken pictures)
@dzaima here's a more promising 2MB compressed, but it would probably also fail often enough