Live data from Hacker News

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

github.com

101–110 of 116 posts

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

#101

Earlier quoted context omitted.

This is roughly my take. Between Nim and Rust, I have no purpose for Go that isn't covered by a language that's flat-out better.

They’re not better.

People tend to disagree on that. But it depends on what you value. If you like a language that helps you write robust and expressive code, Go doesn't score as high as any language with sum types, and good "generics" support (which 1.18 does not have).

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

#102
post #29

Earlier quoted context omitted.

I bet you HATE the Go language name.

I myself just don't understand why any reasonable person would pick an existing common word for a project in 2022 instead of using the plethora of name generators that can give you something original without even trying. But like, people that work for Google surely know something about search term collision. Or just don't care about making anything else that has "Go" in the query gets confusing results. Which is an o…

Eh, if I search "bubble tea go" on Google this library is the first hit. Same for "bubble tea interface", "bubble tea library", and "bubble tea tui". That's good enough for me. It's not the name I would've picked, necessarily, but it's better than a name that's hard to spell, type, or remember.

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

#103

Earlier quoted context omitted.

It's cool stuff but unfortunately I need icons.

How about Notcurses? https://github.com/dankamongmen/notcurses#readme demo: https://www.youtube.com/watch?v=dcjkezf1ARY

That's really impressive, but does it run on Windows, Mac, and Linux including image support? Do you have a link to any examples of more traditional application UI as opposed to demo flavored?

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

#104
post #83
post #54

Earlier quoted context omitted.

What exactly is hard to switch in/out of Rust, context-wise...?

You get interrupted every time a post is made about Go and you have to comment on Rust's superiority.

We both know that's not what I did, and I'm not taking the bait. Have a good day. ;)

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

#105
post #60

Earlier quoted context omitted.

I did. Rob Pike said that Go was purposefully made similar to C (and by extension other languages similar to C), in order to be familiar and get new engineers who are already familiar with C or C-like languages to become productive without having to learn too much. And while I can totally understand how that makes sense in the intended setting, I don't consider that pleasing at all. "Pleasing" for me implies that I l…

I think your critique, if you examine it closely and deeply, is fundamentally an arrogant one. Sorry for the harsh claim, but I truly do believe this. You are a new developer too. Everyone is. When it’s easy to learn something, it’s easy to relearn it, and it’s easy to learn things around it (because you don’t devote as much brain to the language). All languages should target new, dumb devs, because all devs (includi…

I’ve certainly learned things that were harder and more time consuming to learn, for a payoff that was and continues to be well worth the effort. Including programming languages. I did not claim it was easier for me, so how is that arrogant?

And I absolutely reject the notion that an easy to learn programming language is better. Especially so because Go was made “easier to learn” in large parts by its similarity to C, so it’s really easier for people already and only familiar with C, and that was explicitly stated by the creators.

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

#106
post #59

Earlier quoted context omitted.

> creators were ignorant/lazy/negligent/drunk/lost a bet/etc. This is not a well-intended comment, but then why didn't they add generics at the start? It's not like it was a surprise to anyone even remotely familiar with PLs that they will have to retrofit it sooner or later. Also, function-scoped defers instead of surrounding braces-based one? Come on...

Not adding generics, if you dig through the archives, was a pragmatic choice. Partly it was to help the process of language design, partly it was project management, and partly it was due to technical constraints. Generics is a big, complex feature. The team was prioritizing getting the most immediately valuable features shipped first, and didn’t want the introduction of generics to hit their limited resources too ha…

That’s not how language design works. You can’t just postpone such an elementary feature with a TODO, it will interact with every other feature of the language, and if you haven’t left a place for the interactions you have to introduce breaking changes, which will shook the whole ecosystem.

There is zero point in postponing a feature so that you can build a community, which you will burn down later. It’s not a startup that has to be ready in X months or it will fail.

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

#107
post #98

Earlier quoted context omitted.

You're absolutely right. So I do without 30 FPS. We're all up this tree where we want all the features we're used to and we're willing to put up with software bloat and insecure software and sprawling supply chains to get it. I'm not. So I start with something minimalist and do what I can within it. One of my inspirations is http://akkartik.name/illich.pdf

Does this mean that you're rendering at 1fps, 10fps or something? Is it an artificial limit you put on rendering? Do you have button animations at 30 FPS?

All I meant is, if drawing too many things overloads the system so it can't render at 30fps, that's fine, I build things that don't look bad if the rate drops. I can't do action games, high-speed video, a few other things. That's fine, I can still do lots of things.

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

#108
post #38

Earlier quoted context omitted.

I'm having trouble thinking of a single example of a language, library, or piece of technology that is not either an acronym, a name of something that exists, or a combination of such names. Be it an object (Flask), a concept (Scheme), a letter (C), a person (Sinatra), or an animal (Python). Maybe we need explicit namespacing in English? I'll start saying stuff like "programming languages colon colon ruby" so people…

erlang

Named after Danish mathematician Agner Krarup Erlang[0] who invented queuing theory & telephone network analysis, but they told management that it stood for "Ericsson language" (at least that's what I remember from a Joe Armstrong presentation, but I can't find it right now.)

[0] https://en.wikipedia.org/wiki/Agner_Krarup_Erlang

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

#109

I've seen the charm suite on HN before, and everytime I see them I wish they had bindings to other languages. I'm just not interested in Go, but I'm really interested in learning to create ssh applications. Its an application runtime with a lot of potential for the dev space, but almost no quick-start frameworks!

if you need a fun language to learn to make TUIs, haskell has the brick library :) . I've heard very good things about it, it's declarative, only downside is that it doesn't support windows.

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

#110

Earlier quoted context omitted.

I feel like I've seen TUI's from a completely different angle, including full use of modifier keys , full mouse support, etc. Its amazing how one persons perspective can completely disagree with anothers. What did you mean by the "OS task switcher becomes useless" ?

TUIs cannot have full use of modifier keys as the full set of modifiers is not sent to processes running in a terminal. As for the OS task switcher, if everything is a TUI then you only have one app, which is your terminal, and so your OS task switcher cannot help you switch between apps anymore. You have to switch between windows belonging to the same process. It’s the same problem that you run into by doing everyth…

> TUIs cannot have full use of modifier keys as the full set of modifiers is not sent to processes running in a terminal.

I have hyper meta super and ctrl work, sent through to my curses app. Are you referring to something like gnome or something else intercepting the keys ?

Post reply on HN