Search found 718 matches

by Sc4Freak
Sun Mar 20, 2011 10:03 pm UTC
Forum: Religious Wars
Topic: PC != Windows
Replies: 190
Views: 135595

Re: PC != Windows

The AMD Opteron is an x86 CPU, so I don't think you'll see any benefit from installing an OS compiled for a RISC architecture. :P I think AMD processors are RISC with some kind of translation for x86. I am not sure whether or not the core RISC is accessible, regardless. Apparently CISC and RISC are...
by Sc4Freak
Sun Mar 20, 2011 10:15 am UTC
Forum: Religious Wars
Topic: PC != Windows
Replies: 190
Views: 135595

Re: PC != Windows

This is somewhat OT, but does anyone know of an OS that runs on a RISC CPU without the x86 overlay? I have dual Opterons, and I want that. To make it more OnT, let me just say: I think that OS would be far superior to all others. I also really do, so it works, haha. The AMD Opteron is an x86 CPU, s...
by Sc4Freak
Sun Mar 06, 2011 9:46 pm UTC
Forum: Coding
Topic: what programs to use?
Replies: 6
Views: 1590

Re: what programs to use?

IDEs have invariably led to frustration for me. I haven't once regretted learning Vim, though. In fact, I'm still learning, although I've used it for years. There is just so much power hidden away in it that I doubt I'll ever completely master it. The same apparently goes for Emacs. One IDE feature...
by Sc4Freak
Sun Feb 27, 2011 6:17 am UTC
Forum: Hardware
Topic: L3 cache and independent sound card?
Replies: 3
Views: 1298

Re: L3 cache and independent sound card?

Processors have had L3 cache for a long time now. It helps with performance, but not really by that much. The difference in performance between a CPU with L3 and a CPU without L3 (on the same architecture) might only be 5-10% for general desktop applications. If you know what L2 cache is, L3 is more...
by Sc4Freak
Fri Feb 25, 2011 9:16 pm UTC
Forum: Coding
Topic: Coding: Fleeting Thoughts
Replies: 9979
Views: 1974048

Re: Coding: Fleeting Thoughts

It's unnecessary, actually. Calling delete on NULL is legal and a no-op. Oh good, so it leaks everywhere and you don't get any errors at all (at least a compile warning I would hope?). No. There's nothing wrong with calling delete on a NULL pointer, and it's not indicative of a bug or memory leak. ...
by Sc4Freak
Fri Feb 25, 2011 10:55 am UTC
Forum: Coding
Topic: Coding: Fleeting Thoughts
Replies: 9979
Views: 1974048

Re: Coding: Fleeting Thoughts

It's unnecessary, actually. Calling delete on NULL is legal and a no-op.
by Sc4Freak
Fri Feb 25, 2011 6:33 am UTC
Forum: Coding
Topic: Coding: Fleeting Thoughts
Replies: 9979
Views: 1974048

Re: Coding: Fleeting Thoughts

Time to break out shared_ptr.
by Sc4Freak
Thu Feb 24, 2011 11:41 pm UTC
Forum: Coding
Topic: java, classes within classes
Replies: 4
Views: 1011

Re: java, classes within classes

public class Person { int luck; Country country; public Person(int a, Country c) { luck = a; country = c; } public static int getWealth() { int x = country.getFood() + country.getWealth(); x /= 20 - luck; return x; } } Store a reference to the person's country in each Person. And since you're using...
by Sc4Freak
Sat Feb 19, 2011 10:52 pm UTC
Forum: Hardware
Topic: Windows Virtual Memory
Replies: 23
Views: 2461

Re: Windows Virtual Memory

Why in the world would you want to disable the page file? Disabling the page file is far more likely to decrease performance than anything else. This really depends on the OS and how you use your computer. I run Linux on a computer with 8GB of RAM. Normally I run without swap: 5GB or so is used for...
by Sc4Freak
Sat Feb 19, 2011 11:12 am UTC
Forum: Hardware
Topic: Windows Virtual Memory
Replies: 23
Views: 2461

Re: Windows Virtual Memory

Why in the world would you want to disable the page file? Disabling the page file is far more likely to decrease performance than anything else. Windows does not waste a single byte of memory. Memory which is "free" is used as a cache for preloading, increasing filesystem performance, and ...
by Sc4Freak
Sun Feb 13, 2011 11:53 pm UTC
Forum: Coding
Topic: Coding: Fleeting Thoughts
Replies: 9979
Views: 1974048

Re: Coding: Fleeting Thoughts

The rules are the same as C/C++. [...] implicit double -> float is not. C/C++ has implicit any-numeric-to-any-numeric conversion... whether it's getting bigger or smaller. You can implicitly convert a double as an unsigned char, and it won't blink. Okay, wow. I've been away from C++ for way too long.
by Sc4Freak
Sun Feb 13, 2011 10:06 am UTC
Forum: Coding
Topic: Coding: Fleeting Thoughts
Replies: 9979
Views: 1974048

Re: Coding: Fleeting Thoughts

@for loop varibles If each for loop is independent of each other, I sometimes just tend to keep using i or ind for it. If the loop is for exact purposes, I tend to name it something less than 4 letters. ( 2x2 grid, vars : x,y or r,c ). Worst nested loop I made was 7 while loops deep <_<, I had to w...
by Sc4Freak
Thu Feb 03, 2011 11:51 am UTC
Forum: Coding
Topic: Java threadsafety
Replies: 5
Views: 953

Re: Java threadsafety

Granularity. Using the class as a lock everywhere means that methods will block one another even if they don't share any data. For example, consider the following: (in pseudo-Java) public class MyClass { private Integer x; private Integer y; public static void IncrementX() { synchronized(MyClass.cla...
by Sc4Freak
Tue Feb 01, 2011 6:50 am UTC
Forum: Hardware
Topic: Trusty HDD Recommendation!
Replies: 46
Views: 4482

Re: Trusty HDD Recommendation!

A couple of years ago the Seagate 1TB and 1.5TB drives had some serious firmware issues - they were randomly bricking themselves and freezing, rendering themselves inoperable and destroying people's data at random. I only ever buy WD drives. Of the 20 or so WD drives I've bought over the past 6 year...
by Sc4Freak
Fri Jan 21, 2011 11:25 am UTC
Forum: Hardware
Topic: Preparing For SSD
Replies: 8
Views: 1489

Re: Preparing For SSD

Latency vs throughput is an interesting debate. I would argue that most HD intensive apps are not latency driven. Latency dominates smaller reads which are cached in memory. Booting would be an example of something throughput bound. It's generally accepted that random read/write is by far the most ...
by Sc4Freak
Tue Jan 18, 2011 10:58 pm UTC
Forum: Coding
Topic: 'For In's in C#?
Replies: 24
Views: 3336

Re: 'For In's in C#?

It's useful when you need the key as well as the value... 'for in' returns the key (index), while 'for each' returns the value. MyObjectWithProperties obj1; MyObjectWithProperties obj2; // here's a part where both objects get treated differently and might end up with different values // comparing p...
by Sc4Freak
Tue Jan 18, 2011 10:33 pm UTC
Forum: Coding
Topic: 'For In's in C#?
Replies: 24
Views: 3336

Re: 'For In's in C#?

Is there something that "for-in" does that "foreach" doesn't?

Code: Select all

void PrintStrings(List<string> text)
{
   foreach(String s in text)
   {
      Console.WriteLine(s);
   }
}
by Sc4Freak
Fri Jan 14, 2011 10:08 pm UTC
Forum: Religious Wars
Topic: HTML5 or Flash?
Replies: 182
Views: 29132

Re: Html5

Ars has an excellent writeup on the topic: Google's dropping H.264 from Chrome a step backward for openness It pretty much reflects my thoughts exactly. Sigh. That article is crap. It's trying to make an issue about differing definitions of "open". Here's the thing. All right-thinking peo...
by Sc4Freak
Thu Jan 13, 2011 6:31 am UTC
Forum: Religious Wars
Topic: HTML5 or Flash?
Replies: 182
Views: 29132

Re: Html5

Ars has an excellent writeup on the topic:

Google's dropping H.264 from Chrome a step backward for openness

It pretty much reflects my thoughts exactly.
by Sc4Freak
Wed Jan 12, 2011 1:08 am UTC
Forum: Religious Wars
Topic: HTML5 or Flash?
Replies: 182
Views: 29132

Re: Html5

Google has outlined several reasons why HTML5 is unsuitable for YouTube. They won't be switching away from Flash any time soon. One of the major problems with WebM is that it has no hardware support anywhere, whereas H.264 has roughly a billion devices out there with hardware decoding support. Switc...
by Sc4Freak
Tue Jan 11, 2011 9:18 pm UTC
Forum: Religious Wars
Topic: HTML5 or Flash?
Replies: 182
Views: 29132

Re: Html5

"Great" in the sense that it's a great setback for HTML5 adoption, sure. Whether Google likes it or not, H.264 is the industry standard, and the more browsers that support H.264 the more people will use HTML5 instead of flash. Apparently Google felt that pushing WebM was more important tha...
by Sc4Freak
Sun Jan 09, 2011 10:06 pm UTC
Forum: Religious Wars
Topic: HTML5 or Flash?
Replies: 182
Views: 29132

Re: Html5

You have physical access to your hardware. So what? What are you going to do, take a soldering iron and reroute the traces on your motherboard away from the trusted platform module? Buy your own semiconductor foundry to construct your own DRM-free CPUs? no, just wire up a recording device in place ...
by Sc4Freak
Sun Jan 09, 2011 12:56 am UTC
Forum: Religious Wars
Topic: HTML5 or Flash?
Replies: 182
Views: 29132

Re: Html5

everything you named is no real problem, since the hardware is still under my control (other than, say, the projector in a cinema) Maybe so, but that isn't going to be useful. Consider a content stream that is fully encrypted from provider to client. The network stream is encrypted. The decoding on...
by Sc4Freak
Fri Jan 07, 2011 1:06 pm UTC
Forum: Religious Wars
Topic: HTML5 or Flash?
Replies: 182
Views: 29132

Re: Html5

does the iPhone support HTML 5? And I don't care if IE does, microsoft can DIAF. IOS, the operating system for both iPhones and iPads supports HTML5. You should care what Microsoft does, because if all the users of IE can't use html5, then a majority of the internet will still want to hold on to fl...
by Sc4Freak
Fri Jan 07, 2011 8:03 am UTC
Forum: Hardware
Topic: Trusty HDD Recommendation!
Replies: 46
Views: 4482

Re: Trusty HDD Recommendation!

What? Faster than a good SSD? Never! Per dollar, an array of "slower" drives will provide much faster throughput than a "faster" SSD. Why? Because SSD's are an order of magnitude more expensive and not an order of magnitude faster. Except that they are. Response time on traditio...
by Sc4Freak
Thu Jan 06, 2011 11:11 pm UTC
Forum: Coding
Topic: Oddly specific PHP exploit
Replies: 9
Views: 2637

Re: Oddly specific PHP exploit

For most users, recompiling PHP isn't exactly a viable "fix".
by Sc4Freak
Thu Jan 06, 2011 10:10 pm UTC
Forum: Coding
Topic: [C++] Numeric data validation
Replies: 16
Views: 3073

Re: [C++] Numeric data validation

Okay, first of all, do not use atof. atof is a legacy C function that's unsafe and gives you no way to detect an error, making it completely and utterly useless for data validation. Upon error, atof returns 0.0, which is indistinguishable from a legitimate output of 0.0. In C++ you have absolutely n...
by Sc4Freak
Tue Jan 04, 2011 9:54 pm UTC
Forum: Hardware
Topic: At My Wit's End With the 360 Controller Adapter
Replies: 2
Views: 840

Re: At My Wit's End With the 360 Controller Adapter

What version of Windows are you running? You don't need the disk for Windows Vista or Windows 7 - it should "just work". I have an Xbox 360 wireless adaptor for Windows too, and it just works when I plug it in without any drivers. First thing you should try is to eliminate some variables b...
by Sc4Freak
Tue Jan 04, 2011 10:32 am UTC
Forum: Coding
Topic: How do I speed up this code?
Replies: 16
Views: 1972

Re: How do I speed up this code?

Although the background might not change, what's in front of it almost certainly will, meaning you'll have to redraw the background every frame.
by Sc4Freak
Mon Jan 03, 2011 6:36 am UTC
Forum: Coding
Topic: How do I speed up this code?
Replies: 16
Views: 1972

Re: How do I speed up this code?

Garbage collection is slow, but not that slow. We're talking milliseconds per collection. More likely, the CPU just can't handle that many things being drawn at once. You're using software rendering, which is naturally extremely slow, especially if you're drawing lots of textured rotated objects. Of...
by Sc4Freak
Sun Dec 26, 2010 9:54 pm UTC
Forum: Computer Science
Topic: Networking
Replies: 3
Views: 1100

Re: Networking

That depends entirely on what Transmit() does. If Transmit is intended to take an arbitrary object, serialize it, and send it through the network, then it should take an Object parameter (or a generic parameter if you need the static type). Structs will be boxed into objects anyway. What "more ...
by Sc4Freak
Sat Dec 25, 2010 10:17 pm UTC
Forum: Coding
Topic: [OpenGL Windows C++] What exactly am i doing wrong here?
Replies: 7
Views: 1188

Re: [OpenGL Windows C++] What exactly am i doing wrong here?

I'm not terribly familiar with OpenGL, but I imagine an equivalent of PIX must exist. It's usually pointless trying to find a problem just by looking at the code; you should always use a debugger. I am going to partially disagree with your last statement, about finding a problem by looking at the c...
by Sc4Freak
Sat Dec 25, 2010 9:16 pm UTC
Forum: Coding
Topic: [OpenGL Windows C++] What exactly am i doing wrong here?
Replies: 7
Views: 1188

Re: [OpenGL Windows C++] What exactly am i doing wrong here?

You need to learn to use a debugger. In DirectX, when something like this happens, PIX is always the go-to tool. It's like a fully-featured debugger, except that it debugs DirectX calls and HLSL shaders instead of C++ code. You can view and debug shaders, step through draw calls, and view vertices/t...
by Sc4Freak
Sat Dec 25, 2010 4:29 am UTC
Forum: Computer Science
Topic: Networking
Replies: 3
Views: 1100

Re: Networking

You can't just dump raw data through a connection and pray that it the other side can make sense of it. You need to serialize/marshal your data to a standard format that both sides of the connection unambiguously agree on (otherwise known as a protocol ). This is necessary because of portability/com...
by Sc4Freak
Fri Dec 24, 2010 4:16 am UTC
Forum: Coding
Topic: Coding: Fleeting Thoughts
Replies: 9979
Views: 1974048

Re: Coding: Fleeting Thoughts

I'm fairly certain use of extensions or exploitation of nonconformant behaviour is allowed. I seem to recall one of the entries a few years back claimed to be the smallest self-replicating C program ever: it was 0 bytes long. Some compilers accepted an empty file as input and generated an executable...
by Sc4Freak
Mon Dec 20, 2010 5:23 am UTC
Forum: Hardware
Topic: Can't track down a data bridge cable?
Replies: 4
Views: 1035

Re: Can't track down a data bridge cable?

Do it over a network, not USB. If your network cards are modern enough, they'll do crossover automatically and you can just connect both computers via. any old ethernet cable. Otherwise, you need a crossover cable unless you have a hub or a switch.
by Sc4Freak
Sun Dec 19, 2010 9:31 pm UTC
Forum: Hardware
Topic: Tablet PC's
Replies: 9
Views: 2017

Re: Tablet PC's

I get the feeling that many people in this thread don't have much experience with drawing tablets, or tablet PCs in general. The iPad is absolutely terrible for drawing. Just because one person was masochistic enough to draw on an iPad doesn't mean it's a good solution. I've seen works of art made i...
by Sc4Freak
Wed Dec 15, 2010 11:16 pm UTC
Forum: Coding
Topic: doesnt work on (stupid) windows
Replies: 13
Views: 1862

Re: doesnt work on (stupid) windows

It tends to be a lot harder to use C++ standard library functions in assembler because a large portion of it uses templates (meaning the code isn't compiled into a library that you can load in assembly) and because of name mangling. C++ also doesn't specify any sort of standard ABI. If you want to i...
by Sc4Freak
Wed Dec 15, 2010 10:54 pm UTC
Forum: Coding
Topic: Similarities between C/C++ and Java
Replies: 24
Views: 5571

Re: Similarities between C/C++ and Java

The syntax is similar, but honestly the syntax is the least of your worries. The syntax for a language can be picked up in a couple of days, the hard part is learning how to write idiomatic code. If you learn Java, you'll (probably) be learning OOP along with it, which remains a very common paradigm...
by Sc4Freak
Wed Dec 15, 2010 10:48 pm UTC
Forum: Coding
Topic: intel mul instruction
Replies: 11
Views: 2029

Re: intel mul instruction

Why would you want to reimplement a CPU's integer multiplication instruction anyway? If you're doing it to learn how to implement multiplication yourself, then it shouldn't really matter how the CPU's built-in instruction does it. If it's for performance, you won't be able to beat the CPU. A modern ...

Go to advanced search