Git Product home page Git Product logo

jaksel-language's Introduction

Jaksel Programming Language

Jaksel programming language is a new programming language, very modern, easy to learn, using Indonesia-slang language. No programming experience required.

Instalation & Run

npm install -g jaksel-language

// run
jaksel example/example1.jaksel

Table Of Content

[TOC]

Example

Example :

literally umur itu 21
spill "Umur lu " + umur
kalo umur lebih gede 20
  spill "Elu tua"
  literally umurgua itu umur + 10
  spill "Kalo gua umurnya " + umurgua
  kalo umurgua lebih gede 30
    spill "gua lebih tua"
  udahan
kalogak
  spill "dasar bocil"
udahan
spill "Udahan ah"
literally jumlah itu 10
spill "Jumlah: " + jumlah

whichis jumlah itu 11
spill "Jumlah: " + jumlah

literally isHidup itu positive vibes
spill "is hidup :" + isHidup

fomo i endup 10
  kalo i lebih gede 3
    spill "loop ke " + i
  udahan
udahan

Command

Some command just like javascript, the only different is keyword and this language will translate to javascript and run as javascript. I know, this is just for fun.

Variable

Assign variable

literally foo itu "hello world"
// let foo = "hello world"

seriously foo itu 123
// const foo = 123

Reassign variable

whichis foo itu "hello world 2"
// foo = "hello world 2"

Boolean

literally foo itu positive vibes
// let foo = true

literally foo itu worth it
// let foo = true

literally foo itu negative vibes
// let foo = false

Print / Console.log

spill "Hello world"
// console.log("Hello world")

spill foo
// console.log(foo)

Condition

kalo foo itu "Hello world"
  spill "its hello world"
udahan

// transform to
if(foo == "Hello world"){
  console.log("its hello world")
}
kalo foo lebih gede 3
  spill "its bigger than 3"
perhaps foo itu 3
  spill "foo is 3"
kalogak
  spill "its smaller than 3"
udahan

// transform to
if(foo > 3){
  console.log("its bigger than 3")
} else if (foo == 3) {
  console.log("foo is 3")
} else {
  console.log("its smaller than 3")
}

Comparison :

  • itu: ' == ',
  • gak: ' != ',
  • lebih gede: ' > ',
  • lebih kecil: ' < ',
  • lebih gede sama dengan: ' >= ',
  • lebih kecil sama dengan: ' <= '

Loop

fomo i endup 10
  kalo i lebih gede 3
    spill "loop ke " + i
  udahan
udahan

// transform to
for (let i = 0; i < 10; i++) {
  if (i > 3){
    console.log("loop ke " + i);
  }
}

Function

so about my_story
    literally umur itu 21
    spill "Umur lu " + umur
thats it sih

call my_story

so about fungsi_param_banyak a b c
    spill "a: " + a
    spill "b: " + b
    spill "c: " + c
thats it sih

call fungsi_param_banyak 3 4 5

Try Catch & Exception

trust issue
  spill "Something wrong"
  toxic "Error message"
backstab
  spill "Catch error"
yaudahlahya
  spill "finish finally"
udahan


// transform to
try {
  console.log("Something wrong");
  throw new Error("Error message");
} catch {
  console.log("Catch error");
} finally {
  console.log("finish finally");
} 

Disclaimer

This project just for fun, I don't want to hurt anyone. Just from idea "what if jaksel language is a programming language" and make it true. This project only for education purpose, not for production ready.

jaksel-language's People

Contributors

riochndr avatar rayhanhamada avatar reacto11mecha avatar stevemc4 avatar fzn0x avatar waxarsatia avatar anasrar avatar sandhyr avatar ibnusyawall 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.