Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
ObjectScript, OS for short, is a new programming language. 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 magi…

add IceTea

latest commit 285e3ce05a
Evgeniy Golovin authored
Failed to load latest commit information.
3rdparty ODBC support for Windows
cmake Final CMake fix. Ready to PR.
conf/etc ver 1.2, add post_max_size to config
contrib ODBO fixes, libmysqlclient fix for Apple. That thing is pretty much c…
src ODBO fixes, libmysqlclient fix for Apple. That thing is pretty much c…
syntax-highlighting for string `...` removed highlighting of \x sub-sequences
win OS 2.6-rc big update:
.gitignore fix gitignore
CMakeLists.txt ODBO fixes, libmysqlclient fix for Apple. That thing is pretty much c…
LICENSE
README.md add IceTea
old_CMakeLists.txt CMake enhancements #1
os-fcgi.cpp OS-FCGI 1.3.2, check invalid headers to prevent crash
os.config.h.in ODBC as optional dependency (Linux only)
os.cpp minor fix

README.md

ObjectScript

ObjectScript, OS for short, is a new programming language. 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!

The ObjectScript is universal scripting language, there are no compromises any more.

Compile and Install os-fcgi and os

Run the following commands after you have cloned this repository:

mkdir build && cd build
cmake ..
make
make install

If you are on an operating system like Debian or Ubuntu, you can then start os-fcgi by typing:

service os-fcgi start

Installing the Database layer

During the configuration, you may notice that a library named SoCi could not be found. This is the database abstraction which is used by ObjectScript's ext-odbo module. You can build SoCi alongside OS by using the following CMake command instead of the one given above:

cmake .. -DBUILD_SOCI=ON

After that, you should be good to go.

Special note for Apple Mac OS X builds

Depending on how you have installed MySQL on your system, you may run into this error by running os or os-fcgi from the build directory or after you have installed it:

dyld: Library not loaded: libmysqlclient.18.dylib
  Referenced from: /usr/local/bin/os
  Reason: image not found

Or similar. To fix this, do as follows:

# Navigate back into your build folder if you have previously left it
cd build
../contrib/change_install_name.sh

This will update all the binaries within your build folder and make them find the library - hopefuly.

Nginx config example (for os-fcgi)

server {
    listen          80;
    server_name     mydomain.com www.mydomain.com;
    root            /home/myuser/mydomain.com/www;
    error_log       /var/log/nginx/error.mydomain.com.log;
    access_log      off;
    location ~ /\.ht {
        deny all;
    }
    location ~ /\.git {
        deny all;
    }
    location / {
        try_files $uri $uri/ /index.osh /index.os;
    }
    location ~* \.(jpg|jpeg|png|gif|swf|flv|mp4|mov|avi|wmv|m4v|mkv|ico|js|css|txt)$ {
        access_log off;
        expires 7d;
    }
    charset utf-8;
    location ~ ^.+\.osh? {
        fastcgi_split_path_info ^(.+?\.osh?)(.*)$;
        fastcgi_pass    127.0.0.1:9000;
        fastcgi_index   index.osh;
        include fastcgi_params;
        fastcgi_intercept_errors    on;
        fastcgi_ignore_client_abort on;
        fastcgi_read_timeout    360;
    }
}

Apache config example (for os-fcgi)

<VirtualHost mydomain.com:80>
    ServerAdmin webmaster@mydomain.com
    DocumentRoot "/home/myuser/mydomain.com/www"
    ServerName mydomain.com

    FastCgiExternalServer "/home/myuser/mydomain.com/www" -host 127.0.0.1:9000

    <Directory "/home/myuser/mydomain.com/www">
        # SetHandler fastcgi-script
        AddHandler fastcgi-script .osh
        AddHandler fastcgi-script .os
        Options Indexes FollowSymLinks MultiViews ExecCGI
        AllowOverride all
        Order Deny,Allow
        Deny from all
        Allow from 127.0.0.1
    </Directory>
</VirtualHost>

Resources

Contacts

Please feel free to contact me at anytime, my email is evgeniy.golovin@unitpoint.ru, skype: egolovin

P.S. old files of this repo have been moved to https://github.com/unitpoint/objectscript-old

Something went wrong with that request. Please try again.