News for hackers. Stuff that matters.
Re:Two Programs Enter, One Program Leaves by sylvinus on Tuesday April 19, 2011 @09:17PM (#2464858)
yep I'm currently wrestling with it. I've a prototype that precompiles EQU and FOR/ROF and I'll try uploading it to github when it's a bit more tested.
Re:Two Programs Enter, One Program Leaves by Tichy on Wednesday April 20, 2011 @09:58AM (#2466593)
Even a JS Corewars interpreter that can only compile "assembly" would be nice to have. Then people could compile their warriors with pmars and put fancy simulations on their web sites. Not saying that it is impossible to clone the pmars compiler, but it is a mess :-)
Re:Two Programs Enter, One Program Leaves by sylvinus on Wednesday April 20, 2011 @11:19AM (#2466941)
I've got the precompiler working quite well. Interestingly, it translates the redcode/pMARS code line-to-line to Javascript which is then executed to produce the assembly.

redcode is indeed a mess, clearly the result of an evolving and blurry standard :)

anyway, I'm spitting out assembly for 90% of the bots I've tried and have the Imp running. From now on it will indeed be a job of implementing each instructions and addressing modes. I'm definitely uploading this on github in a few hours and will be very happy to have some help ! :)

Re:Two Programs Enter, One Program Leaves by sylvinus on Thursday April 21, 2011 @03:25PM (#2471985)
There you go !

https://github.com/joshfire/corewarjs

I've got imps and a few other running :)