ForNext
Only Do What Only You Can Do
JavaScript, Lua, Io
Hyperpolyglot Interpreted Languages: Tcl, Lua, JavaScript, Io より (2012.05.08)
はじめに
- 001. show version
- 002. interpreter
- 003. repl
- 004. statement separator
- 005. block delimiters
- 006. assignment
- 007. parallel assignment
- 008. swap
- 009. declare local variable
- 010. declare and access global variable
- 011. to-end-of-line comment
- 012. comment out multiple lines
- 013. null
- 014. null test
- 015. undefined variable access
- 016. undefined test
arithmetic and logic
- 017. true and false
- 018. falsehoods
- 019. logical operators
- 020. conditional expression
- 021. are expressions statements
- 022. relational expression
- 023. comparison operators
- 024. convert from string
- 025. convert to string
- 026. arithmetic expression
- 027. arithmetic operators
- 028. integer division
- 029. float division
- 030. arithmetic functions
- 031. arithmetic truncation
- 032. min and max
- 033. division by zero
- 034. integer overflow
- 035. float overflow
- 036. sqrt -2
- 037. random integer, uniform float, normal float
- 038. bit operators
strings
- 039. string literal
- 040. newline in literal
- 041. escapes
- 042. variable interpolation
- 043. string concatenation
- 044. split
- 045. join
- 046. sprintf
- 047. case manipulation
- 048. strip
- 049. pad on right, pad on left, center
- 050. length
- 051. index of substring
- 052. extract substring
- 053. chr and ord
regexes
- 054. character class abbreviations and anchors
- 055. match test
- 056. case insensitive match test
- 057. modifiers
- 058. substitution
- 059. group capture
dates and time
- 060. current date/time
- 061. to unix epoch, from unix epoch
- 062. strftime
- 063. strptime
- 064. parse date w/o format
- 065. get date parts
- 066. get time parts
- 067. build date/time from parts
- 068. sleep
arrays
- 069. literal
- 070. size
- 071. lookup
- 072. slice
- 073. concatenation
- 074. manipulate back of array
- 075. manipulate front of array
- 076. iteration
- 077. sort
- 078. reverse
- 079. member, not a member
- 080. intersection
- 081. union
- 082. set difference
- 083. map
- 084. filter
- 085. reduce
dictionaries
- 086. literal
- 087. size
- 088. lookup
- 089. update
- 090. out of bounds behavior
- 091. is key present
- 092. delete
- 093. iteration
functions
- 094. function declaration
- 095. function invocation
- 096. missing argument value
- 097. extra arguments
- 098. default value
- 099. variable number of arguments
- 100. return value
- 101. multiple return values
- 102. lambda declaration
- 103. lambda invocation
- 104. default scope
- 105. nested function visibility
execution control
- 106. if
- 107. while
- 108. break and continue
- 109. for
- 110. raise exception
- 111. catch exception
- 112. finally/ensure
- 113. uncaught exception behavior
- 114. generator
files
- 115. print to standard output
- 116. read from standard input
- 117. standard file handles
- 118. open file
- 119. open file for writing
- 120. close file
- 121. read line
- 122. iterate over a file by line
- 123. chomp
- 124. read file
- 125. write to file
- 126. flush file handle
- 127. file test, regular file test
- 128. copy file, remove file, rename file
- 129. set file permissions
- 130. temporary file
directories
- 131. build pathname
- 132. dirname and basename
- 133. iterate over directory by file
- 134. make directory
- 135. remove empty directory
- 136. remove directory and contents
- 137. directory test
processes and environment
- 138. command line args
- 139. environment variable
- 140. exit
- 141. set signal handller
- 142. external command
- 143. backticks
libraries and modules
- 144. library
- 145. import library
- 146. library path
- 147. library path environment variable
- 148. module declaration
- 149. module separator
- 150. list installed packaged, install a package
objects
- 151. create blank object
- 152. set attribute
- 153. get attribute
- 154. define method
- 155. invoke method
- 156. clone object
- 157. object literal