help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: avoid narrow-to-region (was: Re: replace-regexp)


From: Emanuel Berg
Subject: Re: avoid narrow-to-region (was: Re: replace-regexp)
Date: Sun, 09 May 2021 16:04:54 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

> OK, so now we have one hacker/hacky solution and one
> scientist/scientific, so what is the next step? It is ...
>
> the engineer solution!
>
> Task: separate the material (i.e., the data type) from the
> algorithm, so that the algorithm can be applied to any form of
> data, be it a string, words on a line, lines as we have seen,
> a list of arbitrary elements...

Let's do it like this, if we can get the algorithm to work on
an arbitrary list, then all data-type issues can be solved
easily, by adding two functions, one disassembly function that
splits the data into a list, and one assembly function that
puts it back together, after the algorithm has randomized
it!

So for example if the data is the string "data":

1. "data" -> '("d" "a" "t" "a")
2. run the algorithm, get e.g '("a" "d" "t" "a")
3. '("a" "d" "t" "a") -> "adta"

Because Lisp is already based on the universal data structure
which can express all human knowledge, isn't it possible that
there is already a Lisp list randomizer that fulfills even
Yuri's most uncompromising demands?

-- 
underground experts united
https://dataswamp.org/~incal




reply via email to

[Prev in Thread] Current Thread [Next in Thread]