Coder Social home page Coder Social logo

lclang / littlecat Goto Github PK

View Code? Open in Web Editor NEW
10.0 1.0 2.0 2.36 MB

Little Cat is a modern dynamic typed interpreted language that allows you to write programs quickly and easily.

License: Apache License 2.0

Java 97.64% ANTLR 1.53% NSIS 0.47% Batchfile 0.07% Shell 0.29%
java language script-language lclang dynamic dynamic-languages typed typed-language languages

littlecat's Introduction

Cat

Little Cat Language

Discord CircleCI

Little Cat is a modern dynamic typed interpreted language that allows you to write programs quickly and easily. It was influenced by Java, Kotlin, Python, PHP. Language abbreviation lclang. File extension - lcat.

Install

Windows

Download the latest release of EXE.

Debian (Ubuntu and others)

apt update & apt install wget
wget https://ft.vitiacat.xyz/download.php?id=lcdeb -O lclang.deb
dpkg -i lclang.deb

Executing

CLI

Open terminal and write:

lclang

Output:

image

File

lclang <relative or absolute path>

Code examples

Hello, World!

println("Hello, World!")

While loop

i = 0
while i < 20: {
    println(i++)
}

OR

i = 0 
while { 
    println(i++) 
    return i<20
}

Arrays

array = [1]
array[] = 5

[a, b] = array
println(a)
println(b)

Wait data from other thread

data = null
:Thread(-> {
  sleep(5000L)
  data = "New data!"
})

while data==null
println(data)

HTTP client on Connection and url

println(readInput(
    parseUrl("https://github.com")
      .openConnection()
      .getInput()
))

HTTP client on Sockets

url = "info.cern.ch"
path = "/"
requestMethod = "GET"

socket = :Socket(url, 80)

output = socket.getOutput()
output.println(requestMethod+" "+path+" HTTP/1.1")
output.println("Host: " + url)
output.println("")
output.flush()

println(readInput(socket.getInput()))

Map

map = :Map()
map.put("ads", "Zation is a social network")
println(map.get("ads"))
println(map.entries)

Contributions

littlecat's People

Contributors

levkopo avatar vitiacatdragon avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.