Live data from Hacker News

Show HN: Hucksh – A shell with a very good memory

news.ycombinator.com

51–60 of 73 posts

Re: Show HN: Hucksh – A shell with a very good memory

#51
I think you're on to something, but tangled in the implementation.

I see this as capture of processes -- their invocation, context, and results -- in a relatively normalized form for analysis and re-use.

There are many possible applications based on analyzing these: automatically creating, porting, or refactoring code, showing that foreign code or ports are behaving as expected, providing audit trails, etc. Any environment where code is typically prototyped then hoisted into some kind of workflow container is a candidate.

No one likes to have this level of intrusion or monitoring, but everyone seems to accept running code in containers, so if this were built in to the container, it might be easily deployed and widely accepted.

To me the way to proceed could be to generate a bunch of pseudo-data and start prototyping use-cases based on analyzing the data (or monitoring the stream). The general themes would be in the realm of software evolution, to productize prototypes, refactor legacy bloatware to MVP, model the effect of selectively changing subsystems, etc. Sure, this might benefit the programmer, but it could also be of interest to managers or senior developers helping juniors level up their code. Once you have some valuable use-cases, you'll know more about your deployment targets and business model (OS-freemium?).

As for workflow comparables, the original MPW (Macintosh programmers workshop) used the text document for input, output, and commands in a kind of early notebook (perhaps following mathematica notebooks of the time). And Eclipse as an extensible IDE has a number of terminal window and command integrations with UI, following emacs. I could even see this as a python context manager in a notebook.

A more narrow goal based on the current implementation could be to build and maintain a library of bash functions or scripts, possibly shared by a team. Monitor and capture results, then let developer select a series of commands to wrap, with your tool providing help with capturing, documentation, generating precondition checks, browsable/html cross-linked docs, etc.

But generally I wouldn't try to recreate notebooks or IDE's for bash. My goal is always to migrate any bash that gets big to a language with types, error-handling, logging, etc.

Re: Show HN: Hucksh – A shell with a very good memory

#53
post #7

So you have a commercial product under a proprietary license, which forks a BSD-3-clause shell and an MIT-licensed terminal emulator? I don't think you can do that. Edit: My apologies. I was mistaken. Carry on :)

Isn't this possibility to strip users of the freedoms in derived works exactly what is touted as the "permissiveness" of these licenses?

Indeed.

You just found the difference between Open Source (MIT/BSD and friends) and Free Software (GPL without copyright assignment.).

It ain't about money ;)

Re: Show HN: Hucksh – A shell with a very good memory

#54

Intriguing idea! I love the idea of having a database of the commands you’ve run and their output. I use tmux religiously, but it’s sometimes frustrating using a crappy interface to spelunk my terminal history and manually look for the various commands I’ve run amidst voluminous output. And of course it’ll lose that history when it runs out of buffer. Question: You refer to this as a shell, but it seems more like a t…

Thanks! > You refer to this as a shell, but it seems more like a terminal emulator. Am I missing something? It has elements of both. I think it's closer to a shell because its primary purpose is to run commands, like bash. It has a terminal emulator, and you can run interactive programs (like Vim, or even bash) inside a hucksh command widget, but (from my point of view) the terminal emulator is there mostly so that p…

Personally I thought it was cool that you replaced the shell AND the terminal. I honestly feel like we need a re-imagining of computer interfaces. CLIs are cool but the current state of the art is lacking. So kudos on what you're doing.

I don't think I will become a user because I'm a radical free software purist but I like what you're doing and I think it's the kind of outside the box thinking that's needed if the shell is to ever move far beyond "1980s state of the art".

Another interesting take on entirely rethinking the shell: https://arcan-fe.com/about/

Re: Show HN: Hucksh – A shell with a very good memory

#55
post #51

I think you're on to something, but tangled in the implementation. I see this as capture of processes -- their invocation, context, and results -- in a relatively normalized form for analysis and re-use. There are many possible applications based on analyzing these: automatically creating, porting, or refactoring code, showing that foreign code or ports are behaving as expected, providing audit trails, etc. Any envir…

> I see this as capture of processes -- their invocation, context, and results -- in a relatively normalized form for analysis and re-use.

That's a nice, neat, concise way of putting it. Thanks.

> There are many possible applications based on analyzing these ...

Those are some neat ideas. I'd certainly have to talk about them with some real users to understand the demand and use-case. I think the easy sharing I mentioned could go a long way to achieving that goal.

You can also already pretty easily extract just the commands run, to (as you put it) hoist it into a larger script or workflow. E.g. in my current instance, `hucksh sql "select command from command_history where id > 2863 order by id"` dumps out the most recent 10 commands you ran.

> No one likes to have this level of intrusion or monitoring, but everyone seems to accept running code in containers, so if this were built in to the container, it might be easily deployed and widely accepted.

Hmm, perhaps.

That does give me an idea for another use-case for hucksh in containers: mount the hucksh database file into a container, across invocations, to have a more seamless history of working in the container.

> A more narrow goal based on the current implementation could be to build and maintain a library of bash functions or scripts, possibly shared by a team.

Indeed. That's where I was going when I said "I hope in the future to make it easy to share history, which could help with new employee onboarding, [etc]."

> My goal is always to migrate any bash that gets big [...]

Yes, I agree.

Thanks again for your comment. Some neat stuff here.

Re: Show HN: Hucksh – A shell with a very good memory

#56
Reusing the outputs isn't universally possible because commands typed into bash generally aren't pure functions. You might have to run them again to get the current correct output. It's an interesting feature though.

Also, KDE Dolphin can run commands in the current folder.

You can get the history to last forever by appending history to a file.

Re: Show HN: Hucksh – A shell with a very good memory

#57

Earlier quoted context omitted.

Thanks! > You refer to this as a shell, but it seems more like a terminal emulator. Am I missing something? It has elements of both. I think it's closer to a shell because its primary purpose is to run commands, like bash. It has a terminal emulator, and you can run interactive programs (like Vim, or even bash) inside a hucksh command widget, but (from my point of view) the terminal emulator is there mostly so that p…

Personally I thought it was cool that you replaced the shell AND the terminal. I honestly feel like we need a re-imagining of computer interfaces. CLIs are cool but the current state of the art is lacking. So kudos on what you're doing. I don't think I will become a user because I'm a radical free software purist but I like what you're doing and I think it's the kind of outside the box thinking that's needed if the s…

Thanks! Yeah, improving the state of the art beyond TTYs is a core idea of hucksh.

> ... radical free software purist ...

Yeah, I get that. Someone on Reddit mentioned the same thing. No worries. I'm definitely a fan of free software too (Vim user since, like, 1995, to name one), just not a purist.

I'll take a look at Arcan.

Cheers & thanks again!

Re: Show HN: Hucksh – A shell with a very good memory

#59
This might sound strange, but one of the things I shave always wanted are what I would call "routes" --> A journey one goes down to either connect to something through some circuitous method, so to save that. Or to attempt to install or implement something that keeps package-creeping on you, so you could just have massive undo route. Or to be able to send someone a route that they can just watch, read or playback on their system. (obviously you'd need validation, auth, logging, etc- but savable, sharable cli route would be pretty dope, unless something like this exists and im an idiot.... (this is different than orchestration, it should be a native capability of the shell)

Re: Show HN: Hucksh – A shell with a very good memory

#60

I couldn't immediately find the repo for this, and get the impression its not open source. Considering it seems to be constituted significantly of open source libraries and tools (which you commendably are up front about), I would want to see a lot more justification for why this is closed (e.g. those third party elements are only a tiny fraction of the product), and what significant value is being added. Or if I'm w…

Correct, it's not open source. I did mention that it's a commercial product, but of course some commercial products are also OSS. Mine is not. > I would want to see a lot more justification for why this is closed I'm not sure what justification I can offer besides "because I want to try to make a living selling my own software, starting with this product, and I think that'll be easier if it's closed source". We might…

I'm not the previous poster and I don't think you need to "justify" anything, but the main reason I'd like the source code is so I can fix my own problems and don't need to rely on you. I care a lot less whether that's under an open source license or NDA or whatever: as long as I can build it and include any changes I want.
Post reply on HN