« first day (2383 days earlier)      last day (2461 days later) » 

10:00 AM
even though you can actually just do +q5...
 
so the story behind the conditional
 
?q5Qh
@EriktheOutgolfer >_>_>_>_>_>_>_<_<_<_<_<_<
I thought it was clever :((((((((((((((((((((((((((((((((
Shoot
CMC: Given a list that is guaranteed to contain primes, extract the primes.
[2,3,4,4,5,5,9,7] -> [2,3,5,5,7]
 
in anime, numbered ranking systems from 1-5 are pretty popular, and these almost always result in the plot leading to some never-before-seen "level 6"
 
I can abuse the fact that it is guaranteed to contain primes ¯\_[:-)]_/¯
Anyone?
 
@Mayube n=>n+n==5
@Mr.Xcoder O_o
 
10:11 AM
P_P
 
@Mayube in a certain webcomic it uses a number system from 1-10 and it results in the plot leading to some never-before-seen level 11 12 37
@Mr.Xcoder Q_q
 
Yeah, I try to invent creepy faces X_x
 
@Mr.Xcoder F_f
 
Y_Y
 
We should stick with ಠ_ಠ
 
10:14 AM
>_> is objectively better
 
Searching google about the physics of a pendulum. Find a question on Physics.SE, look at the answer and the answerer: Martin Ender >_>
 
really >_< :p
 
Yes
Could not believe my eyes.
@EriktheOutgolfer I shouldn't be that surprised though, he has a degree in theoretical Physics >_<
 
> PhD student in computer graphics/visualisation with degrees in software engineering and theoretical physics.
 
@EriktheOutgolfer Ninja'd
 
10:24 AM
no
 
?
Anyway, bye all!
 
btw I've simplified this any feedback?
@Mr.Xcoder bye
 
doesn't Leaky have a degree in math too?
 
@EriktheOutgolfer My feedback:post it when I am online
@Mayube He's 18, I doubt so
o/
 
@Mr.Xcoder heh cheater :p
 
10:26 AM
CMC: Given indices from top left (origin 0 or 1; state which), return the name (uppercase or lowercase; state which) of that square on a chessboard. E.g. 2,3 (1-indexed) → G3
 
and 8, 7 would be A7?
 
@Mayube Yes.
 
Braingolf, 9 bytes (trailing space cos weird bug) 9<-=#@+@
 
both have to be 1 or 0 indexed?
 
@Adám Jelly, 8 bytes: ØAḣ8Ṛ⁸ị;
 
10:31 AM
@Adám SOGL, 5 bytes: 9κZWΚ. Expects 1st input on stack because I'm stupid
 
@ASCII-only Yes, you cannot mix indexing styles.
 
Charcoal, 6 bytes: §α⁻⁸NS
Didn't make a difference anyway i was being stupid lol
Uppercase (can be changed, origin 1), takes second argument as string
 
CMC (KC):
┌──┬──┬──┬──┬──┬──┬──┬──┬──┐
│H1│H2│H3│H4│H5│H6│H7│H8│H9│
├──┼──┼──┼──┼──┼──┼──┼──┼──┤
│G1│G2│G3│G4│G5│G6│G7│G8│G9│
├──┼──┼──┼──┼──┼──┼──┼──┼──┤
│F1│F2│F3│F4│F5│F6│F7│F8│F9│
├──┼──┼──┼──┼──┼──┼──┼──┼──┤
│E1│E2│E3│E4│E5│E6│E7│E8│E9│
├──┼──┼──┼──┼──┼──┼──┼──┼──┤
│D1│D2│D3│D4│D5│D6│D7│D8│D9│
├──┼──┼──┼──┼──┼──┼──┼──┼──┤
│C1│C2│C3│C4│C5│C6│C7│C8│C9│
├──┼──┼──┼──┼──┼──┼──┼──┼──┤
│B1│B2│B3│B4│B5│B6│B7│B8│B9│
├──┼──┼──┼──┼──┼──┼──┼──┼──┤
│A1│A2│A3│A4│A5│A6│A7│A8│A9│
└──┴──┴──┴──┴──┴──┴──┴──┴──┘
 
@Adám wait we have to use unicode?
 
@Adám KC?
 
10:38 AM
Kolmogorov Complexity
 
@ASCII-only ninja'd
@EriktheOutgolfer Yes, or a CP which includes the chars.
 
@Adám Unicode :( :( :(
 
@Adám hmmmmm...
 
It's been five years. Can someone ungolf this for me so I can finally understand how it actually works? — J B Feb 17 '16 at 22:56
 
Btw, for the chessboard square name in APL: ⎕A[9-⎕],⍞ (prompts for column, then for row; 1 indexed, uppercase)
 
10:45 AM
@Adám Braingolf, 482 bytes
 
@Mayube Braingolf???
 
Braingolf is bad at ASCII art
especially when unicode is involved
 
@Mayube at least do string multiplication pls
 
maybe one day
but probably not
 
@Mayube 10 bytes less than the number of characters. I'm sure you can do better.
 
10:49 AM
would do this but no time rn :(
 
@Adám 323 bytes
 
bytecount is horrible bc I'm too lazy to make it not unicode but still
https://dzaima.github.io/SOGLOnline/?code=JXUyNTAwJXUyNTAwJXUyMDFBJTBBJXUwMTU3JXUwMTU3JXUyNTAyJUE2JTBBJXUyNTNDJXUyMDFBJUIwJTBBJXUyNTM0JXUyMDFBJUE3JTBBJUI2JUIyJXUyMDc4JUE2JUI2JXUyMDNEJTBBJXUyMDFBJXUyNTJDJXUyMDFBJUM2JTBBJXUyMDFBJUE3JUU2JTBBJUE2JUE2JUJCJTBBJXUyNTFDJUIzJXUyMDc1JUIwJXUyNTI0JUFCJTBBJUM2JXUyNTJDJXUyMDFBJUIxJTBBJUU2JUE3JXUyMDc5JTBBJUJCJUE2JXUyMDc4JTBBJUIxJXUyNTJDJUM2JXUyMDc3JTBBJXUyMDc5JXUyNTM0JUU2JXUyMDc2JTBBJUIwJUIwJUIwJXUyMDc1JTBBJXUyMDNEJUFCJXUyMDNEJXUyMDc0JTBBJXUyMDFBJXUyMDc1JUIwJUIzJTBBJXUyNTAyJXUyMDc4JUJC
 
@Adám Dyalog APL, 12 bytes, ⊖8↑⎕A∘.,⍕¨⍳9
 
0
A: Sandbox for Proposed Challenges

SanchisesRotation hardened quine code-golfquine Your task is to write a proper quine (a program that takes no input, does not read its own source code, and prints exactly1 its own source code), with a twist. Your program must also be a quine if the source code is shifted circularly an arbitrary number ...

 
@dzaima @EriktheOutgolfer @Mayube @ASCII-only Let's score this one in chars, as long as you don't jam multiple chars into single Chinese ones.
 
10:58 AM
@Adám I don't think that's possible
 
was my solution the intended one or can it still be golfed further?
 
especially since 1114111 is the upper limit to that
 
@Adám then yeah 261 chars
 
@Cowsquack That requires ]box on or using TryAPL (which is Unicode only)
 
a solution without ]box on is going to be much tougher
 
11:00 AM
I have a program that golfs compressing strings, but it makes my computer unusable. I gave it that board and accidentally told it to do 20000 attempts while 200 take a minute.. took a bit to get my computer usable again lol
[131 chars](dzaima.github.io/SOGLOnline/…
 
@Cowsquack Well, you can prepend ⎕CY'dfns'⋄disp
 
rip the OEIS polyglot challenge :( it got the 5th VTC 1h ago
Would it be OK to essentially repost the challenge and ban constant sequences so it's not a dupe of the older challenge?
 
@Cowsquack Yeah, that works well.
 
(and do we mark challenges as dupes of dupe-marked challenges even if they're not dupes of the "canonical" challenge?)
 
@dzaima :| is this sogl's secret
what kind of compression algo do you use O_o
 
11:03 AM
@ASCII-only SOGL has 2 different compressors (one of which is public (and not the ode used there))
 
what's the difference
 
@ASCII-only one is a custom mixed base compressor which has english, ascii, char custom dictionary, boxstring (dictionary of any of `-_ ŗ\n/`) and the other is a simple substitution thing (the one used here and the one with an unpublished compressor)
 
@dzaima substitution is golfier? O_o
 
@SEJPM Ah, a = b, b = c, a ≠ c.
 
@ASCII-only the problem with the other one is that is has no unicode stuff because I'm lazy to make that and I'm too lazy to do replaces
 
11:07 AM
@dzaima ...
 
@Adám is JS allowed
 
@Adám off-topic :p
 
@ASCII-only js?
 
@Adám I could do a very hacky SOGLOnline solution but processing.js is too horrible to do anything with
 
11:10 AM
 
@ASCII-only also a problem with the mixed base one is that it sucks at repetitive stuff (which substitutions are made for)
 
@Adám This would work in C#, except you can't boolean compare 2 methods :(
static Func<int> a() {return b;}
static int b() {return 7;}
static int c() {return 7;}
a() == b, b() == c(), a != b
oh the same approach works in python though Try it online!
 
@Adám JS: a=[],b=+[],c=[]
 
@Mayube *a != c()
 
11:17 AM
a != c
 
also not valid
 
oh right I typod
 
you have b in one and b() in the other
 
too late to edit
 
@Uriel Huh, how does that work?
 
11:18 AM
a() == b, b() == c(), a != c
 
or a=0;b=false;c="";
 
@Adám apparentaly []!=[] (but []==0).
 
@dzaima :| sogl doesn't deserve to be golfy :P
@Uriel +[] is 0 btw
 
@ASCII-only yes, I just came back to write it. works the same
 
@Mayube doesn't count
 
11:21 AM
sure it does :P
 
Ah, while I wrote my APL solution does actually cause a=b and b=c but a≠c.
 
1
Q: Machine code submissions: Do bytes that are part of the executable file format count?

Felix PalmenImagine you're submitting a full program (as opposed to a function) written in assembly / machine code. You'll want to submit it as machine code (with the appropriate processor and target system) because there's a 1:1 mapping, but the machine code format is much more concise. In this answer, it'...

 
@Adám yeah, possible in most languages
it's just using JS feels like cheating :P
 
@ASCII-only I'd like to see those.
 
ok, bit busy rn though
 
11:36 AM
@Adám I have turned this interesting problem into a Meta Q:
0
Q: How transitiv are Duplicates?

SEJPMSuppose I have a closed challenge O and an old challenge P and want to create a new challenge nC. O is closed as a duplicate of P because entries from P are competitive in O because O allows a super-set of entries from P. Now all entries from nC will be (likely?) competitive in O but 100% are ban...

yes I know the bot will post it as well
 
@SEJPM +1 for style. Must be the most abstractly formulated Meta question ever.
 
@Adám magic
i'd imagine similar things can be done for all oo langs e.g. python
 
@ASCII-only :-)
 
too lazy to make it underhanded
 
2
Q: How transitiv are Duplicates?

SEJPMSuppose I have a closed challenge "Closed" and an old challenge "Old" and want to create a new challenge "New". Closed is closed as a duplicate of Old because entries from Old are competitive in Closed because Closed allows a super-set of entries from Old. Now all entries from New will be (likely...

0
Q: Can JS answers require the code to be run at a certain domain?

BirjolaxewIn challenges that require loading remote data - e.g. "What's my PPCG ID?" - some JavaScript (or other languages that may be run in the browser) answers may rely on being run at a certain domain (example answer), or may include extra code to safe-guard against being run at a certain domain (examp...

 
11:46 AM
overriding the operators definitely feels cheaty
 
@Mayube no it's a normal thing to do
like if you even want to use them on a class you usually need to override them to get them to do what you want them to
 
I'm aware. I mean it feels cheaty for this challenge
 
@Mayube why :(
can you think of a less cheaty way
 
I think the js solutions posted are less cheaty
as was my python solution
imo at least
 
uh no
your python one wasn't valid
 
11:51 AM
yes it was
 
since when was a the same as a()
 
@Mayube looks very to me
 
besides you could do pretty much the same thing with C# properties
 
Anyone seen this Vim game?
 
11:53 AM
@BetaDecay "exit vim the fastest"?
:p
 
12:04 PM
0
A: Sandbox for Proposed Challenges

SanchisesSmall plane or big plane? image-processingdecision-problem In the spirit of Upgoat or Downgoat?, for a set of images, write a program or function that determines whether it's an airliner or a light (general aviation) airplane. Left: Big plane, source. Right: Small plane, source. Input An i...

 
12:27 PM
:D sed calculator is pretty easy idk why nobody's done it yet
 
12:38 PM
1
Q: Will I make it out in time?

Pietu1998Inspired by this. Background The evil farmer has decided to burn your wheat field down in order to drive up the prices. To ensure total destruction, he has also soaked your field in gasoline. Even more unfortunately, you happened to be walking on the field when it was lit on fire, and you must ...

 
sed calculator, only need to add division and floats, will finish tomorrow
https://tio.run/##jZRRb4IwEIDf@yuauAeBlHIgIrz4tF9BNXHTLCTdNOIelvS3j90drTNu06mA/e7r0bui/W47DL2WidYvYtJs9ycx6fXUpEk0bTNVryJtcgOpFhNtUib6SZLWa/OECpABFmc372@b4wfz2tVWQ3hRkOjCLb5pgJWrzjCwuZsHFlDpSo8CmbnZSAIoXMEgjHOX0zgMYdquwa7cQ6TBGvB0Cklkz5XCL@98TJBZTV@0bdtm2710p2ZFnRhrbvaH3XFz6vZvPaprxVlNTBe8v8L@xJiH2kRhH1V/hdUy8ooB72A4NoWlxYjm1L3u@isTxkLoRGXkZjZOwB4JvYaEFDzjBxd9ncBGGP2eXJhcX5SRLBU7tFAf8YERnynwWEHA6opT8hHYICkieKdlmrQqiY2mnl40s9nunrvXjfV7FUc/N@jiMcMO1ud9veWyuviPymb1D5PF@X2RvfKux9rsnsZWccdiKb8tsQM3HVYyr1jNvwX6K7jYoAzpMIBM
for this
 
12:55 PM
wow you're actually doing it
 
@Cowsquack yeah why
it's the easiest of the permanent bounties by far imo
the others require quite a lot of esolang knowledge e.g. the brainfuck and klein ones, while i'm familiar with them i don't have the skill to outgolf primo and wheat wizard :P
 
what is the purpose of the l?
 
@Cowsquack placeholder to indicate progress of base conversion
but i guess it would be golfier to remove it and then add it back later
oh btw if you want feel free to steal it :P all i really want is for there to be one less permanent bounty + less work for me
well tbh i'm kinda stealing off reregex
 
@BusinessCat Explain.
 
1:02 PM
there are some tips for base conversion in the "tips for golfing in sed" thread. Take a look at this one, for example: codegolf.stackexchange.com/a/115617/41805
 
Eyes?
2
A: Sandbox for Proposed Challenges

Step HenLevenshtein Your Source code-golf quine string The Levenshtein edit distance between two strings is the minimum possible number of insertions, deletions, or substitutions to convert one word into another word. In this case, each insertion, deletion and substitution has a cost of 1. For ...

 
@Cowsquack oh >_> oops
 
@Adám , is range. = is overloaded: it's equality check for two things of the same type, but it is also "get element at index". So for the first two, it's getting the element at index 1, which is 1, but the last time is checking equality between the range up to 5 and the range up to 4
 
hmmm, but the link I posted was only for single numbers, it would need modification to fit the input for calculator
ooh, you're doing full unary. When I was thinking about attempting this, I was thinking of something like this: 13 => 1 111
 
That's interesting
But full unary is probably better
 
1:08 PM
@Cowsquack why though wouldn't it be way too hard
 
that's what I used for the "reciprocal of a number" challenge that I attempted in sed
this way, I could use long division
 
wait scratch that, I actually converted the input number to full unary, the result was in broken unary
 
ok need to sleep now but pls ping if you have any golfing tips/make some progress or anything
 
sure
 
1:19 PM
waits for the bot to post the new sandboxed challenge
 
peers in
 
I got a survey with a bunch of conditional go-to statements on it.
Do you think it's safe to take?
 
greets @muddyfish
 
Hey
 
0
A: Sandbox for Proposed Challenges

SEJPMPolyglot the (non-const) OEIS! code-challengerosetta-stonesequencepolyglot Disclaimer: This is heavily inspired by "Polyglot the OEIS!" but fixes the problem that lead to closure (see the output setion) and was re-posted as to not invalidate answers. Introduction We all know and love the on-l...

 
1:23 PM
^ I will post this as soon as I have affirmative answers on the meta post
 
I really liked the original challenge, it's a shame that constant sequences had to ruin it
Tbf, constant sequences are the bane of OEIS challenges
 
1:56 PM
// cast the result of the final character addition to a 32 bit int.
val = val << 0
<.<
 
what language is that
 
@HyperNeutrino looks like python
 
// python uses # for comments
 
@StepHen // comment
it's JS
 
oh then it's probably JS
cuz I'm dumb
 
1:57 PM
oh well if it's JS then yeah I guess I wouldn't be too surprised if people did that
 
golfed: val<<=0
 
>.>
function hueHash(text, offset = 0) {
  // DJBX33A-ish
  let val = 0
  for (let i = 0; i < text.length; i++) {
    // scramble char codes across [0-255]
    // prime multiple chosen so @greenie can green, and @redtaboo red.
    const charVal = (text.charCodeAt(i) * 439) % 256

    // multiply val by 33 while constraining within signed 32 bit int range.
    // this keeps the value within Number.MAX_SAFE_INTEGER without throwing out
    // information.
    const origVal = val
    val = val << 5
    val += origVal
ok that was bigger than i thought
o0
 
@totallyhuman is that a custom hash function
burn it with fire
 
#MD5AllTheThings
 
didya just ignore the hue part of the name :P
 
1:58 PM
Is that a color hashing algorithm
 
... who said you can't use SHA for colors
 
i'm trying to port to python but y'know... dumb... number standards...
@StepHen look man i didn't write it :P
 
@WheatWizard cQuents: $0#9"::$
 
but that's actually golfy
 
2:01 PM
barely
 
why are you porting this again?
 
because
direct code translation: pastebin.com/k8vDtRAH
 
@StepHen ''.join(eval('['+','.join('chr('+str(x)+')'for x in list(map(int(48).__add__,__import__('itertools').takewhile(int(10).__gt__,range(20))))‌​‌​)+']'))
 
now i just need to sort out the number weirdness
 
2:03 PM
And also your code gets automathjaxed by the chat preview :P
 
does anyone know of any 2d matching languages that have the ability to change quantifiers during runs?
 
@notjagan browse this:
45
Q: Language Design: 2-D Pattern Matching

PhiNotPiThis is Fortnightly Challenge #6. Theme: Language Design There's a chatroom for this challenge. Come and join us if you want to discuss ideas! And now for something completely different... This fortnight, we want to experiment with a new type of challenge. In this challenge, you will be de...

 
I tried using Slip but AFAICT it has fixed quantifiers
 
Two sandbox posts I'll post soon, if anyone wants to look at them: here and here
 
@StepHen tag the first one with path-finding
you're basically finding the shortest path on a graph representing the times
 
2:09 PM
@NathanMerrill OK, will do - I can't think about it that abstractly :P thanks
 
hey so that thingy is for the xkcd substitutions
i was wondering if i can put html tags in the replacements
any JS people?
 
@totallyhuman is that for tooltips?
 
I know some
 
@totallyhuman if it is for tooltips (the hover bit) html doesn't work iirc
@totallyhuman looked into that a bit more - you could put HTML tags in but it might not always work
as in there are some places where they won't be interpreted as tags, or where the site's CSS might make them look weird
 
o0
ok well worth a shot i guess
 
2:35 PM
@ASCII-only you also need to support negative numbers
also the bounty asks you to support up to 4 decimal places, see the comments under codegolf.meta.stackexchange.com/a/12039/41805
 
Someone want to check my sandboxed post?
1
A: Sandbox for Proposed Challenges

TheLethalCoderNumbers Increase While Letters Decrease code-golf sorting Inspired by this Stack Overflow question: Sorting a list: numbers in ascending, letters in descending. Your task is to solve the following problem and, as this is code-golf, you should do so in as few as bytes as possible. You should ta...

 
0
A: Sandbox for Proposed Challenges

AdmBorkBorkConstruct a tournament bracket code-golf ascii-art string Given an input list of strings, guaranteed of size 2,4,8,16,etc., output an ASCII art representation of the tournament. The winner of each round is always the word sorted alphabetically later. Each entry must be the same length, padded w...

 
CMC: Explain why ⊢⌹=⍨ calculates the average (mean).
 
@Cowsquack Is it possible to answer this challenge in the current version of Carrot? I thought $^/$ would work with string first line index second but it doesn't seem too.
 
@Cowsquack yeah ik
 
2:45 PM
@Adám Because Dominos
 
@StepHen Yes, but a bit more detail…
 
@Cowsquack ok
@Cowsquack I already do pretty much
@StepHen well they act as strings
 
@ASCII-only well it borks with something like 1-2+3
@TheLethalCoder unfortunately not, $ only acts like a number when the program is in floatMode
 
@Cowsquack oh ok will fix addition tomorrow then
 
@StepHen I updated to allow strings because a string is usually a char array underneath anyway.
 
2:48 PM
also your unarifier leaves the last digit untouched. Why? oops
 
@TheLethalCoder Yup, that's what I was saying in my (now deleted) chat messages
 
@Cowsquack I assumed that to be the case but it seems to work in the element at challenge when in regex mode $^//.{#}/S1//.$/
 
@Cowsquack >_>
 
@TheLethalCoder the current interpreter is really weirdly written: github.com/kritixilithos/Carrot/blob/gh-pages/script.js#L341, but the one I'm working has that sorted out, all that's left is to support ()
 
@Cowsquack So should the regex example not work then? In the new one if I do F$ will it take the input as a float or keep it as a string or just do something odd? Would be nice to take input in the format of your choice like that.
 
2:52 PM
@ASCII-only also I found a shorter unifier: Try it online!
 
Anonymous
@ASCII-only What isn't working?
 
@Cowsquack So should the regex example not work then? In the new one if I do F$ will it take the input as a float or keep it as a string or just do something odd? Would be nice to take input in the format of your choice like that.
 
@TheLethalCoder it should work because of this line: github.com/kritixilithos/Carrot/blob/gh-pages/script.js#L379. But in the newer interpreter, you will be able to take input in whatever type you want, because the input is also tokenised by the same lexer as the program's lexer
a string input is taken like "string here" instead of just string here
 
@Cowsquack Ahh okay so string input will now have to be surrounded by quotes? That works better than F$ anyway.
 
@Mego everything, Unicode error
 
3:03 PM
1
A: What's my PPCG ID?

totallyhumanPython 2 + requests, 173 bytes lambda s:[i['user_id']for i in get('http://api.stackexchange.com/users?inname=%s&site=codegolf'%utils.quote(s)).json()['items']if i['display_name']==s] from requests import* Sample run >>> f=\ ... lambda s:[i['user_id']for i in get('http://api.stackexchange.co...

i finally have a valid answer that out-golfs everybody
finally
gah
 
Anonymous
@ASCII-only Very useful debug information
 
Hi! Is there anyone familiar with Neim? Does it support list of lists?
 
@DeadPossum cc @Okx
 
3:32 PM
Oh my god... I have a broken Pyth solution to Pietu's challenge and it's >60 bytes long
Khlh.zJxs.z\O.Am}\Fd,m>+@.zk.a-J/JK%JKU.zm<>@.zkeS,0s.DJKh-JK>U.z/JK
And it's terribly ungolfed
 
0
A: Sandbox for Proposed Challenges

TheLethalCoderThe Mode of an Image fastest-code image-processing Given an image as input, output it's mode; that is the colour that appears most in it. However, I am on a tight schedule and so need this code to compute as fast as possible. Input Input can be in any reasonable format for your program i.e. f...

 
Last call:
2
A: Sandbox for Proposed Challenges

Step HenLevenshtein Your Source code-golf quine string The Levenshtein edit distance between two strings is the minimum possible number of insertions, deletions, or substitutions to convert one word into another word. In this case, each insertion, deletion and substitution has a cost of 1. For ...

 
3:53 PM
CMC: given a string, output the raw MathJax required to bifurcate that string at each character, into subscript and superscript. For example: Input: cat Output: c_{a_{t}^{t}}^{a_{t}^{t}}
 
whoa
 
@totallyhuman prepend a / to it so that everyone else can see it too
(that is, if you have chatcommands)
 
whoa
i didn't even know you could do that
 
3:57 PM
I just found out by trying. Had to write a program to generate the raw code because I foolishly chose the word "bifurcate" as my test text, which would take quite some time by hand.
Would that be too trivial for main?
 

« first day (2383 days earlier)      last day (2461 days later) »