Inventing on Principle - amazing video!

Started by
65 comments, last by ddn3 12 years, 1 month ago
I like the point he is trying to get across, but his examples to me seem to be more gimmick than practical for software development. As others have stated, you have to build a program specifically for being able to tinker with code in real time like that and it is game or engine specific. I would have loved to have had this functionality while tweaking my WP7 game, and I probably could have had it with a few days to a week of development, but my time was better spent tweaking and running for an hour to get it close enough and moving on.
Advertisement
You try doing that with a scripting language. Go on, fire up Python/C#/JavaScript, and try to do what he's showing there.[/quote]
From what I saw he had the ability to load up the last 2 seconds of gameplay, either by having each object keep a stack of information for 2 full seconds, or by using a negative value for his simulation delta. Then show ghost forwarding of the simulation by calling the simluate function a bunch of times and saving those into another stack. Its a cool idea, but I didn't see anything that is unique other than that design. I'm not sure why you feel no one could do that or that it would be remotely impossible for me or anyone else here to implement that. I watched the tree and 2D game. The tree is really just a normal tool editor "I can use control variables at run time to change my tree." I didn't get that part at all.

NBA2K, Madden, Maneater, Killing Floor, Sims http://www.pawlowskipinball.com/pinballeternal

I like the point he is trying to get across, but his examples to me seem to be more gimmick than practical for software development. As others have stated, you have to build a program specifically for being able to tinker with code in real time like that and it is game or engine specific.
I think his point is that you should build said code for your specific game or engine ;)
His examples are more geared towards how adding visualisation functionality worked for him -- the initial example with the tree is something that he's personally interested in (programmed art).

The 2nd example shouldn't be news for any serious game developer -- we're always adding developer visualisations to our games, simply because his point about being able to see what you're doing is valid. The specific example of diplaying several frames worth of simulation data is just an example -- every game I've worked on has some kind of visualisation modes in it though.

The 3rd example should also be familiar with any game programmer -- it's Visual Studio's "watch" window, but in a different incarnation.

I'm not sure why you feel no one could do that or that it would be remotely impossible for me or anyone else here to implement that.

WTH did you think I meant? Of course its trivial to implement. The point is the it *isn't* implemented.

Tools should offer this sort of thing out of the box. Editors should popup little variable editor panels, then auto-recompile the function, and patch it into the running executable. Game engines should offer replay functionality, with the ability to observe shadows of previous/future states.

Nothing he shows is impossible, or even very difficult (he implemented it, after all). But in general, people aren't writing this kind of tool, even though it can make one's life so much easier.

Tristam MacDonald. Ex-BigTech Software Engineer. Future farmer. [https://trist.am]


I think his point is that you should build said code for your specific game or engine ;)

I think his point is that you could build said code for your specific game or engine ;D

WTH did you think I meant? Of course its trivial to implement. The point is the it *isn't* implemented.


It's not implemented because you need to fight constant factors, halting problem or NP-class problems at every step.

For a typical wordpress app, tool like that would need to make by-value copies of deployment and database for each editor.
For algorithms, table looks amazing. Until the user types fib(MAX_INT). Or Acekrman(4,4).

Tools should offer this sort of thing out of the box. Editors should popup little variable editor panels, then auto-recompile the function, and patch it into the running executable.[/quote]
Not with languages we have.

Consider this:template < size_t N > struct OptimizedTexture {
int getWidth() { return N; }
}

Texture is hard-coded to size N by N and pipeline supports that. In a tool I now change N from 512 to 2048 - to see how much better it looks. The simple recompilation now means entire asset repository needs to be rebuilt.



Nothing he shows is impossible, or even very difficult (he implemented it, after all). But in general, people aren't writing this kind of tool, even though it can make one's life so much easier.[/quote]
A system like that exists. (insert obligatory comment about Lisp doing it before everyone).

As with everything in CS and SE, what can be done has been done by mid-70s.

But due to commercial factors, legal reasons and general direction of the market, such open-ended computational devices failed. They also tend to be suited to computational tasks, not IT or consumer devices.

Building a fully introspectable system today is also impossible. Between proprietary OS layer, the opaque hardware and unpublished hardware, all one has left is a tiny sandbox to play in.

Theory of such systems is old. It's the original design of systems, where code = data and vice versa. For example, you take a window, send it over network and it pops up on another machine, fully functional. For simpler unix-like versions see also Plan9 and sam/acme editor.

As for use with today's tools? Not possible anymore. The two most popular OSes are completely gated through legal restrictions making development of such tools impossible and Linux seems to be competing on just how badly it can fragment, making development on anything more advanced that GNU make collapse under its own weight of incompatibilities.

CS ended in 1970s. There has not been a single meaningful advance since then. All systems in use today are merely poor attempts at replicating everything that has been done back then.

But if you have an idea on how to improve ad conversions by 0.3%, then Google or Facebook will pay you billions for it. It can be done in Visual Basic, it doesn't really matter.
For a typical wordpress app, tool like that would need to make by-value copies of deployment and database for each editor.

I said we need tool support. APIs are tools too. So what if we have to retool database layer to allow on-the-fly shallow-copy-modification of data?

For algorithms, table looks amazing. Until the user types fib(MAX_INT). Or Acekrman(4,4).[/quote]
And then our tool displays "infinite recursion", or some such. Better to provide UI for finite cases, than not at all.

Not with languages we have. Consider this:template < size_t N > struct OptimizedTexture { int getWidth() { return N; } } Texture is hard-coded to size N by N and pipeline supports that. In a tool I now change N from 512 to 2048 - to see how much better it looks. The simple recompilation now means entire asset repository needs to be rebuilt.[/quote]
That's an architectural issue, not a language issue. Not the compiler's fault that your asset pipeline only supports a single size of image.

A system like that exists. (insert obligatory comment about Lisp doing it before everyone).[/quote]
It's a Turing machine, we get it. But quite frankly, whether in software or hardware, a Turing machine is still a Turing machine.

Building a fully introspectable system today is also impossible. Between proprietary OS layer, the opaque hardware and unpublished hardware, all one has left is a tiny sandbox to play in.[/quote]
Just as well I didn't suggest a fully introspective system then. Our little sandbox allows us to examine the contents of memory, and replay functions with varying inputs - all you need for any of the items shown in the video.

As for use with today's tools? Not possible anymore. The two most popular OSes are completely gated through legal restrictions making development of such tools impossible and Linux seems to be competing on just how badly it can fragment, making development on anything more advanced that GNU make collapse under its own weight of incompatibilities. CS ended in 1970s. There has not been a single meaningful advance since then. All systems in use today are merely poor attempts at replicating everything that has been done back then. But if you have an idea on how to improve ad conversions by 0.3%, then Google or Facebook will pay you billions for it. It can be done in Visual Basic, it doesn't really matter.[/quote]
Wow. You've exceeded even my tolerance for jaded old-timer ranting. I'm going to say good night...

Tristam MacDonald. Ex-BigTech Software Engineer. Future farmer. [https://trist.am]

I said we need tool support. APIs are tools too. So what if we have to retool database layer to allow on-the-fly shallow-copy-modification of data?[/quote]

That's an architectural issue, not a language issue. Not the compiler's fault that your asset pipeline only supports a single size of image.[/quote]

Let's say my pipeline generates height at some fixed resolution using texture color. Then I plug in Google Maps as texture source. How do you reduce that to a shallow copy, when changing parameters requires full processsing of a petabyte of data or so?

It's a computational complexity problem, we simply don't have enough processing power even for small datasets, let alone those used daily for the most boring of CRUD apps.

And then our tool displays "infinite recursion", or some such. Better to provide UI for finite cases, than not at all.[/quote]

To determine whether it's finite or infinite, you need to solve halting problem.

I suppose that's "simple".

You've exceeded even my tolerance for jaded old-timer ranting.[/quote]

You asked why nobody is building tools like that.

Because we can't. Let's say I want to build a code analysis tools for Windows - I don't have access to WinAPI or compiler, since building Windows applications requires proprietary extensions and VC is closed. I'm only allowed to use existing DLLs to use whatever information they provide.

Heck, I'm not even allowed to set up a build farm for VC, since licensing terms of compiler and SDK forbid it.

Let's say my pipeline generates height at some fixed resolution using texture color. Then I plug in Google Maps as texture source. How do you reduce that to a shallow copy, when changing parameters requires full processsing of a petabyte of data or so?

Certain data sources/sinks are immutable - that's a given. Pretty much anything that comes from outside the source code, in fact.

You change a parameter relating to an immutable source/sink, and you get an error/undefined behaviour (exactly as happens if you make the same change today). The only difference is that this error message pops up as you work, rather than in a separate compilation step.
To determine whether it's finite or infinite, you need to solve halting problem.[/quote]
Of course it isn't possible to find the limit in the general case, but it's simple enough to cap our tool at 100 stack frames, or 100 bytecode instructions, or whatever arbitrary criteria proves reasonable.

However, I'm not advocating for a generalised solution. A practical solution for a limited subset of problems is perfectly acceptable to me.

I'd like the ability to tweak constants at runtime, and this is eminently achievable. Hell, there's even a GDNet article that manages to set that up in C++ using some unholy macros. Give me IDE integration of those, and I'd be pretty happy.

And I'd like the ability to repeatedly execute isolated functions in a user-defined context, with output of variables at each step. That's trivial to do with a scripting language, and certainly not impossible to do with a compiled language. Obviously it only is of benefit in a certain class of algorithm development, but that's a lot better than nothing...

Tristam MacDonald. Ex-BigTech Software Engineer. Future farmer. [https://trist.am]

I'd like the ability to tweak constants at runtime, and this is eminently achievable. Hell, there's even a GDNet article that manages to set that up in C++ using some unholy macros. Give me IDE integration of those, and I'd be pretty happy.

And I'd like the ability to repeatedly execute isolated functions in a user-defined context, with output of variables at each step.[/quote]

*nix anything + scripting languages + emacs.

This isn't jaded old timer talk. Why are there so many people that are rabid about that combination and won't hear anything about an IDE. To them, IDE is a puny little toy for 3 year olds. And they're right.

But it does require one to completely turn around the notion of what a program is and instead treat everything as computation.

And needless to say, it's limited mostly to shuffling text, simply because drivers and other parts of OS aren't sufficiently exposed.

The obvious caveat is that if a feature is missing, "implement it yourself". But unlike the usual OSS stance, in this case implementing it yourself is just a few lines of code that solve a very specific problem with a very specific part of application. Making it reusable is somewhat counter-productive since it. by definition, limits what can be done.

For C and C++, we lack a sufficiently accessible compiler. Due to sheer complexity, they are a black box. But in ideal case, such compiler would be just a bunch of scripts. Want to monitor a variable? x86mov.prototype.write = function() { ... }
Change register order? Just foo.replace[(ebx, eax), (eax, edx), (edx, abx)]. Replace code? Just take process.image.replace("foo", "bar").

Obviously, constructing a C++ compiler with such capabilities exceeds current capacities (cost/demand) of software engineering, but it's theoretically doable and would bring all the scripting language flexibility to compiled languages. LLVM is a tiny step into this direction. Compilation is essentially just a special case of lazy evaluation.

And again, we cannot ignore the fact that OS vendors then forbid, through legal means, use of such compilers by restricting access to OS APIs, restricting us to basic console/socket applications. Which is much bigger reason why nobody is doing it, outside of Apple who has immediate need for it in form of XCode and ARM/x86 cross compilation.

This topic is closed to new replies.

Advertisement