Programming: State of Rust Survey and Python Development
-
Launching the 2018 State of Rust Survey
It’s that time again! Time for us to take a look at how the Rust project is doing, and what we should plan for the future. The Rust Community Team is pleased to announce our 2018 State of Rust Survey! Whether or not you use Rust today, we want to know your opinions. Your responses will help the project understand its strengths and weaknesses and establish development priorities for the future.
Completing this survey should take about 10 to 15 minutes and is anonymous unless you choose to give us your contact information. We will be accepting submissions until September 8th, and we will write up our findings a month or so afterwards to blog.rust-lang.org. You can see last year’s results here.
-
Perform robust unit tests with PyHamcrest
At the base of the testing pyramid are unit tests. Unit tests test one unit of code at a time—usually one function or method.
Often, a single unit test is designed to test one particular flow through a function, or a specific branch choice. This enables easy mapping of a unit test that fails and the bug that made it fail.
Ideally, unit tests use few or no external resources, isolating them and making them faster.
-
Adding None-aware operators to Python?
A PEP that has been around for a while, without being either accepted or rejected, was reintroduced recently on the python-ideas mailing list. PEP 505 ("None-aware operators") would provide some syntactic sugar, in the form of new operators, to handle cases where variables might be the special None value. It is a feature that other languages support, but has generally raised concerns about being "un-Pythonic" over the years. At this point, though, the Python project still needs to figure out how it will be governed—and how PEPs can be accepted or rejected.
-
The Grumpy Editor's Python 3 experience
LWN has been running articles for years to the effect that the end of Python 2 is nigh and that code should be ported to Python 3 immediately. So, naturally, one might expect that our own site code, written in Python, had been forward-ported long ago. Strangely enough, that didn't actually happen. It has mostly happened now, though. In the process of doing this work, your editor has noticed a few things that don't necessarily appear in the numerous porting guides circulating on the net.
One often-heard excuse for delaying this work is that one or more dependencies have not yet been ported to Python 3. For almost everybody, that excuse ran out of steam some time ago; if a module has not been forward-ported by now, it probably never will be and other plans need to be made. In our case, the final dependency was the venerable Quixote web framework which, due to the much appreciated work of Neil Schemenauer, was forward-ported at the end of 2017. Quixote never really took the world by storm, but it makes the task of creating a code-backed site easy; we would have been sad to have to leave it behind.
Much of the anxiety around moving to Python 3 is focused on how that language handles strings. The ability to work with Unicode was kind of bolted onto Python 2, but it was designed into Python 3 from the beginning. The result is a strict separation between the string type (str), which holds text as Unicode code points, and bytes, which contains arbitrary data — including text in a specific encoding. Python 2 made it easy to be lazy and ignore that distinction much of the time; Python 3 requires a constant awareness of which kind of data is being dealt with.
- Login or register to post comments
- Printer-friendly version
- 2732 reads
- PDF version
More in Tux Machines
- Highlights
- Front Page
- Latest Headlines
- Archive
- Recent comments
- All-Time Popular Stories
- Hot Topics
- New Members
digiKam 7.7.0 is releasedAfter three months of active maintenance and another bug triage, the digiKam team is proud to present version 7.7.0 of its open source digital photo manager. See below the list of most important features coming with this release. |
Dilution and Misuse of the "Linux" Brand
|
Samsung, Red Hat to Work on Linux Drivers for Future TechThe metaverse is expected to uproot system design as we know it, and Samsung is one of many hardware vendors re-imagining data center infrastructure in preparation for a parallel 3D world. Samsung is working on new memory technologies that provide faster bandwidth inside hardware for data to travel between CPUs, storage and other computing resources. The company also announced it was partnering with Red Hat to ensure these technologies have Linux compatibility. |
today's howtos
|
Recent comments
1 year 11 weeks ago
1 year 11 weeks ago
1 year 11 weeks ago
1 year 11 weeks ago
1 year 11 weeks ago
1 year 11 weeks ago
1 year 11 weeks ago
1 year 11 weeks ago
1 year 11 weeks ago
1 year 11 weeks ago