Author Archives: Ben Coman

Analysing SignalR with Wireshark & Pharo

I’m trying to hook Pharo into the real-time order book feed from the Bittrex cryptocurrency exchange, which comes via the signalr protocol on top of a websocket connection. Signalr is a Microsoft ASP.NET library designed to establish “persistent connections”. To … Continue reading

Posted in Uncategorized | Leave a comment

Pharo v. Cloudflare ==> CloudflareUn

In my pursuit to connect Pharo to the realtime order book feed of the Bittrex cryptocurrency exchange there are two main challenges: It uses Microsoft’s signalr protocol. The site is guarded by Cloudflare, which requires a Javascript puzzle to be … Continue reading

Posted in Uncategorized | 1 Comment

Pharo PDF Rendering, part 2, UFFI interfacing PDFium

Following on from Part 1 where we built PDFium from source into a shared library, we will replicate in Pharo the C example presented at the end of Part 1.  Lets review the  declaration prototypes of the function used, which we’ll … Continue reading

Posted in Uncategorized | Leave a comment

Pharo PDF Rendering, part 1, building PDFium

Background For a while now I’ve been wanting to render PDFs inside Pharo.  A few external libraries existed but none had suitable licenses.  Recently I bumped into PDFium – the Foxit renderer open sourced by Google out of Chrome for … Continue reading

Posted in Uncategorized | 1 Comment

An evening with Pharo and the ESP32 microcontroller

Two popular choices for controlling maker projects are the Arduino and Raspberry Pi.The Pi is a micro-”computer” that runs Linux to operate as a low powered desktop computer.  The Arduino is a much lower powered micro-”controller” without display nor wireless … Continue reading

Posted in Pharo, Uncategorized | 1 Comment

Pharo Libclang FFI, part 5, client data and recursive visitor/callbacks

Now we make use of the client data to track the indent level.  The recursive call to clang_visitChildren() seems a bit of an anti-pattern to use with a visitor – presumably a new visitor is created each call.   However that’s … Continue reading

Posted in FFI, Pharo | Leave a comment

Pharo Libclang FFI, part 4, AST walking with visitors & callbacks

Okay, so we’ve got most of the parts ready. In the last part we managed to load the AST. Now lets do something useful with it. Traversing the tree is done uses a visitor pattern that supplies cursors to a … Continue reading

Posted in FFI, Pharo | Leave a comment

Pharo Libclang FFI, part 3, loading an AST

In the last part we learnt how to get the version string of the library.  That was good to prove it basically works, and also to develop our first C type “CXString“. Now we want to Pharo to process some … Continue reading

Posted in FFI, Pharo | Leave a comment

Pharo Libclang FFI, part 2, simple callout string return

This is my first exposure to using Pharo’s FFI, so before diving in to process some AST, lets try something simpler to gain familiarity with the library.  Something real simple… no parameters and just returning a string. The function clang_getClangVersion() seems to … Continue reading

Posted in FFI, Pharo | Leave a comment

Pharo Libclang FFI, part 1, preamble

Table of contents Part 1 – Preamble Part 2 – Simple call out, string return Part 3 – Loading an AST Part 4 – AST walking with visitors and callbacks Part 5 – Client data and recursive visitor/callbacks Background I … Continue reading

Posted in FFI, Pharo | Leave a comment