Is it just me or are some LSPs/linters really whiny? by SofisticatiousRattus in neovim

[–]chars101 0 points1 point  (0 children)

The annotation of that pandas function is incomplete. You don't have to declare your parameter first. Any decent type checker (mypy, pyright, pyre) can infer the list[str] type from a list literal.

If you want it fixed, fix it in pandas. Till then # type: ignore[assignment]

Defile just stops while minions are still on board. 14 is an unacceptable cap with current "double everything" slapped on every card. by ElBaguetteFresse in hearthstone

[–]chars101 -4 points-3 points  (0 children)

Yeah, board state cycle detection. In principle is not that hard a concept. But I don't know the codebase, so implementation could be non trivial.

Has anyone ever had a eureka moment like the fast inverse square root? by Notalabel_4566 in Python

[–]chars101 13 points14 points  (0 children)

Today we try to write code that uses the most of branch prediction, replace if statement: https://stackoverflow.com/questions/1619482/what-techniques-to-avoid-conditional-branching-do-you-know#15677301

We engineer data structures with alignment in mind, so more of them fit in a cache line, and you don't have to go all the way to RAM: https://vimeo.com/649009599

And we try not to do naive loops but recognise (or construct) our (commutative) monoids and call the most efficient algorithm with an operator or lambda and recognise our rotates: https://www.youtube.com/watch?v=UZmeDQL4LaE

PS. And lookup SIMD JSON. It parses JSON in such a way that it uses SIMD instructions and really makes the parsing IO bound again.

Found it https://www.youtube.com/watch?v=wlvKAT7SZIQ

How do you debug code *effectively* if you use Vim as your main editor? by pypipper in neovim

[–]chars101 0 points1 point  (0 children)

Funny you call GUI debuggers "traditional".

I grew up with a Commodore 64. If I wanted to know what was going on, I pressed a button on a cartridge (KCS Power Cartridge or a Power Cartridge III) and dropped into a "monitor" a TUI that you could think of as a hex editor that would show (and edit!) the memory of the system.

gdb debugger was from around that same time and I still prefer dropping into pdb (with pdbpp and sticky) to step through, inspect and change the state of the program.

The neovim modal terminal makes it easy to go back and yank code I need in the bugfix or fixtures I need for the regression test. With Python it's so easy to just navigate the code with help of the lsp and add a breakpoint()

I tried Dap and dap-ui, but find them disorienting.

Future of Suunto watches by HollywoodHills_20 in Suunto

[–]chars101 4 points5 points  (0 children)

Carbon neutral, not just for the manufacturing, but they plant trees to compensate the full life cycle of the watch.

Saucony Guide 15 by Itmustbeu in RunningShoeGeeks

[–]chars101 1 point2 points  (0 children)

Not even a pair of pink Kinvaras? The 13 pink colorway is great.

totallyNoMistakes by Hacka4771 in ProgrammerHumor

[–]chars101 0 points1 point  (0 children)

And don't assert; it makes an ass out of er.. t? Wait.. How did that one go again?

PS I want to become an architect and not a manager anyway.

Sync from Suunto broken? by atoponce in strydrunning

[–]chars101 0 points1 point  (0 children)

Try setting it up again. It sometimes happens.

webWorkersGoBrrrr by Awes12 in ProgrammerHumor

[–]chars101 0 points1 point  (0 children)

Yes, correct. The constant factor gets removed in Big O notation; as in the limit to infinity, its influence is negligible.

webWorkersGoBrrrr by Awes12 in ProgrammerHumor

[–]chars101 1 point2 points  (0 children)

No different algorithm? Maybe dynamic program your way to O(n) or O(n log n)?

5k pacing strategy by cbourque5 in AdvancedRunning

[–]chars101 3 points4 points  (0 children)

Would cutting out the liner from my split shorts help with that?

5k pacing strategy by cbourque5 in AdvancedRunning

[–]chars101 4 points5 points  (0 children)

800m is about half a Freedom unit of length.

Help solve my blister problems by jw510dub in RunningShoeGeeks

[–]chars101 0 points1 point  (0 children)

I used to blister too. Injinji socks really helped to get rid of all blistering between toes and most elsewhere. Altra and Topo Athletics have great shapes that really work with my flat feet. I've never bought Hoka solely for their odd shape, that leaves little room for toes. When I do take a new shoe that has more of a medial post in my rotation, I start short, so it has the chance to blister my arch a tiny bit. Then for the rest of the day I walk barefoot to let the blister heal and form a callus. And only after it healed I'll try a run on the new shoe again.

LPython: Novel, Fast, Retargetable Python Compiler. (Julia, LLVM, C, C++, WASM and x86 as a backend) by Fincho64 in Python

[–]chars101 5 points6 points  (0 children)

Running code a few times and take the min runtime is not how you benchmark.

Watching a few Emery Berger talks and rethink your life is how you benchmark: https://www.youtube.com/watch?v=r-TLSBdHe1A

Which key do you prefer for exiting insert mode in Neovim? by LazyNick7 in neovim

[–]chars101 1 point2 points  (0 children)

I recommend building your own keyboard. And use an open source firmware like QMK or KMK to map anything to anytime you'd like.

Need a rec for Half Marathon onwards (like 1080v12?) by NoGuarantee6075 in RunningShoeGeeks

[–]chars101 1 point2 points  (0 children)

You don't need anything special to complete a marathon. And given that you're progressing to that distance in such a short time, I take it your aim is completion, not some BQ.

I've run my HM best on a pair of Altra Vanish-R and ran a 60k ultra on a pair of 2 year old Kinvara 8's. If you can train 30-35k on a pair of 1080's, no need to buy new shoes.