Catch up on stories from the past week (and beyond) at the Slashdot story archive

 



Forgot your password?
typodupeerror

Comment: Re:Fuck you, developers. (Score 1) 261

by FoboldFKY (#34194178) Attached to: When DLC Goes Wrong

Episodic content is annoying like that when you have to wait so long to get to the next chapter.

Really, that's only a problem if the company making the episodes isn't very good at it. Valve may have popularised the idea, but to be honest, they suck balls at it. They realised the "smaller" and "cheaper" parts well enough, but made a complete pig's breakfast of the "more frequent" part. I just don't think Valve as a studio is capable of doing episodes properly.

Rather, you should be looking at Telltale. Once they start a season, they release an episode once a month. I think they could improve by actually releasing on a predictable date as opposed to whenever so long as it's not next month yet.

It's not a problem with episodic games, it's a problem with Valve (to say nothing of whoever it was that was doing SiN Episodes).

Comment: Re:Stress? (Score 4, Interesting) 470

by FoboldFKY (#33427198) Attached to: 3 Drinks a Day Keeps the Doctor Away

I don't drink. But it's not because I'm a tightwad: I just hate the taste of alcohol. I can taste it in seemingly trace amounts in everything other than drinks with ridiculous amounts of sugar.

There is a smaller reason in that I've seen a lot of people, including friends, do... inadvisable things while drunk. The thought of not being in possession of my faculties and not being able to tell scares me.

I also know I have a somewhat addictive personality. So on the whole, I think I'll continue to not drink booze.

Comment: You know what's sad? (Score 1) 1

by FoboldFKY (#28364253) Attached to: IE8 Desperation from Microsoft Australia

The reason IE8 is the only browser that can crack the clues is because they're using server-side user agent sniffing. A quick fiddle with the User Agent Switcher addon in Firefox fixes that.

But you know the most pathetic part? The site doesn't work properly with IE8, requiring the user to explicitly disable compatibility mode first.

Comment: Re:D is nice, but... (Score 1) 404

by FoboldFKY (#26953043) Attached to: Walter Bright Ports D To the Mac

Programming in D is nice, but the situation is a bit annoying.

1. Tango vs Phobos. Phobos is the official standard library, but it seems most use Tango. Phobos is also pretty low level compared to Tango.

This is somewhat alleviated in D2 via a shared core runtime. The problem is more or less that which library you use is based on the task at hand, and personal choice. There have been numerous attempts to merge them, or kill one off, and they've never succeeded because people don't want to give up the library they (legitimately, for their circumstances) see as better.

For D1, your best bet is probably to give Tango + Tangobos (which is Phobos implemented on top of Tango) a shot. For D2, there are efforts to fix the situation.

2. The reference compiler dmd is 32bit only, gdc is outdated and abandoned, and ldc is still alpha status and has missing features. Ldc is quite promising though.

Yeah; I think LDC is the future of D. We'll just have to be patient. :)

3. D2 is maybe the biggest issue. It has very useful features, such as partial C++ compatibility, but D2 is a moving target and practically no library supports it. It's also unknown when or if ever D2 will become stable. I haven't seen much discussion about it in the newsgroup either.

That's because it's not finished. You can't complain that an experimental version that changes on a regular basis doesn't have library support.

As for when D2 will be finished, I deeply suspect it will be like it was with D1: Walter and the community will get fed up with it as a moving target, draw a line in the sand and *boom* finished; let's start on D3.

Comment: Re:High performance of C++ equal to D??? (Score 1) 404

by FoboldFKY (#26952943) Attached to: Walter Bright Ports D To the Mac

http://www.digitalmars.com/d/1.0/memory.html#stackclass - Objects in D are not always allocated on the heap.

No, but making it an attribute of the class where they are allocated makes no sense at all. A general-purpose class cannot be defined to use stack allocation, and because D doesn't support multiple inheritance I can't mix the trait in without reimplementing it for each class I want to use that way.

In fact, you can force a class to be scope allocated by putting "scope" at the front of the class declaration. This doesn't remove the requirement for 'scope' at the allocating statement; merely makes it mandatory.

Note that you cannot use this to give a class value semantics; if you could, you would open the door to the slicing problem. By making it a property of the allocating context, you avoid that.

Comment: Re:High performance of C++ equal to D??? (Score 1) 404

by FoboldFKY (#26952909) Attached to: Walter Bright Ports D To the Mac

But the syntax is all wrong. It's easy to forget that an object is allocated as 'scope', because the syntax is the same as in heap allocation.

And the template system is D is exactly the same as in C++. The differences are superficial, only in syntax. D's templates is a Turing complete system, just like in C++.

I guess that means the differences between C++ and assembler are superficial, only in syntax. After all, anything you can compute in C++ you can compute in assembler.

Ease of use is definitely overrated.

Comment: Re:High performance of C++ equal to D??? (Score 1) 404

by FoboldFKY (#26952899) Attached to: Walter Bright Ports D To the Mac

As you already say, if you are very concerned about performance in a situation with lots of small objects you can use structs. Simply ignoring structs because you are too lazy to use them does not make D slow. With a bit of experience and a few rules of thumb it's not hard to choose.

But structs do not have the same treatment as classes.

Your point is... what, exactly? They're for completely different purposes; of course they're treated differently. Otherwise, we'd only have classes or structs, not both.

I think maybe you're talking about what is called "scope" now. It allocates the memory for the class on the stack. Yeh, it doesn't cover every possible use case of by-value classes, but it can be a nice optimization.

And a heck of lot difficult to spot. At least, in C++, it's obvious what is a pointer and what it is not.

This is a valid concern, but I can't see what this has to do with the particular quoted part of the gp's post. He's pointing out that scope is useful, and you're complaining about not being able to tell if an arbitrary identifier has value or reference semantics. Huh?

That said, just because something doesn't have a star out the front in C++ doesn't mean it's a value type; I've seen some truly terrifying abuses of operator overloading. At least in D, it's trivial to find out: stick in a pragma(msg, whatIs!(x)) and bob's your uncle (note: whatIs is not in the standard library, but I've written similar templates before without much trouble.)

Yes you use structs when you want an efficient aggregate value type. Classes and structs have different semantics in D. It's pretty easy to choose once you get the hang of it. If you are likely to want to put virtual functions on the thing, make it a class. If you want to pass lots of them around by value, make it a struct. If you can count on your fingers how many instances you will have, make it a class -- the hit from allocation won't matter. There is some gray area in-between, granted, but in practice it's usually pretty clear, and the benefit is that you do completely eliminate the slicing problem by going this route. If you really can't decide you can also write the guts as a mixin and them mix them into both a class and a struct wrapper. Or just write it primarily as a struct, and aggregate that struct inside a class. The use cases that are left after all that are pretty insignificant.

Why do all that? no thanks. C++ is much better in this regard.

Yeah, why bother designing your program before you write it? After all, maybe you want to make your 16-byte vectors into classes, or turn GUI widgets into value structs!

Honestly, I'm amazed every time I see this argument. Let's try it from the other direction: Java seems to do pretty well without "plain old data" structs; clearly, you don't need structs to write a program. If you really don't want to have to engage your brain, just pretend structs don't exist.

D's template system has gone far beyond C++'s.

Nope. It hasn't.

It's even far beyond what C++0x is going to be.

Nope, it isn't.

Alias template parameters

C++ has typedef.

Yeah, so this combined with the 'auto' comment before lead me to believe you don't actually know what you're talking about.

Tell me, how do you typedef a function in C++? Or a string value?

template mixins

Mixins are bad from a design standpoint.

I personally think you're wrong, but that's an opinion and not a valid argument. :)

static if

C++ can do it with templates.

template isLowerAlpha(char c)
{
static if( 97 <= c || c <= 122 )
const isLowerAlpha = true;
else
isLowerAlpha = false;
}

And I can get even more complex from there. Maybe you could match D in terms of ability (which I doubt,) but you can't argue that it's anywhere near as intuitive or simple.

a host of compile-time introspection facilities, the ability to run regular functions at compile-time

And introduce big complications in the code.

C++ is just one giant complication. Hell, programming is complicated. First of all, introspection is invaluable; it means you can write templated types and functions that actually know about their type parameters. CTFE (compile time function evaluation) is also brilliant because it means you can move computations into the compile step. Yes, it adds complexity to the code, but the difference is minimal. Especially when the alternative is to either write and manually choose between a shitload of marginally different templates in the first case, and just moving that complexity to runtime in the second.

type tuples

Boost provides them.

Really? So Boost can do this, then?

template dump(Ts...)(Ts values)
{
foreach( i,value ; values )
writefln("values[%d] = %s", i, value);
}

Note that the above code expands at compile-time, and works for an arbitrary number of arguments.

D metaprogramming is to C++ metaprogramming as C++ OOP is to OOP in C. It takes a technique that the previous language begrudgingly permitted and turns it into one that is actually supported by the language.

Nope. The C++ and D template type system are exactly the same.

I wasn't aware there was a special type system for regular code and templates in C++. I know there isn't in D. But saying the type systems in D and C++ are the same is just wrong: transitive const, immutability, sharing (coming soon).

In fact, if you ask Walter, all the template tricks in D are done using the C++'s Turing complete template system.

So I assume you could, with Walter's permission, post both your question and his response somewhere? Unless, of course, you're psychic.

You strike me as one of the C++ programmers who irrationally hates D because it's trying to improve upon and replace your favourite language, but you haven't spent enough time using D to actually be able to make an informed choice. That, or your knowledge of it is so out of date that it's no longer applicable.

You're more than welcome to your choice, of course. Just don't go around spreading FUD about D, please.

Comment: Re:Runtime design (Score 1) 404

by FoboldFKY (#26952533) Attached to: Walter Bright Ports D To the Mac

If I had to guess, I'd say it's because that would involve introducing another function call between D and C. Currently, a lot of the C library functions exposed in D are just extern(C) declarations, so code is calling them directly. Placing a C wrapper around those calls would slow things down (and Walter doesn't like slow.)

Incidentally, there's a tool Walter wrote called htod which actually runs a C or C++ header through the C++ compiler and then converts the internal AST into a D header. Sadly, it runs it through the DigitalMars compiler, and DMC doesn't run on mac. :P

Input Devices

Avoiding Wasted Time With Prince of Persia 507

Posted by Soulskill
from the getting-to-the-good-stuff dept.
Zonk pointed out an interesting video presentation by Shamus Young on the importance of the new Prince of Persia, calling it the most innovative game of 2008. Young brings up the fact that many of today's games punish failure by wasting the player's time; being sent back to a check point, the beginning of a level, or sometimes even further. This cuts into the amount of time players have to enjoy the meat of the game — the current challenge they have to overcome. Unfortunately, as Young notes, modern controllers are designed for players who have been gaming since they were kids, and have evolved to be more complicated to operate than an automobile. The combination of these factors therefore limits or prevents the interest of new players; a problem Prince of Persia has addressed well through intuitive controls and the lack of punitive time sinks.
The Courts

RIAA Sues 19-Year-Old Transplant Patient 663

Posted by kdawson
from the kicking-dogs-on-the-way-home dept.
NewYorkCountryLawyer writes "Just when you think they've reached rock bottom, it seems the RIAA always finds room to sink a little lower. This time they've sued an innocent, 19-year-old transplant patient, hospitalized with pancreatitis and needing islet cell transplants. Although the young Pittsburgh lady claims that she did not infringe any copyrights, she failed to answer the complaint in time, and a default judgment was taken against her. A Pittsburgh area lawyer has stated that he will represent her pro bono and make a motion to open up the default."
Censorship

Nation-Wide Internet Censorship Proposed For Australia 424

Posted by timothy
from the unarmed-populace dept.
sparky1240 writes "While Americans are currently fighting the net-neutrality wars, spare a thought for the poor Australians — The Australian government wants to implement a nation-wide 'filtering' scheme to keep everyone safe from the nasties on the internet, with no way of opting out: 'Under the government's $125.8 million Plan for Cyber-Safety, users can switch between two blacklists which block content inappropriate for children, and a separate list which blocks illegal material. ... According to preliminary trials, the best Internet content filters would incorrectly block about 10,000 Web pages from one million."

"Ignorance is the soil in which belief in miracles grows." -- Robert G. Ingersoll

Working...