1:56 AM
0

Task Given an input string of 7-bit ASCII characters, do the following: Convert each character into its 7-bit ASCII code Concatenate all bits (this results in 7*n bits where n is the number of characters) For each bit in this bitstream, print 1 if it is the same as the previous bit, and print ...

0

Given a start word and a target word, print the "mutation chain" that starts at the start word and ends at the target word. You may assume both words are lowercase and only have alphabetic characters. Define a "mutation" as the removal of an character, the insertion of a character, or the alter...

4 hours later…
5:59 AM
0

This is a probably structure I found studying the Collatz Conjecture Pictured is structure the from y coordinate 0 to 27 Note that at even y-coordinates the structure expands in the x-direction, and at 0 and 5 mod 6 in the z-direction. Expect for the very top block. If you collapse the z-co...

2 hours later…
7:38 AM
0

Task Scramble the English alphabet so that it can still be sung to the tune Twinkle Twinkle Little Star as it traditionally is. Let's just assume the following groups of letters can be switched freely by default without ruining the tune: { A, J, K } { B, C, D, E, G, P, T, V, Z } { I, Y } { Q...

7:58 AM
0

What general tips do you have for golfing in Grass? I'm looking for ideas which can be applied to code-golf problems and which are also at least somewhat specific to Grass (e.g. "remove no-op characters" is not an answer). Please post one tip per answer.

1 hour later…
9:18 AM
1

please can anyone explain with out the use of any programming language tool, what is the rule for converting a code segment,(not an expression) to postfix notation....Thank you I appreciate in advance of your responses

9:57 AM
I have a numpy array and I want to add a 0 to the left end. So A = [1,2,3] I want to make it [0,1,2,3]. What's the most succinct way to do this?
np.insert(A, 0, 0) ?

@Anush Brachylog, 3 bytes: `,0↻`
:p
Now you just need to implement a Brachylog interpreter in numpy, problem solved

@Fatalize Thanks! :)

10:54 AM
1. Convert code to use non-numpy array.
2. `A=[0]+A`
Seriously though, sometimes people use numpy for no reason at all.

11:48 AM
CMC: Given a list of lists and a list, append the list to the list of lists as an additional element. E.g. `[[1,2],[3,4,5]]` and `[6,7]` gives `[[1,2],[3,4,5],[6,7]]`.

@Adám Python, 11 bytes: `list.append`

Hmm

@Adám Canvas, 3 bytes: `╶⁰∔`

@Adám Little bit longer since you need a lambda, but `lambda a,b:[b]+a`
Although that one returns the new list where as the first one modifies the list in place

11:55 AM
@dzaima Heh, that's much like the equivalent APL :-)
@DJMcMayhem Ah, is modifying in place allowed in default I/O?

I'm not actually sure.
Probably for C?

0

This is perhaps one of the classical coding challenges that got some resonance in 1986, when columnist Jon Bentley asked Donald Knuth to write a program that would find k most frequent words in a file. Knuth implemented a fast solution using hash tries in an 8-pages-long program to illustrate his...

1 hour later…
1:18 PM
1

Jimmy has had a busy last week with all these platforms and ropes, and poor Jimmy doesn't even have legs or feet to stand on! Your job is to take a string containing multiple Jimmys and give them legs and shoes! Get input in the form of a Jimmy String Jimmy String => /o\ /o\ /o\ containi...

1:28 PM
Why, @Mego, why? Maybe you like it:)

1:40 PM
Final RFC before I post:
7

Cops and Robbers: The Hidden OEIS Substring cops-and-robbers sequence As a cop, you must pick any sequence from the OEIS, and write a program p that prints the first integer from that sequence. You must also find some string s. If you insert s somewhere into p, this program must print the secon...

I like the challenge, and 8 votes probably supports that assessment.

I'm open to suggestions for the title

Oh I do like making titles

@SriotchilismO'Zaic I think it's also particularly well suited to brain-flak :)

That is one of the reasons I like it
I frequently find Brain-Flak to be good for cops and robbers

1:44 PM
I did end up banning crypto. I know that crypto solutions are less likely to be competitive, but I'm just not a fan of them in general

I don't know why though
Fair enough

@DJMcMayhem In the python example block `The hidden is string is two bytes.`
Probably a typo

I can't think if any puns for the title
It is probably best to just use a descriptive title

Crouching Robbers, Hidden Sequence
`The string does not need to match to be a valid crack, nor does the location it's inserted at.` -> `The string does not need to match the intended solution to be a valid crack, nor...` ?
Or something among those lines

Good idea

1:57 PM
Heh, I'm waiting for someone to submit p = '', s = <Rest of the program> in a language that returns 0 with an empty program

Posted

2:18 PM
1

This is a Cops and Robbers challenge. This is the cop's thread. The robber's thread is here. As a cop, you must pick any sequence from the OEIS, and write a program p that prints the first integer from that sequence. You must also find some string s. If you insert s somewhere into p, this progra...

1

This is a Cops and Robbers challenge. This is the robber's thread. The cop's thread is here. The cops will pick any sequence from the OEIS, and write a program p that prints the first integer from that sequence. They will also find some string s. If you insert s somewhere into p, this program mu...

0

The task here is to write a program that takes an natural number, \\$n\\$, and produces the \\$n\\$th term of an OEIS sequence. That sequence should have an identifier in the form of A followed by 6 digits. Now when you take your source code and reverse the order of it's bytes to produce a new prog...

2:35 PM
Is there a mechanism that converts answers to comments? I thought I was posting an answer but I left a comment ...

Nothing that happens automatically that I'm aware of

Huh
maybe a bug, because I had a markdown preview and everything
122

I posted an answer (pointing to another question already asked) but when I hit submit, I saw my answer appear as a comment to the question instead. I tried it a couple of times and still the same result. The answer gets eaten up and is transformed into a comment. Is this a bug?

It is not a bug
but it is stupid
I'll just let Guiseppe have the point (even though my "comment" is older).

I was seven seconds behind as well
Why is A096582 even in the OEIS?

> Included as an accompaniment to the OEIS 100K e-party (see link).
Not sure exactly what that means but it looks like it is sort of a joke/novelty
based around the fact it is close to the 100kth sequence

Now I'm wondering if the any string up to that length rule if beneficial or not. I'm definitely not removing it at this point, but it is balanced more towards the Robbers than the cops.
It would be an interesting puzzle where there's an obvious short solution, but padding it is difficult

2:48 PM
I think that it is pretty good the way it is

3:00 PM
@SriotchilismO'Zaic I think I have a crack, but there's something weird so I want to double check. p prints 1, but p+s prints 1 also. p+s+s prints 4 and so on and so forth. Does your solution do that?

OK. Dern

Yeah I just double checked and it does print 4

2 hours later…
4:58 PM
0

(we won't be finding a Find or catching a tryCatch, though) This is part two of a multi-part series of implementing some interesting R functions. Part one can be found here. The task: You are to implement R's match function in as few bytes as possible. Input: x, a possibly empty list/array ...

5:40 PM
hm... today has been fruitful...

5:53 PM
So, has anyone here ever run into a prlbme with VSCode's proxy? My company's proxy server address has changed and VSCode just doesn't ask for authentication anymore (It used to ask for username and password every time I opened it). Tried most of the troubleshooting in the internet to no avail. The proxy env. variables are set correctly, I tried setting the http.proxy setting in vscode's settings with and without the `username:password` part, still nothing.
It's really annoying.

0

Calculate Complimentary Color Write a function that outputs or returns the 3 bytes of an RGB color that is complimentary to the input color. The input may be taken directly as 3 separate inputs, an array of 3 values, or a single 3 byte (Or greater, however the 3 lower bytes should be used) inpu...

6:13 PM
Huh. It turns out that I had to unset the `https_proxy` env. var which used to be required and no one told me about it.

6:39 PM
0

In the tabletop RPG named Pathfinder, there is a feat that characters can take called Sacred Geometry, which allows a character who has it to buff their spells in exchange for doing some math: to use it, the character rolls a number of six-sided dice equal to their ranks in a particular skill, co...

6:49 PM
What's up everyone

@lirtosiast ↑

7:17 PM
@JonathanAllan lol I was just going to comment about the bug; however, there's a golf that can be combined with the fix
(basically, use `'\n'` instead of `nomatch`, since the latter can appear in `x`)

7:43 PM
0

150 rep for an R answer to this question You cannot use match or %in%. The former for obvious reasons, the latter because %in% is implemented as function(x,table)match(x,table,0) > 0. Sufficiently golfy answers will, at my discretion, be awarded more rep. First one to be posted will get the pri...

@EriktheOutgolfer OMG I tried to use a newline and failed :/

chill man, 'ts aight

looks like I could have saved the `Z` too then :)

yeah, `y` is weird :D
maybe you tried to do e.g. `p⁷`? :P

@EriktheOutgolfer It is. It could be a vowel or a consonant, or it could be silent.

7:50 PM
`Y`, on the other hand, not so much

1

Help! I seem to have an annoying echo in some of my floating point arrays, and I'd like to get rid of it. When this occurs, the original array repeats itself somewhere in the middle causing the values to be added to each other. For example, the array [ 42.2, 37.5, 52.7, 37.5, 85.9, 45.1, 75.4,...

1 hour later…
9:15 PM
@NewMainPosts I was really struggling to do sampling without replacement, but I realised that I had an easy access to previously sampled letters... just read the output buffer

10:00 PM
CMC: output a 10x10 matrix of booleans where `column/10 + row/10 ≠ (column+row)/10` because of floating point numbers. Has to be done in a context where there are both truthy & falsy results, `×0.1` instead of `÷10` is allowed (or in general any floating point imprecision), 0 or 1-indexed is okay, swapping truthy & falsy is too.