#brief
3 descubrimientos · Descubrimientos elegidos de la web abierta, del más reciente al más antiguo.
-
The brief history of lsp_lines.nvim
Back in 2022, LSP implementations could find errors and other diagnostics in code and send them into the editor, but editors lacked good interfaces to actually present this. The best at the time was a panel with a list of errors (not unlike what Eclipse and other IDEs would do a decade earlier). I wanted to see errors in context instead. I found inspiration in how Rust renders compilation errors and warnings into the terminal: rendering a portion of surrounding code, and an ASCII arrow pointing to the relevant portion of code. With the idea, I implemented lsp_lines.nvim , a plug-in that render
Hugo's weblog on WhyNotHugo (雨果) · EN
-
Shell Redirection Order
A Brief Intro When i take a look at bash’s documentation about shell redirection , i found out that this two examples are different. This one: ls > dirlist 2>&1 and this one: ls 2>&1 > dirlist So let’s try understanding why it is different. What 2>&1 means? From this hacker news comment , it looks like the expression 2>&1 is like calling system call dup2(2, 1). If we take a look at the man page (man dup2), here is one of the description:
/dev/null · EN
-
Alternative to strcpy() and strncpy() in C
Brief Intro I have seen some people said that strcpy() can be dangerous to use. At that time, I am not sure why strcpy() can be dangerous, but now I have found a simple replication of why strcpy() can be dangerous. This is also the case with strncpy(), which does not guarantee a null terminated string. At the time of writing this blog post, I am still getting started learning C programming language.
/dev/null · EN