• This repository has been archived on 30/Sep/2023
  • Stars
    star
    865
  • Rank 52,730 (Top 2 %)
  • Language
    C++
  • License
    MIT License
  • Created about 8 years ago
  • Updated about 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

An unmaintained programming language

The Pinecone Programming Language

Built from the ground up to be fast, concise and intuitive.

NOTE: PINECONE IS NO LONGER BEING ACTIVELY DEVELOPED OR MAINTAINED

Pinecone is a new programming language. Its goal is to combine the simplicity of a dynamic language with the performance of a compiled one. It is under rapid development, but most of the core features are ready.

If you want to program in Pinecone now, see the tutorials for how to get started.

There is also a Pinecone plugin for VIM here.

For updates, discussion and help, take a look at the Pinecone subreddit: /r/PineconeLang

About

Pinecone is a brand new, easy to learn, general purpose, multi-paradigm, high performance programming language created by William W Wold. Work on the language began on October 4th, 2016. Pinecone can now be interpreted or transpiled to C++. The language is written from scratch (it includes an integrated lexer, parser and interpreter, etc.).

Example

Here is the common demo program FizzBuzz written in Pinecone. It prints the numbers from 1 to 20, but it prints "Fizz" if the number is divisible by 3, "Buzz" if it is divisable by 5 and "FizzBuzz" if it is divisible by both. You can find more samples in the examples directory or the tutorials.

# FizzBuzz

# call the function defined below
fizzBuzz: 1, 20

# define the FizzBuzz function
fizzBuzz :: {start: Int, end: Int}: (

	# loop i from start to end
	i: in.start | i <= in.end | i: i+1 @ (

		# use conditionals to print the right thing

		i % 3 = 0 && i % 5 = 0 ?
			print: "FizzBuzz"
		|
		i % 3 = 0 ?
			print: "Fizz"
		|
		i % 5 = 0 ?
			print: "Buzz"
		|
			print: i
	)
)

Why?

This is probably the most common reaction to hearing about a new language. I realize that there are a lot of programming languages, and that the reason for that is that there are so many assholes like me who keep making them. I do truly think, though, that Pinecone fills a previously empty niche.

Pinecone aims to have similar capabilities to modern object oriented compiled languages such as C++, Swift and Rust. It's primary attraction is the simplicity and consistency of it's syntax. Here are some examples of how Pinecone is different from other popular languages:

  • Variable creation is implicit, just set a variable and it is created.
  • Variables are statically typed, but type deduction is automatic.
  • Calling a function that takes no arguments is the same syntax as accessing a variable (just writing it's name).
  • Calling a function that takes one argument is the same syntax as setting or creating a variable (funcOrVar: input).
  • Calling a function that takes multiple arguments is the same syntax as setting or creating a tuple (funcOrTuple: input1, input2).
  • White space is ignored and semicolons are not necessary
  • : is used for assignment, which leaves = free for comparison, rather than the often confusing ==.
  • Tuples, structs and classes are all basically the same thing
  • Functions can be sent arguments from the left side, right side or both (inputLeft.function: inputRight), which is used for class methods but can also allow you to define functions for any type (even primitive).
  • Program control is done with operators instead of keywords (? instead of if)

Compatibility

Pinecone currently requires zero external dependencies (and the only one that will likely be added is LLVM). You will need a C++11 compiler to build it, and the process is easier with GCC and Make. Pinecone has been successfully tested on Linux, MacOS and Windows.

Current State

The features that are currently implemented are as follows:

  • Primitive data types Bool, Int and Dub
  • All the operators you would expect (+, *, %, :, =, >, <=, &&, etc.)
  • Single and multi line comments
  • Flow control (if, if/else, while loop, for loop)
  • Constants
  • Data structs
  • Tuples
  • Int arrays
  • Functions
  • Strings and various String operations
  • User input
  • Running system commands
  • Interpreter for rapid development and simplicity
  • Transpiler to C++ for max performance

The following features are coming soon:

  • Whatev type (equivalent to templates or generics in other languages)
  • Arrays of any type (Whatev support needed)
  • Pass-by-reference
  • Proper classes (pass-by-reference needed)
  • Operator overloading

Contributing

I have not yet added enough documentation to the language internals to make it practical for others to contribute to the language itself. If you are interested in adding a specific feature or just helping out, post in the subreddit or direct message me on reddit or twitter. Fixes and improvements to the readmes and tutorials are always welcome.

More Repositories

1

gtk-layer-shell

A library to create panels and other desktop components for Wayland using the Layer Shell protocol
C
316
star
2

Python-plus-plus

A framework for creating Python/C++ polyglots, programs valid in both programming languages
Shell
145
star
3

gtk4-layer-shell

A library to create panels and other desktop components for Wayland using the Layer Shell protocol and GTK4
C
132
star
4

BrainfuckIDE

A Brainfuck IDE/debugger designed to be intuitive, featureful and visually appealing
GDScript
92
star
5

wayland-debug

A command line tool to help debug Wayland clients and servers
Python
71
star
6

Hedgehog

C++ Wayland compositor
C++
17
star
7

mate-wayland-snap

Shell
11
star
8

bfstack

A Brainfuck framework
10
star
9

destylize

Browser extension to remove unicode text stylization, Now available for Firefox and Chrome (see below)
JavaScript
10
star
10

define_EVIL

8
star
11

wlbouncer

Control which Wayland protocol extensions are available to which clients on any Wayland compositor
C++
8
star
12

Object-Oriented-C

Why are we building this?
C
8
star
13

hello-wayland

Example and test Wayland apps
C
4
star
14

BrainfuckIDE_builds

Builds of my Brainfuck IDE built in Godot
4
star
15

GDMir

Godot module for building Wayland compositors with Mir
C++
4
star
16

mirco

A Mir based Wayland compositor
C++
3
star
17

solidjs-leaflet-map

Just playing around, probably not of interest to you
JavaScript
3
star
18

cpp-cheat-sheet

Demonstration of the basic concepts of the C++ language and how to use them
3
star
19

DroneRace

An open source drone racing game made with Godot (there is no PHP in this project. wtf GitHub?)
PHP
3
star
20

Skylight

The Skylight programming language
C++
2
star
21

bft

WIP Brainfuck tooling, written in Rust.
Rust
2
star
22

snap-out

Fixes the environment for an external program launched from inside a classic snap
Rust
2
star
23

nff

non-fungible files
Python
2
star
24

cryptvm

An attempt to build a Brainfuck VM with homomorphic encryption
C++
2
star
25

include_fixer

Utility to to fix broken C/C++ #includes
Python
2
star
26

7-Segment-Unicode

Make numbers look like they're on a 7 segment display
Python
2
star
27

FluidSim3D

An experimental 3D fluid dynamics simulator
C++
1
star
28

wmwwStatusline

A configurable Linux statusline written in C++ designed for use with sway and i3
C++
1
star
29

working_drm_demo

simple demo of using direct rendering manager in Linux
C++
1
star
30

desktop-environment-talk

1
star
31

4D_tic-tac-toe

A simple text based 4D tic-tac-toe game in java
Java
1
star
32

name-of

This project has moved: https://bit.ly/357tcAz
1
star
33

buzzfeed-cli

Ruby
1
star
34

wmstr

A simple yet useful UTF-8 string single header library for C++
C++
1
star
35

iron-c

WIP project to make C safe
C
1
star
36

wifi-sync

Sync saved wifi networks to a file
Python
1
star
37

widap-launcher

A simple linux program launcher
C++
1
star
38

ram_detector

A simple C program to detect the amount of used RAM on a Linux system
C
1
star
39

Brainfuck

C++
1
star
40

BattleshipTwitter

Rules for a Battleship-inspiered game to be played on Twitter
SCSS
1
star
41

personal

Scripts, helpers and configuration primarily intended for my own use
Python
1
star
42

basic-battle

Old multiplayer BASIC game
Visual Basic
1
star
43

repo-manager

A tool for managing directories of code repositories
Python
1
star
44

cmake-starter

A basic CMake C++ starter project
CMake
1
star