Giter VIP home page Giter VIP logo

ldpl-std's Introduction


This repository contains the LDPL Standard Library, a collection of LDPL libraries that contain many useful pre-written statements for the LDPL Programming Language that are not included in the base language.

The library is organized in a series of .ldpl files lovingly called briefcases (this is a very serious language, you know, we have ties) each containing new statements designed to extend the functionality of LDPL in many areas. In simpler terms, designed to make your life as an LDPL programmer easier. For example the brc_lists.ldpl briefcase includes many statements designed for working with LIST values, like FLIP LIST and SORT LIST - ASCENDING.

New statements and entire briefcases are very welcome contributions, corrections and feedback are most certainly welcome as well.

๐Ÿ•ต๏ธ How to use the LDPL Standard Library

Most of the time you won't need the entire Standard Library for a single project, so you can just get the briefcases you are going to use. You can do this by hand or using LPM (the LDPL Package Manager).

๐Ÿ“ฆ Installing a briefcase using LPM

Open a terminal and write lpm install <briefcase-name> to install the desired briefcase. Available briefcases are std-list (list statements), std-math (math statements), std-text (text statements), std-os (operating system functions) and std-random (random number generation and statements).

For example: lpm install std-random.

To include the downloaded briefcase in your project add the line USING PACKAGE <briefcase-name> before the DATA: and PROCEDURE: sections.

For example: USING PACKAGE std-random.

โœ‹๐Ÿป Installing a briefcase by hand

Just download the briefcase you want and include it in your LDPL source file. For example, if you want to include the file std-lists.ldpl you should add the line

INCLUDE "/route/to/std-lists.ldpl"

before the DATA: and PROCEDURE: sections.

๐Ÿ“š Statements included in each briefcase

Every statement is documented in more detail within its own briefcase file.

  • std-list.ldpl (LIST statements):

    • DISPLAY LIST $
    • SORT LIST $ ASCENDING
    • SORT LIST $ DESCENDING
    • APPEND LIST $ TO LIST $
    • SPLICE ELEMENT $ OF LIST $
    • FLIP LIST $
  • std-math.ldpl (mathematical statements):

    • FIND SQUARE ROOT OF $ IN $
    • PI constant
  • std-random.ldpl (random statements):

    • GET RANDOM BETWEEN $ AND $ IN $
    • GET RANDOM INTEGER BETWEEN $ AND $ IN $
    • GET RANDOM ELEMENT FROM LIST $ IN $
    • SHUFFLE LIST $
  • std-os.ldpl (operating system statements):

    • LIST CONTENTS OF DIRECTORY $ IN $
    • GET CURRENT DAY IN $
    • GET CURRENT MONTH IN $
    • GET CURRENT YEAR IN $
    • GET CURRENT TIME IN $ $ $
  • std-text.ldpl (text statements):

    • SHIFT $ TO LOWER CASE IN $
    • SHIFT $ TO UPPER CASE IN $
    • SHIFT $ TO PROPER IN $

๐Ÿ“œ License

The LDPL Standard Library is distributed under the MIT License. LDPL is distributed under the GNU General Public License 3.0. All LDPL Dinosaur logos where created by Lartu and are released under a Creative Commons Attribution 4.0 International (CC BY 4.0) license.

ldpl-std's People

Contributors

dgarrodc avatar lartu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

ldpl-std's Issues

Check OS

@fireasembler please, if you have time, add your sub-procedure to check what OS the user is using to the STD (as mentioned in Lartu/ldpl#126, that I'll be closing as this corresponds here).

Thank you! ๐Ÿ˜„

math pi statement

the store pi in <var> statement is kind of useless in my opinion.
why not just have a const called math.pi or std.math.pi that holds the value of pi?
what value is gained from turning this into a sentence? in my opinion this sets a very bad precedent that everything needs to have a sentence, which is absolutely not true.

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.