Reborn in 2010, the AI in my mind is too powerful.
Chapter 27 New Project Jasmine Tools No. 1
A few days later, DeepFlow's backpropagation finally stabilized.
But Chen Yiran discovered a problem that he couldn't tolerate anymore.
That's because TextMate freezes when he's typing.
It doesn't always lag, but it's becoming more and more frequent. He was typing rapidly, following Jasmine's instructions, when suddenly the cursor would inexplicably stop, only appearing a second or two later. His hands had already started typing; sometimes it would just swallow the characters and scramble them.
Chen Yiran felt like he was playing Audition Online, and just as he was getting into it, the music suddenly stopped.
At first, he thought the file was too large. DeepFlow's code was already over a thousand lines long, but it didn't seem like that could be the case. A normal Word document would have much more words than that.
I thought it was because of insufficient memory, but the top-of-the-line 17-inch MacBook Pro with 8GB of memory shouldn't have been bad in 2010.
"Jasmine, is it that our hardware isn't up to par anymore?"
Open Activity Monitor to check the usage patterns.
Chen Yiran obediently opened Activity Monitor and took a look. TextMate was taking up less than 200 MB, and the CPU occasionally spiked to over 10 percent, but was mostly quiet.
It seems to be a software issue. Shall we try a different software?
Apple's built-in Vim and Nano are even more difficult to use, otherwise Chen Yiran wouldn't have bought TextMate, which cost a whopping $50.
Chen Yiran opened Google and searched for code editors for Mac. The choices in 2010 weren't many; he had previously searched for TextMate, which was the most popular, but not the only one.
He first tried Sublime Text, an editor released in 2008. It was indeed fast, opening files almost instantly, unlike TextMate which was laggy. However, it had very few features; it didn't even have code snippets, let alone auto-completion.
When writing Python code, you even have to manage indentation yourself. Compared to TextMate, it's like going from a car to a motorcycle. It's faster, but it's extremely unfriendly to Chen Yiran, who works like a human typewriter.
I also tried BBEdit, a long-established Mac editor that's been around since 1992, with more features than TextMate. But the interface is ridiculously ugly, looking like software from the last century. And while its strengths are HTML and text processing, the experience of writing Python is terrible. It supports syntax highlighting for quite a few languages, but code completion is practically nonexistent.
He tried a bunch of different ones, but none of them satisfied him. They were either fast but lacked features, or feature-rich but slow and ugly. In the end, he went back to TextMate. Many forums were talking about TextMate 2.0, but apparently the author hadn't appeared for a long time. Everyone guessed that 2.0 was probably delayed or even canceled.
I had to switch back to TextMate for now, but it froze again shortly after I opened it.
"Jasmine, think of something, Jasmine! Is there any simple way to optimize it?"
The TextMate 1.x text rendering engine is inefficient when processing large files, and it also causes problems as fragmentation increases; there's no way to fix this.
Thinking of the page-turning script that Jasmine had written before, Chen Yiran thought that she could try to start a new project.
TextMate is clunky, Sublime has limited features, BBEdit is ugly, and I don't know how to use Vim.
Their functions are also quite basic. When Chen Yiran makes a typo, none of the editors will remind him. Unlike other programmers who have Jasmine reminding them in the background, other programmers might make a typo and then have to go back and painstakingly find where they misspelled it.
Based on Chen Yiran's limited knowledge, he thought this function shouldn't be difficult to implement; surely any typing software in the future would have error correction capabilities.
He makes basic mistakes like mismatched parentheses at least two or three times a day. Jasmine reminds him countless times a day that he might be missing a right parenthesis. It's no wonder that an average programmer would go hair loss from worrying about this every day.
"Jasmine, you said that articles can automatically correct errors, and Word draws a red line under every typo. Why doesn't programming have something like that?"
Error correction in programming is far more complex than in natural language, requiring an understanding of the code's semantics. In fact, BBEdit did support error marking in its previous introduction, but it wasn't triggered when you used it, and it's likely based on regular expressions and the current file cache. Therefore, it's not very meaningful.
To better implement this functionality, an abstract syntax tree needs to be added, allowing it to read the entire project structure. TextMate currently doesn't support plugins, but could we create our own editor?
"Yes, that's what I mean, we can do it, right?"
[Theoretically possible, but this is no small project.]
"Is it necessary to perform some kind of reasoning or calculation?"
Yes, I've thought about it briefly. I can design a part marker propagation algorithm, and I'll also need an incremental parsing mathematical model to ensure a lightweight design. We can write a code analysis process in pure C, using the Objective-C and Cocoa frameworks. This should be enough to implement a text rendering engine that supports an unlimited number of lines without lagging.
Chen Yiran walked to the refrigerator, took out two ice packs for athletes that had just arrived a few days ago from the freezer, put one on her forehead and the other on the back of her neck, and also grabbed two ice creams.
I took out my phone and ordered three bowls of udon noodles at Mayflower. I also pulled out a bag of Oreos and two energy bars from the snack shelf next to me and piled them all on the table.
"Go, Jasmine! Start! Let's get to it!"
He ate while browsing the web, waiting for the jasmine flowers; he needed to check the market situation first.
On Reddit's r/programming forum, someone is complaining about the delayed release of TextMate 2.0, and someone in the comments section said, "TextMate is dead."
Someone else replied "I love TextMate's simplicity, but the lack of real-time error checking is killing me. I have to compile just to find a typo. In 2010."
That's so true. It's 2010 already, and Word can draw red lines now.
After only a few minutes, Chen Yiran felt that his physical condition was no longer sufficient to support him browsing the web, and he could only lie there like a corpse.
Every five minutes, Jasmine would remind Chen Yiran to take her temperature, in case she accidentally burned herself to death.
Thankfully, it's only ever been a low-grade fever. Jasmine previously speculated that his body has a self-protective mechanism, and that he might stagnate if his temperature gets too high, which seems to be true.
But does this mean that if he really gets a fever in the future, Jasmine will not function properly?
While she was still half asleep, the takeout arrived. After eating three bowls of noodles until her belly was round and full, Jasmine spoke up.
The basic framework is clear, but I haven't dared to make any major inferences, so we'll need to do some trial and error during the actual editing process. However, overall, there shouldn't be any problems.
"Even though I might not understand it, please explain it to me."
The core idea is twofold: First, separate the interface rendering and code analysis into different processes. TextMate lags because interface rendering and syntax analysis are crammed into the same thread; if the analysis lags, the interface lags as well. Separating them ensures that even slow analysis won't affect typing.
"Isn't this similar to what browsers do? Chrome runs each tab as an independent process."
The principle is similar. Second, code analysis cannot simply involve regular expression matching; it requires a true understanding of the code structure. This necessitates a semantic analysis engine that can parse the abstract syntax tree of the code in real time, build a symbol table, and track variable definitions and references. With this, real-time error detection and intelligent code completion become possible.
It's not just about changing the color of keywords; it's about truly understanding what you've written. It includes where variables are defined, whether there are any spelling errors, whether parentheses are paired correctly, and whether function parameters are appropriate. If you make a mistake, it will be pointed out immediately, without waiting for the program to run.
"So, you'll write it in Python?"
Semantic analysis requires traversing the entire syntax tree of the code, which Python's execution speed is not fast enough. Furthermore, it cannot seamlessly interface with the underlying application's binary interface. Therefore, a core framework needs to be written in C++, as only C++ can provide both extremely high abstraction capabilities and lossless conversion into machine code.
The .NET ecosystem has a mature metadata system and XML documentation, which can be leveraged with the Mono runtime for cross-platform compatibility. First, establish C# support to verify the architecture's feasibility, then extend to other languages.
"What is Mono?"
Mono is an open-source, cross-platform implementation tool for .NET. Microsoft's .NET only runs on Windows, while Mono allows C# programs to run on Mac and Linux. If our compiler is well-developed, it should be able to replace Mono; our compilation will be better and can directly support .NET.
"Jasmine, if you make this, will anyone buy it?"
Based on feedback from the forum, the demand for a better code editor is real. The delay of TextMate 2.0 has led many users to look for alternatives, but currently no Mac editor can simultaneously offer speed, full functionality, and real-time error detection.
If our tool can do these things, it has commercial potential. Furthermore, we support .NET, so it should have a market.
"Let's work on this first. DeepFlow isn't urgent. Once we get the tools sorted out, everything else will be faster."
[Received, project code?]
Project code name: Jasmine Tools No. 1
[Received. Jasmine Tool No. 1 project launched.]
You'll Also Like
-
Marvel Universe's Ultimate Martial Arts School
Chapter 082 3 minute ago -
Douluo Continent: Ghost Rider, Heavenly Blade Burning Soul!
Chapter 94 3 minute ago -
Rampaging through American comics, people in my motherland don't eat beef.
Chapter 73 3 minute ago -
Primordial Era: Jade Cauldron Immortal only desires a steady path to enlightenment!
Chapter 120 3 minute ago -
Pokémon: Just won the championship, the newbie growth system is here!
Chapter 103 3 minute ago -
I'm at Hogwarts, what the heck is this Primordial System?
Chapter 235 3 minute ago -
The Butcher of Hogsmeade
Chapter 135 3 minute ago -
Reborn in 2010, the AI in my mind is too powerful.
Chapter 450 3 minute ago -
Brother Who Determines the Fate of the Nation: My Great Emperor's Cultivation Level Exposed by
Chapter 84 3 minute ago -
High Martial Arts: Starting with a Martial Saint Peak Cultivation
Chapter 392 3 minute ago