Skip to content

Instantly share code, notes, and snippets.

@JoshCheek
Created February 4, 2016 14:50
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JoshCheek/cee1930938310e865146 to your computer and use it in GitHub Desktop.
Save JoshCheek/cee1930938310e865146 to your computer and use it in GitHub Desktop.
Student syntaxes for JSON data structures!
Happy!
======
Personified syntax
nil = #
hash = @ key*value @
string = :delimiters)
boolean = true S, false$ , %% and ^^or
integer = V1 V2 all have Vs in front
array = ¯\_( )_/¯
'Hobo' programming language
===========================
# Okay, so maybe the ** are not the best idea, but the >> is GENIUS. Seriously, f#ck
# the hashrocket. Just kidding.
Numbers: Digits 0-9
Strings: **Hello World** , ​*Yo*​
Boolean: Yay/Nay
Array: TheMan[]
Hash: Poor{​*Person* >> Sandwich}
Nil: Zilch
Poor{ **Ice Cream** >> Poor{
​ *Haagen Dazs*​ >> ​*Chocolate*​,
​ *Cold Stone Creamery*​ >> ​*Rocky Road*​,
}
Poor{ **Pizza** >> Poor{​*Uno's*​ >> ​*Pepperoni*​},
**Ice Cream** >>​Poor{*Haagen Dazs* ​ >> ​*Chocolate*​, ​
*Cold Stone Creamery*​ >> ​*Rocky Road*
}
}
for (i=0, i < 13, i--)
value = TheMan[i]
print ​*There are *​, TheMan, ​ * sandwiches left.\n*​
print ​*There are *​, TheMan[i], ​* sandwiches left\n*​
i -= 1
end
JaviScript
==========
Arrays - /\~ ~/\
Hashes - ^~ ~^
Strings - || || as delimiters
Boolean - ¡ = false ! = true
Integer - new decimal system????
Nil- []
Thus:
^~ Hash ^~
Groceries ^~
vegetables /\~ ||carrots||, ||avocados||, ||cauliflower|| ~/\,
proteins /\~ ||chicken||, ||pork||, ||beef|| ~/\
~^,
~^,
Array /\~1, 2, 3~/\,
True !,
False ¡,
Integer 1234567,
Nil []
~^
Kingdom
=======
Numbers: Digits: 0 through 9
Strings: Scrolls
Boolean: Edict / Heresy
Array: Clan (organized by birth order)
Hash: Tribe (organized by connection)
Nil: Terra Nova (unknown territory)
Symbol: |\:/| (it's a crown)
# !Digits! -> 23456,
!Scroll! -> !hello world!,
!Edict! -> Edict,
!Heresy! -> Heresy,
!Clan! -> &1, 2, 3&,
!Tribe! -> #!Josh! -> !Cheek!, !Rod! -> !Levy!#,
!Terra Nova! -> Terra Nova
#
Space
=====
Text: Planet
Numbers: Moles
True/False: Matter/Anti Matter
Collections by name: Galaxy
Collections by order: Star System
Nothing: Vacuum
@ `Planet` # `this is text`
`Moles` # 123
`Matter` # $
`Anti Matter` # %
`Galaxy` # @`a`#1@
`Star System` # !1 2!
`Vacuum` # _
@
??
==
String: (Coding is great!) # surround with ()
Number: '09183475' # surrounddd with ''
Boolean: 1 = True, -1 = False # positive for True, negative for False
nil: absent # absent is the key word
Array: | (bike) <> (scooter) <> (car) <> (truck) <> (moped) <> (segway) |
# ordered array surrounded by ||, delimited by <>
Hash: \ (name) :: (Matthew)&
(age) :: '29'&
(weight) :: '175'&
(eye color) :: (blue)&
(jet pack) :: absent&
(male) :: 1
\ # key, value pair separated by '&' and surrounded by \\
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment