Earlier quoted context omitted.
Some people here seem to have a hard time understanding that React !== DOM React is descriptive. It creates a virtual tree and tells how that tree should be changed. What that tree renders into is a completely different problem. On the web, it renders into HTML. On your phone (ReactNative), it renders into native GUI. In ink, it uses a render engine to concat and output the text results (it's a little more complex th…
Is there a good resource that explains what React is and how it works, without limiting the focus to just the usual web applications?
Ink: React for interactive CLI apps
91–100 of 109 posts
Re: Ink: React for interactive CLI apps
#92Earlier quoted context omitted.
XML is a much maligned and poorly understood technology. It lacks glossy pitch pages and hypemen like react. Things like XSLT are really quite good if you can get past "ew xml icky" You can inline different schemas in modular, bazaar like ways from a variety of sources and pull in different parsers that do different tasks. For instance you could have, say an object subtype and pretend you, a spreadsheet developer mad…
XML is insanely powerful, there are 1,000 page books on XML alone. But React is a much smaller standard that extends XML to an insanely effective point (assuming basic JS as base knowledge) It's because I like XML that I think JSX is a logical/effective extension and we should support it as the sort of "champion" of declarative design Just to emphasize this: Why has XML been losing as the standard config format? Why…
The short answer, as you answered it, is:
> there are 1,000 page books on XML alone.
The long answer: it was over-engineered for the intended use-case.
It's easier to fix under-engineered stuff (like JSON) than to fix over-engineered stuff (like XML).
> If you like XML, there is a strong argument to support JSX because it's a way to keep XML around!
Well, this is basically pivoting XML to a different use-case. It'll still be over-engineered unless you stick to JSX only, in which case it's not XML anymore, anyway.
Re: Ink: React for interactive CLI apps
#93Earlier quoted context omitted.
XML is a much maligned and poorly understood technology. It lacks glossy pitch pages and hypemen like react. Things like XSLT are really quite good if you can get past "ew xml icky" You can inline different schemas in modular, bazaar like ways from a variety of sources and pull in different parsers that do different tasks. For instance you could have, say an object subtype and pretend you, a spreadsheet developer mad…
XML is insanely powerful, there are 1,000 page books on XML alone. But React is a much smaller standard that extends XML to an insanely effective point (assuming basic JS as base knowledge) It's because I like XML that I think JSX is a logical/effective extension and we should support it as the sort of "champion" of declarative design Just to emphasize this: Why has XML been losing as the standard config format? Why…
Re: Ink: React for interactive CLI apps
#94Re: Ink: React for interactive CLI apps
#95Earlier quoted context omitted.
> Sure, but ten years ago, if I told you the concept of a “bottom type” would be common knowledge with web developers or they’d consider type algebra second nature, you’d have laughed at me. If you told me that was the case today with web developers generally, I’d laugh at you even harder than I would have if you made that prediction ten years ago.
All the web developers I've worked with in the last four years understand the concept of a bottom type, even if they've never been introduced to the formal phrase, because `never` is the explicit bottom type in TS and appears all the time. You can't go very long consuming libraries written in TS before you run into it, at which point you become familiar with it. Similarly, a function that accepts (explicitly) `A | B…
It's the opposite in my experience. Most web developers I work with (a lot because of consulting), specially the average "React sprint runner" doesn't have a clue about anything slightly above basic types and just google/chatgpt whenever things break so they can move on to the next task in the sprint.
cryptic typescript errors don't help here either.
Re: Ink: React for interactive CLI apps
#96Earlier quoted context omitted.
Haven’t used this library, but the answer is the same as it is for real React apps. How does this application perform if I have a scrollable view with 50,000 items in it and I press the down arrow? This kind of thing is why React can be the cause of bad performance.
What kind of TUI are you making that requires a scrollable view of 50k items?
Re: Ink: React for interactive CLI apps
#97Earlier quoted context omitted.
> the most robust type-system in the world (Typescript) This is very high praise for something that only provides safety at compile time and not runtime.
Not to mention: type Thing = string | boolean; const arr: string[] = []; function add(item: Thing, dst: Thing[]): void { dst.push(item); } add(false, arr); Is valid typescript.
Re: Ink: React for interactive CLI apps
#98Earlier quoted context omitted.
> the most robust type-system in the world (Typescript) The rare combo of Blub Paradox + Poe's Law
What would you consider to be more robust, while still being usable? I'm referring to the type system here specifically.
The TS type system is neither especially powerful nor especially robust
Re: Ink: React for interactive CLI apps
#99Earlier quoted context omitted.
> Sure, but ten years ago, if I told you the concept of a “bottom type” would be common knowledge with web developers or they’d consider type algebra second nature, you’d have laughed at me. If you told me that was the case today with web developers generally, I’d laugh at you even harder than I would have if you made that prediction ten years ago.
All the web developers I've worked with in the last four years understand the concept of a bottom type, even if they've never been introduced to the formal phrase, because `never` is the explicit bottom type in TS and appears all the time. You can't go very long consuming libraries written in TS before you run into it, at which point you become familiar with it. Similarly, a function that accepts (explicitly) `A | B…
Re: Ink: React for interactive CLI apps
#100Earlier quoted context omitted.
Haven’t used this library, but the answer is the same as it is for real React apps. How does this application perform if I have a scrollable view with 50,000 items in it and I press the down arrow? This kind of thing is why React can be the cause of bad performance.
How many terminal apps do you know of that have 50,000 items with a scroll wheel? This is what I meant by 0.001%.