Live data from Hacker News

Unix as IDE (2012)

sanctum.geek.nz

71–80 of 106 posts

Re: Unix as IDE (2012)

#71

What is it about an IDE that you need? a) The ability to do an end-to-end build with one click (we've lost that with cloud being part of the equation) b) Guranteed buildability c) Intellisense/autocomplete d) Widgets that can be moved into any which way. I feel that we're missing a trick with CI/CD if IDEs can do a end-to-end build with one click, there's some technology to be shared or extracted here from desktop ID…

An full build is always the easiest build.

Building as little as possible and having quick iteration is the hard bit when you have statically typed languages and large projects. If I edit a file and change the name of the function, the call sites should all light up with red squiggles. In a statically compiled language. Without requiring a recompile.

Re: Unix as IDE (2012)

#72

Earlier quoted context omitted.

You can do that in a lot of editors. Don't need an IDE for that. You got standardized language servers now which are often easy to integrate in a multitude of editors. But personally I don't like IDE style completions that much. In editors I often prefer completions based on what is in the file I am editing. But I also work a lot in a REPL environment. I personally think a good REPL is a much better debugging tool th…

Not sure why you're being downvoted. IMHO, printf based debugging is more ergonomic and requires less context switching. Instead of using my mouse to work with debugger or remembering a myriad of shortcuts for navigating through it I can just keep typing right in my editor where I already am. For me it fall under the keep it simple stupid category.

How do you add more watches (printfs) without recompiling/restarting though (That seems like a basic requirement for calling it ergonomic tbh)

Re: Unix as IDE (2012)

#73
post #58
post #54

Earlier quoted context omitted.

I would stop using tmux entirely and switch to this, but the cluster I work on has 2 factor authentication which is absolutely annoying.

You may wish to investigate the ControlMaster directive in your SSH configuration. Depending on how the two factor authentication system works, you may be able to authenticate just once for many concurrent SSH sessions.

Here's what I use to keep SSH connections open for 4 hours: https://blag.felixhummel.de/apps/ssh.html#config

It took a while to find out that `Host *` should be at the end of the file if you want to override things.

Re: Unix as IDE (2012)

#74

Earlier quoted context omitted.

Seems like a great idea. Lack of persistence bugs me about my i3 / tmux / emacs setup. Google brings [1] but I haven't tried it yet. 1: https://github.com/tmux-plugins/tmux-resurrect

yes, but this is a mock-up of a real freeze. What I want is independent of tmux: a way to freeze a process and all its children and save it into a file. The file is then opened when rebooting, or even on a different computer. There was this: https://github.com/maaziz/cryopid

Have you looked at CRIU?

Re: Unix as IDE (2012)

#75

Earlier quoted context omitted.

c) Not much else, the ability to jump to code is the primary benefit.

Pretty much every programmer editor lets you jump to code. I can even do that from my Terminal program. If I run a program and it produces and error my terminal interprets paths in the error message and let me click them to open my code editor at that file and line number. No IDE needed ;-)

That's presumably because the error had some format including rows columns and filenames.

Navigating from a symbol to another symbol (e.g. from a variable use to its declaration) requires more than simple pattern matching.

The editor needs to know (or be able to find out) the symbolic meaning of every word on the screen to do that. If syntax hihglighting isn't just basic regex matching, e.g. if you want different colors for mutable/immutable fields etc, then the editor needs to know the syntactic meaning of everything not just when navigating but when displaying.

Re: Unix as IDE (2012)

#76
post #32

I recently discovered the "watch" command. With an autosave plugin in Vim, I can put some "print()" statements in my code and run "watch python3 mycode.py" in a small Tmux pane to get nearly instant feedback as I debug something. Or if I'm refactoring, I can do "watch pytest". It's pretty sweet.

Using “watch” [1] to run your program is a bad idea. The watch command executes a program at regular intervals, by default it runs once every second. What you should use instead is “inotifywait” [2] to execute your program(s) whenever there is a change. This way the program will run, for example, every time you save your changes. There are many utilities that make use of inotify (the library that powers inotifywait)…

If you like inotify, you might also like entr [1].

I only found out about it few days ago, but it seems nice so far.

[1]: http://eradman.com/entrproject/

Re: Unix as IDE (2012)

#77
post #32

I recently discovered the "watch" command. With an autosave plugin in Vim, I can put some "print()" statements in my code and run "watch python3 mycode.py" in a small Tmux pane to get nearly instant feedback as I debug something. Or if I'm refactoring, I can do "watch pytest". It's pretty sweet.

Using “watch” [1] to run your program is a bad idea. The watch command executes a program at regular intervals, by default it runs once every second. What you should use instead is “inotifywait” [2] to execute your program(s) whenever there is a change. This way the program will run, for example, every time you save your changes. There are many utilities that make use of inotify (the library that powers inotifywait)…

If you're going to be using any system like this (either watch or inotifywait), be careful. It's a good chance it's going to run in an "intermediate" state when it's not supposed to run and can do harm to your system (delete files or whatever). Bash scripts are especially dangerous, but it applies to any language.

A good idea would be to at least run the script in some kind of sandbox, so you don't accidentally do something dumb.

Re: Unix as IDE (2012)

#78

Earlier quoted context omitted.

I am this kind of guy, too - i3 + st + vim bindings almost everywhere. But it's a mixed bag, like I can use vim and do something complex in an instant, e.g. replacing a column of characters with something else, but I'm too used to the regular expression replace all mode of vscode. Or the file manager on large projects, I'm pretty much used to using one file at a time with vim. I feel no shame xD

What is `st`? :)

suckless terminal I love the "externalpipe" functionality, which is the main reason I switched from terminator.

Re: Unix as IDE (2012)

#79
post #17
post #8

I've gotten made fun of because I've said my "IDE" is `tmux` in the past; my typical development environment is a tmux split, where an editor (usually NeoVim, sometimes Emacs) does editing, and the bottom half is a terminal running either a dev server or just the compiler command. It's not perfect, but I like how I can basically swap any component out (except tmux itself).

That's what I do, too. Vim and a couple shells and I'm happy. I despise autocomplete and will not use things that force it on me. IntelliJ has options to make it not aggressively, in-your-face annoying, so I can live with it, and do use it for access to some tooling we built at $dayjob. But after spending a day turning off all the bullshit, installing vim bindings, etc. I get... a slow, memory-pig semi-substitute for…

> I despise autocomplete

Could you elaborate on why that is? I feel similiar but I cant just tell why

Re: Unix as IDE (2012)

#80

I'm a terminal jockey and an i3 junkie, and for a long time vim+extensions+Unix tools were my IDE too... but ultimately there is a difference between a powerful editor used like an IDE, and an actual IDE. there are lots of features which get first class.attention in an IDE, which were just kludgy hacks in my beloved vim... and some that simply weren't possible. For example, VSCode Remote container development. The ID…

I've been using both VSCode and JetBrains IDEs with their VIM plugins. The VSCode one is kind of shitty, but overall both do the job well enough that as a not-super-proficient-vim-master-guru I don't really lack any features.

And you get all the IDE stuff as well. Pretty much a win-win there. (if the vim functionality is good enough for you)

Post reply on HN