Module: Pyper::ControlCharacters

Included in:
PostfixMachine
Defined in:
lib/pyper/control_characters.rb,
lib/pyper/control_characters/other.rb,
lib/pyper/control_characters/cadr_like.rb,
lib/pyper/control_characters/greek_letters.rb,
lib/pyper/control_characters/other_latin_letters.rb

Overview

PostfixMachine mixin that defines the control characters.

Constant Summary collapse

PREFIX_CHARACTERS =
['t'] <<                     # letter t (for "to_something" methods)
'o' <<                       # letter o (for operators)
'l' <<                       # letter l (for literals)
'i' <<                       # letter i
'ι' <<                       # greek iota
'¿' <<                       # inverted question mark
'' <<                       # single left pointing quotation mark
'' <<                       # single right pointing quotation mark
'' <<                       # small colon
''

Instance Method Summary collapse

Instance Method Details

#_Object

Explicit block closing.



117
118
119
120
121
122
123
# File 'lib/pyper/control_characters/other.rb', line 117

def _
  case @w           # close block when in :block
  when :block then
    chain( close_block )
    @w = :main if @rr.size == 1 unless @rr.empty?
  else raise "'_' (close block) used when not in block" end
end

#aObject

In Pyper, ‘car’ becomes ‘τaτ’, and means second elements. Usable with strings, too.



7
8
9
10
11
12
# File 'lib/pyper/control_characters/cadr_like.rb', line 7

def a; pipe_2_variable; start "#@r =\n" +
    "if #@r.respond_to?( :first ) then #@r.first\n" +
    "elsif #@r.respond_to?( :[] ) then #@r[0]\n" +
    "else raise 'impossible to extract first element' end"
  start
end

#AObject Also known as: Α

Latin capital letters ******************************************************************** Applies #Array method to the register.



89
90
91
92
# File 'lib/pyper/control_characters/other_latin_letters.rb', line 89

def A
  pipe_2_variable
  start "Array( #@r )"
end

#BObject

Makes the next block-enabled method receive the block that was supplied to the Pyper method.



98
99
100
# File 'lib/pyper/control_characters/other_latin_letters.rb', line 98

def B
  @take_block = true unless @take_block == :taken
end

#bObject

Means second element.



16
17
18
19
20
21
# File 'lib/pyper/control_characters/cadr_like.rb', line 16

def b; pipe_2_variable; start "#@r =\n" +
    "if #@r.respond_to?( :take ) then #@r.take(2)[1]\n" +
    "elsif #@r.respond_to?( :[] ) then #@r[1]\n" +
    "else raise 'unable to extract second collection element' end"
  start
end

#CObject

Explicit parenthesizing of the current pipeline.



104
105
106
# File 'lib/pyper/control_characters/other_latin_letters.rb', line 104

def C
  parenthesize_current_pipeline
end

#cObject

Means third element.



25
26
27
28
29
30
# File 'lib/pyper/control_characters/cadr_like.rb', line 25

def c; pipe_2_variable; start "#@r =\n" +
    "if #@r.respond_to?( :take ) then #@r.take(3)[2]\n" +
    "elsif #@r.respond_to?( :[] ) then #@r[2]\n" +
    "else raise 'unable to extract third collection element' end"
  start
end

#dObject

In Pyper, ‘cdr’ becomes ‘τdτ’.



34
35
36
37
38
39
40
# File 'lib/pyper/control_characters/cadr_like.rb', line 34

def d; pipe_2_variable; start "#@r =\n" +
    "if #@r.is_a?( Hash ) then Hash[ @r.drop(1) ]\n" +
    "elsif #@r.respond_to?( :drop ) then #@r.drop(1)\n" +
    "elsif #@r.respond_to?( :[] ) then #@r[1..-1]\n" +
    "else raise 'unable to #drop(1) or #[1..-1]' end"
  start
end

#DObject

Explicit dup-ping of the current pipeline (Giving up the original object and working with its #dup instead.)



111
112
113
# File 'lib/pyper/control_characters/other_latin_letters.rb', line 111

def D
  exe "#@r = #@r.dup"
end

#EObject

Equals operator (+:==+).



117
118
119
# File 'lib/pyper/control_characters/other_latin_letters.rb', line 117

def E
  binary_operator "=="
end

#eObject

Means all except the first 2 elements.



44
45
46
47
48
49
50
# File 'lib/pyper/control_characters/cadr_like.rb', line 44

def e; pipe_2_variable; start "#@r =\n" +
    "if #@r.is_a?( Hash ) then Hash[ @r.drop(2) ]\n" +
    "elsif #@r.respond_to?( :drop ) then #@r.drop(2)\n" +
    "elsif #@r.respond_to?( :[] ) then #@r[2..-1]\n" +
    "else raise 'unable to #drop(2) or #[2..-1]' end"
  start
end

#fObject

Means all except the first 3 elements.



54
55
56
57
58
59
60
# File 'lib/pyper/control_characters/cadr_like.rb', line 54

def f; pipe_2_variable; start "#@r =\n" +
    "if #@r.is_a?( Hash ) then Hash[ @r.drop(3) ]\n" +
    "elsif #@r.respond_to?( :drop ) then #@r.drop(3)\n" +
    "elsif #@r.respond_to?( :[] ) then #@r[3..-1]\n" +
    "else raise 'unable to #drop(3) or #[3..-1]' end"
  start
end

#GObject

Ungrab the argument (unshift from pipeline).



125
126
127
# File 'lib/pyper/control_characters/other_latin_letters.rb', line 125

def G
  exe "args.unshift #@r"
end

#gObject

Current pipe is assigned with the argument from the argument source.



6
7
8
# File 'lib/pyper/control_characters/other_latin_letters.rb', line 6

def g
  set grab_arg
end

#HObject

A combo that switches this and other register, ungrabs the argument, and sets the other register as the argument source.



132
133
134
135
# File 'lib/pyper/control_characters/other_latin_letters.rb', line 132

def H
  X()
  β()
end

#hObject

Other pipe is assigned with the argument from the argument source.



12
13
14
15
16
# File 'lib/pyper/control_characters/other_latin_letters.rb', line 12

def h
  exe "#@r, #{successor_register(@r)} = #{successor_register(@r)}, #@r"
  set grab_arg
  exe "#@r, #{successor_register(@r)} = #{successor_register(@r)}, #@r"
end

#IObject

Braces method, #[].



139
140
141
# File 'lib/pyper/control_characters/other_latin_letters.rb', line 139

def I
  @pipe[-1] << "[#{grab_arg}]"
end

#iCObject

Nullary method #compact.



36
37
38
# File 'lib/pyper/control_characters/other.rb', line 36

def iC
  nullary_method "compact"
end

#iEObject

Nullary method bang (+#!+, exclamation mark operator).



42
43
44
# File 'lib/pyper/control_characters/other.rb', line 42

def iE
  unary_operator '!'
end

#ijObject

Nullary method join.



6
7
8
# File 'lib/pyper/control_characters/other.rb', line 6

def ij
  chain "join"
end

#imObject

Unary - operator.



18
19
20
# File 'lib/pyper/control_characters/other.rb', line 18

def im
  unary_operator "-"
end

#iMObject

Maps the other register to this register.



127
128
129
130
131
# File 'lib/pyper/control_characters/other.rb', line 127

def iM
  pipe_2_variable
  start "#{successor_register(@r)}"
  nullary_method_with_block "map"
end

#ipObject

Unary + operator.



12
13
14
# File 'lib/pyper/control_characters/other.rb', line 12

def ip
  unary_operator "+"
end

#itObject

Unary tilde operator.



24
25
26
# File 'lib/pyper/control_characters/other.rb', line 24

def it
  unary_operator "~"
end

#iXObject

Map with index



48
49
50
51
52
# File 'lib/pyper/control_characters/other.rb', line 48

def iX
  next_block_will_be_binary
  nullary_method "map"
  nullary_method_with_block "with_index"
end

#ixObject

Unary method #index.



30
31
32
# File 'lib/pyper/control_characters/other.rb', line 30

def ix
  unary_method "index"
end

#jObject

Compiler directive that decrements the @arg_count index. With :args_counted argument source, when used once, causes the same argument to be taken twice. When used twice or more, causes the same number of argument array elements to be taken twice.



23
24
25
# File 'lib/pyper/control_characters/other_latin_letters.rb', line 23

def j
  @arg_count -= 1
end

#JObject

#join expecting argument.



148
149
150
# File 'lib/pyper/control_characters/other_latin_letters.rb', line 148

def J
  unary_method "join"
end

#l0Object

Pipe-resetting literal digit 0.



317
318
319
# File 'lib/pyper/control_characters/other.rb', line 317

def l0
  set "0"
end

#l1Object

Pipe-resetting literal digit 1.



323
324
325
# File 'lib/pyper/control_characters/other.rb', line 323

def l1
  set "1"
end

#l2Object

Pipe-resetting literal digit 2.



329
330
331
# File 'lib/pyper/control_characters/other.rb', line 329

def l2
  set "2"
end

#l3Object

Pipe-resetting literal digit 3.



335
336
337
# File 'lib/pyper/control_characters/other.rb', line 335

def l3
  set "3"
end

#l4Object

Pipe-resetting literal digit 4.



341
342
343
# File 'lib/pyper/control_characters/other.rb', line 341

def l4
  set "4"
end

#l5Object

Pipe-resetting literal digit 5.



347
348
349
# File 'lib/pyper/control_characters/other.rb', line 347

def l5
  set "5"
end

#l6Object

Pipe-resetting literal digit 6.



353
354
355
# File 'lib/pyper/control_characters/other.rb', line 353

def l6
  set "6"
end

#l7Object

Pipe-resetting literal digit 7.



359
360
361
# File 'lib/pyper/control_characters/other.rb', line 359

def l7
  set "7"
end

#l8Object

Pipe-resetting literal digit 8.



365
366
367
# File 'lib/pyper/control_characters/other.rb', line 365

def l8
  set "8"
end

#l9Object

Pipe-resetting literal digit 9.



371
372
373
# File 'lib/pyper/control_characters/other.rb', line 371

def l9
  set "9"
end

#lAObject

Pipe-resetting literal empty array [].



305
306
307
# File 'lib/pyper/control_characters/other.rb', line 305

def lA
  set '[]'
end

#lHObject

Pipe-resetting literal empty hash {}.



311
312
313
# File 'lib/pyper/control_characters/other.rb', line 311

def lH
  set '{}'
end

#lnObject

Pipe-resetting literal nil.



293
294
295
# File 'lib/pyper/control_characters/other.rb', line 293

def ln
  set "nil"
end

#Object

Pipe-resetting literal empty string .



299
300
301
# File 'lib/pyper/control_characters/other.rb', line 299

def 
  set ''
end

#mObject

def m; nullary_method_with_block “map” end # All-important #map method



33
34
35
36
37
38
# File 'lib/pyper/control_characters/other_latin_letters.rb', line 33

def m
  pipe_2_variable
  start "if #@r.is_a? String then #@r = #@r.each_char end\n"
  start
  nullary_method_with_block "map"
end

#MObject

Zip this and other register and invoke #map with a binary block on it.



158
159
160
161
162
163
# File 'lib/pyper/control_characters/other_latin_letters.rb', line 158

def M
  next_block_will_be_binary
  pipe_2_variable
  start "#@r.zip(#{successor_register(@r)})"
  nullary_method_with_block "map"
end

#OObject

Map this register with object from the other register as the starting contents of the delta pipeline, and epsilon as the argument source.



170
171
172
173
174
175
# File 'lib/pyper/control_characters/other_latin_letters.rb', line 170

def O
  r()
  m()
  g()
  ε()
end

#o8Object

Pretzel operator (+#&+) method.



226
227
228
# File 'lib/pyper/control_characters/other.rb', line 226

def o8
  binary_operator "&"
end

#oAObject

Operator triple equals (+#===+).



182
183
184
# File 'lib/pyper/control_characters/other.rb', line 182

def oA
  binary_operator "&&"
end

#oaObject Also known as:

Addition as unary method.



141
142
143
# File 'lib/pyper/control_characters/other.rb', line 141

def oa
  binary_operator "+"
end

#odObject Also known as: ÷

Division as unary method.



168
169
170
# File 'lib/pyper/control_characters/other.rb', line 168

def od
  binary_operator "/"
end

#oGObject Also known as:

Greater than as unary method.



207
208
209
# File 'lib/pyper/control_characters/other.rb', line 207

def oG
  binary_operator ">"
end

#oIObject

Pipe operator (+#|+) method.



194
195
196
# File 'lib/pyper/control_characters/other.rb', line 194

def oI
  binary_operator "|"
end

#oiObject

Unary method #include?.



148
149
150
# File 'lib/pyper/control_characters/other.rb', line 148

def oi
  unary_method "include?"
end

#oMObject

Modulo operator as unary method (also used for string interpolation).



214
215
216
# File 'lib/pyper/control_characters/other.rb', line 214

def oM
  binary_operator "%"
end

#omObject Also known as:

Multiplication as unary method.



161
162
163
# File 'lib/pyper/control_characters/other.rb', line 161

def om
  binary_operator "*"
end

#oOObject

Or operator (+#||+, double pipe) method.



220
221
222
# File 'lib/pyper/control_characters/other.rb', line 220

def oO
  binary_operator "||"
end

#opObject Also known as: ﹡﹡

Power as unary method.



175
176
177
# File 'lib/pyper/control_characters/other.rb', line 175

def op
  binary_operator "**"
end

#oSObject Also known as:

Smaller than as unary method.



200
201
202
# File 'lib/pyper/control_characters/other.rb', line 200

def oS
  binary_operator "<"
end

#osObject Also known as:

Subtraction as unary method.



154
155
156
# File 'lib/pyper/control_characters/other.rb', line 154

def os
  binary_operator "-"
end

#pObject

Adaptive prepend.



45
46
47
48
49
50
51
52
53
54
# File 'lib/pyper/control_characters/other_latin_letters.rb', line 45

def p
  pipe_2_variable; arg = grab_arg; start "#@r =\n" + # arg 2 self
    "if #@r.respond_to?( :unshift ) then #@r.unshift(#{arg})\n" +
    "elsif #@r.respond_to?( :prepend ) then #@r.prepend(#{arg})\n" +
    "elsif #@r.respond_to?( :merge ) and #@r.is_a?( Array ) " +
    "&& #@r.size == 2\nHash[*#@r].merge(#{arg})\n" +
    "elsif #@r.respond_to? :merge then #@r.merge(#{arg})\n" +
    "else raise 'impossible to unshift/prepend' end"
  start
end

#qObject

Adaptive append.



58
59
60
61
62
63
64
65
66
67
68
# File 'lib/pyper/control_characters/other_latin_letters.rb', line 58

def q
  pipe_2_variable
  arg = grab_arg
  start "#@r =\n" +   # arg 2 self
    "if #@r.respond_to?( :<< ) then #@r << #{arg}\n" +
    "elsif #@r.respond_to?( :merge ) and #@r.is_a?(Array) " +
    "&& #@r.size == 2\n#{arg}.merge(Hash[*#@r])\n" +
    "elsif #@r.respond_to?( :merge ) then #{arg}.merge(#@r)\n" +
    "else raise 'impossible to <</append' end"
  start
end

#rObject

Pushes the secondary register (beta) onto the argument source stack.



72
73
74
# File 'lib/pyper/control_characters/other_latin_letters.rb', line 72

def r
  @argsrc.beta
end

#RObject

Q: recursive piper method, end



181
182
183
184
# File 'lib/pyper/control_characters/other_latin_letters.rb', line 181

def R # Reverse zip: Zip other and this register
  pipe_2_variable
  start "#{successor_register}.zip(#@a)"
end

#sObject

Sends the argument from the argument source to the current pipeline.



78
79
80
81
# File 'lib/pyper/control_characters/other_latin_letters.rb', line 78

def s
  pipe_2_variable
  start "#@r.send( *(#{grab_arg}) )"
end

#TObject

Ternary operator as binary method with the current pipeline as the receiver.



190
191
192
193
# File 'lib/pyper/control_characters/other_latin_letters.rb', line 190

def T
  parenthesize_current_pipeline
  @pipe[-1] << " ? ( #{grab_arg} ) : ( #{grab_arg} )"
end

#tAObject

Make a singleton array out of the current register. (“Array( register ) is invoked simply by capital A without prefixes.)



84
85
86
87
# File 'lib/pyper/control_characters/other.rb', line 84

def tA
  pipe_2_variable
  start "[#@r]"
end

#tfObject

Stands for Float( register ).



56
57
58
59
# File 'lib/pyper/control_characters/other.rb', line 56

def tf
  pipe_2_variable
  start "Float( #@r )"
end

#tHObject

Zips this and other register to a hash.



91
92
93
94
# File 'lib/pyper/control_characters/other.rb', line 91

def tH
  pipe_2_variable
  start "Hash[ #@r.zip( #{successor_register( @r )} ) ]"
end

#thObject

Make a hash out of the current register.



63
64
65
66
# File 'lib/pyper/control_characters/other.rb', line 63

def th
  pipe_2_variable
  start "Hash[ #@r.zip( #{successor_register(@r)} ) ]"
end

#tiObject

Stands for Integer( register ).



70
71
72
73
# File 'lib/pyper/control_characters/other.rb', line 70

def ti
  pipe_2_variable
  start "Integer( #@r )"
end

#tsObject

Stands for #to_s.



77
78
79
# File 'lib/pyper/control_characters/other.rb', line 77

def ts
  nullary_method "to_s"
end

#tSObject

Stands for #to_sym.



98
99
100
# File 'lib/pyper/control_characters/other.rb', line 98

def tS
  nullary_method "to_sym"
end

#uObject

Collection except the last 3 elements.



111
112
113
114
115
116
117
# File 'lib/pyper/control_characters/cadr_like.rb', line 111

def u; pipe_2_variable; start "#@r =\n" +
    "if #@r.is_a?( Hash ) then Hash[ @r.take( #@r.size - 3 ) ]\n" +
    "elsif #@r.respond_to?( :take ) then #@r.take( #@r.size - 3 )\n" +
    "elsif #@r.respond_to?( :[] ) then #@r[0...-3]\n" +
    "else raise 'unable to #drop(1) or #[1...-3]' end"
  start
end

#UObject

Unshift / prepend this register to the other register.



197
# File 'lib/pyper/control_characters/other_latin_letters.rb', line 197

def U; end

#vObject

Collection except the last 2 elements.



101
102
103
104
105
106
107
# File 'lib/pyper/control_characters/cadr_like.rb', line 101

def v; pipe_2_variable; start "#@r =\n" +
    "if #@r.is_a?( Hash ) then Hash[ @r.take( #@r.size - 2 ) ]\n" +
    "elsif #@r.respond_to?( :take ) then #@r.take( #@r.size - 2 )\n" +
    "elsif #@r.respond_to?( :[] ) then #@r[0...-2]\n" +
    "else raise 'unable to #drop(1) or #[1...-2]' end"
  start
end

#VObject

unsh/prep self 2 reg (other changed)



199
# File 'lib/pyper/control_characters/other_latin_letters.rb', line 199

def V; end

#wObject

Whole collection except the last element,



91
92
93
94
95
96
97
# File 'lib/pyper/control_characters/cadr_like.rb', line 91

def w; pipe_2_variable; start "#@r =\n" +
    "if #@r.is_a?( Hash ) then Hash[ @r.take( #@r.size - 1 ) ]\n" +
    "elsif #@r.respond_to?( :take ) then #@r.take( #@r.size - 1 )\n" +
    "elsif #@r.respond_to?( :[] ) then #@r[0...-1]\n" +
    "else raise 'unable to #drop(1) or #[1...-1]' end"
  start
end

#WObject

Map zipped other and this register using binary block.



203
204
205
206
207
208
# File 'lib/pyper/control_characters/other_latin_letters.rb', line 203

def W
  next_block_will_be_binary    # Mnemonic: W is inverted M
  pipe_2_variable
  start "#{successor_register(@r)}.zip(#@r)"
  nullary_method_with_block "map"
end

#xObject

Means the third collection element from the end.



82
83
84
85
86
87
# File 'lib/pyper/control_characters/cadr_like.rb', line 82

def x; pipe_2_variable; start "#@r =\n" +
    "if #@r.respond_to?( :drop ) then #@r.drop( #@r.size - 3 ).first\n" +
    "elsif #@r.respond_to?( :[] ) then #@r[-3]\n" +
    "else raise 'unable to extract third-from-the-end element' end"
  start
end

#XObject

Swaps the contents of the primary (alpha) and the secondary (beta) register.



212
213
214
215
216
217
218
# File 'lib/pyper/control_characters/other_latin_letters.rb', line 212

def X
  case @w
  when :block then raise "'χ' (swap pipes) may not be used in blocks!"
  else
    exe "#@r, #{successor_register} = #{successor_register}, #@r"
  end
end

#yObject

Means the penultimate collection element.



73
74
75
76
77
78
# File 'lib/pyper/control_characters/cadr_like.rb', line 73

def y; pipe_2_variable; start "#@r =\n" +
    "if #@r.respond_to?( :drop ) then #@r.drop( #@r.size - 2 ).first\n" +
    "elsif #@r.respond_to?( :[] ) then #@r[-2]\n" +
    "else raise 'unable to extract second-from-the-end element' end"
  start
end

#zObject

Means the last collection element.



64
65
66
67
68
69
# File 'lib/pyper/control_characters/cadr_like.rb', line 64

def z; pipe_2_variable; start "#@r =\n" +
    "if #@r.respond_to?( :drop ) then #@r.drop( #@r.size - 1 ).first\n" +
    "elsif #@r.respond_to?( :[] ) then #@r[-1]\n" +
    "else raise 'unable to extract last element' end"
  start
end

#ZObject

Zip this and other register.



224
225
226
227
# File 'lib/pyper/control_characters/other_latin_letters.rb', line 224

def Z
  pipe_2_variable
  start "#@r.zip(#{successor_register})"
end

#²Object

Next block arity 2 selection



110
# File 'lib/pyper/control_characters/other.rb', line 110

def ²; block_2ary end

#αObject

Pushes the primary register (alpha) on the argument source stack.



6
7
8
# File 'lib/pyper/control_characters/greek_letters.rb', line 6

def α
  @argsrc.alpha
end

#βObject

Stashes the contents of the primary pipeline to the argument stack, and sets the secondary register as the argument source.



13
14
15
16
# File 'lib/pyper/control_characters/greek_letters.rb', line 13

def β
  G()
  r()
end

#γObject

A combo that switches this an the other register and sets the other register as the argument source.



21
22
23
24
# File 'lib/pyper/control_characters/greek_letters.rb', line 21

def γ
  X()
  r()
end

#δObject

Pushes the in-block register (delta) on the argument source stack.



28
29
30
# File 'lib/pyper/control_characters/greek_letters.rb', line 28

def δ
  @argsrc.delta
end

#εObject

Pushes the block argument register 1 (epsilon) on the argument source stack.



34
35
36
# File 'lib/pyper/control_characters/greek_letters.rb', line 34

def ε
  @argsrc.epsilon
end

#ζObject

Pushes the block argument register 2 (zeta) on the argument source stack.



40
41
42
# File 'lib/pyper/control_characters/greek_letters.rb', line 40

def ζ
  @argsrc.zeta
end

#ιAObject

Argument-setting literal [].



281
282
283
# File 'lib/pyper/control_characters/other.rb', line 281

def ιA
  exe "args.unshift %s" % '[]'
end

#ιGObject

Greater or equal as unary method.



238
239
240
# File 'lib/pyper/control_characters/other.rb', line 238

def ιG
  binary_operator ">="
end

#ιHObject

Argument-setting literal {}.



287
288
289
# File 'lib/pyper/control_characters/other.rb', line 287

def ιH
  exe "args.unshift %s" % '{}'
end

#ιIObject

Braces equals method, #[]=.



244
245
246
# File 'lib/pyper/control_characters/other.rb', line 244

def ιI
  @pipe[-1] << "[#{grab_arg}] = #{grab_arg}"
end

#ιnObject

Argument-setting literal nil.



269
270
271
# File 'lib/pyper/control_characters/other.rb', line 269

def ιn
  exe "args.unshift %s" % "nil"
end

#ιSObject

Smaller or equal as unary method.



232
233
234
# File 'lib/pyper/control_characters/other.rb', line 232

def ιS
  binary_operator "<="
end

#ιαObject

When Greek iota (ι) is used as the prefix to the source selector, then rather then being pushed on the @argsrc stack, the new argument source replaces the topmost element of the stack. When the stack size is 1, this has the additional effect of setting the given argument source as default, until another such change happens, or stack reset is performed.



98
99
100
# File 'lib/pyper/control_characters/greek_letters.rb', line 98

def ια
  @argsrc.alpha!
end

#ιβObject



102
103
104
# File 'lib/pyper/control_characters/greek_letters.rb', line 102

def ιβ
  @argsrc.beta!
end

#ιδObject

def ιγ; @argsrc.var! successor_register( @rr ) end



108
109
110
# File 'lib/pyper/control_characters/greek_letters.rb', line 108

def ιδ
  @argsrc.delta!
end

#ιεObject



112
113
114
# File 'lib/pyper/control_characters/greek_letters.rb', line 112

def ιε
  @argsrc.epsilon!
end

#ιζObject



116
117
118
# File 'lib/pyper/control_characters/greek_letters.rb', line 116

def ιζ
  @argsrc.zeta!
end

#ιλObject



135
136
137
# File 'lib/pyper/control_characters/greek_letters.rb', line 135

def ιλ
  @argsrc.args_counted!
end

#ιρObject

Iota-prefixed rho (ιρ) resets the @argsrc stack to its default contents, that is, size 1 stack with source: :args_counted, grab_method: :ref.



123
124
125
# File 'lib/pyper/control_characters/greek_letters.rb', line 123

def ιρ
  @argsrc.std!
end

#ιςObject

Argument-setting literal .



275
276
277
# File 'lib/pyper/control_characters/other.rb', line 275

def ις;
  exe "args.unshift %s" % ''
end

#ιψObject



127
128
129
# File 'lib/pyper/control_characters/greek_letters.rb', line 127

def ιψ
  @argsrc.psi!
end

#ιωObject



131
132
133
# File 'lib/pyper/control_characters/greek_letters.rb', line 131

def ιω
  @argsrc.omega!
end

#ιΩObject



139
140
141
# File 'lib/pyper/control_characters/greek_letters.rb', line 139

def ιΩ
  @argsrc.args!
end

#λObject

Pushes onto the argument stack the default argument source, which is the “counted argument list” – Pyper method argument array indexed by compile-time @arg_count index.



48
49
50
# File 'lib/pyper/control_characters/greek_letters.rb', line 48

def λ
  @argsrc.args_counted
end

#ΠObject

Capital pi (Π( sets the :dup grab mode for the top @argsrc element.



81
82
83
# File 'lib/pyper/control_characters/greek_letters.rb', line 81

def Π
  @argsrc.dup!
end

#ρObject

Small rho (ρ) sets the :ref grab mode for the argument source stack – that is, turns off :shift or :dup mode when active.



69
70
71
# File 'lib/pyper/control_characters/greek_letters.rb', line 69

def ρ
  @argsrc.ref!
end

#σObject

Small sigma sets the ‘shift’ grab mode for the top @argsrc element.



75
76
77
# File 'lib/pyper/control_characters/greek_letters.rb', line 75

def σ
  @argsrc.shift!
end

#ψObject

Pushes the penultimate element of the Pyper method argument array on the argument source stack.



55
56
57
# File 'lib/pyper/control_characters/greek_letters.rb', line 55

def ψ
  @argsrc.psi
end

#ΩObject

Pushes onto the stack the whole array of the arguments passed to the pyper method, with :shift grab method turned on by default.



88
89
90
# File 'lib/pyper/control_characters/greek_letters.rb', line 88

def Ω
  @argsrc.args
end

#ωObject

Pushes the last element of the Pyper method argument array on the argument source stack.



62
63
64
# File 'lib/pyper/control_characters/greek_letters.rb', line 62

def ω
  @argsrc.omega
end

#Object

make a pair



133
134
135
136
137
# File 'lib/pyper/control_characters/other.rb', line 133

def  # make a pair
  pipe_2_variable
  arg = grab_arg
  start "[#@r, #{arg}]"
end

#Object

Superscript i. Next block will have arity 2 and will be written with inverse parameter order.



114
# File 'lib/pyper/control_characters/other.rb', line 114

def ; block_2ary_swapped end

#Object Also known as: , ø

Clear the current pipe (set to empty string):



376
# File 'lib/pyper/control_characters/other.rb', line 376

def ; set "" end