Code Monkey home page Code Monkey logo

hacc-ts's Introduction

Hacclang

(Hastily Arranged Character Combinations)

This language is my second (or third?) attempt at creating a programming language, the first being Parth. This language will be similar, but will also be somewhat influenced by the languages I am most interested in (such as Erlang).

Philosphy

"If we don't know what we are doing, the enemy certainly can't anticipate our future actions."
- Colonel Goodhead

I've never been known to make a plan, and it's even rarer that I'd follow it. However, there are a few tenets that I want to adhear to, as contradictory as they may be:

  1. Easy to read for the average programmer

Over the course of a few weekends, I discovered that I love Erlang and what it can do. Once you can read it, it becomes crystal clear what the code is doing. However, having come from more popular languages like Javascript, Ruby, and C, I can attest that at first glance it reads like the Voynich Manuscript. I don't want the average coder to be turned away, so I would prefer traditional forms.

  1. Not limited to a single paradigm

Functional programming a really cool. However, in keeping with the first tenet, I would also allow users to have access to non-functional imperative constructs such as mutability and side effects. I'm not smart enough to build a safe language, the least I can do is make a fun one.

  1. Neat devices

This could potentially contradict the first tenet, but there are some cool advanced features that I would like to implement (hopefully as readable as possible). Things like Erlang's (and Ruby's) set operations are really interesting, as well as list comprehensions and destructuring. It might be difficult to pull off, but what-evs, ya know? This language is for me to play around in, so rather than ideas being set in stone, they're scribbled in sand or a wet napkin.

Honestly, I'm just throwing spaghetti at the wall here. This isn't a good language, and it doesn't do anything particularly well. I'm just having fun.

TODO

[.] Create parser (raw -> AST)
[ ] Create compiler (AST -> bytecode)
[ ] Create VM (bytecode -> where the magic happens)
[ ] Create AST optimizer
[ ] Rewrite entire thing in low level language (probably Rust)

Potential optimizations

[ ] Convert Unary('-' number) to Number
[ ] Unwrap blocks with only one node to just the node itself

hacc-ts's People

Contributors

pgilbertschmitt avatar

Watchers

James Cloos 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.