Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »

Activity for dzaima‭

Type On... Excerpt Status Date
Answer A: Do we require codegolf challenges include example code?
Don't require example code In general, I believe the decision should be on the challenge creator. Requiring it would be useless for certain types of challenges (kolmogorov-complexity or similar), and boilerplate on simple ones. Furthermore, such an example solution couldn't showcase all options...
(more)
about 4 years ago
Comment Post #279684 @JoKing fwiw, unary actually only scores 1 as it only allows zeroes in its source. Lenguage is the one getting 256. Don't think it's worth it doing anything about this.
(more)
about 4 years ago
Edit Post #279684 Initial revision about 4 years ago
Article Output 256 in many different ways [FINALIZED]
Challenge Write as many functions, programs, or snippets of code, that result in 256. Your score is the number of separate solutions submitted in an answer. The challenge? The characters used in one solution must not appear in any other solution. That is, there is no character used in more than...
(more)
about 4 years ago
Comment Post #279408 @Lundin the tag can be used for answer standards, and isn't restricted to code-golf only either though. And calling them "rules" isn't preferable either, as they are only defaults, allowed to be overridden at will by the challenge specification. I'm now more leaning towards the "defaults" tag name
(more)
about 4 years ago
Comment Post #279382 @Lundin Code golf is about using any and all tools you have to achieve the shortest byte count in a specific setting (language, implementation, OS, etc). As far as this site is considered, you can consider a non-standard C dialect as not at all related to C beside the name, and competing with it as p...
(more)
about 4 years ago
Comment Post #279444 What can the non-array contents of the arrays be - only numbers, or any arbitrary non-array object?
(more)
about 4 years ago
Edit Post #279419 Initial revision about 4 years ago
Answer A: 1, 2, Fizz, 4, Buzz!
Canvas, 24 bytes zz+¹┘%!* ‾U{ŗ3Fi⁸5Bu⁸+nO Try it here! Explanation (ASCII-fied for better monospacing): ```text zz+¹┘%! Helper function ⁸; Expects stack to be [modulo, string] zz+ append "zz" to the string ¹ push the current loop index ┘ retrieve the modu...
(more)
about 4 years ago
Edit Post #279408 Initial revision about 4 years ago
Question How do we handle standardizing things?
Code golf, being about exploiting things, often brings about many questions about edge cases. Since we don't want each challenge to have to deal with all problems again and again, it makes sense to standardize some defaults for questions about various topics (including, but definitely not limited to,...
(more)
about 4 years ago
Comment Post #279382 Ah, I misunderstood what you were trying to say with freestanding mode. Sure, you can make an answer as such, if you can actually find a system that will run the function `x` on startup. But at that point you could just say your answer is a function (a meta post on what's a valid program, if there we...
(more)
about 4 years ago
Comment Post #279382 (really that C hello world answer _should_ be specifying that the answer is e.g. "C (GCC 10.2 on Linux)" or equivalent, but that'd be boilerplate on most C answers so it's often left out, plus it works just fine on any GCC/clang versions and probably on most OSes)
(more)
about 4 years ago
Comment Post #279382 'you can't prove that something isn't UB with "it seems to be working just fine"' I have the binary of GCC. Assuming it compiles deterministically, I _could_ actually prove it outputs `"Hello, World!"` in at least one version of it. And my answer proposes that that's all that matters here.
(more)
about 4 years ago
Comment Post #279382 "just set gcc to freestanding mode" That's applying a completely arbitrary change to my answer.. If we now allow you to do anything you want with the system running it, you could also define `puts`, `printf`, etc to call `exit(1)` and now I can never ever print anything and now noone can ever answer ...
(more)
about 4 years ago
Comment Post #279382 "it produces numerous diagnostics" but I still get a binary, and it outputs the required string. Warnings completely don't matter. Sure, it's not valid standard C, but it is completely valid & good "GCC/clang C".
(more)
about 4 years ago
Comment Post #279386 @Lundin A function is just allowed as a form of an answer (as an alternative to a full program). e.g. otherwise you are restricted to only a single string I/O (stdout/stdin) which is often extremely limiting (e.g. you'd need to have a JSON parser equivalent to take, as an input, an array of arrays of...
(more)
about 4 years ago
Comment Post #279386 @Lundin this answer is only about the specific problem of allowing functions as answers. My answer deals with the requirements for the actual language - you have 2 "places" where `stuff()` could be defined - your answer code whose bytecount you count, and the language you're answering in (whose size ...
(more)
about 4 years ago
Comment Post #279382 (and if you want to write strictly compliant programs, go ahead (under, say, the language name of "ISO C11")! It's a separate "language", so you can still win in the competition of ISO C11.)
(more)
about 4 years ago
Comment Post #279382 @Lundin Also UB doesn't matter if the answer _works_, though it's a good question how much "crashing and burning" can be allowed (certainly not to the point of time travelling before the output was printed, but beyond that it's complicated).
(more)
about 4 years ago
Comment Post #279382 "and now I will win every competition" The specific compiler is part of the language, so, assuming a challenge with the "Shortest byte count _per language_ wins" criterion, you might win on that obscure C compiler's C version, but won't actually compete with GCC/clang.
(more)
about 4 years ago
Comment Post #279382 "will not compile on a single reasonable C compiler" - it works fine on GCC and clang without additional arguments, so I have no clue where you got that from. It may not be standards compliant, but it's valid GCC/clang code, and, per my definitions, that's fine as one working implementation is enough...
(more)
about 4 years ago
Comment Post #279382 @Lundin "Where is this written?" Here. This site was just started, and obviously we haven't gotten around to re-writing the dozens of standards posts. This one is progress in starting doing that.
(more)
about 4 years ago
Edit Post #279382 Initial revision about 4 years ago
Answer A: What are the rules of programming language compliance?
If there exists something (reasonable) that can run it, it's valid. This includes obscure, non-standards-compliant compilers (though this should be specified in the answer if needed). So any posted program on a standard code-golf question must actually be executable and should (at least theoretica...
(more)
about 4 years ago
Edit Post #279245 Post edited about 4 years ago
Comment Post #279245 Is there any delay required between the frames? As-is, any reasonable solution would easily get thousands of frames per second, probably with the screen refreshing mid-frame too. (unrelatedly, for reference, clearing the screen with ANSI escapes appears to work as just `"\x1Bc"`)
(more)
about 4 years ago
Suggested Edit Post #279245 Suggested edit:
dasd
(more)
helpful about 4 years ago
Comment Post #279245 "if and only if it cannot clear the screen" Any language that can output arbitrary bytes to stdout can "clear the screen" in a unix terminal with ANSI escape codes.
(more)
about 4 years ago
Comment Post #279212 Polyglot with Canvas, Charcoal, and possibly a couple more golflangs
(more)
about 4 years ago
Comment Post #279204 [Example 1](http://oeis.org/A333977) - its first number doesn't fit in a 32-bit integer, so we, by outputting nothing, always identify it correctly. (there are at least a thousand like this, probably many more if looking at the first 5); [Example 2](http://oeis.org/A088110) - there are only 4 items, ...
(more)
about 4 years ago
Comment Post #279204 You should mention that there must actually be a valid input corresponding to a claimed sequence (otherwise every answer is valid on _at least_ a thousand sequences); Also, the constant sequences continue up to 32 - `A007395 A010701 A010709 A010716 A010722 A010727 A010731 A010734 A{010850-010871}` (t...
(more)
about 4 years ago
Edit Post #279205 Post edited:
about 4 years ago
Edit Post #279205 Initial revision about 4 years ago
Answer A: Print the Great Numeric Pyramid
Canvas, 19 bytes ‾-{{╷¹²-m‾-¹-m] *]/ Try it here! ```text ‾-{{╷¹²-m‾-¹-m] ]/ Program, ascii-fied for monospacing ‾- push 28 { ] for 1…28 (pushing counter & saving in ¹): { ] for 1…counter (pushing counter & saving in ²): ╷ ...
(more)
about 4 years ago
Edit Post #279202 Initial revision about 4 years ago
Answer A: Prime Difference
[Dyalog APL Extended], 14 bytes ```apl {¯4⍭4⍭⍣(⍵≤-)2} ``` Try it online! ```apl {¯4⍭4⍭⍣(⍵≤-)2} Monadic dfn 2 start with 2 ⍣ Repeat 4⍭ the function "next prime" (⍵≤-) until the difference from the previous one is ≥ the input ¯4⍭ ...
(more)
about 4 years ago
Comment Post #279193 Canvas doesn't have English compression, so it's as long as just the string constant itself.
(more)
about 4 years ago
Edit Post #279193 Initial revision about 4 years ago
Answer A: "Hello, World!"
SOGL, 10 bytes ╥‰⅜,(ε ‘ū Try it here! Built-in compression of `"hello"; ", "; "world"; "!"`, with first letters of words uppercased.
(more)
about 4 years ago