Language Selection

English French German Italian Portuguese Spanish

Programming: Rust Turns 4, GCC, Go and Python

Filed under
Development
  • 4 years of Rust

    On May 15th, 2015, Rust was released to the world! After 5 years of open development (and a couple of years of sketching before that), we finally hit the button on making the attempt to create a new systems programming language a serious effort!

    It’s easy to look back on the pre-1.0 times and cherish them for being the wild times of language development and fun research. Features were added and cut, syntax and keywords were tried, and before 1.0, there was a big clean-up that removed a lot of the standard library. For fun, you can check Niko’s blog post on how Rust's object system works, Marijn Haverbeke’s talk on features that never made it close to 1.0 or even the introductory slides about Servo, which present a language looking very different from today.

    Releasing Rust with stability guarantees also meant putting a stop to large visible changes. The face of Rust is still very similar to Rust 1.0. Even with the changes from last year’s 2018 Edition, Rust is still very recognizable as what it was in 2015. That steadiness hides that the time of Rust’s fastest development and growth is now.

  • Three Ways of Storing and Accessing Lots of Images in Python

    Why would you want to know more about different ways of storing and accessing images in Python? If you’re segmenting a handful of images by color or detecting faces one by one using OpenCV, then you don’t need to worry about it. Even if you’re using the Python Imaging Library (PIL) to draw on a few hundred photos, you still don’t need to. Storing images on disk, as .png or .jpg files, is both suitable and appropriate.

    Increasingly, however, the number of images required for a given task is getting larger and larger. Algorithms like convolutional neural networks, also known as convnets or CNNs, can handle enormous datasets of images and even learn from them. If you’re interested, you can read more about how convnets can be used for ranking selfies or for sentiment analysis.

    ImageNet is a well-known public image database put together for training models on tasks like object classification, detection, and segmentation, and it consists of over 14 million images.

    Think about how long it would take to load all of them into memory for training, in batches, perhaps hundreds or thousands of times. Keep reading, and you’ll be convinced that it would take quite awhile—at least long enough to leave your computer and do many other things while you wish you worked at Google or NVIDIA.

  • A Linaro Developer Has Taken Up The Effort Of Converting GCC's SVN To Git

    The lengthy battle of converting the GNU Compiler Collection (GCC) to using a Git workflow from SVN might be getting closer to finally culminating... Linaro developer Maxim Kuvyrkov has jumped on the task of converting the GCC repository from SVN to Git and did so without much fuss.

    Eric S. Raymond has been working for what feels like ages on converting GCC SVN to Git using his "Reposurgeon" tool but given the massive size of the GCC code-base and long development history, it's been a slow process. There were roadblocks in his approach of converting the SVN history to Git that were blamed on high RAM prices and other obstacles. Most recently he was working on porting his tool to Golang but that it would take months to complete.

  • Friendlier tracebacks

    When beginners run programs that generate Python tracebacks, they are almost always confused by what the information shown and have no clue as to what this all means. More experienced programmers can sometimes extract enough information directly from tracebacks to figure out what what wrong, but they will often have to resort to inserting a few print calls and running their program again to truly figure out what went wrong and how to fix it. (A minority of programmers might eschew using print calls and use a debugger instead.)

    In order to make tracebacks more useful for them, some advanced programmers have designed tools to add more information so that simply looking at the enhanced traceback might be sufficient to diagnose properly the problem. These tools include better_exchook, infi.traceback, rich-traceback, stackprinter, as well as the beautiful better-exceptions, and many others including Python's own cgitb module. While there is no doubt that the additional information provided by these tools is useful for advanced programmers, it would likely only add to their confusion if it were used by beginners.

  • The Price of the Hallway Track

    There are many good reasons to not go to every talk possible when attending conferences. However increasingly it became hip to boast with not going to talks at all – encouraging others to follow suit. As a speaker, that rubs me the wrong way and I’ll try to explain why.

    This article started at PyCon US 2019, the biggest Python conference in the world with roughly 3,500 attendees. Over lunch on day one, I’ve noticed tweets encouraging people to not go to talks and instead do the infamous hallway track (= socializing in the hallways) or go to open spaces, and watch the videos later on YouTube. Sometimes even claiming that it doesn’t make any sense to go to talks in the first place.

  • Data Science Dojo Blog: Network Theory and Game of Thrones - A Perfect Combination

    Game of Thrones is arguably one of the biggest pop culture phenomena to hit the public consciousness in the last decade. Since the hype for the final season's arrival has gone down a bit, especially mine after episode three , I thought I could use this time to finally explore a side of Data Science that has always intrigued me - Network Theory, and combine it with a topic I am very invested in - Game of Thrones. Just to be clear I won't be making any claims or predictions about the plot of the show - No Spoilers. I just want to use Game of Thrones as a hopefully relatable context for discussing the analysis techniques.

    At a high level, Network Theory is the study of relationships between objects, more specifically it is a subfield of Graph Theory with extra attributes attached to the nodes and edges. If you're confused by these terms, don't worry I'll explain everything in a bit. For the rest, you might be familiar with graph theory and have not-so-fond memories associated with it, but bear with me for a while. I first learned basic graph theory in my university's algorithms course and, I'll be honest, I found absolutely nothing of interest in the entire topic. Sure, I could find the shortest path between two cities or find the best way to lay down routers in a computer network, but these topics never seemed fun to me. That is until I started exploring data science and learned about network analysis. That really opened my eyes to what the graph theory concepts were capable of. I encourage you to check out this video about exploring opposing factions and their effects on each other using graphs.

  • Go Baby Go

    I’m starting a new job next month and their language of choice is Go. Which means I have a good reason to finally get around to learning it (far too many years after I saw Marga talk about it at DebConf). For that I find I need a project - it’s hard to find the time to just do programming exercises, whereas if I’m working towards something it’s a bit easier. Naturally I decided to do something home automation related. In particular I bought a couple of Xiaomi Mijia Temperature/Humidity sensors a while back which also report via Bluetooth. I had a set of shell scripts polling them every so often to get the details, but it turns out they broadcast the current status every 2 seconds. Passively listening for that is a better method as it reduces power consumption on the device - no need for a 2 way handshake like with a manual poll. So, the project: passively listen for BLE advertisements, make sure they’re from the Xiaomi device and publish them via MQTT every minute.

    One thing that puts me off new languages is when they have a fast moving implementation - telling me I just need to fetch the latest nightly to get all the features I’m looking for is a sure fire way to make me hold off trying something. Go is well beyond that stage, so I grabbed the 1.11 package from Debian buster. That’s only one release behind current, so I felt reasonably confident I was using a good enough variant. For MQTT the obvious choice was the Eclipse Paho MQTT client. Bluetooth was a bit trickier - there were more options than I expected (including one by Paypal), but I settled on go-ble (sadly now in archived mode), primarily because it was the first one where I could easily figure out how to passively scan without needing to hack up any of the library code.

    With all those pieces it was fairly easy to throw together something that does the required steps in about 200 lines of code. That seems comparable to what I think it would have taken in Python, and to a large extent the process felt a lot closer to writing something in Python than in C.

  • Paul Ganssle: Time Zones In The Standard Library
  • Russell Keith-Magee: Python On Other Platforms
  • The 2019 Python Language Summit
  • What's an Engineering Workstation, in Your Opinion?

More in Tux Machines

OSS: Events, WordPress and Licensing

  • Director Digital Business Solutions to kick off ApacheCon Europe in Berlin

    The European Commission, a long-time user of open source software, is strengthening its relationship with the Apache Foundation. At the Hackathon in May, the Commission brought together more than 30 developers involved in six different Apache projects. Attendees came from Croatia, Ireland, Poland and Romania, and even from Russia and the United States. At the meeting, many developers met in person for the first time. The hackathon helped the project members build connections and strengthen bonds.

  • FOSSCOMM 2019 aftermath

    FOSSCOMM (Free and Open Source Software Communities Meeting) is a Greek conference aiming at free-software and open-source enthusiasts, developers, and communities. This year was held at Lamia from October 11 to October 13. It is a tradition for me to attend to this conference. Usually I have presentations and of course booths to inform the attendees about the projects I represent. This year the structure of the conference was kind of different. Usually the conference starts on Friday with "beer event". Now it started with registration and a presentation. Personally I made my plan to leave from Thessaloniki by bus. It took me about 4 hours on the road. So when I arrived, I went to my hotel and then waited for Pantelis to go to the University and setup our booths.

  • Automattic Announces Mark Davies as Chief Financial Officer

    Automattic Inc., the parent company of WordPress.com, WooCommerce, and Tumblr, among other products, has announced that Mark Davies has joined the company as Chief Financial Officer. Davies comes to Automattic from Vivint, a $1B+ annual revenue smart home technology company, where he served as chief financial officer since 2013. The news follows Automattic's recent $300 million Series D investment round from Salesforce Ventures, and its acquisition in September of the social blogging platform Tumblr.

  • Empowering Generations of Digital Natives

    Technology is changing faster each year. Digital literacy can vary between ages but there are lots of ways different generations can work together and empower each as digital citizens. No matter whether you’re a parent or caregiver, teacher or mentor, it’s hard to know the best way to teach younger generations the skills needed to be an excellent digital citizen. If you’re not confident about your own tech skills, you may wonder how you can help younger generations become savvy digital citizens. But using technology responsibly is about more than just technical skills. By collaborating across generations, you can also strengthen all your family members’ skills, and offer a shared understanding of what the internet can provide and how to use it to help your neighborhoods and wider society.

  • How to Verify Smart Contracts on Etherscan

    You have your smart contract written, tested, and deployed. However, customers aren’t willing to do business with you unless they know the contract’s source code. After all, it could be set up in a way that’s not in their interest. Thankfully, Etherscan offers a neat tool that allows you to verify smart contracts so interested parties can see the source code and verify for themselves that everything is as it should be. While the process is simple, there are intricacies that might cause problems, especially to people not very familiar with Ethereum and the Solidity programming language.

  • Ethical Open Source: Is the world ready?

    Given its incredible popularity in the marketplace, there is no question that many software developers (and their respective companies) today see great value in using software that is subject to open source licenses. Users focus on the advantages to be had by gaining access, usually at no or minimal charge, to the software’s source code and to the thriving open source community supporting such projects. Powered by a worldwide community supporting the code base, open source code is generally perceived to be more reliable, robust and flexible than so-called proprietary software, with increased transparency leading to better code stability, faster bug fixes, and more frequent updates and enhancements. Historically the question of ethics and open source software (OSS) has mainly focussed on the goal of obtaining and guaranteeing certain “software freedoms,” namely the freedom to use, study, share and modify the software (as exemplified by the Free Software Definition and copyleft licenses such as the GPL family), and to ensure that derivative works were distributed under the same license terms to end “predatory vendor lock-in.”

Programming: SystemView, JDK, VimL and Bazel

  • New SystemView Verification Tool from SEGGER is Compatible with Windows, Linux, and macOS
  • 5 steps for an easy JDK 13 install on Ubuntu
  • Basic Data Types in Python 3: Strings
  • Excellent Free Books to Learn VimL

    VimL is a powerful scripting language of the Vim editor. You can use this dynamic, imperative language to design new tools, automate tasks, and redefine existing features of Vim. At an entry level, writing VimL consists of editing the vimrc file. Users can mould Vim to their personal preferences. But the language offers so much more; writing complete plugins that transform the editor. Learning VimL also helps improve your efficiency in every day editing. VimL supports many common language features: variables, control structures, built-in functions, user-defined functions, expressions first-class strings, high-level data structures (lists and dictionaries), terminal and file I/O, regex pattern matching, exceptions, as well as an integrated debugger. Vim’s runtime features are written in VimL.

  • Google Releases Bazel 1.0 Build System With Faster Build Performance

    Bazel is Google's preferred build system used by many of their own software projects. Bazel is focused on providing automated testing and release processes while supporting "language and platform diversity" and other features catered towards their workflow. Bazel 1.0 comes at a time when many open-source projects have recently been switching to Meson+Ninja as the popular build system these days for its fast build times and great multi-platform build support. Bazel also still has to compete with the likes of CMake and many others.

  • Bazel Reaches 1.0 Milestone!

    Bazel was born of Google's own needs for highly scalable builds. When we open sourced Bazel back in 2015, we hoped that Bazel could fulfill similar needs in the software development industry. A growing list of Bazel users attests to the widespread demand for scalable, reproducible, and multi-lingual builds. Bazel helps Google be more open too: several large Google open source projects, such as Angular and TensorFlow, use Bazel. Users have reported 3x test time reductions and 10x faster build speeds after switching to Bazel.

Kubuntu 19.10 Arrives with KDE Plasma 5.16, Embedded Nvidia Drivers, and More

Featuring the KDE Plasma 5.16.5 desktop environment and KDE Applications 19.04.3 software suite, the Kubuntu 19.10 release is here with up-to-date core components and applications, including Qt 5.12.4 LTS, Latte Dock 0.9.3, Elisa 0.4.2, Krita 4.2.7, Kdevelop 5.4.2, Ktorrent 5.1.2, as well as Kdenlive and Yakuake 19.08.1. "Plasma 5, the new generation of KDE's desktop has been developed to make it smoother to use while retaining the familiar setup," reads the release notes. "Plasma 5.16 has been developed to make it smoother to use while retaining the familiar setup. Kubuntu ships the 4th scheduled bugfix release of 5.16 (5.16.5)." Read more Also: Ubuntu MATE 19.10 Released with Latest MATE Desktop, New Apps, Many Improvements

Android Leftovers