Language Selection

English French German Italian Portuguese Spanish

Development

HowTos and Development Leftovers

Filed under
Development
HowTos

Programming and HowTos

Filed under
Development
HowTos

Cutelyst 2.7.0 released, async is back!

Filed under
Development
KDE

Cutelyst a Qt/C++ Web Framework just got a new version. This time bringing back proper async support.

Perl Catalyst Framework was conceived as a sync/blocking framework, due that the Mojolicious framework was created, NodeJS and a few other web frameworks have pushed the async programming to the web. Performance wise being async doesn’t mean you get faster response times, rather the opposite, the need to unroll stack and make extra calls makes a CPU bound application slower.

But depending on the problem to solve it allows you to serve more users at the same time, using the same CPU cores. A typical modern application might receive a request from a Phone App then do a REST API call to an external API which might take 2ms or 200ms for the reply. While waiting for the response, typical sync/blocking applications can’t process more requests, or have to spawn more threads increasing RAM consumption and leveraging concurrency to the OS scheduler. On an Async web application, you can process another request while you wait for the previous request, thus possibly making the first request reply to be sent back to the user at a later time than if there was a dedicated process just waiting for his reply.

So, both ways have pros and cons and IMHO I’d like to support them both. When I started Cutelyst I thought that if I ever need async I could have a local QEventLoop to wait for the reply and would be able to deal with async requests, not recently I found out that supporting QEventLoop was causing stack overflow due it being used in pipelined scenarios, after that I removed it’s usage and performance improved in PlainText tests of TechEmpower, so I advised against using it and marked Cutelyst as not async.

Read more

Programming with Python

Filed under
Development
  • Made With Mu: A Steady Hand and Heart

    I first met Les at PyCon UK back in 2013. I was coordinating the education track where we had around 40 teachers and 100 kids turn up over two days. This was an impossible endeavour for a single person to take on. Happily, the founding principle of the education track was to bring together, without prejudice, a collaborative and open community of people involved or interested in Python in education. Les was one of several folks who selflessly contributed for the benefit of the whole community: be it moving furniture to turn meeting rooms into classrooms, setting up and configuring equipment, helping out as a teaching assistant or participating in conversations and debates around Python in education, Les was making positive contributions. He was a role model who showed he was open, welcoming and helpful to anyone who turned up.

  • Podcast.__init__: Unpacking The Python Toolkit For Chaos Engineering

    Chaos engineering is the practice of injecting failures into your production systems in a controlled manner to identify weaknesses in your applications. In order to build, run, and report on chaos experiments Sylvain Hellegouarch created the Chaos Toolkit. In this episode he explains his motivation for creating the toolkit, how to use it for improving the resiliency of your systems, and his plans for the future. He also discusses best practices for building, running, and learning from your own experiments.

  • Answering Python questions from readers

    Every so often, I’ve asked readers of my free, weekly “Better developers” newsletter to send me their Python problems. And every so often, I get a chance to answer their questions, going through their Python problems and trying to solve them.

Programming: Bash, Python and How to Program a Really Cheap Microcontroller

Filed under
Development
  • Converting Decimals to Roman Numerals with Bash

    My last few articles have given me a chance to relive my undergraduate computer science degree and code a Roman numeral to decimal converter. It's quite handy when you're watching old movies (when was MCMLVII anyway?), and the basic coding algorithm was reasonably straightforward. (See Dave's "Roman Numerals and Bash" and "More Roman Numerals and Bash".)

    The trick with Roman numerals, however, is that it's what's known as a subtractive notation. In other words, it's not a position → value or even symbol → value notation, but a sort of hybrid. MM = 2000, and C = 100, but MMC and MCM are quite different: the former is 2100, and the latter is 1000 + (–100 + 1000) = 1900.

    This means that the conversion isn't quite as simple as a mapping table, which makes it a good homework assignment for young comp-sci students!

  • Creating a containerized Python/Flask development environment with Red Hat CodeReady Workspaces

    Red Hat CodeReady Workspaces provide developers with containerized development environments hosted on OpenShift/Kubernetes. DevOps teams can now use a hosted development environment that’s pre-built for their chosen stack and customized for their project.

    CodeReady Workspaces can help you rapidly onboard developers for your project as everything they need to develop is running in a containized workspace. In this post, we’re going to use CodeReady Workspaces to get up and running quickly with an existing open source project, Peak. Peak is a multi-container Kubernetes application for performance testing web services, and it allows you to create distributed performance tests using the Kubernetes Batch API for test orchestration. We’ll make some modifications to Peak’s Flask front end, a stateless web interface that interacts with a Falcon RESTful API to return data about performance tests. You won’t need the complete Peak application deployed, though if you like, you can find steps to deploy it to OpenShift here.

  • How to Run Your Python Scripts

    One of the most important skills you need to build as a Python developer is to be able to run Python scripts and code. This is going to be the only way for you to know if your code works as you planned. It’s even the only way of knowing if your code works at all!

    This step-by-step tutorial will guide you through a series of ways to run Python scripts, depending on your environment, platform, needs, and skills as a programmer.

  • Mike Driscoll: PyDev of the Week: Maria McKinley

    This week we welcome Maria McKinley (@twiteness) as our PyDev of the Week. Maria is a Senior Software Engineer at the Walt Disney Company and will be a speaker at PyCascades 2019. She is also teaching the Python Certificate Program at the University of Washington Continuing Education. Let’s spend a few moments getting to know her better.

  • How To Program A Really Cheap Microcontroller

    There are rumors of a cheap chip that does USB natively, has an Open Source toolchain, and costs a quarter. These aren’t rumors: you can buy the CH552 microcontroller right now. Surprisingly, there aren’t many people picking up this cheap chip for their next project. If there’s no original projects using this chip, no one is going to use this chip. Catch 22, and all that.

    Like a generous god, [Aaron Christophel] has got your back with a working example of programming this cheap chip, and doing something useful with it. It blinks LEDs, it writes to an I2C display, and it does everything you would want from a microcontroller that costs a few dimes.

    The CH552, and its friends the small CH551 all the way up to the CH559, contain an 8051 core, somewhere around 16 kB of flash, the high-end chips have a USB controller, there’s SPI, PWM, I2C, and it costs pennies. Unlike so many other chips out there, you can find SDKs and toolchains. You can program the chip over USB. Clearly, we’re looking at something really cool if someone writes an Arduino wrapper for it. We’re not there yet, but we’re close.

HowTos and Programming Leftovers

Filed under
Development
HowTos
  • How to Use Two Versions of GIMP in Ubuntu
  • How To Make a Countdown Timer in Bash
  • Command Line Utilities… in the Cloud?
  • A Lightweight AVR IDE

    All the basic features are there – there’s syntax highlighting, as well as integration with the AVRA assembler and AVRDUDE for programming chips. It’s a tool that could make taking the leap into assembly code just that little bit easier.  For another taste of bare metal coding, check out [Ben Jojo]’s discussion of x86 bootloaders.

  • patience diffing algorithm

     

    I needed a (text) diff algorithm, and if you search for one you mostly come up with the Myers algorithm. But then I stumbled across something called patience diffing, and it turns out to be just what I wanted. It’s already described elsewhere, but it seems more people could stand to know about it, so here we are. It’s easy to understand, and more importantly, usually makes pretty diffs (often prettier than Myers).  

Programming: DApp, Groovy, TensorFlown and a Lot More

Filed under
Development
  • Chinese Tech Giant Baidu Launches Blockchain OS to Support DApp Development

    Chinese search engine and web services company Baidu has launched its Baidu Blockchain Engine (BBE), an operating system designed to facilitate decentralized application (DApp) development. The news was officially announced by Baidu’s cloud computing unit, Baidu Cloud, on Feb. 14.
    Baidu Cloud states that it considers an open source, commercialized platform to be “the only way to build a blockchain operating system.” BBE has reportedly been built on the basis of Baidu’s “ABC” technology strategy — artificial intelligence (AI), big data and cloud computing —  and aims to make DApp development “as simple as creating a mobile app.”

  • How is the Eclipse Foundation Specification Process (EFSP) different from the Java Community Process (JCP)?

    As most of you are aware, Oracle has contributed the Java EE specification to the Eclipse Foundation. The enterprise Java community decided to rename the Java EE specification to Jakarta EE. Part of this huge transition to open source is changing the specification process. The famous Java Community Process (JCP) is going to be replaced by the Eclipse Foundation Specification Process (EFSP), which will be better suited for vendor neutrality, transparency, and all other attributes associated with open source. So what exactly is the difference?

    To learn more about the new process, please refer to the EFSP v1.0, and Wayne Beaton’s article in this newsletter.

  • How To Build A Successful Developer Community

    As a community starter, the first question one should ask themselves is why developers want to join the community: is it because they are going to learn new skills or make their work easier?

    What is the impetus for building the community by asking questions like, whether the community is built around an open-source project? Are the developer tools available? Is there a platform with an API? Is it like a partner ecosystem? Or is it just selling a product?

  • Ember.js video documentary released

    Besides being an interesting piece of content for developers and open-source enthusiasts around the world, the documentary also addresses the human element of open-source software and the power of community.

    The documentary starts off with Tom Dale telling the story about how in the early days of creating web apps using Javascript, people where telling them, "please stop using Javascript", and "you guys are abusing the system" - but they had to stick with the vision and see it through and today, everyone uses Javascript to create web applications.

  • Why 2019 Will Be the Year for Shift-Left Mainframe Testing

    While 2018 was the year for planning and implementing shift-left methodologies in testing, mainframe and server testers were, for the most part, left behind. These legacy infrastructure experts were tied down to old-school testing tools. Mainframes kept functioning, but tools and testing practices often became bottlenecks, preventing performance testing teams from testing more quickly mid-cycle and pre-release.

  • Ubisoft's Clever-Commit AI will sniff out bugs in Firefox

    GAMES DO ENCOURAGE VIOLENCE, but against bugs in the case Ubisoft which has partnered with Mozilla to build out an artificial intelligence (AI) system that sniffs out code gremlins.

    Dubbed Clever-Commit, the AI will act as a form of coding assistant that learns from a developer's base bug and regression data to predict and flag potential new bugs that might be added as new code is slapped onto the codebase.

    The system, which is already being used internally by Ubisoft, will be adopted by Mozilla to review Firefox code and spot dodgy bits, with the goal of making the browser more stable for its users. But if the systems works well, Mozilla has plans to stick it further into Firefox.

  • Ubisoft and Mozilla team up to develop Clever-Commit, an AI coding assistant

    Game developer Ubisoft today announced that it has partnered with Mozilla to develop Clever-Commit, an AI-based coding assistant that learns from your code base’s bug and regression data to analyze and flag potential new bugs as new code is committed. Ubisoft already uses this tool internally and Mozilla  says that it will deploy it to spot bugs in its Firefox code.

  • Programming languages: Python rides high but Groovy is cool again with developers

    Groovy, which came to life in 2007, hasn't been a top-20 language in Tiobe's index since 2016 but in the February listing it is now at 19th place, up from 49th last year. 

    Groovy hit its stride as a language for writing scripts for popular continuous-integration tool Jenkins, but it's also been buoyed by the Gradle open-source build-automation system. According to Tiobe, these days more 'glue' software is being written in Groovy. 

  • The Deep Learning Framework Backed By Facebook Is Getting Industry's Attention

    When it comes to deep learning frameworks, TensorFlow is one of the most preferred toolkits.

  • Inside the AI developer’s toolbox
  • Guide To Web Scraping With Python Libraries Selenium & Beautiful Soup
  • Speeding up basic object operations in Cython
  • Python’s str.isdigit vs. str.isnumeric
  • Test and Code: 65: one assert per test
  • Setting up Tor hidden service
  • How to install WildFly (JBoss) on Ubuntu 18.04

Daniel García Moreno: I'm a hacker

Filed under
Development
GNOME

The hack computer is built on top of the Endless OS. Endless OS is based on debian and the desktop is a modified gnome shell, but it's not the usual debian derivative, it's based on OSTree. The main difference is that the root filesystem is read only and updates are managed with ostree, that's like a git repository.

This kind of Operating System is easier to maintain, because the user can't modify the base system, so this means that he was unable to break it. All user applications are installed via flatpak, so are independent of the OS version and because of flathub you can install latests version of apps without the need to update the full operating system.

This is the way that Fedora SilverBlue is trying to follow and is a new way to build and distribute GNU/Linux.

Read more

HowTos and Programming Leftovers

Filed under
Development
HowTos

Python 2.7.16 release candidate 1 available

Filed under
Development

A release candidate for the upcoming 2.7.16 bug fix release is now available for download.

Read more

Syndicate content

More in Tux Machines

Today in Techrights

Security: Nest Lockout, Moment of Truth for Cyber Insurance, DNS Hijacking Attacks and Australian Cracking

  • Nest is locking customers out of accounts until they fix their security

    Emails were sent last night to all users that may have been affected by recent [breaches], with a new password being mandatory, as it tries to avoid the "I'll do it later" attitude that means that often vulnerable passwords remain in use for months or years.

  • A Moment of Truth for Cyber Insurance

    Mondelez’s claim represents just a fraction of the billions of dollars in collateral damage caused by NotPetya, a destructive, indiscriminate cyberattack of unprecedented scale, widely suspected to have been launched by Russia with the aim of hurting Ukraine and its business partners. A compromised piece of Ukrainian accounting software allowed NotPetya to spread rapidly around the world, disrupting business operations and causing permanent damage to property of Mondelez and many others. According to reports, Zurich apparently rejected Mondelez’s claim on the grounds that NotPetya was an act of war and, therefore, excluded from coverage under its policy agreement. If the question of whether and how war risk exemptions apply is left to the courts to decide on a case-by-case basis, this creates a profound source of uncertainty for policyholders about the coverage they obtain.

  • A Deep Dive on the Recent Widespread DNS Hijacking Attacks

    The U.S. government — along with a number of leading security companies — recently warned about a series of highly complex and widespread attacks that allowed suspected Iranian hackers to siphon huge volumes of email passwords and other sensitive data from multiple governments and private companies. But to date, the specifics of exactly how that attack went down and who was hit have remained shrouded in secrecy.

    This post seeks to document the extent of those attacks, and traces the origins of this overwhelmingly successful cyber espionage campaign back to a cascading series of breaches at key Internet infrastructure providers.

  • With elections weeks away, someone “sophisticated” [cracked] Australia’s politicians

    With elections just three months away, Australian Prime Minister Scott Morrison announced on February 18 that the networks of the three major national political parties had been breached by what Australian security officials described as a "sophisticated state actor."

  • Australia's major political parties [cracked] in 'sophisticated' attack ahead of election

    Sources are describing the level of sophistication as "unprecedented" but are unable to say yet which foreign government is behind the attack.

  • Parliament attackers appear to have used Web shells

    Attackers who infiltrated the Australian Parliament network and also the systems of the Liberal, National and Labor Parties appear to have used Web shells – scripts that can be uploaded to a Web server to enable remote administration of a machine.

Android Leftovers

How Linux testing has changed and what matters today

If you've ever wondered how your Linux computer stacks up against other Linux, Windows, and MacOS machines or searched for reviews of Linux-compatible hardware, you're probably familiar with Phoronix. Along with its website, which attracts more than 250 million visitors a year to its Linux reviews and news, the company also offers the Phoronix Test Suite, an open source hardware benchmarking tool, and OpenBenchmarking.org, where test result data is stored. According to Michael Larabel, who started Phoronix in 2004, the site "is frequently cited as being the leading source for those interested in computer hardware and Linux. It offers insights regarding the development of the Linux kernel, product reviews, interviews, and news regarding free and open source software." Read more