Saturday, July 7, 2012

C++ DirectX, OpenGl, OpenCl, and so forth noob crash course

   So I thought a primer on OpenGl in C/C++  would be easy based upon tutorials.  Turns out not so easy or nice.  At least some examples written in older framework/binding stuff (e.g., glaux, glut, and others).  While openGl, or Gl and Glu headers provided natively here.  Unfortunately examples might be outdated relative to present stuff furnished by Microsoft.  Then trying to learn how to link libraries and what not.  I have to say C++  std::map containers look more pythonic then ever in terms of implementation which is nice.  Easy to remember, compact coding, noticed older implementations in a way old C++ book of mine has a much long winded speak to do the same thing I believe.  I was tempted here to go to Boost libraries for C++ for embedding code.  Because I love the python dictionary so much was looking to alternately try to create a custom dictionary class, one by overloading key and value typeobjects here (way un pythonic but is the work around to C++ rigid type fixations), and then coverting all data with multi map associations between key to key type values, similarly for value to value type pairs, and then cast converting data all to one type, which provides ostensibly one data type container virtually housing like a dictionary  multi type data, just have to re cast convert data back to its original form and overload returns on get functions so that the appropriate return type can be furnished.   The other way of handling this, seems to set up mulit type map containers and tracking in the deeper dimensional case scale of data in its given dimensional position.  Mostly my consideration of the equivalent dictionary written to C++ were a shallow form, however, and likely since I'm a enough a noob, neither allowing self nesting, until I could figure out something like a string cast conversion of such self (this) class.  Dictionaries in python are sort of the nice database utility like all in one (data type) container which I really love a lot...hmm, or then its just retraining one's thinking with respect to data handling which might not be so hard in C++ using the map container.  Also the other thing, that I might miss are the python list.  Of course, map and vectors in the standard library seem to be a closer equivalent to pythons list, since you hadn't need alloc() or malloc() to assign dynamic memory as in the case of an array whose size is yet to be formally determined?!  If you know your data's scaling in C++ already, arrays are easy and not much of a problem, but then it seems (in my rudimentary understanding) if you were say making sql calls to a given database with dynamically assigned memory, then you might easily run into problems with storage for a given return container.  Ideally I imagine an interface in C++ already has something like a multi map container setup, and at least in SQL work you could know ahead of time the type assignments for multi map in so far as data container storage.  Secondly with the multi map, the container's size could be dynamically assigned in so far as data storage (which is generally the case I believe with most python containers).

Finally figured out the purpose of the pointer here which always boggled my mind in the past.  One offered here that pointing to memory avoids having to recopy say object data sent, for example, to a function or inside a class and what not.  And when specific data were needed instead when the pointing object call needs reference values in memory, it could do so on an as needed basis.  Its seems logical and efficient enough in terms of memory usage.  If you were working with heavy data intensive projects, and you were worried about memory usage, seems important.  Nowadays though if you were working with small scaled projects, not heavy in data usage, pointers might seem a bit unnecessary in terms of computational efficiency, it seems there's more memory to go around these days then ever, and then generally it seems supposedly python is supposed to be fairly good at cleaning up on no longer used memory.  Pointers are generally absent in python lexicon.

As to working with Visual Studio which I haven't done in a long time, and when I did last, it were very very brief, so it should seem enough of a learning curve.  Python offers also natively a command line console, I haven't yet figured out a similar tool implementation in C++, although you can run scripts from console with C++ once compiled and built, not sure how to do the compilation and building from console. 

In any event, spent the better half of the day, trying to install or work with any number of stuff, like DirectX sdks, here despite my hardware not being an Nvidia based system (more so Intel graphics architecture), I were able to install Nvidia's SDK and run some examples.  OpenGl weren't so good in terms of getting working either by tutorial examples seen here, either attempting code examples with 2010 C++ libraries, or 2012 C++ libraries, or even working with supposedly appropriately linked libraries(?) packaged project files, not sure if this were because the project file examples were old enough and outdated relative to present libraries, or probably that I don't know what I am doing here so much.  :)  OpenCl were yet another fail install, having thought followed all but one pre requisite here, namely the Windows 3.1 installer fails to install.  While windows does have a patch (64 bit upgrade) coupled with the redistributable binary installer (32 bit), it seems the installer's installation was a no go, and Intel's package fails on the assertion of a missing .dll, presuming this could be owing to the missing installer version here but I am not so certain.  MSDN provides it seems tutorial information for getting started in development, included integrations for application development, there's even in the 2012 Visual studio idea, an object mesh handler for handling 3d objects, would alternately recommend Blender for in depth work and complex mesh object work here.  Hmm, anything else, not that I could think of...despite the supposed benefits of OpenGl here, I'd offer unless it can be a chore getting up and running even with supposedly easy tutorials guiding either implementation and installation.  OpenGl site itself sort of helps, but then I've been disappointed with the results.  Sure game engines like Ogre can possibly run on Linux, but the OpenGL interfaces don't properly render at times object...not sure if this were occurring because of the OpenGl packaging.  Sadly I wanted to say you might have better luck diving into WebGl before you were working decently with OpenGl from my experience if you were really new to programming there.  Hopefully in Linux OpenGl will improve more so, and hopefully in Windows...well hopefully I'll figure out some basics here.

Ending the ramble...  

Groundwater data from USGS Longitudinal data searches are not so good

'corp of engineers hydrological data missouri river'  Google search string...yields top ten entries any number of Congressional bills for one thing or other.

Then a USGS search for ground water data is pretty limited in the longitudinal sense in so far as instantaneous public access, going back at best to late -to - mid 90s.  Site disclaimer indicates that periodic recording of data were done so going back to 1965 with nothing mentioned before this date. 

Sort of amazing since one would wonder whether someone were in fact tracking much of this related information. 

Interest in this topic came up over a curiosity and interest driven by an argument.  Namely, concerning groundwater as pertaining to flooding in any given periodic context.  Corp of Engineers looked like a more promising look, but tired of the moment in the effort to filter through a lot of useless search results.  


Thursday, July 5, 2012

Lunopolis
In the Troll Hunter genre, X files stuff, can you say more. 
Sort of laughing at this movie with funny time travel sequence at the end.

No offense to Scientologist s rumor gossip crap gets old.
http://articles.cnn.com/2012-07-02/tech/tech_social-media_google-plus-not-dead_1_google-last-week-google-friend-social-network?_s=PM:TECH

Hmm... CNN with respectable names like Martin Savidge and the like, and out of a three network cable viewership race with prolly at best less then a million and a half viewership a day for one program, out of 300 million plus population, Cable news of this sort is certain well aimed at popular readership.  I know easier to criticize more modest ventures of social communication, certainly if you guys were held to the same socially serving profitable standards that Facebook retains, you guys might be worried about your market viability likewise?

I mean having the decades of name luxury without account to viewership or site traffic all the same, means that you modestly care with respect to the audience that you cater, but then gauging the potential of viewership and readership here and otherwise lack luster performance otherwise, one wonders about media in general.

Why I'd almost wonder whether Google + site traffic is on par with some of site and cable news traffic?  May not be good, but relatively speaking:  The pot calling the kettle black?

Or laughably when you have a supposed expert 'dietician' on your program that describes healthy vegetarian dietary eating typically as a bag of greens and a few apples.  Yeah, maybe vegetarians eat this way somewhat, but the equivalent of lobbing a hunk of uncooked tofu on a plate and calling this a viable day in day out diet makes one only laugh all the more, certainly you could do a little better then that with some feigned catering, and it should seem quite plausible that your expert could care little other then paying lip service to the proclaimed diet they were espousing.  

 

Tuesday, July 3, 2012

Lol, so much the concerted effort to drive someone out of yet another game...leaving Eve soon.
   
WoW was one of those other lame MMOs to do much the same, not so welcoming, a real bigoted crowd over there, but hey would you expect otherwise without saying so much generally pulling game play issue stunts from what I could see but hey with Chuck Norris as your spokesperson couldn't it be more obvious?!

Honestly windows games generally run smoother on Windows and less so on Linux, that's the reality likely holding some users to their windows PC, but generally if I hadn't been gaming as of recent, I'd probably be on Linux a lot more.  Generally ran dedicated with Linux for over a year, still dedicated on several computers at least, and have newer stuff on Windows 7.  Generally as to gaming, just complaining, been a diversion for awhile, time to move on.

Anyways inspired some extra stuff out of game as far as sql stuff that I hadn't done in a long time that I were rusty on, so it weren't a total waste of time...some it seems may have taken it the wrong way?!   Not really for hack purposes, I mean if I were a developer working for software firm, any database gui work like I did would be legitimate, but when some 'idiot' gamer is involved in such a project, they are more likely one of those sad 'loser' hacks trying to engineer problems for people?    

Complaining is a bit of why bother mostly.  I mean the thankful welcome back to WoW was more likely the account supposedly maliciously tampered with by a key logger with someone having left the toon dropping from the heights of Hyjal.  Then apparently deal with the in game rent a cops roleplaying as usual like before as likely.

I don't know maybe its just me anyways.  Its more like the games should have these sorts of disclaimers like 'We don't really care who you are.  If you don't fit the bill and mold your patronage is not welcome.'  But that's putting it nicely.  I mean I could understand more legitimately issues pertaining to a legal matter, but then if its selective discrimination with respect to the client for other matters...only suggested and so forth.   In any event, you fork out enough money to turn around and be gunned incessantly in some manner, I mean what sort of idiot pays people to gun them right?!  So one tires of the situation and moves on, its not likely complaining rightly over any number of issues were being too self serving and too right in so far as saying something about it.  I mean people talk trash with respect to politics all the freaking time, complaining when they get bad service from their government, but its taboo to complain about private industry?  Double standard.  Complain all of you want as far as I see it, private industries probably more often deserve it.  One quits, tiring of playing patsy to really lame bad industry fodder eventually right?!  Not really much for boycotts really honestly, reading series you'd hardly see much of a complaint.  Last time I left a game, I complained with a warning blog post, then a final ending blog.  Generally up till now was generally considering this a keep to last post, be over move on done with it, and that's generally where my stances have stayed.  Blizz could be a success for all I care, except that I probably won't ever be playing a game of theirs again, like so many other mmos.  Generally last time I played EVE was more likely a brief reactivation stint for a short time to see what were up, like this time around and in passing time to do something else.  Back a couple years or so ago, social attitudes were generally quiet, people were generally cool in game (didn't say much, didn't really mess with you much)...that sort of games fine by me...when these games get really aggressive social attitudes with crap going on left and right to the mechanics because someone's got a social agenda and problem with you being there and when you haven't done or said anything and left people alone or don't cause people other problems, pretty messed up if you ask me.

In any event, have fun...



The not so great VLC application

Not to make this post such a negative one, but I really get tired of the more obvious freeware that one downloads that should be so obnoxious.  VLC player seems to be one of those stinky applications that not only modifies your browser complete with tool bars, but also the add page page tab on your browser, alongside start page, alongside setting off the local virus protection.  Not such a great app in my opinions.  As always a problem occurring what else but windows, so saved desired bookmarks and reinstalled Firefox for a bit of inconvenience to restore some previous desired order to the browser.  

Sunday, July 1, 2012

Math programming issues to consider

Two recent issues encountered recently when doing basic math operations and why they might occur:

1.  Division by Zero.  Commonly likely to occur when you are dividing elements of one container set with elements of another, or for something as simple as algorithms pertaining to statistical measures like means.  If you have an empty container set, in this case, you'd have a division by zero error.  Either introduce something like a control statement prior to entering math operation firstly and make sure you account for this if expected returns are to be provided sequentially later, or you could flag the zero set and so forth.  A little bit of added accounting here for this contingency but probably a good thing to have when you couldn't be too self sure about the data fed into your computations.  Any divisions should have some accounting like this I would offer.

2.  Root of negative numbers yielding a completely different return type.  This occurs in the following instance.  B > A where square_root(A - B) leads to a complex number.  This can occur in the case of things like statistical computations.  If for any given set of data the following inequality holds, A > B, then recheck your math formulation to make sure computation is correct otherwise consider this problem, or this could be merely by way of the expression set that you are using, or in other words it maybe possible that the formulas expression were missing something like square_root ( absolute_value(A-B))?  Ways of checking for possible values sets here:  If a formulas equivalent re expression is situated in the following manner where we have:  C, D such that  square_root ( square(C - D))  Irrespective of whether  C < D  , this equivalent re expression of the formula above implies that the term square(C - D) is always a positive number hence its its square root should always be a non complex return type unless  you have already situated the number as a complex number in your mathematical operations.  Checking your formulation by way of re expressing it is also another way to confirm stability in the return of your data type or avoiding cast type conversion problems.  Anytime you perform a square root in a given series of mathematical operations, there maybe the possibility of a complex number return type.

Oblivion

 Between the fascination of an upcoming pandemic ridden college football season, Taylor Swift, and Kim Kardashian, wildfires, crazier weathe...