Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - alway

Pages: 1 ... 18 19 [20] 21 22 ... 474
286
General Discussion / Re: if self.isCoder(): post() #Programming Thread
« on: October 23, 2016, 12:54:59 am »
It's better to write your own structure that has an interface similar to std:: stuff. It's tons more compact and efficient. It's good practice to make your own String class that is a replacement for std::string. It saves memory too.
Eh, string seems like one of the worse types to do this for. Strings have a *ton* of functionality and they're used a *lot*.

I'd much rather have the extremely reliable STL for something like that, even if it's a little slower. It's better than having bugs.
You would think so, but you would be wrong. And after you got tons of bugs from using std::string, you would realize it's actually not able to do a lot of what you need it to. Unicode for example, which will be a !!HUGE!! issue for any international support. UTF-8 is probably the most common solution, but several parts of the std library just plain do not support variable-length character encodings.

This means things work in many cases (because UTF-8 was designed in such a way to prevent problems with naive handling), but that really filthy things can be done which may screw you over. For example, incrementing a std::string iterator or otherwise by 1 will not always get you the next character. It will get you the next byte, but with the variable-length encoding, that may still be part of the first character. So if, for example, you wanted to send your strings in limitted size packets over some IO device like a network then print them out immediately on the far side, some of your characters would get mangled into garbage because they were missing the following bytes. (Source: been there, debugged that.) And believe me, an odd off by one in your custom string class is way easier to diagnose and fix than a bug that mysteriously appears only on a foreign language VM with your software that you otherwise wouldn't want to use for testing.

Additionally, you can use the structure of UTF-8 to actually help you recognize bugs elsewhere in your system by implementing a good string class! See, UTF-8 has a specific pattern to the encoding bits such that certain sequences are invalid. By throwing an assert in common use when it sees invalid UTF-8, you can detect memory stomps and other bad data getting into a string's memory in your program automatically whenever it is used, without any additional cost. This has alerted us to numerous subtle bugs in our code. It even detected an otherwise silent multithreaded stack corruption bug caused by a callback going rogue.

I personally spent about a month debugging various string issues in a project that (was required by interfaces to) use a mix of wide characters, UTF8 and typical strings, with a bunch more bugs of that nature in the pipeline. I then spent a month writing a new string class and replacing the old uses of strings, most of which was refactoring thousands of uses in the code base. After the rewrite, there were a grand total of 2 non-trivial bugs in the implementation, both of which were fixed in short order, the backlog of string related bugs magically disappeared, and it alerted us to a memory stomp bug by the end of the month.


In conclusion: I'm not saying std stuff is always bad. What I am saying is it is often missing some detail of context in which you want to use it that makes your life awful if you don't write your own. This could be international string support, this could be serializing data for a network, or it could simply be a lack of ability to easily modify the internal algorithm to optimizing for your particular use case. If you do it right, congratulations, you never need to do it again because you now have your string class or your array class, which has been tested by your projects and whose internals you can modify and are familiar with. The convenience and flexibility this affords you is far too often underestimated.

287
The "leaks" come from kompromat ops whose concern for the truth is less than their concern for the mental wellbeing of their chicken dinner. They don't care about informing you, they care about using information to manipulate you, and only a moron would take information with such a goal when it's entire purpose is to mislead.

288
I'd still say even if we could trust the word of the government that the hacking is Russia's doing, I honestly think they're doing us a favor. If our politicians are so security lax, and so openly corrupt as to put their plans in writing. They need to be exposed. They need to have it proven to them that what they're doing is wrong on every level and needs to stop.
And what if what they're doing isn't wrong? What if all there is to find is risotto recipes? And what if that isn't good enough for the perpetrators of the criminal hackings? See, here's the thing: there have been modifications made to "leaked" files. Doing so is easy and can trivially be done without a trace.

"Evidence" from Putin is no more reliable than "evidence" from a random internet troll with an agenda. Believing information from such leaks is as suspect as believing whole-hog a tale spun by any other internet conspiracy monger. All it takes is slipping in false evidence of some act of debauchery and morons who see the word leak take it as gospel and will spread it like wildfire. It doesn't matter if it gets debunked, because it's been shown most people don't care. Emails about Clinton funneling billions into a Caribbean slush fund could be invented and leaked tomorrow. Emails about underage orgies. Emails about taking bribes. Just slip them into a batch of "leaked" information a week before the election, and it's done. And you would believe every word of it.

289
Other Games / Re: Nintendo Switch
« on: October 21, 2016, 01:09:38 am »
And do you really need anything beyond 1080p on a handheld screen? At one point the increase in resolution won't actually be visibly noticeable.
Whenever 4k comes up I like to reference this chart.
An average person's arm is maybe 2 feet long (and probably not holding their system straight out at arm's length), and we aren't sure what the screen size is yet. I might be fine with 720 on a screen that size... but then again I've dealt with the 3ds's terrible resolution.
While that chart is sort of true, there's also the fact that more pixels = more computation for rendering. Increase resolution from 720 to 1080, you're doubling the pixel shader cost. 720 to 1440, 4x. That's computing time and that's battery life. You want good looking games and long battery life, you want low resolution unless you have a time machine for collecting future-tech with.

290
Other Games / Re: Nintendo Switch
« on: October 20, 2016, 01:34:12 pm »
Quote
Quote
Quote
Name: Using a verb for a name...? It's not the end of the world but it just seems odd to me.

Switch is also a noun. Has been for a long, long time. Light switch, that thing with railroads, the thin branches et al probably best known as a corporal punishment tool. Apparently some kind of hair thing, too.
I got the impression the thing is named after the action of switching between traditional and portable modes, not so much a lever. I guess you could argue that it is a switch in that sense that, like a switch, it can have multiple different states.
Still think it's kinda strange, and what about acronyms? NS? I prefer NX because the X can kinda represent switching, especially if you view the X as a 'cross' instead of the letter X.

In regards to Zelda, it's something I'll pick up if I do end up getting the Switch, but it's not a system seller like Monster Hunter is for me.
Clearly it is called switch because it has a more powerful dom mode and a less powerful sub mode.

Also, lots of games. With both Unreal and Unity, it's going to be quite the system. http://www.polygon.com/2016/10/20/13345516/nintendo-switch-activision-ea-bethesda

291
It was brought up in the debate tonight, and didn't exactly leave much of an impact. Considering the bad press, I doubt Hillary appreciated the effort on behalf of her husband, and I doubt the FBI acted on it either assuming there was even anything to act on.

Sort of... The FBI haven't released their report yet to my knowledge.
They did release their report, it was just so boring that nobody cares. Same as every other document about Clinton's emails that people make headlines about for a week before actually reading the contents, realizing there's nothing actually there, and pretending it didn't exist or was part of a grand conspiracy.

292
I will keep you in suspence- Donald Trump, on the question of whenever he will accept Hillary as POTUS.

Yeah he's calling for revolution come November 9th.
More specifically, asked if he would accept the results of the election. The only alternative to this is corpses in the streets.

293
Na man, the Large-Hadron-Collider-is-a-Stargate youtube guy is biased, sure, but so is the BBC! They're practically the same thing!

294
General Discussion / Re: Brexit! Conversation Continued
« on: October 17, 2016, 08:14:11 pm »
What, and give up the perfectly good term of Sexit?

295
Okay, just found a story that does possibly point towards some bad stuff at the State Department, potentially.

BBC link to the story.

Lots of denial, lots of accusations.

Hm, I had seen http://www.politico.com/story/2016/10/fbi-state-department-clinton-email-229880 on the homepage of Politico earlier today but didn't look at it.

It does sound pretty bad, though it doesn't look like a direct connection to Clinton. I mean, nobody's saying that Clinton directly orchestrated it, but still....

Also, would be nice to know what the heck the email is that they tried to make a deal over.
http://www.nbcnews.com/news/us-news/fbi-state-department-say-no-quid-pro-quo-clinton-email-n667926
Pretty lame stuff being yet again mischaracterized.

Quote
The official then reported his contact with Kennedy to another FBI employee, saying he thought that Kennedy might be willing to consider office space in return for a change in classification. According to the FBI report, that employee then told a colleague that he felt "pressured" over what he believed was a "quid pro quo."
In the end, the FBI won the classification argument, and the State Department agreed to upgrade the email to "secret." No increase in the FBI's slots in Baghdad resulted from the conversation, and the FBI ordered a review of the conduct of the now-retired FBI official.

But just the appearance of the words "quid pro quo" was enough for both Trump and House Speaker Paul Ryan to respond. Both reacted as if Kennedy, and not the FBI, had proposed the deal.
Nothing to see here folks, just another case of Republicans ignoring the truth and sticking to headlines instead.

I'm done with this thread
Bye

296
Given Trump still has over 42% support nationwide, you need to seriously gerrymander the republican party to say anywhere near half don't support him.

297
Some other tidbits about PV solar that make the load balancing problems seem less problematic:
If you look at charts of peak demand, it can generally be summarized by "high during the day, low at night" due to the fact that humans are generally diurnal and our society all but shuts down after 10PM. As such, a good amount of solar power will, if anything, help *reduce* use of peaker plants by varying naturally in a way similar to that of power demand.

For further generation optimization, fixed PV cells like rooftop solar can be installed at a variety of angles, resulting in different ideal power generation times. So in that way, the economics can result in installation optimized for peak hours.

298
Honestly I have no idea how wind has this unnatural great reputation.

But hopefully people are a bit more realistic now that people are actually trying wind...

Basically when they started doing a serious wind power initiative they thought it was "silent" (like it was a pinwheel) but wind generators produce a lot of noise, break catastrophically, and require regular maintenance... So lets just say a lot of people were annoyed when they found they were 400 feet from one.
You seem to be very anti-wind, and I can't figure out why. At typical distances, they're quieter than an AC unit or fridge ( http://www.gereports.com/post/92442325225/how-loud-is-a-wind-turbine/ ), and are generally placed in the middle of farm fields or similar sparsely populated areas, where they're basically disrupting nothing.

299
According to the internet, some nuclear plants can increase/decrease on demand, it's just that the marginal cost is 0. So if you can generate excess power and sell it at 50% your normal rate, then buy power at peak demand, it's cheaper than building an extra plant and spending just as much idling it all the time as the plant running at 100%. Unlike a natural gas peaker plant where you're spending money on fuel when running but saving it on maintenance and operating costs.

300
It's also incredibly generous to nuclear to allow them to assume an extremely long payback period when the cost of solar and wind is dropping so fast.  It's like trying to justify buying a super expensive PC by saying that you are going to keep using it for ten years.  Sure you could keep it running for ten years but that is just not economically sensible when way cheaper computers will deliver the same performance in three years.

If we start planning a nuclear plant today and things go smoothly it might open by 2025.  By 2025 solar and wind will be flooding the market with electricity at half the price of electricity today.  Yes there will be timing issues but the markets can still make use of that electricity and demand smoothing is a real thing.  So nuclear power construction is based on an assumption about price that wont be real by the time it's done.  And a few years later the price will keep going on.  If in 2035 the price of electricity is down at 2 cents a kilowatt and you can't even cover your operating costs.  And then taxpayers get to pick up a multi-billion dollar bill for a plant that took longer to build then it ran for.
This is why there is no new nuclear and will never be new nuclear again.
Big banking investment groups have essentially put out warning saying "Investing in big long term electricity projects is a really bad idea right now because renewable prices are dropping so fast that many of them will be non-viable within 10 years and you will be left holding the bag."
Take Max's aforementioned 5-7 years, for example. Based on the rate at which solar PV costs have fallen, if you started construction on a nuclear plant today, somehow magicking away all opposition and schedule overruns, by the time it was turned on, solar energy would cost half as much as it does today. These plants are then meant to last 50 years or so to recuperate costs enough to be economically viable.

As far as I can tell, wind and solar are already competitive with nuclear, or will be within that range of 5-7 years. As such, building new nuclear, assuming shovels put into the dirt today, is a terrible, money losing proposition.

Pages: 1 ... 18 19 [20] 21 22 ... 474