text: - Advertisement
  Content Count20668
  Joined
  Last visited
  Community Reputation2116 Excellent
  About Oluseyi
  - RankLegend
  Personal Information
  - Website
  - InterestsArt
  Business
  Design
  Education
  Production
  Programming
  Social
  - oluseyisonaiya
  - Githuboluseyi
  Recent Profile Visitors
  The recent visitors block is disabled and is not being shown to other users.
  What can't a namespace do that a singleton does?
  Oluseyi replied to Defend's topic in General and Gameplay Programmingstd::cout isn't a function, it's an object—an instance of std::ostream<char>. It's made globally available by being declared extern at namespace scope in the ostream header. Also, std::endl isn't a member function, but rather a global- (err, namespace-) scope function that takes a std::ostream instance as its sole parameter (it's a manipulator, technically). In effect, the C++ standard library uses globally-available instances without restricting your ability to create more instances of the same type. The problem with singletons is the commingling of "I only need one" with type-enforced "there can be only one." (Maybe we should call them Highlander types? :-P ) An interesting pattern that exists in Apple's Cocoa libraries is for a class to offer a static sharedInstance() method that yields the same underlying instance, but not prevent you from creating additional instances, even when they abstract over, say, the user filesystem (NSFileManager). Items with the extern storage class specifier have external linkage. External linkage cannot be used in a definition of an automatic storage duration object, in effect yielding static or thread duration. This really isn't a problem for global availability.
  What laptop should I buy as a developer?
  Oluseyi replied to Vonnbla's topic in GDNet LoungeWhat platform are your users going to be on? That will determine which machine/OS you should buy. For instance, if you wish to make games for Steam on Windows PC, then you should get a Windows PC laptop. On the other hand, if you want to release your games on iOS, you'll want a Mac. If you're targeting Android, then either Windows or Mac will suffice.
  Will we ever see an adoption of something other than C and C++?
  Oluseyi replied to Alpha_ProgDes's topic in GDNet LoungeYes, Smalltalk offered something kind of like that, albeit by having an elaborate runtime that allowed you to suspend the running state of a program execution environment, editor and debugger, shut down the computer, and later restore it in full. I want that level of robustness during development, but then aggressive optimization that can strip out all debug hooks for when the code is ready to deploy. I don't disagree. In any case, I see interpretation and compilation as points along a continuum of program execution models. I, also, would love blazing fast compilers, but would not be as concerned if I could lazily compile (and recompile) objects as necessary to bootstrap my program in an interactive, editable mode. We'll get there, eventually. I haven't used Visual C++ in years, and I do miss edit-and-continue. My current build tools (clang, g++, swiftc, rustc) don't offer it, AFAICT.
  Will we ever see an adoption of something other than C and C++?
  Oluseyi replied to Alpha_ProgDes's topic in GDNet LoungeDon't be disingenuous. You, as a downstream developer, are not authoring C++ programs to run in a browser today—and arguably never did, WildTangent notwithstanding. The existence of browser plugin architecture didn't lead to a profusion of application developers creating their own custom plugins. (I'll point out as an aside that, technically, writing a plugin in C++ isn't "writing a C++ program in a browser" anyway, but rather writing a native application that has its I/O bridged to the web page by the proprietary browser interface. It is abundantly clear from my context, and my inclusion of a link to WASM, that I wasn't referring to this sort of tortuous interoperability.) Even with Flash, as in your video example, web developers bound their Flash objects to the rest of their pages using… JavaScript. For fully Flash games and RIAs (remember those?), they used ActionScript, an ECMAScript variant.
  Will we ever see an adoption of something other than C and C++?
  Oluseyi replied to Alpha_ProgDes's topic in GDNet LoungeFirst off, that's not how JavaScript compilation works today: Modern JavaScript compilation in WebKit (I believe Google's V8 has something similar) has four stages of compilation, essentially live-profiling invocations of functions and pushing for the next tier of compilation/optimization when certain thresholds are crossed. The fourth stage in WebKit uses the same LLVM compiler back-end that powers the clang C++ compiler, swiftc Swift compiler, rustc Rust compiler and others. Secondly, as pointed out by @ericrrichards22, typing proceeds along two orthogonal axes which we may label static and strong. Some "statically" typed languages, like C, are nevertheless weakly typed, permitting easy type coercion and often automatically/silently promoting them, with subtle errors—even with more stringent compiler flags enabled. Python and JavaScript are strongly typed languages, with zero coercion, but are dynamically typed in that they allow rebinding objects of different types against variables and elide type constraints on function signatures. A language like Rust shows that static typing is not absolute, as it permits rebinding against the same variable name as long as it can infer static type, but mandates type constraints (and lifetimes!) on function calls. None of these are interesting questions. Instead, ask: whether it can efficiently be deployed to the target environment (no point writing a C++ program to run in the browser—yet); whether the program can maintain the invariants required by the specification; and what the median operational complexity and upper-bound cost of execution are. As a developer, I wish every language offered both interpretation and compilation, so that I could model and explore the problem space and debug my solution interactively, and then compile with full optimizations for production deployment. I believe that is eventually where we'll end up, rendering this "debate" moot once and for all.
  Will we ever see an adoption of something other than C and C++?
  Oluseyi replied to Alpha_ProgDes's topic in GDNet LoungeThis isn't true. First of all, JavaScript was created as work-for-hire, with Eich working for Netscape Communications. What he wrote in 10 days was merely a prototype; the beta didn't ship until four months later. It was submitted for standardization by ECMA the following year. None of this was driven by the personal agenda of Mr. Eich; Netscape Communications and Microsoft were the prime movers at this time. You've allowed your personal objections to Mr. Eich to make you vulnerable to massive historical distortion, and then based an ostensibly technical dissatisfaction on said distortion.
  Will we ever see an adoption of something other than C and C++?
  Oluseyi replied to Alpha_ProgDes's topic in GDNet LoungeJavaScript is routinely compiled these days, with various levels of optimization triggered by access frequency and invocation history. This has been a big part of the performance improvements of Google's V8 and Apple's Nitro, especially on mobile. Your argument is poor, and takes a single socio-political position as justification to demean and dismiss the entirety of someone's technological contribution. Don't do that; that's zealotry, too.
  Will we ever see an adoption of something other than C and C++?
  Oluseyi replied to Alpha_ProgDes's topic in GDNet LoungeBeen good, thanks! How are you? It's an interesting idea, but I recently learned that mere shared use of LLVM does not mean that the languages built with it are inherently link-able. Specifically, Rust and Swift both use LLVM as their back-end, but their object models are different enough that engineering the type transparency, etc is a significant lift. Most efforts at commingling the two, for now, focus on using C FFI as a narrow aperture for invocations. Pity.
  Image Processing Server
  Oluseyi replied to Quat's topic in Networking and MultiplayerFor real-time processing, the delivery guarantees of HTTP (delivery receipt, retries) are an overhead you might not want. UDP does, superficially, seem like the way to go.
  What languages should a person learn to be a well-rounded programmer?
  Oluseyi replied to Alpha_ProgDes's topic in GDNet LoungeLanguages don't really make you a better programmer, concepts, techniques and algorithms do. Different languages are a proxy for this, as they bundle up opinionated implementations of a selection of concepts, techniques and algorithms. What you want to look for are different languages that espouse complimentary sets of concepts and techniques, and solve challenging problems using similar algorithms in them—so that you get a sense for how different languages (again, as proxies for concepts and techniques) occasion different implementation strategies. Good question, though.
  Will we ever see an adoption of something other than C and C++?
  Oluseyi replied to Alpha_ProgDes's topic in GDNet LoungeHey guys, long time no post! Funny sequence of events that led to me checking in today. My take: nothing will ever "replace" C++, because nothing will ever have the same degree of critical mass/hegemony that C had and C++ inherited. The language ecosystem will be more diverse and varied, with individual languages and their code being more generally portable, and practitioners more able to switch toolsets because the norm today is to have high-quality, cost-free, often open sourced implementations. My other (and hotter!) take: JavaScript already "replaced" C++ as the language in which the largest subset of user-facing applications, and even server-side infrastructure, is written in.
  Should I drop pygame?
  Oluseyi replied to RidiculousName's topic in For Beginners's Forum?
  Create polyline with triangles
  Oluseyi replied to Delli's topic in General and Gameplay ProgrammingAh,.
  - Advertisement