GM
Can we stop beating around the bush and admit that code is not only written less and less but also READ less and less by developers?
The best way to be token efficient is not going through the hoops of changing the input media but either using/having a language that is token efficient by nature (we're so back brainfuck chads) or by straight up programming (or letting program) with embeddings and vectors.
https://pagewatch.ai/blog/post/llm-text-as-image-tokens/
Login to reply
Replies (1)
i'm finding that the simplicity and stability of language APIs has a direct correspondence to the amount of tokens the model has to generate, and thus the cost. svelte was way faster and more correctly implemented than react, for example, especially the way svelte lets you easily modify the CSS and find code by the distinctive CSS selectors, this is not as simple in react because it has a much more sprawling API.
what we need is a programming language that LLMs are good at writing out of natural language descriptions. like, a benchmark of a task done with a model using various languages, including using stuff like claude skills or other quick reference to steer the model.
to be honest, i think that this language might be assembler tho. something in the spectrum between Assembler, BASIC, Fortran and Go. Fortran style especially. brainfuck, and i forget the name of that other one... APL? yeah, APL is grandpappy of brainfuck:
https://en.wikipedia.org/wiki/APL_(programming_language)
Simple statistics
Suppose that X is an array of numbers. Then (+/X)÷⍴X gives its average. Reading right-to-left, ⍴X gives the number of elements in X, and since ÷ is a dyadic operator, the term to its left is required as well. It is surrounded by parentheses since otherwise X would be taken (so that the summation would be of X÷⍴X—each element of X divided by the number of elements in X), and +/X gives the sum of the elements of X. Building on this, the following expression computes standard deviation:
```
((+/((X - (+/X)÷⍴X)*2))÷⍴X)*0.5
```
Naturally, one would define this expression as a function for repeated use rather than rewriting it each time. Further, since assignment is an operator, it can appear within an expression, so the following would place suitable values into T, AV and SD:
```
SD←((+/((X - AV←(T←+/X)÷⍴X)*2))÷⍴X)*0.5
```
nah, i think that the LLM would struggle as much with a language like this as objects and inheritance.
i may at some point have to try writing a benchmark for a simple coding task to produce something somewhat useful, and then side by side compare it doing it using different languages, count the tokens and the total time of production, and see just how much bad grammar costs you.