Activity for Lundin
Type | On... | Excerpt | Status | Date |
---|---|---|---|---|
Edit | Post #283137 | Initial revision | — | over 3 years ago |
Answer | — |
A: It's Hip to be Square [C (gcc)], 57 64 bytes x,s;main(){scanf("%d",&x);s=sqrt(x);printf("%d",ss==x);} Try it online! (more) |
— | over 3 years ago |
Comment | Post #282482 |
@#8046 I think the most sensible implementation would be that each community can decide which categories that should use rep or not. Meta being one (perhaps set to no rep by default?), another example is sandbox categories like here on Code Golf. (more) |
— | almost 4 years ago |
Comment | Post #282477 |
@#54114 If you post it under Code Review, there doesn't need to be a specific problem to solve. Rather you are expected to post complete & working code. If you are extra curious about for example portability or performance or style etc you can mention it in the question though, as that tells reviewer... (more) |
— | almost 4 years ago |
Comment | Post #282491 |
@#53501 Except it is listed as C (clang). And with the new scoreboard system, it bumps away all solutions that _are_ actually C (clang). (more) |
— | almost 4 years ago |
Comment | Post #282491 |
@#54114 In this case you should add the function/function-like macro used. Otherwise anyone can just use the "`M` library" from my example for any single challenge. (more) |
— | almost 4 years ago |
Comment | Post #282239 |
Couldn't we have Codidact-specific challenges. Recreating the [Mathematics logo](https://codidact.com/community-assets/math/logo-large.png) sounds like fun but tricky challenge. (more) |
— | almost 4 years ago |
Comment | Post #282482 |
@Monica Cellio Isn't the issue here rather that the various metas shouldn't count rep of the main site. The posts proposed here would sit on meta. Other than that, I don't have any problem personally with giving a lot of rep to someone who makes the effort to draft up these rules in detail per langua... (more) |
— | almost 4 years ago |
Comment | Post #282477 |
There's a lot of issues with the library - most notably you should never define functions inside header files. I'd recommend to post it for Code Review at https://software.codidact.com/categories/44 (more) |
— | almost 4 years ago |
Edit | Post #282491 | Initial revision | — | almost 4 years ago |
Answer | — |
A: Is my extension-like library allowed to be used in answers? If you actually use the library, sure, I guess. How you are going to get it running on online compilers, I have no idea. It's very uninteresting for others to view some code using a custom library though... you'd be golfing "single player". Your answer here doesn't use the library and is against t... (more) |
— | almost 4 years ago |
Edit | Post #282446 |
Post edited: Better solution |
— | almost 4 years ago |
Edit | Post #282446 | Initial revision | — | almost 4 years ago |
Answer | — |
A: Evens or Odds - you know this one [C (gcc)], 20 bytes f(a){puts("!"+a%2);} Try it online! Function solution. Prints `!` in case of even numbers, otherwise just new line. (more) |
— | almost 4 years ago |
Comment | Post #282345 |
I posted a solution too, just for reference. Would this challenge be interesting in other languages too? (more) |
— | almost 4 years ago |
Edit | Post #282345 |
Post edited: |
— | almost 4 years ago |
Edit | Post #282345 |
Post edited: |
— | almost 4 years ago |
Edit | Post #282345 |
Post edited: |
— | almost 4 years ago |
Comment | Post #282345 |
Curious to see how this turns out. Wasn't sure if I should restrict it to 15 or go with 100. The snippets would turn rather long in that case. Is this challenge sensible in a lot of different languages? The language won't need a line number counting feature, though it probably helps. (more) |
— | almost 4 years ago |
Edit | Post #282345 | Initial revision | — | almost 4 years ago |
Article | — |
FizzBuzz based on line count Background The normal "FizzBuzz" task is to create an up-counting loop which prints "Fizz" in case the count is divisible by 3 or "Buzz" in case the count is divisible by 5. Consequently, "FizzBuzz" for numbers like 15 that are divisible by both. Task The task is to write a solution which pr... (more) |
— | almost 4 years ago |
Comment | Post #281029 |
CD is an abbreviation for Codidact now? :( Aargh... I'm allergic to strange abbreviations. Especially of the kind that are already taken by Compact Disc. (more) |
— | almost 4 years ago |
Comment | Post #281542 |
You need to specify if these strings are taken as program input or if they can be constants. For example in C, you can merge two string literals by just typing `"ABC" "DEF"`. But to merge strings taken as input in run-time, it turns much more intricate. (more) |
— | almost 4 years ago |
Comment | Post #279722 |
@trichoplax. This one already went live [here](https://codegolf.codidact.com/posts/279820). And we still need a way to formalize moving things from sandbox to live challenge... guess I should mark it as "finalized" like some people do. As for the link, Roman numbers should be common knowledge really.... (more) |
— | almost 4 years ago |
Edit | Post #280766 |
Post edited: |
— | about 4 years ago |
Edit | Post #280766 |
Post edited: |
— | about 4 years ago |
Edit | Post #280766 | Initial revision | — | about 4 years ago |
Answer | — |
A: Microcontroller-involving challenges and the rules. For this to work, I think we need to rule out all start-up code (the C runtime) but also the register maps. So I think answers should be a `void main (void){ ... }` (or equivalent) function solution where the register map is included but not counting as part of the solution. Other than that, ban all ... (more) |
— | about 4 years ago |
Edit | Post #280668 |
Post edited: |
— | about 4 years ago |
Edit | Post #280668 | Initial revision | — | about 4 years ago |
Answer | — |
A: Write a Deadfish Interpreter [C (gcc)], 153 bytes a,b;f(chars){for(charc,o="idso";s;s++)for(c=o;c;c++)s==c&&(b=c-o,a+=!b,a-=b==1,b==2?a=a:0,b==3&&printf("%d%c",a,s[1]?44:10),a==-1|a==256?a=0:0);} Try it online! Function solution, misc gcc abuse. (more) |
— | about 4 years ago |
Comment | Post #280408 |
@Hakerh400 Ok. I have a feeling overall that these requirements would rule out a lot of languages, why I never posted it. (more) |
— | about 4 years ago |
Comment | Post #280408 |
@Hakerh400 How so? It's pretty clear what a comment consists of in most languages? (more) |
— | about 4 years ago |
Comment | Post #280408 |
The only requirement is that the symbols must visually appear as "ABC..." etc and the underlying encoding symbol table doesn't matter. (more) |
— | about 4 years ago |
Comment | Post #280408 |
@DJMcMayhem Yeah it won't be possible to solve this challenge in Brainfuck and similar languages. (more) |
— | about 4 years ago |
Comment | Post #280408 |
@Razetime I think we should allow any source code format? (more) |
— | about 4 years ago |
Comment | Post #280408 |
Curious to know how if the 26 line requirement holds in plenty enough different languages or if too many languages enforces either stand-alone symbol-only lines, or non-alphabetic order (for example VB `Private Sub... End` wouldn't work since that language enforces line feed formatting with `End` on ... (more) |
— | about 4 years ago |
Edit | Post #280408 | Initial revision | — | about 4 years ago |
Article | — |
Print the alphabet using alphabetic source The task is to write a program that takes no input and prints the English alphabet in upper-case letters. It can be printed either as a single line `ABCDEFGHIJKLMNOPQRSTUVWXYZ`, or as letters separated by spaces, or as letters separated by new line. This is code golf, so the shortest program in e... (more) |
— | about 4 years ago |
Comment | Post #279883 |
Covid 19 holidays happened unfortunately, I had no time to post this before xmas. (more) |
— | about 4 years ago |
Edit | Post #280390 |
Post edited: |
— | about 4 years ago |
Edit | Post #280390 | Initial revision | — | about 4 years ago |
Answer | — |
A: Truthify an array [C (gcc)], 100 bytes i,j;f(x,y,p)intp;{puts("[");for(;i<x;i++)for(j=0;j<y;j++)p++&&printf("[%d,%d],",i,j);puts("\b]");} Try it online! Note that TIO console doesn't handle backspace properly. (more) |
— | about 4 years ago |
Comment | Post #280343 |
"We can't currently vary properties of post types per category" This is strange though. The various metas shouldn't give rep IMO and that's a much bigger issue than the sandbox category on some sites. (more) |
— | about 4 years ago |
Comment | Post #280242 |
I think test cases (such as examples of input/output) should not only be encouraged but mandatory. An example snippet of a non-golfed version in some common programming language is encouraged, as discussed [here](https://codegolf.codidact.com/posts/279635). (more) |
— | about 4 years ago |
Edit | Post #280306 | Initial revision | — | about 4 years ago |
Answer | — |
A: Tile pyramids on top of each other! C (compliant), 106 bytes char r,i,s[80];void f(int n){memset(s,32,79);for(;r<n;puts(s),r++)for(i=0;i++<n2;s[n-r-1]=47,s[n+r]=92);} Try it online! Standard C compliant function solution. (more) |
— | about 4 years ago |
Comment | Post #279883 |
@Razetime That's kind of the core of this whole silly joke :) Tannenbaum = Christmas tree in German, though it could as well have been the name of some less famous computer scientist :) O Tannenbaum refers to a famous Christmas carol, etc. (more) |
— | over 4 years ago |
Comment | Post #279883 |
Would appreciate some feedback on this! Is it too confusing? Too silly? Could I clarify it? Or draw ASCII art prettier somehow? (more) |
— | over 4 years ago |
Edit | Post #279883 | Initial revision | — | over 4 years ago |