StackOverflow.com

VN:F [1.9.22_1171]
Rating: 8.5/10 (13 votes cast)

Random snippets of all sorts of code, mixed with a selection of help and advice.

How can I run a quantized LLM efficiently on iOS using Core ML, MLX, or llama.cpp?

10 June 2026 @ 5:36 am

I am developing an iOS application for Apple Silicon devices (iPhone/iPad) that runs a small language model fully on-device without using cloud APIs. The main requirement is low-latency inference within the memory limits of mobile devices (around 6–8 GB RAM), while ensuring stable performance for real-time responses. I am currently evaluating different approaches for local inference on iOS, including Core ML, MLX, and llama.cpp. What is the most practical and production-ready approach to run a quantized LLM on iOS today using Apple Silicon? In particular: Which framework (Core ML, MLX, or llama.cpp) is most suitable for on-device LLM inference in iOS apps? What are the key performance differences when running transformer models on Apple A-series chips? What optimizations are generally required for mobile deployment (e.g., quantization levels, memory mapping, model size limits)? Are there

How Do You Avoid Cabinet Handle Clearance Issues with Integrated Appliances?

10 June 2026 @ 5:34 am

I'm currently working on a kitchen refit and have spent a surprising amount of time comparing cabinet handle styles and dimensions. One issue I ran into was handle projection—the distance a handle extends from the cabinet surface. Some of my cabinets are next to integrated appliances and drawers that need to open past one another, so clearance is becoming a concern. I've noticed that low-profile T-bar handles seem to reduce the risk of collisions, but I'm unsure how much projection is generally considered safe when planning a kitchen layout. I'm also considering mixing hardware finishes, such as brushed brass on the main cabinets and matte black on the island. From a design perspective, does this typically work well in modern kitchens, or can it end up looking inconsistent? For those who have completed kitchen renovations or work in cabinetry/interior design: How do you determine the ideal handle projection? Are there standard

How can I resolve the issue of text appearing while click on any content [closed]

10 June 2026 @ 5:26 am

In WordPress website woodmart theme I find issue, when I click on any content products photo in homepage it appears theme name like black-friday-24 etc, follows the sequence 1- infinity. I searched several options, inside the plug-in and nothing found. I worked on this theme at least 16 website and never encountered this issue before. I last seen on astra theme on 2022. How can I resolve this issue? Can anyone suggest me? Here is my website address meilibeautybd.com I will be thankful.

gfortran wont stop giving me F951.exe: Fatal Error: Cannot open file '' [closed]

10 June 2026 @ 5:05 am

I have literally no coding experience and am attempting to run gfortran using MSYS2 on my laptop with windows 11 for a research project. I have a .f file that i am attempting to compile however every time i run it, the terminal gives me a response saying it cannot open the file. I have no idea where to begin to troubleshoot this so any advice would be helpful. the text editor i'm using is VSCode, however it keeps classifying my file as plain text which is a separate thing.

How to remove the top (or navigation) toolbar background tint in iOS 27

10 June 2026 @ 4:07 am

After updating to iOS 27 and playing around in some of my apps, there is one visual that I am not a big fan of seeing return. enter image description here The navigation toolbar has this tint background behind it similar to iOS 18. I'm not sure if there is any to remove it without removing the toolbar items placed there. Does anyone have a clue on how to remove it?

Kotlin ViewModel StateFlow - Properly Updating State Changes

10 June 2026 @ 4:02 am

This question is to understand StateFlow in a view-model. How to update the value more than one time properly. So, a very interesting issue happens, value updates for this first time, when, say authV1 is called, but it does not update when authV2 is called, or reset is called. How to ensure the state is copied properly to ensure the state-flow gets updated, and view shows the latest values. (please note, the view itself simply shows a column with a text view for value, and buttons to update the value) class AuthViewModel: ViewModel() { // transient value/state private val _authEntityMutableStateFlow = MutableStateFlow<AuthEntity>(AuthEntity(token = "")) val authEntityStateFlow = _authEntityMutableStateFlow.asStateFlow() fun update(data: AuthEntity) { // required in kotlin because it does not update by value _authEntityMutableStateFlow.value = _authEntityMutableStateFlow.value.copy

Ptrace is slow, Is there any faster alternative syscall that is faster and doesnt pauses the process

10 June 2026 @ 3:15 am

I'm using ptrace to monitor system calls of a target process (similar to strace), but the performance overhead is too high for my use case. Specifically, ptrace pauses the traced process on every syscall entry and exit, causing a massive slowdown — around 2–3x for syscall-heavy workloads. I need to trace syscalls (or at least read the process's memory and register state) without constantly stopping the target process. Are there any lower-overhead alternatives to ptrace that: Don't pause the process on every event (or pause for much shorter durations)? Provide access to syscall arguments, return values, and optionally memory reads? Are available on modern Linux kernels (5.x+)?

Win32 C++ ListView LVITEM pszText string lifetime - getting gibberish characters

10 June 2026 @ 2:20 am

I have ListView item labels stored as an std::vector of std::wstring . Something about the lifetime of the string I convert from std::wstring to LVITEM's pszText in a utility function is causing gibberish characters to appear, even though the debugger shows that the LVITEM is fully correct at the time of construction. I do the construction of LVITEM in the following utility method of my MyListView object, which is called both when adding and modifying items. struct MyListView { // ... std::vector<std::wstring> labels; // [0] is main, [1+] is additional columns // ... void addItems(..); void modifyItems(..); private: LVITEM prepareMainLVItem(); } When the utility method does the following: LVITEM MyListView::prepareMainLVItem() { LVITEM lvi; ZeroMemory(&lvi, sizeof(lvi)); lvi.

Javascript/CSS deconfliction of grid coordinate points

10 June 2026 @ 2:16 am

I have an existing working web platform where coordinates with labels are plotted on a two-axis grid. As more coordinates are added, the possibility for overlapping becomes higher and higher. The current solution is manual deconfliction of known points but it is not an optimal answer. The points are plotted as relative to the size of the grid, which is responsive using CSS so any solution I implement has to work within a moving grid. What I am hoping for is a way to plot points and draw lines to labels where they can conveniently go without interference but I haven't been able to find an existing solution that I can apply to it. My first thought is to plot a point and a label near it with a line and store that as an unavailable area then, for each additional point, calculate the closest available location. But that is likely just going to end up with a lot of awkward lines all over the place. What currently happens is that the labels are

Using AI tools in the debugging process, Has AI changed the way you debug code? [closed]

9 June 2026 @ 10:47 pm

I've noticed that AI tools are becoming increasingly common for debugging code. Some developers use AI to explain error messages, suggest fixes, or point out possible causes, while others still prefer traditional debugging techniques. For those who use AI in their development workflow: Has AI changed the way you debug code? What kinds of bugs or issues do you find AI particularly helpful with? Are there situations where you prefer to debug without AI? Has using AI improved your debugging skills, or has it made you more dependent on AI suggestions? I'm interested in hearing about real experiences and how your debugging workflow has evolved over time.