Live data from Hacker News

Slap – A Sublime-like terminal-based text editor

github.com

91–100 of 123 posts

Re: Slap – A Sublime-like terminal-based text editor

#91

Earlier quoted context omitted.

How often are you in situations where you can't run the editor/IDE you want? I haven't encountered this for years except the rare times I'm forced to do some editing over SSH (which is far too low-level for server management than I'd like).

If you have to edit over SSH then you can do an sshfs mount instead. sshfs @ : ≤mountpt≥

Tramp mode in emacs is what I use.

Re: Slap – A Sublime-like terminal-based text editor

#93

Earlier quoted context omitted.

I think the benefit is exactly the keybindings. And the fact that it is non-modal. It works like a text field in a desktop GUI, there is almost no state. You can't mess the state up. Contrast it to vim, where I got into the habbit of bashing ESC three times to be sure I'm not in a mode. Or emacs, which is nice until it's abstractions leak, and you accidentially start editing a configurations pane or something. I am a…

Why would you leave yourself in this low practiced state? Ie you don't spend the time to become fluent, so it's always "thinking" instead of being able to just do. Incidentally you should always always leave the insert mode when you are done typing. You are never confused about state because your default is "normal mode".

I'm always confused as a 30 year emacs user, in which "Normal mode" is insert mode as it is in every other text editor/word processor. Vi[m] is backwards in comparison and while clearly it's possible to learn it to the point it makes sense, I think for people who use it only occasionally it's very awkward.

Re: Slap – A Sublime-like terminal-based text editor

#94
post #73

> Issues: [...] Slow on single cores, Raspberry Pi A text editor that is slow on 1GHz single-core machines. What a time to be alive.

I was very puzzled about that too, so I looked at the repo and... it's written in Javascript.

No wonder.

Re: Slap – A Sublime-like terminal-based text editor

#96
post #73

> Issues: [...] Slow on single cores, Raspberry Pi A text editor that is slow on 1GHz single-core machines. What a time to be alive.

I was very puzzled about that too, so I looked at the repo and... it's written in Javascript. No wonder.

yeah, I clicked to the colored bar to see the distribution of languages in the repo, expecting to see C/C++ or even Pyhthon, and was shocked to see that 96.5% is javascript.

Well, that explains such an extensive list of features, I guess..

Re: Slap – A Sublime-like terminal-based text editor

#97
post #73

> Issues: [...] Slow on single cores, Raspberry Pi A text editor that is slow on 1GHz single-core machines. What a time to be alive.

Also: A terminal-based text editor written on top of node using parts of Atom. Well, I'll give it a try if I have some time. I'm very curious what those "amazing features that make you drop Emacs" might be ;-) Edit: Actually, does anyone know what the problem with a single core might be? If it's written in Javascript, it can't be that strongly relying on concurrency, can it? Or is it just the fact that it has to shar…

React Blessed is a really fun library too! Makes terminal tools a bit easier to write

Re: Slap – A Sublime-like terminal-based text editor

#98
post #73

> Issues: [...] Slow on single cores, Raspberry Pi A text editor that is slow on 1GHz single-core machines. What a time to be alive.

Agreed! I wish the sources of CygnusEd (Amiga) were open. Those guys nearly 30 years ago made a graphical text editor which on a 16 bit CPU clocked at 8MHz run circles around most today editors on 32/64 bit CPUs clocked over two orders of magnitude higher. Do we have to count optimization as a forgotten art, at least among non system developers?

Only programmer time/effort matters anymore, to hell with the end users time, productivity, battery life and whatever other applications they happen to be running.

Re: Slap – A Sublime-like terminal-based text editor

#99
post #96

Earlier quoted context omitted.

I was very puzzled about that too, so I looked at the repo and... it's written in Javascript. No wonder.

yeah, I clicked to the colored bar to see the distribution of languages in the repo, expecting to see C/C++ or even Pyhthon, and was shocked to see that 96.5% is javascript. Well, that explains such an extensive list of features, I guess..

I'm not saying that JavaScript is an efficient choice, especially when likely depending on a gazillion NPM modules... but do you realise that python is actually an order of magnitude slower than JavaScript these days? unless the body of your performance sensitive code is within a python library python is very slow. I find the problem with most slow javascript is poorly written code and an unnecessarily deep dependency tree (NPM are not flat dependencies !).

Re: Slap – A Sublime-like terminal-based text editor

#100
post #73

> Issues: [...] Slow on single cores, Raspberry Pi A text editor that is slow on 1GHz single-core machines. What a time to be alive.

Agreed! I wish the sources of CygnusEd (Amiga) were open. Those guys nearly 30 years ago made a graphical text editor which on a 16 bit CPU clocked at 8MHz run circles around most today editors on 32/64 bit CPUs clocked over two orders of magnitude higher. Do we have to count optimization as a forgotten art, at least among non system developers?

This brought memories! There's a video on Youtube showing CED in action... Ladies and gentlemen, this is how a graphical text editor scrolled text 30 years ago on a 8 MHz 16 bit machine!

https://www.youtube.com/watch?v=L41oIvre9K0

Post reply on HN