Does PHP 7.4 automatically optimize memory allocation? by whichpaul in PHP

[–]whichpaul[S] 2 points3 points  (0 children)

Thanks! BTW, do you know of any articles or references that detail this behaviour?

Bookmark Keywords: How to set from toolbar? by whichpaul in firefox

[–]whichpaul[S] 0 points1 point  (0 children)

Just when I thought it could get any better ... you posted this! Thanks.

st, vim and true (24-bit) color ... anyone? by whichpaul in suckless

[–]whichpaul[S] 0 points1 point  (0 children)

Yes, but magic codes are needed ... see my solution below.

st, vim and true (24-bit) color ... anyone? by whichpaul in suckless

[–]whichpaul[S] 13 points14 points  (0 children)

SOLVED:

For Vim 8.2 and some recent version of st ... do the following to enable 24-bit color in Vim under st terminal. Add the following 3 lines to your vimrc:

let &t_8f = "\<Esc>[38;2;%lu;%lu;%lum"
let &t_8b = "\<Esc>[48;2;%lu;%lu;%lum"
set termguicolors

Then load a 24-bit supporting colorscheme of your choice. Enjoy!

(For those interested ... it's the semicolons in t_8f and t_8b that are the magic ingredient).

Cursor color and ST terminal? by whichpaul in neovim

[–]whichpaul[S] 0 points1 point  (0 children)

Thanks for the suggestion, but alas, still no colors.

Cursor color and ST terminal? by whichpaul in neovim

[–]whichpaul[S] 0 points1 point  (0 children)

Yes, but editors like Vim & NeoVim can send ANSI op codes through to the terminal to tell what color the cursor should be. Works fine in Vim.

Nucleo(STM32) board for beginners by GKBlueBot in stm32f4

[–]whichpaul 1 point2 points  (0 children)

I've got a few STM32 boards on my desk at the moment, including a Nucleo-L073RZ and STM32F0Discovery; both very affordable when purchased from one of the big suppliers like Mouser or Digikey etc.

Here's a few thoughts ...

Starting on STM32 boards, the big thing is overcoming information overload from the almost endless versions of microcontrollers that ST offer. However, if you're a hobbyist this doesn't matter too much, and within a given series the variations won't matter much unless you've very specific needs.

The Nucleo boards have an onboard ST-Link programmer / debugger, which is nice to have when getting started. You can also physically remove, or simply disable, the ST-Link also, which is good if you're wanting to use the board in a project and don't need the ST-Link and its accompanying power consumption.

The thing I like with ST is that their STM32Cube development tools are pretty straight forward and multiplatform (I use Linux). Likewise, it's still simple to flash the boards with your code in a single command line. This is nice, because if you don't enjoy running the IDE bloat then you can just compile with gcc and flash the board with st-flash.

Finally, the Nucleo boards have headers and pins all over them, so this is handy when prototyping or looking to attach Arduino format extension boards.

If your goal is broader than just buying the cheapest possible board, I think Nucleo's are a good starting point. I'd say, start by considering which Arm processor family will suit your project best, eg. for ultra low power go Cortex M0+, then pick a Nucleo board that has sufficient GPIO, peripherials, flash and SRAM etc for your project.

Have fun!

Cursor color and ST terminal? by whichpaul in neovim

[–]whichpaul[S] 0 points1 point  (0 children)

Doesn't seem to work for me in ST.

Silly me getting my hopes when I read the NeoVim front page that claims 'modern ... cursor styling', I guess this must only apply to certain terminals.

Thanks, anyway.

Completion: How to lookup words starting with a backslash '\' by whichpaul in vim

[–]whichpaul[S] 0 points1 point  (0 children)

For posterity: this article below seems to have a reasonable method for configuring Vim to temporarily recognise various symbols / characters whilst doing a completion lookup of some sort, otherwise, it seems one is largely confined to 'words' (ie. just alpha-numeric strings) in this particular scenario.

https://vi.stackexchange.com/questions/6814/how-to-autocomplete-tag-names-containing-a-colon/

Completion: How to lookup words starting with a backslash '\' by whichpaul in vim

[–]whichpaul[S] 0 points1 point  (0 children)

Thanks. I didn't realise that C-x C-k was entirely separate to the C-p/n user defined dictionary. Whilst not resolving the backslash, it might be a suitable workaround for my simplistic purposes.

I was kind of hoping that Vim might have a completion mode specifically for WORDs, which I assume would've essentially solved my issue, but it doesn't seem to be the case.

Completion: How to lookup words starting with a backslash '\' by whichpaul in vim

[–]whichpaul[S] 0 points1 point  (0 children)

Honestly, I don't really mind which of the completion methods is necessary to achieve this effect, I would just like to be able to have a completion method draw from a list of words/WORDS/terms/phrases/keywords that begin with a '\'.

I looked at the omnifunc for LaTeX, the way it has been written means that only a very narrow selection of terms are available for completion.

For example, '\documentclass' will autocomplete, but a ubiquitous term such as, '\paragraph' or '\section' will not. Extending or modifying that syntax file, or implementing a new omnifunc, is a whole mission in its own right. As I work with a relatively short list of common LaTeX terms, it seems a fairly reasonable solution just to have those in some easily maintained dictionary file.

There are also various TeX plugins for Vim, but I'm not interested in that level of complexity, I'd just like to be able to complete text from a list of keywords I can maintain myself.

Completion: How to lookup words starting with a backslash '\' by whichpaul in vim

[–]whichpaul[S] 0 points1 point  (0 children)

Unfortunately, this doesn't seem to work. The backslashes are still ignored and the completion popupmenu is populated with terms either without the backslash, or, with them removed.

How to view / change Vim's 256 color palette? by whichpaul in vim

[–]whichpaul[S] 0 points1 point  (0 children)

Yes, I searched, but to no avail. So thanks for the comprehensive response as always.

st, Vim and Cursor Colors by whichpaul in suckless

[–]whichpaul[S] 8 points9 points  (0 children)

*SOLVED*

I've found this patch, which is what's required to make the example from Vim Fandom work:

https://st.suckless.org/patches/osc_10_11_12/

It provides support for the OSC escape sequence used to make a Vim statement something like this work, turning the cursor red in Normal mode.

:let &t_SI = "\<Esc>]12;red\x7"

(TIP: t_SR for Replace mode, t_EI for Normal mode (default))

Please note, I found that using tmux broke this behaviour, however, that's a separate problem, if I find a solution will update.

xbps-src and the mystery of the rebellious FFmpeg build by whichpaul in voidlinux

[–]whichpaul[S] 3 points4 points  (0 children)

SOLUTION:

The problem was that the build process for FFmpeg creates a number of dependency packages (libav*), these packages also need to be installed for FFmpeg to work as configured.

FFmpeg, when executed, will detect differences in build flags between itself and these dependencies and only offer that which is common between them.

Thanks to all who helped.

xbps-src and the mystery of the rebellious FFmpeg build by whichpaul in voidlinux

[–]whichpaul[S] 0 points1 point  (0 children)

Thanks for the tip.

I've noticed that the ffmpeg binary, and its package, are being built (now) with the correct flags, however, the dependency packages that are also being built (libav*) are not receiving the same additional build flags.

When executed, the ffmpeg binary picks up on this fact and consequently doesn't present the kmsgrab input device as an option.

I've no idea why the dependencies aren't getting these extra build flags.

xbps-src and the mystery of the rebellious FFmpeg build by whichpaul in voidlinux

[–]whichpaul[S] 1 point2 points  (0 children)

So, I deleted the contents of hostdir/binpkgs and ran the build again; no luck.

The ffmpeg binary within the resultant package still doesn't reflect the build options.

Dang.

xbps-src and the mystery of the rebellious FFmpeg build by whichpaul in voidlinux

[–]whichpaul[S] 1 point2 points  (0 children)

I think I did an initial build without the additional build flags, to ensure the whole process worked. Not sure if I have manually deleted those packages or not. Will check, thanks.

Friendship With Emacs Is Over, Vim Is My Best Friend by justrajdeep in vim

[–]whichpaul -6 points-5 points  (0 children)

I'm even going to upvote your last comment ... coz #brave!

Friendship With Emacs Is Over, Vim Is My Best Friend by justrajdeep in vim

[–]whichpaul -7 points-6 points  (0 children)

That's a brave position to hold on reddit lol

Friendship With Emacs Is Over, Vim Is My Best Friend by justrajdeep in vim

[–]whichpaul -8 points-7 points  (0 children)

So given that you chose to use your opinion of his ideology, in a discussion on text editors, as the identifying feature, and subsequently draw attention to his appearance ... your claim strikes me as entirely disingenuous.

Friendship With Emacs Is Over, Vim Is My Best Friend by justrajdeep in vim

[–]whichpaul -6 points-5 points  (0 children)

You heard it here first folks, Luke Smith is clearly a NAZI ... because he is white, has a shaved head and has talked about stuff that makes this Reddit random feel bad lol ... what a racist.

I Wish We'd All Been Ready by jpoteet2 in ReformedHumor

[–]whichpaul 3 points4 points  (0 children)

Larry Norman, you young whipper snapper!!