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
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
|
====
News
====
..
2015-03-01 Version 0.10.4 released
==================================
Changes affecting backwards compatibility
-----------------------------------------
- Parameter names are finally properly ``gensym``'ed. This can break
templates though that used to rely on the fact that they are not.
(Bug #1915.) This means this doesn't compile anymore:
.. code-block:: nim
template doIt(body: stmt) {.immediate.} =
# this used to inject the 'str' parameter:
proc res(str: string) =
body
doIt:
echo str # Error: undeclared identifier: 'str'
Declare the ``doIt`` template as ``immediate, dirty`` to get the old
behaviour.
- Tuple field names are not ignored anymore, this caused too many problems
in practice so now the behaviour as it was for version 0.9.6: If field
names exist for the tuple type, they are checked.
- ``logging.level`` and ``logging.handlers`` are no longer exported.
``addHandler``, ``getHandlers``, ``setLogFilter`` and ``getLogFilter``
should be used instead.
- ``nim idetools`` has been replaced by a separate tool `nimsuggest`_.
- *arrow like* operators are not right associative anymore.
- Typeless parameters are now only allowed in templates and macros. The old
way turned out to be too error-prone.
- The 'addr' and 'type' operators are now parsed as unary function
application. This means ``type(x).name`` is now parsed as ``(type(x)).name``
and not as ``type((x).name)``. Note that this also affects the AST
structure; for immediate macro parameters ``nkCall('addr', 'x')`` is
produced instead of ``nkAddr('x')``.
- ``concept`` is now a keyword and is used instead of ``generic``.
- The ``inc``, ``dec``, ``+=``, ``-=`` builtins now produce OverflowError
exceptions. This means code like the following:
.. code-block:: nim
var x = low(T)
while x <= high(T):
echo x
inc x
Needs to be replaced by something like this:
.. code-block:: nim
var x = low(T).int
while x <= high(T).int:
echo x.T
inc x
- **Negative indexing for slicing does not work anymore!** Instead
of ``a[0.. -1]`` you can
use ``a[0.. ^1]``. This also works with accessing a single
element ``a[^1]``. Note that we cannot detect this reliably as it is
determined at **runtime** whether negative indexing is used!
``a[0.. -1]`` now produces the empty string/sequence.
- The compiler now warns about code like ``foo +=1`` which uses inconsistent
spacing around binary operators. Later versions of the language will parse
these as unary operators instead so that ``echo $foo`` finally can do what
people expect it to do.
- ``system.untyped`` and ``system.typed`` have been introduced as aliases
for ``expr`` and ``stmt``. The new names capture the semantics much better
and most likely ``expr`` and ``stmt`` will be deprecated in favor of the
new names.
- The ``split`` method in module ``re`` has changed. It now handles the case
of matches having a length of 0, and empty strings being yielded from the
iterator. A notable change might be that a pattern being matched at the
beginning and end of a string, will result in an empty string being produced
at the start and the end of the iterator.
Language Additions
------------------
- For empty ``case object`` branches ``discard`` can finally be used instead
of ``nil``.
- Automatic dereferencing is now done for the first argument of a routine
call if overloading resolution produces no match otherwise. This feature
has to be enabled with the `experimental`_ pragma.
- Objects that do not use inheritance nor ``case`` can be put into ``const``
sections. This means that finally this is possible and produces rather
nice code:
.. code-block:: nim
import tables
const
foo = {"ah": "finally", "this": "is", "possible.": "nice!"}.toTable()
- Ordinary parameters can follow after a varargs parameter. This means the
following is finally accepted by the compiler:
.. code-block:: nim
template takesBlock(a, b: int, x: varargs[expr]; blck: stmt) =
blck
echo a, b
takesBlock 1, 2, "some", 0.90, "random stuff":
echo "yay"
- Overloading by 'var T' is now finally possible:
.. code-block:: nim
proc varOrConst(x: var int) = echo "var"
proc varOrConst(x: int) = echo "const"
var x: int
varOrConst(x) # "var"
varOrConst(45) # "const"
- Array and seq indexing can now use the builtin ``^`` operator to access
things from backwards: ``a[^1]`` is like Python's ``a[-1]``.
- A first version of the specification and implementation of the overloading
of the assignment operator has arrived!
Library additions
-----------------
- ``reversed`` proc added to the ``unicode`` module.
- Added multipart param to httpclient's ``post`` and ``postContent`` together
with a ``newMultipartData`` proc.
- Added `%*` operator for JSON.
- The compiler is now available as Nimble package for c2nim.
Bugfixes
--------
- Fixed internal compiler error when using ``char()`` in an echo call
(`#1788 <https://github.com/Araq/Nim/issues/1788>`_).
- Fixed Windows cross-compilation on Linux.
- Overload resolution now works for types distinguished only by a
``static[int]`` param
(`#1056 <https://github.com/Araq/Nim/issues/1056>`_).
- Other fixes relating to generic types and static params.
- Fixed some compiler crashes with unnamed tuples
(`#1774 <https://github.com/Araq/Nim/issues/1774>`_).
- Fixed ``channels.tryRecv`` blocking
(`#1816 <https://github.com/Araq/Nim/issues/1816>`_).
- Fixed generic instantiation errors with ``typedesc``
(`#419 <https://github.com/Araq/Nim/issues/419>`_).
- Fixed generic regression where the compiler no longer detected constant
expressions properly (`#544 <https://github.com/Araq/Nim/issues/544>`_).
- Fixed internal error with generic proc using ``static[T]`` in a specific
way (`#1049 <https://github.com/Araq/Nim/issues/1049>`_).
- More fixes relating to generics
(`#1820 <https://github.com/Araq/Nim/issues/1820>`_,
`#1050 <https://github.com/Araq/Nim/issues/1050>`_,
`#1859 <https://github.com/Araq/Nim/issues/1859>`_,
`#1858 <https://github.com/Araq/Nim/issues/1858>`_).
- Fixed httpclient to properly encode queries.
- Many fixes to the ``uri`` module.
- Async sockets are now closed on error.
- Fixes to httpclient's handling of multipart data.
- Fixed GC segfaults with asynchronous sockets
(`#1796 <https://github.com/Araq/Nim/issues/1796>`_).
- Added more versions to openssl's DLL version list
(`076f993 <https://github.com/Araq/Nim/commit/076f993>`_).
- Fixed shallow copy in iterators being broken
(`#1803 <https://github.com/Araq/Nim/issues/1803>`_).
- ``nil`` can now be inserted into tables with the ``db_sqlite`` module
(`#1866 <https://github.com/Araq/Nim/issues/1866>`_).
- Fixed "Incorrect assembler generated"
(`#1907 <https://github.com/Araq/Nim/issues/1907>`_)
- Fixed "Expression templates that define macros are unusable in some contexts"
(`#1903 <https://github.com/Araq/Nim/issues/1903>`_)
- Fixed "a second level generic subclass causes the compiler to crash"
(`#1919 <https://github.com/Araq/Nim/issues/1919>`_)
- Fixed "nim 0.10.2 generates invalid AsyncHttpClient C code for MSVC "
(`#1901 <https://github.com/Araq/Nim/issues/1901>`_)
- Fixed "1 shl n produces wrong C code"
(`#1928 <https://github.com/Araq/Nim/issues/1928>`_)
- Fixed "Internal error on tuple yield"
(`#1838 <https://github.com/Araq/Nim/issues/1838>`_)
- Fixed "ICE with template"
(`#1915 <https://github.com/Araq/Nim/issues/1915>`_)
- Fixed "include the tool directory in the installer as it is required by koch"
(`#1947 <https://github.com/Araq/Nim/issues/1947>`_)
- Fixed "Can't compile if file location contains spaces on Windows"
(`#1955 <https://github.com/Araq/Nim/issues/1955>`_)
- Fixed "List comprehension macro only supports infix checks as guards"
(`#1920 <https://github.com/Araq/Nim/issues/1920>`_)
- Fixed "wrong field names of compatible tuples in generic types"
(`#1910 <https://github.com/Araq/Nim/issues/1910>`_)
- Fixed "Macros within templates no longer work as expected"
(`#1944 <https://github.com/Araq/Nim/issues/1944>`_)
- Fixed "Compiling for Standalone AVR broken in 0.10.2"
(`#1964 <https://github.com/Araq/Nim/issues/1964>`_)
- Fixed "Compiling for Standalone AVR broken in 0.10.2"
(`#1964 <https://github.com/Araq/Nim/issues/1964>`_)
- Fixed "Code generation for mitems with tuple elements"
(`#1833 <https://github.com/Araq/Nim/issues/1833>`_)
- Fixed "httpclient.HttpMethod should not be an enum"
(`#1962 <https://github.com/Araq/Nim/issues/1962>`_)
- Fixed "terminal / eraseScreen() throws an OverflowError"
(`#1906 <https://github.com/Araq/Nim/issues/1906>`_)
- Fixed "setControlCHook(nil) disables registered quit procs"
(`#1546 <https://github.com/Araq/Nim/issues/1546>`_)
- Fixed "Unexpected idetools behaviour"
(`#325 <https://github.com/Araq/Nim/issues/325>`_)
- Fixed "Unused lifted lambda does not compile"
(`#1642 <https://github.com/Araq/Nim/issues/1642>`_)
- Fixed "'low' and 'high' don't work with cstring asguments"
(`#2030 <https://github.com/Araq/Nim/issues/2030>`_)
- Fixed "Converting to int does not round in JS backend"
(`#1959 <https://github.com/Araq/Nim/issues/1959>`_)
- Fixed "Internal error genRecordField 2 when adding region to pointer."
(`#2039 <https://github.com/Araq/Nim/issues/2039>`_)
- Fixed "Macros fail to compile when compiled with --os:standalone"
(`#2041 <https://github.com/Araq/Nim/issues/2041>`_)
- Fixed "Reading from {.compileTime.} variables can cause code generation to fail"
(`#2022 <https://github.com/Araq/Nim/issues/2022>`_)
- Fixed "Passing overloaded symbols to templates fails inside generic procedures"
(`#1988 <https://github.com/Araq/Nim/issues/1988>`_)
- Fixed "Compiling iterator with object assignment in release mode causes "var not init""
(`#2023 <https://github.com/Araq/Nim/issues/2023>`_)
- Fixed "calling a large number of macros doing some computation fails"
(`#1989 <https://github.com/Araq/Nim/issues/1989>`_)
- Fixed "Can't get Koch to install nim under Windows"
(`#2061 <https://github.com/Araq/Nim/issues/2061>`_)
- Fixed "Template with two stmt parameters segfaults compiler"
(`#2057 <https://github.com/Araq/Nim/issues/2057>`_)
- Fixed "`noSideEffect` not affected by `echo`"
(`#2011 <https://github.com/Araq/Nim/issues/2011>`_)
- Fixed "Compiling with the cpp backend ignores --passc"
(`#1601 <https://github.com/Araq/Nim/issues/1601>`_)
- Fixed "Put untyped procedure parameters behind the experimental pragma"
(`#1956 <https://github.com/Araq/Nim/issues/1956>`_)
- Fixed "generic regression"
(`#2073 <https://github.com/Araq/Nim/issues/2073>`_)
- Fixed "generic regression"
(`#2073 <https://github.com/Araq/Nim/issues/2073>`_)
- Fixed "Regression in template lookup with generics"
(`#2004 <https://github.com/Araq/Nim/issues/2004>`_)
- Fixed "GC's growObj is wrong for edge cases"
(`#2070 <https://github.com/Araq/Nim/issues/2070>`_)
- Fixed "Compiler internal error when creating an array out of a typeclass"
(`#1131 <https://github.com/Araq/Nim/issues/1131>`_)
- Fixed "GC's growObj is wrong for edge cases"
(`#2070 <https://github.com/Araq/Nim/issues/2070>`_)
- Fixed "Invalid Objective-C code generated when calling class method"
(`#2068 <https://github.com/Araq/Nim/issues/2068>`_)
- Fixed "walkDirRec Error"
(`#2116 <https://github.com/Araq/Nim/issues/2116>`_)
- Fixed "Typo in code causes compiler SIGSEGV in evalAtCompileTime"
(`#2113 <https://github.com/Araq/Nim/issues/2113>`_)
- Fixed "Regression on exportc"
(`#2118 <https://github.com/Araq/Nim/issues/2118>`_)
- Fixed "Error message"
(`#2102 <https://github.com/Araq/Nim/issues/2102>`_)
- Fixed "hint[path] = off not working in nim.cfg"
(`#2103 <https://github.com/Araq/Nim/issues/2103>`_)
- Fixed "compiler crashes when getting a tuple from a sequence of generic tuples"
(`#2121 <https://github.com/Araq/Nim/issues/2121>`_)
- Fixed "nim check hangs with when"
(`#2123 <https://github.com/Araq/Nim/issues/2123>`_)
- Fixed "static[T] param in nested type resolve/caching issue"
(`#2125 <https://github.com/Araq/Nim/issues/2125>`_)
- Fixed "repr should display ``\0``"
(`#2124 <https://github.com/Araq/Nim/issues/2124>`_)
- Fixed "'nim check' never ends in case of recursive dependency "
(`#2051 <https://github.com/Araq/Nim/issues/2051>`_)
- Fixed "From macros: Error: unhandled exception: sons is not accessible"
(`#2167 <https://github.com/Araq/Nim/issues/2167>`_)
- Fixed "`fieldPairs` doesn't work inside templates"
(`#1902 <https://github.com/Araq/Nim/issues/1902>`_)
- Fixed "fields iterator misbehavior on break statement"
(`#2134 <https://github.com/Araq/Nim/issues/2134>`_)
- Fixed "Fix for compiler not building anymore since #c3244ef1ff"
(`#2193 <https://github.com/Araq/Nim/issues/2193>`_)
- Fixed "JSON parser fails in cpp output mode"
(`#2199 <https://github.com/Araq/Nim/issues/2199>`_)
- Fixed "macros.getType mishandles void return"
(`#2211 <https://github.com/Araq/Nim/issues/2211>`_)
- Fixed "Regression involving templates instantiated within generics"
(`#2215 <https://github.com/Araq/Nim/issues/2215>`_)
- Fixed ""Error: invalid type" for 'not nil' on generic type."
(`#2216 <https://github.com/Araq/Nim/issues/2216>`_)
- Fixed "--threads:on breaks async"
(`#2074 <https://github.com/Araq/Nim/issues/2074>`_)
- Fixed "Type mismatch not always caught, can generate bad code for C backend."
(`#2169 <https://github.com/Araq/Nim/issues/2169>`_)
- Fixed "Failed C compilation when storing proc to own type in object"
(`#2233 <https://github.com/Araq/Nim/issues/2233>`_)
- Fixed "Unknown line/column number in constant declaration type conversion error"
(`#2252 <https://github.com/Araq/Nim/issues/2252>`_)
- Fixed "Adding {.compile.} fails if nimcache already exists."
(`#2247 <https://github.com/Araq/Nim/issues/2247>`_)
- Fixed "Two different type names generated for a single type (C backend)"
(`#2250 <https://github.com/Araq/Nim/issues/2250>`_)
- Fixed "Ambigous call when it should not be"
(`#2229 <https://github.com/Araq/Nim/issues/2229>`_)
- Fixed "Make sure we can load root urls"
(`#2227 <https://github.com/Araq/Nim/issues/2227>`_)
- Fixed "Failure to slice a string with an int subrange type"
(`#794 <https://github.com/Araq/Nim/issues/794>`_)
- Fixed "documentation error"
(`#2205 <https://github.com/Araq/Nim/issues/2205>`_)
- Fixed "Code growth when using `const`"
(`#1940 <https://github.com/Araq/Nim/issues/1940>`_)
- Fixed "Instances of generic types confuse overload resolution"
(`#2220 <https://github.com/Araq/Nim/issues/2220>`_)
- Fixed "Compiler error when initializing sdl2's EventType"
(`#2316 <https://github.com/Araq/Nim/issues/2316>`_)
- Fixed "Parallel disjoint checking can't handle `<`, `items`, or arrays"
(`#2287 <https://github.com/Araq/Nim/issues/2287>`_)
- Fixed "Strings aren't copied in parallel loop"
(`#2286 <https://github.com/Araq/Nim/issues/2286>`_)
- Fixed "JavaScript compiler crash with tables"
(`#2298 <https://github.com/Araq/Nim/issues/2298>`_)
- Fixed "Range checker too restrictive"
(`#1845 <https://github.com/Araq/Nim/issues/1845>`_)
- Fixed "Failure to slice a string with an int subrange type"
(`#794 <https://github.com/Araq/Nim/issues/794>`_)
- Fixed "Remind user when compiling in debug mode"
(`#1868 <https://github.com/Araq/Nim/issues/1868>`_)
- Fixed "Compiler user guide has jumbled options/commands."
(`#1819 <https://github.com/Araq/Nim/issues/1819>`_)
- Fixed "using `method`: 1 in a objects constructor fails when compiling"
(`#1791 <https://github.com/Araq/Nim/issues/1791>`_)
2014-12-29 Version 0.10.2 released
==================================
This release marks the completion of a very important change to the project:
the official renaming from Nimrod to Nim. Version 0.10.2 contains many language
changes, some of which may break your existing code. For your convenience, we
added a new tool called `nimfix <nimfix.html>`_ that will help you convert your
existing projects so that it works with the latest version of the compiler.
Progress towards version 1.0
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Although Nim is still pre-1.0, we were able to keep the number of breaking
changes to a minimum so far. Starting with version 1.0, we will not introduce
any breaking changes between major release versions.
One of Nim's goals is to ensure that the compiler is as efficient as possible.
Take a look at the
`latest benchmarks <https://github.com/logicchains/LPATHBench/blob/master/writeup.md>`_,
which show that Nim is consistently near
the top and already nearly as fast as C and C++. Recent developments, such as
the new ``asyncdispatch`` module will allow you to write efficient web server
applications using non-blocking code. Nim now also has a built-in thread pool
for lightweight threading through the use of ``spawn``.
The unpopular "T" and "P" prefixes on types have been deprecated. Nim also
became more expressive by weakening the distinction between statements and
expressions. We also added a new and searchable forum, a new website, and our
documentation generator ``docgen`` has seen major improvements. Many thanks to
Nick Greenfield for the much more beautiful documentation!
What's left to be done
~~~~~~~~~~~~~~~~~~~~~~
The 1.0 release is actually very close. Apart from bug fixes, there are
two major features missing or incomplete:
* ``static[T]`` needs to be defined precisely and the bugs in the
implementation need to be fixed.
* Overloading of the assignment operator is required for some generic
containers and needs to be implemented.
This means that fancy matrix libraries will finally start to work, which used
to be a major point of pain in the language.
Nimble and other Nim tools
~~~~~~~~~~~~~~~~~~~~~~~~~~
Outside of the language and the compiler itself many Nim tools have seen
considerable improvements.
Babel the Nim package manager has been renamed to Nimble. Nimble's purpose
is the installation of packages containing libraries and/or applications
written in Nim.
Even though Nimble is still very young it already is very
functional. It can install packages by name, it does so by accessing a
packages repository which is hosted on a Github repo. Packages can also be
installed via a Git repo URL or Mercurial repo URL. The package repository
is searchable through Nimble. Anyone is free to add their own packages to
the package repository by forking the
`nim-lang/packages <https://github.com/nim-lang/packages>`_ repo and creating
a pull request. Nimble is fully cross-platform and should be fully functional
on all major operating systems.
It is of course completely written in Nim.
Changelog
~~~~~~~~~
Changes affecting backwards compatibility
-----------------------------------------
- **The language has been renamed from Nimrod to Nim.** The name of the
compiler changed from ``nimrod`` to ``nim`` too.
- ``system.fileHandle`` has been renamed to ``system.getFileHandle`` to
prevent name conflicts with the new type ``FileHandle``.
- Comments are now not part of the AST anymore, as such you cannot use them
in place of ``discard``.
- Large parts of the stdlib got rid of the T/P type prefixes. Instead most
types now simply start with an uppercased letter. The
so called "partial case sensitivity" rule is now active allowing for code
like ``var foo: Foo`` in more contexts.
- String case (or any non-ordinal case) statements
without 'else' are deprecated.
- Recursive tuple types are not allowed anymore. Use ``object`` instead.
- The PEGS module returns ``nil`` instead of ``""`` when an optional capture
fails to match.
- The re module returns ``nil`` instead of ``""`` when an optional capture
fails to match.
- The "symmetric set difference" operator (``-+-``) never worked and has been
removed.
- ``defer`` is a keyword now.
- ``func`` is a keyword now.
- The ``using`` language feature now needs to be activated via the new
``{.experimental.}`` pragma that enables experimental language features.
- Destructors are now officially *experimental*.
- Standalone ``except`` and ``finally`` statements are deprecated now.
The standalone ``finally`` can be replaced with ``defer``,
standalone ``except`` requires an explicit ``try``.
- Operators ending in ``>`` are considered as "arrow like" and have their
own priority level and are right associative. This means that
the ``=>`` and ``->`` operators from the `future <future.html>`_ module
work better.
- Field names in tuples are now ignored for type comparisons. This allows
for greater interoperability between different modules.
- Statement lists are not converted to an implicit ``do`` block anymore. This
means the confusing ``nnkDo`` nodes when working with macros are gone for
good.
Language Additions
------------------
- The new concurrency model has been implemented including ``locks`` sections,
lock levels and object field ``guards``.
- The ``parallel`` statement has been implemented.
- ``deepCopy`` has been added to the language.
- The builtin ``procCall`` can be used to get ``super``-like functionality
for multi methods.
- There is a new pragma ``{.experimental.}`` that enables experimental
language features per module, or you can enable these features on a global
level with the ``--experimental`` command line option.
Compiler Additions
------------------
- The compiler now supports *mixed* Objective C / C++ / C code generation:
The modules that use ``importCpp`` or ``importObjc`` are compiled to C++
or Objective C code, any other module is compiled to C code. This
improves interoperability.
- There is a new ``parallel`` statement for safe fork&join parallel computing.
- ``guard`` and ``lock`` pragmas have been implemented to support safer
concurrent programming.
- The following procs are now available at compile-time::
math.sqrt, math.ln, math.log10, math.log2, math.exp, math.round,
math.arccos, math.arcsin, math.arctan, math.arctan2, math.cos,
math.cosh, math.hypot, math.sinh, math.sin, math.tan, math.tanh,
math.pow, math.trunc, math.floor, math.ceil, math.fmod,
os.getEnv, os.existsEnv, os.dirExists, os.fileExists,
system.writeFile
- Two backticks now produce a single backtick within an ``emit`` or ``asm``
statement.
- There is a new tool, `nimfix <nimfix.html>`_ to help you in updating your
code from Nimrod to Nim.
- The compiler's output has been prettified.
Library Additions
-----------------
- Added module ``fenv`` to control the handling of floating-point rounding and
exceptions (overflow, division by zero, etc.).
- ``system.setupForeignThreadGc`` can be used for better interaction with
foreign libraries that create threads and run a Nim callback from these
foreign threads.
- List comprehensions have been implemented as a macro in the ``future``
module.
- The new Async module (``asyncnet``) now supports SSL.
- The ``smtp`` module now has an async implementation.
- Added module ``asyncfile`` which implements asynchronous file reading
and writing.
- ``osproc.kill`` has been added.
- ``asyncnet`` and ``asynchttpserver`` now support ``SO_REUSEADDR``.
Bugfixes
--------
- ``nil`` and ``NULL`` are now preserved between Nim and databases in the
``db_*`` modules.
- Fixed issue with OS module in non-unicode mode on Windows.
- Fixed issue with ``x.low``
(`#1366 <https://github.com/Araq/Nim/issues/1366>`_).
- Fixed tuple unpacking issue inside closure iterators
(`#1067 <https://github.com/Araq/Nim/issues/1067>`_).
- Fixed ENDB compilation issues.
- Many ``asynchttpserver`` fixes.
- Macros can now keep global state across macro calls
(`#903 <https://github.com/Araq/Nim/issues/903>`_).
- ``osproc`` fixes on Windows.
- ``osproc.terminate`` fixed.
- Improvements to exception handling in async procedures.
(`#1487 <https://github.com/Araq/Nim/issues/1487>`_).
- ``try`` now works at compile-time.
- Fixes ``T = ref T`` to be an illegal recursive type.
- Self imports are now disallowed.
- Improved effect inference.
- Fixes for the ``math`` module on Windows.
- User defined pragmas will now work for generics that have
been instantiated in different modules.
- Fixed queue exhaustion bug.
- Many, many more.
2014-12-09 New website design!
==============================
A brand new website including an improved forum is now live.
All thanks go to Philip Witte and
Dominik Picheta, Philip Witte for the design of the website (together with
the logo) as well as the HTML and CSS code for his template, and Dominik Picheta
for integrating Philip's design with Nim's forum. We're sure you will
agree that Philip's design is beautiful.
2014-10-19 Version 0.9.6 released
=================================
**Note: 0.9.6 is the last release of Nimrod. The language is being renamed to
Nim. Nim slightly breaks compatibility.**
This is a maintenance release. The upcoming 0.10.0 release has
the new features and exciting developments.
Changes affecting backwards compatibility
-----------------------------------------
- ``spawn`` now uses an elaborate self-adapting thread pool and as such
has been moved into its own module. So to use it, you now have to import
``threadpool``.
- The symbol binding rules in generics changed: ``bar`` in ``foo.bar`` is
now considered for implicit early binding.
- ``c2nim`` moved into its own repository and is now a Babel package.
- ``pas2nim`` moved into its own repository and is now a Babel package.
- ``system.$`` for floating point types now produces a human friendly string
representation.
- ``uri.TUrl`` as well as the ``parseurl`` module are now deprecated in favour
of the new ``TUri`` type in the ``uri`` module.
- The ``destructor`` pragma has been deprecated. Use the ``override`` pragma
instead. The destructor's name has to be ``destroy`` now.
- ``lambda`` is not a keyword anymore.
- **system.defined has been split into system.defined and system.declared**.
You have to use ``--symbol`` to declare new conditional symbols that can be
set via ``--define``.
- ``--threadanalysis:on`` is now the default. To make your program compile
you can disable it but this is only a temporary solution as this option
will disappear soon!
Compiler improvements
---------------------
- Multi method dispatching performance has been improved by a factor of 10x for
pathological cases.
Language Additions
------------------
- This version introduces the ``deprecated`` pragma statement that is used
to handle the upcoming massive amount of symbol renames.
- ``spawn`` can now wrap proc that has a return value. It then returns a data
flow variable of the wrapped return type.
Library Additions
-----------------
- Added module ``cpuinfo``.
- Added module ``threadpool``.
- ``sequtils.distnct`` has been renamed to ``sequtils.deduplicate``.
- Added ``algorithm.reversed``
- Added ``uri.combine`` and ``uri.parseUri``.
- Some sockets procedures now support a ``SafeDisconn`` flag which causes
them to handle disconnection errors and not raise them.
2014-04-21 Version 0.9.4 released
=================================
The Nimrod development community is proud to announce the release of version
0.9.4 of the Nimrod compiler and tools. **Note: This release has to be
considered beta quality! Lots of new features have been implemented but
unfortunately some do not fulfill our quality standards yet.**
Prebuilt binaries and instructions for building from source are available
on the `download page <download.html>`_.
This release includes about
`1400 changes <https://github.com/Araq/Nimrod/compare/v0.9.2...v0.9.4>`_
in total including various bug
fixes, new languages features and standard library additions and improvements.
This release brings with it support for user-defined type classes, a brand
new VM for executing Nimrod code at compile-time and new symbol binding
rules for clean templates.
It also introduces support for the brand new
`Babel package manager <https://github.com/nimrod-code/babel>`_ which
has itself seen its first release recently. Many of the wrappers that were
present in the standard library have been moved to separate repositories
and should now be installed using Babel.
Apart from that a new **experimental** Asynchronous IO API has been added via
the ``asyncdispatch`` and ``asyncnet`` modules. The ``net`` and ``rawsockets``
modules have also been added and they will likely replace the sockets
module in the next release. The Asynchronous IO API has been designed to
take advantage of Linux's epoll and Windows' IOCP APIs, support for BSD's
kqueue has not been implemented yet but will be in the future.
The Asynchronous IO API provides both
a callback interface and an interface which allows you to write code as you
would if you were writing synchronous code. The latter is done through
the use of an ``await`` macro which behaves similar to C#'s await. The
following is a very simple chat server demonstrating Nimrod's new async
capabilities.
.. code-block::nim
import asyncnet, asyncdispatch
var clients: seq[PAsyncSocket] = @[]
proc processClient(client: PAsyncSocket) {.async.} =
while true:
let line = await client.recvLine()
for c in clients:
await c.send(line & "\c\L")
proc serve() {.async.} =
var server = newAsyncSocket()
server.bindAddr(TPort(12345))
server.listen()
while true:
let client = await server.accept()
clients.add client
processClient(client)
serve()
runForever()
Note that this feature has been implemented with Nimrod's macro system and so
``await`` and ``async`` are no keywords.
Syntactic sugar for anonymous procedures has also been introduced. It too has
been implemented as a macro. The following shows some simple usage of the new
syntax:
.. code-block::nim
import future
var s = @[1, 2, 3, 4, 5]
echo(s.map((x: int) => x * 5))
A list of changes follows, for a comprehensive list of changes take a look
`here <https://github.com/Araq/Nimrod/compare/v0.9.2...v0.9.4>`_.
Library Additions
-----------------
- Added ``macros.genSym`` builtin for AST generation.
- Added ``macros.newLit`` procs for easier AST generation.
- Added module ``logging``.
- Added module ``asyncdispatch``.
- Added module ``asyncnet``.
- Added module ``net``.
- Added module ``rawsockets``.
- Added module ``selectors``.
- Added module ``asynchttpserver``.
- Added support for the new asynchronous IO in the ``httpclient`` module.
- Added a Python-inspired ``future`` module that features upcoming additions
to the ``system`` module.
Changes affecting backwards compatibility
-----------------------------------------
- The scoping rules for the ``if`` statement changed for better interaction
with the new syntactic construct ``(;)``.
- ``OSError`` family of procedures has been deprecated. Procedures with the same
name but which take different parameters have been introduced. These procs now
require an error code to be passed to them. This error code can be retrieved
using the new ``OSLastError`` proc.
- ``os.parentDir`` now returns "" if there is no parent dir.
- In CGI scripts stacktraces are shown to the user only
if ``cgi.setStackTraceStdout`` is used.
- The symbol binding rules for clean templates changed: ``bind`` for any
symbol that's not a parameter is now the default. ``mixin`` can be used
to require instantiation scope for a symbol.
- ``quoteIfContainsWhite`` now escapes argument in such way that it can be safely
passed to shell, instead of just adding double quotes.
- ``macros.dumpTree`` and ``macros.dumpLisp`` have been made ``immediate``,
``dumpTreeImm`` and ``dumpLispImm`` are now deprecated.
- The ``nil`` statement has been deprecated, use an empty ``discard`` instead.
- ``sockets.select`` now prunes sockets that are **not** ready from the list
of sockets given to it.
- The ``noStackFrame`` pragma has been renamed to ``asmNoStackFrame`` to
ensure you only use it when you know what you're doing.
- Many of the wrappers that were present in the standard library have been
moved to separate repositories and should now be installed using Babel.
Compiler Additions
------------------
- The compiler can now warn about "uninitialized" variables. (There are no
real uninitialized variables in Nimrod as they are initialized to binary
zero). Activate via ``{.warning[Uninit]:on.}``.
- The compiler now enforces the ``not nil`` constraint.
- The compiler now supports a ``codegenDecl`` pragma for even more control
over the generated code.
- The compiler now supports a ``computedGoto`` pragma to support very fast
dispatching for interpreters and the like.
- The old evaluation engine has been replaced by a proper register based
virtual machine. This fixes numerous bugs for ``nimrod i`` and for macro
evaluation.
- ``--gc:none`` produces warnings when code uses the GC.
- A ``union`` pragma for better C interoperability is now supported.
- A ``packed`` pragma to control the memory packing/alignment of fields in
an object.
- Arrays can be annotated to be ``unchecked`` for easier low level
manipulations of memory.
- Support for the new Babel package manager.
Language Additions
------------------
- Arrays can now be declared with a single integer literal ``N`` instead of a
range; the range is then ``0..N-1``.
- Added ``requiresInit`` pragma to enforce explicit initialization.
- Exported templates are allowed to access hidden fields.
- The ``using statement`` enables you to more easily author domain-specific
languages and libraries providing OOP-like syntactic sugar.
- Added the possibility to override various dot operators in order to handle
calls to missing procs and reads from undeclared fields at compile-time.
- The overload resolution now supports ``static[T]`` params that must be
evaluable at compile-time.
- Support for user-defined type classes has been added.
- The *command syntax* is supported in a lot more contexts.
- Anonymous iterators are now supported and iterators can capture variables
of an outer proc.
- The experimental ``strongSpaces`` parsing mode has been implemented.
- You can annotate pointer types with regions for increased type safety.
- Added support for the builtin ``spawn`` for easy thread pool usage.
Tools improvements
------------------
- c2nim can deal with a subset of C++. Use the ``--cpp`` command line option
to activate.
2014-02-11 Nimrod Featured in Dr. Dobb's Journal
================================================
Nimrod has been `featured<http://www.drdobbs.com/open-source/nimrod-a-new-systems-programming-languag/240165321>`_
as the cover story in the February 2014 issue of Dr. Dobb's Journal.
2014-01-15 Andreas Rumpf's talk on Nimrod at Strange Loop 2013 is now online
============================================================================
Andreas Rumpf presented *Nimrod: A New Approach to Metaprogramming* at
`Strange Loop 2013<https://thestrangeloop.com/sessions/nimrod-a-new-approach-to-meta-programming>`_.
The `video and slides<http://www.infoq.com/presentations/nimrod>`_
of the talk are now available.
2013-05-20 New website design!
==============================
A brand new website is now live. All thanks go to Philip Witte and
Dominik Picheta, Philip Witte for the design of the website (together with
the logo) as well as the HTML and CSS code for his template, and Dominik Picheta
for integrating Philip's design with the ``nimweb`` utility. We're sure you will
agree that Philip's design is beautiful.
2013-05-20 Version 0.9.2 released
=================================
We are pleased to announce that version 0.9.2 of the Nimrod compiler has been
released. This release has attracted by far the most contributions in comparison
to any other release.
This release brings with it many new features and bug fixes, a list of which
can be seen later. One of the major new features is the effect system together
with exception tracking which allows for checked exceptions and more,
for further details check out the `manual <manual.html#effect-system>`_.
Another major new feature is the introduction of statement list expressions,
more details on these can be found `here <manual.html#statement-list-expression>`_.
The ability to exclude symbols from modules has also been
implemented, this feature can be used like so: ``import module except symbol``.
Thanks to all `contributors <https://github.com/Araq/Nimrod/contributors>`_!
Bugfixes
--------
- The old GC never collected cycles correctly. Fixed but it can cause
performance regressions. However you can deactivate the cycle collector
with ``GC_disableMarkAndSweep`` and run it explicitly at an appropriate time
or not at all. There is also a new GC you can activate
with ``--gc:markAndSweep`` which does not have this problem but is slower in
general and has no realtime guarantees.
- ``cast`` for floating point types now does the bitcast as specified in the
manual. This breaks code that erroneously uses ``cast`` to convert different
floating point values.
- SCGI module's performance has been improved greatly, it will no longer block
on many concurrent requests.
- In total fixed over 70 github issues and merged over 60 pull requests.
Library Additions
-----------------
- There is a new experimental mark&sweep GC which can be faster (or much
slower) than the default GC. Enable with ``--gc:markAndSweep``.
- Added ``system.onRaise`` to support a condition system.
- Added ``system.locals`` that provides access to a proc's locals.
- Added ``macros.quote`` for AST quasi-quoting.
- Added ``system.unsafeNew`` to support hacky variable length objects.
- ``system.fields`` and ``system.fieldPairs`` support ``object`` too; they
used to only support tuples.
- Added ``system.CurrentSourcePath`` returning the full file-system path of
the current source file.
- The ``macros`` module now contains lots of useful helpers for building up
abstract syntax trees.
Changes affecting backwards compatibility
-----------------------------------------
- ``shared`` is a keyword now.
- Deprecated ``sockets.recvLine`` and ``asyncio.recvLine``, added
``readLine`` instead.
- The way indentation is handled in the parser changed significantly. However,
this affects very little (if any) real world code.
- The expression/statement unification has been implemented. Again this
only affects edge cases and no known real world code.
- Changed the async interface of the ``scgi`` module.
- WideStrings are now garbage collected like other string types.
Compiler Additions
------------------
- The ``doc2`` command does not generate output for the whole project anymore.
Use the new ``--project`` switch to enable this behaviour.
- The compiler can now warn about shadowed local variables. However, this needs
to be turned on explicitly via ``--warning[ShadowIdent]:on``.
- The compiler now supports almost every pragma in a ``push`` pragma.
- Generic converters have been implemented.
- Added a **highly experimental** ``noforward`` pragma enabling a special
compilation mode that largely eliminates the need for forward declarations.
Language Additions
------------------
- ``case expressions`` are now supported.
- Table constructors now mimic more closely the syntax of the ``case``
statement.
- Nimrod can now infer the return type of a proc from its body.
- Added a ``mixin`` declaration to affect symbol binding rules in generics.
- Exception tracking has been added and the ``doc2`` command annotates possible
exceptions for you.
- User defined effects ("tags") tracking has been added and the ``doc2``
command annotates possible tags for you.
- Types can be annotated with the new syntax ``not nil`` to explicitly state
that ``nil`` is not allowed. However currently the compiler performs no
advanced static checking for this; for now it's merely for documentation
purposes.
- An ``export`` statement has been added to the language: It can be used for
symbol forwarding so client modules don't have to import a module's
dependencies explicitly.
- Overloading based on ASTs has been implemented.
- Generics are now supported for multi methods.
- Objects can be initialized via an *object constructor expression*.
- There is a new syntactic construct ``(;)`` unifying expressions and
statements.
- You can now use ``from module import nil`` if you want to import the module
but want to enforce fully qualified access to every symbol in ``module``.
Notes for the future
--------------------
- The scope rules of ``if`` statements will change in 0.9.4. This affects the
``=~`` pegs/re templates.
- The ``sockets`` module will become a low-level wrapper of OS-specific socket
functions. All the high-level features of the current ``sockets`` module
will be moved to a ``network`` module.
2012-09-23 Version 0.9.0 released
=================================
Summary
-------
* Unsigned integers have been added.
* The integer type promotion rules changed.
* The template and macro system evolved.
* Closures have been implemented.
* Term rewriting macros have been implemented.
* First steps to unify expressions and statements have been taken.
* Symbol lookup rules in generics have become stricter to catch more errors.
Bugfixes
--------
- Fixed a bug where the compiler would "optimize away" valid constant parts of
a string concatenation.
- Fixed a bug concerning implicit type conversions in ``case`` statements.
- Fixed a serious code generation bug that caused ``algorithm.sort`` to
produce segmentation faults.
- Fixed ambiguity in recvLine which meant that receiving ``\r\L`` was
indistinguishable from disconnections.
- Many more bugfixes, too many to list them all.
Library Additions
-----------------
- Added the (already existing) module ``htmlgen`` to the documentation.
- Added the (already existing) module ``cookies`` to the documentation.
- Added ``system.shallow`` that can be used to speed up string and sequence
assignments.
- Added ``system.eval`` that can execute an anonymous block of code at
compile time as if was a macro.
- Added ``system.staticExec`` and ``system.gorge`` for compile-time execution
of external programs.
- Added ``system.staticRead`` as a synonym for ``system.slurp``.
- Added ``macros.emit`` that can emit an arbitrary computed string as nimrod
code during compilation.
- Added ``strutils.parseEnum``.
- Added ``json.%`` constructor operator.
- The stdlib can now be avoided to a point where C code generation for 16bit
micro controllers is feasible.
- Added module ``oids``.
- Added module ``endians``.
- Added a new OpenGL wrapper that supports OpenGL up to version 4.2.
- Added a wrapper for ``libsvm``.
- Added a wrapper for ``mongodb``.
- Added ``terminal.isatty``.
- Added an overload for ``system.items`` that can be used to iterate over the
values of an enum.
- Added ``system.TInteger`` and ``system.TNumber`` type classes matching
any of the corresponding types available in Nimrod.
- Added ``system.clamp`` to limit a value within an interval ``[a, b]``.
- Added ``strutils.continuesWith``.
- Added ``system.getStackTrace``.
- Added ``system.||`` for parallel ``for`` loop support.
- The GC supports (soft) realtime systems via ``GC_setMaxPause``
and ``GC_step`` procs.
- The sockets module now supports ssl through the OpenSSL library, ``recvLine``
is now much more efficient thanks to the newly implemented sockets buffering.
- The httpclient module now supports ssl/tls.
- Added ``times.format`` as well as many other utility functions
for managing time.
- Added ``system.@`` for converting an ``openarray`` to a ``seq`` (it used to
only support fixed length arrays).
- Added ``system.compiles`` which can be used to check whether a type supports
some operation.
- Added ``strutils.format``, ``subexes.format`` which use the
new ``varargs`` type.
- Added module ``fsmonitor``.
Changes affecting backwards compatibility
-----------------------------------------
- On Windows filenames and paths are supposed to be in UTF-8.
The ``system``, ``os``, ``osproc`` and ``memfiles`` modules use the wide
string versions of the WinAPI. Use the ``-d:useWinAnsi`` switch to revert
back to the old behaviour which uses the Ansi string versions.
- ``static``, ``do``, ``interface`` and ``mixin`` are now keywords.
- Templates now participate in overloading resolution which can break code that
uses templates in subtle ways. Use the new ``immediate`` pragma for templates
to get a template of old behaviour.
- There is now a proper distinction in the type system between ``expr`` and
``PNimrodNode`` which unfortunately breaks the old macro system.
- ``pegs.@`` has been renamed to ``pegs.!*`` and ``pegs.@@`` has been renamed
to ``pegs.!*\`` as ``@`` operators now have different precedence.
- The type ``proc`` (without any params or return type) is now considered a
type class matching all proc types. Use ``proc ()`` to get the old meaning
denoting a proc expecing no arguments and returing no value.
- Deprecated ``system.GC_setStrategy``.
- ``re.findAll`` and ``pegs.findAll`` don't return *captures* anymore but
matching *substrings*.
- RTTI and thus the ``marshall`` module don't contain the proper field names
of tuples anymore. This had to be changed as the old behaviour never
produced consistent results.
- Deprecated the ``ssl`` module.
- Deprecated ``nimrod pretty`` as it never worked good enough and has some
inherent problems.
- The integer promotion rules changed; the compiler is now less picky in some
situations and more picky in other situations: In particular implicit
conversions from ``int`` to ``int32`` are now forbidden.
- ``system.byte`` is now an alias for ``uint8``; it used to be an alias
to ``int8``.
- ``bind`` expressions in templates are not properly supported anymore. Use
the declarative ``bind`` statement instead.
- The default calling convention for a procedural **type** is now ``closure``,
for procs it remains ``nimcall`` (which is compatible to ``closure``).
Activate the warning ``ImplicitClosure`` to make the compiler list the
occurrences of proc types which are affected.
- The Nimrod type system now distinguishes ``openarray`` from ``varargs``.
- Templates are now ``hygienic``. Use the ``dirty`` pragma to get the old
behaviour.
- Objects that have no ancestor are now implicitly ``final``. Use
the ``inheritable`` pragma to introduce new object roots apart
from ``TObject``.
- Macros now receive parameters like templates do; use the ``callsite`` builtin
to gain access to the invocation AST.
- Symbol lookup rules in generics have become stricter to catch more errors.
Compiler Additions
------------------
- Win64 is now an officially supported target.
- The Nimrod compiler works on BSD again, but has some issues
as ``os.getAppFilename`` and ``os.getAppDir`` cannot work reliably on BSD.
- The compiler can detect and evaluate calls that can be evaluated at compile
time for optimization purposes with the ``--implicitStatic`` command line
option or pragma.
- The compiler now generates marker procs that the GC can use instead of RTTI.
This speeds up the GC quite a bit.
- The compiler now includes a new advanced documentation generator
via the ``doc2`` command. This new generator uses all of the semantic passes
of the compiler and can thus generate documentation for symbols hiding in
macros.
- The compiler now supports the ``dynlib`` pragma for variables.
- The compiler now supports ``bycopy`` and ``byref`` pragmas that affect how
objects/tuples are passed.
- The embedded profiler became a stack trace profiler and has been documented.
Language Additions
------------------
- Added explicit ``static`` sections for enforced compile time evaluation.
- Added an alternative notation for lambdas with ``do``.
- ``addr`` is now treated like a prefix operator syntactically.
- Added ``global`` pragma that can be used to introduce new global variables
from within procs.
- ``when`` expressions are now allowed just like ``if`` expressions.
- The precedence for operators starting with ``@`` is different now
allowing for *sigil-like* operators.
- Stand-alone ``finally`` and ``except`` blocks are now supported.
- Macros and templates can now be invoked as pragmas.
- The apostrophe in type suffixes for numerical literals is now optional.
- Unsigned integer types have been added.
- The integer promotion rules changed.
- Nimrod now tracks proper intervals for ``range`` over some built-in operators.
- In parameter lists a semicolon instead of a comma can be used to improve
readability: ``proc divmod(a, b: int; resA, resB: var int)``.
- A semicolon can now be used to have multiple simple statements on a single
line: ``inc i; inc j``.
- ``bind`` supports overloaded symbols and operators.
- A ``distinct`` type can now borrow from generic procs.
- Added the pragmas ``gensym``, ``inject`` and ``dirty`` for hygiene
in templates.
- Comments can be continued with a backslash continuation character so that
comment pieces don't have to align on the same column.
- Enums can be annotated with ``pure`` so that their field names do not pollute
the current scope.
- A proc body can consist of an expression that has a type. This is rewritten
to ``result = expression`` then.
- Term rewriting macros (see `trmacros <http://nimrod-code.org/trmacros.html>`_)
have been implemented but are still in alpha.
2012-02-09 Version 0.8.14 released
==================================
Version 0.8.14 has been released!
Bugfixes
--------
- Fixed a serious memory corruption concerning message passing.
- Fixed a serious bug concerning different instantiations of a generic proc.
- Fixed a newly introduced bug where a wrong ``EIO`` exception was raised for
the end of file for text files that do not end with a newline.
- Bugfix c2nim, c2pas: the ``--out`` option has never worked properly.
- Bugfix: forwarding of generic procs never worked.
- Some more bugfixes for macros and compile-time evaluation.
- The GC now takes into account interior pointers on the stack which may be
introduced by aggressive C optimizers.
- Nimrod's native allocator/GC now works on PowerPC.
- Lots of other bugfixes: Too many to list them all.
Changes affecting backwards compatibility
-----------------------------------------
- Removed deprecated ``os.AppendFileExt``, ``os.executeShellCommand``,
``os.iterOverEnvironment``, ``os.pcDirectory``, ``os.pcLinkToDirectory``,
``os.SplitPath``, ``os.extractDir``, ``os.SplitFilename``,
``os.extractFileTrunk``, ``os.extractFileExt``, ``osproc.executeProcess``,
``osproc.executeCommand``.
- Removed deprecated ``parseopt.init``, ``parseopt.getRestOfCommandLine``.
- Moved ``strutils.validEmailAddress`` to ``matchers.validEmailAddress``.
- The pointer dereference operator ``^`` has been removed, so that ``^``
can now be a user-defined operator.
- ``implies`` is no keyword anymore.
- The ``is`` operator is now the ``of`` operator.
- The ``is`` operator is now used to check type equivalence in generic code.
- The ``pure`` pragma for procs has been renamed to ``noStackFrame``.
- The threading API has been completely redesigned.
- The ``unidecode`` module is now thread-safe and its interface has changed.
- The ``bind`` expression is deprecated, use a ``bind`` declaration instead.
- ``system.raiseHook`` is now split into ``system.localRaiseHook`` and
``system.globalRaiseHook`` to distinguish between thread local and global
raise hooks.
- Changed exception handling/error reporting for ``os.removeFile`` and
``os.removeDir``.
- The algorithm for searching and loading configuration files has been changed.
- Operators now have diffent precedence rules: Assignment-like operators
(like ``*=``) are now special-cased.
- The fields in ``TStream`` have been renamed to have an ``Impl`` suffix
because they should not be used directly anymore.
Wrapper procs have been created that should be used instead.
- ``export`` is now a keyword.
- ``assert`` is now implemented in pure Nimrod as a template; it's easy
to implement your own assertion templates with ``system.astToStr``.
Language Additions
------------------
- Added new ``is`` and ``of`` operators.
- The built-in type ``void`` can be used to denote the absence of any type.
This is useful in generic code.
- Return types may be of the type ``var T`` to return an l-value.
- The error pragma can now be used to mark symbols whose *usage* should trigger
a compile-time error.
- There is a new ``discardable`` pragma that can be used to mark a routine
so that its result can be discarded implicitly.
- Added a new ``noinit`` pragma to prevent automatic initialization to zero
of variables.
- Constants can now have the type ``seq``.
- There is a new user-definable syntactic construct ``a{i, ...}``
that has no semantics yet for built-in types and so can be overloaded to your
heart's content.
- ``bind`` (used for symbol binding in templates and generics) is now a
declarative statement.
- Nimrod now supports single assignment variables via the ``let`` statement.
- Iterators named ``items`` and ``pairs`` are implicitly invoked when
an explicit iterator is missing.
- The slice assignment ``a[i..j] = b`` where ``a`` is a sequence or string
now supports *splicing*.
Compiler Additions
------------------
- The compiler can generate C++ code for easier interfacing with C++.
- The compiler can generate Objective C code for easier interfacing with
Objective C.
- The new pragmas ``importcpp`` and ``importobjc`` make interfacing with C++
and Objective C somewhat easier.
- Added a new pragma ``incompleteStruct`` to deal with incomplete C struct
definitions.
- Added a ``--nimcache:PATH`` configuration option for control over the output
directory for generated code.
- The ``--genScript`` option now produces different compilation scripts
which do not contain absolute paths.
- Added ``--cincludes:dir``, ``--clibdir:lib`` configuration options for
modifying the C compiler's header/library search path in cross-platform way.
- Added ``--clib:lib`` configuration option for specifying additional
C libraries to be linked.
- Added ``--mainmodule:file`` configuration options for specifying the main
project file. This is intended to be used in project configuration files to
allow commands like ``nimrod c`` or ``nimrod check`` to be executed anywhere
within the project's directory structure.
- Added a ``--app:staticlib`` option for creating static libraries.
- Added a ``--tlsEmulation:on|off`` switch for control over thread local
storage emulation.
- The compiler and standard library now support a *taint mode*. Input strings
are declared with the ``TaintedString`` string type. If the taint
mode is turned on it is a distinct string type which helps to detect input
validation errors.
- The compiler now supports the compilation cache via ``--symbolFiles:on``.
This potentially speeds up compilations by an order of magnitude, but is
still highly experimental!
- Added ``--import:file`` and ``--include:file`` configuration options
for specifying modules that will be automatically imported/incluced.
- ``nimrod i`` can now optionally be given a module to execute.
- The compiler now performs a simple alias analysis to generate better code.
- The compiler and ENDB now support *watchpoints*.
- The compiler now supports proper compile time expressions of type ``bool``
for ``on|off`` switches in pragmas. In order to not break existing code,
``on`` and ``off`` are now aliases for ``true`` and ``false`` and declared
in the system module.
- The compiler finally supports **closures**. This is a preliminary
implementation, which does not yet support nestings deeper than 1 level
and still has many known bugs.
Library Additions
-----------------
- Added ``system.allocShared``, ``system.allocShared0``,
``system.deallocShared``, ``system.reallocShared``.
- Slicing as implemented by the system module now supports *splicing*.
- Added explicit channels for thread communication.
- Added ``matchers`` module for email address etc. matching.
- Added ``strutils.unindent``, ``strutils.countLines``,
``strutils.replaceWord``.
- Added ``system.slurp`` for easy resource embedding.
- Added ``system.running`` for threads.
- Added ``system.programResult``.
- Added ``xmltree.innerText``.
- Added ``os.isAbsolute``, ``os.dynLibFormat``, ``os.isRootDir``,
``os.parentDirs``.
- Added ``parseutils.interpolatedFragments``.
- Added ``macros.treeRepr``, ``macros.lispRepr``, ``macros.dumpTree``,
``macros.dumpLisp``, ``macros.parseExpr``, ``macros.parseStmt``,
``macros.getAst``.
- Added ``locks`` core module for more flexible locking support.
- Added ``irc`` module.
- Added ``ftpclient`` module.
- Added ``memfiles`` module.
- Added ``subexes`` module.
- Added ``critbits`` module.
- Added ``asyncio`` module.
- Added ``actors`` module.
- Added ``algorithm`` module for generic ``sort``, ``reverse`` etc. operations.
- Added ``osproc.startCmd``, ``osproc.execCmdEx``.
- The ``osproc`` module now uses ``posix_spawn`` instead of ``fork``
and ``exec`` on Posix systems. Define the symbol ``useFork`` to revert to
the old implementation.
- Added ``intsets.assign``.
- Added ``system.astToStr`` and ``system.rand``, ``system.doAssert``.
- Added ``system.pairs`` for built-in types like arrays and strings.
2011-07-10 Version 0.8.12 released
==================================
Bugfixes
--------
- Bugfix: ``httpclient`` correct passes the path starting with ``/``.
- Bugfixes for the ``htmlparser`` module.
- Bugfix: ``pegs.find`` did not respect ``start`` parameter.
- Bugfix: ``dialogs.ChooseFilesToOpen`` did not work if only one file is
selected.
- Bugfix: niminst: ``nimrod`` is not default dir for *every* project.
- Bugfix: Multiple yield statements in iterators did not cause local vars to be
copied.
- Bugfix: The compiler does not emit very inaccurate floating point literals
anymore.
- Bugfix: Subclasses are taken into account for ``try except`` matching.
- Bugfix: Generics and macros are more stable. There are still known bugs left
though.
- Bugfix: Generated type information for tuples was sometimes wrong, causing
random crashes.
- Lots of other bugfixes: Too many to list them all.
Changes affecting backwards compatibility
-----------------------------------------
- Operators starting with ``^`` are now right-associative and have the highest
priority.
- Deprecated ``os.getApplicationFilename``: Use ``os.getAppFilename`` instead.
- Deprecated ``os.getApplicationDir``: Use ``os.getAppDir`` instead.
- Deprecated ``system.copy``: Use ``substr`` or string slicing instead.
- Changed and documented how generalized string literals work: The syntax
``module.re"abc"`` is now supported.
- Changed the behaviour of ``strutils.%``, ``ropes.%``
if both notations ``$#`` and ``$i`` are involved.
- The ``pegs`` and ``re`` modules distinguish between ``replace``
and ``replacef`` operations.
- The pointer dereference operation ``p^`` is deprecated and might become
``^p`` in later versions or be dropped entirely since it is rarely used.
Use the new notation ``p[]`` in the rare cases where you need to
dereference a pointer explicitly.
- ``system.readFile`` does not return ``nil`` anymore but raises an ``EIO``
exception instead.
- Unsound co-/contravariance for procvars has been removed.
Language Additions
------------------
- Source code filters are now documented.
- Added the ``linearScanEnd``, ``unroll``, ``shallow`` pragmas.
- Added ``emit`` pragma for direct code generator control.
- Case statement branches support constant sets for programming convenience.
- Tuple unpacking is not enforced in ``for`` loops anymore.
- The compiler now supports array, sequence and string slicing.
- A field in an ``enum`` may be given an explicit string representation.
This yields more maintainable code than using a constant
``array[TMyEnum, string]`` mapping.
- Indices in array literals may be explicitly given, enhancing readability:
``[enumValueA: "a", enumValueB: "b"]``.
- Added thread support via the ``threads`` core module and
the ``--threads:on`` command line switch.
- The built-in iterators ``system.fields`` and ``system.fieldPairs`` can be
used to iterate over any field of a tuple. With this mechanism operations
like ``==`` and ``hash`` are lifted to tuples.
- The slice ``..`` is now a first-class operator, allowing code like:
``x in 1000..100_000``.
Compiler Additions
------------------
- The compiler supports IDEs via the new group of ``idetools`` command line
options.
- The *interactive mode* (REPL) has been improved and documented for the
first time.
- The compiler now might use hashing for string case statements depending
on the number of string literals in the case statement.
Library Additions
-----------------
- Added ``lists`` module which contains generic linked lists.
- Added ``sets`` module which contains generic hash sets.
- Added ``tables`` module which contains generic hash tables.
- Added ``queues`` module which contains generic sequence based queues.
- Added ``intsets`` module which contains a specialized int set data type.
- Added ``scgi`` module.
- Added ``smtp`` module.
- Added ``encodings`` module.
- Added ``re.findAll``, ``pegs.findAll``.
- Added ``os.findExe``.
- Added ``parseutils.parseUntil`` and ``parseutils.parseWhile``.
- Added ``strutils.align``, ``strutils.tokenize``, ``strutils.wordWrap``.
- Pegs support a *captured search loop operator* ``{@}``.
- Pegs support new built-ins: ``\letter``, ``\upper``, ``\lower``,
``\title``, ``\white``.
- Pegs support the new built-in ``\skip`` operation.
- Pegs support the ``$`` and ``^`` anchors.
- Additional operations were added to the ``complex`` module.
- Added ``strutils.formatFloat``, ``strutils.formatBiggestFloat``.
- Added unary ``<`` for nice looking excluding upper bounds in ranges.
- Added ``math.floor``.
- Added ``system.reset`` and a version of ``system.open`` that
returns a ``TFile`` and raises an exception in case of an error.
- Added a wrapper for ``redis``.
- Added a wrapper for ``0mq`` via the ``zmq`` module.
- Added a wrapper for ``sphinx``.
- Added ``system.newStringOfCap``.
- Added ``system.raiseHook`` and ``system.outOfMemHook``.
- Added ``system.writeFile``.
- Added ``system.shallowCopy``.
- ``system.echo`` is guaranteed to be thread-safe.
- Added ``prelude`` include file for scripting convenience.
- Added ``typeinfo`` core module for access to runtime type information.
- Added ``marshal`` module for JSON serialization.
2010-10-20 Version 0.8.10 released
==================================
Bugfixes
--------
- Bugfix: Command line parsing on Windows and ``os.parseCmdLine`` now adheres
to the same parsing rules as Microsoft's C/C++ startup code.
- Bugfix: Passing a ``ref`` pointer to the untyped ``pointer`` type is invalid.
- Bugfix: Updated ``keyval`` example.
- Bugfix: ``system.splitChunk`` still contained code for debug output.
- Bugfix: ``dialogs.ChooseFileToSave`` uses ``STOCK_SAVE`` instead of
``STOCK_OPEN`` for the GTK backend.
- Bugfix: Various bugs concerning exception handling fixed.
- Bugfix: ``low(somestring)`` crashed the compiler.
- Bugfix: ``strutils.endsWith`` lacked range checking.
- Bugfix: Better detection for AMD64 on Mac OS X.
Changes affecting backwards compatibility
-----------------------------------------
- Reversed parameter order for ``os.copyFile`` and ``os.moveFile``!!!
- Procs not marked as ``procvar`` cannot only be passed to a procvar anymore,
unless they are used in the same module.
- Deprecated ``times.getStartMilsecs``: Use ``epochTime`` or ``cpuTime``
instead.
- Removed ``system.OpenFile``.
- Removed ``system.CloseFile``.
- Removed ``strutils.replaceStr``.
- Removed ``strutils.deleteStr``.
- Removed ``strutils.splitLinesSeq``.
- Removed ``strutils.splitSeq``.
- Removed ``strutils.toString``.
- If a DLL cannot be loaded (via the ``dynlib`` pragma) ``EInvalidLibrary``
is not raised anymore. Instead ``system.quit()`` is called. This is because
raising an exception requires heap allocations. However the memory manager
might be contained in the DLL that failed to load.
- The ``re`` module (and the ``pcre`` wrapper) now depend on the pcre dll.
Additions
---------
- The ``{.compile: "file.c".}`` pragma uses a CRC check to see if the file
needs to be recompiled.
- Added ``system.reopen``.
- Added ``system.getCurrentException``.
- Added ``system.appType``.
- Added ``system.compileOption``.
- Added ``times.epochTime`` and ``times.cpuTime``.
- Implemented explicit type arguments for generics.
- Implemented ``{.size: sizeof(cint).}`` pragma for enum types. This is useful
for interfacing with C.
- Implemented ``{.pragma.}`` pragma for user defined pragmas.
- Implemented ``{.extern.}`` pragma for better control of name mangling.
- The ``importc`` and ``exportc`` pragmas support format strings:
``proc p{.exportc: "nim_$1".}`` exports ``p`` as ``nim_p``. This is useful
for user defined pragmas.
- The standard library can be built as a DLL. Generating DLLs has been
improved.
- Added ``expat`` module.
- Added ``json`` module.
- Added support for a *Tiny C* backend. Currently this only works on Linux.
You need to bootstrap with ``-d:tinyc`` to enable Tiny C support. Nimrod
can then execute code directly via ``nimrod run myfile``.
2010-03-14 Version 0.8.8 released
=================================
Bugfixes
--------
- The Posix version of ``os.copyFile`` has better error handling.
- Fixed bug #502670 (underscores in identifiers).
- Fixed a bug in the ``parsexml`` module concerning the parsing of
``<tag attr="value" />``.
- Fixed a bug in the ``parsexml`` module concerning the parsing of
enities like ``<XX``.
- ``system.write(f: TFile, s: string)`` now works even if ``s`` contains binary
zeros.
- Fixed a bug in ``os.setFilePermissions`` for Windows.
- An overloadable symbol can now have the same name as an imported module.
- Fixed a serious bug in ``strutils.cmpIgnoreCase``.
- Fixed ``unicode.toUTF8``.
- The compiler now rejects ``'\n'`` (use ``"\n"`` instead).
- ``times.getStartMilsecs()`` now works on Mac OS X.
- Fixed a bug in ``pegs.match`` concerning start offsets.
- Lots of other little bugfixes.
Additions
---------
- Added ``system.cstringArrayToSeq``.
- Added ``system.lines(f: TFile)`` iterator.
- Added ``system.delete``, ``system.del`` and ``system.insert`` for sequences.
- Added ``system./`` for int.
- Exported ``system.newException`` template.
- Added ``cgi.decodeData(data: string): tuple[key, value: string]``.
- Added ``strutils.insertSep``.
- Added ``math.trunc``.
- Added ``ropes`` module.
- Added ``sockets`` module.
- Added ``browsers`` module.
- Added ``httpserver`` module.
- Added ``httpclient`` module.
- Added ``parseutils`` module.
- Added ``unidecode`` module.
- Added ``xmldom`` module.
- Added ``xmldomparser`` module.
- Added ``xmltree`` module.
- Added ``xmlparser`` module.
- Added ``htmlparser`` module.
- Added ``re`` module.
- Added ``graphics`` module.
- Added ``colors`` module.
- Many wrappers now do not contain redundant name prefixes (like ``GTK_``,
``lua``). The old wrappers are still available in ``lib/oldwrappers``.
You can change your configuration file to use these.
- Triple quoted strings allow for ``"`` in more contexts.
- ``""`` within raw string literals stands for a single quotation mark.
- Arguments to ``openArray`` parameters can be left out.
- More extensive subscript operator overloading. (To be documented.)
- The documentation generator supports the ``.. raw:: html`` directive.
- The Pegs module supports back references via the notation ``$capture_index``.
Changes affecting backwards compatibility
-----------------------------------------
- Overloading of the subscript operator only works if the type does not provide
a built-in one.
- The search order for libraries which is affected by the ``path`` option
has been reversed, so that the project's path is searched before
the standard library's path.
- The compiler does not include a Pascal parser for bootstrapping purposes any
more. Instead there is a ``pas2nim`` tool that contains the old functionality.
- The procs ``os.copyFile`` and ``os.moveFile`` have been deprecated
temporarily, so that the compiler warns about their usage. Use them with
named arguments only, because the parameter order will change the next
version!
- ``atomic`` and ``let`` are now keywords.
- The ``\w`` character class for pegs now includes the digits ``'0'..'9'``.
- Many wrappers now do not contain redundant name prefixes (like ``GTK_``,
``lua``) anymore.
- Arguments to ``openArray`` parameters can be left out.
2009-12-21 Version 0.8.6 released
=================================
The version jump from 0.8.2 to 0.8.6 acknowledges the fact that all development
of the compiler is now done in Nimrod.
Bugfixes
--------
- The pragmas ``hint[X]:off`` and ``warning[X]:off`` now work.
- Method call syntax for iterators works again (``for x in lines.split()``).
- Fixed a typo in ``removeDir`` for POSIX that lead to an infinite recursion.
- The compiler now checks that module filenames are valid identifiers.
- Empty patterns for the ``dynlib`` pragma are now possible.
- ``os.parseCmdLine`` returned wrong results for trailing whitespace.
- Inconsequent tuple usage (using the same tuple with and without named fields)
does not crash the code generator anymore.
- A better error message is provided when the loading of a proc within a
dynamic lib fails.
Additions
---------
- Added ``system.contains`` for open arrays.
- The PEG module now supports the *search loop operator* ``@``.
- Grammar/parser: ``SAD|IND`` is allowed before any kind of closing bracket.
This allows for more flexible source code formating.
- The compiler now uses a *bind* table for symbol lookup within a ``bind``
context. (See `<manual.html#templates>`_ for details.)
- ``discard """my long comment"""`` is now optimized away.
- New ``--floatChecks: on|off`` switches and pragmas for better debugging
of floating point operations. (See
`<manual.html#pre-defined-floating-point-types>`_ for details.)
- The manual has been improved. (Many thanks to Philippe Lhoste!)
Changes affecting backwards compatibility
-----------------------------------------
- The compiler does not skip the linking step anymore even if no file
has changed.
- ``os.splitFile(".xyz")`` now returns ``("", ".xyz", "")`` instead of
``("", "", ".xyz")``. So filenames starting with a dot are handled
differently.
- ``strutils.split(s: string, seps: set[char])`` never yields the empty string
anymore. This behaviour is probably more appropriate for whitespace splitting.
- The compiler now stops after the ``--version`` command line switch.
- Removed support for enum inheritance in the parser; enum inheritance has
never been documented anyway.
- The ``msg`` field of ``system.E_base`` has now the type ``string``, instead
of ``cstring``. This improves memory safety.
2009-10-21 Version 0.8.2 released
=================================
2009-09-12 Version 0.8.0 released
=================================
2009-06-08 Version 0.7.10 released
==================================
2009-05-08 Version 0.7.8 released
=================================
2009-04-22 Version 0.7.6 released
=================================
2008-11-16 Version 0.7.0 released
=================================
2008-08-22 Version 0.6.0 released
=================================
Nimrod version 0.6.0 has been released!
**This is the first version of the compiler that is able to compile itself!**
|