v-edit фунциклирует
2025-10-30 20:53Дополировал я текстовый редактор, теперь уже и показать не жалко. Получился красивый код на Си++, и даже кое-как покрытый тестами. Не стыдно людям показать. Не знаю зачем оно может пригодиться, но ещё одна ностальгическая тема закрыта. 😀
github.com/sergev/v-edit

Внутри всё устроено ровно как в древнем Rand Editor. Редактируемые файлы не зачитываются целиком в память. Вместо этого строится компактный список сегментов, облегчающих подчитывание строк файлов по мере необходимости. Изменения в изначальные файлы не вносятся. Модифицированные строки записываются в отдельный временный файл. И только по команде записи в файл происходят перемены. Изначальный редактируемый файл foo переименовывается в бэкап foo~, а в новый foo записываются все строки по порядку, как изменённые (из временного файла), так и прежние (из старого файла). Таким образом обеспечивается устойчивость к сбоям: в любой момент, что бы ни случилось с компьютером, на диске имеется как минимум одна правильная копия файла.
Причём результаты редактирования тоже не теряются при сбое. Всякое действие редактора записывается в файл журнала. После сбоя этот журнал можно "проиграть" заново, получив из старого файла новый со всеми правками. Это я ещё не тестировал, правда.
Cursor в прошлые выходные глючил нещадно. Я даже разочаровался и переключился на Cline с горя. Это такой плагин для VS Code, от claude.ai. Он тоже приемлемо работает. Но вчера Cursor выкатил новую версию 2.0, я поставил и порадовался. Ничего не глючит, и кодит заметно умнее, чем Cline. Отличный инструмент.
github.com/sergev/v-edit

Внутри всё устроено ровно как в древнем Rand Editor. Редактируемые файлы не зачитываются целиком в память. Вместо этого строится компактный список сегментов, облегчающих подчитывание строк файлов по мере необходимости. Изменения в изначальные файлы не вносятся. Модифицированные строки записываются в отдельный временный файл. И только по команде записи в файл происходят перемены. Изначальный редактируемый файл foo переименовывается в бэкап foo~, а в новый foo записываются все строки по порядку, как изменённые (из временного файла), так и прежние (из старого файла). Таким образом обеспечивается устойчивость к сбоям: в любой момент, что бы ни случилось с компьютером, на диске имеется как минимум одна правильная копия файла.
Причём результаты редактирования тоже не теряются при сбое. Всякое действие редактора записывается в файл журнала. После сбоя этот журнал можно "проиграть" заново, получив из старого файла новый со всеми правками. Это я ещё не тестировал, правда.
Cursor в прошлые выходные глючил нещадно. Я даже разочаровался и переключился на Cline с горя. Это такой плагин для VS Code, от claude.ai. Он тоже приемлемо работает. Но вчера Cursor выкатил новую версию 2.0, я поставил и порадовался. Ничего не глючит, и кодит заметно умнее, чем Cline. Отличный инструмент.

no subject
Date: 2025-10-31 06:37 (UTC)no subject
Date: 2025-10-31 06:50 (UTC)no subject
Date: 2025-10-31 08:48 (UTC)no subject
Date: 2025-10-31 18:09 (UTC)no subject
Date: 2025-10-31 10:50 (UTC)no subject
Date: 2025-10-31 11:01 (UTC)Напримѣръ, не понимаетъ совершенно типовъ, вмѣсто типовъ орiентируется на имена перемѣнныхъ. Скажемъ, user id - это всегда какой-то id, и навѣрно version id тоже такой же id. Хотя въ кодѣ написано, какого типа каждая перемѣнная, но написано это черезъ нѣсколько уровней абстракцiи и этого ИИ уже не понимаетъ. Но если ему указать - "перечисли, какого типа каждая перемѣнная вотъ здѣсь" - онъ начинаетъ это искать и перечисляетъ. Потомъ сказать - "а теперь исправь ошибки, видя эти типы". Тогда уже исправляетъ.
А сложная логика - она и для человѣка сложна. Потому что мы имѣемъ дело съ алгоритмически неразрѣшимыми задачами - найти правильно работающую программу для такихъ-то условiй.
no subject
Date: 2025-10-31 11:26 (UTC)no subject
Date: 2025-10-31 18:12 (UTC)no subject
Date: 2025-11-01 08:04 (UTC)In principle, or just for now?
no subject
Date: 2025-11-01 10:31 (UTC)- in principle or just for now?
я не до конца понимаю мысль Щорса
но имею чувство, что технология ЛЛМ подошла к границе технологически разумного и каждый наворот будет экономически невыгоден
если генерация по запросу будет стоить в среднем $1000 на попытку, то человеки будут банально дешевле, на порядок
мы пока не видим настоящих цен -- "опен" (какая ирония!) АИ пока демпингует
может будут отбивать через "ЛЛМ дороже, ЗАТО..."
no subject
Date: 2025-11-01 11:02 (UTC)- LLMs can't get the number of fingers right
- in principle or for now
с остальным согласен, что на каком-то этапе будет экономический барьер.
no subject
Date: 2025-11-01 14:02 (UTC)The big AI models are able to see patterns of different kinds. The neural architecture ("transformers + attention + something else") determines what kinds of patterns will be found. An example of a "pattern" is:
A1 B A1 C A1 D A1 E
A2 B A2 C A2 D A2 E
and so on. In this pattern I would say there is "one level of abstraction". We see that "B C D E" follows "A1" repeated, then the same thing follows "A2" repeated, etc. We say "B C D E follows some X in this way, where X goes over A1, A2, etc." We have a loop of depth 1 over "X" here.
So, my intuition is that the neural architectures trained on various documents and on source code will learn those kinds of abstractions up to a certain level. The Cursor's model understands what it means to "add a new column to the database, and also add relevant data types to those data structures over there, and then simplify the logic in the code over here, because now we have a new column and it can be used instead of blah".
But at some point when complexity grows it can't figure out what to do. My guess is that the neural architecture is limited in its abstraction capability, because ultimately it isn't based on abstraction, it is just based on sophisticated pattern matching. It's similar to the limitation that regular expressions can't parse context-free grammars. They can parse only up to a given max nesting level but not at arbitrary level.
To increase the abstraction capability, we need to change the neural architecture and train a foundation model again.
My guess is that if we change the neural architecture to something more complicated then it will require even more training, and right now there isn't enough training material, we already exhausted all available texts online, books, articles, github repositories, everything is already used for training. Based on this intuition, I don't expect a better abstraction capability.
However, there might be some breakthroughs in new architectures so that training doesn't require much more material than now. I'd say, one needs to increase the abstraction depth to about 10 or 20, but now it's around 2 or 3. Is it possible? Nobody knows, and people are surely trying to do this.
no subject
Date: 2025-11-01 16:07 (UTC)Another variable here is the size of context. Right now that's typically in tens of thousands of tokens - which is tens of kB of text, so to speak. So it's not easy to tell if 2-3 levels of abstraction is because of the architectural problems or that's just what fits in those 10k tokens of context.
no subject
Date: 2025-11-03 20:49 (UTC)So, to me this shows how LLMs work: they do some sophisticated pattern-matching at a fixed "abstraction depth". The Hanoi puzzle with n towers will require a stack-based recursion with depth n. We can directly measure the "abstraction depth" of an LLM by giving it a recursive problem that requires the stack depth n.
no subject
Date: 2025-11-03 23:22 (UTC)Think of it as of a complicated evolution matrix. A bit like a matrix for generating Fibonacci numbers (or some other recurrent sequence). You can churn out one number at a time.
So the "levels of abstraction" are really there only if they are encoded in the matrix - you can't teach it new tricks, the matrix is fixed. The rest is context - the vector of previous Fibonacci numbers. "It" doesn't extract abstractions, it only churns out new numbers, given the preceding few numbers.
So it doesn't "know" how to solve Hanoi towers, it only "knows" how to produce a solution it ingested from a book on Hanoi towers.
no subject
Date: 2025-11-04 08:29 (UTC)You can formulate a question that is equivalent to Hanoi towers but in completely different terms, not involving towers and not involving moving disks. But such that the algorithm will be functionally the same, 2^n steps required to solve a problem of size n, recursion required with stack of depth n. Then the AI will also recognize how to solve it but only up to n = 3 or n = 4 or so.
You can ask AI to translate ASCII diagrams into Latex equations, say. This is not something it has ingested verbatim from any training text. But it has ingested what Latex equations look like and it has ingested what ASCII corresponds to Latex. So, you can ask AI something like this:
The result is correct:
\frac{\Gamma \vdash a \to c \quad \Gamma \vdash b \to c}{\Gamma \vdash a + b \to c}This is what I call "zero-order" abstraction. It knows how to substitute specific Latex parts and you give a pattern that uses those parts in arbitrary ways. There is no recursion ("recursion depth is 0"). Any AI today does very well on such tasks.
no subject
Date: 2025-11-04 21:48 (UTC)This is all very well, but we don’t know the training dataset and the method. It couldn't have figured out what Gamma looked like without seeing a pattern for it first.
no subject
Date: 2025-11-04 08:40 (UTC)Here's a paper explaning how we can **perhaps* achieve recursive reasoning with AI. Far from obvious that it will give us general recursive reasoning, but at any rate this is far from what ChatGPT & co. are doing.
no subject
Date: 2025-11-04 18:15 (UTC)no subject
Date: 2025-11-04 19:41 (UTC)Modern efforts to bring formal, rule-based, recursive reasoning into modern LLMs have so far brought no tangible results. There are several startups claiming to work on this, and several academic research groups. We'll just have to wait and see. It is not clear that we understand how to do it. The paper linked above is an attempt to do something, but it's far from clear that it is going to be successful.
Pretty tangible results
Date: 2025-11-05 00:41 (UTC)"We can confirm that Google DeepMind has reached the much-desired milestone, earning 35 out of a possible 42 points — a gold medal score. Their solutions were astonishing in many respects. IMO graders found them to be clear, precise and most of them easy to follow."
- said IMO President Prof. Dr. Gregor Dolinar.
https://deepmind.google/blog/advanced-version-of-gemini-with-deep-think-officially-achieves-gold-medal-standard-at-the-international-mathematical-olympiad/
no subject
Date: 2025-11-04 21:37 (UTC)no subject
Date: 2025-11-04 21:56 (UTC)Can Gemini print the list of correct moves? Does it use Python to do that? That would be smart, of course.
Another test is the logic formulas.
The correct answer is "no" because the second statement leaves out Erin, and it could be that everyone is blonde except for Erin.
Gemini 2.5 Flash: Yes, we can definitely say that the statement is true. (Long bullshit explanation about De Morgan's laws... which it did not apply correctly.)
Gemini 2.5 Pro: No, we cannot necessarily say that. (correct explanation and a correct example)
no subject
Date: 2025-11-04 22:18 (UTC)Yes. That is, it does print the full list for small number of steps, but for 9 it generalises to moving 8 to auxiliary peg, then the 9th to the target peg, and how to move the rest on top of 9.
> Does it use Python to do that?
Don't know
no subject
Date: 2025-11-05 09:25 (UTC)It could be that the LLM has learned from some tutorials where it was described that you first move n to an auxiliary free peg, then move n+1 to the target peg, etc., and the LLM just repeated that text with n = 8.
I gave LLMs problems that they surely could not have seen in any tutorials. Couldn't solve.
no subject
Date: 2025-11-01 16:50 (UTC)