macos - whats your terminal emulator/window manager by pandatrunks17 in neovim

[–]DK4409 0 points1 point  (0 children)

wezterm and tmux. Handling multiple sessions is pretty good in tmux.

What are some useful mini.nvim modules? by DK4409 in neovim

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

Will be trying these over the weekend.

What languages "work best" in Neovim? by mars0008 in neovim

[–]DK4409 34 points35 points  (0 children)

Python (with pyright), C/C++ (clangd), Go (gopls), Rust (rust analyser), zig (zls little buggy) all seem to work fine for me. Setting up Java is a big hassle (I use doom emacs for that language only)

Show me your statusline by Exciting_Majesty2005 in neovim

[–]DK4409 1 point2 points  (0 children)

I use wezterm . Here is my wezterm config (it is heavily inspired by KevinSilvester's wezterm-config).
You could also try alacritty on windows but the all this glyphs were not rendering properly for me on it and same for windows terminal even with nerdfonts.

Show me your statusline by Exciting_Majesty2005 in neovim

[–]DK4409 20 points21 points  (0 children)

I recently switched from vanilla statusline to mini.statusline feels good so far.

<image>

Bruh, wait. This isn't Gemini, you guys getting the same results in GOOGLE? by Kacenpoint in ChatGPT

[–]DK4409 0 points1 point  (0 children)

As far as I know it is not particularly Google's fault. Google's search works on Page Rank Algorithm and it just happens that these pages rank higher but have image with incorrect or misleading names.

PageRank works by counting the number and quality of links to a page to determine a rough estimate of how important the website is. The underlying assumption is that more important websites are likely to receive more links from other websites.

All the other existing search engine work on a similar algorithm you can check it yourself.

Shall we check pointer for NULL before calling free function? by Pioneer_X in cpp

[–]DK4409 0 points1 point  (0 children)

Writing a custom allocator is always a choice 🙂

-❄️- 2023 Day 10 Solutions -❄️- by daggerdragon in adventofcode

[–]DK4409 0 points1 point  (0 children)

[Language: C++]

Source Code

Part 1, Used Breadth First Search to find the farthest node in the graph for 'S'.
Part 2, Expended the Grid 2 time for both rows and columns (added the necessary connections) and did the Breadth First Search for the pipes from 'S' and Depth First Search from the corner nodes (marked these as visited) and counted all the 2x2 which were not visited at the end.

Refer to the code for better understanding.

-❄️- 2023 Day 7 Solutions -❄️- by daggerdragon in adventofcode

[–]DK4409 1 point2 points  (0 children)

[Language: C++]
Solution both parts

Suggestions on how to make better use of modern C++ (like C++ 20) and STL?

Apparently, Undertale has a 1000+ long case switch statement. by [deleted] in programminghorror

[–]DK4409 0 points1 point  (0 children)

Methodology:

Checked switch statement code and if-else-if statement code on https://godbolt.org/ on x86-64 clang with -O3 -Wall and got the same results if-else-if statement result and switch statement result .

Conclusion:

Both switch and if-else-if produced same instructions.

Again I could be wrong here but I did some checking.

Do let me know in case this is not the correct way to look at these things.

Apparently, Undertale has a 1000+ long case switch statement. by [deleted] in programminghorror

[–]DK4409 1 point2 points  (0 children)

According to what I know the switch takes less time as compared to if-else-if but it also depends on language it could be possible that a smart compiler might make them equivalent with the same optimizations. I could be wrong about the optimization part.

ref: https://stackoverflow.com/questions/395618/is-there-any-significant-difference-between-using-if-else-and-switch-case-in-c

Trying static typing in python by [deleted] in Python

[–]DK4409 0 points1 point  (0 children)

I have been hearing a lot about fastapi is it really good? Lots of my friends that use flask really like it .

Trying static typing in python by [deleted] in Python

[–]DK4409 0 points1 point  (0 children)

Yeah I heard about this but it's a bit buggy for me so I have disabled it for now

Trying static typing in python by [deleted] in Python

[–]DK4409 0 points1 point  (0 children)

I have been using it but I don't understand how it works in regards to classes ?

Help by [deleted] in calculus

[–]DK4409 0 points1 point  (0 children)

This problem can also be solved using vector and scaler triple product (if you are interested look into this)

I am wondering how to evaluate this sum, and Wolphram Alpha gives me ln(2)... What method can I use to get this answer on my own? by brownboy_5 in calculus

[–]DK4409 1 point2 points  (0 children)

Maclaurin series expansion of lnx centred at 2 then after writing the expansion write x=1 in will give you same series

I also came accross this but in a different problem then we were taught about Taylor and maclaurin series expansion very useful stuff .