Integral structs in GNU poke
[20-07-2020]

by Jose E. Marchesi

This weekend I finally implemented support for the so-called "integral structs" in poke. This expands the expressivity power of Poke structs to cover cases where data is stored in composited integral containers, i.e. when data is structured within stored integers.

Full text...

Writing binary utilities with GNU poke
[16-07-2020]

by Jose E. Marchesi

GNU poke is, first and foremost, intended to be used as an interactive editor, either directly on the command line or using a graphical user interface built on it. However, since its conception poke was intended to provide a suitable and useful foundation on which other programs, the so-called binary utilities, could be written. At last, the development of poke has progressed to a point where we can start writing such utilities, and the purpose of this article is to show a small, albeit working and useful example of what can be achieved by writing a few lines of Poke.

Full text...

Understanding Poke methods
[04-05-2020]

by Jose E. Marchesi

Poke struct types can be a bit daunting at first sight. You can find all sort of things inside them: from fields, variables and functions to constraint expressions, initialization expressions, labels, other type definitions, and methods.

Struct methods can be particularly confusing for the novice poker. In particular, it is important to understand the difference between methods and regular functions defined inside struct types. This article will hopefully clear the confusion, and also will provide the reader with a better understanding on how poke works internally.

Full text...

Multi-line output in poke pretty-printers
[03-05-2020]

by Jose E. Marchesi

The ID3V1 tag format describes the format for the tags that are embeded in MP3 files, giving information about the song stored in the file, such as genre, the name of the artist, and so on. While hacking the id3v1 pickle today, I found a little dilemma on how to best present a pretty-printed version of a tag to the user.

Full text...

Interruptible poke
[02-03-2020]

by Jose E. Marchesi

Poke has loops. It also does IO (yeah, right :D). On one hand, this means that Poke programs that never finish are definitely possible (here is one: while (1) {}) and, on the other, a Poke program acting on an enormous amount of data may take a long time to finish, depending on what it does. Maybe hours, maybe even days?

Full text...

Hyperlink Support in GNU Poke
[02-02-2020]

by Darshit Shah

FOSDEM 2020 is over, and hyperlink support has just landed for GNU Poke!

Wait, Hyperlinks!?

What do hyperlinks, a web concept, mean for GNU Poke, a terminal application?

For many years now, terminal emulators have been detecting http:// URLs in the output of any program and giving the user a chance to click on them and immediately navigate to the corresponding web page. In 2017, Egmont Kob made a proposal for supporting general hyperlinks in terminal emulators. Gnome Terminal, iTerm and a few other terminal emulators have already implemented this proposal in their latest releases. With Egmont's proposal, an application can emit any valid URI and have the terminal emulator take the user to that resource.

Full text...

First Poke-Conf at Mont-Soleil - A report
[13-01-2020]

by Jose E. Marchesi

pokists in Mont-Soleil
Poking at Mont-Soleil

This last weekend we had the first gathering of poke developers, as part of the GNU Hackers Meeting at Mont-Soleil, in Switzerland. I can say we had a lot of fun, and it was a quite productive meeting too: many patches were written, and many technical aspects designed and clarified.

Full text...

Endianness in Poke - And a little nice hack
[25-10-2019]

by Jose E. Marchesi

Byte endianness is an important aspect of encoding data. As a good binary editor poke provides support for both little and big endian, and will soon acquire the ability to encode exotic endianness like PDP endian. Endianness control is integrated in the Poke language, and is designed to be easily used in type descriptions. Let's see how.

Full text...

Styled output in Poke programs
[21-10-2019]

by Jose E. Marchesi

I just committed support for styling in printf. Basically, it uses the libtextstyle approach of having styling classes that the user can customize in a .css file.

Full text...

Dealing with alternatives - Unions in Poke
[18-10-2019]

by Jose E. Marchesi

The Poke type definitions can be seen as a sort of declarative specifications for decoding and encoding procedures. You specify the structure of the data you want to operate on, and poke uses that information to automatically decode and encode the data for you. Under this perspective, struct types correspond to sequences of instructions, array types to repetitions (or loops), and union types to conditionals.

Full text...

Values of the world, unite! - Offsets in Poke
[06-10-2019]

by Jose E. Marchesi

Early in the design of what is becoming GNU poke I was struck by a problem that, to my surprise, would prove not easy to overcome in a satisfactory way: would I make a byte-oriented program, or a bit-oriented program? Considering that the program in question was nothing less than an editor for binary data, this was no petty dilemma.

Full text...

Array boundaries and closures in Poke
[03-10-2019]

by Jose E. Marchesi

Poke arrays are rather peculiar. One of their seemingly bizarre characteristics is the fact that the expressions calculating their boundaries (when they are bounded) evaluate in their own lexical environment, which is captured. In other words: the expressions denoting the boundaries of Poke arrays conform closures. Also, the way they evaluate may be surprising. This is no capricious.

Full text...

Nomenclature: poke, Poke and pickles
[01-10-2019]

by Jose E. Marchesi

GNU poke is a pretty new program and it introduces many a new concept. As people are starting to join the development, I think it is a good idea to clarify how I call things. The idea is for everyone to use the same nomenclature when referring to pokeish thingies. Otherwise its gonna get very confusing very soon!

Full text...