Follow Slashdot blog updates by subscribing to our blog RSS feed


Forgot your password?

Comment: Re: DirectX is obsolete (Score 1) 90

by TheRaven64 (#48902995) Attached to: DirectX 12 Lies Dormant Within Microsoft's Recent Windows 10 Update
Actually, a lot of these games just use WINE's implementation of DirectX. This either translates the calls to OpenGL or implements a DirectX state tracker directly if you have Gallium drivers configured correctly. The same is true of a lot of Mac games. Good luck getting WINE to run on a console though...

Comment: Re:DirectX is obsolete (Score 1) 90

by TheRaven64 (#48902991) Attached to: DirectX 12 Lies Dormant Within Microsoft's Recent Windows 10 Update

Your typical GPU driver is about 10MB of object code. It contains a complex optimising compiler and controls a device that has complete DMA access to your computer. It is written with speed as the only significant goal. Making a GPU driver 1% faster contributes enough to sales to pay the salaries of several driver developers. Making the GPU driver more secure generates zero additional sales.

The shader code that's fed into this stack from WebGL is sanitised and is completely safe to run, assuming that your driver stack is 100% bug free. Still feel safe?

Comment: Re:DirectX is obsolete (Score 1) 90

by TheRaven64 (#48902983) Attached to: DirectX 12 Lies Dormant Within Microsoft's Recent Windows 10 Update

If you write a game that uses Direct3D, you can easily target Windows, XBox, and Windows Phone. If you write a game that uses OpenGL, then you can easily target all of the major desktop, mobile, and console platforms. If your game runs on a generation-old console, then it will run on current-generation mobiles as well. This gives you three markets: First release for high-end PCs, second for consoles, third for mobiles. You can get a solid revenue stream out of each one. You don't lose the Windows marked by choosing OpenGL, but you do lose every other market by using Direct3D.

That said, the APIs are so similar these days that you'll typically use some middleware to provide the abstraction. All of the important code is written in the shaders and these are much easier to port between GLSL and HLSL than they are to port between different GPUs and maintain performance.

Comment: Re:Modula-3 FTW! (Score 2) 315

by TheRaven64 (#48902963) Attached to: Ask Slashdot: Is Pascal Underrated?

Implementing this in the standard library means that the language needs to support pass-by-reference (which Pascal and C++ do, but C doesn't). This single feature does a lot to reduce readability. In C, I know that inc(x) is a function that does not modify the value of x, without reading any additional code[1]. In Pascal or C++, I need to look at the definition of inc() to know if x will be the same before and after the call.

An important idea at the core of readability for a language is the amount of code that I have to read to understand a single line. In any language that has pass-by-reference, this amount is larger than a language that doesn't. To achieve the same thing in C, I'd have to write inc(&x), and then everyone reading that code would know that x may be modified. (Note: the almost-equivalence of array and pointer types in C is a good counterexample where Pascal wins massively in readability).

[1] It could be a macro, but most coding conventions require macros that can't be used as if they were functions to be all-caps.

Comment: Re:Modula-3 FTW! (Score 1) 315

by TheRaven64 (#48902951) Attached to: Ask Slashdot: Is Pascal Underrated?
This would be true, except for two things:
  • Lines with more than 66 non-whitespace characters decrease readability.
  • Statements with more than 66 non-whitespace characters are common in most programming languages.

This means that you end up either with lots of continued statements or lots of overly-long lines in Python. If you have the former, then it's hard to see the indentation. If you have the latter, then you can see the indentation but the overall readability suffers. This can be fixed by using tabs for semantic indentation and spaces for alignment and an editor that supports highlighting tabs, but the Python style guides tell you not to do this.

Comment: Re:Modula-3 FTW! (Score 1) 315

by TheRaven64 (#48902941) Attached to: Ask Slashdot: Is Pascal Underrated?

There are some simple things where C is far more readable to a moderately experienced programmer. Consider the beginning and ending of blocks. In pascal, these are signified by begin and end. When you look at a chunk of Pascal code, they can be hard to pick out because they're just words in a sea of words. In C, you use the { and } symbols. These are symmetrical and the human brain has spent a lot of time evolving to be trivially able to spot symmetry because symmetry normally means 'predator about to try to eat me'. You can very quickly spot a column that has a { at the top and a } somewhere later (much more easily if they're aligned together and there's nothing else on the line). There were some studies done in the '80s that confirmed this, though sadly a lot of C coding conventions specify brace placement in a way that reduces readability.

The main strength of Pascal is that it forces you to think more than C. If you don't write what you mean in Pascal, it usually fails to compile. C will happily do... something. This level of redundant verbosity makes Pascal both quite a frustrating language for experienced developers and a great language for teaching. I find that people who learned Pascal tend to write better C code than those that didn't, but neither group has a strong desire to write Pascal.

Comment: What, no Capcha? (Score 1) 83

by goombah99 (#48889461) Attached to: 'Never Miss Another Delivery' - if You Have a TrackPIN (Video)

1) You could use the last 4 digits of the package tracking number as the delivery driver's PIN, and tell him or her what to do in a note stuck to your front door.

I think they need to have a Capcha as well so the delivery person can prove he's a human not an autonomous drone. Make him do a mathc problem to compute the number.

Comment: Re:It is hard not to associate this with 8chan (Score 1) 182

by Pfhorrest (#48888341) Attached to: Moot Retires From 4chan

Thats why the best communities are those where comments are rated not by whether people agree with them, but by whether they are of discursive merit regardless of content: well-reasoned, polite, respectful, etc. That is why slashdot here has moderations like 'insightful' and 'flamebait' but not 'agree' or 'disagree'. So we can still preserve a quality of discourse with a variety of opinions, instead of either an echochamber or an unruly mob.

Of course that is really dependent on the people, not the software. The software can at best encourage behavior, but if people want to they can still abuse 'informative' as 'I agree' or 'overrated' as 'disagree'. Like all communities, everything depends on the quality of the people.

Comment: Re:Just give the option to turn it off... (Score 1) 790

by jo_ham (#48887141) Attached to: Fake Engine Noise Is the Auto Industry's Dirty Little Secret

If you're looking at things like the weight of a solenoid capable of actuating a transmission as a significant impact on mileage vs an otherwise identical manual transmission then you're just reaching for things to support your original argument in the face of new evidence.

The difference in mass between different drivers is going to vary far more than the delta between a modern "manumatic" and a manual.

They're not the big heavy oil-filled lumps that they used to be.

You know you've landed gear-up when it takes full power to taxi.