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
  
168
  
169
  
170
  
171
  
172
  
173
  
174
  
175
  
176
  
177
  
178
  
179
  
180
  
181
  
182
  
183
  
184
  
185
  
186
  
187
  
188
  
189
  
190
  
191
  
192
  
193
  
194
  
195
  
196
  
197
  
198
  
199
  
200
  
201
  
202
  
203
  
204
  
205
  
206
  
207
  
208
  
209
  
210
  
211
  
212
  
213
  
214
  
215
  
216
  
217
  
218
  
219
  
220
  
221
  
222
  
223
  
224
  
225
  
226
  
227
  
228
  
229
  
230
  
231
  
Pike 8.1: Changes since Pike 8.0 (scratch area for future release notes) 
---------------------------------------------------------------------- 
 
New language features 
--------------------- 
 
o Unlimited character constant size. 
 
  There is no longer any limit to the size of character constants, 
  e.g. 'acdefghijk' creates the bignum 0x61636465666768696a6b. 
 
o 'auto' type added. 
 
  This is much like a strict typed mixed. The actual type is deduced 
  compile-time. 
 
  Typical use is as the type for variables in foreach when looping over 
  complexly typed values, or as the type in macro-defined functions and 
  similar. 
 
  auto can be used as return type for a function, it will be the 
  logical or of all the types of the return statements in the 
  function. 
 
o typeof(X) can now be used as a type. 
 
  The main use case is in macros, but it might be useful for other 
  things as well (as an example in a typedef). 
 
  typedef typeof(Val.true)|typeof(Val.false) bool; 
 
  typeof, when used like this, behaves very much like the C++ 
  decltype() expression. 
 
o ** operator added. It's exponentiation and works with most 
  combination of numerical types (int,float,Gmp.mpq,Gmp.mpf,Gmp.mpz) 
 
  `** and ``** operator overloading functions added. 
 
  This introduces one incompatible change: Previously the "pow" 
  function called a "_pow" function in the first argument if it was an 
  object. It has now been changed to also use `** (or, rather, pow() 
  is now implemented using predef::`**()). 
 
o Random rewrite 
 
  The random functions have been rewritten to ensure security by 
  default. random_string() and random() now get their data directly 
  from the operating system random generator, i.e. /dev/urandom on 
  most unixen. This is about half the speed compared with the 
  random_string function in Pike 8.0, but is now as secure as the 
  system random generator. 
 
  For consumers of random data that have additional requirements, 
  different random generators are exposed in the new module 
  Random. The module has the following generators: 
 
  - Random.Interface 
 
    This is not actually a generator, but an interface class that is 
    inherited into all the other generators. It contains code that can 
    turn the output from the random_string method into random numbers 
    with different limits without introducing bias. It also contains 
    code for all the different variants of random() on different 
    types. This is currently not possible to implement in Pike code, 
    as the typing is too complicated and it is not possible to access 
    private/protected _random methods in objects. 
 
  - Random.System 
 
    This generator maps directly on top of the system random 
    generator. This is the default generator used for random() and 
    random_string(). 
 
  - Random.Deterministic 
 
    This generator creates the same sequence of random numbers for a 
    given seed, with good pseudo random properties. 
 
  - Random.Hardware 
 
    This generator accesses the hardware random generator, when 
    available. 
 
  - Random.Fast 
 
    This generator takes entropy from the Random.System, but feeds 
    it into a cryptographic pseudo random number generator to be 
    able to output data fast. This is not the default random number 
    generator to avoid loading crypto code on every startup. 
 
  Comparing the different generators with each other gives the 
  following approximate speeds on a Linux system with hardware 
  random support: 
 
    Random.System           1.0 
    Pike 8.0 random_string  0.45 
    Random.Hardware         0.25 
    Random.Fast             0.20 
    Random.Deterministic    0.20 
 
  Objects implementing the _random lfun now get two arguments, the 
  current random_string() and random() functions. This is convenient 
  for C-level functions that doesn't have to look up functions 
  themselves. Note that it is possible for a user to replace these 
  with non-conforming functions (returning values of the wrong type, 
  strings of the wrong length or shift size, and values outside the 
  given range) or even non-functions. 
 
  All code in Pike that uses random now uses the current random 
  functions (though in some cases fixed at object creation). This 
  allows for repeatable results if the random functions are replaced 
  with a deterministic random generator, such as 
  Random.Deterministic. Example: 
 
    Random.Deterministic rnd = Random.Deterministic( seed ); 
    add_constant( "random_string", rnd->random_string ); 
    add_constant( "random", rnd->random ); 
 
o JOSE (JSON Object Signing and Encryption) 
 
  Some low-level API support has been added to the Crypto and Web 
  modules to support parts of RFC 7515 - 7520. 
 
 
Incompatible changes 
-------------------- 
 
o Gz.crc32 and Nettle.crc32c now only return positive results. 
 
o glob() has changed. 
 
  The main incompatibilities are that [ and \ are now special 
  characters in the pattern, and if you check the return value against 
  1 instead of checking if it's true, and use an array as the first 
  argument you will have to change your code. 
 
  This is in order to extend the glob function to cover what 
  'standard' glob functions do: 
 
  glob() now accepts quotes (\* to match a single *, as an example) 
  and handles ranges ([abc] for a, b or c, [a-z0-9] for a single 
  character between a and z or 0-9 
 
  You can also negate a range using ^ or ! ([^a-zA-Z] as an example). 
 
  When the first argument (the pattern) to glob is an array, glob now 
  returns which pattern in the array matched. 
 
o hash() has been changed to use siphash. The old hash function is 
  available under the name hash_8_0(). Note that this is not a 
  cryptographic hash function. 
 
 
Deprecated symbols and modules 
------------------------------ 
 
o Sql.mysql_result and Sql.mysqls_result have been deprecated. 
  Use Sql.Result instead. 
 
 
Removed features and modules 
---------------------------- 
 
o Compatibility for Pike versions before 7.8 is no longer available. 
 
o GTK1 library is deprecated, so glue code is removed. 
 
 
New modules 
----------- 
 
o ADT.Scheduler 
o ADT.TreeScheduler 
o Filesystem.Zip 
o Stdio.FakePipe 
o Parser.Markdown 
 
o Concurrent.Future and Concurrent.Promise 
 
  These are used to simplify handling of asynchronous results. 
 
o Crypto.Checksum 
 
  This module collect non-cryptographic checksums. Support for crc32, 
  adler32 and Castagnoli CRC (CRC32C). 
 
  NB: In the future these may be amended to support the Crypto.Hash API. 
 
o Protocols.HTTP2 
o Bittorrent.DHT 
o MsgPack 
 
 
New features 
------------ 
 
o Gmp.mpf is now implemented using gmpf if the library is available. 
 
 
C-level API changes 
------------------- 
 
o The contract for functions is now changed so that a function is no 
  longer required to clean the stack. The topmost value of the stack 
  will be regarded as the return value and the rest of the items on 
  the stack, compared to before the function arguments were pushed, 
  will be popped and discarded. Efuns still have to clean their stack 
  as previously. 
 
o Removed add_function, pike_add_function, pike_add_function2, 
  simple_add_variable, map_variable and MAP_VARIABLE. This removes the 
  remaining few API:s where text types were used. Use ADD_FUNCTION and 
  PIKE_MAP_VARIABLE instead. 
 
o Removed the functions my_rand and my_srand. Use the random functions 
  on the stack for _random lfuns, the push_random_string or look up 
  the random function from get_builtin_constants(). For deterministic 
  pseudo random, create a private Random.Deterministic object. 
 
 
Building and installing 
----------------------- 
 
o GMP 4.1 or later is now required. 
 
o C99 assumed 
 
  The configure tests will not check for functions defined in C99 
  anymore and C99 compiler support is assumed.