Posts for Tub


Tub
Experienced Forum User
Joined: 6/25/2005
Posts: 1377
P.JBoy wrote:
original vs. this
looks nice indeed, but takes a lot more horizontal space. compare! I already removed the obsoletion info and it still doesn't fit right.
sgrunt wrote:
As of a few moments ago, the opening blurb is gone; if a user is not logged in a message directing them to the "Welcome To TASVideos" page
yay, cookies for sgrunt \o/
m00
Tub
Experienced Forum User
Joined: 6/25/2005
Posts: 1377
Randil: yeah, I ended up with the same three equations. Was too lazy to actually solve it, though. In any case, a simple geometric observation tells me there's only one solution, so does the linear system you get when you log() both sides of the equations.
m00
Tub
Experienced Forum User
Joined: 6/25/2005
Posts: 1377
Randil wrote:
Since the spheres are tangent, these circles will also be tangent.
no. You're using the inverse: you know your circles to be tangent, thus you claim the spheres would be, too. view from the side:
    ###
  #######
 #########
 #########
###########
###########
 #########  ##
 ######### ####
  #######  ####
    ###     ##
---------------  <- plane
the corresponding circles would touch (if viewed from above), but the spheres don't.
m00
Post subject: the new front page
Tub
Experienced Forum User
Joined: 6/25/2005
Posts: 1377
Hi, is it just me or is the new frontpage totally overloaded? I understand the desire to have everything "important" available there, but that leads to cluttering and isn't newbie-friendly at all. For extreme cases of minimalistic design, see http://www.openoffice.org/ or http://www.winehq.org/ - the only purpose of their front pages is to lead the visitor in the right direction. That approach may increase the amount of clicks required to get somewhere, but it will make finding those clicks a lot easier. For tasvideos, we probably should find a middle-ground between something easy and newbie-friendly and something powerful enough for the regulars. So here's some ideas and suggestions for the front page. mockup image. Explanations follow: The "Newbie-Box":
  • If you're new, you need good visual guidance. While the colour could be improved, a seperate "newbie-box" with good visibility will help
  • regulars should be able to hide said box, setting a permanent cookie or something. Or just hide the box for logged-in users. Or both.
  • Get rid of all the text, tl;dr and stuff. Explanations how to view the videos are hardly front-page material, that can be explained on the movie pages. There should be a *short* introduction followed by a few useful links. Which links exactly we want to add can be argued about; I just added three non-perfect examples. We might also want to link our game resources and/or the contribute page.
  • there's currently a tiny, barely visible youtube-video embedded on the right, displaying half a headline and a random frame. Replace it with a proper (and inviting) screenshot and do some javascript-magic to open the video inside a larger <div> like longplays.net used to do before the current drama.
News:
  • I think it's enough to display the headlines with links. While it's good to have news on the front-page, they really shouldn't take up the majority of the space.
  • The newsticker needs some visual identification, it's way ugly in my mockup.
Movies:
  • Movies are the bread and butter of this site. They should have a prominent role on the front page. Suggesting revert to previous size.
  • recommended movies: remove the obsoletion info ("Old was: 12:34:56"), it's only useful for recent publications. That will avoid some line-breaks when a larger screenshot is displayed.
  • my mockup tried to interleave the new and recommended movies for better space usage with larger screenshots. I'm not sure that's a good idea, but I'll just keep it there for consideration.
discuss.
m00
Tub
Experienced Forum User
Joined: 6/25/2005
Posts: 1377
petrie911 wrote:
the series for 1/(x-1) is valid only for |x| > 1.
yeah, but.. why? where did that limitation creep in?
m00
Tub
Experienced Forum User
Joined: 6/25/2005
Posts: 1377
You cannot just replace both terms, because both equations are only valid for a limited set of x, and those sets do not intersect. As you noticed, the resulting formula is valid for exactly no x at all (or if it actually were valid for any x, we cannot deduce it this way). The first equation is only valid for -1 < x < 1. I'm not sure about the second equation. Obviously, it doesn't hold for any 0 < x < 1. I'm not yet convinced it holds for any x > 1. But why shouldn't it? Polynomial division is supposed to work for arbitrary x (except zeros of the divisor), in this case any x != 1. But: Polynomial long division as I have learned it requires that deg(dividend) >= deg(divisor) and I've been told to stop at "result 0, remainder 1". Not sure what happens if you choose to ignore those.
m00
Tub
Experienced Forum User
Joined: 6/25/2005
Posts: 1377
aww, can we select multiple options? They're all so adorable!
m00
Tub
Experienced Forum User
Joined: 6/25/2005
Posts: 1377
Isn't Nach cute when he's trying to look badass? I think he's cute.
m00
Tub
Experienced Forum User
Joined: 6/25/2005
Posts: 1377
..just when you thought we finally knew all tricks and techs ;) great find!
m00
Tub
Experienced Forum User
Joined: 6/25/2005
Posts: 1377
Wouldn't it be faster to have the first Lubicant drop the soul and the second one the item? No waiting for the soul to home in. I guess the RNG just didn't play along?
m00
Tub
Experienced Forum User
Joined: 6/25/2005
Posts: 1377
hu? That's a simple map from the events of the first example (with known probabilities) to the events of the second example. Giving 1/100th for every repdigit (11, 22, ..), 2/100th for every ab with a>b and 0 for everything else. Any special insights you're looking for?
m00
Tub
Experienced Forum User
Joined: 6/25/2005
Posts: 1377
I get different results for each of my monitors, around ~35ms. Considering that at 60 Hz, each frame is displayed for ~17ms, I really wonder where those two frames went. Switching outputs doesn't change that, the delay happens in the monitor. But to actually delay the incoming frames, the monitor would have to buffer those frames somewhere, which would mean that someone built >12 MB of storage into a monitor. WTF?
m00
Tub
Experienced Forum User
Joined: 6/25/2005
Posts: 1377
Looks pretty cool so far. The biggest problem with input based movie files would probably be to guarantee a stable frame rate. IIRC there was no way to do that from inside the mod (or did that change with the Steam port?). Meh, it's been too long since I did HL modding. There's also a fair deal of stuttering in the final video, we may eventually need a tool that generates smooth movements for perfect bunnies and better visuals.
m00
Tub
Experienced Forum User
Joined: 6/25/2005
Posts: 1377
L-Spiro wrote:
Point in case: Coding a Nintendo DS game using Metrowerks CodeWarrior. Being Nintendo DS, you need to take optimization seriously.
true, but as always: do tests before optimizing. Telling everyone to just use bit-functions because it worked on the DS may be a waste of effort (and code-readability) or even contra-productive on different platforms. Even then, I'd leave the code something like this, to make sure the intent is clear.
state = (~state) & 1; // state = !state, this saves x cycles
or even use a macro
// this saves x cycles per call on the DS because the compiler is stupid
#define NEGATE(a) a = (~a) & 1
...
NEGATE(state);
(use an inline function if the compiler supports it for obvious reasons.) I'm tutoring the C++ classes at our university, if I told the students there to use bit functions instead of readable operators, they'd kill me. There's also something to be said about replacing array-syntax with manual pointer manipulations (i.e. throwing everything into a 1-dimensional array and working from there). I've done it once because I wanted to win a benchmark for calculating the Levenshtein distance (as in: return all strings in a set where l_dist(query, word) < k). The program became slower. The compiler didn't understand the intent of my code and stopped it's own optimizations. Interestingly, using an array of int was slightly faster than using an array of bytes and the order in which I filled the matrix was important due to caching. But then I cut the time by half by applying a simple heuristic and bailing if the distance is too large. I shouldn't have focused on cycle-count optimizations in the first place, at least not before exhausting all optimizations on the algorithm level. The equivalent Java-code was 3 to 5 times slower on all cases, please don't talk about "java" and "performance" in the same sentence. ;) The best java-optimization would be to avoid excessive object allocation - so far all bottlenecks I've encountered were somehow related to that.
You are right about the padding. The compiler will do that for you (now don’t I sound like a hypocrite? =P )
to be fair, I think that's guaranteed by the standard ;) about the first example:
#include <stdio.h>

int main()
{
	double x = 3.1415;
	int i;
	for (i=1000000;i;i--)
	{
#if 0
		x /= 1.234;
		x /= 2.345;
		x /= 0.3455;
#else
		x *= (1.0 / 1.234);
		x *= (1.0 / 2.345);
		x *= (1.0 / 0.3455);
#endif
	}
	printf("%f\n", x);
	return 0;
}
division
27458608301646260078734700844078636923901316520727690355595540752359233165371709431870541266944.000000
real    0m0.117s

division, -O2
27458608301646260078734700844078636923901316520727690355595540752359233165371709431870541266944.000000
real    0m0.083s

multiplication
27458608301819373883828058048884692489328705290484643113470060021220783831766899877207431184384.000000
real    0m0.045s

multiplication, -O2
27458608301819373883828058048884692489328705290484643113470060021220783831766899877207431184384.000000
real    0m0.024s
multiplication is obviously faster, but also obviously leads to different results. Be careful there.
m00
Tub
Experienced Forum User
Joined: 6/25/2005
Posts: 1377
wow, feels like 1990. I absolutely agree with bisqwit that readability should be preferred (despite his IOCCC entries ;)). If you're going for total speed, do some profiling first. Then comment the code you're "improving" so it remains understandable. #2: sincos() is a GNU extension and will reduce portability. bad. Apparently, a good compiler can optimize the original code anyway. If you use a compiler without CSE in 2010, you have bigger worries than bottom-up-loops. But yeah, vVec.y = - vVec.z; looks good, too. #3: seeing that kind of type-casting makes me puke. If you're going for readability, you shouldn't use the int in the first place. No matter which direction you loop in. Always going top-down isn't the speedy answer either way, because other factors play a more important role than comparisons against 0. Need to iterate a large array twice? Do the first one top-down, the second one bottom-up. That way you'll start the second loop with data that's currently in your CPU cache. Or just stick to the readable code. #4: again, the correct solution is the builtin, not a top-down-loop. #5: yeah, the optimization you're looking for is bool, not unreadable bit-functions. Mapping to fast asm code is the compiler's job. #7: the "solution" isn't equal, you're changing iTotal. That sounds like a variable name that may be important. If I need to use iTotal further down the function I get nasty errors. It may (or may not) save a few cycles, nothing worth wasting time on when I change the function later. Heck, I often define those variables const, just to avoid such nasties, i.e.
const int size = <black magic here>;
T *array = new T[size];
#8: using a void * is a sin, but that's not what you're after. There's no need for padding either, since sizeof(SOMESTRUCT) will return the size including any end-of-struct-padding, so that sizeof(SOMESTRUCT[100]) == 100 * sizeof(SOMESTRUCT) and (char *) &arr[1] - (char *) &arr[0] == sizeof(SOMESTRUCT) remains valid at all times. Maybe you'll want the pointer first? That way dereferencing the pointer can be done by just dereferencing the struct's location instead of dereference + add + dereference again? (only valid if you maintain pointers to instances of the struct, I don't think it'd save anything for stack variables)
m00
Tub
Experienced Forum User
Joined: 6/25/2005
Posts: 1377
Johannes wrote:
There is a clear difference in the speed of random (non-cached) file access over my previous WD Caviar HDD, and the boot time (from GRUB to login) went from 12 to 8 seconds.
certain words bolded for emphasis. :) Those numbers are always impressive, but may only be a fraction of your real-world use cases.
Johannes wrote:
And of course, it's dead silent.
which would only help if an SSD allows you to get rid of all the mechanical HDs. At 200€ for 80GB, I don't see that happening for anything but mobile computers OR casual computer users which wouldn't need an SSD anyway.
m00
Tub
Experienced Forum User
Joined: 6/25/2005
Posts: 1377
The cheap SSDs are sometimes slower than hard drives or suffer from performance degradation and/or lower lifetimes. Nothing I'd want in my computer. And the expensive SSDs are, well, expensive. Right now, I'd rather stick more RAM into my computer. Another 4 GB can be had at ~50€, and it'll improve your computer's speed by a lot. The first time I start a program, it's as slow as before. The second time, everything's in RAM anyway, and RAM is faster than a SSD. Best thing is: the RAM cache will contain the data I'm currently using. It doesn't make me choose which of the ~2 Terabytes of data are important enough to be squeezed onto a 64G SSD and which aren't. Not to mention that I really don't want to split my work data over two file systems. SSD are nice if you a) write a lot (databases, large virtual memory, ..) b) care about boot-times or the time to start an app for the *first* time c) actually have a large set of files that are accessed regulary, overflowing your RAM-cache I currently have 6 GB of Ram, it's a little slow after booting or when changing activities, but after a while everything's fine. SSDs will improve over time, in speed, reliability and price, so I see little reason to buy one yet. 128GB for ~100-150€ at good speeds? I'll buy. But not yet. Of course, YMMV. And anyway, want to invest 200€ in your productivity? My primary suggestion would be a 24" monitor and proper input devices before going after moar horse power.
m00
Tub
Experienced Forum User
Joined: 6/25/2005
Posts: 1377
alright, if those numbers are correct, then that is a good PSU :) On the topic of prices, why are intel CPUs / mobos so expensive? It seems that a Phenom II X4 945/955/965 and fitting motherboard would be cheaper. Is the Core i5 (4x 2666 MHz) really faster than the Phenom X4 965 (4x 3400 MHz) in your workloads, or did you just opt for Intel by default? Because (at least at my vendor) the Phenom costs 15€ less, and in my experience matching motherboards are a bit cheaper es well. A few other thoughts: - do you actually have a full-HD monitor? As far as productivity goes, a good monitor or two are worth more than a few MHz under the hood. - get rid of the 60GB HD, maybe even the 160GB. Those must be old enough to die anytime. You could use one of them for swap and temporary files until it dies, but obviously don't trust them with important data. - on that note, don't trust the RAID with important data, either. A RAID is for speed and availability, not for data security - it cannot replace backups. It only takes a virus or filesystem corruption and your data is gone from all three disks at once. - try to keep the HDs cool. If you actually plan to cram 6 HDs into an older chassis, things might get a little hot.
m00
Tub
Experienced Forum User
Joined: 6/25/2005
Posts: 1377
moozooh wrote:
Tub wrote:
4 GB Ram should be the minimum for video editing, but you can always add another 2x2 when you have the money.
Are you sure that would be the minimum?
No, I haven't done any video editing. But if you plan to edit >1TB of video files, that data has to live somewhere. I'd prefer to keep as much of that in memory as possible. Hint: download the motherboard handbook off the manufacturer's website, check which RAM modules and configurations are "supported". Buy those.
moozooh wrote:
and doesn't have CUDA which I'm planning to use.
Why the nvidia-specific technology and not DirectCompute or openCL? nvidia claims to cater the HPC segment, but they're losing customer after customer because they cannot deliver fermi. Of all the GPGPU APIs, I wouldn't expect CUDA to matter in the long term.
moozooh wrote:
Then again, having a leeway in power output is not a bad thing since it won't really draw more from the outlet.
yes, it will, PSU efficiency varies depending on the workload. You'll want a PSU that reaches high efficiency at the workload you're expecting. But yeah, as you're taking it out of someone else's wallet, I don't think you'll spend days googling reviews and stuff.
m00
Tub
Experienced Forum User
Joined: 6/25/2005
Posts: 1377
<flamewar> You should totally go for Linux instead of that Windows crap </flamewar> Can't say much about the CPU, I'm not informed about Intel's offerings right now. Would be pointless anyway, since it's already ordered. No comments about the motherboard, either, although any recent mobo should have it's own audio processor onboard. 4 GB Ram should be the minimum for video editing, but you can always add another 2x2 when you have the money. The GTS 250 is just be a rebranded 9800 GTX, a card from mid-2008. It was high-end back then, but ATIs current mid-range GPUs are stronger, more modern (DX11 / openCL) and draw less power. If you plan to use the system for another quantupillion years before upgrading, lower power consumption can save you a bunch of money. Don't forget to figure that in when comparing prices. I've gotten a HD 5770 for christmas, no regrets so far. PSU: look for something with a high efficiency will save you long-term costs. No specific recommendations here, go browsing. I don't think you need 650W, even with 6 hard drives - try any of the online PSU calculators, you'd be surprised how few is actually enough. PSUs are usually more efficient close to their specified load, so don't overdo it.
m00
Tub
Experienced Forum User
Joined: 6/25/2005
Posts: 1377
It's also the only reason to get the 3 additional e-tanks in a low% run, actually. Everything else can be done with 99 energy. An any% might pick up the one tank that's on the way (for damageboosting / shinesparking etc), but certainly not three.
m00
Tub
Experienced Forum User
Joined: 6/25/2005
Posts: 1377
you don't survive Mother Brain's rainbow staredown contest with 4 energy tanks unless you got both suits. Picking up varia is faster than picking up more energy tanks.
m00
Tub
Experienced Forum User
Joined: 6/25/2005
Posts: 1377
I think it takes up too much space when there are multiple rewards or large rewards. Here's a few suggestions: Image-link 1 just moves them around to save vertical space 2 hides them beneath a placeholder. It'd be possible to just display the award there for users with one award, and a placeholder with mouseover for those with multiple. This solution takes less space while still allowing to provide more details. Of course, it's the most complicated one ;) btw, <img src=".." alt="alt-text" title="alt-text" /> seems to work well in any browser. alt should be displayed when the image isn't loaded, title when hovering your mouse.
m00
Tub
Experienced Forum User
Joined: 6/25/2005
Posts: 1377
Derakon wrote:
However, given that the game has to be able to reject certain map layouts, e.g. to make certain that wilderness zones don't intersect the town
Well.. most of the time ;) http://www.authmann.de/d2/maphack.jpg
m00
Tub
Experienced Forum User
Joined: 6/25/2005
Posts: 1377
thread-necromancy! \o/ I actually tried to hack into wine's RNG to see if this is possible. Turns out that my information about d2's RNG was wrong, d2 never used the system's RNG. It just removed the RNG callback from one of it's dlls, but it was replaced by an internal implementation, not by the system's RNG. As such, luck manipulation would have to be done the old-fashioned way. I'm abandoning this project right here.
m00