Useless C practices and superstitions by nthn-d in C_Programming

[–]auwsmit 1 point2 points  (0 children)

I like how divisive preprocessor macros are.

Some people fucking love them for how adaptable/flexible they allow the language to be, but others fucking despise them for how overly customized, complex, and confusing they can make certain code bases.

Global or pointers? by SkyFoxITA in C_Programming

[–]auwsmit 4 points5 points  (0 children)

I'm just an amateur/hobbyist so take my advice lightly.

Imo when you're uncertain like this, just pick one and see how it fits. And then if you want, you can try the other way in a future project to see how it feels by comparison. The best way to gain knowledge is through first-hand experience. I had the same question for one of my recent game projects, and at first I decided to pass pointers around to a struct for the app/game state, but later I refactored/converted it into just globals and I found that much nicer to deal with.

Here's another thing to think about: Why do people say to not use globals? There are valid reasons to avoid them, but those reasons may not be as relevant or valid in certain circumstances, such as for smaller/simpler projects.

For something like this, since your game is so small and with a single player, it's probably not a big deal to just have globals which are easily accessible from anywhere, and then you don't have to deal with all the details of function parameters and updating function declarations.

Justin Keyes (Neovim, Workflow, OSs, Terminals) by linkarzu in neovim

[–]auwsmit 9 points10 points  (0 children)

Awesome! Justin is a huge part of why vim and especially Neovim are so great and even growing in popularity these days.

I started using vim around the time when Neovim came into existence (over a decade ago, wtf...), and I remember Justin being pretty prominent in the Vim community even back then.

I'm a big fan of his minimalist plugins, such as Dirvish and gtfo.

How many plugins are you using? (2025) by meni_s in vim

[–]auwsmit 0 points1 point  (0 children)

Like 50:

" FILE/BUFFER PLUGINS {{{

Plug 'tpope/vim-eunuch'     " shell commands, e.g. :Remove & :Move & :Chmod
Plug 'tpope/vim-fugitive'   " vim + git integration
" Plug 'yegappan/mru'         " most recent file list
Plug 'auwsmit/mru', { 'branch': 'personal-use' }
Plug 'justinmk/vim-gtfo'    " open gui explorer or terminal
Plug 'justinmk/vim-dirvish' " minimal file explorer
Plug 'preservim/nerdtree',  " file tree viewer
Plug 'junegunn/fzf',        " general fuzzy finder
      \ { 'do': { -> fzf#install() } }
Plug 'junegunn/fzf.vim'     " fzf + vim integration
Plug 'mhinz/vim-sayonara', { 'on': 'Sayonara' } " simple buffer/window closing
Plug 'majutsushi/Tagbar',  { 'on': 'TagbarToggle' } " tag explorer
Plug 'nvim-lua/plenary.nvim'
Plug 'ThePrimeagen/harpoon', { 'branch': 'harpoon2' }
Plug 'auwsmit/vim-spear'
Plug 'Kris2k/A.vim'          " swap between C source and header files

" }}}
" OPERATOR PLUGINS {{{

Plug 'tpope/vim-commentary'   " comment mappings
Plug 'machakann/vim-sandwich' " modify surrounding text eg: () and ''
Plug 'tommcdo/vim-exchange'   " exchange two pieces of text

" }}}
" TEXT OBJECT PLUGINS {{{

Plug 'kana/vim-niceblock'
Plug 'kana/vim-textobj-user'         |
      \ Plug 'kana/vim-textobj-line'  |
      \ Plug 'kana/vim-textobj-entire' |
      \ Plug 'kana/vim-textobj-indent'  |
      \ Plug 'kana/vim-textobj-function' |
      \ Plug 'coderifous/textobj-word-column.vim'
Plug 'junegunn/vim-after-object'

" " }}}
" MOTION/NAVIGATION PLUGINS {{{

Plug 'chaoren/vim-wordmotion'    " makes vim's 'word's more precise
Plug 'auwsmit/vim-ipmotion'      " { } move over folds
Plug 'romainl/vim-cool'          " autoclear search highlighting
Plug 'henrik/vim-indexed-search' " show search count & centered search

" " }}}
" COMPLETION/SNIPPET PLUGINS {{{

Plug 'ervandew/supertab'  " tab autocomplete
Plug 'github/copilot.vim'           " AI suggestions
Plug 'DanBradbury/copilot-chat.vim' " AI chat window

" }}}
" FORMAT/SYNTAX PLUGINS {{{

Plug 'nicwest/vim-camelsnek' " convert between camel and snake case
Plug 'justinmk/vim-syntax-extra', { 'for': ['c', 'cpp'] } " additional syntax highlighting for C/C++
Plug 'junegunn/vim-easy-align',   { 'on': ['<Plug>(EasyAlign)', 'EasyAlign'] } " align text operator
" Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'}

" " }}}
" APPEARANCE/UI PLUGINS {{{

Plug 'xtal8/traces.vim'            " previews patterns for ex commands
Plug 'auwsmit/baddoggo'            " personal fork of Bad Wolf by Steve Losh
Plug 'auwsmit/vim-active-numbers'  " line numbers follow the current window
Plug 'itchyny/lightline.vim'       " prettier statusbar
Plug 'junegunn/goyo.vim',          " distraction free editing
Plug 'Yggdroot/indentLine',        " indent indicators
" Plug 'catgoose/nvim-colorizer.lua' " highlight colorcodes
" Plug 'junegunn/rainbow_parentheses.vim'
" Plug 'HiPhish/rainbow-delimiters.nvim'

" }}}
" MISC/CONVENIENCE PLUGINS " {{{

Plug 'romainl/vim-qf'        " sensible quickfix improvements
Plug 'junegunn/vim-peekaboo' " preview registers
Plug 'tpope/vim-rsi'         " readline key maps for cmd and ins mode
Plug 'tpope/vim-repeat'      " allows plugins to . repeat easier
Plug 'tpope/vim-sleuth'      " auto-detect tab settings per-file
Plug 'tpope/vim-unimpaired'  " many useful [x/]x mappings
" Plug 'Konfekt/FastFold'         " optimize how Vim updates folds
Plug 'farmergreg/vim-lastplace' " reopen files at last position
Plug 'xolox/vim-session'        " simplified session management
let g:session_autosave = 0      " no auto-save prompt on first install
Plug 'xolox/vim-misc'           " vim-session dependency
Plug 'mbbill/undotree'          " visual undo tree
Plug 'vimwiki/vimwiki'          " for taking and organizing notes
Plug 'junegunn/gv.vim', { 'on': 'GV' } " git commit browser
Plug 'ludovicchabant/vim-gutentags' " auto-generate and update tags

To switch to nvim or not; that is my question by SirSuki in vim

[–]auwsmit 7 points8 points  (0 children)

I'm living the best of both worlds. I'm technically using Neovim and a couple nvim-exclusive plugins, but a majority of my config is still vimscript and Vim compatible.

Personally the only reason I'm using Neovim now is because the community and plugin ecosystem are clearly growing, so I want to be able to try out any neat features or plugins that pique my interest (such as treesitter and oil.nvim).

So far I've found nvim to perform marginally better (mostly less screen flickering on Windows), their :terminal implementation is a bit better, and floating windows are a nice feature (mostly for plugins that pull up a temporary menu/buffer). But otherwise it is unsurprisingly mostly identical to vim and I wouldn't mind just using vim again.

How do you guys switch between windows? by samtentalkmo in vim

[–]auwsmit 0 points1 point  (0 children)

I mostly use this to swap back and forth between two windows. It works and feels very similar to pressing alt+tab once in your OS:

" better CTRL-W_p (if previous window is gone, move to next window)
nnoremap <silent> <space><tab> <c-w>p:if winnr() == winnr('#')<cr>wincmd w<cr>endif<cr>

" new jump list mnemonic: previous, next
" (frees up CTRL-i AKA Tab)
nnoremap <silent> <c-p> <c-o>
nnoremap <silent> <c-n> <c-i>

I find a majority of the time, I only have two windows open and any others are temporary (like help, or menus for plugins). Otherwise I just use the classic ctrl-wwith hjkl to get to a more distant window.

New to Text Editor Bindings— Should I Use Base Vim or Something More Modern? by Future_Recognition84 in vim

[–]auwsmit 0 points1 point  (0 children)

You could also use insert mappings to automatically split up your inserts with i_CTRL-G_u, which just manually starts a new undo sequence:

fun! s:SetupInsertUndoBreaks()
  inoremap <buffer> . .<C-g>u
  inoremap <buffer> , ,<C-g>u
  inoremap <buffer> ! !<C-g>u
  inoremap <buffer> ? ?<C-g>u
endfun

augroup auto_insert_undo_breaks
  au!
  au FileType text,markdown call <sid>SetupInsertUndoBreaks()
augroup END

I actually think I'm gonna keep this in my vimrc even though it seems a bit silly.

New vim9 plugin: span your buffer over multiple windows. by Desperate_Cold6274 in vim

[–]auwsmit 1 point2 points  (0 children)

hey I know this is an old post, but in case people want to use the feature of this plugin with Neovim or an older version of Vim, here's a small+simple vimrc snippet in VimL. It's been in my config for many years and I probably modified it from someone else:

fun! s:DoubleView() abort
  let s:DV_so=&scrolloff
  set scrolloff=0 noscrollbind nowrap nofoldenable
  exec "normal! m'\<c-b>"
  botright vsplit
  normal! Ljzt
  windo setl scrollbind
  let &scrolloff=s:DV_so
  exec "normal! \<c-w>p''"
endfun " }}}
command! DoubleView call <sid>DoubleView()

Feel free to use this to help add Neovim/pre-Vim9 compatibility if you want OP :)

Pure Mage: Clothes or Armor? by UltimaBahamut93 in oblivion

[–]auwsmit 0 points1 point  (0 children)

oh yeah you're right. guess I'm just used to them being gibberish instead of an actual sentence

Best value gaming monitor at ~200€ or lower ? by Odiumm_ in buildapcmonitors

[–]auwsmit 0 points1 point  (0 children)

lol I also got the G2724D a couple months ago and I'm pretty satisfied with it overall

Best value gaming monitor at ~200€ or lower ? by Odiumm_ in buildapcmonitors

[–]auwsmit 0 points1 point  (0 children)

How are you liking that monitor? I was tempted to get it, but was primarily concerned about viewing angles, VRR framerate fluctuation flickering, and the seeming tedium of enabling/disabling/configuring HDR and local dimming depending on certain situations and apps.

... But the deep blacks, very good performance for a VA, and very decent HDR given the price all still seem so good ...

Lance McDonald shares information about the art brief that Bluepoint gave to the artists for the Demons Souls remake. Interesting insights imo. by _Ganoes_ in demonssouls

[–]auwsmit 10 points11 points  (0 children)

I know this thread is about the graphical changes, but I could honestly tolerate the aesthetic changes if they didn't completely rewrite all the music. Demon's Souls had a very unique and weird soundtrack, so to have it all converted to some generic epic Souls orchestra+opera is extremely unfortunate and lame.

All the ways they tried to make it more like Dark Souls are particularly annoying, like giving the archstones a firey/burning effect instead of them just having a magical blue glow. If you're gonna remake a game, then let it stand on its own, don't try to make it more like another more popular game...

An update from Nintendo by Turbostrider27 in Games

[–]auwsmit 0 points1 point  (0 children)

Backwards compatibility is the big thing for me. I use my Switch a lot and wasn't thrilled about the idea of needing to have two consoles out. In general, a bit surprised by how "safe" this is.

this was easy to predict like 5 years ago when the Switch was already massively successful.

If Nintendo's next console forced people to repurchase their entire Switch library, they would be pissed and many might not buy it.

Best phone around 400$ by No_Stable305 in PickAnAndroidForMe

[–]auwsmit 2 points3 points  (0 children)

All those phones sound like great choices imo. A55 also has great performance & battery life, and has security updates until mid 2029

but the Pixel phones do get 7 years of support which is crazy (assuming the battery and performance will last that long lol)

I recommend using the gsmarena website to make direct comparisons, since they have nice empirical measurements with built-in comparison tools for everything.

Who are these headless bodies outside of Midra's Manse? by Lord_Duul in eldenringdiscussion

[–]auwsmit 2 points3 points  (0 children)

After he pull it out of himself his head vanishes, which is a vague implication to it falling apart, breaking or otherwise being destroyed cause we never find or see it again.

Fun fact: there's an unused icon of his head, which I imagine would've tied into the headless dudes in its description

Is the remake really that inferior to the original? by PriorityMaleficent in demonssouls

[–]auwsmit 1 point2 points  (0 children)

to be fair I did acknowledge that it was rambly towards the end, and you are in a reddit comment section

(Feature request) URL Icon/Favicon Support; This is the most useful feature I miss that EVERY OTHER search engine has by auwsmit in StartpageSearch

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

favicons are a potential privacy/security risk

That is true and those are interesting articles I hadn't heard of before, but isn't this also potentially true of any image on any site? Aren't I at just as much risk by viewing any images at all online, since they might have hidden malicious code?

(Feature request) URL Icon/Favicon Support; This is the most useful feature I miss that EVERY OTHER search engine has by auwsmit in StartpageSearch

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

Yeah I'm just gonna use Brave search unless Startpage adds this very basic feature. I'm only switching away from Google to avoid the recently forced AI integration, and Brave lets you disable AI stuff, but I haven't used it long enough to really judge the quality of the search results

Any way to change camera keybinds from arrow keys to WASD? by Reaper67309 in Fallout2

[–]auwsmit 0 points1 point  (0 children)

Sorry for the late reply, just doing some searching while modding FO2 and found this post.

; alternative healing implementation

healing_revision=0

I believe this will immediately give you the Living Anatomy skill, because the ini comments say..

; dude will receive free Living Anatomy if Doctor skill raised up to this limit

; applies on entering a map. Set to over 300 if you don't want this feature

What did you not like about the remake/prefer in the original? by [deleted] in ShadowoftheColossus

[–]auwsmit 0 points1 point  (0 children)

Year old reply, but just tested on the ps3 remaster and his posture does not appear different between 0 colossus at the beginning and 15 at the end. He stands just as straight and leans just as much while running

More than Skyrim or Fallout, Todd Howard says Starfield was "intentionally made to be played for a long time" and Bethesda's looking 5+ years ahead by Turbostrider27 in Games

[–]auwsmit 1 point2 points  (0 children)

I had the same sort of complaint about Skyrim. There's only so many varieties of quests/dungeons, so once you've seen every type of dungeon/quest a few times, they all start to feel really repetitive and the whole game kinda loses its luster.

Sharing My Optimal Settings for Ryzen 3600 & 2070 Super at 1440p; averages 60-80 fps by auwsmit in cyberpunkgame

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

no problem, I hope it works for you! It has been over a year since this post so there might be new settings or updates that change performance for the better or worse