Hi everyone, I'd like to share some of the projects I've been working on, and especially two that reached v1 this summer :) Perl-Compatible Regular Expressions Link: https://github.com/Gabriel-Darbord/pharo-pcre2 This project provides comprehensive FFI bindings to the PCRE2<https://github.com/PCRE2Project/pcre2> library. You may remember my quick talk at "Show Us Your Project" if you were at ESUG'26. To summarize: I felt dissatisfied with regular expressions as they currently work in Pharo, especially because they have their own syntax. The most infuriating feature to me is that the colon `:` is a special character, which is also ubiquitous when working with Pharo because it's part of the message keyword syntax! For the story, up to Pharo 12, most search features including method search (cmd/ctrl+F when selecting methods in the browser) used regex implicitly. If you searched for a keyword selector and used a colon, the list included all methods because that was the default behavior when the pattern failed. You had to escape the colon character with a backslash, something you'd only know if you were familiar with Pharo's regex. Now in the "age of LLMs", I wanted to provide regex search capabilities to agents, but I noticed they kept making wrong patterns because they weren't familiar with Pharo's particular syntax. I had already started this project a couple of years ago, and thanks to agents I was able to quickly finish the binding coverage (I'm not saying the project is finished!). We're now using it as part of our Pharo MCP<https://github.com/Evref-BL/MCP>, also presented at ESUG (quick plug :P). Enough rambling, the README and docs can tell you more if you're interested. Just one last thing worth mentioning: if you know a bit about FFI, you probably know that external memory is freed when the image is shut down. I didn't want the PCRE2 objects to become unusable between sessions, so I added a "session manager" that restores the relevant objects automatically. That means PCRE2 objects based on external memory can be used like regular Pharo objects without having to care about the image lifecycle, which is something we take for granted but it's actually a bit special :) OpenTelemetry Link: https://github.com/Gabriel-Darbord/opentelemetry-pharo This project provides extensive coverage of the OpenTelemetry<https://opentelemetry.io/> specification (v1.58.0). Don't worry, I don't have as much to say about this one: if you're interested in observability, it should speak for itself. However, I'm still going to ramble a bit about how this came to be. This started a couple of years ago (a bit earlier than PCRE2), and it was simply a wrapper over instrumentation libraries: MetaLink<https://github.com/pharo-project/pharo/blob/Pharo14/src/Reflectivity/MetaLin...>, and later, MethodProxies<https://github.com/pharo-contributions/MethodProxies>. I only used it to capture method receivers, arguments, and results in traces in order to generate regression tests, so it was pretty bare-bones. A few people reached out and I saw there was demand for telemetry capabilities in Pharo, but I simply didn't have the time to invest in this library, which was really just a shim to achieve my test generation goals. Now that I'm free of those goals, and thanks to agents, I found the time and manbotpower to get this done to a degree I find satisfactory. I've only mentioned instrumentation, which is used to run arbitrary code on method edges (before or after), without having to modify the targeted methods. This library also supports manual instrumentation<https://opentelemetry.io/docs/specs/otel/glossary/#manual-instrumentation>: you can modify your methods anywhere in their body to code against the OpenTelemetry API and generate telemetry data. — I'm also taking this opportunity to share some unstable projects (as in still in alpha) that may also be of interest. Replay Link: https://github.com/Gabriel-Darbord/Replay About: Replay user actions in a Pharo image. I started this to help a friend who wanted to run an experiment and needed a guided walkthrough of their program to teach users. You can build/record scenarios that open and close windows, annotate a part of their interface, click, type, navigate, use shortcuts, etc. Scenarios can be made into macros and bound to a shortcut of your choosing. This is the project I used to showcase PCRE2 during "Show Us Your Project", if you were wondering how that was done :) For the story (because I can't help myself from rambling), I had some ambitions to make this into a GUI-testing framework, but then news about Hera<https://github.com/koendehondt/hera-for-pharo> dropped so I stopped working on this side project, until recently with agents and you know the rest... (note: Replay is not a GUI-testing framework!) Pharo-Image-FS Link: https://github.com/Evref-BL/pharo-image-fs About: Mount a live Pharo image as a local filesystem. Note: macOS only for now. Agents have been a recurring theme in my projects presented so far, and that's because I've been using them extensively since April. I found that some of the main things to watch with agents are code quality, i.e. writing maintainable code, and efficiency, i.e. using as few tokens as possible to achieve a task. I'm taking this opportunity to plug this presentation I gave to the Evref team in July: Using Pharo with LLMs: Retrospective of a 3-month journey<https://www.slideshare.net/slideshow/using-pharo-with-llms-retrospective-of-...>. I've mainly been using our MCP, and for the quality aspect: - The MCP proposes an AGENTS.md<https://github.com/Evref-BL/MCP/blob/main/templates/AGENTS.md> file that references Pharo coding rules<https://github.com/Evref-BL/MCP/blob/main/docs/user/pharo-coding-rules.md> and styles<https://github.com/Evref-BL/MCP/blob/main/docs/user/pharo-coding-style.md> based on literature<https://github.com/Evref-BL/MCP/blob/main/docs/dev/pharo-guidance-bibliograp...>. - We take advantage of the critique system, plus custom critiques, to give feedback to agents after each method modification. Regarding the efficiency aspect, the increasing cost of agents is making MCP-based workflows more and more expensive to use, compared to the basic filesystem and CLI-based tools that come with most coding agents by default. Agents are used to these tools and can use them without making mistakes about their schemas. Thus, I wanted a way to let agents code live in Pharo with those tools, which means making them work with files. After some research, I found FUSE<https://en.wikipedia.org/wiki/Filesystem_in_Userspace> (Filesystem in Userpace) that seems to be one of the most appropriate ways to achieve this, compared to others such as WebDAV or NFS. FUSE lets us create a filesystem projection with a backend in a Pharo image. The mounted filesystem includes: - `tonel/`: the whole image is projected in Tonel format. It lazily exports Tonel only for accessed classes, and accepts writes only when they compile. - `critiques/`: read-only directory populated by critiques generated during edits. - `repositories/`: read-only directory containing metadata and symlinks to repositories loaded in the image. - `errors/`: read-only directory with error logs of filesystem operations, e.g. explaining why a write failed. It's working well for me so far: it allows agents to read and write quickly, and use the tools they are used to, such as `find` and `rg`. It also pairs well with the MCP, which proposes IDE tools to run tests, resolve symbols (finding senders/implementors/references), load projects, debug, etc. — Thanks for your attention! If any of these projects are useful to you, I’d be happy to hear your feedback or welcome contributions :) Cheers, Gabriel Darbord
participants (1)
-
DARBORD Gabriel