Posts

Running Local LLMs for Cursor IDE: A Quick Guide to Ollama Integration

Image
Running Large Language Models (LLMs) locally are becoming increasingly accessible, and integrating them directly into your IDE workflow can dramatically boost productivity if you got some good hardware already. This guide demonstrates how to run LLMs locally using Ollama and connect with Cursor IDE. 1. Setting Up Ollama Ollama local LLM deployment. Install Ollama: Follow the installation instructions for your operating system: https://ollama.com/docs/install   set these envs: export OLLAMA_ORIGINS=*             export OLLAMA_HOST=0.0.0.0:11434   Start the Model: Run ollama serve & to launch the LLM server in the background.  run ollama and pull models: ollama serve & ollama pull llama3.1:8b   Pull a Model: Let's start with llama3.1:8b . Run ollama pull llama3.1:8b . This downloads the model – you can explore other models on the Ollama website ( https://ollama.com/library ). You'll see a list of available mod...

Running LLMs and Stable Diffusion Locally: My Setup & Getting Started

Image
For a while now, I've been using local GPTs – specifically Large Language Models (LLMs) and image generation. The idea of running these powerful tools on my hardware, without relying on cloud services, is incredibly appealing. It’s about control, privacy, and frankly, a bit of tech nerdiness! This post details how I’ve set up my local LLM environment, including integrating Stable Diffusion for some amazing image creation.     My Local Setup Let’s start with the basics. My system is running Ubuntu 25.04 (codename "Plucky") on an Intel-based machine. Here's a breakdown: Operating System: Ubuntu 25.04 Kernel: 6.14.0-33-generic GPU: NVIDIA RTX 500 Ada Generation (Driver Version: 580.95.05, CUDA Version: 13.0) Display Server: Wayland [$XDG_SESSION_TYPE] - Crucially, I switched to Wayland as it significantly impacted GPU utilization. Initially, I experienced limitations with GPU performance compared to X11, but I’ve found optimized settings to mitigate t...

Beyond Toughness: Why Your Car's Brain Needs AEC-Q100 AND ASIL-B

AEC-Q100 vs. ASIL-B: Quality Meets Safety In the era of autonomous driving and electric vehicles, the electronic components that run your car are more sophisticated than ever. But there’s a critical difference between a chip that is merely durable and one that is truly safe . In the automotive world, this distinction is governed by two major standards: AEC-Q100 and ASIL-B (Automotive Safety Integrity Level). For any electronic control unit (ECU)—from the brake system to the battery manager—to be considered safe, it must satisfy both. Here’s a look at what these standards mean, how they differ, and why they must work together. 🚧 Pillar 1: AEC-Q100 — The Quality and Reliability Guardian AEC-Q100 is the standard established by the Automotive Electronics Council (AEC). Its focus is purely on the physical robustness and reliability of integrated circuits (ICs). This is the baseline that ensures the chip is ...

The Actor Model

Image
Just watch what the inventor says.... don't ask me: One of the most simplest explanations and Arbiters, where touring machine screwed up...

Diving Deep: My Journey into Functional Programming – A Technical Exploration

 For a long time, I’d heard the buzz around functional programming – the elegant code, the focus on immutability , the promise of easier testing. But frankly, it felt abstract. My background was largely in imperative languages , and the shift felt… significant. This post isn't about converting you to a functional evangelist, but rather about my personal journey into this paradigm, particularly focusing on the deep technical challenges and rewards of embracing it.  Before starting, let me share some of great talks I've bookmarked: https://www.youtube.com/watch?v=ZhuHCtR3xq8 https://www.youtube.com/watch?v=z0N1aZ6SnBk   The Initial Resistance (and Why It’s Valid) Let's be honest – the initial learning curve was steep. Moving from thinking about how to change data to thinking about what to compute was a mental shift. The lack of side effects felt restrictive at first. I wrestled with recursion , struggled to visualize immutable data , and questioned the efficie...

Automotive Software: AUTOSAR and Beyond

Steering the Future: Automotive Software Standards and the Rise of the Software-Defined Vehicle 🚗💻 The automotive industry is in the midst of a revolutionary shift, transforming from mechanical marvels into sophisticated, software-defined vehicles (SDVs) . For aspiring and current automotive software engineers, navigating the complex landscape of standards and emerging trends is no longer optional—it's essential. The Foundation: Understanding Classical AUTOSAR The backbone of modern Electronic Control Unit (ECU) software is AUTOSAR (AUTomotive Open System ARchitecture) . This standard has been instrumental in enabling software portability, reusability, and modularity across different vehicle platforms and suppliers. Key AUTOSAR Concepts: Layered Architecture : Think of AUTOSAR like a structured building. Application Layer : The "user" level, where high-level functions like cruise control logic reside. Runtime Environment (RTE) : The crucial middleman, enabling communica...

Implementing a CRDT Application with JavaScript and C++ Clients

Implementing a CRDT Application with JavaScript and C++ Clients In today’s interconnected world, distributed systems are everywhere—from collaborative editing tools and messaging apps to cloud databases and IoT networks. One of the biggest challenges in these systems is ensuring that data remains consistent across multiple devices and platforms, even when updates happen independently and network partitions occur. Traditional approaches often rely on complex conflict resolution or central coordination, which can introduce latency, bottlenecks, or even single points of failure. Enter Conflict-free Replicated Data Types (CRDTs) , a family of data structures designed to make distributed consistency simple, robust, and scalable. A Brief History and Theoretical Foundations of CRDTs The concept of CRDTs emerged in the late 2000s as researchers and engineers sought better ways to handle data replication in distributed systems. The foundational work by Marc Shapiro and others formalize...

Digging deep with heaptrack/massif

Debugging Memory Growth on a Ti-Sitara AArch64 ECU with Heaptrack A while back I had to track down a recurring heap growth issue on a customer’s automotive ECU based on a TI Sitara Cortex-A53. The system ran multiple ML models for ADAS feature extraction at different frequencies. Each model ran in its own POSIX preemptive real-time thread, pinned to cores with priorities like 120, 110, 80, 60 . When switching scheduling policies (for example SCHED_OTHER → SCHED_RR or SCHED_FIFO under PREEMPT_RT), the visible priority ranges changed — which is expected behavior on a real-time patched kernel. The Problem Over time, memory usage crept up until the system became unstable. The workload made it tricky — multiple ML models meant irregular allocation patterns with frequent buffer churn. I needed something lightweight that could run directly on the target to pinpoint the source. Why Heaptrack Heaptrack turned out to be the best fit. It hooks into memory allocations using a preload li...

Lost in the Domains

For a while, I felt like I was building software on a map of my own making – a patchwork of technical solutions that didn't truly reflect the business realities. Then, I stumbled upon Domain-Driven Design (DDD), and suddenly, it felt like finding a compass for navigating complex problems. This isn't just a collection of patterns; it’s a philosophy of building software that’s deeply aligned with the business. Here's a look at my journey into DDD, and what I’ve learned along the way. The Initial Hesitation (and Why It’s Normal) Let’s be honest, the first time I encountered DDD, I was intimidated. The terminology – bounded contexts , aggregates , entities , value objects – felt overwhelming. There’s a lot to learn, and the initial investment can seem significant. I’d spent years focused on delivering features, and the idea of meticulously modeling a domain felt… slow. The Turning Point: Talking to the Experts What truly shifted my perspective was the realizati...

The Elegant Logic of Functional Programming

Functional programming, at its core, centers around the construction of software with pure functions – functions that yield the same output for identical inputs, without side effects. This contrasts fundamentally with imperative programming, which relies heavily on mutable state and altering external conditions. What *Is* Functional Programming? Let’s examine a simple example: // Imperative (Mutable State) int x = 5; int y = x + 3; // y’s value depends on x’s changing value In contrast, a functional equivalent: // Functional (Pure Function) int addThree(int x) { return x + 3; } int y = addThree(5); // y’s value is constant, derived from the input The critical distinction is the absence of mutation. The `addThree` function's output is predictable and independent of external state. Monads: Encapsulating Side Effects Monads represent a powerful abstraction for handling operations that inherently involve side effect...
Building Resilient Distributed Networks for Smart Mobility In the era of smart mobility and connected public transport, distributed networks form the backbone of real-time communication, safety, and passenger experience. This post explores the architecture, protocols, and design patterns behind building robust, failover-capable distributed networks for modern mobility systems. Why Distributed Networks Matter in Smart Mobility Real-Time Data Exchange: Vehicles, infrastructure, and control centers must exchange data instantly for safety and efficiency. Dynamic Topology: Buses, trains, and roadside units join and leave the network dynamically, requiring adaptive protocols. Safety-Critical Operations: Failover and redundancy are essential to maintain service during faults or disconnections. Core Technologies and Protocols Service Discovery: Enables devices to find each other automatically. Common protocols include mDNS, DNS-SD, and custom P2P solutions. Multic...

Hardware Security in Chip Hardening

Interactive Report: Hardware Security in Chip Hardening Hardware Security in Chip Hardening An interactive exploration of fault injection attacks and hardware countermeasures. Clock Glitch Hardening Reset Injection Hardening Tamper Protection Understanding Clock Glitch Attacks This section explores how attackers introduce precise, short-lived faults (glitches) into a chip's clock signal. These disruptions can cause instructions to be skipped or corrupted, potentially bypassing security checks. Below, you can visualize this attack and then explore common defense mechanisms. Attack Vector: Clock Signal Manipulation ...