<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Posts on Camaioni</title><link>https://raubcamaioni.com/blog/posts/</link><description>Recent content in Posts on Camaioni</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Thu, 28 Jul 2022 21:13:27 -0400</lastBuildDate><atom:link href="https://raubcamaioni.com/blog/posts/index.xml" rel="self" type="application/rss+xml"/><item><title>Rectangles</title><link>https://raubcamaioni.com/blog/posts/rectangles/</link><pubDate>Thu, 28 Jul 2022 21:13:27 -0400</pubDate><guid>https://raubcamaioni.com/blog/posts/rectangles/</guid><description>&lt;h2 id="rectangle-recursion"&gt;Rectangle Recursion&lt;/h2&gt;
&lt;p&gt;A sub-component of my electrical circuit generation project.&lt;br&gt;
Spatial linked node structures can be generated with little code.&lt;/p&gt;
&lt;p&gt;The algorithm can be used to generate some pleasing &amp;ldquo;modern art&amp;rdquo; images.&lt;br&gt;
Here is a collection of the outputs.&lt;/p&gt;
&lt;p&gt;The code used to generate is at the bottom of the page.&lt;/p&gt;
&lt;p&gt;The algorithm comes from the following paper.&lt;br&gt;
credit: Automatic Real-Time Generation of Floor Plans Based on Squarified Treemaps Algorithm&lt;/p&gt;</description></item><item><title>Python: Structures</title><link>https://raubcamaioni.com/blog/posts/structures/</link><pubDate>Sat, 16 Jul 2022 23:47:22 -0400</pubDate><guid>https://raubcamaioni.com/blog/posts/structures/</guid><description>&lt;h2 id="struct-options-in-python"&gt;Struct: Options in Python&lt;/h2&gt;
&lt;p&gt;Structs are commonly used to format data sent between services over a network.&lt;br&gt;
A struct contains types organized in continuous memmory.&lt;br&gt;
In c/c++, structs can be directly created using the &amp;lsquo;struct&amp;rsquo; keyword.&lt;/p&gt;
&lt;p&gt;Structs can be transformed to/from their continuous byte representations.&lt;br&gt;
This allows for a consise representation in code.&lt;/p&gt;
&lt;p&gt;Python does not contain a built-in &amp;lsquo;struct&amp;rsquo; object.&lt;br&gt;
There are a number of ways to replicate the functionality of structs in python.&lt;/p&gt;</description></item><item><title>Python: Multicast</title><link>https://raubcamaioni.com/blog/posts/multicast/</link><pubDate>Sat, 16 Jul 2022 19:02:20 -0400</pubDate><guid>https://raubcamaioni.com/blog/posts/multicast/</guid><description>&lt;h2 id="sendreceive-multicast-messages"&gt;Send/Receive multicast messages:&lt;/h2&gt;
&lt;p&gt;The following code block shows how to instantiate a multicast socket on windows/linux.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Features:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;socket can both send/receive multicast messages&lt;/li&gt;
&lt;li&gt;avoid binding to all interfaces (&amp;lsquo;0.0.0.0&amp;rsquo;), this can be a security issue&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Many online examples for python multicast sockets no longer work for newer version of Linux.&lt;br&gt;
This code snippet was tested to work on Ubuntu 22 as of 7/24/2022.&lt;/p&gt;
&lt;h2 id="you-lie-this-code-does-not-work-on-my-system"&gt;YOU LIE: This code does not work on my system!&lt;/h2&gt;
&lt;p&gt;There are many linux settings that can prevent application level sockets from capturing multicast messages.&lt;br&gt;
These are the debugging steps I used to diagnose missing multicast messages.&lt;/p&gt;</description></item></channel></rss>