News for hackers. Stuff that matters.
Re:Take Over The Galaxy with GitHub (DCPU16 support) by gravitronic on Tuesday April 10, 2012 @11:26AM (#3822598)
Ok after seeing the assemblers/VM's last week I wasn't expecting to see much new this week.. then I saw this:

https://github.com/krasin/llvm-dcpu16/

C compiler support for dcpu16!

In a way this almost saddens me as by the time the game comes out it looks like the community will have javascript ported to the CPU and no one will actually have to program in assembler as per the original idea... ;)

Re:Take Over The Galaxy with GitHub (DCPU16 support) by secoif on Tuesday April 10, 2012 @12:05PM (#3822838)
Don't start worrying about the "purity" and "this was never intended". You don't specify a processor instruction set in the real world without expecting people to write higher level languages for it, so why expect people to write at such a low level in a GAME of all places? I am fairly certain everything is going exactly as planned. Notch has got this.
Re:Take Over The Galaxy with GitHub (DCPU16 support) by soupboy on Tuesday April 10, 2012 @12:24PM (#3822948)
I second this. If anything, Notch must be feeling immensely satisfied if not somewhat overwhelmed by all the effort that the community has put into his project.
Re:Take Over The Galaxy with GitHub (DCPU16 support) by GuiA on Tuesday April 10, 2012 @02:16PM (#3823581)
It must definitely be overwhelming. So much hype is building, and he doesn't even have a functional prototype working yet. Greater men have failed to succeed when so much pressure is present.

I love the game idea, and think Notch is a great game designer+developer, and sincerely hope that it will be what we think it will be. But at the same time, I'm not as optimistic as others might be.

Re:Take Over The Galaxy with GitHub (DCPU16 support) by seanp2k2 on Tuesday April 10, 2012 @10:23PM (#3825621)
Notch apparently loves amazingly slow VMs, so this is the next logical step after Java :D
Re:Take Over The Galaxy with GitHub (DCPU16 support) by joncalhoun on Tuesday April 10, 2012 @01:02PM (#3823179)
I second this. Think about all the hype and excitement he is building simply be releasing a processor instruction set. Pure marketing genius =D.
Re:Take Over The Galaxy with GitHub (DCPU16 support) by Niten on Tuesday April 10, 2012 @09:34PM (#3825481)
Along similar lines, this morning I was thinking how wonderful it would be if whatever interfaces exist between the ship's computer and the rest of the 0x10c game world are rich enough to make security vulnerabilities in players' DCPU-16 code a real concern. Imagine disabling an opponent's ship by exploiting a buffer overflow in a custom communications protocol implementation, for instance...
Re:Take Over The Galaxy with GitHub (DCPU16 support) by seanp2k2 on Wednesday April 11, 2012 @09:05AM (#3827305)
This. Also, if it gets one kid interested in asm/ low-level stuff, it's worth it IMO.

We keep abstracting, but we can gain so much by going back to the hardware. Also, exploiting in general is fascinating to me, and I hope this pushes it more mainstream.

Re:Take Over The Galaxy with GitHub (DCPU16 support) by lloeki on Wednesday April 11, 2012 @03:48AM (#3826426)
That very well may be part of the game: https://twitter.com/#!/notch/statuses/187474819980328962
Re:Take Over The Galaxy with GitHub (DCPU16 support) by TazeTSchnitzel on Tuesday April 10, 2012 @11:37AM (#3822660)
It could run JavaScript, but this is a 16-bit processor we're talking about here, with minimal RAM. It's more likely we'll be using C and BASIC ;)
Re:Take Over The Galaxy with GitHub (DCPU16 support) by flatline on Tuesday April 10, 2012 @11:53AM (#3822749)
Yeah this seems like the exact scenario where hand-rolled assembly and perhaps some hand-optimized C will really shine. You don't see a lot of embedded processors running javascript, for example. If your ship can process data and respond 5% faster than an opponent's, all other things being equal, you will come out ahead.

If the current level of interest persists, by the time the game launches, I imagine that the vast majority of people will be downloading and running programs written by others. These will have been pored over and optimized to an extent that most of us would be unable to achieve by ourselves, and it will not pay to roll your own trivial implementation. I'd be curious to see what Notch can do to still encourage people to learn how the CPU works themselves. If the environment and game dynamics are rich enough, perhaps this will not really be a problem?

Re:Take Over The Galaxy with GitHub (DCPU16 support) by dons on Tuesday April 10, 2012 @12:53PM (#3823123)
I think we're going to see some clever optimizing DSLs (a la FFTW) -- restricted languages for the kinds of embedded programs you write on such an architecture will be easier to optimize than general purpose languages. Particularly if they have a clear cost model.

The Haskell embedding is very likely to head in that direction.

(See e.g. in this style : http://www.fftw.org/faq/section4.html#whyfast or this style : http://www.cse.unsw.edu.au/~chak/papers/polymer.pdf -- code generation + DSL + constraint solver for instruction level timings).

At least, that's what I'd do.

Re:Take Over The Galaxy with GitHub (DCPU16 support) by masklinn on Tuesday April 10, 2012 @01:51PM (#3823445)
Low-level lisps à la GOOL/GOAL[0] will probably gain some traction as well, or so I hope.

[0] http://en.wikipedia.org/wiki/Game_Oriented_Assembly_Lisp

Re:Take Over The Galaxy with GitHub (DCPU16 support) by wjbr on Tuesday April 10, 2012 @03:47PM (#3824029)
Did they ever get released to the public?
Re:Take Over The Galaxy with GitHub (DCPU16 support) by duaneb on Tuesday April 10, 2012 @07:48PM (#3825116)
No, but the design docs are still out there if you contact the former engineers. I would distribute them if I had permission.
Re:Take Over The Galaxy with GitHub (DCPU16 support) by cpeterso on Tuesday April 10, 2012 @02:03PM (#3823508)
I agree that 0x10c DSLs that control game play will be more successful than a C compiler. :)
Re:Take Over The Galaxy with GitHub (DCPU16 support) by mzl on Wednesday April 11, 2012 @04:30AM (#3826524)
The polymer article was very interesting, really cool stuff. However, I could not find any mention of using a constraint solver for instruction level timings. Is that in another article, or did I just miss it?
Re:Take Over The Galaxy with GitHub (DCPU16 support) by dons on Wednesday April 11, 2012 @08:17AM (#3827133)
That's not in the polymer paper, but its what FFTW is doing (and the ICC compiler that we relied on for the monte carlo work).
Re:Take Over The Galaxy with GitHub (DCPU16 support) by mzl on Wednesday April 11, 2012 @09:13AM (#3827329)
Thanks. I misread the content description as referring to the latter paper only.
Re:Take Over The Galaxy with GitHub (DCPU16 support) by DanBC on Tuesday April 10, 2012 @12:13PM (#3822881)
> I'd be curious to see what Notch can do to still encourage people to learn how the CPU works themselves.

Have some ship customisation stuff tied to assembly programming. People love changing the colour of carpets or wearing hats or collecting and displaying fossils.

Then allow the community to create simple how to guides - "This program will do $THIS_THING; here's how it works; now try to change it to do something slightly different."

I guess Codecademy should have a DCPU section too.

Re:Take Over The Galaxy with GitHub (DCPU16 support) by seanp2k2 on Wednesday April 11, 2012 @09:11AM (#3827323)
DID SOMEONE SAY HATS?!

Agreed that higher-level langs would be helpful for "newbies". I wonder if this was at all inspire by Schemaerse (google it, but TL;DR it's a space game written mostly with Postgres triggers where /you build the game client/ in whatever you want to use to interface with the pgsql :)

Re:Take Over The Galaxy with GitHub (DCPU16 support) by zxoq on Tuesday April 10, 2012 @12:53PM (#3823124)
Yep, only thing I dislike is that the processor does not simulate the importance of cache. If the in-game processors allowed the selection of different cache-line sizes (both instruction cache and data cache) for different costs (paid via the in-game currency), it would add another level of depth to the game market. It would also mean getting into the nitty-gritty of optimization would be even more worth it.
Re:Take Over The Galaxy with GitHub (DCPU16 support) by rictic on Tuesday April 10, 2012 @01:52PM (#3823451)
Why currency and not cycles? The VM is designed to give each CPU ~100k cycles per second (billed per instruction).
Re:Take Over The Galaxy with GitHub (DCPU16 support) by Hoff on Tuesday April 10, 2012 @12:17PM (#3822908)
For those old grey-hairs around and reading that remember RSX-11M/M+, there was a tool known as TKB.

The task builder.

TKB allowed (much) larger applications to run in the address space of a 16-bit DEC PDP-11, using what were called overlays, and overlay trees.

With overlays, the application call tree within an application was analyzed and implemented to allow various sections of code within a tree of subroutine calls to be paged out to backing storage.

If the underlying "processor" is fast enough and if you have enough swap space available, then you can stuff a whole lot of code into a 16-bit address space. Just not all loaded in physical memory at once.

And debugging it... Shudder...

Re:Take Over The Galaxy with GitHub (DCPU16 support) by praptak on Tuesday April 10, 2012 @04:46PM (#3824327)
4096 18-bit words are known to host a Lisp interpreter (http://www.softwarepreservation.org/projects/LISP/maclisp_fa... ), so 64K 16-bit words should be more than enough :)
Re:Take Over The Galaxy with GitHub (DCPU16 support) by KC8ZKF on Tuesday April 10, 2012 @12:42PM (#3823051)
How about FORTH?
Re:Take Over The Galaxy with GitHub (DCPU16 support) by colomon on Tuesday April 10, 2012 @01:49PM (#3823433)
Shhhh.... don't give away our secret weapon!
Re:Take Over The Galaxy with GitHub (DCPU16 support) by brianobush on Tuesday April 10, 2012 @01:52PM (#3823449)
Re:Take Over The Galaxy with GitHub (DCPU16 support) by pjmlp on Tuesday April 10, 2012 @02:02PM (#3823497)
Turbo Pascal!
Re:Take Over The Galaxy with GitHub (DCPU16 support) by tomjen3 on Tuesday April 10, 2012 @03:34PM (#3823971)
New challenge - clone the Turbo Pascal IDE and get it to run on the processor.
Re:Take Over The Galaxy with GitHub (DCPU16 support) by cpeterso on Tuesday April 10, 2012 @05:59PM (#3824680)
For reference, Things That Turbo Pascal is Smaller Than. I am still amazed that the compiler and IDE are only 39 KB.

http://prog21.dadgum.com/116.html

Re:Take Over The Galaxy with GitHub (DCPU16 support) by pjmlp on Wednesday April 11, 2012 @02:56AM (#3826315)
Turbo Pascal 3.0 was my first contact with Pascal, and while it was great for the time, I doubt I can call it an IDE.

It was more similar to vi + integrated compiler as an IDE.

Re:Take Over The Galaxy with GitHub (DCPU16 support) by gravitronic on Tuesday April 10, 2012 @11:50AM (#3822731)
agreed, but at this rate I figured I'd suggest the moon
Re:Take Over The Galaxy with GitHub (DCPU16 support) by drawkbox on Tuesday April 10, 2012 @03:53PM (#3824047)
He who has the best systems will win, no matter the tools or platform. I love it.

I think it is great for teaching kids to program as well, or be excited about it. Notch is going to do what thousands of teachers can't do because he is using the power of gameplay to drive it.

Re:Take Over The Galaxy with GitHub (DCPU16 support) by rmc on Tuesday April 10, 2012 @12:22PM (#3822924)
It's a game. if you can make your code run faster, you'll probably get more magic pixels.
Re:Take Over The Galaxy with GitHub (DCPU16 support) by kilowatt on Tuesday April 10, 2012 @07:11PM (#3824968)
I for one plan on writing the first in-game magic-pixel-collecting DCPU16 botnet.