<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Arun PM</title><link>https://www.arunpm.com/</link><description>Recent content on Arun PM</description><generator>Hugo -- 0.147.1</generator><language>en-us</language><lastBuildDate>Wed, 07 Feb 2024 00:00:00 +0000</lastBuildDate><atom:link href="https://www.arunpm.com/index.xml" rel="self" type="application/rss+xml"/><item><title>Rust: Programming language for safety and speed</title><link>https://www.arunpm.com/posts/rust/</link><pubDate>Wed, 07 Feb 2024 00:00:00 +0000</pubDate><guid>https://www.arunpm.com/posts/rust/</guid><description>&lt;p>&lt;img alt="image info" loading="lazy" src="https://www.arunpm.com/posts/rust/rust-logo.png">&lt;/p>
&lt;h2 id="introduction">Introduction&lt;/h2>
&lt;p>Rust is a non-garbage collected, compiled systems programming language with strong typing. It began as a personal project
by a Mozilla research employee in 2006, and later, Mozilla started sponsoring the project in 2009. Eventually, Mozilla
adopted Rust for Firefox and rewrote the core in Rust in 2017. Rust is an advanced language with numerous features that
developers appreciate. Positioned as a compelling alternative to C/C++, Rust offers robust capabilities for system-level programming.&lt;/p></description></item><item><title>Python Dependency Management: pip and poetry</title><link>https://www.arunpm.com/posts/python-envs/</link><pubDate>Mon, 27 Nov 2023 00:00:00 +0000</pubDate><guid>https://www.arunpm.com/posts/python-envs/</guid><description>&lt;p>&lt;em>&lt;strong>Install package using pip&lt;/strong>&lt;/em>&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>python3 -m pip install iotcore
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>&lt;em>&lt;strong>Show package details using pip&lt;/strong>&lt;/em>&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>python3 -m pip show iotcore
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>&lt;em>&lt;strong>Uninstall package using pip&lt;/strong>&lt;/em>&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>python3 -m pip uninstall iotcore
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>&lt;em>&lt;strong>List installed packages using pip&lt;/strong>&lt;/em>&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>python3 -m pip list
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>&lt;em>&lt;strong>Upgrade a package using pip&lt;/strong>&lt;/em>&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>python3 -m pip install --upgrade iotcore
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e"># or&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>python3 -m pip install -U iotcore
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>&lt;em>&lt;strong>New python project using poetry&lt;/strong>&lt;/em>&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>poetry new poeetry_demo
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>&lt;em>&lt;strong>Install new package using poetry&lt;/strong>&lt;/em>&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>poetry add arrow
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>&lt;em>&lt;strong>Show installed packages using poetry&lt;/strong>&lt;/em>&lt;/p></description></item><item><title>Refresh C Programming</title><link>https://www.arunpm.com/posts/refresh-c-programming/</link><pubDate>Sat, 11 Nov 2023 00:00:00 +0000</pubDate><guid>https://www.arunpm.com/posts/refresh-c-programming/</guid><description>&lt;p>&lt;em>&lt;strong>Convert void data-type (byte array) to uint8_t type&lt;/strong>&lt;/em>&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-C" data-lang="C">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#66d9ef">static&lt;/span> &lt;span style="color:#66d9ef">uint8_t&lt;/span> &lt;span style="color:#a6e22e">notify_func&lt;/span>(&lt;span style="color:#66d9ef">const&lt;/span> &lt;span style="color:#66d9ef">void&lt;/span> &lt;span style="color:#f92672">*&lt;/span>data)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>{
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">uint8_t&lt;/span> value &lt;span style="color:#f92672">=&lt;/span> ((&lt;span style="color:#66d9ef">uint8_t&lt;/span> &lt;span style="color:#f92672">*&lt;/span>)data)[&lt;span style="color:#ae81ff">7&lt;/span>];
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">return&lt;/span> value;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>}
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>&lt;em>&lt;strong>Structure data-type as function arguments&lt;/strong>&lt;/em>&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-C" data-lang="C">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#66d9ef">static&lt;/span> &lt;span style="color:#66d9ef">uint8_t&lt;/span> &lt;span style="color:#a6e22e">notify_func&lt;/span>(&lt;span style="color:#66d9ef">struct&lt;/span> bt_gatt_subscribe_params &lt;span style="color:#f92672">*&lt;/span>params)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>{
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#a6e22e">printk&lt;/span>(&lt;span style="color:#e6db74">&amp;#34;value_handle : %d&amp;#34;&lt;/span>, params&lt;span style="color:#f92672">-&amp;gt;&lt;/span>value_handle)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>}
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>&lt;em>&lt;strong>Declare enums as types&lt;/strong>&lt;/em>&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-C" data-lang="C">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#66d9ef">typedef&lt;/span> &lt;span style="color:#66d9ef">enum&lt;/span> {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> STRING,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> NUMBERS,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> COMPLEX,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> DATATYPE_COUNT,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> INVALID_SENSOR
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>} &lt;span style="color:#66d9ef">sensor_datatype_t&lt;/span>;
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>&lt;em>&lt;strong>String initialisation to char pointer&lt;/strong>&lt;/em>&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-C" data-lang="C">&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#66d9ef">const&lt;/span> &lt;span style="color:#66d9ef">char&lt;/span> &lt;span style="color:#f92672">*&lt;/span>p_mac_addr &lt;span style="color:#f92672">=&lt;/span> &lt;span style="color:#e6db74">&amp;#34;0C:8C:DC:41:E1:EF&amp;#34;&lt;/span>;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#66d9ef">static&lt;/span> &lt;span style="color:#66d9ef">void&lt;/span> &lt;span style="color:#a6e22e">print_mac_addr&lt;/span>(&lt;span style="color:#66d9ef">void&lt;/span>)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>{
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#a6e22e">printk&lt;/span>(&lt;span style="color:#e6db74">&amp;#34;p_mac_addr : %s&lt;/span>&lt;span style="color:#ae81ff">\n&lt;/span>&lt;span style="color:#e6db74">&amp;#34;&lt;/span>, p_mac_addr)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>}
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>&lt;em>&lt;strong>String as function return values&lt;/strong>&lt;/em>&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-C" data-lang="C">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#66d9ef">char&lt;/span>&lt;span style="color:#f92672">*&lt;/span> &lt;span style="color:#a6e22e">get_sensor_mac_addr&lt;/span>(&lt;span style="color:#66d9ef">void&lt;/span>){
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#66d9ef">return&lt;/span> p_mac_addr;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>}
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>&lt;em>&lt;strong>Parse unsigned int from byte array pointer&lt;/strong>&lt;/em>&lt;/p></description></item><item><title>Iotcore - Python MQTT Broker and IoT Features for Django and FastAPI</title><link>https://www.arunpm.com/projects/iotcore/</link><pubDate>Mon, 18 Sep 2023 00:00:00 +0000</pubDate><guid>https://www.arunpm.com/projects/iotcore/</guid><description>&lt;p>&lt;a href="https://github.com/tomvictor/iotcore/actions/workflows/CI.yml">&lt;img alt=".github/workflows/CI.yml" loading="lazy" src="https://github.com/tomvictor/iotcore/actions/workflows/CI.yml/badge.svg">&lt;/a>
&lt;a href="https://pypi.org/project/iotcore">&lt;img loading="lazy" src="https://img.shields.io/pypi/v/iotcore?color=%2334D058&amp;label=pypi%20package">&lt;/a>
&lt;a href="https://pypi.org/project/iotcore">&lt;img loading="lazy" src="https://img.shields.io/pypi/pyversions/fastapi.svg?color=%2334D058">&lt;/a>&lt;/p>
&lt;p>The project aims to give full support for mqtt broker and related apis. The internals of the mqtt server is written in Rust using popular Tokio framework. Motive of the project is to avoid the GIL limitation of python and bring all the fun features offered by rust.&lt;/p>
&lt;h2 id="features">Features&lt;/h2>
&lt;ul>
&lt;li>Full-fledged configurable Tokio based MQTT broker&lt;/li>
&lt;li>No python GIL limitation&lt;/li>
&lt;li>All Standard MQTT broker features&lt;/li>
&lt;li>Zero extra setup required to run mqtt broker in you Django and Fastapi project&lt;/li>
&lt;li>MQTT client, with callback support for async or non-blocking applications&lt;/li>
&lt;li>and more&lt;/li>
&lt;/ul>
&lt;h2 id="planned-features">Planned Features&lt;/h2>
&lt;ul>
&lt;li>Device support&lt;/li>
&lt;li>Sensor support&lt;/li>
&lt;li>Sensor data storage&lt;/li>
&lt;li>Django based admin pages&lt;/li>
&lt;li>Django rest framework based APIs for managing devices and sensors&lt;/li>
&lt;li>SSL certificates and policy management&lt;/li>
&lt;/ul>
&lt;h2 id="installation">Installation&lt;/h2>
&lt;pre tabindex="0">&lt;code>pip install iotcore
&lt;/code>&lt;/pre>&lt;p>Create a new file called mqtt.toml in your root project directory and copy pase the sample mqtt.toml from
&lt;a href="https://tomvictor.github.io/iotcore/config/">https://tomvictor.github.io/iotcore/config/&lt;/a>&lt;/p></description></item><item><title>Golang Rest Framework (Gorf)</title><link>https://www.arunpm.com/projects/gorf/</link><pubDate>Thu, 20 Jul 2023 00:00:00 +0000</pubDate><guid>https://www.arunpm.com/projects/gorf/</guid><description>&lt;p>&lt;a href="https://github.com/go-gorf/gorf/actions?workflow=build">&lt;img alt="Build Status" loading="lazy" src="https://img.shields.io/github/actions/workflow/status/go-gorf/gorf/go.yml?branch=main&amp;style=for-the-badge">&lt;/a>&lt;a href="https://pkg.go.dev/github.com/go-gorf/gorf">&lt;img loading="lazy" src="http://img.shields.io/badge/godoc-reference-5272B4.svg?style=for-the-badge">&lt;/a>&lt;/p>
&lt;p>Django inspired Rest Framework for Golang.&lt;/p>
&lt;p>Introducing Gorf, the Golang REST API framework that empowers developers to easily create and reuse modular apps.
Inspired by the simplicity and flexibility of Python Django, Gorf utilizes the full MVC architecture, providing
dedicated model, URL, and view files for effortless understanding. Gorf&amp;rsquo;s plug and play app concept enables infinite
scalability and customization, making Gorf the go-to solution for anyone looking to kickstart a new project in Golang.
Join our community and contribute your ideas and innovations to build a framework that streamlines the development process for all.&lt;/p></description></item><item><title>About</title><link>https://www.arunpm.com/about/</link><pubDate>Fri, 24 Mar 2023 00:00:00 +0000</pubDate><guid>https://www.arunpm.com/about/</guid><description>&lt;p>&lt;img alt="Tom Victor Vithayathil" loading="lazy" src="https://www.arunpm.com/about/image001.jpeg">&lt;/p>
&lt;h2 id="hi-im-tom-victor-vithayathil-">Hi, I&amp;rsquo;m Tom Victor Vithayathil 👋&lt;/h2>
&lt;p>I am a computer programmer, entrepreneur, and technology enthusiast.&lt;/p>
&lt;p>My expertise and technology stack include:&lt;/p>
&lt;ul>
&lt;li>Programming languages such as C, Go, Python, Rust and JavaScript&lt;/li>
&lt;li>Backend development and Linux servers&lt;/li>
&lt;li>Frameworks like Node, Django, FastAPI, Flask, and React&lt;/li>
&lt;li>Embedded programming and Real-time Operating Systems (Zephyr, TI-RTOS &amp;amp; NuttX)&lt;/li>
&lt;li>Internet of Things (IoT) and Real-time communication&lt;/li>
&lt;li>DevOps and CI/CD with tools like Docker, Jenkins&lt;/li>
&lt;li>Relational and Document databases&lt;/li>
&lt;/ul></description></item></channel></rss>