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.
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
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.
Pebble has been built by these lovely folks.
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 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 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++.
@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.
I love this! The fact that
the exists as a one-word comment is brilliant, and I really like the it and that keywords. Truly excellent work y'all have done :D
@syc1 Here's a link to where you can download a prebuild binary. Please note that we're low budget (rip) and haven't digitally signed it yet so you'll probably gets some Windows defender messages. You can ignore these.
Again, I highly recommend building the project yourself... it'll avoid these warnings altogether :)
Something else that we were working on but didn't quite have to fully test were advanced "compiler" error messages, that alerted the user specifically what syntax error they had (and will eventually suggest ways on fixing it).
@redsox2 this is the binary file which results from compiling the entire Pebble codebase. It's essentially the machine code that runs the entire language. It's also OS dependent so I don't recommend copying it and running it on Windows as it's built for Linux and won't work. Here's a link to where you can download a prebuilt Windows binary to play around with. It hasn't been digitally signed with a cert so you can expect to see Windows throw a fit if you try and run it.
I highly recommend building it yourself, but the binary will work as well. Enjoy :)
P.S. Thanks for all the kind feedback
@ktango Can you at least describe in more detail how to build it myself then? The VSCode thing didn’t make much sense. As I said, I am not a inclined at navigating the windows system. Can you please help? Besides the windows file says 32. Does that mean 32bit? Mine is 64, so it might not work.
@redsox2 thanks for the all the support! It really means a lot to all of use that our language is actually useful to REAL people. We're currently working on ways to make getting access to Pebble easier (because we want everyone to try it!). In the mean time, you could always fork the repo to get access to Pebble through replit.
@redsox2 so in the root directory of the repl you should find a file called
.replit. Open it up--its like two lines. The second line will read
run = "rm ./pebble; make; ./pebble --demo".
Change this to
run = "rm ./pebble; make; ./pebble" and you can skip right to running theprogram.pebl` file.
@ktango I figured out how to use the prebuilt binary, I was being rather stupid before. I have been doing some C++ stuff and and learnt a bit, so now I can use the prebuilt one. However, I kind of want to prove to myself that I can build it. In VSCode, you have to have a C++ file open to build, you can't run a command to build it (at least I am pretty sure you can't). Do you know which file I should have open?