Vista Normal

Hay nuevos artículos disponibles. Pincha para refrescar la página.
Hoy — 18 Febrero 2025Salida Principal

Get Ready For KiCAD 9!

Por: Jenny List
18 Febrero 2025 at 06:00

Rev up your browsers, package managers, or whatever other tool you use to avail yourself of new software releases, because the KiCAD team have announced that barring any major bugs being found in the next few hours, tomorrow should see the release of version 9 of the open source EDA suite. Who knows, depending on where you are in the world that could have already happened when you read this.

Skimming through the long list of enhancements brought into this version there’s one thing that strikes us; how this is now a list of upgrades and tweaks to a stable piece of software rather than essential features bringing a rough and ready package towards usability. There was a time when using KiCAD was a frustrating experience of many quirks and interface annoyances, but successive versions have improved it beyond measure. We would pass comment that we wished all open source software was as polished, but the fact is that much of the commercial software in this arena is not as good as this.

So head on over and kick the tires on this new KiCAD release, assuming that it passes those final checks. We look forward to the community’s verdict on it.

Ayer — 17 Febrero 2025Salida Principal

How Hard is it to Write a Calculator App?

16 Febrero 2025 at 21:00

How hard can it be to write a simple four-function calculator program? After all, computers are good at math, and making a calculator isn’t exactly blazing a new trail, right? But [Chad Nauseam] will tell you that it is harder than you probably think. His post starts with a screenshot of the iOS calculator app with a mildly complex equation. The app’s answer is wrong. Android’s calculator does better on the same problem.

What follows is a bit of a history lesson and a bit of a math lesson combined. As you might realize, the inherent problem with computers and math isn’t that they aren’t good at it. Floating point numbers have a finite precision and this leads to problems, especially when you do operations that combine large and small numbers together.

Indeed, any floating point representation has a bigger infinity of numbers that it can’t represent than those that it can. But the same is true of a calculator. Think about how many digits you are willing to type in, and how many digits you want out. All you want is for each of them to be correct, and that’s a much smaller set of numbers.

Google’s developer, [Hans-J. Boehm] tackled this problem by turning to recursive real arithmetic (RRA). Here, each math function is told how accurate it needs to be, and a set of rules determines the highest required accuracy.

But every solution brings a problem. With RRA, there is no way to tell very small numbers from zero. So computing “1-1” might give you “0.000000000”, which is correct but upsetting because of all the excess precision. You could try to test if “0.00000000” was equal to “0”, and simplify the output. But testing for equality of two numbers in RRA is not guaranteed to terminate: you can tell if two numbers are unequal by going to more and more precision until you find a difference, but if the numbers happen to be equal, this procedure never ends.

The key realization for [Boehm] and his collaborators was that you could use RRA only for cases where you deal with inexact numbers. Most of the time, the Android calculator deals with rationals. However, when an operation produces a potentially irrational result, it switches to RRA for the approximation, which works because no finite representation ever gets it exactly right. The result is a system that doesn’t show excess precision, but correctly displays all of the digits that it does show.

We really like [Chad’s] step-by-step explanation. If you would rather dive into the math, you can read [Boehm’s] paper on the topic. If you ever wonder how many computer systems handle odd functions like sine and cosine, read about CORDIC. Or, avoid all of this and stick to your slide rule.

AnteayerSalida Principal

C++ is 45 Years Old. [Stroustrup] Says You Still Don’t Get It!

9 Febrero 2025 at 09:00

We were surprised when we read a post from C++ creator [Bjarne Stroustrup] that reminded us that C++ is 45 years old. His premise is that C++ is robust and flexible and by following some key precepts, you can avoid problems.

We don’t disagree, but C++ is much like its progenitor, C, in that it doesn’t really force you to color inside the lines. We like that, though. But it does mean that people will go off and do things the way they want to do it, for any of a number of good and bad reasons.

Bjarne Stroustrup

We will admit it. We are probably some of the worst offenders. It often seems like we use C++ the way we learned it several decades ago and don’t readily adopt new features like auto variables and overly fancy containers and templates.

He proposes guidelines, including the sensible “Don’t subscript pointers.” Yet, we are pretty sure we will, eventually. Even if you are going to, also, it is still worth a read to see what you ought to be doing. We were hoping for more predictions in the section entitled “The Future.” Unfortunately — unlike Hackaday authors — he is much too smart to fall for that trap, so that section is pretty short. He does talk about some of the directions for the ISO standards committee, though.

We should have known about the 45 years, as we covered the 30th birthday. We like safer code, but we disagree with the idea that C++ is unsafe at any speed.


Photograph by [Victor Azvyalov] CC-BY-SA-2.0.

A Programming Language for Building NES Games

Por: Tom Nardi
8 Febrero 2025 at 12:00

Generally speaking, writing your own games for retro consoles starts with C code. You’ll need to feed that through a console-specific tool-chain, and there’s certainly going to be some hoops to jump through, but if everything goes as expected, you should end up with a ROM file that can be run in an emulator or played on real hardware if you’ve got the necessary gadgetry to load it.

But NESFab takes things in a slightly different direction. While the code might look like C, it’s actually a language specifically tailored for developing games on the Nintendo Entertainment System (NES). The documentation claims that this targeted language not only compiles into considerably faster 6502 assembly than plain C on GCC or LLVM, but is designed to work around the strengths (and weaknesses) of the NES hardware.

Looking deeper into the example programs and documentation, NESFab offers quite a few quality of life features that should make developing NES games easier. For one thing, there’s integrated asset loading which automatically converts your image files into something the console can understand. One just needs to drop the image file into the source directory, open it in the code with the file function, and the build system will take care of converting it on the fly as the ROM is built. The nuances of bank switching — the organization of code and assets so they fit onto the physical ROM chips on the NES cartridge — are similarly abstracted away.

The obvious downside of NESFab is that, as with something like GB Studio, you’re going to end up putting effort into learning a programming environment that works for just one system. So before you get started, you really need to decide what your goals are. If you’re a diehard NES fan that has no interest in working on other systems, learning a language and build environment specifically geared to that console might make a certain degree of sense. But if you’d like to see your masterpiece running on more than just one system, working in straight C is still going to be your best bet.

UScope: A New Linux Debugger And Not A GDB Shell, Apparently

8 Febrero 2025 at 00:00

[Jim Colabro] is a little underwhelmed with the experience of low-level debugging of Linux applications using traditional debuggers such as GDB and LLDB. These programs have been around for a long time, developing alongside Linux and other UNIX-like OSs, and are still solidly in the CLI domain.  Fed up with the lack of data structure support and these tools’ staleness and user experience, [Jim] has created UScope, a new debugger written from scratch with no code from the existing projects.

GBD, in particular, has quite a steep learning curve once you dig into its more advanced features. Many people side-step this learning curve by running GDB within Visual Studio or some other modern IDE, but it is still the same old debugger core at the end of the day. [Jim] gripes that existing debuggers don’t support modern data structures commonly used and have poor customizability. It would be nice, for example, to write a little code, and have the debugger render a data structure graphically to aid visualisation of a problem being investigated. We know that GDB at least can be customised with Python to create application-specific pretty printers, but perhaps [Jim] has bigger plans?

Anyway, Uscope currently supports only C and Zig, but work is in progress to add C++ and Go support, with plans for Rust, Odin and Jai. Time will tell whether they can gather enough interest to really drive development to support the more esoteric languages fully. Still, Rust at least has a strong support base, which might help get other people involved. It looks like early doors for this project, so time will tell whether it gets traction. We’ll certainly be keeping an eye on it in the future!

If you wish to play along at home, you’ll want to start with the GitHub page, read on from there, and maybe join this discord.

If you’re new to debugging on Linux, we’ve got a quick guide to GUI frontends to ease you in. If you’re less interested in code and more of a script junkie, here’s how to debug BASH script or even SED.

2024 Brought Even More Customization to Boxes.py

Por: Tom Nardi
1 Enero 2025 at 18:00

If you have access to a laser cutter, we sincerely hope you’re aware of boxes.py. As the name implies, it started life as a Python tool for generating parametric boxes that could be assembled from laser-cut material, but has since become an invaluable online resource for all sorts of laser projects. Plus, you can still use it for making boxes.

But even if you’ve been using boxes.py for awhile, you might not know it was actually an entry in the Hackaday Prize back in 2017. Creator [Florian Festi] has kept up with the project’s Hackaday.io page all this time, using it as a sort of development blog, and his recent retrospective on 2024 is a fascinating read for anyone with an eye towards hot photonic action.

In it, he describes a bevy of new designs that have come to the site, many of which have been developed either by or in conjunction with the community. For example, a new tool for generating IKEA-like pegboard is sure to be useful for the better organized among us. The last twelve months also saw the addition of a parametric air filter box, LEGO sorters, storage bins, book holders, bird feeders, and plenty more.

At the end, [Florian] has some interesting thoughts on how the community as a whole has developed over the years. He notes that in the early days, any code or designs proposed by users for inclusion in the project usually needed work before they were ready for prime time. But now that everything is more established, the pull requests he’s getting are so well done that they rival any of the original work he put in.

We’re glad to hear that the community is coming together to make this already fantastic project even better. It sounds like [Florian] is even getting some help to track down and eliminate the remaining Python 2.x code that’s still lingering around.

Here’s to many more excellent years for Boxes.py!

Minecraft in…COBOL?

27 Diciembre 2024 at 12:00

When you think of languages you might read about on Hackaday, COBOL probably isn’t one of them. The language is often considered mostly for business applications and legacy ones, at that. The thing is, there are a lot of legacy business applications out there, so there is still plenty of COBOL. Not only is it used, but it is still improved, too. So [Meyfa] wanted to set the record straight and created a Minecraft server called CobolCraft.

The system runs on GnuCOBOL and has only been tested on Linux. There are a few limitations, but nothing too serious. The most amazing thing? Apparently, [Meyfa] had no prior COBOL experience before starting this project!

Even if you don’t care about COBOL or Minecraft, the overview of the program is interesting because it shows how many things require workarounds. According to the author:

Writing a Minecraft server was perhaps not the best idea for a first COBOL project, since COBOL is intended for business applications, not low-level data manipulation (bits and bytes) which the Minecraft protocol needs lots of. However, quitting before having a working prototype was not on the table! A lot of this functionality had to be implemented completely from scratch, but with some clever programming, data encoding and decoding is not just fully working, but also quite performant.

Got the urge for Cobol? We’ve been there. Or write Minecraft in… Minecraft.

Faster Integer Division with Floating Point

23 Diciembre 2024 at 06:00

Multiplication on a common microcontroller is easy. But division is much more difficult. Even with hardware assistance, a 32-bit division on a modern 64-bit x86 CPU can run between 9 and 15 cycles. Doing array processing with SIMD (single instruction multiple data)  instructions like AVX or NEON often don’t offer division at all (although the RISC-V vector extensions do). However, many processors support floating point division. Does it make sense to use floating point division to replace simpler division? According to [Wojciech Mula] in a recent post, the answer is yes.

The plan is simple: cast the 8-bit numbers into 32-bit integers and then to floating point numbers. These can be divided in bulk via the SIMD instructions and then converted in reverse to the 8-bit result. You can find several code examples on GitHub.

Since modern processors have several SIMD instructions, the post takes the time to benchmark many different variations of a program dividing in a loop. The basic program is the reference and, thus, has a “speed factor” of 1. Unrolling the loop, a common loop optimization technique, doesn’t help much and, on some CPUs, can make the loop slower.

Converting to floating point and using AVX2 sped the program up by a factor of 8X to 11X, depending on the CPU.  Some of the processors supported AVX512, which also offered considerable speed-ups.

This is one of those examples of why profiling is so important. If you’d had asked us if converting integer division to floating point might make a program run faster, we’d have bet the answer was no, but we’d have been wrong.

As CPUs get more complex, optimizing gets a lot less intuitive. If you are interested in things like AVX-512, we’ve got you covered.

Assets AI

Por: EasyWithAI
3 Enero 2023 at 14:16
Assets AI offers unique, original game assets for you to use in your game design and development. Prices start at $2.99 per asset and you only pay for what you need. The assets are of high quality and you will own them forever after downloading. New assets are added to their collection every week, including […]

Source

Eraser AI

Por: EasyWithAI
6 Mayo 2024 at 12:25
Eraser AI is a technical design copilot that’s able to streamline technical design workflows for developers and engineering teams. It can serve as a copilot for creating, editing, and documenting diagrams, architectures, and design documents using natural language prompts. Some more detailed use cases for this particular tool can be found on the main website, […]

Source

BOWWE Builder

Por: EasyWithAI
1 Agosto 2024 at 15:25
BOWWE AI Builder is a user-friendly platform that simplifies creating websites, landing pages, CVs, and more without any coding. With a single click, you can transform your website into over 100 languages using AI technology. BOWWE also features AI Text and Image Generators to help elevate your content, making it even more engaging and professional. […]

Source

Trace

Por: EasyWithAI
24 Noviembre 2023 at 14:50
Trace is an iOS app development tool that allows you to design fully-functional apps using the SwiftUI framework. It leverages the power of AI models to understand your app ideas and automatically generate clean, production-ready UI code, designs, and even entire app modules tailored to your needs. Describe any UI component you want to create […]

Source

Autodevs by Create

Por: EasyWithAI
21 Septiembre 2023 at 13:30
Create is an AI-powered app development platform that helps founders build and launch products and prototypes incredibly fast thanks to AI code generation. It generates production-ready code for common features like auth, payments, APIs, frontend UI, and more so you start months ahead. Building something more complex? Create also allows you to get an instant […]

Source

Swizzle

Por: EasyWithAI
21 Febrero 2024 at 16:24
Swizzle is is a multimodal AI tool for building web apps from start to finish right in your browser without any complicated setup or coding. This clever all-in-one tool handles everything from database and authentication to front and back end code, allowing you to focus on bringing your app ideas to life. Simply sign up […]

Source

Devin

Por: EasyWithAI
14 Marzo 2024 at 18:09
Devin is an AI coding assistant that can function as a fully autonomous software engineer, able to plan and execute complex coding tasks requiring thousands of decisions. It offers impressive capabilities like learning new technologies on the fly, building and deploying full apps from scratch, automatically finding and fixing bugs, training its own AI models, […]

Source

KaneAI

Por: EasyWithAI
21 Agosto 2024 at 12:36
KaneAI by LambdaTest is a first of its kind AI Test Assistant with industry-first AI features like test authoring, management and debugging capabilities built from the ground up for high-speed quality engineering teams. KaneAI enables you to create and evolve complex test cases using natural language, significantly reducing the time and expertise required to get […]

Source

LLM Spark

Por: EasyWithAI
22 Noviembre 2023 at 15:13
LLM Spark is an AI development tool from YourGPT that allows you to create production-ready LLM-based applications. With seamless setup, you can effortlessly configure LLMs by integrating GPT-powered language models with your provider keys. Choose from built-in templates or craft unique projects from scratch, enhancing your AI app’s capabilities by providing it with your knowledge […]

Source

Convai

Por: EasyWithAI
8 Marzo 2023 at 16:08
Convai lets you create and connect intelligent characters to your virtual world with ease. The tool has an intuitive interface which lets you develop characters and NPCs with unique backstories, voices, and expertise, and even test them out in a playground. Using plugins, you can seamlessly integrate your characters with various game engines such as […]

Source

Charmed

Por: EasyWithAI
25 Marzo 2024 at 14:43
Charmed is a web-based toolkit that uses AI to assist game developers in the creation of 3D art assets for video games and other applications. It provides tools for generating 3D mesh geometries from text prompts or images, creating textures and materials, automating character rigging and animation, and even developing narrative elements like characters and […]

Source

❌
❌