« first day (1755 days earlier)      last day (2164 days later) » 

2:00 AM
f-f*(n%2)*2 is probably pretty good then.
I can't think of anything better really. Simplicity is bliss.
 
Golfwise (1|n%-2)*f is shorter
 
it's not bad
 
(just a side note)
 
@Sp3000 I think he's not doing something golfy
@orlp wus dis
 
2:00 AM
6 instructions
 
I know, I'm just saying as an aside :/
 
but you can also do it in 4
the top bit in an IEEE754 double is the sign bit
 
@orlp holy shit wat is this ahhhh
bitwise operators they burn
OK but seriously that's cool. Is it faster though?
 
Am I a whiner?
 
@orlp manipulating float/double sign bits is non-portable
 
2:02 AM
so by XOR'ing that bit with the last bit of the int (which says whether it's odd or not) flips it
 
In sociology and psychology, self-esteem reflects a person's overall subjective emotional evaluation of his or her own worth. It is a judgment of oneself as well as an attitude toward the self. Self-esteem encompasses beliefs (for example, "I am competent", "I am worthy") and emotions such as triumph, despair, pride, and shame. Smith and Mackie (2007) defined it by saying "The self-concept is what we think about the self; self-esteem, is the positive or negative evaluations of the self, as in how we feel about it." Self-esteem is attractive as a social psychological construct because researchers...
 
@Sparr I explicitly mentioned IEEE754 double
 
@quartata huh?
 
the only thing that proper code would use is an union rather than pointer aliasing
@quartata quite a bit
it only uses 4 instructions
 
@TanMath You keep criticizing and questioning yourself. Don't do that.
 
2:04 AM
and those instructions are simple (mov, sal, xor)
 
You're hurting your self-esteem
Be happy not sad
 
@orlp sure, you said that, but the code doesn't say that
 
You're not doing anything wrong; you're very inquisitive which is not a bad thing at all
 
@quartata Mego said I am a whiner.. That is why I am asking...
 
@Sparr it's an assumption
 
2:05 AM
@TanMath He doesn't know you don't take it at face value
 
@quartata I actually use this trick in my fast sine code
 
@orlp Interesting...
 
 
@quartata do I act like a whiner?
 
but [pi, 2pi] has opposite sign from [-pi, pi]
 
2:06 AM
@orlp Ah, so that's where you use the negate trick.
 
which is incidently when the period is odd
 
That's neato
@TanMath I don't think so, but what do I know?
Don't take what I say at any more face value then what anyone else on the Internet says about you
 
@quartata well I want to improve my behavior
 
rule #1: only take advice from those you respect
rule #2: respect (almost) no one
if you're wondering whether you should be listening to someone, the answer is probably no
 
What he means is that if you have to ask yourself whether Mego is a reliable source that means he probably isn't
 
2:10 AM
Except me. Always listen to me.
 
@Geobits This is true.
This works because Geobits is more of a concept than a physical being.
 
Transcendence is wonderful.
 
@TanMath 1) Don't say anything that could possibly be interpreted as an insult unless you A) really mean it, or B) make it really clear that it's in jest. 2) Regarding the answer you were trying to write in Seriously, I think the main issue was that it seemed like you were trying to get other people to fix your answer for you or to teach you Seriously without putting any work in. Just like SO: "what have you tried?"
 
Mego calls me such stuff.. I am thinking whether or not he is correct
@quartata no, he is am evil AI, along with his sock!
 
TanMath calls me such stuff.. I am thinking whether or not he is correct.
 
2:18 AM
Anyone here use Linux Mint?
 
Briefly...
 
@Geobits it is a joke! Do you Seriously take jokes literally?
(Bad pun)
 
How is a poor evil AI supposed to recognize a joke?
 
Do you know if it has a listing of recently-launched programs built into the start menu thing like Ubuntu does?
 
@quartata why?
 
2:19 AM
@quartata Which of the gazillion DE's do you use?
 
@Geobits so, you come you would have self-esteem? You are a bot!
 
@Dennis I'm not currently using Linux Mint; I'm trying to answer a semi-related question on Unix SE
 
Still, same question.
 
@TanMath Bots have feelings, too. Stop being a bigot :P
 
I assume he's using Mate since that's the one that comes with it
 
2:20 AM
The default for Mint is Cinnamon AFAIK.
 
@Dennis It is?
Since when?
Huh.
 
@El'endiaStarman but I have written code... That is what I tried...
 
xubuntu is best
xfce rocks
 
@quartata Well, there are no real defaults, but Cinnamon is made by the Mint people.
 
just does what you want
 
2:21 AM
@TanMath How many Seriously answers have you written? (Ones that worked, anyway.)
 
oh, do we get to have DE wars now also? :P
 
@El'endiaStarman 0
 
@quartata I installed Mint over 2 years ago, and Cinnamon was the default then.
 
@orlp Xfce is quite good, but I had too many problems with Ubuntu. If Xfce had a "present desktop" effect, I'd consider switching.
 
Unity for life >_>
 
2:22 AM
@Geobits ಠ_ಠ
 
:D
 
^
 
@Dennis could you rephrase the last part
 
@TanMath So, then, start small. Add two numbers. Do factorial without a built-in. Add up (or multiply) all numbers in the input. That sort of thing. Get familiar with the basics of the language before you try to do gamma, which is fairly difficult.
 
@El'endiaStarman OK.. But I would rather use it for something, not write up some code for no use
 
2:25 AM
Project Euler?
 
@TanMath learning is a use
 
@Dennis ?
 
@Dennis @orlp How I prefer to switch windows.
 
@Geobits Excellent idea! That's how I learned Python, @TanMath.
 
what do you mean with 'present desktop'?
 
2:26 AM
@orlp Scale all open windows on that virtual desktop, so that you can click on one to select it.
 
That seems like it could be a simple add-on instead of dependent on the DE. Doesn't Compiz have something like that?
 
ah
 
@Dennis I really like this too.
 
I've always had the opinion that it's useful in theory to have something like that, and it seems nice, but in practice requires too much use of the mouse :P
(also, psshhh, giving away sekrit chatroom names)
 
Yea, I usually use keyboard for switching, to be honest.
 
2:28 AM
@Doorknob Win+Tab in Windows 10. :D
Well, that's for the desktop switch view. Alt+Tab does the same for the current desktop.
 
I've configured my computer so that it is the only way of switching windows. I have a dedicated mouse button on my home computer, and a four-finger gesture on my laptop.
 
Good lord, a four-finger gesture? That's dedication.
 
Alt+hjkl ftw. :P
 
@Geobits Just a swipe-up. The dedication is that I wrote the gesture suite myself. The only "real" code I've ever written.
 
Aww, and here I was hoping it was some kind of secret jutsu move.
 
2:31 AM
Circular scrolling works nicely too.
 
by the way
the window selection thing is what you get in xfce if you hold alt-tab
with thumbnails and clickable
 
pro tip: don't write cron jobs that have errors in them
 
I can't screenshot because apparently you can't screenshot while alt-tabbing
 
llama@llama:~$ mail
Mail version 8.1.2 01/15/2001.  Type ? for help.
"/var/mail/llama": 8 messages 8 new
>N  1 root@llama.locald  Tue Nov 17 18:17   26/1036  Cron <root@llama>    cd / && run-parts --report /etc/cron.hourly
 N  2 root@llama.locald  Tue Nov 17 19:17   26/1036  Cron <root@llama>    cd / && run-parts --report /etc/cron.hourly
 N  3 root@llama.locald  Tue Nov 17 20:17   26/1036  Cron <root@llama>    cd / && run-parts --report /etc/cron.hourly
 N  4 root@llama.locald  Tue Nov 17 21:17   26/1036  Cron <root@llama>    cd / && run-parts --report /etc/cron.hourly
 
^ @mods spam alert
 
2:33 AM
@Geobits I'm on it. Will suspend the offending user.
 
@Geobits Yes, Compiz calls it Scale. It used to have some issues when I was using Ubuntu (some years ago) with windows that were minimized and/or on other virtual desktops
Llamas have roots?
 
Llamas have families too!
 
Why doesn't heroku for Seriously not work on mobile? @Mego
 
@Dennis Oh, yea, scale sucked last I tried (which was some time ago). I normally don't have much open in each desktop/monitor, though, so I usually do switching between those instead. The up/down/left/right helps me find things easier since they're laid out in space, not just "whatever order I've been using things in".
Like, my browser is always on top-left desktop, left monitor, etc.
 
BTW what did you think about my flag France answer?
 
2:36 AM
And basically nothing gets minimized ever.
 
@Doorknob cronjobs always mail you
 
@Geobits I used GNOME Classic + Compiz on Ubuntu. I rarely minimized anything, but when I did, boy was I sorry. After using Scale to bring a minimized window to the front, it became click-through! Using the keyboard worked normally, but any mouse clicks affected only the window below it...
 
this chat room should be renamed
"The Nineteenth Mod"
 
@Dennis Nice. Yea, I didn't use scale long. I don't remember exactly what issues I had with it, but I remember it being a pain in the ass on multiple fronts.
 
@orlp ...why? Only half of the users talking now are mods...
 
2:39 AM
@El'endiaStarman "only half"
 
El'endia's only a fake mod here, though.
 
ಠ_ಠ
 
@orlp I know several rooms that have a much higher blue density :P
(Including some that are not actually mod-only.)
 
Go figure, some people that hang out in chat and are generally active end up mods.
I think it's stranger to see sites with no/little mod presence in chat, tbh.
 
2:42 AM
@El'endiaStarman @Optimizer @undergroundmonorail I got the mouseover rainbow distance thing working here! However it's pretty slow so I wouldn't try it on images larger than 200x200.
^ images I've been testing with
 
@Doorknob like charcoal HQ, that place is an ocean
 
Okay, serious question: at what point does a square number become too large to reliably square-root and get an integer which can be squared to give the original number? (In most languages, not using any libraries.)
 
2?
 
irb(main):011:0> Math.sqrt(2)**2
=> 2.0000000000000004
oh
 
@El'endiaStarman integers?
or floating point?
 
2:44 AM
Yeah, left out that important detail... :P
 
or
I mean, what data types are we talking here
 
Like, if you're doing a**2+b**2 = c**2 and you want to know if a**2+b**2 is a square.
 
in Ruby, at least, never
 
hey remember this:
 
because Ruby uses bignum
 
2:45 AM
bin it bin it bin it bin it bin it bin it bin it bin it bin it bin it bin it bin it bin it bin it bin it bin it
 
I'd imagine that this would just be limited by the precision of your language's number type
 
I know there are better ways, but assuming the naive way...
 
@TheDoctor annoying flashing gif is annoying
 
so
let me get this straight
 
Times like this I wish I'd grabbed Rainbolt's image hider script.
 
2:45 AM
you have an integer square
you want to do IEEE754 floating point pow(x, 0.5) on it
cast that to an integer
and square that integer
 
yup
At what point can I not be sure that I'll get it right?
 
Anonymous
@TanMath It doesn't? I've never tried.
 
(Assume rounding, not necessarily int.)
 
Anonymous
@TheDoctor Animator vs Animation?
 
@Mego That's not that.
Though those videos are awesome.
 
Anonymous
2:47 AM
@El'endiaStarman Looked similar
 
Anonymous
Hella awesome
 
Anonymous
@El'endiaStarman I can write a script and run it if you want
 
@Mego yeah.
 
@El'endiaStarman anything below 2^53 should be fine
above that the integers are no longer dense inside float
 
It says "Application Error"
0
A: Draw the national flag of France

TanMathPython, 223 209 bytes Thanks @Sp3000 from turtle import* def D():fill(1);fd(100);rt(90);fd(200);rt(90);fd(100);rt(90);fd(200);rt(90);fill(0) lt(180) fillcolor("#0055a4") D() fillcolor("white") goto(100,0) D() fillcolor("#ef4135") goto(200,0) D() Try it here

More golfed! @Sp3000
 
2:48 AM
@Mego Sure. It's for my "Pythagoras' Other Leg" Sandbox challenge.
 
Anonymous
Waiting for a mathematica builtin answer — Faraz Masroor 45 mins ago
 
Anonymous
Do people not read?
 
>>> 2.0**53 - (2.0**53 - 1)
1.0
>>> (2.0**53 + 1) - 2.0**53
0.0
 
Anonymous
> No built-ins or libraries/modules that provide a mapping from states to capitals or capitals to states, or lists of capitals and/or states (for example, Mathematica's CityData built-in)
 
2^53 + 1 is the first integer that can not be represented as a floating point (IEEE754 double)
 
2:50 AM
I think that's a very fair limit for triangle side length :P
 
Anonymous
Actually it's 2
 
actually
I was a bit too generous there
it seems I have already done this research in the past
 
Anonymous
int(pow(2,0.5))**2 returns 1
 
Maybe we should have a American flag challenge as well...
 
@Mego since when is 2 a square
 
Anonymous
2:51 AM
@orlp Since I said so shut up
 
You were ninja'd with the 2 joke anyway, by a long shot :P
 
Anonymous
;_;
 
@Geobits It's actually for the hypotenuse.
 
Anonymous
2 is a square, it's just not a perfect square
 
Anonymous
#leave2alone
 
Anonymous
2:53 AM
#irrationallivesmatter
 
Also, 2**53 is not a perfect square.
 
the definition of a "square number" is that its square root has to be an integer :P
 
Anonymous
@Doorknob that be the definition of a perfect square
 
@El'endiaStarman the function I linked
can accurately compute the integer part of the square root for any 64 bit integer
 
@El'endiaStarman Yea, that's why I edited to 'side length' instead of input. Still, it's fairly generous. That means the legs would just have to be limited accordingly.
 
2:54 AM
@TanMath Nice :) I think you can drop the lt(180) as well, actually
Also we've had an... ASCII American Flag?
 
>>> import math
>>> int(math.sqrt(2**52))
67108864
>>> 67108864**2
4503599627370496
>>> 2**52
4503599627370496
>>> int(math.sqrt(2**54))
134217728
>>> 134217728**2
18014398509481984
>>> 2**54
18014398509481984
 
Anonymous
@quartata Thanks for pointing out that builtins are banned to that guy, his inability to read made me too stunned to reply
 
@Mego Your opening sentence...too many two letter runs O.o
 
@El'endiaStarman yes, above the limit I quoted there are more numbers that work
but not all
 
People's inability (or unwillingness) to read shouldn't be shocking to any but the newest members ;)
 
2:56 AM
or to anyone but people who are new to the internet, really :P
 
Anonymous
@Calvin'sHobbies I say not enough
 
Or new to humanity, to tell the truth.
 
0
Q: Shortened words

Grant DavisMy cell phone carrier charges a cent per character in a text! I need a program to shorten the words for me, while still being understandable. I will be texting this program to my friends, so it needs to be as short as possible. Your program will take a String from STDIN reduce any consecutive le...

 
@orlp True. I think I'll just say that the hypotenuse is no longer than the language's limit. (Without using libraries, etc.) And that in practice, expect inputs no bigger than 100,000.
@Calvin'sHobbies That's pretty awesome. :D
Also, I added the -30% bonus with outline.
 
@Mego It is if it is.
 
2:59 AM
@Calvin'sHobbies I can't get it to work
 

« first day (1755 days earlier)      last day (2164 days later) »