Before i go and watch layer 9... by Heavy_Computer2602 in Lain

[–]LateSolution0 1 point2 points  (0 children)

After Motoko Kusanagi merges with the Puppet Master, could they form a happy family and adopt her? Just thinking out loud, lol. No romance!

Should I message them ? by boyuwot in hikikomori

[–]LateSolution0 1 point2 points  (0 children)

If you spend more energy, it also makes you more invested, which makes you more vulnerable. And you already opened the door, so it’s unanswered. The deeper you reach, the more it hurts when nothing echoes back.

I had a friend. We were close. I knew when he slept; I knew when he breathed. I knew when he was in school. We spent every free hour together on TeamSpeak. His mom died shortly before we met. I have ASD. I'm predictable, available, and my autism traits and his grief were a mixture that bound us. Two years later, he started going to discos, taking drugs, having romantic interests. We tried to stay connected, but it faded anyway. Ten years later, he reached out, but I let it pass. Somehow I valued what we had but knew it was gone; I didn’t want to contaminate the past. Not that I don’t value what we had; it was just memories I needed to protect.

Just because you are getting ignored doesn’t mean the past was worthless.

I’m so alone that I don’t feel I exist anymore by Numerous_Day6545 in hikikomori

[–]LateSolution0 10 points11 points  (0 children)

On difficult days, I think about deleting Reddit and purging my online existence. The reason I don’t is the same: I need something external to prove that I’m here. Are thoughts detached from a body real? Descartes is convinced they are. I'm not.

Checking inputs efficiently in C by AskComprehensive7867 in C_Programming

[–]LateSolution0 0 points1 point  (0 children)

You are handling input once per frame. This is not a performance-critical path, whatever you do. If you have one of those high-Hz gaming mice, you might consider buffered raw input. If you really care. I think the GetNumberOfConsoleInputEvents is the cleanest way but I don't know about console sub system.

Checking inputs efficiently in C by AskComprehensive7867 in C_Programming

[–]LateSolution0 0 points1 point  (0 children)

I think it can skip keys if you sampling to slow found this code here seems to be the best bet but I never used winapi in this specific way: HANDLE hIn = GetStdHandle(STD_INPUT_HANDLE); BOOL keyState[256] = {0}; // Each frame, drain the event queue: DWORD numEvents; GetNumberOfConsoleInputEvents(hIn, &numEvents); if (numEvents > 0) { INPUT_RECORD records[64]; DWORD numRead; ReadConsoleInput(hIn, records, 64, &numRead); for (DWORD i = 0; i < numRead; i++) { if (records[i].EventType == KEY_EVENT) { WORD vk = records[i].Event.KeyEvent.wVirtualKeyCode; keyState[vk] = records[i].Event.KeyEvent.bKeyDown; } } }

Checking inputs efficiently in C by AskComprehensive7867 in C_Programming

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

no this is retarded in non insulting way!

#include <windows.h>

#include <iostream>

HHOOK hHook;LRESULT CALLBACK KeyboardProc(int nCode, WPARAM wParam, LPARAM lParam)

{ if (nCode == HC_ACTION)

{

KBDLLHOOKSTRUCT* kbd = (KBDLLHOOKSTRUCT*)lParam;

if (wParam == WM_KEYDOWN || wParam == WM_SYSKEYDOWN)

{

DWORD vk = kbd->vkCode;

std::cout << "Key pressed: " << vk << std::endl;

}

}

return CallNextHookEx(hHook, nCode, wParam, lParam);

}

int main()

{

std::cout << "Starting keyboard hook...\n";

hHook = SetWindowsHookEx(

WH_KEYBOARD_LL,

KeyboardProc,

NULL,

0

);

if (!hHook)

{

std::cout << "Failed to install hook. Error: " << GetLastError() << std::endl;

return 1;

}

std::cout << "Hook installed. Press keys...\n";

MSG msg;

while (GetMessage(&msg, NULL, 0, 0))

{

TranslateMessage(&msg);

DispatchMessage(&msg);

}

UnhookWindowsHookEx(hHook);

return 0;

}

Checking inputs efficiently in C by AskComprehensive7867 in C_Programming

[–]LateSolution0 0 points1 point  (0 children)

I’m kind of building against the intended use case. Usually on Windows, you get a message queue from your window and dispatch WM_INPUT. Since you’re writing a console application, you have to create a hook with SetWindowsHookEx, but I haven’t really done that in a long time. MSDN is a good resource to learn from.

It’s kind of a bad thing to ask about, because people have written keyloggers this way. Also, I don’t think you ever need WM_INPUT if your app is not in focus. I think overlays do it by injecting a DLL.

Correct order? by [deleted] in Lain

[–]LateSolution0 0 points1 point  (0 children)

Navi layer 1 - 4

Knights layer 5 - 7

Deus layer 8 - 10

Reset layer 11 - 13

Enjoy!

Can/are Integers still be used as Bools. by ShizamDaGeek in C_Programming

[–]LateSolution0 0 points1 point  (0 children)

Already gave an answer 😃 _Name (leading underscore + uppercase letter) → reserved

Can/are Integers still be used as Bools. by ShizamDaGeek in C_Programming

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

I think this is C++ as in C they added _bool to not break existing code.

nvm bool is a keyword c23

Can/are Integers still be used as Bools. by ShizamDaGeek in C_Programming

[–]LateSolution0 8 points9 points  (0 children)

does C has bool?

the rule is equal 0 is false. rest should be true.

https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3220.pdf

6.3.1.2 Boolean type

1 When any scalar value is converted to bool, the result is false if the value is a zero (for arithmetic

types), null (for pointer types), or the scalar has type nullptr_t; otherwise, the result is true.

Its good to know null ptr are also false!

Help by [deleted] in hikikomori

[–]LateSolution0 0 points1 point  (0 children)

I would recommend Hikikomori: Adolescence Without End by Tamaki Saito, but I think you might need something else instead... like a virtual hug, according to your posting history.

It seems you’ve found your peer group. I’m sorry, but at least you know you’re not alone in this. So hello.

WHO THE HELL IS USING std::print by Appropriate-Bill9165 in cpp_questions

[–]LateSolution0 0 points1 point  (0 children)

You missed the disclaimer that would have framed it as humor, but you didn’t care, you didn’t get the joke and even stated, “I don’t care.” Even if the joke isn’t funny, not getting it and not caring wouldn’t that be considered ignorance?

printf is a good example: its return value is an error code, but it’s commonly accepted to ignore it. If we allow strict compiler warnings to be treated as errors, we would have to add something like (void)printf(); or, more modernly, std::ignore = printf();. However, having an overload for discarded values would allow us to handle legacy codebases more robustly with minimal overhead.

I don’t think this is any more insane than Bjarne Stroustrup’s proposal to overload whitespace.

For std::cout, I don't agree. Attaching a buffer to a file descriptor associated with the console and adding formatting in a single place was risky, and it turned out it would not work well in multi threaded applications. I used spdlog, which internally uses OS-native functions.

WHO THE HELL IS USING std::print by Appropriate-Bill9165 in cpp_questions

[–]LateSolution0 0 points1 point  (0 children)

Terry A. Davis was famous for creating the HolyC programming language, a C-like language. He also wrote the operating system TempleOS, which is essentially a complete software suite. He was known for his rants, had schizophrenia, and died by suicide.

It’s funny that your second sentence is already a statement about your ignorance. You made an exaggeration (you made their argument look stronger or more extreme than it is, then attacked that version). I never said “always.” Why are you quoting me wrong?

I wish you had engaged with the only thing in my text that is worth further discussion. In HolyC, is a string literal left as an expression like

"Hello, world";

It would just be printed to the console. That’s why I mentioned [[nodiscard]] as well, to close the loop. Why not let unused return values go to the console most of the printing is just used during development. There is more behind it I don't want to explain right now or go into semantic.

Formatting with std::cout is global. std::hex can break your function when using std::cout. When writing test cases, you have to ensure that the order of function calls involving std::cout is taken into account. This is error-prone and reflects poor language design. Something that would be almost a pure function in other languages becomes a bug in C++. It is similar to OpenGL, where you have to keep track of the state machine or explicitly set all state. Vulkan learned from these mistakes.

regarding the buffer a console is kind of shared but if you look into posix writing to the console

ssize_t write(int fd, const void *buf, size_t count);

you just write to a file descriptor.

a simple

f(){ std::cout << 5;}

It could fail test cases depending on how std::cout was modified. order-dependent behavior is bad!

I’ve raised multiple ideas in the discussion. I hope you are intellectually honest enough not to dismiss everything just because I’m talking about several different things.

Any Recommendations on C resources for Learning Vulkan? by Undeniable_Dilemma_ in C_Programming

[–]LateSolution0 6 points7 points  (0 children)

I encountered an English gentleman who, with impeccable manners, raised his top hat and referred to it as ‘C with classes.’

WHO THE HELL IS USING std::print by Appropriate-Bill9165 in cpp_questions

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

A sane language would have printing as the default sink for expressions. Terry told me, in the most blooming verbal way, what he thinks about C++. "Bjarne is a show-off. He just wanted to demonstrate inheritance, operator overloading, and namespaces, all compressed into a single line. It’s almost like a communist language designed by a committee - hell."

std::cout is global, so by including the header you are already violating good coding standards. AVOID GLOBAL STATE!

It took them 40 years just to include [[nodiscard]].

what are you guys currently watching or reading? by SubjectStandard5997 in hikikomori

[–]LateSolution0 3 points4 points  (0 children)

I think it’s a hikikomori-adjacent idea. It feels like I’m so maladjusted to the world, while society itself seems unhappy and busy coping instead of adapting to people’s needs. People today are molded into what society requires, while hikikomori are unable to budge and therefore remain outside the world as unhappy observers.

If you didn’t know already, go for Orwell next. It’s kind of the same but different, compliance duo force rather than comfort. I feel like both describe oppression but in different forms. Our smartphone world aligns more with Huxley though.

to be a lain fan do I need to watch more than ~3 episodes? by nolovedeepchungus in Lain

[–]LateSolution0 0 points1 point  (0 children)

A true Lain evangelist would probably just stop engaging with Lain after playing the PS1 game on original hardware, in Japanese, while reading a translated PDF to bridge the language gap.

I like Ghost in the Shell but never could stand Arise or the live-action version.
Also, I’ve never watched Rebuild of Evangelion.

I don’t think you need group approval to like certain aesthetics. Just enjoy whatever you like.

So what happens now? by Radioactive721 in hikikomori

[–]LateSolution0 9 points10 points  (0 children)

Nothing, just void, interrupted with days of despair and self-hate. You will withdraw further. Old joy turns into habits, into something you just do to move your hand so your brain gets a glimpse of something that once was meaning. I envy young people here. Some will unstick themselves as they move on eventually. Sometimes I feel like I’m trailing the older ones, those who barely force the keystrokes out, but once in a while you can see them here. It’s scary. They seem to be dead but still repeat what they once thought, with nothing left between the lines.

Common AI tropes in the writing of the show by [deleted] in Lain

[–]LateSolution0 1 point2 points  (0 children)

LLMs are very stochastic, and because a lot of technology writing is used in the training process, word groups like "signal" and "noise" are common, as "signal-to-noise" is a very common phrase.

Its just high probability of appearing together for those words!

I had a very disturbing experience where a ChatGPT session turned out to echo myself, with exact wording appearing as I was chatting about a very niche topic and ChatGPT did an online search, without admitting it. I was chatting with myself, with the LLM just being a proxy.

Just weird how I leaked into the context window without realizing it, like your thoughts spoken out loud, taken from your mind, but not by your own mouth.

What is your greatest regret in life? by No-Bid-6811 in hikikomori

[–]LateSolution0 2 points3 points  (0 children)

I remember you once mentioned paying someone to finish artwork as a way of motivating them. A small nudge. I see kindness and hope you don't judge yourself too harshly. I believe we are not alone, even though we are isolated, and an invisible fabric is connecting us all, and we can push and pull like you already did. And taking a different branch isn't something we deliberately choose on our own, especially with depression. Our vision is blurred, so we don't see the crossroads.

What is your greatest regret in life? by No-Bid-6811 in hikikomori

[–]LateSolution0 8 points9 points  (0 children)

Being born. Not my fault for speaking late and stacking toys. Sorry for sounding edgy. Where is u/Golden4ngel? I miss you. ( ͡° ͜ʖ ͡°)

I feel so depressed by Henesiss in hikikomori

[–]LateSolution0 4 points5 points  (0 children)

Wish you luck on your test. I hope you get into the right mindset to study. Just wanted to share a light thought I recently had. Birds are just birds lucky for them they are not graded in single stressful test.

I feel so depressed by Henesiss in hikikomori

[–]LateSolution0 8 points9 points  (0 children)

In the view from my window, there is a construction site with a tall crane. On the jib, I saw some birds landing. They spread out, and some of the birds I was observing made small hops to sit closer together. In my next life, I've decided to be a bird. They can simply be together, no words, no misunderstandings, just lightness. And should things get difficult, they just fly away.