All Projects → veggero → nylo

veggero / nylo

Licence: other
Nylo's programming language interpreter.

Programming Languages

python
139335 projects - #7 most used programming language
common lisp
692 projects

Projects that are alternatives of or similar to nylo

BIPES
BIPES: Block based Integrated Platform for Embedded Systems allows text and block based programming for several types of embedded systems and Internet of Things modules using MicroPython, CircuitPython, Python or Snek. You can connect, program, debug and monitor several types of boards using network, USB or Bluetooth. No software install needed!
Stars: ✭ 72 (+242.86%)
Mutual labels:  programming
30-seconds-of-angular
Curated collection of Angular snippets that you can understand in 30 seconds or less
Stars: ✭ 24 (+14.29%)
Mutual labels:  programming
DataViewExtenders
Extenders for WinForms controls, such as DataGridView, DataGridViewColumn, FlowLayoutPanel, TableLayoutPanel, etc
Stars: ✭ 22 (+4.76%)
Mutual labels:  programming
stanford-algorithms-specialization
Problem Set and Programming Assignment Solutions to Stanford University's Algorithms Specialization on Coursera & edX
Stars: ✭ 43 (+104.76%)
Mutual labels:  programming
wrangling-genomics
Data Wrangling and Processing for Genomics
Stars: ✭ 49 (+133.33%)
Mutual labels:  programming
code-examples
Short code snippets written by our open source community!
Stars: ✭ 60 (+185.71%)
Mutual labels:  programming
Programming-Basics-Book-CSharp-EN
Textbook for the "Programming Basics" course @ SoftUni (C#, English)
Stars: ✭ 45 (+114.29%)
Mutual labels:  programming
find-work
Curated list of websites and resources to find work programming
Stars: ✭ 91 (+333.33%)
Mutual labels:  programming
app-time-lessons
Short multiple choice questions for learning JavaScript and programming concepts
Stars: ✭ 22 (+4.76%)
Mutual labels:  programming
coding-untuk-semua
Coding untuk semua, kumpulan materi-materi untuk belajar coding/pemrograman.
Stars: ✭ 18 (-14.29%)
Mutual labels:  programming
Community-Programming-Book
Community written book on Programming Languages
Stars: ✭ 31 (+47.62%)
Mutual labels:  programming
nerdojo
🥋 Coding Dojo é uma forma de treinar suas habilidades em desenvolvimento de sistemas. Usamos o formato KATA. Nesse formato vamos apresentar o desafio e apresentar a proposta de solução (sem mostrar o código), e reunir as pessoas em equipes. Esse repositório serve como uma central de tudo o que acontece no NCD. Fique por dentro!
Stars: ✭ 36 (+71.43%)
Mutual labels:  programming
ResourceCollection
A collection of handy resources, as recommended by Pharap
Stars: ✭ 18 (-14.29%)
Mutual labels:  programming
gamedevguide
Game Development & Unreal Engine Programming Guide
Stars: ✭ 314 (+1395.24%)
Mutual labels:  programming
spring-boot-jwt-social-auth
Implementing JWT authentication and integrate Facebook login with it using Spring Boot
Stars: ✭ 32 (+52.38%)
Mutual labels:  programming
hackerrank-30-Days-of-Code
Hackerrank Solutions of "30 Days of Code Challenges "
Stars: ✭ 23 (+9.52%)
Mutual labels:  programming
source
A wiki of tutorials
Stars: ✭ 34 (+61.9%)
Mutual labels:  programming
InterQues
Let's find the list of questions and collaborate
Stars: ✭ 74 (+252.38%)
Mutual labels:  programming
yt-channels-DS-AI-ML-CS
A comprehensive list of 180+ YouTube Channels for Data Science, Data Engineering, Machine Learning, Deep learning, Computer Science, programming, software engineering, etc.
Stars: ✭ 1,038 (+4842.86%)
Mutual labels:  programming
awesome-blockchain
A curated list of blockchain resources for developers
Stars: ✭ 106 (+404.76%)
Mutual labels:  programming

image0

Nylo is a declarative programming language. It takes some constructs from functional and logic paradigms, but it’s really a new paradigm itself. It aims to be simple and clear, but powerful. It provides an easy way to make assertions on the data a function is working on. It also gives you the possibility to define standard behaviour if asserts fail.

fib: (
    n: int
    prevs: fib(n: n-1) + fib(n: n-2)
    result: if(cond: n<2, then: n, else: sum_prev_fibs)
    -> result
)

Contents

Present and future of project

This repo contains the development version of the proof-of-concept of the programming language. The poc should be finished on the 25th of May, but due to complications in the type and overloading systems, it might slip further.

As soon as the proof-of-concept is finished and refined, the work on the actual interpreter will start. It will be written in Go/Rust/Ida.

Markup / Configuration file

Nylo aims to be clear enough to be used to markup or configuration files. An example can be found on http://niccolo.venerandi.com .

Structures

grades: (
    first_semester: (
        math: 7
        science: 9
        language: 6
    )
    second_semester: (
        math: 8
        science: 8
        language: 7
    )
)

Lists

numbers: (
    high: (
        4201337,
        3290941,
        4129301
    )
    low: (1, 2, 3)
)

Multiple words

first level: (
    enemy life: 100
    enemy power: 50
)
second level: (
    enemy life: 150
    enemy power: 80
)

Other kind of variables

Any variable can be used by putting ` before and after the name.

symbols: (
    `+`: "plus"
    `-`: "minus"
)
years: (
    `2017`: "kinda cool"
    `2018`: "please let's go back"
)
other weird names: (
    `(!WOW!)`: "WOW!"
    `--> :0 <--`: "WOW!"
)

Programming Language

It’s simple and orthogonal

Nylo has very few constructs. In fact, everything is a structure, which is put in the form of (a: b, c: d -> e)

// Class
point: (
    x: int
    y: int
)

// Function
double: (
    n: int
    r: n * 2
    -> r
)

// Call
twenty: double (
    n: 10
    -> r
)

// Namespace
smallnumbers: (
    zero: 0
    one: 1
    two: 2
)

// Enum
traffic_lights: (
     green: ()
     yellow: ()
     red: ()
)

// List
languages: (
    "Python"
    "Go"
    "C"
)

It’s explicit and clear

Nylo makes everything explicit, even function calls!

screen.drawings: (
    rectangle(
        position: point(x: 5, y: 15)
        size: point(x: 10, y: 10)
        color: (red: 255, green: 0, blue: 0)
    )
)

The same thing with pygame is:

pygame.draw.rect(
    screen,
    (255, 0, 0),
    (5, 15, 10, 10)
)

As you can see, Nylo is easier to understand.

Curried function and classes

Not all arguments has to be passed in the first call. You can use -> to curry.

add: (
    a: int
    b: int
    -> a + b
)

add(a: 1, b: 2) = 3

add_three: add(a: 3 ->)
add_three(b: 5) = 8

Also, not all class proprieties has to be passed in the first call.

point: (
    x: int
    y: int
)

A: point(x: 5, y: 10)

x_axis: point(y: 0 ->)
y_axis: point(x: 0 ->)

B: x_axis(x: 5)
C: y_axis(y: 10)

Inverse function and classes

You can make function that also works backward:

double: (
    n: result / 2
    result: n * 2
    -> result
)

double(n: 10) = 20
double(n: 10 -> result) = 20
double(result: 20 -> n) = 10

And you can also have multiple ways to define classes:

color: (
    r: hex[1:3].base_10
    g: hex[3:5].base_10
    b: hex[5:7].base_10

    hex: '#' & r.base_16 & g.base_16 & b.base_16
)

color(r: 255 g: 0 b: 0)
color(hex: "#ff0000")

color(r: 0 g: 122 b: 54 -> hex)
color(hex: "#c8ec8e" -> r)

No one own this, you can do whatever you want with this code, and you should not care about who made it. Have fun!

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].