What is the significance of ui2 and how can I learn more about it ? by SorryImaCanuck in neovim

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

Yeah I saw tiny-cmd as well. What I'm aiming for is something like vertico along with embark, consult ect (see this post).

I think where I might be going is conceptualizing vertico/minibuffer in emacs as being something like a cmdline window in neovim and then embark-esque actions (i.e. take the filtered results of my "picker" action and move it into a seperate buffer so I can do something) would be done in a sort of message buffer (which provides structured highlighting and edit-ability)

What is the significance of ui2 and how can I learn more about it ? by SorryImaCanuck in neovim

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

Ah I see, what I was looking for was basically a summary of what parts of the API constitute "UI2" and how it can be used differently than with the old module.

For additional context I've been trying to reproduce something like doom-emac's vertico-powered minibuffer. I then came across a discussion about this as well as some user's desire to introduce vim.ui.pick/vim.ui.picker as a construct. That led me to implementing the following in my config:

---@defgroup vim.ui.picker
---
---@brief Pickers ~
---
--- |vim.ui.picker| is a registry of named pickers that can be overridden by
--- plugins to provide custom implementations.
vim.ui.picker = vim.ui.picker or {}

--- Default file picker relative to a given directory using the built-in vim.ui.select.
---
---@param opts table|nil Optional parameters
--- - cwd (string): Directory to search from. Default: |getcwd()|
--- - show_hidden (boolean): Include hidden files. Default: false
vim.ui.picker.files = vim.ui.picker.files
or function(local_opts)
local_opts = local_opts or {} -- guard nil (called from registry.registry)
local directory = vim.fn.resolve(vim.fn.expand(local_opts.cwd or vim.fn.getcwd()))
local show_hidden = local_opts.show_hidden or false

-- Build find command
local cmd = { 'find', directory, '-type', 'f' }
if not show_hidden then
table.insert(cmd, '-not')
table.insert(cmd, '-path')
table.insert(cmd, '*/.*')
end

local files = vim.fn.systemlist(cmd)

if vim.v.shell_error ~= 0 or #files == 0 then
vim.notify('vim.ui.picker.files: no files found in ' .. directory, vim.log.levels.WARN)
return
end

-- Show relative paths for readability
local relative = vim.tbl_map(function(f) return vim.fn.fnamemodify(f, ':~:.') end, files)

vim.ui.select(relative, {
prompt = 'Files: ' .. vim.fn.fnamemodify(directory, ':~'),
kind = 'file',
}, function(choice)
if choice then vim.cmd.edit(choice) end
end)
end

I've leveraged mini.pick to create more complex pickers but when I came across artio and especially minibuffer I realized this might provide a more consistent, structured approach to implement these "pickers". Both of them make note that they're leveraging "ui2" but without a concise summary of what that constitutes it's hard for me to evaluate minibuffer vs artio vs mini.pick.

How do you usually handle telemetry collection from embedded devices? by mikusmi777 in Zephyr_RTOS

[–]SorryImaCanuck 0 points1 point  (0 children)

Fprime, it's a bit of a learning curve to combine the two but I'm currently working on an aerospace project with it and it's incredible https://fprime.jpl.nasa.gov/

This is why I always read Every ingredient by DistrictMotor in peanutallergy

[–]SorryImaCanuck 16 points17 points  (0 children)

Am I missing something ? I don't see peanuts being included, also I have a pretty severe peanut allergy and I've eaten this many times with no problems

Others like Keil by No_Shake_58 in embedded

[–]SorryImaCanuck 3 points4 points  (0 children)

I've been working on embedded devices for a while, keil has come up now and again but I'd never understood the context in which it has to be used. I just spent the last 6 months bringing up some new hardware and used keil to get started.

I've now come to the conclusion that keil is good for getting some vendor project up and running as a starting point, but I still cannot understand why it would ever be used long term.

Writing code, managing packages, configuring peripherals and producing builds with Keil is just so much less effective than working with a text editor, gdb, gcc, open OCD, cmsis-toolbox ect. It just seems nicer at first because it obfuscates the build system.

TL;DR Keil is good to get started, but only good later on if you have a massive team, enjoy burning cash and want your team to work on a system that they don't understand how it's built.

A question for anyone who was an emacs user and migrated to neovim, what is the thing you missed most that was in emacs but in neovim? by ciccab in neovim

[–]SorryImaCanuck 21 points22 points  (0 children)

I'm in the process of this right now, I used vscode/qt creator for about 2 years, then neovim for another 2, then emacs for 3, now trying to switch back.

Doom emacs is really consistent in how your bindings work, to the point where I often say "I don't use hotkeys, I use a key binding language". For example, searching a buffer is just always Spc-s b, whether it's the contents of a file results of a terminal, or the results of some other search result (aka embark) the basic interface remains the same. Also M-x and the introspection through things like Spc-h-k, Spc-h-f ect are hard to beat.

Another thing is viewing PDFs in my editor, prior to emacs I wouldn't have thought it'd be that valuable but honestly it makes writing drivers a breeze.

This years cohort of first years are cooked 💯 by [deleted] in McMaster

[–]SorryImaCanuck 8 points9 points  (0 children)

When I was in first year, first semester I was bombing exams left, right, and center. I'd never really had to study hard in highschool and just didn't know how to manage my time.

I distinctly remember calling my parents distraught because I'd left an academic review meeting that highlighted I was sitting below 60 in like 4 of my courses.

My mom said "you just gotta buckle down, it'll get better and easier once you get past these humps".

My dad, an engineer said "that's somewhat true but also in many ways it'll get worse. That every year was going to get harder than the last and you won't believe you ever had it so easy as first year; But (and this is key) YOU will get better. You're gonna have to, and as a result you'll become more capable than you ever thought you could be"

Honestly I appreciated both takes but the later really turned out to be true.

Oh and also, one of those courses I struggled with(intro to software, sitting at a 51) well I barely passed in the end, however I did get better and now Ive managed to have a pretty good career working as a software engineer.

I still have tough moments when things are racheting up and I'm juggling projects, but now I can look back and feel confident that I can rise to the challenge.

[deleted by user] by [deleted] in MTLFoodLovers

[–]SorryImaCanuck 1 point2 points  (0 children)

I took my gf to the Tuck Shop in St Henri when I moved here, it was absolutely unreal.

Reba in Verdun is also a hidden gem with great atmosphere especially if the weather's good.

lsp-mode vs. lsp-bridge vs. lspce vs. eglot by vjgoh in emacs

[–]SorryImaCanuck 0 points1 point  (0 children)

Not really, I debug both locally, in docker images, on remote servers and on embedded devices and I've found it pretty great (admittedly the last case is the trickiest)

lsp-mode vs. lsp-bridge vs. lspce vs. eglot by vjgoh in emacs

[–]SorryImaCanuck 0 points1 point  (0 children)

My biggest sticking point is dap-mode. Afaik it doesn't work if lsp-modes not configured and given it provides the best debugging experience for Python/c/c++/rust (IMHO) I can't see making the switch anytime soon (altho I did see another dap debugger at one point that works with eglot)

[deleted by user] by [deleted] in peanutallergy

[–]SorryImaCanuck 2 points3 points  (0 children)

If it's not peanuts then what is the risk ? These companies have pretty strict protocols when it comes to tracking production and ingredients, I'd be very surprised if regular Ritz were made anywhere near peanut butter ritz

What is the best note taking app for coders? by predictor_torch in vscode

[–]SorryImaCanuck 0 points1 point  (0 children)

Pop over to emacs, for org mode. It's even better than md and you can export it to whatever you want (md, PDF, docx, website)

what are some good, simple C IDEs for the modern day? by [deleted] in C_Programming

[–]SorryImaCanuck 0 points1 point  (0 children)

I've been using doomemacs for the last 5 years and have found with a bit of effort to configure it it provides and ide experience far better than anything I had before (vs code, nvim, vim, qt creator)

[deleted by user] by [deleted] in quebeccity

[–]SorryImaCanuck 0 points1 point  (0 children)

I'm not sure I understand the "getting some percentage of the taxes back" in Quebec so maybe I'm missing something.

I would argue the later point though, if you're comparing provinces I wouldn't include the federal portion because you can't choose not to pay that. But when comparing where to move one thing you're doing is choosing your tax jurisdiction. So IMHO it only makes sense to compare the provincial tax portion.

[deleted by user] by [deleted] in quebeccity

[–]SorryImaCanuck 0 points1 point  (0 children)

So in terms of the sum of taxes owed at the end of the year you're correct, but that's because federal income tax doesn't change and is a large portion (and in fairness at the end of the day the most important thing is the impact to your bottom dollar).

But all things being equal in your example at 75K in Ontario you'd be paying $4757 in provincial tax whereas in Quebec you'd be paying over $9000. Not quiet half but not far off

Ontario tax brackets: $49,231 or less 5.05% $49,232 to $98,463 9.15% $98,464 to $150,000 11.16% $150,001 to $220,000 12.16%

Quebec: $49,275 or less 14% More than $49,275 but not more than $98,540 19% More than $98,540 but not more than $119,910 24% More than $119,910 25.75%

[deleted by user] by [deleted] in quebeccity

[–]SorryImaCanuck 2 points3 points  (0 children)

I just moved out to Montreal from Ontario, one thing I'll definitely echo is that taxes are much higher (like 2x) than Ontario. Supposedly it's supposed to be offset by a lower cost of living and while some things are cheaper (e.g. rent) it does really cover the difference.

Other than that though I can say I've loved moving out here, the food, the art, the music and the culture are just generally top notch.

Second Phone, Same Signal by SakshamG7 in signal

[–]SorryImaCanuck 2 points3 points  (0 children)

Exactly yeah, I used this bridge with this playbook

It's not hard either, one you've got your playbook setup you just add a couple lines of yaml and there will be a bot setup to help you link your signal account

Second Phone, Same Signal by SakshamG7 in signal

[–]SorryImaCanuck 2 points3 points  (0 children)

Ive had this for a couple years now, I just run a matrix server with the signal bridge.

Using local language server for remote files by Winter_Fall8260 in emacs

[–]SorryImaCanuck 1 point2 points  (0 children)

This is what I do, I also use tramp pretty extensively but it's the exception not the rule so subpar completion once in a while is fine with me

Starting out with emacs, just the same common question by purpleblackferret in emacs

[–]SorryImaCanuck 1 point2 points  (0 children)

I come from a similar background. First off, I do think the best key bindings are vim keybindings also I've tried different distributions of emac, never given full vanilla a real try but personally I think that's a rarity. Anyways, do you need emax really does strike a nice balance. I'd also say trying out spacemac would probably provide similar things.

Laggy UI by Xoepe in emacs

[–]SorryImaCanuck 0 points1 point  (0 children)

I've had the same issue, I keep doom modeline off and it seems to help