Ski

From Nick Faro's Homepage
Jump to: navigation, search

Ski is a fullstack programming language for web apps I'm working on, inspired heavily by Prolog and Elixir, with a few cool things yanked from Clojure and Python.

Prolog's idiosyncratic syntax is actually a really cool thing-- the language is homoiconic, new infix operators can be defined by the user, and it supports pretty seamless macroexpansion; however all these nice features come at a cost. It's impossible to nest expressions without explicitly calling call, there's no convenient syntax for a series of operations besides creating a ton of unnecessary variables like in Erlang, and there's no way to differentiate between a compound term (like a list) and something that should be callable like a predicate. Prolog's built in callable/1 is useless.

So Ski is my reinvention of Prolog that basically gets rid of functors and compound terms, and evaluates recursively like almost every other language. Sounds crazy, but the regular user never needs to do a bunch of code manipulation; Python gets along fine without it, and it's a great language.

Implementation goals

  1. A compiler from Ski to SWI-Prolog.
  2. A compiler from Ski to Tau Prolog. Shouldn't really be that much different.
  3. The official website, implemented in Ski. Currently http://lang.ski redirects here.
  4. Package manager. I'm eager to see how a logic language can tackle the goal of dependency management.
  5. Pine, a frontend framework similar to Elm.
  6. Slopes, a backend framework similar to Rails.

Thoughts

  • There needs to be a seamless interface between the Ski fact database, and a production quality standalone database. I really want to see some way to query a database as if it's all in memory. Maybe impossible.
  • I want the language to be a full-stack language suitable for writing webapps, as productive as Firebase. This basically means you should be able to spin up a project and start throwing data in your database without creating a ton of schemas and migrations. This might be counterproductive because I actually sort of hate NoSQL databases once you need to start refactoring them.
  • I want to reify fact databases such that you can have multiple of them in memory and select which one to use/query. Prolog sort of offers this with modules, but last time I used them they didn't really work exactly as I expected.

Github link will come soon.