Live data from Hacker News

Bubble Tea: fun, functional and stateful way to build terminal apps

github.com

71–80 of 116 posts

Re: Bubble Tea: fun, functional and stateful way to build terminal apps

#71

I've been using dialoguer [1], indicatif [2], and colour [3] for the rust ecosystem. Really high quality libraries: [1] https://docs.rs/dialoguer/latest/dialoguer/ [2] https://github.com/console-rs/indicatif [3] https://docs.rs/colour/latest/colour/

Thanks. I keep looking for Bubble Tea alternatives in rust. I am glad to have some handles to a few.

After seeing some recent posts on HN, I've been fantasizing about a Turbo Rust project.

Re: Bubble Tea: fun, functional and stateful way to build terminal apps

#73

I spent a good chunk of time last week looking for a solid cross-platform GUI toolkit. I came to the conclusion that the terminal is the most portable GUI platform available. You can create an app that has windows, buttons, mouse support, etc, statically compile it for Windows, Linux, and Mac, and run it over SSH. The closest you can get to that with real graphics is using a toolkit built on OpenGL, and you'll be for…

The cross-platform GUI toolkit I personally prefer is Qt. Bein' I'ma "Python guy" I tend to interact with Qt mainly via PyQt/PySide, but there's handy bindings for a ton of other cross-platform programming languages as well. I've also recently(ish) discovered and been thoroughly impressed by Will McGugan's "Rich" library and the "Textual" TUI library he built for it. Been sprucing up all my terminal output to be more…

Qt is solid, no doubt. But it's rather high level and bloated. Plus the company appears to be actively be trying to pull away from open source.

Re: Bubble Tea: fun, functional and stateful way to build terminal apps

#74
post #69

Earlier quoted context omitted.

I just can't get past the fact that Go doesn't have sum types. As someone who dabbles in category theory, it makes no sense to me that so many popular languages have product types but not their categorical dual. The lack of sum types leads to so many hacks and weird design patterns in the language, like returning two values when you only want the caller to read one of them (that is actually Go's error handling strate…

Edge case. Maybe make a library to solve this?

If it causes errors in monetary calculations that can hardly be described as an edge case.

Re: Bubble Tea: fun, functional and stateful way to build terminal apps

#75

I spent a good chunk of time last week looking for a solid cross-platform GUI toolkit. I came to the conclusion that the terminal is the most portable GUI platform available. You can create an app that has windows, buttons, mouse support, etc, statically compile it for Windows, Linux, and Mac, and run it over SSH. The closest you can get to that with real graphics is using a toolkit built on OpenGL, and you'll be for…

I'd look at Qt or Electron if you need to do cross-platform desktop apps, if for no other reason than accessibility. Sure you can make wacky midnight commander like GUIs in the console, but no screen reader is going to be able to make heads or tails of them and you'll shut out users.

Tk is my goto for cross-platform desktop apps; it's unreasonably good for them. However non-desktop support was essentially nonexistent last time I checked.

Re: Bubble Tea: fun, functional and stateful way to build terminal apps

#76

I spent a good chunk of time last week looking for a solid cross-platform GUI toolkit. I came to the conclusion that the terminal is the most portable GUI platform available. You can create an app that has windows, buttons, mouse support, etc, statically compile it for Windows, Linux, and Mac, and run it over SSH. The closest you can get to that with real graphics is using a toolkit built on OpenGL, and you'll be for…

Are you sure? https://hpjansson.org/chafa/

It's cool stuff but unfortunately I need icons.

Re: Bubble Tea: fun, functional and stateful way to build terminal apps

#77
post #31

Earlier quoted context omitted.

Why not? There's a lot to hate about every language, but one advantage about Go is that it's fairly easy to context switch in/out of, which makes it great for side projects, because it's cognitive load while using it is really low. Unlike say, Rust. I do love Rust though.

I just can't get past the fact that Go doesn't have sum types. As someone who dabbles in category theory, it makes no sense to me that so many popular languages have product types but not their categorical dual. The lack of sum types leads to so many hacks and weird design patterns in the language, like returning two values when you only want the caller to read one of them (that is actually Go's error handling strate…

> These are terrible hacks, but exactly what you'd expect from programmers who spent the majority of their careers writing C.

As an embedded firmware guy, I'll try not to be offended by that line :) I agree with you, though. C is a really good language when you consider its original purpose and the time period in which it was created. Ignoring 50 years of progress in type theory/category theory in the name of "simplicity" is inexcusable.

Re: Bubble Tea: fun, functional and stateful way to build terminal apps

#78

I spent a good chunk of time last week looking for a solid cross-platform GUI toolkit. I came to the conclusion that the terminal is the most portable GUI platform available. You can create an app that has windows, buttons, mouse support, etc, statically compile it for Windows, Linux, and Mac, and run it over SSH. The closest you can get to that with real graphics is using a toolkit built on OpenGL, and you'll be for…

The cross-platform GUI is WWW.

Re: Bubble Tea: fun, functional and stateful way to build terminal apps

#79

Earlier quoted context omitted.

Did you consider Web Browsers + Javascript?

Requires installing a web browser and having access to the computer’s renderer on some level

So does any other GUI program....

He was looking for a cross-platform GUI toolkit.

Re: Bubble Tea: fun, functional and stateful way to build terminal apps

#80
post #31

Earlier quoted context omitted.

Why not? There's a lot to hate about every language, but one advantage about Go is that it's fairly easy to context switch in/out of, which makes it great for side projects, because it's cognitive load while using it is really low. Unlike say, Rust. I do love Rust though.

I'm only really interested in learning a language if it excites me, or if I'm getting paid to do it. I don't hate Go, and would be fine to learn it on company time for company projects, but there is no spark that would lead me to learn the language on my own. I've written some basic Go, but if I'm using it in personal projects, I'd would have to invest time to understand the ecosystem, runtime, standard lib, best pra…

Being boring is one of Golang's strongest suits. There just isn't a whole lot you need to learn compared to most languages.
Post reply on HN