Code Monkey home page Code Monkey logo

verbose-octo-telegram's Introduction

Lisp-Like-Lang (LLL/3l)

Intro

Heyo, wassup? This is the GitHub repo for a shared project between @isaacimagine and @TheWaffleDimension. We're working on a programming language standard similar to Lisp, and hopefully, we'll be able to get an implementation in soon. What is 3l? 3l is a lisp-like language modeled off of cLisp, Python, and the like. As of right now, 3l is solely numerical. A brief syntax overview is laid out in in the Documentation Section.

Installation

To be decided.

Documentation

We have 3 types in 3l, we'll represent them using these symbols:

Name Symbol
Float $
Integer #
Boolean &
Variable .

Expressions take types, and generate new ones: As per tradition, we're using s-exps.

Function Use Output Type
(+ $# $#) $#
(- $# $#) $#
(= $# $#) &
(> $# $#) &
(< $# $#) &
(and &) &
(or &) &
(not &) &
(input)

Expressions are then evaluated, then passed to Blocks:

  • [print $#&]
  • [set . : $#&] Stacks of blocks are then put in, or around Control Flows:
  • [while & : {}]
  • [if & : {}]

Sample Program:

fizzBuzz:
[set x : 0]
[while &1 : {
    [set toPrint : 0]
		[set y : x]
		[while &1 : {
				[if (< y 1) : {
				    [break]
				}]
				[set y : (/ y 5)]
				[if (= y 1) : {
				    [set toPrint : -1]
						[break]
				}]
		}]
		[set y : x]
		[while &1 : {
				[if (< y 1) : {
				    [break]
				}]
				[set y : (/ y 7)]
				[if (= y 1) : {
				    [set toPrint : (- toPrint 2)]
						[break]
				}]
		}]
		[if (= toPrint 0) {
				[print x]
		}]
		[if (= toPrint -1) {
				[print 2215]
		}]
		[if (= toPrint -2) {
				[print 2208]
		}]
		[if (= toPrint -3) {
				[print 22082215]
		}]
		[set x : (+ x 1)]
}]

Steps in our master plan to world dominance:

  • Input/Output (brainf: ,.)
  • Data Storage/Retrieval (><)
  • Operations (+-)
  • Loops (if statements can be modeled from loops, when you think about it) ([])

verbose-octo-telegram's People

Contributors

katk0smos avatar

Watchers

 avatar  avatar

Forkers

tloru

verbose-octo-telegram's Issues

Hello

This isn't really an issue - I'm @.hello

code indenting

the code indenting for the demo program seems to be a bit off...

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.