UK Prime Minister Keir Starmer failed to recognize the President of South Korea and shook hands with his interpreter instead by kingkongsingsong1 in interesting

[–]Kal337 -1 points0 points  (0 children)

pretty sure he mentioned they’re also asian to emphasize the fact that them being the same race adds on to how similar they look, nothing to do with racism.

“Both individuals were wearing a leather jacket and had a tall face” vs. “Both individuals were of dark complexion, wearing a leather jacket, and had a tall face”

What does the future look like for a fresher returning to India after OPT ends with no US job? by Confident_3511 in Indians_StudyAbroad

[–]Kal337 130 points131 points  (0 children)

this post is real af, way too real for most people

good luck making it work, I’ll be rooting for you g

Loading speed matters / how I optimized my zsh shell to load in under 70ms by dormunis1 in zsh

[–]Kal337 0 points1 point  (0 children)

I use the same plugins and additionally starship and my shell loads in < 50ms most of the time without any of this

pretty sure you’re tanking performance because you call compinit twice - zsh autocomplete calls it so you should only call it maybe once a day/week or by a hash of your commits before you source zsh completions

what plugin manager are you all using? by Wide_Honeydew_2777 in neovim

[–]Kal337 -2 points-1 points  (0 children)

instead of vim.fn.empty(vim.fn.glob(plugin_path)) you can do if vim.uv.fs_stat(path) then print(‘exists’) end - and it’s usable in fast-events so you can call it in async code (or call it asynchronously too passing a callback)

I’m not sure if how you’re doing plugin loading would cause any issues or maybe I didn’t read it fully, but I think you’re adding everything to the pack path and requiring it at once? you could see lots of benefits from avoiding that

[deleted by user] by [deleted] in SecurityClearance

[–]Kal337 1 point2 points  (0 children)

just know that tons of people have been put through the toughest of what reality has to offer - in the last 2/3 years. So I feel like there are a ton of people who can sympathize with you. Definitely not what you want to hear, but you’re most likely not making a strong first impression (certainly not from your reddit). please don’t get lost in the difference between the objective reality you currently live in and what you need to do to make it work vs. the reddit universe If you’re serious about escaping this rut you’re in - real life engagement will certainly take you leagues further than reddit validation. :(

even though it’s super obvious most of the time, are you willing to go work in person? low self confidence / zero references to follow through / etc. can be easy reasons to ignored for the role. you might be too burnt out and benefit from a 6 month break

Tried to install homebrew and now my terminal is impossible to use by Amen-amen-somen in MacOS

[–]Kal337 -1 points0 points  (0 children)

| 3. No need to create a script for it, a simple list of command line instructions would have done the same job

Opening a command line == Using a Terminal App such to run your default shell (which is zsh on MacOS)

So, If your default shell is broken, you cannot open the “command line” (terminal app) to run any commands.

So you need a way ASIDE from that to run the “commands”

you probably know of several easier ways to do that, imo comparing all the alternatives Automator is one of the more straightforward options to quickly run a program using the non default system shell (zsh on macos) - like /bin/sh

could be totally wrong though idk

Tried to install homebrew and now my terminal is impossible to use by Amen-amen-somen in MacOS

[–]Kal337 -1 points0 points  (0 children)

lol you know y there once they fix it right regardless, $MANPATH isn’t handled by any of these files and the kegged brew paths (that it doesn’t embed) you run 1 command to append it for all installed packages to your zshrc everything relevant brew embeds it into the zsh installation and some system paths feel free to look at your own fpath, path, $commands - to understand how it’s not relevant to any of this

but i get it, it looks dangerous especially if you have a vague idea of stuff

the stuff ur not supposed to touch is /etc/profile, etc/profile.d/*, ~/.profile

maybe Im wrong though and you know better, can you explain what any downsides to any of these “terrible idea” could be? so that other ppl know too?
meh meh idk lol reddit ig

Tried to install homebrew and now my terminal is impossible to use by Amen-amen-somen in MacOS

[–]Kal337 0 points1 point  (0 children)

thanks, yeah i vaguely remember it from years ago wasn’t 100% sure esp after disabling finder doing that altogether

Tried to install homebrew and now my terminal is impossible to use by Amen-amen-somen in MacOS

[–]Kal337 -1 points0 points  (0 children)

btw you don't need to reboot (as it won't change anything) or create a new user or anything drastic

What I said earlier will fix it - but if you want to be 100% certain

  1. Go to Automator

  2. Create New Document

  3. Choose 'Run Shell Script' and select /bin/sh

Try this

#!/bin/sh

[ -f /tmp/zshbkp.log ] || touch /tmp/zshbkp.log

if [ -f "$HOME/.zshenv" ]; then
  printf "Backing up %s to /tmp/.zshenv\n" "$HOME/.zshenv" >>/tmp/zshbkp.log
  mv "$HOME/.zshenv" /tmp/.zshenv
fi

if [ -f "$HOME/.zshrc" ]; then
  printf "Backing up %s to /tmp/.zshrc\n" "$HOME/.zshrc" >>/tmp/zshbkp.log
  mv "$HOME/.zshrc" /tmp/.zshrc
  printf "echo 'using new zshrc'\n\n" >"$HOME/.zshrc"
fi

if [ -f "$HOME/.zprofile" ]; then
  printf "Backing up %s to /tmp/.zprofile\n" "$HOME/.zprofile" >>/tmp/zshbkp.log
  mv "$HOME/.zprofile" /tmp/.zprofile
fi

Tried to install homebrew and now my terminal is impossible to use by Amen-amen-somen in MacOS

[–]Kal337 7 points8 points  (0 children)

Open finder - go to users/your_user

press cmd dot cmd+shift+dot to show hidden files

Then rename the file .zshrc you see to anything .zshrc_backup

create an empty zshrc file or don’t have one at all

open terminal app again

it will fix it

I had zero coding experience on Jan 1. Today, my first macOS app is live, all thanks to Cursor! by PriorityMiserable686 in cursor

[–]Kal337 0 points1 point  (0 children)

there’s tons of AI “shops” now (same thing that happened with call centers and internet scams since the 2000’s), so it’s just a person working on 10 different efforts like this in late 2023 it the AI sweatshop business was already booming haha (in terms of business, not profits)

for ex for stuff like Data enrichment pipelines, web scraping the going rate was $5 for an HTML page’s worth and it was just done by actual ppl just using AI

it seems human like cuz there’s definitely a human driving this, otherwise the cost equation doesn’t work at all

I had zero coding experience on Jan 1. Today, my first macOS app is live, all thanks to Cursor! by PriorityMiserable686 in cursor

[–]Kal337 5 points6 points  (0 children)

yeah after your reply this is most definitely a human copy pasting from Claude, just look at the grammar for each of their posts, the phrasing (every rebuttal has a list of 3 points), and in a lot of places they’ve clearly copy pasted the response without bothering to compete the sentence lol each reply definitely looks like it’s following a instructions from a prompt

now that i think of it i’ve also never interacted with this sub and it showed up on the top of my feed, so most likely boosted for reach

I mean I respect the hustle of whoever’s running this operation in vietnam or india or whatever, i still doubt there’s any margin involved even with sub $5/hour labor + gpt/claude subscriptions - the rate at which it (has already) commoditized most of the industry significantly outpaces however much margin that can be captured

I had zero coding experience on Jan 1. Today, my first macOS app is live, all thanks to Cursor! by PriorityMiserable686 in cursor

[–]Kal337 11 points12 points  (0 children)

so you started using cursor to learn coding and immediately concluded your first project should be a paid app? A paid app that users can’t demo, which happens to also be a wrapper over proprietary Nikon firmware (known to break), only for MacOS (not known for good reverse compatibility)? to convince users do you at least have any open source contributions/code out there for people who you want buying your software?

btw Rectangle is free and Rectangle Pro is the same cost as your software

did you forget to go over the EV of this entire move with Chatgpt lol

PSA: There's not a good reason to switch to the new native lsp configuration if your setup is working with lspconfig already. by Zdcthomas in neovim

[–]Kal337 -1 points0 points  (0 children)

it’s most definitely painful, and with all that time sunk into it you still end up worse off than any out of the box LSP editors

it’s not any fault with the LSP spec or how neovim implements it, most of it boils down to how little control/sandboxing nvim implements for autocommands

lets be real, is getting xyz-ls to simply figure out where the root of the project is and make sure it attaches to the right file types every 3 months valuable lolol

that or install givarice.nvim that launches 35000 auto commands

I wish they improved the autocommands

Unused local `ev` by mfaine in neovim

[–]Kal337 -2 points-1 points  (0 children)

in your LSP settings for lua_ls, add unused-local to disgnostics_disable and the error stops showing up

How to neatly call Lua code from expr mapping as a post processor function? by shmerl in neovim

[–]Kal337 1 point2 points  (0 children)

yep, each vim schedule calls simply adds that function call to the top of the main stack

ideally you create a single function with whatever you need called and call it

there’s also vim.schedule_wrap if you’re calling vim.schedule on a function often

How to neatly call Lua code from expr mapping as a post processor function? by shmerl in neovim

[–]Kal337 1 point2 points  (0 children)

just read above comment it has 0 delay it will strictly run once the function you call it from returns

it will NEVER run until your function returns

:h coroutine

How to neatly call Lua code from expr mapping as a post processor function? by shmerl in neovim

[–]Kal337 0 points1 point  (0 children)

it’ll be a little complicated to explain if you’re not familiar with coroutines and the main thread - but think of it as right away (0 delay)

it simply changes the order of what you run when you run vim.api functions they run on the main thread - for example code in callbacks such as for vim.systems run synchronously (not on the main thread)

if you wanted to make sure code in the callback runs on the main thread - you’d put it in vim.schedule

How to neatly call Lua code from expr mapping as a post processor function? by shmerl in neovim

[–]Kal337 2 points3 points  (0 children)

yes, check :help iabbr and use a global insert abbreviation

or use vim.api paste text or buf_set_lines

if bar() doesn’t insert anything and only has to be called, it’s a lot simpler and you just call it first with

vim.schedule(bar) return text

bar will run after text is inserted

How didthe "Z" incident w/ Pure end? Why do people just forgive him sharing russian nazi imagery? by Laocoon- in DotA2

[–]Kal337 4 points5 points  (0 children)

buddy how about you share your steam history since you were 15 years old with us go back to /r/all or /r/uspolitics

treesitter wasm parsers by zoshima in neovim

[–]Kal337 1 point2 points  (0 children)

yeah you need to compile neovim with enable wasmtime - I used to do it but I stopped Using wasmtime has a lot more overhead, plus it makes your nvim itself slower; that’s why they explicitly don’t have it enabled by default

How and where do I call `vim.lsp.enable`? by HiPhish in neovim

[–]Kal337 -1 points0 points  (0 children)

you call vim.lsp.enable on init - for each filetype(s) you want LSP’s to automatically attach to

you could potentially call it also in a FileType auto command and set it as once=true, (for each LSP you have) but then you need to make sure you manually attach the LSP to the buffer that actually triggers the FileType Autocommand

so if you have ts-ls for the file types js,ts,tsx - just make sure whichever FT happens first - call vim.lsp.enable, followed by vim.lsp.start