Project

shuwar

0.0
No commit activity in last 3 years
No release in over 3 years
A new syntax for lisp, designed for writing. Inspired by eido and youki by Belleve
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.6
~> 10
~> 2.14
 Project Readme

Shuwar

Build Status

Just a writing system, but with lisp-like syntax.

Inspired by eido and youki

Usage

An "interactive shell":

$ shuwar

Now try typing some expressions

[print 1]

[set ppp [lambda [x]
    [print x]
    [print x]
]]

[ppp 1]

We have syntax support for writing: you can call functions like this

puts | Each line
puts | is an arg to the tag

puts | Another

Remember to put a blank line after the last line

This should be the same as the following, but shuwar has no support for string literals, so it will not work

[dont type this block]
[puts "Each line" "is an arg to the tag"]
[puts "Another"]

If you load the nokogiri library, you can have some html

[load #nokogiri]

[set main_content
    [div #[
        class | content
        id    | main-content
    ]

h1      | Sample
]

[put_html
    [html [body
        main_content
    ]]
]

It's from sample.swr, you should look at it.

Note the attributes: it's the same as the following

#[ [class
   | content
   ]

   [id
   | main-content
   ]]

However just as sample.swr says:

It's looks like a hack, but it feels great!

We recommend this rather than the spell-out-by-hand method

We have # for quote

[print #[print 1]]

No comment syntax yet