rss2
Alfonso Sánchez-Beato's blog
alfonsobeato.net · American English
Programming, IoT, and some side projects
rss2 wordpress content atom dc sy
https://www.alfonsobeato.net/feed/
- Last post
- Sep 19, 2022
- Posts in 24 h · 7 days · 30 days
- 0 · 0 · 0
- Our last check
- Answering
- Served from
- Spain
- Site title
- Alfonso Sánchez-Beato's blog – Programming, IoT, and some side projects
- Text score at discovery
- 15,481
- Format
- rss2
- Features in the feed
- content, atom, dc, sy
- Community
- wordpress
Posts
What our queue read from this feed. Open one to read it here, or go to the site that published it.
- How to schedule meetings in the minimal number of time slots
Sep 19, 2022 · original
Although I work for a mostly remote work company, a couple of times a year we meet together for a week in some nice location of the world. When that happens, multiple meetings across people in different teams are organized. Sometimes the number of requested sessions gets out of hands and the scheduling team is overwhelmed. Quoting them in one of our latest gatherings: “We currently have over 160 proposed breakout sessions which will be impossible to schedule unless we work until midnight every day! We only have 3-4 hours available for breakout sessions each day.” The problem with scheduling these meetings is that you get a mix of people from different teams so you have incompatibilities between meetings, and some persons are invited to many meetings and it becomes hard to solve all of these conflicts so all the invited people can join their meetings. So, it seemed an interesting problem - A MeshLab plugin to find optimal oriented bounding boxes
Jan 14, 2022 · original
Your sandal, boxed and x-rayed I have some interest in photogrammetry, and, more concretely, in the ways to extract 3D information from a set of photographies of an object. There is excellent open source software that is able to do this, like Meshroom , which is based on the Alice Vision framework. Once you create a 3D object with this tool, you have a set of vertices and textures that can be manipulated with specialized 3D editing software. And here again we have excellent open source software for this task, like MeshLab . MeshLab can be extended via plugins, of which there is an extensive list . Some of them are integrated in the main MeshLab repository , but some others can be found in the MeshLab extra plugins repo. As I wanted to research what sort of measurements I could take on my 3D reconstructions, it looked like writing a MeshLab plugin was a great way to do this and be able to - How to share your video-conference window among attendees – or, the many ways of splitting a rectangle in many
Dec 9, 2020 · original
These days, in the covid world we live in we have multiple videoconferences every day, with colleagues, family, friends… The average number of people attending has grown, and when I was in a call some time ago, I wondered, what would be the “optimal” way of splitting the videconference application window among the people in the call? What would be the definition of “optimal”? And, in how many ways could the space be split?, as sometimes you might prefer, for instance, one where space is shared equally or one where the current speaker has predominance. This intrigued me, and I started some research to try to find answers to these questions. I started with the assumption that the videoconference application owns a window on the screen, which is a rectangle (we will call it the bounding rectangle), and we want to divide it in \(N\) different rectangles, being \(N\) the number of people in t - Returning values from shell functions and dynamic scoping
May 26, 2020 · original
When writing shell scripts, one of the things I used to find more problematic was how to return values from a function. If writing a function, I try to use local variables as far as possible, so I do not like the idea of using global variables to return values. There are a few well known options that can help with this, but none of them completely convinced me: You can use the return code ( f; $? ) of the function, but you are limited to integers and to an 8-bit range for them. Also, using it conflicts with the philosophy of function return codes, which are expected to be zero for success and otherwise an error code. As an example of how this can be a problem, if you run your shell with sh -e , the shell will exit when a function returns a non-zero code. You can take the function output to stdout as return value, by using command substitution ( your_var=$(f) ). The disadvantages are that - Configuring connectivity for your Ubuntu Core appliance
Mar 11, 2020 · original
Ubuntu Core is especially designed for appliances: you can very easily create a customized image by defining your own model assertion and including the specific snaps you need for your target application. At the same time, the system is security-first and you can finish configuration on it only by connecting via a system console. However, this can be inconvenient some times, as accessing the console is not immediate in many devices: sometimes you need special connectors/cables or even doing some soldering. If that is the case, you would be better off by having an easier way of performing the configuration. Canonical has had a solution for this for a while, the wifi-connect snap. This snap helps you to configure connectivity for the device by creating a wifi Access Point to where you can connect from a mobile phone and then select the wifi network where the device should connect to. This - Porting Ubuntu Core 18 to nvidia Jetson TX1 Developer Kit
Mar 14, 2019 · original
Ubuntu Core (UC) is Canonical’s take in the IoT space. There are pre-built images for officially supported devices, like Raspberry Pi or Intel NUCs, but if we have something else and there is no community port, we need to create the UC image ourselves. High level instructions on how to do this are found in the official docs. The process is straightforward once we have two critical components: the kernel and the gadget snap. Creating these snaps is not necessarily complex, but there can be bumps in the road if you are new to the task. In this post I explain how I created them for the Jetson TX1 developer kit board, and how they were used to create a UC image for said device, hoping this will provide new tricks to hackers working on ports for other devices. All the sources for the snaps and the build scripts are available in github: https://github.com/alfonsosanchezbeato/jetson-kernel-snap - Analysis and Plots of Solutions to Complex Powers
Mar 11, 2018 · original
In chapter 5 of his mind-blowing “The Road to Reality” , Penrose devotes a section to complex powers, that is, to the solutions to $$w^z~~~\text{with}~~~w,z \in \mathbb{C}$$ In this post I develop a bit more what he exposes and explore what the solutions look like with the help of some simple Python scripts. The scripts can be found in this github repo , and all the figures in this post can be replicated by running git clone https://github.com/alfonsosanchezbeato/exponential-spiral.git cd exponential-spiral; ./spiral_examples.py The scripts make use of numpy and matplotlib, so make sure those are installed before running them. Now, let’s develop the math behind this. The values for \(w^z\) can be found by using the exponential function as $$w^z=e^{z\log{w}}=e^{z~\text{Log}~w}e^{2\pi nzi}$$ In this equation, “log” is the complex natural logarithm multi-valued function, while “Log” is one - Filter and Modify System Calls with seccomp and ptrace
Mar 8, 2017 · original
In the conclusions to my last post, “Modifying System Call Arguments With ptrace” , I mentioned that one of the main drawbacks of the explained approach for modifying system call arguments was that there is a process switch for each system call performed by the tracee. I also suggested a possible approach to overcome that issue using ptrace jointly with seccomp, with the later making sure the tracer gets only the system calls we are interested in. In this post I develop this idea further and show how this can be achieved. For this, I have created a little example that can be found in github , along the example used in the previous post. The main idea is to use seccomp with a Berkeley Packet Filter (BPF) that will specify the conditions under which the tracer gets interrupted. Now we will go through the source code, with emphasis on the parts that differ from the original example . Skippi - Modifying System Call Arguments With ptrace
Feb 10, 2017 · original
As part of the ongoing effort we are doing in Canonical to snappify the world , we are trying to make available more and more software as easily-installable, secure, snaps. One of the things snapd does to isolate applications is to install snaps in separate folders in /snap/mysnap , and also creating $HOME/snap/mysnap for storing the snap data. Unfortunately, this changes where many applications expects data files to be as per the usual Unix conventions. Solving this usually implies maintaining patches that change the file paths. If the $SNAP environment variable is set, the patches use it to find files in the right locations. However, this is cumbersome as upstreams are not always willing to accept the patches, at least until snap package format gets more popular. Also, in some cases we might be interested in snappifying proprietary software, where patches are not an option. To solve th - How to Access Safely Unaligned Data
Aug 24, 2016 · original
Occasionally I find myself processing input data which arrives as a stream, like data from files or from a socket, but that has a known structure that can be modeled with C types. For instance, let’s say we are receiving from a socket a parcel that consists on a header of one byte, and a payload that is an integer. A naive way to handle this is the following (simplified for readability) code snippet: int main(void) { int fd; char *buff; struct sockaddr_in addr; int vint; char vchar; fd = socket(AF_INET, SOCK_STREAM, 0); buff = malloc(BUFF_SIZE); /* Init socket address */ ... connect(fd, (struct sockaddr *) &addr, sizeof(addr)); read(fd, buff, BUFF_SIZE); vchar = buff[0]; vint = *(int *) &buff[1]; /* Do something with extracted data, free resources */ ... return 0; } Here we get the raw data with a read() call, we read the first byte, then we read an integer by taking a pointer to the sec
Discovered by the rss-feed-index crawler, which checks each feed at most once a month.
Same record as JSON: https://api.agentalog.com/api/feeds/fd_alfonsobeato_net_5c9fe7550e6bed2d. More from this site: alfonsobeato.net in the Feeds tab.