« first day (2609 days earlier)      last day (2221 days later) » 
00:00 - 17:0017:00 - 00:00

5:21 PM
Gcc is already at 7. Hah. Gcc > clang
 
From the tag wiki:
> What makes a good code-golf?
[...]
Have built-in-to-some-languages solutions excluded
Surely this should be changed?
 
I think it needs a rewrite
because the example they give is a good one
you don't want eval in a mathematical evaluation challenge
 
@betseg operator (int) does not return the version
 
...I'm baffled by this answer: stackoverflow.com/a/1960580/1769273
they are counting by lines, and nobody commented on it?
I know it's old, but everybody else is counting by characters
 
SO was really underdeveloped as compared to us. Guess people didn't really care
CMC: Output your language's version of infinity
 
5:38 PM
 
R, 3 bytes: Inf
 
@cairdcoinheringaahing System.out.println(Float.POSITIVE_INFINITY);
 
@Dennis I clearly over-complicated it then with lıĊ
 
@cairdcoinheringaahing 1./0. in a lot of languages
 
actually that's probably golfable
yeah
 
5:41 PM
@Poke 1./0. For example
 
yeah yeah
or 1f/0f because it's fun
 
Maybe in fewer languages because some want a capital F?
 
@cairdcoinheringaahing Canvas, 1 byte
 
6:00 PM
@cairdcoinheringaahing Stax 2 bytes VI
 
python: float('inf')
haskell: 1/0
 
@totallyhuman does inf directly not work?
 
nope
 
ah, and division by zero is illegal in Python
 
6:04 PM
yeah it's quite not insane
 
Yeah, unlike JS, Python is somewhat usable :P
 
@ETHproductions Violating IEEE754 defined float operations I believe
 
It really bugs me that so many languages say 0 ** 0 == 1, directly contradicting maths
 
I once said "0 ** 0, which is 1 according to JavaScript" and got a comment that said "0 ** 0 is 1 according to math"...
 
> In algebra, combinatorics, or set theory, the generally agreed upon answer is 0^0 = 1
 
we've talked about this before
Aug 16 '16 at 14:26, by Poke
There are mathematical arguments that 0^0==1
.
 
Yeah, but that was over a year ago
 
Oct 20 '16 at 15:08, by Poke
Aug 16 at 17:12, by Poke
For anyone who was part of our 0^0 discussion earlier: IEEE Standard
 
My final verdict would be: it is useful to assume 0^0 = 1 in some cases, and wrong in other cases
 
And 0 × +oo = 0 in measure theory.
 
6:54 PM
I remember there being a css best practice where you try to only use left and top margins to position yourself with respect to other elements on the page
am I talking out of my butt or is this a thing somewhere
 
In[1]:= 0^0

                                        0
Power::indet: Indeterminate expression 0  encountered.

Out[1]= Indeterminate
There ya go
 
$ bc <<< 0^0
1
APL says 1 too
 
Yeah, but Mathematica is objectively correct in all cases.
End of discussion.
 
isn't it created by humans
 
You know I'm not so sure anymore
I'm pretty sure there's just an all-knowing AI in charge of Wolfram Research
 
7:07 PM
then who made the AI...
 
Steven Wolfram I guess
 
humans must be somewhere up the chain, so you can't be sure there's no error somewhere
 
Nevertheless, Indeterminate is still IMO the most correct solution.
@Dennis What's measure theory? I've never heard of it.
 
Measure theory generalizes notions of length and volume and leads to more general notions of integration than Riemann integration. Dennis's statement is not strictly accurate.
 
How can mathematica be made by humans? No developer could possibly keep track of that many builtins
 
7:17 PM
seriously, unless Wolfram doesn't allow its workers to read the docs (which is very evil imho) I don't see why not
 
Does anyone know how active the mods are on this stackexchange? I woke up to find one of my answers had been deleted due to missing a rule, so I fixed it, but need to wait for a mod to undelete.
 
Well, I can read the docs.
 
It's somewhat time sensitive as the golf involves building on all previous answers
 
I can't try to figure out how it works though, I'm legally prohibited from "reverse engineering"
 
@DavisYoshida Have you flagged it for undeletion?
 
7:20 PM
@DavisYoshida don't worry, if you fix it and then flag it, leave it alone and move on
 
@DavisYoshida Pretty active generally :P
 
I think so? I just hit flag and clicked on the single radio button available.
 
Speaking of mods, here comes one now :P
 
Implying I ever left this room
 
It really bothers me when multiple :Ps happen in close proximity to each other.
 
7:21 PM
Unsanitary
 
DJ is to PPCG what Deusovi (=anagram of Devious) is to Puzzling.SE; they always watch :P
 
@Pavel :P :P :P :P :P :P :P :P :P :P :P :P :P Huh, I try to create chains of :P for as long as I can
 
multiple :Ps are an unfortunate coincidence, but I wouldn't want my jokes to be considered seriously
 
0
Q: What is the purpose of "header" and "footer" for C++ submissions using TIO?

loladWhat are the rules for using c++ in code golf? In TIO, there is a header section and a footer section. Can you put your #includes in the header section? Do you use this template? HEADER: [#include...] CODE: <function> FOOTER: <main method, runs function> Try it online!

 
@DavisYoshida Well, definitions are arbitrary as long as they're consistent. The majority of measure theory books I've read defines 0 × (+oo) = 0.
 
7:26 PM
I don't know that I've seen one actually bother to define multiplication, but you can certainly have an infinite collection of measure zero sets which has positive measure.
 
@Dennis What's +oo, anyway?
 
+Infinity (I think)
 
Ah
 
@DavisYoshida I'm not sure if your answer is valid yet. I think it violates 24. The ninth line contains at least 22 characters, excluding the newline.
 
Anyone know why something like echo ' (a bunch of lines)
 
7:28 PM
huh
 
wouldn't render in <pre>
Yeah there's something up with my formatting
 
control-k to paste code into chat
Or backticks for one line
 
Or Shift-Enter to enter multiline
 
.12345678" "87654321.
true </dev/null
echo '
I thought we were having steamed clams
Oh, no I said steamed hams; Thats what I call hamburgers
You call hamburgers steamed hams?
Yes, its a regional dialect
Uh-huh, what region?
Uh, upstate New York
Really; Well, Im from Utica, and Ive never heard anyone use the phrase 'steamed hams'
Oh, not in Utica, no; Its an Albany expression
I see; You know, these hamburgers are quite similar to the ones they have at Krusty Burger
Oh, no; Patented Skinner burgers; Old family recipe
It doesn't render from the echo line to the Yes' line
 
Also, I think users with 10K rep can undelete your answer, not necessarily a mod
 
7:30 PM
In[1]:= 0 * Infinity

Infinity::indet: Indeterminate expression 0 Infinity encountered.

Out[1]= Indeterminate
 
Ah yeah the input redirection was messing it up so I replaced the < with &lt (and same for the one later on) so it should be good now.
The full hex of the code is in the TIO link though
 
Q: Does mentioning the word 'mod' just auto-ping every PPCG mod? :P
 
moddlejuice
 
@DJMcMayhem users with 10K other than the post's pwner IIRC
 
@cairdcoinheringaahing Apparantly it summons Vegetarianism.SE mods too
 
7:40 PM
@DJMcMayhem it just striked me that you haven't posted a V answer in ages, have you lost interest?
 
I just posted a V answer 2 days ago!
 
@DJMcMayhem You can take a look at codegolf.stackexchange.com/questions/159945/…
I restricted it to digits 1-9
 
3/5ths of my last answers were in V
Although it's true that I don't answer as often as I used to
 
oh huh, and I saw none of them >_> well, that's what real life apparently means
 
ಠ_ಠ I can't remember the last time I posted a challenge. I think it was TPLQ2, but I'm too lazy to check :/
 
7:46 PM
oh, and 2 days ago I was already preparing for tomorrow's Karate belt grading
 
@EriktheOutgolfer Good luck!
 
Good luck getting your new belt color :p
I see we’re talking about activity decrease... Same here :/
 
(half color) but mainly that's just a reason I thought DJ hadn't posted any V answer recently
 
Man, the effort required for answer chaining is getting a bit stressful.
Or maybe it's just the effort of writing a program in ><>...
 
that's how it's supposed to work...
it starts off easy and boring, but then it gets difficult and interesting
 
7:52 PM
Yeah maybe I should just write a diff answer since this one will become invalid eventually T.T
 
of course using a 2D language with not so many commands adds to the effort too
oh, don't drop your hopes!
 
@Pavel It's pretty gross, but here ya go
 
no need for a second notification :P
 
Oh cool
 
Oh, I didn't realize it was pavel's challenge lol
 
7:55 PM
Wow lengthier than Octave :P says the one who golfs in Triangularity
 
@DJMcMayhem Yeah it's a variation on the CMC earlier
 
I've noticed some people include hexdumps and some don't. Is it just whenever any non-ascii character is used/
*?
 
@ATaco The CMC widget doesn't seem to work for me for some reason. As in, it doesn't show any of the CMCs
 
when there's no suitable encoding against unprintables
 
They're not really mandatory. I tend to include them for V answers since V relies pretty heavily on the 0x00-0x1F ASCII range
 
7:58 PM
Summoned!
 
It's possible it's not picked up any CMC's since the server restarted.
Wait, it should have picked atleast one up.
 
Oh I see. Mk
 
Hmmm.
 
@Mr.Xcoder How could you typo e with '?
 
no, it might've'nt been a typo
 
8:00 PM
It was a typo.
 
The server being down might have caused problems with that too.
 
maybe you accidentally thought about the (informal) 'd suffix some people use when talking instead of ed
 
Possible. Hmmm... I am dumber than usual.
 
gah, star spam
 
Nin-DJ-as called to action!
 
8:03 PM
Thanks!
 
@DJMcMayhem What is your answer doing, generally?
 
8:23 PM
@Pavel For each number other than the first: { duplicate it; subtract the previous number; } Delete every line containing a '-'; Delete the leftover differences
 
8:36 PM
Is there any way to pass lambdas to a function that's less ugly than this?
int main()
{
   foo.doStuff(arg1, arg2,
       [cap1, cap2](int arg1) {
           ...
       }
   );
}
 
assuming this is C, well, lambdas don't exist at all to start with
 
It's C++
 
yeah, [...,...] as well as [...] without a left argument doesn't seem very C-like
 
That's the syntax for capturing. So if cap1 and cap2 existed in the scope of main, that allows you to reference them from within the lambda.
 
I'm not really into C++ :P
 
8:43 PM
Just pass function pointers around everywhere
 
> function pointers
adds another reason to hate C++
 
That's a C thing. If you're using C++ correctly you shouldn't need function pointers
Lambdas are way neater
 
^^
 
what is "function pointers" exactly? a function with a pointer datatype is one that returns such a value, not one that points to another function :P
 
@EriktheOutgolfer A pointer to a function
 
8:45 PM
No, it's a pointer to a function.
 
a pointer to a function
wow
 
Ninja'd
 
double
 
oh like a reference to it? sure, how else would you make a function which takes another function as an argument
 
If you're using C++, then you could do it with std::function. If you're using C, I think that's the only way
 
8:47 PM
if you're using javascript
huehue
 
If you're using JavaScript, don't
 
use WASM instead?
 
I use C++, but not std:: anything. It all has memory overhead that makes me uncomfortable.
 
@Pavel You sound like my compsci teacher
I ended up rejecting most of her C++ advice because std:: is sooooo much more useful than C with classes
 
using namespace std;
 
8:52 PM
@betseg Only in functions that use std a lot
Random side note/funny quirk about C++: because of the name of std::, anytime I Google for information about std::map or std::list, I end up getting directions to Planned Parenthood. XD
 
@DJMcMayhem it's my dad's fault. He works with extremely performance-critical applications, and doesn't even trust the default implementation of malloc to be efficient enough.
 
@DJMcMayhem -"planned parenthood"
 
@Pavel I don't know what your dad does, but I have a really hard time believing that has any tangible benefit. It sounds to me like over-optimizing the wrong sections/premature optimization
 
Alright, I got a challenge down in the sandbox. I decided that asking submissions to figure out how to process quadwords was too much, so I reduced it to 64-bit words.
 
0
A: Sandbox for Proposed Challenges

eaglgenes101Finite Field Multiplication code-golf math abstract-algebra Overview Given the integer representation of three elements in GF(2^64), give the product of the first two elements over GF(2^64) with the reducing polynomial defined as the polynomial m such that m(x) = x^64 + n(x), where n is the po...

 
8:59 PM
@cairdcoinheringaahing APL, 3 bytes: ⌊/⍬
 
@DJMcMayhem The benefit is that the code runs faster and uses less memory.
Which we can agree is a good thing.
 
@Pavel Agreed. But what I have a hard time believing is that malloc and std:: and other things that millions of people rely on with no issues is so grossly inefficient that rewriting them from scratch (which takes lots of valuable dev hours) provides a massive performance increase.
It makes me think of the 90/10 rule
 
@DJMcMayhem It took less than week to write and has been used for over a decade.
 
9:10 PM
Malloc's metadata is a constant size, so my dad wrote an implementation with variable-width metadata that's more efficient with lots of small blocks.
 
-1
Q: Not a quine, but a typing accuracy test that asks you to type it's quine

Nomad VoxelHere's a challenge. TypoQuine. First, writes a quine of itself. Then, has the user type a copy of said quine. It closes, or resets, if the user presses backspace or typos. First try only. It will acknowledge the user for correctly typing its quine correctly somehow.

 
I keep thinking that the blue-background blue-person is Uriel... that's a general image from somewhere, right?
 
CMC: Given an input s, output whether s is equal to your source code
 
9:25 PM
dupe, post answers there instead
 
 
2 hours later…
11:01 PM
@NewMainPosts i will award an imaginary cookie to anybody who can work a recursive approach to this, golfy or not
 
11:15 PM
@totallyhuman Where's my cookie?
 
@Dennis That's incredible. It's not the shortest, but you should post it
 
^
 
0
A: Implement Lazy Drop Sort

DennisPython 2, 50 bytes f=lambda s:s and f(s[:-1])+s[-1]*(s[-2:-1]<=s[-1]) Because recursion. I/O is on strings. Try it online!

 
Ugh, I have 4 votes left today
Too many people doing my challenge
 
11:25 PM
Good thing today is almost over.
 
Yep
 
the lead or follow challenge has a crypto related answer
0
A: Does it Lead or Follow?

Davis Yoshida31. Bash 900 characters This checks whether the first 4 characters of the MD5 hash of the input agree with the MD5 hash of the sentence: And you call them steamed hams despite the fact that they are obviously grilled (i.e. 86a6) The program exits with code 0 if the input matches the requi...

what to do?
 
I responded to your comment, but I'll say here as well, it's not a hard crypto based answer
 
it's more about it being annoying
you can't think about what you're going to do, because it's just randomly editing it until it gets a good hash
 
The length and codepoint requirements are similar
 
11:36 PM
@Pavel I intentionally left the post body formatted. Is that a problem?
 
I would have liked it if it instead had the requirement of containing part of the steamed hams script
@DavisYoshida no, they aren't
 
@DJMcMayhem I think it is? I'm pretty sure the post body has to contain the program you're claiming your score for.
 
that's padding to fixed points that you know, though. and codepoints is just using as many codepoints. there's no trial and error
 
IDK tho
 
If 4 characters == 4 hexdigits, it's certainly not hard to do. Annoying, yes, but the other 30 requirements are also annoying.
 
11:37 PM
not annoying in the same way though
 
It wouldn't be hard to make a crypto-based answer that kills the challenge completely though.
 
Yeah that's why I made it small. I originally had it at 6 characters but there were complaints so I switched to 4.
I also included a bash snippet for helping find the correct nonce
 
I also made the point that it might not be proven that there are an infinite number of strings satisfying the requirements
there probably are, but y'know
 
I applaud your pedantry
I'm reading some papers on the analysis of MD5 right now and I'll get back to you
 
that said, i actually have no idea
 
11:40 PM
@Pavel :shrug: Alright, fixed for real
 
it probably has a bunch of collisions, but as to infinite, i have no clue
 
Well, not infinite. MD5 places a maximum length on the input.
 
well well well
that would make the answer invalid
 
The answer specifies the use of the coreutils md5sum implementation
Which does allow multiblock inputs
 
Anonymous
11:43 PM
@Dennis That's not true.
 
Yes, I confused MD5 with SHA1.
Which means that MD5 isn't MD-compliant. TIL.
 
I'm pretty sure the answer is valid, but also sucks.
 
I'm unclear on the culture around here I suppose
 
Anonymous
@DavisYoshida It's like a Petri dish
 
It's fine to change your answer Yoshida. I think if you required that the program contain "And you call them steamed hams despite the fact that they are obviously grilled" that'd be cool
 
11:51 PM
I'd rather have no answer than repeat the already existing "contain this exact string" answers
 
you could require that it contains the string, but may have other characters in between the characters of the quote
 
Currently none of the answers except those that restrict the character set are interesting or hard to meet, and those just require that you use particular languages
 
basically regex formed by the pseudo code: reg =".*"; for i in steamed_hams: reg.append(escape(char)+".*")
 
That's the same thing but easier to satisfy
 
also consider it will be hard to quote
 
11:56 PM
anyways I gtg
If it gets deleted I'll try to come up with something else interesting to more people
 
@DavisYoshida It's s CultureInfo.InvariantCulture, we have people from all around here.
 
every line contains a digit?
idk
 
00:00 - 17:0017:00 - 00:00

« first day (2609 days earlier)      last day (2221 days later) »