Live data from Hacker News

Show HN: Phi-editor, a text editor implemented in Go and SDL

github.com

21–30 of 36 posts

Re: Show HN: Phi-editor, a text editor implemented in Go and SDL

#21
post #19

Earlier quoted context omitted.

The hard part about a text editor in graphics mode is not the character drawing (that had been figured out in the 8 bit days) but the scrolling. Unless you had hardware support for scrolling by being able to set the start-of-screen address scrolling could take forever.

Was it? Smooth scrolling like what in Commander Keen was hard. Janky scrolling by one line at a time like a text editor probably wasn't that bad if I recall correctly. I guess I really just meant tedious when I mentioned that kind of work. It's not the kind of usual engineering solution when one first thought about the issue at hand. It breaks most usual assumption about how you solve the problem. It's like when some…

It's slow because if you don't have hardware support you end up moving around fairly large chunks of memory, and if you do it 'smoothly' you end up doing that 10 to 16 times more frequently still! It wasn't rare at all to see text editors not being able to keep up with the keypresses when scrolling up or down.

Re: Show HN: Phi-editor, a text editor implemented in Go and SDL

#22
post #13
post #7

A text editor that renders text the hard way... Cool! Talking about editors that do crazy stuff, I have a story about the de-facto text editor in Vietnam in the 80s-90s called BKED. That editor runs on MS-DOS and looks just like edit.com [1], except for it displays and allows the user to input text in Vietnamese. Nothing really quite special at the first glance. The Vietnamese alphabet is Latin-extended, and it needs…

That was unexpected, to see BKED being mentioned here! I was about 6 years old when I first used it (that, and a nice game called "bum"). This brings back so much memories. And to think that it had this much history behind its programming! Amazing. Definitely should poke the author into releasing the source code for next generations to have a look at it.

I bet every relatively complex program that ever tried to display Vietnamese chacters had to do something wonky at some point. There might have been more amazing engineering stories. They just don't get told very often because of the sanction and lack of communication in the olden days. Part of what I want to do in life is to document as many of those amazing stories as possible before they got lost.

Remember the BKAV splash screen with the running green man in DOS? I have never wondered why a TUI program like BKAV would bother going around just to make a graphical screen just to display a useless running man. Now as I thought about it, it perhaps was because the author faced the same issue, so it's just another graphical program pretending to be a textmode one. The running man is perhaps just because he could do it while he was at it.

Re: Show HN: Phi-editor, a text editor implemented in Go and SDL

#23
post #5

"Phi is a minimal text editor designed to look pretty, run fast, and be easy to configure and use. It's primary function is for editing code." "The editor is written as if it's a game, so it will probably eat up your battery, as well as run possibly quite slow - especially if you dont have a dedicated GPU - and probably crash frequently." Can't quite understand what it wants to be, a fast editor that's minimal or one…

My guess (hope) is that Phi is just very new and alpha, and that the author was trying to say "it might eat your homework." Nevertheless, contrast that with Xi, another new, modern text editor written in Rust: > Incredibly high performance. All editing operations should commit and paint in under 16ms. The editor should never make you wait for anything. > Reliability. Crashing, hanging, or losing work should never hap…

I love what Xi's trying to do, but last time I tried the OS X frontend, it was very, very slow on large files.

I think the Phi page is just including "current state of editor" as well as "aimed for state of editor" in the README.

Re: Show HN: Phi-editor, a text editor implemented in Go and SDL

#24
I found it interesting to just glance at the code, having never touched Go (but familiar with SDL). Some day I will find the time hack around in one of these new languages, whether it be Go or Rust or Red or Perl6 .. :)

I have some trouble understanding the rationale for using SDL_ttf in an editor implementation, though. Did you just cut shaping, bidirectional text and font fallback as acceptable losses, or is it on the roadmap? If so, what is your strategy?

Re: Show HN: Phi-editor, a text editor implemented in Go and SDL

#25

"Phi is a minimal text editor designed to look pretty, run fast, and be easy to configure and use. It's primary function is for editing code." "The editor is written as if it's a game, so it will probably eat up your battery, as well as run possibly quite slow - especially if you dont have a dedicated GPU - and probably crash frequently." Can't quite understand what it wants to be, a fast editor that's minimal or one…

I don’t know anything about this editor other than what’s in the readme, but I can make an educated guess.

It can be a minimal and fast editor in terms of text operations.

It can be a heavy and slow editor in terms of screen rendering.

There is no inherent reason why, as it matures, it couldn’t become lighter and faster overall compared to other editors, since it actually uses available modern hardware.

Re: Show HN: Phi-editor, a text editor implemented in Go and SDL

#26
post #7

A text editor that renders text the hard way... Cool! Talking about editors that do crazy stuff, I have a story about the de-facto text editor in Vietnam in the 80s-90s called BKED. That editor runs on MS-DOS and looks just like edit.com [1], except for it displays and allows the user to input text in Vietnamese. Nothing really quite special at the first glance. The Vietnamese alphabet is Latin-extended, and it needs…

Consider that there were 80-column "hacks" for even the Commodore 64 (using a 1MHz 6510) that did this: emulate text mode on a high res (for C64) graphics screen.

M68k 7.16Mhz/8MHz Amiga's didn't have a text mode.

The amount of data to copy to scroll text wasn't that huge even in graphics modes.

Re: Show HN: Phi-editor, a text editor implemented in Go and SDL

#27

Earlier quoted context omitted.

Xi is orders of magnitudes more mature than Phi. You can't compare 76 contributors and 1128 commits vs 1 contributor and 103 commits.

Of course you can compare them. One is way more mature, use that.

If you thought they were trying to determine which one to use, you misread the situation.

Re: Show HN: Phi-editor, a text editor implemented in Go and SDL

#28
post #23
post #5

Earlier quoted context omitted.

My guess (hope) is that Phi is just very new and alpha, and that the author was trying to say "it might eat your homework." Nevertheless, contrast that with Xi, another new, modern text editor written in Rust: > Incredibly high performance. All editing operations should commit and paint in under 16ms. The editor should never make you wait for anything. > Reliability. Crashing, hanging, or losing work should never hap…

I love what Xi's trying to do, but last time I tried the OS X frontend, it was very, very slow on large files. I think the Phi page is just including "current state of editor" as well as "aimed for state of editor" in the README.

We've done quite a bit of performance work, and there's a bit more in the pipeline, especially horizontal scrolling of very large lines. Some of the slowness at the latter is performance bugs in CoreText; we're considering more aggressively working around those. If you're still seeing slow performance, please file an issue.

Re: Show HN: Phi-editor, a text editor implemented in Go and SDL

#29
post #7

A text editor that renders text the hard way... Cool! Talking about editors that do crazy stuff, I have a story about the de-facto text editor in Vietnam in the 80s-90s called BKED. That editor runs on MS-DOS and looks just like edit.com [1], except for it displays and allows the user to input text in Vietnamese. Nothing really quite special at the first glance. The Vietnamese alphabet is Latin-extended, and it needs…

Van Suwannukul wanted to complete his Ph.D. thesis in Thai. But he found that the then-new IBM PC was not up to working in the Thai alphabet. So first, he designed a graphics card (the Hercules) capable of displaying Thai characters in high resolution on an MDA display...

Re: Show HN: Phi-editor, a text editor implemented in Go and SDL

#30
post #23

Earlier quoted context omitted.

I love what Xi's trying to do, but last time I tried the OS X frontend, it was very, very slow on large files. I think the Phi page is just including "current state of editor" as well as "aimed for state of editor" in the README.

We've done quite a bit of performance work, and there's a bit more in the pipeline, especially horizontal scrolling of very large lines. Some of the slowness at the latter is performance bugs in CoreText; we're considering more aggressively working around those. If you're still seeing slow performance, please file an issue.

cool to hear. i will check out the latest, and report perf problems, if any.

(i hope my comment didn't come across as overly negative. i am very excited about xi! :-)

Post reply on HN