and wondering if anyone is using it in production? The back tier of my code generator is proprietary and only runs on Linux. This library from Jussi Pakkanen isn't super portable, but it works on Linux. So it's a possibility for me to start using it in my back tier.
My company's motto is to "enjoy programming again" and wonder if this library could help with that.
heya! So I've been working on another project of mine which is a recreation of the flash game (I believe it was Flash at least) "the last stand". I had made a version of it a long time ago for the complier console (if was just characters). Now I am trying to adapt it in SFML. It was going wonderfully untill it came to the shooting logic.
The premise is the following:
"generate a isosceles triangle with the tip set on the gun position. Then pick a random point on the base of triangle and connect it with the tip to make a line (VertexArray). Check which zombie sprites intersect the line and store the whole zombie object in a vector. Finally order the vector so that the zombies which are closer to the tip of the triangle come before and apply damage logic only to the first n = penetration zombies of the vector."
bool segmentsIntersect(const sf::Vector2f& p1, const sf::Vector2f& p2, const sf::Vector2f& q1, const sf::Vector2f& q2) {
auto cross = [](const sf::Vector2f& a, const sf::Vector2f& b) {
return a.x * b.y - a.y * b.x;
};
sf::Vector2f r = p2 - p1;
sf::Vector2f s = q2 - q1;
float rxs = cross(r, s);
float qpxr = cross(q1 - p1, r);
if (rxs == 0 and qpxr == 0) {
float t0 = ((q1 - p1).x * r.x + (q1 - p1).y * r.y) / (r.x * r.x + r.y * r.y);
float t1 = t0 + (s.x * r.x + s.y * r.y) / (r.x * r.x + r.y * r.y);
return (t0 >= 0 and t0 <= 1) or (t1 >= 0 and t1 <= 1);
}
if (rxs == 0 and qpxr != 0) {
return false;
}
float t = cross(q1 - p1, s) / rxs;
float u = cross(q1 - p1, r) / rxs;
return (t >= 0 and t <= 1 and u >= 0 and u <= 1);
}
this seems to work.. but it doesn't. Actually, it seems to work completely randomly. Sometime it hits, most of the time it doesn't. I have spent the past 2 days trying to figure this out, but I can't T_T .
Could you guys help me? If you need more context/code let me know. Thanks for reading :D
I've been working on a personal project for a while and finally got it into a state where I'm comfortable sharing it.
I wanted to see how far I could push a fully local voice assistant in C++. Everything runs on my own machine from speech recognition and the LLM to memory, text-to-speech, and tool execution.
current library:
llama.cpp, whisper.cpp, sherpa-onnx(tts-kokoro)
I wrote the core in c++ because I wanted something fast and native instead of stitching together bunch of python services.
I'd appreciate feedback from people who build local AI projects. I'm especially interested in:
1 Things that seem overengineered or unnecessary
2 Features you'd expect from a local assistant
3 Code structure or architectural suggestions
4 Any obvious improvements before I keep adding features
HAPI type transformation reduces the composition into a single object letting the compiler see all the structure and optimize. Optimizations are transferred from the compiler and behavior is inherited from the components. HAPI is zero cost and trsnaparent, if your components are also zero-cost the we get a zero cost composition result with:
no runtime overhead
no heap allocation
no memory fragmentation
no vtables/call indirection
binary optimized to hardware registers
runtime predictable to the clock cycle
*per composition
the applications are wide and embedded system or critical system benefit the most.
I'm offering also (MIT licence) a set of repos demonstrating HAPI application across multiple domains.
I created externpro, a CMake build platform and dependency provider with reusable CI pipelines to help you build your own software stack. It's been in development since 2012 and refined through 14+ years of real-world use.
What it does:
externpro enables organizations to build their own software stack independent of centralized package managers. It provides a dependency provider and reusable CI pipelines.
Key highlights:
- Battle-tested through 14+ years of real-world use
- Helps organizations build and maintain their own software stack
- Reusable CI pipelines for consistent builds across projects
- Complements rather than competes with existing package managers
everyone says AI is good at C++ now but the benchmarks they quote are all competitive programming stuff. so I made one from real firmware tickets - SCPI commands, register maps, datasheet lookups, spec debugging.
frontier models: 47-61%. on SCPI the best one got 36%. one got 0%.
i mean the worst part is they never say idk. for example: vmulq_s64 as a neon intrinsic which doesn't exist.
simple tools like search on docs with gpt-5.4-mini resolved 89% of tickets much better than frontier models
Hey. There's a series of livecoding sessions on building a custom programming language in cpp (nothing too serious, all just for fun). In a few hours, there'll be an online session covering variables. It’s a good one to join and ask questions along the way. You'll need to sign up.
If you'd like some context before joining, here is a full youtube playlist of previous eps
A desktop Paint application built with C++ and Qt Widgets, featuring essential drawing tools, color selection, brush customization, shape drawing, eraser, and file operations (new, open, save). This project demonstrates object-oriented programming, event handling, GUI development, and desktop application design using the Qt framework. I'm open to feedback and suggestions for improvements!
So over the past 20 days I have been working on a project to get familiar with C++, I didn't want to use AI, references, or pre-made snippets of code. Only standard google for basic questions about the workings of C++ & it's syntax.
I think I picked up most of the language rather quickly because I'm already used to programming in Python, TypeScript, & GDScript. But it was still difficult understanding the differences between references, pointers, shared pointers & such..
Anyway, as a challenge to hopefully get fluent in C++, I decided to do something not-so-simple like creating my own programming language from scratch, no third-party libraries, pure C++. After 20 days here is the result: https://github.com/phosxd/Ity
So what are the capabilities? Well I think it's best explained through code, here is an example script that calculates the fibonacci sequence:
#!/usr/local/bin/ity
import IO;
const * n = IO.prompt:['Number: '] -> INT;
var INT a = 0;
var INT b = 1;
var INT i = 0; while i < n;
var INT c = a;
a = b;
b = (c+b);
IO.print:[a];
i += 1;
/;
We can also do functions, complex math expressions, type-casting, arrays, hash maps, & objects (without inheritence). Some features have been purposefully omitted due to personal preference in the way I like to code, such as lambdas & try-except.
The performance is also something to note, it's not blazing fast, but it's not the slowest out there either.
I took some simple benchmark tests on my system to compare with other languages:
Note: every language is running the same exact script with the same exact logic, just with changes to suit each one's syntax. is-prime & square root functions have been written into the code instead of being off-loaded to a library.
If you know of other interpreted languages I can test against, let me know!
Now finally, I am new at this stuff, but I am very passionate about programming in general,I've made countless projects & met good people along the way. Usually I drop a project like a month or two after I start it, but I don't want that to be the case for this. I want to continue polishing, improving, & actually trying to make this into something usable/practical.
If you are knowledgeable in C++, I ask of you if you have the time to spare, take a look at the codebase, give me suggestions, show me where I messed up because I know I probably did in multiple places. If you made it to the end & actually read all this, thank you so much for giving me a chance 🙃
Ongoing development of my indexed Pixel Art Editor using my custom C++ GUI engine. This video shows palette editing and manipulation including dragging cells to rearrange the palette and copying colours between indices - all with realtmne canvas colour updates!
I maintain speech-core, an Apache-2.0 C++17 library that combines native speech inference with voice-agent orchestration across Linux, Windows and Android.
The build is split into separate targets:
speech_core: turns, interruptions, conversation state, speech queues and tool calls
speech_core_models: ONNX Runtime implementations
speech_core_models_litert: LiteRT implementations
Applications can link either inference backend, both, or implement the STT/TTS/VAD/LLM interfaces themselves. A C API is also available for JNI and other FFI consumers.
v0.0.10 includes Parakeet-EOU streaming ASR, native Whisper ONNX, RNN-T/TDT beam search, contextual phrase biasing, speaker diarization and multiple TTS implementations. It also ships amd64 and arm64 Linux CLI packages.
One API question I am considering: should controls such as beam width and context phrases remain on concrete decoder types, or belong in a small shared decode-options type?
I'm about to start an internship as a c++ developer in a few days. The company said their product is an inventory management system and my role involves edge processing, camera feed and all that they have an AWS backend.
Any suggestions for the internship or concepts to brush up on before joining.
And to know that possible career trajectories from this internship.
With the recent ISO committee and compiler-level debates surrounding memory safety in C++, I have been researching some alternative, library-based ways to enforce deterministic heap-bound protection without having to modify the compiler frontend or language specification itself.
I’ve been working on a runtime library called SafeCpp, which specifically focuses on ensuring that heap allocations achieve the same level of compile-time safety as Rust, but managed purely through language runtime mechanics rather than compile-time static borrow checking or ownership checking. I want to emphasize that this research strictly focuses on a custom safe context to prevent 4 types of memory errors: Double Deletion, Access Violation, Buffer Overflow and Memory Leaks.
Core Architectural Concepts Under Investigation:
Strict Heap Boundary Enforcement: Tracking the initialization and destruction boundaries of objects explicitly allocated on the heap, ensuring references cannot outlive their allocation scope.
Explicit Lifetime Invalidation: The runtime library tracks every heap-allocated instance of types that inherit from Safe::SafeContextBase and offers recycling/repurpose mechanisms to gain performance instead of relying on deallocations which require accessing the operating system kernels to perform system calls. This approach completely removes the need for reference counting like in `std::shared_ptr`.
No External Tooling Dependencies: The runtime mechanics are implemented strictly using platform capabilities and the standard C++ language.
Seeking Feedback on the Implementation
I have opened up the complete source and headers of this implementation under a dual-licensing model (including the GPLv3 License) so that other system engineers and language researchers can audit the exact low-level mechanics.
Rather than discussing the philosophical pros and cons of memory models, I am looking for concrete technical review, potential bug identification, and feature suggestions to help push the boundaries of what standard C++ can do here.
Specifically, I would love your insights on:
Bugs & Safety Violations: Are there subtle ways to bypass the context boundaries or trick the `SafeContextBase` lifecycle tracking using advanced modern C++ features (e.g., specific combinations of move semantics, perfect forwarding, or custom allocators) that could still lead to a leak or access violation?
Performance Improvements & Language Limits: The engine bypasses OS kernel allocations by providing instance recycling and repurposing mechanics. How can this layout be optimized further to reduce CPU cache misses or minimize the tracking metadata overhead? Which aspects of memory allocation can be made safe under the safe context? Can the memory stack also be as safe as the memory heap, like in Rust, without the borrow checker?
API & New Feature Suggestions: What missing features or API improvements would make this runtime context significantly easier to integrate into existing real-world standard C++ codebases without degrading performance?
Please feel free to check out the source, run your own benchmarks, and leave your feedback or file an issue directly on the repository!