Facilis - A Low Level Functional Language
h
CSharpIsGud (643)

Facilis is a strongly typed functional language that aims to be low level. Facilis uses a hand-written recursive descent parser made with love.

Factorial Example

impure foreign putchar(c of u8) -> void
impure foreign tostr(num of void*) -> string

impure write(str of string, start of i32) -> void {
	putchar(str[start])

	if start != str.length() {
		write(str, start + 1)
	}
}

pure fact(i of i32) -> i32 {
	if i == 1 {
		return i
	}

	return i * fact(i - 1)
}

impure main() -> i32 {
    write(tostr(fact(6)), 0)
}

Demo: https://repl.it/@Facilislang/FacilisDemo#README.md
^ Has a user/password login program loaded by default. Read the README!

Source: https://repl.it/@Facilislang/Facilis
^ 2072 lines of C++!

@CSharpIsGud @Subarashi @xxpertHacker

You are viewing a single comment. View All
fuzzyastrocat (1270)

@DynamicSquid Running it depends on the assembly "flavor". There are two main flavors of assembly:

  • Intel: This is the most common one. It is the thing you'll see a bunch on StackOverflow. (For some examples of what it looks like, so that I don't have to explain it, look here).
  • AT&T: This one is far less common, but I like it better. It's also used by the gcc C compiler by default. Some examples of what AT&T looks like
    can be found here.

To run AT&T, use gcc [filename].s -o ./out. That will make an executable, ./out, which can be run through the shell by simply typing ./out.

To run Intel, you have to get something like nasm. I won't go over that here, you can probably find it online by a google search (I'm not super experienced with nasm either so google will probably explain it better).