├── likepython
├── branches
│ └── 0.1
│ │ ├── likepython_0.1.tgz
│ │ ├── likepython_0.1.zip
│ │ ├── hello_world.lp
│ │ ├── test.lp
│ │ ├── likepython
│ │ └── index.html
├── trunk
│ ├── hello_world.lp
│ ├── README
│ ├── test.lp
│ ├── likepython
│ └── index.html
└── README
├── likesqueak
├── branches
│ └── README
├── trunk
│ └── README
└── README
└── README
/likepython/branches/0.1/likepython_0.1.tgz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/staringispolite/likeprogramming/HEAD/likepython/branches/0.1/likepython_0.1.tgz
--------------------------------------------------------------------------------
/likepython/branches/0.1/likepython_0.1.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/staringispolite/likeprogramming/HEAD/likepython/branches/0.1/likepython_0.1.zip
--------------------------------------------------------------------------------
/likepython/trunk/hello_world.lp:
--------------------------------------------------------------------------------
1 | # File: input.py
2 |
3 | hey omg so import sys right
4 |
5 | totally print uh something like "hello world!"
6 |
7 |
--------------------------------------------------------------------------------
/likepython/branches/0.1/hello_world.lp:
--------------------------------------------------------------------------------
1 | # File: input.py
2 |
3 | hey omg so import sys right
4 |
5 | totally print uh something like "hello world!"
6 |
7 |
--------------------------------------------------------------------------------
/likepython/trunk/README:
--------------------------------------------------------------------------------
1 | The trunk/ directory will be for development and more rapid feature enhancements.
2 | branches/ holds historical releases for reference with bugs, downloads, etc.
3 |
--------------------------------------------------------------------------------
/likesqueak/branches/README:
--------------------------------------------------------------------------------
1 | The trunk/ directory will be for development and more rapid feature enhancements.
2 | branches/ holds historical releases for reference with bugs, downloads, etc.
3 |
--------------------------------------------------------------------------------
/likesqueak/trunk/README:
--------------------------------------------------------------------------------
1 | The trunk/ directory will be for development and more rapid feature enhancements.
2 | branches/ holds historical releases for reference with bugs, downloads, etc.
3 |
--------------------------------------------------------------------------------
/likesqueak/README:
--------------------------------------------------------------------------------
1 | Like, Squeak
2 | ============
3 |
4 | Like, Squeak was created by Andreas Raab after seeing Like, Python on Reddit.
5 | When he finds time to add the code to github, it'll go here. And he'll probably
6 | change this description :)
7 |
8 | http://lists.squeakfoundation.org/pipermail/squeak-dev/2010-February/144992.html
9 |
10 |
--------------------------------------------------------------------------------
/likepython/trunk/test.lp:
--------------------------------------------------------------------------------
1 | #!usr/bin/python
2 | from sys import exit
3 |
4 | # Grab the user's name.
5 | ok so like name = raw_input("yo! what's your name? " ) right
6 |
7 | # Make sure they entered something and say hi.
8 | if name.strip() is actually like "":
9 | toootally just exit()
10 | else:
11 | um yeah
12 | print like "Hi %s, nice to meet you." % name
13 |
--------------------------------------------------------------------------------
/likepython/branches/0.1/test.lp:
--------------------------------------------------------------------------------
1 | #!usr/bin/python
2 | from sys import exit
3 |
4 | # Grab the user's name.
5 | ok so like name = raw_input("yo! what's your name? " ) right
6 |
7 | # Make sure they entered something and say hi.
8 | if name.strip() is actually like "":
9 | toootally just exit()
10 | else:
11 | um yeah
12 | print like "Hi %s, nice to meet you." % name
13 |
--------------------------------------------------------------------------------
/likepython/trunk/likepython:
--------------------------------------------------------------------------------
1 | #!/usr/bin/python
2 | # Author: Jonathan Howard
3 | # Description: OMG! It's like python, but like, totally casual!
4 |
5 | import os
6 | from subprocess import *
7 | import sys
8 | import tokenize
9 |
10 | like_python_tokens = ['omg','so','like','totally','right','toootally',
11 | 'friggin','fuckin','dude','man','bro','broheim','broseph',
12 | 'lol','rofl','teh','ohai','plz',
13 | 'yo','homey','homeboy','sup','dog','girl','ma','biatch',
14 | 'ho','shit','shiiit',
15 | 'wicked','hella','anyways',
16 | 'just','hey','yeah','ok','um','uh','ah','actually',
17 | 'something',
18 | ]
19 |
20 | def handle_input():
21 | if len(sys.argv) == 2:
22 | return sys.argv[1]
23 | else:
24 | print "Usage: likepython path/to/file.lp"
25 | exit()
26 |
27 | def main():
28 | # Parse input file for tokens
29 | input_file = handle_input()
30 | file = open(input_file)
31 | tokens = tokenize.generate_tokens(file.readline)
32 |
33 | # Remove likepython tokens, leaving valid python temp file behind.
34 | py_tokens = [(type,token) for (type,token, _, _, _) in tokens if token not in like_python_tokens]
35 | py = tokenize.untokenize(py_tokens)
36 | output_filename = input_file + ".py"
37 | output_file = open(output_filename, 'w')
38 | output_file.write(py)
39 | output_file.close()
40 |
41 | # Run through python and return stdout
42 | call(["python", output_filename])
43 |
44 | # Remove temp file
45 | os.remove(output_filename)
46 |
47 | if __name__ == "__main__":
48 | main()
49 |
--------------------------------------------------------------------------------
/likepython/branches/0.1/likepython:
--------------------------------------------------------------------------------
1 | #!/usr/bin/python
2 | # Author: Jonathan Howard
3 | # Description: OMG! It's like python, but like, totally casual!
4 |
5 | import os
6 | from subprocess import *
7 | import sys
8 | import tokenize
9 |
10 | like_python_tokens = ['omg','so','like','totally','right','toootally',
11 | 'friggin','fuckin','dude','man','bro','broheim','broseph',
12 | 'lol','rofl','teh','ohai','plz',
13 | 'yo','homey','homeboy','sup','dog','girl','ma','biatch',
14 | 'ho','shit','shiiit',
15 | 'wicked','hella','anyways',
16 | 'just','hey','yeah','ok','um','uh','ah','actually',
17 | 'something',
18 | ]
19 |
20 | def handle_input():
21 | if len(sys.argv) == 2:
22 | return sys.argv[1]
23 | else:
24 | print "Usage: likepython path/to/file.lp"
25 | exit()
26 |
27 | def main():
28 | # Parse input file for tokens
29 | input_file = handle_input()
30 | file = open(input_file)
31 | tokens = tokenize.generate_tokens(file.readline)
32 |
33 | # Remove likepython tokens, leaving valid python temp file behind.
34 | py_tokens = [(type,token) for (type,token, _, _, _) in tokens if token not in like_python_tokens]
35 | py = tokenize.untokenize(py_tokens)
36 | output_filename = input_file + ".py"
37 | output_file = open(output_filename, 'w')
38 | output_file.write(py)
39 | output_file.close()
40 |
41 | # Run through python and return stdout
42 | call(["python", output_filename])
43 |
44 | # Remove temp file
45 | os.remove(output_filename)
46 |
47 | if __name__ == "__main__":
48 | main()
49 |
--------------------------------------------------------------------------------
/README:
--------------------------------------------------------------------------------
1 | Like, Programming
2 | =================
3 | Tired of people telling you what you can and can't say to YOUR computer?
4 | It's about time programming languages understood what the kids are typing these days.
5 | So let's start with a baby step in that direction.
6 |
7 | Like, Programming is a place for impractical (read: awesome) extensions to popular
8 | languages that let us do to programming languages what we've been doing to spoken
9 | languages for millenia: corrupting them :)
10 |
11 | Note: These are not entirely new syntaxes, like LOLcode, VALSPEAK, and the like.
12 | When you speak English with "verbal diarrhea" mixed in (like, um, uh, anyway...),
13 | the person listening has to parse these words out to get to the language lying
14 | underneath. This is essentially what we're doing here, and it tends to be pretty funny
15 |
16 | BUT - it has the added benefit of not requiring ANY learning curve to write. You just
17 | code the language like you normally would, and add in whatever come naturally :)
18 |
19 |
20 | Like, Languages
21 | ===============
22 | *** I hope to have many Like, Languages, and welcome contributors! ***
23 |
24 | Like, Python (/likepython)
25 | ---------------------------
26 | Like, Python was created by Jonathan Howard in February 2010 while drinking and reviewing code for an upcoming project with a coworker. At a certain point, higher-level explanations devolved into just flat-out reading Python code like they were actually speaking the language normally - complete with like's, um's, whatever's, etc - making it completely impractical awesome for work. It was then that Jonathan realized he should perhaps stop for the night. And START creating Like, Python.
27 |
28 | http://www.staringispolite.com/likepython
29 |
30 |
31 | Like, Squeak (/likesqueak)
32 | ---------------------------
33 | Like, Squeak was created by Andreas Raab after seeing Like, Python on Reddit.
34 | When he finds time to add the code to github, it'll go here. And he'll probably
35 | change this description :)
36 |
37 | http://lists.squeakfoundation.org/pipermail/squeak-dev/2010-February/144992.html
38 |
39 |
40 |
41 |
--------------------------------------------------------------------------------
/likepython/README:
--------------------------------------------------------------------------------
1 | LIKE, PYTHON
2 | ============
3 | /likepython
4 | Like making computers do your bidding?
5 | Enjoy Python features like lambdas? Indent-grouping? List comprehensions?
6 | Tired of Old Man Python telling you what you can and can't say to your computer?
7 | It's about time programming languages understood what the kids are typing these days. So let's start with a baby step in that direction: Like, Python.
8 |
9 |
10 |
11 | EXAMPLE
12 |
13 | Like, Python uses Python's own tokenizer to essentially add keywords to Python's lexical understanding. Python is a subset of Like, Python, so any script you've already written in Python is valid Like, Python and will run in the interpreter. But you can also write like you'd speak. For example, the following is a fully-functional "hello world" script, included in the download as hello_world.lp:
14 |
15 | #!usr/bin/python
16 | # My first Like, Python script!
17 |
18 | yo just print like "hello world" bro
19 |
20 | Here's a version that asks you for your name, then says hi. (Note that 'yo' is a Like, Python keyword but the interpreter actually understands real Python syntax, so the 'yo' in the input string works just fine.
21 |
22 | #!usr/bin/python
23 | uh from sys import exit
24 |
25 | # Grab the user's name.
26 | ok so like name = raw_input("yo! what's your name?" ) right
27 |
28 | # Make sure they entered something, then say hi.
29 | if name.strip() is actually like "":
30 | toootally just exit()
31 | else:
32 | um yeah
33 | print like "Hi %s, nice to meet you." % name
34 |
35 | A full list of Like, Python keywords is below (swearing optional):
36 |
37 | Valleygirl: omg, so, like, totally, right, toootally
38 | Frat guy: friggin, fuckin, dude, man, bro, broheim, broseph
39 | Internets: lol, rofl, teh, ohai, plz
40 | Snoop: yo, homey, homeboy, sup, dog, shit, girl, ma, biatch, ho, shiiit
41 | Local: wicked, hella, anyways
42 | Misc: just, hey, yeah, ok, um, uh, ah, actually, something
43 |
44 |
45 |
46 | INSTALLATION
47 |
48 | To install on Mac OSX and Linux, just unzip, make sure you have Python 2.6.4 or greater, and admin privileges on your machine. Then, type the following from inside your likepython directory:
49 |
50 | ~/downloads/likepython> sudo cp ./likepython /usr/bin/
51 | ~/downloads/likepython> sudo chmod 555 /usr/bin/likepython
52 |
53 | If everything went well, you can now code in Like, Python! Test it on hello_world.lp (included) like so:
54 |
55 | ~/downloads/likepython> likepython hello_world.lp
56 |
57 | If you get errors, you probably don't have the required version of Python (2.6.4 or greater).
58 |
59 |
60 |
61 | VERSION
62 |
63 | This is version 0.1, the stable alpha release. If you like it, let me know! jon[at]staringispolite.com
64 |
65 | Or, you know, if not, you can like, tell me what you think could be improved. Especially new words Like, Python should include. Bro - it could like totally be in the next release.
66 |
67 |
68 |
69 | LICENSE
70 |
71 | The MIT License
72 | Copyright (c) 2010 Jonathan Howard
73 |
74 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
75 |
76 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
77 |
78 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
79 |
--------------------------------------------------------------------------------
/likepython/trunk/index.html:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 | Like, Python
6 |
8 |
10 |
90 |
91 |
92 |
93 |
94 |
95 | Like, Python(alpha)
96 |
97 |
98 |
99 | Like making computers do your bidding?
100 | Enjoy Python features like lambdas? Indent-grouping? List comprehensions?
101 | Tired of Old Man Python telling you what you can and can't say to your computer?
102 |
103 |
104 | It's about time programming languages understood what the kids are typing
105 | these days. So let's start with a baby step in that direction:
106 | Like, Python.
107 |
108 |
109 | Like, Python was created by Jonathan Howard in February 2010 while
110 | drinking and reviewing code for an upcoming project with a coworker.
111 | At a certain point, higher-level explanations devolved into just flat-out
112 | reading Python code like they were actually speaking the language normally -
113 | complete with like's, um's, whatever's, etc - making it completely
114 | impractical
115 | awesome for work. It was then that Jonathan realized he should perhaps
116 | stop for the night. And START creating Like, Python.
117 |
118 |
119 |
120 | EXAMPLE
121 |
122 |
123 | Like, Python uses Python's own tokenizer to essentially add
124 | keywords to Python's lexical understanding.
125 | Python is a subset of Like, Python, so any script you've already
126 | written in Python is valid Like, Python and will run in the
127 | interpreter.
128 | But you can also write like you'd speak. For example, the following is a
129 | fully-functional "hello world" script, included in the download as
130 | hello_world.lp:
131 |
132 |
133 | #!usr/bin/python
134 | # My first Like, Python script!
135 |
136 | yo just print like "hello world" bro
137 |
138 |
139 | Here's a version that asks you for your name, then says hi.
140 | (Note that 'yo' is a Like, Python keyword but the interpreter
141 | actually understands real Python syntax, so the 'yo' in the input string
142 | works just fine.
143 |
144 |
145 | #!usr/bin/python
146 | uh from sys import exit
147 |
148 | # Grab the user's name.
149 | ok so like name = raw_input("yo! what's your name?" ) right
150 |
151 | # Make sure they entered something, then say hi.
152 | if name.strip() is actually like "":
153 | toootally just exit()
154 | else:
155 | um yeah
156 | print like "Hi %s, nice to meet you." % name
157 |
158 |
159 |
160 | A full list of Like, Python keywords is below (swearing optional):
161 |
189 | To install on Mac OSX and Linux, just unzip, make sure you have admin
190 | privileges on your machine and, type the following from inside your
191 | likepython directory:
192 |
209 | This is version 0.1, the stable alpha release.
210 | If you like it, let me know!
211 | jonathan[at]staringispolite.com
212 |
213 |
214 | Or, you know, if not, you can like, tell me what you think
215 | could be improved. Especially new words Like, Python should include.
216 | Bro - it could like totally be in the next release.
217 |
218 |
219 |
220 | LICENSE
221 |
222 |
223 | The MIT License
224 | Copyright (c) 2010 Jonathan Howard
225 |
226 |
227 |
228 | Permission is hereby granted, free of charge, to any person obtaining a copy
229 | of this software and associated documentation files (the "Software"), to deal
230 | in the Software without restriction, including without limitation the rights
231 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
232 | copies of the Software, and to permit persons to whom the Software is
233 | furnished to do so, subject to the following conditions:
234 |
235 |
236 | The above copyright notice and this permission notice shall be included in
237 | all copies or substantial portions of the Software.
238 |
239 |
240 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
241 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
242 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
243 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
244 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
245 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
246 | THE SOFTWARE.
247 |
99 | Like making computers do your bidding?
100 | Enjoy Python features like lambdas? Indent-grouping? List comprehensions?
101 | Tired of Old Man Python telling you what you can and can't say to your computer?
102 |
103 |
104 | It's about time programming languages understood what the kids are typing
105 | these days. So let's start with a baby step in that direction:
106 | Like, Python.
107 |
108 |
109 | Like, Python was created by Jonathan Howard in February 2010 while
110 | drinking and reviewing code for an upcoming project with a coworker.
111 | At a certain point, higher-level explanations devolved into just flat-out
112 | reading Python code like they were actually speaking the language normally -
113 | complete with like's, um's, whatever's, etc - making it completely
114 | impractical
115 | awesome for work. It was then that Jonathan realized he should perhaps
116 | stop for the night. And START creating Like, Python.
117 |
118 |
119 |
120 | EXAMPLE
121 |
122 |
123 | Like, Python uses Python's own tokenizer to essentially add
124 | keywords to Python's lexical understanding.
125 | Python is a subset of Like, Python, so any script you've already
126 | written in Python is valid Like, Python and will run in the
127 | interpreter.
128 | But you can also write like you'd speak. For example, the following is a
129 | fully-functional "hello world" script, included in the download as
130 | hello_world.lp:
131 |
132 |
133 | #!usr/bin/python
134 | # My first Like, Python script!
135 |
136 | yo just print like "hello world" bro
137 |
138 |
139 | Here's a version that asks you for your name, then says hi.
140 | (Note that 'yo' is a Like, Python keyword but the interpreter
141 | actually understands real Python syntax, so the 'yo' in the input string
142 | works just fine.
143 |
144 |
145 | #!usr/bin/python
146 | uh from sys import exit
147 |
148 | # Grab the user's name.
149 | ok so like name = raw_input("yo! what's your name?" ) right
150 |
151 | # Make sure they entered something, then say hi.
152 | if name.strip() is actually like "":
153 | toootally just exit()
154 | else:
155 | um yeah
156 | print like "Hi %s, nice to meet you." % name
157 |
158 |
159 |
160 | A full list of Like, Python keywords is below (swearing optional):
161 |
189 | To install on Mac OSX and Linux, just unzip, make sure you have admin
190 | privileges on your machine and, type the following from inside your
191 | likepython directory:
192 |
209 | This is version 0.1, the stable alpha release.
210 | If you like it, let me know!
211 | jonathan[at]staringispolite.com
212 |
213 |
214 | Or, you know, if not, you can like, tell me what you think
215 | could be improved. Especially new words Like, Python should include.
216 | Bro - it could like totally be in the next release.
217 |
218 |
219 |
220 | LICENSE
221 |
222 |
223 | The MIT License
224 | Copyright (c) 2010 Jonathan Howard
225 |
226 |
227 |
228 | Permission is hereby granted, free of charge, to any person obtaining a copy
229 | of this software and associated documentation files (the "Software"), to deal
230 | in the Software without restriction, including without limitation the rights
231 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
232 | copies of the Software, and to permit persons to whom the Software is
233 | furnished to do so, subject to the following conditions:
234 |
235 |
236 | The above copyright notice and this permission notice shall be included in
237 | all copies or substantial portions of the Software.
238 |
239 |
240 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
241 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
242 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
243 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
244 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
245 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
246 | THE SOFTWARE.
247 |