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
|
===========================================
Questions and Answers
===========================================
General
=======
What is Nimrod?
---------------
Nimrod is a statically typed, imperative programming language that tries to
give the programmer ultimate power without compromises on runtime efficiency.
This means it focuses on compile-time mechanisms in all their
various forms. Beneath a nice infix/indentation based syntax with a
powerful (AST based, hygienic) macro system lies a semantic model that supports
a soft realtime GC on thread local heaps. Asynchronous message passing is used
between threads, so no "stop the world" mechanism is necessary. An unsafe
shared memory heap is also provided for the increased efficiency that results
from that model.
Why yet another programming language?
-------------------------------------
Nimrod is one of the very few *programmable* statically typed languages, and
one of the even fewer that produces native binaries that require no
runtime or interpreter.
What have been the major influences in the language's design?
-------------------------------------------------------------
The language borrows heavily from: Modula 3, Delphi, Ada, C++, Python, Lisp,
Oberon. As far as possible the list is sorted by the impact of influence.
What is Nimrod's take on concurrency?
-------------------------------------
Nimrod primarily focusses on thread local (and garbage collected) heaps and
asynchronous message passing between threads. Each thread has its own GC, so no
"stop the world" mechanism is necessary. An unsafe shared memory heap is also
provided.
Future versions will additionally include a GC "per thread group"
and Nimrod's type system will be enhanced to accurately model this shared
memory heap.
How is Nimrod licensed?
-----------------------
The Nimrod compiler and the library are MIT licensed.
This means that you can use any license for your own programs developed with
Nimrod.
How stable is Nimrod?
---------------------
The compiler is in development and some important features are still missing.
However, the compiler is quite stable already: It is able to compile itself
and a substantial body of other code. Until version 1.0.0 is released,
minor incompatibilities with older versions of the compiler will be introduced.
How fast is Nimrod?
-------------------
Benchmarks show it to be comparable to C. Some language features (methods,
closures, message passing) are not yet as optimized as they could and will be.
The only overhead Nimrod has over C is the GC which has been tuned
for years but still needs some work.
What about JVM/CLR backends?
----------------------------
A JVM backend is almost impossible. The JVM is not expressive enough. It has
never been designed as a general purpose VM anyway. A CLR backend is possible
but would require much work.
What about editor support?
--------------------------
- Nimrod IDE: https://github.com/nimrod-code/Aporia
- Emacs: https://github.com/Tass/nimrod-mode
- Vim: https://github.com/zah/nimrod.vim/
- Scite: Included
- Gedit: The `Aporia .lang file <https://github.com/nimrod-code/Aporia/blob/master/share/gtksourceview-2.0/language-specs/nimrod.lang>`_
- jEdit: https://github.com/exhu/nimrod-misc/tree/master/jedit
Why is it named ``proc``?
-------------------------
*Procedure* used to be the common term as opposed to a *function* which is a
mathematical entity that has no side effects. It was planned to have ``func``
as syntactic sugar for ``proc {.noSideEffect.}`` but with the more fine-grained
effect system it is not yet clear what ``func`` should be a shortcut for.
Compilation
===========
Which option to use for the fastest executable?
-----------------------------------------------
For the standard configuration file, ``-d:release`` does the trick.
Which option to use for the smallest executable?
------------------------------------------------
For the standard configuration file, ``-d:quick --opt:size`` does the trick.
How do I use a different C compiler than the default one?
---------------------------------------------------------
Edit the ``config/nimrod.cfg`` file.
Change the value of the ``cc`` variable to one of the following:
============== ============================================
Abbreviation C/C++ Compiler
============== ============================================
``vcc`` Microsoft's Visual C++
``gcc`` Gnu C
``llvm_gcc`` LLVM-GCC compiler
``icc`` Intel C++ compiler
``clang`` Clang compiler
``ucc`` Generic UNIX C compiler
============== ============================================
Other C compilers are not officially supported, but might work too.
If your C compiler is not in the above list, try using the
*generic UNIX C compiler* (``ucc``). If the C compiler needs
different command line arguments try the ``--passc`` and ``--passl`` switches.
|