Download the newest version version ObjectScript 2.6.5-rc, or see the latest changes.

ObjectScript

ObjectScript, OS for short, is a new programming language for web developers. It's free, cross-platform, lightweight, embeddable and open-source. it combines the benefits of multiple languages, including: JavaScript, Lua, Ruby, Python and PHP. OS features the syntax of Javascripts, the "multiple results" feature from lua, syntactic shugar from Ruby as well as magic methods from PHP and Ruby - and even more!

Download! »

ObjectScript is a universal language, able to be used for web development as well as scripting. it can even be embedded into C++ programs. For instance, this site, objectscript.org, was written using OS! ObjectScript - это универсальный язык программирования, ObjectScript предназначен для разработки сайтов или написания скриптов, а также для встраивания в программы на C++.

The installation under Windows is very short and barely takes any time. In this video, you will see how to install OS as well to configure it. You also will see a small test program that is similar to Windows' dir command.
<!DOCTYPE html>
<html>
 <head>
  <title>Тестируем ObjectScript</title>
 </head>
 <body>
 <% echo '<p>Привет мир!</p>' %>
 </body>
</html>

Open this file in your favorite web browser y typing in the address of your webserver and /index.osh. For local development, this might be: htto://localhost/index.osh (It depends on the settings within your web server). This program is extremely simple. All that it does is display "Hello world!" using ObjectScript's echo. Note that the file is not required to be pre-processed or anything alike. The server will know that this file has to be passed to ObjectScript, because it's file extension is .osh. Think of it like it was a normal hTML document which can have embedded ObjectScript code, and do a bunch of interesting things!

If you are getting a blank page, or are seeing the entire source code instead, then it is very likely that your web server is mis-configured. Pelase see the installation guide to get assistance in installing and configuring OS in your system and with your web server.

function fib(n){
  var a, b, r = 0, 1, [0];
  for(; b < n;){
    r.push(b);
    a, b = b, a+b;
  }
  return r;
}
print(fib(100));

This program displays the Fibonacci numbers in the range from 0 to 100 in an array. To run the program, use the console application to run scripts ObjectScript: This program displays all the Fibonacci numbers from 0 trough 100 as an array. To run it, use the os command line tool which can run ObjectScript programs on the command prompt.

$ os fibonacci.os
[0,1,1,2,3,5,8,13,21,34,55,89]

Obtain the source code or binary packages at the Downloads page .

Если Вы нашли ошибку, помогите пожалуйста её исправить. Для этого откройте исходник этой страницы, исправьте ошибку и сделайте Pull request. Присоединяйтесь к сообществу ObjectScript, также Вы можете сделать fork проекта для совместной работы.

Fork me on GitHub