News for hackers. Stuff that matters.
Re:Notch's Specification for the In-Game DCPU-16 by exch on Wednesday April 04, 2012 @09:15AM (#3797375)
Nice. With a bit of fiddling one could perhaps invert an enemy's shield polarity. That always seems to work miracles in any sci-fi show.
Re:Notch's Specification for the In-Game DCPU-16 by dlikhten on Wednesday April 04, 2012 @03:10PM (#3799277)
This opens a whole stream of electronic warfare, however, the problem is that this will be writing programs that have no real-world usage. Except... These programs will be a great way to introduce both kids and adults to programming as learning it will give an edge to people.

Question: Will we need to program an OS? And does it run Linux?

Re:Notch's Specification for the In-Game DCPU-16 by Florin_Andrei on Wednesday April 04, 2012 @04:08PM (#3799588)
> These programs will be a great way to introduce both kids and adults to programming

This would be a tremendous way to do that.

Programming on normal computers is always kind of disconnected from the real world. So, your program can add two and two. Great. Now what?

Microcontrollers alleviate that issue to some extent. Now your program can walk and talk, and push real-world objects. But you kind of need to learn a bit of electronics too.

Notch's Universe solves this issue neatly. It's a mock real world, with programmable computers. Now your software can do some interesting mock-real-world stuff, like fly spaceships. That's pretty neat.

Re:Notch's Specification for the In-Game DCPU-16 by swang on Wednesday April 04, 2012 @04:33PM (#3799694)
Learning about assembly/to-the-metal coding is probably not the best way to learn programming. "OP? LOAD? REGISTER? PC LOAD LETTER? What's a word? There's only 8 registers? Does that mean I can only save 8 things? What do you mean I have to push things into a stack?"

This is why most people advocate learning python or ruby. You don't have to deal with the underlying manipulation of the computer until you've decided you actually like programming.

Re:Notch's Specification for the In-Game DCPU-16 by ericbb on Wednesday April 04, 2012 @11:41PM (#3801203)
I don't know about "most people" but I think a machine like this DCPU-16 is better than learning Python or Ruby. Those languages are huge and full of complexity. With a 16-bit machine with a tiny instruction set, the student actually has a chance of getting the feeling, 'I know everything there is to know about this system'. And that connects to a piece of wisdom I love from Design Principles Behind Smalltalk: "If a system is to serve the creative spirit, it must be entirely comprehensible to a single individual".

And there's a certain concreteness to such a machine. The mental model has no vagueness at all. You could imagine building a physical copy of it and playing the role of CPU--adding small numbers, moving data between registers and memory, etc. I've played with this idea myself before of using an invented 16-bit machine as a teaching device.

Maybe it's just a case of personal differences, but as a starting programmer, I would have been extremely excited about a simple programmable thing that I can fully understand and use to do things within a game world. Python is cool too but it's overwhelming. There are learn-Python books that are thicker than most of my university textbooks.

Re:Notch's Specification for the In-Game DCPU-16 by scott_s on Wednesday April 04, 2012 @05:04PM (#3799826)
Consider that a while back, that was the only way to learn programming.

Personally, I think Python is a great way to teach programming, because it allows us to get to concepts quickly. Accidental complexity is at a minimum, and the inherent complexities of programming become the focus. But, even thought that's my personal preference (based on some experience; I've used Java and C++ to teach programmers and had to explain away accidental complexities), I hesitate to say it's best because I have no evidence backing up that claim.

What's important is learning certain concepts, perhaps the most important of which is algorithmic thinking. That is, knowing what result you want, knowing how you start, and being able to reason through how to get from the start condition to your desired result, step-by-step. What helps is when the result you get is something you care about. I can easily see that for some people, getting something to behave a certain way in a videogame will be a more compelling result than others.

Re:Notch's Specification for the In-Game DCPU-16 by tptacek on Wednesday April 04, 2012 @07:28PM (#3800444)
Knuth would disagree with you. And PC LOAD LETTER?
Re:Notch's Specification for the In-Game DCPU-16 by jlouis on Thursday April 05, 2012 @08:56AM (#3802337)
That depends. The Knuth MIX architecture is much like the architecture Notch has in mind. But the more recent MMIX architecture is far more like a modern 64 bit RISC system. In fact, it does look odd that Notch would prefer such an old behemoth nowadays.

An MMIX like ISA would open up the world for compilers much more. With this, it looks like people should be confined to writing simple stuff - which is kinda the point but still rather sad.

Re:Notch's Specification for the In-Game DCPU-16 by tptacek on Thursday April 05, 2012 @10:51AM (#3802753)
I'm sure part of the goofiness of this ISA is just that Notch wants to keep it nerdy and somewhat retro, but I wonder if he also wants to keep compilers from getting out of hand; like, he wants people writing (at least sometimes) in assembly.
Re:Notch's Specification for the In-Game DCPU-16 by mightywok on Wednesday April 04, 2012 @10:30PM (#3801001)
I love me some Donald Knuth references
Re:Notch's Specification for the In-Game DCPU-16 by wglb on Wednesday April 04, 2012 @08:39PM (#3800672)
Works for a lot of people. I started with FORTRAN and quickly went to assembly. I recommend doing some sort of assembly for anyone serious about programming.
Re:Notch's Specification for the In-Game DCPU-16 by paduc on Thursday April 05, 2012 @06:18AM (#3801991)
What do you mean by "serious about programming"? Can a web developer be serious about programming? Assembly is a waste of time for them.
Re:Notch's Specification for the In-Game DCPU-16 by RollAHardSix on Thursday April 12, 2012 @11:14PM (#3835254)
I disagree. I recently designed and implemented virtualized image servers (real ones coming once the Requisition request comes through) for faster image serving. This was basically unheard of by anyone I work with however by having read the http specs I was able to give a report on why we wanted to serve images in parallel. It's easy to dismiss Web Developers as (X)HTML/CSS, Javascript & Php. In reality there are FAR, FAR, FAR more uses for programming competent Web Developers. Shoot, even having a good grasp of fundamental Computer Science helps with understanding Php's array's (or lack-thereof ;) ).

Now for practical usage? Sure Assembly is probably a waste of time. I still haven't found a real way to implement that wouldn't be. But the fundamental understanding of how a computer works, how decisions are made so close to the machine enhanced my understanding about programming which in turn enhanced my understanding about how I wanted to develop and engineer, even for the web.

My .02 cents anyway.

Re:Notch's Specification for the In-Game DCPU-16 by wglb on Thursday April 05, 2012 @08:04AM (#3802200)
I am not so sure. To be a good web developer, you need to have a familiarity beyond css, js, html, and the framework you are using. You should be able to understand the underlying protocol, for example, what do the HTTP headers look like? How are they separated? How can SQL injection be dependent on header contents? You can unknowingly build a vulnerable web app if you don't understand the mechanics.

And in my mind, "serious about programming" extends beyond building web apps.

Re:Notch's Specification for the In-Game DCPU-16 by jonbro on Thursday April 05, 2012 @07:07AM (#3802085)
having a low level understanding of program flow can help in many situations. If you are an extremely lucky programmer, you might be able to live your life only in high level languages, but most that I have met had to get down in the plumbing eventually. Understanding asm will help with that.
Re:Notch's Specification for the In-Game DCPU-16 by Zaak on Wednesday April 04, 2012 @05:19PM (#3799911)
I expect that there will be some kind of default OS released with the game, and that many alternatives will pop up very quickly.

It will not run Linux, because Linux requires a 32-bit CPU with megabytes of RAM. Someone might write a Linux-like system for it though.

Re:Notch's Specification for the In-Game DCPU-16 by jiggy2011 on Wednesday April 04, 2012 @06:59PM (#3800325)
Most likely it won't need anything other than some very basic firmware which would be part of the emulator.

It is unlikely to need any mechanism for managing drivers for example (unless you can build custom hardware). You might need some form of scheduler if you are running different programs to do different stuff (weapons , engines , navigation) but this could be something very simple and again baked into the emulator.

Some form of shell might be nice, but again not necessarily required.

Re:Notch's Specification for the In-Game DCPU-16 by Zaak on Thursday April 05, 2012 @01:03AM (#3801380)
You could run your spaceship computer like that, but you could also install a multitasking system that allows you to download files from your favorite space BBS while playing a game of solitaire and plotting the course to your next mining asteroid.
Re:Notch's Specification for the In-Game DCPU-16 by jiggy2011 on Thursday April 05, 2012 @08:16AM (#3802221)
Notch suggested on twitter that there would be more than 1 CPU for each ship , so I imagine multitasking would work that way.
Re:Notch's Specification for the In-Game DCPU-16 by tlrobinson on Wednesday April 04, 2012 @09:26PM (#3800813)
Not to mention a MMU. Of course that didn't stop someone from implementing an ARM emulator on an AVR and running Linux on it... http://hackaday.com/2012/03/28/building-the-worst-linux-pc-e...
Re:Notch's Specification for the In-Game DCPU-16 by ricardobeat on Wednesday April 04, 2012 @10:40PM (#3801034)
Re:Notch's Specification for the In-Game DCPU-16 by Zaak on Wednesday April 04, 2012 @11:04PM (#3801093)
Actually, uClinux doesn't require an MMU, and it's been merged into the main line of kernel development.
Re:Notch's Specification for the In-Game DCPU-16 by untog on Wednesday April 04, 2012 @01:11PM (#3798565)
Reverse the polarity of the neutron flow. Works every time.
Re:Notch's Specification for the In-Game DCPU-16 by samstave on Wednesday April 04, 2012 @05:03PM (#3799820)
You would clearly have to reroute power from the primary core to the auxiliary shield systems which have been modified based on the tachyon attraction theory and amplified by shutting down unnecessary support systems on storage decks 3, 6, 11 and 42.