Sinisterly
Writing my own language - Printable Version

+- Sinisterly (https://sinister.li)
+-- Forum: Coding (https://sinister.li/Forum-Coding)
+--- Forum: Coding (https://sinister.li/Forum-Coding--71)
+--- Thread: Writing my own language (/Thread-Writing-my-own-language)

Pages: 1 2


Writing my own language - Inori - 08-22-2017

As some of you may have read on Discord recently, I've started writing my a programming language! It's called Morrigan, and it's a functional and imperative language written in Go and (eventully) C, and it utilizes the Ruby RSpec library for testing.

The goals of this project are to create a concise, readable syntax; allow for implicit operation and casting; make an easy learning curve; and provide bindings to and integration with C-level operations (e.g. all filesystem functions will be aliases to C helper functions). Currently, I've gotten as far as conditionals (working on loops), but I hope to extend to structs, types, functions and potentially modules by the end of next week.

I'm keeping the project completely open source, and I'm totally open to contributions and additions. There's not much information since the language is very far from stable, but you can check it out at the following link:
https://github.com/inoriy/morrigan


RE: Writing my own language - Nil - 08-22-2017

Nice. Good luck on the project. I'm a big fan of rspec.


RE: Writing my own language - hackedia - 09-27-2017

Nice man good luck Biggrin


RE: Writing my own language - mothered - 09-27-2017

It's been a little over a month so far. The conditionals are actually defined quite well. I'd love to see how It progresses.

EDIT: Info added.


RE: Writing my own language - Inori - 09-27-2017

(09-27-2017, 03:00 PM)mothered Wrote: It's been a little over a month so far. The conditionals are actually defined quite well. I'd love to see how It progresses.

EDIT: Info added.

They definitely work, but defining the syntax and actually implementing it is a little tedious. I'd like to find a way to automate it/make it more concise at compile time, but Go doesn't have macros.


RE: Writing my own language - Mr.Kurd - 09-27-2017

Nice, Keep it up bro Smile .


RE: Writing my own language - Nil - 09-28-2017

What resource are you using to guide you on this? The code is too confusing for me to understand so just wondering.


RE: Writing my own language - Inori - 09-28-2017

(09-28-2017, 04:12 AM)God Wrote: What resource are you using to guide you on this? The code is too confusing for me to understand so just wondering.

I'm doing most of it from scratch, but the lifecycle and basic structure (lexer -> parser -> ast -> interpreter) is loosely based off of this.
I agree, the code is a bit of a mess. If I get some time, I'd like to re-implement it in something easier to understand and test (maybe Crystal, which is essentially a statically typed, compiled version of Ruby).


RE: Writing my own language - mothered - 09-28-2017

(09-27-2017, 07:20 PM)Inori Wrote: They definitely work, but defining the syntax and actually implementing it is a little tedious. I'd like to find a way to automate it/make it more concise at compile time, but Go doesn't have macros.

Yes, It's the syntax that makes all the difference.

Upon viewing the code, I think you've done very well so far. Shame with the macros. It would've made life a lot easier for you.


RE: Writing my own language - Nil - 09-29-2017

(09-28-2017, 04:51 AM)Inori Wrote:
(09-28-2017, 04:12 AM)God Wrote: What resource are you using to guide you on this? The code is too confusing for me to understand so just wondering.

I'm doing most of it from scratch, but the lifecycle and basic structure (lexer -> parser -> ast -> interpreter) is loosely based off of this.
I agree, the code is a bit of a mess. If I get some time, I'd like to re-implement it in something easier to understand and test (maybe Crystal, which is essentially a statically typed, compiled version of Ruby).

Unfortunately all things which I have never learned or read about. Reading more about the process now though.