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

Neon: A Wannabe Linux Distro For KDE Lovers

KDE Neon is a bit of an oddball Linux thing. Linuxland has an impressive collection of oddball things. Neon looks and feels much like a Linux distribution, but its developers assert quite openly on their website that Neon is not a real Linux distro. It just installs and functions like one -- sort of. That can make deciding to use it a little confusing. Neon appears to be a Linux operating system. It boots your computer. It displays a full desktop environment. It runs *some* applications so you can go about your computing tasks much like using any other -- ahh -- real Linux distribution. That last part is a clue to what makes KDE Neon different. Getting somewhat technical for a minute, KDE Neon is more of a specialty offering than a fully endowed operating system. Other distros support a wide range of applications from the same software format type. For example, Ubuntu runs .Deb formatted packages from the Debian Linux family. All .Deb packages will run on Ubuntu- and other Debian-based distros. Which desktop environment is used does not matter, be it KDE, Xfce, GNOME or whatever. Ditto for RPM-based Linux distributions, like Fedora and Red Hat. All you need is a package management tool or knowledge of the commands for apt, yum or pacman, depending on the distribution's Linux family. However, that is a skill set that lots of Linux users never had to learn. Not so with KDE Neon. Neon runs only a specific category of KDE applications: the latest. Neon's developers assert that their "pseudo" distro does not support most other software. In fact, non-KDE packages most likely will not even install on Neon. Read more

Hardware With GNU/Linux

  • Linux Foundation ? where do thou go? ? Stay out of the Desktop and you shalt be paid
  • Acer Chromebook R 11 C738T
  • Samsung Chromebook 3 - XE500C13-K02US
  • Acer Chromebook 14
  • HP Chromebook 11 G5 - X9U02UT
  • Acer Chromebook Spin 15
  • HP Chromebook x2
  • ASUS Chromebook Flip C213SA
  • Samsung Chromebook Plus - XE513C24-K01US
  • Samsung Chromebook Pro - XE510C25-K01US
  • ASUS Chromebit CS10
  • ASUS Chromebook Flip C434 - C434TA-DSM4T
  • Lenovo Chromebook S330 - 81JW0001US
  • Data in a Flash, Part IV: the Future of Memory Technologies

    As it relates to memory technologies, the future looks very promising and very exciting. Will the SSD completely replace the traditional spinning HDD? I doubt it. Look at tape technology. It's still around and continues to find a place in the archival storage space. The HDD most likely will have a similar fate. Although until then, the HDD will continue to compete with the SSD in both price and capacity.

  • Jonathan McDowell: Upgrading my home server

    At the end of last year I decided it was time to upgrade my home server. I built it back in 2013 as an all-in-one device to be my only always-on machine, with some attempt towards low power consumption. It was starting to creak a bit - the motherboard is limited to 16G RAM and the i3-3220T is somewhat ancient (though has served me well). So it was time to think about something more up to date. Additionally since then my needs have changed; my internet connection is VDSL2 (BT Fibre-to-the-Cabinet) so I have an BT HomeHub 5 running OpenWRT to drive that and provide core routing/firewalling. My wifi is provided by a pair of UniFi APs at opposite ends of the house. I also decided I could use something low power to run Kodi and access my ripped DVD collection, rather than having the main machine in the living room. That meant what I wanted was much closer to just a standard server rather than having any special needs. The first thing to consider was a case. My ADSL terminates in what I call the “comms room” - it has the electricity meter / distribution board and gas boiler, as well as being where one of the UniFi’s lives and where the downstairs ethernet terminates. In short it’s the right room for a server to live in. I don’t want a full rack, however, and ideally wanted something that could sit alongside the meter cabinet without protruding from the wall any further. A tower case would have worked, but only if turned sideways, which would have made it a bit awkward to access. I tried in vain to find a wall mount case with side access that was shallow enough, but failed. However in the process I discovered a 4U vertical wall mount. This was about the same depth as the meter cabinet, so an ideal choice. I paired it with a basic 2U case from X-Case, giving me a couple of spare U should I decide I want another rack-mount machine or two.

New Releases of GNU/Linux: Clonezilla, EasyOS and ARCOLINUX

OSS Leftovers

  • Kubernetes: The retro-style, Wild West video game

    The Kubernetes API is amazing, and not only are we going to break it down and show you how to wield this mighty weapon, but we will do it while building a video game, live, on stage. As a matter of fact, you get to play along.

  • Celebrating Kubernetes and 5 Years of Open Source

    5 years ago, Kubernetes was born and quickly became one of the most important open-source platform innovations. Today, its Github repository boasts 55,384 stars and 2,205 contributors! We?re not just celebrating Kubernetes and how much easier it makes our lives, but we?re also celebrating the open-source community that added to the container management tool; making it what it is today. When you have an entire community working together to innovate and improve, the possibilities are endless.

  • Public Statement on Neutrality of Free Software

    F-Droid won’t tolerate oppression or harassment against marginalized groups. Because of this, it won’t package nor distribute apps that promote any of these things. This includes that it won’t distribute an app that promotes the usage of previously mentioned website, by either its branding, its pre-filled instance domain or any other direct promotion. This also means F-Droid won’t allow oppression or harassment to happen at its communication channels, including its forum. In the past week, we failed to fulfill this goal on the forum, and we want to apologize for that.

  • What open-source culture can teach tech titans and their critics
                   
                     

    Yet Mozilla turns out to be much more consequential than its mixed record and middling numbers would have you believe. There are three reasons for this.  

  • Request Travel Support for the openSUSE.Asia Summit

    The Travel Support Program (TSP) provides travel sponsorships to openSUSE community who want to attend the openSUSE.Asia Summit and need financial assistance. openSUSE.Asia Summit 2019 will be in Bali, Indonesia, at Information Technology Department, Faculty of Engineering, Udayana University on October 5 and 6. The goal of the TSP is to help everybody in and around openSUSE to be able to attend the openSUSE.Asia Summit!

  • An Indian research university has assembled 73 million journal articles (without permission) and is offering the archive for unfettered scientific text-mining

    The JNU Data Depot is a joint project between rogue archivist Carl Malamud (previously), bioinformatician Andrew Lynn, and a research team from New Delhi's Jawaharlal Nehru University: together, they have assembled 73 million journal articles from 1847 to the present day and put them into an airgapped respository that they're offering to noncommercial third parties who want to perform textual analysis on them to "pull out insights without actually reading the text."

    This text-mining process is already well-developed and has produced startling scientific insights, including "databases of genes and chemicals, map[s of] associations between proteins and diseases, and [automatically] generate[d] useful scientific hypotheses." But the hard limit of this kind of text mining is the paywalls that academic and scholarly publishers put around their archives, which both limit who can access the collections and what kinds of queries they can run against them.

  • The plan to mine the world’s research papers [iophk: this is the kind of collection that Aaron Swartz died over, effectively killed]