# Wilfred Hughes

programming, language design, and human factors

This is one page of public article previews, not the complete archive. Follow Next page to continue. Summaries are not the original full articles.

## Difftastic, the Fantastic Diff

DevFeed: [Difftastic, the Fantastic Diff](<https://devfeed.tech/articles/difftastic-the-fantastic-diff-55198.md>)

Original publisher: [Read original article](<https://www.wilfred.me.uk/blog/2022/09/06/difftastic-the-fantastic-diff/>)

Author: Wilfred Hughes

Published: 2022-09-06T00:00:00Z

Content type: article

Language: en

Sources: [Wilfred Hughes](<https://devfeed.tech/sources/wilfred-hughes.md>)

Topics: [Parsing](<https://devfeed.tech/topics/parsing.md>), [Tree-sitter](<https://devfeed.tech/topics/tree-sitter.md>), [Programming](<https://devfeed.tech/topics/programming.md>), [Parser](<https://devfeed.tech/topics/parser.md>), [Code](<https://devfeed.tech/topics/code.md>), [JavaScript](<https://devfeed.tech/topics/javascript.md>), [JSON](<https://devfeed.tech/topics/json.md>), [Emacs](<https://devfeed.tech/topics/emacs.md>), [C](<https://devfeed.tech/topics/c.md>), [C++](<https://devfeed.tech/topics/c-plus-plus.md>)

Tags: [c](<https://devfeed.tech/tags/c.md>), [c-plus-plus](<https://devfeed.tech/tags/c-plus-plus.md>), [code](<https://devfeed.tech/tags/code.md>), [emacs](<https://devfeed.tech/tags/emacs.md>), [javascript](<https://devfeed.tech/tags/javascript.md>), [json](<https://devfeed.tech/tags/json.md>), [parsing](<https://devfeed.tech/tags/parsing.md>), [programming](<https://devfeed.tech/tags/programming.md>)

### AI overview

An account of building difftastic, a structural diff tool for programming languages. It explains parsing programs with tree-sitter, converting parse trees into uniform s-expressions, and calculating diffs as shortest paths through directed acyclic graphs.

### Source excerpt

I've always wanted a structural diff tool, so I built difftastic. This has been the most fascinating, most frustrating, and most challenging program I've ever written. How Hard Could It Be? If you write Lisp code for a while, you start to see code like JSON. Everything is basically a list. json-diff example json-diff already exists, and it's pretty good. I wanted something similar for programming languages. After a huge amount of experimentation, I have something that works. In this post, I'll show you how it works. I won't show the many, many dead ends and failed designs along the way. We can pretend that I got it right first time. Parsing The Code If I want to compare two programs, I first need a parse tree for each program. I need an accurate lexer, a basic parser, and I need to preserve comments. tree-sitter was a great fit here. You define a grammar in JSON or JS, and it generates a C library that anyone can use. It's not 100% accurate (e.g. the C++ parser doesn't have preprocessor data) but it's more than good enough. list: ($) => seq("(", repeat($._sexp), ")"), vector: ($) => seq("[", repeat($._sexp), "]"), Here's an excerpt from my Emacs Lisp grammar. There's a ton of tree-sitter parsers available too. Difftastic now supports 44 different syntaxes, and adding new ones is so straightforward that my manual includes a worked example. Using difftastic with Emacs Lisp After parsing, difftastic converts the tree-sitter parse tree to an s-expression. Everything is a list or an atom. This uniform representation enables the diffing logic to work on any language that I can parse. For example, given a JavaScript program like this: foo(1, 2) tree-sitter parses it to this parse tree: expression_statement call_expression identifier "foo" arguments ( number "1" , number "2" ) difftastic then converts the tree to this s-expression representation: List { open_content: "", children: [ Atom "foo", List { open_content: "(", children: [ Atom "1", Atom ",", Atom "2", ], close_con

## Difftastic, the Fantastic Diff

DevFeed: [Difftastic, the Fantastic Diff](<https://devfeed.tech/articles/difftastic-the-fantastic-diff-22024.md>)

Original publisher: [Read original article](<http://www.wilfred.me.uk/blog/2022/09/06/difftastic-the-fantastic-diff/>)

Author: Wilfred Hughes

Published: 2022-09-06T00:00:00Z

Content type: article

Language: en

Sources: [Wilfred Hughes](<https://devfeed.tech/sources/wilfred-hughes.md>)

Topics: [Tool](<https://devfeed.tech/topics/tool.md>), [Programming](<https://devfeed.tech/topics/programming.md>), [Tree-sitter](<https://devfeed.tech/topics/tree-sitter.md>), [Concrete syntax tree](<https://devfeed.tech/topics/cst.md>), [JavaScript](<https://devfeed.tech/topics/javascript.md>), [JSON](<https://devfeed.tech/topics/json.md>)

Tags: [added](<https://devfeed.tech/tags/added.md>), [algorithm](<https://devfeed.tech/tags/algorithm.md>), [algorithms](<https://devfeed.tech/tags/algorithms.md>), [atom](<https://devfeed.tech/tags/atom.md>), [basic](<https://devfeed.tech/tags/basic.md>), [c](<https://devfeed.tech/tags/c.md>), [c-plus-plus](<https://devfeed.tech/tags/c-plus-plus.md>), [emacs](<https://devfeed.tech/tags/emacs.md>), [emacs-lisp](<https://devfeed.tech/tags/emacs-lisp.md>), [fantastic](<https://devfeed.tech/tags/fantastic.md>), [javascript](<https://devfeed.tech/tags/javascript.md>), [js](<https://devfeed.tech/tags/js.md>), [json](<https://devfeed.tech/tags/json.md>), [lexer](<https://devfeed.tech/tags/lexer.md>), [lisp](<https://devfeed.tech/tags/lisp.md>), [list](<https://devfeed.tech/tags/list.md>), [parsing](<https://devfeed.tech/tags/parsing.md>), [program](<https://devfeed.tech/tags/program.md>), [programming](<https://devfeed.tech/tags/programming.md>), [programming-languages](<https://devfeed.tech/tags/programming-languages.md>)

### AI overview

Difftastic creates structural diffs by parsing code with tree-sitter, converting parse trees into a common s-expression form, then finding matches through a shortest-path search that favors unchanged nodes. It supports 44 syntaxes and can integrate with Git or Mercurial. Because the search graph grows quadratically, it trims unchanged regions and constructs vertices lazily; very large cases may still be slow and fall back to a line-oriented diff. To handle nested delimiters, it limits the graph to at most two vertices per position pair, which guarantees a route but not always the shortest one. Its two-column display aligns matched lines while ignoring whitespace. The author notes challenges with large string changes and cases where a minimal diff is not the most useful.

### Source excerpt

I've always wanted a structural diff tool, so I built difftastic. This has been the most fascinating, most frustrating, and most challenging program I've ever written. How Hard Could It Be? If you write Lisp code for a while, you start to see code like JSON. Everything is basically a list. json-diff example json-diff already exists, and it's pretty good. I wanted something similar for programming languages. After a huge amount of experimentation, I have something that works. In this post, I'll show you how it works. I won't show the many, many dead ends and failed designs along the way. We can pretend that I got it right first time. Parsing The Code If I want to compare two programs, I first need a parse tree for each program. I need an accurate lexer, a basic parser, and I need to preserve comments. tree-sitter was a great fit here. You define a grammar in JSON or JS, and it generates a C library that anyone can use. It's not 100% accurate (e.g. the C++ parser doesn't have preprocessor data) but it's more than good enough. list: ($) => seq("(", repeat($._sexp), ")"), vector: ($) => seq("[", repeat($._sexp), "]"), Here's an excerpt from my Emacs Lisp grammar. There's a ton of tree-sitter parsers available too. Difftastic now supports 44 different syntaxes, and adding new ones is so straightforward that my manual includes a worked example. Using difftastic with Emacs Lisp After parsing, difftastic converts the tree-sitter parse tree to an s-expression. Everything is a list or an atom. This uniform representation enables the diffing logic to work on any language that I can parse. For example, given a JavaScript program like this: foo(1, 2) tree-sitter parses it to this parse tree: expression_statement call_expression identifier "foo" arguments ( number "1" , number "2" ) difftastic then converts the tree to this s-expression representation: List { open_content: "", children: [ Atom "foo", List { open_content: "(", children: [ Atom "1", Atom ",", Atom "2", ], close_con

## Why Small Programming Languages Can Encourage Implementations Instead of Use

DevFeed: [Why Small Programming Languages Can Encourage Implementations Instead of Use](<https://devfeed.tech/articles/the-siren-song-of-little-languages-55197.md>)

Original publisher: [Read original article](<https://www.wilfred.me.uk/blog/2019/03/24/the-siren-song-of-little-languages/>)

Author: Wilfred Hughes

Published: 2019-03-24T00:00:00Z

Content type: opinion

Language: en

Sources: [Wilfred Hughes](<https://devfeed.tech/sources/wilfred-hughes.md>)

Topics: [Programming](<https://devfeed.tech/topics/programming.md>), [implementation](<https://devfeed.tech/topics/implementation.md>), [systems](<https://devfeed.tech/topics/systems.md>), [Lisp](<https://devfeed.tech/topics/lisp.md>), [scheme](<https://devfeed.tech/topics/scheme.md>), [Clojure](<https://devfeed.tech/topics/clojure.md>), [Racket](<https://devfeed.tech/topics/racket.md>), [toolchain](<https://devfeed.tech/topics/toolchain.md>)

Tags: [clojure](<https://devfeed.tech/tags/clojure.md>), [code](<https://devfeed.tech/tags/code.md>), [compiler](<https://devfeed.tech/tags/compiler.md>), [functions](<https://devfeed.tech/tags/functions.md>), [languages](<https://devfeed.tech/tags/languages.md>), [lisp](<https://devfeed.tech/tags/lisp.md>), [programming](<https://devfeed.tech/tags/programming.md>), [programming-languages](<https://devfeed.tech/tags/programming-languages.md>), [racket](<https://devfeed.tech/tags/racket.md>), [scheme](<https://devfeed.tech/tags/scheme.md>)

### AI overview

The article argues that very small, elegant programming languages can attract developers who build interpreters and compilers instead of using the language. It discusses Scheme, Shen, Forth, Clojure, and Racket, and suggests that languages need enough size and usability to develop a community of users before multiple implementations become valuable.

### Source excerpt

Some programming languages languish due to obscurity. They lack breathless blog posts exclaiming how much nicer they are to use. Other languages are too ambitious. They aspire to support so many features that the original implementers struggle to get a first version working. For example, the type system in Fortress required constraint solving which took exponential time. Sometimes a usable language struggles simply because it's too much fun to write your own. Developers end up building their own implementation rather than actually using the language. The most obvious implementation-focused language is BF. Despite having many implementations, BF programmers have to encourage the implementers to actually try using the language! Scheme is also susceptible to this. Wikipedia lists 31 different Scheme implementations, not to mention the many toy implementations. Writing a Scheme is a great introduction to interpreters, especially once you get beyond the minimal lisp featureset. I've certainly written more implementation code than Scheme code. The problem seems to be languages with a small, well written specification. Shen is a multiparadigm lisp defined in terms of an elegant base language with only 46 system functions. This has resulted in a remarkable 15 third-party implementations, but only a small number of libraries implemented in the language. This phenomenon is not limited to lisps. Forth is also a language that developers often prefer to implement rather than use. Jones Forth is both a Forth tutorial and a discussion of how to build a Forth compiler. There are even stories of people spending years working on implementations without learning much of the language. Designing a language with a straightforward implementation is not a bad thing. It's just a pitfall that language designers need to be aware of. Some crypto systems have this problem too. It seems that we need languages to be big enough that new users write hello world in the language, not write a tool for

## The Siren Song of Little Languages

DevFeed: [The Siren Song of Little Languages](<https://devfeed.tech/articles/the-siren-song-of-little-languages-22023.md>)

Original publisher: [Read original article](<http://www.wilfred.me.uk/blog/2019/03/24/the-siren-song-of-little-languages/>)

Author: Wilfred Hughes

Published: 2019-03-24T00:00:00Z

Content type: opinion

Language: en

Sources: [Wilfred Hughes](<https://devfeed.tech/sources/wilfred-hughes.md>)

Topics: [Programming Languages / Compilers](<https://devfeed.tech/topics/programming-languages-compilers.md>), [scheme](<https://devfeed.tech/topics/scheme.md>), [Racket](<https://devfeed.tech/topics/racket.md>)

Tags: [implementation](<https://devfeed.tech/tags/implementation.md>), [languages](<https://devfeed.tech/tags/languages.md>), [lisp](<https://devfeed.tech/tags/lisp.md>), [programming-languages](<https://devfeed.tech/tags/programming-languages.md>), [scheme](<https://devfeed.tech/tags/scheme.md>), [users](<https://devfeed.tech/tags/users.md>)

### AI overview

A language can be so easy and enjoyable to implement that developers build interpreters instead of using it. The article points to BF, Scheme and Shen (with 15 third-party implementations but few libraries written in Shen), and Forth; it contrasts this with overly ambitious designs such as Fortress, whose type-system constraint solving took exponential time. Straightforward implementation is valuable, but a small, elegant specification can create a user-adoption pitfall. The author suggests a language needs enough substance for newcomers to use a canonical implementation; multiple implementations become useful when an established user community needs different qualities. Clojure and Racket are cited as having reached that threshold.

### Source excerpt

Some programming languages languish due to obscurity. They lack breathless blog posts exclaiming how much nicer they are to use. Other languages are too ambitious. They aspire to support so many features that the original implementers struggle to get a first version working. For example, the type system in Fortress required constraint solving which took exponential time. Sometimes a usable language struggles simply because it's too much fun to write your own. Developers end up building their own implementation rather than actually using the language. The most obvious implementation-focused language is BF. Despite having many implementations, BF programmers have to encourage the implementers to actually try using the language! Scheme is also susceptible to this. Wikipedia lists 31 different Scheme implementations, not to mention the many toy implementations. Writing a Scheme is a great introduction to interpreters, especially once you get beyond the minimal lisp featureset. I've certainly written more implementation code than Scheme code. The problem seems to be languages with a small, well written specification. Shen is a multiparadigm lisp defined in terms of an elegant base language with only 46 system functions. This has resulted in a remarkable 15 third-party implementations, but only a small number of libraries implemented in the language. This phenomenon is not limited to lisps. Forth is also a language that developers often prefer to implement rather than use. Jones Forth is both a Forth tutorial and a discussion of how to build a Forth compiler. There are even stories of people spending years working on implementations without learning much of the language. Designing a language with a straightforward implementation is not a bad thing. It's just a pitfall that language designers need to be aware of. Some crypto systems have this problem too. It seems that we need languages to be big enough that new users write hello world in the language, not write a tool for

## How High Are Your Tests?

DevFeed: [How High Are Your Tests?](<https://devfeed.tech/articles/how-high-are-your-tests-22022.md>)

Original publisher: [Read original article](<http://www.wilfred.me.uk/blog/2019/03/04/how-high-are-your-tests/>)

Author: Wilfred Hughes

Published: 2019-03-04T00:00:00Z

Content type: article

Language: en

Sources: [Wilfred Hughes](<https://devfeed.tech/sources/wilfred-hughes.md>)

Topics: [Software Testing](<https://devfeed.tech/topics/software-testing.md>), [Integration testing](<https://devfeed.tech/topics/integration-testing.md>), [Unit testing](<https://devfeed.tech/topics/unit-testing.md>), [Smoke Tests](<https://devfeed.tech/topics/smoke-tests.md>)

Tags: [integration-test](<https://devfeed.tech/tags/integration-test.md>), [testing](<https://devfeed.tech/tags/testing.md>), [tests](<https://devfeed.tech/tags/tests.md>), [unit-test](<https://devfeed.tech/tags/unit-test.md>), [unit-tests](<https://devfeed.tech/tags/unit-tests.md>)

### AI overview

The article proposes describing tests by "height" on a 0-100 scale instead of forcing them into discrete unit and integration categories. Low-height tests isolate code and check runtime values in one process; higher examples add a scratch database, then an HTTP server and browser, and finally system infrastructure. As height rises, tests exercise more realistic paths and can increase confidence, but they also become slower, harder to maintain and debug, and more prone to flakiness. The scale is contextual rather than a fixed classification: setup, dependencies, protocols, and teardown affect a test's height, while labels such as "unit," "integration," "quick," and "slow" may reflect tooling or convenience. The excerpt suggests a few high-level sanity checks, such as confirming that a full server's homepage loads.

### Source excerpt

How big can a unit test be? How small can an integration test be? It's easy to argue about whether a test is a 'true' unit test or not. If we test several classes together, is it still a unit test? If we use a small external API, must we call it an integration test? The problem is that testing is a spectrum, but our terminology only allows discrete levels. Putting A Number On It I propose we treat testing as a numerical scale instead. Let's introduce a concept of test height, from 0 to 100. At 0, we have low-level, isolated unit tests. They run quickly, they run in process, and they're extremely reliable. No setup or teardown is required. At 100, we have high-level tests of full computer systems. We spin up an elaborate infrastructure of databases, external services, and exercise real protocols. Many processes run, runtime can be very variable, and flakiness is a continuing challenge. Let's look at some examples! We'll look at some code for a wiki website, and discuss different tests we could write. 20: An Isolated Test At the lowest level, we have code that only depends on its inputs. def slugify(value): if not value: return value # we don't want /, # or ? in our URL value = value.replace('/', '') .replace('#', '') .replace('?', '') # replace whitespace with underscores return re.sub('[-\\s]+', '_', value) We can easily write a small unit test for a function like this. There are no dependencies on external resources, or even external libraries. def test_slugify(): assert slugify('foo/bar baz?') == 'foobar_baz' This test only requires a single process, and our test assertion is simply looking at runtime values. 40: Running With A Scratch Database Our wiki stores its data in a database. Let's look at some view code that ultimately creates database rows. def create_user(request): if request.POST: form = UserForm(request.POST) if form.is_valid(): form.save() return HttpResponseRedirect(reverse('all_users')) else: form = UserForm() template_vars = {'form': form} return

## How High Are Your Tests?

DevFeed: [How High Are Your Tests?](<https://devfeed.tech/articles/how-high-are-your-tests-55196.md>)

Original publisher: [Read original article](<https://www.wilfred.me.uk/blog/2019/03/04/how-high-are-your-tests/>)

Author: Wilfred Hughes

Published: 2019-03-04T00:00:00Z

Content type: article

Language: en

Sources: [Wilfred Hughes](<https://devfeed.tech/sources/wilfred-hughes.md>)

Topics: [Software Testing](<https://devfeed.tech/topics/software-testing.md>), [Unit testing](<https://devfeed.tech/topics/unit-testing.md>), [Database](<https://devfeed.tech/topics/database.md>), [Web app](<https://devfeed.tech/topics/webapp.md>), [HTTP](<https://devfeed.tech/topics/http.md>)

Tags: [code](<https://devfeed.tech/tags/code.md>), [database](<https://devfeed.tech/tags/database.md>), [infrastructure](<https://devfeed.tech/tags/infrastructure.md>), [protocols](<https://devfeed.tech/tags/protocols.md>), [testing](<https://devfeed.tech/tags/testing.md>), [tests](<https://devfeed.tech/tags/tests.md>), [unit-tests](<https://devfeed.tech/tags/unit-tests.md>)

### AI overview

An article proposes treating tests as a numerical spectrum from 0 to 100 rather than using only discrete unit and integration-test categories. It compares isolated tests, tests using a scratch database, and full protocol tests involving web servers and browsers, highlighting differences in dependencies, speed, maintenance, and reliability.

### Source excerpt

How big can a unit test be? How small can an integration test be? It's easy to argue about whether a test is a 'true' unit test or not. If we test several classes together, is it still a unit test? If we use a small external API, must we call it an integration test? The problem is that testing is a spectrum, but our terminology only allows discrete levels. Putting A Number On It I propose we treat testing as a numerical scale instead. Let's introduce a concept of test height, from 0 to 100. At 0, we have low-level, isolated unit tests. They run quickly, they run in process, and they're extremely reliable. No setup or teardown is required. At 100, we have high-level tests of full computer systems. We spin up an elaborate infrastructure of databases, external services, and exercise real protocols. Many processes run, runtime can be very variable, and flakiness is a continuing challenge. Let's look at some examples! We'll look at some code for a wiki website, and discuss different tests we could write. 20: An Isolated Test At the lowest level, we have code that only depends on its inputs. def slugify(value): if not value: return value # we don't want /, # or ? in our URL value = value.replace('/', '') .replace('#', '') .replace('?', '') # replace whitespace with underscores return re.sub('[-\\s]+', '_', value) We can easily write a small unit test for a function like this. There are no dependencies on external resources, or even external libraries. def test_slugify(): assert slugify('foo/bar baz?') == 'foobar_baz' This test only requires a single process, and our test assertion is simply looking at runtime values. 40: Running With A Scratch Database Our wiki stores its data in a database. Let's look at some view code that ultimately creates database rows. def create_user(request): if request.POST: form = UserForm(request.POST) if form.is_valid(): form.save() return HttpResponseRedirect(reverse('all_users')) else: form = UserForm() template_vars = {'form': form} return

## Helpful: One Year On

DevFeed: [Helpful: One Year On](<https://devfeed.tech/articles/helpful-one-year-on-22021.md>)

Original publisher: [Read original article](<http://www.wilfred.me.uk/blog/2018/06/22/helpful-one-year-on/>)

Author: Wilfred Hughes

Published: 2018-06-22T00:00:00Z

Content type: release

Language: en

Sources: [Wilfred Hughes](<https://devfeed.tech/sources/wilfred-hughes.md>)

Topics: [Emacs](<https://devfeed.tech/topics/emacs.md>), [Tool](<https://devfeed.tech/topics/tool.md>), [Developer Tools](<https://devfeed.tech/topics/developer-tools.md>)

Tags: [aliases](<https://devfeed.tech/tags/aliases.md>), [built-in](<https://devfeed.tech/tags/built-in.md>), [debugging](<https://devfeed.tech/tags/debugging.md>), [debugging-tools](<https://devfeed.tech/tags/debugging-tools.md>), [deprecated](<https://devfeed.tech/tags/deprecated.md>), [emacs](<https://devfeed.tech/tags/emacs.md>), [example](<https://devfeed.tech/tags/example.md>), [exploring](<https://devfeed.tech/tags/exploring.md>), [feature](<https://devfeed.tech/tags/feature.md>), [features](<https://devfeed.tech/tags/features.md>), [feedback](<https://devfeed.tech/tags/feedback.md>), [first](<https://devfeed.tech/tags/first.md>), [fortran](<https://devfeed.tech/tags/fortran.md>), [function](<https://devfeed.tech/tags/function.md>), [functions](<https://devfeed.tech/tags/functions.md>), [hash](<https://devfeed.tech/tags/hash.md>), [hash-table](<https://devfeed.tech/tags/hash-table.md>), [highlights](<https://devfeed.tech/tags/highlights.md>), [information](<https://devfeed.tech/tags/information.md>), [integration](<https://devfeed.tech/tags/integration.md>)

### AI overview

Helpful adds Emacs debugging controls directly to its buffers: users can enable edebug to step through a function or tracing to inspect calls and returned values. Its summaries include source links and function status, with links to relevant Emacs manual sections. Helpful also surfaces aliases, including deprecated ones, and lets users set variables; defcustom variables link to Customize. It renders Emacs docstring syntax and automatically links URLs and manual references, including links for documented symbols to improve discovery. The excerpt says Helpful is available on MELPA and MELPA stable.

### Source excerpt

It's been a year since the first release of Helpful! It's gained a ton of new features, and I'd love to share the highlights with you. Tool Integration Emacs has some excellent built-in debugging tools that I wanted to expose within Helpful. These tools missed the first release, but I've now had the chance to build them. From a Helpful buffer, you can now toggle edebug on a function. This allows you to easily step through code. You can also toggle tracing. Tracing is an underrated built-in feature of Emacs. You can use it to confirm functions have the inputs and outputs you're expecting. It's really useful when exploring unfamiliar code. In this example, I've enabled tracing on projectile-project-root to see when it's called, and what values it's returning. Summaries After some great user feedback, Helpful buffers now start with a summary of what you're looking at. Users often want a direct link to the source code, so this is included in the summary. Helpful also mentions if a function is interactive or autoloaded, just like describe-function. If a user doesn't know what that means, those words now link to the relevant part of the Emacs manual! Aliases Helpful tries to show all relevant information for the current thing. I've overhauled aliases with this in mind. For example, if you view make-hash-table, you can now see that there is another alias of this function, but it's now deprecated. Modifying Variables It's now possible to set variables directly from Helpful buffers. This was inspired by counsel-set-variable, which has an excellent similar feature. If a variable is a defcustom, then Helpful also includes a link to the relevant part of Customize. Even Better Docstrings Helpful now handles all Emacs docstring syntax. It handles references to keybindings, keymaps, and even supports the obscure features like \<foo-map> and \='. fortran-mode is a great example of a docstring that uses a lot of Emacs docstring features. Recent versions of Helpful try even harder to

## Helpful Release Highlights One Year After Its First Release

DevFeed: [Helpful Release Highlights One Year After Its First Release](<https://devfeed.tech/articles/helpful-one-year-on-55195.md>)

Original publisher: [Read original article](<https://www.wilfred.me.uk/blog/2018/06/22/helpful-one-year-on/>)

Author: Wilfred Hughes

Published: 2018-06-22T00:00:00Z

Content type: release

Language: en

Sources: [Wilfred Hughes](<https://devfeed.tech/sources/wilfred-hughes.md>)

Topics: [Emacs](<https://devfeed.tech/topics/emacs.md>), [debugging](<https://devfeed.tech/topics/debugging.md>), [tracing](<https://devfeed.tech/topics/tracing.md>)

### AI overview

A release update for Helpful, an Emacs tool, covering debugging integration, tracing, source-code links, variable editing, and improved docstring and manual links.

### Source excerpt

It's been a year since the first release of Helpful! It's gained a ton of new features, and I'd love to share the highlights with you. Tool Integration Emacs has some excellent built-in debugging tools that I wanted to expose within Helpful. These tools missed the first release, but I've now had the chance to build them. From a Helpful buffer, you can now toggle edebug on a function. This allows you to easily step through code. You can also toggle tracing. Tracing is an underrated built-in feature of Emacs. You can use it to confirm functions have the inputs and outputs you're expecting. It's really useful when exploring unfamiliar code. In this example, I've enabled tracing on projectile-project-root to see when it's called, and what values it's returning. Summaries After some great user feedback, Helpful buffers now start with a summary of what you're looking at. Users often want a direct link to the source code, so this is included in the summary. Helpful also mentions if a function is interactive or autoloaded, just like describe-function. If a user doesn't know what that means, those words now link to the relevant part of the Emacs manual! Aliases Helpful tries to show all relevant information for the current thing. I've overhauled aliases with this in mind. For example, if you view make-hash-table, you can now see that there is another alias of this function, but it's now deprecated. Modifying Variables It's now possible to set variables directly from Helpful buffers. This was inspired by counsel-set-variable, which has an excellent similar feature. If a variable is a defcustom, then Helpful also includes a link to the relevant part of Customize. Even Better Docstrings Helpful now handles all Emacs docstring syntax. It handles references to keybindings, keymaps, and even supports the obscure features like \<foo-map> and \='. fortran-mode is a great example of a docstring that uses a lot of Emacs docstring features. Recent versions of Helpful try even harder to

## The Emacs Guru Guide to Key Bindings

DevFeed: [The Emacs Guru Guide to Key Bindings](<https://devfeed.tech/articles/the-emacs-guru-guide-to-key-bindings-55194.md>)

Original publisher: [Read original article](<https://www.wilfred.me.uk/blog/2018/01/06/the-emacs-guru-guide-to-key-bindings/>)

Author: Wilfred Hughes

Published: 2018-01-06T00:00:00Z

Content type: tutorial

Language: en

Sources: [Wilfred Hughes](<https://devfeed.tech/sources/wilfred-hughes.md>)

Topics: [Emacs](<https://devfeed.tech/topics/emacs.md>), [Programming](<https://devfeed.tech/topics/programming.md>), [Data structures](<https://devfeed.tech/topics/data-structures.md>)

Tags: [beginners](<https://devfeed.tech/tags/beginners.md>), [editor](<https://devfeed.tech/tags/editor.md>), [emacs](<https://devfeed.tech/tags/emacs.md>), [guide](<https://devfeed.tech/tags/guide.md>), [shortcuts](<https://devfeed.tech/tags/shortcuts.md>), [tutorial](<https://devfeed.tech/tags/tutorial.md>)

### AI overview

A guide to the logic behind Emacs key bindings. It explains mnemonic shortcuts, consistent patterns for movement and text operations, nested keymaps, and ways to discover which commands are associated with keys.

### Source excerpt

Imagine that you hold Control and type your name into Emacs. Can you describe what will happen? - The 'Emacs Guru Test' Emacs shortcuts (known as 'key bindings') can seem ridiculous to beginners. Some Emacs users even argue you should change them as soon as you start using Emacs. They are wrong. In this post, I'll describe the logic behind the Emacs key bindings. Not only will you be closer to passing the guru test, but you might even find you like some of the defaults! There Are How Many? Emacs has a ton of key bindings. ELISP> (length global-map) 143 Emacs is a modal editor, so most key bindings are mode-specific. However, my current Emacs instance has well over a hundred global shortcuts that work everywhere. (Keymaps are nested data structures, so this actually undercounts! For example, C-h C-h and C-h f are not counted separately.) Even that is a drop in the bucket compared with how many commands we could define key bindings for. ELISP> (let ((total 0)) (mapatoms (lambda (sym) (when (commandp sym) (setq total (1+ total))))) total) 8612 How can we possibly organise all these commands? Mnemonic Key Bindings Basic commands are often given key bindings based on their name. You'll encounter all of these important commands in the Emacs tutorial. Command Key Binding eXecute-extended-command M-x Next-line C-n Previous-line C-p Forward-char C-f Backward-car C-b iSearch-forward C-s Mnemonics are a really effective way of memorising things. If you can remember the name of the command, you can probably remember the key binding too. Organised Key Bindings Many Emacs movement commands are laid out in a consistent pattern. For example, movement by certain amount: Command Key Binding forward-char C-f forward-word M-f forward-sexp C-M-f Moving to the end of something: Command Key Binding move-end-of-line C-e forward-sentence M-e end-of-defun C-M-e Transposing, which swaps text either side of the cursor: Command Key Binding transpose-chars C-t transpose-words M-t transpose-sexps

## The Emacs Guru Guide to Key Bindings

DevFeed: [The Emacs Guru Guide to Key Bindings](<https://devfeed.tech/articles/the-emacs-guru-guide-to-key-bindings-22020.md>)

Original publisher: [Read original article](<http://www.wilfred.me.uk/blog/2018/01/06/the-emacs-guru-guide-to-key-bindings/>)

Author: Wilfred Hughes

Published: 2018-01-06T00:00:00Z

Content type: article

Language: en

Sources: [Wilfred Hughes](<https://devfeed.tech/sources/wilfred-hughes.md>)

Topics: [Emacs](<https://devfeed.tech/topics/emacs.md>)

Tags: [emacs](<https://devfeed.tech/tags/emacs.md>), [guide](<https://devfeed.tech/tags/guide.md>), [key](<https://devfeed.tech/tags/key.md>)

### AI overview

Emacs key bindings use mnemonics and recurring patterns: `C-` commands tend to perform small text operations, `M-` commands work on larger units such as words, and `C-M-` commands operate on expressions. Help commands make bindings self-documenting: `C-h k` explains what a key runs, and `C-h l` shows recent commands and their keys. Emacs' kill ring supports multiple saved items through `kill`, `kill-ring-save`, `yank`, and `yank-pop`; the latter cycles to another item after a yank. Users can bind `C-c` followed by a letter and `F5` through `F9` for personal commands. The excerpt allows customization, while recommending learning and considering existing patterns. It does not provide the full set of movement examples mentioned.

### Source excerpt

Imagine that you hold Control and type your name into Emacs. Can you describe what will happen? - The 'Emacs Guru Test' Emacs shortcuts (known as 'key bindings') can seem ridiculous to beginners. Some Emacs users even argue you should change them as soon as you start using Emacs. They are wrong. In this post, I'll describe the logic behind the Emacs key bindings. Not only will you be closer to passing the guru test, but you might even find you like some of the defaults! There Are How Many? Emacs has a ton of key bindings. ELISP> (length global-map) 143 Emacs is a modal editor, so most key bindings are mode-specific. However, my current Emacs instance has well over a hundred global shortcuts that work everywhere. (Keymaps are nested data structures, so this actually undercounts! For example, C-h C-h and C-h f are not counted separately.) Even that is a drop in the bucket compared with how many commands we could define key bindings for. ELISP> (let ((total 0)) (mapatoms (lambda (sym) (when (commandp sym) (setq total (1+ total))))) total) 8612 How can we possibly organise all these commands? Mnemonic Key Bindings Basic commands are often given key bindings based on their name. You'll encounter all of these important commands in the Emacs tutorial. Command Key Binding eXecute-extended-command M-x Next-line C-n Previous-line C-p Forward-char C-f Backward-car C-b iSearch-forward C-s Mnemonics are a really effective way of memorising things. If you can remember the name of the command, you can probably remember the key binding too. Organised Key Bindings Many Emacs movement commands are laid out in a consistent pattern. For example, movement by certain amount: Command Key Binding forward-char C-f forward-word M-f forward-sexp C-M-f Moving to the end of something: Command Key Binding move-end-of-line C-e forward-sentence M-e end-of-defun C-M-e Transposing, which swaps text either side of the cursor: Command Key Binding transpose-chars C-t transpose-words M-t transpose-sexps

## These Weeks in Remacs III

DevFeed: [These Weeks in Remacs III](<https://devfeed.tech/articles/these-weeks-in-remacs-iii-22019.md>)

Original publisher: [Read original article](<http://www.wilfred.me.uk/blog/2017/10/16/these-weeks-in-remacs-iii/>)

Author: Wilfred Hughes

Published: 2017-10-16T00:00:00Z

Content type: news

Language: en

Sources: [Wilfred Hughes](<https://devfeed.tech/sources/wilfred-hughes.md>)

Topics: [Emacs](<https://devfeed.tech/topics/emacs.md>), [Pull Request](<https://devfeed.tech/topics/pull-request.md>), [data type](<https://devfeed.tech/topics/data-type.md>), [floating-point](<https://devfeed.tech/topics/floating-point.md>)

Tags: [apis](<https://devfeed.tech/tags/apis.md>), [arguments](<https://devfeed.tech/tags/arguments.md>), [arithmetic](<https://devfeed.tech/tags/arithmetic.md>), [c](<https://devfeed.tech/tags/c.md>), [checksums](<https://devfeed.tech/tags/checksums.md>), [comparisons](<https://devfeed.tech/tags/comparisons.md>), [contributing](<https://devfeed.tech/tags/contributing.md>), [contribution](<https://devfeed.tech/tags/contribution.md>), [contributions](<https://devfeed.tech/tags/contributions.md>), [data](<https://devfeed.tech/tags/data.md>), [data-structures](<https://devfeed.tech/tags/data-structures.md>), [data-types](<https://devfeed.tech/tags/data-types.md>), [datastructures](<https://devfeed.tech/tags/datastructures.md>), [emacs](<https://devfeed.tech/tags/emacs.md>), [feature](<https://devfeed.tech/tags/feature.md>), [features](<https://devfeed.tech/tags/features.md>), [file](<https://devfeed.tech/tags/file.md>), [floating-point](<https://devfeed.tech/tags/floating-point.md>), [fonts](<https://devfeed.tech/tags/fonts.md>), [generation](<https://devfeed.tech/tags/generation.md>)

### AI overview

Remacs reports 64 merged pull requests since its prior update and new Rust ports spanning arithmetic, symbols, buffers, processes, windows, characters and other Emacs features. It describes Rust conventions for elisp values using conversion methods and reference types, procedural macros for defining primitives, variadic call macros, and mocking extern C functions for unit tests. GNU Emacs trunk features are periodically brought into Remacs. An exploration of Rust's FnvHashMap could not be adopted because the C layer expects hash table keys to be mutable in place, and `unexec` does not work well with `mmap`. The excerpt also notes a logo discussion and opportunities for first contributions.

### Source excerpt

Time for another Remacs update: lots of contributions, a wide range of features, and even a logo! Contributing Since the last update, we've seen contributions from lots of new people. We've added @brotzeit and @shanavas786, bringing us to seven wonderful people who can approve your PRs. Speaking of PRs, we've merged an amazing 64 pull requests since the last update! If you're looking for a good feature for your first contribution, @brotzeit has been regularly adding new suggestions under the 'good first issue' label. Features Many Emacs features have now been ported to Rust, with new Rust APIs for accessing elisp datastructures. Here's an overview of the features that have landed. Arithmetic: arithmetic, floating point, random number generation (using a Rust RNG!), and comparisons. Symbols: symbol properties, interning, obarrays unbinding, keywords and indirect symbols. Checksums: MD5sum (using a Rust MD5 crate!). Windows: liveness check, type check, overlays and minibuffer, minibuffer check positions and margins. Processes: accessing, type check, data structures and names. Buffers: for the current thread, accessing, file names, size and modification. Point: bobp, bolp, eolp, markers, point-min, point-max forward-point and goto-char. Hash tables: copying and accessing. Characters: multibyte conversions, character tables, category tables Fonts: type checks. Miscellaneous: prefix arguments and identity. We're also periodically pulling GNU Emacs features into Remacs, so all the features available GNU Emacs trunk are included in Remacs. Idiomatic Rust in Remacs Remacs has gradually developed a set of conventions for elisp data types. For each type Foo, we define a LispObject::as_foo, LispObject::as_foo_or_error and a FooRef when you know your elisp datatype is actually a Foo. For example, here's how overlay-start was implemented in C: DEFUN ("overlay-start", Foverlay_start, Soverlay_start, 1, 1, 0, doc: /* Return the position at which OVERLAY starts. */) (Lisp_Object ov

## These Weeks in Remacs III

DevFeed: [These Weeks in Remacs III](<https://devfeed.tech/articles/these-weeks-in-remacs-iii-55193.md>)

Original publisher: [Read original article](<https://www.wilfred.me.uk/blog/2017/10/16/these-weeks-in-remacs-iii/>)

Author: Wilfred Hughes

Published: 2017-10-16T00:00:00Z

Content type: article

Language: en

Sources: [Wilfred Hughes](<https://devfeed.tech/sources/wilfred-hughes.md>)

Topics: [properties](<https://devfeed.tech/topics/properties.md>), [Rust](<https://devfeed.tech/topics/rust.md>), [Pull Request](<https://devfeed.tech/topics/pull-request.md>), [Data structures](<https://devfeed.tech/topics/data-structures.md>), [C](<https://devfeed.tech/topics/c.md>), [Lisp](<https://devfeed.tech/topics/lisp.md>), [Process](<https://devfeed.tech/topics/process.md>), [hashing](<https://devfeed.tech/topics/hashing.md>), [Randomizer](<https://devfeed.tech/topics/randomizer.md>), [floating-point](<https://devfeed.tech/topics/floating-point.md>), [Unit testing](<https://devfeed.tech/topics/unit-testing.md>)

Tags: [c](<https://devfeed.tech/tags/c.md>), [data](<https://devfeed.tech/tags/data.md>), [data-structures](<https://devfeed.tech/tags/data-structures.md>), [emacs](<https://devfeed.tech/tags/emacs.md>), [floating-point](<https://devfeed.tech/tags/floating-point.md>), [functions](<https://devfeed.tech/tags/functions.md>), [hash](<https://devfeed.tech/tags/hash.md>), [know](<https://devfeed.tech/tags/know.md>), [processes](<https://devfeed.tech/tags/processes.md>), [pull-requests](<https://devfeed.tech/tags/pull-requests.md>), [return](<https://devfeed.tech/tags/return.md>), [rust](<https://devfeed.tech/tags/rust.md>), [type](<https://devfeed.tech/tags/type.md>), [types](<https://devfeed.tech/tags/types.md>)

### AI overview

A progress update on Remacs describes community contributions, merged pull requests, Emacs features ported to Rust, Rust conventions for Emacs Lisp data types, procedural macros, unit testing, and experiments with hash maps.

### Source excerpt

Time for another Remacs update: lots of contributions, a wide range of features, and even a logo! Contributing Since the last update, we've seen contributions from lots of new people. We've added @brotzeit and @shanavas786, bringing us to seven wonderful people who can approve your PRs. Speaking of PRs, we've merged an amazing 64 pull requests since the last update! If you're looking for a good feature for your first contribution, @brotzeit has been regularly adding new suggestions under the 'good first issue' label. Features Many Emacs features have now been ported to Rust, with new Rust APIs for accessing elisp datastructures. Here's an overview of the features that have landed. Arithmetic: arithmetic, floating point, random number generation (using a Rust RNG!), and comparisons. Symbols: symbol properties, interning, obarrays unbinding, keywords and indirect symbols. Checksums: MD5sum (using a Rust MD5 crate!). Windows: liveness check, type check, overlays and minibuffer, minibuffer check positions and margins. Processes: accessing, type check, data structures and names. Buffers: for the current thread, accessing, file names, size and modification. Point: bobp, bolp, eolp, markers, point-min, point-max forward-point and goto-char. Hash tables: copying and accessing. Characters: multibyte conversions, character tables, category tables Fonts: type checks. Miscellaneous: prefix arguments and identity. We're also periodically pulling GNU Emacs features into Remacs, so all the features available GNU Emacs trunk are included in Remacs. Idiomatic Rust in Remacs Remacs has gradually developed a set of conventions for elisp data types. For each type Foo, we define a LispObject::as_foo, LispObject::as_foo_or_error and a FooRef when you know your elisp datatype is actually a Foo. For example, here's how overlay-start was implemented in C: DEFUN ("overlay-start", Foverlay_start, Soverlay_start, 1, 1, 0, doc: /* Return the position at which OVERLAY starts. */) (Lisp_Object ov

## Helpful: Adding Contextual Help to Emacs

DevFeed: [Helpful: Adding Contextual Help to Emacs](<https://devfeed.tech/articles/helpful-adding-contextual-help-to-emacs-55192.md>)

Original publisher: [Read original article](<https://www.wilfred.me.uk/blog/2017/08/30/helpful-adding-contextual-help-to-emacs/>)

Author: Wilfred Hughes

Published: 2017-08-30T00:00:00Z

Content type: release

Language: en

Sources: [Wilfred Hughes](<https://devfeed.tech/sources/wilfred-hughes.md>)

Topics: [Emacs](<https://devfeed.tech/topics/emacs.md>), [help](<https://devfeed.tech/topics/help.md>), [Code](<https://devfeed.tech/topics/code.md>), [debugging](<https://devfeed.tech/topics/debugging.md>), [function](<https://devfeed.tech/topics/function.md>), [Closure](<https://devfeed.tech/topics/closure.md>)

Tags: [closure](<https://devfeed.tech/tags/closure.md>), [code](<https://devfeed.tech/tags/code.md>), [debug](<https://devfeed.tech/tags/debug.md>), [emacs](<https://devfeed.tech/tags/emacs.md>), [functions](<https://devfeed.tech/tags/functions.md>), [help](<https://devfeed.tech/tags/help.md>)

### AI overview

The author announces Helpful, an Emacs package that adds contextual information to Emacs help. It reports keybindings across keymaps, exposes debugging actions and symbol references, improves docstring display, and locates or reconstructs function source code, including interactively defined, raw, and byte-compiled functions.

### Source excerpt

I've just released Helpful, a new way of getting help in Emacs! The *Help* built-in to Emacs is already pretty good. Helpful goes a step further and includes lots of contextual info. Let's take a look. Have you ever wondered which major modes have a keybinding for a function? Helpful reports keybindings in all keymaps! When you're hacking on some new code, you might end up with old function aliases after renaming a function. Helpful provides discoverable debug buttons, so you don't need to remember fmakunbound. Helpful also has strong opinions on viewing docstrings. Summaries are given focus, and text is fontified. We solve the text-quoting-style debate by removing superfluous puncuation entirely. Helpful will even show all the references to the symbol you're looking at, using elisp-refs. This is great for understanding how and where a function is used. Finally, Helpful will rifle through your Emacs instance to find source code to functions: If you've defined a function interactively, Helpful will use edebug properties to find the source code. If Emacs can only find the raw closure, helpful will convert it back to an equivalent defun. If Emacs can only find the byte-compiled files, helpful will just pretty-print that. I've just released v0.1, so there will be bugs. Please give it a try, and let me know what you think, or how we can make it even more, well, helpful!

## Helpful: Adding Contextual Help to Emacs

DevFeed: [Helpful: Adding Contextual Help to Emacs](<https://devfeed.tech/articles/helpful-adding-contextual-help-to-emacs-22018.md>)

Original publisher: [Read original article](<http://www.wilfred.me.uk/blog/2017/08/30/helpful-adding-contextual-help-to-emacs/>)

Author: Wilfred Hughes

Published: 2017-08-30T00:00:00Z

Content type: release

Language: en

Sources: [Wilfred Hughes](<https://devfeed.tech/sources/wilfred-hughes.md>)

Topics: [Emacs](<https://devfeed.tech/topics/emacs.md>), [code search](<https://devfeed.tech/topics/code-search.md>), [debugging](<https://devfeed.tech/topics/debugging.md>), [code beautification](<https://devfeed.tech/topics/code-beautification.md>)

Tags: [aliases](<https://devfeed.tech/tags/aliases.md>), [buttons](<https://devfeed.tech/tags/buttons.md>), [emacs](<https://devfeed.tech/tags/emacs.md>), [help](<https://devfeed.tech/tags/help.md>), [keybindings](<https://devfeed.tech/tags/keybindings.md>), [refs](<https://devfeed.tech/tags/refs.md>), [source-code](<https://devfeed.tech/tags/source-code.md>)

### AI overview

Helpful extends Emacs' built-in help by showing a function's keybindings across keymaps, discoverable debug buttons for tasks such as removing stale function aliases, and docstrings with focused summaries and fontified text. It uses elisp-refs to show symbol references. For source display, it uses edebug properties for interactively defined functions, reconstructs an equivalent defun from a raw closure, or pretty-prints byte-compiled files when that is all Emacs can find. The excerpt identifies this as v0.1 and notes that bugs are expected.

### Source excerpt

I've just released Helpful, a new way of getting help in Emacs! The *Help* built-in to Emacs is already pretty good. Helpful goes a step further and includes lots of contextual info. Let's take a look. Have you ever wondered which major modes have a keybinding for a function? Helpful reports keybindings in all keymaps! When you're hacking on some new code, you might end up with old function aliases after renaming a function. Helpful provides discoverable debug buttons, so you don't need to remember fmakunbound. Helpful also has strong opinions on viewing docstrings. Summaries are given focus, and text is fontified. We solve the text-quoting-style debate by removing superfluous puncuation entirely. Helpful will even show all the references to the symbol you're looking at, using elisp-refs. This is great for understanding how and where a function is used. Finally, Helpful will rifle through your Emacs instance to find source code to functions: If you've defined a function interactively, Helpful will use edebug properties to find the source code. If Emacs can only find the raw closure, helpful will convert it back to an equivalent defun. If Emacs can only find the byte-compiled files, helpful will just pretty-print that. I've just released v0.1, so there will be bugs. Please give it a try, and let me know what you think, or how we can make it even more, well, helpful!

## Suggest.el: Synthesising Constants

DevFeed: [Suggest.el: Synthesising Constants](<https://devfeed.tech/articles/suggest-el-synthesising-constants-22017.md>)

Original publisher: [Read original article](<http://www.wilfred.me.uk/blog/2017/08/06/suggest-el-synthesising-constants/>)

Author: Wilfred Hughes

Published: 2017-08-06T00:00:00Z

Content type: release

Language: en

Sources: [Wilfred Hughes](<https://devfeed.tech/sources/wilfred-hughes.md>)

Topics: [Functional programming](<https://devfeed.tech/topics/functional-programming.md>), [Sequences](<https://devfeed.tech/topics/sequences.md>), [Tool](<https://devfeed.tech/topics/tool.md>)

Tags: [2](<https://devfeed.tech/tags/2.md>), [3](<https://devfeed.tech/tags/3.md>), [arguments](<https://devfeed.tech/tags/arguments.md>), [better](<https://devfeed.tech/tags/better.md>), [but](<https://devfeed.tech/tags/but.md>), [can](<https://devfeed.tech/tags/can.md>), [car](<https://devfeed.tech/tags/car.md>), [complex](<https://devfeed.tech/tags/complex.md>), [don-t](<https://devfeed.tech/tags/don-t.md>), [effective](<https://devfeed.tech/tags/effective.md>), [element](<https://devfeed.tech/tags/element.md>), [elements](<https://devfeed.tech/tags/elements.md>), [elt](<https://devfeed.tech/tags/elt.md>), [example](<https://devfeed.tech/tags/example.md>), [extra](<https://devfeed.tech/tags/extra.md>), [first](<https://devfeed.tech/tags/first.md>), [function](<https://devfeed.tech/tags/function.md>), [gives](<https://devfeed.tech/tags/gives.md>), [giving](<https://devfeed.tech/tags/giving.md>), [good](<https://devfeed.tech/tags/good.md>)

### AI overview

Suggest.el v0.4 expands code search by trying the constants nil, t, -1, 0, 1 and 2 in user inputs. This enables suggestions such as elt or nth for selecting a list element, -partition for grouping items, and -drop or -slice for truncating lists. The larger search space makes ranking more important: suggest.el prefers function calls that need fewer extra arguments, which puts 1+ ahead of alternatives such as (+ 0 1) for incrementing zero. For nested calls, it saves returned values as intermediates; v0.4 limits attempts to generate each unique value to three, so search can explore more distinct values before giving up. The constant set is described as a tradeoff among performance, finding results and usefulness. The excerpt also says research into related tools led suggest.el to explore bitwise operations.

### Source excerpt

Suggest.el v0.4 is now out, and it offers some really interesting new ways of making suggestions. Supplying Constants Suppose the user gives us the input '(a b c d) and desired output 'a. We would already suggest car, but that only gets the first element of the list. They may have wanted elt or nth, which get elements at a specific position. We now try adding constants to the user's inputs, specifically nil, t, -1, 0, 1 and 2. This makes suggest.el much more effective. Here's the example we mentioned: ;; Inputs (one per line): '(a b c d) ;; Desired output: 'a ;; Suggestions: (car '(a b c d)) (elt '(a b c d) 0) ; <- new (nth 0 '(a b c d)) ; <- new We can now suggest grouping items in a list pairwise: ;; Inputs (one per line): '(a b c d e f) ;; Desired output: '((a b) (c d) (e f)) ;; Suggestions: (-partition 2 '(a b c d e f)) ; <- new Converting a vector to a list: ;; Inputs (one per line): (vector 1 2 3) ;; Desired output: (list 1 2 3) ;; Suggestions: (string-to-list (vector 1 2 3)) (append (vector 1 2 3) nil) ; <- new (-rotate 0 (vector 1 2 3)) ; <- new (-concat (vector 1 2 3) nil) ; <- new Truncating lists: ;; Inputs (one per line): '(a b c d e) ;; Desired output: '(c d e) ;; Suggestions: (-drop 2 '(a b c d e)) ; <- new (-slice '(a b c d e) 2) ; <- new (cdr (cdr '(a b c d e))) Choosing good values for constants is difficult, but the current set seems to be a good tradeoff between performance, the likelihood of finding a result, and the number of useful results. Ranking Suggestions Now we have more possibilities, ordering our suggestions is more complex. The first prototype didn't always get the ordering correct: ;; Inputs (one per line): 0 ;; Desired output: 1 ;; Suggestions: (+ 0 1) ; <- new (- 1 0) ; <- new (1+ 0) The user is probably looking for the increment function, 1+. (+ 0 1) feels like stating the obvious. Suggest.el prefers function calls that don't require extra arguments, giving us a better order: ;; Inputs (one per line): 0 ;; Desired output: 1 ;; Sugg

## Suggest.el: Synthesising Constants

DevFeed: [Suggest.el: Synthesising Constants](<https://devfeed.tech/articles/suggest-el-synthesising-constants-55191.md>)

Original publisher: [Read original article](<https://www.wilfred.me.uk/blog/2017/08/06/suggest-el-synthesising-constants/>)

Author: Wilfred Hughes

Published: 2017-08-06T00:00:00Z

Content type: article

Language: en

Sources: [Wilfred Hughes](<https://devfeed.tech/sources/wilfred-hughes.md>)

Topics: [Code](<https://devfeed.tech/topics/code.md>), [function](<https://devfeed.tech/topics/function.md>), [input](<https://devfeed.tech/topics/input.md>), [ordering](<https://devfeed.tech/topics/ordering.md>), [bug](<https://devfeed.tech/topics/bug.md>)

Tags: [code](<https://devfeed.tech/tags/code.md>), [function](<https://devfeed.tech/tags/function.md>), [input](<https://devfeed.tech/tags/input.md>), [ordering](<https://devfeed.tech/tags/ordering.md>), [performance](<https://devfeed.tech/tags/performance.md>)

### AI overview

Suggest.el v0.4 improves program synthesis by adding common constants to inputs, generating more possible function calls, ranking suggestions, and searching intermediate values for nested expressions.

### Source excerpt

Suggest.el v0.4 is now out, and it offers some really interesting new ways of making suggestions. Supplying Constants Suppose the user gives us the input '(a b c d) and desired output 'a. We would already suggest car, but that only gets the first element of the list. They may have wanted elt or nth, which get elements at a specific position. We now try adding constants to the user's inputs, specifically nil, t, -1, 0, 1 and 2. This makes suggest.el much more effective. Here's the example we mentioned: ;; Inputs (one per line): '(a b c d) ;; Desired output: 'a ;; Suggestions: (car '(a b c d)) (elt '(a b c d) 0) ; <- new (nth 0 '(a b c d)) ; <- new We can now suggest grouping items in a list pairwise: ;; Inputs (one per line): '(a b c d e f) ;; Desired output: '((a b) (c d) (e f)) ;; Suggestions: (-partition 2 '(a b c d e f)) ; <- new Converting a vector to a list: ;; Inputs (one per line): (vector 1 2 3) ;; Desired output: (list 1 2 3) ;; Suggestions: (string-to-list (vector 1 2 3)) (append (vector 1 2 3) nil) ; <- new (-rotate 0 (vector 1 2 3)) ; <- new (-concat (vector 1 2 3) nil) ; <- new Truncating lists: ;; Inputs (one per line): '(a b c d e) ;; Desired output: '(c d e) ;; Suggestions: (-drop 2 '(a b c d e)) ; <- new (-slice '(a b c d e) 2) ; <- new (cdr (cdr '(a b c d e))) Choosing good values for constants is difficult, but the current set seems to be a good tradeoff between performance, the likelihood of finding a result, and the number of useful results. Ranking Suggestions Now we have more possibilities, ordering our suggestions is more complex. The first prototype didn't always get the ordering correct: ;; Inputs (one per line): 0 ;; Desired output: 1 ;; Suggestions: (+ 0 1) ; <- new (- 1 0) ; <- new (1+ 0) The user is probably looking for the increment function, 1+. (+ 0 1) feels like stating the obvious. Suggest.el prefers function calls that don't require extra arguments, giving us a better order: ;; Inputs (one per line): 0 ;; Desired output: 1 ;; Sugg

## Optimising Dash.el

DevFeed: [Optimising Dash.el](<https://devfeed.tech/articles/optimising-dash-el-22016.md>)

Original publisher: [Read original article](<http://www.wilfred.me.uk/blog/2017/07/29/optimising-dash-el/>)

Author: Wilfred Hughes

Published: 2017-07-29T00:00:00Z

Content type: article

Language: en

Sources: [Wilfred Hughes](<https://devfeed.tech/sources/wilfred-hughes.md>)

Topics: [Benchmark](<https://devfeed.tech/topics/benchmark.md>), [inlining](<https://devfeed.tech/topics/inlining.md>)

Tags: [benchmark](<https://devfeed.tech/tags/benchmark.md>), [dash](<https://devfeed.tech/tags/dash.md>), [performance](<https://devfeed.tech/tags/performance.md>)

### AI overview

The excerpt shows why Emacs Lisp optimizations need measurement: in the reported benchmark, `mapcar` beats an iterative `dolist` version across the tested list sizes, despite creating a closure. For functions equivalent to primitives, a wrapper adds substantial overhead; `defalias` is much closer to direct primitive use, and the byte-compiler's `byte-opcode` property can make `-first-item` indistinguishable from `car`, though this also means it cannot be advised. The byte-compiler can also evaluate calls on literals when a function is annotated pure, and remove unused calls annotated as having no side effects. The article recommends benchmarking, disassembling functions, and consulting other Emacs users. The excerpt says the latest Dash.el version includes these improvements.

### Source excerpt

Dash.el is a lovely library, and one of the most popular on MELPA. If we can squeeze every last drop of performance out of it, everyone benefits. Let's take a look at the black art of making elisp faster. Measure First! Chris Wellons has a great optimisation blog post that discusses the performance overhead of creating lambdas with mapcar. If we look at --map, it does indeed create anonymous functions: (defmacro --map (form list) "Anaphoric form of `-map'." `(mapcar (lambda (it) ,form) ,list)) Creating anonymous functions instantiates a closure, which isn't free. Let's write an iterative equivalent: (defmacro --map-loop (form list) (declare (debug (form form))) (let ((result-sym (make-symbol "result"))) `(let (,result-sym) (dolist (it ,list) (push ,form ,result-sym)) (nreverse ,result-sym)))) List Length mapcar (seconds) dolist (seconds) 1 0.000010 0.000028 1,000 0.0027 0.0079 100,000 0.74 1.24 (Full benchmark code here.) Surprisingly, mapcar is consistently faster in this particular benchmark! Other Emacsers have observed dolist outperforming mapcar for short lists. mapcar is primitive, and primitives tend to be fast. dolist clearly isn't a speedup in all situations. Let's try something else. Matching Primitive Performance Some dash.el functions are equivalent to primitive functions. For example, -first-item is equivalent to car, -drop is equivalent to nthcdr. We could write -first-item like this: (defun -first-item (lst) (car lst)) However, this adds the overhead of an extra function call compared with calling car directly. Instead, dash.el does this: (defalias '-first-item 'car) Let's do a small benchmark, to ensure that defalias giving us the peformance we want: Approach time (seconds) wrapper function 0.1399 alias 0.0055 use car directly 0.0050 (Full benchmark code here.) For shame! Our alias still isn't as fast as using the primitive. Let's compare the disassembly using M-x disassemble. (defalias 'car-alias 'car) (defun use-car-alias (x) (car-alias x)) ;; byte

## Optimising Dash.el

DevFeed: [Optimising Dash.el](<https://devfeed.tech/articles/optimising-dash-el-55190.md>)

Original publisher: [Read original article](<https://www.wilfred.me.uk/blog/2017/07/29/optimising-dash-el/>)

Author: Wilfred Hughes

Published: 2017-07-29T00:00:00Z

Content type: article

Language: en

Sources: [Wilfred Hughes](<https://devfeed.tech/sources/wilfred-hughes.md>)

Topics: [Emacs](<https://devfeed.tech/topics/emacs.md>), [Library](<https://devfeed.tech/topics/library.md>), [Code](<https://devfeed.tech/topics/code.md>), [Compiler](<https://devfeed.tech/topics/compiler.md>), [Benchmark](<https://devfeed.tech/topics/benchmark.md>)

Tags: [code](<https://devfeed.tech/tags/code.md>), [compiler](<https://devfeed.tech/tags/compiler.md>), [dash](<https://devfeed.tech/tags/dash.md>), [emacs](<https://devfeed.tech/tags/emacs.md>), [library](<https://devfeed.tech/tags/library.md>), [open-source](<https://devfeed.tech/tags/open-source.md>), [other](<https://devfeed.tech/tags/other.md>)

### AI overview

An optimization article about Dash.el, an Emacs Lisp library. It benchmarks alternative implementations, explains the performance effects of closures and function aliases, and shows how Emacs byte-compilation can improve or eliminate work at compile time.

### Source excerpt

Dash.el is a lovely library, and one of the most popular on MELPA. If we can squeeze every last drop of performance out of it, everyone benefits. Let's take a look at the black art of making elisp faster. Measure First! Chris Wellons has a great optimisation blog post that discusses the performance overhead of creating lambdas with mapcar. If we look at --map, it does indeed create anonymous functions: (defmacro --map (form list) "Anaphoric form of `-map'." `(mapcar (lambda (it) ,form) ,list)) Creating anonymous functions instantiates a closure, which isn't free. Let's write an iterative equivalent: (defmacro --map-loop (form list) (declare (debug (form form))) (let ((result-sym (make-symbol "result"))) `(let (,result-sym) (dolist (it ,list) (push ,form ,result-sym)) (nreverse ,result-sym)))) List Length mapcar (seconds) dolist (seconds) 1 0.000010 0.000028 1,000 0.0027 0.0079 100,000 0.74 1.24 (Full benchmark code here.) Surprisingly, mapcar is consistently faster in this particular benchmark! Other Emacsers have observed dolist outperforming mapcar for short lists. mapcar is primitive, and primitives tend to be fast. dolist clearly isn't a speedup in all situations. Let's try something else. Matching Primitive Performance Some dash.el functions are equivalent to primitive functions. For example, -first-item is equivalent to car, -drop is equivalent to nthcdr. We could write -first-item like this: (defun -first-item (lst) (car lst)) However, this adds the overhead of an extra function call compared with calling car directly. Instead, dash.el does this: (defalias '-first-item 'car) Let's do a small benchmark, to ensure that defalias giving us the performance we want: Approach time (seconds) wrapper function 0.1399 alias 0.0055 use car directly 0.0050 (Full benchmark code here.) For shame! Our alias still isn't as fast as using the primitive. Let's compare the disassembly using M-x disassemble. (defalias 'car-alias 'car) (defun use-car-alias (x) (car-alias x)) ;; byt

## These Weeks in Remacs II

DevFeed: [These Weeks in Remacs II](<https://devfeed.tech/articles/these-weeks-in-remacs-ii-55189.md>)

Original publisher: [Read original article](<https://www.wilfred.me.uk/blog/2017/07/15/these-weeks-in-remacs-ii/>)

Author: Wilfred Hughes

Published: 2017-07-15T00:00:00Z

Content type: article

Language: en

Sources: [Wilfred Hughes](<https://devfeed.tech/sources/wilfred-hughes.md>)

Topics: [Rust](<https://devfeed.tech/topics/rust.md>), [Emacs](<https://devfeed.tech/topics/emacs.md>), [Lisp](<https://devfeed.tech/topics/lisp.md>), [C](<https://devfeed.tech/topics/c.md>), [Code](<https://devfeed.tech/topics/code.md>), [software-development](<https://devfeed.tech/topics/software-development.md>), [GitHub](<https://devfeed.tech/topics/github.md>), [Docker Compose](<https://devfeed.tech/topics/docker-compose.md>)

Tags: [c](<https://devfeed.tech/tags/c.md>), [code](<https://devfeed.tech/tags/code.md>), [compilers](<https://devfeed.tech/tags/compilers.md>), [dev](<https://devfeed.tech/tags/dev.md>), [docker](<https://devfeed.tech/tags/docker.md>), [docker-compose](<https://devfeed.tech/tags/docker-compose.md>), [github](<https://devfeed.tech/tags/github.md>), [lisp](<https://devfeed.tech/tags/lisp.md>), [pull-requests](<https://devfeed.tech/tags/pull-requests.md>), [rust](<https://devfeed.tech/tags/rust.md>), [toolchain](<https://devfeed.tech/tags/toolchain.md>)

### AI overview

A progress update on Remacs, covering new Emacs Lisp primitives, Rust support, GNU Emacs compatibility documentation, platform changes, codebase reorganization, procedural macros, Rust crates, and Docker Compose-based builds.

### Source excerpt

It's been six months since the last Remacs update, and many new features have landed! Community We now have a Gitter chat room! Do drop by if you have any questions or wish to discuss Remacs. There's a low traffic Remacs Subreddit too. We've added @jeandudey and @birkenfeld to the GitHub collaborators, bringing us to five fine people who can approve your pull requests. Elisp Features We're still tracking upstream GNU Emacs master, so new features there are landing in Remacs (1, 2). We've added a lot new elisp primitive functions: Strings: characterp, multibyte conversions (1, 2, 3), and comparisons Vectors: type definitions, functions Buffers: type definitions, functions Symbols: various functions A much requested feature, adding Rust support to find-function, has been added. This was an unusual PR as it includes some elisp changes in Remacs. We now have documentation on our compatibility with GNU Emacs. This covers all known implementation differences, platform support differences, and describes how to detect Remacs in elisp code. Cleanup Platforms: We've dropped MS-DOS support. The Remacs build has been fixed on 32-bit Linux and 32-bit macOS. The codebase has been split out: remacs-lib (Rust equivalents of gnulib) remacs-sys (type definitions of Emacs types and C functions) remacs-macros (procedural macros supporting elisp primitive functions in Rust) src (Rust implementation code of elisp) Signal name mapping is pure Rust code. We now run rustfmt on every PR. If you fancy building Remacs without installing a dev toolchain (compilers, C libraries etc), there's now a docker-compose.yml to make your life easy. Macros It wouldn't be a proper lisp project without some macro magic. After several PRs and discussions, Remacs now includes a procedural macro to simplify defining elisp functions in Rust. For example, here's vectorp: /// Return t if OBJECT is a vector. #[lisp_fn] fn vectorp(object: LispObject) -> LispObject { LispObject::from_bool(object.is_vector()) } Lever

## These Weeks in Remacs II

DevFeed: [These Weeks in Remacs II](<https://devfeed.tech/articles/these-weeks-in-remacs-ii-22015.md>)

Original publisher: [Read original article](<http://www.wilfred.me.uk/blog/2017/07/15/these-weeks-in-remacs-ii/>)

Author: Wilfred Hughes

Published: 2017-07-15T00:00:00Z

Content type: release

Language: en

Sources: [Wilfred Hughes](<https://devfeed.tech/sources/wilfred-hughes.md>)

Topics: [Emacs](<https://devfeed.tech/topics/emacs.md>), [Docker Compose](<https://devfeed.tech/topics/docker-compose.md>), [GitHub](<https://devfeed.tech/topics/github.md>), [Documentation](<https://devfeed.tech/topics/documentation.md>)

Tags: [added](<https://devfeed.tech/tags/added.md>), [chat](<https://devfeed.tech/tags/chat.md>), [community](<https://devfeed.tech/tags/community.md>), [compatibility](<https://devfeed.tech/tags/compatibility.md>), [docker-compose](<https://devfeed.tech/tags/docker-compose.md>), [documentation](<https://devfeed.tech/tags/documentation.md>), [feature](<https://devfeed.tech/tags/feature.md>), [features](<https://devfeed.tech/tags/features.md>), [fixed](<https://devfeed.tech/tags/fixed.md>), [functions](<https://devfeed.tech/tags/functions.md>), [linux](<https://devfeed.tech/tags/linux.md>), [lisp](<https://devfeed.tech/tags/lisp.md>), [macos](<https://devfeed.tech/tags/macos.md>), [macros](<https://devfeed.tech/tags/macros.md>), [mapping](<https://devfeed.tech/tags/mapping.md>), [ms-dos](<https://devfeed.tech/tags/ms-dos.md>), [platforms](<https://devfeed.tech/tags/platforms.md>), [rust](<https://devfeed.tech/tags/rust.md>), [split](<https://devfeed.tech/tags/split.md>), [toolchain](<https://devfeed.tech/tags/toolchain.md>)

### AI overview

Remacs continued tracking GNU Emacs master while adding many Elisp primitives, including string, vector, buffer, and symbol functions, plus Rust support for `find-function` and documentation of known compatibility and platform differences. The update also describes project restructuring into Rust-focused crates and source code, pure Rust signal-name mapping, and `rustfmt` on every pull request. Builds were fixed for 32-bit Linux and macOS, while MS-DOS support was dropped; `docker-compose.yml` offers a build path without installing a development toolchain. A procedural macro now simplifies defining Elisp functions in Rust. Remacs also adopted Rust crates for SHA-1, SHA-2, and base64, and Rust standard-library bit-counting functions. The excerpt says the project still has Elisp functions to port and welcomes incomplete pull requests.

### Source excerpt

It's been six months since the last Remacs update, and many new features have landed! Community We now have a Gitter chat room! Do drop by if you have any questions or wish to discuss Remacs. There's a low traffic Remacs Subreddit too. We've added @jeandudey and @birkenfeld to the GitHub collaborators, bringing us to five fine people who can approve your pull requests. Elisp Features We're still tracking upstream GNU Emacs master, so new features there are landing in Remacs (1, 2). We've added a lot new elisp primitive functions: Strings: characterp, multibyte conversions (1, 2, 3), and comparisons Vectors: type definitions, functions Buffers: type definitions, functions Symbols: various functions A much requested feature, adding Rust support to find-function, has been added. This was an unusual PR as it includes some elisp changes in Remacs. We now have documentation on our compatibility with GNU Emacs. This covers all known implementation differences, platform support differences, and describes how to detect Remacs in elisp code. Cleanup Platforms: We've dropped MS-DOS support. The Remacs build has been fixed on 32-bit Linux and 32-bit macOS. The codebase has been split out: remacs-lib (Rust equivalents of gnulib) remacs-sys (type definitions of Emacs types and C functions) remacs-macros (procedural macros supporting elisp primitive functions in Rust) src (Rust implementation code of elisp) Signal name mapping is pure Rust code. We now run rustfmt on every PR. If you fancy building Remacs without installing a dev toolchain (compilers, C libraries etc), there's now a docker-compose.yml to make your life easy. Macros It wouldn't be a proper lisp project without some macro magic. After several PRs and discussions, Remacs now includes a procedural macro to simplify defining elisp functions in Rust. For example, here's vectorp: /// Return t if OBJECT is a vector. #[lisp_fn] fn vectorp(object: LispObject) -> LispObject { LispObject::from_bool(object.is_vector()) } Lever