User loginNavigation |
PythonMyHDL(via Daily Python-URL)
MyHDL is an open-source package for using Python as a hardware description and verification language. A Verilog converter is also included. EE Times provides some background on MyHDL in this article. NetKernel - XML processing pipelineIt rapidly became clear that a single language runtime is too limited for general applications ... as a minimum we needed both a linear-flow language and a recursive tree composition language ... while declarative languages are excellent for rapid assembly of XML operations, they are terrible for expressing business logic and logical flow-control ... Our other declarative language is XML Recursion Language (XRL). XRL is like XInclude with services, in which inclusion references fire service invocations into the URI address space in order to recursively compose an XML document. XRL is an elegant and powerful way of building XHTML applications ... The active URI, in combination with the local NetKernel environment, is a functional program - Introducing NetKernel. It's another XML pipeline (there's a Freshmeat project that lets Coccoon apps run in NetKernel), apparently from HP, which might interest people here. By andrew cooke at 2005-09-26 18:12 | Functional | Logic/Declarative | Python | XML | 2 comments | other blogs | 7871 reads
Guido van Rossum: Building an Open Source Project and Community
A long (close to two hours) audio presentation about Python's history and philosophy.
LtU readers will find a lot to disagree with (especially in part 2), for instance when Guido discusses dynamic languages and typing. And yet, I think Guido tries to be reasonable, even though I disagree with some of his conclusions. Be that as it may, this talk provides a useful summary of Python's history, and some idea about the workings of the Python community. Long time readers will remember that I think language communities play an important, yet under appreciated, role in language evolution and success. Python Challenge
A well done set of Python challenges.
Some solutions can be found here, if you need help getting started... Python metaprogramming with decoratorsThis recipe for using decorators to load data structures caught my eye (thanks to the Daily Python URL) as an interesting metaprogramming technique. Decorators are function transformers that can be applied declaratively to normal Python methods and functions using the much-disputed decorator syntax (see this previous LtU thread). This recipe uses decorators that return the supplied function unmodified, but as a side-effect register it in a dictionary of handlers for various value conversion operations. The decorator code itself is called when the module is loaded, so the dictionary is populated "on demand" at run-time. This makes an interesting contrast with compile-time metaprogramming techniques such as C++ template metaprogramming and the use of code generators and preprocessors. I do not believe that C# attributes could easily be used in a similar way, as unlike Python decorators these receive no information about the entities they are attached to when they are instantiated. Python: Generator methodsThis recipe enables the use of the yield statement within a method by decorating that method with a wrapper for a generator object. Say what you will about Python, it does provide us with clever tricks such as this one. UCPy: Reverse Engineering PythonInteresting paper from PyCon 2003 (so yes, it's old news - but new on Lambda, as far as I can see): UCPy: Reverse-Engineering Python. The project partly entails replacing the "CISC-style" Python VM with a much smaller "RISC-style" VM. The authors' comments on this decision are worth considering in the light of recent discussions about the design of the Parrot VM. By Dominic Fox at 2005-03-22 16:23 | Implementation | Python | 23 comments | other blogs | 10795 reads
Defining new infix operators in PythonThis is an absolutely blinding hack. See if you can guess how it's done before looking at the recipe... Python Optimization SurprisesThis weekend, I took another crack at trimming microseconds off the common-case path for generic function execution, and succeeded in dropping the excution time from 13.2 microseconds to just over 9.8. (Which is about 9 microseconds overhead added relative to a hand-optimized Python version of the same trivial function.) Along the way, however, I realized a couple of surprising things about Python performance tuning. An amusing story that tells you something about Python's implementation. The discussion of closures is of particular interest... An Introduction to Jython
Getting sick of Python posts by now? Sorry...
A large part of this presentation consists of a series of code examples showing how something is done in pure Java versus a Jython version. A nice illustration of the differences between the languages (did anyone say explicit static typing?) and about their different abstraction facilities and domain specific abstractions (e.g., builtin dictionaries and list comprehensions). Analyzing these examples may be fun exercise idea for those of us teaching PL courses. By Ehud Lamm at 2005-01-19 14:24 | Implementation | Python | Teaching & Learning | login or register to post comments | other blogs | 6417 reads
|
Browse archives
Active forum topics |
Recent comments
26 weeks 5 days ago
26 weeks 5 days ago
26 weeks 5 days ago
48 weeks 6 days ago
1 year 1 week ago
1 year 2 weeks ago
1 year 2 weeks ago
1 year 5 weeks ago
1 year 10 weeks ago
1 year 10 weeks ago