O Language: New Release 4.0

O language fixes have been made since 3.0 version, with batch fixes and function changes.

  1. Function definition feature was introduced. With this feature you can return an identification function result.
  2. Database updates were made.
  3. Unnecessary functions deleted.
  4. Project cleaning was done.
  5. Database functions changed.
  6. Functions that may cause errors are automatically added to the error routing.

O Language has been upgraded to version 4.0 along with these fixes. You can view the version history by clicking on this link to take the relevant update and test it and make a contribution.

Web site: http://olang.space

Update Detail: Build 4.0

O Language: HTTP Example Socket

The HTTP socket allows the HTTP protocol to be displayed on the web using any port. You can use the http(path, port, response) function to easily create an http socket.

hello.olm:

def hello = fn(name){
 return "Hello, "+name+"! Welcome to Olang"
}

httptest.ol:

load "hello.olm"
show("Listening 0.0.0.0:8080... Ctrl+C to exit.")
http("/", "8080", hello("Oytun"));

First we loaded our “hello” module with load. Later in the hello() function on the 8080 port to provide this output. When we enter port localhost:8080 from our browser or curl, the result will be;

~> curl localhost:8080
 Hello, Oytun! Welcome to Olang

Now we can display the socket by connecting to 8080 port via HTTP. In the following lessons we will learn how to create routers and render pages on them.

O Language: Scopes or Classes

The scope structure is similar to class structures. All the functions defined in scope form subfunctions of a scope. In this way you can clustering by writing functions in the main scope.

Scope definition:

scope example {
 def hello = fn(x){
  return "Hello "+x
 };
 
 def subone = fn(x){
  return x+1
 };
}

Scope call:

def hello = example::hello("Oytun")
def number = example::subone(1)
show(hello)
show(number)

Scope output:

Hello Oytun
2

Great now you are ready to write a simple web socket.

O Language: Getting Started (Part 2)

Installation

Click download link and select your own system or package after setup your development environment path to extracted path. If you need to If you want to do development, you can install golang and extract the codes with this command;

go get -v github.com/olproject/olang

and run

olang(.exe) (-r) (-d=true [debug mode])

Thats it.

Files

Olang files is to simple. Default file extension “.ola”. Let’s start by examining the programming language example.

def hello = fn(name){
  return "Hello, "+name+"! Welcome to O-lang!"
}
def result = hello("Oytun")
show(result)

Run:

$ chmod a+x test.ol
$ ./test.ol

or

$ olang test.ol

Output:

Hello, Oytun! Welcome to Olang

Continue reading “O Language: Getting Started (Part 2)”

HTML is a programming language?

HTML as a programming language was presented to us for years. First programming language in web development was taught and is taught. But there is a point where people don’t know any. HTML is not a programming language.

HTML is a markup language. Actually HTML is a markup language XML extended through. So has been extended. It easier people web-based projects has enabled us to offer and develop people to their sites.

After it is compiled on the system works in real programming languages. Languages such as HTML or PHP is the script language completely. In no way are executed by an interpreter from compiled and interpreted. In html, the situation is different. HTML code in the browser of the DTD (Document Type Definition), XML structure are interpreted under the shed to screen it again. In this way, we can view each of them as a website.

The two are united under the roof of coding languages; compiled languages and interpreted languages that can be that can be. Languages that can be compiled; the platform on compiled byte-code form, and the generated byte-code only systems that have the same architecture employed by disassemble. In this way, the function of the actual programming language. Interpreting a text the interpreter to the user by showing the direct result.

By using the simple identifiers and document types on the screen and interprets the HTML codes of a website, there is a function to display the files or projects. For this reason, should not be regarded as a programming language.

This was present in the XML before HTML and was not so easy. Later, the W3C (Web Consortium) standards DTDS and engineers on various teams and can be understood by everyone and as a result began to develop a detectable ML (Markup Language) appeared. Currently we develop Web sites W3C’s own written HTML4/5 standards development we are doing. The main thing to be detected in the HTML, such as XML, extended. Because the origins of the first standards based on XML.

Sources: DTD on Wikipedia HTML 4 DTD HTML 5 DTD