-
-
Notifications
You must be signed in to change notification settings - Fork 85
/
monkey.scroll
167 lines (137 loc) · 5.09 KB
/
monkey.scroll
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
import ../code/conceptPage.scroll
id monkey
name Monkey
appeared 2011
creators Anthony Diamond
tags pl
website https://web.archive.org/web/20171205070657/http://monkey-x.com/
writtenIn javascript html markdown
fileType text
wordRank 6182
documentation https://regal-internet-brothers.github.io/monkey/docs/Tutorials_Getting%20started.html
rosettaCode http://www.rosettacode.org/wiki/Category:Monkey
centralPackageRepositoryCount 0
repoStats
firstCommit 2015
commits 36
committers 5
files 116
newestCommit 2023
country United States
originCommunity https://github.com/Regal-Internet-Brothers
pygmentsHighlighter Monkey
filename basic.py
fileExtensions monkey
leachim6 Monkey
filepath m/Monkey
example
puts("Hello World")
githubRepo https://github.com/Regal-Internet-Brothers/webcc-monkey
firstCommit 2015
stars 0
forks 0
subscribers 3
created 2015
updated 2023
description A port of Monkey's compiler to web browsers.
issues 1
lineCommentToken '
printToken puts
stringToken "
hasLineComments true
' A comment
hasComments true
' A comment
hasPrintDebugging true
hasSemanticIndentation false
hasStrings true
"Hello world"
hasHexadecimals true
' \$[0-9a-fA-Z]+
hasFloats true
' [0-9]+\.[0-9]*(?!\.)
hasIntegers true
' [0-9]+
hasBinaryNumbers true
' \%[10]+
hasMultiLineComments true
wikipedia https://en.wikipedia.org/wiki/Monkey_(programming_language)
example
' The 'Player' class, as referenced previously (Placement does not matter):
Class Player
' Declare all of our fields (Class-local variables):
' These two variables will act as our position on the screen.
' (Alternatively, an 'Array or third-party class could be used)
Field x:Float, y:Float
' This will be a reference to an 'Image' object we'll specify.
Field image:Image
' Constructor(s):
' Overloading 'New' mainly works the same way as constructors in other languages.
' Returning is generally not recommended for constructors.
Method New(img:Image, x:Float=100, y:Float=100)
' Due to the arguments using the same names, 'Self'
' is required to resolve our fields' names:
Self.image = img
Self.x = x
Self.y = y
End
' Methods:
' This will be our main render-method for this object:
Method Draw:Void()
' Draw the 'image' object to the screen using our 'x' and 'y' fields.
DrawImage(image, x, y)
' Returning in a 'Void' function is not required. (Some still recommend it)
Return
End
End
related linux blitzbasic c csharp javascript java basic android ios python opengl webgl objective-c llvmir haxe
summary Monkey X is a high-level programming language designed for video game development for many different platforms, including desktop and laptop computers, mobile phones, tablets, and video game consoles. The language itself is an object-oriented dialect of BASIC, which the compiler translates into native source code for several target platforms. The resulting code is then compiled normally. Currently the official target platforms include: Windows (Including the Windows 8 store), OS X, Linux, Xbox 360, Android, iOS, among others. Community-driven, user-made targets have also been created, some notable user-targets include: MonkeyMax (BlitzMax), Monkey-Python (Python), and a Nintendo DS target.Monkey X's main implementation (compiler), and a number of official modules are open source. Monkey X's main application/game framework, Mojo, is partially commercial. The compiler and most of the official modules can be found on GitHub. Monkey is also distributed in several compiled binary forms from its official website (registration required, to build the compiler). For details, see: Mojo (framework), and Game targets (technical).
pageId 31116115
created 2013
backlinksCount 91
revisionCount 1
dailyPageViews 14
appeared 2011
githubBigQuery Monkey
repos 116
users 53
linguistGrammarRepo https://github.com/gingerbeardman/monkey.tmbundle
firstCommit 2011
lastCommit 2016
committerCount 4
commitCount 113
sampleCount 5
example
'Showcases use of Lambda functions and Generics.
#Import "<std>"
Using std..
Function Main()
Local testStack := New Stack< MyObject >
For Local n := 1 To 20
Local newItem := New MyObject
newItem.depth = Rnd( 0, 100 )
testStack.Push( newItem )
Next
testStack.Sort( Lambda:Int( x:MyObject,y:MyObject )
Return x.depth<=>y.depth
End )
For Local n := Eachin testStack
Print( n.depth )
Next
End
Struct MyObject
Field depth := 0
End
isbndb 3
year|publisher|title|authors|isbn13
2018|Pakalana Publishing|Addicted to the Monkey Mind: Change the Programming That Sabotages Your Life|Benoist, J.F.|9780692978597
2018|Pakalana Publishing|Addicted to the Monkey Mind: Change the Programming That Sabotages Your Life|Benoist, J.F.|9780578333663
2016|O'Reilly Media|Programming Beyond Practices: Be More Than Just a Code Monkey|Brown, Gregory T|9781491943823
githubLanguage Monkey
fileExtensions monkey monkey2
trendingProjectsCount 0
type programming
aceMode text
tmScope source.monkey
repos 254
semanticScholar 0