12:00 AM
@lirtosiast Wow, that's interesting
@lirtosiast Wait, maximum required* number of moves
Split personality? @LuisMendo
I'm considering a challenge where you are given a partially filled scrabble board, a new word (and its location), and you need to score the word
but I'm worried about it being too complex...how many of you would be interested in participating in such a challenge
12:10 AM
@lirtosiast I'm definitely interested.
It might be a good idea to create a new chat room to discuss this.
@flawr First map the reals to (0,2pi) with g(x) = 2 arccot(x). Infinity goes to 0.
@lirtosiast oooh that is interesting
Then f(x) = g^-1(2pi/3 + g(x)) = cot((2pi/3 + 2 arccot(x))/2) is a 120 degree rotation on that.
2 colors is actually easy, its the size of the diagonal
There are 2 nums a, b such that f(a) = b, f(b) = infinity, f(infinity) = a
Change the function so f(a) = a, f(b) = a instead.
12:14 AM
@lirtosiast But that's not continuous?
8
hmmm, with 3 colors, you can easily construct a board that requires the maximum number of moves:
01201
20120
12012
01201
20120
Oh yeah, I see why.
and I'm pretty sure you can repeat the pattern with more colors
I'm not sure how many moves the above board requires, though
Well, I think the last cell to be reached will be the one in the opposite corner.
12:18 AM
@DonMuesli Oh, I didn't see the continuity requirement
@El'endiaStarman not necessarily. You can spam 0,1 to reach it quicker
oh, true
Doing 1 2 0 repeatedly will finish in 12 moves.
@lirtosiast It looks to me like it might be impossible to achieve. But intuition ofteh fails in these cases :-)
@El'endiaStarman why 12?
12:21 AM
@flawr No. f has to be bijective, therefore monotonous. If f were decreasing, f o f o f = id would be decreasing as well. Since f is increasing, if x < f(x), f(x) < (f o f)(x) and (f o f)(x) < (f o f o f)(x), so x < (f o f o f)(x). Similarly if x > f(x), x > (f o f o f)(x). Therefore, x = f(x) for all x.
bijective, therefore monotonous good point! That's the key
@Dennis +1
12:36 AM
0

Recently I asked this question: Solve a quadratic expression. Seconds after I posted, it was flagged as a duplicate of Resolve quadratic equation, and was downvoted several times. The two titles look similar, but, as I put in the comments, ...The main challenge for mine is interpreting a stri...

Anonymous
12:46 AM
Additionally, please do not try to argue your case for why a challenge isn't a dupe in the challenge text itself; that's what comments and meta are for. Especially do not revert an edit that removes the unneeded text. — Mego 20 secs ago
Anonymous
Is this a reasonable comment to make?
Yes.
A bit stern, but not overly so.
Anonymous
I fear that the user might start an edit war over that unnecessary chunk
In that case, just flag for moderator attention.
12:48 AM
@Mego Yes. We should really change the 'was flagged as dupe; please click this close button or edit your question to clarify why it isn't' message though
Kind ------- neutral -- you ----- stern (scale)
@lirtosiast That's one of the things that doesn't fit our not-a-Q&A nature.
Should one downvote a dupe?
Anonymous
You should downvote an uninteresting/low quality challenge
@CᴏɴᴏʀO'Bʀɪᴇɴ Not for being a dupe.
12:49 AM
@flawr CA.
Anonymous
The criteria for downvoting is independent of the criteria for closing, in most cases
So one should've downvoted that challenge because...?
It is quite often that a question fits both criteria, imo.
Anonymous
Because the string parsing significantly detracts from the quality of the challenge; it's a cumbersone I/O format
12:51 AM
I think that string parsing a quadratic equation might be interesting
Anonymous
Short version: downvote if it sucks, and close if it has major issues
especially if terms aren't combined
@Mego "Parsing a string is not interesting" isn't the objective truth
I liek that idea.
12:52 AM
^
but not ^^^
There are languages in which it's fiendishly difficult (TI-BASIC)
Anonymous
@NathanMerrill A combining-like-terms challenge would be interesting. Splitting a string based on a simple regex and then doing the meat of another challenge is a dupe.
Assembly.
12:52 AM
@CᴏɴᴏʀO'Bʀɪᴇɴ People downvote things with or without reason, but more often than not I think it's because they find the challenge uninteresting in some way.
Anonymous
re.findall(input(),'(\d+)')
@Mego oh I agree that the two challenges are dups
@Mego Many languages don't have regex, and for those that don't the parsing could be more difficult than than the solving.
but if I were to say "take x^2+5x+7" and return (1,5,7)
especially if the terms can be reordered, thats interesting
the combining like terms is an optional requirement, but is still interesting without it
Anonymous
@lirtosiast And that's why it crosses over into cumbersome I/O format territory
12:55 AM
If you guys are going to try to make this viable, maybe you should invite the OP to chat?
Anonymous
It's either incredibly trivial or incredibly cumbersome
I do think a plain parsing challenge would be better than one with the quadratic formula added.
Anonymous
1:06 AM
So something like "given a one-variable polynomial expression, output the coefficients of the simplified polynomial"?
@Mego would it be in standard form?
Anonymous
@Maltysen Not necessarily
could it have multiple terms of the same exponent?
Anonymous
That's the point
what about things like (3x)^2
Anonymous
1:09 AM
You could get something like 4a^2 + 3a^5 + 2 - 3a + 2a^2
Anonymous
I'm not the one who came up with the idea for the challenge; don't ask me :P
@personwhocameupwiththischallenge ^^^
Output the coefficients, or just simplify it to standard? Roughly the same I guess though.
Anonymous
But I'd say the 5 basic arithmetic operators (+-*/^), plus parentheses, would be fair game
uh what
1:10 AM
he really wanted to make sure it was deleted.
But the most recent action was undeleting it.
I'm confuzzled as fukz, yo.
he changes his mind a lot?
¯\_(ツ)_/¯ I guess so
ununundeleted
Anonymous
What?
Anonymous
1:13 AM
Anonymous
25 mins ago, by Dennis
In that case, just flag for moderator attention.
There's nothing a moderator can do about that though.
Anonymous
Nothing a mod can do about a user potentially starting an edit war?
SE must have an equivalent of 3RR
Well, we can delete or lock it.
Anonymous
1:16 AM
I'm primarily confused why a mod said "do this" and then the response was "don't do that"
I interpreted Dennis' comment to mean that it should be flagged if an edit war erupts. At present there's been one edit and one rollback, and you left a comment. Assuming you don't edit it out again, no edit war will be had.
Anonymous
So I shouldn't have just edited it out again?
Anonymous
Oops
Yeah, I would have recommended against that.
Okay, it's on a one-hour lock.
Anonymous
1:20 AM
It's alright
0

The Challenge Your task is to create a program that can solve an algebraic equation. Input Input will consist of a String. The string will be an equality involving the variable x, and follows the following rules: x will never have a power associated with it The valid operations in the equati...

ಠ_ಠ
Anonymous
I know that's a dupe of something
Anonymous
I just haven't found the dupe target yet
Oh heh I thought he reposted the same thing. My bad.
0

The Challenge Your task is to create a program that can solve an algebraic equation. Input Input will consist of a String. The string will be an equality involving the variable x, and follows the following rules: x will never have a power associated with it The valid operations in the equati...

0

I hope I'm posting in the right section. So the task is pretty basic: The height h of the tree shall be an inputted natural number for this program, here's an example for h=5: View post on imgur.com So I can see that the number of blank space for the first iteration = h - 1. What's a simple w...

Anonymous
1:45 AM
Right tool for the job :)
Hah, it really is
@AlexA. are you going to play minecruft with us
Anonymous
It even beat Mathematica apparently, by virtue of the Mathematica answer being deleted
@AquaTart Is that a question there is no punctuation
Anonymous
I have like 15 second ping >_<
1:51 AM
@AlexA. That's a question
@Mego I've noticed bad lag too
Monring
monking
I had a 16 byte Pyth solution, but floats
:/
Yeah (thanks, mobile)
2:06 AM
In the room description, should "General discussion for codegolf.stackexchange.com" be changed to just "General discussion". I think it should
No
@Quill Oh yeaj? Doesn't that feel weird to have a plastic cable up against you?
There is a thing that says rooms shouldn't stray from topics that don't belong on the parent site
@Quill and that is applicable to us because we golf with avocads on the main site?
@Quill If it's a rule, then it's not enforced very well...
@AlexA. no, and these headphobes have a fabric cable
2:09 AM
@Vihan It's not a hard-and-fast rule; it's a guideline.
@Vihan enforcing chat rules is the task at the bottom of every moderator favourite things to do
But we definitely shouldn't remove the mention of our parent site in the room description. This isn't a general general discussion room, it's general discussion for our site.
:/
What's wrong with that?
Anonymous
What ever happened to the "don't add rules that disqualify existing answers" rule?
2:11 AM
It lives somewhere on meta.
This is a food / politics / probably some others, chatroom at times though
@Mego the guy is like 4 hours old on this site
Anonymous
@Maltysen He's getting a rude awakening to our rules :P
@Vihan speaking of politics, I got introduced to the donald trump theme song. and… o_O
2:12 AM
Some chatrooms won't change their name from "SiteName general discussion" because they think it'll be unclear who they belong to
@Vihan Yeah, we get off topic. Many rooms get off topic at times.
Over here…USA! Over there…USA! Freedom and… liberty… everywhere!
@Maltysen Relevant
oh yeah I saw that
make donald drumpf again rofl
2:25 AM
@Liam When you get a chance, please rescore my submission. Revision 35 should make a huge difference.
Because it wasn't fast enough already apparently :P
There's no such thing.
TIL Dennis is a cheetah.
Btw @Mego, did you try again with the portable integers sizes? I don't know what else it could be...
Anonymous
@Dennis Not yet; I'll do that now
2:35 AM
@AlexA. Now I get that "Make Donald Drumpf again" thing.
I saw the video on Facebook, but didn't watch it.
Anonymous
@Dennis Shouldn't the line sieve = malloc(sieve_length * sizeof(long)); be changed to sieve = malloc(sieve_length * sizeof(uint64_t));?
Anonymous
Still having issues even with the portable int sizes
Anonymous
$./timepi '-march=native -O3' pi 1000 pi(x) = 106304942 real time: 3836300 ns pi(x) = 75656860 real time: 2723100 ns pi(x) = 70296234 real time: 2684100 ns pi(x) = 38400974 real time: 2078000 ns pi(x) = 6305450 real time: 526400 ns pi(x) = 2683894 real time: 450400 ns pi(x) = 1679067 real time: 214600 ns pi(x) = 4369 real time: 33800 ns @Mego Definitely. Did you change that before testing? Have you tried without -march=native? Anonymous @Dennis Yep Anonymous 2:41 AM Without -march=native gives the same results Anonymous I also tried explicitly casting the UL values in the macros to unit64_t's Anonymous #define bit(k) ((uint64_t) 1 << ((k) & 63)) #define ones(k) (~((uint64_t) 0) >> (64 - (k))) @Dennis will do. Anonymous I'm an idiot Anonymous I figured out what the problem is, I think Anonymous 2:45 AM I'm using a 32-bit toolchain Anonymous Installing 64-bit gcc toolchain now... I don't know enough about C to tell if that could make a difference. Anonymous With the 32-bit toolchain, it can't use 64-bit ints Anonymous So *int64_t is probably just an alias for *int32_t Of course you can use 64-bit ints. Anonymous 2:49 AM Not when the toolchain is building x86 code @feersum You just have to believe. See above. I'm pretty sure I've used 64-bit ints in 32-bit applications. Use the magic you know, Captain. Believe. Anonymous Well, this is my best guess Anonymous 2:50 AM If using 64-bit gcc doesn't work I don't know what will What platform is the code not working on? Anonymous Windows with 32-bit Cygwin Anonymous $ ./timepi '-march=native -O3' pi 1000
pi(x) =  93875448    real time:  2879500 ns
pi(x) =  66990613    real time:  2288700 ns
pi(x) =  62366021    real time:  1952200 ns
pi(x) =  34286170    real time:  1260000 ns
pi(x) =   5751639    real time:   554500 ns
pi(x) =   2465109    real time:   202500 ns
pi(x) =   1557132    real time:   158200 ns
pi(x) =      4339    real time:    44900 ns
Anonymous
The 32-bit platform was the issue
The code must have some mistake, if it works differently in different compilers.
Anonymous
2:52 AM
It's not just the compiler; it's the whole platform
Anonymous
32-bit Cygwin uses 32-bit programs. Programs compiled in 32-bit Cygwin are 32-bit programs.
Anonymous
In essence, Cygwin32 pretends to be a 32-bit x86 Linux install, and so the tools work like it's a 32-bit platform
Anonymous
30

C, 0.035885s (Mar 6 2016) #include <math.h> #include <stdint.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <time.h> #define cache_size 16384 #define Phi_prec_max (47 * a) #define bit(k) (1ULL << ((k) & 63)) #define word(k) sieve[(k) >> 6] #define sbit(k) ((word(k >> 1) >>

Should still work though.
Anonymous
2:54 AM
Final time: 0.00953902 s
Anonymous
@Dennis You might also try using -Ofast in lieu of -O3. -Ofast is -O3, plus some fast-but-unsafe math optimizations that don't seem to affect this code.
Unsafe math optimizations?
If it doesn't affect the code, how can it improve it?
@El'endiaStarman For floating point, presumably.
Anonymous
I mean it doesn't negatively affect the code
At least on my computer, -Ofast is slower. I haven't been able to speed any code up with -Ofast afair.
Anonymous
2:59 AM
Oh wow it's being slower now, too
Anonymous
On 32-bit, it was faster, but also the 32-bit issues :P
@Mego Could you try again with 32-bit and change __builtin_popcountl to __builtin_popcountll?
That should still cause a fail if sizeof(long) is 4.
Anonymous
@Dennis Yahtzee
Anonymous
Correct results :)
\o/
Anonymous
3:04 AM
So it was the popcount function returning a long that caused an issue
Anonymous
smh intel use portable int types
Yep.
Anonymous
0.0126962 s ಠ_ಠ
On 32 bits? That is expected.
Anonymous
Good thing the timing platform is 64
3:08 AM
There's a lot of stuff in the code that takes advantage of large integer sizes.
That can probably mitigated by using SSE.
@HelkaHomba Do you like my treehouse?
@Dennis is it expected on GeoBits as well?
@AlexA. I haven't seen it.
@HelkaHomba Okra
Anonymous
@AlexA. They added okra in 1.9? Completely different game now.
3:23 AM
@Mego No but they added igloos
You should settle in one
Anonymous
@AquaTart I really want to. Hence why I was looking for ice.
gotcha
I'll try and find out what the nearest ice biome is
Why does the Solve an algebraic expression have so many downvotes?
Anonymous
Because of rule changes after submissions were posted
Anonymous
@AquaTart I'd love you for an extra forever
3:29 AM
-6 seems a bit excessive for just disallowing built-ins
Anonymous
-6 doesn't seem excessive for a challenge that invalidated every answer with a late rule change
That user hasn't really shown any interest in working with the community, which probably contributes to the downvotes.
Anonymous
^
Anonymous
They apparently didn't read any of the relevant meta posts about challenge writing
Anonymous
And didn't use the Sandbox
3:31 AM
@Mego Especially since the rule change made the challenge unclear.
@Mego Not surprising as they're a brand new user. Still though.
They posted a solve-this-quadratic that was closed as a dupe, complained about it on Meta, then posted this solve-this-polynomial, and only disqualified built-ins after three answers had been posted that used built-ins.
If I rewrite the general challenge with a better spec, would be closed as a dupe of that one?
Anonymous
@AlexA. And that's exactly why we need a better tour page and help center :)
Anonymous
@Vihan I'd VTC the current one as a dupe if the new one is objectively better
3:32 AM
@Mego Yes. Yes pls.
@Mego Game changer. You can grow okra and when you craft with it you make bhindi masala.
Ok, I'll go porpoise a challenge in the sandbox then...
And put in H0 at the top: THIS SITE IS NOT STACK OVERFLOW.
Anonymous
@AlexA. omg i need it
This shows up in your inventory
Anonymous
@AlexA. brb changing pants
3:37 AM
...what
Anonymous
(because I drooled all over them, dirty mind)
( ͡° ͜ʖ ͡°)
Thanks friendly neighborhood moderator
I do what I can to further the Lenny cause
Feb 22 at 0:59, by Doorknob
@AlexA. this is next-level lenny abuse
@Doorknob ( ^ ͜ʖ^)
3:44 AM
145c145
<       a -= 7, Phi_6 = malloc(a * Phi_prec_bytes + 15016 * sizeof(int16_t));
---
>       a -= 7, Phi_6 = malloc(a * Phi_prec_bytes + 15016 * sizeof(int16_t));
I hate it when diff does this.
what... what's the difference?
It's probably the ghost byte after the third a
Anonymous
Line endings?
Anonymous
Tabs vs spaces?
@Sp3000 I didn't know that ghosts could bite D:
3:47 AM
There was indeed a tab between 7, and Phi_6. Not sure how it got there.
@AlexA. you like it?
@Dennis that seems like a strange place for a tab O_o
@Optimizer YES
come to my place, I'll give it to you
0

I'll work on finishing the spec later, I'm just placing these here so I can start writing it Solve an Linear Equation This challenge with a better spec Spec Your program will take a linear equation containing a single variable x and output the value of x. [will write about output precision la...

3:48 AM
That sounds... like you aren't going to feed me okra
2
now?
Alex, I don't understand you
2
Less sketchy now but I can't purge the pre-edit version from my memory
you use lenny when he is not suitable
@Doorknob Well, it wasn't intentional. Deleted a line and... oops.
3:49 AM
and then you don't use lenny when he is suitable
:P
my life is a lie
ಠ_ಠ
What's with you guys and okra? I used to have it like every other day before I quickly got sick of it...
Anonymous
@Optimizer ( ͡° ͜ʖ ͡°)
Anonymous
@Optimizer ( ͡° ͜ʖ ͡°)
Anonymous
So many lenny faces, so little time
3:51 AM
@Vihan dude...
every other day?
you like those fingers soo much?
Anonymous
@Doorknob Everywhere is a strange place for a tab. s/\t/ /g
@Mego those are 4 spaces, your life has been a lie
@Optimizer okay about every four days
Anonymous
I think we're at that special time of night where we
@Vihan and only in season
@Mego ( ͡° ͜ʖ ͡°)
3:52 AM
@Vihan How was it prepared?
Anonymous
I don't know why I typed life originally but it works too I guess
@Mego I literally just did the opposite.
Anonymous
@Dennis ಠ_ಠ
@Dennis ಠ_ಠ
[tab]_[tab]
Anonymous
3:53 AM
Birdbros know what's up
Yas
[ ]_[ ]
But I thought you loved tabs, @Optimizer?
Spaces or tabs, you can't have it both ways!
@AlexA. something like that
@AlexA. NEVER
s p a c e s f o r l i f e
5
3:57 AM
@Optimizer <3
Duolingo gave me Ich sehe Menschen, and the first thing I wondered was: what's the word for "dead"? :P
(The translation is I see people.)
@AlexA. It's right next to my hill ._. Yet now I kinda want to build an arboreal abode also
20 mins ago, by Mego
I want that in my mouth
@AlexA. ( ͡° ͜ʖ ͡°)
@El'endiaStarman El Cinco Senso
3:58 AM
oh, aqua tart ninja'd my lenny, nevermind
@HelkaHomba ¯\_(ツ)_/¯ It was the tallest tree I could find... next to your house.
Now that I'm finished, can I request feedback on this:
0

I'll work on finishing the spec later, I'm just placing these here so I can start writing it Solve an Linear Equation This challenge with a better spec Spec Your program will take a linear equation containing a single variable x and output the value of x. Input / Parsing The input will onl...

4:20 AM
@Vihan finished doing what ? ( ͡° ͜ʖ ͡°)
it just occurred to me
that @Geobits has been a downvote icon for so long
that I've forgotten what his original avatar was
Fedora guy
ohhhh yeah
i just heard it as "hello from the outer space"
@AlexA. ? You saved my years-old avatar? +17 creepy points for you, sir.
4:28 AM
Ok, only +4 creepy points then. You don't get to keep the others.
I can accept +4 I suppose.
How do I earn creepy points?
@Dennis should I be compiling or running with different options than before?
gcc -Wall -O3 -mpopcnt -lm -o dennisc dennisc.c
is what I've been using
4:39 AM
You need the -gottagofast flag
import sonic
sorry #include<sonic.h>
Dennis the Hedgehog
Oh, no, import sonic is proper.
4:41 AM
Because all running hedgehogs prefer Python? :P
@Liam Yes, -mpopcnt should become -march=native now.
This one does.
k i'll time it
(The latter implies the former.)
@Liam I read that as "kill time." ._.
4:41 AM
We do that all day every day.
Like, "it's killin' time, oh boy oh boy."
Ok, done with House of Cards for another year.
By the way, some of you guys might like this:
Speaker is Reshma Saujani, founder of Girls Who Code.
@Liam Thanks! Feature request: Make timing in header and body match.
Did they not?
I copy pasted lol
how did I do that
4:52 AM
I swear my clipboard has a life of its own from time to time.
It's Clippy, back from the dead.
Klipper, actually.
No, I mean the Windows Clippy. I don't know how he got there, but keep your eyes open and watch your back.
Yeah, I know what you mean.
4:54 AM
Yes or OK. Nice.
Did not know that clippy memes were a thing
Rule 50.
And they say we waste time.
4:57 AM
rule 34
Yea... that probably exists too
OK, Clippy porn has to be weird.
And potentially dangerous.
ouch....
In other new, where do we stand on the whole mathjax issue?
I know it was messing with stuff, but are we going to get that back anytime soon
@Dennis It starts like this:
I stand on the side of Mathjax.
4:58 AM
@Liam Probably not
@Liam Step 2. Procrastinate indefinitely.
IIRC randomra posted some Clippy porn in here a while back.
uh what