Fun idea. Let's make our own programming language.
Conditions:
Must be somewhat useful like ABC.
Not limited to characters only. Can include words.
1 function per post.
Name:
Anonymous2008-08-04 19:07
Sounds somewhat like the Adjudicated Blind Collaborative Design Esolang Factory, except not quite Blind.
>>11 process (extract-thread 0) (goto-considered-harmful >>15)
Name:
Anonymous2008-08-05 8:20
Update:
LISP: Jump to the beginning of the stack
ifeelkindabadaboutit:(: Terminate program
>>X: Marks a line
goto considered harmful: Jump to a line marked with >>X
Keep it going. :)
Name:
Anonymous2008-08-05 8:48
I suggest adding a recursive factorial to the standard library.
Update:
LISP: Jump to the beginning of the stack
ifeelkindabadaboutit:(: Terminate program
>>X: Marks a line
goto considered harmful: Jump to a line marked with >>X
Leah Culver: generating a random number between 0-100 and putting it on the stack
pee: increments top of stack
(my-other [var name] is-a [var name]): Swap two variables
Keep it going. :)
Name:
Anonymous2008-08-05 15:15
(post "Text here" numberhere)
Make a post on prog. Example: (post "shut up >>24" 1217887165)
Update:
LISP: Jump to the beginning of the stack
ifeelkindabadaboutit:(: Terminate program
>>X: Marks a line
goto considered harmful: Jump to a line marked with >>X
Leah Culver: generating a random number between 0-100 and putting it on the stack
pee: increments top of stack
(my-other [var name] is-a [var name]): Swap two variables
The Sussman: deletes stack
rape: pop stack
penis: push stack
Keep it going. :)
Name:
Anonymous2008-08-05 17:23
shit: decrement top of stack
Name:
Anonymous2008-08-05 17:24
>>30
I suggest:
car: move down the stack by one
cdr: move up the stack
Name:
Anonymous2008-08-05 17:45
CFLAGS JUST KICKED IN YO: optimize all the program into a single NOP.
(factor x) instantly returns the prime factors of x.
Name:
Anonymous2008-08-06 10:26
DONTHELPHIM: generate an exception
Name:
Anonymous2008-08-06 12:16
*grabs debugger* - breakpoint instruction
Name:
Anonymous2008-08-06 13:32
Update:
LISP: Jump to the beginning of the stack
ifeelkindabadaboutit:(: Terminate program
>>X: Marks a line
goto considered harmful: Jump to mark >>X
Leah Culver: generating a random number between 0-100 and putting it on the stack
pee: increments top of stack
shit: decrement top of stack
(my-other [number] is-a [number]): Swap two positions of the stack
The Sussman: deletes stack
rape: pop stack
penis: push stack
(factor x): instantly returns the prime factors of x.
CFLAGS JUST KICKED IN YO: Replace next command with a random command.
DONTHELPHIM: Skip next command.
Keep it going. :)
Name:
Anonymous2008-08-06 13:34
>>45
*grabs ASCII* Prints top of stack as an ASCII character.
I think we should adapt some better coding standards. All commands should be in a standardized format, eg: *grabs X* for stack manipulation as in stack.*grabs The Sussman* empties a stack, etc.
Flow operations could be in the format "flow:" and ignore whitespace and case, eg: flow:i f e e l k i n d o f b a d a b o u t i t : (
"If" statements could use the OMGCOMMANDS, which are capitalized orders: if( anus.haxed == true )
DONTHELPHIM;
anus.hax;
Anyway, just some ideas, but if we want a working interpreter soon we better not have 50 keywords, all with different usage and syntax.
Name:
Anonymous2008-08-12 12:37
>>70
Good ideas. Can you improve the list, please?
(comefrom <line>)
After evaluating line <line>, continue execution here.
Name:
Anonymous2008-08-13 22:11
>>76
example program: (comefrom 2)
(display "LISP")
Name:
Anonymous2008-08-13 22:24
comefrom considered beneficial
Name:
Anonymous2008-08-14 7:19
(comehere <line>)
Moves <line> right after the instruction pointer.
Name:
Anonymous2008-08-14 23:26
hai guys am i doin it rite? hai guys am i doin it rite? hai guys am i doin it rite? hai guys am i doin it rite? hai guys am i doin it rite? hai guys am i doin it rite? hai guys am i doin it rite? hai guys am i doin it rite? hai guys am i doin it rite? hai guys am i doin it rite? hai guys am i doin it rite? hai guys am i doin it rite? hai guys am i doin it rite? hai guys am i doin it rite? hai guys am i doin it rite? hai guys am i doin it rite? hai guys am i doin it rite? hai guys am i doin it rite? hai guys am i doin it rite? hai guys am i doin it rite? hai guys am i doin it rite? hai guys am i doin it rite? hai guys am i doin it rite? hai guys am i doin it rite? hai guys am i doin it rite? hai guys am i doin it rite? hai guys am i doin it rite? hai guys am i doin it rite? hai guys am i doin it rite? hai guys am i doin it rite? hai guys am i doin it rite? hai guys am i doin it rite? hai guys am i doin it rite? hai guys am i doin it rite? hai guys am i doin it rite? hai guys am i doin it rite? hai guys am i doin it rite? hai guys am i doin it rite? hai guys am i doin it rite? hai guys am i doin it rite? hai guys am i doin it rite? hai guys am i doin it rite? hai guys am i doin it rite? hai guys am i doin it rite? hai guys am i doin it rite? hai guys am i doin it rite? hai guys am i doin it rite? hai guys am i doin it rite? hai guys am i doin it rite? hai guys am i doin it rite? hai guys am i doin it rite? hai guys am i doin it rite? hai guys am i doin it rite? hai guys am i doin it rite? hai guys am i doin it rite? hai guys am i doin it rite? hai guys am i doin it rite? hai guys am i doin it rite? hai guys am i doin it rite? hai guys am i doin it rite? hai guys am i doin it rite? hai guys am i doin it rite? hai guys am i doin it rite? hai guys am i doin it rite? hai guys am i doin it rite? hai guys am i doin it rite? hai guys am i doin it rite? hai guys am i doin it rite? hai guys am i doin it rite? hai guys am i doin it rite? hai guys am i doin it rite? hai guys am i doin it rite? hai guys am i doin it rite? hai guys am i doin it rite? hai guys am i doin it rite? hai guys am i doin it rite? hai guys am i doin it rite? hai guys am i doin it rite? hai guys am i doin it rite? hai guys am i doin it rite? hai guys am i doin it rite? hai guys am i doin it rite? hai guys am i doin it rite? hai guys am i doin it rite? hai guys am i doin it rite? hai guys am i doin it rite? hai guys am i doin it rite? hai guys am i doin it rite? hai guys am i doin it rite? hai guys am i doin it rite? hai guys am i doin it rite? hai guys am i doin it rite? hai guys am i doin it rite? hai guys am i doin it rite? hai guys am i doin it rite? hai guys am i doin it rite? hai guys am i doin it rite? hai guys am i doin it rite? hai guys am i doin it rite? hai guys am i doin it rite? hai guys am i doin it rite? hai guys am i doin it rite? hai guys am i doin it rite? hai guys am i doin it rite? hai guys am i doin it rite? hai guys am i doin it rite? hai guys am i doin it rite? hai guys am i doin it rite? hai guys am i doin it rite? hai guys am i doin it rite? hai guys am i doin it rite? hai guys am i doin it rite? hai guys am i doin it rite? hai guys am i doin it rite? hai guys am i doin it rite? hai guys am i doin it rite? hai guys am i doin it rite? hai guys am i doin it rite? hai guys am i doin it rite? hai guys am i doin it rite? hai guys am i doin it rite? hai guys am i doin it rite? hai guys am i doin it rite? hai guys am i doin it rite? hai guys am i doin it rite? hai guys am i doin it rite? hai guys am i doin it rite? hai guys am i doin it rite? hai guys am i doin it rite? hai guys am i doin it rite? hai guys am i doin it rite? hai guys am i doin it rite? hai guys am i doin it rite? hai guys am i doin it rite? hai guys am i doin it rite? hai guys am i doin it rite? hai guys am i doin it rite? hai guys am i doin it rite?
Name:
Anonymous2008-08-15 9:48
wtf crack dat shit nigger
Name:
Anonymous2008-08-19 12:44
bump. keep em coming. :)
Name:
Anonymous2008-08-19 12:56
(goaway <line>) ; gets rid of <line>
(pleasecomeback <line>) ; May get the previously gotten rid of line back at position <line>, maybe not.
(iloveyou <line>) ; Copies <line> if called once, removes the whole subroutine if called twice.
(copypasta sha1_hash) - returns sjis art/copypasta/etc. the implementation should recurse through a folder of copypasta provided with the distro as well as a user's .copypasta/ directory.
(ircd port) - starts an ircd listening on the given port
(thread id) - fetches thread id from /prog/. the returned thread object formats itself when printed and has methods to print individual posts.
Name:
Anonymous2008-09-15 16:53
IN B4event
event trapping/handling
including errors, intervals &stuff KTHX
EXPERT PROGRAMMER
assembly program KTHX
I EETEDvar # or proc
nulls var/proc - integers/floats/whatsit set to 0, strings set to "", procs set to "end".
DO NOT WANTvar # or proc
clears var completely, including pointers. I EETED does this to booleans.
PROCproc CONSIDERED HARMFUL
stops any execution of proc, and future attempts at execution produce errors
VARvar CONSIDERED HARMFUL
for vehemently disusing variables
And, of course, attempts to use elements that are CONSIDERED HARMFUL, would be one of the events trapped by IN B4.
Name:
Anonymous2008-09-15 16:57
And of course, the space before /code just has to be removed, making the code look even uglier than intended!
(print (map (lambda (x) (x.upper)) 'This is the language of my dreams; the forcibly Lisped language Lython... Lisp syntax, Python semantics, object system and library.'))
Name:
Anonymous2008-09-15 20:05
>>88
Ew, extra paren after x.upper, sorry. No parens matching in browser.
Another example:
(for x (xrange 1 11)
(for y (xrange 1 11)
(print (% '%4d' (* x y)))))
As you can see, filthy statements are turned into beautiful expressions.
Name:
Anonymous2008-09-15 20:20
>>89
Wait. let's reserve ', ` and company for quote, quasiquote and company macros. Strings could be represented with " and nestable Tcl or Perl-like quotes with braces. Dictionaries and sets specified as (dict (k1 v1) ...) and (objectset e ...). . and [] should be advanced macro shorthands for get/set!, which in turn are macros for the actual double-underscore methods that get called behind the scenes. Variables are defined with (def var value) and rebound with (= var value) (a slight change from Python's semantics for better closures); use (== item ...) to compare. All filthy statements are now expressions and return the last evaluated value (e.g. the value of the last expression in the last iteration of a while loop). Lambdas are, thus, as powerful as defs. Tail-call elimination is guaranteed to happen.
This would probably be Guido's worst nightmare. And this is exactly what he'd need to do to the language; perhaps minus the Lisp syntax.
>>90
print is already a function in python 3.0, you can already do assignment without a var=value statement by setattr() and locals() (or even globals()), for and while loops aren't functional anyway, and the rest is just differences of syntax.
Name:
Anonymous2008-09-16 14:06
>>91
Python does need a better syntax to create multi-line closures. I think I remember hearing about a PEP to have a Ruby-like syntax for it (albeit with FIOC) though I don't know how well it went over.
Name:
Anonymous2008-09-16 18:12
>>90
Guido hates folds. "So now reduce(). This is actually the one I've always hated most, because, apart from a few examples involving + or *, almost every time I see a reduce() call with a non-trivial function argument, I need to grab pen and paper to diagram what's actually being fed into that function before I understand what the reduce() is supposed to do. So in my mind, the applicability of reduce() is pretty much limited to associative operators, and in all other cases it's better to write out the accumulation loop explicitly.