Live data from Hacker News

Black Screen: A modern terminal emulator based on Electron

github.com

71–80 of 97 posts

Re: Black Screen: A modern terminal emulator based on Electron

#71
post #70

Hello. I'm the author of Black Screen, and I'm upset this post has appeared on Hacker News. The terminal is at a very early stage; I don't even use it by myself. Although, it's nice to see that people show some interest.

Can you use another npm namespace? . npm install black-screen is far better t'han "install-all" for many reasons: better npm search, no namespace pollution, more semantic than such a generic name. Please consider to change it.

I'm afraid you misunderstood the command. The package is named correctly - black-screen. Install-all is a local npm script, that's why you run it with `npm run`.

Re: Black Screen: A modern terminal emulator based on Electron

#72

Hello. I'm the author of Black Screen, and I'm upset this post has appeared on Hacker News. The terminal is at a very early stage; I don't even use it by myself. Although, it's nice to see that people show some interest.

You should probably put a note saying as much at the top of the README. Pretty cool looking project though, I have been thinking about something like this for a while now. The two biggest problems seem to be performance(I spawn throwaway shells all the time, so my terminal emulator need to open pretty much instantly), and fully compatibility(I use vim in the terminal as my main editor). I'll be watching to see how it…

Thank you for your kind words. Spawning a shell shouldn't be a performance bottleneck as long as you create a new tab or pane, and not a new application instance. By the way there is a (very) experimental support of panes, press cmd + _ to split horizontally.

By biggest concern is how to cat a 50MB file. If you try it now, everything gets stuck.

Re: Black Screen: A modern terminal emulator based on Electron

#73
post #69

Hello. I'm the author of Black Screen, and I'm upset this post has appeared on Hacker News. The terminal is at a very early stage; I don't even use it by myself. Although, it's nice to see that people show some interest.

I feel really sorry for the inconvenience, I just wanted to share your awesome project.

I should thank you for the post. It reassured me I'm doing something people are interested in.

Re: Black Screen: A modern terminal emulator based on Electron

#74

Earlier quoted context omitted.

It does indeed support ANSI codes. Not fully compatible with VT100 yet, but that's where I'm moving. Vim is functioning, but there are a lot of bugs. https://dl.dropboxusercontent.com/spa/dlqheu39w0arg9q/xxy316... The problem with terminfo is that not every tool relies on it. I've seen many examples (hello, exa), when the codes are hard-coded to operate with xterm-256. So, I decided to pretend to be an xterm.

Hey thanks for replying & I hope my comments didn't seem snooty. I've thought a lot about how to solve this problem and was disappointed by the way some past attempts have just ignored the infrastructure that ensconses current terminals. And its a real shame that so many tools just hard-emit ANSI escape codes - there are even some TUI frameworks that do it. The problem I see is that you seem to have the terminal doin…

Hey. Not snooty at all. I understand your pain: once I tried to open Vim in this Kickstarter terminal project - Xiki - and was disappointed in the same way.

Perhaps unexpectedly, Black Screen is both a terminal emulator and a shell. I tried hard to avoid going with writing a shell, but the existing ones simply don't fit. It's even hard to know when a child execution has finished. And I want smart autocompletion, so I have to at least extend a shell.

Traditionally these two are separated, and it must be a good design, but my current goal is to prove the concept. Perhaps, later I'll extract the shell.

Re: Black Screen: A modern terminal emulator based on Electron

#75

One of these seems to pop up every few months, which is great, terminals are old crusty awful things, but it seems like they always die out in development before they can run existing things like Vim which makes them fun POC's and not much else :/

The thing is, the web stack is not how to do it (for a prototype, maybe).

As they say above, this thing would halt when you cat a 50MB file.

It takes someone who's familiar with terminals, and can use a language fit for the task (and without too many depenedencies -- so if you built it in Haskell and I need the Platform and half of Cabal to build it, it will never fly -- and it being in Haskell it will not attrack many UNIX hands, who are the people familiar with Terminals most).

So something like C, C++, Rust or Go.

Re: Black Screen: A modern terminal emulator based on Electron

#76
post #41

I see it is buzzword-compliant, but what is it good for?

Ha-ha, I get that a lot after telling about React and Electron. Initially I was thinking about Swift + Cocoa, but I figured CSS would give me more flexibility in designing the UI, and it would allow more people to write plugins. Everybody knows JavaScript, right?

So, I use a terminal emulators pretty extensively, and I'm tired of their dumbness. Compare any operating system from 1980 and 2015 - there is a huge difference. The same with web-sites, text editors, and pretty much any other category of software. Except terminals. The biggest achievement they made is 256 colours support. Good job!

It doesn't take a genius to understand that the limitations are caused by the text user interface. Of course, text is a great and universal tool. It's easily parsable (or not so easily, but still parsable). It can be piped, after all.

But who said we can't take the good old text and present it beautifully? Imagine you fired an sql client, wrote a select statement and received an ASCII table as an output. Wouldn't it be useful if the terminal understood that it looks like a table and converted it into an HTML table, with sorting by any column, resizing, filtering, and everything else. The same with XML, JSON and every other format: why should I type `jq` after a command that outputs JSON? Is that so hard to just detect and parse it for me?

Output formatters was the idea that made me start the development. I also plan to let users write custom formatting plugins.

But even besides that point there is a lot of room for improvement in current terminal emulators. For example, I have a git branch displayed in RPROMPT of my ZSH. It works well, but if I checkout another branch from a different place, my shell will still show the old branch, which can have certain consequences, if you rely on it.

The current feature I work on is autocompletion. I plan to parse man files and provide only what can be displayed in that place. By the way, folks from the Fish team do the same.

Unfortunately, right now Black Screen can not be used as a replacement for your favourite terminal, it has a long path to the first release.

Re: Black Screen: A modern terminal emulator based on Electron

#77

One of these seems to pop up every few months, which is great, terminals are old crusty awful things, but it seems like they always die out in development before they can run existing things like Vim which makes them fun POC's and not much else :/

> terminals are old crusty awful things

Not really, they're just poorly documented. They're based on ad-hoc standards that are scattered across many outdated documents.

It'd be nice if somebody could actually pull all that together and publish one comprehensible document that is readable and up-to-date.

Re: Black Screen: A modern terminal emulator based on Electron

#78
post #75

One of these seems to pop up every few months, which is great, terminals are old crusty awful things, but it seems like they always die out in development before they can run existing things like Vim which makes them fun POC's and not much else :/

The thing is, the web stack is not how to do it (for a prototype, maybe). As they say above, this thing would halt when you cat a 50MB file. It takes someone who's familiar with terminals, and can use a language fit for the task (and without too many depenedencies -- so if you built it in Haskell and I need the Platform and half of Cabal to build it, it will never fly -- and it being in Haskell it will not attrack ma…

No, I think integrating the web stack in a terminal is one of the better options. You'll get a lot of nice things that already work, e.g. serialization (HTML/CSS/JS/JSON), debugging (webkit dev tools, if you use webkit to render you terminal), libraries that are useful for terminal based apps (d3.js) and nice font rendering to only name a few.

`cat 50mbfile` will not halt a web based terminal if you don't keep it all in the scrollback buffer.

Re: Black Screen: A modern terminal emulator based on Electron

#79

Earlier quoted context omitted.

I think GP's post was tongue-in-cheek; I read it that way, anyway.

Ah, too subtle for me. There are enough people looking at the world through the lens of "everything should be on the web" that it doesn't seem entirely crazy to have the browser as the display target.

I read the comment as being satirical but I find the best satire is that which could be mistaken for the genuine article.

https://en.wikipedia.org/wiki/Poe's_law

Re: Black Screen: A modern terminal emulator based on Electron

#80
post #12

Earlier quoted context omitted.

But still, even with electron, it’s performance will be horrible. Several hundred MB RAM usage for a single Terminal window are just not acceptable. Somehow many devs today write their software under the assumption that a user with 2GB RAM or 4GB RAM will at all times only run one single piece of software.

I liked the JavaScript IRC client which uses like 400MB of memory.

Exactly. And this is somehow acceptable, or even "industry standard" today.
Post reply on HN