News for hackers. Stuff that matters.

fratajcz

Re:Why is the terminal input so weird? on Wednesday November 16, 2022 @06:44PM (#33632691)
That bothered me too, the default function for Ctrl-W in ipython is unix-word-rubout from python-prompt-toolkit [1], which uses spaces for word boundaries. You can rebind it to backward-kill-word so it uses "not a letter nor a digit" as a word boundary.

Here's a gist with my config (also binds shift-left/right arrow to move to previous space instead of visual select): https://gist.github.com/fratajczak/64e32421a43d3b8194d0409ce...

[1]: https://github.com/prompt-toolkit/python-prompt-toolkit/blob...

Re:New Kind of Paper on Wednesday June 23, 2021 @04:03AM (#27602017)
In this case, most people will write the variable x with curved ends (đ‘„) and the operator with straight ends.
The japanese layout HHKB does have arrow keys, but the original (QWERTY) design never had them.

https://www.reddit.com/r/MechanicalKeyboards/comments/36n5cl...

When you add the next sentence in the original text, it's even more blatant:

"And it induces regular effects of power. Each society has its rĂ©gime of truth, its ‘general politics’ of truth: that is, the types of discourses which it accepts and makes function as true; the mechanisms and instances which enable one to distinguish true and false statements, the means by which each is sanctioned; the techniques and procedures accorded value in the acquisition of truth; the status of those who are charged with saying what counts as true”

You can check if stdout is a tty: if it's not, you output raw text. GNU ls does this: by default it outputs in a multiple column layout, but when piped, it outputs one file per line.
I don't think it's actually specified by POSIX, it only mentions arithmetic expansion with $(()) and there is no mention of (()) for arithmetic operations in the grammar: https://pubs.opengroup.org/onlinepubs/007904875/utilities/xc...

The example given for arithmetic expansion also uses x=$(($x-1)): https://pubs.opengroup.org/onlinepubs/007904875/utilities/xc...

Re:Open Source Tools and Data for Music Source Separation on Sunday October 11, 2020 @07:50PM (#24750129)
Most of them are ripped from Guitar Hero/Rock Band, because the games needed to mute individual instruments when you were not playing the correct notes. (With 10+ games and lots of DLC, there's actually a lot of songs that were included)

There was also a service called jammit marketed to musicians where you could buy multitracks from their partnered artists. There are also artists sharing them in deluxe editions of albums, for example I think Dream Theater did it for Black Clouds and Silver Linings?

There's also the possibility of just knowing someone in the industry that could have access to them, maybe? I know Rick Beato who does song analyses on YouTube is a producer, so he could get some this way.

There was a great channel on YouTube dedicated to sharing these isolated tracks called digital split, unfortunately it got banned from YouTube twice, so I don't think it's coming back...

Re:Why the Unix newgrp command exists (sort of) on Saturday October 10, 2020 @01:48PM (#24740577)
Not sure if it was actually relevant at the time of Unix v6, but Brian Kernighan writes in his memoir that "Arguably, one reason why many commands on Unix are short is that it took considerable physical force to type on a Model 33, and printing was slow. [10 characters/second]"
Re:Eddie Van Halen has died on Tuesday October 06, 2020 @07:40PM (#24703752)
I think that was just a way of the manual showing you how to have a sound "inspired by" Van Halen, since he famously got his distortion sound not from a pedal, but from a Marshall amp that he ran at a low voltage using a variac (as an aside, the boss heavy metal was famously used by Swedish death metal bands turning all the dials up, not really a Van Halen sound).

He also used multiple pedals, such as the Echoplex, MXR phase 90 (Eruption), flanger (Unchained) and wah pedal. He later started his own signature EVH range of pedals in a partnership with MXR.

Re:Before you ship a “security mitigation” on Sunday September 27, 2020 @07:25PM (#24611093)
ASAN is great for development, but a less cynical reason for not enabling it at an OS level is that it would add quite a bit of overhead: "Typical slowdown introduced by AddressSanitizer is 2x." (clang docs)

There is also some memory overhead:

* AddressSanitizer uses more real memory than a native run. Exact overhead depends on the allocations sizes. The smaller the allocations you make the bigger the overhead is.

* AddressSanitizer uses more stack memory. We have seen up to 3x increase.

* On 64-bit platforms AddressSanitizer maps (but not reserves) 16+ Terabytes of virtual address space. This means that tools like ulimit may not work as usually expected. Static linking of executables is not supported.

It's not as bad as something like valgrind, but it's certainly not something you'd want enabled on every single process.

Re:MacOS-like Fonts on Manjaro/Arch Linux on Friday September 25, 2020 @11:45AM (#24591013)
You should look into kinto, it completely remaps the modifier keys system-wide and worked pretty well when I tried it (I switched to i3wm so I use super for i3 shortcuts now)

https://github.com/rbreaves/kinto

Re:Nova by Panic on Wednesday September 16, 2020 @06:51PM (#24498942)
Multiple plugins are available to add LSP support in vim, such as coc.nvim (uses node.js, more features) or vim-lsp (lighter, written in vimscript).

Neovim is also going to add native LSP support as well as tree-sitter in their 5.0 release, it's already available in nightly builds.

The most straightforward option is probably coc.nvim, which tries to give a similar experience to VS Code out of the box.

https://github.com/neoclide/coc.nvim https://github.com/prabirshrestha/vim-lsp https://github.com/neovim/nvim-lspconfig https://github.com/neovim/neovim

Re:Bash IRC Quote Database on Wednesday May 27, 2020 @07:44PM (#23331605)
There's also https://danstonchat.com/ in France (formerly known as bashfr)
They have only confirmed ordering some in case it is proven to be useful. (this was 1 month ago)

https://factuel.afp.com/oui-larmee-francaise-sest-procure-de...

Re:ZSH Aliases on Tuesday May 26, 2020 @08:17AM (#23310167)
fish abbreviations kinda do this, for example if you define your alias above as an abbrev and you type hello<space>, it replaces hello by ~/Documents in your command line. You still have to press backspace to remove the space you just inserted, but it's better than nothing.

Also, apparently you can add this to zsh with a plugin: https://github.com/momo-lab/zsh-abbrev-alias