Slide 1

Slide 1 text

Saffire “programming the web since 2013”

Slide 2

Slide 2 text

No content

Slide 3

Slide 3 text

Saffire Goals • Be a (not the) programming language. • Suitable for web (fastCGI) and command line. • Try and fix some of the shortcomings of other languages. • Cool, workable, enjoyable language.

Slide 4

Slide 4 text

History • Primarily based on PHP / Python syntax with some ideas from other languages (java, ruby, javascript). • We’re 10-15 years behind, but 10-15 years of traps and pitfalls we can avoid.

Slide 5

Slide 5 text

Selling points • Everything is an object. • Even “foo”, 2, /reg?ex*/ and 3.14159265. • UTF-8 out of the box. • No functions, just objects and methods. • Method and operator overloading. • Threaded system

Slide 6

Slide 6 text

Hello world use io; io.print(“hello world”);

Slide 7

Slide 7 text

Variables and such use io; $a = 1; $b = “foo”.length(); // 3 $c = “björk”.length(); // 5! $d = “björk”.bytes().length(); // 6! $e = “foo”.reverse().upper(); // “OOF” io.print(“$e equals: ”,$e);

Slide 8

Slide 8 text

Classes use io; class Foo { const PI = 3.1415; protected property $a = 1; public method ctor() { io.printf(“Constructor called!\n”); } public method dtor() { io.printf(“Destructor called!\n”); } public method Bar() { self.$a++; } } $f = Foo(); io.printf(“PI is %0.3f“, Foo.PI); io.print(“First call: “, $f.bar()); io.print(“Second call: “, $f.bar()); $f.destroy(); // $f is no more

Slide 9

Slide 9 text

Saffire for PHP devs • FastCGI and CLI only • “compiled” bytecode (*.sfc files) • UTF-8 - strlen(), strpos() etc. • Objects everywhere • Method and operator overloading • There are no arrays (hashmaps & lists ...) • Multi assignments: $a, $b = 1, 2; • Empty assignments: $a, ,$b = 1, 2, 3;

Slide 10

Slide 10 text

Saffire for PHP devs • By default returns “self” ($this) (fluent interface) • foreach/else while/else breakelse • try / catch / finally • “ducktyping” and interfacing are supported • Out of the box annotation-reader

Slide 11

Slide 11 text

Current status • Initial scanning / parsing done (flex/bison). Might change to lemon & re2c • Language specification on its way. • Still figuring out problems. • Abstract Syntax Trees (AST) can be generated. • Initial object module engine created (heavily based on Python’s) • Initial interpreter on it’s way

Slide 12

Slide 12 text

$./saffire test.sf --dot test.dot

Slide 13

Slide 13 text

What’s next • Finish the language specification. • Implementation specification • Bytecode + optimization phase (peephole) • Create the interpreter. • Create a more stable lex / parse system (pure_parser / lemon) • ??? • Profit

Slide 14

Slide 14 text

(Un)Stable release? • Depends on the help! • 0.01 not until somewhere (late) 2013. • Roadmap hasn’t been created. • First (dutch) meetup: 26 october 2012

Slide 15

Slide 15 text

We need YOU... • C programmers, but many, many others for websites, documentation, language specification, testing/QA, app writers, framework writers, evangelists, logo designers, etc, etc.. • USERBASE! • If you can read this, you can help us!

Slide 16

Slide 16 text

Find us! • IRC: freenode.org #saffire • website: http://saffire-lang.org • github: https://github.com/saffire/saffire • mailinglist: https://groups.google.com/group/ saffire-internals • twitter: @saffire-lang

Slide 17

Slide 17 text

io.print(“Thank you!”);