Git Product home page Git Product logo

sic's Introduction

Sic: Yet Another Mediocre Lisp Dialect in C++

The other day, I had an interesting realization about modern C++. One thing led to another and here I am with another Lisp dialect. Sorry about that.

Why?

It seemed like a good idea at the time.

What's it good for?

¯\_(ツ)_/¯

Also,

1. It's simple.

Most Lispish languages care about fripperies like efficiency and so will internally convert Lisp(ish) expressions to more efficient forms.

Not Sic. Here, it's still a list. If you prod at one with lldb, you can chase the pointers. (Don't though; call function po on it instead.) It stays Lispy all the way down.

2. It integrates nicely with C++

Everything in Sic is a plain old C++ type, so you can easily move between it and native code. In fact, this:

$(print, "2 + 2 =", $(add, 2, 2), "\n")

is a valid C++ expression that does what you'd expect (if you've imported the sic namespace). So it's easy to integrate it into a C++ program.

3. No external files needed

Unlike most Lispish language, there is no external library; all functions are written in C++.

4. You can horrify Lisp purists with it.

$(print, "C++ is an acceptable Lisp!\n")

What's wrong with it?

  1. There's a lot of powerful Lisp(ish) functionality that isn't written yet.
  2. There's no garbage collection. It just leaks memory.

Compiling

On a sufficiently Unix-like operating system with Clang installed, just

cd src
make

If you want to use gcc instead, edit the Makefile first.

Note that this needs a recent compiler, one that supports C++17.

This will produce both an executable interpreter (sic) and a library (libsic.a).

Documentation

The reference manual is generated during building but there's a courtesy copy here.

I also did a blog post about it here.

License

This is Free/Open-source software released under the terms of the wxWidgets license (i.e. the GNU LGPL but with less restrictions on binary distribution.)

See Copyright.txt for details.

sic's People

Contributors

suetanvil avatar

Watchers

 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.