Language Selection

English French German Italian Portuguese Spanish

Programming Leftovers

Filed under
Development
  • Jamie McClelland: Fixing old PHP code

    I wrote a control panel in 2005 using PHP, without any framework. Who could have guessed it would still be in production now?

  • Steinar H. Gunderson: How to optimize anything

    Of course, most people stumble in step 1 (e.g. by making a benchmark that is non-representative, like PHP 8's infamous JIT that helped 3x on the benchmark, but at most 3–5% on real code). And step 3 is naturally where all the magic happens. The cheapest wins often come out of a surprising profile, and the best wins often come from taking a step up and optimizing at a higher level. The most satisfying ideas are those that simplify code, so that you end up with just running less stuff and having things look more natural. (The worst ideas come when you skip step 2, because you end up optimizing what you think takes time, which is rarely the stuff that actually does.)

  • SDL 2.0.16 Is On The Way With Better Wayland Support, Improved PipeWire Integration [Ed: Well, SDL or SDL2 will need to delete GitHub to be taken seriously again. Now they're pushing proprietary software of Microsoft, so it is, in effect, a trap for developers (by extension)]

    SDL 2.0.16 is being prepared for release as the successor to SDL 2.0.14. Particularly for Linux users this SDL 2.0.16 update is significant with some key enhancements for this library that is common to multi-platform games and part of the Steam runtime.

    Exciting us the most with SDL 2.0.16 is that the Wayland support is "greatly improved" and additionally there is support for audio input/output using Pipewire. The native PipeWire support is great now that Fedora Workstation and others are beginning to ship it by default as an alternative to the likes of PulseAudio. 2021 is certainly the year PipeWire is beginning to see some healthy adoption and ready to take on Linux audio/video stream management. Among other Wayland improvements with SDL 2.0.16 is support for client-side decorations.

  • Code for fun: Children learn engineering through camp games
  • Kythera AI gives indie devs free access to games engine

    Kythera AI has released its AI middleware as free open-source software (FOSS), in partnership with the Linux Foundation’s new Open3D game engine (O3DE).

    Previously only available to commercial clients, Kythera AI’s toolset is now packaged with O3DE, becoming the first middleware provider to make its advanced AI solution available to any developer at any level. To ensure fairness and continuity of Kythera AI’s development, there is royalty and upfront licensing available for commercial products over a certain threshold. Indie game developers will likely not hit this threshold and if they start making a lot of money from their project, they can pay a royalty fee.

    Kythera AI consists of a broad range of AI tools that have been produced with veteran developers. Tools include a behaviour tree system and solutions for navigation of the ground and sky, which aims to solve the more time-consuming challenges for developers. Independent studios, who might previously have been limited by budget and resources, will now be able to develop games with AI as complex and engaging as that in AAA titles.

    “We’re big fans of Kythera AI and their toolset, including behaviour trees, navigation, and automatic level markup,” says Lloyd Tullues, CTO of Silicon-Valley-backed game studio Carbonated Inc, who, like Kythera AI, are founder members of the Open 3D Foundation. “Knowing that Kythera will be available with O3DE from the start is super exciting: developers from all over the world will now be able to leverage the same tools we’ve relied upon to create absolutely amazing experiences for their players.”

    This comes as a big development in the Scottish gaming and tech sector, with a Scottish company playing a major role in an international collaboration of high-profile tech organisations.

    “We are delighted to see a case study showcased in Scotland’s AI Strategy involved directly in founding a potentially revolutionary group in the field of game design and simulation,” says Gillian Docherty OBE, Chair of the Scottish AI Alliance. “We’re proud to see a Scottish company with the growth potential of Kythera AI showing leadership in their sector on the global stage. This recent announcement of Kythera’s position as the default AI for the new Open 3D Engine will no doubt hasten the wider adoption across both gaming and other sectors.”

    Matthew Jack, CEO of Kythera AI, says: “It was an exciting moment when we chose to join the O3DE Foundation as founder members and to supply the AI solution for the project. We have spent a long time developing a comprehensive toolset for game designers and AI developers to work with, and the idea of so many creatives getting access to those tools, regardless of their background, is an amazing thought. We can’t wait to see what incredible games come out of the community as a result of this access.”

  • Jussi Pakkanen: Looking at building O3DE with Meson, part II

    After the first post, some more time was spent on building O3DE with Meson. This is the second and most likely last post on the subject. Currently the repository builds all of AzCore basic code and a notable chunk of its Qt code. Tests are not built and there are some caveats on the existing code, which will be discussed below. The rest of the conversion would most likely be just more of the same and would probably not provide all that much new things to tackle.

  • TWC: Punting to MJD and Showing Q&D Geometry

    I'm always doing other things and then Sunday comes and I start thinking, "How much time do I have before it's midnight in London?"

    When "The Perl Challenge" first started, I was happy to just ponder the problems. Then came the pandemic and I thought that I would use some of my then copious free time to contribute. Then time got not-so-copious. And more people started contributing to TWC, some people much more talented than me, it turns out.

    So I'll take a stab at things when I can and I'll still try to write a stand-alone script the way (I wish) I would at work, but my threatened laxness in writing things up will be more of a promise: Light banter to cast a veneer of confidence on the correctness of my results, anything else is extra.

  • Perl Weekly Challenge 123: Ugly Numbers and Square Points

    These are some answers to the Week 123 of the Perl Weekly Challenge organized by Mohammad S. Anwar.

  • How to Reverse a String in Python

    In Python, a string is a sequence of Unicode characters. Though Python supports numerous functions for string manipulation, it doesn’t have an inbuilt function or method explicitly designed to reverse the string.

  • Another version of Python to C++ Extension building Catalan Sequence

More in Tux Machines

9to5Linux Weekly Roundup: October 24th, 2021

This week has been really educational for Linux fans as we were able to install the UnityX desktop environment on Arch Linux, as well as the KDE Plasma 5.23 desktop environment on Kubuntu 21.10. In addition, we were able to test drive the upcoming Ubuntu 22.04 LTS distribution and Ubuntu’s new Desktop Installer. On top of that, this week we saw new releases of the lightweight and systemd-free MX Linux 21 distribution, Gentoo-based Redcore Linux, as well as the Porteus Kiosk distribution for public computers and kisoks. Read more

Programming Leftovers

  • GNU Toolchain Begins Landing LoongArch Support - Phoronix

    In addition to Loongson working on Linux kernel support for their MIPS-derived LoongArch CPU architecture, the first bits of the GNU toolchain support for this Chinese CPU architecture have been merged. The GNU Compiler Collection (GCC) LoongArch support hasn't yet been merged but the GNU Binutils archive saw the initial collection of LoongArch patches merged on Sunday morning.

  • Capacitive Touch Controller for FPGAs

    Most projects that interface with the real world need some sort of input device. Obviously this article is being written from a standardized “human interface device” but when the computers become smaller the problem can get more complicated. We can’t hook up a USB keyboard to every microcontroller since we often only need a few buttons, but even buttons can be a little bit too cumbersome for some applications. For something even simpler, we would like to turn your attention to capacitive touch controllers.

  • Meson v0.60 Build System Brings Numerous Improvements

    Meson 0.60 was released on Sunday as the newest version of this increasingly popular and widely-used cross-platform build system.

  • Josef Strzibny: You can in fact use schemas in migrations

    I saw well-intended recommendations not to use schemas in migrations lately. Although the advice of switching to raw SQL is a good one, we don’t have to give up on schemas entirely.

  • Software Development Life Cycle (SDLC) Automation

    Gone are the days when manual labor used to go through a rigorous time taking process in order to furnish quality products. Today, organizations have shifted their attention towards automated software. Each software goes through a development lifecycle to meet customer requirements of a high-quality product known as SDLC. In the growing software industry, developers compete to produce high-quality software while remaining within their range of cost and time limits. SDLC Automation helps achieve the above goals with minimum manual labor, time, and cost while maintaining a high level of productivity as well as efficiency. This article expounds upon the need for automation in the SDLC process and further sheds light on some of the aspects that software companies must start automating.

  • What is the Difference Between =, == and === in JavaScript?

    JavaScript is a programming language that allows us to create and develop web applications and web pages as well as make our websites more dynamic/interactive. Data can be calculated, manipulated, and validated using JavaScript. Like any other language, JavaScript has operators. An operator produces a result by performing some action on a single or multiple operands (data value). Let’s look at an example of 2+2 where the numbers are left and right side operands and the + is the operator. This + operator adds the two numbers together. With examples, we’ll examine and answer the question that what is the difference between the =,==, and === operators in JavaScript in this article.

  • Is JavaScript Object-Oriented?

    Object-Oriented Programming (OOP), is a programming approach that is used by every developer at some point in their life to organize software design around objects or data rather than logic or functions where an object is an entity that has some properties and some type. The benefits of using the OOP technique include modularity, reusability, security, productivity, flexibility, and is easily scalable and upgradeable.

  • TOAST.UI: Free, Open-source Interactive JavaScript application components

    While working on a project, I need a calendar library. As I do for every project, I tend to not use previously used libraries and try to learn and use something new. That's how I found Toast.ui, an open-source features-rich UI library for building production-ready apps.

  • YAML vs JSON – Which is better?

    Nowadays, almost every person is familiar with the standard format of JSON. Contrarily, individuals who use Docker are surely familiar with YAML. In simpler words, Docker is a toolkit which permits developers to run, build, deploy, modify as well as stop packages through a single API or commands. YAML is a new but popular language used to serialize data. First of all, we should perceive what data serialization is. Data serialization is the most common way of transforming data objects into byte streams used to store, transfer and distribute data on devices. However, they have similar objectives to store structures and data objects into files but distinctive ways to work. In this article, we first go through the features of JSON and YAML, then compare them in-depth to completely comprehend their advantages, and then briefly discuss which one is better.

  • Some Perl Code In Memory of a Great Scientist | martin [blogs.perl.org]

    On August 21, 2021, famous Polish mathematician Andrzej Schinzel passed away at the age of 84. He was one of the great minds behind modern number theory. May he rest in peace. I have extended one of my CPAN modules relating to his work and dedicated the release to his memory.

  • Remove None from the List Python

    In python, when a function returns nothing, it indirectly returns ‘None’. Due to the forthcoming ML (Machine Learning), our focus is now on understanding the None values. The goal behind this is that it is the crucial phase of data preprocessing. Hence, elimination of None values is crucial, so you must know how important it is. Let’s discuss certain techniques in which this is achieved. To replace none in python, we use different techniques such as DataFrame, fillna, or Series. No keyword in python declares the null objects and variables. In python, none refers to the class ‘NoneType’. We can allot None to many variables, and they all point toward a similar object. The interesting fact about none is that we can’t consider false as any. None is a blank string or a 0. Let’s demonstrate it with the help of examples. We use the Spyder compiler or different strategies to explain how python removes null values from the list.

  • Python LDAP example

    LDAP is a LIGHTWEIGHT DIRECTORY ACCESS PROTOCOL. It is an internet protocol that works on TCP/IP, and it is used to access/fetch the information from the directories. All the directories are not preferable; it is usually used to access those directories that are active.

  • Python Multiply List by Scalar

    In Python, the most elementary data building is the sequence. Each sequence element allotted a number – its index or placement. The starting point of the index is ‘0’, the second point is ‘1’, and so forth. Python offers six in-built types of sequences, but the most important or commonly used are lists, which we would discuss in this guide. Python list is the most useful data type. It can be written within a square bracket, and a comma separates every item in the list.

Rocky Linux: An Enterprise-Ready CentOS Replacement

For a long time, CentOS was a reliable choice for a Linux-based servers, because it was effectively a free version of Red Hat Enterprise Linux (RHEL). All the features that made RHEL the dominant enterprise-class Linux were included in CentOS. On December 8th, 2020, Red Hat, which had acquired the CentOS project, abruptly announced a change in its focus in the wake of Red Hat’s acquisition by IBM. They announced they would be shifting all of their investment in CentOS Linux from the popular downstream CentOS distribution. This move also meant that CentOS would be upstream of RHEL, rather than downstream, so CentOS users would be in effect beta testers for RHEL. Since there were so many users relying on a CentOS version that would be unsupported sooner than they planned for, the community sensed a need for a new project. In response, the original CentOS founder Gregory Kurtzer is leading the effort to create a new version of the distro, to achieve the original goals of CentOS. Kurtzer told he was thinking about creating a new version of CentOS ever since Red Hat acquired it in 2014. Read more

Open Hardware/Modding With Components, Arduino

  • Automating Pool Monitoring And Chemical Dosing | Hackaday

    The project uses a TI SimpleLink wireless-enabled microcontroller to run the show, which allows data to be offloaded to a base station for graphing with Grafana. The system can monitor pH levels as well as ORP (oxidation/reduction potential) levels using probes attached via BNC connectors. Based on these readings, the device can dose chlorine into the pool as needed using a peristaltic pump driven by a TI DRV8426 stepper motor driver.

  • $99 Lepton FS module cuts the cost of FLIR thermal cameras by half - CNX Software

    Thermal cameras based on FLIR Lepton modules are pretty cool, but also quite expensive. Teledyne FLIR Lepton FS offers a much more cost-effective solution with the non-radiometric 160 x 120 resolution micro thermal camera module going for $99, or about 50% less than other FLIR thermal camera modules. The lower cost was achieved with some tradeoffs, notably a reduction of thermal sensitivity and scene dynamic range, as well as up to 3% inoperable pixels. But Ron Justin, GroupGets founder, told CNX Software that the lower specs are more than worth it for users only needing an imager, as opposed to a radiometric sensor.

  • Raspberry Pi Weekly Issue #374 - Raspberry Pi <3 LEGO Education

    The collaboration of your dreams launched this week. We worked with LEGO® Education to design the new Raspberry Pi Build HAT, a brand-new product that for the first time makes it easy to integrate LEGO® Technic™ motors and sensors with Raspberry Pi computers.

  • Bring That Old Hi-Fi Into The 2020s | Hackaday

    It’s a distressing moment for some of us, when a formerly prized piece of electronic equipment reaches a point of obsolescence that we consider jettisoning it. [Jon Robinson] ran into this dilemma by finding the Kenwood Hi-Fi amplifier his 17-year-old self had spent his savings on. It was a very good amp back in the day, but over two decades later, it’s no longer an object of desire in a world of soundbars and streaming music boxes. After a earlier upgrade involving an Arduino to auto-power it he’s now given it an ESP32 and an i2S codec which performs the task of digital audio streaming as well as a better job than the Arduino of controlling the power.

  • This Arduino Terminal Does All The Characters | Hackaday

    The job of a dumb terminal was originally to be a continuation of that performed by a paper teletype, to send text from its keyboard and display any it receives on its screen. But as the demands of computer systems extended beyond what mere ASCII could offer, their capabilities were extended with extra characters and graphical extensions whose descendants we see in today’s Unicode character sets and thus even in all those emojis on your mobile phone. Thus a fully-featured terminal has a host of semigraphics characters from which surprisingly non-textual output can be created. It’s something [Michael Rule] has done some work on, with his ILI9341TTY, a USB serial terminal monitor using an Arduino Uno and an ILI9341 LCD module that supports as many of the extended characters as possible.