[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/functions.php on line 4586: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3765)
[phpBB Debug] PHP Warning: in file /includes/functions.php on line 4588: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3765)
[phpBB Debug] PHP Warning: in file /includes/functions.php on line 4589: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3765)
[phpBB Debug] PHP Warning: in file /includes/functions.php on line 4590: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3765)
AI Challenge Forums • View topic - Proposal for a starter kit for JavaScript

It is currently Thu Oct 18, 2018 1:46 am Advanced search

Proposal for a starter kit for JavaScript

Random stuff about the contest, posts that don't fit in the other forums.

Proposal for a starter kit for JavaScript

Postby blueiris » Sat Feb 06, 2010 9:12 am

I would like to create starter kit for JavaScript, possibly using the node.js command-line JavaScript environment, see http://nodejs.org/ for more information.

Node.js is based on the Google v8 JavaScript JIT. It adds bindings for various POSIX APIs. (Of which only stdin, stdout, and stderr are interesting for this contest, since apparently no networking, file I/O, or forking is allowed.)

There is a drawback to using node.js, over raw v8, which is that node.js only works on Linux and OSX. It doesn't work on Windows. But the big advantage is that it works out-of-the-box.

Would something like this be acceptable?
blueiris
Cadet
 
Posts: 9
Joined: Sat Feb 06, 2010 8:53 am

Re: Proposal for a starter kit for JavaScript

Postby mspang » Sat Feb 06, 2010 9:52 am

Yes. I compiled node and it seems sane. If you create a simple starter bot, we can definitely put it up (tomorrow though).
mspang
Colonel
 
Posts: 74
Joined: Fri Feb 05, 2010 1:53 am

Re: Proposal for a starter kit for JavaScript

Postby blueiris » Sat Feb 06, 2010 4:15 pm

Here's a starter kit, based on the Python kit. It works for me with the "git" version of node.js on OSX Leopard.
javascript.zip
(35.89 KiB) Downloaded 53 times
blueiris
Cadet
 
Posts: 9
Joined: Sat Feb 06, 2010 8:53 am

Re: Proposal for a starter kit for JavaScript

Postby mspang » Sun Feb 07, 2010 12:03 am

Slight problem: it doesn't work on boards like u.txt, because it strips the line of whitespace and then complains that it's too short.

You should be able to enter it into the tournament for testing now, though.
mspang
Colonel
 
Posts: 74
Joined: Fri Feb 05, 2010 1:53 am

Re: Proposal for a starter kit for JavaScript

Postby blueiris » Sun Feb 07, 2010 1:13 am

Oops. Thanks for checking my code.

Here's a new version that handles u.txt (And has more error checking in general.)
Attachments
javascript.zip
Version 2 - handles u.txt
(36.23 KiB) Downloaded 52 times
blueiris
Cadet
 
Posts: 9
Joined: Sat Feb 06, 2010 8:53 am

Re: Proposal for a starter kit for JavaScript

Postby mspang » Sun Feb 07, 2010 1:42 am

I posted it to the website.
mspang
Colonel
 
Posts: 74
Joined: Fri Feb 05, 2010 1:53 am

Re: Proposal for a starter kit for JavaScript

Postby amstan » Sun Feb 07, 2010 2:42 am

Good job on making this. You get a Medal of Honour for it.
Alexandru M. Stan
Contest Organizer
User avatar
amstan
Contest Organizer
 
Posts: 691
Joined: Sun Jan 31, 2010 4:02 am
Location: Stoney Creek, Ontario

Re: Proposal for a starter kit for JavaScript

Postby blueiris » Sun Feb 07, 2010 11:16 am

Ooh, cool. Thanks! :D
blueiris
Cadet
 
Posts: 9
Joined: Sat Feb 06, 2010 8:53 am


Return to Misc

Who is online

Users browsing this forum: No registered users and 1 guest

cron