Language Selection

English French German Italian Portuguese Spanish


Programming: Rust, Selenium and Python

Filed under
  • Andy Wingo: instruction explosion in guile

    In the previous blog post I wrote about how to write a RGB to grayscale conversion filter for GStreamer in Rust. In this blog post I’m going to write about how to optimize the processing loop of that filter, without resorting to unsafe code or SIMD instructions by staying with plain, safe Rust code.

    I also tried to implement the processing loop with faster, a Rust crate for writing safe SIMD code. It looks very promising, but unless I missed something in the documentation it currently is missing some features to be able to express this specific algorithm in a meaningful way. Once it works on stable Rust (waiting for SIMD to be stabilized) and includes runtime CPU feature detection, this could very well be a good replacement for the ORC library used for the same purpose in GStreamer in various places. ORC works by JIT-compiling a minimal “array operation language” to SIMD assembly for your specific CPU (and has support for x86 MMX/SSE, PPC Altivec, ARM NEON, etc.).

  • Selenium, jQuery and File uploads

    One of the contracts I’ve been working on recently is working with Gurock building a test automation system for a PHP application, their test management app TestRail. As well as building the instrastructure for the application testing and the API testing I’ve once again been involved in the nitty-gritty of testing a web application with Selenium and all the fun that involved.

    And actually it has been fun. We’ve had a bunch of issues to overcome and despite the usual pain and trauma and running round in circles we seem to have overcome most of them and have a test suite that is robust against the three different platforms we’re testing against.

  • Continuous Integration with Python: An Introduction

    When writing code on your own, the only priority is making it work. However, working in a team of professional software developers brings a plethora of challenges. One of those challenges is coordinating many people working on the same code.

    How do professional teams make dozens of changes per day while making sure everyone is coordinated and nothing is broken? Enter continuous integration!

  • Python Cyber Monday Sales
  • Truths programmers should know about case

    A couple weeks ago I gave a talk about usernames at North Bay Python. The content came mostly from things I’ve learned in roughly 12 years of maintaining django-registration, which has taught me more than I ever wanted to know about how complex even “simple” things can be.

    I mentioned toward the beginning of the talk, though, that it wasn’t going to be one of those “falsehoods programmers believe about X” things. If you’re not familiar with those, you can just Google for “falsehoods programmers believe” and get a bunch of typical examples. My issues with the “falsehoods” articles is, basically, that they tell you a bunch of things they say are wrong, but many don’t tell you why those things are wrong or what they think you should do instead. Which I suspect will just lead people to read the article, pat themselves on the back, and then find new and exciting ways to be wrong that weren’t mentioned, because they haven’t actually learned about the underlying issues.

  • Python founder Guido van Rossum: What do do with your computer science career

    I regularly receive questions from students in the field of computer science looking for career advice.

    Here's an answer I wrote to one of them. It's not comprehensive or anything, but I thought people might find it interesting.

    The question about "9-5" vs. "enterpreneur" is a complex one -- not everybody can be a successful entrepreneur (who would do the work? Smile and not everybody has the temperament for it. For me personally it was never an option -- there are vast parts of management and entrepreneurship that I wouldn't enjoy doing, such as hiring (I hate interviewing and am bad at it) and firing (too emotionally draining -- even just giving negative feedback is hard for me). Pitching ideas to investors is another thing that I'd rather do without.

  • Contributor Focus: Zander Brown

    All I can say is that I’m thankful for his considerable contributions to Mu’s code base, eagle-eyed code reviews and seemingly limitless Pythonic knowledge.

    Actually, when I met Zander for the first time in July, it turned out he’s a 17 year-old studying for his A-levels (the exams teenagers sit in the UK to help them to get into university). He’s doing A-levels in Maths, Physics and Computer Science. He’s third from the left in the picture below:

Compilers: Rust and GCC 7.4 RC1

Filed under
  • RLSL Continues Maturing For Compiling Rust To SPIR-V For Use With Vulkan Drivers

    One of the most passionate topics by readers in the Phoronix Forums is the Rust programming language. For about one year now "RLSL" has been in the works as a Rust-based shading language that can compile into SPIR-V. While initially I held off on writing about it to see if it would be just another small toy project, RLSL has continued maturing and seeing new functionality added in.

  • GCC 7.4 Status Report (2018-11-22), GCC 7.4 RC1 scheduled for next week
  • GCC 7.4 Is Being Released Soon

    While GCC 9 is releasing in early 2019, for those still depending upon last year's GCC 7 compiler series, the GCC 7.4 point release will soon be out. 

    SUSE's Richard Biener is putting the finishing touches on GCC 7.4. He intends to issue the first release candidate towards the end of this week while the official GCC 7.4.0 compiler release shouldn't be long after that. The GCC 7 branch remains open for bug and documentation fixes.

Programming: Mixing Languages and Python News

Filed under
  • How to use multiple programming languages without losing your mind

    With all the different programming languages available today, many organizations have become digital polyglots. Open source opens up a world of languages and technology stacks developers can use to accomplish their tasks, including developing and supporting legacy and modern software applications.

    Polyglots can talk with millions more people than those who only speak their native language. In software environments, developers don't introduce new languages to achieve specifc ends, not to communicate better. Some languages are great for one task but not another, so working with multiple programming languages enables developers to use the right tool for the job. In this way, all development is polyglot; it's just the nature of the beast.

    The creation of a polyglot environment is often gradual and situational. For example, when an enterprise acquires a company, it takes on the company's technology stacks—including its programming languages. Or as tech leadership changes, new leaders may bring different technologies into the fold. Technologies also fall in and out of fashion, expanding the number of programming languages and technologies an organization has to maintain over time.

    A polyglot environment is a double-edged sword for enterprises, bringing benefits but also complexities and challenges. Ultimately, if the situation remains unchecked, polyglot will kill your enterprise.

  • How many programming languages is too many for one project?

    One great thing about programming languages is that there is such diversity that you can choose the best one to solve any given problem. But sometimes the worst thing can be when projects take advantage of this and build applications or systems of applications that require domain knowledge of many different languages. When this happens, it can be difficult for everyone, or even anyone, to fully understand the scope of the project.

  • 54: Python 1994 - Paul Everitt

    Paul talks about the beginning years of Python.
    Talking about Python's beginnings is also talking about the Python community beginnings.
    Yes, it's reminiscing, but it's fun.

  • PyDev of the Week: Reimar Bauer

    This week we welcome Reimar Bauer (@ReimarBauer) as our PyDev of the Week! Reimar is a core developer of the popular Python wiki package, MoinMoin. He has spoken at PyCON DE, FOSDEM and EuroPython about Python. Let’s take a few minutes to get to know him better!

Programming: Java, Python, and RQuantLib (CRAN)

Filed under
  • The rumors of java’s demise are greatly exaggerated

    If you do an Internet search on the phrase, “Is Java dead,” more than 62 million hits will come up. The idea that Java has passed its useful life has been predicted for almost a decade. And yet Java remains the No. 1 programming language, according to surveys.

    At the same time, enterprises are becoming more comfortable with having a polyglot programming environment, allowing developers the flexibility to use the tools they consider appropriate for the task at hand.

    This makes it more likely – not less – that Java will continue to thrive. If enterprise environments are becoming more splintered, Java, with its huge installed base and experienced programmers, is unlikely to be overtaken by any new language for many years to come.

  • 5.0a4: the sys.path to hell

    Another alpha of 5.0 is available: 5.0a4. This fixes a few problems with the new SQLite-based storage. Please give it a try, especially to experiment with dynamic contexts.

    The challenge with this release was something that started as a seemingly simple fix. tries to emulate how Python runs programs, including how the first element of sys.path is set. A few people run coverage with sys.path fully configured, and coverage’s setting of sys.path[0] was breaking their stuff.

  • RQuantLib 0.4.6: Updated upstream, and calls for help

    The new 0.4.6 release of RQuantLib arrived on CRAN and Debian earlier today. It is two-fold update: catching up QuantLib 1.14 while also updating to Boost 1.67 (and newer).

    A special thanks goes to Josh for updating to the binary windows library in the rwinlib repository allowing us a seamless CRAN update.

    The package needs some help, though. There are two open issues. First, while it builds on Windows, many functions currently throw errors. This may be related to upstream switching to a choice of C++11 or Boost smart pointers though this throws no spanners on Linux. So it may simply be that some of the old curve-building code shows its age. It could also be something completely different—but we need something with a bit of time, debugging stamina, at least a little C++ knowledge and a working Windows setup for testing. I have a few of the former attributes and can help, but no suitable windows (or mac, see below) machine. If you are, or can be, the person to help on Windows, please get in touch at this issue ticket.

Python: Concurrency, MicroPython, Tweet Analysis and Ellipsoid Distance on Earth

Filed under
  • Concurrency on the Internet of Things (Arduino, MicroPython, Espruino)

    In this presentation I talk about what concurrency actually is, why it matters for Internet of Things applications, and which platforms are best at handling it.

  • Sentiment analysis on Trump's tweets using Python

    I'm almost sure that all the code will run in Python 2.7, but I'll use Python 3.6. I highly recommend to install Anaconda, which is a very useful Python distribution to manage packages that includes a lot of useful tools, such as Jupyter Notebooks. I'll explain the code supposing that we will be using a Jupyter Notebook, but the code will run if you are programming a simple script from your text editor. You'll just need to adapt it (it's not hard).

  • John Cook: Ellipsoid distance on Earth

    To first approximation, Earth is a sphere. But it bulges at the equator, and to second approximation, Earth is an oblate spheroid. Earth is not exactly an oblate spheroid either, but the error in the oblate spheroid model is about 100x smaller than the error in the spherical model.

    Finding the distance between two points on a sphere is fairly simple. Here’s a calculator to compute the distance, and here’s a derivation of the formula used in the calculator.

    Finding the distance between two points on an ellipsoid is much more complicated. (A spheroid is a kind of ellipsoid.) Wikipedia gives a description of Vincenty’s algorithm for finding the distance between two points on Earth using an oblate spheroid model (specifically WGS-84). I’ll include a Python implementation below.

Programming: Regular Expressions using Python 3, Migrating from Bazaar to Git, 22 Essential Git Commands

Filed under
  • Regular Expressions using Python 3

    Regular Expressions are often seen as this really obscure series of hieroglyphs that one typically copies from the Internet and pastes into his/her code. This mysterious spell then shows magical capabilities of finding patterns inside strings of text and if we ask it nicely it will even do us the favor of replacing a given pattern within a string with something nicer.

    For example, when you are writing handlers for URL (and God help you if you are writing one from scratch) then you often want to display the same result regardless of the trailing ‘/’ in the URL. E.g and should both point to the same page despite the trailing ‘/’.

  • Migrating from Bazaar to Git on Launchpad just got easier!

    Debian recently switched from Alioth to Salsa offering only Git hosting from now on and that simplifies the work of exiting contributors and also helps newcomers who are most likely already familiar with Git if they know at least one version control system. (Thanks to everyone involved in the transition!)

  • 22 Essential Git Commands

    Git has become the quintessential version control system. The rise of Git’s popularity can be attributed to its speed, agility and versatility. Whether you are a freelancing web developer or a software designer for enterprise-level applications, you can benefit from using Git. It helps you keep track of your files through systematic versioning. Git makes it easier to roll-back to older versions of code or create new branches to experiment on the current codebase. Also, Git is a distributed version control system which means you don’t have to always connect to a central server to get your work done.Below are the essential Git commands that will help in your day-to-day tasks. The simple examples will give you an understanding of the commands, so you can easily remember the syntax when you need to use them.

Two posts about programming events and Collabora on metrics for test suite comprehensiveness

Filed under
  • Why Aren't There C Conferences?
  • KDE Itinerary - Last week in France

    A week ago Benjamin Port presented our work around KDE Itinerary at Capitole de Libre in Toulouse, and Thursday I did the same at the Paris Open Transport Meetup. Here’s some of the feedback we got.

    First of all, I’m very happy with the interest we saw in this, it seems people are aware of and care for the privacy issues there and are very eager to use a free software alternative to the proprietary services, that’s very motivating.

  • Metrics for test suite comprehensiveness

    In a previous post I discussed a few FOSS specific mentalities and practices that I believe play a role in discouraging adoption of comprehensive automated testing in FOSS. One of the points that came up in discussions, is whether the basic premise of the post, that FOSS projects don't typically employ comprehensive automated testing, including not having any tests at all, is actually true. That's a valid concern, given that the post was motivated by my long-term observations working on and with FOSS and didn't provide any further data. In this post will try to address this concern.

PHP 7.3 Performance Benchmarks Are Looking Good Days Ahead Of Its Release

Filed under

Released on Thursday was PHP 7.3 RC6 as the last planned pre-release for the upcoming PHP 7.3. Here are some benchmarks looking at the PHP 7.3 performance compared to PHP releases going back to the v5.5 series on a Linux server.

PHP 7.3 RC6 is the last expected release candidate before the general availability expected around 6 December. The RC6 changes are outlined by the release announcement.

Read more

Programming: Qt, PHP and Hacktoberfest 2018

Filed under
  • Qt Quick WebGL release in Qt 5.12

    One of the Qt 5.12 new features is Qt Quick WebGL platform plugin (also known as WebGL streaming). It was actually available as a technology preview from Qt 5.10 already, but starting with Qt 5.12 it is a released feature.

  • PHP version 7.1.25RC1 and 7.2.13RC1
  • More than 46k people participate in Hacktoberfest 2018

    The fifth-annual Hacktoberfest, the month-long event that encourages people around the world to contribute to open source projects during October, was a tremendous success.

    During October 2018, 46,088 participants completed the Hacktoberfest challenge: making at least five pull requests (PR) to any public repository on GitHub. This is a 44% increase over 2017 participation levels, even though this year's event required five pull requests instead of the previous four. Everyone who completes the challenge is rewarded with a free, limited-edition Hacktoberfest t-shirt.

    Hacktoberfest showed its global reach—participants hailed from 143 countries (based on their shipping address). Additionally, 267 community-organized Hacktoberfest events (a 124% increase over 2017) were held in 50 different countries.

How I uncovered my inner geek

Filed under
Red Hat

I'm beginning to feel old. A few months ago, somebody called me a "gray beard" in a comment in an IRC channel. You might have thought my lack of actual beard and the fact that they used the US spelling, rather than the correct "grey," would have meant that I was unaffected, but no, I was. I've been around for a long time, and I've played with more protocols than are probably good for me, so when I briefly told how I'd started out, and a friend replied, "that story is so good," I realised that maybe my experience differs enough from that of many who've joined the profession more recently than me1 that it might be of interest.

So, here goes. I should preface this account by saying that I was quite a geek at school—and by school, I mean "school," not "university"2—doing basic stick-figure animation, writing Mandelbrot set generators, learning PASCAL and Assembly language, trying to hack the very basic school network, that sort of thing. By the time I went to university in 1990, I'd decided to do something a bit different,5 so I spent two years studying English literature (mainly pre-1840) and another two years studying theology (mainly pre-1640). But I kept up some geekery and had a laptop or PC throughout my time at university. Well, I say laptop, but my first PC-compatible was an 8088 Hitachi luggable with an orange screen. Now, that was a computer.

And I had email. This may not seem like a surprise, but as a humanities6 student in a UK university in the early '90s, it took some doing. In order to get access to email at all, you needed a signed form (it was on yellow paper, I think) from your director of studies and your college computing officer to say you had need of it—and even then you were allowed to send emails only to other people on the UK academic network. And my email address used the standard UK academic addressing scheme: Yes, I know this looks backwards. You youngsters: I don't know.

Read more

Syndicate content

More in Tux Machines

today's leftovers

OSS Leftovers

  • #RecruitmentFocus: Open source skills in high demand
    The unemployment rate in South Africa rose to 27.5% in the third quarter of 2018, while the demand for skills remains high - leaving an industry conundrum that is yet to be solved. According to SUSE, partnerships that focus on upskilling graduates and providing real-work skills, as well as placement opportunities - could be exactly what the industry in looking for.
  • Stable: not moving vs. not breaking
    There are two terms that brings a heavy controversy in the Open Source world: support and stable. Both of them have their roots in the “old days” of Open Source, where its commercial impact was low and very few companies made business with it. You probably have read a lot about maintenance vs support. This controversy is older. I first heard of it in the context of Linux based distributions. Commercial distribution had to put effort in differentiating among the two because in Open SOurce they were used indistictly but not in business. But this post is about the adjectivet stable…
  • Cameron Kaiser: A thank you to Ginn Chen, whom Larry Ellison screwed
    Periodically I refresh my machines by dusting them off and plugging them in and running them for a while to keep the disks spinnin' and the caps chargin'. Today was the day to refurbish my Sun Ultra-3, the only laptop Sun ever "made" (they actually rebadged the SPARCle and later the crotchburner 1.2GHz Tadpole Viper, which is the one I have). Since its last refresh the IDPROM had died, as they do when they run out of battery, resetting the MAC address to zeroes and erasing the license for the 802.11b which I never used anyway. But, after fixing the clock to prevent GNOME from puking on the abnormal date, it booted and I figured I'd update Firefox since it still had 38.4 on it. Ginn Chen, first at Sun and later at Oracle, regularly issued builds of Firefox which ran very nicely on SPARC Solaris 10. Near as I can determine, Oracle has never offered a build of any Firefox post-Rust even to the paying customers they're bleeding dry, but I figured I should be able to find the last ESR of 52 and install that. (Amusingly this relic can run a Firefox in some respects more current than TenFourFox, which is an evolved and patched Firefox 45.)
  • Protecting the world’s oceans with open data science
    For environmental scientists, researching a single ecosystem or organism can be a daunting task. The amount of data and literature to comb through (or create) is often overwhelming. So how, then, can environmental scientists approach studying the health of the world’s oceans? What ocean health means is a big question in itself—oceans span millions of square miles, are home to countless species, and border hundreds of countries and territories, each of which has its own unique marine policies and practices. But no matter how daunting this task may seem, it’s a necessary and vital one. So in 2012, the National Center for Ecological Analysis and Synthesis (NCEAS) and Conservation International publicly launched the Ocean Health Index (OHI), an ambitious initiative to measure the benefits that oceans provide to people, including clean water, coastal protections, and biodiversity. The idea was to create an annual assessment to document major oceanic changes and trends, and in turn, use those findings to craft better marine policy around the world.

Openwashing Leftovers

The Last Independent Mobile OS

The year was 2010 and the future of mobile computing was looking bright. The iPhone was barely three years old, Google’s Android had yet to swallow the smartphone market whole, and half a dozen alternative mobile operating systems—many of which were devoutly open source—were preparing for launch. Eight years on, you probably haven’t even heard of most of these alternative mobile operating systems, much less use them. Today, Android and iOS dominate the global smartphone market and account for 99.9 percent of mobile operating systems. Even Microsoft and Blackberry, longtime players in the mobile space with massive revenue streams, have all but left the space. Then there’s Jolla, the small Finnish tech company behind Sailfish OS, which it bills as the “last independent alternative mobile operating system.” Jolla has had to walk itself back from the edge of destruction several times over the course of its seven year existence, and each time it has emerged battered, but more determined than ever to carve out a spot in the world for a truly independent, open source mobile operating system. After years of failed product launches, lackluster user growth, and supply chain fiascoes, it’s only been in the last few months that things finally seem to be turning to Jolla’s favor. Over the past two years the company has rode the wave of anti-Google sentiment outside the US and inked deals with large foreign companies that want to turn Sailfish into a household name. Despite the recent success, Jolla is far from being a major player in the mobile market. And yet it also still exists, which is more than can be said of every other would-be alternative mobile OS company. Read more