« first day (3244 days earlier)      last day (1586 days later) » 

1:58 AM
0
Q: DataStructure Algorithm to get list of ranges for a given value

user3279954Are there any data structure to perform an optimal query over a set of ranges for a value and get ranges that satisfies the query ? for, ranges = [ (0,10), (7,20), (1,3), (4,6), (2,5) ] num = 5 get_ranges(num, ranges) => [ (0,10), (4,6), (2,5) ] Just started learning about segment trees but n...

 
 
1 hour later…
 
4 hours later…
6:41 AM
0
A: Sandbox for Proposed Challenges

BubblerBunda-Gerth parser for abstract APL-family language code-golf parsing apl Background APL has four kinds of tokens: arrays, functions, monadic operators (mops) and dyadic operators (dops).1) Let's denote them A (arrays), F (functions), M (mops), and D (dops) respectively. Usually when programmin...

 
7:14 AM
@WheatWizard oh wow
 
0
A: Sandbox for Proposed Challenges

BubblerProbabilistically fair prize splitting for two-player coin toss code-golf probability-theory Introduction Adam (A) and Bubbler (B) are playing coin toss, where the one who wins 5 times first would win the prize of $32. If the game is aborted when the scores are A:B = 4:3, how should they dis...

 
 
2 hours later…
9:20 AM
0
Q: Function that change one global variable

RosLuPI write the example for APL but it should be for every language: in APL code as r←f w ⎕ct←0⋄a←r←1x →0×⍳0=w∣r⋄a←a-⍨r+←a⋄→2 a function like this that changes a variable that could be external, or changes a system or language variable possibly used by other functions: it should not be allowed (ev...

 
 
2 hours later…
10:56 AM
-4
Q: Remove Duplicates From One List

QuintecTask: Remove all duplicates from one list. A list is simply a sequence of connected values that allows the same values to be stored at different positions in this sequence. If an item was found to be the same value as another item in this list, keep the first occurence of the item and remove th...

A nice challenge, the only problem is that it is terribly specified. Can you find any flaws in my edit? (If this is a duplicate of an earlier challenge I can do nothing to it.)
 
@A̲̲ What types of elements can the list contain? Do floats that are close enough match? How about the int 1 and the float 1?
 
Checking the existing solutions for more spec...
 
@A̲̲ Will the list be homogenous of type? Some languages, like J and Haskell, can't handle mixed types.
@A̲̲ The last bullet is misplaced. It isn't a rule, just a comment.
 
Making sure that the list can only contain integers solves everything. However Quintec needs to agree with me.
 
You can just ask. Quintec is around.
@A̲̲ Suggested tags: and .
 
11:07 AM
@Quintec For your challenge is it okay to limit the list spec down to only allowing integers inside the list? (There are a lot of potential problems that are avoided when this spec is used.)
 
11:31 AM
@A̲̲ I think it would much much better to just post a new question instead of editing a 4 year old closed one with a score of negative 4
 
@JoKing I think it would be easier to re-use the old question instead of posting a duplicate.
 
@A̲̲ Maybe ask for guidance on meta?
 
11:53 AM
@JoKing I can't risk posting a question, because I am terrible at explaining stuff.
 
@A̲̲ That's what the sandbox is for. By editing the old challenge, you're circumventing review.
 
12:05 PM
0
Q: Reopen or repost?

A̲̲Which choice is better: re-posting a closed challenge with 4 downvotes, or reopen the closed challenge? The only problem seen in this challenge (at least by me) is that the spec is too unclear. If this challenge is not a duplicate, it is a valid challenge on CGCC. However, reposting the same ch...

 
 
1 hour later…
 
1 hour later…
2:36 PM
0
A: Sandbox for Proposed Challenges

CorsakaLists of Crisps The Challenge A crisp company has plenty of one-letter flavours of crisp, but they want to separate them into pick'n'mix bags, and for some reason have an infinite volume of packaging. Thus, your task is to make sure every crisp in a bag is unique - the company doesn't care how ...

 
 
1 hour later…
3:53 PM
@A̲̲ Why auto-prepend quotes, rather than auto-append?
For instance, what strings is abc"def"ghi"jkl pushing?
 
@cairdcoinheringaahing How often are you going to want to end the program with a string? From what I understand, auto-appending would be only usable for hardcoded KC (and even there it isn't any better)
 
@dzaima Not criticising, just interested as the vast majority of languages have auto-append
I use Jelly's auto-append feature a fair number of times, and I've always found SOGL's auto-prepend to be a bit confusing - notice that it starts with a string half way through decoding what the program does :/
 
@cairdcoinheringaahing Jelly isn't left-to-right though
 
while auto-prepend might be a bit weird, auto-append in a LTR stack-based lang feels completely pointless to me
 
4:04 PM
Clearly the program should treat it all as a string, then execute the program on that string
The only compromise :P
 
4:20 PM
@A̲̲ Oh yikes, that's embarrassing. I had completely forgotten I had that question around, lol, as you can see I was not very good at using the site properly
 
I'm not exactly sure what you are trying to do: I agree with the others that creating a new question is easiest. In any case, this type of challenge is not received that well on the site nowadays - too simple and most languages have a built-in.
 
4:41 PM
@Adám Done. :)
 
@El'endiaStarman Thanks!
 
 
3 hours later…
8:06 PM
0
A: Sandbox for Proposed Challenges

Grumpy_BoyDecorate the Christmas Tree Tags: code-golfascii-art Intro It's a week before Christmas and the your family just bought a Christmas tree. Your little sister has a box of ornaments which she wants you to decorate the tree with. The tree is the following structure of ascii characters where n sp...

 
9:30 PM
and a nice game you might enjoy (remember 2048?) gridentio.com
6
 
10:00 PM
got 640
id be surprised if I could beat that
 
10:20 PM
hm just got 1100, slowly things start to click:)
 
this rng feels cruel
 
I can now understand how you could get a gambling addiction
842 this time
 
10:37 PM
@JoKing Hey, I was wondering if you had any ideas for scoring 0 in the newest radiation challenge.
 
Hey so if a cat program takes text from STDIN and prints it to STDOUT, does that mean a dog program takes any pre-existing output in STDOUT and places it in STDIN?
 
11:19 PM
@cairdcoinheringaahing "abc" and "ghi". I was initially thinking of a postfix version of Pyth. Since Pyth auto-appends the quotes, naturally I start to think of prepending the quotes.
 

« first day (3244 days earlier)      last day (1586 days later) »