Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

stdlib? Nope, a definite nope!

I won't expect stdlib.h to provide me a magical get_cursor_pos() function in any way.

GUI toolkits? (This includes the Win32 GUI.) Maybe.

It's not a universal thing though -- for example, you may receive mouse position _only_ when the cursor is in your window.



"stdlib" was shorthand for "the standard library of a given language" and it came across poorly.

I did a quick google before I asked you that question, and it looks like wayland is one of the few exceptions to completely exposing current cursor position. Most "stdlibs" do expose it.


Please refrain from using the term "stdlib", it has a specific meaning and I have trouble understanding what do you mean by it.

Are you referring to the native GUI toolkit of a platform (e.g. Winforms, Cocoa) or something else?


I will not refrain, you're the only one confused by it.

Just google it. You are incorrect and you're not pumped about it, I get it. The horse is fully beat to death. If you want to discuss further, my responses will probably just be lmgtfy links.


I find their point pedantic, but I tend to think it is correct. The "standard library" of a language is the library that comes with the language itself, usually across all platforms, and that rarely contains anything UI-wise beyond the very basics (e.g. text/terminal I/O like printing and reading lines).

I do agree that probably no-one was confused, though.


Check out the link a few comments down.


https://en.wikipedia.org/wiki/Standard_library

> In computer programming, a standard library is the library made available across implementations of a programming language.

You should show me that, among the mainstream programming languages, their standard library will provide get_cursor_pos().


It's clearly you who's confusing "standard library" with "UI toolkit". Some standard libraries come with a toolkit, like Java, but that's an exception rather than rule.

Not that it makes a huge difference in the discussion, but if you want to be smug about it then at least make sure you're right first.


You literally contradicted yourself.


No he didn't. Java is quite possibly the only mainstream language that provides a GUI toolkit in its standard library.

It's an exception, not the rule. Even Python, well known for its batteries-included std, do not provide this magical get_cursor_pos() function that you insist is found in stdlibs.


Perhaps Delphi and Visual Basic could count too if you squint? Can't think of anything else.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: