« first day (2325 days earlier)      last day (2517 days later) » 

10:00 AM
@Shaggy congratulations!
guys, I'm planning a challenge
the easy version would have two numbers as input
the difficult version would have a list of numbers as input
which one should i post?
 
depends
 
@LeakyNun What's the challenge?
 
@Adám I prefer to keep it secret until I post it.
 
@LeakyNun Then how are you expecting us to answer your Q?
 
@Adám alright
 
10:12 AM
@LeakyNun XKCD 8-ball says: 🏇☔
 
@JanDvorak I'll post the easy version and hope that it isn't a duplicate.
It seems that easy challenges are quite popular.
 
Have you tried using the sandbox?
 
@JanDvorak I don't.
that said, I do recommend people to use the sandbox :p
 
when are you going to post it?
 
I found a relevant challenge....
 
10:17 AM
what is the challenge?
 
@KritixiLithos within 15 minutes, if I can convince myself that my question wouldn't be closed as duplicate
@KritixiLithos Alright, I'll comment the challenge as relevant and leave the decision to the community. I'll start writing the challenge now.
 
Hehe it's not often we find a celebrity on PPCG :D
 
@BetaDecay who are you referring to?
 
Jim Davis
 
hardly a celebrity though
 
10:27 AM
Meh good enough
Someone a load of people recognise from outside PPCG is maybe a better description
 
but it was sad how he was treated with a downvote when he posted his answer
 
you can find terrence tao on math.overflow though
 
Terrence Tao?
Nvm found him on wiki
 
Lake Disappointment, or Kumpupirntily in the indigenous language, is an endorheic salt lake located in the Pilbara region of Western Australia. == Description == The 33,000-hectare (82,000-acre) lake typically is dry except during very wet periods such as the 1900 floods and in many recent tropical wet seasons since 1967. It lies on the Tropic of Capricorn, due east of the mining town of Newman and the Jigalong Community. It is at the northern side of the Little Sandy Desert and south of the Karlamilyi National Park. The Canning Stock Route passes down the western shores of the lake and t...
 
posted. @KritixiLithos
 
10:33 AM
Do you always carry above the number? I only do that for subtraction, so ¹9 becomes 19
 
@BetaDecay I don't write the carries when I add up two numbers
but when I do, I write it below the addends
 
I carry above the number
 
however, it looks real ugly if I do this there.
 
@LeakyNun I see, yeah that's what I do.
 
2
Q: How many carries do I need to add these two numbers?

Leaky NunTask Given two positive integers, output the number of carries needed to add them together in long addition in base 10. Examples ¹¹¹ <-- carries 999 + 1 ---- 1000 Three carries are needed. ¹ 348 + 91 ---- 439 One carry is needed. Testcases 999, 1 -> 3 398, 91 -> 1 348, 51 -> ...

 
10:44 AM
Is my challenge that difficult? It's been 12 minutes.
 
Anonymous
Most people are asleep right now. It's unreasonable to expect answers in 12 minutes.
 
@NewMainPosts (a,b,c=0,n=a%10+b%10>9)=>a&b?f(a/10|0,b/10|0+n,c+n):c :|
 
@ASCII-only why don't you post it there?
 
that looks so much like the code I am currently developing
 
@LeakyNun Yeah, doing rnn
 
10:46 AM
@KritixiLithos why don't you post it there?
 
mine isn't done yet
 
0
Q: Find the Mr of a Given Compound!

Beta DecayChallenge Given the formula of a chemical, output the Mr of the compound. Equation Each element in the compound is followed by a number that denotes the number of said atom in the compound. If there isn't a number, there is only one of that atom in the compound. Some examples are: Ethanol (...

 
68 bytes in C
 
@KritixiLithos why don't you post it...
 
10:58 AM
it's still being golfed
this is my first C submission
@ASCII-only I need a bit of C help
 
@KritixiLithos Remove the =0
@KritixiLithos ok, what do you need help on
 
how do I make TIO output the results for all the testcases using my function?
@ASCII-only ninja'd by user1502040 few seconds ago
 
@KritixiLithos Just format the outputs? brb I'll send a link
 
@KritixiLithos here
 
simply printf("%d %d %d",f(num1,num2),f(num3,num4),...) doesn't work because I think the i and l are global
@LeakyNun but what about for my submission? ∧
 
11:06 AM
@KritixiLithos Oh then use bash
 
I can't do it in C?
 
@KritixiLithos here
 
@LeakyNun No he needs to reset global variables
@KritixiLithos Then just reset them every time you run the function
 
@ASCII-only yes he needs to; his current submission is invalid because of that.
 
it borks
 
11:08 AM
@ASCII-only no it's invalid
you can have global variables, but you must reset it inside the function
@KritixiLithos your submission is invalid.
 
@KritixiLithos you need to initialize the global variables inside the function.
 
okay, fixed it, I had to use a non-recursive approach
 
@KritixiLithos i,l;f(a,b){i=l=0;i+=a%10+b%10+l>9?l=1:0;a=a+b?f(a/10,b/10):i;} isn't allowed?
 
@ASCII-only that is allowed.
whether it is correct, I haven't checked it.
 
11:18 AM
@ASCII-only it gives 0 for all the testcases
because i and l are initialised to zero every iteration of the recursive function
 
@KritixiLithos Oh yeah
@KritixiLithos btw testcases
 
11:42 AM
0
A: Sandbox for Proposed Challenges

L3viathanstdin FPS Count the input FPS ("F"s per second) Task: Read a potentially infinite text stream. While you do, display (at least once per second) your FPS, i.e. the amount the characters "f" or "F" appeared. The FPS has to be accumulated over a time frame of at least 5 seconds, meaning you can'...

 
12:12 PM
Why is chat so quiet?
 

 The Nineteenth Byte

The Nineteenth Byte: General discussion for codegolf.stackexc...
Look at the blue line
 
Its not at its low point
is there a way to browse chat anonymously?
 
I always open a chat in incognito mode
 
@Arjun I like that definaition
 
12:19 PM
@cairdcoinheringaahing Yeah, transcript
 
@ASCII-only as in the current conversation
 
@cairdcoinheringaahing Refreshing the transcript :P
@cairdcoinheringaahing Or just log out
 
@cairdcoinheringaahing Thanks! :)
 
unrelated: how does the jelly compression work?
 
@cairdcoinheringaahing Dictionary compression (dictionary indices)
 
12:25 PM
@Mr.Xcoder Do you still answer on StackOverflow?
 
12:42 PM
@Arjun Yes, I do still answer (once a week maybe) on SO.
@Arjun why are you asking? Have we ever answered each other on SO>
@Arjun are you still on?
 
Hmm
Occasionally, when I paste out of a Mathematica notebook, a random character is added to the end
There doesn't seem to be much of a pattern to this; here's the result of several repeated pastes, where a space represents no extra character:
!AA 11 A11q A11A!A1A111q1! 1!! A1!AAaA1!q 11aaQAa1QA1Qa11  1!1AqQ!Q1 1!a11a1 A1aQ1 11 a1!1AAq  !!1A11Q
CMC: Find a pattern in this
 
@LegionMammal978 Mathematica randomness of A, !, q, Q, a and 1, obviously :)))
 
@Mr.Xcoder But why those characters?
 
@LegionMammal978 Because we are talking about Mathematica, duh :)))
 
@Mr.Xcoder I find it very difficult to find out a good question to answer. Most of javascript tagged question seek help regarding an external library. I don't think there are any good native JS questions left. :(
@Mr.Xcoder Sorry for the delay. I was away from the keyboard.
 
12:54 PM
@Arjun that's true... The same applies for most of the Python and Swift questions
And that's mainly because people have a pleasure in receiving a good question about the language badly...
 
Poll : Do you think the quality of questions on StackOverflow is getting worse day by day?
 
Okx
the only se site i'm active on is ppcg
 
@Arjun for anonymity
 
I'm on SO as well, the complexity is getting higher and higher
 
@Okx So am I.
 
Okx
1:03 PM
but yeah i think the so questions are pretty low quality, where most of them are posted by users with < 100 rep
 
Question : Does using a template make me a bad web developer?
 
YEs.
 
@Mr.Xcoder Yes to me or Okx?
 
Okx
@Arjun no because laziness is the most important thing when you're a web developer
 
@Arjun to both.
 
1:06 PM
ooh
CMC : Given a string s, output s with all runs of same letter, condensed. Like heelloooooo to helo.
@Arjun JavaScript, s=>s.replace(/(.)*/g,"$1")
 
Really :|
 
Retina, 3 bytes: D`.
 
Okx
@Arjun 05AB1E, 1 byte: Ô
 
Sorry, my answer is wrong.
 
1:16 PM
s=>s.replace(/(.)\1*/g,"$1")
 
What's that \1?
Using $1 inside the regular expression?
 
1:32 PM
\1 matches the content of the first capture group
\n matches the content of the n-th capture group, where n is a number
if I didn't mess anything up
 
2:06 PM
@KritixiLithos I'm surprised you didn't bring up Röda
 
0
Q: Why should Brain-Flak pay for input when Python doesn't have to?

Wheat WizardCurrently if you wish to take input as a string in Brain-Flak you are going to need the -A flag. This will cost you 3 bytes. Currently if you would like to take input as a string in Python you are allowed to use input() and assume that the input ins provided in a proper string format (Python IO...

 
in which case, it would be something like {_/""|uniq} (untested)
 
2:25 PM
Is @Dennis South African?
 
that's random
 
@KritixiLithos ?
that's random?
Is Dennis South African? -> that's random
 
@Arjun no, he's German, if I recall correctly
although he's in South America, also if I recall correctly
 
I think Martin is also German.
Yes he is.
 
2:41 PM
@HelkaHomba Strings don't have a default Comparator. They are Comparable, which is why you can't find it
 
@LeakyNun Are you Japnese?
 
@Arjun I'm from Hong Kong, which makes me ethnical Chinese.
and I rather not deal with politics.
 
ok
 
2:56 PM
@LeakyNun Because Hong Kong used to be it's own country until it was recently bought by China, right?
 
@DJMcMayhem no, more complicated than that
 
Oh?
 
Hong Kong was a colony of UK, or GB, idk&idc
and then in 1997, the contract expired, and HK was returned to China
and then I'll skip 1000 words because you probably aren't interested
 
@LeakyNun I'm interested enough to ask about it :P
 
alright
but then before the return, ppl are freaking out
 
2:58 PM
@Arjun I meant the question was random, it came out of nowhere
 
so China promised to not care too much about HK
so HK became HKSAR (special administrative region)
and China doesn't interfere too much
but HK isn't a country in its own right
because China says HK isn't
e.g. the military and foreign relationships are taken care of by China
but somehow HK has its own olympic team
so the situation is very complicated
 
Is Mandarin the official language?
(Google just says Chinese without being more specific)
 
we have three official spoken languages: Cantonese, Mandarin, English.
and two official written languages: (traditional) Chinese, English.
Is anyone familiar with Prolog?
p(0,1).
p(N,A):-M is N-1,P(M,B),A=[B].
I expect p(5,X). to give X=[[[[[1]]]]]
why doesn't it work as intended?
 
3:40 PM
@LeakyNun APL, 6 bytes: ¯1∘*×⊢
 
@Fatalize above
 
@Arjun APL, 11: {⍵/⍨1,2≠/⍵}
 
@Adám toeq*
(I know that was leakys CMC, not yours)
 
Does a code page have to have 256 characters on it or can it have less?
 
3:58 PM
@LeakyNun I'm here
 
@Fatalize the above
 
LOL
you wrote P(M,B) instead of p(M,B)
Prolog very helpfully told you false., quite obvious what the problem was really :p
 
that was stupid
 
TBF if you had opened the debug tab on TIO you would have seen an error
so it told you false because it only had compiled p(0,1)
 
@cairdcoinheringaahing It can have any number. For example, ASCII has 127 and utf-8 has too many to count
It's only limited by information theory and mathematics :P
 
4:09 PM
do you mean only one-byters?
 
Really all a code page is is an arbitrary mapping of Unicode characters to byte sequences of arbitrary length (usually 1)
 
4:31 PM
put another way: My code page could say that the byte "10001000" means "A", while your code page says that it means "B"
 
Also, I am designing a 2D language which fits on the edges of a cube and uses spaces and new lines in the unfolded version but cannot contain either in the compiled code. Does whitespace need to be included in the code page?
 
it depends: do you need those bytes?
before you define your code page, define the bytes 00 to FF
so, if your language needs a byte to be the delimiter between two other bytes, then yes, it needs to be in your code page
 
4:47 PM
@LeakyNun Jelly, 4 bytes: ḂḤ’×
 
@DJMcMayhem nice
 
Thanks! I'm not that great at Jelly, but that's a pretty simple program
 
5:08 PM
@DJMcMayhem Jelly, 3 bytes: N‘¡
 
@DJMcMayhem Nice. Can you explain it?
 
5:35 PM
ಠ_ಠ
 
@LeakyNun What does ¡ do? I can't find it on the wiki
 
@DJMcMayhem it's in the quicks
 
@Adám if a is the input, it computes (from left to right) (a%2)(doubled)(-1)(*a [the second 'a' is implicit])
 
Could I get a Haskell golfer to look at this?
 
5:46 PM
x:[] == [x]
function application is top priority and doesn't need extra parentheses
 
thanks
 
> You no longer have to fantasize about being a goat
ಠ_ಠ I am not fantasizing
 
@Downgoat where is that from?
a sheep?
 
@KritixiLithos goat-simulator.com
 
"To be completely honest, it would be best if you’d spend your $10 on a hula hoop, a pile of bricks, or maybe a real-life goat."
 
6:01 PM
real life goat cause $75-$150 and usually and extra $100 per goat
 
why would you want a pile of bricks
Or a $10 hula hoop
 
Okx
sheep > goat
 
quetion: how to golf:
var a = b
if (!a) a = c
else d.shift()
without duplicating b (JS)
 
I don't get the purpose of var a=b
 
b is more complex, i abstraction for this porpose
 
6:04 PM
and btw, you can drop the var if it is needed
 
Your current code could be var a=b?(d.shift(),b):c
@Downgoat Oh, so you can only use b once?
 
yeah
 
Hang on a second then
var a=b;a?d.shift():a=c
Dunno if you can get shorter
 
why do you need the var?
 
production code but has to seem at least a little readable
I don't think I can get shorter than:
let args = process.argv.slice(2);
let cmd = subcommands[args[0]];

if (cmd) args.shift();
else cmd = modes.Default;
in terms of removing the if with short-circeut (excluding a && b || c)
 
6:46 PM
Quick poll. Marmite: yes, no or dont know what it is?
 
I assume it's something like Nutella, in which case no
 
7:07 PM
@cairdcoinheringaahing nope
 
7:17 PM
Hey guys, It's been a LONG time since I've been here :P
New language I've been working on, I might answer a challenge some time with it.
 
@MamaFunRoll cool :D +1 for JS
:| Is source code intentional golf or just editor indentation borked
 
@JanDvorak you ever heard of Vegemite? Marmite is Vegemite's dad
 
7:39 PM
@Lembik Are you here? I've a question regarding your approximate correlation challenge. (see comment there)
 
@cairdcoinheringaahing Isn't it like a cooking oil?
 
0
Q: Read a password: on mobile!

musicman523Thanks to MD XF's recent challenge, we can now read passwords in many different languages! The problem is, now we need to port our applications to mobile devices, and they do password entry a little differently. Challenge Read a string from the keyboard. Each time a characterk is entered, disp...

 
8:03 PM
ufw gurus here?
 
What's ufw?
 
Oh, I was close enough :P
 
Clion keeps telling me it can't find a c++ compiler. I've done dnf install gcc and dnf group install 'Development Tools'
 
CMC: Given an ordered set and a member of said set, demote the member to the very end of the set. E.g. {2,7,1,8} and 7{2,1,8,7} and ["Mercury","Venus","Earth","Mars"] and "Earth" → ``["Mercury","Venus","Mars","Earth"]`
 
8:05 PM
._,
@Adám s->n->s.add(s.remove(n))
 
What language is that? JS?
 
Java
 
@Phoenix Ooh, Java being "shortish".
 
IDK how it works if the ArrayList given as input is an ArrayList of Integers, because if ArrayList.remove() is given an int it removes at the given index.
 
@Phoenix What if you wanted to promote instead?
 
8:09 PM
@Adám Add 0 as the second parameter to s.add()
 
@Phoenix A Java solution which is only 8 times the length of the equivalent APL is very impressive.
 
APL is a golflang it doesn't make sense to make that comparison.
 
Is there a challenge to output the MD5 of the input?
I can't find one.
 
@Adám JavaScript: a=>n=>a.push(a.splice(n,1))
 
@Phoenix What are you talking about? APL is not a golfing language at all. It is a commercial production language.
 
8:13 PM
@Phoenix I'm pretty sure that works with Integer, because it won't box it to an integer unless it needs to
so, it has two methods a.remove(Integer) and a.remove(int) called with an Integer will call the first method
 
@Adám idk what you're talking about :P
 
@Downgoat IDK what you're referring to.
 
@Downgoat if you learn Triangular I will make a goat builtin
 
goat builtin first
 
@Downgoat OOOH REKT LONGER THAN JAVA
I feel so happy rn
 
8:16 PM
@Phoenix REKT ?
 
@Phoenix opls to run labmda you have to do like:
interface Program<T> {
    Program2<T> execute(ArrayList<T>)
}

interface Program2<T> {
     ArrayList<T> execute (int n)
}

class Runner {
    public static void main(String[] args) {
        Program<T> prog = ....
        prog.execute(goat).execute(2)
    }
}
 
@Downgoat Not the point
A lambda is a valid solution in java
 
@ASCII-only Thanks! That worked.
 
@Downgoat Also no you can just assign it to a java.util.Function<ArrayList<Object>, Object>
 
opls
that typename is longer tha the program itself
 
8:19 PM
Actually it might be a differnet type, I think that one takes an ArrayList as a parameter and returns an Object.
 
0
Q: MD5 the input given!

programmer5000Your challenge is to output the MD5 hash of your input. The specification of MD5 can be found here. Crypto builtins are allowed. Shortest code wins.

 
nah, the type is really Function<List<T>,T>
 
0
A: Sandbox for Proposed Challenges

musicman523Quote my quote! code-golf string A quotation is "the repetition of one expression as part of another one". In American English, a quotation is surrounded by double-quotation marks ("), as in the previous sentence. However, this rule differs when a quote appears inside another quote. In this case...

 
8:38 PM
Mildly interesting:
 
Good job
 
That's the very first tag badge I've ever gotten that isn't on PPCG
 
I need 67 more votes for the silver badge
 
I just need 50 more answers for the gold.
 
Does anyone know why :t (\x -> ((show x) ++ " ")) gives (\x -> ((show x) ++ " ")) :: Show a => a -> [Char]?
 
user165474
8:41 PM
I still need 87 votes for the silver badge ;_;
 
I would like it to be Integer -> [Char], Is there some way to do this?
 
@MartinEnder I'd just like to say, Hexagony is very ... wow
 
Should I allow crypto builtins here: codegolf.stackexchange.com/q/125868/58826
 
In my opinion builtins should never be banned
 
@WheatWizard Never?
 
8:50 PM
yep.
 
Even for questions when there's a Mathematica builtin for the entire challenge?
 
The reason is twofold 1) There is no good definition of what a builtin is, and there likely never will be 2) If the challenge is simple enough that a good deal of languages already have a builtin then you should probably just treat it as a catalog, like the addition question.
 
Good point
Does anyone want a +200 bounty for writing a Triangular quine?
 
user165474
8:58 PM
@Dennis This is getting delete votes again; is that ok if it's deleted or should it stay?
 
user165474
@MDXF I'll try...
 
@HyperNeutrino Why should it not be deleted?
 
@MDXF it on TIO?
 
user165474
yesterday, by Dennis
@HyperNeutrino Posts shouldn't get deleted that quickly. The author might not even have seen the comment of close reason before it got nuked.
 
@WheatWizard nope, not yet
 
8:59 PM
Ok
 
user165474
Hm, seems too hard, I'll try if I have time.
 

« first day (2325 days earlier)      last day (2517 days later) »