jemarch.net - Homepage of Jose E. Marchesi

GNU poke GNU recutils GNU ferret Algorithmic Languages | Algol 68 Jargon (pdf) (sources) bugz-mode | a68-mode
RSS feeds provided by this site: gnuplanet.xml Entries about Free Software and the GNU Project. pokology.xml Entries about GNU poke. feed.xml Everything published in this site. [12-10-2024] bugz-mode and a68-mode now in sourcehut ==================================================== by Jose E. Marchesi I have decided to start using sourcehut for a few of my projects. The first projects landing there are bugz-mode and a68-mode, two Emacs modes. The first implements a quite efficient and comfortable interface to bugzilla. The second is a programming mode for Algol 68. Let's see how it goes! https://git.sr.ht/~jemarch [28-01-2023] Interesting poke idiom: sparse tables ================================================== by Jose E. Marchesi During tonight poke online office hours our friend hdzki came with an interesting use case. He is poking at some binary structures that are like sparse tables whose entries are distributed in the file in an arbitrary way. Each sparse table is characterized by an array of consecutive non-NULL pointers. Each pointer points to an entry in the table. The table entries can be anywhere in the IO space, and are not necessarily consecutive, nor be in order. Full text... [02-03-2021] Padding and aligning data in GNU poke ================================================== by Jose E. Marchesi It is often the case in binary formats that certain elements are separated by some data that is not really used for any meaningful purpose other than occupy that space. The reason for keeping that space varies from case to case; sometimes to reserve it for future use, sometimes to make sure that the following data is aligned to some particular alignment. This is known as "padding". There are several ways to implement padding in GNU poke. This article shows these techniques and discusses their advantages and disadvantages. Full text... [01-03-2021] Learning the Poke language in Y minutes ==================================================== by Jose E. Marchesi Mohammad-Reza Nabipoor has written a nice short tutorial called "Learn the Poke Language in Y minutes". The tutorial has the form of a Poke program itself, and I think it really highlights the most uncommon (and useful!) features of our domain-specific language. Full text... [24-02-2021] Using maps in GNU poke =================================== by Jose E. Marchesi Editing data with GNU poke mainly involves creating mapped values and storing them in Poke variables. However, this may not be that convenient when poking several files simultaneously, and when the complexity of the data increases. poke provides a convenient mechanism for this: maps and map files. Full text... [15-11-2020] GNU poke development news ====================================== by Jose E. Marchesi The development of GNU poke is progressing well, and we keep hopes for a first release before the end of the year: we are determined for something good to happen in 2020! ;) This article briefly reviews the latest news in the development of the program, like changes in certain syntax to make the language more compact, support for lambda expressions, support for stream-like IO spaces and how they can be used to write filters, support for using assignments to poke complex data structures, improvements in data integrity, annoying bugs fixed, and more. Full text... [20-07-2020] Integral structs in GNU poke ========================================= 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... [16-07-2020] Writing binary utilities with GNU poke =================================================== 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... [04-05-2020] Understanding Poke methods ======================================= 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... [03-05-2020] Multi-line output in poke pretty-printers ====================================================== 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... [02-03-2020] Interruptible poke =============================== 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... [02-02-2020] Hyperlink Support in GNU Poke ========================================== 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 (https://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3cb5feda) 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... [13-01-2020] First Poke-Conf at Mont-Soleil - A report ====================================================== 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... [25-10-2019] Endianness in Poke - And a little nice hack ======================================================== 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... [21-10-2019] Styled output in Poke programs =========================================== 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... [18-10-2019] Dealing with alternatives - Unions in Poke ======================================================= 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... [06-10-2019] Values of the world, unite! - Offsets in Poke ========================================================== 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... [03-10-2019] Array boundaries and closures in Poke ================================================== 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... [01-10-2019] Nomenclature: poke, Poke and pickles ================================================= 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...