Pebble has been described (by one of us) as an arcane amalgamation of Python and JavaScript. We hope that's not true (but we'll buy ourselves commemorative mugs if it actually is).
Pebble is intended to be an intuitive, English-friendly, high-level language. Our goal was to balance simplicity with expressive power; to make a language that is easy to pick up the basics in, but which offers a surprisingly rich environment for the advanced user.
We actually created our own programming paradigm to run our language and have tailored our syntax to be consistent with it. Code-named the "call-binding paradigm", this paradigm is robust enough to mimic both object-oriented and functional programming paradigms, and the exact feel can be seasoned to taste by the programmer themselves. We find it cool because in it, classes are methods are objects are classes (check out the demo for details)… also types are first-class citizens.
We also re-imagine other features of what a language should be. We take a novel approach to designing a type system for which we're currently in the process of writing a compile-time checker; we rethink what a null construct should look like and we avoid that-scary-cool-doodad (you know, a monad) when we talk about it; and we reshape code into a more human, conversational flow.
But, enough of these high level, broad characterizations. If you're interested, take a look at the interactive demo. We encourage you to read everything because it nicely explains what's really happening.
Internals
Pretty much all code inside Pebble is built in-house. We wrote our own custom grammar-format, tokenizer, lexer, parser, interpreter, bytecode runtime, and demo-izer (not to be mistaken for the demonizer).
So there's an interactive demo that takes you through the quirks and peculiarities of Pebble. You can view it by running the embedded repl, though you may prefer to run it in a separate tab so you can resize the window and enjoy more real estate. Here is a link to the full repl.
@targetfanttthat so the idea for an intuitive, English like language came to me when I was trying to learn C++ lambda expressions while choking back tears. The project started about two months ago and we added a type system and formalized the call binding paradigm for the hackathon. We're a team of 5 but welcome anyone interested!
@ktango I would be interested if I knew C++ lol but sadly I do not. I wrote some C++ to help DynamicSquid setup his programming language but ever since I have not touched the language of C++. But this is surely one unique language!
@ktango I do have one question though! What about C++ makes you want to use C++ to create a programming language? For me, I use C because C offers a nice low-level feeling of things(dynamic memory allocations), and gives you full control and functionality of what goes on in the language. So what does C++ offer that you like when creating a programming language, cause I would like to challenge myself and write my current programming language(in the process of being built) in C++
@targetfanttthat I would assume it's speed that motivated them to use C++. Considering they have to compile syntax into C++ then compile that code, it'd probably be better to use a faster language, and C++ fits that role perfectly.
@targetfanttthat we use C++ because we're lazy... but we use it like C. Really the only C++ specific features we use are vectors, generics and cout. In fact, most of the critical path code is done in a way that is essentially already C code.
@whitemanthedj has actually suggested we change into C entirely, and I agree that eventually that's something we want to do. For the hackaton purposes, and for speed/ease, we decided to start with C++.
@syc1 we're actually using our own bytecode runtime engine and compiling Pebble directly into that! But yes... we do like C++ for its general efficiency
@targetfanttthat as some point we're going to be transitioning to C... and in the mean time, we'd love help with beta testing. Plus, if you have a feature you think would be a nice addition, we might even add it
@targetfanttthat by that we mean that each program in Pebble "compiles" into a special binary format that's run on a virtual stack machine. Each instruction has a 1 byte instruction code and a 1 byte operand. If you're familiar with the JVM bytecode or the Python bytecode, its similar to those.
Pebble
Pebble
Pebble has been described (by one of us) as an arcane amalgamation of Python and JavaScript. We hope that's not true (but we'll buy ourselves commemorative mugs if it actually is).
Pebble is intended to be an intuitive, English-friendly, high-level language. Our goal was to balance simplicity with expressive power; to make a language that is easy to pick up the basics in, but which offers a surprisingly rich environment for the advanced user.
We actually created our own programming paradigm to run our language and have tailored our syntax to be consistent with it. Code-named the "call-binding paradigm", this paradigm is robust enough to mimic both object-oriented and functional programming paradigms, and the exact feel can be seasoned to taste by the programmer themselves. We find it cool because in it, classes are methods are objects are classes (check out the demo for details)… also types are first-class citizens.
We also re-imagine other features of what a language should be. We take a novel approach to designing a type system for which we're currently in the process of writing a compile-time checker; we rethink what a null construct should look like and we avoid that-scary-cool-doodad (you know, a monad) when we talk about it; and we reshape code into a more human, conversational flow.
But, enough of these high level, broad characterizations. If you're interested, take a look at the interactive demo. We encourage you to read everything because it nicely explains what's really happening.
Internals
Pretty much all code inside Pebble is built in-house. We wrote our own custom grammar-format, tokenizer, lexer, parser, interpreter, bytecode runtime, and demo-izer (not to be mistaken for the demonizer).
The code is all open source and can be found here
Demo
So there's an interactive demo that takes you through the quirks and peculiarities of Pebble. You can view it by running the embedded repl, though you may prefer to run it in a separate tab so you can resize the window and enjoy more real estate. Here is a link to the full repl.
Thanks
Pebble has been built by these lovely folks.
@whitemanthedj
@jillianzaff
@timothyjin
@zqianem
and me,
@ktango
We're new, don't know what we're doing, and having a blast.
This is truly incredible!
How long did it take you guys to do this(and how many people worked on it??)
This is truly Truly amazing!
@targetfanttthat so the idea for an intuitive, English like language came to me when I was trying to learn C++ lambda expressions while choking back tears. The project started about two months ago and we added a type system and formalized the call binding paradigm for the hackathon. We're a team of 5 but welcome anyone interested!
@ktango I would be interested if I knew C++ lol but sadly I do not.
I wrote some C++ to help DynamicSquid setup his programming language but ever since I have not touched the language of C++.
But this is surely one unique language!
@ktango I do have one question though!
What about C++ makes you want to use C++ to create a programming language?
For me, I use C because C offers a nice low-level feeling of things(dynamic memory allocations), and gives you full control and functionality of what goes on in the language.
So what does C++ offer that you like when creating a programming language, cause I would like to challenge myself and write my current programming language(in the process of being built) in C++
@targetfanttthat I would assume it's speed that motivated them to use C++. Considering they have to compile syntax into C++ then compile that code, it'd probably be better to use a faster language, and C++ fits that role perfectly.
@targetfanttthat we use C++ because we're lazy... but we use it like C. Really the only C++ specific features we use are vectors, generics and cout. In fact, most of the critical path code is done in a way that is essentially already C code.
@whitemanthedj has actually suggested we change into C entirely, and I agree that eventually that's something we want to do. For the hackaton purposes, and for speed/ease, we decided to start with C++.
@syc1 we're actually using our own bytecode runtime engine and compiling Pebble directly into that! But yes... we do like C++ for its general efficiency
@targetfanttthat as some point we're going to be transitioning to C... and in the mean time, we'd love help with beta testing. Plus, if you have a feature you think would be a nice addition, we might even add it
@ktango if you ever decide to convert it to C then I would like to be a part of the process!
(If you would allow me to)
@ktango And by "using our own bytecode", do you mean you are simply compiling the project into binary so the user can then run
pebble.exe
?@targetfanttthat I'll definitely let you know when we start to convert the project to C. ALL help is appreciated!
@targetfanttthat by that we mean that each program in Pebble "compiles" into a special binary format that's run on a virtual stack machine. Each instruction has a 1 byte instruction code and a 1 byte operand. If you're familiar with the JVM bytecode or the Python bytecode, its similar to those.