Giter Club home page Giter Club logo

format's Introduction

Common Lisp function FORMAT

Rewrited FORMAT function from repo https://github.com/public-domain/cmucl

Not included in the standard JSCL distribution

Only for Windows/Electron platform. How to use JSCL on the Electron, see https://github.com/vlad-km/how-to/blob/main/jscl-electron.txt


Status

Pretty Print - Development

FORMAT - first release, version 1.0

  • FORMATTER function* is also included in the release

FORMAT directives, included in the release:

  • ~A ~S ~C
  • ~W
  • ~D ~B ~O ~X ~R ~F
  • ~P
  • ~% ~& ~~ ~#\newline
  • ~* ~?
  • ~{ ~; ~^ ~[
  • ~/

See some implementation limitations in the report:

  • file `./rep.txt'

Compilation

development

  (load "./repo/format/src/format.lisp")
  ;; or
  (require "./format.js")
  (load "./repo/format/src/pp/format-pp.lisp")
  (load "./repo/format/src/pp/pp.lisp")

production

   (require "./format.js")
   (jscl::fset 'format (fdefinition '%das!format))
   ;; after the command, `DAS!FORMAT' function is called as `FORMAT'
   ;;`JSCL FORMAT' now is available for use as `JSCL::!FORMAT'
   ;; (format t "~5&Hello~5%")      - ANSII FORMAT
   ;; (jscl::!format t "~&Hello~&") - JSCL FORMAT
   (setq *f1 (formatter "~5&Hello ~a~%"))
   (format t *f1 :|any name|)

License

Public domain


@vlad-km

format's People

Contributors

vlad-km avatar

Watchers

 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.