Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
dima-quant
searching Neon…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
6 ms
·
1.
▲
by
dima-quant
3mo ago
indeed, as far as I know, at this moment nimic is the only package that provides systems language functionality running in CPython, while the corresponding code also compiles AOT to an efficient native binary.
2.
▲
by
dima-quant
3mo ago
Nice language with many built in features! Do you gain much in comparison to languages, where these concepts are implemented as frameworks? Not clear, how the memory management is implemented? Is it manual?
3.
▲
by
dima-quant
3mo ago
The comparison with Cython is indeed very relevant as it is currently the standard for making Python modules and it has greatly improved support for the standard Python syntax over the last few years, e.g. the type hints. However, it still
4.
▲
by
dima-quant
3mo ago
Currently, Nim fits quite well with Python but there is a project to directly emit LLVM IR from Nim and MIR might be relevant there: https://github.com/arnetheduck/nlvm
5.
▲
by
dima-quant
3mo ago
Your explanation is completely correct. There are Nim implementations of BigInt, but the foremost focus of Nimic is enabling as many standard Nim features as possible. In general, there is another parallel stream, which aims at implementing
6.
▲
by
dima-quant
3mo ago
Fully fair, I'd need to spend more time on the text. The nimic was mostly tested on the raytracer project dima-quant/ndsl_raytracer, and the performance was indeed quite near the C-level.
7.
▲
by
dima-quant
3mo ago
Not quite "all valid Python." Just to be clear: nimic is a strict, statically typed subset of Python. At this stage, the downside of having Nim as an intermediate step is not really a slower compilation, as Nim compiler is very fa
8.
▲
by
dima-quant
3mo ago
Yeah, indeed, I actually read about mypyc a few years ago before starting nimic. Though the goal is very similar, mypyc does not support compilation to a native executable and the performance gains were somehow limited to 2x-4x, as reported
9.
▲
by
dima-quant
3mo ago
True, nimic is a statically typed Python subset without much of its dynamism with the aim to be foremost an efficient systems language. Though in nimic, without using isinstance, the instance-based dispatch is realised via variant types. Y
10.
▲
by
dima-quant
3mo ago
Good suggestion, now I recall I heard about this project before. Good to see it is in active development.
11.
▲
by
dima-quant
3mo ago
Yeh, indeed, the README was mostly generated, though the introduction is largely human-written :-) Is some specific description missing? I can provide more practical code examples directly in README. The benchmarks are mostly on runtime per
12.
▲
by
dima-quant
3mo ago
This is great, nice concept! Good use of coding agents. Now I can make diagrams much faster.
13.
▲
by
dima-quant
3mo ago
nimic is a lightweight pure Python package that emulates Nim types and constructions, making it straightforward to transpile to Nim and compile AOT. Key principle: nimic code is valid Python that runs unmodified in CPython and also transpil
14.
▲
Show HN: Nimic – Pure Python as a systems language with AOT compilation
(github.com)
43 points
by
dima-quant
3mo ago
|
29 comments
15.
▲
Show HN: Nimic – write pure Python and compile AOT to native binaries via Nim
(github.com)
5 points
by
dima-quant
4mo ago
|
0 comments
16.
▲
by
dima-quant
4mo ago
I enjoyed a lot reading the book and also learned a few things there: The Pragmatic Programmer, 20th Anniversary Edition. The main guiding principle: Good design is easier to change than bad design
17.
▲
by
dima-quant
4mo ago
AI is very good at standard and well defined problems but much less so with complex and vague. For example, currently available models cannot write or even port a full-feature compiler of a mature language without very custom tweaking and d