News for hackers. Stuff that matters.
Re:Notch's Specification for the In-Game DCPU-16 by TomFrost on Wednesday April 04, 2012 @08:05AM (#3797137)
> * Word-addressed memory will make string processing interesting to implement. Maybe in space, everyone uses UTF-16.

Everyone in Minecraft, too -- almost. The string encoding in Minecraft's protocol spec is UCS-2, just a sneeze away from UTF-16. It seems Notch has a soft-spot for large encodings. It makes sense from a calculation and lookup perspective, but I wonder if the increased bandwidth and storage of 16-bit blocks has a measurable impact.

Re:Notch's Specification for the In-Game DCPU-16 by ajuc on Wednesday April 04, 2012 @09:33AM (#3797462)
I think Java strings are UCS-2, so that explains why Minecraft uses this?
Re:Notch's Specification for the In-Game DCPU-16 by ealloc on Wednesday April 04, 2012 @11:17AM (#3797956)
By going UTF-16, he would make the game much more accessible to those not using a latin alphabet.

If I was designing the game, I would favor internationalization vs space efficiency in the virtual computer. That way russian kids would get to have fun learning to write silly programs too.

Re:Notch's Specification for the In-Game DCPU-16 by asdfaoeu on Wednesday April 04, 2012 @08:02PM (#3800566)
UTF-8 still has all the characters UTF-16 does it just uses more bytes to encode them. UTF-8 makes more sense if most of your characters can be represented in 8 bits.
Re:Notch's Specification for the In-Game DCPU-16 by ealloc on Thursday April 05, 2012 @12:07AM (#3801259)
you can encode all characters in the basic multilingual plane with a single utf-16 code unit, while in utf-8 BMP characters have variable lengths from 1 to 3 bytes.

If Notch only allows BMP characters and uses utf-16, internationalized string maniulation is very easy, as easy as ASCII for kids to mess with.

Re:Notch's Specification for the In-Game DCPU-16 by cpeterso on Wednesday April 04, 2012 @01:16PM (#3798599)
If the DCPU has only 64KB of RAM, encoding strings using UCS-2 or UTF-16 seems rather wasteful.
Re:Notch's Specification for the In-Game DCPU-16 by Zaak on Wednesday April 04, 2012 @05:26PM (#3799938)
You're free to choose or write software for it that encodes three 5-bit characters in a 16-bit byte if you like.
Re:Notch's Specification for the In-Game DCPU-16 by spc476 on Thursday April 05, 2012 @12:42AM (#3801338)
The DCPU address 64K worth of 16 bit word (in other words, 128KB, although you can't directly address 8 bits).