« first day (1898 days earlier)      last day (1602 days later) » 

7:55 AM
@V2Blast to be fair.... it is not like the other girls don't have their own fair share of issues. Blossom has extreme OCD tendencies, Buttercup is basically Dash 2.0 and has her share of issues (it is pretty clear in some episodes that she acts over the top because she needs that to keep believing she is good, otherwise she would get depressed). Bubbles is just weird in her own way...
it is just that Bliss ones are far more extreme and pretty stereotypical.
 
@Derpy Sure, I'm just taking issue with the reasoning of "It's just a cartoon, don't get so upset"
 
8:39 AM
on an unrelated notice... my question here is so far getting ignored by the staff.
14
Q: What data is being gathered during the advertisement test? What about end-user feedback?

SPArchaeologistAs many user have already noticed, the network is apparently undergoing some "Ads testing" aimed at evaluating the various available alternatives for publishing advertisement to the network. It is my understanding that the test has been silently extended to many sites in the network (The Workpla...

seems that right now the main discussion channel is the one on the Workplace site
 
9:01 AM
not cool. Not cool at all.
many sites are currently participating in a "test" without even knowing.
 
 
4 hours later…
12:40 PM
I have just read an article about that Crowder incident and the following "apology" made by Google/Youtube/. Wish I didn't
 
 
3 hours later…
3:27 PM
Anyone got a moment for a Java question? (it's for my RPG "Random Dungeon" App)?
How do I convert an Integer to 2 significant figures? e.g. 1234 -> 1200
 
x = x / 100 * 100?
 
@Derpy i need it to work for 123 and 123456 and 12345678
 
at least if I have understood what you want to obtain correctly.
aaaaaaaaahhh you want to just keep the two most significant figures, not to remove the last two, sorry my bad.
 
while (i>100): i=1/10, counter++;
while(counter>0):i=i*10; counter--;
 
@SirCinnamon Is that more efficient than calling Math.log10() ?
 
3:32 PM
@MikeQ Probably, unless log10 has a special implementation for Integers that's faster than normal.
 
@SirCinnamon that looks something like I was going to write. is there not a function built-in to Java to do it?
 
@MikeQ In place of the counter you mean?
 
@SirCinnamon In place of the loops, yeah. And that first assignment should be i=i/10, not i=1/10
 
Bear in mind that on a non-RISC CPU (which x86 processors generally are) the log function, no matter the base, is going to be very slow, even if there's an opcode for it (which there is, IIRC). Dividing an Integer a bunch of times is almost always going to be faster.
 
@MikeQ yeah sorry, that should be i. As for efficiency,i really couldnt say. Probably it depends what scale of numbers you'll be working with
 
3:36 PM
And the while condition being (i>=100) not (i>100)
 
@MikeQ technically if its exactly 100, youve already dropped the next sig digit
 
@MikeQ I was trying to work out whether it should be ≤ or <.
 
@SirCinnamon Ah right, if i is an integer then we don't worry about rounding error. So (i>=100) and (i>100) would give the same final result.
 
@SirCinnamon You will get divergent behavior, i.e. 200 will be divided an extra time than 100, but the results shouldn't change.
 
OK, that seems to be working well enough
I'm creating random values for Treasures, and 18453gp looks stupid. I want to just call it 18k gp :)
 
3:41 PM
> Bug#69420: Rounding the number 1000 to 2 significant digits takes 15 µs fewer than Rounding the number 2000, and because we are working with a real-time embedded system, this is causing us to have to manually adjust timings to keep the pacemaker operating at a consistent frequency. Please fix this discrepancy.
 
>>> def twosig(i):
... counter=0
... while(i>100): i=int(i/10); counter=counter+1;
... while(counter>0): counter=counter-1; i=i*10;
... print(i)
...
>>> twosig(555123123)
550000000
>>> twosig(18453)
18000
>>> twosig(785392)
780000
 
@BlackSpike So you want a function that truncates it by every 3 digits? e.g. 10^3 is k, 10^6 is m, 10^9 is b, and so on?
Also, "18453gp" is a string, not an int, so if this is just a display thing then you could use a string formatting approach instead
 
I want to calculate the value , and then trim to 2 significant figures. @SirCinnamon 's answer works
 
what is the type of area increase granted by incrementing each side of a square by one unit, one side at a time? Feels logarithmic.

ex. Square of sides of unit length 1.
step 1. increase one side so that we have a 2,1 rectangle.
step 2. increase the short side so that we have a 2 square.
step 3. increase one side so that we have a 3,2 rectangle.
etc.
 
I was looking at writing something similar, but it would have been about 15 lines! :o
 
3:48 PM
>>> def twosig2(i):
... s=str(i)
... print("{:0<{width}}".format(s[:2], width=len(s)))
...
>>> twosig2(155)
150
>>> twosig2(15523432)
15000000
interesting concept
 
@goodguy5 If the old area is a, then the new area is (sqrt(a)+1)^2 = a + 2sqrt(a) + 1, and so the delta is +2sqrt(a)+1
 
@SirCinnamon You could always post it on code golf. :p
 
@JohnP Eh someone would just answer with "i invented a language that rounds to the tens place using a single character, the chinese flag emoji"
 
@SirCinnamon Or "I used java JDK 1.1 on a 386"
 
It's a normal Quadratic Growth curve, just slower than usual. The formula to express the area at iteration X (X0 = 1,1; X1 = 1,2; X2 = 2,2; X3 = 2,3; X4 = 3,3, ...) is

if x MOD 2 == 0
y = (x/2)^2
else
y = ((x+1)/2)^2 + ((x+1)/2)
 
3:56 PM
for the total area, but I mean for the .... I'm blanking on the word
the rate of delta
 
@goodguy5 The derivative?
 
first it increases by 100%, then 50%, then 1/3, 1/4 and so on
YES
stupid brain
 
@goodguy5 Well, that's not quite the definition of the derivative. The derivative is definitely linear, because the rate of acceleration is approximately 1/2, because the rate of growth is 1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,...
I say approximately because it's 0 on even steps and 1 on odd steps.
 
But the rate of area growth.....
Derivative is basically the area of the graph, iirc, right?
 
@goodguy5 No, that's the Integral. Which is something else entirely.
 
4:01 PM
@Xirema calculus was so long ago. whining emoji
 
Calculating rate of growth as a function of the previous step is technically valid, but it's not used very often.
Like, under that definition, a line of 0,1,2,3,4,5,6,7,8,9,10,... Has a rate of Growth of ∞%, 100%, 50%, 33%, 25%, 16%, 14%, 12%, 11%, 10%, ...
For a straight line. Mathematically valid, but weird to think about.
@goodguy5 Fair enough. In that case, it's 100%, 100%, 50%, 50%, 33%, 33%, 25%, 25%, 20%, 20%, ..., which is the same regression (A*1/x) just larger than before. I'm pretty sure all curves of the form x^y, where y is a constant, will exhibit that behavior in some form or another.
 
@Xirema x/(x-1) seems pretty close to what I'm saying
also, this should prob all be somewhere else.
 
4:17 PM
52 messages moved from RPG General Chat
 
anyway....
 
I think it's more like 1/⌊x/2⌋, from what I can tell.
 
I'm pretty close to it.....
alright, I can't think about this anymore
x/(x-1) - 1 is right for if it increases by 1 every time.

I can't figure out how to make skip steps
I think that cosign is involved, but I can't figure it out
 
4:48 PM
floor(x/2)?
width=floor(x/2) height=floor(x/2)+(x%2)
 

« first day (1898 days earlier)      last day (1602 days later) »