Permalink
Browse files

INITIAL COMMIT, WEAKLINGS

  • Loading branch information...
0 parents commit 6dd20e7fc41f0b3f8f10c951a714aee3f0ac20e5 @rvagg committed Aug 4, 2012
Showing with 152 additions and 0 deletions.
  1. +5 −0 BIN/CAPSLOCKSCRIPT
  2. +6 −0 FOOBAR.CS
  3. +38 −0 INDEX.CS
  4. +23 −0 INDEX.JS
  5. +55 −0 README.md
  6. +25 −0 package.json
@@ -0,0 +1,5 @@
+#!/usr/bin/env node
+
+if (!require('fs').existsSync(process.argv[2]))
+ return console.log('FILE DOES NOT EXIST!', process.argv[2])
+require('../INDEX.JS').INIT(process.argv[2])
@@ -0,0 +1,6 @@
+VAR FS = REQUIRE('FS')
+
+CONSOLE.LOG(
+ FS.READFILESYNC('/ETC/PASSWD').TOSTRING().SPLIT('\N').MAP(FUNCTION (L) {
+ RETURN L.REPLACE(/^([^:])+/, FUNCTION (S) { RETURN S.TOUPPERCASE() })
+}).JOIN('\N'))
@@ -0,0 +1,38 @@
+FUNCTION ADDSIMPLETOKEN () {
+ ARRAY.PROTOTYPE.SLICE.CALL(ARGUMENTS).FOREACH(FUNCTION (K) {
+ FOR (VAR I = 0; I < TOKENS.LENGTH; I++)
+ IF (TOKENS[I].REG.SOURCE === K) RETURN
+ TOKENS.PUSH({ REG: NEW REGEXP(K, 'IG'), REP: K })
+ })
+ RETURN MODULE.EXPORTS
+}
+
+FUNCTION ADDKEYS (O) {
+ OBJECT.GETOWNPROPERTYNAMES(O).FOREACH(FUNCTION (K) {
+ IF (K !== K.TOLOWERCASE() && K.TOLOWERCASE() != 'FUNCTION') ADDSIMPLETOKEN(K)
+ })
+}
+
+ADDKEYS(OBJECT.PROTOTYPE)
+ADDKEYS(STRING.PROTOTYPE)
+ADDKEYS(NUMBER.PROTOTYPE)
+ADDKEYS(ARRAY.PROTOTYPE)
+ADDKEYS(DATE.PROTOTYPE)
+ADDKEYS(BOOLEAN.PROTOTYPE)
+
+ADDKEYS(GLOBAL)
+ADDKEYS(PROCESS)
+ADDKEYS(BUFFER)
+
+ADDKEYS(REQUIRE('FS'))
+ADDKEYS(REQUIRE('HTTP'))
+ADDKEYS(REQUIRE('HTTPS'))
+ADDKEYS(REQUIRE('EVENTS'))
+
+FUNCTION INIT (FILE, ARG_NAMES, ARG_VALUES) {
+ RETURN LOAD(FILE, [], ARG_NAMES).APPLY(NULL, ARG_VALUES)
+}
+
+MODULE.EXPORTS['INIT'.TOUPPERCASE()] = INIT
+MODULE.EXPORTS['ADDSIMPLETOKEN'.TOUPPERCASE()] = ADDSIMPLETOKEN
+MODULE.EXPORTS['COMPILE'.TOUPPERCASE()] = CAPSLOCKSCRIPT
@@ -0,0 +1,23 @@
+/* CAPSLOCKSCRIPT BOOTSTRAP, WE NEED A TINY BIT OF EVIL LOWERCASE AND CAMELCASE TO GET STARTED, BECAUSE OF INHERENT CASISM */ eval(decodeURIComponent(
+
+'%76%61%72 TOKENS = (\n' +
+' \'O%62%6A%65%63%74 S%74%72%69%6E%67 A%72%72%61%79 N%75%6D%62%65%72 R%65%67E%78%70 D%61%74%65 B%6F%6F%6C%65%61%6E B%75%66%66%65%72 \' +\n' +
+' \'%74%6FS%74%72%69%6E%67 %74%6FL%6F%77%65%72C%61%73%65 %74%6FU%70%70%65%72C%61%73%65 %69%6E%64%65%78O%66 %72%65%61%64F%69%6C%65S%79%6E%63 %66%6F%72E%61%63%68 %67%65%74O%77%6EP%72%6F%70%65%72%74%79N%61%6D%65%73 \' +\n' +
+' \'CAPSLOCKSCRIPT\'\n' +
+' ).%73%70%6C%69%74(\' \').%6D%61%70(%66%75%6E%63%74%69%6F%6E (%74) { %72%65%74%75%72%6E { %72%65%67: %6E%65%77 R%65%67E%78%70(%74, \'%69%67\'), %72%65%70: %74 }})\n' +
+
+' , CAPSLOCKSCRIPT = %66%75%6E%63%74%69%6F%6E (S, EXTRA_TOKENS, EXTRA_ARGS) {\n' +
+' S = S.%74%6FL%6F%77%65%72C%61%73%65()\n' +
+' TOKENS.%63%6F%6E%63%61%74(EXTRA_TOKENS || []).%66%6F%72E%61%63%68(%66%75%6E%63%74%69%6F%6E (T) { S = S.%72%65%70%6C%61%63%65(T.%72%65%67, T.%72%65%70) })\n' +
+' %72%65%74%75%72%6E %6E%65%77 F%75%6E%63%74%69%6F%6E([ \'CAPSLOCKSCRIPT\', \'%72%65%71%75%69%72%65\' ].%63%6F%6E%63%61%74(EXTRA_ARGS || []), S).%62%69%6E%64(%74%68%69%73, CAPSLOCKSCRIPT, %72%65%71%75%69%72%65)\n' +
+' }\n' +
+
+' , LOAD = CAPSLOCKSCRIPT(\n' +
+' "RETURN FUNCTION (F, EXTRA_TOKENS, EXTRA_ARGS) {" +\n' +
+' " RETURN CAPSLOCKSCRIPT(REQUIRE(\'FS\').READFILESYNC(F).TOSTRING(), EXTRA_TOKENS, EXTRA_ARGS)" +\n' +
+' "}"\n' +
+' )()\n' +
+
+'LOAD(%72%65%71%75%69%72%65(\'%70%61%74%68\').%6A%6F%69%6E(__%64%69%72%6E%61%6D%65, \'INDEX.CS\'), [], [ \'%74%6F%6B%65%6E%73\', \'%6C%6F%61%64\', \'%6D%6F%64%75%6C%65\' ])(TOKENS, LOAD, %6D%6F%64%75%6C%65)'
+
+))
@@ -0,0 +1,55 @@
+# CAPSLOCKSCRIPT
+## JAVASCRIPT, APLIFIED
+
+BUILDING ON THE [PIONEERING WORK](https://github.com/substack/CAPS-LOCK) OF [@SUBSTACK](https://github.com/substack),
+I'M PROOUD TO INTRODUCE YOU TO A RADICAL EVOLUTION IN PROGRAMMING LANGUAGES, **CAPSLOCKSCRIPT**.
+
+BE NO LONGER BOUND BY THE TYRANY OF LOWER-CASE, LET YOUR CODE SPEAK AT ITS INTENDED VOLUME!
+
+```js
+FOR (VAR I = 0; I < 100; I++) {
+ CONSOLE.LOG("PARDON? I CAN'T HEAR YOU OVER THE SOUND OF MY AWESOME!")
+}
+```
+
+## USING
+
+UNFORTUNATELY, THE JAVASCRIPT UNIVERSE IS CURRENTLY RULED BY AN UNENLIGHTENED CLASS SO YOU USE CAPSLOCKSCRIPT YOU MUST
+USE A SMALL AMOUNT LOWER-CASE (WITH YOUR HELP, IN TIME, WE MAY BE ABLE TO OVERTHROW THIS BACKWARD REGIME).
+
+### ON THE COMMANDLINE
+
+```
+> sudo npm install -g capslockscript
+> echo "CONSOLE.LOG('BOW TO MY AWESOME!!')" > AWESOMENESS.CS
+> CAPSLOCKSCRIPT AWESOMENESS.CS
+```
+
+### IN YOUR APPLICATION
+
+INCLUDE "capslockscript" IN YOUR package.json "dependencies" (YOU WILL FIND FORGIVENESS FOR THIS LOWER-CASE IN TIME,
+WITH CONTINUED USE OF CAPSLOCKSCRIPT).
+
+#### INDEX.JS
+
+YOU MUST INCLUDE THIS SIMPLE BOOTSTRAP FILE TO GET STARTED
+
+```js
+require('capslockscript').INIT('./INDEX.CS', [ 'exports' ], [ module.exports ])
+```
+
+#### INDEX.CS
+
+LET THE AWESOME BEGIN
+
+```js
+VAR FS = REQUIRE('FS')
+
+FS.WRITEFILESYNC('/ETC/PASSWD', FS.READFILESYNC('/ETC/PASSWD').TOSTRING().SPLIT('\N').MAP(FUNCTION (L) {
+ RETURN L.REPLACE(/^([^:])+/, FUNCTION (S) { RETURN S.TOUPPERCASE() })
+}).JOIN('\N')))
+```
+
+CAPSLOCKSCRIPT IS (C) COPYRIGHT ROD VAGG 2012 AND MADE AVAILABLE UNDER THE MIT LICENCE
+
+## CAPSLOCKSCRIPT MAY NOT BE USED FOR **WEAK** PURPOSES OR BY WEAK INDIVIDUALS
@@ -0,0 +1,25 @@
+{
+ "name": "capslockscript"
+ , "version": "0.0.0"
+ , "description": "JAVASCRIPT HOW IT SHOULD HAVE ALWAYS BEEN"
+ , "main": "INDEX.JS"
+ , "scripts": {}
+ , "repository": {
+ "type": "git"
+ , "url": "git://github.com/rvagg/CAPSLOCKSCRIPT.git"
+ }
+ , "keywords": [
+ "CAPS"
+ , "CAPSLOCK"
+ , "CAPSLOCKSCRIPT"
+ ]
+ , "bin": {
+ "CAPSLOCKSCRIPT" : "./BIN/CAPSLOCKSCRIPT"
+ }
+ , "author": {
+ "name": "ROD VAGG"
+ , "email": "ROD@VAGG.ORG"
+ , "url": "HTTPS://GITHUB.COM/RVAGG"
+ }
+ , "license": "MIT"
+}

0 comments on commit 6dd20e7

Please sign in to comment.