Giter VIP home page Giter VIP logo

egp's Introduction

eGP

eGP is a mod of the original GP application that allows the full functionality and extended functions such as bigNums, bigMult, 16:9 aspect ratio, and more. eGP stands for Extended GP because of all the black additions.

How GP Works

GP runs on a virtual machine (VM) that includes a parser for the textual version of GP, an intepreter for GP code, a garbage collector to manage memory, and a set of primitives for things like graphics and sound I/O, file system access, support for language structures such as functions and classes, arithmetic operations, etc. (You can get a full list of primitives by typing 'help' to the GP command prompt.)

Most of GP is actually written in GP itself. That code is stored in textual form in a set of .gp files stored in the runtime/lib folder. The textual form of GP maps to blocks, so the GP library code can be viewed (or even edited) as blocks. Eventually, we hope that we'll use the GP blocks editor to edit and extend the GP system itself. But when working with larger amounts of code or making global changes to the entire library, its often more practical to work with the textual form.

When GP is started, it reads all of the .gp files in the runtime/lib folder. It then reads and executes the code in runtime/startup.gp, if that file exists. Finally, it looks for a function named "startup" and runs it if it exists. The startup function is usually defined in runtime/startup.gp.

Using GP Read-Eval-Print Loop (REPL)

GP can also be run in interactive mode by typing:

egp-win -

When started in interactive mode, GP doesn't read runtime/startup.gp or run the "startup" function. Thus, instead of opening GP's graphical editor, you'll see a GP welcome message and command prompt:

Loaded 127 library files from runtime/lib
Welcome to GP!
gp>

You can run commands such as:

exit - quit GP
help - print a list of primitive operations built into eGP
print (3 + 4) - print the result of an expression
inspect (list 1 2 3) - inspect an object
go - restart the user interface

Wiki

The Wiki on this repository will eventually include articles explaining how GP works, how it loads the entire system from "runtime/lib" when it starts, and how to make changes.

User Forum

Ask questions and share what you've created with others on the "GP Mods" section of the GP Forum (http://gpblocks.org/forum). Unfortunately, due to a constant barrage of spammers creating accounts, we had to disable automatic account creation; just drop an email to "gpteam" at gpblocks.org.

Based on GP...

To avoid potential confusion with the original GP, which is used by students and educators around the world, this modification is called eGP.

License

All source code in this repository is under the Mozilla Public License 2.0. You are allowed (and encouraged!) to fork and modify it, but you must share your changes

egp's People

Contributors

callowaysutton avatar jhmaloney avatar msandro avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.