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
  
232
  
233
  
234
  
235
  
236
  
237
  
238
  
239
  
240
  
241
  
242
  
243
  
244
  
245
  
246
  
247
  
248
  
249
  
250
  
251
  
252
  
253
  
254
  
255
  
256
  
257
  
258
  
259
  
260
  
261
  
262
  
263
  
264
  
265
  
266
  
267
  
268
  
269
  
270
  
271
  
272
  
273
  
274
  
275
  
276
  
277
  
278
  
279
  
280
  
281
  
282
  
283
  
284
  
285
  
286
  
287
  
288
  
289
  
290
  
291
  
292
  
293
  
294
  
295
  
296
  
297
  
298
  
299
  
300
  
301
  
302
  
303
  
304
  
305
  
306
  
307
  
308
  
309
  
310
  
311
  
312
  
313
  
314
  
315
  
316
  
317
  
318
  
319
  
320
  
321
  
322
  
323
  
324
  
325
  
326
  
327
  
328
  
329
  
330
  
331
  
332
  
333
  
334
  
335
  
336
  
337
  
338
  
339
  
340
  
341
  
342
  
343
  
344
  
345
  
346
  
347
  
348
  
349
  
350
  
351
  
352
  
353
  
354
  
355
  
356
  
357
  
358
  
359
  
360
  
361
  
362
  
363
  
364
  
365
  
366
  
367
  
368
  
369
  
370
  
371
  
372
  
373
  
374
  
375
  
376
  
377
  
378
  
379
  
380
  
381
  
382
  
383
  
384
  
385
  
386
  
387
  
388
  
389
  
390
  
391
  
392
  
393
  
394
  
395
  
396
  
397
  
398
  
399
  
400
  
Changes since Pike 7.4: 
---------------------------------------------------------------------- 
 
New/improved functionality: 
--------------------------- 
 
o The automatic garbage collection strategy is configurable 
    The garbage collector can be configured to take both the amount of 
    garbage and the cpu time spent in the gc into account. Automatic 
    gc runs can also be disabled in critical regions. See the function 
    Pike.gc_parameters. 
 
o sort() is stable 
    Unlike previous releases, sort() will keep the original order 
    between elements that are equal. This was not implemented as a 
    separate function since it could be done with virtually no extra 
    overhead. 
 
o sort() is portable 
    Sort is now locale and platform independent. In other words, 
    strings are now compared only according to the unicode value of 
    every character. 
 
o Reworked codec 
    The codec for serialization of Pike data types has been updated 
    and has a significally improved successrate at encoding modules. 
 
o Less magic hacks 
    Several Pike modules have been cleaned up from old hacks and 
    workarounds for problems which now have proper solutions. This 
    should improve size, performance, dumpability and readability 
    of the affected code. In addition lots of internal types in Pike 
    have been tightened up and several more files now use the pragma 
    strict_types, which has resulted in some additional bugfixes. 
 
o INT64 
    On 64 bit architechtures Pike will now use full 64 bits integer 
    before resorting to Gmp.mpz objects for large numbers. 
 
o IPv6 
 
o mysqls 
    The Mysql glue can operate over SSL. Use the "mysqls://" protocol 
    in the Sql.Sql module to use this secuity feature. 
 
o trace() can trace all threads 
    The configure option --without-thread-trace has been removed, but 
    instead the trace() function has been extended to make it possible 
    to set the trace level in all threads simultaneously. 
 
o --help 
    The Pike --help message has been improved and it is possible to 
    retrieve further information about options and environment 
    variables. In addition most of the tools and build scripts now 
    accepts --help and describes what they do and what options they 
    take. 
 
o unbug 
    The Pike debugger unbug has been significtly optimized. 
 
o Module system. 
    Both dynamic and static modules appears as objects and they both 
    support having an identifier _module_value, which will then be 
    what is presented by the resolver as the module. _module_value can 
    be a constant, thus preventing the program from being 
    automatically cloned. 
 
o Calendar 
 
  The %S format is added to Calendar.parse() to parse seconds since 
  the Epoch. The TimeRange class is extended with a format method 
  format_commonlog(), a tzname_utc_offset (+HHMM) and 
  tzname_location(), which, when available, returns zone names like 
  "Europe/Stockholm". The database has been updated with Swedish 
  pre-1901 namedays and Finnish namedays. 
 
Master: 
------- 
 
o The new option --dumpversion prints out the Pike version in a more 
  easily pared way than --version. 
 
o The master now supplies argv to the started application, so it can 
  use the create method for execution. Some people find it a more 
  elegant solution than having a main function. 
 
o The -e Pike environment has been improved with a lot of convenience 
  wrappings. When compiling code with pike -e the macro NOT(X) will 
  expand to !(X) and CHAR(X) to 'X', making it easier to solve quote 
  problems from a shell. If the return from a pike -e statement is a 
  positive integer it will be used as pikes exit code. If the return 
  value is a string it will be outputed, with a "\n" added, if it 
  lacked one. Finally there is a predefined variable env that contains 
  the environment variables as a string:string mapping. 
 
Building and installing pike: 
----------------------------- 
o bundles 
o no tpike 
o installs documentation (_nodoc) 
 
 
Language additions: 
------------------- 
 
Changes and additions to -x utilities: 
-------------------------------------- 
 
o rsif 
    rsif can now work recursively in a file structure if given the 
    flag -r or --recursive. Example: 
      pike -x rsif -r 7.4 7.6 
 
o benchmark 
    A set of benchmarks is available in the benchmark tool. They are 
    based on the Great Computer Language Shootout, but has been 
    modified to make more sense in the context of Pike and to test 
    various aspects of Pike we suspect (or at least at one time 
    suspected) performs badly. 
 
o cgrep 
    Context sensitive grep is very helpful when you are looking for 
    substrings that are common. The implemented search modes are: 
      o Complete token 
      o Part of a token 
      o Complete string literal 
      o Part of a string literal 
      o Part of a comment 
 
    Example: 
      $ cd Pike/7.6/src 
      $ grep or * | wc -l 
      18907 
      $ pike -x cgrep -T or * | wc -l 
      14 
 
o dump 
    Dumps Pike .pike and .pmod module files to precompiled .o files 
    for shorter load times. Previously available as 
    src/dumpmodule.pike in the Pike source tree, but moved into the 
    Pike builtin tools to facilitate dumping of external modules. 
 
o extract_locale 
    Locale extractor utility used to extract localizable strings from 
    an application into an xml format, to later be used by the Locale 
    module. 
 
o monger 
    A new utility to download, install and otherwise manage external 
    modules from the Fresh Pike project. 
 
 
New modules / classes / methods added: 
-------------------------------------- 
 
o Regexp.PCRE added to give libpcre support. 
    Are you a closet-perlet? For those who missed the richer flora of 
    regexp syntax that Perl supports, the Perl Compatible Regular 
    Expression module is the answer. If you compile libpcre with UTF-8 
    support you will also get transparent wide string support. Several 
    convenience functions are also added to the Regexp module to 
    enable easier access to regular expressions. 
 
o Crypto/Nettle 
    The crypto module has been almost completely rewritten and now 
    uses libnettle as backend instead of the built in crypto 
    algorithms that Pike had before. This way Pike will benefit from 
    the more active development and optimization work in the Nettle 
    project. The most common hash and cipher methods are already 
    written in assembler for several platforms. As an example SHA1 is 
    about 40% faster than before on Intel platforms. 
 
    With the new nettle support comes support for two new cipher 
    algorithms, Blowfish and Serpent, and the new NIST hash algorithm 
    SHA256. Note that the new Crypto module has renamed its 
    identifiers to be consistent with the rest of Pike, and in some 
    cases to clarify or correct bad names. The old names still work, 
    but produce a warning unless Pike is run in compatibility mode. 
    Compatibility outside compatibility mode will be removed in the 
    future. 
 
    The interfaces for the hash and cipher algorithms has been 
    improved and they no longer only conform to predefined interfaces, 
    but actually inherits Hash/HashState and Cipher/CipherState. Every 
    algorithm is in itself a module in the Crypto module, and inherits 
    the Hash/Cipher class. This module contains instance non-specific 
    methods such as digest_size or key_size. By calling the `() method 
    in the module a HashState/CipherState object is returned, which is 
    a hash/cipher instance which can be used for streaming operations. 
 
    Examples: 
 
      Crypto.MD5.hash("Hash this string"); 
 
      Crypto.MD5()->update("Hash this ")->update("string")->digest(); 
 
    The confusing and hard to use Crypto.randomness has been obsoleted 
    by the Nettle implementation of the Yarrow random generator. The 
    Nettle implementation of Yarrow uses AES and SHA256. The 
    Crypto.Random module acts as a frontend before system crypto 
    sources and ensure that no matter how bad your OS is, you will 
    still get cryptographically strong random data. 
 
 
o Crypto.PGP 
    The start of a PGP/GPG toolkit. It still cannot handle all types 
    of signatures nor generate any, but it is useful to verify 
    selfsigned code and data. 
 
 
o ADT.Struct 
    This module makes it possible to work with binary formats of the 
    packed-struct-type. Simply create a class and specify the members 
    in order, create an object with a file object as argument and then 
    read the decoded values from the object as ordinary variables. 
 
      class ID3 { 
        inherit ADT.Struct; 
        Item head = Chars(3); 
        Item title = Chars(30); 
        Item artist = Chars(30); 
        Item album = Chars(30); 
        Item year = Chars(4); 
        Item comment = Chars(30); 
        Item genre = Byte(); 
      } 
 
      Stdio.File f = Stdio.File("foo.mp3"); 
      f->seek(-128); 
      ADT.Struct tag = ID3(f); 
      if(tag->head=="TAG") { 
        write("Title: %s\n", tag->title); 
        tag->title = "A new title" + "\0"*19; 
        f->seek(-128); 
        f->write( (string)tag ); 
      } 
 
 
o ADT.BitBuffer 
    When operating on data formats that are defined on bit level, the 
    ADT.BitBuffer presents a convenient interface. It operates as a 
    FIFO buffer on bit level, which allows you to read and write bits 
    and bytes. 
 
      > ADT.BitBuffer b=ADT.BitBuffer(); 
      > b->put1(2); 
      (1) Result: ADT.BitBuffer(11) 
      > b->put0(15); 
      (2) Result: ADT.BitBuffer("À\0"0) 
      > b->drain(); 
      (3) Result: "À\0" 
      > sizeof(b); 
      (4) Result: 1 
 
 
o Debug.Wrapper 
    A simple litte wrapper that can be placed around another object to 
    get printouts about what is happening to it. Only a few LFUNs are 
    currently supported. 
 
      > object x=Debug.Wrapper(Crypto.MD5()); 
      Debug.Wrapper is proxying ___Nettle.MD5_State() 
      > x->name(); 
      ___Nettle.MD5_State()->name 
      (1) Result: "md5" 
      > !x; 
      !___Nettle.MD5_State() 
      (2) Result: 0 
 
 
o Image.NEO 
    Support for one of the major image formats on Atari ST/STE, 
    including decoding of color cycling. The C bitmap and palette 
    handler can be used to implement other atari image formats. 
 
o GLUE 
 
    The GL Universal Environment is a GL toolkit that makes 
    implementing GL applications in Pike really simple. GLUE has 
    several orthogonal components like object orientation 
    encapsulation of Gl, drawing primitives, texture handling and text 
    generation. The most fundamental part is however an abstract 
    interface to a GL area driver, like GTK or SDL. 
 
      int main() { 
        GLUE.init(); 
        draw_frame(); 
        return -1; 
      } 
       
      void draw_frame() { 
        call_out(draw_frame, 0.02); // 1/(50 fps) 
        do_gl_code(); 
        GLUE.swap_buffers(); 
      } 
 
 
o _ADT 
o Geography RT38 
o Int 
o Pike.Security 
o Protocols.HTTP.Session 
 
    Handles an HTTP connection as a session, with cookies and stuff. 
 
o Bz2 
 
    Support for the compression format used by the bzip2 program. 
 
o Process.Process 
o Error 
o Float 
o Protocols.Bittorrent 
o Protocols.LMTP 
o Web.RDF/RDFS/OWL/RSS 
 
    Pike now has support for the W3C semantic web formats OWL, RDF 
    and RDFS, which are used for expressing structure and metadata 
    information. There is also some support for the syndication 
    format RSS (which happens to be a simple application of RDF). 
 
    This sample program reads an OWL file, parses the dataset 
    contained in it, and then lists the data classes in that 
    dataset: 
 
      int main(int argc, array argv) 
      { 
        object owlset = Web.OWL(); 
        string input = Stdio.read_file(argv[1]); 
        owlset->parse_owl(input); 
 
        write("Classes:\n"); 
 
        foreach(owlset->find_statements(0, 
                                        owlset->rdf_type, 
                                        owlset->owl_Class); 
                               array statement) 
          write("- %O\n", statement[0]); 
 
       return 0; 
     }   
  
 
o Parser.RCS 
 
o Array.any 
o Array.all 
o Array.partition 
o Function.call_callback 
o Function.Y 
o Function.curry 
 
o Thread 
date: 2003/04/14 18:59:37;  author: mast;  state: Exp;  lines: +366 -58 
Added try_* varieties of all functions that can block in Thread.Fifo 
and Thread.Queue. Added functions to make Thread.Fifo and Thread.Queue 
implement the same interface. Let write and try_write return the 
number of elements in the fifo/queue. Added fallbacks for Thread.Fifo 
and Thread.Queue in nonthreaded mode since it's now possible to use 
them in a meaningful way then. 
 
 
Optimizations: 
-------------- 
 
o Instantiation and destruction of pike-classes is now significantly faster. 
 
o Handling of bignums has been optimized, especially conversion 
  to/from normal integers. 
 
o String case conversion is now five times faster than before on 
  average. 
 
 
Compatibility changes: 
---------------------- 
 
Compatibility changes without backward compatibility: 
----------------------------------------------------- 
 
o Module ABI changed 
  The pike_frame struct has a new member, which makes modules compiled 
  with earlier versions of Pike incompatible. 
 
 
C level/development changes: 
---------------------------- 
 
o The security.h include file is renamed to pike_security.h 
o cond_resolv, test_program_eq, test_program_equal, no warnings in testsuite, 
o pmod: object(programname), void may be 0, typecheck of vararg/optional, 
  inherit, PIKEVAR attributes, prototypes, program flags 
 
Bugs fixed: 
----------- 
 
 
Uncategorized misc changes: 
---------------------------