All Projects → fundot → fundot

fundot / fundot

Licence: MIT license
The Fundot programming language.

Programming Languages

C++
36643 projects - #6 most used programming language
CMake
9771 projects
c
50402 projects - #5 most used programming language
Standard ML
205 projects
Makefile
30231 projects

Projects that are alternatives of or similar to fundot

Mond
A scripting language for .NET Core
Stars: ✭ 237 (+1480%)
Mutual labels:  interpreter, repl
Mappy
A functional programming language. Like LISP but focused around maps rather than lists.
Stars: ✭ 10 (-33.33%)
Mutual labels:  interpreter, repl
Red
Red is a next-generation programming language strongly inspired by Rebol, but with a broader field of usage thanks to its native-code compiler, from system programming to high-level scripting and cross-platform reactive GUI, while providing modern support for concurrency, all in a zero-install, zero-config, single 1MB file!
Stars: ✭ 4,725 (+31400%)
Mutual labels:  interpreter, repl
retro12
This repo is retired. See http://forthworks.com:8000/
Stars: ✭ 18 (+20%)
Mutual labels:  interpreter, repl
Gomacro
Interactive Go interpreter and debugger with REPL, Eval, generics and Lisp-like macros
Stars: ✭ 1,784 (+11793.33%)
Mutual labels:  interpreter, repl
Rascal
The implementation of the Rascal meta-programming language (including interpreter, type checker, parser generator, compiler and JVM based run-time system)
Stars: ✭ 284 (+1793.33%)
Mutual labels:  interpreter, repl
Mico
Mico ("Monkey" in catalan). Monkey language implementation done with C++. https://interpreterbook.com/
Stars: ✭ 19 (+26.67%)
Mutual labels:  interpreter, repl
huginn
Programming language with no quirks, so simple every child can master it.
Stars: ✭ 41 (+173.33%)
Mutual labels:  interpreter, repl
Brain
An esoteric programming language compiler on top of LLVM based on Brainfuck
Stars: ✭ 112 (+646.67%)
Mutual labels:  interpreter, repl
Endbasic
BASIC environment with a REPL, a web interface, and RPi support written in Rust
Stars: ✭ 106 (+606.67%)
Mutual labels:  interpreter, repl
Go Pry
An interactive REPL for Go that allows you to drop into your code at any point.
Stars: ✭ 2,747 (+18213.33%)
Mutual labels:  interpreter, repl
Charly
🐈 The Charly Programming Language | Written by @KCreate
Stars: ✭ 185 (+1133.33%)
Mutual labels:  interpreter, repl
lambda-dti
Interpreter of the ITGL with dynamic type inference
Stars: ✭ 18 (+20%)
Mutual labels:  interpreter, repl
Ok
An open-source interpreter for the K5 programming language.
Stars: ✭ 408 (+2620%)
Mutual labels:  interpreter, repl
malluscript
A simple,gentle,humble scripting language for mallus, based on malayalam memes.
Stars: ✭ 112 (+646.67%)
Mutual labels:  interpreter, repl
Bic
A C interpreter and API explorer.
Stars: ✭ 719 (+4693.33%)
Mutual labels:  interpreter, repl
ol
Otus Lisp (Ol in short) is a purely* functional dialect of Lisp.
Stars: ✭ 157 (+946.67%)
Mutual labels:  interpreter, repl
lambda
lambda calculus interpreter
Stars: ✭ 23 (+53.33%)
Mutual labels:  interpreter, repl
Goto
Goto is an interpreted programming language written in go.
Stars: ✭ 79 (+426.67%)
Mutual labels:  interpreter, repl
Janet
A dynamic language and bytecode vm
Stars: ✭ 2,216 (+14673.33%)
Mutual labels:  interpreter, repl

Fundot

Fundot is a programming language that treats "code as data". Inspired by both Lisp and JSON, Fundot aims to provide homoiconicity, but with more readability and functionality.

Contents

Documentation

Here is a list of Fundot documents that helps you better learn and use Fundot. Because Fundot is still a baby language, there is not so many documents yet, but we are trying our best to provide everybody a good experience.

  • Cheatsheet - Explanations for how Fundot reads "code as data".
  • Quick Guide - Descriptions for the fundamental ideas and features of Fundot.
  • C++ Style Guide - Style guide for C++ when coding Fundot core and shared objects.

Dependencies

There are two dependencies to build Fundot from source. You may click them for installation instructions. Both Boost and CMake are well-documented, and you may find it easy to install them after reading the guidelines.

Installation

We are going to release binary archives soon, and then you may simply download and extract them. So far, you may follow the instructions below to build Fundot from source.

Linux, macOS, and other Unix-like systems

First, make sure you have properly installed the dependencies mentioned above. Then clone this repository and enter the following commands in the terminal. In the last command, you may enter after --prefix any directory path in which you want to install Fundot. Here, ~ represents the home directory.

git clone https://github.com/fundot/fundot.git
cd fundot
mkdir build
cd build
cmake ../
make
cmake --install . --prefix ~

If you did everything right, then the following message should be printed. And you may find a directory named fundot under the path you just entered after --prefix. Now, you may experience fundot by clicking the executable under fundot/bin. You may also add this executable to system PATH, then you may access fundot everywhere. However, please don't move the binary elsewhere alone, because Fundot automatically load init.fun under its source directory.

-- Install configuration: ""
-- Installing: path_you_entered/fundot/init.fun
-- Installing: path_you_entered/fundot/lib/libfunstd.funso
-- Installing: path_you_entered/fundot/bin/fundot

Windows

Fundot should be able to run on Windows, because everything we used so far is cross-platform, but we have not tested it yet. If you are interested, feel free to git clone the repository and build from source. As long as you have Boost and CMake, you have everything you need.

Usage

Note: Any following code in this section assumes that the binary has already been added to PATH. If not, please replace fundot command with the path of it.

This project is an evaluator of Fundot programming language, which contains the REPL (Read-Eval-Print Loop) mode and the file execution mode.

For REPL mode, simply enter fundot in the terminal.

fundot

After displaying >>> , you may enjoy Fundot until you call quit.

>>> 1 + 1
2
>>> mike : {name : "Mike", age : 19}
{age : 19, name : "Mike"} 
>>> mike.age
19
>>> square : (lambda [x] x * x)
{type : function, params : [x], body : x * x}
>>> (square 4)
16
>>> mike.age : mike.age + 16
35
>>> (quit)

For file execution mode, enter fundot followed by the name of the source file. Suppose we have a source file named example.fun that contains the following code.

abs : (lambda [x] (if x < 0 (-x) x))

sqrt : (lambda [x] (do
  (let root : x)
  (let precision : 1e-9)
  (while (abs x - root * root) > precision
    (let root : (root + x / root) / 2))
  root))

(println (sqrt 1))
(println (sqrt 2))
(println (sqrt 3))
(println (sqrt 4))
(println (sqrt 5))

Then if we enter fundot example.fun in the terminal, we will get the output shown below.

1
1.41421
1.73205
2
2.23607

Note: So far, Fundot has become much more stable than before, but it is still under fast development. Therefore, huge changes may occur in future commits.

Contributing

Contributions are welcome. Please read our contributing guidelines carefully. Note: Use GitHub Issues only to report bugs. If you have some questions about Fundot, please use GitHub Discussions.

License

MIT License © 2021 Fundot Community

MIT License © 2020 Jiacheng Huang

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].