560 W 218th St Apt 3C New York, NY 10034
home resume projects movies ux/ui bagel code writing
projects
penelopeCS
bagel
cpacs
bsp
websites
Spotlight
bagel
resume
movies
ux/ui
projects > bagel >
I created a general-purpose, high-level programming language called bagel.  bagel is a lightweight yet extensible Lisp-like scripting language written in and easily integrated with Java.  It's called bagel because it goes so well with Java.
( home) ( background) ( features) ( examples)
Syntactic Simplicity
bagel's syntax is straight from Lisp.  While other languages use a bewhildering array of characters to define syntax bagel uses just parens and white space. Mixins bagel classes can extend any number of superclasses.  When you define a class you can mix in whichever classes apply. Self Awareness Like Lisp, bagel makes little distinction between data and code.  bagel programs can write other programs, and you can easily extend the language, with your additions being indistinguishable from core bagel. OODB bagel classes have an integrated object-oriented database.  Instances of any class can be persisted by extending the PersistedObject class.  You can also query the universe of runtime objects. Values have types, not variables Like most modern scripting languages, bagel variables aren't typed.  Any value can be tested for it's type though. Powerful Arguments bagel functions and methods support flexible and expressive argument lists.  You can specify that your function takes any number of arguments, that some are optional with default values, and that some should not be evaluated when the funciton is called.  Most powerfully, you can specify keyword arguments that can be supplied in function calls as keyword-value pairs in any order. Method Specializers One of the most unique features of bagel is that it's methods can be specialized on more than just the class of it's arguments.  Methods can even specialize on a string match in bagel. BSP bagel is web-enabled.  With bagel server pages you can create dynamic websites in bagel.  This site is one! Built-ins bagel has over 300 built-in primitives.  To name a few: defun, let, set, loop, if, cond, find, defineClass, defineMethod, not, or, and so on! Destructuring You can create a variable structure that matches your data to assign many values in one statement.  Read bagel implements Lisp's read function and includes a rich and powerful input stream parser. Prefix Notation bagel uses prefix notation from mathematics.  f(x, y) becomes f(x y) because the comma serves no purpose, then suck the function inside the parens to get (f x y). That's bagel's syntax — simple and clean. Loop! bagel fully implements the amazing loop marco from Common Lisp. Java Integration Java methods, objects, and instance variables can be accessed from bagel.  So myString.toLowerCase() in Java becomes (java:toLowerCase myString) in bagel. Multiple Values Your bagel functions can return more than one value if you'd like.