News for hackers. Stuff that matters.
Re:Nim – Python-like statically-typed compiled language by seventh-chord on Sunday August 16, 2020 @12:51PM (#24179258)
I don't get why more editors don't support parsing compiler output to get the file name and line for errors. Its dead simple, no need to run a server, just allow running the compiler from within the editor and have some way of configuring the parsing so it can work with different compilers. Gets you 90% of the value for 10% of the work (because you don't need to do anything to the compiler).
Re:Nim – Python-like statically-typed compiled language by aidenn0 on Sunday August 16, 2020 @09:48PM (#24183081)
Indeed. Emacs and Vim have both supported this for a long time. I used it in vim in the late '90s and Emacs usually got features like this before vim.

I was working on integrating a language with a "programmers editor" <name omitted to protect the guilty> and asked how to extend the editor to indent a new language. The response was "it should already support all C/Java like languages with the configuration format." My response "this isn't a C-like language". The community response "Uh, I guess write a plugin that installs a hook on the carraige-return key and manually position the cursor?" It blew my mind that anything billed as a programmer's editor couldn't be customized for doing this already...

Re:Nim – Python-like statically-typed compiled language by jlokier on Sunday August 16, 2020 @07:42PM (#24182367)
You don't even need to configure it in many cases. I've been doing it with numerous languages in Emacs, and I think I had to configure it (with a regex) maybe once for a compiler whose output it didn't already recognise.

The syntax compilers use to indicate filename and error location are similar among compilers, and generally quite unambiguous anyway, so in many cases no configuration is needed. A small list of regexes built in to the editor is enough.

Re:Nim – Python-like statically-typed compiled language by zelly on Sunday August 16, 2020 @01:33PM (#24179573)
Emacs has been able to do this for a very very long time
Re:Nim – Python-like statically-typed compiled language by seventh-chord on Sunday August 16, 2020 @03:18PM (#24180398)
"Turing-complete text editor can do anything" :)

To be fair, I dont actually know what percentage of editors have that feature, my impression is just that many people arent aware of the idea. Maybe Im wrong though.