<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"><channel><title>Nuitka Home</title><link>http://nuitka.net</link><description>From the creator of the Python compiler.</description><lastBuildDate>Sat, 18 May 2013 10:17:00 GMT</lastBuildDate><generator>nikola</generator><docs>http://blogs.law.harvard.edu/tech/rss</docs><item><title>Nuitka Release 0.4.3</title><link>http://nuitka.net/posts/nuitka-release-043.html</link><description>&lt;p&gt;This is to inform you about the new stable release of &lt;a class="reference external" href="http://nuitka.net"&gt;Nuitka&lt;/a&gt;. Please see the page &lt;a class="reference external" href="/pages/overview.html"&gt;"What is Nuitka?"&lt;/a&gt; for clarification of what it is now and what it wants to be.&lt;/p&gt;
&lt;p&gt;This release expands the reach of Nuitka substantially, as new platforms and
compilers are now supported. A lot of polish has been applied. Under the hood
there is the continued and in-progress effort to implement SSA form in Nuitka.&lt;/p&gt;
&lt;div class="section" id="new-features"&gt;
&lt;h2&gt;New Features&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;p class="first"&gt;Support for new compiler: Microsoft Visual C++.&lt;/p&gt;
&lt;p&gt;You can now use Visual Studio 2008 or Visual Studio 2010 for compiling under
Windows.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;Support for NetBSD.&lt;/p&gt;
&lt;p&gt;Nuitka works for at least NetBSD 6.0, older versions may or may not work. This
required fixing bugs in the generic "fibers" implementation.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;Support for Python3 under Windows too.&lt;/p&gt;
&lt;p&gt;Nuitka uses Scons to build the generated C++ files. Unfortunately it requires
Python2 to execute, which is not readily available to call from Python3. It
now guesses the default installation paths of CPython 2.7 or CPython 2.6 and
it will use it for running Scons instead. You have to install it to"
C:Python26" or "C:Python27" for Nuitka to be able to find it.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;Enhanced Python 3.3 compatibility.&lt;/p&gt;
&lt;p&gt;The support the newest version of Python has been extended, improving
compatibility for many minor corner cases.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;Added warning when a user compiles a module and executes it immediately when
that references &lt;tt class="docutils literal"&gt;__name__&lt;/tt&gt;.&lt;/p&gt;
&lt;p&gt;Because very likely the intention was to create an executable. And esp. if
there is code like this:&lt;/p&gt;
&lt;pre class="code python literal-block"&gt;
&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;__name__&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="s"&gt;"__main__"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
   &lt;span class="n"&gt;main&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/pre&gt;
&lt;p&gt;In module mode, Nuitka will optimize it away, and nothing will happen on
execution. This is because the command&lt;/p&gt;
&lt;pre class="code sh literal-block"&gt;
nuitka --execute module
&lt;/pre&gt;
&lt;p&gt;is behavioral more like&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;python -c "import module"&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;and that was a trap for new users.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;All Linux architectures are now supported. Due to changes in how evaluation
order is enforced, we don't have to implement for specific architectures
anymore.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;
&lt;div class="section" id="bug-fixes"&gt;
&lt;h2&gt;Bug Fixes&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;p class="first"&gt;Dictionary creation was not fully compatible.&lt;/p&gt;
&lt;p&gt;As revealed by using Nuitka with CPython3.3, the order in which dictionaries
are to be populated needs to be reversed, i.e. CPython adds the last item
first. We didn't observe this before, and it's likely the new dictionary
implementation that finds it.&lt;/p&gt;
&lt;p&gt;Given that hash randomization makes dictionaries item order undetermined
anyway, this is more an issue of testing.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;Evaluation order for arguments of calls was not effectively enforced. It is
now done in a standards compliant and therefore fully portable way. The
compilers and platforms so far supported were not affected, but the newly
supported Visual Studio C++ compiler was.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;Using a &lt;tt class="docutils literal"&gt;__future__&lt;/tt&gt; import inside a function was giving an assertion,
instead of the proper syntax error.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;Python3: Do not set the attributes &lt;tt class="docutils literal"&gt;sys.exc_type&lt;/tt&gt;, &lt;tt class="docutils literal"&gt;sys.exc_value&lt;/tt&gt;,
&lt;tt class="docutils literal"&gt;sys.exc_traceback&lt;/tt&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;Python3: Annotations of function worked only as long as their definition was
not referring to local variables.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;
&lt;div class="section" id="new-optimization"&gt;
&lt;h2&gt;New Optimization&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;p class="first"&gt;Calls with no positional arguments are now using the faster call methods.&lt;/p&gt;
&lt;p&gt;The generated C++ code was using the &lt;tt class="docutils literal"&gt;()&lt;/tt&gt; constant at call site, when doing
calls that use no positional arguments, which is of course useless.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;For Windows now uses OS "Fibers" for Nuitka "Fibers".&lt;/p&gt;
&lt;p&gt;Using threads for fibers was causing only overhead and with this API, MSVC had
less issues too.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;
&lt;div class="section" id="organizational"&gt;
&lt;h2&gt;Organizational&lt;/h2&gt;
&lt;ul class="simple"&gt;&lt;li&gt;Accepting &lt;a class="reference external" href="http://nuitka.net/pages/donations.html"&gt;Donations&lt;/a&gt; via Paypal,
please support funding travels, website, etc.&lt;/li&gt;
&lt;li&gt;The &lt;a class="reference external" href="http://nuitka.net/doc/user-manual.html"&gt;User Manual&lt;/a&gt; has been updated
with new content. We now do support Visual Studio, documented the required
LLVM version for clang, Win64 and modules may include modules too, etc. Lots
of information was no longer accurate and has been updated.&lt;/li&gt;
&lt;li&gt;The Changelog has been improved for consistency, wordings, and styles.&lt;/li&gt;
&lt;li&gt;Nuitka is now available on the social code platforms as well&lt;ul&gt;&lt;li&gt;&lt;a class="reference external" href="https://bitbucket.org/kayhayen/nuitka"&gt;Bitbucket&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="reference external" href="https://github.com/kayhayen/Nuitka"&gt;Github&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="reference external" href="https://gitorious.org/nuitka/nuitka"&gt;Gitorious&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="reference external" href="https://code.google.com/p/nuitka/"&gt;Google Code&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;Removed "clean-up.sh", which is practically useless, as tests now clean up
after themselves reasonably, and with &lt;tt class="docutils literal"&gt;git clean &lt;span class="pre"&gt;-dfx&lt;/span&gt;&lt;/tt&gt; working better.&lt;/li&gt;
&lt;li&gt;Removed "create-environment.sh" script, which was only setting the &lt;tt class="docutils literal"&gt;PATH&lt;/tt&gt;
variable, which is not necessary.&lt;/li&gt;
&lt;li&gt;Added &lt;tt class="docutils literal"&gt;&lt;span class="pre"&gt;check-with-pylint&lt;/span&gt; &lt;span class="pre"&gt;--emacs&lt;/span&gt;&lt;/tt&gt; option to make output its work with Emacs
compilation mode, to allow easier fixing of warnings from PyLint.&lt;/li&gt;
&lt;li&gt;Documentation is formatted for 80 columns now, source code will gradually aim
at it too. So far 90 columns were used, and up to 100 tolerated.&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;
&lt;div class="section" id="cleanups"&gt;
&lt;h2&gt;Cleanups&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;p class="first"&gt;Removed useless manifest and resource file creation under Windows.&lt;/p&gt;
&lt;p&gt;Turns out this is no longer needed at all. Either CPython, MinGW, or Windows
improved to no longer need it.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;PyLint massive cleanups and annotations bringing down the number of warnings
by a lot.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;Avoid use of strings and built-ins as run time pre-computed constants that are
not needed for specific Python versions, or Nuitka modes.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;Do not track needed tuple, list, and dict creation code variants in context,
but e.g. in &lt;tt class="docutils literal"&gt;nuitka.codegen.TupleCodes&lt;/tt&gt; module instead.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;Introduced an "internal" module to host the complex call helper functions,
instead of just adding it to any module that first uses it.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;
&lt;div class="section" id="new-tests"&gt;
&lt;h2&gt;New Tests&lt;/h2&gt;
&lt;ul class="simple"&gt;&lt;li&gt;Added basic tests for order evaluation, where there currently were None.&lt;/li&gt;
&lt;li&gt;Added support for "2to3" execution under Windows too, so we can run tests for
Python3 installations too.&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;
&lt;div class="section" id="summary"&gt;
&lt;h2&gt;Summary&lt;/h2&gt;
&lt;p&gt;The release is clearly major step ahead. The new platform support triggered a
whole range of improvements, and means this is truly complete now.&lt;/p&gt;
&lt;p&gt;Also there is very much polish in this release, reducing the number of warnings,
updated documentation, the only thing really missing is visible progress with
optimization.&lt;/p&gt;
&lt;/div&gt;</description><category>compiler</category><category>Nuitka</category><category>Python</category><guid>/posts/nuitka-release-043.html</guid><pubDate>Sat, 18 May 2013 10:17:00 GMT</pubDate></item><item><title>Nuitka on Github, Bitbucket and Gitorious</title><link>http://nuitka.net/posts/nuitka-on-github-bitbucket-and-gitorious.html</link><description>&lt;p&gt;This is to let you know, that I have &lt;em&gt;finally&lt;/em&gt; carved in and created accounts on all those
"social" platforms, that deal with code. So far I had resisted their terms (you pay us
when we get sued), but I have given up on that stance, it's likely irrelevant, as Nuitka
won't get sued, and if it is, those are not the issues.&lt;/p&gt;
&lt;p&gt;And I don't want to feel too old school it seems. And who knows, maybe this helps Nuitka
to get more contributions.&lt;/p&gt;
&lt;p&gt;So these are the landing pages:&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;&lt;p class="first"&gt;&lt;a class="reference external" href="https://bitbucket.org/kayhayen/nuitka"&gt;Bitbucket&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I kind of like the looks of it the most. Also it's very popular for Python people due to
its Mercurial ties. I also liked that it imported my Nuitka repository easily.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;&lt;a class="reference external" href="https://github.com/kayhayen/Nuitka"&gt;Github&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Is not being on Github allowed these days? Anyway, from ease of use, the interface looks
more powerful.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;&lt;a class="reference external" href="https://gitorious.org/nuitka/nuitka"&gt;Gitorious&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The interface and looks definitely are worst. But it's Free Software, and an open
platform, so it has to be in the list.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;Let me know what you think.  I am going to push 'develop' at pre-release and 'master' at
release time, automatically from the release scripts into all these. Hopefully that way,
they turn out to be time savers no wasters.&lt;/p&gt;
&lt;p&gt;And yes, I couldn't decide on one. Since I fancy Free Software, Gitorious probably would
have won, but it would also miss the point of expanding the reach. And for as long as I
don't use their issue tracking or Wikis, it appears to be not necessary to make that
decision.&lt;/p&gt;
&lt;div class="note"&gt;
&lt;p class="first admonition-title"&gt;Note&lt;/p&gt;
&lt;p class="last"&gt;The preferred for use, and most up to date repository will remain &lt;a class="reference external" href="/pages/download.html"&gt;the one from
Downloads&lt;/a&gt;.&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;So fork away, like it, and stuff. Awaiting your pull requests...&lt;/p&gt;</description><category>Python</category><category>Nuitka</category><category>git</category><guid>/posts/nuitka-on-github-bitbucket-and-gitorious.html</guid><pubDate>Fri, 26 Apr 2013 07:17:16 GMT</pubDate></item><item><title>Going to Europython 2013</title><link>http://nuitka.net/posts/going-to-europython-2013.html</link><description>&lt;p&gt;I am going to the wonderful city of Florence, and &lt;a class="reference external" href="https://ep2013.europython.eu/"&gt;Europython 2013&lt;/a&gt; and make a presentation there. This time, I am not
introducing Nuitka anymore, I did that in 2012, this time, I will try and dive into static
optimization and try to convey the message why I believe it is possible.&lt;/p&gt;
&lt;div class="contents topic" id="contents"&gt;
&lt;p class="topic-title first"&gt;Contents&lt;/p&gt;
&lt;ul class="simple"&gt;&lt;li&gt;&lt;a class="reference internal" href="/posts/going-to-europython-2013.html#things-to-talk-about" id="id1"&gt;Things to talk about&lt;/a&gt;&lt;ul&gt;&lt;li&gt;&lt;a class="reference internal" href="/posts/going-to-europython-2013.html#status" id="id2"&gt;Status&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="reference internal" href="/posts/going-to-europython-2013.html#last-years-questions" id="id3"&gt;Last years questions&lt;/a&gt;&lt;ul&gt;&lt;li&gt;&lt;a class="reference internal" href="/posts/going-to-europython-2013.html#builtins" id="id4"&gt;Builtins&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="reference internal" href="/posts/going-to-europython-2013.html#debugger-pdb" id="id5"&gt;Debugger - pdb&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="reference internal" href="/posts/going-to-europython-2013.html#threading" id="id6"&gt;Threading&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="reference internal" href="/posts/going-to-europython-2013.html#c-to-python-gaps" id="id7"&gt;C++ to Python gaps&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="reference internal" href="/posts/going-to-europython-2013.html#performance" id="id8"&gt;Performance&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="reference internal" href="/posts/going-to-europython-2013.html#demos" id="id9"&gt;Demos&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="reference internal" href="/posts/going-to-europython-2013.html#future-work" id="id10"&gt;Future Work&lt;/a&gt;&lt;ul&gt;&lt;li&gt;&lt;a class="reference internal" href="/posts/going-to-europython-2013.html#ssa" id="id11"&gt;SSA&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="reference internal" href="/posts/going-to-europython-2013.html#compiled-modules" id="id12"&gt;Compiled Modules&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="reference internal" href="/posts/going-to-europython-2013.html#compiled-locals" id="id13"&gt;Compiled Locals&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="reference internal" href="/posts/going-to-europython-2013.html#whole-program-analysis" id="id14"&gt;Whole Program Analysis&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="reference internal" href="/posts/going-to-europython-2013.html#perspective" id="id15"&gt;Perspective&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="reference internal" href="/posts/going-to-europython-2013.html#funding" id="id16"&gt;Funding&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="reference internal" href="/posts/going-to-europython-2013.html#final-picture" id="id17"&gt;Final Picture&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="reference internal" href="/posts/going-to-europython-2013.html#final-words" id="id18"&gt;Final Words&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;
&lt;div class="section" id="things-to-talk-about"&gt;
&lt;h2&gt;&lt;a class="toc-backref" href="/posts/going-to-europython-2013.html#id1"&gt;Things to talk about&lt;/a&gt;&lt;/h2&gt;
&lt;div class="section" id="status"&gt;
&lt;h3&gt;&lt;a class="toc-backref" href="/posts/going-to-europython-2013.html#id2"&gt;Status&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Only briefly this time, since I will be able to say that all current Python versions are
fully supported (&lt;a class="reference external" href="/posts/nuitka-needs-you-a-call-for-help.html"&gt;surely if you help me with Python3.3 yield from&lt;/a&gt;), all major platforms now. One important
milestone has been reached meanwhile, and work on far reaching compile time optimizations
is happening. As this should be quite obvious stuff, I am going to keep that short.&lt;/p&gt;
&lt;p&gt;What I would like to get done until then:&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;&lt;p class="first"&gt;Win64&lt;/p&gt;
&lt;p&gt;One remaining area of work to achieve Win64 support, which is almost complete. I epxect
one of the next releases to support it.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;Threading&lt;/p&gt;
&lt;p&gt;And of course there is threading, which was the one real major weakness present last
time, which appears only short of pronouncing break-through. At least one user is using
Nuitka with many threads operationally already. I just have to re-activate the thread
using tests CPython that I disabled. Seems I only have to convince myself of it too.&lt;/p&gt;
&lt;p&gt;Since it's not totally a priority right now, one of the next releases will support it,
likely before the conference.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;But as you see. Completion all around is there or at least in sight. Kind of worked on
this nearby.&lt;/p&gt;
&lt;/div&gt;
&lt;div class="section" id="last-years-questions"&gt;
&lt;h3&gt;&lt;a class="toc-backref" href="/posts/going-to-europython-2013.html#id3"&gt;Last years questions&lt;/a&gt;&lt;/h3&gt;
&lt;div class="section" id="builtins"&gt;
&lt;h4&gt;&lt;a class="toc-backref" href="/posts/going-to-europython-2013.html#id4"&gt;Builtins&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;For instance, writing to built-ins, what will/did happen.&lt;/p&gt;
&lt;p&gt;Changing builtins can be done in two ways. One is to set the value on the module level,
which is something that has always worked. The other is writing to &lt;tt class="docutils literal"&gt;builtins&lt;/tt&gt; module.&lt;/p&gt;
&lt;p&gt;This is something that is OK for Nuitka in some cases (&lt;tt class="docutils literal"&gt;__import__&lt;/tt&gt;, &lt;tt class="docutils literal"&gt;open&lt;/tt&gt; ) and
handled by it at run time. And it's not effective in others (&lt;tt class="docutils literal"&gt;len&lt;/tt&gt;, &lt;tt class="docutils literal"&gt;str&lt;/tt&gt;).&lt;/p&gt;
&lt;p&gt;Good news is that we got contributed a "compiled built-ins" code, where we now will be
able to see such writes. Now it's only used to not check every time for changes, but to
know them (pull vs. push). But we will also use it and trigger &lt;tt class="docutils literal"&gt;RuntimeError&lt;/tt&gt; exceptions
for things we cannot handle when we only learn of it at run time.&lt;/p&gt;
&lt;p&gt;The other element to address is, it of course whole program analysis. When Nuitka sees the
write to &lt;tt class="docutils literal"&gt;builtins.str&lt;/tt&gt;, it may very well consider it. The distinction between initial
and current builtin values, and the optimization of it, that will be interesting to cover.&lt;/p&gt;
&lt;div class="note"&gt;
&lt;p class="first admonition-title"&gt;Note&lt;/p&gt;
&lt;p class="last"&gt;Currently Nuitka does nothing of this, but it will.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class="section" id="debugger-pdb"&gt;
&lt;h4&gt;&lt;a class="toc-backref" href="/posts/going-to-europython-2013.html#id5"&gt;Debugger - pdb&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;The compiled binaries work the same as the normal Python code. So you will be able to
simply use &lt;tt class="docutils literal"&gt;pdb&lt;/tt&gt; on it instead.&lt;/p&gt;
&lt;p&gt;Interacting with &lt;tt class="docutils literal"&gt;pdb&lt;/tt&gt; is not &lt;em&gt;totally&lt;/em&gt; out of reach, but kind of pointless mostly,
unless you need to attach to long running operational programs. For now that use case is
not supported though.&lt;/p&gt;
&lt;/div&gt;
&lt;div class="section" id="threading"&gt;
&lt;h4&gt;&lt;a class="toc-backref" href="/posts/going-to-europython-2013.html#id6"&gt;Threading&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;I learned a whole lot about threading. Also thanks to the kind people of Stackless Python,
who explained things to me. I am still amazed at how little I did know of these things,
and still went so far. In my industry, threads are considered not allowed, and I
personally don't like them either, so my experience was non-existing.&lt;/p&gt;
&lt;p&gt;But in the mean time, I managed to come up with ideas that appear to work, and if I
implement the full design, it will even be more efficient than anything.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class="section" id="c-to-python-gaps"&gt;
&lt;h3&gt;&lt;a class="toc-backref" href="/posts/going-to-europython-2013.html#id7"&gt;C++ to Python gaps&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;I consider all of these more or less solved.&lt;/p&gt;
&lt;p&gt;Well maybe except recently arised issues with MSVC for "function calls". It appears that
compiler highlights a weakness in one of my approaches. Nuitka so far only changed the
order of declaration and call arguments around, which is kind of transparent.&lt;/p&gt;
&lt;p&gt;But MSVC actively takes liberty to calculate function arguments as it sees fit. The fix
for it, is now totally different and should be highly portable and even compliant to C++.&lt;/p&gt;
&lt;/div&gt;
&lt;div class="section" id="performance"&gt;
&lt;h3&gt;&lt;a class="toc-backref" href="/posts/going-to-europython-2013.html#id8"&gt;Performance&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;There are still slow exceptions. I would like to avoid raising C++ exceptions in the
future, because they are so slow (Python exceptions are much faster).&lt;/p&gt;
&lt;p&gt;And diagrams, I would like to have a whole lot more of these. Since I dropped speedcenter,
I am making actual progress there. I hope to have enough to show at the conference, where
the actual strength and weakness currently is.&lt;/p&gt;
&lt;p&gt;Since I am getting closer to pronouncing Nuitka useful. I surely believe, I need to answer
the performance question in larger detail. And of course, I need now a better idea, what
impact measures have.&lt;/p&gt;
&lt;p&gt;But as this is a lot of work, I doubt that I will be all that perfect by then, my goal is
to have a comparison with Shedskin. No matter how unfair it is (Shedskin does only a small
subset of Python), it's the most useful comparison in my eyes, as where Shedskin makes
static type analysis, Nuitka also should do it, only hampered by guards at maximum.&lt;/p&gt;
&lt;/div&gt;
&lt;div class="section" id="demos"&gt;
&lt;h3&gt;&lt;a class="toc-backref" href="/posts/going-to-europython-2013.html#id9"&gt;Demos&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;The talk with start out with demonstration of Nuitka, something simple first, and then
Mercurial as a more complex example, and then its test suite.&lt;/p&gt;
&lt;p&gt;And I will show portable binaries. It seems to work quite nicely. Generally I expect to
start out with demos, and explain from there, instead of having a demo only at the end.&lt;/p&gt;
&lt;p&gt;If it all works out, this time, they will be prepared with &lt;tt class="docutils literal"&gt;recordmydesktop&lt;/tt&gt; so I can
publish them separately too.&lt;/p&gt;
&lt;/div&gt;
&lt;div class="section" id="future-work"&gt;
&lt;h3&gt;&lt;a class="toc-backref" href="/posts/going-to-europython-2013.html#id10"&gt;Future Work&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Generally the talk will be more directed at the future, although this is kind of a dark
area now. That's its nature I guess.&lt;/p&gt;
&lt;div class="section" id="ssa"&gt;
&lt;h4&gt;&lt;a class="toc-backref" href="/posts/going-to-europython-2013.html#id11"&gt;SSA&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;The talk will also be largely built SSA (static single assignment) and how it applies to
Python. What everybody means, when they say "Python is too dynamic (to be statically
compiled)" is that Python values may escape to unknown code that changes them very often.&lt;/p&gt;
&lt;p&gt;I will have to talk about that, and how get out of that trap, basically guards, much like
PyPy does it too. Escaped values and strange code are only one option of things to
occur. Having code for both cases, sounds possible. I will talk about how to decide, which
branches we shall have and which not.&lt;/p&gt;
&lt;/div&gt;
&lt;div class="section" id="compiled-modules"&gt;
&lt;h4&gt;&lt;a class="toc-backref" href="/posts/going-to-europython-2013.html#id12"&gt;Compiled Modules&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;And I believe with "compiled modules" potentially already in place, we can achieve very
cheap guards in most cases. I can at least explain, why guards can be relatively cheap,
where we need them.&lt;/p&gt;
&lt;p&gt;I am kind of bugged by that idea. It kind of means to revisit an older milestone, but now
an idea has surfaced, that I previously didn't have, and that I am very curious to learn
the benefit of. Very quick &lt;em&gt;and&lt;/em&gt; safe module variabls, are very tempting to have, and
definitely make a difference for the Nuitka design.&lt;/p&gt;
&lt;/div&gt;
&lt;div class="section" id="compiled-locals"&gt;
&lt;h4&gt;&lt;a class="toc-backref" href="/posts/going-to-europython-2013.html#id13"&gt;Compiled Locals&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;Who knows, we might even have a "compiled locals" as well, which as a side effect, also
allows total interactivity with the most absurd codes. So far, each local variable is a
C++ object, and as this is compiled, and very fast.&lt;/p&gt;
&lt;p&gt;But the frame locals is not in sync with it. Were it a special object, it could try and
interact with these when control escapes to code that we don't know if it might use it.&lt;/p&gt;
&lt;/div&gt;
&lt;div class="section" id="whole-program-analysis"&gt;
&lt;h4&gt;&lt;a class="toc-backref" href="/posts/going-to-europython-2013.html#id14"&gt;Whole Program Analysis&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;Big words. Can Nuitka avoid module objects entirely. Can it inline functions, specialize
them according to the only types used (think including &lt;tt class="docutils literal"&gt;os.path.dirname&lt;/tt&gt; in the binary,
but with the constraint that it only need to work on string objects as input, because the program is known to use it any different.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class="section" id="perspective"&gt;
&lt;h2&gt;&lt;a class="toc-backref" href="/posts/going-to-europython-2013.html#id15"&gt;Perspective&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Last time, I spent a lot of time on justification, "why a new project?", "why not work
with the others?", what goals do I have that others do not. Giving examples of how code
generation works. Generally to give people an idea of the project.&lt;/p&gt;
&lt;p&gt;With this out of the way, I can now focus on inclusion, and success.&lt;/p&gt;
&lt;/div&gt;
&lt;div class="section" id="funding"&gt;
&lt;h2&gt;&lt;a class="toc-backref" href="/posts/going-to-europython-2013.html#id16"&gt;Funding&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;And, well yes, this time I may not have to pay for it all by myself. Last time I spent
close to 1000 Euros for the trip (ticket to enter, hotel, flight, food), because I am
&lt;a class="reference external" href="/pages/donations.html"&gt;accepting donations&lt;/a&gt; for this specific reason.&lt;/p&gt;
&lt;p&gt;For a strange reason, I devote substantial amounts of time to the project, only to put it
under the most liberal license. It's probably fair to allow people to &lt;a class="reference external" href="/pages/donations.html"&gt;make donations&lt;/a&gt; if they feel they want to further the project, but don't know
how. Or if they just consider it too important for me to loose interest. That kind of
feels unlikley though. Too much fun.&lt;/p&gt;
&lt;/div&gt;
&lt;div class="section" id="final-picture"&gt;
&lt;h2&gt;&lt;a class="toc-backref" href="/posts/going-to-europython-2013.html#id17"&gt;Final Picture&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;And lets have an image I made during Europython 2012 in the city of Florence. It shows
what a vibrant place this town is.&lt;/p&gt;
&lt;img alt="images/europython-2012-07-img6319.jpg" src="/posts/images/europython-2012-07-img6319.jpg"&gt;&lt;p&gt;Florence is a place full of kind people. The mood not only of the conference, but the
whole city is very open minded and helpful. It was very easy to get adopted by strangers to their party.&lt;/p&gt;
&lt;/div&gt;
&lt;div class="section" id="final-words"&gt;
&lt;h2&gt;&lt;a class="toc-backref" href="/posts/going-to-europython-2013.html#id18"&gt;Final Words&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;I am looking forward to meeting the friends I made there last time, and new friends. I
kind of a great time there last time, one of these "times of my life". Even if the
reception was not always as warm as I had deserved. I remember laughing a lot, learning a
lot. And making unique experiences.&lt;/p&gt;
&lt;/div&gt;</description><category>Python</category><category>Nuitka</category><category>compiler</category><guid>/posts/going-to-europython-2013.html</guid><pubDate>Tue, 16 Apr 2013 09:58:34 GMT</pubDate></item><item><title>Support for MSVC upcoming</title><link>http://nuitka.net/posts/support-for-msvc-upcoming.html</link><description>&lt;p&gt;The good news are lately coming in high density, although I barely have the opportunity to
work on Nuitka. Check the page &lt;a class="reference external" href="/pages/overview.html"&gt;What is Nuitka?&lt;/a&gt; for
clarification of what it is now and what it wants to be.&lt;/p&gt;
&lt;p&gt;It seems my &lt;a class="reference external" href="/posts/nuitka-needs-you-a-call-for-help.html"&gt;recent call for help&lt;/a&gt; was at least
partially effective. One the major points has been addressed. In the next release, Visual
Studio 2008 and 2010 will both work for Nuitka, right now it's only in git develop branch.&lt;/p&gt;
&lt;p&gt;That is really nice, as it will make Nuitka on Windows a whole lot more
accessible. Combine that with &lt;a class="reference external" href="/posts/support-for-portable-standalone-programs.html"&gt;portable support&lt;/a&gt; and it's up to solving problems with
distributing on Windows it seems.&lt;/p&gt;
&lt;p&gt;The other two things listed there have received no feedback yet. So if you want to help
with those, feel free to do so. Nuitka needs you.&lt;/p&gt;</description><category>Python</category><category>Nuitka</category><category>Windows</category><guid>/posts/support-for-msvc-upcoming.html</guid><pubDate>Wed, 10 Apr 2013 20:30:11 GMT</pubDate></item><item><title>Nuitka needs you - a call for help</title><link>http://nuitka.net/posts/nuitka-needs-you-a-call-for-help.html</link><description>&lt;div class="admonition-update-2 admonition"&gt;
&lt;p class="first admonition-title"&gt;Update 2&lt;/p&gt;
&lt;p&gt;The third point, Windows 64 support has been done as well. Turns out, that I do in fact
own only Win64 systems, and with MSVC support in place, only a few portability fixes
were needed.&lt;/p&gt;
&lt;p class="last"&gt;Help with the other point, "re-formulation of yield", would still be more than welcome,
and no signs of progress there yet. So stop thinking "you could", enter telling people
"you did" mode.&lt;/p&gt;
&lt;/div&gt;
&lt;div class="admonition-update admonition"&gt;
&lt;p class="first admonition-title"&gt;Update&lt;/p&gt;
&lt;p class="last"&gt;The second point, Fibers implementation for Windows, has been done. Thanks for the help
you people provide. The next release will contain it.&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;Hello everybody,&lt;/p&gt;
&lt;p&gt;the Python compiler Nuitka has come an ever longer way, and currently I have quite a bunch
of issues, that I believe could well need your help. These are all issues of some
important and significance, yet self contained jobs that you may enjoy.&lt;/p&gt;
&lt;div class="note"&gt;
&lt;p class="first admonition-title"&gt;Note&lt;/p&gt;
&lt;p class="last"&gt;You can check the page &lt;a class="reference external" href="/pages/overview.html"&gt;What is Nuitka?&lt;/a&gt; for clarification of
what it is now and what it wants to be.&lt;/p&gt;
&lt;/div&gt;
&lt;ul&gt;&lt;li&gt;&lt;p class="first"&gt;Python 3.3 - reformulation of &lt;tt class="docutils literal"&gt;yield from&lt;/tt&gt; needed.&lt;/p&gt;
&lt;p&gt;As you can see, covering all the CPython 2.6, 2.7, and 3.2 language features is already
something. Also CPython 3.3 is now working on a basic level.  Other projects are far,
far away from that.&lt;/p&gt;
&lt;p&gt;Many language constructs, such as the &lt;tt class="docutils literal"&gt;with&lt;/tt&gt; statement are re-formulated into other
constructs. This makes it possible to work with a simple core for optimization, and to
reduce the complexity a lot. For the &lt;tt class="docutils literal"&gt;with&lt;/tt&gt; statement case, it's changed to
&lt;tt class="docutils literal"&gt;try&lt;/tt&gt;/&lt;tt class="docutils literal"&gt;finally&lt;/tt&gt; and &lt;tt class="docutils literal"&gt;try&lt;/tt&gt;/&lt;tt class="docutils literal"&gt;except&lt;/tt&gt; statements, together with a few temporary
variables. Check the Nuitka source of it:&lt;/p&gt;
&lt;p&gt;&lt;a class="reference external" href="http://www.nuitka.net/gitweb/?p=Nuitka.git;a=blob;f=nuitka/tree/ReformulationWithStatements.py;h=2a2d5821e5a511201454e5ae8a7c979d48f04c4a;hb=HEAD"&gt;ReformulationWithStatements.py&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;There is also &lt;a class="reference external" href="/doc/developer-manual.html#language-conversions-to-make-things-simpler"&gt;descriptions of all these re-formulations in the developer manual&lt;/a&gt; so you can
see how this is done.&lt;/p&gt;
&lt;p&gt;Now check &lt;a class="reference external" href="http://www.python.org/dev/peps/pep-0380/"&gt;PEP 380&lt;/a&gt; for the details of it,
and your task would be to come up with a re-formulation of &lt;tt class="docutils literal"&gt;yield from&lt;/tt&gt; statements to
the semantically equivalent.&lt;/p&gt;
&lt;p&gt;The benefit is, you are working on a totally self-contained level. The re-formulation
only needs to use &lt;tt class="docutils literal"&gt;ast&lt;/tt&gt; node information, and turn that into Nuitka nodes. The problem
will be fully solved this way.&lt;/p&gt;
&lt;p&gt;And once we have this, we can pronounce CPython3.3 as fully supported. So if you would
like to see this happen, please join.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;Windows - MSVC support needs low level code help&lt;/p&gt;
&lt;div class="admonition-update admonition"&gt;
&lt;p class="first admonition-title"&gt;update&lt;/p&gt;
&lt;p class="last"&gt;This is now done.&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;The support for MSVC is already mostly there. If you execute the environment setting
script, and use Nuitka under Windows, it will work. The only problem is that for the
generator functions, Nuitka is using a concept called "Fiber", which is basically just
switching C stacks, so called co-routines.&lt;/p&gt;
&lt;p&gt;It works great for Linux and UNIX. For Windows, Fibers are currently using threads,
which wouldn't be as much of a performance problem, because they are very lightweight,
it is slightly wasteful only.&lt;/p&gt;
&lt;p&gt;But, the bad thing, is with these threads switching and C++ exceptions used to represent
Python exceptions, no combination of MSVC options seems to carry the day and keep the
exception in the current thread. They are caught in the wrong thread, and make
generators misbehave, crash.&lt;/p&gt;
&lt;p&gt;This is the &lt;em&gt;only&lt;/em&gt; thing that holds back proper MSVC support at this time, and it has
been like this for a while. With MinGW, the issue does not exist, but MinGW is a
stranger to many, and MSVC will be more efficient code generation, so we would like to
have that.&lt;/p&gt;
&lt;p&gt;So what it takes is somebody familiar with Windows and its ABI, esp. register usage to
write code that swaps the registers around, so we can have multiple C stacks without
threads for it too. This may involve messing around with exception jump back pointers as
well.&lt;/p&gt;
&lt;p&gt;It needs somebody who can handle this and does it for Nuitka, and then it would be well
supported. It may involve writing some assembler code. The job is also very well
contained, but also requires very specific knowledge, so please join me here. If you
think you can do this, do it.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;Windows 64 bit&lt;/p&gt;
&lt;p&gt;I have no access to Win64. I bought many Windows versions, but not the Win64 variants so
far. I understand that there are CPython builds for it, and probably a MinGW matching
it, as well as a matching newer MSVC, that may work better for C++ exceptions than the
one CPython 2.x is tied to.&lt;/p&gt;
&lt;p&gt;Doing that, you would mostly only have to play around with &lt;a class="reference external" href="http://www.nuitka.net/gitweb/?p=Nuitka.git;a=blob;f=nuitka/build/SingleExe.scons;h=f32dd2f61293ee6dca3b5b828b30769ea4d00902;hb=HEAD"&gt;SingleExe.scons&lt;/a&gt;, which
abstracts the details of it all. One issue you will encounter is that Scons needs a
Python2, and other small things. This is mostly only about porting Nuitka, and could be
done by anybody with access to Win64 and willing to fiddle around a bit.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;So these are 3 different ways you can help Nuitka. Creating the Python compiler is a huge
effort. And if you help it, we will sooner arrive at its goals. Join the &lt;a class="reference external" href="/pages/mailinglist.html"&gt;Nuitka mailing
list&lt;/a&gt; or &lt;a class="reference external" href="mailto:kay.hayen@gmail.com"&gt;contact me&lt;/a&gt; directly if
you choose to help with any of these issues.&lt;/p&gt;
&lt;p&gt;Wait, actually there is another way you can help. Please spread this news to people that
you believe might be willing to help. And allow me to plug this, I am doing Nuitka in my
spare time. If you feel, you cannot help, but still would like to support it, you can
still &lt;a class="reference external" href="/pages/donations.html"&gt;make donations&lt;/a&gt; to allow me to travel to conferences and
spend more time on it myself.&lt;/p&gt;
&lt;p&gt;Anyway, it would be great if these 3 things got sorted out. Come and join me for this
grand vision of the Python compiler.&lt;/p&gt;
&lt;p&gt;Yours,
Kay&lt;/p&gt;</description><category>Nuitka</category><category>Python</category><category>compiler</category><guid>/posts/nuitka-needs-you-a-call-for-help.html</guid><pubDate>Wed, 10 Apr 2013 07:51:13 GMT</pubDate></item><item><title>Support for portable (standalone) programs</title><link>http://nuitka.net/posts/support-for-portable-standalone-programs.html</link><description>&lt;p&gt;This post is about a feature often requested, but so far not available feature of
Nuitka. Please see the page &lt;a class="reference external" href="/pages/overview.html"&gt;"What is Nuitka?"&lt;/a&gt; for clarification
of what it is now and what it wants to be.&lt;/p&gt;
&lt;p&gt;In forums, and in Google, people are looking at a Python compiler, also as a way of
deployment. It should offer what &lt;a class="reference external" href="http://www.py2exe.org/"&gt;py2exe&lt;/a&gt; does, allow
installation independent of Python.&lt;/p&gt;
&lt;p&gt;Well, for a long time it didn't. But thanks to recent contributions, it's upcoming for the
next release, Nuitka 0.4.3, and it's in the current pre-releases.&lt;/p&gt;
&lt;p&gt;It works by adding &lt;tt class="docutils literal"&gt;&lt;span class="pre"&gt;--portable&lt;/span&gt;&lt;/tt&gt; to the command line. So this should work for you:&lt;/p&gt;
&lt;pre class="code bash literal-block"&gt;
nuitka-python --recurse-all --portable your-program.py
&lt;/pre&gt;
&lt;p&gt;Right now, it will create a folder "_python" with DLLs, and "_python.zip" with standard
library modules used along to the "your-program.exe". Copy these to another machine,
without a Python installation, and it will (should) work. Making that statement fully true
may need refinements, as some DLL dependencies might not be defined yet.&lt;/p&gt;
&lt;div class="note"&gt;
&lt;p class="first admonition-title"&gt;Note&lt;/p&gt;
&lt;p class="last"&gt;We may improve it in the future to meld everything into one executable for even easier
deployment.&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;You are more than welcome to experiment with it. To do so, download Nuitka from the &lt;a class="reference external" href="/pages/download.html"&gt;download page&lt;/a&gt; and give it a roll.&lt;/p&gt;
&lt;div class="note"&gt;
&lt;p class="first admonition-title"&gt;Note&lt;/p&gt;
&lt;p class="last"&gt;Of course, Nuitka is not about replacing "py2exe" primarily, it's only a side effect of
what we do. Our major goal is of course to accelerate Python, but surely nobody minds
achieving the two things at the same time.&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;And while the post is labeled "Windows", this feature also works for Linux at least too. It's just that the lack of Python installations on client systems is far more widespread on this platform.&lt;/p&gt;
&lt;p&gt;To me, as this is from a contributor, it's another sign of Nuitka gaining adoption for
real usage. My personal "py2exe" experience is practically not existing, I have never used
it. And I will only merge the improvements into the Nuitka project as provided by
others. My focus for the time to come is of course the compile time and run time
optimization.&lt;/p&gt;</description><category>Python</category><category>Nuitka</category><category>compiler</category><category>Windows</category><guid>/posts/support-for-portable-standalone-programs.html</guid><pubDate>Sun, 07 Apr 2013 13:52:44 GMT</pubDate></item><item><title>NetBSD support upcoming</title><link>http://nuitka.net/posts/netbsd-support-upcoming.html</link><description>&lt;p&gt;My first real UNIX ever was a NetBSD. That was now about 22 years ago. I am still
sentimental about it. I had installed it last about 8 years ago. And I still like it. Back
in the days, it was the first UNIX to encounter for me, running on Amiga hardware, first
of a friend, then on my own.&lt;/p&gt;
&lt;p&gt;Recently, there had been support for Nuitka on FreeBSD added. A lot of people use it on
the web, and some want to use Nuitka to improve their Python performance, so this is kind
of relevant.&lt;/p&gt;
&lt;p&gt;There were issues resolved, but in the end, something was with Clang on FreeBSD 8, that I
could for the life of it, not resolve remotely. So I attempted to install it myself. Using
"virt-install", these things are a breeze now. I had already done it with CentOS6 before
to test the RPM repositories of Nuitka. That "virt-install" is a wonderful thing by
itself, making virtualisation somewhat useful. It's only a pity, that I can't just install
other qemu support architectures. I would love to checkout Nuitka on PowerPC.&lt;/p&gt;
&lt;div class="note"&gt;
&lt;p class="first admonition-title"&gt;Note&lt;/p&gt;
&lt;p class="last"&gt;If you could check out Nuitka on other Linux architectures than x86_64, x86, or arm,
that would be great.&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;This is the report of getting NetBSD supported. It was a quite an interesting story that I
would like to share with you.&lt;/p&gt;
&lt;p&gt;Naivly I was assuming, that it would be just for fun, and that Nuitka will work right
away. Little did I know.&lt;/p&gt;
&lt;p&gt;On FreeBSD 9 the minimal install medium was chosen, and entered its ports collection,
installed git, cloned Nuitka, and ran the tests, successfully right away. Now that is
unfair, in the Nuitka there were tons of "Linuxism" already removed. In fact, it had to
work, and on the newest FreeBSD (version 9.1) and then it did. Great!&lt;/p&gt;
&lt;div class="note"&gt;
&lt;p class="first admonition-title"&gt;Note&lt;/p&gt;
&lt;p class="last"&gt;If you would like to add Nuitka to FreeBSD's ports, please do so. It should be really
easy now.&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;On NetBSD, things were unfortunately a little different. I also chose minimal
system. After going through "pkg source" boot strap and git install, I cloned Nuitka, and
then tried to start it. First off, it couldn't locate "python" at all. I am using
&lt;tt class="docutils literal"&gt;/usr/bin/env python&lt;/tt&gt; already. But Python2 was on the system. I ended up creating the
"python" link myself. What I should have done according to "#netbsd" is to install the software, and indeed, &lt;tt class="docutils literal"&gt;python2.7 setup.py install&lt;/tt&gt; gives an installation of Nuitka that is executable.&lt;/p&gt;
&lt;p&gt;Next up, you need to know about "Fibers" in Nuitka. These are used for C co-routines, used
to implement Python generators. They have an interface, that is very close to &lt;tt class="docutils literal"&gt;makecontext&lt;/tt&gt;/&lt;tt class="docutils literal"&gt;swapcontext&lt;/tt&gt; routines in C.&lt;/p&gt;
&lt;p&gt;For ARM and x86_64 Linux we have optimized code, that switches faster, but other
platforms, including x86 Linux, use the generic implementation, also because it normally
is very fast already.&lt;/p&gt;
&lt;p&gt;Now you have to know that since 2001 the interface is deprecated and shall not be
used. And next up, is that on NetBSD, &lt;tt class="docutils literal"&gt;makecontext&lt;/tt&gt; gave a segfault only. So I ran to
"#netbsd" and asked.&lt;/p&gt;
&lt;p&gt;Now that was a very friendly experience. Of course, I had to give a rationale for using an
obsolete interface. It's not quite obvious, why threads wouldn't be a better choice. And
maybe they are, but they definitely have more overhead associated, and if they never run
at the same time, why use them.&lt;/p&gt;
&lt;p&gt;Ultimately it helped to point out, that for a user of 22 years, an interface that is only
obsolete for 11 years, is not quite as horrifying as for others.&lt;/p&gt;
&lt;p&gt;And they helped me through it. And it turns out, funny thing. For the context to setup, you are allocating a stack
to use for the C routine, and you "get" the current context, then you make a new one. All
the examples have a certain order of doing it. And my code did it the other way around. No system but NetBSD noticed.&lt;/p&gt;
&lt;p&gt;On FreeBSD and Linux, it didn't matter. But it seems, that the needed &lt;tt class="docutils literal"&gt;getcontext&lt;/tt&gt; call
was overwriting my stack pointer now with the current stack. And &lt;tt class="docutils literal"&gt;makecontext&lt;/tt&gt; deeply
hated that, a lot. It was preparing that stack to be used, while it was in usage. Doesn't
sound like a good task to give to it, right? My fault truly, because every example on
every man page, on all systems, was doing it differently. But then they were also all
using arrays from the local stack, so quite obviously that was not real code.&lt;/p&gt;
&lt;p&gt;So that was fixed, and all good? No! Next thing was it crashed when &lt;tt class="docutils literal"&gt;free&lt;/tt&gt; happened in
Python on a compiled frame object, in a later part of a test that heavily uses
generators. Turns out, &lt;tt class="docutils literal"&gt;malloc&lt;/tt&gt; information was corrupted. I had to suspect the generic
"Fiber" code, but that took me a while to figure out.&lt;/p&gt;
&lt;p&gt;And how could my simple &lt;tt class="docutils literal"&gt;malloc&lt;/tt&gt; and &lt;tt class="docutils literal"&gt;free&lt;/tt&gt; do that, and make it happen. When I knew
that a context would not longer be used (the generator has finished, the generator object
deleted, etc), I would look at the context handle stack pointer and free it.&lt;/p&gt;
&lt;p&gt;But that pointer changed. Something totally unexpected (by me obviously), but it also
explains the earlier problem. For all systems, I had used so far, this pointer was not
being changed, and remained the same. So I could &lt;tt class="docutils literal"&gt;free&lt;/tt&gt; it from there. It worked fine, but not on NetBSD. And it wasn't correct anywhere.&lt;/p&gt;
&lt;p&gt;It seems NetBSD is doing something clever, since instead of saving the stack pointer
register in a separate area, it saves it to that place originally specified. It's quite
obviously an improvement, in that you save the pointer.&lt;/p&gt;
&lt;p&gt;It's only bad, that now to make up for this savings, I have added the pointer in a
separate field, which won't be changed, so I can free it again. If one needs it again, and
that's not unlikely, you have to remember it elsewhere. So maybe that idea is not that
clever. But it surely was wrong by me to assume that the provided value would not be
touched.&lt;/p&gt;
&lt;p&gt;So, these are 2 bugs it found. The wrong order of calls. And the usage of a pointer, that
may have been changed. This can only help with other systems, or possibly architecures
under Linux.&lt;/p&gt;
&lt;p&gt;While this is all description of nasty problems, it's also the report of the solution, and
it was big fun. I would also like to compliment "#netbsd" for being very helpful and
friendly with my porting of Nuitka. I highly enjoyed doing so. It was a lot of fun. I know
that it's probably on a very tiny amount of people that uses both NetBSD and Nuitka, but
still.&lt;/p&gt;
&lt;p&gt;If this Nuitka project were about market share, it wouldn't exist. And I can work for
market share on another day.&lt;/p&gt;</description><category>Python</category><category>Nuitka</category><guid>/posts/netbsd-support-upcoming.html</guid><pubDate>Sat, 06 Apr 2013 12:58:37 GMT</pubDate></item><item><title>Nuitka Release 0.4.2</title><link>http://nuitka.net/posts/nuitka-release-042.html</link><description>&lt;p&gt;This is to inform you about the new stable release of &lt;a class="reference external" href="http://nuitka.net"&gt;Nuitka&lt;/a&gt;. Please see the page &lt;a class="reference external" href="/pages/overview.html"&gt;"What is Nuitka?"&lt;/a&gt; for clarification of what it is now and what it wants to be.&lt;/p&gt;
&lt;p&gt;This release comes with many bug fixes, some of which are severe. It also
contains new features, like basic Python 3.3 support. And the &lt;a class="reference external" href="http://nuitka.net/pages/performance.html"&gt;performance
diagrams&lt;/a&gt; got expanded.&lt;/p&gt;
&lt;div class="section" id="new-features"&gt;
&lt;h2&gt;New Features&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;p class="first"&gt;Support for FreeBSD.&lt;/p&gt;
&lt;p&gt;Nuitka works for at least FreeBSD 9.1, older versions may or may not
work. This required only fixing some "Linuxisms" in the build process.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;New option for warning about compile time detected exception raises.&lt;/p&gt;
&lt;p&gt;Nuitka can now warn about exceptions that will be raised at run time.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;Basic Python3.3 support.&lt;/p&gt;
&lt;p&gt;The test suite of CPython3.2 passes and fails in a compatible way. New feature
"yield from" is not yet supported, and the improved argument parsing error
messages are not implemented yet.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;
&lt;div class="section" id="bug-fixes"&gt;
&lt;h2&gt;Bug Fixes&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;p class="first"&gt;Nuitka already supported compilation of "main directories", i.e. directories
with a "__main__.py" file inside. The resulting binary name was "__main__.exe"
though, but now it is "directory.exe"&lt;/p&gt;
&lt;pre class="code sh literal-block"&gt;
&lt;span class="c"&gt;# ls directory
&lt;/span&gt;__main__.py

&lt;span class="c"&gt;# nuitka --exe directory
# ls
&lt;/span&gt;directory directory.exe
&lt;/pre&gt;
&lt;p&gt;This makes this usage more obvious, and fixes the older issue &lt;a class="reference external" href="http://bugs.nuitka.net/issue49"&gt;Issue#49&lt;/a&gt; for this feature.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;Evaluation order of binary operators was not enforced.&lt;/p&gt;
&lt;p&gt;Nuitka already enforces evaluation order for just about everything. But not
for binary operators it seems. Corrects &lt;a class="reference external" href="http://bugs.nuitka.net/issue61"&gt;Issue#61&lt;/a&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;Providing an &lt;tt class="docutils literal"&gt;# coding: &lt;span class="pre"&gt;no-exist&lt;/span&gt;&lt;/tt&gt; was crashing under Python2, and ignored
under Python3, now it does the compatible thing for both.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;Global statements on the compiler level are legal in Python, and were not
handled by Nuitka, they now are.&lt;/p&gt;
&lt;pre class="code python literal-block"&gt;
&lt;span class="k"&gt;global&lt;/span&gt; &lt;span class="n"&gt;a&lt;/span&gt; &lt;span class="c"&gt;# Not in a function, but on module level. Pointless but legal!&lt;/span&gt;
&lt;span class="n"&gt;a&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;
&lt;/pre&gt;
&lt;p&gt;Effectively these statements can be ignored. Corrects part of &lt;a class="reference external" href="http://bugs.nuitka.net/issue65"&gt;Issue#65&lt;/a&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;Future imports are only legal when they are at the start of the file. This was
not enforced by Nuitka, making it accept code, which CPython would reject. It
now properly raises a syntax error. Corrects part of &lt;a class="reference external" href="http://bugs.nuitka.net/issue65"&gt;Issue#65&lt;/a&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;Raising exceptions from context was leaking references.&lt;/p&gt;
&lt;pre class="code python literal-block"&gt;
&lt;span class="k"&gt;raise&lt;/span&gt; &lt;span class="ne"&gt;ValueError&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="nn"&gt;None&lt;/span&gt;
&lt;/pre&gt;
&lt;p&gt;Under CPython3.2 the above is not allowed (it is acceptable starting
CPython3.3), and was also leaking references to its arguments. Corrects
&lt;a class="reference external" href="http://bugs.nuitka.net/issue76"&gt;Issue#76&lt;/a&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;Importing the module that became &lt;tt class="docutils literal"&gt;__main__&lt;/tt&gt; through the module name, didn't
recurse to it.&lt;/p&gt;
&lt;p&gt;This also gives a warning. PyBench does it, and then stumbles over the
non-found "pybench" module. Of course, programmers should use &lt;tt class="docutils literal"&gt;sys.modules[
"__main__" ]&lt;/tt&gt; to access main module code. Not only because the duplicated
modules don't share data. Corrects &lt;a class="reference external" href="http://bugs.nuitka.net/issue68"&gt;Issue#68&lt;/a&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;Compiled method &lt;tt class="docutils literal"&gt;repr&lt;/tt&gt; leaked references when printed.&lt;/p&gt;
&lt;p&gt;When printing them, they would not be freed, and subsequently hold references
to the object (and class) they belong to. This could trigger bugs for code
that expects &lt;tt class="docutils literal"&gt;__del__&lt;/tt&gt; to run at some point. Corrects &lt;a class="reference external" href="http://bugs.nuitka.net/issue81"&gt;Issue#81&lt;/a&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;The &lt;tt class="docutils literal"&gt;super&lt;/tt&gt; built-in leaked references to given object.&lt;/p&gt;
&lt;p&gt;This was added, because Python3 needs it. It supplies the arguments to
&lt;tt class="docutils literal"&gt;super&lt;/tt&gt; automatically, whereas for Python2 the programmer had to do it. And
now it turns out that the object lost a reference, causing similar issues as
above, preventing &lt;tt class="docutils literal"&gt;__del__&lt;/tt&gt; to run. Corrects &lt;a class="reference external" href="http://bugs.nuitka.net/issue81"&gt;Issue#81&lt;/a&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;The &lt;tt class="docutils literal"&gt;raise&lt;/tt&gt; statement didn't enforce type of third argument.&lt;/p&gt;
&lt;p&gt;This Python2-only form of exception raising now checks the type of the third
argument before using it. Plus, when it's None (which is also legal), no
reference to None is leaked.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;Python3 built-in exceptions were strings instead of exceptions.&lt;/p&gt;
&lt;p&gt;A gross mistake that went uncaught by test suites. I wonder how. Them being
strings doesn't help their usage of course, fixed. Corrects &lt;a class="reference external" href="http://bugs.nuitka.net/issue82"&gt;Issue#82&lt;/a&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;The &lt;tt class="docutils literal"&gt;&lt;span class="pre"&gt;-nan&lt;/span&gt;&lt;/tt&gt; and &lt;tt class="docutils literal"&gt;nan&lt;/tt&gt; both exist and make a difference.&lt;/p&gt;
&lt;p&gt;A older story continued. There is a sign to &lt;tt class="docutils literal"&gt;nan&lt;/tt&gt;, which can be copied away
and should be present. This is now also supported by Nuitka. Corrects
&lt;a class="reference external" href="http://bugs.nuitka.net/issue75"&gt;Issue#75&lt;/a&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;Wrong optimization of &lt;tt class="docutils literal"&gt;a == a&lt;/tt&gt;, &lt;tt class="docutils literal"&gt;a != a&lt;/tt&gt;, &lt;tt class="docutils literal"&gt;a &amp;lt; a&lt;/tt&gt; on C++ level.&lt;/p&gt;
&lt;p&gt;While it's not done during Nuitka optimization, the rich comparison helpers
still contained short cuts for "==", "!=", and "&amp;lt;".&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;The &lt;tt class="docutils literal"&gt;sys.executable&lt;/tt&gt; for &lt;tt class="docutils literal"&gt;&lt;span class="pre"&gt;nuitka-python&lt;/span&gt; &lt;span class="pre"&gt;--python-version&lt;/span&gt; 3.2&lt;/tt&gt; was still
&lt;tt class="docutils literal"&gt;python&lt;/tt&gt;.&lt;/p&gt;
&lt;p&gt;When determining the value for &lt;tt class="docutils literal"&gt;sys.executable&lt;/tt&gt; the CPython library code
looks at the name &lt;tt class="docutils literal"&gt;exec&lt;/tt&gt; had received. It was &lt;tt class="docutils literal"&gt;python&lt;/tt&gt; in all cases, but
now it depends on the running version, so it propagates.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;Keyword only functions with default values were loosing references to defaults.&lt;/p&gt;
&lt;pre class="code python literal-block"&gt;
&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;f&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;a&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;X&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;)&lt;/span&gt;
   &lt;span class="k"&gt;pass&lt;/span&gt;

&lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="c"&gt;# Can crash, X() should already be released.&lt;/span&gt;
&lt;/pre&gt;
&lt;p&gt;This is now corrected. Of course, a Python3 only issue.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;Pressing CTRL-C didn't generate &lt;tt class="docutils literal"&gt;KeyboardInterrupt&lt;/tt&gt; in compiled code.&lt;/p&gt;
&lt;p&gt;Nuitka never executes "pending calls". It now does, with the upside, that the
solution used, appears to be suitable for threading in Nuitka too. Expect more
to come out of this.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;For &lt;tt class="docutils literal"&gt;with&lt;/tt&gt; statements with &lt;tt class="docutils literal"&gt;return&lt;/tt&gt;, &lt;tt class="docutils literal"&gt;break&lt;/tt&gt;, or &lt;tt class="docutils literal"&gt;continue&lt;/tt&gt; to leave
their body, the &lt;tt class="docutils literal"&gt;__exit__&lt;/tt&gt; was not called.&lt;/p&gt;
&lt;pre class="code python literal-block"&gt;
&lt;span class="k"&gt;with&lt;/span&gt; &lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;      &lt;span class="c"&gt;# This called a.__enter__().&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt; &lt;span class="c"&gt;# This didn't call a.__exit__( None, None, None ).&lt;/span&gt;
&lt;/pre&gt;
&lt;p&gt;This is of course quite huge, and unfortunately wasn't covered by any test
suite so far. Turns out, the re-formulation of &lt;tt class="docutils literal"&gt;with&lt;/tt&gt; statements, was
wrongly using &lt;tt class="docutils literal"&gt;try/except/else&lt;/tt&gt;, but these ignore the problematic
statements. Only &lt;tt class="docutils literal"&gt;try/finally&lt;/tt&gt; does. The enhanced re-formulation now does
the correct thing. Corrects &lt;a class="reference external" href="http://bugs.nuitka.net/issue59"&gt;Issue#59&lt;/a&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;Starting with Python3, absolute imports are now the default.&lt;/p&gt;
&lt;p&gt;This was already present for Python3.3, and it turns out that all of Python3
does it.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;
&lt;div class="section" id="new-optimization"&gt;
&lt;h2&gt;New Optimization&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;p class="first"&gt;Constants are now much less often created with &lt;tt class="docutils literal"&gt;pickle&lt;/tt&gt; module, but created
directly.&lt;/p&gt;
&lt;p&gt;This esp. applies for nested constants, now more values become &lt;tt class="docutils literal"&gt;is&lt;/tt&gt;
identical instead of only &lt;tt class="docutils literal"&gt;==&lt;/tt&gt; identical, which indicates a reduced memory
usage.&lt;/p&gt;
&lt;pre class="code python literal-block"&gt;
&lt;span class="n"&gt;a&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt; &lt;span class="s"&gt;"something_special"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;b&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"something_special"&lt;/span&gt;

&lt;span class="k"&gt;assert&lt;/span&gt; &lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="ow"&gt;is&lt;/span&gt; &lt;span class="n"&gt;b&lt;/span&gt; &lt;span class="c"&gt;# Now true&lt;/span&gt;
&lt;/pre&gt;
&lt;p&gt;This is not only about memory efficiency, but also about performance. Less
memory usage is more cache friendly, and the "==" operator will be able to
shortcut dramatically in cases of identical objects.&lt;/p&gt;
&lt;p&gt;Constants now created without &lt;tt class="docutils literal"&gt;pickle&lt;/tt&gt; usage, cover &lt;tt class="docutils literal"&gt;float&lt;/tt&gt;, &lt;tt class="docutils literal"&gt;list&lt;/tt&gt;, and
&lt;tt class="docutils literal"&gt;dict&lt;/tt&gt;, which is enough for PyStone to not use it at all, which has been
added support for as well.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;Continue statements might be optimized away.&lt;/p&gt;
&lt;p&gt;A terminal &lt;tt class="docutils literal"&gt;continue&lt;/tt&gt; in a loop, was not optimized away:&lt;/p&gt;
&lt;pre class="code python literal-block"&gt;
&lt;span class="k"&gt;while&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;something&lt;/span&gt;
    &lt;span class="k"&gt;continue&lt;/span&gt;   &lt;span class="c"&gt;# Now optimized away&lt;/span&gt;
&lt;/pre&gt;
&lt;p&gt;The trailing &lt;tt class="docutils literal"&gt;continue&lt;/tt&gt; has no effect and can therefore be removed.&lt;/p&gt;
&lt;pre class="code python literal-block"&gt;
&lt;span class="k"&gt;while&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;something&lt;/span&gt;
&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;Loops with only break statements are optimized away.&lt;/p&gt;
&lt;pre class="code python literal-block"&gt;
&lt;span class="k"&gt;while&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="k"&gt;break&lt;/span&gt;
&lt;/pre&gt;
&lt;p&gt;A loop immediately broken has of course no effect. Loop conditions are
re-formulated to immediate "if ... : break" checks. Effectively this means
that loops with conditions detected to be always false to see the loop
entirely removed.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;
&lt;div class="section" id="new-tests"&gt;
&lt;h2&gt;New Tests&lt;/h2&gt;
&lt;ul class="simple"&gt;&lt;li&gt;Added tests for the found issues.&lt;/li&gt;
&lt;li&gt;Running the programs test suite (i.e. recursion) for Python3.2 and Python3.2
as well, after making adaptation so that the absolute import changes are now
covered.&lt;/li&gt;
&lt;li&gt;Running the "CPython3.2" test suite with Python3.3 based Nuitka works and
found a few minor issues.&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;
&lt;div class="section" id="organizational"&gt;
&lt;h2&gt;Organizational&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;p class="first"&gt;The &lt;a class="reference external" href="http://nuitka.net/pages/download.html"&gt;Downloads&lt;/a&gt; page now offers RPMs
for RHEL6, CentOS6, F17, F18, and openSUSE 12.1, 12.2, 12.3. This large
coverage is thanks to openSUSE build service and "ownssh" for contributing an
RPM spec file.&lt;/p&gt;
&lt;p&gt;The page got improved with logos for the distributions.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;Added "ownssh" as contributor.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;Revamped the &lt;a class="reference external" href="http://nuitka.net/doc/user-manual.html"&gt;User Manual&lt;/a&gt; in terms
of layout, structure, and content.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;
&lt;div class="section" id="summary"&gt;
&lt;h2&gt;Summary&lt;/h2&gt;
&lt;p&gt;This release is the result of much validation work. The amount of fixes the
largest of any release so far. New platforms, basic Python3.3 support,
consolidation all around.&lt;/p&gt;
&lt;/div&gt;</description><category>Python</category><category>Nuitka</category><category>compiler</category><guid>/posts/nuitka-release-042.html</guid><pubDate>Fri, 29 Mar 2013 14:32:00 GMT</pubDate></item><item><title>Nuitka RPMs (RHEL, CentOS, F17, F18, openSUSE)</title><link>http://nuitka.net/posts/nuitka-rpms-rhel-centos-f17-f18-opensuse.html</link><description>&lt;p&gt;Thanks to contributor, Nuitka now has a proper RPM spec file. And using &lt;a class="reference external" href="https://build.opensuse.org/package/show?package=Nuitka&amp;amp;project=home%3Akayhayen"&gt;openSUSE Build
Service&lt;/a&gt;, we
can now enjoy RPMs for all major distributions.&lt;/p&gt;
&lt;p&gt;Check out the revamped &lt;a class="reference external" href="/pages/download.html"&gt;download page&lt;/a&gt;.&lt;/p&gt;
&lt;div class="note"&gt;
&lt;p class="first admonition-title"&gt;Note&lt;/p&gt;
&lt;p class="last"&gt;At the time of this writing, the "stable" Nuitka 0.4.1 link points to a 0.4.2
pre-release. That is only until 0.4.2 final will be released.&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;Thanks for making this possible, very much appreciated.&lt;/p&gt;</description><category>Python</category><category>Nuitka</category><category>compiler</category><guid>/posts/nuitka-rpms-rhel-centos-f17-f18-opensuse.html</guid><pubDate>Sat, 16 Mar 2013 18:44:45 GMT</pubDate></item><item><title>Nuitka Release 0.4.1</title><link>http://nuitka.net/posts/nuitka-release-041.html</link><description>&lt;p&gt;This is to inform you about the new stable release of &lt;a class="reference external" href="http://nuitka.net"&gt;Nuitka&lt;/a&gt;. Please see the page &lt;a class="reference external" href="/pages/overview.html"&gt;"What is Nuitka?"&lt;/a&gt; for clarification of what it is now and what it wants to be.&lt;/p&gt;
&lt;p&gt;This release is the first follow-up with a focus on optimization. The major
highlight is progress towards SSA form in the node tree.&lt;/p&gt;
&lt;p&gt;Also a lot of cleanups have been performed, for both the tree building, which is
now considered mostly finished, and will be only reviewed. And for the
optimization part there have been large amounts of changes.&lt;/p&gt;
&lt;div class="section" id="new-features"&gt;
&lt;h2&gt;New Features&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;p class="first"&gt;Python 3.3 experimental support&lt;/p&gt;
&lt;ul class="simple"&gt;&lt;li&gt;Now compiles many basic tests. Ported the dictionary quick access and update
code to a more generic and useful interface.&lt;/li&gt;
&lt;li&gt;Added support for &lt;tt class="docutils literal"&gt;__qualname__&lt;/tt&gt; to classes and functions.&lt;/li&gt;
&lt;li&gt;Small compatibility changes. Some exceptions changed, absolute imports are
now default, etc.&lt;/li&gt;
&lt;li&gt;For comparison tests, the hash randomization is disabled.&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;Python 3.2 support has been expanded.&lt;/p&gt;
&lt;p&gt;The Python 3.2 on Ubuntu is not providing a helper function that was used by
Nuitka, replaced it with out own code.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;
&lt;div class="section" id="bug-fixes"&gt;
&lt;h2&gt;Bug fixes&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;p class="first"&gt;Default values were not "is" identical.&lt;/p&gt;
&lt;pre class="code python literal-block"&gt;
&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;defaultKeepsIdentity&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt; &lt;span class="n"&gt;arg&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"str_value"&lt;/span&gt; &lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="k"&gt;print&lt;/span&gt; &lt;span class="n"&gt;arg&lt;/span&gt; &lt;span class="ow"&gt;is&lt;/span&gt; &lt;span class="s"&gt;"str_value"&lt;/span&gt;

&lt;span class="n"&gt;defaultKeepsIdentity&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/pre&gt;
&lt;p&gt;This now prints "True" as it does with CPython. The solution is actually a
general code optimization, see below. &lt;a class="reference external" href="http://bugs.nuitka.net/issue55"&gt;Issue#55&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;Usage of &lt;tt class="docutils literal"&gt;unicode&lt;/tt&gt; built-in with more than one argument could corrupt the
encoding argument string.&lt;/p&gt;
&lt;p&gt;An implementation error of the &lt;tt class="docutils literal"&gt;unicode&lt;/tt&gt; was releasing references to
arguments converted to default encoding, which could corrupt it.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;Assigning Python3 function annotations could cause a segmentation fault.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;
&lt;div class="section" id="new-optimization"&gt;
&lt;h2&gt;New Optimization&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;&lt;p class="first"&gt;Improved propagation of exception raise statements, eliminating more
code. They are now also propagated from all kinds of expressions. Previously
this was more limited. An assertion added will make sure that all raises are
propagated. Also finally, raise expressions are converted into raise
statements, but without any normalization.&lt;/p&gt;
&lt;pre class="code python literal-block"&gt;
&lt;span class="c"&gt;# Now optimizing:&lt;/span&gt;
&lt;span class="k"&gt;raise&lt;/span&gt; &lt;span class="ne"&gt;TypeError&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;
&lt;span class="c"&gt;# into (minus normalization):&lt;/span&gt;
&lt;span class="k"&gt;raise&lt;/span&gt; &lt;span class="ne"&gt;ZeroDivisionError&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"integer division or modulo by zero"&lt;/span&gt;

&lt;span class="c"&gt;# Now optimizing:&lt;/span&gt;
&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;something&lt;/span&gt;
&lt;span class="c"&gt;# into (minus normalization):&lt;/span&gt;
&lt;span class="k"&gt;raise&lt;/span&gt; &lt;span class="ne"&gt;ZeroDivisionError&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"integer division or modulo by zero"&lt;/span&gt;

&lt;span class="c"&gt;# Now optimizing:&lt;/span&gt;
&lt;span class="n"&gt;function&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt; &lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt; &lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;something&lt;/span&gt;
&lt;span class="c"&gt;# into (minus normalization), notice the side effects of first checking&lt;/span&gt;
&lt;span class="c"&gt;# function and a as names to be defined, these may be removed only if&lt;/span&gt;
&lt;span class="c"&gt;# they can be demonstrated to have no effect.&lt;/span&gt;
&lt;span class="n"&gt;function&lt;/span&gt;
&lt;span class="n"&gt;a&lt;/span&gt;
&lt;span class="k"&gt;raise&lt;/span&gt; &lt;span class="ne"&gt;ZeroDivisionError&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"integer division or modulo by zero"&lt;/span&gt;
&lt;/pre&gt;
&lt;p&gt;There is more examples, where the raise propagation is new, but you get the
idea.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;Conditional expression nodes are now optimized according to the truth value of
the condition, and not only for compile time constants. This covers
e.g. container creations, and other things.&lt;/p&gt;
&lt;pre class="code python literal-block"&gt;
&lt;span class="c"&gt;# This was already optimized, as it's a compile time constant.&lt;/span&gt;
&lt;span class="n"&gt;a&lt;/span&gt; &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt; &lt;span class="s"&gt;"a"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="n"&gt;b&lt;/span&gt;
&lt;span class="n"&gt;a&lt;/span&gt; &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="bp"&gt;True&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="n"&gt;b&lt;/span&gt;

&lt;span class="c"&gt;# These are now optimized, as their truth value is known.&lt;/span&gt;
&lt;span class="n"&gt;a&lt;/span&gt; &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt; &lt;span class="n"&gt;c&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="n"&gt;b&lt;/span&gt;
&lt;span class="n"&gt;a&lt;/span&gt; &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="ow"&gt;not&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;c&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="n"&gt;b&lt;/span&gt;
&lt;/pre&gt;
&lt;p&gt;This is simply taking advantage of infrastructure that now exists. Each node
kind can overload "getTruthValue" and benefit from it. Help would be welcome
to review which ones can be added.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;Function creations only have side effects, when their defaults or annotations
(Python3) do. This allows to remove them entirely, should they be found to be
unused.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;Code generation for constants now shares element values used in tuples.&lt;/p&gt;
&lt;p&gt;The general case is currently too complex to solve, but we now make sure
constant tuples (as e.g. used in the default value for the compiled function),
and string constants share the value. This should reduce memory usage and
speed up program start-up.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;
&lt;div class="section" id="cleanups"&gt;
&lt;h2&gt;Cleanups&lt;/h2&gt;
&lt;ul class="simple"&gt;&lt;li&gt;Optimization was initially designed around visitors that each did one thing,
and did it well. It turns out though, that this approach is unnecessary, and
constraint collection, allows for the most consistent results. All remaining
optimization has been merged into constraint collection.&lt;/li&gt;
&lt;li&gt;The names of modules containing node classes were harmonized to always be
plural. In the beginning, this was used to convey the information that only a
single node kind would be contained, but that has long changed, and is
unimportant information.&lt;/li&gt;
&lt;li&gt;The class names of nodes were stripped from the "CPython" prefix. Originally
the intent was to express strict correlation to CPython, but with increasing
amounts of re-formulations, this was not used at all, and it's also not
important enough to dominate the class name.&lt;/li&gt;
&lt;li&gt;The re-formulations performed in tree building have moved out of the
"Building" module, into names "ReformulationClasses" e.g., so they are easier
to locate and review. Helpers for node building are now in a separate module,
and generally it's much easier to find the content of interest now.&lt;/li&gt;
&lt;li&gt;Added new re-formulation of &lt;tt class="docutils literal"&gt;print&lt;/tt&gt; statements. The conversion to strings is
now made explicit in the node tree.&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;
&lt;div class="section" id="new-tests"&gt;
&lt;h2&gt;New Tests&lt;/h2&gt;
&lt;ul class="simple"&gt;&lt;li&gt;Added test to cover default value identity.&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;
&lt;div class="section" id="organizational"&gt;
&lt;h2&gt;Organizational&lt;/h2&gt;
&lt;ul class="simple"&gt;&lt;li&gt;The upload of &lt;a class="reference external" href="http://pypi.python.org/pypi/Nuitka/"&gt;Nuitka to PyPI&lt;/a&gt; has been
repaired and now properly displays project information again.&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;
&lt;div class="section" id="summary"&gt;
&lt;h2&gt;Summary&lt;/h2&gt;
&lt;p&gt;The quicker release is mostly a consolidation effort, without actual performance
progress. The progress towards SSA form matter a lot on the outlook front. Once
this is finished, standard compiler algorithms can be added to Nuitka which go
beyond the current peephole optimization.&lt;/p&gt;
&lt;/div&gt;</description><category>Python</category><category>Nuitka</category><category>compiler</category><guid>/posts/nuitka-release-041.html</guid><pubDate>Tue, 05 Mar 2013 22:13:00 GMT</pubDate></item></channel></rss>