« first day (2283 days earlier)      last day (2576 days later) » 

12:21 AM
This question is about starting to design a golfing language. When you're starting to design a golfing language, you pretty much have to decide on the best types of storage to use and the type of data flow through the code (e.g. left-to-right for CJam, BF, etc., right-to-left for prefix langs such as Pyth, a combination of both for langs such as Jelly...) at the same time because these two things are very closely related. Because of this, would you mind editing the question to include choosing the type of language? I can edit for you if you'd like. — ETHproductions 2 mins ago
I think that works
 
0
Q: Let's play some "regex" golf golf!

彩音MI have thousands of songs in my music collection, and luckily for me, I have a great memory and can remember the title of every song in my collection! However, I'm very lazy and don't like typing—typing each extra character is a chore! What is the shortest search string I would need to type if I ...

 
1:00 AM
Hmm
Just had an interesting (easy even?) challenge idea
Ima go sandbox it
 
1:24 AM
25 mins ago, by LegionMammal978
Ima go sandbox it
he's gone down the rabbit hole
 
@Riker lol, I've been around Math.SE's chat too long and now I prefix every conversation with that
 
lol
it was specifically at the "ima go sandbox [this challenge idea]" part
implying the sandbox sucked you in and you can never leave
 
2:12 AM
Shouldn't we have a tag for such challenges?
Something like polyglot-restricted-source.
Or something totally different like code-cricket or code-fencing?
Or like code-pacman?
 
@OldBunny2800 good question. I keep asking that but the comment gets removed... — programmer5000 yesterday
Why would such a comment be removed? That doesn't sound right. (cc @programmer5000)
 
@Arjun Think I found one: .
 
"Why is this getting close votes./How can I make it more clear." is a totally valid comment.
cc some mods @Den@Doo ^ since I think they can see deleted comments
 
2:33 AM
There, posted to the Sandbox
Afraid that nobody will be able to understand it :(
 
@LegionMammal978 That seems perfect. BTW, I have edited the challenge I commented about to include that tag. Could you review it?
 
@Arjun Yeah, stole it from the hyperprogramming challenge
 
Hyperprogramming challenge?
 
Do we need more ?
 
0
A: Sandbox for Proposed Challenges

LegionMammal978Rewrite a number in the Munafo System code-golf numbers Output The Munafo Alphabetic PT System (created by Robert Munafo) is a system of concisely writing very large numbers such that ordered values become lexicographically ordered when written. A full description (and some examples) of the sys...

 
2:46 AM
134
Q: Hyperprogramming: N+N, N×N, N^N all in one

Helka HombaWrite a program that takes in a number N from 1 to 9 inclusive. In its native form your program should output N+N. E.g. output 2 if N is 1, 4 if N is 2, 6 if N is 3, and so on. When every character in your program is duplicated in place, then it should be a program that takes in N (still from 1 ...

 
What is the most amount of citizenships you can get?
 
@HelkaHomba That was very creative to think of. I just upvoted.
@HelkaHomba or @Qwerp-Derp ↑
 
@Arjun I don't think that tag really helps
I'm not sure
In hindsight, now that I look at it a little deeper, it actually seems like it could be approved
But IDK, it doesn't really add to the question
The current tags should be good enough
 
3:02 AM
Do you get +2 when you don't have to go through the review queue after editing? (ie after gaining more than 1k rep)
 
@HelkaHomba The first one was removed by the OP, the second one was removed by me when the question was clarified and comments got cleaned up and there were no further issues as far ad I could tell.
 
@Dennis Good morning/afternoon/evening/night , sir!
 
Night, in any case. :P
@Arjun No, that's only awarded for suggested edits. You cannot suggest edits with editing privileges.
 
That wouldn't make much sense anyway because then you could just spam edit everything for rep
 
3:18 AM
or you mean anyway, ok
 
4:04 AM
@Dennis why does this still vectorize? ØAx26$'
 
Don't most things in Jelly auto-vectorize?
 
@LeakyNun Short answer: because ' is completely and utterly broken.
But what would you expect it to do anyway?
 
@Dennis to produce the same result as this: ØAWx'26F
 
Couldn't you just use ?
 
I can, but I'm just testing the '
 
user165474
4:10 AM
Is Arjun formerly Dobby?
 
@LeakyNun Don't. It's broken.
 
Have you considered fixing it?
 
user165474
In what way is it broken? What was it originally meant to do?
 
BTW: When are we actually changing the old chatiquette link to the newly written one?
 
@HyperNeutrino It's supposed to prevent atoms from vectorizing, so [1,2]<'[3,4] would return 1 instead of [1,1]. Not only does it not prevent < from vectorizing; it makes it worse and the comparison returns [[1,1],[1,1]], comparing each item from the left list with each item in the second list.
@Phoenix Briefly. Before there was þ, that bug turned out to be so useful I never wanted to fix it. Now I can't fix it without breaking old answers.
 
4:20 AM
@Dennis what does "spawn" mean?
 
user165474
Hm. Interesting. That might be useful for some things.
 
@Dennis So, change the documentation?
@LeakyNun To generate, but where do you see that word?
 
@Phoenix see the docs of '
 
@LeakyNun The main issue here is that ' can only work on atoms as defined. It won't do anything useful for x26$ since the chain doesn't vectorize in the first place. Its atoms do, but ' doesn't know that.
 
@Dennis oh...
 
4:23 AM
@Phoenix I did. That's why it's called spawn for dyads now.
@LeakyNun Generate offspring. Each couple produces a unique result.
 
@Dennis interesting metaphor.
 
I think I copied that terminology from somewhere.
 
@Dennis I think you should add a line in the doc of
namely, that it repeats the left argument
 
Feel free to add it. The wiki is world-editable.
 
4:32 AM
@Dennis do you have the PPCG userscript enabled?
 
No.
 
Why not?
Nothing works in multiline messages
 
user165474
Hm.
 

Sandbox

Where you can play with chat features (except flagging) and ch...
 
user165474
Right, sorry.
 
4:39 AM
@LeakyNun @HyperNeutrino ^
@Phoenix Why would I?
 
@Dennis It's pretty, it adds a link to the sandbox, it adds a leaderboard to the top of challenges, it allows you to distinguish PPCG from other design-less sites at a glance.
But mostly it's pretty
 
user165474
It also gives each codeblock a bytecount
 
The code in the green background bothers me, as does the monospaced font for badges. I'm not sure how the leaderboard works, but if it's anything like the leaderboard in stack snippets, it will consume too much bandwidth for my taste. I'm also not sure if it would even work with moderator tools.
 
user165474
Haha I like it especially because of the monospace :P
 
No offense to Downgoat, but monospaced fonts for non-code is just a no-go for me. I've said that about Cryptography's design as well.
 
user165474
4:47 AM
I use too much monospace for everything :P
 
user165474
my entire system is set to monospace (on my linux laptop)
 
It could probably be a setting without too much effort.
(@Downgoat)
TBH I'm not a huge fan of the monospace either, but it's a relatively minor thing.
 
@Phoenix Speaking of which, why doesn't PPCG have a design yet?
 
PPCG is fundamentally different from other sites. When they give us a design, that want to have all of the features unique to us integrated, and it's taking a while.
At least, that's what we've been told.
 
user165474
PPCG is one of the few sites that isn't a Q+A
 
user165474
4:59 AM
because the answers don't benefit the asker
 
Also, a lot of the time questions take more effort to write than to solve (though not always).
 
@Phoenix s/been told/requested/
 
No, I literally bothered them in the comments of one of their blog posts about it, and that was basically what I was told.
 
Link please?
 
This was a few months ago. I remember someone here chewing me out for it, though.
 
5:03 AM
We rarely get a peep out of SE so link please
 
I'm looking for it
Right, I remember, El'Endia Starman definitely said something about "Why did you have to bother Jeff Atwood??"
 
Geobits is cackling madly somewhere
3
 
> @Pavel yup
6 stars
jeez, I really can't find it. There's too much El'Endia being mildly pissed at me for me to sift through...
Wait, the conversation might have been trashed.
Curse the stackoverflow blog for not having a search function.
 
can you use google search with site:blog.stackoverflow.com or whatever?
 
Good point
stackoverflow.blog/2017/01/26/year-in-review-2016 I think was the thread, but it seems the comments were nuked for some reason.
 
5:18 AM
no luck on wayback machine
 
Ok I'm giving up on trying to find either the message or the blog post.
 
The chat thing should still exist
Oh well :/
 
It might have been trashed
 
@Phoenix ?
 
5:21 AM
@Downgoat see above conversation about font choice in the design script
 
 
2 hours later…
7:11 AM
CMC: quadratic residues mod n
e.g. n=10 gives [0,1,4,5,6,9].
 
@LeakyNun How does that work?
 
In number theory, an integer q is called a quadratic residue modulo n if it is congruent to a perfect square modulo n; i.e., if there exists an integer x such that: x 2 ≡ q ( mod n ) . {\displaystyle x^{2}\equiv q{\pmod {n}}.} Otherwise, q is called a quadratic nonresidue modulo n. Originally an abstract mathematical concept from the branch of number theory known as modular arithmetic, quadrat...
In number theory, an integer q is called a quadratic residue modulo n if it is congruent to a perfect square modulo n; i.e., if there exists an integer x such that:
$$\displaystyle x^{2}\equiv q{\pmod {n}}$$
 
7:29 AM
I see
 
@KritixiLithos are you going to do it?
 
What should the output for 9 be?
 
@KritixiLithos 9 gives [0,1,4,7]
who made that language?
 
then my solution is right
 
finnish :o
 
7:40 AM
It's a nice language
 
you made the language?
 
No, fergusq made it (he is on PPCG, that's how I discovered the language)
 
> [...] This includes making and/or distributing alternative clients that connect to the Everybody Edits server or an alternative server.
wait, so we aren't allowed to make games anymore?
wah
 
@KritixiLithos but the documentation is in Finnish...
 
Here are the english docs: kaivos.org/~iikka/r%C3%B6da/doc
 
7:44 AM
@KritixiLithos your solution is wrong: you cannot assume that the residues of the squares of the number below 10 is the whole set
You just need to change the 9 to a
 
Okay, my bytecount is still preserved then
 
so a pipe is a composition?
 
Röda is a stream based language. seq 0,a pushes the numbers 0 to a to the stream. Then [(_*_1)%a] pulls one value from the stream and multiplies it with itself (to form the square) and the modulo a is pushed onto the stream using []
It's like bash in a way
 
how does it map through all numbers?
 
Wow, in base 16 there are only 4 quadratic residues
 
7:49 AM
What a crappy base. I can't believe people use it so often.
 
38 mins ago, by Leaky Nun
CMC: quadratic residues mod n
 
@LeakyNun Yes, but sort sorts all of the input stream and not each individual number
_ is a pulled value from the input stream
 
@KritixiLithos you can save 2 bytes by omitting the parentheses
(* and % are on the same precendence level (4))
 
ah, thanks
 
@LeakyNun @Leaky Pipe (yes that pinged me)
 
7:52 AM
@EriktheOutgolfer update your pyth answer now !!
 
You used 0x200B right?
 
@EriktheOutgolfer yes
5
A: Sort digits by their first occurence in PI

Erik the OutgolferPyth, 8 bytes ox+`.n00 Try it here.

 
I know what Pyth answer you are referring to.
 
Pyth beats Jelly, wow
 
Please be a bit patient, I just woke up with 6 inbox notifications!
 
7:55 AM
@KritixiLithos Jelly is not good at string manipulation
 
@KritixiLithos no it doesn't?
 
In the comments it does
 
5
A: Sort digits by their first occurence in PI

Jonathan AllanJelly,  8  7 bytes -1 byte thanks to Dennis (use any existing 0 in the input, clever.) ØP;ṾiµÞ Try it online! How? ØP;ṾiµÞ - Main link: string s (char list) µÞ - sort the characters, c, of s by: i - first index of c in: ØP - pi yield: 3.141592653589793 ; - co...

 
Jelly is like APL, right?
 
@betseg Pyth is soon 6 bytes
 
7:56 AM
@KritixiLithos ah I didn't check the comments
 
Unfortunately, my Pyth answer probably beats that too. (slow-internet-connection-ninja'd)
 
@KritixiLithos yes, as it is based on J
 
Is it left-to-right or right-to-left? For example, in Dyalog APL, 1-2+2 yields ¯3 (which is negative 3)
 
left-to-right
@KritixiLithos slide is a potentially useful command
 
what's it do?
 
8:01 AM
[1 2 3 4]|slide(2) becomes [1 2 2 3 3 4]
(2 at a time)
 
Oh, I thought you were talking about Jelly
 
heh, Jelly only has 1-byte and 2-byte commands
 
@LeakyNun Yay I outgolfed 05AB1E!
 
@EriktheOutgolfer congratulations!
 
And Jelly, ofc.
 
8:04 AM
52 mins ago, by Leaky Nun
CMC: quadratic residues mod n
People don't like my CMC?
 
@LeakyNun And, the thing is, Pyth has a really long-named π constant .n0. And it still beats 05AB1E and Jelly. I'm so surprised.
 
echo $pi | sort | uniq
 
@LeakyNun I think you can delete your comments now, they clutter the post.
 
@EriktheOutgolfer would you do my CMC?
 
Well, I don't think the title of the CMC is easily understandable. You should add a link like this:
 
8:09 AM
@EriktheOutgolfer thanks
 
(I don't claim the CMC myself)
And another problem is that it's unclear what do to with the quadratic residues. If there isn't a dupe, you may even post it in the Sandbox, so that it can be a real challenge, I think this is way better than what you may think.
 
oh, and it should be unique and sorted
e.g. 10 gives [0, 1, 4, 5, 6, 9]
 
Oh, so we get n as input and we output the quadratic residues mod n? I get it.
 
@EriktheOutgolfer my Pyth answer is at 7 bytes; can you beat me?
@EriktheOutgolfer I'm sorry for the confusion
 
Well, if it was a real challenge, it would've been probably closed as "unclear what you're asking".
 
8:13 AM
I get a verbose 19 bytes in Dyalog APL
 
Writing a Jelly Pyth answer rn.
 
@EriktheOutgolfer I wouldn't write only 4 words in a real challenge
@KritixiLithos let me tryAPL
 
I'm struggling to make a train
btw my solution is just a dfn
 
@KritixiLithos what is the monadic equivalent of α and ω?
 
what do you mean by that? They represent the left and right arguments in a dfn respectively
 
8:22 AM
I mean, the only argument in the monad
@KritixiLithos how can it be dfn when it only accepts one argument n?
or the identity function
nvm found it
 
btw, I'm not an expert with Dyalog, just started it recently. This is my solution: {A[⍋A]⊣A←∪⍵|(⍳⍵)*2}
The argument it takes is the right argument
 
how do you make a dyad a monad?
 
Are you creating a dfn? If so, just give it one argument.
 
@LeakyNun Hmm... are you sure?
 
@EriktheOutgolfer yes
 
8:29 AM
Tough...
 
:p
 
@LeakyNun You seem to be lazy...
Not that you must necessarily like :P over :p, but whatever.
 
Focus on outgolfing me
 
Yeah I do, although I have to take a break now and then ;)
You use f, right?
 
not going to tell you
@Sherlock9 hi
 
8:33 AM
Hello all
 
@LeakyNun Challenge accepted, dude. Challenge accepted.
@LeakyNun OK rn I've got an 8-byte version. That's too much apparently.
 
@EriktheOutgolfer 1 byte too much is too much
 
@LeakyNun Do the numbers in your CMC have to be in order?
 
@KritixiLithos yes
Why isn't (⊢[⍋⊢])∘∪⊢|⍳×⍳ working?
the sorting part is really hard
If I don't sort, it's just ∪⊢|⍳×⍳ for 6 bytes
 
I have the same code
Trains are harder than dfns
I asked in the APL chatroom
I'm guessing it's something to do with the right to left execution, but I don't know how to make it work
 
8:43 AM
@LeakyNun Still 8 bytes, but considerable improvement.
 
@EriktheOutgolfer how?
 
More built-ins.
 
show me?
((⊂⍋)⌷⊢)∘∪⊢|⍳×⍳
 
@LeakyNun Well, I used a builtin for A**B%C.
 
15 bytes @KritixiLithos
 
8:46 AM
Nice!
 
But I think that I can shorten "sort and deduplicate", although I can't find anything.
 
@EriktheOutgolfer you're missing something trivial
@KritixiLithos But I don't know how works
 
encloses the argument
 
@LeakyNun I most probably need some 1-byte set operation. Also, I'm not sure how to map with implicit input.
 
Try entering 1 2 3 on TryApl, then do ⊂1 2 3 on the next line
 
8:49 AM
@KritixiLithos how do you print in TIO?
nvm, I'll just link to TryAPL
 
@LeakyNun ⎕←expression, so ⎕←2+2 outputs 4
 
@KritixiLithos I mean, how does work?
 
Note first that and are different
 
I know
@EriktheOutgolfer just try it
 
Yeah, I get a zero division error.
 
8:51 AM
oh, I thought you meant . Then I don't know how works
 
@EriktheOutgolfer what is your code?
 
S{m.^d2Q
Too long for sure, I think I can shorten S{.
 
oh
 
If I remove Q it doesn't work.
 
Apparently dyadic accepts a scalar as the left argument and a vector as the right argument, that's why you need (or something like that)
 
8:53 AM
yeah, if you remove the Q, it becomes d
but you're still missing something obvious
 
@LeakyNun You may be interested in this: dyalogaplcompetition.com
 
@KritixiLithos Röda, 36 bytes: f a{seq 0,a|[_*_1%a.." "]|sort|uniq}
@KritixiLithos heh thanks
 
@LeakyNun doesn't work when the output has 2-digit numbers, for example when a is 50
 
@KritixiLithos heh, interesting
 
8:57 AM
cya
@EriktheOutgolfer are you still here?
 
Still missing the obvious?
 
Yeah. Is it a built-in or something?
 
no it isn't a built-in
it's a structural change
 
...oh those are hard on me. So, it isn't the obvious S{m.^d2Q.
 
9:10 AM
The hamming distance is 2
 
@LeakyNun I'm going for a moment, brb.
 
9:38 AM
0
Q: Skip or delete lines between two keywords in a file using python

user68680The problem is I need to skip or delete all the lines between the two keywords in a file and the keyword pair will appear many times in the file.The file looks something like this . . .......... .......... Hello world .......... .......... welcome . . . .......... .......... Hello world ...........

 
9:50 AM
@LeakyNun Finally back! (I had chores to do)
@LeakyNun You say the hamming distance is 2 right?
That seems to still be 8 bytes.
Are you still there?
 
@LeakyNun You can save a byte by using composition instead of atop: (⊂∘⍋⌷⊢)∘∪⊢|⍳×⍳
 
10:14 AM
@EriktheOutgolfer sorry I'm here now
@Adám thanks
 
@LeakyNun Well, I can't seem to golf the Pyth answer lower than 8 bytes (a well-known bytecount for Pyth).
 
@EriktheOutgolfer spoiler
 
I've never used "right map" before, I get it.
 
btw an alternative to S{ or {S is .{ which returns a set
 
Although still 2 bytes, and yes I tried that.
 
10:18 AM
Hey, I think that this answer should be undeleted. If you look at the revision history, manatwork actually ungolfs the code
 
@BetaDecay this is the source of the first revision.
 
Oh I see. Never mind
 
@LeakyNun It seems that, in parallel of the "Jelly Hypertraining" I should make "Turn Python off!" for Pyth </sarcasm> Seriously, I am awestruck that Pyth managed to outgolf 05AB1E and Jelly.
Note: don't make such a room, there isn't any reason to yet.
@LeakyNun I also found a Jelly answer based on the Pyth one.
 
@EriktheOutgolfer nice
@Adnan where is the 05AB1E doc gone?
 
10:35 AM
@LeakyNun in the docs folder
 
@Adnan could you update the link on README?
 
oh yeah, thanks for notifying
 
@Adnan heh
much emptiness
 
I'll repost my Sandbox post one last time here, pretty sure the Western Hemisphere was asleep and missed it:
0
A: Sandbox for Proposed Challenges

LegionMammal978Rewrite a number in the Munafo System code-golf numbers Output The Munafo Alphabetic PT System (created by Robert Munafo) is a system of concisely writing very large numbers such that ordered values become lexicographically ordered when written. A full description (and some examples) of the sys...

 
@LeakyNun fixed
 
10:38 AM
@LegionMammal978 I thought the Western Hemisphere is still sleeping
@Adnan thanks
 
@LeakyNun yeah I wanted to rewrite the 05AB1E source code before doing that
 
@LeakyNun It's 6:38 in EDT, usually wake up around 6:25
 
@Adnan did you create OASIS?
 
yeah
 
10:42 AM
yeah, I'm not focussing a lot on Oasis atm
 
10:56 AM
@Adnan how do you generate [0,1,2,3,4,5,6,7,8,9] from 10 in 05AB1E?
 
also
 
@Adnan I like how 05AB1E has a command for sorted_uniquified... if it didn't convert the elements to string
 
@LeakyNun strings and ints are equal types in 05AB1E
 
@Adnan but they aren't displayed equally
 
nope, but that's impossible to maintain
 
11:00 AM
how do you deal with those then
 
Actually I don't think they are 100% equal.
 
you mean how to convert them to int?
 
@Adnan yes
 
just ï should work
@EriktheOutgolfer In 05AB1E?
 
@Adnan do you see any way to golf this?
 
11:03 AM
Yeah, I think that, while they behave the same, I remember a case (I think equality tests) where I needed to use ï.
 
@LeakyNun This for a start
 
@LeakyNun You could use ¹ to retrieve the first input again: Ln¹%êï
@Emigna hahahaha
 
Thanks both
 
:)
 
@EriktheOutgolfer That used to be the case, but I think that's fixed now
 
11:05 AM
I forget, what does one call an expression like "A is to B as C is to D?"
 
@LegionMammal978 analogy
 
@LeakyNun Funny thing is, I woke up right as you posted this message :P
 
@ETHproductions heh
 
Lesson of the day: Please, please, please do yourself a favor and don't ever try to calculate all combinations of a 26-item list with Japt...
Your browser will hate you for life, and you'll probably hate Japt for life
 
11:21 AM
AKA use tio instead
 
I don't think TIO will even finish with the current combinations algorithm
I have an improved one that uses a cache though, and IIRC it significantly speeds things up, so I'll try it out
 
but it will stop you before it crashes
 
Yeah true, the asynchronicity helps too
Let's see... testing 21-item combinations in Chrome, the current version takes about 3 seconds to finish each time
The cache version takes about 4 seconds to finish the first time, then 0 seconds every subsequent time
Now, actually displaying the result takes a bazillion times longer, so I just had the program return 0
 
11:42 AM
Quick question: If you asked a program to calculate all combinations of [0,1,0,1], what would you expect as the result?
Never mind, I should've just asked a program :P Japt says [[0,1,0,1],[0,1,0],[0,1,1],[0,1],[0,0,1],[0,0],[0],[1,0,1],[1,0],[1,1],[1],[]]‌​, which seems exactly right
 
 
2 hours later…
1:32 PM
1
Q: Surprise Party for Brain-Flak

Wheat Wizard This question is part of a series Brain-flak Birthday challenges designed to celebrate Brain-Flak's first Birthday. You can find more information about Brain-Flak's Birthday here Today is Brain-Flak's first Birthday! So I thought we would throw it a surprise birthday party. So in your favo...

 
 
1 hour later…
2:45 PM
@Erik​theOutgolfed Look at this
 
@LeakyNun Wow that's a completely different approach. Technically, you can also use \ÿ at the end.
 
Thanks
 

« first day (2283 days earlier)      last day (2576 days later) »