Git Product home page Git Product logo

qb64_gj_lib's Introduction

QB64_GJ_LIB

GRYMMJACK'S QB64 LIBRARY

REQUIRES QB64-PE V3.12+

WHAT IS THIS?

This is a library of QB64 code which I've created to fill in some "holes" that I feel QB64 has by default. Some of these "holes" stem from my laziness and growing complacency toward other languages that I've used including: PHP, Python, etc.

The code in this repo will evolve and grow over time. However, I feel that the library and approach, while not complete to my full vision, is at least usable in it's current state.

LIBRARY PURPOSE NOTES
ANSI ANSI text mode Full ANSI.SYS support plus 256 and RGB color modes as well as a QB64 native ansi emulation mode.
ARR ARRay Library A high level library for working with arrays of all types in QB64
DICT Dictionary object (sorta) Custom type and support for arrays using .key and .val
DUMP Debugging library Like PHPs print_r (kind of)
INPUT Input library For lightbar menus, text boxes, etc.
STRINGS Strings library for lazy programmers Includes a lot of batteries and helpers for arrays, finding, parsing, etc.
PIPEPRINT ANSI string DSL Pipe (|) Print emulates Mystic BBS pipe parsing
SYS System stuff Contains misc. helpful utils/tools
VECT2D 2D Vector support Thanks to William Barnes and Evan Shortiss
ASEPRITE Adds ASEPRITE support to QB64 See https://www.aseprite.org
CONSOLE CONSOLE object with debugging.
MISC Miscellaneous helpful functions and subs that don't fit anywhere else :)

ORGANIZATION / GUIDELINES (may change)

  • Unified include for the lazy to use everything
    • e.g. '$INCLUDE:'QB64_GJ_LIB/_GJ_LIB.[BI|BM]' ...
  • Directory scaffolding that makes sense.
    • Each library in its own directory.
    • Tests and examples included for each library in same dir using .BAS extension to complement .BI|BM
      • Tests can be tested in unified mode or in isolated mode by setting
        $LET GJ_LIB_UNIFIED_TESTING = 1 within _GJ_LIB.BI
  • Use of individual parts should work OK without including _GJ_LIB.[BI|BM]
    • Each library should be as atomic as possible.
    • Where needed, $IF pre-compiler guards should provide safe isolation as well as unified inclusion.
  • Coding conventions
    • UPPERCASE KEYWORDS and CONST
    • Comments like PHPDoc (it's working OK)
      • File comment blocks
      • SUB / FUNCTION comment blocks
    • Whitespace
      • 3 new lines after file comment blocks and global code except for metacommands
      • 2 new lines between each SUB or FUNCTION
      • 1 blank line at the end of every file
    • words_and_underscores for library subs and functions
    • Use symbols (!#$%&) only when required and prefer over AS type
  • Not guaranteed to be compatible with QB1.1 / QuickBasic 4.x / PDS / etc.
  • Be compassionate
    • Best effort to not clobber anything
      • Use GJ_LIB_* names for things, where it makes sense.

INSTALLATION

Just clone the repo and refer to where you cloned it in the path_to_GJ_LIB stuff below.

USAGE

FULL GJ_LIB LIBRARY

Because I'm lazy you can use all the libs by just including them like so:

'At the top of your code:
'$INCLUDE:'path_to_GJ_LIB/_GJ_LIB.BI'

'...your code here...

' At the bottom of your code:
'$INCLUDE:'path_to_GJ_LIB/_GJ_LIB.BM'

PARTIAL USAGE

If you want to, you can include individual parts and not use the whole lib, in that case you'd include whatever you want like for example ANSI and DUMP:

'At the top:
'$INCLUDE:'path_to_GJ_LIB/ANSI/ANSI.BI'
'$INCLUDE:'path_to_GJ_LIB/DUMP/DUMP.BI'

'...your code here...

'At the bottom:
'$INCLUDE:'path_to_GJ_LIB/ANSI/ANSI.BM'
'$INCLUDE:'path_to_GJ_LIB/DUMP/DUMP.BM'

PLEASE NOTE

While I have been cautious and compassionate not to include things or name things that will clobber existing things, I'm only one nerd and so if you run into any collisions or errors in your use of the library, please feel free to report them as issues in the issue tracker.

CONTRIBUTING

I work well with others. Feel free to participate in the usual GitHub ways.

NO WARRANTY

I made this for myself, but if you want to use it just know that I may change things. I'll try to keep backwards compatibility though.

WHAT IS NEXT? (no promises or deadlines!)

  • TEXT_GUI library (menus (lightbar/mouse), dialogs?, forms?)
  • More STRINGS stuff (sorting, reversing, TitleCase, printf, pipeprint, etc.)
  • More ANSI stuff (file loading / displaying / ANSI music?)
  • Color stuff (palette cycling / dump_rgb)
  • PETSCII library

qb64_gj_lib's People

Contributors

grymmjack avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

qb64_gj_lib's Issues

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.