Giter Site home page Giter Site logo

jorbdehmel / oak Goto Github PK

View Code? Open in Web Editor NEW
5.0 5.0 2.0 1.74 MB

The Oak Programming Language. Oak is a modern, low-level, statically-typed translated programming language with extreme macro support, built-in packaging and building, and compile-time-modifiable language syntax. Oak's syntax modification makes it a powerful core for the construction of new programming languages.

License: GNU General Public License v3.0

Makefile 1.09% C++ 85.27% Shell 0.10% C 13.43% Nix 0.10%
assembler compiler language programming-language programming-language-development tools translator

oak's Introduction

Buy me a coffee

  • @jorbDehmel, Jordan "Jorb" Dehmel.
  • [email protected]
  • Linux (Debian/Arch)
  • Student of CompSci + pure math at Colorado Mesa University
  • Currently doing undergraduate research in active matter physics, source code vulnerability analysis
  • Experience in Python, C++, Java, Javascript, Rust, HTML/CSS, rmd, md, LaTeX, SQL, RegEx
  • Experience creating 2D and 3D rendering engines, machine learning libraries, programming language translators
  • Currently researching formal language theory, theoretical computer science

PFP via tuckerbudzyn on instagram

oak's People

Contributors

jorbdehmel avatar lemonjamesd avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

oak's Issues

Errors w/ implicit type casting reducing precision

acorn will select invalid function candidates which cause
loss of precision, leading to undefined behavior. This can
be solved by a refinement of the candidate selector or by
disallowing precision-lowering implicit casts.

Integrating method call notation

The current method call notation provided by the
std ruleset is broken and slow. This feature is
widely-used enough that it justifies integration into
the canonical syntax.

  • Integrate method call notation
  • Make method call notation work on nested objects (IE a.b.c.d())

Bug (I assume) when writing if statement.

package!("std");
use_rule!("std");

let main() -> i32 
{
	let one: u8 = 1;
	if (one != to_u8(1) == false)
	{
		print("Worked!\n");
	}
}

Will compile.

package!("std");
use_rule!("std");

let main() -> i32 
{
	let one: u8 = 1;
	if ((one != to_u8(1)) == false)
	{
		print("Worked!\n");
	}
}

Will not compile.

Add `mut` keyword for types

This would disambiguate the current const/mut typing situation, in which mutability is denoted via pointer.

  • Add mut keyword
  • Do checks for mut when attempting to change values

Massive Memory Leak

// main.oak
package!("std");
use_rule!("std");

include!("linked_list.oak");

let main() -> i32
{
    0
}
// linked_list.oak
package!("std");
use_rule!("std");

let linked_list<t> = struct
{
    next: ^linked_list<t>,
    data: t
}

Causes a giant memory leak (4gb at least).

Add negation, incrementation and decrementation

In the past, unary operators have been avoided in Oak
because only a binary operator substitution pass was initially
written. This should be remedied. The following should be
added during the operation-substitution pass of compilation.

  • Add negation operator (IE !a)
  • Add increment operator (IE ++a)
  • Add decrement operator (IE --a)

Efficiency boosts in `doFile`

The main operations on the input token stream are performed
when it is in a vector. This should be transitioned to a list
instead, for obvious efficiency reasons.

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.