Live data from Hacker News

DCPU16 Assembler in less than 200 lines of Ruby

github.com

11–20 of 22 posts

Re: DCPU16 Assembler in less than 200 lines of Ruby

#11
post #10

What's the hype about this DCPU16 thing? The game hasn't been released yet and people starting to write assemblers. Are you totally bored out of your life?

There are dozens of reasons people do things like this. It's good programming practice for those of us who aren't as confident in our abilities. It gets you some notoriety in the community, maybe even a community you're a big part of. It's something that can go on a resume really easily, if used.

Or maybe, you just wanted to have fun so you spent a night doing this. It isn't a big deal. If you don't waste one night of your life every once in awhile, you're pretty unlike the rest of humanity.

Re: DCPU16 Assembler in less than 200 lines of Ruby

#14
post #10

What's the hype about this DCPU16 thing? The game hasn't been released yet and people starting to write assemblers. Are you totally bored out of your life?

I want to motivate my 12-year old son to learn programming.

He loves Minecraft.

I'm dangling this game in front of him like a ball of twine in front of a kitten.

Re: DCPU16 Assembler in less than 200 lines of Ruby

#15
For Rubyists who wants to play with DCPU-16:

https://github.com/judofyr/rcpu

It's a DCPU assembler (written in a Ruby DSL) and an emulator/debugger (which allows you to step/run through the execution).

Next up I'm going to implement library support and write some I/O functions. Much of the code is already in place though (e.g. https://github.com/judofyr/rcpu/blob/master/examples/screen.... which maps 0x8000-0x8400 to the terminal).

Re: DCPU16 Assembler in less than 200 lines of Ruby

#16
post #10

What's the hype about this DCPU16 thing? The game hasn't been released yet and people starting to write assemblers. Are you totally bored out of your life?

The DCPU was designed to be easy to emulate. It's a lot of fun to hack on, and simple enough that you can write assemblers for it and still have a life. :)

Re: DCPU16 Assembler in less than 200 lines of Ruby

#18
post #4

Earlier quoted context omitted.

More important: Who will be the first one to code Minecraft on a DCPU16 computer?

And who will implement Conway's game of life on top of that? (I'm psychic: the next comment will ask who will implement a DCPU16 in Conway's game of life.)

Who will implement a DCPU16 in Conway's game of life?

Seriously though, the fact that we're able to ask questions like this is a breath of fresh air... as a market, Notch has done a hell of a job appealing to us.

Re: DCPU16 Assembler in less than 200 lines of Ruby

#19
post #3

Who will be the first one to build a DCPU16 computer inside Minecraft?

I'd love to see one made using discrete logic. It's a pretty simple CPU so it looks to me like you could pretty easily build it out of 74 series.

> It's a pretty simple CPU

16-bit address and data buses? Hardware multiplier, divider, and barrel shifter? I wouldn't exactly call it simple. The cost to build one out of discrete logic probably approaches the quadruple digits.

Magic-1 (http://www.homebrewcpu.com/) is a 16-bit, microcoded homebrew CPU that took about 4 years to build, and it doesn't have any of the above features.

Re: DCPU16 Assembler in less than 200 lines of Ruby

#20
post #6

Hate to be that guy, but this isn't actually less than 200 lines... perhaps "about 200 lines" would have been a better title?

If we're playing line-count-golf, how 'bout in "about 50 lines" of F#? :) http://blogs.msdn.com/b/ashleyf/archive/2012/04/04/notch-is-...
Post reply on HN