Or why not your terminal :) https://www.destroyallsoftware.com/talks/the-birth-and-death...
Why can't I write code inside my browser?
401–410 of 624 posts
Re: Why can't I write code inside my browser?
#402Earlier quoted context omitted.
I have not once said I do not like CLIs. I use them all the time. But the fact remains, they are not useful when doing iOS programming, because the tooling provided does a BETTER job than the command line.
You don't think they're "esoteric and annoying" and have many "needless" problems? Or have I misinterpreted that? > because the tooling provided does a BETTER job than the command line. Once again, better for you .
I think it could be a lot less of the two former and a lot more of the latter. But it will not be, because people are unwilling to even admit it has any flaws.
Re: Why can't I write code inside my browser?
#403I feel like the author is confused between server-side and client-side development, and proceeds to say that programming is hard. He even goes on to quote himself (sigh) as a proof of what he proposes. Look, maybe someone just explained it badly to you, and you should look it up for yourself. However, if the command line looks scary to you... wait until you read bad documentation :) My point is: yes, programming is a…
> just like it's hard to become a good musician if you shy away from sheet music A bunch of world famous artists would disagree with you there. https://www.themusicstudio.ca/blog/2017/11/909/
If you want to be a professional musician who works with other people rather than just doing their own thing, you need to know sheet music, especially within certain sub-domains like orchestral settings.
(To be fair, as someone who is on the periphery of the music business, the above is a simplification. I'm not trying to imply that the "rock stars" get to skate by, often they're working harder than everyone else to be/remain successful. But they are still exceptional in many respects. Your average person trying to make a living as a musician absolutely needs to know sheet music or at least it's simpler cousin, the lead sheet, to be taken seriously.)
Re: Why can't I write code inside my browser?
#404Earlier quoted context omitted.
Like what? Please be specific or we can't have a meaningful discussion. I use Bash a fair amount and I don't consider it overly complicated as a shell. There are some rough edges in Unix, like handling spaces in directories, and I'm no fan of Bash as a scripting language, but I wouldn't say the basic model of the Unix command-line interface is overly complicated.
I addressed these points in one of my comments a while ago: https://news.ycombinator.com/item?id=25305575 I admit that I'm kind of conflating the concept of a terminal emulator, a shell and a shell language, but the shell model has plenty to improve upon.
This shouldn't be supported in a first-class way, it should be supported as an extension where applicable, in keeping with Unix principles. We already have this with X11.
> It should be possible to `cat` an image, or a video, or even previews of Word and Photoshop documents
Again this can be done with X11 if you want it.
> Programs should be able to raise notifications without relying on third-party/OS-provided utils that have a drastically different API and availability across platforms.
Interesting idea, perhaps this could be done with a metacharacter, akin to the 'bell' character, or perhaps even overloading the bell character. There could be a convention along the lines of BELL BELL your message here BELL BELL.
> Rich read-only visualisations of progress should be possible to call up with a few lines of code. I want to see a `dd`, `mv` or `cp` with a graphical progress bar at the bottom of my window.
wget and curl indicate progress in this way. I'm sure there are programs out there that would give you this.
> We should be able to render a piece of output in 3D, if we so desire. I don't want Crysis, but I do want a Matlab logo that I can rotate by dragging my mouse and graphs that zoom when I Ctrl+scroll at them.
Again we have X11 for this. It's not easily done, which is why we have drama like Wayland which lacks network transparency. [0]
> Support for file pickers and rich selection/filtering of file/directory lists. Not for sandboxing, but for convenience.
A file-picker could be implemented as a TUI, which is roughly what Midnight Commander gives you. Perhaps a Unix shell could support mouse-clicks for selection from its auto-completion listings. I think that would be possible, perhaps it's already been done.
> A command line builder (like one of the classic Apple OSes had, cannot find a reference now, or something like the one in Fish but more advanced). Only valid combinations of parameters will be supported, mutually exclusive commands are impossible to select.
I agree it would be great to have a system like this, akin to type safety. Perhaps applications could distribute something akin to a regex to describe their syntax. I imagine something like this is already implemented for auto-completion purposes (e.g. how Bash can auto-complete git's verbs).
> Terminals should be able to intake gigabytes of input per second, up to the limit of the hardware, without choking up.
I don't know quite what you have in mind here but you can already do this in the way that matters. You can easily run a Unix command to tarball a local directory, then compress it, send it over SSH to a remote server, and have that remote server decompress the stream and then unpack the tarball, all 'on the fly' without ever saving the intermediate streams into persistent files. This all works very well in Unix, giving you a lot of flexibility/power and good performance too. (Doubtless the flow I described would be slightly faster if a dedicated application were used instead, but Unix pipes are pretty fast).
> We should be seeing 60FPS and beyond as a normal feature.
Which command-line applications would benefit from 60fps? Better TUIs would be nice but I don't think the frame-rates are the issue there.
> We should finally get unlimited scrollback enabled by default
You can probably enable that if you want it.
> We have the space for it, either in RAM or persistent storage
Not if you accidentally stream /dev/random.
> If not, it should be adaptable and drop the scrollback buffer that is lower priority than other applications on the system if they need more resources.
This approach would have the downside of being less predictable than the current one.
> Unicode should come as standard. Emoji should come as standard.
Sure. I think Unicode support is pretty good though, I believe it's used in many TUIs.
> End termcap. We should be able to hash out ONE standard to rule them all.
I imagine this is one of those things where there will always be a few legacy systems that still need to be supported.
> end Bash
I agree that Bash has many unfortunate quirks that are annoying at best and are outright dangerous footguns at worst, especially when it's used for scripting. The only advantage of writing a traditional Unix script, as opposed to say a Python script, is portability. configure scripts, for example, run on just about any Unix, with no dependencies.
> consider adding hypertext support. It's here to stay, and not just in the form of HTML
Not a bad idea, perhaps this too could be done with metacharacters.
[0] https://wayland.freedesktop.org/faq.html#heading_toc_j_8
Re: Why can't I write code inside my browser?
#405Earlier quoted context omitted.
"Programming can and should be much, much more user friendly than it is now." While there's no doubt there are some libraries/tools/systems which are poorly designed, perceived complexity may often be due to the requirement to support a wide variety of new and legacy systems or to support layers of the tech stack that many people are not even aware of. "We've just chosen to keep things like this because we think it m…
Agreed. Two of the pieces of irreducible complexity that beginners have problems understanding (or even appreciating!) are change management and software delivery. If a newcomer created a simple but novel program and it turned out to be successful, two sure-to-follow requirements are: - Now someone else wants to access and suggest changes to your project. In parallel. Without breaking anything. - Now the software nee…
Re: Why can't I write code inside my browser?
#406Earlier quoted context omitted.
>Programming is in some cases over-complicated, for no reason. Which part is over-complicated for no reason?
Everything happens for some reason if we want to be pedantic. I think the point was that some things do not justify their complexity. Especially if you discount inertia. Trivial example: the creat function could have been named create. That's one more thing folks just have to know and the reason for it isn't much better than "just because".
Again, can you provide an example? Because like you implied, tools like node.js and npm, were made with a purpose. They are professional tools made for professional programmers to solve commercial problems. They aren't made for beginners and novices to teach them about programming concepts. Their complexities stems from the fact that they need to support all kinds of deployment and runtime use-cases and can't be too opinioned on how they should be used.
>Trivial example: the creat function could have been named create
That's your example? Really?
Re: Why can't I write code inside my browser?
#407If the author has “been playing with the web and code for years” and is still “wtf” on /usr/local/bin in $PATH it shows a lack of discipline and structure in their learning. I see this in many in many of my apprentices - the desire for instant gratification and the lack of experience means they refuse to do anything that doesn’t immediately proceed them closer to their goal. Here’s the thing with programming - you ca…
Another thing I want to add on - it looks like the author is lacking curiosity. I didn't have much discipline and structure in the beginning of my programming journey. In fact, I've been trying to add more discipline and structure to my learning now.
When I started though, I had a TON of curiosity. I fiddled all the time with everything. I fiddled with settings in Windows XP to make my family's computer faster, I fiddled with my own laptop by installing Linux and trying out tons of programs, I fiddled with the code on my computer to make it do cool things on the command line, etc.
I didn't have an end goal in mind - it was just something fun to do and I just wanted to answer all the questions in my head. Being curious drove me to learn, adding discipline and structure helps to fill in some gaps in my learning that my curiosity may have missed.
Re: Why can't I write code inside my browser?
#408I try to keep my comments nice on HN but in this case I can't, I've met this kind of person many times now and I just can't hold back. The author is lazy, and is channeling his energy into complaining rather than learning. He believes he is by default an expert on the 'user friendliness' of programming. His comments don't really make much sense, and come across as whining that should be ignored. "People hate command…
The author is very right to point out the fact that the browser in 2020 is still so fundamentally broken.
Theoretically, tons of work should be facilitated in the cloud without having to download or setup a single thing.
You should be able to make fixes, test etc. in github without having to download the code and toolchain as easy as you would on your desktop.
Re: Why can't I write code inside my browser?
#409Earlier quoted context omitted.
Like what? Please be specific or we can't have a meaningful discussion. I use Bash a fair amount and I don't consider it overly complicated as a shell. There are some rough edges in Unix, like handling spaces in directories, and I'm no fan of Bash as a scripting language, but I wouldn't say the basic model of the Unix command-line interface is overly complicated.
I addressed these points in one of my comments a while ago: https://news.ycombinator.com/item?id=25305575 I admit that I'm kind of conflating the concept of a terminal emulator, a shell and a shell language, but the shell model has plenty to improve upon.
PowerShell streams Objects instead of characters/bytes. But that is more compatible with cmd than sh.
Many other points are more about the terminal emulator. terminiology has some of those features AFAIK.
Re: Why can't I write code inside my browser?
#410The reason you can't do this is that Node of course has a bunch of file system APIs that for security reasons necessitate an application designed for automatically downloading and executing arbitrary source code can never, ever, have access to. But you could rephrase the authors point this way: Browsers make a ton of concessions to regular users at the expense of developers. Consider for example that the act of devel…
Sure, but it's also in every single right click menu on every page and has several keyboard shortcuts (F12, Ctrl+Shift+I)
In my opinion, having to go two menus deep is not "barely catering to the audience at all". The vendor of that product just likes to have clean menus.