HNHacker News
TopNewBestAskShowJobs

shockone

132 karma · joined September 6, 2015

submissionscomments
shockone··on Upterm – A terminal emulator and interactive shell based on Electron
Sorry about that. I believe Electron is the best cross-platform UI framework. And TypeScript is an amazing language.
shockone··on Upterm – A terminal emulator and interactive shell based on Electron
It works differently: we just create a new shell session for each command. We create a non-interactive session without reading config files to make it fast and pass it appropriate ENV, which we maintain.
shockone··on Upterm – A terminal emulator and interactive shell based on Electron
As of history and failed commands, it should work as you describe, it must be a bug. https://imgur.com/a/BKz5O
shockone··on Upterm – A terminal emulator and interactive shell based on Electron
This is a great piece of feedback, thank you so much!

We do utilize a login shell for executing commands, but we only support Bash and ZSH. So, it's a real Bash. However, there are some complications with environment interpolation and built-in commands; it's a known bug and we're working on it.

Unfortunately, I don't see how to allow using custom shells while providing a better command entering experience (i.e. zle or readline replacement). The core issue is that shells' interface is too primitive: it only consists of three streams with no per-job separation or anything; I wish Bash had a programmatic or REST-like interface.

shockone··on Upterm – A terminal emulator and interactive shell based on Electron
Thanks for the feedback! It's true that we're far from where we want to be, but we're steadily - event if slowly - moving into that direction.

Also, we recently integrated monaco-editor by Microsoft, so editing is much less clunky than it was before.

shockone··on Upterm – A terminal emulator and interactive shell based on Electron
Actually using both apps.
shockone··on Upterm – A terminal emulator and interactive shell based on Electron
In my opinion, Qt and wxWidgets apps look ugly. At least I never saw one that looks beautiful.
shockone··on Upterm – A terminal emulator and interactive shell based on Electron
Thanks, I'll take a look at it. Although, it seems to only show a single best match, unlike IntelliSense.
shockone··on Upterm – A terminal emulator and interactive shell based on Electron
It's a known bug, please vote to fix it faster. Variables interpolation doesn't work in built-in commands at the moment. https://github.com/railsware/upterm/issues/597
shockone··on Upterm – A terminal emulator and interactive shell based on Electron
It's theoretically possible to have all the Upterm niceties over SSH, but not possible at the moment. As of screen and tmux, we have no plans to integrate with them.
shockone··on Upterm – A terminal emulator and interactive shell based on Electron
Yes there is a gitter channel: https://gitter.im/upterm/Lobby
shockone··on Upterm – A terminal emulator and interactive shell based on Electron
We kind of experimented with parsing man files, but it'll never be as good as manually crafted suggestions: you can do stuff like suggest changed files for "git add", tokens from diff for "git commit" message, show process names for "kill", and much more. The vision is to have manual suggestions for at least the most popular tools.
shockone··on Upterm – A terminal emulator and interactive shell based on Electron
I wish the same autocompletion could be achieved in ZSH. Then I wouldn't start this project at all. The problem with ZSH is that you have to

* Make a decision you want completion.

* Press tab for it to appear.

* Guess when your token is precise enough to be unambiguous or else cycle through results.

Not to mention fuzzy search.

It may sound as not that much of an overhead, but it's so much slower than what I have in, say, Intellij IDEA.

shockone··on Upterm – A terminal emulator and interactive shell based on Electron
It's your choice, of course, but in my opinion Electron is the only decent cross-platform UI framework. Without Electron there would be no Linux version.
shockone··on Upterm – A terminal emulator and interactive shell based on Electron
Surprisingly it has pretty moderate resource usage. I have both iTerm and Upterm running on my laptop, here are the stats. Of course, your mileage may vary.

https://imgur.com/a/bwD06

shockone··on Upterm – A terminal emulator and interactive shell based on Electron
Performance is definitely worse than in iTerm or gnome-terminal, but it's improved a lot in recent Upterm versions, and we plan to improve it further. I'd say it's good enough, but you can try yourself.

Recently there was this terminal performance test https://danluu.com/term-latency/

The author says that the most important things are typing delay and how quickly you can Ctrl+C a command, not how much text it prints per second. Upterm is good at both.

shockone··on Upterm – A terminal emulator and interactive shell based on Electron
Hyper is a pure terminal emulator; it only displays what your shell tells it to display. We aim to deeply integrate with a shell or even replace it for better experience. One of the most notable benefits is as-you-type intellisense completion with fuzzy search and stuff. There are some animations on the releases page: https://github.com/railsware/upterm/releases
shockone··on Upterm – A terminal emulator and interactive shell based on Electron
I'm afraid it's not going to happen any time soon, if at all. But even if it does happen, it won't be cmd.exe or PowerShell support, but rather some kind of POSIX shell for Windows.
shockone··on Upterm – A terminal emulator and interactive shell based on Electron
Hi, author of Upterm here. Ask me anything.
shockone··on Black Screen: A modern terminal emulator based on Electron
That should be fixed now.
shockone··on Black Screen: A modern terminal emulator based on Electron
What problems will I face if they don't communicate over a TTY?
shockone··on Black Screen: A modern terminal emulator based on Electron
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.

shockone··on Black Screen: A modern terminal emulator based on Electron
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.

shockone··on Black Screen: A modern terminal emulator based on Electron
I should thank you for the post. It reassured me I'm doing something people are interested in.
shockone··on Black Screen: A modern terminal emulator based on Electron
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.

shockone··on Black Screen: A modern terminal emulator based on Electron
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`.
shockone··on Black Screen: A modern terminal emulator based on Electron
There is a positive side: a built-in HTML and CSS engine allows to write very customizable interfaces.
shockone··on Black Screen: A modern terminal emulator based on Electron
Thank you for the advice. Pty.js was my initial choice, but it didn't support return codes at the moment. I'll take a look at it again.
shockone··on Black Screen: A modern terminal emulator based on Electron
That's understandable. It's like with editors. There is vim and there is Intellij IDEA (sorry, JetBrains, for calling your child an editor). I want it to be smart.
shockone··on Black Screen: A modern terminal emulator based on Electron
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.

Page 1 of 2Next →