oida - in process telemetry
▲ 17 r/golang

oida - in process telemetry

I was writing a status page for phpscript, and kept upgrading it to the point I wanted to make it reusable between projects, as a quick live view. It was too nice to keep it hidden away under internals.

If you want to start with observability without pulling in opentelemetry or run additional services, oida lets you collect traces and view them, monitor memory usage, GC.

The initial implementation was meant to be closer to lighthttp/nginx status page where you can see requests in flight. I spent a lot of time polishing the front end, migrated to templ, and spent too much time on timeline visualizations (discarded several other attempts - voronoi, voxels, circles, lines, and timeline). It outgrew the basic use case.

I used claude to assist with migrating/updating/extracting the package from phpscript, usage docs. I did heavy manual QA as well, polishing it for usage. Would love some adoption by solo devs or small teams, people doing local development who maybe don't have telemetry at all. If you're missing something, shout out!

Edit: here are the screenshots, to save you a click.

github.com
u/titpetric — 2 days ago
▲ 3 r/golang

RFC: Usage of go arenas · Issue #6 · titpetric/phpscript

Been mulling a little bit if it's worth me adding arena allocators into phpscript or at least consider adding them more seriously. My words above the line, some grok research below the line in context. Feel free to skip the latter parts if LLM output is not your thing, I found it more useful for the contextual summary and added missing/extra/wider thoughts above the fold.

github.com
u/titpetric — 18 days ago

Unfilled license copyright holders

I notice sometimes that the LICENSE files for Apache-2.0 and probably other OSS licenses contain a copyright holder line. Probably due to GitHub templating, these lines never get removed/updated:

> Copyright [yyyy] [name of copyright owner]

I don't really know if just filling out this data as instructed by apache themselves is all that important, say "Copyright 2015 Google LLC/Alphabet" isn't going to meaningfully change the outcome of what a license grants, the problem is I don't really know WHO granted the license if unfilled.

My question is, should we as users rely on packages with an unfilled license? Should the copyright statement be required to grant a software license, if the file itself is a template? Is the unfilled license valid for both the user and the grantor, if the grantor doesnt "sign it" so to speak?

I'd especially like a lawyers point of view rather than a "don't worry about it". Lots of oss inventory software does not think connecting a license to the grantor is important and don't seem to flag this in SBOM or other license scanners I've seen. For my uses I found about 15% of my dependencies to have the default template license of about N=650. Some of these are enterprise vendors (opentelemetry, google), and at least for otel it does not seem to be a concern.

reddit.com
u/titpetric — 1 month ago
▲ 22 r/golang

phpscript - an inter-operable PHP syntax VM written in Go (no CGO).

This project is an extensive experiment that got out of hand. It aims to provide a restricted PHP runtime to interface with Go code, as well as run more extensive PHP code like a full blown PHP template engine with eval and what not. It provides implicit context and error return handling, triggering an exception if an error occurs in the request. The exception can be caught with try/catch, or be passed into the error handler inside the go runner.

Main benefits are:

  • request lived allocations / lifecycle of php apps
  • good integration with go-native objects, methods, returns
  • some level of compatibility with stdlib-only PHP code
  • no inheritance, traits, interfaces
  • can provide an embed.FS for the php contents

The PHP runtime in this case is written in Go, pure Go, and doesn't rely on CGO to provide functionality like FrankenPHP does. The changes to .php files are immediately visible without a server restart.

It's all experimental so if you're interested in this, there may be quite a few feature gaps to maturity. That said, you could use what's implemented and extend it with your own APIs where the odd standard library function is missing. You may want to consider this a portable interpreter as well, as you could delivery it as a static binary, further reducing PHP runtime environment requirements.

I worked with the plugin standard library package extensively in the past, and I was always missing an option where the runtime would be severely restricted, and you could provide APIs in Go directly. Maybe it's the power of Go, it's way easier to build a PHP runtime than it is to get a decent SSR CMS website under type safety and similar restrictions (no globals, no shared state).

Current goals:

Optimization of the pre-execution steps, exposing a database client to the PHP code to directly write SQL queries, figuring out a routing system that takes nice URLs into account, more test coverage with the template engine. Maybe write a nice /admin dashboard without drama

github.com
u/titpetric — 2 months ago
▲ 0 r/PHP

Would you still use PHP for APIs in 2026? Web pages?

Are all these frameworks like Filament, Laravel and Symphony making you learn the framework and abandon the standard library? Do you craft your own templates or just write out HTML?

Are there any particular features from PHP syntax that you love, any recent additions or future additions you're looking forward to? What's your development stack for PHP these days? Did FrankenPHP change anything for you?

reddit.com
u/titpetric — 2 months ago
▲ 8 r/golang

Implementation contracts in Go

I tried out go generic methods with gotip 1.27. I wrote a database client library wrapping sqlx, providing CRUD, Select, Get using generic methods. Wrote down my thoughts and explanations for interface use and how it applies (or doesn't apply) to generics. Please, enjoy the read.

titpetric.com
u/titpetric — 2 months ago

Image management / docs management platform

Is someone using a platform to manage their photos archives and such? i am struggling to come up with an indexing system for 20+ years of data. The same goes for a bunch of documents for my small business and personal purchases and warranty statement scans and the like.

I don't even want to think of the folder structure, i want to index everything with geolocation, creation dates, set grouping and group manual tagging, some face detection. I want it to ingest my trash sources. My friends and I have a bunch of dogs so maybe even dog detection.

The docs part is pretty much the same, keeping various travel bookings and some business docs, I'd like to group those in some category (company, client, personal). If I can map some of those onto a calendar .ics i could get some project stats out of it, and maybe a RAG. I worked on so many things over the years, that I'd almost like to generate my own CV from all that data

immich good or are there some better options in 2026? i really hate seeing my image history as a folder, rather than a database i could prompt

reddit.com
u/titpetric — 2 months ago